aboutsummaryrefslogtreecommitdiff
path: root/contrib
diff options
context:
space:
mode:
Diffstat (limited to 'contrib')
-rwxr-xr-xcontrib/guix/guix-attest11
-rw-r--r--contrib/guix/libexec/build.sh15
2 files changed, 24 insertions, 2 deletions
diff --git a/contrib/guix/guix-attest b/contrib/guix/guix-attest
index 6aa6ce4716..5093dcb69d 100755
--- a/contrib/guix/guix-attest
+++ b/contrib/guix/guix-attest
@@ -153,10 +153,17 @@ for outdir in "${OUTDIRS[@]}"; do
outdirs_already_attested_to+=("$outdir")
else
mkdir -p "$outsigdir"
- echo "${outname}: Hashing build outputs to produce SHA256SUMS"
+
(
cd "$outdir"
- files="$(find . -type f)"
+
+ if [ -e inputs.SHA256SUMS ]; then
+ echo "${outname}: Including existent input SHA256SUMS"
+ cat inputs.SHA256SUMS >> "$outsigdir"/SHA256SUMS
+ fi
+
+ echo "${outname}: Hashing build outputs to produce SHA256SUMS"
+ files="$(find -L . -type f ! -iname '*.SHA256SUMS')"
if [ -n "$files" ]; then
cut -c3- <<< "$files" | env LC_ALL=C sort | xargs sha256sum >> "$outsigdir"/SHA256SUMS
else
diff --git a/contrib/guix/libexec/build.sh b/contrib/guix/libexec/build.sh
index 1bd4fee884..ce61cd52c7 100644
--- a/contrib/guix/libexec/build.sh
+++ b/contrib/guix/libexec/build.sh
@@ -231,6 +231,21 @@ if [ ! -e "$GIT_ARCHIVE" ]; then
git archive --prefix="${DISTNAME}/" --output="$GIT_ARCHIVE" HEAD
fi
+# tmpdir="$(mktemp -d)"
+# (
+# cd "$tmpdir"
+# mkdir -p inputs
+# ln -sf --target-directory=inputs "$GIT_ARCHIVE"
+
+# mkdir -p "$OUTDIR"
+# find -L inputs -type f -print0 | xargs -0 sha256sum > "${OUTDIR}/inputs.SHA256SUMS"
+# )
+
+mkdir -p "$OUTDIR"
+cat << EOF > "$OUTDIR"/inputs.SHA256SUMS
+$(sha256sum "$GIT_ARCHIVE" | cut -d' ' -f1) inputs/$(basename "$GIT_ARCHIVE")
+EOF
+
###########################
# Binary Tarball Building #
###########################