Annotation of src/sys/README.SMP, Revision 1.1.2.11
1.1.2.11! niklas 1: $OpenBSD$
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
1.1.2.11! niklas 63: checked out. Last, if someone has managed to interleave a commit
! 64: to any of these files while you have been working, it will be
! 65: needed to revert it, since that commit will have come into this
! 66: fixup process instead of the version at $NEW_TAG.
1.1.2.3 niklas 67:
68: $ fixup() {
1.1.2.9 ho 69: > cvs -qd cvs.openbsd.org:/cvs ci -m'add file to SMP branch' $1
1.1.2.3 niklas 70: > ssh cvs.openbsd.org 'rcs -u /cvs/src/sys/'$1',v'
71: > rm $1
72: > cvs -qd cvs.openbsd.org:/cvs up -dP -rSMP -kk $1
73: > cvs -qd cvs.openbsd.org:/cvs up -dP -rSMP -kk $1
1.1.2.11! niklas 74: > cvs -qd cvs.openbsd.org:/cvs up -dP -rSMP -kk -jSMP -j$NEW_TAG $1
1.1.2.3 niklas 75: > }
76:
77: Now you can use the fixup function to fix all the files that are new.
78: This command will make you a script you can source:
79:
80: $ find . -path "*/CVS/Entries" |xargs grep /0/ \
81: > |sed -e 's#CVS/Entries:/##' -e 's#/0/.*##' -e 's/^/fixup /' >fixups
82: $ . ./fixups
83:
84: It will go slow and report stuff like:
85:
86: Checking in ./foo/bar;
87: /cvs/src/sys/foo/bar,v <-- bar
88: cvs server: bar: No such file or directory
89: cvs [server aborted]: error diffing bar
90: RCS file: /cvs/src/sys/./foo/bar,v
91: 1.1 unlocked
92: done
93: cvs server: warning: new-born ./foo/bar has disappeared
94: U ./foo/bar
1.1.2.1 niklas 95:
1.1.2.3 niklas 96: All other reports are abnormal and you should check them closer.
1.1.2.10 niklas 97: Also this will make /tmp dirty on cvs, please login and clean your stuff.
1.1.2.2 niklas 98:
1.1.2.3 niklas 99: * Commit to the SMP branch in pieces to not lock too much of the sys tree
100: in the repository, Nice chunks are perhaps 100-300 files.
1.1.2.2 niklas 101:
102: * A nice check is to browse the output of:
103:
1.1.2.6 niklas 104: $ cvs -qd cvs.openbsd.org:/cvs rdiff -kk -u -r$NEW_TAG -rSMP src/sys
1.1.2.3 niklas 105:
1.1.2.4 niklas 106: It should just be differences related to multiprocessor support.