Subject: Re: NetBSD/sparc snapshot
To: David Brownlee <abs@anim.dreamworks.com>
From: Paul Kranenburg <pk@cs.few.eur.nl>
List: port-sparc
Date: 05/28/1998 01:11:47
> OK, I'll bite, could someone email me their procedure for
> building a release and I'll see if I can rework the 'snapshot'
> target to DTRT.
The last few "snapshots" I built were in `release' format. I don't
think the old `snapshot' target in src/etc/Makefile has any distinct
advantages.
I've used the shell script attached below to build the release(7)
hierarchy for 1.3.2. I wouldn't mind seeing it (or something equivalent)
integrated as a `make' target (in MI fashion) somewhere.
-pk
--------
#!/bin/sh
SRCDIR=/usr/src1
SETSDIR=$SRCDIR/distrib/sets
MAKETARS=$SETSDIR/maketars
ARCH=`uname -m`
REV=`sh ${SRCDIR}/sys/conf/osrelease.sh -s`
[ "$RELEASEBASE" ] || {
echo RELEASEBASE must be set
exit 1
}
[ "$DESTDIR" ] || {
echo DESTDIR must be set
exit 1
}
KERNELS="GENERIC GENERIC_SCSI3"
SUBDIRS="binary binary/sets binary/kernel security installation installation/miniroot installation/netboot"
for d in $SUBDIRS; do
[ -d $RELEASEBASE/$d ] || mkdir $RELEASEBASE/$d
done
# the base sets
RELEASEDIR=$RELEASEBASE/binary/sets; export RELEASEDIR
sh $MAKETARS -setd $SETSDIR
# net boot program
cp -p $DESTDIR/usr/mdec/boot.net $RELEASEBASE/installation/netboot
# + install scripts
for f in install.sh upgrade.sh install.sub; do
cp -p $SRCDIR/distrib/miniroot/$f $RELEASEBASE/installation/netboot
done
cp -p $SRCDIR/distrib/$ARCH/install.md $RELEASEBASE/installation/netboot
# kernels
for k in $KERNELS; do
gzip -9 < $SRCDIR/sys/arch/$ARCH/compile/$k/netbsd \
> $RELEASEBASE/binary/kernel/netbsd.$k.gz
done
# the miniroot
gzip -9 < $SRCDIR/distrib/miniroot/obj.$ARCH/miniroot-${REV}.fs \
> $RELEASEBASE/installation/miniroot/miniroot-${REV}.gz
# the installation notes
cp -p $SRCDIR/distrib/notes/INSTALL.$ARCH $RELEASEBASE/INSTALL
date -u > $RELEASEBASE/SOURCE_DATE
for d in . $SUBDIRS; do
(
cd $RELEASEBASE/$d
> CKSUM
> BSDSUM
> SYSVSUM
> MD5
for f in *; do
if [ ! -f $f -o $f = '*' ]; then continue; fi
if [ $f = 'MD5' ]; then continue; fi
if expr //$f : '.*SUM$' > /dev/null ; then continue; fi
cksum $f >> CKSUM
cksum -o1 $f >> BSDSUM
cksum -o2 $f >> SYSVSUM
cksum -m $f >> MD5
done
)
done