Bug#890577: tkgate: please make the build reproducible
Chris Lamb
lamby at debian.org
Fri Feb 16 08:27:51 UTC 2018
Source: tkgate
Version: 2.0~b10-5
Severity: wishlist
Tags: patch
User: reproducible-builds at lists.alioth.debian.org
Usertags: buildpath
X-Debbugs-Cc: reproducible-bugs at lists.alioth.debian.org
Hi,
Whilst working on the Reproducible Builds effort [0], we noticed
that tkgate could not be built reproducibly.
This is because it includes the output of `pwd` in the resulting
binary (which is useless/broken for an end-user, as well as being
a privacy leak of the builder).
Patch attached that sets TKGATE_SECONDARYHOME from TKGATE_HOMEDIR.
This is cleaner than removing the TKGATE_SECONDARYHOME mechanism
as the patch for _that_ would be:
--- a/src/tkgate/tkgate.c 2018-02-16 07:56:06.421183383 +0000
--- b/src/tkgate/tkgate.c 2018-02-16 08:27:09.286827217 +0000
@@ -122,32 +122,29 @@
* 1) Directory specified by TKGATE_HOME environment variable
* 2) Current directory
* 3) Directory specified by TKGATE_HOMEDIR in config.h
- * 4) Directory specified by TKGATE_SECONDARYHOME in config.h
*
* The #define value TKGATE_HOMEDIR is normally generated automatically by the
* configure script using TKGATE_HOMEDIRBASE as a prefix and tkgate-x.y (where
- * x.y is the version number) the subdirectory. The #define value TKGATE_SECONDARYHOME
- * is normally set to the directory in which tkgate was configured/compiled.
+ * x.y is the version number) the subdirectory.
*
*****************************************************************************/
void findTkGateHome(char *homeDir)
{
char buf[STRMAX];
- char *trydirs[4];
+ char *trydirs[3];
int i;
trydirs[0] = getenv("TKGATE_HOME");
trydirs[1] = getcwd(buf,STRMAX);
trydirs[2] = TKGATE_HOMEDIR;
- trydirs[3] = TKGATE_SECONDARYHOME;
- for (i = 0;i < 4;i++) {
+ for (i = 0;i < 3;i++) {
if (!trydirs[i]) continue;
strcpy(homeDir,trydirs[i]);
if (testHome(homeDir)) break;
}
- if (i == 4) {
+ if (i == 3) {
printf("\n");
printf("I could not locate the tkgate home directory. I tried looking in:\n");
if (trydirs[0]) printf(" %s (environment variable)\n", trydirs[0]);
.. which is a little bizarre, not helped by the "magic numbers" used by
upstream :)
[0] https://reproducible-builds.org/
Regards,
--
,''`.
: :' : Chris Lamb
`. `'` lamby at debian.org / chris-lamb.co.uk
`-
-------------- next part --------------
--- a/debian/patches/reproduible-build.patch 1970-01-01 01:00:00.000000000 +0100
--- b/debian/patches/reproduible-build.patch 2018-02-16 08:20:36.644564932 +0000
@@ -0,0 +1,15 @@
+Description: Make the build reproducible
+Author: Chris Lamb <lamby at debian.org>
+Last-Update: 2018-02-16
+
+--- tkgate-2.0~b10.orig/configure.ac
++++ tkgate-2.0~b10/configure.ac
+@@ -105,7 +105,7 @@ AH_BOTTOM([
+ # TkGate Installation Directories
+ #
+ currentDirectory=`pwd`
+-AC_DEFINE_UNQUOTED(TKGATE_SECONDARYHOME, "$currentDirectory", [Backup location for TkGate home directory])
++AC_DEFINE_UNQUOTED(TKGATE_SECONDARYHOME, TKGATE_HOMEDIR, [Backup location for TkGate home directory])
+
+ #------------------------------------------------------------------------
+ # Standard compiler checks
--- a/debian/patches/series 2018-02-16 07:56:06.417183359 +0000
--- b/debian/patches/series 2018-02-16 08:20:35.632559104 +0000
@@ -3,3 +3,4 @@
hardening.patch
remove-shebang-line.patch
typos.patch
+reproduible-build.patch
More information about the Reproducible-bugs
mailing list