Bug#1089011: pyorbital: please make the build reproducible

Chris Lamb lamby at debian.org
Wed Dec 4 09:18:30 GMT 2024


Source: pyorbital
Version: 1.9.1-1
Severity: wishlist
Tags: patch
User: reproducible-builds at lists.alioth.debian.org
Usertags: timestamps
X-Debbugs-Cc: reproducible-bugs at lists.alioth.debian.org

Hi,

Whilst working on the Reproducible Builds effort [0], we noticed that
pyorbital could not be built reproducibly.

This was because the documentation embeds the current build year:

│ │ │ ├── ./usr/share/doc/python-pyorbital-doc/html/genindex.html
│ │ │ │ @@ -362,15 +362,15 @@
│ │ │ │             </div>
│ │ │ │            </div>
│ │ │ │            <footer>
│ │ │ │  
│ │ │ │    <hr/>
│ │ │ │  
│ │ │ │    <div role="contentinfo">
│ │ │ │ -    <p>© Copyright 2024, 2024-2024, The PyTroll Team.</p>
│ │ │ │ +    <p>© Copyright 2024, 2024-2026, The PyTroll Team.</p>
│ │ │ │    </div>

Patch attached that seeds this value via SOURCE_DATE_EPOCH.

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


Regards,

-- 
      ,''`.
     : :'  :     Chris Lamb
     `. `'`      lamby at debian.org / chris-lamb.co.uk
       `-
-------------- next part --------------
--- a/debian/patches/0003-Reproducible-build.patch	1970-01-01 01:00:00.000000000 +0100
--- b/debian/patches/0003-Reproducible-build.patch	2024-12-04 09:16:33.088077494 +0000
@@ -0,0 +1,25 @@
+Description: Make the build reproducible
+Author: Chris Lamb <lamby at debian.org>
+Last-Update: 2024-12-04
+
+--- pyorbital-1.9.1.orig/doc/source/conf.py
++++ pyorbital-1.9.1/doc/source/conf.py
+@@ -12,7 +12,7 @@
+ # serve to show the default.
+ """Configurations for sphinx based documentation."""
+ 
+-import datetime as dt
++import time
+ import os
+ import sys
+ 
+@@ -47,7 +47,8 @@ master_doc = "index"
+ 
+ # General information about the project.
+ project = u"pyorbital"
+-copyright = u"2012, 2024-{}, The PyTroll Team".format(dt.datetime.utcnow().strftime("%Y"))  # noqa: A001
++year = time.strftime("%Y", time.gmtime(int(os.environ.get('SOURCE_DATE_EPOCH', time.time()))))
++copyright = u"2012, 2024-{}, The PyTroll Team".format(year)  # noqa: A001
+ 
+ 
+ 
--- a/debian/patches/series	2024-12-04 09:12:12.165151157 +0000
--- b/debian/patches/series	2024-12-04 09:16:46.987925317 +0000
@@ -1,2 +1,3 @@
 0001-Fix-pricacy-breach.patch
 0002-Fix-broken-test-on-i386.patch
+0003-Reproducible-build.patch


More information about the Reproducible-bugs mailing list