Source: dispcalgui
Version: 3.0.4.3-1
Severity: wishlist
Tags: patch
User: reproducible-builds@lists.alioth.debian.org
Usertags: timestamps
X-Debbugs-Cc: reproducible-builds@lists.alioth.debian.org

Hi!

While working on the "reproducible builds" effort [1], we have noticed
that dispcalgui could not be built reproducibly.
It embeds the current year as copyright year into an appdata xml file.

The attached patch uses the last modification time instead.

Regards,
 Reiner

[1]: https://wiki.debian.org/ReproducibleBuilds
diff --git a/debian/patches/reproducible-build.patch b/debian/patches/reproducible-build.patch
new file mode 100644
index 0000000..196642e
--- /dev/null
+++ b/debian/patches/reproducible-build.patch
@@ -0,0 +1,13 @@
+Index: dispcalgui-3.0.4.3/setup.py
+===================================================================
+--- dispcalgui-3.0.4.3.orig/setup.py
++++ dispcalgui-3.0.4.3/setup.py
+@@ -94,7 +94,7 @@ def replace_placeholders(tmpl_path, out_
+ 		"VERSION_SHORT": re.sub("(?:\.0){1,2}$", "", version),
+ 		"URL": "http://%s/"; % domain.lower(),
+ 		"WX_MINVERSION": ".".join(str(n) for n in wx_minversion),
+-		"YEAR": strftime("%Y", gmtime())}
++		"YEAR": strftime("%Y", gmtime(lastmod_time or os.stat(tmpl_path).st_mtime))}
+ 	mapping.update(iterable or {})
+ 	for key, val in mapping.iteritems():
+ 		tmpl_data = tmpl_data.replace("${%s}" % key, val)
diff --git a/debian/patches/series b/debian/patches/series
index f5375c6..3f83b8d 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1 +1,2 @@
 missing_file
+reproducible-build.patch
_______________________________________________
Reproducible-builds mailing list
Reproducible-builds@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/reproducible-builds

Reply via email to