From: Michael Prokop Date: Fri, 20 Feb 2009 15:35:49 +0000 (+0100) Subject: Add support for sha1sum X-Git-Tag: v0.9.9~22 X-Git-Url: https://git.grml.org/?p=grml-live.git;a=commitdiff_plain;h=3e18610b1a0891ed43156c6874842050fed002e6 Add support for sha1sum --- diff --git a/buildd/cleanup.sh b/buildd/cleanup.sh index 9a4d5f6..f9e72b1 100755 --- a/buildd/cleanup.sh +++ b/buildd/cleanup.sh @@ -26,7 +26,7 @@ for flavour in grml-small_lenny grml-small_sid grml-medium_lenny grml-medium_sid FILES=$(ls -1 $flavour/$flavour*.iso | tail -"$DAYS") OLD_FILES=$(ls $flavour/$flavour*.iso | grep -v "$FILES") for file in $OLD_FILES ; do - REMOVE_ME="$REMOVE_ME $(find $file -mtime +$DAYS)" + REMOVE_ME="$REMOVE_ME $(find "$file" -mtime +$DAYS)" done fi done @@ -35,9 +35,10 @@ done for file in $REMOVE_ME ; do # remove ISOs: - test -f ${file} && rm -f $file - # ... but keep their md5sum: - test -f ${file}.md5 && mv ${file}.md5 .archive + test -f "${file}" && rm -f "$file" + # ... but keep their md5sum / sha1sum: + test -f "${file}".md5 && mv "${file}".md5 .archive + test -f "${file}".sha1 && mv "${file}".sha1 .archive done # inform on successful removal: diff --git a/buildd/functions.sh b/buildd/functions.sh index 4efd123..a440d3a 100755 --- a/buildd/functions.sh +++ b/buildd/functions.sh @@ -134,6 +134,9 @@ store_iso() { if [ -r "${OUTPUT_DIR}/grml_isos/${ISO_NAME}.md5" ] ; then mv "${OUTPUT_DIR}/grml_isos/${ISO_NAME}.md5" "${ISO_DIR}" fi + if [ -r "${OUTPUT_DIR}/grml_isos/${ISO_NAME}.sha1" ] ; then + mv "${OUTPUT_DIR}/grml_isos/${ISO_NAME}.sha1" "${ISO_DIR}" + fi fi } diff --git a/buildd/link_latest.sh b/buildd/link_latest.sh index fc4e654..a262e12 100755 --- a/buildd/link_latest.sh +++ b/buildd/link_latest.sh @@ -19,6 +19,7 @@ for flavour in grml-small_lenny grml-small_sid grml-medium_lenny grml-medium_sid if [ -n "$ISO" ] ; then ln -sf $ISO $(basename ${ISO%%_[0-9]*})_latest.iso ln -sf ${ISO}.md5 $(basename ${ISO%%_[0-9]*})_latest.iso.md5 + ln -sf ${ISO}.sha1 $(basename ${ISO%%_[0-9]*})_latest.iso.sha1 fi done diff --git a/buildd/remove_isos.sh b/buildd/remove_isos.sh index 5832e00..6ec0193 100755 --- a/buildd/remove_isos.sh +++ b/buildd/remove_isos.sh @@ -12,8 +12,7 @@ cd $ISO_DIR || exit 3 for file in *.iso ; do - rm -f "$file" - rm -f "${file}".md5 + rm -f "$file" "${file}".md5 "${file}".sha1 done ## END OF FILE ################################################################# diff --git a/buildd/upload_isos.sh b/buildd/upload_isos.sh index 6166077..b622d5f 100755 --- a/buildd/upload_isos.sh +++ b/buildd/upload_isos.sh @@ -14,9 +14,9 @@ cd $ISO_DIR || exit 4 umask 002 for file in *.iso ; do - [ -f "${file}.md5" ] || md5sum "$file" > "${file}".md5 - chmod 664 "$file" - chmod 664 "${file}".md5 + [ -f "${file}.md5" ] || md5sum "$file" > "${file}".md5 + [ -f "${file}.sha1" ] || sha1sum "$file" > "${file}".sha1 + chmod 664 "${file}" "${file}".md5 "${file}".sha1 done for flavour in grml-small_lenny grml-small_sid grml-medium_lenny grml-medium_sid grml_sid grml_lenny \ diff --git a/debian/changelog b/debian/changelog index 71395a4..70a3cb9 100644 --- a/debian/changelog +++ b/debian/changelog @@ -17,8 +17,9 @@ grml-live (0.9.9) unstable; urgency=low This should avoid issues with something like 'apt-get -t experimental ...' * Consequently drop 'Latest change' lines from all files. + * Support generation of sha1sum [Testing: issue622] - -- Michael Prokop Fri, 20 Feb 2009 16:03:42 +0100 + -- Michael Prokop Fri, 20 Feb 2009 16:31:04 +0100 grml-live (0.9.8) unstable; urgency=low diff --git a/grml-live b/grml-live index ba87869..cfbc0b3 100755 --- a/grml-live +++ b/grml-live @@ -702,12 +702,17 @@ else -b $BOOT_FILE \ -o "${ISO_OUTPUT}/${ISO_NAME}" . ; RC=$? - # generate md5sum of ISO if we are using class 'RELEASE': + # generate md5sum and sha1sum of ISO if we are using class 'RELEASE': case $CLASSES in *RELEASE*) [ "$RC" = 0 ] && \ - ( cd $ISO_OUTPUT && \ - md5sum ${ISO_NAME} > ${ISO_NAME}.md5 && \ - touch -r ${ISO_NAME} ${ISO_NAME}.md5 ) + ( + if cd $ISO_OUTPUT ; then + md5sum ${ISO_NAME} > ${ISO_NAME}.md5 && \ + touch -r ${ISO_NAME} ${ISO_NAME}.md5 + sha1sum ${ISO_NAME} > ${ISO_NAME}.sha1 && \ + touch -r ${ISO_NAME} ${ISO_NAME}.sha1 + fi + ) ;; esac