From 4dae3fde17d663bf39a17978c2ee365696a54fb0 Mon Sep 17 00:00:00 2001 From: Eli Schwartz Date: Tue, 12 Sep 2017 23:59:24 -0400 Subject: makepkg: respect $SOURCE_DATE_EPOCH to activate reproducible builds If SOURCE_DATE_EPOCH is set, `touch` all source files between the (optional) prepare() and build() functions to unify the modification times. This works around build systems and compilers that embed the file modification times into the file contents of release artifacts. Signed-off-by: Eli Schwartz Signed-off-by: Allan McRae --- doc/makepkg.8.txt | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'doc') diff --git a/doc/makepkg.8.txt b/doc/makepkg.8.txt index 2dff1b19..e1d50775 100644 --- a/doc/makepkg.8.txt +++ b/doc/makepkg.8.txt @@ -206,6 +206,7 @@ Options *\--printsrcinfo*:: Generate and print the SRCINFO file to stdout. + Additional Features ------------------- makepkg supports building development versions of packages without having to @@ -214,6 +215,19 @@ separate utility 'versionpkg'. See linkman:PKGBUILD[5] for details on how to set up a development PKGBUILD. +Reproducibility +--------------- +makepkg is designed to be compatible with +link:https://reproducible-builds.org/docs/[Reproducible Builds]. If the +**SOURCE_DATE_EPOCH** environment variable is set, it will be exported to +subprocesses, and source and package file modification times and package +metadata will be unified based on the timestamp specified. + +If the **SOURCE_DATE_EPOCH** environment variable is not set, makepkg will use +its own start date for internal use, but will not unify source file timestamps +before building. + + Environment Variables --------------------- **PACMAN**:: @@ -265,6 +279,8 @@ Environment Variables Specify a key to use when signing packages, overriding the GPGKEY setting in linkman:makepkg.conf[5] +**SOURCE_DATE_EPOCH=**"":: + Used for link:https://reproducible-builds.org/docs/[Reproducible Builds]. Configuration ------------- -- cgit v1.2.3-24-g4f1b