Add support for sha1sum
authorMichael Prokop <mika@grml.org>
Fri, 20 Feb 2009 15:35:49 +0000 (16:35 +0100)
committerMichael Prokop <mika@grml.org>
Fri, 20 Feb 2009 15:35:49 +0000 (16:35 +0100)
buildd/cleanup.sh
buildd/functions.sh
buildd/link_latest.sh
buildd/remove_isos.sh
buildd/upload_isos.sh
debian/changelog
grml-live

index 9a4d5f6..f9e72b1 100755 (executable)
@@ -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:
index 4efd123..a440d3a 100755 (executable)
@@ -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
 }
 
index fc4e654..a262e12 100755 (executable)
@@ -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
 
index 5832e00..6ec0193 100755 (executable)
@@ -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 #################################################################
index 6166077..b622d5f 100755 (executable)
@@ -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 \
index 71395a4..70a3cb9 100644 (file)
@@ -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 <mika@grml.org>  Fri, 20 Feb 2009 16:03:42 +0100
+ -- Michael Prokop <mika@grml.org>  Fri, 20 Feb 2009 16:31:04 +0100
 
 grml-live (0.9.8) unstable; urgency=low
 
index ba87869..cfbc0b3 100755 (executable)
--- 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