Backport fixes for update-cd

This commit is contained in:
Steve McIntyre 2018-07-14 13:10:18 +01:00
parent be8ab3b103
commit 83b2a37a0f
2 changed files with 18 additions and 5 deletions

3
debian/changelog vendored
View File

@ -12,6 +12,9 @@ debian-cd (3.1.21-stretch) UNRELEASED; urgency=medium
+ Tweak the date used for snapshot.d.o references - use *tomorrow* + Tweak the date used for snapshot.d.o references - use *tomorrow*
rather than today, to allow time for the snapshot to be updated. rather than today, to allow time for the snapshot to be updated.
+ Provide hashes for uncompressed Translation-* again. Closes: #767253 + Provide hashes for uncompressed Translation-* again. Closes: #767253
+ Updates for update-cd:
- Grab checksums from the binary-all Packages.gz too when building
- Generate checksums for torrents and jigdo files too if desired
-- Steve McIntyre <93sam@debian.org> Mon, 19 Jun 2017 13:39:58 +0100 -- Steve McIntyre <93sam@debian.org> Mon, 19 Jun 2017 13:39:58 +0100

View File

@ -18,7 +18,7 @@ MIRROR_NORM=/srv/cdbuilder.debian.org/src/ftp/debian
NONFREE=0 NONFREE=0
# What release version is this? # What release version is this?
VER=9.4.0 VER=9.1.0
# Is this an official CD? # Is this an official CD?
OFFICIAL=Official OFFICIAL=Official
@ -66,7 +66,7 @@ esac
# 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=/home/debian-cd/lists/stretch/r0-r4.diff DIFF=/home/debian-cd/lists/stretch/r0-r2.diff
if [ "$TYPE" = "cd" ] ; then if [ "$TYPE" = "cd" ] ; then
CDSIZE=644 # megabytes, leaving space for metadata CDSIZE=644 # megabytes, leaving space for metadata
@ -166,6 +166,7 @@ make_cd () {
-jigdo-force-md5 /pool/ \ -jigdo-force-md5 /pool/ \
-md5-list $UPD/md5-check \ -md5-list $UPD/md5-check \
$UPD/CD$CDNUM 2>&1 | grep "extents written" $UPD/CD$CDNUM 2>&1 | grep "extents written"
# $UPD/CD$CDNUM
if [ $? -ne 0 ] ; then if [ $? -ne 0 ] ; then
echo "${MKISOFS} failed, error $?" echo "${MKISOFS} failed, error $?"
exit 1 exit 1
@ -184,7 +185,12 @@ make_cd () {
awk '/Image Hex MD5Sum/ {print $5}'` awk '/Image Hex MD5Sum/ {print $5}'`
echo "$MD5 ${BASENAME}.iso" >> ${JIGDODIR}/MD5SUMS.update echo "$MD5 ${BASENAME}.iso" >> ${JIGDODIR}/MD5SUMS.update
echo "$MD5 ${BASENAME}.iso" >> ${ISODIR}/MD5SUMS.update echo "$MD5 ${BASENAME}.iso" >> ${ISODIR}/MD5SUMS.update
[ $BT = 1 ] && echo "$MD5 ${BASENAME}.iso" >> ${BTDIR}/MD5SUMS.update (cd ${JIGDODIR} && md5sum ${BASENAME}.jigdo ${BASENAME}.template >> MD5SUMS.update)
if [ $BT = 1 ]; then
~/build.${CODENAME}/mktorrent ${ISODIR}/${BASENAME}.iso
echo "$MD5 ${BASENAME}.iso" >> ${BTDIR}/MD5SUMS.update
(cd ${BTDIR} && md5sum ${BASENAME}.iso.torrent >> MD5SUMS.update)
fi
for SHA_SIZE in 1 256 512; do for SHA_SIZE in 1 256 512; do
SHA=`cat ${JIGDODIR}/${BASENAME}.jigdo | \ SHA=`cat ${JIGDODIR}/${BASENAME}.jigdo | \
awk "/Image Hex SHA${SHA_SIZE}Sum/ {print \\$5}"` awk "/Image Hex SHA${SHA_SIZE}Sum/ {print \\$5}"`
@ -194,7 +200,11 @@ make_cd () {
fi fi
echo "$SHA ${BASENAME}.iso" >> ${JIGDODIR}/SHA${SHA_SIZE}SUMS.update echo "$SHA ${BASENAME}.iso" >> ${JIGDODIR}/SHA${SHA_SIZE}SUMS.update
echo "$SHA ${BASENAME}.iso" >> ${ISODIR}/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 (cd ${JIGDODIR} && sha${SHA_SIZE}sum ${BASENAME}.jigdo ${BASENAME}.template >> SHA${SHA_SIZE}SUMS.update)
if [ $BT = 1 ]; then
echo "$SHA ${BASENAME}.iso" >> ${BTDIR}/SHA${SHA_SIZE}SUMS.update
(cd ${BTDIR} && sha${SHA_SIZE}sum ${BASENAME}.iso.torrent >> SHA${SHA_SIZE}SUMS.update)
fi
done done
gzip -9 ${JIGDODIR}/${BASENAME}.jigdo gzip -9 ${JIGDODIR}/${BASENAME}.jigdo
mv ${JIGDODIR}/${BASENAME}.jigdo.gz ${JIGDODIR}/${BASENAME}.jigdo mv ${JIGDODIR}/${BASENAME}.jigdo.gz ${JIGDODIR}/${BASENAME}.jigdo
@ -277,7 +287,7 @@ if [ "$NONFREE"x != "1"x ] ; then
mv -f $UPD/list1 $UPD/list mv -f $UPD/list1 $UPD/list
fi fi
$GRAB_MD5 $MIRROR_NORM "$ARCHLIST" $CODENAME $CODENAME $UPD/md5-check $GRAB_MD5 $MIRROR_NORM "$ARCHLIST all" $CODENAME $CODENAME $UPD/md5-check
for THISARCH in $ARCHLIST for THISARCH in $ARCHLIST
do do