From aa601de72c51e9f2fadeca04ef64fa6371f1fdc7 Mon Sep 17 00:00:00 2001 From: Ralph Sennhauser Date: Mon, 13 Oct 2025 17:39:09 +0200 Subject: [PATCH] Set owner and group when creating tar archive tar --no-same-owner is only default for non root users, therefore if extracting as root owner ship is by the user id creating the archive. This is an issue if extracting happens in a container and cleanup outside the container by a non root user like on our CI when building the appimage. Therefore package the tar archives for fcollada and nvtt with owner and group root. Fixes: #8440 Signed-off-by: Ralph Sennhauser --- libraries/source/fcollada/build.sh | 18 ++++++++++++++++-- libraries/source/nvtt/build.sh | 18 ++++++++++++++++-- 2 files changed, 32 insertions(+), 4 deletions(-) diff --git a/libraries/source/fcollada/build.sh b/libraries/source/fcollada/build.sh index 2e42ba4647..75de15514e 100755 --- a/libraries/source/fcollada/build.sh +++ b/libraries/source/fcollada/build.sh @@ -6,13 +6,27 @@ set -e cd "$(dirname "$0")" PV=28209 -LIB_VERSION=${PV} +LIB_VERSION=${PV}+wfg1 fetch() { + tar_version=$(tar --version | head --lines 1) + case "${tar_version}" in + *"GNU tar"*) + tar_extra_opts="--owner root --group root" + ;; + *"libarchive"*) + tar_extra_opts="--uname root --gname root" + ;; + *) + echo "unknown tar implementation ${tar_version}" + ;; + esac + rm -Rf fcollada-${PV} svn export https://svn.wildfiregames.com/public/source-libs/trunk/fcollada@${PV} fcollada-${PV} - "${TAR}" cJf fcollada-${PV}.tar.xz fcollada-${PV} + # shellcheck disable=SC2086 + "${TAR}" -c ${tar_extra_opts} -Jf fcollada-${PV}.tar.xz fcollada-${PV} rm -R fcollada-${PV} } diff --git a/libraries/source/nvtt/build.sh b/libraries/source/nvtt/build.sh index 81d1b12af7..73aa186f7a 100755 --- a/libraries/source/nvtt/build.sh +++ b/libraries/source/nvtt/build.sh @@ -6,13 +6,27 @@ set -e cd "$(dirname "$0")" PV=28209 -LIB_VERSION=${PV}+wfg2 +LIB_VERSION=${PV}+wfg3 fetch() { + tar_version=$(tar --version | head --lines 1) + case "${tar_version}" in + *"GNU tar"*) + tar_extra_opts="--owner root --group root" + ;; + *"libarchive"*) + tar_extra_opts="--uname root --gname root" + ;; + *) + echo "unknown tar implementation ${tar_version}" + ;; + esac + rm -Rf nvtt-${PV} svn export https://svn.wildfiregames.com/public/source-libs/trunk/nvtt@${PV} nvtt-${PV} - "${TAR}" cJf nvtt-${PV}.tar.xz nvtt-${PV} + # shellcheck disable=SC2086 + "${TAR}" -c ${tar_extra_opts} -Jf nvtt-${PV}.tar.xz nvtt-${PV} rm -R nvtt-${PV} }