From e326a01446a95b7a66ba9c6c903f15788c8c0f1c Mon Sep 17 00:00:00 2001 From: Ben Gras Date: Wed, 30 Sep 2009 13:11:22 +0000 Subject: [PATCH] - retrieve binary packages and sources from webserver to make a release, incrementally using wget (so wget required) - don't build List file again, but use webserver List file and filter it --- tools/release.sh | 51 ++++++++++++++++++++++++++++++++++-------------- 1 file changed, 36 insertions(+), 15 deletions(-) diff --git a/tools/release.sh b/tools/release.sh index 2e2d80b1f..af90d3395 100755 --- a/tools/release.sh +++ b/tools/release.sh @@ -2,6 +2,8 @@ set -e +PATH=$PATH:/usr/local/bin + XBIN=usr/xbin SRC=src @@ -17,6 +19,9 @@ PACKAGESOURCELIST=package_sources.install secs=`expr 32 '*' 64` export SHELL=/bin/sh +# SVN trunk repo +TRUNK=https://gforge.cs.vu.nl/svn/minix/trunk + make_hdimage() { dd if=$TMPDISK1 of=usrimage bs=$BS count=$USRBLOCKS @@ -47,6 +52,22 @@ make_hdimage() installboot -m hdimage /usr/mdec/masterboot } +retrieve() +{ + dir=$1 + list=`pwd`/$2 + url=http://www.minix3.org/$3 +BIGPORTS=bigports + ( + cd $dir || exit 1 + echo " * Updating $dir + from $url + with $list" + files=`awk <$list '{ print "'$url'/" $1 ".tar.bz2" }'` + wget -c $url/List $files || true + ) +} + hdemu_root_changes() { $RELEASEDIR/usr/bin/installboot -d $TMPDISK3 \ @@ -140,7 +161,15 @@ do done if [ ! "$USRMB" ] -then USRMB=550 +then USRMB=570 +fi + +if [ $PACKAGES -ne 0 ] +then mkdir -p $PACKAGEDIR || true + mkdir -p $PACKAGESOURCEDIR || true + rm -f $PACKAGEDIR/List + retrieve $PACKAGEDIR $PACKAGELIST packages/`uname -p`/`uname -r`.`uname -v` + retrieve $PACKAGESOURCEDIR $PACKAGESOURCELIST software fi echo $USRMB MB @@ -210,26 +239,18 @@ cp -rp /bin/bigsh /bin/sh /bin/echo $RELEASEDIR/bin cp -rp /usr/bin/make /usr/bin/install /usr/bin/yacc /usr/bin/flex $RELEASEDIR/usr/bin if [ -d $PACKAGEDIR -a -d $PACKAGESOURCEDIR -a -f $PACKAGELIST -a -f $PACKAGESOURCELIST -a $PACKAGES -ne 0 ] -then echo " * Indexing packages" - bintotal=0 - ( for p in `cat $PACKAGELIST` - do - descr="$PACKAGEDIR/../$p/.descr" - if [ -f "$descr" ] - then echo "$p|`cat $descr`" - fi - done | tee $RELEASEPACKAGE/List - ) - echo " * Transfering $PACKAGEDIR to $RELEASEPACKAGE" +then echo " * Transfering $PACKAGEDIR to $RELEASEPACKAGE" + : >$RELEASEPACKAGE/List for p in `cat $PACKAGELIST` - do - if [ -f $PACKAGEDIR/$p.tar.bz2 ] + do if [ -f $PACKAGEDIR/$p.tar.bz2 ] then cp $PACKAGEDIR/$p.tar.bz2 $RELEASEPACKAGE/ + grep $p $PACKAGEDIR/List >>$RELEASEPACKAGE/List || echo "$p not found in List" else echo "Can't copy $PACKAGEDIR/$p.tar.bz2. Missing." fi done + echo " * Transfering $PACKAGESOURCEDIR to $RELEASEPACKAGESOURCES" for p in `cat $PACKAGESOURCELIST` do @@ -249,7 +270,7 @@ chmod -R u+w $RELEASEDIR/usr/lib if [ "$COPY" -ne 1 ] then echo " * Doing new svn export" - REPO=https://gforge.cs.vu.nl/svn/minix/trunk/$SRC + REPO=$TRUNK/$SRC REVISION="`svn info $USERNAME $SVNREV $REPO | grep '^Revision: ' | awk '{ print $2 }'`" echo "Doing export of revision $REVISION from $REPO." ( cd $RELEASEDIR/usr && svn $USERNAME export -r$REVISION $REPO ) -- 2.44.0