Source: python-gvm Version: 24.3.0-1 Severity: wishlist Tags: patch User: reproducible-bui...@lists.alioth.debian.org Usertags: timestamps X-Debbugs-Cc: reproducible-b...@lists.alioth.debian.org
Hi, Whilst working on the Reproducible Builds effort [0], we noticed that python-gvm could not be built reproducibly. This is because the docs embed the current build year. A patch is attached that uses SOURCE_DATE_EPOCH [1] if available. [0] https://reproducible-builds.org/ [0] https://reproducible-builds.org/docs/source-date-epoch/ Regards, -- ,''`. : :' : Chris Lamb `. `'` la...@debian.org / chris-lamb.co.uk `-
--- a/debian/patches/Reproducible-build.patch 1970-01-01 01:00:00.000000000 +0100 --- b/debian/patches/Reproducible-build.patch 2024-04-25 11:55:22.120958744 +0100 @@ -0,0 +1,33 @@ +Description: Make the build reproducible +Author: Chris Lamb <la...@debian.org> +Last-Update: 2024-04-25 + +--- python-gvm-24.3.0.orig/docs/conf.py ++++ python-gvm-24.3.0/docs/conf.py +@@ -16,7 +16,13 @@ + + import os + import sys +-from datetime import datetime ++import time ++import datetime ++ ++build_date = datetime.datetime.fromtimestamp( ++ int(os.environ.get('SOURCE_DATE_EPOCH', time.time())), ++ tz=datetime.timezone.utc, ++) + + sys.path.insert(0, os.path.abspath("..")) + +@@ -24,10 +30,8 @@ import gvm # noqa: E402 + + # -- Project information ----------------------------------------------------- + +-year = datetime.now().year +- + project = "python-gvm" +-copyright = f"2018 - {year}, Greenbone AG" ++copyright = f"2018 - {build_date.year}, Greenbone AG" + author = "Greenbone AG" + + # The short X.Y version --- a/debian/patches/series 2024-04-25 11:43:24.482946466 +0100 --- b/debian/patches/series 2024-04-25 11:55:21.240959905 +0100 @@ -1,2 +1,3 @@ change-path-unix-sockets.patch Remove-furo-theme-in-docs.patch +Reproducible-build.patch