From 741cb3a136cc5158f2d8d7fa87fe238c315b9e0d Mon Sep 17 00:00:00 2001 From: "Markus F.X.J. Oberhumer" Date: Sat, 26 Nov 2022 19:12:26 +0100 Subject: [PATCH] misc: update podman images --- .../10-create-image.sh | 4 ++-- .../20-image-run-shell.sh | 2 +- misc/cross-compile-upx-with-podman/Dockerfile | 8 +++---- .../10-create-image.sh | 2 +- .../20-image-run-shell.sh | 2 +- misc/rebuild-stubs-with-podman/Dockerfile | 22 +++++-------------- 6 files changed, 14 insertions(+), 26 deletions(-) diff --git a/misc/cross-compile-upx-with-podman/10-create-image.sh b/misc/cross-compile-upx-with-podman/10-create-image.sh index 66988c96..77de2c67 100755 --- a/misc/cross-compile-upx-with-podman/10-create-image.sh +++ b/misc/cross-compile-upx-with-podman/10-create-image.sh @@ -6,10 +6,10 @@ argv0=$0; argv0abs="$(readlink -fn "$argv0")"; argv0dir="$(dirname "$argv0abs")" # create the image from Dockerfile # using a rootless Podman container -# NOTE: this image is based on rebuild-stubs-with-upx/upx-stubtools-20210104-vX, +# NOTE: this image is based on rebuild-stubs-with-upx/upx-stubtools-20210104-v8, # so you have to create that image first # WARNING: we install many packages, so the resulting image needs A LOT of disk space! -image=upx-cross-compile-20221108-v7 +image=upx-cross-compile-20221108-v8 podman build -t "$image" -f "$argv0dir/Dockerfile" "$argv0dir" diff --git a/misc/cross-compile-upx-with-podman/20-image-run-shell.sh b/misc/cross-compile-upx-with-podman/20-image-run-shell.sh index aee0f768..a2ab12b9 100755 --- a/misc/cross-compile-upx-with-podman/20-image-run-shell.sh +++ b/misc/cross-compile-upx-with-podman/20-image-run-shell.sh @@ -6,7 +6,7 @@ argv0=$0; argv0abs="$(readlink -fn "$argv0")"; argv0dir="$(dirname "$argv0abs")" # run an interactive shell in the image # using a rootless Podman container -image=upx-cross-compile-20221108-v7 +image=upx-cross-compile-20221108-v8 flags=( -ti --read-only --rm ) flags+=( --cap-drop=all ) # drop all capabilities diff --git a/misc/cross-compile-upx-with-podman/Dockerfile b/misc/cross-compile-upx-with-podman/Dockerfile index 37cbd55d..d5da8558 100644 --- a/misc/cross-compile-upx-with-podman/Dockerfile +++ b/misc/cross-compile-upx-with-podman/Dockerfile @@ -1,7 +1,7 @@ -# NOTE: this image is based on rebuild-stubs-with-upx/upx-stubtools-20210104-vX, +# NOTE: this image is based on rebuild-stubs-with-upx/upx-stubtools-20210104-v8, # so you have to create that image first # WARNING: we install many packages, so the resulting image needs A LOT of disk space! -FROM localhost/upx-stubtools-20210104-v7 +FROM localhost/upx-stubtools-20210104-v8 ARG DEBIAN_FRONTEND=noninteractive USER root @@ -9,7 +9,7 @@ USER root # Ubuntu 22.04 RUN apt-get update && apt-get upgrade -y \ && apt-get install -y \ - # Linux cross compilers + # Linux glibc cross compilers g++-aarch64-linux-gnu \ g++-alpha-linux-gnu \ g++-arm-linux-gnueabi \ @@ -28,7 +28,7 @@ RUN apt-get update && apt-get upgrade -y \ g++-s390x-linux-gnu \ g++-sh4-linux-gnu \ g++-sparc64-linux-gnu \ - # Linux cross compilers - ILP32 on 64-bit CPUs + # Linux glibc cross compilers - ILP32 on 64-bit CPUs g++-x86-64-linux-gnux32 \ # Windows cross compilers g++-mingw-w64-i686 \ diff --git a/misc/rebuild-stubs-with-podman/10-create-image.sh b/misc/rebuild-stubs-with-podman/10-create-image.sh index 9a89b858..3efbfc02 100755 --- a/misc/rebuild-stubs-with-podman/10-create-image.sh +++ b/misc/rebuild-stubs-with-podman/10-create-image.sh @@ -6,7 +6,7 @@ argv0=$0; argv0abs="$(readlink -fn "$argv0")"; argv0dir="$(dirname "$argv0abs")" # create the image from Dockerfile # using a rootless Podman container -image=upx-stubtools-20210104-v7 +image=upx-stubtools-20210104-v8 podman build -t "$image" -f "$argv0dir/Dockerfile" "$argv0dir" diff --git a/misc/rebuild-stubs-with-podman/20-image-run-shell.sh b/misc/rebuild-stubs-with-podman/20-image-run-shell.sh index 52abf3fc..d1e0a8dd 100755 --- a/misc/rebuild-stubs-with-podman/20-image-run-shell.sh +++ b/misc/rebuild-stubs-with-podman/20-image-run-shell.sh @@ -6,7 +6,7 @@ argv0=$0; argv0abs="$(readlink -fn "$argv0")"; argv0dir="$(dirname "$argv0abs")" # run an interactive shell in the image # using a rootless Podman container -image=upx-stubtools-20210104-v7 +image=upx-stubtools-20210104-v8 flags=( -ti --read-only --rm ) flags+=( --cap-drop=all ) # drop all capabilities diff --git a/misc/rebuild-stubs-with-podman/Dockerfile b/misc/rebuild-stubs-with-podman/Dockerfile index 907cc414..ea8f0496 100644 --- a/misc/rebuild-stubs-with-podman/Dockerfile +++ b/misc/rebuild-stubs-with-podman/Dockerfile @@ -12,8 +12,8 @@ RUN dpkg --add-architecture i386 \ # the following packages are not required for rebuilding the stubs, but # they do make the image much more convenient and also allow building # the full UPX binary inside the container via CMake: - 7zip bzip2 cmake elfutils file g++ htop libzstd-dev lzip lzop ninja-build \ - p7zip patch patchelf pax-utils rsync unzip vim zip zlib1g-dev zsh zstd \ + 7zip bzip2 cmake elfutils file g++ htop libzstd-dev lzip lzop ninja-build p7zip \ + patch patchelf pax-utils rsync screen unzip vim zip zlib1g-dev zsh zstd \ && true # manually install compat libs from Ubuntu 16.04; REQUIRED @@ -41,22 +41,10 @@ RUN cd /root \ # install pre-built binary UPX versions into /usr/local/bin; not required but convenient for testing RUN cd /root \ && wget -q https://github.com/upx/upx/releases/download/v3.91/upx-3.91-amd64_linux.tar.bz2 \ - && wget -q https://github.com/upx/upx/releases/download/v3.92/upx-3.92-amd64_linux.tar.xz \ - && wget -q https://github.com/upx/upx/releases/download/v3.93/upx-3.93-amd64_linux.tar.xz \ - && wget -q https://github.com/upx/upx/releases/download/v3.94/upx-3.94-amd64_linux.tar.xz \ - && wget -q https://github.com/upx/upx/releases/download/v3.95/upx-3.95-amd64_linux.tar.xz \ - && wget -q https://github.com/upx/upx/releases/download/v3.96/upx-3.96-amd64_linux.tar.xz \ - && wget -q https://github.com/upx/upx/releases/download/v4.0.0/upx-4.0.0-amd64_linux.tar.xz \ + && for v in 3.92 3.93 3.94 3.95 3.96 4.0.0 4.0.1; do wget -q https://github.com/upx/upx/releases/download/v${v}/upx-${v}-amd64_linux.tar.xz; done \ && for f in ./upx-*.tar.*; do tar -xoaf $f; done \ - && rm ./upx-*.tar.* \ - && d=upx-3.91-amd64_linux; ./$d/upx -d $d/upx -o /usr/local/bin/upx-3.91 \ - && d=upx-3.92-amd64_linux; ./$d/upx -d $d/upx -o /usr/local/bin/upx-3.92 \ - && d=upx-3.93-amd64_linux; ./$d/upx -d $d/upx -o /usr/local/bin/upx-3.93 \ - && d=upx-3.94-amd64_linux; ./$d/upx -d $d/upx -o /usr/local/bin/upx-3.94 \ - && d=upx-3.95-amd64_linux; ./$d/upx -d $d/upx -o /usr/local/bin/upx-3.95 \ - && d=upx-3.96-amd64_linux; ./$d/upx -d $d/upx -o /usr/local/bin/upx-3.96 \ - && d=upx-4.0.0-amd64_linux; ./$d/upx -d $d/upx -o /usr/local/bin/upx-4.0.0 \ - && rm -rf ./upx-*linux \ + && for v in 3.91 3.92 3.93 3.94 3.95 3.96 4.0.0 4.0.1; do d=upx-${v}-amd64_linux; ./$d/upx -qq -d $d/upx -o /usr/local/bin/upx-${v}; done \ + && rm -r ./upx-*.tar.* ./upx-*linux \ && true # create default user upx 2000:2000