option.sh: don't bother checking for GNU tar

releases aren't reproducible anyway. we were
using options available in gnu tar for this.

it will be revisited at a later date. however, the next
time this is done, we will use another method because
there are in fact portable ways to create tarballs
reproducibly, documented on reproducible-builds.org

to be revisited, at a later date. for now, remove bloat.

Signed-off-by: Leah Rowe <leah@libreboot.org>
20240612_branch
Leah Rowe 2024-05-15 00:48:08 +01:00
parent f0b604fc95
commit 36d45474c0
1 changed files with 2 additions and 12 deletions

View File

@ -184,21 +184,11 @@ mktar_release()
mktarball() mktarball()
{ {
# preserve timestamps for reproducible tarballs
tar_implementation=$(tar --version | head -n1) || :
[ "${2%/*}" = "${2}" ] || \ [ "${2%/*}" = "${2}" ] || \
mkdir -p "${2%/*}" || $err "mk, !mkdir -p \"${2%/*}\"" mkdir -p "${2%/*}" || $err "mk, !mkdir -p \"${2%/*}\""
printf "\nCreating archive: %s\n\n" "$2" printf "\nCreating archive: %s\n\n" "$2"
if [ "${tar_implementation% *}" = "tar (GNU tar)" ]; then tar -c "$1" | xz -T$threads -9e > "$2" || \
tar --sort=name --owner=root:0 --group=root:0 \ $err "mktarball 2, $1"
--mtime="UTC 2024-05-04" -c "$1" | xz -T$threads -9e \
> "$2" || $err "mktarball 1, ${1}"
else
# TODO: reproducible tarballs on non-GNU systems
tar -c "$1" | xz -T$threads -9e > "$2" || \
$err "mktarball 2, $1"
fi
mksha512sum "${2}" "${2##*/}.sha512" mksha512sum "${2}" "${2##*/}.sha512"
} }