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