[pacman-dev] [PATCH 4/4] [RFC] makepkg: unify times for generated files in srcdir before packaging

Allan McRae allan at archlinux.org
Mon Apr 17 12:03:03 UTC 2017


From: Levente Polyak <anthraxx at archlinux.org>

Signed-off-by: Allan McRae <allan at archlinux.org>
---

[Allan] I'm told his is useful for some python packages that generate pyo/pyc
files during package...  I am undecided about its suitability for inclusion
in makepkg yet.

 scripts/makepkg.sh.in | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/scripts/makepkg.sh.in b/scripts/makepkg.sh.in
index df4d6a06..84b83e7d 100644
--- a/scripts/makepkg.sh.in
+++ b/scripts/makepkg.sh.in
@@ -493,6 +493,8 @@ run_package() {
 		pkgfunc="package_$1"
 	fi
 
+	# unify source times before package for reproducibility
+	find "$srcdir" -exec touch -h -d "@${SOURCE_DATE_EPOCH}" {} \;
 	run_function_safe "$pkgfunc"
 }
 
-- 
2.12.0


More information about the pacman-dev mailing list