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>
audit2-merge1
Leah Rowe 2024-05-15 00:48:08 +01:00 committed by Leah Rowe
parent 422d36a07c
commit 90c528032b
1 changed files with 2 additions and 12 deletions

View File

@ -177,21 +177,11 @@ mktar_release()
mktarball()
{
# preserve timestamps for reproducible tarballs
tar_implementation=$(tar --version | head -n1) || :
[ "${2%/*}" = "${2}" ] || \
mkdir -p "${2%/*}" || $err "mk, !mkdir -p \"${2%/*}\""
printf "\nCreating archive: %s\n\n" "$2"
if [ "${tar_implementation% *}" = "tar (GNU tar)" ]; then
tar --sort=name --owner=root:0 --group=root:0 \
--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
tar -c "$1" | xz -T$threads -9e > "$2" || \
$err "mktarball 2, $1"
mksha512sum "${2}" "${2##*/}.sha512"
}