Skip Menu |

This queue is for tickets about the Marpa-R2 CPAN distribution.

Report information
The Basics
Id: 115614
Status: resolved
Priority: 0/
Queue: Marpa-R2

People
Owner: jkegl [...] cpan.org
Requestors: INTRIGERI [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



From: intrigeri [...] boum.org
Subject: [PATCH] Honour SOURCE_DATE_EPOCH for embedded timestamp, if it is set
In Debian we are currently applying the following patch to Marpa-R2. We thought you might be interested in it too. Author: Reiner Herrmann <reiner@reiner-h.de> Description: Honour SOURCE_DATE_EPOCH for embedded timestamp, if it is set The patch is tracked in our Git repository at https://anonscm.debian.org/cgit/pkg-perl/packages/libmarpa-r2-perl.git/plain/debian/patches/reproducible_build.patch It implements the SOURCE_DATE_EPOCH specification: https://reproducible-builds.org/specs/source-date-epoch/ ... which was created as part of the reproducible builds effort. Thanks for considering, intrigeri, Debian Perl Group
Here's the patch.

Message body is not shown because sender requested not to inline it.

Subject: Re: [rt.cpan.org #115614] AutoReply: [PATCH] Honour SOURCE_DATE_EPOCH for embedded timestamp, if it is set
Date: Sun, 26 Jun 2016 20:38:39 +0200
To: bug-Marpa-R2 [...] rt.cpan.org
From: intrigeri <intrigeri [...] boum.org>
Wait, we found an issue with the patch and are working on an improved one. Sorry for the noise!
Subject: Re: [rt.cpan.org #115614] AutoReply: [PATCH] Honour SOURCE_DATE_EPOCH for embedded timestamp, if it is set
Date: Sun, 26 Jun 2016 11:40:46 -0700
To: bug-Marpa-R2 [...] rt.cpan.org
From: Jeffrey Kegler <jeffreykegler [...] jeffreykegler.com>
No problem. I welcome the patches and look forward to the improved one. On Sun, Jun 26, 2016 at 11:39 AM, intrigeri via RT <bug-Marpa-R2@rt.cpan.org Show quoted text
> wrote:
Show quoted text
> Queue: Marpa-R2 > Ticket <URL: https://rt.cpan.org/Ticket/Display.html?id=115614 > > > Wait, we found an issue with the patch and are working on an improved one. > Sorry for the noise! > >
On Sun Jun 26 14:47:41 2016, jeffreykegler@jeffreykegler.com wrote: Show quoted text
> No problem. I welcome the patches and look forward to the improved one.
Here it is. This one has been tested both with SOURCE_DATE_EPOCH set and unset.
Subject: reproducible_build.patch
Author: Reiner Herrmann <reiner@reiner-h.de> Description: Honour SOURCE_DATE_EPOCH for embedded timestamp When the environment variable SOURCE_DATE_EPOCH is set, use it instead of the current time for the embedded build timestamp. . The specification of SOURCE_DATE_EPOCH is available here: https://reproducible-builds.org/specs/source-date-epoch/ . In the case it is not defined, fall back to current time in UTC. Forwarded: https://rt.cpan.org/Ticket/Display.html?id=115614 Bug: https://rt.cpan.org/Ticket/Display.html?id=115614 --- a/inc/Marpa/R2/Build_Me.pm +++ b/inc/Marpa/R2/Build_Me.pm @@ -83,7 +83,7 @@ ##no critic(ValuesAndExpressions::RequireInterpolationOfMetachars) $text .= q{use vars qw($TIMESTAMP)} . qq{;\n}; - $text .= q{$TIMESTAMP='} . localtime()->datetime . qq{';\n}; + $text .= q{$TIMESTAMP='} . (gmtime($ENV{SOURCE_DATE_EPOCH} || time()))->datetime . qq{';\n}; ##use critic for my $package (@use_packages) { @@ -104,7 +104,7 @@ ##no critic(ValuesAndExpressions::RequireInterpolationOfMetachars) $text .= q{use vars qw($TIMESTAMP)} . qq{;\n}; - $text .= q{$TIMESTAMP='} . localtime()->datetime . qq{';\n}; + $text .= q{$TIMESTAMP='} . (gmtime($ENV{SOURCE_DATE_EPOCH} || time()))->datetime . qq{';\n}; ##use critic for my $package (@use_packages) {
Subject: Re: [rt.cpan.org #115614] [PATCH] Honour SOURCE_DATE_EPOCH for embedded timestamp, if it is set
Date: Sat, 16 Jul 2016 18:07:32 -0700
To: bug-Marpa-R2 [...] rt.cpan.org
From: Jeffrey Kegler <jeffreykegler [...] jeffreykegler.com>
Thanks! It won't get done in Marpa::R2, but I've created a Marpa::R3 ticket on Github where refers to the Debian ticket: https://github.com/jeffreykegler/Marpa--R3/issues/37 On Mon, Jun 27, 2016 at 1:49 AM, intrigeri via RT <bug-Marpa-R2@rt.cpan.org> wrote: Show quoted text
> Queue: Marpa-R2 > Ticket <URL: https://rt.cpan.org/Ticket/Display.html?id=115614 > > > On Sun Jun 26 14:47:41 2016, jeffreykegler@jeffreykegler.com wrote:
> > No problem. I welcome the patches and look forward to the improved one.
> > Here it is. This one has been tested both with SOURCE_DATE_EPOCH set and > unset. >
From: jkegl [...] cpan.org
I'm closing this in Marpa::R2 for the reason given below. As I said, I've created a Github issue for it in Marpa::R3. On Sat Jul 16 21:07:47 2016, jeffreykegler@jeffreykegler.com wrote: Show quoted text
> Thanks! It won't get done in Marpa::R2, but I've created a Marpa::R3 > ticket on Github where refers to the Debian ticket: > https://github.com/jeffreykegler/Marpa--R3/issues/37 > > On Mon, Jun 27, 2016 at 1:49 AM, intrigeri via RT <bug-Marpa-R2@rt.cpan.org> > wrote: >
> > Queue: Marpa-R2 > > Ticket <URL: https://rt.cpan.org/Ticket/Display.html?id=115614 > > > > > On Sun Jun 26 14:47:41 2016, jeffreykegler@jeffreykegler.com wrote:
> > > No problem. I welcome the patches and look forward to the improved one.
> > > > Here it is. This one has been tested both with SOURCE_DATE_EPOCH set and > > unset. > >
RT-Send-CC: intrigeri [...] boum.org, jeffreykegler [...] jeffreykegler.com
Moved to Marpa::R3. Will not fix in Marpa::R2, so closing. A little more detail is in the history. Thanks!