Subject: Re: sup-to-cvs script
To: Mike Pumford <mpumford@black-star.demon.co.uk>
From: Greg A. Woods <woods@most.weird.com>
List: current-users
Date: 09/14/1998 14:47:58
[ On Sun, September 13, 1998 at 21:12:20 (+0100), Mike Pumford wrote: ]
> Subject: Re: sup-to-cvs script
>
> A script is the one thing that page lacks. It does however contain step by
> step instructions for doing the same task. It can be improved my
> modifing the cvs update stage to perform a cvs update between the last 2
> current import tags. With this approach CVS should handle all the
> deletion/creation required.
It should be noted that as of about CVS-1.10 the updating and merging of
a local working directory (i.e. to merge the new "vendor" release into a
local working copy) now works a whole lot better, but *only* if you use
the actual vendor release tag names, and *not* the ":yesterday" magic.
I'm not sure when this was fixed, but I'm fairly certain 1.9 does *not*
work properly.
For example, if you do an import such as:
cvs import -I ! -m 'netbsd as of LAST' netbsd netbsd current-LAST
and the next time you do:
cvs import -I ! -m 'netbsd as of DATE' netbsd netbsd current-DATE
Then you would:
cvs update -d -P -j current-LAST -j current-DATE
In fact in my testing I note that so far it seems to properly mark files
to be removed *and* resurrected (i.e. by re-adding them to the trunk).
The method of resurrecting files is not ideal since it will cause import
conflicts every time those files are changed in the future, but without
the help of CVS itself during the import it's not very easy to figure
out which files have been resurrected, move them back out of the Attic
directories and change their default branch back to 1.1.1 so that they
can be automatically resurrected in working directories.
In fact there doesn't seem to be any problem with merging "too much".
I.e. the following seems to work too (though I've not tested it
extensively):
cvs update -d -P -j 1.1.1 -j current-DATE
even if you keep running the merge in the same directory and don't
commit the changes.
Note also that the perl script given on your web page depends on the
output of the sup run, which may easily be lost or corrupted, esp. if
your sup run breaks in the middle for some reason. I have a script that
is independent of sup and works with only the vendor tags and the
current working directory. You can currently find a copy of this script
here:
ftp://ftp.weird.com/pub/local/cvsrmvend.sh-v1.4
However I would *strongly* recommend that everyone tracking third party
source releases upgrade to CVS-1.10 or CVS-current and be careful not to
use ":yesterday" as neither Mike's script, nor mine, will correctly
resurrect files, which can be a massive problem if you're tracking
pkgsrc where for some illogical reason the pkgsrc people still think
it's a good idea to keep lots of little patch files, and as a result
they come and go quite frequently as the necessary patches change from
package release to package release.
BTW, I do my imports like this, eg. for the allsrc collection:
cd /var/sup/sup.NetBSD.ORG/src
cvs import -I ! -m "NetBSD allsrc collection sup $(cat ../../current/when.allsrc)" NetBSD/src NetBSD NetBSD-$(cat ../../current/when.allsrc)
thus the comment and tag contain the actual timestamp from the sup.
I run the sup from cron, but I only do the import very infrequently,
though a script that runs sup and then on success runs the above command
in the base of the sup tree would do everything you can do safely enough
to do automatically.
For a supfile containing:
current release=allsrc host=sup.NetBSD.ORG hostbase=/ftp/pub base=/var prefix=/var/sup/sup.NetBSD.ORG delete use-rel-suffix compress
current release=xsrc host=sup.NetBSD.ORG hostbase=/ftp/pub base=/var prefix=/var/sup/sup.NetBSD.ORG delete use-rel-suffix compress
current release=security host=sup.NetBSD.ORG hostbase=/ftp/pub base=/var prefix=/var/sup/sup.NetBSD.ORG delete use-rel-suffix compress
current release=doc host=sup.NetBSD.ORG hostbase=/ftp/pub base=/var prefix=/var/sup/sup.NetBSD.ORG delete use-rel-suffix compress
current release=othersrc host=sup.NetBSD.ORG hostbase=/ftp/pub base=/var prefix=/var/sup/sup.NetBSD.ORG delete use-rel-suffix compress
current release=pkgsrc host=sup.NetBSD.ORG hostbase=/ftp/pub base=/var prefix=/var/sup/sup.NetBSD.ORG delete use-rel-suffix compress
According to du(1) the /var/sup directory occupies 414,163 KB, and after
about a dozen imports of /usr/src and slightly more imports of
/usr/pkgsrc, /cvs/NetBSD occupies about 442,533 KB. Then of course
there's the additional 420 MB on /usr for the working copies, and the
space for objects and binaries, etc.... ;-)
--
Greg A. Woods
+1 416 218-0098 VE3TCP <gwoods@acm.org> <robohack!woods>
Planix, Inc. <woods@planix.com>; Secrets of the Weird <woods@weird.com>