Re: [Reproducible-builds] [pdftex] Please make the CreationDate, ModDate and ID field deterministic

2015-12-01 Thread Akira Kakuto

Dear Maria,


I was wondering what has happened with this proposal since I did not get
any reply since August.


Thanh applied your SOURCE_DATE_EPOCH patch on 18, August.

Thanks,
Akira Kakuto


___
Reproducible-builds mailing list
Reproducible-builds@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/reproducible-builds


Re: [Reproducible-builds] [pdftex] Please make the CreationDate, ModDate and ID field deterministic

2015-12-01 Thread Maria Valentina Marin
Hi,

I was wondering what has happened with this proposal since I did not get
any reply since August.

On 08/12/2015 01:08 PM, Maria Valentina Marin wrote:
> On 07/14/2015 12:39 AM, Karl Berry wrote:
>> Thanh is away for ~3 weeks.  He will review both the SOURCE_DATE_EPOCH
>> patch (which I suspect will be fine) and Nicolas's other comments when
>> he's back.
> 
> In addition to my patch to honour $SOURCE_DATE_EPOCH please find
> attached an additional patch which uses UTC in the printed timestamps to
> also make the timezone reproducible.
> 
> I have patched the function makepdftime to use gmtime if
> $SOURCE_DATE_EPOCH is set. Otherwise the old behaviour will be kept.
> 
> I have tested the patch in our autobuilders against 4 Debian packages
> that use pdflatex and these become reproducible.

Thanks!
akira

___
Reproducible-builds mailing list
Reproducible-builds@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/reproducible-builds


Re: [Reproducible-builds] [pdftex] Please make the CreationDate, ModDate and ID field deterministic

2015-08-12 Thread Maria Valentina Marin
Hi,

On 07/14/2015 12:39 AM, Karl Berry wrote:
 Thanh is away for ~3 weeks.  He will review both the SOURCE_DATE_EPOCH
 patch (which I suspect will be fine) and Nicolas's other comments when
 he's back.

In addition to my patch to honour $SOURCE_DATE_EPOCH please find
attached an additional patch which uses UTC in the printed timestamps to
also make the timezone reproducible.

I have patched the function makepdftime to use gmtime if
$SOURCE_DATE_EPOCH is set. Otherwise the old behaviour will be kept.

I have tested the patch in our autobuilders against 4 Debian packages
that use pdflatex and these become reproducible.

Cheers,
akira

Description: Use gmtime instead of localtime to produce timezone independent 
output if SOURCE_DATE_EPOCH is set

--- a/texk/web2c/lib/texmfmp.c
+++ b/texk/web2c/lib/texmfmp.c
@@ -2876,7 +2876,7 @@ char start_time_str[TIME_STR_SIZE];
 static char time_str[TIME_STR_SIZE];
 /* minimum size for time_str is 24: D:mmddHHMMSS+HH'MM' */
 
-static void makepdftime(time_t t, char *time_str)
+static void makepdftime(time_t t, char *time_str, int utc)
 {
 
 struct tm lt, gmt;
@@ -2884,7 +2884,12 @@ static void makepdftime(time_t t, char *
 int i, off, off_hours, off_mins;
 
 /* get the time */
-lt = *localtime(t);
+if (utc){
+lt = *gmtime(t);
+}
+else {
+lt = *localtime(t);
+}
 size = strftime(time_str, TIME_STR_SIZE, D:%Y%m%d%H%M%S, lt);
 /* expected format: mmddHHMMSS */
 if (size == 0) {
@@ -2958,11 +2963,12 @@ void initstarttime(void)
uexit(EXIT_FAILURE);
}
start_time = epoch;
+   makepdftime(start_time, start_time_str, 1);
}
else {
start_time = time((time_t *) NULL);
+   makepdftime(start_time, start_time_str, 0);
}
-makepdftime(start_time, start_time_str);
 }
 }
 
@@ -3049,7 +3055,7 @@ void getfilemoddate(integer s)
 if (stat(file_name, file_data) == 0) {
 size_t len;
 
-makepdftime(file_data.st_mtime, time_str);
+makepdftime(file_data.st_mtime, time_str, 0);
 len = strlen(time_str);
 if ((unsigned) (poolptr + len) = (unsigned) (poolsize)) {
 poolptr = poolsize;



signature.asc
Description: OpenPGP digital signature
___
Reproducible-builds mailing list
Reproducible-builds@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/reproducible-builds

Re: [Reproducible-builds] [pdftex] Please make the CreationDate, ModDate and ID field deterministic

2015-07-12 Thread Maria Valentina Marin
Hi,

On 07/12/2015 12:02 AM, Karl Berry wrote:
 
 Meanwhile, Thanh has already made changes in the pdftex source
 repository, revision 724 at
 https://foundry.supelec.fr/scm/viewvc.php/branches/stable/source/?root=pdftex
 (project page: https://foundry.supelec.fr/projects/pdftex/)
 
 I append his message about it (sent privately).  Will it suffice for
 you?  --karl
 

It suffices, but it now shifts the problem somewhere else. The
SOURCE_DATE_EPOCH environment variable is an easy way for distributions
like Debian, openSUSE, and Ubuntu to set that variable during all their
builds and immediately get the supporting packages reproducible.

If pdftex does not support that environment variable but instead only
offers latex macros to make the timestamps and ID field reproducible
then we now have to fix all tools that make use of pdflatex. In Debian
616 source packages directly or indirectly build-depend on pdflatex.

Surely many of them can be fixed by fixing other toolchain packages like
Doxygen-latex but others will have to be manually patched.

We also often get a response like why do I have to patch my software?,
can't that other software be changed instead?. If you decide not to
integrate support for SOURCE_DATE_EPOCH then we would appreciate if you
could layout your reasoning for such decision so that we can refer other
package maintainers to that email.

Thank you for your consideration,

Cheers,
akira



___
Reproducible-builds mailing list
Reproducible-builds@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/reproducible-builds