Updated to make woody update CDs. We fit onto two CDs for now:
CD1: alpha arm hppa i386 ia64 m68k src all CD2: mips mipsel powerpc s390 sparc src all Fairly big changes to cope with pools, especially needs a patched dpkg-scanpackages which is in tools/my-dpkg-scanpackages
This commit is contained in:
parent
fcd4b840ba
commit
f27ced66c0
163
update-cd
163
update-cd
|
@ -19,7 +19,7 @@ NONUS=${NONUS:-$MIRROR/non-US}
|
||||||
NONFREE=1
|
NONFREE=1
|
||||||
|
|
||||||
# What release version is this?
|
# What release version is this?
|
||||||
VER=2.2r6
|
VER=3.0r1
|
||||||
|
|
||||||
# Path to use with mkisofs/mkhybrid
|
# Path to use with mkisofs/mkhybrid
|
||||||
MKISOFS=${MKISOFS:-"mkhybrid"}
|
MKISOFS=${MKISOFS:-"mkhybrid"}
|
||||||
|
@ -27,8 +27,8 @@ MKISOFS=${MKISOFS:-"mkhybrid"}
|
||||||
# The working directory to use. MUST be on the same partition as the mirror.
|
# The working directory to use. MUST be on the same partition as the mirror.
|
||||||
TDIR=/mirror/debian-cd
|
TDIR=/mirror/debian-cd
|
||||||
|
|
||||||
# Building potato cd set ...
|
# Building woody cd set ...
|
||||||
CODENAME=potato
|
CODENAME=woody
|
||||||
|
|
||||||
# Path where the images will be written
|
# Path where the images will be written
|
||||||
OUT=/mirror/debian-cd
|
OUT=/mirror/debian-cd
|
||||||
|
@ -36,15 +36,17 @@ OUT=/mirror/debian-cd
|
||||||
# Location of the diff file to use to determine the changes. If you leave
|
# Location of the diff file to use to determine the changes. If you leave
|
||||||
# this blank, we'll try to determine the changes from the ChangeLog files,
|
# this blank, we'll try to determine the changes from the ChangeLog files,
|
||||||
# which is probably less accurate.
|
# which is probably less accurate.
|
||||||
DIFF=/mirror/lists/r0-r6.diff #~/r2.diff
|
DIFF=/mirror/lists/$CODENAME/r0-r1.diff #~/r2.diff
|
||||||
|
|
||||||
REL=Debian"$VER"
|
REL=Debian"$VER"
|
||||||
CLOG=dists/potato/ChangeLog
|
CLOG=dists/$CODENAME/ChangeLog
|
||||||
NUCLOG=dists/potato/non-US/ChangeLog
|
NUCLOG=dists/$CODENAME/non-US/ChangeLog
|
||||||
UPD=$TDIR/potato-update
|
UPD=$TDIR/$CODENAME-update
|
||||||
DATE=`date +%Y%m%d`
|
DATE=`date +%Y%m%d`
|
||||||
BASEDIR=`pwd`
|
BASEDIR=`pwd`
|
||||||
|
SECTS="main non-free contrib"
|
||||||
|
VERBOSE=2
|
||||||
|
export VERBOSE BASEDIR SECTS
|
||||||
|
|
||||||
# The full update will not fit on a single CD, so split it arbitrarily
|
# The full update will not fit on a single CD, so split it arbitrarily
|
||||||
# CD 1 gets arm/i386/source
|
# CD 1 gets arm/i386/source
|
||||||
|
@ -52,21 +54,31 @@ BASEDIR=`pwd`
|
||||||
# CD 3 gets sparc
|
# CD 3 gets sparc
|
||||||
# binary-all goes on all 3
|
# binary-all goes on all 3
|
||||||
|
|
||||||
INFO1="Debian GNU/Linux $VER Update CD $DATE: Arm, I386 and source"
|
INFO1="Debian GNU/Linux $VER Update CD $DATE: Alpha, Arm, HPPA, I386, IA64, M68k and Source"
|
||||||
INFO2="Debian GNU/Linux $VER Update CD $DATE: Alpha, M68k and PowerPc"
|
INFO2="Debian GNU/Linux $VER Update CD $DATE: Mips, Mipsel, Powerpc, S390, Sparc and Source"
|
||||||
INFO3="Debian GNU/Linux $VER Update CD $DATE: Sparc"
|
ARCH1="alpha arm hppa i386 ia64 m68k src all"
|
||||||
ARCH1="arm i386 src all"
|
ARCH2="mips mipsel powerpc s390 sparc src all"
|
||||||
ARCH2="alpha m68k powerpc all"
|
|
||||||
ARCH3="sparc all"
|
|
||||||
|
|
||||||
export TDIR NONFREE NONUS VER MIRROR CODENAME OUT BASEDIR
|
export TDIR NONFREE NONUS VER MIRROR CODENAME OUT BASEDIR
|
||||||
|
|
||||||
scanpackages=$BASEDIR/tools/scanpackages.old
|
scanpackages=$BASEDIR/tools/scanpackages.old
|
||||||
scansources=$BASEDIR/tools/scansources.old
|
scansources=$BASEDIR/tools/scansources.old
|
||||||
set_mkisofs_opts=$BASEDIR/tools/set_mkisofs_opts
|
set_mkisofs_opts=$BASEDIR/tools/set_mkisofs_opts
|
||||||
adddirs=$BASEDIR/tools/add_dirs
|
|
||||||
addfiles=$BASEDIR/tools/add_files
|
addfiles=$BASEDIR/tools/add_files
|
||||||
|
|
||||||
|
adddirs () {
|
||||||
|
ROOTDIR=$1
|
||||||
|
shift
|
||||||
|
FILELIST=$1
|
||||||
|
for FILE in `cat $FILELIST`
|
||||||
|
do
|
||||||
|
DIR=`echo $FILE | sed 's?/[-_\.A-Za-z0-9\+]*$??'`
|
||||||
|
if [ ! -d $ROOTDIR/$DIR ] ; then
|
||||||
|
mkdir -p $ROOTDIR/$DIR
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
}
|
||||||
|
|
||||||
copy_trees () {
|
copy_trees () {
|
||||||
CDDIR=$1
|
CDDIR=$1
|
||||||
shift
|
shift
|
||||||
|
@ -77,30 +89,27 @@ copy_trees () {
|
||||||
ARCHES=$*
|
ARCHES=$*
|
||||||
echo " Copying \"$ARCHES\" files into $UPD/$CDDIR"
|
echo " Copying \"$ARCHES\" files into $UPD/$CDDIR"
|
||||||
for ARCH in $ARCHES
|
for ARCH in $ARCHES
|
||||||
do
|
|
||||||
if [ "$ARCH" = "src" ] ; then
|
|
||||||
cat $SRCLIST | xargs $addfiles $UPD/$CDDIR $MIRROR
|
|
||||||
else
|
|
||||||
cat $BINLIST | grep binary-$ARCH | xargs $addfiles $UPD/$CDDIR $MIRROR
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
}
|
|
||||||
|
|
||||||
remove_unwanted () {
|
|
||||||
CDDIR=$1
|
|
||||||
shift
|
|
||||||
ARCHES=$*
|
|
||||||
echo " Removing \"$ARCHES\" from $CDDIR"
|
|
||||||
for ARCH in $ARCHES
|
|
||||||
do
|
do
|
||||||
case "$ARCH" in
|
case "$ARCH" in
|
||||||
src)
|
src)
|
||||||
find $CDDIR -type d | grep source$ | xargs rm -rf
|
NUM=`cat $SRCLIST | wc -l`
|
||||||
;;
|
if [ $NUM -gt 0 ] ; then
|
||||||
all)
|
echo " $ARCH into $UPD/$CDDIR"
|
||||||
|
adddirs $UPD/$CDDIR $SRCLIST
|
||||||
|
cat $SRCLIST | xargs $addfiles $UPD/$CDDIR $MIRROR
|
||||||
|
else
|
||||||
|
echo " No updates needed for $ARCH"
|
||||||
|
fi
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
find $CDDIR -type d | egrep -e binary-$ARCH$ | xargs rm -rf
|
NUM=`cat $BINLIST | grep _$ARCH.deb | wc -l`
|
||||||
|
if [ $NUM -gt 0 ] ; then
|
||||||
|
echo " $ARCH into $UPD/$CDDIR"
|
||||||
|
adddirs $UPD/$CDDIR $BINLIST
|
||||||
|
cat $BINLIST | grep _$ARCH.deb | xargs $addfiles $UPD/$CDDIR $MIRROR
|
||||||
|
else
|
||||||
|
echo " No updates needed for $ARCH"
|
||||||
|
fi
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
done
|
done
|
||||||
|
@ -116,15 +125,26 @@ create_control_files () {
|
||||||
case "$ARCH" in
|
case "$ARCH" in
|
||||||
src)
|
src)
|
||||||
echo " src"
|
echo " src"
|
||||||
|
for SECT in $SECTS
|
||||||
|
do
|
||||||
|
mkdir -p $CDDIR/dists/$CODENAME/$SECT/source
|
||||||
|
mkdir -p $CDDIR/dists/$CODENAME/non-US/$SECT/source
|
||||||
|
done
|
||||||
|
cd $CDDIR
|
||||||
$scansources $CDDIR >/dev/null 2>&1
|
$scansources $CDDIR >/dev/null 2>&1
|
||||||
;;
|
;;
|
||||||
all)
|
all)
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
echo " $ARCH"
|
echo " $ARCH"
|
||||||
|
for SECT in $SECTS
|
||||||
|
do
|
||||||
|
mkdir -p $CDDIR/dists/$CODENAME/$SECT/binary-$ARCH
|
||||||
|
mkdir -p $CDDIR/dists/$CODENAME/non-US/$SECT/binary-$ARCH
|
||||||
|
done
|
||||||
ARCH=$ARCH $scanpackages scan $CDDIR >/dev/null 2>&1
|
ARCH=$ARCH $scanpackages scan $CDDIR >/dev/null 2>&1
|
||||||
ARCH=$ARCH $scanpackages -noPackages.cd install $CDDIR >/dev/null 2>&1
|
ARCH=$ARCH $scanpackages -noPackages.cd install $CDDIR >/dev/null 2>&1
|
||||||
rm -f $CDDIR/*.Packages* >/dev/null 2>&1
|
rm -f $CDDIR/*.Packages* #>/dev/null 2>&1
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
done
|
done
|
||||||
|
@ -132,16 +152,7 @@ create_control_files () {
|
||||||
|
|
||||||
echo Cleaning up
|
echo Cleaning up
|
||||||
rm -rf $UPD
|
rm -rf $UPD
|
||||||
mkdir $UPD $UPD/CD1 $UPD/CD2 $UPD/CD3
|
mkdir $UPD $UPD/CD1 $UPD/CD2
|
||||||
|
|
||||||
echo Creating directory trees
|
|
||||||
for ARCH in $ARCH1 $ARCH2 $ARCH3
|
|
||||||
do
|
|
||||||
export ARCH
|
|
||||||
$adddirs $UPD/CD1
|
|
||||||
$adddirs $UPD/CD2
|
|
||||||
$adddirs $UPD/CD3
|
|
||||||
done
|
|
||||||
|
|
||||||
cd $MIRROR
|
cd $MIRROR
|
||||||
echo Creating main-section list
|
echo Creating main-section list
|
||||||
|
@ -149,10 +160,10 @@ echo Creating main-section list
|
||||||
if [ -e $DIFF ] ; then
|
if [ -e $DIFF ] ; then
|
||||||
grep -v non-US $DIFF >$UPD/list
|
grep -v non-US $DIFF >$UPD/list
|
||||||
egrep -e \\.deb$ $UPD/list >$UPD/bin-list
|
egrep -e \\.deb$ $UPD/list >$UPD/bin-list
|
||||||
egrep -e ^dists.*\\.gz$ -e ^dists.*\\.dsc$ $UPD/list >$UPD/src-list
|
egrep -e \\.gz$ -e \\.dsc$ $UPD/list >$UPD/src-list
|
||||||
else
|
else
|
||||||
egrep -e ^dists.*\\.deb$ $CLOG >$UPD/bin-list
|
egrep -e ^dists.*\\.deb$ $CLOG >$UPD/bin-list
|
||||||
egrep -e ^dists.*\\.gz$ -e ^dists.*\\.dsc$ $CLOG >$UPD/src-list
|
egrep -e \\.gz$ -e \\.dsc$ $CLOG >$UPD/src-list
|
||||||
fi
|
fi
|
||||||
if [ "$NONFREE"x != "1"x ] ; then
|
if [ "$NONFREE"x != "1"x ] ; then
|
||||||
echo Removing non-free
|
echo Removing non-free
|
||||||
|
@ -166,7 +177,6 @@ echo Creating trees
|
||||||
|
|
||||||
copy_trees CD1 $UPD/src-list $UPD/bin-list $ARCH1
|
copy_trees CD1 $UPD/src-list $UPD/bin-list $ARCH1
|
||||||
copy_trees CD2 $UPD/src-list $UPD/bin-list $ARCH2
|
copy_trees CD2 $UPD/src-list $UPD/bin-list $ARCH2
|
||||||
copy_trees CD3 $UPD/src-list $UPD/bin-list $ARCH3
|
|
||||||
|
|
||||||
if [ "$NONUS"x != ""x ] ; then
|
if [ "$NONUS"x != ""x ] ; then
|
||||||
echo Creating non-US list
|
echo Creating non-US list
|
||||||
|
@ -191,66 +201,25 @@ if [ "$NONUS"x != ""x ] ; then
|
||||||
echo Creating non-US trees
|
echo Creating non-US trees
|
||||||
copy_trees CD1 $UPD/src-nu-list $UPD/bin-nu-list $ARCH1
|
copy_trees CD1 $UPD/src-nu-list $UPD/bin-nu-list $ARCH1
|
||||||
copy_trees CD2 $UPD/src-nu-list $UPD/bin-nu-list $ARCH2
|
copy_trees CD2 $UPD/src-nu-list $UPD/bin-nu-list $ARCH2
|
||||||
copy_trees CD3 $UPD/src-nu-list $UPD/bin-nu-list $ARCH3
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
cd $UPD
|
|
||||||
echo Splitting binary dirs between trees
|
|
||||||
|
|
||||||
remove_unwanted CD1 $ARCH2 $ARCH3
|
|
||||||
remove_unwanted CD2 $ARCH1 $ARCH3
|
|
||||||
remove_unwanted CD3 $ARCH1 $ARCH2
|
|
||||||
|
|
||||||
# Now create the binary-all symlinks
|
|
||||||
echo Creating binary-all symlinks
|
|
||||||
for DIR in `find . -name binary-all`
|
|
||||||
do
|
|
||||||
cd $DIR
|
|
||||||
for CAT in *
|
|
||||||
do
|
|
||||||
if [ $CAT != '*' ] ; then
|
|
||||||
if [ -d $CAT ] ; then
|
|
||||||
cd $CAT
|
|
||||||
fi
|
|
||||||
for FILE in *.deb
|
|
||||||
do
|
|
||||||
if [ $FILE != '*.deb' ] ; then
|
|
||||||
for ARCH in alpha arm i386 m68k powerpc sparc
|
|
||||||
do
|
|
||||||
if [ -d ../../binary-$ARCH ] ; then
|
|
||||||
if [ ! -d ../../binary-$ARCH/$CAT ] ; then
|
|
||||||
mkdir ../../binary-$ARCH/$CAT
|
|
||||||
fi
|
|
||||||
ln -s ../../binary-all/$CAT/$FILE ../../binary-$ARCH/$CAT
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
if [ -d ../$CAT ] ; then
|
|
||||||
cd ..
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
cd $UPD
|
|
||||||
done
|
|
||||||
|
|
||||||
echo Creating .disk/info files
|
echo Creating .disk/info files
|
||||||
echo $INFO1 >CD1/.disk/info
|
mkdir $UPD/CD1/.disk $UPD/CD2/.disk
|
||||||
echo $INFO2 >CD2/.disk/info
|
echo $INFO1 > $UPD/CD1/.disk/info
|
||||||
echo $INFO3 >CD3/.disk/info
|
echo $INFO2 > $UPD/CD2/.disk/info
|
||||||
|
|
||||||
|
cd $UPD
|
||||||
echo Creating Packages and Sources files
|
echo Creating Packages and Sources files
|
||||||
create_control_files CD1 $ARCH1
|
create_control_files CD1 $ARCH1
|
||||||
create_control_files CD2 $ARCH2
|
create_control_files CD2 $ARCH2
|
||||||
create_control_files CD3 $ARCH3
|
|
||||||
|
|
||||||
echo Creating images
|
echo Creating images
|
||||||
echo " CD1:"
|
echo " CD1:"
|
||||||
${MKISOFS} -J -r -V "Debian $VER update CD" -o $OUT/potato-update-1.raw CD1 2>&1 | grep "extents written"
|
${MKISOFS} -J -r -V "Debian $VER update CD" -o $OUT/$CODENAME-update-1.raw $UPD/CD1 2>&1 | grep "extents written"
|
||||||
echo " CD2:"
|
echo " CD2:"
|
||||||
${MKISOFS} -J -r -V "Debian $VER update CD" -o $OUT/potato-update-2.raw CD2 2>&1 | grep "extents written"
|
${MKISOFS} -J -r -V "Debian $VER update CD" -o $OUT/$CODENAME-update-2.raw $UPD/CD2 2>&1 | grep "extents written"
|
||||||
echo " CD3:"
|
#echo " CD3:"
|
||||||
${MKISOFS} -J -r -V "Debian $VER update CD" -o $OUT/potato-update-3.raw CD3 2>&1 | grep "extents written"
|
#${MKISOFS} -J -r -V "Debian $VER update CD" -o $OUT/$CODENAME-update-3.raw $UPD/CD3 2>&1 | grep "extents written"
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue