mirror of
https://gitea.wildfiregames.com/0ad/0ad
synced 2026-06-16 05:13:58 -07:00
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 <ralph.sennhauser@gmail.com>
This commit is contained in:
parent
a730ab65a3
commit
aa601de72c
2 changed files with 32 additions and 4 deletions
|
|
@ -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}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -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}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue