Re: [PATCH inputproto] specs: Set TZ=UTC before calling asciidoc

2016-03-31 Thread Peter Hutterer
On Thu, Mar 31, 2016 at 03:00:16PM +0200, Andreas Boll wrote:
> 2016-03-30 6:26 GMT+02:00 Peter Hutterer :
> > On Fri, Dec 11, 2015 at 10:49:33AM +0100, Andreas Boll wrote:
> >> Set TZ=UTC before calling asciidoc to make the embedded dates invariant
> >> to timezones in order to make the package build reproducibly.
> >
> > quick check shows that the date embedded includes a timestamp with seconds
> > granularity. So unless your build system forces the exact same time for
> > every build, the result is still not reproducible. And if the build system
> > forces the time, why can't it force the timezone too?
> >
> > what am I missing here?
> >
> > Cheers,
> >Peter
> 
> From [1] "The date is based in the last modified date of the source
> file, but is sensible to the timezone."
> 
> In this case the source files are specs/XI2proto.txt and specs/XIproto.txt.
> So the timestamps in the generated html files depend only on the build
> system's timezone which could be overridden via TZ=UTC.

ah, ok, that makes sense then. Verified here, repeated makes don't update
the timestamp.

   7c7c2c1..1dbdc29  master -> master

thanks

Cheers,
   Peter

> 
> An alternate solution which could remove the timestamp from the
> generated html file has been proposed to asciidoc but unfortunately
> upstream hasn't merged that patch so far [2].
> 
> Thanks,
> Andreas
> 
> [1] 
> https://wiki.debian.org/ReproducibleBuilds/TimestampsInDocumentationGeneratedByAsciidoc
> [2] https://github.com/asciidoc/asciidoc/pull/9
> 
> 
> >>
> >> Fixes bug:
> >> https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=795981
> >>
> >> v2: Set TZ=UTC after $(AM_V_GEN) (fixes non-verbose build)
> >>
> >> Suggested-by: Eduard Sanou 
> >> Signed-off-by: Andreas Boll 
> >> ---
> >>  specs/Makefile.am | 2 +-
> >>  1 file changed, 1 insertion(+), 1 deletion(-)
> >>
> >> diff --git a/specs/Makefile.am b/specs/Makefile.am
> >> index a83cf40..f2454bc 100644
> >> --- a/specs/Makefile.am
> >> +++ b/specs/Makefile.am
> >> @@ -6,7 +6,7 @@ doc_DATA = XI2proto.html XIproto.html
> >>  dist_doc_DATA = XI2proto.txt XIproto.txt
> >>
> >>  %.html: %.txt
> >> - $(AM_V_GEN)$(ASCIIDOC) -o $@ $<
> >> + $(AM_V_GEN)TZ=UTC $(ASCIIDOC) -o $@ $<
> >>
> >>  CLEANFILES = $(doc_DATA)
> >>
> >> --
> >> 2.1.4
> >
___
xorg-devel@lists.x.org: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: https://lists.x.org/mailman/listinfo/xorg-devel

Re: [PATCH inputproto] specs: Set TZ=UTC before calling asciidoc

2016-03-31 Thread Andreas Boll
2016-03-30 6:26 GMT+02:00 Peter Hutterer :
> On Fri, Dec 11, 2015 at 10:49:33AM +0100, Andreas Boll wrote:
>> Set TZ=UTC before calling asciidoc to make the embedded dates invariant
>> to timezones in order to make the package build reproducibly.
>
> quick check shows that the date embedded includes a timestamp with seconds
> granularity. So unless your build system forces the exact same time for
> every build, the result is still not reproducible. And if the build system
> forces the time, why can't it force the timezone too?
>
> what am I missing here?
>
> Cheers,
>Peter

From [1] "The date is based in the last modified date of the source
file, but is sensible to the timezone."

In this case the source files are specs/XI2proto.txt and specs/XIproto.txt.
So the timestamps in the generated html files depend only on the build
system's timezone which could be overridden via TZ=UTC.

An alternate solution which could remove the timestamp from the
generated html file has been proposed to asciidoc but unfortunately
upstream hasn't merged that patch so far [2].

Thanks,
Andreas

[1] 
https://wiki.debian.org/ReproducibleBuilds/TimestampsInDocumentationGeneratedByAsciidoc
[2] https://github.com/asciidoc/asciidoc/pull/9


>>
>> Fixes bug:
>> https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=795981
>>
>> v2: Set TZ=UTC after $(AM_V_GEN) (fixes non-verbose build)
>>
>> Suggested-by: Eduard Sanou 
>> Signed-off-by: Andreas Boll 
>> ---
>>  specs/Makefile.am | 2 +-
>>  1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/specs/Makefile.am b/specs/Makefile.am
>> index a83cf40..f2454bc 100644
>> --- a/specs/Makefile.am
>> +++ b/specs/Makefile.am
>> @@ -6,7 +6,7 @@ doc_DATA = XI2proto.html XIproto.html
>>  dist_doc_DATA = XI2proto.txt XIproto.txt
>>
>>  %.html: %.txt
>> - $(AM_V_GEN)$(ASCIIDOC) -o $@ $<
>> + $(AM_V_GEN)TZ=UTC $(ASCIIDOC) -o $@ $<
>>
>>  CLEANFILES = $(doc_DATA)
>>
>> --
>> 2.1.4
>
___
xorg-devel@lists.x.org: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: https://lists.x.org/mailman/listinfo/xorg-devel

Re: [PATCH inputproto] specs: Set TZ=UTC before calling asciidoc

2016-03-29 Thread Peter Hutterer
On Fri, Dec 11, 2015 at 10:49:33AM +0100, Andreas Boll wrote:
> Set TZ=UTC before calling asciidoc to make the embedded dates invariant
> to timezones in order to make the package build reproducibly.

quick check shows that the date embedded includes a timestamp with seconds
granularity. So unless your build system forces the exact same time for
every build, the result is still not reproducible. And if the build system
forces the time, why can't it force the timezone too?

what am I missing here?

Cheers,
   Peter


> 
> Fixes bug:
> https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=795981
> 
> v2: Set TZ=UTC after $(AM_V_GEN) (fixes non-verbose build)
> 
> Suggested-by: Eduard Sanou 
> Signed-off-by: Andreas Boll 
> ---
>  specs/Makefile.am | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/specs/Makefile.am b/specs/Makefile.am
> index a83cf40..f2454bc 100644
> --- a/specs/Makefile.am
> +++ b/specs/Makefile.am
> @@ -6,7 +6,7 @@ doc_DATA = XI2proto.html XIproto.html
>  dist_doc_DATA = XI2proto.txt XIproto.txt
>  
>  %.html: %.txt
> - $(AM_V_GEN)$(ASCIIDOC) -o $@ $<
> + $(AM_V_GEN)TZ=UTC $(ASCIIDOC) -o $@ $<
>  
>  CLEANFILES = $(doc_DATA)
>  
> -- 
> 2.1.4
 
___
xorg-devel@lists.x.org: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: https://lists.x.org/mailman/listinfo/xorg-devel

Re: [PATCH inputproto] specs: Set TZ=UTC before calling asciidoc

2016-03-20 Thread Andreas Boll
ping

