Source: ceph
Version: 0.80.9-2
Severity: wishlist
Tags: patch
User: reproducible-bui...@lists.alioth.debian.org
Usertags: randomness
X-Debbugs-Cc: reproducible-bui...@lists.alioth.debian.org

Hi,

While working on the "reproducible builds" effort [1], we have noticed
that ceph could not be built reproducibly.

This is because the dh_installinit snippets that are placed into the
post{inst,rm} scripts are generated in a filesystem — and thus
non-deterministic — order.

The attached patch removes this randomness from the build system by
simply
sorting the filenames. Once applied, ceph can be built reproducibly in
our
reproducible toolchain.

 [1]: https://wiki.debian.org/ReproducibleBuilds


Regards,

-- 
      ,''`.
     : :'  :     Chris Lamb
     `. `'`      la...@debian.org / chris-lamb.co.uk
       `-
diff --git a/debian/rules b/debian/rules
index b3b0ccb..45833b4 100755
--- a/debian/rules
+++ b/debian/rules
@@ -62,17 +62,17 @@ override_dh_installinit:
        dh_installinit --no-start
        dh_installinit -pceph --no-start --name=rbdmap
        # Install upstart configurations using dh_installinit
-       for conf in `ls -1 src/upstart/ceph*.conf | grep -v mds`; do \
+       for conf in `ls -1 src/upstart/ceph*.conf | grep -v mds | LC_ALL=C 
sort`; do \
         name=`basename $$conf | cut -d . -f 1`; \
         cp -v $$conf debian/ceph.$$name.upstart; \
         dh_installinit -pceph --no-start --name=$$name; \
     done
-       for conf in `ls -1 src/upstart/ceph-mds*.conf`; do \
+       for conf in `ls -1 src/upstart/ceph-mds*.conf | LC_ALL=C sort`; do \
         name=`basename $$conf | cut -d . -f 1`; \
         cp -v $$conf debian/ceph-mds.$$name.upstart; \
         dh_installinit -pceph-mds --no-start --name=$$name; \
     done
-       for conf in `ls -1 src/upstart/radosgw*.conf`; do \
+       for conf in `ls -1 src/upstart/radosgw*.conf | LC_ALL=C sort`; do \
         name=`basename $$conf | cut -d . -f 1`; \
         [ $$name = "radosgw" ] && name="radosgw-instance";\
         cp -v $$conf debian/radosgw.$$name.upstart; \

Reply via email to