]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
Use sha256 for hashes in the release process
authorAndreas Rammhold <andreas@rammhold.de>
Mon, 26 Oct 2020 03:03:29 +0000 (04:03 +0100)
committerSimon Marchi <simon.marchi@efficios.com>
Wed, 28 Oct 2020 14:35:28 +0000 (10:35 -0400)
I just came across the GDB 10.1 release notes and saw that md5 is still
being used in those. I thought it would be a good idea to instead have a
more modern, secure and wildly available hash function such as SHA256 as
part of the release process.

The changes have been done rather mechnically via sed but executing the
`src-release.sh -b gdb` did work so I am confident about the result.

While this does not directly address the release mails, I was wasn't
able to find the template/script used for those, this is probably still
an improvement.

ChangeLog:
* src-release.sh: Use sha256sum instead of md5sum.

binutils/ChangeLog:
* README-how-to-make-a-release: Use sha256sum instead of md5sum.

Change-Id: I9cf19ea40699137c45463b8514f6e29271af2347

ChangeLog
binutils/ChangeLog
binutils/README-how-to-make-a-release
src-release.sh

index 9daa7be3226e54547978730834ed5857ab3dc0dc..c9a2f336148fa95833a89fe53e72b267db5962cf 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2020-10-26  Andreas Rammhold <andreas@rammhold.de>
+
+       * src-release.sh: Use sha256sum instead of md5sum.
+
 2020-10-14  Andrew Burgess  <andrew.burgess@embecosm.com>
 
        * Makefile.in: Rebuild.
index 838f8b8b73336c6f4c550b3d297359905f81cee7..5bd212594434e438d0c0d074c3545f6629637d07 100644 (file)
@@ -1,3 +1,7 @@
+2020-10-26  Andreas Rammhold <andreas@rammhold.de>
+
+       * README-how-to-make-a-release: Use sha256sum instead of md5sum.
+
 2020-10-28  Nick Clifton  <nickc@redhat.com>
 
        PR 26795
index abb2438c5c493ea527533db70c2618eddcebf437..db962e2f550b4ad221058a3e36888b4562b7ee11 100644 (file)
@@ -124,7 +124,7 @@ How to perform a release.
 
           cd <branch-sources>
           scp binutils-<OLD_VERSION>.90.tar.xz sourceware.org:~ftp/pub/binutils/snapshots
-          ssh sourceware.org md5sum ~ftp/pub/binutils/snapshots/binutils-<OLD_VERSION>.90.tar.xz
+          ssh sourceware.org sha256sum ~ftp/pub/binutils/snapshots/binutils-<OLD_VERSION>.90.tar.xz
 
      e. Clean up the source directory again.
 
@@ -364,7 +364,7 @@ Cheers
       David Edelsohn <dje.gcc@gmail.com> announcing the new release.
       Sign the email and include the checksum:
 
-          md5sum binutils-2.3x.tar.*
+          sha256sum binutils-2.3x.tar.*
 
       (The email to Davis is so that he can update the GNU Toolchain
       social media).  Something like this:
index 1f69deeb0e6127dd2c2d4d14d4084fed977e2567..fd65856a55cc8d73c222a2ef1ea0e9dd0c4b22e8 100755 (executable)
@@ -26,7 +26,7 @@ BZIPPROG=bzip2
 GZIPPROG=gzip
 LZIPPROG=lzip
 XZPROG=xz
-MD5PROG=md5sum
+SHA256PROG=sha256sum
 MAKE=make
 CC=gcc
 CXX=g++
@@ -168,15 +168,15 @@ do_proto_toplev()
 
 CVS_NAMES='-name CVS -o -name .cvsignore'
 
-# Add an md5sum to the built tarball
-do_md5sum()
+# Add a sha256sum to the built tarball
+do_sha256sum()
 {
-    echo "==> Adding md5 checksum to top-level directory"
+    echo "==> Adding sha256 checksum to top-level directory"
     (cd proto-toplev && find * -follow \( $CVS_NAMES \) -prune \
        -o -type f -print \
-       | xargs $MD5PROG > ../md5.new)
-    rm -f proto-toplev/md5.sum
-    mv md5.new proto-toplev/md5.sum
+       | xargs $SHA256PROG > ../sha256.new)
+    rm -f proto-toplev/sha256.sum
+    mv sha256.new proto-toplev/sha256.sum
 }
 
 # Build the release tarball
@@ -276,7 +276,7 @@ tar_compress()
     verdir=${5:-$tool}
     ver=$(getver $verdir)
     do_proto_toplev $package $ver $tool "$support_files"
-    do_md5sum
+    do_sha256sum
     do_tar $package $ver
     do_compress $package $ver "$compressors"
 }
@@ -290,7 +290,7 @@ gdb_tar_compress()
     compressors=$4
     ver=$(getver $tool)
     do_proto_toplev $package $ver $tool "$support_files"
-    do_md5sum
+    do_sha256sum
     do_djunpack $package $ver
     do_tar $package $ver
     do_compress $package $ver "$compressors"