misc: update podman images

This commit is contained in:
Markus F.X.J. Oberhumer 2023-01-06 01:48:32 +01:00
parent 513b00a30e
commit 696d0eec64
7 changed files with 48 additions and 18 deletions

View File

@ -88,6 +88,12 @@ build/extra/gcc-m64/release: PHONY; $(call run_config_and_build,$@,Release)
build/extra/gcc-m64/%: export CC = gcc -m64
build/extra/gcc-m64/%: export CXX = g++ -m64
# force building with gcc/g++ -mx32
build/extra/gcc-mx32/debug: PHONY; $(call run_config_and_build,$@,Debug)
build/extra/gcc-mx32/release: PHONY; $(call run_config_and_build,$@,Release)
build/extra/gcc-mx32/%: export CC = gcc -mx32
build/extra/gcc-mx32/%: export CXX = g++ -mx32
# cross compiler: Linux glibc aarch64-linux-gnu
build/extra/cross-linux-aarch64/debug: PHONY; $(call run_config_and_build,$@,Debug)
build/extra/cross-linux-aarch64/release: PHONY; $(call run_config_and_build,$@,Release)

View File

@ -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-20221212-v1,
# NOTE: this image is based on rebuild-stubs-with-upx/upx-stubtools-20221212-v2,
# 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-20221212-v1
image=upx-cross-compile-20221212-v2
podman build -t "$image" -f "$argv0dir/Dockerfile" "$argv0dir"

View File

@ -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-20221212-v1
image=upx-cross-compile-20221212-v2
flags=( -ti --read-only --rm )
flags+=( --cap-drop=all ) # drop all capabilities
@ -37,6 +37,12 @@ podman run "${flags[@]}" "$image" bash -l
# rm -rf ./build/extra/cross-windows-mingw64/release
# make build/extra/cross-windows-mingw64/release
# lots of other cross-compilers are installed:
# - see "ls /usr/bin/*g++*"
# - see misc/cross-compile-upx-with-podman/build-all-inside-container.sh
# lots of other cross-compilers are installed; see "ls /usr/bin/*g++*"
# and see misc/cross-compile-upx-with-podman/build-all-inside-container.sh; after
# running that script you can do cool things like:
# cd /home/upx/src/upx/build/cross-compile-upx-with-podman/alpha-linux-gnu/debug
# qemu-alpha -L /usr/alpha-linux-gnu upx --version
# cd /home/upx/src/upx/build/cross-compile-upx-with-podman/hppa-linux-gnu/debug
# qemu-hppa -L /usr/hppa-linux-gnu upx --version
# (similar for many other archs)

View File

@ -1,8 +1,8 @@
# NOTE: this image is based on rebuild-stubs-with-upx/upx-stubtools-20221212-v1,
# NOTE: this image is based on rebuild-stubs-with-upx/upx-stubtools-20221212-v2,
# 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-20221212-v1
ENV UPX_CONTAINER_IMAGE_NAME=upx-cross-compile-20221212-v1
FROM localhost/upx-stubtools-20221212-v2
ENV UPX_CONTAINER_IMAGE_NAME=upx-cross-compile-20221212-v2
ARG DEBIAN_FRONTEND=noninteractive
USER root

View File

@ -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-20221212-v1
image=upx-stubtools-20221212-v2
podman build -t "$image" -f "$argv0dir/Dockerfile" "$argv0dir"

View File

@ -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-20221212-v1
image=upx-stubtools-20221212-v2
flags=( -ti --read-only --rm )
flags+=( --cap-drop=all ) # drop all capabilities
@ -53,8 +53,24 @@ podman run "${flags[@]}" "$image" bash -l
# ./build/extra/gcc/release/upx --version
# make -C build/extra/gcc/release test
# and we can also rebuild the UPX docs the container:
# and we can also rebuild UPX with -m32:
# cd /home/upx/src/upx
# make -C doc clean all
# git status doc
# git diff doc
# rm -rf ./build/extra/gcc-m32/release
# make build/extra/gcc-m32/release
# # run tests
# ./build/extra/gcc-m32/release/upx --version
# make -C build/extra/gcc-m32/release test
# and we can also rebuild UPX with -mx32: (NOTE: needs CONFIG_X86_X32_ABI on host kernel!)
# cd /home/upx/src/upx
# rm -rf ./build/extra/gcc-mx32/release
# make build/extra/gcc-mx32/release
# # run tests (needs CONFIG_X86_X32_ABI on host kernel)
# ./build/extra/gcc-mx32/release/upx --version
# make -C build/extra/gcc-mx32/release test
# and we can also rebuild the UPX docs the container:
# cd /home/upx/src/upx/doc
# make clean all
# git status .
# git diff .

View File

@ -1,5 +1,5 @@
FROM docker.io/library/ubuntu:22.04
ENV UPX_CONTAINER_IMAGE_NAME=upx-stubtools-20221212-v1
ENV UPX_CONTAINER_IMAGE_NAME=upx-stubtools-20221212-v2
ARG DEBIAN_FRONTEND=noninteractive
ENV LANG=C.UTF-8
@ -13,8 +13,10 @@ 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 screen unzip vim zip zlib1g-dev zsh zstd \
7zip bzip2 cmake elfutils file g++ gdb htop libzstd-dev lzip lzop ninja-build \
p7zip patch patchelf pax-utils rsync screen unzip vim zip zlib1g-dev zsh zstd \
# extra packages for compiling with "gcc -m32" and and "gcc -mx32":
gcc-multilib g++-multilib \
&& true
# manually install compat libs from Ubuntu 16.04; REQUIRED