Bug#794398: clhep: please make the build reproducible

Vagrant Cascadian vagrant at reproducible-builds.org
Thu Dec 22 21:36:57 GMT 2022


Control: tags 794398 pending

On 2015-08-02, Reiner Herrmann wrote:
> While working on the "reproducible builds" effort [1], we have noticed
> that clhep could not be built reproducibly.
> A file list is sorted differently depending on the locale.
>
> The attached patch fixes this by sorting with LC_ALL set to C.

I have uploaded an NMU to DELAYED/10 fixing this sorting issue and
another reproducible builds issue with embedded build paths:

diff -Nru clhep-2.1.4.1+dfsg/debian/changelog clhep-2.1.4.1+dfsg/debian/changelog
--- clhep-2.1.4.1+dfsg/debian/changelog	2017-02-07 03:01:31.000000000 -0800
+++ clhep-2.1.4.1+dfsg/debian/changelog	2022-12-22 13:06:15.000000000 -0800
@@ -1,3 +1,16 @@
+clhep (2.1.4.1+dfsg-1.1) unstable; urgency=medium
+
+  * Non-maintainer upload.
+
+  [ Reiner Herrmann ]
+  * getObjectList.in: Sort file list to get reproducible results
+    (Closes: #794398)
+
+  [ Vagrant Cascadian ]
+  * debian/rules: Avoid embedding the build path in clhep-config.
+
+ -- Vagrant Cascadian <vagrant at reproducible-builds.org>  Thu, 22 Dec 2022 13:06:15 -0800
+
 clhep (2.1.4.1+dfsg-1) unstable; urgency=medium
 
   [ Andreas Tille ]
diff -Nru clhep-2.1.4.1+dfsg/debian/patches/getobjectlist.in-sort-file-list-to-get-r.patch clhep-2.1.4.1+dfsg/debian/patches/getobjectlist.in-sort-file-list-to-get-r.patch
--- clhep-2.1.4.1+dfsg/debian/patches/getobjectlist.in-sort-file-list-to-get-r.patch	1969-12-31 16:00:00.000000000 -0800
+++ clhep-2.1.4.1+dfsg/debian/patches/getobjectlist.in-sort-file-list-to-get-r.patch	2022-12-22 13:06:15.000000000 -0800
@@ -0,0 +1,19 @@
+From: Reiner Herrmann <reiner at reiner-h.de>
+Date: Sun, 2 Aug 2015 18:03:58 +0200
+X-Dgit-Generated: 2.1.4.1+dfsg-1.1 dacaf952527807a2f82c0884afa3fa3f10696298
+Subject: getObjectList.in: Sort file list to get reproducible results
+
+(Closes: #794398)
+
+---
+
+diff --git a/getObjectList.in b/getObjectList.in
+index 3f55df2..9ff040b 100755
+--- a/getObjectList.in
++++ b/getObjectList.in
+@@ -22,4 +22,4 @@ do
+    fi
+ done
+ 
+-echo $filelist
++echo $filelist | tr ' ' '\n' | LC_ALL=C sort | tr '\n' ' '
diff -Nru clhep-2.1.4.1+dfsg/debian/patches/series clhep-2.1.4.1+dfsg/debian/patches/series
--- clhep-2.1.4.1+dfsg/debian/patches/series	2017-02-07 02:54:11.000000000 -0800
+++ clhep-2.1.4.1+dfsg/debian/patches/series	2022-12-22 13:06:15.000000000 -0800
@@ -4,3 +4,4 @@
 tests.patch
 fix-double-comparision-in-testBug58950.patch
 replace_psfig_by_graphicx.patch
+getobjectlist.in-sort-file-list-to-get-r.patch
diff -Nru clhep-2.1.4.1+dfsg/debian/rules clhep-2.1.4.1+dfsg/debian/rules
--- clhep-2.1.4.1+dfsg/debian/rules	2017-02-07 02:48:35.000000000 -0800
+++ clhep-2.1.4.1+dfsg/debian/rules	2022-12-22 13:06:15.000000000 -0800
@@ -34,5 +34,10 @@
 	dh_auto_build
 	doxygen doxygen.conf
 
+override_dh_install:
+	# Avoid embedding build path for reproducible builds
+	sed -i -e "s,$(CURDIR),BUILDDIR,g" debian/tmp/usr/bin/clhep-config
+	dh_install
+
 %:
 	dh $@ --with autoreconf $(dhopt)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 227 bytes
Desc: not available
URL: <http://alioth-lists.debian.net/pipermail/debian-science-maintainers/attachments/20221222/0c5f8c16/attachment.sig>


More information about the debian-science-maintainers mailing list