From 7cd4192b40b6bf84765654a4dbc1681af9369d61 Mon Sep 17 00:00:00 2001 From: Steve McIntyre Date: Sat, 7 Feb 2015 23:15:57 +0000 Subject: [PATCH] update-cd: if we're doing torrents, make sure we include update CD checksums in bt-$type too. --- debian/changelog | 2 ++ update-cd | 9 +++++++++ 2 files changed, 11 insertions(+) diff --git a/debian/changelog b/debian/changelog index 3ac5825e..5c49f832 100644 --- a/debian/changelog +++ b/debian/changelog @@ -11,6 +11,8 @@ debian-cd (3.1.17) UNRELEASED; urgency=medium * Add minor support / bug fixes for i386 EFI. * Add fine-grained control over usage of BIOS and EFI boot on x86 CDs, needed for extra Mac CD builds. + * update-cd: if we're doing torrents, make sure we include update CD + checksums in bt-$type too. -- Steve McIntyre <93sam@debian.org> Wed, 29 Oct 2014 17:33:10 +0000 diff --git a/update-cd b/update-cd index 0cfb34e1..3644e7f7 100755 --- a/update-cd +++ b/update-cd @@ -33,6 +33,9 @@ MKISOFS="$PWD/../genisoimage -jigdo-template-compress bzip2 -r -checksum_algorit # Use JTE extensions to mkisofs to make jigdo files? JTE=1 +# Set up torrents too? +BT=1 + # The working directory to use. MUST be on the same partition as the mirror. TDIR=/org/cdbuilder.debian.org/src/deb-cd/tmp/squeeze-update/cd-work @@ -141,6 +144,7 @@ make_cd () { ISODIR=$OUT/$THISARCH/iso-$TYPE JIGDODIR=$OUT/$THISARCH/jigdo-$TYPE LISTDIR=$OUT/$THISARCH/list-$TYPE + BTDIR=$OUT/$THISARCH/bt-$TYPE if [ ! -d ${ISODIR} ] ; then mkdir -p ${ISODIR} @@ -151,6 +155,9 @@ make_cd () { if [ ! -d ${LISTDIR} ] ; then mkdir -p ${LISTDIR} fi + if [ $BT = 1 ] && [ ! -d ${BTDIR} ] ; then + mkdir -p ${BTDIR} + fi if [ $JTE = 1 ] ; then set +e @@ -180,6 +187,7 @@ make_cd () { awk '/Image Hex MD5Sum/ {print $5}'` echo "$MD5 ${BASENAME}.iso" >> ${JIGDODIR}/MD5SUMS.update echo "$MD5 ${BASENAME}.iso" >> ${ISODIR}/MD5SUMS.update + [ $BT = 1 ] && echo "$MD5 ${BASENAME}.iso" >> ${BTDIR}/MD5SUMS.update for SHA_SIZE in 1 256 512; do SHA=`cat ${JIGDODIR}/${BASENAME}.jigdo | \ awk "/Image Hex SHA${SHA_SIZE}Sum/ {print \\$5}"` @@ -189,6 +197,7 @@ make_cd () { fi echo "$SHA ${BASENAME}.iso" >> ${JIGDODIR}/SHA${SHA_SIZE}SUMS.update echo "$SHA ${BASENAME}.iso" >> ${ISODIR}/SHA${SHA_SIZE}SUMS.update + [ $BT = 1 ] && echo "$SHA ${BASENAME}.iso" >> ${BTDIR}/SHA${SHA_SIZE}SUMS.update done gzip -9 ${JIGDODIR}/${BASENAME}.jigdo mv ${JIGDODIR}/${BASENAME}.jigdo.gz ${JIGDODIR}/${BASENAME}.jigdo