summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorChris Lamb <[email protected]>2020-02-15 09:32:59 +0000
committerMartin Wimpress <[email protected]>2020-02-20 10:28:46 +0000
commit64ae7db88a9b22470d31d032a87fddd5fb4a2ab7 (patch)
treeaafed53321dc1a8cbcf02e6d6642817dd7d8997b /configure.ac
parent378db5b5244fc195a91993d50e4a5d1d86e430a9 (diff)
downloadmate-desktop-64ae7db88a9b22470d31d032a87fddd5fb4a2ab7.tar.bz2
mate-desktop-64ae7db88a9b22470d31d032a87fddd5fb4a2ab7.tar.xz
Make the build reproducible
Whilst working on the Reproducible Builds effort [0] we noticed that mate-desktop could not be built reproducibly. This is is because it generated a "release year" etc. based on the current build date which was embedded in the binary and possibly other files. A patch attached that uses SOURCE_DATE_EPOCH [1] instead. As a side-effect, this fixes the (accidental) reset of MATE_DATE in the Autotools build system in inherited from mate-desktop-environment.git. This was originally filed in Debian as #951357 [2]. [0] https://reproducible-builds.org/ [1] https://reproducible-builds.org/specs/source-date-epoch/ [2] https://bugs.debian.org/951357
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac7
1 files changed, 6 insertions, 1 deletions
diff --git a/configure.ac b/configure.ac
index af02709..a743871 100644
--- a/configure.ac
+++ b/configure.ac
@@ -45,8 +45,10 @@ MATE_PLATFORM=mate_platform
MATE_MINOR=mate_minor
MATE_MICRO=mate_micro
MATE_DATE=`date +"%Y-%m-%d"`
+if test "x$SOURCE_DATE_EPOCH" != "x"; then
+ MATE_DATE=`date -u -d "@$SOURCE_DATE_EPOCH" +%Y-%m-%d`
+fi
-MATE_DATE=
MATE_DATE_COMMENT_START="<!--"
MATE_DATE_COMMENT_END="-->"
@@ -62,6 +64,9 @@ AC_DEFINE(MATE_MINOR, [mate_minor], [Define to the minor version])
AC_DEFINE(MATE_MICRO, [mate_micro], [Define to the micro version])
RELEASE_YEAR=`date +%Y`
+if test "x$SOURCE_DATE_EPOCH" != "x"; then
+ RELEASE_YEAR=`date -u -d "@$SOURCE_DATE_EPOCH" +%Y`
+fi
AC_SUBST([RELEASE_YEAR])
AC_ARG_ENABLE(deprecation_flags,