Source: libnss-ldap Version: 265-3 Severity: wishlist Tags: patch upstream User: reproducible-builds@lists.alioth.debian.org Usertags: timestamps username X-Debbugs-Cc: reproducible-builds@lists.alioth.debian.org Hi! While working on the "reproducible builds" effort [1], we have noticed that libnss-ldap could not be built reproducibly. It embeds the build date and username into the version string. The attached patch removes this to make the build reproducible. Regards, Reiner [1]: https://wiki.debian.org/ReproducibleBuilds
diff --git a/debian/patches/reproducible-build.patch b/debian/patches/reproducible-build.patch
new file mode 100644
index 0000000..1a09400
--- /dev/null
+++ b/debian/patches/reproducible-build.patch
@@ -0,0 +1,43 @@
+Author: Reiner Herrmann <reiner@reiner-h.de>
+Description: Remove build user and date from version string to make build reproducible
+
+--- a/vers_string
++++ b/vers_string
+@@ -32,17 +32,17 @@
+ print $PROJECT, $SEP, $VERSION, "\n";
+ } elsif ($ARGV[0] eq "-l") {
+ print "static const char SGS_VERS[160] = \"";
+- print '@(#)LIBRARY:', $PROGRAM, ' PROJECT:', $PROJECT, $SEP, $VERSION, ' DEVELOPER:', $AUTHOR, ' BUILT:', $DATE;
++ print '@(#)LIBRARY:', $PROGRAM, ' PROJECT:', $PROJECT, $SEP, $VERSION;
+ print "\";\n";
+ } elsif ($ARGV[0] eq "-c") {
+ print "const char SGS_VERS[160] = \"";
+- print '@(#)PROGRAM:', $PROGRAM, ' PROJECT:', $PROJECT, $SEP, $VERSION, ' DEVELOPER:', $AUTHOR, ' BUILT:', $DATE;
++ print '@(#)PROGRAM:', $PROGRAM, ' PROJECT:', $PROJECT, $SEP, $VERSION;
+ print "\";\n";
+ print "const char VERS_NUM[10] = \"$VERSION\";\n";
+ } elsif ($ARGV[0] eq "-n") {
+ print "$VERSION\n";
+ } elsif ($ARGV[0] eq "-B") {
+- print 'PROGRAM:', $PROGRAM, ' PROJECT:', $PROJECT, $SEP, $VERSION, ' DEVELOPER:', $AUTHOR, ' BUILT:NO DATE SET (-B used)',"\n";
++ print 'PROGRAM:', $PROGRAM, ' PROJECT:', $PROJECT, $SEP, $VERSION,"\n";
+ } elsif ($ARGV[0] eq "-v") {
+ unlink($OUTFILE);
+ open(OUTFILE,">$OUTFILE");
+@@ -52,7 +52,7 @@
+ print OUTFILE "#define USE_SGS_VERS\n\n";
+ }
+ print OUTFILE "const char SGS_VERS[160] = \"";
+- print OUTFILE '@(#)PROGRAM:', $PROGRAM, ' PROJECT:', $PROJECT, $SEP, $VERSION, ' DEVELOPER:', $AUTHOR, ' BUILT:', $DATE;
++ print OUTFILE '@(#)PROGRAM:', $PROGRAM, ' PROJECT:', $PROJECT, $SEP, $VERSION;
+ print OUTFILE "\";\n\n";
+ print OUTFILE "const char VERS_NUM[10] = \"$VERSION\";\n\n";
+ close(OUTFILE);
+@@ -78,6 +78,6 @@
+ print STDERR "\tTo create a project distribution, type tarup\n";
+ print STDERR "\tTo commit a project, type commit [message]\n";
+ } else {
+- print 'PROGRAM:', $PROGRAM, ' PROJECT:', $PROJECT, $SEP, $VERSION, ' DEVELOPER:', $AUTHOR, ' BUILT:', $DATE;
++ print 'PROGRAM:', $PROGRAM, ' PROJECT:', $PROJECT, $SEP, $VERSION;
+ print "\n";
+ }
diff --git a/debian/patches/series b/debian/patches/series
index 15e2a8c..ec1b7ab 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -10,3 +10,4 @@ fix_ldap_sessions_mem_leak.patch
spelling-fix.patch
glibc-2.16.patch
fix-nsswitch-example.patch
+reproducible-build.patch
Attachment:
signature.asc
Description: PGP signature