File: reproducible-build.patch

package info (click to toggle)
jenkins-job-builder 6.4.2-5
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 13,160 kB
  • sloc: xml: 29,821; python: 20,641; sh: 208; makefile: 152
file content (28 lines) | stat: -rw-r--r-- 817 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
Description: Make the build reproducible
Author: Chris Lamb <lamby@debian.org>
Last-Update: 2025-03-31

--- jenkins-job-builder-6.4.2.orig/doc/source/conf.py
+++ jenkins-job-builder-6.4.2/doc/source/conf.py
@@ -13,6 +13,7 @@
 
 import os
 import sys
+import time
 import datetime
 from jenkins_jobs.version import version_info as jenkins_jobs_version
 
@@ -52,8 +53,12 @@ master_doc = "index"
 
 # General information about the project.
 project = "Jenkins Job Builder"
+build_date = datetime.datetime.fromtimestamp(
+    int(os.environ.get('SOURCE_DATE_EPOCH', time.time())),
+    tz=datetime.timezone.utc,
+)
 copyright = "2012 - {}, Jenkins Job Builder Maintainers".format(
-    datetime.datetime.now().year
+    build_date.year
 )
 
 # The version info for the project you're documenting, acts as replacement for