aboutsummaryrefslogtreecommitdiff
path: root/Tools/scripts
diff options
context:
space:
mode:
authorWill Andrews <will@FreeBSD.org>2002-03-27 00:52:59 +0000
committerWill Andrews <will@FreeBSD.org>2002-03-27 00:52:59 +0000
commitf0aedc56a5b9ad4bd7f17b27a559200b25fbc14c (patch)
tree6e0f492d609d4966efdb30d465128369de882f27 /Tools/scripts
parenta56a8c69357654120d09125450bbf4df3b32cf65 (diff)
downloadports-f0aedc56a5b9ad4bd7f17b27a559200b25fbc14c.tar.gz
ports-f0aedc56a5b9ad4bd7f17b27a559200b25fbc14c.zip
Notes
Diffstat (limited to 'Tools/scripts')
-rw-r--r--Tools/scripts/release/README12
-rwxr-xr-xTools/scripts/release/doit.sh129
2 files changed, 141 insertions, 0 deletions
diff --git a/Tools/scripts/release/README b/Tools/scripts/release/README
index 4a6efdc7c774..dd0ebff13939 100644
--- a/Tools/scripts/release/README
+++ b/Tools/scripts/release/README
@@ -4,3 +4,15 @@ This directory contains the scripts that are used to break up the packages
for a given release, so that they fit on a particular 4 CD set. They rely
on src/release/scripts/print-cdrom-packages.sh to give preference for
particular packages to be located on particular CDs.
+
+The approximate procedure is:
+
+1) CVSROOT/avail lockout
+2) cvs rtag RELEASE_4_5_0 ports
+
+1) cd /a/steve/4.5/i386/RC3
+2) ./scripts/setup.sh (may want to redirect stdout to a file,
+ as this gives copious output.)
+3) ./doit.sh
+
+More documentation to come later.
diff --git a/Tools/scripts/release/doit.sh b/Tools/scripts/release/doit.sh
new file mode 100755
index 000000000000..abc6f62d5613
--- /dev/null
+++ b/Tools/scripts/release/doit.sh
@@ -0,0 +1,129 @@
+#!/bin/sh
+# $FreeBSD$
+
+dir=`dirname $0`
+if [ "X$dir" = "X." ]; then
+ dir=`pwd`
+fi
+
+##############################################################################
+#
+# Tweak these parameters to match your configuration and make sure to check
+# that the disc information in config is correct.
+#
+# You'll also want to place a recent copy of print-cdrom-packages.sh in the
+# $scripts directory.
+#
+
+ ports="$dir/ports"
+ dists="$ports/distfiles"
+ logs="$dir/gen"
+ pkgs="$ports/packages/All"
+scripts="$dir/scripts"
+ xdep="XFree86-3.3.6_10"
+
+#
+##############################################################################
+
+test -d $logs || mkdir -p $logs
+
+if [ ! -d "$ports" ]; then
+ $scripts/setup.sh
+ echo ""
+ echo "Make sure you tweak $dir/config to suit your needs."
+ echo ""
+fi
+
+if [ ! -f "$logs/restricted.sh" ]; then
+ echo "===> restricted list generation started at $(date)"
+ (cd $ports; PORTSDIR=$ports make ECHO_MSG=/usr/bin/true \
+ clean-restricted-list > $logs/restricted.sh)
+ echo "===> restricted list generation ended at $(date)"
+ echo $(grep -c '^#' $logs/restricted.sh) "ports in $logs/restricted.sh"
+fi
+
+if [ ! -f "$logs/.restricted.done" ]; then
+ echo "===> cleaning restricted files"
+ sh $logs/restricted.sh
+ touch $logs/.restricted.done
+fi
+
+if [ ! -f "$logs/cdrom.sh" ]; then
+ echo "===> cdrom list generation started at $(date)"
+ (cd $ports; PORTSDIR=$ports make ECHO_MSG=/usr/bin/true \
+ clean-for-cdrom-list > $logs/cdrom.sh)
+ echo "===> cdrom list generation ended at $(date)"
+ echo $(grep -c '^#' $logs/cdrom.sh) "ports in $logs/cdrom.sh"
+fi
+
+if [ ! -f "$logs/.cdrom.done" ]; then
+ echo "===> cleaning non-CDROM-able files"
+ sh $logs/cdrom.sh
+ touch $logs/.cdrom.done
+fi
+
+if [ ! -f "$logs/INDEX" ]; then
+ echo "===> copying INDEX file"
+ $scripts/scrubindex.pl $pkgs $ports/INDEX > $logs/INDEX
+ $scripts/checkdeps.pl $pkgs $logs/INDEX | sort -u | \
+ sed -e 's/^/missing dependency: /'
+fi
+
+echo -n "Create a list of needed files for each disc? [y] "
+read ans
+if [ X$ans != Xn -a X$ans != XN ]; then
+ >$logs/need.ALL
+ for disc in `cat config | grep -v '#' | sed -e 's/[ ].*//'`; do
+ echo "disc $disc" >> $logs/need.ALL
+ $scripts/print-cdrom-packages.sh `echo $disc | sed -e 's/^disc//'` \
+ $ports | grep -v $xdep | tee $logs/need.$disc >> $logs/need.ALL
+ done
+fi
+
+echo -n "Populate the discs now? [y] "
+read ans
+if [ X$ans != Xn -a X$ans != XN ]; then
+ for disc in `ls -d disc? 2>/dev/null`; do
+ echo "===> deleting $disc"
+ rm -rf $disc
+ done
+ if [ -d "scratch" ]; then
+ echo "===> deleting scratch"
+ rm -rf scratch
+ fi
+ $scripts/oneshot.pl config $logs/need.ALL $logs/INDEX $ports $pkgs/../ $dists
+ for disc in `ls -d disc? 2>/dev/null`; do
+ echo "===> cleaning $disc"
+ if [ -d "$disc/packages/All" ]; then
+ $scripts/checkdeps.pl $disc/packages/All $disc/packages/INDEX | \
+ sort -u | sed -e 's/^/missing package: /'
+ (
+ cd $disc/packages/All; \
+ $scripts/scrubindex.pl . ../INDEX > ../INDEX.new; \
+ mv ../INDEX.new ../INDEX; \
+ find . -name '*.tgz' | xargs /sbin/md5 > CHECKSUM.MD5; \
+ )
+ fi
+ du -ck $disc | grep total
+ done
+fi
+
+echo -n "Make sure the 'needed' packages made it on the right disc(s)? [y] "
+read ans
+if [ X$ans != Xn -a X$ans != XN ]; then
+ for disc in `ls -d disc? 2>/dev/null`; do
+ echo "===> checking $disc"
+ > $logs/have.$disc
+ if [ -d "$disc/packages/All" ]; then
+ ( cd $disc/packages/All && find . -name '*.tgz' | \
+ sed -e 's/\.tgz//' -e 's/^\.\///' | sort) > \
+ $logs/have.$disc
+ fi
+ diff -u $logs/have.$disc $logs/need.$disc | grep -e '^\+' | \
+ grep -v -e '^\+* ' | sed -e 's/\+//' > $logs/missing.$disc
+ if [ -s $logs/missing.$disc ]; then
+ echo "===> missing required packages on $disc"
+ cat $logs/missing.$disc
+ fi
+ done
+fi