From 41f1383b5c323a717e458e793f53d922a0cd5cef Mon Sep 17 00:00:00 2001 From: Steve McIntyre Date: Tue, 16 Jul 2019 16:22:42 +0100 Subject: [PATCH] Stop producing MD5SUMS and SHA1SUMS files by default --- CONF.sh | 10 +++++----- Makefile | 4 ++-- README | 13 +++++++------ README.easy-build | 2 +- debian/changelog | 1 + tools/imagesums | 2 +- tools/make-firmware-image | 2 -- update-cd | 14 ++------------ 8 files changed, 19 insertions(+), 29 deletions(-) diff --git a/CONF.sh b/CONF.sh index 08e36dc8..996c036d 100644 --- a/CONF.sh +++ b/CONF.sh @@ -191,9 +191,9 @@ export CONTRIB=1 # that will burn correctly onto a CD and also can be written raw to a # USB stick. xorriso 0.6.5 and later has working support for this. #export i386_MKISOFS="xorriso" -#export i386_MKISOFS_OPTS="-as mkisofs -r -checksum_algorithm_iso md5,sha1" +#export i386_MKISOFS_OPTS="-as mkisofs -r -checksum_algorithm_iso sha256,sha512" #export amd64_MKISOFS="xorriso" -#export amd64_MKISOFS_OPTS="-as mkisofs -r -checksum_algorithm_iso md5,sha1" +#export amd64_MKISOFS_OPTS="-as mkisofs -r -checksum_algorithm_iso sha256,sha512" # Keyring (defaults): #ARCHIVE_KEYRING_PACKAGE=debian-archive-keyring @@ -261,12 +261,12 @@ export VARIANTS= # package on the CD. The default is 'true'. # export NOSUGGESTS=1 -# Set to 1 to generate MD5/SHA1/SHA256/SHA512 sums for generated images +# Set to 1 to generate checksum files for generated images export IMAGESUMS=1 # And define the set of checksum algorithms you want here. Default is -# all of: md5 sha1 sha512 sha256 -# export CHECKSUMS="md5 sha1 sha512 sha256" +# sha512 sha256 +# export CHECKSUMS="sha512 sha256" # We may have to extract files from packages to put them onto the CD # (e.g. bootloader files). If you make those packages (and their diff --git a/Makefile b/Makefile index 5326970e..0a9a5948 100755 --- a/Makefile +++ b/Makefile @@ -23,7 +23,7 @@ endif ifndef MKISOFS ifneq (,$(filter i386 amd64 arm64 hppa,$(ARCHES))) export MKISOFS=xorriso -export MKISOFS_OPTS=-as mkisofs -r -checksum_algorithm_iso md5,sha1 +export MKISOFS_OPTS=-as mkisofs -r -checksum_algorithm_iso sha256,sha512 else export MKISOFS=$(shell which genisoimage mkisofs | head -1) endif @@ -497,7 +497,7 @@ check-number-given: # Generate only one image number $(CD) image: check-number-given images -# Calculate the md5sums for the images (if available), or get from templates +# Calculate the checksums for the images (if available), or get from templates imagesums: $(Q)$(BASEDIR)/tools/imagesums $(OUT) $(SUMS_EXTENSION) diff --git a/README b/README index e6225326..927ef166 100644 --- a/README +++ b/README @@ -213,7 +213,7 @@ The process of building a CD is composed of the following steps: with some dependencies on targets that you already launched (make bootable packages sources). -- if you want to generate a MD5SUMS file with the md5sums of the +- if you want to generate checkum files with the checksums of the images you can do it with: $ make imagesums @@ -277,11 +277,12 @@ To generate the jigdo files and templates, you need an appropriately-patched version of mkisofs/genisoimage, as shipped in Debian Etch. -The MD5SUMS file generated by the "imagesums" target will contain the MD5 -checksums of all generated images, regardless of the DOJIGDO setting. If -no full iso image is available, the MD5sum will be extracted from the -.template file. A note in the Makefile shows how the original file size -can be extracted from the .template in a similar way. +The checksums files generated by the "imagesums" target will contain +the checksums of all generated images, regardless of the DOJIGDO +setting. If no full iso image is available, the checksums will be +extracted from the .template files. A note in the Makefile shows how +the original file size can be extracted from the .template in a +similar way. About jigdo "fallback servers": diff --git a/README.easy-build b/README.easy-build index e0c67b9d..e35c2a17 100644 --- a/README.easy-build +++ b/README.easy-build @@ -110,7 +110,7 @@ The following variables that define paths *must* be set in CONF.sh: You may also want to change the following variables: - CONTRIB: comment out if you only want to include packages from main -- IMAGESUMS: comment out to skip creating MD5/SHA5 sums for images +- IMAGESUMS: comment out to skip creating checksums for images - OMIT_MANUAL - OMIT_RELEASE_NOTES / RELEASE_NOTES_LOCATION diff --git a/debian/changelog b/debian/changelog index fe5a40d4..44dd324e 100644 --- a/debian/changelog +++ b/debian/changelog @@ -6,6 +6,7 @@ debian-cd (3.1.25) UNRELEASED; urgency=medium list * Start bullseye development, copy the buster dirs to bullseye as a start. + * Stop producing MD5SUMS and SHA1SUMS files by default [ Holger Levsen ] * Bump standards version to 4.4.0, no changes needed. diff --git a/tools/imagesums b/tools/imagesums index 162df8b4..464b6468 100755 --- a/tools/imagesums +++ b/tools/imagesums @@ -14,7 +14,7 @@ if [ "$2"x != ""x ] ; then fi if [ "$CHECKSUMS"x = ""x ] ; then - CHECKSUMS="sha1 md5 sha512 sha256" + CHECKSUMS="sha512 sha256" fi for SUM in $CHECKSUMS; do diff --git a/tools/make-firmware-image b/tools/make-firmware-image index 5568cc33..e5d7438b 100755 --- a/tools/make-firmware-image +++ b/tools/make-firmware-image @@ -42,7 +42,5 @@ cd .. find firmware | cpio --quiet -o -H newc | gzip -9 > firmware.cpio.gz ls -l $PWD/firmware.cpio.gz $PWD/firmware.tar.gz $PWD/firmware.zip -md5sum firmware.* > MD5SUMS -sha1sum firmware.* > SHA1SUMS sha256sum firmware.* > SHA256SUMS sha512sum firmware.* > SHA512SUMS diff --git a/update-cd b/update-cd index acfd7d9e..d88374c8 100755 --- a/update-cd +++ b/update-cd @@ -25,7 +25,7 @@ OFFICIAL=Official # OFFICIAL="Unofficial snapshot" # Path to use with mkisofs/mkhybrid -MKISOFS="genisoimage -jigdo-template-compress bzip2 -r -checksum_algorithm_iso md5,sha1,sha256,sha512" +MKISOFS="genisoimage -jigdo-template-compress bzip2 -r -checksum_algorithm_iso sha256,sha512" # Use JTE extensions to mkisofs to make jigdo files? JTE=1 @@ -183,17 +183,7 @@ make_cd () { gzip -9 ${JIGDODIR}/${BASENAME}.jigdo mv ${JIGDODIR}/${BASENAME}.jigdo.gz ${JIGDODIR}/${BASENAME}.jigdo - MD5=`zcat ${JIGDODIR}/${BASENAME}.jigdo | \ - awk '/Image Hex MD5Sum/ {print $5}'` - echo "$MD5 ${BASENAME}.iso" >> ${JIGDODIR}/MD5SUMS.update - echo "$MD5 ${BASENAME}.iso" >> ${ISODIR}/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 256 512; do SHA=`zcat ${JIGDODIR}/${BASENAME}.jigdo | \ awk "/Image Hex SHA${SHA_SIZE}Sum/ {print \\$5}"` if [ "$SHA"x = ""x ] ; then