968045">

Debian Bug report logs - #968045
golang-gonum-v1-plot: please make the build reproducible

version graph

Package: src:golang-gonum-v1-plot; Maintainer for src:golang-gonum-v1-plot is Debian Go Packaging Team <team+pkg-go@tracker.debian.org>;

Reported by: "Chris Lamb" <lamby@debian.org>

Date: Fri, 7 Aug 2020 11:09:01 UTC

Severity: wishlist

Tags: patch

Found in version golang-gonum-v1-plot/0.7.0-2

Fixed in version golang-gonum-v1-plot/0.7.0-5

Done: Nilesh Patra <nilesh@debian.org>

Bug is archived. No further changes may be made.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to debian-bugs-dist@lists.debian.org, reproducible-bugs@lists.alioth.debian.org, Debian Go Packaging Team <team+pkg-go@tracker.debian.org>:
Bug#968045; Package src:golang-gonum-v1-plot. (Fri, 07 Aug 2020 11:09:03 GMT) (full text, mbox, link).


Acknowledgement sent to "Chris Lamb" <lamby@debian.org>:
New Bug report received and forwarded. Copy sent to reproducible-bugs@lists.alioth.debian.org, Debian Go Packaging Team <team+pkg-go@tracker.debian.org>. (Fri, 07 Aug 2020 11:09:03 GMT) (full text, mbox, link).


Message #5 received at submit@bugs.debian.org (full text, mbox, wrote: > Source: golang-gonum-v1-plot > Version: 0.7.0-2 > Severity: wishlist > Tags: patch > User: reproducible-builds@lists.alioth.debian.org > Usertags: timestamps > X-Debbugs-Cc: reproducible-bugs@lists.alioth.debian.org > > Hi, > > Whilst working on the Reproducible Builds effort [0] we noticed that > golang-gonum-v1-plot could not be built reproducibly. > > This is because it ships generated test data, including PDFs with > timestamps in them. > > I don't think they are needed in the package, so a patch is attached > that utilises DH_GOLANG_EXCLUDES to not install them. > > [0] https://reproducible-builds.org/ > > > Regards, > > -- > ,''`. > : :' : Chris Lamb > `. `'` lamby@debian.org / chris-lamb.co.uk > `-&subject=Re: golang-gonum-v1-plot: please make the build reproducible&References=<159679823672.25153.17401501116107707915@694d69abdc95>">reply):

From: "Chris Lamb" <lamby@debian.org>
To: submit@bugs.debian.org
Subject: golang-gonum-v1-plot: please make the build reproducible
Date: Fri, 07 Aug 2020 12:05:04 +0100
[Message part 1 (text/plain, inline)]
Source: golang-gonum-v1-plot
Version: 0.7.0-2
Severity: wishlist
Tags: patch
User: reproducible-builds@lists.alioth.debian.org
Usertags: timestamps
X-Debbugs-Cc: reproducible-bugs@lists.alioth.debian.org

Hi,

Whilst working on the Reproducible Builds effort [0] we noticed that
golang-gonum-v1-plot could not be built reproducibly.

This is because it ships generated test data, including PDFs with
timestamps in them.

I don't think they are needed in the package, so a patch is attached
that utilises DH_GOLANG_EXCLUDES to not install them.

 [0] https://reproducible-builds.org/


Regards,

--
      ,''`.
     : :'  :     Chris Lamb
     `. `'`      lamby@debian.org / chris-lamb.co.uk
       `-
[golang-gonum-v1-plot.diff.txt (text/plain, attachment)]

Information forwarded to debian-bugs-dist@lists.debian.org, Debian Go Packaging Team <team+pkg-go@tracker.debian.org>:
Bug#968045; Package src:golang-gonum-v1-plot. (Fri, 06 Nov 2020 09:21:02 GMT) (full text, mbox, link).


Acknowledgement sent to "Chris Lamb" <lamby@debian.org>:
Extra info received and forwarded to list. Copy sent to Debian Go Packaging Team <team+pkg-go@tracker.debian.org>. (Fri, 06 Nov 2020 09:21:02 GMT) (full text, mbox, link).


Message #10 received at 968045@bugs.debian.org (full text, mbox, wrote: > Chris Lamb wrote: > > > Source: golang-gonum-v1-plot > > Version: 0.7.0-2 > > Tags: patch > > Gentle ping on the above? > > > Regards, > > -- > ,''`. > : :' : Chris Lamb > `. `'` lamby@debian.org / chris-lamb.co.uk > `- > > &In-Reply-To=<160465295657.1331316.590814166826174703@tinycat.chris-lamb.co.uk>">reply):

From: "Chris Lamb" <lamby@debian.org>
To: 968045@bugs.debian.org, reproducible-bugs@lists.alioth.debian.org
Subject: Re: Bug#968045: golang-gonum-v1-plot: please make the build reproducible
Date: Fri, 06 Nov 2020 09:18:34 +0000
Chris Lamb wrote:

> Source: golang-gonum-v1-plot
> Version: 0.7.0-2
> Tags: patch

Gentle ping on the above?


Regards,

