Source: tth Version: 4.05+ds-1 Severity: wishlist Tags: patch User: reproducible-builds@lists.alioth.debian.org Usertags: timestamps X-Debbugs-Cc: reproducible-builds@lists.alioth.debian.org Hi! While working on the "reproducible builds" effort [1], we have noticed that tth could not be built reproducibly. The build timestamp is embedded into several HTML files. The attached patch fixes this by removing the timestamp from generated HTML files, as it provides no useful information anyway. 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..1008736 --- /dev/null +++ b/debian/patches/reproducible_build.patch @@ -0,0 +1,41 @@ +Author: Reiner Herrmann <reiner@reiner-h.de> +Description: Don't embed timestamp into HTML + For generated HTML files, the current timestamp is embedded. + As this prevents the package from building reproducible and + provides no useful information it can be removed. + +Index: tth-4.05+ds/tthg.lex +=================================================================== +--- tth-4.05+ds.orig/tthg.lex ++++ tth-4.05+ds/tthg.lex +@@ -5977,7 +5977,6 @@ char ttver[]=TTH_VERSION; + char ttname[20]; + time_t secs_elapsed; + time_t make_time=939087164; +-char timestr[]="On 00 Jan 2000, 00:00."; + FILE *fdin=0; + int horizmode=1; /* In signoff use font tags not divs */ + char main_input[TTH_CHARLEN]; +@@ -6135,20 +6134,12 @@ char main_output[TTH_CHARLEN]; + yylex(); + fprintf(stderr, "Number of lines processed approximately %d\n", + tth_num_lines-1); +- /* Time stamp */ +- time(&secs_elapsed); +- spoint=ctime(&secs_elapsed); +- strncpy(timestr+3,spoint+8,2); +- strncpy(timestr+6,spoint+4,3); +- strncpy(timestr+10,spoint+20,4); +- strncpy(timestr+16,spoint+11,5); +- if(raw==2)*timestr=0; /* Not if -r2 */ + if(raw!=1 && raw != 4){ + fprintf(tth_fdout,"\n<br /><br /><hr /><small>File translated from\n\ + T<sub>%sE%s</sub>X\nby <a href=\"http://hutchinson.belmont.ma.us/tth/\">\n\ + T<sub>%sT%s</sub>%s</a>,\n\ +-version %s.<br />%s</small>\n",TTH_SMALL,TTH_SIZEEND,TTH_SMALL,TTH_SIZEEND +- ,TTH_NAME,TTH_VERSION,timestr); ++version %s.</small>\n",TTH_SMALL,TTH_SIZEEND,TTH_SMALL,TTH_SIZEEND ++ ,TTH_NAME,TTH_VERSION); + } + if(raw!=1){ + if(tth_htmlstyle&3)fprintf(tth_fdout,"</div></body>"); diff --git a/debian/patches/series b/debian/patches/series index 8e030db..9f5fb8c 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -8,3 +8,4 @@ secure-upstream-doc.patch silence-upstream-doc.patch debianization.patch debianization-clean.patch +reproducible_build.patch
Attachment:
signature.asc
Description: OpenPGP digital signature