Gnus development mailing list
 help / color / mirror / Atom feed
From: Russ Allbery <rra@stanford.edu>
Subject: Re: About cvs
Date: 21 Apr 2000 20:59:24 -0700	[thread overview]
Message-ID: <ylhfcuss4j.fsf@windlord.stanford.edu> (raw)
In-Reply-To: Lars Magne Ingebrigtsen's message of "21 Apr 2000 20:52:39 +0200"

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/>



  reply	other threads:[~2000-04-22  3:59 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1999-12-10  9:02 Julien Gilles
2000-04-21 18:52 ` Lars Magne Ingebrigtsen
2000-04-22  3:59   ` Russ Allbery [this message]
2000-04-22 11:37     ` Lars Magne Ingebrigtsen
2000-04-21 20:33 ` Shenghuo ZHU
2000-04-21 21:30   ` Lloyd Zusman
2000-04-21 21:33     ` Lloyd Zusman

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=ylhfcuss4j.fsf@windlord.stanford.edu \
    --to=rra@stanford.edu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).