Source: tcptrace Version: 6.6.7-4.1 Severity: wishlist Tags: patch User: [email protected] Usertags: timestamps username hostname X-Debbugs-Cc: [email protected]
Hi! While working on the "reproducible builds" effort [1], we have noticed that tcptrace could not be built reproducibly. It embeds the current build date/time, the username and hostname into the binary. The attached patch strips this to enable reproducible building. Regards, Reiner [1]: https://wiki.debian.org/ReproducibleBuilds
diff --git a/Makefile.in b/Makefile.in
index 03e1cd9..9bc3957 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -200,8 +200,7 @@ tcptrace: ${OFILES}
# If you have problems getting "whoami", "hostname", or "date" to run on
# your machine, just hack in a quick string below in place of the command.
version.o: ${CFILES} Makefile
- ${CC} ${CFLAGS} -o version.o -c $(srcdir)/version.c \
- -DBUILT_USER="\"`whoami`\"" -DBUILT_HOST="\"`hostname`\"" -DBUILT_DATE="\"`date`\""
+ ${CC} ${CFLAGS} -o version.o -c $(srcdir)/version.c
#
# special rules for scanner/parser
diff --git a/tcptrace.c b/tcptrace.c
index 7cd7519..4fd23df 100644
--- a/tcptrace.c
+++ b/tcptrace.c
@@ -658,8 +658,6 @@ static void
Version(void)
{
fprintf(stderr,"Version: %s\n", tcptrace_version);
- fprintf(stderr," Compiled by '%s' at '%s' on machine '%s'\n",
- built_bywhom, built_when, built_where);
}
diff --git a/version.c b/version.c
index e8715fc..68fd3f0 100644
--- a/version.c
+++ b/version.c
@@ -57,9 +57,3 @@ static char const GCC_UNUSED rcsid_version[] =
"@(#)$Header: /usr/local/cvs/tcptrace/version.c,v 5.4 2003/11/19 14:38:06 sdo Exp $";
-/* build information */
-/* constants filled in when version.c is compiled */
-char *built_bywhom = BUILT_USER;
-char *built_when = BUILT_DATE;
-char *built_where = BUILT_HOST;
-
diff --git a/version.h b/version.h
index 4f95979..705760a 100644
--- a/version.h
+++ b/version.h
@@ -67,9 +67,3 @@ static char const GCC_UNUSED rcsid_version[] =
/* the string to print */
#define VERSION "Ostermann's tcptrace -- version " VERSION_NUM " -- " VERSION_DATE
-
-/* build information */
-/* constants filled in when version.c is compiled */
-extern char *built_bywhom;
-extern char *built_when;
-extern char *built_where;
signature.asc
Description: Digital signature
_______________________________________________ Reproducible-builds mailing list [email protected] http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/reproducible-builds
