- 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
This commit is contained in:
parent
782a05b919
commit
e326a01446
1 changed files with 36 additions and 15 deletions
|
@ -2,6 +2,8 @@
|
||||||
|
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
|
PATH=$PATH:/usr/local/bin
|
||||||
|
|
||||||
XBIN=usr/xbin
|
XBIN=usr/xbin
|
||||||
SRC=src
|
SRC=src
|
||||||
|
|
||||||
|
@ -17,6 +19,9 @@ PACKAGESOURCELIST=package_sources.install
|
||||||
secs=`expr 32 '*' 64`
|
secs=`expr 32 '*' 64`
|
||||||
export SHELL=/bin/sh
|
export SHELL=/bin/sh
|
||||||
|
|
||||||
|
# SVN trunk repo
|
||||||
|
TRUNK=https://gforge.cs.vu.nl/svn/minix/trunk
|
||||||
|
|
||||||
make_hdimage()
|
make_hdimage()
|
||||||
{
|
{
|
||||||
dd if=$TMPDISK1 of=usrimage bs=$BS count=$USRBLOCKS
|
dd if=$TMPDISK1 of=usrimage bs=$BS count=$USRBLOCKS
|
||||||
|
@ -47,6 +52,22 @@ make_hdimage()
|
||||||
installboot -m hdimage /usr/mdec/masterboot
|
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()
|
hdemu_root_changes()
|
||||||
{
|
{
|
||||||
$RELEASEDIR/usr/bin/installboot -d $TMPDISK3 \
|
$RELEASEDIR/usr/bin/installboot -d $TMPDISK3 \
|
||||||
|
@ -140,7 +161,15 @@ do
|
||||||
done
|
done
|
||||||
|
|
||||||
if [ ! "$USRMB" ]
|
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
|
fi
|
||||||
|
|
||||||
echo $USRMB MB
|
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
|
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 ]
|
if [ -d $PACKAGEDIR -a -d $PACKAGESOURCEDIR -a -f $PACKAGELIST -a -f $PACKAGESOURCELIST -a $PACKAGES -ne 0 ]
|
||||||
then echo " * Indexing packages"
|
then echo " * Transfering $PACKAGEDIR to $RELEASEPACKAGE"
|
||||||
bintotal=0
|
: >$RELEASEPACKAGE/List
|
||||||
( 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"
|
|
||||||
for p in `cat $PACKAGELIST`
|
for p in `cat $PACKAGELIST`
|
||||||
do
|
do if [ -f $PACKAGEDIR/$p.tar.bz2 ]
|
||||||
if [ -f $PACKAGEDIR/$p.tar.bz2 ]
|
|
||||||
then
|
then
|
||||||
cp $PACKAGEDIR/$p.tar.bz2 $RELEASEPACKAGE/
|
cp $PACKAGEDIR/$p.tar.bz2 $RELEASEPACKAGE/
|
||||||
|
grep $p $PACKAGEDIR/List >>$RELEASEPACKAGE/List || echo "$p not found in List"
|
||||||
else
|
else
|
||||||
echo "Can't copy $PACKAGEDIR/$p.tar.bz2. Missing."
|
echo "Can't copy $PACKAGEDIR/$p.tar.bz2. Missing."
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
|
||||||
echo " * Transfering $PACKAGESOURCEDIR to $RELEASEPACKAGESOURCES"
|
echo " * Transfering $PACKAGESOURCEDIR to $RELEASEPACKAGESOURCES"
|
||||||
for p in `cat $PACKAGESOURCELIST`
|
for p in `cat $PACKAGESOURCELIST`
|
||||||
do
|
do
|
||||||
|
@ -249,7 +270,7 @@ chmod -R u+w $RELEASEDIR/usr/lib
|
||||||
if [ "$COPY" -ne 1 ]
|
if [ "$COPY" -ne 1 ]
|
||||||
then
|
then
|
||||||
echo " * Doing new svn export"
|
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 }'`"
|
REVISION="`svn info $USERNAME $SVNREV $REPO | grep '^Revision: ' | awk '{ print $2 }'`"
|
||||||
echo "Doing export of revision $REVISION from $REPO."
|
echo "Doing export of revision $REVISION from $REPO."
|
||||||
( cd $RELEASEDIR/usr && svn $USERNAME export -r$REVISION $REPO )
|
( cd $RELEASEDIR/usr && svn $USERNAME export -r$REVISION $REPO )
|
||||||
|
|
Loading…
Reference in a new issue