Source: netcdf-fortran
Version: 4.5.3+ds-1
Severity: wishlist
Tags: patch
User: reproducible-bui...@lists.alioth.debian.org
Usertags: buildpath
X-Debbugs-Cc: reproducible-b...@lists.alioth.debian.org

Hi,

Whilst working on the Reproducible Builds effort [0] we noticed that
netcdf-fortran could not be built reproducibly.

You have removed some settings, but you left in FFLAGS which varies on
the buld path.

A patch is attached (which updates your existing patch) which
sanitises this variable to remove the varying components rather than
simply removing.

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


Regards,

--
      ,''`.
     : :'  :     Chris Lamb
     `. `'`      la...@debian.org / chris-lamb.co.uk
       `-
--- a/configure.ac      2020-06-07 15:19:43.658722034 +0100
--- b/configure.ac      2020-06-07 15:43:28.676618324 +0100
@@ -600,6 +600,7 @@
 AC_SUBST(HAS_NC4_PARALLEL,[$nc_has_parallel4])
 AC_SUBST(HAS_PARALLEL,[$nc_has_parallel])
 AC_SUBST([AM_LDFLAGS])
+AC_SUBST(FFLAGS_FILTERED,[`echo "$FFLAGS" | sed -e 's@ [[^ 
]]*-f\(file\|debug\)-prefix-map=[[^ ]]*@@g'`])
 
 # Some files need to exist in build directories that do not correspond
 # to their source directory, or the test program makes an assumption
--- a/debian/patches/reproducible-settings.patch        2020-06-07 
15:19:43.662722069 +0100
--- b/debian/patches/reproducible-settings.patch        2020-06-07 
15:43:33.116653163 +0100
@@ -1,9 +1,9 @@
 Description: Remove settings that make the build unreproducible.
 Author: Bas Couwenberg <sebas...@debian.org>
 
---- a/libnetcdff.settings.in
-+++ b/libnetcdff.settings.in
-@@ -4,9 +4,6 @@
+--- netcdf-fortran-4.5.3+ds.orig/libnetcdff.settings.in
++++ netcdf-fortran-4.5.3+ds/libnetcdff.settings.in
+@@ -4,15 +4,12 @@
  # General
  -------
  Library Version:              @PACKAGE_VERSION@
@@ -13,3 +13,20 @@
  Install Prefix:                 @prefix@
  
  # Compiling Options
+ -----------------
+ Fortran Compiler:               @FC_VERSION@
+-FFLAGS:                         @FFLAGS@
++FFLAGS:                         @FFLAGS_FILTERED@
+ LDFLAGS:                      @LDFLAGS@
+ AM_LDFLAGS:                     @AM_LDFLAGS@
+ Shared Library:                       @enable_shared@
+--- netcdf-fortran-4.5.3+ds.orig/configure.ac
++++ netcdf-fortran-4.5.3+ds/configure.ac
+@@ -600,6 +600,7 @@ AC_SUBST(HAS_PNETCDF,[$nc_has_pnetcdf])
+ AC_SUBST(HAS_NC4_PARALLEL,[$nc_has_parallel4])
+ AC_SUBST(HAS_PARALLEL,[$nc_has_parallel])
+ AC_SUBST([AM_LDFLAGS])
++AC_SUBST(FFLAGS_FILTERED,[`echo "$FFLAGS" | sed -e 's@ [[^ 
]]*-f\(file\|debug\)-prefix-map=[[^ ]]*@@g'`])
+ 
+ # Some files need to exist in build directories that do not correspond
+ # to their source directory, or the test program makes an assumption
--- a/libnetcdff.settings.in    2020-06-07 15:19:43.658722034 +0100
--- b/libnetcdff.settings.in    2020-06-07 15:40:25.739206770 +0100
@@ -9,7 +9,7 @@
 # Compiling Options
 -----------------
 Fortran Compiler:               @FC_VERSION@
-FFLAGS:                         @FFLAGS@
+FFLAGS:                         @FFLAGS_FILTERED@
 LDFLAGS:                       @LDFLAGS@
 AM_LDFLAGS:                     @AM_LDFLAGS@
 Shared Library:                        @enable_shared@

Reply via email to