diff options
Diffstat (limited to 'scripts')
-rw-r--r-- | scripts/lib/ptxd_lib_reproducible.sh | 17 | ||||
-rw-r--r-- | scripts/lib/ptxd_make_xpkg_pkg.sh | 2 |
2 files changed, 18 insertions, 1 deletions
diff --git a/scripts/lib/ptxd_lib_reproducible.sh b/scripts/lib/ptxd_lib_reproducible.sh new file mode 100644 index 000000000..f0c1bcf8f --- /dev/null +++ b/scripts/lib/ptxd_lib_reproducible.sh @@ -0,0 +1,17 @@ +#!/bin/bash +# +# Copyright (C) 2018 by Michael Olbrich <m.olbrich@pengutronix.de> +# +# See CREDITS for details about who has contributed to this project. +# +# For further information about the PTXdist project and license conditions +# see the README file. +# + +ptxd_lib_reproducible() { + SOURCE_DATE_EPOCH="$(echo $(date --date="${PTXDIST_VERSION_YEAR}-${PTXDIST_VERSION_MONTH}-01 UTC" "+%s"))" + export SOURCE_DATE_EPOCH +} +export -f ptxd_lib_reproducible + +ptxd_lib_reproducible diff --git a/scripts/lib/ptxd_make_xpkg_pkg.sh b/scripts/lib/ptxd_make_xpkg_pkg.sh index 8c49cba9e..b3f2f20f3 100644 --- a/scripts/lib/ptxd_make_xpkg_pkg.sh +++ b/scripts/lib/ptxd_make_xpkg_pkg.sh @@ -916,7 +916,7 @@ executing '${pkg_label}.${1}' export -f ptxd_install_run ptxd_install_fixup_timestamps() { - local timestamp="${PTXDIST_VERSION_YEAR}-${PTXDIST_VERSION_MONTH}-01 UTC" + local timestamp="@${SOURCE_DATE_EPOCH}" local touch_args if touch --help | grep -q -- --no-dereference &> /dev/null; then touch_args="--no-dereference" |