2016-01-13 12:08 GMT+01:00 Andreas Boll :
> ping
>
> 2015-12-11 10:49 GMT+01:00 Andreas Boll :
>> Set TZ=UTC before calling asciidoc to make the embedded dates invariant
>> to timezones in order to make the package build reproducibly.
>>
>> Fixes bug:
>> https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=795981
>>
>> v2: Set TZ=UTC after $(AM_V_GEN) (fixes non-verbose build)
>>
>> Suggested-by: Eduard Sanou 
>> Signed-off-by: Andreas Boll 
>> ---
>>  specs/Makefile.am | 2 +-
>>  1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/specs/Makefile.am b/specs/Makefile.am
>> index a83cf40..f2454bc 100644
>> --- a/specs/Makefile.am
>> +++ b/specs/Makefile.am
>> @@ -6,7 +6,7 @@ doc_DATA = XI2proto.html XIproto.html
>>  dist_doc_DATA = XI2proto.txt XIproto.txt
>>
>>  %.html: %.txt
>> -   $(AM_V_GEN)$(ASCIIDOC) -o $@ $<
>> +   $(AM_V_GEN)TZ=UTC $(ASCIIDOC) -o $@ $<
>>
>>  CLEANFILES = $(doc_DATA)
>>
>> --
>> 2.1.4
>>
___
xorg-devel@lists.x.org: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: https://lists.x.org/mailman/listinfo/xorg-devel

Re: [PATCH inputproto] specs: Set TZ=UTC before calling asciidoc

2016-01-13 Thread Andreas Boll
ping

2015-12-11 10:49 GMT+01:00 Andreas Boll :
> Set TZ=UTC before calling asciidoc to make the embedded dates invariant
> to timezones in order to make the package build reproducibly.
>
> Fixes bug:
> https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=795981
>
> v2: Set TZ=UTC after $(AM_V_GEN) (fixes non-verbose build)
>
> Suggested-by: Eduard Sanou 
> Signed-off-by: Andreas Boll 
> ---
>  specs/Makefile.am | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/specs/Makefile.am b/specs/Makefile.am
> index a83cf40..f2454bc 100644
> --- a/specs/Makefile.am
> +++ b/specs/Makefile.am
> @@ -6,7 +6,7 @@ doc_DATA = XI2proto.html XIproto.html
>  dist_doc_DATA = XI2proto.txt XIproto.txt
>
>  %.html: %.txt
> -   $(AM_V_GEN)$(ASCIIDOC) -o $@ $<
> +   $(AM_V_GEN)TZ=UTC $(ASCIIDOC) -o $@ $<
>
>  CLEANFILES = $(doc_DATA)
>
> --
> 2.1.4
>
___
xorg-devel@lists.x.org: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: http://lists.x.org/mailman/listinfo/xorg-devel

Re: [PATCH inputproto] specs: Set TZ=UTC before calling asciidoc

