index : pacman | |
Archlinux32 fork of pacman | gitolite user |
summaryrefslogtreecommitdiff |
author | Eli Schwartz <eschwartz@archlinux.org> | 2017-09-12 23:59:24 -0400 |
---|---|---|
committer | Allan McRae <allan@archlinux.org> | 2017-09-13 14:21:34 +1000 |
commit | 4dae3fde17d663bf39a17978c2ee365696a54fb0 (patch) | |
tree | 0c3a5f0a1a38fd35995961e550f8111cdf3ed61b /scripts | |
parent | 39319c1860d200a9b4a3cc2c6975e3cece502f2d (diff) |
-rw-r--r-- | scripts/makepkg.sh.in | 13 |
diff --git a/scripts/makepkg.sh.in b/scripts/makepkg.sh.in index 20e9dd7e..a466e4f1 100644 --- a/scripts/makepkg.sh.in +++ b/scripts/makepkg.sh.in @@ -79,6 +79,7 @@ PKGFUNC=0 PKGVERFUNC=0 PREPAREFUNC=0 REPKG=0 +REPRODUCIBLE=0 RMDEPS=0 SKIPCHECKSUMS=0 SKIPPGPCHECK=0 @@ -87,7 +88,12 @@ SPLITPKG=0 SOURCEONLY=0 VERIFYSOURCE=0 -export SOURCE_DATE_EPOCH=${SOURCE_DATE_EPOCH:-$(date +%s)} +if [[ -n $SOURCE_DATE_EPOCH ]]; then + REPRODUCIBLE=1 +else + SOURCE_DATE_EPOCH=$(date +%s) +fi +export SOURCE_DATE_EPOCH PACMAN_OPTS=() @@ -1686,6 +1692,11 @@ if (( !REPKG )); then if (( PREPAREFUNC )); then run_prepare fi + if (( REPRODUCIBLE )); then + # We have activated reproducible builds, so unify source times before + # building + find "$srcdir" -exec touch -h -d @$SOURCE_DATE_EPOCH {} + + fi fi if (( PKGVERFUNC )); then |