* Re: About cvs
2000-04-21 18:52 ` Lars Magne Ingebrigtsen
@ 2000-04-22 3:59 ` Russ Allbery
2000-04-22 11:37 ` Lars Magne Ingebrigtsen
0 siblings, 1 reply; 7+ messages in thread
From: Russ Allbery @ 2000-04-22 3:59 UTC (permalink / raw)
Lars Magne Ingebrigtsen <larsi@gnus.org> writes:
> Julien Gilles <julien.gilles@bcv01y01.vz.cit.alcatel.fr> writes:
>> I know that there is a cvs server to pgnus sources, but I am behind a
>> firewall, and no way to use cvs trough web. It is possible to have,
>> once a day, an automatic tar file of pgnus sources in the /gnus/dist/
>> directory ?
> If someone writes a script to do that, I'll put it in crontab...
Here's the script that we use to do this for INN. It would need some
adjustment for local patches, local CVS repository paths, and the like,
but it should at least serve as a starting point for someone.
#!/bin/sh
## $Id: nightlysnap,v 1.4 2000/04/13 06:09:19 rra Exp $
##
## Generate the INN nightly CVS snapshots.
##
## Does a full checkout of each currently maintained CVS branch, updates
## the version information in Makefile.global.in and adds a README, and
## bundles up the tar file for later pulling by ftp.isc.org.
# Set the path to find cvs and standard shell commands.
PATH="/usr/local/bin:/usr/contrib/bin:/usr/bin:/bin"
export PATH
# Directory into which to copy each snapshot tarball.
FTPDIR="/var/ftp/inn-snaps"
# Name of the log file into which to log the output of this script.
LOGFILE="nightly.log"
# Check out inn, pruning empty subdirectories, with the given tag and then
# update the version string in Makefile.global.in to the snapshot date.
# Also remove all the CVS directories; they aren't useful anyway since
# anyone with CVS can as easily do a direct checkout and the Repository
# information would require tweaking.
checkout () {
command="cvs -f -d /proj/cvs/isc/inn checkout -P"
if [ -n "$1" ] ; then
command="$command -r $1"
fi
$command inn || {
echo cvs checkout failed
exit 1
}
date=`date -u +%Y%m%d`
sed "s/= CVS prerelease/= $date prerelease/" inn/Makefile.global.in > m \
&& mv m inn/Makefile.global.in
find inn -type d -name CVS -print | xargs rm -r
}
# tar up and compress a directory, delete the directory, and move the
# resulting tarball to FTPDIR.
mktarball () {
if [ -z "$1" ] ; then
echo mktarball requires an argument
exit 1
fi
base="$1"
tar cf - "$base" | gzip -9 > "$base.tar.gz" || exit 1
cp "./$base.tar.gz" "$FTPDIR" || exit 1
rm -rf "$base" "$base.tar.gz"
}
# cd to a known starting directory, open our log, and start logging.
cd $HOME
exec > nightly.log 2>&1
set -vx
# Make sure the ftp directory exists and is empty.
if [ -d "$FTPDIR" ]; then
rm -f "$FTPDIR"/*
else
mkdir "$FTPDIR"
fi
# Purge and create the local working directory we'll use.
rm -rf nightly
mkdir nightly
cd nightly || {
echo "can't cd to nightly"
exit 1
}
date=`date -u +%Y%m%d`
# Create the CURRENT snapshot.
checkout
cat > inn/README.snapshot <<EOF
This is a snapshot of the current development version of INN, pulled
automatically from the CVS repository. It was made on:
`date -u +"%B %e, %Y @ %I:%M %p %Z"`
This code should be considered pre-alpha in its stability. It is not
tested before being made available, even to see if it compiles. If it
breaks, we'd like to know at inn-bugs@isc.org, but if it causes your
system to explode, don't blame us.
If you are using this code, it's highly recommended that you be on the
inn-workers@isc.org mailing list. See README for more information.
EOF
mv inn "inn-CURRENT-$date"
mktarball "inn-CURRENT-$date"
# Create the STABLE snapshot.
checkout STABLE-2_2
cat > inn/README.snapshot <<EOF
This is a snapshot of the STABLE branch of INN, pulled automatically from
the CVS repository. It was made on:
`date -u +"%B %e, %Y @ %I:%M %p %Z"`
Only bug fixes are committed to this branch, so the only differences
between this code and the last stable INN release should be fixes for
bugs. However, this code is not tested before being made available,
not even to see if it compiles, so a particular given snapshot may not
work.
EOF
mv inn "inn-STABLE-$date"
mktarball "inn-STABLE-$date"
# Create the 2.3 beta snapshot.
checkout STABLE-2_3
cat > inn/README.BETA <<EOF
This is a snapshot of the INN 2.3.0 release candidate branch, pulled
automatically from the CVS repository. It was made on:
`date -u +"%B %e, %Y @ %I:%M %p %Z"`
This is a candidate for the INN 2.3.0 release. Please test it as
thoroughly as you can and report any problems to inn-bugs@isc.org.
Note that while this code should be fairly stable, it is still in beta
testing, and note that the snapshots are not tested before being made
so it is possible that a particular snapshot will catch the tree in an
unstable state.
EOF
mv inn "inn-BETA-$date"
mktarball "inn-BETA-$date"
--
Russ Allbery (rra@stanford.edu) <http://www.eyrie.org/~eagle/>
^ permalink raw reply [flat|nested] 7+ messages in thread