$OpenBSD: README.SMP,v 1.1.2.12 2004/02/19 10:57:00 niklas Exp $ The SMP branch is irregularly updated from the trunk. To do this you mainly need to carry out the following procedure. * Determine the new synchronization tag to use. There are two used alternately; SMP_SYNC_A and SMP_SYNC_B. You can use several heuristics to find out which one was used last, and then use the other one. For example, CVSROOT/history* files gives you information about tag operations in lines matching '^T'. Call the tag you will be using for $NEW_TAG and the other one $OLD_TAG. * Remove every trace of the "old" new synchronization tag, note that cvs rtag -F won't cut it, as it does not remove files that have been removed since last time. $ cvs -d cvs.openbsd.org:/cvs rtag -d $NEW_TAG src/sys * Tag the trunk with the new synchronization tag. $ cvs -d cvs.openbsd.org:/cvs rtag -rHEAD $NEW_TAG src/sys * Have an SMP branch checkout available with -kk substitution done. For example check out a fresh one: $ cvs get -rSMP -kk src/sys * Create and add directories that have been added to the trunk since last synchronization. Say you have a clean standard trunk checkout in $STD and your clean SMP checkout is in $SMP: $ cd $STD/src/sys $ find . -type d \! -name CVS \! -path "*/compile/*" |sort>/tmp/stddirs $ cd $SMP/src/sys $ find . -type d \! -name CVS \! -path "*/compile/*" |sort>/tmp/smpdirs $ comm -23 /tmp/{std,smp}dirs |while read d; do > mkdir $d > cvs add $d > done * Go into src/sys and merge from the trunk (make sure that the repository you use have the new tags from the tagging above, i.e. don't use a mirror that has not been updated since that step): $ cvs up -j$OLD_TAG -j$NEW_TAG -kk * Find any conflicts, and resolve them, this command might help: $ cvs -q up -dP -rSMP -kk 2>&1 | grep '^C ' * Build and test an i386 GENERIC.MP kernel as well as an alpha GENERIC, fix every regression you can find. * Time to fixup some cvs bugs. Files that has got added since last synchronization will make cvs choke in two different ways. Readdition of files that have gone dead need to have the timestamp in the Entries file changed to /dummy timestamp/ in order to be accepted by commit. Other new files will be committed but then crash before cleaning things up. They leave the RCS file locked on cvs.openbsd.org, and the changes won't be reflected locally. After removing it locally, two updates are needed, the 1st to remove the local CVS/Entries entry, and the second to get it checked out. Last, if someone has managed to interleave a commit to any of these files while you have been working, it will be needed to revert it, since that commit will have come into this fixup process instead of the version at $NEW_TAG. $ fixup() { > cvs -qd cvs.openbsd.org:/cvs ci -m'add file to SMP branch' $1 > ssh cvs.openbsd.org 'rcs -u /cvs/src/sys/'$1',v' > rm $1 > cvs -qd cvs.openbsd.org:/cvs up -dP -rSMP -kk $1 > cvs -qd cvs.openbsd.org:/cvs up -dP -rSMP -kk $1 > cvs -qd cvs.openbsd.org:/cvs up -dP -rSMP -kk -jSMP -j$NEW_TAG $1 > } Now you can use the fixup function to fix all the files that are new. This command will make you a script you can source: $ find . -path "*/CVS/Entries" |xargs grep /0/ \ > |sed -e 's#CVS/Entries:/##' -e 's#/0/.*##' -e 's/^/fixup /' >fixups $ . ./fixups It will go slow and report stuff like: Checking in ./foo/bar; /cvs/src/sys/foo/bar,v <-- bar cvs server: bar: No such file or directory cvs [server aborted]: error diffing bar RCS file: /cvs/src/sys/./foo/bar,v 1.1 unlocked done cvs server: warning: new-born ./foo/bar has disappeared U ./foo/bar All other reports are abnormal and you should check them closer. Also this will make /tmp dirty on cvs, please login and clean your stuff. * Commit to the SMP branch in pieces to not lock too much of the sys tree in the repository, Nice chunks are perhaps 100-300 files. * A nice check is to browse the output of: $ cvs -qd cvs.openbsd.org:/cvs rdiff -kk -u -r$NEW_TAG -rSMP src/sys It should just be differences related to multiprocessor support.