From 33334afc2b656dd5ba1fef09ede5606e669e17b1 Mon Sep 17 00:00:00 2001 From: _ <> Date: Fri, 29 Jan 2021 01:12:52 +0000 Subject: [PATCH] :package: build: fix determinism in ptth_server builds --- build_ptth_server.bash | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/build_ptth_server.bash b/build_ptth_server.bash index fda23e5..6483fcf 100755 --- a/build_ptth_server.bash +++ b/build_ptth_server.bash @@ -10,6 +10,8 @@ set -euo pipefail +export LC_ALL="C" + TEMP_GIBBERISH="ptth_server_build_BIHWLQXQ" DEST="$TEMP_GIBBERISH/ptth" @@ -25,5 +27,11 @@ cp target/release/ptth_server "$DEST/ptth_server" ( cd "$TEMP_GIBBERISH" || exit -tar -cf "ptth_server.tar" ptth/ + +find ptth/ -print0 | \ +sort -z | \ +tar --mtime='1970-01-01' --no-recursion --null -T - -cf - > \ +ptth_server.tar.temp + +mv ptth_server.tar.temp ptth_server.tar )