Annotation of src/sys/README.SMP, Revision 1.1.2.6
1.1.2.5 niklas 1: The SMP branch is irregularly updated from the trunk. To do this
1.1.2.1 niklas 2: you mainly need to carry out the following procedure.
3:
4: * Determine the new synchronization tag to use. There are two used
1.1.2.4 niklas 5: alternately; SMP_SYNC_A and SMP_SYNC_B. You can use several heuristics
1.1.2.1 niklas 6: to find out which one was used last, and then use the other one.
7: For example, CVSROOT/history* files gives you information about tag
8: operations in lines matching '^T'. Call the tag you will be using
9: for $NEW_TAG and the other one $OLD_TAG.
10:
1.1.2.3 niklas 11: * Remove every trace of the old synchronization tag, note that cvs rtag -F
12: won't cut it, as it does not remove files that have been removed since
13: last time.
14:
15: $ cvs -d cvs.openbsd.org:/cvs rtag -d $OLD_TAG src/sys
16:
1.1.2.1 niklas 17: * Tag the trunk with the new synchronization tag.
18:
1.1.2.3 niklas 19: $ cvs -d cvs.openbsd.org:/cvs rtag -rHEAD $NEW_TAG src/sys
1.1.2.1 niklas 20:
21: * Have an SMP branch checkout available with -kk substitution done.
22: For example check out a fresh one:
23:
24: $ cvs get -rSMP -kk src/sys
25:
1.1.2.3 niklas 26: * Create and add directories that have been added to the trunk since
27: last synchronization. Say you have a clean standard trunk checkout in $STD
28: and your clean SMP checkout is in $SMP:
29:
30: $ cd $STD/src/sys
31: $ find . -type d \! -name CVS \! -path "*/compile/*" |sort>/tmp/stddirs
32: $ cd $SMP/src/sys
33: $ find . -type d \! -name CVS \! -path "*/compile/*" |sort>/tmp/smpdirs
34: $ comm -23 /tmp/{std,smp}dirs |while read d; do
35: > mkdir $d
36: > cvs add $d
37: > done
38:
1.1.2.1 niklas 39: * Go into src/sys and merge from the trunk (make sure that the repository
40: you use have the new tags from the tagging above, i.e. don't use a mirror
41: that has not been updated since that step):
42:
43: $ cvs up -j$OLD_TAG -j$NEW_TAG -kk
44:
45: * Find any conflicts, and resolve them, this command might help:
46:
47: $ cvs -q up -dP -rSMP -kk 2>&1 | grep '^C '
48:
1.1.2.3 niklas 49: * Build and test an i386 GENERIC.MP kernel as well as an alpha GENERIC,
50: fix every regression you can find.
1.1.2.1 niklas 51:
1.1.2.3 niklas 52: * Time to fixup some cvs bugs. Files that has got added since last
1.1.2.4 niklas 53: synchronization will make cvs choke in two different ways.
54: Readdition of files that have gone dead need to have
55: the timestamp in the Entries file changed to /dummy timestamp/
56: in order to be accepted by commit. Other new files will be committed
57: but than crash before clening things up. They leave the RCS file locked
58: on cvs.openbsd.org, and the changes won't be reflected locally.
59: After removing it locally, two updates are needed, the 1st to
1.1.2.3 niklas 60: remove the local CVS/Entries entry, and the second to get it
61: checked out.
62:
63: $ fixup() {
64: > cvs -qd cvs.openbsd.org:/cvs ci -m'dummy message' $1
65: > ssh cvs.openbsd.org 'rcs -u /cvs/src/sys/'$1',v'
66: > rm $1
67: > cvs -qd cvs.openbsd.org:/cvs up -dP -rSMP -kk $1
68: > cvs -qd cvs.openbsd.org:/cvs up -dP -rSMP -kk $1
69: > }
70:
71: Now you can use the fixup function to fix all the files that are new.
72: This command will make you a script you can source:
73:
74: $ find . -path "*/CVS/Entries" |xargs grep /0/ \
75: > |sed -e 's#CVS/Entries:/##' -e 's#/0/.*##' -e 's/^/fixup /' >fixups
76: $ . ./fixups
77:
78: It will go slow and report stuff like:
79:
80: Checking in ./foo/bar;
81: /cvs/src/sys/foo/bar,v <-- bar
82: cvs server: bar: No such file or directory
83: cvs [server aborted]: error diffing bar
84: RCS file: /cvs/src/sys/./foo/bar,v
85: 1.1 unlocked
86: done
87: cvs server: warning: new-born ./foo/bar has disappeared
88: U ./foo/bar
1.1.2.1 niklas 89:
1.1.2.3 niklas 90: All other reports are abnormal and you should check them closer.
91: Also this will make /tmp dirty on cvs, please login and clen your stuff.
1.1.2.2 niklas 92:
1.1.2.3 niklas 93: * Commit to the SMP branch in pieces to not lock too much of the sys tree
94: in the repository, Nice chunks are perhaps 100-300 files.
1.1.2.2 niklas 95:
96: * A nice check is to browse the output of:
97:
1.1.2.6 ! niklas 98: $ cvs -qd cvs.openbsd.org:/cvs rdiff -kk -u -r$NEW_TAG -rSMP src/sys
1.1.2.3 niklas 99:
1.1.2.4 niklas 100: It should just be differences related to multiprocessor support.