From 98c35cddda61236ad92e1ba47cf52ab86a1d16f3 Mon Sep 17 00:00:00 2001
From: Patrick Spek
Date: Sun, 29 Mar 2020 16:36:57 +0200
Subject: Add LC_ALL and SOURCE_DATE_EPOCH to install action
These are strongly advised to be set when working towards reproducible
builds. While I'm unsure if any of the Raku components actually support
it, there's no harm in having them.
---
lib/actions/install.bash | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/lib/actions/install.bash b/lib/actions/install.bash
index 9e4b010..42c27f5 100644
--- a/lib/actions/install.bash
+++ b/lib/actions/install.bash
@@ -13,7 +13,9 @@ RSTAR_DEPS_PERL+=(
)
action() {
+ local LC_ALL
local OPTIND
+ local SOURCE_DATE_EPOCH
local duration
local init
@@ -28,7 +30,14 @@ action() {
shift $(( OPTIND - 1 ))
- mkdir -p -- "$RSTAR_PREFIX"
+ # Prepare environment for a reproducible install
+ LC_ALL=C.UTF-8
+ SOURCE_DATE_EPOCH="$(git log -1 --pretty=format:%at)"
+
+ debug "SOURCE_DATE_EPOCH set to $SOURCE_DATE_EPOCH"
+
+ export LC_ALL
+ export SOURCE_DATE_EPOCH
# If no specific targets are specified, set all targets
if (( $# < 1 ))
@@ -40,6 +49,9 @@ action() {
# on
init="$(date +%s)"
+ # Create the installation directory
+ mkdir -p -- "$RSTAR_PREFIX"
+
# Run each installation target
for target in "$@"
do
--
cgit v1.1