-- 
      ,''`.
     : :'  :     Chris Lamb
     `. `'`      lamby@debian.org / chris-lamb.co.uk
       `-



Information forwarded to debian-bugs-dist@lists.debian.org, Debian Go Packaging Team <team+pkg-go@tracker.debian.org>:
Bug#968045; Package src:golang-gonum-v1-plot. (Tue, 10 Nov 2020 07:45:03 GMT) (full text, mbox, link).


Acknowledgement sent to Nilesh <npatra974@gmail.com>:
Extra info received and forwarded to list. Copy sent to Debian Go Packaging Team <team+pkg-go@tracker.debian.org>. (Tue, 10 Nov 2020 07:45:03 GMT) (full text, mbox, link).


Message #15 received at 968045@bugs.debian.org (full text, mbox, wrote: > > Chris Lamb wrote: > > > > > Source: golang-gonum-v1-plot > > > Version: 0.7.0-2 > > > Tags: patch > > > > Gentle ping on the above? > > > > Thanks a lot for the patch, and extremely sorry for not being able to > apply earlier. > I've applied this patch on the corresponding salsa repository - this > package's migration to testing is stuck due to one of its dependencies > going FTBFS on arm64. I intend to fix the chain and also upload > golang-gonum-v1-plot with > the reproducible bug fix in the next few days. > > Thank you for your effort on reproducible builds! > > Nilesh > > > &In-Reply-To=<1a404dd4-b086-0230-6fac-0029de5e4e66@gmail.com>&References=<160465295657.1331316.590814166826174703@tinycat.chris-lamb.co.uk> <160465295657.1331316.590814166826174703@tinycat.chris-lamb.co.uk> <1a404dd4-b086-0230-6fac-0029de5e4e66@gmail.com>">reply):

From: Nilesh <npatra974@gmail.com>
To: 968045@bugs.debian.org
Subject: Re: Bug#968045: golang-gonum-v1-plot: please make the build reproducible
Date: Tue, 10 Nov 2020 13:10:54 +0530
Hi Chris,

On Fri, 06 Nov 2020 09:18:34 +0000 "Chris Lamb" <lamby@debian.org> wrote:
> Chris Lamb wrote:
>
> > Source: golang-gonum-v1-plot
> > Version: 0.7.0-2
> > Tags: patch
>
> Gentle ping on the above?
>

Thanks a lot for the patch, and extremely sorry for not being able to
apply earlier.
I've applied this patch on the corresponding salsa repository - this
package's migration to testing is stuck due to one of its dependencies
going FTBFS on arm64. I intend to fix the chain and also upload
golang-gonum-v1-plot with
the reproducible bug fix in the next few days.

Thank you for your effort on reproducible builds!

Nilesh




Information forwarded to debian-bugs-dist@lists.debian.org, Debian Go Packaging Team <team+pkg-go@tracker.debian.org>:
Bug#968045; Package src:golang-gonum-v1-plot. (Mon, 30 Nov 2020 14:33:02 GMT) (full text, mbox, link).


Acknowledgement sent to Nilesh Patra <npatra974@gmail.com>:
Extra info received and forwarded to list. Copy sent to Debian Go Packaging Team <team+pkg-go@tracker.debian.org>. (Mon, 30 Nov 2020 14:33:02 GMT) (full text, mbox, link).


Message #20 received at 968045@bugs.debian.org (full text, mbox, wrote: > > Chris Lamb wrote: > > > > > Source: golang-gonum-v1-plot > > > Version: 0.7.0-2 > > > Tags: patch > > > > Gentle ping on the above? > > > > Thanks again, but unfortunately this patch breaks the autopkgtests :/ > The only way to make it reproducible and allow testing migration would > be to disable the tests. > > What do you think would be better? Please let me know. > The tests currently are the default autodep8 ones - autopkgtest-pkg-go > > Best Regards, > Nilesh > > &In-Reply-To=<627c8716-8875-7026-cdc3-62725acfdbe5@gmail.com>&References=<160465295657.1331316.590814166826174703@tinycat.chris-lamb.co.uk> <160465295657.1331316.590814166826174703@tinycat.chris-lamb.co.uk> <627c8716-8875-7026-cdc3-62725acfdbe5@gmail.com>">reply):

From: Nilesh Patra <npatra974@gmail.com>
To: 968045@bugs.debian.org
Subject: Re: Bug#968045: golang-gonum-v1-plot: please make the build reproducible
Date: Mon, 30 Nov 2020 19:58:10 +0530
Hi again,

On Fri, 06 Nov 2020 09:18:34 +0000 "Chris Lamb" <lamby@debian.org> wrote:
> Chris Lamb wrote:
>
> > Source: golang-gonum-v1-plot
> > Version: 0.7.0-2
> > Tags: patch
>
> Gentle ping on the above?
>

Thanks again, but unfortunately this patch breaks the autopkgtests :/
The only way to make it reproducible and allow testing migration would
be to disable the tests.

What do you think would be better? Please let me know.
The tests currently are the default autodep8 ones - autopkgtest-pkg-go

Best Regards,
Nilesh



Information forwarded to debian-bugs-dist@lists.debian.org, Debian Go Packaging Team <team+pkg-go@tracker.debian.org>:
Bug#968045; Package src:golang-gonum-v1-plot. (Mon, 01 Mar 2021 13:12:02 GMT) (full text, mbox, link).


Acknowledgement sent to "Chris Lamb" <lamby@debian.org>:
Extra info received and forwarded to list. Copy sent to Debian Go Packaging Team <team+pkg-go@tracker.debian.org>. (Mon, 01 Mar 2021 13:12:02 GMT) (full text, mbox, link).


Message #25 received at 968045@bugs.debian.org (full text, mbox, wrote: > Hi Nilesh, > > (Just to say that I did not see your two emails until now; the bug > submitter does not automatically receive emails sent directly to the > bug email address — one should either CC them directly or use the > 968045-submitter@ alias too.) > > > Thanks again, but unfortunately this patch breaks the autopkgtests :/ > > The only way to make it reproducible and allow testing migration would > > be to disable the tests. > > As I understand the problem: > > * The data underneath /testdata/ has non-deterministic data (PDFs) > > * The patch prevents /testdata/ from being installed in the binary > package. > > * The autopkgtests fail as they require this test data. > > > What do you think would be better? Please let me know. > > Interesting choice of trade-off. Would it be possible for the > autopkgtests to build the test data at "autopkgtest time"? > > Alternatively, do we need these PDFs? We could ship the testdata > directory but not ship the .pdf files? > > The other, nicer solution could be to patch fpdf to use the > SOURCE_DATE_EPOCH environment variable if it exists. This would seem > quite straightforward to do, actually -- this is fpdf.go from the > "golang-github-jung-kurt-gofpdf" source package: > > // returns Now() if tm is zero > func timeOrNow(tm time.Time) time.Time { > if tm.IsZero() { > return time.Now() > } > return tm > } > > > Regards, > > -- > ,''`. > : :' : Chris Lamb > `. `'` lamby@debian.org / chris-lamb.co.uk > `- > > &subject=Re: golang-gonum-v1-plot: please make the build reproducible&References=<161460224767.4122115.8633126294244221500@tinycat.chris-lamb.co.uk>">reply):

