Source: omnidb
Version: 2.16.0+ds-1
Severity: wishlist
Tags: patch
User: reproducible-bui...@lists.alioth.debian.org
Usertags: filesystem
X-Debbugs-Cc: reproducible-b...@lists.alioth.debian.org

Hi,

Whilst working on the Reproducible Builds effort [0] we noticed
that omnidb could not be built reproducibly.

This is because it generated the "Depends" line via substvars by
iterating over the filesystem which, without an explicit sort, returns
the results in a nondeterministic order:

│ │ │ │  Installed-Size: 30226
│ │ │ │ -Depends: fonts-glewlwyd, fonts-roboto-unhinted, […]
│ │ │ │ +Depends: fonts-roboto-unhinted, fonts-glewlwyd, […]
│ │ │ │  Section: database

Patch attached that enforces an order via sort(1).

 [0] https://reproducible-builds.org/


Regards,

-- 
      ,''`.
     : :'  :     Chris Lamb
     `. `'`      la...@debian.org / chris-lamb.co.uk
       `-
--- a/debian/rules      2019-08-16 08:05:20.841896177 -0700
--- b/debian/rules      2019-08-16 08:10:36.883367468 -0700
@@ -13,7 +13,7 @@
 override_dh_install-indep:
        dh_install -i
        echo "fonts:Depends=" >> debian/omnidb-common.substvars
-       find debian -name '*.eot' -or -name '*.svg' -or -name '*.ttf' -or -name 
'*.woff*' | \
+       find debian -name '*.eot' -or -name '*.svg' -or -name '*.ttf' -or -name 
'*.woff*' | LC_ALL=C sort | \
                while read path; do \
                        file="$${path##*/}" ; \
                        dpkg -S "*/$$file" | grep '^fonts' | sort | head -1 | 
while read pkg pkgpath; do \
@@ -23,7 +23,7 @@
                        done \
                done
        echo "js:Depends=" >> debian/omnidb-common.substvars
-       find debian -regextype egrep -regex '.*/(jq|excanvas).*\.(css|js)$$' | \
+       find debian -regextype egrep -regex '.*/(jq|excanvas).*\.(css|js)$$' | 
LC_ALL=C sort | \
                while read path; do \
                        file="$$(echo $${path##*/} | sed -e 's/-[0-9.]*\././')" 
; \
                        dpkg -S "*/$$file" | grep '^libjs' | sort | head -1 | 
while read pkg pkgpath; do \

Reply via email to