2015-12-11 Thread Andreas Boll
2015-12-11 10:20 GMT+01:00 Uli Schlachter :
> Am 10.12.2015 um 21:25 schrieb Andreas Boll:
>> Set TZ=UTC before calling asciidoc to make the embedded dates invariant
>> to timezones in order to make the package build reproducibly.
>>
>> Fixes bug:
>> https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=795981
>>
>> Suggested-by: Eduard Sanou 
>> Signed-off-by: Andreas Boll 
>> ---
>>  specs/Makefile.am | 2 +-
>>  1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/specs/Makefile.am b/specs/Makefile.am
>> index a83cf40..d04f4d0 100644
>> --- a/specs/Makefile.am
>> +++ b/specs/Makefile.am
>> @@ -6,7 +6,7 @@ doc_DATA = XI2proto.html XIproto.html
>>  dist_doc_DATA = XI2proto.txt XIproto.txt
>>
>>  %.html: %.txt
>> - $(AM_V_GEN)$(ASCIIDOC) -o $@ $<
>> + TZ=UTC $(AM_V_GEN)$(ASCIIDOC) -o $@ $<
>
> Shouldn't this be $(AM_V_GEN)TZ=UTC $(ASCIIDOC) -o $@ $
> $(AM_V_GEN) can evaluate to '@echo "  GEN" $@;' which would break the 
> build
> (make wouldn't see the @-prefix and your env var is only passed to echo)
>
Indeed, fixed in v2
We tested this only on verbose builds.

Thanks for the review,
Andreas


>>
>>  CLEANFILES = $(doc_DATA)
>>
>>
>
> Uli
> --
> A normal person is just someone you don't know well enough yet.
>  - Nettie Wiebe
___
xorg-devel@lists.x.org: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: http://lists.x.org/mailman/listinfo/xorg-devel

[PATCH inputproto] specs: Set TZ=UTC before calling asciidoc

2015-12-11 Thread Andreas Boll
Set TZ=UTC before calling asciidoc to make the embedded dates invariant
to timezones in order to make the package build reproducibly.

Fixes bug:
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=795981

v2: Set TZ=UTC after $(AM_V_GEN) (fixes non-verbose build)

Suggested-by: Eduard Sanou 
Signed-off-by: Andreas Boll 
---
 specs/Makefile.am | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/specs/Makefile.am b/specs/Makefile.am
index a83cf40..f2454bc 100644
--- a/specs/Makefile.am
+++ b/specs/Makefile.am
@@ -6,7 +6,7 @@ doc_DATA = XI2proto.html XIproto.html
 dist_doc_DATA = XI2proto.txt XIproto.txt
 
 %.html: %.txt
-   $(AM_V_GEN)$(ASCIIDOC) -o $@ $<
+   $(AM_V_GEN)TZ=UTC $(ASCIIDOC) -o $@ $<
 
 CLEANFILES = $(doc_DATA)
 
-- 
2.1.4

___
xorg-devel@lists.x.org: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: http://lists.x.org/mailman/listinfo/xorg-devel

Re: [PATCH inputproto] specs: Set TZ=UTC before calling asciidoc

2015-12-11 Thread Uli Schlachter
Am 10.12.2015 um 21:25 schrieb Andreas Boll:
> Set TZ=UTC before calling asciidoc to make the embedded dates invariant
> to timezones in order to make the package build reproducibly.
> 
> Fixes bug:
> https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=795981
> 
> Suggested-by: Eduard Sanou 
> Signed-off-by: Andreas Boll 
> ---
>  specs/Makefile.am | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/specs/Makefile.am b/specs/Makefile.am
> index a83cf40..d04f4d0 100644
> --- a/specs/Makefile.am
> +++ b/specs/Makefile.am
> @@ -6,7 +6,7 @@ doc_DATA = XI2proto.html XIproto.html
>  dist_doc_DATA = XI2proto.txt XIproto.txt
>  
>  %.html: %.txt
> - $(AM_V_GEN)$(ASCIIDOC) -o $@ $<
> + TZ=UTC $(AM_V_GEN)$(ASCIIDOC) -o $@ $<

Shouldn't this be $(AM_V_GEN)TZ=UTC $(ASCIIDOC) -o $@ $  
>  CLEANFILES = $(doc_DATA)
>  
> 

Uli
-- 
A normal person is just someone you don't know well enough yet.
 - Nettie Wiebe
___
xorg-devel@lists.x.org: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: http://lists.x.org/mailman/listinfo/xorg-devel

[PATCH inputproto] specs: Set TZ=UTC before calling asciidoc

2015-12-10 Thread Andreas Boll
Set TZ=UTC before calling asciidoc to make the embedded dates invariant
to timezones in order to make the package build reproducibly.

Fixes bug:
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=795981

Suggested-by: Eduard Sanou 
Signed-off-by: Andreas Boll 
---
 specs/Makefile.am | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/specs/Makefile.am b/specs/Makefile.am
index a83cf40..d04f4d0 100644
--- a/specs/Makefile.am
+++ b/specs/Makefile.am
@@ -6,7 +6,7 @@ doc_DATA = XI2proto.html XIproto.html
 dist_doc_DATA = XI2proto.txt XIproto.txt
 
 %.html: %.txt
-   $(AM_V_GEN)$(ASCIIDOC) -o $@ $<
+   TZ=UTC $(AM_V_GEN)$(ASCIIDOC) -o $@ $<
 
 CLEANFILES = $(doc_DATA)
 
-- 
2.1.4

___
xorg-devel@lists.x.org: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: http://lists.x.org/mailman/listinfo/xorg-devel