From: "Chris Lamb" <lamby@debian.org>
To: 968045@bugs.debian.org, reproducible-bugs@lists.alioth.debian.org
Subject: Re: golang-gonum-v1-plot: please make the build reproducible
Date: Mon, 01 Mar 2021 13:08:03 -0000
Hi Nilesh,

(Just to say that I did not see your two emails until now; the bug
submitter does not automatically receive emails sent directly to the
bug email address — one should either CC them directly or use the
968045-submitter@ alias too.)

> Thanks again, but unfortunately this patch breaks the autopkgtests :/
> The only way to make it reproducible and allow testing migration would
> be to disable the tests.

As I understand the problem:

* The data underneath /testdata/ has non-deterministic data (PDFs)

* The patch prevents /testdata/ from being installed in the binary
  package.

* The autopkgtests fail as they require this test data.

> What do you think would be better? Please let me know.

Interesting choice of trade-off. Would it be possible for the
autopkgtests to build the test data at "autopkgtest time"?

Alternatively, do we need these PDFs? We could ship the testdata
directory but not ship the .pdf files?

The other, nicer solution could be to patch fpdf to use the
SOURCE_DATE_EPOCH environment variable if it exists. This would seem
quite straightforward to do, actually -- this is fpdf.go from the
"golang-github-jung-kurt-gofpdf" source package:

  // returns Now() if tm is zero
  func timeOrNow(tm time.Time) time.Time {
    if tm.IsZero() {
      return time.Now()
    }
    return tm
  }


Regards,

