improve tar packaging
The generated tar archives contain the uid/gid of the builder, if unpacked as root on another system those will denote nothing or an unexpected user/group. The expectation would be uid/gid = 0. Use a simple enough tar format as well. The Mac version of tar (bsdtar?) does not support those flags, for CI the separate gnu-tar is installed.
This commit is contained in:
1 parent
6b6b1240e2
commit
45ad09642f
4 files changed
+10
-10
No files matched your search
@@ -77,7 +77,7 @@ jobs:
|
||||
DISTRO=ubuntu-$(grep DISTRIB_RELEASE /etc/lsb-release | cut -f 2 -d =)-$(uname -m)
|
||||
NAME=llvm-mingw-$TAG-ucrt-$DISTRO
|
||||
mv llvm-mingw $NAME
|
||||
tar -Jcf ../$NAME.tar.xz $NAME
|
||||
tar -Jcf ../$NAME.tar.xz --format=ustar --numeric-owner --owner=0 --group=0 $NAME
|
||||
- uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: linux-ucrt-x86_64-toolchain
|
||||
@@ -124,7 +124,7 @@ jobs:
|
||||
DISTRO=ubuntu-$(grep DISTRIB_RELEASE /etc/lsb-release | cut -f 2 -d =)-aarch64
|
||||
NAME=llvm-mingw-$TAG-ucrt-$DISTRO
|
||||
mv llvm-mingw $NAME
|
||||
tar -Jcf ../$NAME.tar.xz $NAME
|
||||
tar -Jcf ../$NAME.tar.xz --format=ustar --numeric-owner --owner=0 --group=0 $NAME
|
||||
- uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: linux-ucrt-aarch64-toolchain
|
||||
@@ -157,7 +157,7 @@ jobs:
|
||||
LLVM_CMAKEFLAGS="-DLLVM_ENABLE_LIBXML2=OFF -DLLVM_ENABLE_TERMINFO=OFF" ./build-all.sh $(pwd)/install/llvm-mingw --disable-clang-tools-extra --disable-lldb --enable-asserts
|
||||
.github/workflows/store-version.sh install/llvm-mingw/versions.txt
|
||||
cd install
|
||||
tar -Jcf ../llvm-mingw-linux.tar.xz llvm-mingw
|
||||
tar -Jcf ../llvm-mingw-linux.tar.xz --format=ustar --numeric-owner --owner=0 --group=0 llvm-mingw
|
||||
- uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: linux-asserts-toolchain
|
||||
@@ -178,7 +178,7 @@ jobs:
|
||||
MINGW_W64_VERSION: ${{needs.prepare.outputs.MINGW_W64_VERSION}}
|
||||
TAG: ${{needs.prepare.outputs.TAG}}
|
||||
run: |
|
||||
brew install ninja
|
||||
brew install ninja gnu-tar
|
||||
# Disable zstd and python. Both are available on the runners, but
|
||||
# installed with homebrew, and only available in the native (x86_64)
|
||||
# form. Therefore, autodetection will pick them up, but linking
|
||||
@@ -189,7 +189,7 @@ jobs:
|
||||
cd install
|
||||
NAME=llvm-mingw-$TAG-ucrt-macos-universal
|
||||
mv llvm-mingw $NAME
|
||||
tar -Jcf ../$NAME.tar.xz $NAME
|
||||
gtar -Jcf ../$NAME.tar.xz --format=ustar --numeric-owner --owner=0 --group=0 $NAME
|
||||
- uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: macos-ucrt-toolchain
|
||||
@@ -241,7 +241,7 @@ jobs:
|
||||
cd install
|
||||
NAME=llvm-mingw-$TAG-ucrt-msys2-${{matrix.sys}}
|
||||
mv llvm-mingw $NAME
|
||||
tar -Jcf ../$NAME.tar.xz $NAME
|
||||
tar -Jcf ../$NAME.tar.xz --format=ustar --numeric-owner --owner=0 --group=0 $NAME
|
||||
- uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: msys2-${{matrix.sys}}-toolchain
|
||||
|
||||
@@ -76,7 +76,7 @@ jobs:
|
||||
DISTRO=ubuntu-$(grep DISTRIB_RELEASE /etc/lsb-release | cut -f 2 -d =)-$(uname -m)
|
||||
NAME=llvm-mingw-$TAG-msvcrt-$DISTRO
|
||||
mv llvm-mingw $NAME
|
||||
tar -Jcf ../$NAME.tar.xz $NAME
|
||||
tar -Jcf ../$NAME.tar.xz --format=ustar --numeric-owner --owner=0 --group=0 $NAME
|
||||
- uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: linux-msvcrt-x86_64-toolchain
|
||||
|
||||
+1
-1
@@ -33,7 +33,7 @@ rm -rf $DEST
|
||||
time CLEAN=1 SYNC=1 MACOS_REDIST=1 ./build-all.sh $DEST
|
||||
dir=$(pwd)
|
||||
cd $HOME
|
||||
tar -Jcvf $dir/$RELNAME.tar.xz $RELNAME
|
||||
gtar -Jcvf $dir/$RELNAME.tar.xz --format=ustar --numeric-owner --owner=0 --group=0 $RELNAME
|
||||
rm -rf $RELNAME
|
||||
cd $dir
|
||||
ls -lh $RELNAME.tar.xz
|
||||
+2
-2
@@ -30,7 +30,7 @@ fi
|
||||
time docker build -f Dockerfile . -t mstorsjo/llvm-mingw:latest -t mstorsjo/llvm-mingw:$TAG
|
||||
|
||||
DISTRO=ubuntu-20.04-$(uname -m)
|
||||
docker run --rm mstorsjo/llvm-mingw:latest sh -c "cd /opt && mv llvm-mingw llvm-mingw-$TAG-ucrt-$DISTRO && tar -Jcvf - llvm-mingw-$TAG-ucrt-$DISTRO" > llvm-mingw-$TAG-ucrt-$DISTRO.tar.xz
|
||||
docker run --rm mstorsjo/llvm-mingw:latest sh -c "cd /opt && mv llvm-mingw llvm-mingw-$TAG-ucrt-$DISTRO && tar -Jcvf - --format=ustar --numeric-owner --owner=0 --group=0 llvm-mingw-$TAG-ucrt-$DISTRO" > llvm-mingw-$TAG-ucrt-$DISTRO.tar.xz
|
||||
|
||||
if [ -n "$NATIVEONLY" ]; then
|
||||
exit 0
|
||||
@@ -57,7 +57,7 @@ msvcrt_image=llvm-mingw-msvcrt-$(uuidgen)
|
||||
temp_images="$temp_images $msvcrt_image"
|
||||
time docker build -f Dockerfile.dev -t $msvcrt_image --build-arg DEFAULT_CRT=msvcrt .
|
||||
|
||||
docker run --rm $msvcrt_image sh -c "cd /opt && mv llvm-mingw llvm-mingw-$TAG-msvcrt-$DISTRO && tar -Jcvf - llvm-mingw-$TAG-msvcrt-$DISTRO" > llvm-mingw-$TAG-msvcrt-$DISTRO.tar.xz
|
||||
docker run --rm $msvcrt_image sh -c "cd /opt && mv llvm-mingw llvm-mingw-$TAG-msvcrt-$DISTRO && tar -Jcvf - --format=ustar --numeric-owner --owner=0 --group=0 llvm-mingw-$TAG-msvcrt-$DISTRO" > llvm-mingw-$TAG-msvcrt-$DISTRO.tar.xz
|
||||
|
||||
for arch in i686 x86_64; do
|
||||
temp=$(uuidgen)
|
||||
|
||||
Reference in new issue
Block a user