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

Hi,

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

This is because it generated ordered C code from a grammar definition
and this process was non-deterministic in nature.

Patch attached.

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


Regards,

-- 
      ,''`.
     : :'  :     Chris Lamb
     `. `'`      la...@debian.org / chris-lamb.co.uk
       `-
--- a/debian/patches/0002-Reproducible-build.patch      1970-01-01 
01:00:00.000000000 +0100
--- b/debian/patches/0002-Reproducible-build.patch      2019-04-03 
07:01:18.755077435 +0200
@@ -0,0 +1,26 @@
+Description: Make the build reproducible
+Author: Chris Lamb <la...@debian.org>
+Last-Update: 2019-04-03
+
+--- adms-2.3.6.orig/admsXml/mkgrammar.pl
++++ adms-2.3.6/admsXml/mkgrammar.pl
+@@ -71,7 +71,7 @@ while(<>)
+     die "bisonrule should terminate with ';' - see $_" if(not m/^\s+;$/);
+   }
+ }
+-map {print OFH "\%token <_lexval> $_\n";} keys %Token;
++map {print OFH "\%token <_lexval> $_\n";} sort keys %Token;
+ print OFH "\n";
+ map {print OFH "\%type <_yaccval> $_->{name}\n";} @allbisonrule;
+ print OFH "\n";
+--- adms-2.3.6.orig/admsXml/mkelements.pl
++++ adms-2.3.6/admsXml/mkelements.pl
+@@ -1884,7 +1884,7 @@ foreach(@$EA)
+   }
+   push @Location03,"  ENDIFIDENT\n";
+ }
+-foreach(keys(%A))
++foreach(sort keys(%A))
+ {
+   my($aname,$ee)=($_,$A{$_});
+   push @Location03,"  IFIDENT($aname)\n";
--- a/debian/patches/series     2019-04-03 06:52:15.005893725 +0200
--- b/debian/patches/series     2019-04-03 06:56:40.400431631 +0200
@@ -1 +1,2 @@
 0001-Spelling-errors.patch
+0002-Reproducible-build.patch

Reply via email to