unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
* [bug#28219] [PATCH] gnu: netcdf: Fix reproducibility issue; remove unneeded references.
@ 2017-08-24 13:36 Thomas Danckaert
  2017-08-31 13:02 ` Ludovic Courtès
  0 siblings, 1 reply; 3+ messages in thread
From: Thomas Danckaert @ 2017-08-24 13:36 UTC (permalink / raw)
  To: 28219

[-- Attachment #1: Type: Text/Plain, Size: 434 bytes --]

Hi,

this patch fixes a reproducibility issue due to the way 
SOURCE_DATE_EPOCH is treated in netCDF's configure script (`date -u 
-d ${SOURCE_DATE_EPOCH}` will evaluate to “1st hour of the current 
day”).

The patch also removes a store reference to the C compiler from 
libnetcdf.settings.

The other solution would be simply to remove libnetcdf.settings, not 
sure if anybody relies on this file in Guix.

Thomas

[-- Attachment #2: 0001-gnu-netcdf-Fix-reproducibility-issue-remove-unneeded.patch --]
[-- Type: Text/X-Patch, Size: 1559 bytes --]

From e6cfb7e09fbeb97bf6ebb6487cdcf782ca594cc7 Mon Sep 17 00:00:00 2001
From: Thomas Danckaert <post@thomasdanckaert.be>
Date: Thu, 24 Aug 2017 15:13:02 +0200
Subject: [PATCH] gnu: netcdf: Fix reproducibility issue; remove unneeded
 references.

* gnu/packages/maths.scm (netcdf) [arguments]: Add phase to fix the embedded
  'Configured On' date; truncate reference to compiler store item.
---
 gnu/packages/maths.scm | 15 +++++++++++++++
 1 file changed, 15 insertions(+)

diff --git a/gnu/packages/maths.scm b/gnu/packages/maths.scm
index 16c61dda9..4c25f77e2 100644
--- a/gnu/packages/maths.scm
+++ b/gnu/packages/maths.scm
@@ -918,6 +918,21 @@ similar to MATLAB, GNU Octave or SciPy.")
        ("libjpeg" ,libjpeg)))
     (arguments
      `(#:configure-flags '("--enable-doxygen" "--enable-dot" "--enable-hdf4")
+
+       #:phases (modify-phases %standard-phases
+         (add-before 'configure 'fix-source-date
+           (lambda _
+             (substitute* "./configure"
+               (("date -u -d \"\\$\\{SOURCE_DATE_EPOCH\\}\"")
+                "date --date='@0'"))
+             #t))
+         (add-after 'configure 'patch-settings
+           (lambda _
+             (substitute* "libnetcdf.settings"
+               (("(/gnu/store/)([a-Z0-9]*)" all prefix hash)
+                (string-append prefix (string-take hash 10) "...")))
+             #t)))
+
        #:parallel-tests? #f))           ;various race conditions
     (home-page "http://www.unidata.ucar.edu/software/netcdf/")
     (synopsis "Library for scientific data")
-- 
2.14.1


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* [bug#28219] [PATCH] gnu: netcdf: Fix reproducibility issue; remove unneeded references.
  2017-08-24 13:36 [bug#28219] [PATCH] gnu: netcdf: Fix reproducibility issue; remove unneeded references Thomas Danckaert
@ 2017-08-31 13:02 ` Ludovic Courtès
  2017-09-01  6:43   ` bug#28219: " Thomas Danckaert
  0 siblings, 1 reply; 3+ messages in thread
From: Ludovic Courtès @ 2017-08-31 13:02 UTC (permalink / raw)
  To: Thomas Danckaert; +Cc: 28219

Thomas Danckaert <post@thomasdanckaert.be> skribis:

> From e6cfb7e09fbeb97bf6ebb6487cdcf782ca594cc7 Mon Sep 17 00:00:00 2001
> From: Thomas Danckaert <post@thomasdanckaert.be>
> Date: Thu, 24 Aug 2017 15:13:02 +0200
> Subject: [PATCH] gnu: netcdf: Fix reproducibility issue; remove unneeded
>  references.
>
> * gnu/packages/maths.scm (netcdf) [arguments]: Add phase to fix the embedded
>   'Configured On' date; truncate reference to compiler store item.
> ---
>  gnu/packages/maths.scm | 15 +++++++++++++++
>  1 file changed, 15 insertions(+)
>
> diff --git a/gnu/packages/maths.scm b/gnu/packages/maths.scm
> index 16c61dda9..4c25f77e2 100644
> --- a/gnu/packages/maths.scm
> +++ b/gnu/packages/maths.scm
> @@ -918,6 +918,21 @@ similar to MATLAB, GNU Octave or SciPy.")
>         ("libjpeg" ,libjpeg)))
>      (arguments
>       `(#:configure-flags '("--enable-doxygen" "--enable-dot" "--enable-hdf4")
> +
> +       #:phases (modify-phases %standard-phases
> +         (add-before 'configure 'fix-source-date
> +           (lambda _
> +             (substitute* "./configure"
> +               (("date -u -d \"\\$\\{SOURCE_DATE_EPOCH\\}\"")
> +                "date --date='@0'"))

Perhaps add the explanation you gave as a comment here.

> +             #t))
> +         (add-after 'configure 'patch-settings
> +           (lambda _
> +             (substitute* "libnetcdf.settings"
> +               (("(/gnu/store/)([a-Z0-9]*)" all prefix hash)
> +                (string-append prefix (string-take hash 10) "...")))
> +             #t)))
> +

Likewise, explain that this allows us to get rid of the references to
GCC et al.

I would suggest making it two separate patches.

Otherwise LGTM, thank you!

Ludo’.

^ permalink raw reply	[flat|nested] 3+ messages in thread

* bug#28219: [PATCH] gnu: netcdf: Fix reproducibility issue; remove unneeded references.
  2017-08-31 13:02 ` Ludovic Courtès
@ 2017-09-01  6:43   ` Thomas Danckaert
  0 siblings, 0 replies; 3+ messages in thread
From: Thomas Danckaert @ 2017-09-01  6:43 UTC (permalink / raw)
  To: ludo; +Cc: 28219-done

From: ludo@gnu.org (Ludovic Courtès)
Subject: Re: [bug#28219] [PATCH] gnu: netcdf: Fix reproducibility 
issue; remove unneeded references.
Date: Thu, 31 Aug 2017 15:02:26 +0200

> I would suggest making it two separate patches.

Oops I just pushed the patch with added comments, but had missed this 
suggestion.

Thomas

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2017-09-01  6:44 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-08-24 13:36 [bug#28219] [PATCH] gnu: netcdf: Fix reproducibility issue; remove unneeded references Thomas Danckaert
2017-08-31 13:02 ` Ludovic Courtès
2017-09-01  6:43   ` bug#28219: " Thomas Danckaert

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).