Hi Sandro.
Thanks for the ping.

For now, this is blocked by https://bugs.debian.org/827361 for the
documentation and by 
https://tests.reproducible-builds.org/debian/issues/unstable/captures_build_path_issue.html
(captured build path).

I try use the following change to avoid the captured build path problem:

diff -urNp basemap-1.0.7+dfsg.orig/debian/rules basemap-1.0.7+dfsg/debian/rules
--- basemap-1.0.7+dfsg.orig/debian/rules        2016-08-14 13:39:28.000000000 
-0300
+++ basemap-1.0.7+dfsg/debian/rules     2017-01-08 04:37:07.869514863 -0300
@@ -1,4 +1,9 @@
 #!/usr/bin/make -f
 +export DEB_BUILD_MAINT_OPTIONS = hardening=+all
 +DPKG_EXPORT_BUILDFLAGS = 1
 +include /usr/share/dpkg/buildflags.mk

but after the change some .so files also have differences.=
I think that is a problem of order in inputs 
(https://reproducible-builds.org/docs/stable-inputs/).

I attach a small patch for fix reproducible problems in some images.
Maybe with it and after the close of bug 827361, the documentation (
package python-mpltoolkits.basemap-doc) can be reproducible.

Greetings,
Juan

On Sat, Jan 07, 2017 at 10:26:24PM -0500, Sandro Tosi wrote:
> On Mon, Aug 15, 2016 at 11:13 PM, Juan Picca <jumap...@gmail.com> wrote:
> > The patch is no longer valid.
> > Also, basemap 1.0.7+dfsg-3 currently is not reproducible.
> > I hope that in the coming weeks i will have the time to make the build
> > reproducible.
> 
> gentle ping
> 
> -- 
> Sandro "morph" Tosi
> My website: http://sandrotosi.me/
> Me at Debian: http://wiki.debian.org/SandroTosi
> G+: https://plus.google.com/u/0/+SandroTosi
diff -urNp basemap-1.0.7+dfsg.orig/debian/patches/reproducible_documentation.patch basemap-1.0.7+dfsg/debian/patches/reproducible_documentation.patch
--- basemap-1.0.7+dfsg.orig/debian/patches/reproducible_documentation.patch	1969-12-31 21:00:00.000000000 -0300
+++ basemap-1.0.7+dfsg/debian/patches/reproducible_documentation.patch	2017-01-08 14:34:30.065711706 -0300
@@ -0,0 +1,53 @@
+Description: Make documentation reproducible
+Author: Juan Picca <jumap...@gmail.com>
+Last-Update: 2017-01-08
+---
+--- a/doc/users/figures/plotdaynight.py
++++ b/doc/users/figures/plotdaynight.py
+@@ -1,7 +1,9 @@
++import os
++import time
++import datetime
+ import numpy as np
+ from mpl_toolkits.basemap import Basemap
+ import matplotlib.pyplot as plt
+-from datetime import datetime
+ # miller projection 
+ map = Basemap(projection='mill',lon_0=180)
+ # plot coastlines, draw label meridians and parallels.
+@@ -13,7 +15,8 @@ map.drawmapboundary(fill_color='aqua')
+ map.fillcontinents(color='coral',lake_color='aqua')
+ # shade the night areas, with alpha transparency so the 
+ # map shows through. Use current time in UTC.
+-date = datetime.utcnow()
++date = datetime.datetime.utcfromtimestamp(
++        int(os.environ.get('SOURCE_DATE_EPOCH', time.time())))
+ CS=map.nightshade(date)
+ plt.title('Day/Night Map for %s (UTC)' % date.strftime("%d %b %Y %H:%M:%S"))
+ plt.show()
+--- a/doc/users/figures/plothighsandlows.py
++++ b/doc/users/figures/plothighsandlows.py
+@@ -2,9 +2,11 @@
+ plot H's and L's on a sea-level pressure map
+ (uses scipy.ndimage.filters and netcdf4-python)
+ """
++import os
++import time
++import datetime
+ import numpy as np
+ import matplotlib.pyplot as plt
+-from datetime import datetime
+ from mpl_toolkits.basemap import Basemap, addcyclic
+ from scipy.ndimage.filters import minimum_filter, maximum_filter
+ from netCDF4 import Dataset
+@@ -20,7 +22,9 @@ def extrema(mat,mode='wrap',window=10):
+     return np.nonzero(mat == mn), np.nonzero(mat == mx)
+ 
+ # plot 00 UTC today.
+-date = datetime.now().strftime('%Y%m%d')+'00'
++date = datetime.datetime.utcfromtimestamp(
++        int(os.environ.get('SOURCE_DATE_EPOCH', time.time())))
++date = date.strftime('%Y%m%d')+'00'
+ 
+ # open OpenDAP dataset.
+ #data=Dataset("http://nomads.ncep.noaa.gov:9090/dods/gfs/gfs/%s/gfs_%sz_anl"; %\
diff -urNp basemap-1.0.7+dfsg.orig/debian/patches/series basemap-1.0.7+dfsg/debian/patches/series
--- basemap-1.0.7+dfsg.orig/debian/patches/series	2016-08-14 13:39:28.000000000 -0300
+++ basemap-1.0.7+dfsg/debian/patches/series	2017-01-08 13:23:11.708568267 -0300
@@ -3,3 +3,4 @@ add_shebang_data_scripts
 use_share_datafiles
 install_matplotlib_sphinxext
 fix_ftbfs_with_geos3.3
+reproducible_documentation.patch

Reply via email to