diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index b8a49568..cecaf00d 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -9,7 +9,7 @@ name: 'CI' on: [push, workflow_dispatch] env: - CMAKE_REQUIRED_QUIET: 0 + CMAKE_REQUIRED_QUIET: OFF DEBIAN_FRONTEND: noninteractive UPX_CMAKE_BUILD_FLAGS: --verbose # 2023-07-15 diff --git a/.github/workflows/static-analyzer-clang-analyzer.yml b/.github/workflows/static-analyzer-clang-analyzer.yml index 56262a1d..f02bd1e4 100644 --- a/.github/workflows/static-analyzer-clang-analyzer.yml +++ b/.github/workflows/static-analyzer-clang-analyzer.yml @@ -5,7 +5,7 @@ on: schedule: [cron: '10 5 * * 3'] # run weekly Wednesday 05:10 UTC workflow_dispatch: env: - CMAKE_REQUIRED_QUIET: 0 + CMAKE_REQUIRED_QUIET: OFF DEBIAN_FRONTEND: noninteractive jobs: diff --git a/.github/workflows/static-analyzer-clang-tidy.yml b/.github/workflows/static-analyzer-clang-tidy.yml index e89279fd..4151526c 100644 --- a/.github/workflows/static-analyzer-clang-tidy.yml +++ b/.github/workflows/static-analyzer-clang-tidy.yml @@ -5,7 +5,7 @@ on: schedule: [cron: '30 5 * * 3'] # run weekly Wednesday 05:30 UTC workflow_dispatch: env: - CMAKE_REQUIRED_QUIET: 0 + CMAKE_REQUIRED_QUIET: OFF DEBIAN_FRONTEND: noninteractive jobs: diff --git a/.github/workflows/static-analyzer-codeql.yml b/.github/workflows/static-analyzer-codeql.yml index f2db4095..d2b0ae59 100644 --- a/.github/workflows/static-analyzer-codeql.yml +++ b/.github/workflows/static-analyzer-codeql.yml @@ -5,7 +5,7 @@ on: schedule: [cron: '50 5 * * 3'] # run weekly Wednesday 05:50 UTC workflow_dispatch: env: - CMAKE_REQUIRED_QUIET: 0 + CMAKE_REQUIRED_QUIET: OFF DEBIAN_FRONTEND: noninteractive jobs: diff --git a/.github/workflows/test-alpine-linux.yml b/.github/workflows/test-alpine-linux.yml index 09c6a2a0..c03451c3 100644 --- a/.github/workflows/test-alpine-linux.yml +++ b/.github/workflows/test-alpine-linux.yml @@ -6,7 +6,7 @@ name: 'Test - Minimal Alpine build' on: [workflow_dispatch] env: - CMAKE_REQUIRED_QUIET: 0 + CMAKE_REQUIRED_QUIET: OFF DEBIAN_FRONTEND: noninteractive jobs: diff --git a/.github/workflows/test-cmake-default.yml b/.github/workflows/test-cmake-default.yml index bf6af485..82bae60a 100644 --- a/.github/workflows/test-cmake-default.yml +++ b/.github/workflows/test-cmake-default.yml @@ -3,7 +3,7 @@ name: 'Test - CMake default build type' on: [workflow_dispatch] env: - CMAKE_REQUIRED_QUIET: 0 + CMAKE_REQUIRED_QUIET: OFF DEBIAN_FRONTEND: noninteractive jobs: diff --git a/.github/workflows/weekly-ci-alpine-linux.yml b/.github/workflows/weekly-ci-alpine-linux.yml index 90f70922..543e0141 100644 --- a/.github/workflows/weekly-ci-alpine-linux.yml +++ b/.github/workflows/weekly-ci-alpine-linux.yml @@ -13,7 +13,7 @@ on: schedule: [cron: '05 4 * * 3'] # run weekly Wednesday 04:05 UTC workflow_dispatch: env: - CMAKE_REQUIRED_QUIET: 0 + CMAKE_REQUIRED_QUIET: OFF DEBIAN_FRONTEND: noninteractive jobs: @@ -54,7 +54,8 @@ jobs: - name: 'Update environment' run: | - echo "UPX_CMAKE_CONFIG_FLAGS=-DCMAKE_VERBOSE_MAKEFILE=ON -DUPX_CONFIG_DISABLE_C_STANDARD=ON -DUPX_CONFIG_DISABLE_CXX_STANDARD=ON" >> $GITHUB_ENV + echo "UPX_CONFIG_DISABLE_C_STANDARD=ON" >> $GITHUB_ENV + echo "UPX_CONFIG_DISABLE_CXX_STANDARD=ON" >> $GITHUB_ENV # build with C17 and C++20 on alpine:edge - name: ${{ format('Build clang C++20 Release with {0}', env.clang_package) }} diff --git a/.github/workflows/weekly-ci-cmake-macos-xcode.yml b/.github/workflows/weekly-ci-cmake-macos-xcode.yml index 84353195..e79a89c6 100644 --- a/.github/workflows/weekly-ci-cmake-macos-xcode.yml +++ b/.github/workflows/weekly-ci-cmake-macos-xcode.yml @@ -6,7 +6,7 @@ on: schedule: [cron: '20 4 * * 3'] # run weekly Wednesday 04:20 UTC workflow_dispatch: env: - CMAKE_REQUIRED_QUIET: 0 + CMAKE_REQUIRED_QUIET: OFF DEBIAN_FRONTEND: noninteractive jobs: diff --git a/.github/workflows/weekly-ci-cmake-windows-nmake.yml b/.github/workflows/weekly-ci-cmake-windows-nmake.yml index 40cd0e01..4766d742 100644 --- a/.github/workflows/weekly-ci-cmake-windows-nmake.yml +++ b/.github/workflows/weekly-ci-cmake-windows-nmake.yml @@ -6,7 +6,7 @@ on: schedule: [cron: '30 4 * * 3'] # run weekly Wednesday 04:30 UTC workflow_dispatch: env: - CMAKE_REQUIRED_QUIET: 0 + CMAKE_REQUIRED_QUIET: OFF DEBIAN_FRONTEND: noninteractive jobs: diff --git a/.github/workflows/weekly-ci-zigcc.yml b/.github/workflows/weekly-ci-zigcc.yml index b8482ecb..ba6ae0d9 100644 --- a/.github/workflows/weekly-ci-zigcc.yml +++ b/.github/workflows/weekly-ci-zigcc.yml @@ -6,7 +6,7 @@ on: schedule: [cron: '40 4 * * 3'] # run weekly Wednesday 04:40 UTC workflow_dispatch: env: - CMAKE_REQUIRED_QUIET: 0 + CMAKE_REQUIRED_QUIET: OFF DEBIAN_FRONTEND: noninteractive # 2023-07-15 ZIG_DIST_VERSION: 0.11.0-dev.4002+7dd1cf26f diff --git a/.gitignore b/.gitignore index 5fe0b25b..fa48ea38 100644 --- a/.gitignore +++ b/.gitignore @@ -12,8 +12,8 @@ Makevars.local* tmp* *.a -*.d *.bz2 +*.d *.dll *.dylib *.exe @@ -23,6 +23,7 @@ tmp* *.o *.obj *.out +*.patch *.py[cdo] *.rar *.so diff --git a/CMakeLists.txt b/CMakeLists.txt index 83340692..9f510a03 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -48,20 +48,48 @@ if(IS_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/.git" AND NOT MSVC_IDE) endif() endif() +# useful for CI jobs: allow settings via environment and cache result +function(upx_cache_bool_vars default_value) + list(REMOVE_AT ARGV 0) + foreach(var ${ARGV}) + set(value ${default_value}) + if(DEFINED UPX_CACHE_${var}) + set(value "${UPX_CACHE_${var}}") + elseif(DEFINED ${var}) + set(value "${${var}}") + elseif("$ENV{${var}}" MATCHES "^(0|1|OFF|ON|FALSE|TRUE)$") + set(value "$ENV{${var}}") + set(UPX_CACHE_ORIGIN_FROM_ENV_${var} TRUE CACHE INTERNAL "" FORCE) + endif() + if(value) + set(value ON) + else() + set(value OFF) + endif() + if(UPX_CACHE_ORIGIN_FROM_ENV_${var}) + message(STATUS "setting from environment: ${var} = ${value}") + endif() + set(${var} "${value}" PARENT_SCOPE) + set(UPX_CACHE_${var} "${value}" CACHE INTERNAL "" FORCE) + endforeach() +endfunction() + # global settings -set(CMAKE_C_STANDARD_REQUIRED ON) -set(CMAKE_CXX_STANDARD_REQUIRED ON) -set(CMAKE_EXPORT_COMPILE_COMMANDS ON) -if(${CMAKE_VERSION} VERSION_GREATER "3.14.7") +if(${CMAKE_VERSION} VERSION_GREATER "3.14.7" AND NOT DEFINED CMAKE_MSVC_RUNTIME_LIBRARY) set(CMAKE_MSVC_RUNTIME_LIBRARY "MultiThreaded") cmake_policy(SET CMP0091 NEW) endif() -if(NOT DEFINED CMAKE_REQUIRED_QUIET) - set(CMAKE_REQUIRED_QUIET ON) - if("$ENV{CMAKE_REQUIRED_QUIET}" MATCHES "^(0|1|OFF|ON)$") - set(CMAKE_REQUIRED_QUIET "$ENV{CMAKE_REQUIRED_QUIET}") - endif() -endif() +# global CMake settings that default to ON +upx_cache_bool_vars(ON + CMAKE_C_STANDARD_REQUIRED CMAKE_CXX_STANDARD_REQUIRED + CMAKE_EXPORT_COMPILE_COMMANDS CMAKE_REQUIRED_QUIET +) +# internal UPX settings that default to OFF +upx_cache_bool_vars(OFF + UPX_CONFIG_CMAKE_DISABLE_TEST UPX_CONFIG_CMAKE_DISABLE_INSTALL + UPX_CONFIG_CMAKE_DISABLE_PRINT_INFO UPX_CONFIG_CMAKE_DISABLE_PLATFORM_CHECK + UPX_CONFIG_DISABLE_C_STANDARD UPX_CONFIG_DISABLE_CXX_STANDARD +) # determine Git revision set(GITREV_SHORT "") @@ -389,11 +417,10 @@ if(NOT CMAKE_CROSSCOMPILING) endif() if(NOT CMAKE_CROSSCOMPILING AND NOT UPX_CONFIG_DISABLE_SELF_PACK_TEST) # IMPORTANT NOTE: these tests can only work if the host executable format is supported by UPX! - function(upx_add_test) - set(name ${ARGV0}) + function(upx_add_test name) list(REMOVE_AT ARGV 0) - add_test(NAME ${name} COMMAND ${ARGV}) - set_tests_properties(${name} PROPERTIES RUN_SERIAL TRUE) # run these tests sequentially + add_test(NAME "${name}" COMMAND ${ARGV}) + set_tests_properties("${name}" PROPERTIES RUN_SERIAL TRUE) # run these tests sequentially endfunction() set(exe ${CMAKE_EXECUTABLE_SUFFIX}) set(upx_self_exe "$") @@ -445,9 +472,9 @@ endif() # UPX_CONFIG_CMAKE_DISABLE_INSTALL #*********************************************************************** function(print_var) - foreach(v ${ARGV}) - if(${v}) - message(STATUS "${v} = ${${v}}") + foreach(var ${ARGV}) + if(${var}) + message(STATUS "${var} = ${${var}}") endif() endforeach() endfunction() diff --git a/misc/cross-compile-upx-with-podman/Dockerfile b/misc/cross-compile-upx-with-podman/Dockerfile index f87e2bc5..caa4caba 100644 --- a/misc/cross-compile-upx-with-podman/Dockerfile +++ b/misc/cross-compile-upx-with-podman/Dockerfile @@ -50,5 +50,5 @@ RUN cd /usr/bin \ && ln -s -v ../../bin/yaml2obj-14 /usr/local/bin/llvm-yaml2obj \ && true -# switch back to default user upx 2000:2000 +# switch back to default user upx:upx 2000:2000 USER upx diff --git a/misc/rebuild-stubs-with-podman/Dockerfile b/misc/rebuild-stubs-with-podman/Dockerfile index c9ff96b1..10a5202a 100644 --- a/misc/rebuild-stubs-with-podman/Dockerfile +++ b/misc/rebuild-stubs-with-podman/Dockerfile @@ -50,11 +50,11 @@ RUN cd /root \ && rm -r ./upx-*.tar.* ./upx-*linux \ && true -# create default user upx 2000:2000 +# create default user upx:upx 2000:2000 RUN useradd upx -U --uid 2000 --shell /bin/bash -m \ && cd /home/upx && chmod 00700 . \ # prepare ~/.cache and ~/.local for possible tmpfs mounts - && mkdir -p .cache .local src/upx \ + && mkdir -p .cache/tmp .local/bin src/upx \ && for d in ccache fontconfig go-build mesa_shader_cache tmp wine zig; do mkdir -p .cache/$d; done \ && for d in bin include lib share state; do mkdir -p .local/$d; done \ && ln -s .cache/wine .wine && ln -s .cache/tmp tmp \ diff --git a/misc/rebuild-stubs-with-podman/packages.txt b/misc/rebuild-stubs-with-podman/packages.txt index cceda5ed..8c0beced 100644 --- a/misc/rebuild-stubs-with-podman/packages.txt +++ b/misc/rebuild-stubs-with-podman/packages.txt @@ -308,11 +308,11 @@ ii universal-ctags 5.9.20210829.0-1 amd64 ii unzip 6.0-26ubuntu3.1 amd64 De-archiver for .zip files ii usrmerge 25ubuntu2 all Convert the system to the merged /usr directories scheme ii util-linux 2.37.2-4ubuntu3 amd64 miscellaneous system utilities -ii vim 2:8.2.3995-1ubuntu2.8 amd64 Vi IMproved - enhanced vi editor -ii vim-common 2:8.2.3995-1ubuntu2.8 all Vi IMproved - Common files -ii vim-runtime 2:8.2.3995-1ubuntu2.8 all Vi IMproved - Runtime files +ii vim 2:8.2.3995-1ubuntu2.9 amd64 Vi IMproved - enhanced vi editor +ii vim-common 2:8.2.3995-1ubuntu2.9 all Vi IMproved - Common files +ii vim-runtime 2:8.2.3995-1ubuntu2.9 all Vi IMproved - Runtime files ii wget 1.21.2-2ubuntu1 amd64 retrieves files from the web -ii xxd 2:8.2.3995-1ubuntu2.8 amd64 tool to make (or reverse) a hex dump +ii xxd 2:8.2.3995-1ubuntu2.9 amd64 tool to make (or reverse) a hex dump ii xz-utils 5.2.5-2ubuntu1 amd64 XZ-format compression utilities ii yash 2.51-1 amd64 yet another shell ii zip 3.0-12build2 amd64 Archiver for .zip files diff --git a/misc/test-qemu-with-podman/test-qemu2-alpine/10-create-image.sh b/misc/test-qemu-with-podman/test-qemu2-alpine/10-create-image.sh new file mode 100755 index 00000000..6df7e738 --- /dev/null +++ b/misc/test-qemu-with-podman/test-qemu2-alpine/10-create-image.sh @@ -0,0 +1,16 @@ +#! /usr/bin/env bash +## vim:set ts=4 sw=4 et: +set -e; set -o pipefail +argv0=$0; argv0abs="$(readlink -fn "$argv0")"; argv0dir="$(dirname "$argv0abs")" + +# create the image from Dockerfile +# using a rootless Podman container + +image=upx-test-qemu2-alpine-20230708-v1 +[[ $1 == --print-image ]] && echo "$image" && exit 0 + +podman build --squash -t "$image" -f "$argv0dir/Dockerfile" "$argv0dir" + +podman image list "$image" +echo +podman image tree "$image" diff --git a/misc/test-qemu-with-podman/test-qemu2-alpine/11-list-packages.sh b/misc/test-qemu-with-podman/test-qemu2-alpine/11-list-packages.sh new file mode 100755 index 00000000..58445cc0 --- /dev/null +++ b/misc/test-qemu-with-podman/test-qemu2-alpine/11-list-packages.sh @@ -0,0 +1,19 @@ +#! /usr/bin/env bash +## vim:set ts=4 sw=4 et: +set -e; set -o pipefail +argv0=$0; argv0abs="$(readlink -fn "$argv0")"; argv0dir="$(dirname "$argv0abs")" + +# list all system packages that are installed in the image +# using a rootless Podman container + +image="$("$argv0dir/10-create-image.sh" --print-image)" + +podman image list "$image" +echo +podman image tree "$image" + +echo 'Packages:' +flags=( --read-only --rm --pull=never ) +flags+=( --cap-drop=all ) # drop all capabilities +flags+=( --network=none ) # no network needed +podman run "${flags[@]}" "$image" bash -c $'apk info -v | sed \'s/ *$//\' | LC_ALL=C sort' diff --git a/misc/test-qemu-with-podman/test-qemu2-alpine/20-image-run-shell.sh b/misc/test-qemu-with-podman/test-qemu2-alpine/20-image-run-shell.sh new file mode 100755 index 00000000..1f83802d --- /dev/null +++ b/misc/test-qemu-with-podman/test-qemu2-alpine/20-image-run-shell.sh @@ -0,0 +1,37 @@ +#! /usr/bin/env bash +## vim:set ts=4 sw=4 et: +set -e; set -o pipefail +argv0=$0; argv0abs="$(readlink -fn "$argv0")"; argv0dir="$(dirname "$argv0abs")" + +# run an interactive shell in the image +# using a rootless Podman container + +image="$("$argv0dir/10-create-image.sh" --print-image)" + +flags=( --read-only --rm --pull=never ) +flags+=( --cap-drop=all ) # drop all capabilities +flags+=( --network=none ) # no network needed +flags+=( -ti -e TERM="$TERM" ) # allocate an interactive pseudo-tty and pass $TERM +if [[ 1 == 1 ]]; then + # run as user upx 2000:2000 + flags+=( --user 2000 ) + # map container users 0..999 to subuid-users 1..1000, and map container user 2000 to current host user + flags+=( --uidmap=0:1:1000 --uidmap=2000:0:1 ) + # map container groups 0..999 to subgid-groups 1..1000, and map container group 2000 to current host group + flags+=( --gidmap=0:1:1000 --gidmap=2000:0:1 ) + # NOTE: we mount the upx top-level directory read-write under /home/upx/src/upx + # INFO: SELinux users *may* have to add ":z" to the volume mount flags; check the docs! + flags+=( -v "${argv0dir}/../../..:/home/upx/src/upx" ) + flags+=( -w /home/upx/src/upx ) # set working directory + flags+=( --tmpfs /home/upx/.cache:rw,exec ) # mount a writeable tmpfs + flags+=( --tmpfs /home/upx/.local:rw,exec ) # mount a writeable tmpfs +else + # run as user root 0:0 + # ONLY FOR DEBUGGING THE IMAGE + # map container user/group 0 to current host user/group + flags+=( --user 0 ) +fi + +podman run "${flags[@]}" "$image" bash -l + +# please see usage instructions in ../README.md diff --git a/misc/test-qemu-with-podman/test-qemu2-alpine/Dockerfile b/misc/test-qemu-with-podman/test-qemu2-alpine/Dockerfile new file mode 100644 index 00000000..567e4d56 --- /dev/null +++ b/misc/test-qemu-with-podman/test-qemu2-alpine/Dockerfile @@ -0,0 +1,26 @@ +FROM docker.io/library/alpine:3.8 + +# install qemu-2.12.0-r3 and some utils +RUN apk update && apk upgrade && apk add \ + bash-completion \ + musl-dbg \ + qemu-aarch64 \ + qemu-arm \ + qemu-armeb \ + qemu-i386 \ + qemu-mips \ + qemu-mipsel \ + qemu-ppc \ + qemu-ppc64 \ + qemu-ppc64le \ + qemu-x86_64 \ + strace \ + && true + +# create default user upx:upx 2000:2000 +RUN adduser upx -u 2000 -D \ + && cd /home/upx && chmod 00700 . \ + && mkdir -p .cache/tmp .local/bin src/upx \ + && chown -R upx:upx . \ + && true +USER upx diff --git a/misc/test-qemu-with-podman/test-qemu3-alpine/Dockerfile b/misc/test-qemu-with-podman/test-qemu3-alpine/Dockerfile index fac27809..af394426 100644 --- a/misc/test-qemu-with-podman/test-qemu3-alpine/Dockerfile +++ b/misc/test-qemu-with-podman/test-qemu3-alpine/Dockerfile @@ -1,6 +1,6 @@ FROM docker.io/library/alpine:3.9 -# install qemu 3.1.0-r3 and some utils +# install qemu-3.1.0-r3 and some utils RUN apk update && apk upgrade && apk add \ bash-completion \ musl-dbg \ @@ -17,10 +17,10 @@ RUN apk update && apk upgrade && apk add \ strace \ && true -# create default user upx 2000:2000 +# create default user upx:upx 2000:2000 RUN adduser upx -u 2000 -D \ && cd /home/upx && chmod 00700 . \ - && mkdir -p .cache .local/bin src/upx \ + && mkdir -p .cache/tmp .local/bin src/upx \ && chown -R upx:upx . \ && true USER upx diff --git a/misc/test-qemu-with-podman/test-qemu4-alpine/Dockerfile b/misc/test-qemu-with-podman/test-qemu4-alpine/Dockerfile index 981c5aa6..000f6537 100644 --- a/misc/test-qemu-with-podman/test-qemu4-alpine/Dockerfile +++ b/misc/test-qemu-with-podman/test-qemu4-alpine/Dockerfile @@ -1,6 +1,6 @@ FROM docker.io/library/alpine:3.11 -# install qemu 4.2.0-r0 and some utils +# install qemu-4.2.0-r0 and some utils RUN apk update && apk upgrade && apk add \ bash-completion \ musl-dbg \ @@ -17,10 +17,10 @@ RUN apk update && apk upgrade && apk add \ strace \ && true -# create default user upx 2000:2000 +# create default user upx:upx 2000:2000 RUN adduser upx -u 2000 -D \ && cd /home/upx && chmod 00700 . \ - && mkdir -p .cache .local/bin src/upx \ + && mkdir -p .cache/tmp .local/bin src/upx \ && chown -R upx:upx . \ && true USER upx diff --git a/misc/test-qemu-with-podman/test-qemu5-alpine/Dockerfile b/misc/test-qemu-with-podman/test-qemu5-alpine/Dockerfile index d654b33e..de9c3aa7 100644 --- a/misc/test-qemu-with-podman/test-qemu5-alpine/Dockerfile +++ b/misc/test-qemu-with-podman/test-qemu5-alpine/Dockerfile @@ -1,6 +1,6 @@ FROM docker.io/library/alpine:3.13 -# install qemu 5.2.0-r3 and some utils +# install qemu-5.2.0-r3 and some utils RUN apk update && apk upgrade && apk add \ bash-completion \ musl-dbg \ @@ -17,10 +17,10 @@ RUN apk update && apk upgrade && apk add \ strace \ && true -# create default user upx 2000:2000 +# create default user upx:upx 2000:2000 RUN adduser upx -u 2000 -D \ && cd /home/upx && chmod 00700 . \ - && mkdir -p .cache .local/bin src/upx \ + && mkdir -p .cache/tmp .local/bin src/upx \ && chown -R upx:upx . \ && true USER upx diff --git a/misc/test-qemu-with-podman/test-qemu6-alpine/Dockerfile b/misc/test-qemu-with-podman/test-qemu6-alpine/Dockerfile index 7e341f6a..865bb234 100644 --- a/misc/test-qemu-with-podman/test-qemu6-alpine/Dockerfile +++ b/misc/test-qemu-with-podman/test-qemu6-alpine/Dockerfile @@ -1,6 +1,6 @@ FROM docker.io/library/alpine:3.15 -# install qemu 6.1.1-r0 and some utils +# install qemu-6.1.1-r0 and some utils RUN apk update && apk upgrade && apk add \ bash-completion \ musl-dbg \ @@ -17,10 +17,10 @@ RUN apk update && apk upgrade && apk add \ strace \ && true -# create default user upx 2000:2000 +# create default user upx:upx 2000:2000 RUN adduser upx -u 2000 -D \ && cd /home/upx && chmod 00700 . \ - && mkdir -p .cache .local/bin src/upx \ + && mkdir -p .cache/tmp .local/bin src/upx \ && chown -R upx:upx . \ && true USER upx diff --git a/misc/test-qemu-with-podman/test-qemu7-alpine/Dockerfile b/misc/test-qemu-with-podman/test-qemu7-alpine/Dockerfile index deb1c243..d8ced8a5 100644 --- a/misc/test-qemu-with-podman/test-qemu7-alpine/Dockerfile +++ b/misc/test-qemu-with-podman/test-qemu7-alpine/Dockerfile @@ -1,6 +1,6 @@ FROM docker.io/library/alpine:3.17 -# install qemu 7.1.0-r7 and some utils +# install qemu-7.1.0-r7 and some utils RUN apk update && apk upgrade && apk add \ bash-completion \ musl-dbg \ @@ -17,10 +17,10 @@ RUN apk update && apk upgrade && apk add \ strace \ && true -# create default user upx 2000:2000 +# create default user upx:upx 2000:2000 RUN adduser upx -u 2000 -D \ && cd /home/upx && chmod 00700 . \ - && mkdir -p .cache .local/bin src/upx \ + && mkdir -p .cache/tmp .local/bin src/upx \ && chown -R upx:upx . \ && true USER upx diff --git a/misc/test-qemu-with-podman/test-qemu8-alpine/Dockerfile b/misc/test-qemu-with-podman/test-qemu8-alpine/Dockerfile index 1429fb5e..a764603d 100644 --- a/misc/test-qemu-with-podman/test-qemu8-alpine/Dockerfile +++ b/misc/test-qemu-with-podman/test-qemu8-alpine/Dockerfile @@ -1,6 +1,6 @@ FROM docker.io/library/alpine:3.18 -# install qemu 8.0.3-r0 and some utils +# install qemu-8.0.3-r0 and some utils RUN apk update && apk upgrade && apk add \ bash-completion \ musl-dbg \ @@ -17,10 +17,10 @@ RUN apk update && apk upgrade && apk add \ strace \ && true -# create default user upx 2000:2000 +# create default user upx:upx 2000:2000 RUN adduser upx -u 2000 -D \ && cd /home/upx && chmod 00700 . \ - && mkdir -p .cache .local/bin src/upx \ + && mkdir -p .cache/tmp .local/bin src/upx \ && chown -R upx:upx . \ && true USER upx