Source: sbmltoolbox
Version: 4.1.0-2
Severity: wishlist
Tags: patch
User: reproducible-bui...@lists.alioth.debian.org
Usertags: locale fileordering
X-Debbugs-Cc: reproducible-bui...@lists.alioth.debian.org

Hi!

While working on the "reproducible builds" effort [1], we have noticed
that sbmltoolbox could not be built reproducibly.
A directory list embedded into a shell script is sorted differently
depending on the locale.

The attached patch fixes this by sorting the list with the C locale.

Regards,
 Reiner

[1]: https://wiki.debian.org/ReproducibleBuilds
diff --git a/debian/mktbprofile.sh b/debian/mktbprofile.sh
index cc290dc..3265bc6 100644
--- a/debian/mktbprofile.sh
+++ b/debian/mktbprofile.sh
@@ -2,7 +2,7 @@
 NAME="SBMLToolbox"
 echo TB=\"/usr/share/$NAME\" > debian/$NAME.sh
 echo 'TB_PATH="$TB:\' >> debian/$NAME.sh
-find toolbox/* -type d | sed -e 's/toolbox/\$TB/g' -e 's/.*/&:\\/' >> debian/$NAME.sh
+find toolbox/* -type d | LC_ALL=C sort | sed -e 's/toolbox/\$TB/g' -e 's/.*/&:\\/' >> debian/$NAME.sh
 echo \" >> debian/$NAME.sh
 echo 'echo $OCTAVE_PATH | grep -q $TB || export OCTAVE_PATH="${TB_PATH}${OCTAVE_PATH}"' >> debian/$NAME.sh
 echo 'echo $MATLABPATH | grep -q $TB || export MATLABPATH="${TB_PATH}${MATLABPATH}"' >> debian/$NAME.sh

Attachment: signature.asc
Description: PGP signature

Reply via email to