Source: madlib
Version: 1.3.0-2.1
Severity: wishlist
Tags: patch
User: [email protected]
Usertags: hostname
X-Debbugs-Cc: [email protected]
Hi,
While working on the "reproducible builds" effort [1], we have noticed
that madlib could not be built reproducibly.
The attached patch removes hostnames from the build system. Once
applied, madlib can be built reproducibly in our reproducible
toolchain.
[1]: https://wiki.debian.org/ReproducibleBuilds
Regards,
--
,''`.
: :' : Chris Lamb
`. `'` [email protected] / chris-lamb.co.uk
`-
diff -urNad madlib.orig/madlib-1.3.0/debian/patches/hostname.patch
madlib/madlib-1.3.0/debian/patches/hostname.patch
--- madlib.orig/madlib-1.3.0/debian/patches/hostname.patch 1970-01-01
01:00:00.000000000 +0100
+++ madlib/madlib-1.3.0/debian/patches/hostname.patch 2015-02-22
00:50:16.517400837 +0000
@@ -0,0 +1,26 @@
+diff -urNad madlib.orig/configure.ac madlib/madlib-1.3.0/configure.ac
+--- madlib.orig/configure.ac 2015-02-22 00:05:25.328588195 +0000
++++ madlib/configure.ac 2015-02-22 00:25:46.095136870 +0000
+@@ -70,6 +70,10 @@
+ AC_HELP_STRING([--with-parser-prefix=PFX],
+ [prefix where the parser is installed]),
+ [PARSER_PREFIX=$withval])
++AC_ARG_WITH(hostname,
++ AC_HELP_STRING([--with-hostname=HOSTNAME],
++ [use specified hostname]),
++ [HOSTNAME=$withval])
+
+ dnl Parse '--enable' command line options
+ AC_ARG_ENABLE(blas-lapack,
+@@ -190,7 +194,9 @@
+
+ dnl Get the operating system and machine names
+ UNAME=`uname`
+-HOSTNAME=`hostname`
++if test "x${HOSTNAME}" = "x" ; then
++ HOSTNAME=`hostname`
++fi
+
+ dnl Check for default compilers
+ AC_PROG_CC
+
diff -urNad madlib.orig/madlib-1.3.0/debian/patches/series
madlib/madlib-1.3.0/debian/patches/series
--- madlib.orig/madlib-1.3.0/debian/patches/series 2015-02-22
00:48:14.595902068 +0000
+++ madlib/madlib-1.3.0/debian/patches/series 2015-02-22 00:49:03.214094966
+0000
@@ -1 +1,2 @@
gcc44.patch
+hostname.patch
diff -urNad madlib.orig/madlib-1.3.0/debian/rules
madlib/madlib-1.3.0/debian/rules
--- madlib.orig/madlib-1.3.0/debian/rules 2015-02-22 00:48:14.595902068
+0000
+++ madlib/madlib-1.3.0/debian/rules 2015-02-22 00:49:24.667062512 +0000
@@ -11,7 +11,8 @@
--prefix=/usr \
--mandir=\$${prefix}/share/man \
--infodir=\$${prefix}/share/info\
- --enable-ann --enable-benchmarks
+ --enable-ann --enable-benchmarks \
+ --with-hostname=debian
DEB_STRIPPED_UPSTREAM_VERSION = $(shell echo $(DEB_UPSTREAM_VERSION) | sed -n
-e 's/\.*$$//p')
MADLIB_VERSION=$(DEB_STRIPPED_UPSTREAM_VERSION)