--
      ,''`.
     : :'  :     Chris Lamb
     `. `'`      lamby@debian.org / chris-lamb.co.uk
       `-



Information forwarded to debian-bugs-dist@lists.debian.org, Debian Go Packaging Team <team+pkg-go@tracker.debian.org>:
Bug#968045; Package src:golang-gonum-v1-plot. (Tue, 06 Jul 2021 14:33:03 GMT) (full text, mbox, link).


Acknowledgement sent to Nilesh Patra <nilesh@debian.org>:
Extra info received and forwarded to list. Copy sent to Debian Go Packaging Team <team+pkg-go@tracker.debian.org>. (Tue, 06 Jul 2021 14:33:03 GMT) (full text, mbox, link).


Message #30 received at 968045@bugs.debian.org (full text, mbox, wrote: > > Hi Nilesh, > > > > (Just to say that I did not see your two emails until now; the bug > > submitter does not automatically receive emails sent directly to the > > bug email address — one should either CC them directly or use the > > 968045-submitter@ alias too.) > > CC'ed you this time, and apologies for not having seen these emails till > now, I did not receive this either :) > > > > Thanks again, but unfortunately this patch breaks the autopkgtests :/ > > > The only way to make it reproducible and allow testing migration would > > > be to disable the tests. > > > > As I understand the problem: > > > > * The data underneath /testdata/ has non-deterministic data (PDFs) > > > > * The patch prevents /testdata/ from being installed in the binary > > package. > > > > * The autopkgtests fail as they require this test data. > > Yes, that is exactly what is happening > > > > What do you think would be better? Please let me know. > > > > Interesting choice of trade-off. Would it be possible for the > > autopkgtests to build the test data at "autopkgtest time"? > > Probably, however this will need a few workarounds > Autopkgtests are triggered with the default autodep8 thing for > dh-make-golang, > So this will likely need a script followed by the normal autopkgtesting stuff > > > Alternatively, do we need these PDFs? We could ship the testdata > > directory but not ship the .pdf files? > > Probably not. > The build time tests are run as autopkgtests as well, so if you remove > these tests, or patch these out, the effect will be same on both. > One of the things I'm not very fond of about the golang system :) > > Several packages keep on shipping these data just for testing purposes > -- nothing wrong, but lack of choice for customisation > > > The other, nicer solution could be to patch fpdf to use the > > SOURCE_DATE_EPOCH environment variable if it exists. This would seem > > quite straightforward to do, actually -- this is fpdf.go from the > > "golang-github-jung-kurt-gofpdf" source package: > > > > // returns Now() if tm is zero > > func timeOrNow(tm time.Time) time.Time { > > if tm.IsZero() { > > return time.Now() > > } > > return tm &In-Reply-To=">reply):

From: Nilesh Patra <nilesh@debian.org>
To: 968045@bugs.debian.org
Cc: Chris Lamb <lamby@debian.org>
Subject: Re: golang-gonum-v1-plot: please make the build reproducible
Date: Tue, 6 Jul 2021 19:59:58 +0530
[Message part 1 (text/plain, inline)]
Hi Chris,

On Mon, 01 Mar 2021 13:08:03 -0000 "Chris Lamb" <lamby@debian.org> wrote:
> Hi Nilesh,
> 
> (Just to say that I did not see your two emails until now; the bug
> submitter does not automatically receive emails sent directly to the
> bug email address — one should either CC them directly or use the
> 968045-submitter@ alias too.)

CC'ed you this time, and apologies for not having seen these emails till
now, I did not receive this either :)

> > Thanks again, but unfortunately this patch breaks the autopkgtests :/
> > The only way to make it reproducible and allow testing migration would
> > be to disable the tests.
> 
> As I understand the problem:
> 
> * The data underneath /testdata/ has non-deterministic data (PDFs)
> 
> * The patch prevents /testdata/ from being installed in the binary
>   package.
> 
> * The autopkgtests fail as they require this test data.

Yes, that is exactly what is happening

> > What do you think would be better? Please let me know.
> 
> Interesting choice of trade-off. Would it be possible for the
> autopkgtests to build the test data at "autopkgtest time"?

Probably, however this will need a few workarounds
Autopkgtests are triggered with the default autodep8 thing for
dh-make-golang,
So this will likely need a script followed by the normal autopkgtesting stuff

> Alternatively, do we need these PDFs? We could ship the testdata
> directory but not ship the .pdf files?

Probably not.
The build time tests are run as autopkgtests as well, so if you remove
these tests, or patch these out, the effect will be same on both.
One of the things I'm not very fond of about the golang system :)

Several packages keep on shipping these data just for testing purposes
-- nothing wrong, but lack of choice for customisation

> The other, nicer solution could be to patch fpdf to use the
> SOURCE_DATE_EPOCH environment variable if it exists. This would seem
> quite straightforward to do, actually -- this is fpdf.go from the
> "golang-github-jung-kurt-gofpdf" source package:
> 
>   // returns Now() if tm is zero
>   func timeOrNow(tm time.Time) time.Time {
>     if tm.IsZero() {
>       return time.Now()
>     }
>     return tm
>   }

Indeed, I'll give this a shot, and see how this goes, thanks for
pointing this out!

Nilesh
[signature.asc (application/pgp-signature, inline)]

Information forwarded to debian-bugs-dist@lists.debian.org, Debian Go Packaging Team <team+pkg-go@tracker.debian.org>:
Bug#968045; Package src:golang-gonum-v1-plot. (Thu, 08 Dec 2022 19:21:05 GMT) (full text, mbox, link).


Acknowledgement sent to Vagrant Cascadian <vagrant@reproducible-builds.org>:
Extra info received and forwarded to list. Copy sent to Debian Go Packaging Team <team+pkg-go@tracker.debian.org>. (Thu, 08 Dec 2022 19:21:05 GMT) (full text, mbox, link).


Message #35 received at 968045@bugs.debian.org (full text, mbox, wrote: > >> > Thanks again, but unfortunately this patch breaks the autopkgtests :/ > >> > The only way to make it reproducible and allow testing migration would > >> > be to disable the tests. > >> > >> As I understand the problem: > >> > >> * The data underneath /testdata/ has non-deterministic data (PDFs) > >> > >> * The patch prevents /testdata/ from being installed in the binary > >> package. > >> > >> * The autopkgtests fail as they require this test data. > > > > Yes, that is exactly what is happening > > > >> > What do you think would be better? Please let me know. > >> > >> Interesting choice of trade-off. Would it be possible for the > >> autopkgtests to build the test data at "autopkgtest time"? > > > > Probably, however this will need a few workarounds > > Autopkgtests are triggered with the default autodep8 thing for > > dh-make-golang, > > So this will likely need a script followed by the normal autopkgtesting stuff > > > > >> Alternatively, do we need these PDFs? We could ship the testdata > >> directory but not ship the .pdf files? > > > > Probably not. > > The build time tests are run as autopkgtests as well, so if you remove > > these tests, or patch these out, the effect will be same on both. > > One of the things I'm not very fond of about the golang system :) > > > > Several packages keep on shipping these data just for testing purposes > > -- nothing wrong, but lack of choice for customisation > > > >> The other, nicer solution could be to patch fpdf to use the > >> SOURCE_DATE_EPOCH environment variable if it exists. This would seem > >> quite straightforward to do, actually -- this is fpdf.go from the > >> "golang-github-jung-kurt-gofpdf" source package: > >> > >> // returns Now() if tm is zero > >> func timeOrNow(tm time.Time) time.Time { > >> if tm.IsZero() { > >> return time.Now() > >> } > >> return tm > >> } > > > > Indeed, I'll give this a shot, and see how this goes, thanks for > > pointing this out! > > I am guessing that did not turn out to be as easy as hoped? > > I have tested an alternate patch patch which works around the issue by > removing only the files that embed timestamps from the testdata > directory. &In-Reply-To=<874ju5n1pb.fsf@contorta>&References=<161460224767.4122115.8633126294244221500@tinycat.chris-lamb.co.uk> <159679823672.25153.17401501116107707915@694d69abdc95> <874ju5n1pb.fsf@contorta>">reply):

From: Vagrant Cascadian <vagrant@reproducible-builds.org>
To: Nilesh Patra <nilesh@debian.org>, 968045@bugs.debian.org
Cc: Chris Lamb <lamby@debian.org>
Subject: Re: Bug#968045: golang-gonum-v1-plot: please make the build reproducible
Date: Thu, 08 Dec 2022 11:18:56 -0800
[Message part 1 (text/plain, inline)]
On 2021-07-06, Nilesh Patra wrote:
> On Mon, 01 Mar 2021 13:08:03 -0000 "Chris Lamb" <lamby@debian.org> wrote:
>> > Thanks again, but unfortunately this patch breaks the autopkgtests :/
>> > The only way to make it reproducible and allow testing migration would
>> > be to disable the tests.
>> 
>> As I understand the problem:
>> 
>> * The data underneath /testdata/ has non-deterministic data (PDFs)
>> 
>> * The patch prevents /testdata/ from being installed in the binary
>>   package.
>> 
>> * The autopkgtests fail as they require this test data.
>
> Yes, that is exactly what is happening
>
>> > What do you think would be better? Please let me know.
>> 
>> Interesting choice of trade-off. Would it be possible for the
>> autopkgtests to build the test data at "autopkgtest time"?
>
> Probably, however this will need a few workarounds
> Autopkgtests are triggered with the default autodep8 thing for
> dh-make-golang,
> So this will likely need a script followed by the normal autopkgtesting stuff
>

>> Alternatively, do we need these PDFs? We could ship the testdata
>> directory but not ship the .pdf files?
>
> Probably not.
> The build time tests are run as autopkgtests as well, so if you remove
> these tests, or patch these out, the effect will be same on both.
> One of the things I'm not very fond of about the golang system :)
>
> Several packages keep on shipping these data just for testing purposes
> -- nothing wrong, but lack of choice for customisation
>
>> The other, nicer solution could be to patch fpdf to use the
>> SOURCE_DATE_EPOCH environment variable if it exists. This would seem
>> quite straightforward to do, actually -- this is fpdf.go from the
>> "golang-github-jung-kurt-gofpdf" source package:
>> 
>>   // returns Now() if tm is zero
>>   func timeOrNow(tm time.Time) time.Time {
>>     if tm.IsZero() {
>>       return time.Now()
>>     }
>>     return tm
>>   }
>
> Indeed, I'll give this a shot, and see how this goes, thanks for
> pointing this out!

I am guessing that did not turn out to be as easy as hoped?

I have tested an alternate patch patch which works around the issue by
removing only the files that embed timestamps from the testdata
directory.

I am not sure if removing these files will affect autopkgtest or not,
but it is worth a try!


live well,
  vagrant
[0001-Remove-.pdf-and-.eps-files-that-embed-timestamps.patch (text/x-diff, inline)]
From 6265aebc1c16999233704c2938fca3e2c09fa461 Mon Sep 17 00:00:00 2001
From: Vagrant Cascadian <vagrant@debian.org>
Date: Thu, 8 Dec 2022 19:10:56 +0000
Subject: [PATCH] Remove .pdf and .eps files that embed timestamps (Closes:
 #968045)

https://reproducible-builds.org/docs/timestamps/
---
 debian/rules | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/debian/rules b/debian/rules
index 65710b2..37ded0d 100755
--- a/debian/rules
+++ b/debian/rules
@@ -9,3 +9,11 @@ override_dh_auto_test:
 	-dh_auto_test
 endif
 
+override_dh_install:
+	dh_install
+	# Remove files that embed timestamps, breaking reproducible builds
+	rm -vf debian/golang-gonum-v1-plot-dev/usr/share/gocode/src/gonum.org/v1/plot/vg/vgpdf/testdata/multipage.pdf \
+	    debian/golang-gonum-v1-plot-dev/usr/share/gocode/src/gonum.org/v1/plot/vg/vgpdf/testdata/issue540.pdf \
+	    debian/golang-gonum-v1-plot-dev/usr/share/gocode/src/gonum.org/v1/plot/vg/vgpdf/testdata/arc.pdf \
+	    debian/golang-gonum-v1-plot-dev/usr/share/gocode/src/gonum.org/v1/plot/plotter/testdata/polygon_holes.pdf \
+	    debian/golang-gonum-v1-plot-dev/usr/share/gocode/src/gonum.org/v1/plot/plotter/testdata/polygon_holes.eps \
-- 
2.38.1

[signature.asc (application/pgp-signature, inline)]

Information forwarded to debian-bugs-dist@lists.debian.org, Debian Go Packaging Team <team+pkg-go@tracker.debian.org>:
Bug#968045; Package src:golang-gonum-v1-plot. (Thu, 08 Dec 2022 20:12:04 GMT) (full text, mbox, link).


Acknowledgement sent to Vagrant Cascadian <vagrant@reproducible-builds.org>:
Extra info received and forwarded to list. Copy sent to Debian Go Packaging Team <team+pkg-go@tracker.debian.org>. (Thu, 08 Dec 2022 20:12:05 GMT) (full text, mbox, link).


Message #40 received at 968045@bugs.debian.org (full text, mbox, wrote: > >>> Alternatively, do we need these PDFs? We could ship the testdata > >>> directory but not ship the .pdf files? > >> > >> Probably not. > >> The build time tests are run as autopkgtests as well, so if you remove > >> these tests, or patch these out, the effect will be same on both. > >> One of the things I'm not very fond of about the golang system :) > >> > >> Several packages keep on shipping these data just for testing purposes > >> -- nothing wrong, but lack of choice for customisation > ... > > I have tested an alternate patch patch which works around the issue by > > removing only the files that embed timestamps from the testdata > > directory. > > > > I am not sure if removing these files will affect autopkgtest or not, > > but it is worth a try! > > I was unable to get the pipeline configured in debian/gitlab-ci.yml to > run, but I was able to use the default salsa-ci pipeline on a branch > with the patch applied, and it successfully passed autopkgtest: > > https://salsa.debian.org/vagrant/golang-gonum-v1-plot/-/jobs/3632639 > > Not sure what the differences are in the different pipelines... but that > seems promising as a workaround, at least? > > > live well, > vagrant &subject=Re: Bug#968045: golang-gonum-v1-plot: please make the build reproducible">reply):

From: Vagrant Cascadian <vagrant@reproducible-builds.org>
To: Nilesh Patra <nilesh@debian.org>, 968045@bugs.debian.org
Cc: Chris Lamb <lamby@debian.org>
Subject: Re: Bug#968045: golang-gonum-v1-plot: please make the build reproducible
Date: Thu, 08 Dec 2022 12:09:52 -0800
[Message part 1 (text/plain, inline)]
On 2022-12-08, Vagrant Cascadian wrote:
> On 2021-07-06, Nilesh Patra wrote:
>> On Mon, 01 Mar 2021 13:08:03 -0000 "Chris Lamb" <lamby@debian.org> wrote:
>>> Alternatively, do we need these PDFs? We could ship the testdata
>>> directory but not ship the .pdf files?
>>
>> Probably not.
>> The build time tests are run as autopkgtests as well, so if you remove
>> these tests, or patch these out, the effect will be same on both.
>> One of the things I'm not very fond of about the golang system :)
>>
>> Several packages keep on shipping these data just for testing purposes
>> -- nothing wrong, but lack of choice for customisation
...
> I have tested an alternate patch patch which works around the issue by
> removing only the files that embed timestamps from the testdata
> directory.
>
> I am not sure if removing these files will affect autopkgtest or not,
> but it is worth a try!

I was unable to get the pipeline configured in debian/gitlab-ci.yml to
run, but I was able to use the default salsa-ci pipeline on a branch
with the patch applied, and it successfully passed autopkgtest:

  https://salsa.debian.org/vagrant/golang-gonum-v1-plot/-/jobs/3632639

Not sure what the differences are in the different pipelines... but that
seems promising as a workaround, at least?


live well,
  vagrant
[signature.asc (application/pgp-signature, inline)]

Information forwarded to debian-bugs-dist@lists.debian.org, Debian Go Packaging Team <team+pkg-go@tracker.debian.org>:
Bug#968045; Package src:golang-gonum-v1-plot. (Fri, 09 Dec 2022 12:54:02 GMT) (full text, mbox, link).


Acknowledgement sent to Nilesh Patra <nilesh@debian.org>:
Extra info received and forwarded to list. Copy sent to Debian Go Packaging Team <team+pkg-go@tracker.debian.org>. (Fri, 09 Dec 2022 12:54:02 GMT) (full text, mbox, link).


Message #45 received at 968045@bugs.debian.org (full text, mbox, wrote: > > >> > Thanks again, but unfortunately this patch breaks the autopkgtests :/ > > >> > The only way to make it reproducible and allow testing migration would > > >> > be to disable the tests. > > >> > > >> As I understand the problem: > > >> > > >> * The data underneath /testdata/ has non-deterministic data (PDFs) > > >> > > >> * The patch prevents /testdata/ from being installed in the binary > > >> package. > > >> > > >> * The autopkgtests fail as they require this test data. > > > > > > Yes, that is exactly what is happening > > > > > >> > What do you think would be better? Please let me know. > > >> > > >> Interesting choice of trade-off. Would it be possible for the > > >> autopkgtests to build the test data at "autopkgtest time"? > > > > > > Probably, however this will need a few workarounds > > > Autopkgtests are triggered with the default autodep8 thing for > > > dh-make-golang, > > > So this will likely need a script followed by the normal autopkgtesting stuff > > > > > > > >> Alternatively, do we need these PDFs? We could ship the testdata > > >> directory but not ship the .pdf files? > > > > > > Probably not. > > > The build time tests are run as autopkgtests as well, so if you remove > > > these tests, or patch these out, the effect will be same on both. > > > One of the things I'm not very fond of about the golang system :) > > > > > > Several packages keep on shipping these data just for testing purposes > > > -- nothing wrong, but lack of choice for customisation > > > > > >> The other, nicer solution could be to patch fpdf to use the > > >> SOURCE_DATE_EPOCH environment variable if it exists. This would seem > > >> quite straightforward to do, actually -- this is fpdf.go from the > > >> "golang-github-jung-kurt-gofpdf" source package: > > >> > > >> // returns Now() if tm is zero > > >> func timeOrNow(tm time.Time) time.Time { > > >> if tm.IsZero() { > > >> return time.Now() > > >> } > > >> return tm > > >> } > > > > > > Indeed, I'll give this a shot, and see how this goes, thanks for > > > pointing this out! > > > > I am guessing that did not turn out to be as easy as hoped? > > Um, not exactly - I haven't had time for this, other packages had > higher priority and working on this bug report kept sinking down in &subject=Re: Bug#968045: golang-gonum-v1-plot: please make the build reproducible&In-Reply-To=<20221209125104.ppimhntwjyqcnqds@nileshpatra.info>">reply):

From: Nilesh Patra <nilesh@debian.org>
To: Vagrant Cascadian <vagrant@reproducible-builds.org>
Cc: 968045@bugs.debian.org, Chris Lamb <lamby@debian.org>
Subject: Re: Bug#968045: golang-gonum-v1-plot: please make the build reproducible
Date: Fri, 9 Dec 2022 18:21:04 +0530
[Message part 1 (text/plain, inline)]
On Thu, Dec 08, 2022 at 11:18:56AM -0800, Vagrant Cascadian wrote:
> On 2021-07-06, Nilesh Patra wrote:
> > On Mon, 01 Mar 2021 13:08:03 -0000 "Chris Lamb" <lamby@debian.org> wrote:
> >> > Thanks again, but unfortunately this patch breaks the autopkgtests :/
> >> > The only way to make it reproducible and allow testing migration would
> >> > be to disable the tests.
> >> 
> >> As I understand the problem:
> >> 
> >> * The data underneath /testdata/ has non-deterministic data (PDFs)
> >> 
> >> * The patch prevents /testdata/ from being installed in the binary
> >>   package.
> >> 
> >> * The autopkgtests fail as they require this test data.
> >
> > Yes, that is exactly what is happening
> >
> >> > What do you think would be better? Please let me know.
> >> 
> >> Interesting choice of trade-off. Would it be possible for the
> >> autopkgtests to build the test data at "autopkgtest time"?
> >
> > Probably, however this will need a few workarounds
> > Autopkgtests are triggered with the default autodep8 thing for
> > dh-make-golang,
> > So this will likely need a script followed by the normal autopkgtesting stuff
> >
> 
> >> Alternatively, do we need these PDFs? We could ship the testdata
> >> directory but not ship the .pdf files?
> >
> > Probably not.
> > The build time tests are run as autopkgtests as well, so if you remove
> > these tests, or patch these out, the effect will be same on both.
> > One of the things I'm not very fond of about the golang system :)
> >
> > Several packages keep on shipping these data just for testing purposes
> > -- nothing wrong, but lack of choice for customisation
> >
> >> The other, nicer solution could be to patch fpdf to use the
> >> SOURCE_DATE_EPOCH environment variable if it exists. This would seem
> >> quite straightforward to do, actually -- this is fpdf.go from the
> >> "golang-github-jung-kurt-gofpdf" source package:
> >> 
> >>   // returns Now() if tm is zero
> >>   func timeOrNow(tm time.Time) time.Time {
> >>     if tm.IsZero() {
> >>       return time.Now()
> >>     }
> >>     return tm
> >>   }
> >
> > Indeed, I'll give this a shot, and see how this goes, thanks for
> > pointing this out!
> 
> I am guessing that did not turn out to be as easy as hoped?

Um, not exactly - I haven't had time for this, other packages had
higher priority and working on this bug report kept sinking down in
my TODO list, to the point I forgot about this.

> I have tested an alternate patch patch which works around the issue by
> removing only the files that embed timestamps from the testdata
> directory.
> 
> I am not sure if removing these files will affect autopkgtest or not,
> but it is worth a try!

It works OK, I have uploaded the package with your patch. Thanks!

-- 
Best,
Nilesh
[signature.asc (application/pgp-signature, inline)]

Message sent on to "Chris Lamb" <lamby@debian.org>:
Bug#968045. (Fri, 09 Dec 2022 12:54:04 GMT) (full text, mbox, link).


Message #48 received at 968045-submitter@bugs.debian.org (full text, mbox, reply):

From: Nilesh Patra <noreply@salsa.debian.org>
To: 968045-submitter@bugs.debian.org
Subject: Bug#968045 marked as pending in golang-gonum-v1-plot
Date: Fri, 09 Dec 2022 12:51:38 +0000
Control: tag -1 pending

Hello,

Bug #968045 in golang-gonum-v1-plot reported by you has been fixed in the
Git repository and is awaiting an upload. You can see the commit
message below and you can check the diff of the fix at:

https://salsa.debian.org/go-team/packages/golang-gonum-v1-plot/-/commit/59d9e11d6b046ed7c719c72a132cbabc43ae1dcf

------------------------------------------------------------------------
Remove embedded timestamps (Closes: #968045)
------------------------------------------------------------------------

(this message was generated automatically)
-- 
Greetings

https://bugs.debian.org/968045



Added tag(s) pending. Request was from Nilesh Patra <noreply@salsa.debian.org> to 968045-submitter@bugs.debian.org. (Fri, 09 Dec 2022 12:54:04 GMT) (full text, mbox, link).


Reply sent to Nilesh Patra <nilesh@debian.org>:
You have taken responsibility. (Fri, 09 Dec 2022 13:09:03 GMT) (full text, mbox, link).


Notification sent to "Chris Lamb" <lamby@debian.org>:
Bug acknowledged by developer. (Fri, 09 Dec 2022 13:09:03 GMT) (full text, mbox, link).


Message #55 received at 968045-close@bugs.debian.org (full text, mbox, reply):

From: Debian FTP Masters <ftpmaster@ftp-master.debian.org>
To: 968045-close@bugs.debian.org
Subject: Bug#968045: fixed in golang-gonum-v1-plot 0.7.0-5
Date: Fri, 09 Dec 2022 13:06:11 +0000
Source: golang-gonum-v1-plot
Source-Version: 0.7.0-5
Done: Nilesh Patra <nilesh@debian.org>

We believe that the bug you reported is fixed in the latest version of
golang-gonum-v1-plot, which is due to be installed in the Debian FTP archive.

A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to 968045@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Nilesh Patra <nilesh@debian.org> (supplier of updated golang-gonum-v1-plot package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing ftpmaster@ftp-master.debian.org)


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

Format: 1.8
Date: Fri, 09 Dec 2022 18:15:07 +0530
Source: golang-gonum-v1-plot
Architecture: source
Version: 0.7.0-5
Distribution: unstable
Urgency: medium
Maintainer: Debian Go Packaging Team <team+pkg-go@tracker.debian.org>
Changed-By: Nilesh Patra <nilesh@debian.org>
Closes: 968045
Changes:
 golang-gonum-v1-plot (0.7.0-5) unstable; urgency=medium
 .
   * Remove embedded timestamps (Closes: #968045)
   * Bump Standards-Version to 4.6.1 (no changes needed)
Checksums-Sha1:
 782228d90576f914db44d8883b2d67d6eeeefc4d 1736 golang-gonum-v1-plot_0.7.0-5.dsc
 9c15baf8b2bb8863ad7a4b7dd41a3f477879e9c4 4948 golang-gonum-v1-plot_0.7.0-5.debian.tar.xz
 8ad564dad7b97e433273345f8ed2cecde8ab1e1a 5790 golang-gonum-v1-plot_0.7.0-5_amd64.buildinfo
Checksums-Sha256:
 e9bc0773aeb7cf871ac6fb938c67ec856ac939d857345d28c8716119ebba87c2 1736 golang-gonum-v1-plot_0.7.0-5.dsc
 8931abf1d43c5b1aac6af60c3cee83477b4a879f3dd2dd0116095c51b0675541 4948 golang-gonum-v1-plot_0.7.0-5.debian.tar.xz
 3878b827f6dbf51bcd4f2b945adc5b35924b1ce55ad6e84e1fde79138e2d36a5 5790 golang-gonum-v1-plot_0.7.0-5_amd64.buildinfo
Files:
 7f0327c3b6bf4b73f6367503bf2bbeb4 1736 devel optional golang-gonum-v1-plot_0.7.0-5.dsc
 b0a0b1d14b558e16628963135318e7ba 4948 devel optional golang-gonum-v1-plot_0.7.0-5.debian.tar.xz
 47ad3cd5497c6815797f8ffa6b4c490d 5790 devel optional golang-gonum-v1-plot_0.7.0-5_amd64.buildinfo

-----BEGIN PGP SIGNATURE-----

iHUEARYIAB0WIQSglbZu4JAkvuai8HIqJ5BL1yQ+2gUCY5MvLAAKCRAqJ5BL1yQ+
2sRoAQDLPWIZZ15lvXhALEbTfNBjkwcPBZNLUqd5Pfek7zEWRQD9GHJsUzTOvVW/
UCqJNmSBOoptW5jXkaNk0BN+E8spfgs=
=Wky7
-----END PGP SIGNATURE-----




Bug archived. Request was from Debbugs Internal Request <owner@bugs.debian.org> to internal_control@bugs.debian.org. (Sun, 08 Jan 2023 07:28:06 GMT) (full text, mbox, link).


Send a report that this bug log contains spam.


Debian bug tracking system administrator <owner@bugs.debian.org>. Last modified: Fri Jan 31 00:05:02 2025; Machine Name: buxtehude

Debian Bug tracking system

Debbugs is free software and licensed under the terms of the GNU General Public License version 2. The current version can be obtained from https://bugs.debian.org/debbugs-source/.

Copyright © 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson, 2005-2017 Don Armstrong, and many other contributors.