Compare commits

...

69 Commits

Author SHA1 Message Date
Markus F.X.J. Oberhumer 099c3d829e all: prepare for release. 2024-01-03 18:43:18 +01:00
Markus F.X.J. Oberhumer a1a6d02b6f all: tired of CI updates 2024-01-03 18:01:56 +01:00
Markus F.X.J. Oberhumer f2ad7fb9c4 testsuite: update checksums caused by version bump 2024-01-03 18:00:07 +01:00
Markus F.X.J. Oberhumer 1bcf709fcf all: bump version date 2024-01-03 17:54:43 +01:00
Markus F.X.J. Oberhumer 47fc230893 all: welcome 2024 2024-01-03 17:47:25 +01:00
Markus F.X.J. Oberhumer be05d85570 submodules: update for new versions 2024-01-03 17:44:57 +01:00
Markus F.X.J. Oberhumer f598fa13a9 clang-format 2024-01-03 17:36:43 +01:00
Markus F.X.J. Oberhumer 568859d16f CI updates 2024-01-03 17:31:16 +01:00
Markus F.X.J. Oberhumer b5ed0a637b CI updates 2023-12-29 10:02:46 +01:00
Markus F.X.J. Oberhumer 17eff0aed4 CI updates 2023-12-29 05:45:00 +01:00
Markus F.X.J. Oberhumer 0a3f048eed CI updates 2023-12-29 05:14:03 +01:00
Markus F.X.J. Oberhumer 3cde897557 Improve testsuite. 2023-12-28 21:44:53 +01:00
Markus F.X.J. Oberhumer 0500e7d016 CI updates; cxxlib.h cleanups 2023-12-28 04:42:41 +01:00
Markus F.X.J. Oberhumer 778663ae69 CI updates 2023-12-21 23:01:52 +01:00
Markus F.X.J. Oberhumer 636cefb9f3 cmake update 2023-12-20 18:49:34 +01:00
Markus F.X.J. Oberhumer 1236776aa2 cmake update 2023-12-20 12:16:25 +01:00
Markus F.X.J. Oberhumer 51a6a5cca5 src: rename ptr_reinterpret_cast to ptr_static_cast; misc cleanups 2023-12-20 11:44:01 +01:00
Markus F.X.J. Oberhumer 3326c86e91 cmake update 2023-12-19 16:11:23 +01:00
Markus F.X.J. Oberhumer b0dbc3fe39 submodules: update for new versions 2023-12-19 16:10:32 +01:00
Markus F.X.J. Oberhumer decc1efb74 CI updates 2023-12-17 07:35:39 +01:00
Markus F.X.J. Oberhumer 2cf1c32d18 CI updates 2023-12-13 18:52:55 +01:00
Markus F.X.J. Oberhumer fc6e3840b7 CI updates 2023-12-09 08:52:25 +01:00
Markus F.X.J. Oberhumer 5e85c1a11b submodules: update for new versions 2023-12-09 08:34:48 +01:00
Markus F.X.J. Oberhumer 468bfce599 submodules: update for new versions 2023-12-02 01:52:32 +01:00
Markus F.X.J. Oberhumer 1e6e4043ed CI updates and minor cleanups. 2023-12-02 01:48:26 +01:00
John Reiser 67564513d2 Update because of age and evolution.
modified:   elf-to-mem.txt
2023-11-30 11:10:24 -08:00
John Reiser ed2633bf95 Honor .p_align <= 64K; else assume 4K is also available
https://github.com/upx/upx/issues/737
	modified:   p_lx_elf.cpp
2023-11-26 11:46:12 -08:00
Markus F.X.J. Oberhumer 3e70021406 all: more minor cleanups 2023-11-26 18:30:47 +01:00
Markus F.X.J. Oberhumer bf8dd31914 all: minor cleanups 2023-11-21 20:29:54 +01:00
John Reiser d4e94f5086 Fix varying page size on arm64
https://github.com/upx/upx/issues/734
	modified:   stub/src/amd64-linux.elf-fold.S
	modified:   stub/src/amd64-linux.elf-main.c
	modified:   stub/src/arm64-linux.elf-entry.S
	modified:   stub/src/arm64-linux.elf-fold.S
	modified:   ../misc/testsuite/upx_testsuite_1-expected_sha256sums.sh
          ... plus associated stub/*.h etc
2023-11-17 15:10:31 -08:00
John Reiser ae77fd60bb initial headway is limited by both file_size and mhcmdi.sizeofcmds
https://github.com/upx/upx/issues/732
	modified:   p_mach.cpp
2023-11-17 07:28:21 -08:00
Markus F.X.J. Oberhumer e79c790264 CI updates 2023-11-17 11:50:52 +01:00
Markus F.X.J. Oberhumer 46029bb8a0 CI updates 2023-11-15 13:06:29 +01:00
Markus F.X.J. Oberhumer f74c225338 CI updates 2023-11-14 19:15:34 +01:00
Markus F.X.J. Oberhumer c479fe32b3 cmake update 2023-11-13 11:29:17 +01:00
Markus F.X.J. Oberhumer dc23ee0ad2 submodules: update for new versions 2023-11-08 11:48:39 +01:00
Markus F.X.J. Oberhumer a5c32db01b CI updates 2023-11-08 11:25:23 +01:00
Markus F.X.J. Oberhumer d7142312c9 CI updates 2023-11-08 10:08:19 +01:00
Markus F.X.J. Oberhumer 283ab0e7ea CI updates and assorted cleanups 2023-11-06 19:29:40 +01:00
Markus F.X.J. Oberhumer b6dd61cea8 CI updates 2023-11-05 09:03:38 +01:00
Markus F.X.J. Oberhumer 11970d276d CI updates 2023-11-04 06:30:07 +01:00
Markus F.X.J. Oberhumer d618716ec1 Minify .clang-format
Remove all settings that currently do not have any effect.
2023-11-03 17:56:12 +01:00
Markus F.X.J. Oberhumer 4f0f977f04 CI updates and cleanups 2023-11-03 17:52:46 +01:00
Markus F.X.J. Oberhumer 2c4b1d8a8c submodules: update for new versions 2023-11-03 16:46:57 +01:00
Markus F.X.J. Oberhumer b2810c6deb testsuite: update checksums caused by version bump 2023-11-01 15:12:39 +01:00
Markus F.X.J. Oberhumer ceb2b56b71 all: post-release version bump 2023-11-01 15:07:18 +01:00
Markus F.X.J. Oberhumer d14fa5f8a4 all: prepare for release 2023-11-01 12:00:03 +01:00
Markus F.X.J. Oberhumer 79263a52ac submodules: update for new versions 2023-11-01 11:40:28 +01:00
Markus F.X.J. Oberhumer ecb3f83e83 CI updates 2023-11-01 11:28:35 +01:00
Markus F.X.J. Oberhumer f6aedb35ce CI updates 2023-11-01 10:06:27 +01:00
Markus F.X.J. Oberhumer 3b7d25ac49 CI updates 2023-11-01 08:48:27 +01:00
Markus F.X.J. Oberhumer e964d4acf3 src/util: change TriBool logic to use a bool template parameter 2023-10-31 12:24:44 +01:00
Markus F.X.J. Oberhumer e306085b81 CI updates 2023-10-31 11:49:18 +01:00
Markus F.X.J. Oberhumer b094ad4f2b CI updates 2023-10-31 10:34:55 +01:00
Markus F.X.J. Oberhumer 19c6b969ab src/options: fix bad TriBool ThirdValue for pefile compress_resources 2023-10-30 21:36:36 +01:00
Markus F.X.J. Oberhumer acfda848cd src/check: add some more tribool checks 2023-10-30 20:29:05 +01:00
John Reiser 52400e2561 /proc/self/exe now is optional
... for the benefit of 'unshare', 'chroot', etc.
If not present, then upx run-time stub unmaps all pages of original main program.
https://github.com/upx/upx/issues/721

	modified:   stub/src/amd64-linux.elf-entry.S
	modified:   stub/src/amd64-linux.elf-fold.S
	modified:   stub/src/arm.v4a-linux.elf-entry.S
	modified:   stub/src/arm.v4a-linux.elf-fold.S
	modified:   stub/src/arm64-linux.elf-entry.S
	modified:   stub/src/arm64-linux.elf-fold.S
	modified:   stub/src/i386-linux.elf-fold.S
	modified:   stub/src/mipsel.r3000-linux.elf-fold.S
	modified:   stub/src/powerpc-linux.elf-fold.S
	modified:   stub/src/powerpc64le-linux.elf-fold.S
	modified:   ../misc/testsuite/upx_testsuite_1-expected_sha256sums.sh

           ... plus all associaed *.h, *.map, *.dump in stub/
2023-10-30 08:23:52 -07:00
Markus F.X.J. Oberhumer f62576a2be CI updates and minor cleanups 2023-10-30 14:15:35 +01:00
Markus F.X.J. Oberhumer 19bf9f59e9 src: clang-format stub/tools/armpe/armpe_tester.c 2023-10-30 13:07:20 +01:00
Markus F.X.J. Oberhumer fadf7cfc7b src: work on packed_struct cleanup 2023-10-30 12:55:07 +01:00
Markus F.X.J. Oberhumer ec0c9399fa src: clang-format conf.h 2023-10-30 12:30:58 +01:00
Markus F.X.J. Oberhumer 37b923245d all: various cleanups 2023-10-30 12:17:51 +01:00
Markus F.X.J. Oberhumer 38a676f6f7 src: introduce upx::ptr_reinterpret_cast 2023-10-29 16:52:24 +01:00
Markus F.X.J. Oberhumer cd1df6f6b1 all: update version 2023-10-29 15:37:13 +01:00
Markus F.X.J. Oberhumer 4a24fe8c53 CI updates and cleanups 2023-10-29 15:12:33 +01:00
Markus F.X.J. Oberhumer 6dac3dd248 CI updates 2023-10-27 09:24:06 +02:00
Markus F.X.J. Oberhumer 37d393cbc8 src: prefer using SetFileTime() on Windows 2023-10-27 06:58:14 +02:00
Markus F.X.J. Oberhumer 27f155374a testsuite: update checksums caused by version bump 2023-10-26 12:28:52 +02:00
Markus F.X.J. Oberhumer 8102137ad7 all: post-release version bump 2023-10-26 12:25:13 +02:00
499 changed files with 9158 additions and 9717 deletions
-27
View File
@@ -11,40 +11,13 @@ AccessModifierOffset: -4
AlignConsecutiveMacros: AcrossComments
AlwaysBreakTemplateDeclarations: true
AttributeMacros:
- __acc_cdecl
- __acc_cdecl_atexit
- __acc_cdecl_qsort
- __acc_cdecl_sighandler
- __acc_forceinline
- __acc_noinline
- __acc_static_forceinline
- __acc_static_noinline
- DELETED_FUNCTION
- XSPAN_DELETED_FUNCTION
- forceinline
- may_throw
- noinline
- static_forceinline
- static_noinline
EmptyLineBeforeAccessModifier: Leave
SortIncludes: false
SpaceAfterCStyleCast: true
Standard: Cpp03
StatementMacros:
- ACCCHK_ASSERT
- ACCCHK_ASSERT_IS_SIGNED_T
- ACCCHK_ASSERT_IS_UNSIGNED_T
- ACCCHK_ASSERT_SIGN_T
- ACC_BLOCK_BEGIN
- ACC_COMPILE_TIME_ASSERT
- ACC_COMPILE_TIME_ASSERT_HEADER
- ACC_CXX_DISABLE_NEW_DELETE
- ACC_CXX_TRIGGER_FUNCTION
- ACC_CXX_TRIGGER_FUNCTION_IMPL
- CLANG_FORMAT_DUMMY_STATEMENT
- COMPILE_TIME_ASSERT
- COMPILE_TIME_ASSERT_ALIGNED1
WhitespaceSensitiveMacros:
- ACC_PP_MACRO_EXPAND
- ACC_PP_STRINGIZE
...
+3
View File
@@ -14,6 +14,9 @@
/src/stub/src/arch/**/lzma_d_c[fns].S linguist-generated
/src/stub/tmp/** linguist-generated
/misc/podman/*/packages*.txt linguist-generated
/misc/testsuite/*expected_sha256sums* linguist-generated
#
# make GitHub language detection more accurate
#
-1
View File
@@ -1,6 +1,5 @@
* @markus-oberhumer @jreiser
/src/p_elf* @jreiser
/src/p_lx_* @jreiser
/src/p_mach* @jreiser
/src/p_unix* @jreiser
-9
View File
@@ -1,9 +0,0 @@
version: 2
updates:
- package-ecosystem: 'github-actions'
directory: '/'
schedule:
# Check for updates to GitHub Actions every Wednesday
interval: 'weekly'
day: 'wednesday'
-43
View File
@@ -1,43 +0,0 @@
# see https://github.com/crate-ci/typos
# a generic spell-checker that works on source code is quite
# tricky, so some false positives are fine
[files]
extend-exclude = ["LICENSE", "misc/*podman*/*/packages.txt"]
# misc variable names & symbols
[default.extend-identifiers]
acc_spawnve = "acc_spawnve"
ba = "ba"
fo = "fo"
fof = "fof"
O_WRONLY = "O_WRONLY"
# optin: clang-analyzer-optin.cplusplus
optin = "optin"
sidelen = "sidelen"
# macOS 11 "Big Sur"
Sur = "Sur"
tpos = "tpos"
# assembly sources
hda = "hda"
Larg = "Larg"
pard = "pard"
suble = "suble"
# identifiers are intelligently split into words and then checked again
[default.extend-words]
delt = "delt"
FO = "FO"
fo = "fo"
# parm is used like param
PARM = "PARM"
parm = "parm"
# rela: ELF relocations
RELA = "RELA"
rela = "rela"
# siz is used for size
siz = "siz"
# SEH: Structured Exception Handling
SEH = "SEH"
seh = "seh"
+71 -42
View File
@@ -9,12 +9,14 @@ name: 'CI'
on: [push, workflow_dispatch]
env:
CMAKE_REQUIRED_QUIET: "OFF"
CTEST_OUTPUT_ON_FAILURE: "ON"
CMAKE_REQUIRED_QUIET: 'OFF'
CMAKE_VERBOSE_MAKEFILE: 'ON'
CTEST_OUTPUT_ON_FAILURE: 'ON'
DEBIAN_FRONTEND: noninteractive
UPX_CMAKE_BUILD_FLAGS: --verbose
# 2023-10-24
ZIG_DIST_VERSION: 0.12.0-dev.1245+a07f288eb
UPX_CMAKE_CONFIG_FLAGS: -Wdev --warn-uninitialized
# 2023-11-08
ZIG_DIST_VERSION: 0.12.0-dev.1502+b3462b7ce
jobs:
job-rebuild-and-verify-stubs:
@@ -28,8 +30,8 @@ jobs:
if ! test -e /usr/bin/python2; then
####sudo apt-get update && sudo apt-get install -y --no-install-recommends python2-minimal
# install python2-minimal packages from Debian-11
wget -q 'https://ftp.debian.org/debian/pool/main/p/python2.7/libpython2.7-minimal_2.7.18-8_amd64.deb'
wget -q 'https://ftp.debian.org/debian/pool/main/p/python2.7/python2.7-minimal_2.7.18-8_amd64.deb'
wget -q 'https://ftp.debian.org/debian/pool/main/p/python2.7/libpython2.7-minimal_2.7.18-8+deb11u1_amd64.deb'
wget -q 'https://ftp.debian.org/debian/pool/main/p/python2.7/python2.7-minimal_2.7.18-8+deb11u1_amd64.deb'
sudo dpkg -i ./*python2*.deb && rm ./*python2*.deb && sudo ldconfig
sudo ln -s -v python2.7 /usr/bin/python2
fi
@@ -67,7 +69,9 @@ jobs:
matrix:
include:
- { os: ubuntu-22.04, use_m32: true }
- { os: ubuntu-20.04, use_m32: false } # use_m32 also works here, but save some CI time
- { os: ubuntu-20.04, use_m32: true } # use_m32 also works here, but save some CI time
env:
UPX_CONFIG_EXPECT_THREADS: 'ON'
steps:
- name: 'Install extra 32-bit and Windows packages'
if: ${{ matrix.use_m32 }}
@@ -75,6 +79,10 @@ jobs:
sudo dpkg --add-architecture i386
sudo apt-get update
sudo apt-get install -y g++-multilib g++-mingw-w64-i686 g++-mingw-w64-x86-64
# make sure that we use posix-threads (pthread/winpthreads) and NOT win32-threads
for f in i686-w64-mingw32-g++ i686-w64-mingw32-gcc x86_64-w64-mingw32-g++ x86_64-w64-mingw32-gcc; do
if test -f /usr/bin/$f-posix; then sudo update-alternatives --set $f /usr/bin/$f-posix; fi
done
- name: 'Check out code'
uses: actions/checkout@v4
with: { submodules: true }
@@ -92,13 +100,13 @@ jobs:
if: ${{ matrix.use_m32 }}
run: 'make build/extra/gcc-m32/debug'
- name: 'Build cmake extra/gcc-m32/release'
if: ${{ matrix.use_m32 }}
if: ${{ matrix.use_m32 && (success() || failure()) }} # run this step even if the previous step failed
run: 'make build/extra/gcc-m32/release'
- name: 'Build cmake extra/cross-windows-mingw32/release'
if: ${{ matrix.use_m32 }}
if: ${{ matrix.use_m32 && (success() || failure()) }} # run this step even if the previous step failed
run: 'make build/extra/cross-windows-mingw32/release'
- name: 'Build cmake extra/cross-windows-mingw64/release'
if: ${{ matrix.use_m32 }}
if: ${{ matrix.use_m32 && (success() || failure()) }} # run this step even if the previous step failed
run: 'make build/extra/cross-windows-mingw64/release'
- name: 'Make artifact'
run: |
@@ -109,7 +117,7 @@ jobs:
# GitHub Actions magic: set "artifact_name" environment value for use in next step
echo "artifact_name=$N" >> $GITHUB_ENV
- name: ${{ format('Upload artifact {0}', env.artifact_name) }}
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: ${{ env.artifact_name }}
path: tmp/artifact
@@ -117,25 +125,35 @@ jobs:
run: |
(cd build/extra/gcc/release && DESTDIR=$PWD/Install-with-cmake cmake --install .)
(cd build/extra/gcc/release && DESTDIR=$PWD/Install-with-make make install)
- name: 'Run basic tests'
- name: 'Run ctest tests'
run: |
make -C build/extra/gcc/debug test
make -C build/extra/gcc/release test
make -C build/extra/clang/debug test
make -C build/extra/clang/release test
- name: 'Run basic tests 32-bit'
- name: 'Run ctest tests 32-bit'
if: ${{ matrix.use_m32 }}
run: |
make -C build/extra/gcc-m32/debug test
make -C build/extra/gcc-m32/release test
- name: 'Mimic ctest tests'
run: |
env -C build/extra/gcc/debug bash "$PWD"/misc/testsuite/mimic_ctest.sh
env -C build/extra/gcc/release bash "$PWD"/misc/testsuite/mimic_ctest.sh
env -C build/extra/clang/debug bash "$PWD"/misc/testsuite/mimic_ctest.sh
env -C build/extra/clang/release bash "$PWD"/misc/testsuite/mimic_ctest.sh
- name: 'Mimic ctest tests 32-bit'
if: ${{ matrix.use_m32 }}
run: |
env -C build/extra/gcc-m32/debug bash "$PWD"/misc/testsuite/mimic_ctest.sh
env -C build/extra/gcc-m32/release bash "$PWD"/misc/testsuite/mimic_ctest.sh
- name: 'Run file system test suite'
run: |
env -C build/extra/gcc/release bash "$PWD"/misc/testsuite/test_symlinks.sh
- name: 'Run test suite build/extra/gcc/release'
run: |
export upx_testsuite_SRCDIR="$(readlink -en ../deps/upx-testsuite)"
testsuite_1="$(readlink -en ./misc/testsuite/upx_testsuite_1.sh)"
env -C build/extra/gcc/release upx_exe=./upx bash "$testsuite_1"
env -C build/extra/gcc/release bash "$PWD"/misc/testsuite/upx_testsuite_1.sh
job-macos-cmake: # uses cmake + make
if: true
@@ -146,18 +164,20 @@ jobs:
fail-fast: false
matrix:
include:
# NOTE: macos does not have "env -C"; only with coreutils
# NOTE: macos-11 does not have "readlink -f"; only on macos >= 12 or with coreutils
# NOTE: macos does not have "env -C"; only with brew coreutils
# NOTE: macos-11 does not have "readlink -f"; only on macos >= 12 or with brew coreutils
- { os: macos-11, gcc: gcc-10, gxx: 'g++-10', testsuite: true }
- { os: macos-12, gcc: gcc-11, gxx: 'g++-11', testsuite: true }
- { os: macos-13, gcc: gcc-12, gxx: 'g++-12', testsuite: true }
env:
UPX_CONFIG_EXPECT_THREADS: 'ON'
steps:
- name: 'Install brew packages'
if: ${{ matrix.testsuite }}
run: |
# testsuite needs working "readlink -en" and "sha256sum -b"
if ! test -e /usr/local/opt/coreutils/libexec/gnubin/readlink; then
echo "===== brew leaves:"; brew leaves; echo "===== brew list:"; brew list
echo "===== brew leaves:"; brew leaves; echo "===== brew list:"; brew list --versions
# only run "brew update" if needed
if ! brew install coreutils; then brew update && brew install coreutils; fi
fi
@@ -194,7 +214,7 @@ jobs:
# GitHub Actions magic: set "artifact_name" environment value for use in next step
echo "artifact_name=$N" >> $GITHUB_ENV
- name: ${{ format('Upload artifact {0}', env.artifact_name) }}
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: ${{ env.artifact_name }}
path: tmp/artifact
@@ -202,17 +222,21 @@ jobs:
run: |
(cd build/extra/clang/release && DESTDIR=$PWD/Install-with-cmake cmake --install .)
(cd build/extra/clang/release && DESTDIR=$PWD/Install-with-make make install)
- name: 'Run basic tests'
- name: 'Run ctest tests'
if: ${{ !contains(matrix.os, 'macos-13') }} # FIXME: UPX on macos-13 is broken => disable self-test for now
run: |
make -C build/extra/clang/debug test
#make -C build/extra/clang/release test
for f in ./build/extra/*/*/upx; do echo "===== $f"; $f --sysinfo -v; done
- name: 'Mimic ctest tests'
if: ${{ !contains(matrix.os, 'macos-13') }} # FIXME: UPX on macos-13 is broken => disable self-test for now
run: |
export PATH="/usr/local/opt/coreutils/libexec/gnubin:$PATH"
env -C build/extra/clang/debug bash "$PWD"/misc/testsuite/mimic_ctest.sh
#env -C build/extra/clang/release bash "$PWD"/misc/testsuite/mimic_ctest.sh
- name: 'Run file system test suite'
if: ${{ matrix.testsuite }} # for coreutils readlink
run: |
## macos-11 does not have "readlink -f"
## testsuite="$(readlink -fn ./misc/testsuite/test_symlinks.sh)"
## (cd build/extra/clang/release && upx_exe=./upx bash "$testsuite")
export PATH="/usr/local/opt/coreutils/libexec/gnubin:$PATH"
env -C build/extra/clang/release bash "$PWD"/misc/testsuite/test_symlinks.sh
- name: 'Run test suite build/extra/clang/release'
@@ -220,8 +244,7 @@ jobs:
run: |
export PATH="/usr/local/opt/coreutils/libexec/gnubin:$PATH"
export upx_testsuite_SRCDIR="$(readlink -en ../deps/upx-testsuite)"
testsuite_1="$(readlink -en ./misc/testsuite/upx_testsuite_1.sh)"
env -C build/extra/clang/release upx_exe=./upx bash "$testsuite_1"
env -C build/extra/clang/release bash "$PWD"/misc/testsuite/upx_testsuite_1.sh
job-windows-cmake: # uses cmake + msbuild
if: true
@@ -234,14 +257,17 @@ jobs:
include:
- { name: windows-2019-amd64, os: windows-2019, vsversion: 2019, arch: amd64 }
- { name: windows-2022-amd64, os: windows-2022, vsversion: 2022, arch: amd64 }
env:
UPX_CONFIG_EXPECT_THREADS: 'ON'
steps:
- run: git config --global core.autocrlf false
- name: 'Check out code'
uses: actions/checkout@v4
with: { submodules: true }
- name: 'Check out test suite'
run: 'git clone --depth=1 https://github.com/upx/upx-testsuite ../deps/upx-testsuite'
- name: 'Set up Developer Command Prompt'
uses: ilammy/msvc-dev-cmd@cec98b9d092141f74527d0afa6feb2af698cfe89 # v1.12.1
uses: ilammy/msvc-dev-cmd@v1
with:
vsversion: ${{ matrix.vsversion }}
arch: ${{ matrix.arch }}
@@ -258,11 +284,11 @@ jobs:
# GitHub Actions magic: set "artifact_name" environment value for use in next step
echo "artifact_name=$N" >> $GITHUB_ENV
- name: ${{ format('Upload artifact {0}', env.artifact_name) }}
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: ${{ env.artifact_name }}
path: tmp/artifact
- name: 'Run basic tests'
- name: 'Run ctest tests'
if: ${{ matrix.arch != 'amd64_arm64' }}
run: |
ctest --test-dir build/debug -C Debug
@@ -272,18 +298,16 @@ jobs:
shell: bash
run: |
export upx_testsuite_SRCDIR="$(readlink -en ../deps/upx-testsuite)"
testsuite_1="$(readlink -en ./misc/testsuite/upx_testsuite_1.sh)"
env -C build/release/Release upx_exe=./upx bash "$testsuite_1"
env -C build/release/Release bash "$PWD"/misc/testsuite/upx_testsuite_1.sh
job-windows-toolchains: # build "by hand" using cmd.exe
if: true
if: github.repository_owner == 'upx'
needs: [ job-rebuild-and-verify-stubs ]
name: ${{ format('windows {0}', matrix.name) }}
runs-on: ${{ matrix.os }}
env:
C: ${{ matrix.name }}
B: release
H: 'd:\a\upx\upx'
strategy:
fail-fast: false
matrix:
@@ -297,6 +321,7 @@ jobs:
- { name: i386-win32-vs2019, os: windows-2019, vsversion: 2019, arch: amd64_x86 }
- { name: i386-win32-vs2022, os: windows-2022, vsversion: 2022, arch: amd64_x86 }
steps:
- run: git config --global core.autocrlf false
- name: 'Check out code'
uses: actions/checkout@v4
with: { submodules: true }
@@ -305,8 +330,10 @@ jobs:
run: |
git clone --depth=1 https://github.com/upx/upx-testsuite ../deps/upx-testsuite
mkdir -p -v build/$C/$B/{bzip2,ucl,upx,zlib,zstd}
repository_name="${GITHUB_REPOSITORY##*/}" # basename
echo "H=d:\\a\\$repository_name\\$repository_name" >> $GITHUB_ENV
- name: 'Set up Developer Command Prompt'
uses: ilammy/msvc-dev-cmd@cec98b9d092141f74527d0afa6feb2af698cfe89 # v1.12.1
uses: ilammy/msvc-dev-cmd@v1
with:
vsversion: ${{ matrix.vsversion }}
arch: ${{ matrix.arch }}
@@ -317,12 +344,13 @@ jobs:
where cl & where link
set RUN_CL=cl ${{ matrix.cl_machine_flags }} -MT
set RUN_LIB=link -lib ${{ matrix.link_machine_flags }}
set DEFS=-D_CRT_NONSTDC_NO_WARNINGS -D_CRT_SECURE_NO_WARNINGS -DWIN32_LEAN_AND_MEAN
@rem UPX only uses the very basic Windows API
set DEFS=-D_CRT_NONSTDC_NO_WARNINGS -D_CRT_SECURE_NO_WARNINGS -DWIN32_LEAN_AND_MEAN -D_WIN32_WINNT=0x0400
set BDIR=%H%\build\%C%\%B%
git rev-parse --short=12 HEAD > %BDIR%\upx\.GITREV.txt
@REM ===== build bzip2 =====
cd %BDIR%\bzip2
@rem %RUN_CL% -J -O2 -W4 -wd4127 -wd4244 -wd4267 -WX %DEFS% -c %H%\vendor\bzip2\*.c
@rem %RUN_CL% -J -O2 -W4 -wd4127 -wd4244 -wd4267 -WX %DEFS% -DBZ_NO_STDIO -c %H%\vendor\bzip2\*.c
@rem %RUN_LIB% -out:bzip2.lib *.obj
@REM ===== build UCL =====
cd %BDIR%\ucl
@@ -343,7 +371,7 @@ jobs:
set s=%H%\src
cat .GITREV.txt
set /p GITREV=<.GITREV.txt
set UPX_DEFS=-DUPX_CONFIG_DISABLE_WSTRICT=0 -DUPX_CONFIG_DISABLE_WERROR=0 -DWITH_BZIP2=0 -DWITH_ZSTD=0
set UPX_DEFS=-DUPX_CONFIG_DISABLE_WSTRICT=0 -DUPX_CONFIG_DISABLE_WERROR=0 -DWITH_THREADS=0 -DWITH_BZIP2=0 -DWITH_ZSTD=0
set UPX_LIBS=%BDIR%\ucl\ucl.lib %BDIR%\zlib\zlib.lib
@rem set UPX_LIBS=%BDIR%\bzip2\bzip2.lib %BDIR%\ucl\ucl.lib %BDIR%\zlib\zlib.lib %BDIR%\zstd\zstd.lib
set sources=%s%\*.cpp %s%\check\*.cpp %s%\compress\*.cpp %s%\console\*.cpp %s%\filter\*.cpp %s%\util\*.cpp
@@ -357,7 +385,7 @@ jobs:
# GitHub Actions magic: set "artifact_name" environment value for use in next step
echo "artifact_name=$N" >> $GITHUB_ENV
- name: ${{ format('Upload artifact {0}', env.artifact_name) }}
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: ${{ env.artifact_name }}
path: tmp/artifact
@@ -369,6 +397,7 @@ jobs:
cd $Env:H\build\$Env:C\$Env:B\upx
$Env:UPX = "--no-color --no-progress"
.\upx.exe --version
.\upx.exe --sysinfo -v
.\upx.exe upx.exe -o upx_packed.exe
dir *.exe
.\upx.exe -l upx_packed.exe
@@ -379,15 +408,14 @@ jobs:
shell: bash
run: |
export upx_testsuite_SRCDIR="$(readlink -en ../deps/upx-testsuite)"
testsuite_1="$(readlink -en ./misc/testsuite/upx_testsuite_1.sh)"
env -C build/$C/$B/upx upx_exe=./upx.exe bash "$testsuite_1"
env -C build/$C/$B/upx upx_exe=./upx.exe bash "$PWD"/misc/testsuite/upx_testsuite_1.sh
job-linux-zigcc: # uses cmake + make
if: github.repository_owner == 'upx'
needs: [ job-rebuild-and-verify-stubs ]
name: ${{ format('zigcc {0} {1}', matrix.zig_target, matrix.zig_pic) }}
runs-on: ubuntu-latest
container: 'alpine:3.18' # older versions such as alpine:3.12 also work; no-container also works
container: 'alpine:3.19' # older versions such as alpine:3.12 also work; no-container also works
strategy:
fail-fast: false
matrix:
@@ -402,7 +430,7 @@ jobs:
- { zig_target: aarch64-windows-gnu }
- { zig_target: arm-linux-musleabihf }
# { zig_target: arm-linux-musleabihf, zig_pic: -fPIE }
# { zig_target: i386-linux-musl }
- { zig_target: i386-linux-musl }
# { zig_target: i386-linux-musl, zig_pic: -fPIE }
- { zig_target: i386-windows-gnu }
# { zig_target: mips-linux-musl }
@@ -418,6 +446,7 @@ jobs:
# { zig_target: x86_64-macos.13.0-none }
- { zig_target: x86_64-windows-gnu }
env:
UPX_CONFIG_EXPECT_THREADS: 'ON'
# for zig-cc wrapper scripts (see below):
ZIG_CPPFLAGS: -DUPX_DOCTEST_CONFIG_MULTITHREADING
ZIG_FLAGS: ${{ matrix.zig_flags }}
@@ -487,7 +516,7 @@ jobs:
# GitHub Actions magic: set "artifact_name" environment value for use in next step
echo "artifact_name=$N" >> $GITHUB_ENV
- name: ${{ format('Upload artifact {0}', env.artifact_name) }}
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: ${{ env.artifact_name }}
path: tmp/artifact
@@ -1,39 +0,0 @@
# Copyright (C) Markus Franz Xaver Johannes Oberhumer
# see https://docs.github.com/en/actions/managing-issues-and-pull-requests/closing-inactive-issues
# see https://github.com/actions/stale
# Automatically closing issues is far from perfect, but then we only
# have limited resources and this approach favors issues that people
# actually care about.
#
# also see:
# "Should I Stale or Should I Close? An Analysis of a Bot that Closes
# Abandoned Issues and Pull Request".
# https://igorwiese.com/images/papers/Paper_BotSE_19.pdf
name: 'GitHub - Close inactive issues'
on:
schedule: [cron: '50 0 * * 3'] # run weekly Wednesday 00:50 UTC
workflow_dispatch:
jobs:
job-close-inactive-issues:
if: github.repository_owner == 'upx'
name: 'Close inactive issues'
runs-on: ubuntu-latest
permissions:
issues: write
pull-requests: write
steps:
- uses: actions/stale@v8
with:
operations-per-run: 300
exempt-all-milestones: true
exempt-issue-labels: 'blocker,bug,enhancement,help wanted,regression'
days-before-stale: 60
days-before-close: 30
stale-issue-message: 'This issue is stale because it has been open 60 days with no activity. Please remove the stale label or add a comment or this issue will be closed in 30 days.'
stale-pr-message: 'This PR is stale because it has been open 60 days with no activity. Please remove the stale label or add a comment or this PR will be closed in 30 days.'
close-issue-message: 'This issue was closed because it has been stalled for 30 days with no activity. Please feel free to reopen.'
close-pr-message: 'This PR was closed because it has been stalled for 30 days with no activity. Please feel free to reopen.'
repo-token: ${{ secrets.GITHUB_TOKEN }}
@@ -1,18 +0,0 @@
# Copyright (C) Markus Franz Xaver Johannes Oberhumer
name: 'GitHub - Close pull requests'
on:
#pull_request:
workflow_dispatch:
jobs:
job-close-pull-requests:
if: github.repository_owner == 'upx'
name: 'Close pull requests'
runs-on: ubuntu-latest
permissions:
pull-requests: write
steps:
- name: 'Close pull requests'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
gh pr list --repo='${{ github.repository }}' --state=open --json=number | jq '.[].number' | xargs -r -n1 -- gh pr close --repo='${{ github.repository }}'
-21
View File
@@ -1,21 +0,0 @@
# Copyright (C) Markus Franz Xaver Johannes Oberhumer
# see https://github.com/crate-ci/typos
name: 'Misc - Spell check'
on:
schedule: [cron: '55 0 * * 3'] # run weekly Wednesday 00:55 UTC
workflow_dispatch:
env:
DEBIAN_FRONTEND: noninteractive
jobs:
job-spell-check:
if: github.repository_owner == 'upx'
name: 'Spell check'
runs-on: ubuntu-latest
steps:
- name: 'Check out code'
uses: actions/checkout@v4
with: { submodules: false }
- name: 'Spell check with crate-ci/typos'
uses: crate-ci/typos@c004e98018d8621614d1ca516eed8ca2d04b365a # v1.16.20
with: { config: ./.github/typos_config.toml }
@@ -1,34 +0,0 @@
# Copyright (C) Markus Franz Xaver Johannes Oberhumer
name: 'Static Analyzer - clang-analyzer'
on:
schedule: [cron: '10 4 * * 3'] # run weekly Wednesday 04:10 UTC
workflow_dispatch:
env:
CMAKE_REQUIRED_QUIET: "OFF"
CTEST_OUTPUT_ON_FAILURE: "ON"
DEBIAN_FRONTEND: noninteractive
jobs:
job-analyze-clang-analyzer: # uses cmake + make
if: github.repository_owner == 'upx'
strategy:
fail-fast: false
matrix: {container: ['alpine:3.16','alpine:3.17','alpine:3.18','alpine:edge','i386/alpine:edge']}
name: ${{ format('Analyze clang-analyzer {0}', matrix.container) }}
runs-on: ubuntu-latest
container: ${{ matrix.container }}
steps:
- name: ${{ format('Install packages {0}', matrix.container) }}
run: 'apk update && apk upgrade && apk add clang clang-analyzer cmake g++ git make'
- name: ${{ format('Check out UPX {0} source code', github.ref_name) }}
run: |
# this seems to be needed when running in a container (beause of UID mismatch??)
git config --global --add safe.directory '*'
git clone --branch "$GITHUB_REF_NAME" --depth 1 https://github.com/upx/upx .
git submodule update --init
- name: 'Perform clang-analyzer scan-build Analysis Debug'
run: 'make build/analyze/clang-analyzer/debug'
- name: 'Perform clang-analyzer scan-build Analysis Release'
if: success() || failure() # run this step even if the previous step failed
run: 'make build/analyze/clang-analyzer/release'
@@ -1,34 +0,0 @@
# Copyright (C) Markus Franz Xaver Johannes Oberhumer
name: 'Static Analyzer - clang-tidy'
on:
schedule: [cron: '30 4 * * 3'] # run weekly Wednesday 04:30 UTC
workflow_dispatch:
env:
CMAKE_REQUIRED_QUIET: "OFF"
CTEST_OUTPUT_ON_FAILURE: "ON"
DEBIAN_FRONTEND: noninteractive
jobs:
job-analyze-clang-tidy: # uses cmake + make
if: github.repository_owner == 'upx'
strategy:
fail-fast: false
matrix: {container: ['alpine:3.18','alpine:edge','i386/alpine:edge']}
name: ${{ format('Analyze clang-tidy {0}', matrix.container) }}
runs-on: ubuntu-latest
container: ${{ matrix.container }}
steps:
- name: ${{ format('Install packages {0}', matrix.container) }}
run: 'apk update && apk upgrade && apk add clang clang-extra-tools cmake g++ git make python3'
- name: ${{ format('Check out UPX {0} source code', github.ref_name) }}
run: |
# this seems to be needed when running in a container (beause of UID mismatch??)
git config --global --add safe.directory '*'
git clone --branch "$GITHUB_REF_NAME" --depth 1 https://github.com/upx/upx .
git submodule update --init
- name: 'Perform clang-tidy Analysis Debug'
run: 'make -k build/analyze/clang-tidy/debug'
- name: 'Perform clang-tidy Analysis Release'
if: success() || failure() # run this step even if the previous step failed
run: 'make -k build/analyze/clang-tidy/release'
@@ -1,36 +0,0 @@
# Copyright (C) Markus Franz Xaver Johannes Oberhumer
name: 'Static Analyzer - CodeQL'
on:
schedule: [cron: '50 4 * * 3'] # run weekly Wednesday 04:50 UTC
workflow_dispatch:
env:
CMAKE_REQUIRED_QUIET: "OFF"
CTEST_OUTPUT_ON_FAILURE: "ON"
DEBIAN_FRONTEND: noninteractive
jobs:
job-analyze-codeql:
if: github.repository_owner == 'upx'
name: Analyze
runs-on: ubuntu-latest
permissions:
actions: read
contents: read
security-events: write
strategy:
fail-fast: false
matrix:
language: [ 'cpp' ]
steps:
- name: Checkout repository
uses: actions/checkout@v4
with: { submodules: true }
- name: Initialize CodeQL
uses: github/codeql-action/init@v2
with:
languages: ${{ matrix.language }}
- name: Autobuild
uses: github/codeql-action/autobuild@v2
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v2
-66
View File
@@ -1,66 +0,0 @@
# Copyright (C) Markus Franz Xaver Johannes Oberhumer
# test minimal number of packages required for building UPX under Alpine Linux
# clang: apk add clang cmake make
# gcc: apk add cmake g++ make
name: 'Test - Minimal Alpine build'
on: [workflow_dispatch]
env:
CMAKE_REQUIRED_QUIET: "OFF"
CTEST_OUTPUT_ON_FAILURE: "ON"
DEBIAN_FRONTEND: noninteractive
jobs:
job-alpine-clang: # uses cmake + make
if: true
strategy: { matrix: { container: ['alpine:edge','i386/alpine:edge'] } }
name: ${{ format('clang {0}', matrix.container) }}
runs-on: ubuntu-latest
container: ${{ matrix.container }}
steps:
- name: ${{ format('Build clang {0}', matrix.container) }}
run: |
apk update && apk upgrade && apk add clang cmake make
wget https://github.com/upx/upx/releases/download/v4.1.0/upx-4.1.0-src.tar.xz
tar -xoaf upx-*-src.tar.xz
cd upx-*-src
make build/debug CC="clang -static" CXX="clang++ -static"
make build/release CC="clang -static" CXX="clang++ -static"
make -C build/debug test
make -C build/release test
make -C build/release install DESTDIR="$PWD/Install"
N=$(echo "upx-test-alpine-linux-clang-${{ matrix.container }}" | sed 's/[^0-9a-zA-Z_.-]/-/g')
echo "artifact_name=$N" >> $GITHUB_ENV
- name: ${{ format('Upload artifact {0}', env.artifact_name) }}
if: ${{ !startsWith(matrix.container, 'i386/') }} # i386: missing nodejs on host
uses: actions/upload-artifact@v3
with:
name: ${{ env.artifact_name }}
path: 'upx*/build/*/upx'
job-alpine-gcc: # uses cmake + make
if: true
strategy: { matrix: { container: ['alpine:edge','i386/alpine:edge'] } }
name: ${{ format('gcc {0}', matrix.container) }}
runs-on: ubuntu-latest
container: ${{ matrix.container }}
steps:
- name: ${{ format('Build gcc {0}', matrix.container) }}
run: |
apk update && apk upgrade && apk add cmake g++ make
wget https://github.com/upx/upx/releases/download/v4.1.0/upx-4.1.0-src.tar.xz
tar -xoaf upx-*-src.tar.xz
cd upx-*-src
make build/debug CC="gcc -static" CXX="g++ -static"
make build/release CC="gcc -static" CXX="g++ -static"
make -C build/debug test
make -C build/release test
make -C build/release install DESTDIR="$PWD/Install"
N=$(echo "upx-test-alpine-linux-gcc-${{ matrix.container }}" | sed 's/[^0-9a-zA-Z_.-]/-/g')
echo "artifact_name=$N" >> $GITHUB_ENV
- name: ${{ format('Upload artifact {0}', env.artifact_name) }}
if: ${{ !startsWith(matrix.container, 'i386/') }} # i386: missing nodejs on host
uses: actions/upload-artifact@v3
with:
name: ${{ env.artifact_name }}
path: 'upx*/build/*/upx'
-133
View File
@@ -1,133 +0,0 @@
# Copyright (C) Markus Franz Xaver Johannes Oberhumer
name: 'Test - CMake default build type'
on: [workflow_dispatch]
env:
CMAKE_REQUIRED_QUIET: "OFF"
CTEST_OUTPUT_ON_FAILURE: "ON"
DEBIAN_FRONTEND: noninteractive
jobs:
#
# single-config generators - these use and respect CMAKE_BUILD_TYPE
#
cmake-make:
runs-on: ubuntu-latest
steps:
- name: 'Check out code'
uses: actions/checkout@v4
with: { submodules: true }
- name: 'Config, build, test and install'
run: |
cmake -S . -B build/default -G "Unix Makefiles"
cmake --build build/default --parallel --verbose
ctest --test-dir build/default
(cd build/default && DESTDIR=$PWD/Install-default cmake --install .)
# "make test" also works
env -C build/default make test
# "make install" also works
env -C build/default DESTDIR=./Install-with-make make install
cmake-ninja:
runs-on: ubuntu-latest
steps:
- name: 'Check out code'
uses: actions/checkout@v4
with: { submodules: true }
- name: 'Config, build, test and install'
run: |
test -f /usr/bin/ninja || sudo apt-get install -y ninja-build
cmake -S . -B build/default -G Ninja
cmake --build build/default --parallel --verbose
ctest --test-dir build/default
(cd build/default && DESTDIR=$PWD/Install-default cmake --install .)
# "ninja test" also works
env -C build/default ninja test
# "ninja install" also works
env -C build/default DESTDIR=./Install-with-ninja ninja install
cmake-nmake:
runs-on: windows-2022
steps:
- name: 'Check out code'
uses: actions/checkout@v4
with: { submodules: true }
- name: 'Set up Developer Command Prompt'
uses: ilammy/msvc-dev-cmd@cec98b9d092141f74527d0afa6feb2af698cfe89 # v1.12.1
with:
vsversion: 2022
arch: amd64
- name: 'Config, build, test and install'
run: |
cmake -S . -B build/default -G "NMake Makefiles"
cmake --build build/default --parallel --verbose
ctest --test-dir build/default
# "cmake --install" works on Windows as well, nice
env -C build/default DESTDIR=./Install-default cmake --install .
# "nmake test" also works
env -C build/default nmake test
# "nmake install" also works
env -C build/default DESTDIR=./Install-with-nmake nmake install
#
# multi-config generators - these use CMAKE_CONFIGURATION_TYPES, but the defaults seem inconsistent
# => when using multi-config generators always explicitly pass the requested build-config
#
# ninja-multi-config seems to use the *first* element of CMAKE_CONFIGURATION_TYPES; nice
cmake-ninja-multi-config:
runs-on: ubuntu-latest
steps:
- name: 'Check out code'
uses: actions/checkout@v4
with: { submodules: true }
- name: 'Config, build, test and install'
run: |
test -f /usr/bin/ninja || sudo apt-get install -y ninja-build
cmake -S . -B build/default -G "Ninja Multi-Config"
cmake --build build/default --parallel --verbose
# multi-config: ctest NEEDS a config
ctest --test-dir build/default -C Release
(cd build/default && DESTDIR=$PWD/Install-default cmake --install .)
# "ninja test" also works with multi-config
env -C build/default ninja test
# "ninja install" also works with multi-config
env -C build/default DESTDIR=./Install-with-ninja ninja install
# vsstudio-multi-config (msbuild) seems to use "Debug" by default
cmake-vsstudio-multi-config:
runs-on: windows-2022
steps:
- name: 'Check out code'
uses: actions/checkout@v4
with: { submodules: true }
- name: 'Set up Developer Command Prompt'
uses: ilammy/msvc-dev-cmd@cec98b9d092141f74527d0afa6feb2af698cfe89 # v1.12.1
with:
vsversion: 2022
arch: amd64
- name: 'Config, build and test'
run: |
cmake -S . -B build/default
cmake --build build/default --parallel --verbose
# multi-config: ctest NEEDS a config
ctest --test-dir build/default -C Debug
# TODO: does cmake --install work?
# xcode-multi-config (xcodebuild) seems to use "Debug" by default, except for "cmake --install" (BUG?)
cmake-xcode-multi-config:
runs-on: macos-12
steps:
- name: 'Check out code'
uses: actions/checkout@v4
with: { submodules: true }
- name: 'Config, build, test and install'
run: |
cmake -S . -B build/default -G Xcode
cmake --build build/default --parallel --verbose
# multi-config: ctest NEEDS a config
ctest --test-dir build/default -C Debug
# BUG(?) multi-config: cmake --install defaults to "Release" !!
(cd build/default && DESTDIR=$PWD/Install-default cmake --install . --config Debug)
-16
View File
@@ -1,16 +0,0 @@
# Copyright (C) Markus Franz Xaver Johannes Oberhumer
name: 'Test - Unused'
on: [workflow_dispatch]
env:
CMAKE_REQUIRED_QUIET: "OFF"
CTEST_OUTPUT_ON_FAILURE: "ON"
DEBIAN_FRONTEND: noninteractive
jobs:
job-unused: # uses cmake + make
if: true
runs-on: ubuntu-latest
steps:
- run: |
true
-154
View File
@@ -1,154 +0,0 @@
# Copyright (C) Markus Franz Xaver Johannes Oberhumer
# BS BuildSystem: build "by hand" using a POSIX-compliant shell
name: 'Weekly CI BS - By Hand'
on:
schedule: [cron: '00 1 * * 3'] # run weekly Wednesday 01:00 UTC
workflow_dispatch:
env:
CMAKE_REQUIRED_QUIET: "OFF"
CTEST_OUTPUT_ON_FAILURE: "ON"
DEBIAN_FRONTEND: noninteractive
VERBOSE: 1
jobs:
job-by-hand-alpine-linux-gcc: # uses a POSIX-compliant shell
# ...and also uses a subdirectory "upx with space" in order to detect possible quoting issues
# ...and also uses ccache as we are running the same build-script again and again
if: github.repository_owner == 'upx'
strategy: { matrix: { container: ['alpine:3.9','alpine:3.18','alpine:edge','i386/alpine:edge'] } }
name: ${{ format('by-hand gcc {0}', matrix.container) }}
runs-on: ubuntu-latest
container: ${{ matrix.container }}
steps:
- name: ${{ format('Install packages {0}', matrix.container) }}
run: |
# install ccache, g++, git and various POSIX shells
shells="bash dash loksh mksh zsh"
case ${{ matrix.container }} in
*:3.18 | *:edge) shells="$shells oksh yash" ;;
esac
echo "installing shells: $shells"
apk update && apk upgrade && apk add ccache g++ git $shells
# enable ccache and some warnings
xflags="-static -Wall -Wextra -Werror"
echo -e "CC=ccache gcc $xflags\nCXX=ccache g++ -std=gnu++17 $xflags" >> $GITHUB_ENV
# this seems to be needed when running in a container (beause of UID mismatch??)
git config --global --add safe.directory '*'
# create user upx:upx 2000:2000 for file system tests below ("sudo")
adduser upx -u 2000 -D && cd /home/upx && chmod 00700 . && chown -R upx:upx .
- name: ${{ format('Check out UPX {0} source code', github.ref_name) }}
run: |
git clone --branch "$GITHUB_REF_NAME" --depth 1 https://github.com/upx/upx "upx with space"
git -C "upx with space" submodule update --init
- name: 'Build by-hand with /bin/sh'
run: '/bin/sh "./upx with space/misc/scripts/build_upx_by_hand.sh"'
- name: 'Build by-hand with bash'
run: 'bash "./upx with space/misc/scripts/build_upx_by_hand.sh"'
- name: 'Build by-hand with bash --posix'
run: 'bash --posix "./upx with space/misc/scripts/build_upx_by_hand.sh"'
- name: 'Build by-hand with busybox ash'
run: 'busybox ash "./upx with space/misc/scripts/build_upx_by_hand.sh"'
- name: 'Build by-hand with busybox sh'
run: 'busybox sh "./upx with space/misc/scripts/build_upx_by_hand.sh"'
- name: 'Build by-hand with dash'
run: 'dash "./upx with space/misc/scripts/build_upx_by_hand.sh"'
- name: 'Build by-hand with loksh'
run: 'ksh "./upx with space/misc/scripts/build_upx_by_hand.sh"'
- name: 'Build by-hand with loksh -o posix'
run: 'ksh -o posix "./upx with space/misc/scripts/build_upx_by_hand.sh"'
- name: 'Build by-hand with loksh -o sh'
run: 'ksh -o sh "./upx with space/misc/scripts/build_upx_by_hand.sh"'
- name: 'Build by-hand with mksh'
run: 'mksh "./upx with space/misc/scripts/build_upx_by_hand.sh"'
- name: 'Build by-hand with mksh -o posix'
run: 'mksh -o posix "./upx with space/misc/scripts/build_upx_by_hand.sh"'
- name: 'Build by-hand with mksh -o sh'
run: 'mksh -o sh "./upx with space/misc/scripts/build_upx_by_hand.sh"'
- name: 'Build by-hand with oksh'
if: endsWith(matrix.container, ':3.18') || endsWith(matrix.container, ':edge')
run: 'oksh "./upx with space/misc/scripts/build_upx_by_hand.sh"'
- name: 'Build by-hand with oksh -o posix'
if: endsWith(matrix.container, ':3.18') || endsWith(matrix.container, ':edge')
run: 'oksh -o posix "./upx with space/misc/scripts/build_upx_by_hand.sh"'
- name: 'Build by-hand with oksh -o sh'
if: endsWith(matrix.container, ':3.18') || endsWith(matrix.container, ':edge')
run: 'oksh -o sh "./upx with space/misc/scripts/build_upx_by_hand.sh"'
- name: 'Build by-hand with yash'
if: endsWith(matrix.container, ':3.18') || endsWith(matrix.container, ':edge')
run: 'yash "./upx with space/misc/scripts/build_upx_by_hand.sh"'
- name: 'Build by-hand with zsh'
run: 'zsh "./upx with space/misc/scripts/build_upx_by_hand.sh"'
- name: 'Build by-hand with zsh --emulate ksh'
run: 'zsh --emulate ksh "./upx with space/misc/scripts/build_upx_by_hand.sh"'
- name: 'Build by-hand with zsh --emulate sh'
run: 'zsh --emulate sh "./upx with space/misc/scripts/build_upx_by_hand.sh"'
- name: 'Show ccache stats'
run: |
ccache -s
ccache -p
- name: 'Run file system test suite (busybox)'
run: |
apk add bash sudo
testsuite="$(readlink -fn "upx with space"/misc/testsuite/test_symlinks.sh)"
cd "upx with space"/build/by-hand
# IMPORTANT: do NOT run as user root!
chmod a+w . && sudo -u upx bash "$testsuite"
- name: 'Run file system test suite (coreutils)'
run: |
apk add bash coreutils sudo
testsuite="$(readlink -fn "upx with space"/misc/testsuite/test_symlinks.sh)"
cd "upx with space"/build/by-hand
# IMPORTANT: do NOT run as user root!
chmod a+w . && sudo -u upx bash "$testsuite"
job-by-hand-macos: # uses a POSIX-compliant shell
# ...and also uses a subdirectory "upx with space" in order to detect possible quoting issues
if: github.repository_owner == 'upx'
strategy:
fail-fast: false
matrix:
include:
- { os: macos-11, run_fs_test: false } # macos-11 does not have "readlink -f"
- { os: macos-12, run_fs_test: true }
- { os: macos-13, run_fs_test: true }
name: ${{ format('by-hand cc {0}', matrix.os) }}
runs-on: ${{ matrix.os }}
steps:
- name: ${{ format('Check out UPX {0} source code', github.ref_name) }}
run: |
git clone --branch "$GITHUB_REF_NAME" --depth 1 https://github.com/upx/upx "upx with space"
git -C "upx with space" submodule update --init
- name: 'Build by-hand with /bin/sh'
run: 'top_srcdir="$PWD/upx with space" /bin/sh "./upx with space/misc/scripts/build_upx_by_hand.sh"'
- name: 'Build by-hand with bash'
run: 'top_srcdir="$PWD/upx with space" bash "./upx with space/misc/scripts/build_upx_by_hand.sh"'
- name: 'Run file system test suite'
if: ${{ matrix.run_fs_test }}
run: |
testsuite="$(readlink -fn "upx with space"/misc/testsuite/test_symlinks.sh)"
cd "upx with space"/build/by-hand
bash "$testsuite"
job-by-hand-windows-gcc: # uses a POSIX-compliant shell
# ...and also uses a subdirectory "upx with space" in order to detect possible quoting issues
if: github.repository_owner == 'upx'
strategy:
fail-fast: false
matrix:
include:
- { os: windows-2019 }
- { os: windows-2022 }
name: ${{ format('by-hand gcc {0}', matrix.os) }}
runs-on: ${{ matrix.os }}
steps:
- name: ${{ format('Check out UPX {0} source code', github.ref_name) }}
shell: bash
run: |
git clone --branch "$GITHUB_REF_NAME" --depth 1 https://github.com/upx/upx "upx with space"
git -C "upx with space" submodule update --init
- name: 'Build by-hand with bash'
shell: bash
run: |
xflags="-static -Wall -Wextra -Werror"
CC="gcc $xflags" CXX="g++ -std=gnu++17 $xflags" bash "./upx with space/misc/scripts/build_upx_by_hand.sh"
@@ -1,56 +0,0 @@
# Copyright (C) Markus Franz Xaver Johannes Oberhumer
# BS BuildSystem: build on macOS with 'cmake -G Xcode'
name: 'Weekly CI BS - cmake macOS Xcode'
on:
schedule: [cron: '10 1 * * 3'] # run weekly Wednesday 01:10 UTC
workflow_dispatch:
env:
CMAKE_REQUIRED_QUIET: "OFF"
CTEST_OUTPUT_ON_FAILURE: "ON"
DEBIAN_FRONTEND: noninteractive
jobs:
job-cmake-macos-xcode: # uses cmake + xcodebuild
if: github.repository_owner == 'upx'
strategy:
fail-fast: false
matrix:
include:
- { os: macos-11, run_test: true }
- { os: macos-12, run_test: true }
- { os: macos-13, run_test: false } # TODO: enable once UPX fully works on macos-13
name: ${{ format('{0} cmake Xcode', matrix.os) }}
runs-on: ${{ matrix.os }}
steps:
- name: 'Check out code'
uses: actions/checkout@v4
with: { submodules: true }
- { name: 'Config cmake Xcode', run: 'cmake -S . -B build/xcode -G Xcode' }
- { name: 'Build cmake Xcode default', run: 'cmake --build build/xcode' }
- { name: 'Build cmake Xcode Debug', run: 'cmake --build build/xcode --config Debug' }
- { name: 'Build cmake Xcode Release', run: 'cmake --build build/xcode --config Release' }
- name: 'Make artifact'
run: |
N=$(echo "upx-${GITHUB_REF_NAME}-${GITHUB_SHA:0:7}-weekly-ci-xcode-${{ matrix.os }}" | sed 's/[^0-9a-zA-Z_.-]/-/g')
mkdir -p "tmp/artifact/$N"
(cd build && rsync -R -a */*/upx "../tmp/artifact/$N/")
(cd tmp/artifact && gtar --sort=name -czf "$N.tar.gz" "$N" && rm -rf "./$N")
# GitHub Actions magic: set "artifact_name" environment value for use in next step
echo "artifact_name=$N" >> $GITHUB_ENV
- name: ${{ format('Upload artifact {0}', env.artifact_name) }}
uses: actions/upload-artifact@v3
with:
name: ${{ env.artifact_name }}
path: tmp/artifact
- name: 'Run basic tests'
if: ${{ matrix.run_test }}
run: |
ctest --test-dir build/xcode -C Debug
# ctest --test-dir build/xcode -C Release
- name: 'Run install tests'
run: |
(cd build/xcode && DESTDIR=$PWD/Install-default cmake --install .)
(cd build/xcode && DESTDIR=$PWD/Install-debug cmake --install . --config Debug)
(cd build/xcode && DESTDIR=$PWD/Install-release cmake --install . --config Release)
ls -l build/xcode/Install-*/usr/local/bin/upx
@@ -1,92 +0,0 @@
# Copyright (C) Markus Franz Xaver Johannes Oberhumer
# BS BuildSystem: build on Windows with 'cmake -G "Unix Makefiles"'
name: 'Weekly CI BS - cmake Windows make'
on:
schedule: [cron: '20 1 * * 3'] # run weekly Wednesday 01:20 UTC
workflow_dispatch:
env:
CMAKE_REQUIRED_QUIET: "OFF"
CTEST_OUTPUT_ON_FAILURE: "ON"
DEBIAN_FRONTEND: noninteractive
UPX_CMAKE_BUILD_FLAGS: --verbose
UPX_CMAKE_CONFIG_FLAGS: -G "Unix Makefiles"
jobs:
job-cmake-windows-make: # uses cmake + make
if: github.repository_owner == 'upx'
strategy:
fail-fast: false
matrix:
include:
# INFO: the following don't work with GNU make (probably some quoting problems with spaces or backslashes)
# => use Ninja generator instead; see weekly-ci-bs-cmake-windows-ninja.yml
# # cl (msvc)
# - { os: windows-2019, cc: cl, cxx: cl, vsversion: 2019, arch: amd64 }
# - { os: windows-2019, cc: cl, cxx: cl, vsversion: 2019, arch: amd64_arm64 }
# - { os: windows-2019, cc: cl, cxx: cl, vsversion: 2019, arch: amd64_x86 }
# - { os: windows-2022, cc: cl, cxx: cl, vsversion: 2022, arch: amd64 }
# - { os: windows-2022, cc: cl, cxx: cl, vsversion: 2022, arch: amd64_arm64 }
# - { os: windows-2022, cc: cl, cxx: cl, vsversion: 2022, arch: amd64_x86 }
# # clang-cl
# - { os: windows-2022, cc: clang-cl, cxx: clang-cl, vsversion: 2022, arch: amd64 }
# clang
- { os: windows-2022, cc: clang, cxx: 'clang++', arch: amd64, xflags: '-static' }
# gcc (mingw-gcc)
- { os: windows-2022, cc: gcc, cxx: 'g++', arch: amd64, xflags: '-static' }
env:
CC: ${{ matrix.cc }} ${{ matrix.xflags }}
CXX: ${{ matrix.cxx }} ${{ matrix.xflags }}
name: ${{ format('{0} {1} {2}', matrix.cc, matrix.vsversion, matrix.arch) }}
runs-on: ${{ matrix.os }}
steps:
- name: 'Check out code'
uses: actions/checkout@v4
with: { submodules: true }
- name: 'Set up Developer Command Prompt'
if: matrix.vsversion
uses: ilammy/msvc-dev-cmd@cec98b9d092141f74527d0afa6feb2af698cfe89 # v1.12.1
with:
vsversion: ${{ matrix.vsversion }}
arch: ${{ matrix.arch }}
- name: 'Init environment'
shell: bash
run: |
xtarget="windows-make-${{ matrix.cc }}-${{ matrix.vsversion }}-${{ matrix.arch}}"
echo "xtarget=$xtarget" >> $GITHUB_ENV
- name: 'Build cmake Make Debug'
shell: bash
run: |
make UPX_XTARGET=$xtarget xtarget/debug
ls -l build/xtarget/$xtarget/debug/upx.exe
file build/xtarget/$xtarget/debug/upx.exe || true
- name: 'Build cmake Make Release'
shell: bash
run: |
make UPX_XTARGET=$xtarget xtarget/release
ls -l build/xtarget/$xtarget/release/upx.exe
file build/xtarget/$xtarget/release/upx.exe || true
- name: 'Make artifact'
shell: bash
run: |
N=$(echo "upx-${GITHUB_REF_NAME}-${GITHUB_SHA:0:7}-weekly-ci-make-${xtarget}" | sed 's/[^0-9a-zA-Z_.-]/-/g')
mkdir -p "tmp/artifact/$N"
(cd build && cp -ai --parents xtarget/*/*/upx.exe "../tmp/artifact/$N")
# GitHub Actions magic: set "artifact_name" environment value for use in next step
echo "artifact_name=$N" >> $GITHUB_ENV
- name: ${{ format('Upload artifact {0}', env.artifact_name) }}
uses: actions/upload-artifact@v3
with:
name: ${{ env.artifact_name }}
path: tmp/artifact
- name: 'Run basic tests'
if: ${{ matrix.arch != 'amd64_arm64' }}
shell: bash
run: |
ctest --test-dir build/xtarget/$xtarget/debug
ctest --test-dir build/xtarget/$xtarget/release
- name: 'Run install tests'
shell: bash
run: |
env DESTDIR=./Install-debug cmake --install build/xtarget/$xtarget/debug
env DESTDIR=./Install-release cmake --install build/xtarget/$xtarget/release
@@ -1,91 +0,0 @@
# Copyright (C) Markus Franz Xaver Johannes Oberhumer
# BS BuildSystem: build on Windows with 'cmake -G Ninja'
name: 'Weekly CI BS - cmake Windows Ninja'
on:
schedule: [cron: '30 1 * * 3'] # run weekly Wednesday 01:30 UTC
workflow_dispatch:
env:
CMAKE_REQUIRED_QUIET: "OFF"
CTEST_OUTPUT_ON_FAILURE: "ON"
DEBIAN_FRONTEND: noninteractive
UPX_CMAKE_BUILD_FLAGS: --verbose
UPX_CMAKE_CONFIG_FLAGS: -G Ninja
jobs:
job-cmake-windows-ninja: # uses cmake + ninja
if: github.repository_owner == 'upx'
strategy:
fail-fast: false
matrix:
include:
# cl (msvc)
- { os: windows-2019, cc: cl, cxx: cl, vsversion: 2019, arch: amd64 }
- { os: windows-2019, cc: cl, cxx: cl, vsversion: 2019, arch: amd64_arm64 }
- { os: windows-2019, cc: cl, cxx: cl, vsversion: 2019, arch: amd64_x86 }
- { os: windows-2022, cc: cl, cxx: cl, vsversion: 2022, arch: amd64 }
- { os: windows-2022, cc: cl, cxx: cl, vsversion: 2022, arch: amd64_arm64 }
- { os: windows-2022, cc: cl, cxx: cl, vsversion: 2022, arch: amd64_x86 }
# clang-cl
- { os: windows-2022, cc: clang-cl, cxx: clang-cl, vsversion: 2022, arch: amd64 }
# clang
- { os: windows-2022, cc: clang, cxx: 'clang++', arch: amd64, xflags: '-static' }
# gcc (mingw-gcc)
- { os: windows-2022, cc: gcc, cxx: 'g++', arch: amd64, xflags: '-static' }
env:
CC: ${{ matrix.cc }} ${{ matrix.xflags }}
CXX: ${{ matrix.cxx }} ${{ matrix.xflags }}
name: ${{ format('{0} {1} {2}', matrix.cc, matrix.vsversion, matrix.arch) }}
runs-on: ${{ matrix.os }}
steps:
- name: 'Check out code'
uses: actions/checkout@v4
with: { submodules: true }
- name: 'Set up Developer Command Prompt'
if: matrix.vsversion
uses: ilammy/msvc-dev-cmd@cec98b9d092141f74527d0afa6feb2af698cfe89 # v1.12.1
with:
vsversion: ${{ matrix.vsversion }}
arch: ${{ matrix.arch }}
- name: 'Init environment'
shell: bash
run: |
command -v ninja >/dev/null || choco install -y --no-progress ninja
xtarget="windows-ninja-${{ matrix.cc }}-${{ matrix.vsversion }}-${{ matrix.arch}}"
echo "xtarget=$xtarget" >> $GITHUB_ENV
- name: 'Build cmake Ninja Debug'
shell: bash
run: |
make UPX_XTARGET=$xtarget xtarget/debug
ls -l build/xtarget/$xtarget/debug/upx.exe
file build/xtarget/$xtarget/debug/upx.exe || true
- name: 'Build cmake Ninja Release'
shell: bash
run: |
make UPX_XTARGET=$xtarget xtarget/release
ls -l build/xtarget/$xtarget/release/upx.exe
file build/xtarget/$xtarget/release/upx.exe || true
- name: 'Make artifact'
shell: bash
run: |
N=$(echo "upx-${GITHUB_REF_NAME}-${GITHUB_SHA:0:7}-weekly-ci-ninja-${xtarget}" | sed 's/[^0-9a-zA-Z_.-]/-/g')
mkdir -p "tmp/artifact/$N"
(cd build && cp -ai --parents xtarget/*/*/upx.exe "../tmp/artifact/$N")
# GitHub Actions magic: set "artifact_name" environment value for use in next step
echo "artifact_name=$N" >> $GITHUB_ENV
- name: ${{ format('Upload artifact {0}', env.artifact_name) }}
uses: actions/upload-artifact@v3
with:
name: ${{ env.artifact_name }}
path: tmp/artifact
- name: 'Run basic tests'
if: ${{ matrix.arch != 'amd64_arm64' }}
shell: bash
run: |
ctest --test-dir build/xtarget/$xtarget/debug
ctest --test-dir build/xtarget/$xtarget/release
- name: 'Run install tests'
shell: bash
run: |
env DESTDIR=./Install-debug cmake --install build/xtarget/$xtarget/debug
env DESTDIR=./Install-release cmake --install build/xtarget/$xtarget/release
@@ -1,78 +0,0 @@
# Copyright (C) Markus Franz Xaver Johannes Oberhumer
# BS BuildSystem: build on Windows with 'cmake -G "NMake Makefiles"'
name: 'Weekly CI BS - cmake Windows NMake'
on:
schedule: [cron: '40 1 * * 3'] # run weekly Wednesday 01:40 UTC
workflow_dispatch:
env:
CMAKE_REQUIRED_QUIET: "OFF"
CTEST_OUTPUT_ON_FAILURE: "ON"
DEBIAN_FRONTEND: noninteractive
jobs:
job-cmake-windows-nmake: # uses cmake + nmake
if: github.repository_owner == 'upx'
strategy:
fail-fast: false
matrix:
include:
# clang-cl
- { os: windows-2022, vsversion: 2022, arch: amd64, clang_cl: true }
# msvc
- { os: windows-2019, vsversion: 2019, arch: amd64 }
- { os: windows-2019, vsversion: 2019, arch: amd64_arm64 }
- { os: windows-2019, vsversion: 2019, arch: amd64_x86 }
- { os: windows-2022, vsversion: 2022, arch: amd64 }
- { os: windows-2022, vsversion: 2022, arch: amd64_arm64 }
- { os: windows-2022, vsversion: 2022, arch: amd64_x86 }
name: ${{ format('vs{0} {1} {2}', matrix.vsversion, matrix.arch, matrix.clang_cl && 'clang-cl' || '') }}
runs-on: ${{ matrix.os }}
steps:
- name: 'Check out code'
uses: actions/checkout@v4
with: { submodules: true }
- name: 'Set up Developer Command Prompt'
uses: ilammy/msvc-dev-cmd@cec98b9d092141f74527d0afa6feb2af698cfe89 # v1.12.1
with:
vsversion: ${{ matrix.vsversion }}
arch: ${{ matrix.arch }}
- name: 'Build cmake NMake Debug'
shell: cmd
run: |
set X=${{ matrix.clang_cl && '-DCMAKE_C_COMPILER=clang-cl -DCMAKE_CXX_COMPILER=clang-cl' || '' }}
cmake -S . -B build/debug -G "NMake Makefiles" -DCMAKE_VERBOSE_MAKEFILE=ON -DCMAKE_BUILD_TYPE=Debug %X%
cd build/debug
nmake
dir *.exe
- name: 'Build cmake NMake Release'
shell: cmd
run: |
set X=${{ matrix.clang_cl && '-DCMAKE_C_COMPILER=clang-cl -DCMAKE_CXX_COMPILER=clang-cl' || '' }}
cmake -S . -B build/release -G "NMake Makefiles" -DCMAKE_VERBOSE_MAKEFILE=ON %X%
cd build/release
nmake
dir *.exe
- name: 'Make artifact'
shell: bash
run: |
X="${{ matrix.clang_cl && '-clang-cl' || '' }}"
N=$(echo "upx-${GITHUB_REF_NAME}-${GITHUB_SHA:0:7}-weekly-ci-nmake-vs${{ matrix.vsversion }}-${{ matrix.arch }}$X" | sed 's/[^0-9a-zA-Z_.-]/-/g')
mkdir -p "tmp/artifact/$N"
(cd build && cp -ai --parents */upx.exe "../tmp/artifact/$N")
# GitHub Actions magic: set "artifact_name" environment value for use in next step
echo "artifact_name=$N" >> $GITHUB_ENV
- name: ${{ format('Upload artifact {0}', env.artifact_name) }}
uses: actions/upload-artifact@v3
with:
name: ${{ env.artifact_name }}
path: tmp/artifact
- name: 'Run basic tests'
if: ${{ matrix.arch != 'amd64_arm64' }}
run: |
ctest --test-dir build/debug
ctest --test-dir build/release
- name: 'Run install tests'
run: |
env DESTDIR=./Install-debug cmake --install build/debug
env DESTDIR=./Install-release cmake --install build/release
@@ -1,204 +0,0 @@
# Copyright (C) Markus Franz Xaver Johannes Oberhumer
# CC CompilationCheck: test various clang and gcc versions
# Build under various Alpine Linux versions with clang and gcc, and
# also test building with C++20, C++23 and LTO.
# And also uses a subdirectory "upx with space" that contains whitespace in order
# to detect possible quoting issues.
# info: Alpine Linux 3.9 (released Jan 2019) has clang-5, cmake-3.13.0
# and gcc-8, which nicely matches our minimal build requirements
name: 'Weekly CI CC - Alpine Linux C++23'
on:
schedule: [cron: '00 2 * * 3'] # run weekly Wednesday 02:00 UTC
workflow_dispatch:
env:
CMAKE_REQUIRED_QUIET: "OFF"
CTEST_OUTPUT_ON_FAILURE: "ON"
DEBIAN_FRONTEND: noninteractive
UPX_CMAKE_CONFIG_FLAGS: -DCMAKE_VERBOSE_MAKEFILE=ON
UPX_TESTSUITE_LEVEL: 4
jobs:
job-alpine-cmake: # uses cmake + make
if: github.repository_owner == 'upx'
strategy:
fail-fast: false
matrix:
include:
- { container: 'alpine:3.9' , use_cxx20: 0, use_cxx2b: 0, use_lto: 0 } # Jan 2019: C++17; clang-5 & gcc-8
- { container: 'alpine:3.10', use_cxx20: 0, use_cxx2b: 0, use_lto: 0 }
- { container: 'alpine:3.11', use_cxx20: 0, use_cxx2b: 0, use_lto: 0 }
- { container: 'alpine:3.12', use_cxx20: 0, use_cxx2b: 0, use_lto: 0 }
- { container: 'alpine:3.13', use_cxx20: 1, use_cxx2b: 0, use_lto: 0 } # Jan 2021: C++20; clang-10 & gcc-10
- { container: 'alpine:3.14', use_cxx20: 1, use_cxx2b: 0, use_lto: 0 }
- { container: 'alpine:3.15', use_cxx20: 1, use_cxx2b: 0, use_lto: 1 } # Nov 2021: LTO; clang-12 & gcc-10 & binutils-2.37
- { container: 'alpine:3.16', use_cxx20: 1, use_cxx2b: 1, use_lto: 1 } # May 2022: C++2b; clang-13 & gcc-11
- { container: 'alpine:3.17', use_cxx20: 1, use_cxx2b: 1, use_lto: 1 }
- { container: 'alpine:3.18', use_cxx20: 1, use_cxx2b: 1, use_lto: 1 }
- { container: 'alpine:edge', use_cxx20: 1, use_cxx2b: 1, use_lto: 1 }
- { container: 'i386/alpine:edge', use_cxx20: 1, use_cxx2b: 1, use_lto: 1 }
name: ${{ format('container {0}', matrix.container) }}
runs-on: ubuntu-latest
container: ${{ matrix.container }}
steps:
- name: ${{ format('Install packages {0}', matrix.container) }}
run: |
apk update && apk upgrade && apk add clang cmake g++ git make
case ${{ matrix.container }} in
# clang-dev is needed on Alpine versions <= 3.11 for clang headers like <emmintrin.h>
*:3.[0-9] | *:3.1[0-1]) apk add clang-dev ;;
esac
case ${{ matrix.container }}-${{ matrix.use_lto }} in
# llvm-dev is needed on Alpine versions <= 3.18 for -flto
*:3.[0-9]-1 | *:3.1[0-8]-1) apk add llvm-dev ;;
esac
# set environment vars
x="$(apk list -I "$(apk info -Wq "$(which clang)")")"; echo "clang_package=${x%% *}" >> $GITHUB_ENV
x="$(apk list -I "$(apk info -Wq "$(which gcc)")")"; echo "gcc_package=${x%% *}" >> $GITHUB_ENV
N=$(echo "upx-${GITHUB_REF_NAME}-${GITHUB_SHA:0:7}-weekly-ci-alpine-${{ matrix.container }}" | sed 's/[^0-9a-zA-Z_.-]/-/g')
echo "artifact_name=$N" >> $GITHUB_ENV
# create user upx:upx 2000:2000 for file system tests below ("sudo")
adduser upx -u 2000 -D && cd /home/upx && chmod 00700 . && chown -R upx:upx .
- name: ${{ format('Check out UPX {0} source code', github.ref_name) }}
run: |
git clone --branch "$GITHUB_REF_NAME" --depth 1 https://github.com/upx/upx "upx with space"
git -C "upx with space" submodule update --init
# build with default C11 and C++17
- name: ${{ format('Build clang Release with {0}', env.clang_package) }}
run: 'make -C "upx with space" UPX_XTARGET=clang-static CC="clang -static" CXX="clang++ -static"'
- name: ${{ format('Build clang Debug with {0}', env.clang_package) }}
run: 'make -C "upx with space" UPX_XTARGET=clang-static CC="clang -static" CXX="clang++ -static" xtarget/debug'
- name: ${{ format('Build gcc Release with {0}', env.gcc_package) }}
run: 'make -C "upx with space" UPX_XTARGET=gcc-static CC="gcc -static" CXX="g++ -static"'
- name: ${{ format('Build gcc Debug with {0}', env.gcc_package) }}
run: 'make -C "upx with space" UPX_XTARGET=gcc-static CC="gcc -static" CXX="g++ -static" xtarget/debug'
# build with C17 and C++20
- name: ${{ format('Build clang C++20 Release with {0}', env.clang_package) }}
if: matrix.use_cxx20
run: |
export UPX_CONFIG_DISABLE_C_STANDARD=ON UPX_CONFIG_DISABLE_CXX_STANDARD=ON
make -C "upx with space" UPX_XTARGET=clang-static-cxx20 CC="clang -static -std=gnu17" CXX="clang++ -static -std=gnu++20"
- name: ${{ format('Build clang C++20 Debug with {0}', env.clang_package) }}
if: matrix.use_cxx20
run: |
export UPX_CONFIG_DISABLE_C_STANDARD=ON UPX_CONFIG_DISABLE_CXX_STANDARD=ON
make -C "upx with space" UPX_XTARGET=clang-static-cxx20 CC="clang -static -std=gnu17" CXX="clang++ -static -std=gnu++20" xtarget/debug
- name: ${{ format('Build gcc C++20 Release with {0}', env.gcc_package) }}
if: matrix.use_cxx20
run: |
export UPX_CONFIG_DISABLE_C_STANDARD=ON UPX_CONFIG_DISABLE_CXX_STANDARD=ON
make -C "upx with space" UPX_XTARGET=gcc-static-cxx20 CC="gcc -static -std=gnu17" CXX="g++ -static -std=gnu++20"
- name: ${{ format('Build gcc C++20 Debug with {0}', env.gcc_package) }}
if: matrix.use_cxx20
run: |
export UPX_CONFIG_DISABLE_C_STANDARD=ON UPX_CONFIG_DISABLE_CXX_STANDARD=ON
make -C "upx with space" UPX_XTARGET=gcc-static-cxx20 CC="gcc -static -std=gnu17" CXX="g++ -static -std=gnu++20" xtarget/debug
# build with C23 and C++23
- name: ${{ format('Build clang C++23 Release with {0}', env.clang_package) }}
if: matrix.use_cxx23 || matrix.use_cxx2b
run: |
export UPX_CONFIG_DISABLE_C_STANDARD=ON UPX_CONFIG_DISABLE_CXX_STANDARD=ON
a=gnu23; b=gnu++23; if test "X${{ matrix.use_cxx2b }}" = X1; then a=gnu2x; b=gnu++2b; fi
make -C "upx with space" UPX_XTARGET=clang-static-cxx23 CC="clang -static -std=$a" CXX="clang++ -static -std=$b"
- name: ${{ format('Build clang C++23 Debug with {0}', env.clang_package) }}
if: matrix.use_cxx23 || matrix.use_cxx2b
run: |
export UPX_CONFIG_DISABLE_C_STANDARD=ON UPX_CONFIG_DISABLE_CXX_STANDARD=ON
a=gnu23; b=gnu++23; if test "X${{ matrix.use_cxx2b }}" = X1; then a=gnu2x; b=gnu++2b; fi
make -C "upx with space" UPX_XTARGET=clang-static-cxx23 CC="clang -static -std=$a" CXX="clang++ -static -std=$b" xtarget/debug
- name: ${{ format('Build gcc C++23 Release with {0}', env.gcc_package) }}
if: matrix.use_cxx23 || matrix.use_cxx2b
run: |
export UPX_CONFIG_DISABLE_C_STANDARD=ON UPX_CONFIG_DISABLE_CXX_STANDARD=ON
a=gnu23; b=gnu++23; if test "X${{ matrix.use_cxx2b }}" = X1; then a=gnu2x; b=gnu++2b; fi
make -C "upx with space" UPX_XTARGET=gcc-static-cxx23 CC="gcc -static -std=$a" CXX="g++ -static -std=$b"
- name: ${{ format('Build gcc C++23 Debug with {0}', env.gcc_package) }}
if: matrix.use_cxx23 || matrix.use_cxx2b
run: |
export UPX_CONFIG_DISABLE_C_STANDARD=ON UPX_CONFIG_DISABLE_CXX_STANDARD=ON
a=gnu23; b=gnu++23; if test "X${{ matrix.use_cxx2b }}" = X1; then a=gnu2x; b=gnu++2b; fi
make -C "upx with space" UPX_XTARGET=gcc-static-cxx23 CC="gcc -static -std=$a" CXX="g++ -static -std=$b" xtarget/debug
# build with -flto
- name: ${{ format('Build clang LTO Release with {0}', env.clang_package) }}
if: matrix.use_lto
run: |
make -C "upx with space" UPX_XTARGET=clang-static-cxxlto CC="clang -static -flto" CXX="clang++ -static -flto"
- name: ${{ format('Build clang LTO Debug with {0}', env.clang_package) }}
if: matrix.use_lto
run: |
make -C "upx with space" UPX_XTARGET=clang-static-cxxlto CC="clang -static -flto" CXX="clang++ -static -flto" xtarget/debug
- name: ${{ format('Build gcc LTO Release with {0}', env.gcc_package) }}
if: matrix.use_lto
run: |
make -C "upx with space" UPX_XTARGET=gcc-static-cxxlto CC="gcc -static -flto" CXX="g++ -static -flto"
- name: ${{ format('Build gcc LTO Debug with {0}', env.gcc_package) }}
if: matrix.use_lto
run: |
make -C "upx with space" UPX_XTARGET=gcc-static-cxxlto CC="gcc -static -flto" CXX="g++ -static -flto" xtarget/debug
- { name: 'Strip release binaries', run: 'strip -p --strip-unneeded "upx with space"/build/*/*/release/upx' }
- name: ${{ format('Upload artifact {0}', env.artifact_name) }}
if: ${{ !startsWith(matrix.container, 'i386/') }} # i386: missing nodejs on host
uses: actions/upload-artifact@v3
with:
name: ${{ env.artifact_name }}
path: 'upx with space*/build/*/*/*/upx'
- name: 'Run install tests'
run: |
(cd "upx with space"/build/xtarget/clang-static/debug && DESTDIR="$PWD/Install with cmake" cmake --install .)
(cd "upx with space"/build/xtarget/clang-static/debug && DESTDIR="$PWD/Install with make" make install)
(cd "upx with space"/build/xtarget/clang-static/release && DESTDIR="$PWD/Install with cmake" cmake --install .)
(cd "upx with space"/build/xtarget/clang-static/release && DESTDIR="$PWD/Install with make" make install)
(cd "upx with space"/build/xtarget/gcc-static/debug && DESTDIR="$PWD/Install with cmake" cmake --install .)
(cd "upx with space"/build/xtarget/gcc-static/debug && DESTDIR="$PWD/Install with make" make install)
(cd "upx with space"/build/xtarget/gcc-static/release && DESTDIR="$PWD/Install with cmake" cmake --install .)
(cd "upx with space"/build/xtarget/gcc-static/release && DESTDIR="$PWD/Install with make" make install)
- { name: 'Run basic tests clang Debug', run: 'make -C "upx with space"/build/xtarget/clang-static/debug test' }
- { name: 'Run basic tests clang Release', run: 'make -C "upx with space"/build/xtarget/clang-static/release test' }
- { name: 'Run basic tests gcc Debug', run: 'make -C "upx with space"/build/xtarget/gcc-static/debug test' }
- { name: 'Run basic tests gcc Release', run: 'make -C "upx with space"/build/xtarget/gcc-static/release test' }
- name: 'Run basic tests C++20, C++23 and LTO'
if: matrix.use_cxx20 || matrix.use_cxx23 || matrix.use_cxx2b || matrix.use_lto
run: |
for dir in "upx with space"/build/xtarget/*-cxx*/*; do
echo "===== $dir"
make -C "$dir" test
done
- name: 'Run file system test suite (busybox)'
run: |
apk add bash sudo
testsuite="$(readlink -fn "upx with space"/misc/testsuite/test_symlinks.sh)"
cd "upx with space"/build/xtarget/gcc-static/release
# IMPORTANT: do NOT run as user root!
chmod a+w . && sudo -u upx bash "$testsuite"
# test suite
- name: ${{ format('Run test suite level {0}', env.UPX_TESTSUITE_LEVEL) }}
run: |
# testsuite needs bash and working "readlink -en" and "sha256sum -b"
apk add bash coreutils
# use a directory that contains whitespace to detect possible quoting issues
git clone --depth=1 https://github.com/upx/upx-testsuite "upx-testsuite with space"
export upx_testsuite_SRCDIR="$(readlink -fn "upx-testsuite with space")"
testsuite_1="$(readlink -fn "upx with space"/misc/testsuite/upx_testsuite_1.sh)"
(cd "upx with space"/build/xtarget/gcc-static/release && upx_exe=./upx bash "$testsuite_1")
- name: 'Run file system test suite (coreutils)'
run: |
apk add bash coreutils sudo
testsuite="$(readlink -fn "upx with space"/misc/testsuite/test_symlinks.sh)"
cd "upx with space"/build/xtarget/gcc-static/release
# IMPORTANT: do NOT run as user root!
chmod a+w . && sudo -u upx bash "$testsuite"
@@ -1,174 +0,0 @@
# Copyright (C) Markus Franz Xaver Johannes Oberhumer
# CC CompilationCheck: compile with various mingw-gcc versions and run tests under Wine
name: 'Weekly CI CC - Alpine Linux MinGW'
on:
schedule: [cron: '20 2 * * 3'] # run weekly Wednesday 02:20 UTC
workflow_dispatch:
env:
CMAKE_REQUIRED_QUIET: "OFF"
CTEST_OUTPUT_ON_FAILURE: "ON"
DEBIAN_FRONTEND: noninteractive
UPX_CMAKE_CONFIG_FLAGS: -DCMAKE_VERBOSE_MAKEFILE=ON
jobs:
job-alpine-mingw: # uses cmake + make
if: github.repository_owner == 'upx'
strategy:
fail-fast: false
matrix:
include:
- { container: 'alpine:3.11', wine: false, i686_mingw: false } # skip Wine testsuite; TODO: internal error: doctest check failed
- { container: 'alpine:3.12', wine: false, i686_mingw: false } # skip Wine testsuite; TODO: internal error: doctest check failed
- { container: 'alpine:3.13', wine: true, i686_mingw: false } # wine-4.0.3
- { container: 'alpine:3.14', wine: true, i686_mingw: false } # wine-6.18
- { container: 'alpine:3.15', wine: true, i686_mingw: false } # wine-6.23
- { container: 'alpine:3.16', wine: true, i686_mingw: false } # wine-7.8
- { container: 'alpine:3.17', wine: true, i686_mingw: false } # wine-7.21
# Wine >= 8.0 can run i686 32-bit programs in WOW64 mode on pure 64-bit systems
- { container: 'alpine:3.18', wine: true, i686_mingw: true } # wine-8.13
- { container: 'alpine:edge', wine: true, i686_mingw: true } # wine-8.17
name: ${{ format('container {0}', matrix.container) }}
runs-on: ubuntu-latest
container: ${{ matrix.container }}
steps:
- name: ${{ format('Install packages {0}', matrix.container) }}
run: |
apk update && apk upgrade && apk add bash cmake coreutils file git make tar xz
apk add mingw-w64-gcc
test "${{ matrix.i686_mingw }}" = "true" && apk add i686-mingw-w64-gcc
test "${{ matrix.wine }}" = "true" && apk add wine
true
- name: ${{ format('Check out UPX {0} source code', github.ref_name) }}
run: |
# this seems to be needed for Wine when running in a container (beause of UID mismatch??)
mkdir -p -v ~/.wine
# this seems to be needed when running in a container (beause of UID mismatch??)
git config --global --add safe.directory '*'
git clone --branch "$GITHUB_REF_NAME" --depth 1 https://github.com/upx/upx .
git submodule update --init
- name: 'Build cmake extra/cross-windows-mingw32/debug'
if: ${{ matrix.i686_mingw }}
run: 'make build/extra/cross-windows-mingw32/debug'
- name: 'Build cmake extra/cross-windows-mingw32/release'
if: ${{ matrix.i686_mingw }}
run: 'make build/extra/cross-windows-mingw32/release'
- name: 'Build cmake extra/cross-windows-mingw64/debug'
run: |
# on Alpine 3.11 and 3.12 CMake does not find AR; Alpine >= 3.13 (with CMake 3.18.4) works
X=
case ${{ matrix.container }} in
*:3.1[12]) X="CMAKE_AR=/usr/bin/x86_64-w64-mingw32-ar" ;;
esac
make build/extra/cross-windows-mingw64/debug $X
- name: 'Build cmake extra/cross-windows-mingw64/release'
run: |
# on Alpine 3.11 and 3.12 CMake does not find AR; Alpine >= 3.13 (with CMake 3.18.4) works
X=
case ${{ matrix.container }} in
*:3.1[12]) X="CMAKE_AR=/usr/bin/x86_64-w64-mingw32-ar" ;;
esac
make build/extra/cross-windows-mingw64/release $X
- name: 'Make artifact'
shell: bash
run: |
N=$(echo "upx-${GITHUB_REF_NAME}-${GITHUB_SHA:0:7}-weekly-ci-alpine-mingw-${{ matrix.container }}" | sed 's/[^0-9a-zA-Z_.-]/-/g')
mkdir -p "tmp/artifact/$N"
(cd build && shopt -s nullglob && cp -ai --parents */upx{,.exe} */*/*/upx{,.exe} "../tmp/artifact/$N")
(cd tmp/artifact && tar --sort=name -czf "$N.tar.gz" "$N" && rm -rf "./$N")
# GitHub Actions magic: set "artifact_name" environment value for use in next step
echo "artifact_name=$N" >> $GITHUB_ENV
- name: ${{ format('Upload artifact {0}', env.artifact_name) }}
uses: actions/upload-artifact@v3
with:
name: ${{ env.artifact_name }}
path: tmp/artifact
- name: ${{ format('Run test suite under Wine') }}
if: ${{ matrix.wine }}
run: |
git clone --depth=1 https://github.com/upx/upx-testsuite ../upx-testsuite
testsuite_1="$(readlink -fn ./misc/testsuite/upx_testsuite_1.sh)"
export upx_exe_runner="wine64"
if test "${{ matrix.i686_mingw }}" = "true"; then
UPX_TESTSUITE_LEVEL=2 \
env -C build/extra/cross-windows-mingw32/debug upx_exe=./upx.exe bash "$testsuite_1"
UPX_TESTSUITE_LEVEL=4 \
env -C build/extra/cross-windows-mingw32/release upx_exe=./upx.exe bash "$testsuite_1"
fi
UPX_TESTSUITE_LEVEL=2 \
env -C build/extra/cross-windows-mingw64/debug upx_exe=./upx.exe bash "$testsuite_1"
UPX_TESTSUITE_LEVEL=4 \
env -C build/extra/cross-windows-mingw64/release upx_exe=./upx.exe bash "$testsuite_1"
- name: 'Run basic tests under Wine - mingw32/debug'
if: ${{ matrix.wine && matrix.i686_mingw }}
shell: bash
run: |
set -ex -o pipefail
cd build/extra/cross-windows-mingw32/debug
[[ -f upx && ! -f upx.exe ]] && mv -i -v upx upx.exe
pwd; file ./upx.exe
wine=wine64
tt='./upx.exe'
$wine ./upx.exe --version-short
$wine ./upx.exe -3 $tt -o tt.packed.exe
$wine ./upx.exe -l tt.packed.exe
$wine ./upx.exe -t tt.packed.exe
$wine ./upx.exe -d tt.packed.exe -o tt.unpacked.exe
$wine ./tt.packed.exe --version-short
$wine ./tt.unpacked.exe --version-short
- name: 'Run basic tests under Wine - mingw32/release'
if: ${{ matrix.wine && matrix.i686_mingw }}
shell: bash
run: |
set -ex -o pipefail
cd build/extra/cross-windows-mingw32/release
[[ -f upx && ! -f upx.exe ]] && mv -i -v upx upx.exe
pwd; file ./upx.exe
wine=wine64
tt='./upx.exe'
$wine ./upx.exe --version-short
$wine ./upx.exe -3 $tt -o tt.packed.exe
$wine ./upx.exe -l tt.packed.exe
$wine ./upx.exe -t tt.packed.exe
$wine ./upx.exe -d tt.packed.exe -o tt.unpacked.exe
$wine ./tt.packed.exe --version-short
$wine ./tt.unpacked.exe --version-short
- name: 'Run basic tests under Wine - mingw64/debug'
if: ${{ matrix.wine }}
shell: bash
run: |
set -ex -o pipefail
cd build/extra/cross-windows-mingw64/debug
[[ -f upx && ! -f upx.exe ]] && mv -i -v upx upx.exe
pwd; file ./upx.exe
wine=wine64
tt='./upx.exe'
$wine ./upx.exe --version-short
$wine ./upx.exe -3 $tt -o tt.packed.exe
$wine ./upx.exe -l tt.packed.exe
$wine ./upx.exe -t tt.packed.exe
$wine ./upx.exe -d tt.packed.exe -o tt.unpacked.exe
$wine ./tt.packed.exe --version-short
$wine ./tt.unpacked.exe --version-short
- name: 'Run basic tests under Wine - mingw64/release'
if: ${{ matrix.wine }}
shell: bash
run: |
set -ex -o pipefail
cd build/extra/cross-windows-mingw64/release
[[ -f upx && ! -f upx.exe ]] && mv -i -v upx upx.exe
pwd; file ./upx.exe
wine=wine64
tt='./upx.exe'
$wine ./upx.exe --version-short
$wine ./upx.exe -3 $tt -o tt.packed.exe
$wine ./upx.exe -l tt.packed.exe
$wine ./upx.exe -t tt.packed.exe
$wine ./upx.exe -d tt.packed.exe -o tt.unpacked.exe
$wine ./tt.packed.exe --version-short
$wine ./tt.unpacked.exe --version-short
@@ -1,78 +0,0 @@
# Copyright (C) Markus Franz Xaver Johannes Oberhumer
# CC CompilationCheck: test llvm-mingw
# see https://github.com/mstorsjo/llvm-mingw
name: 'Weekly CI CC - llvm-mingw'
on:
schedule: [cron: '30 2 * * 3'] # run weekly Wednesday 02:30 UTC
workflow_dispatch:
env:
CMAKE_REQUIRED_QUIET: "OFF"
CTEST_OUTPUT_ON_FAILURE: "ON"
DEBIAN_FRONTEND: noninteractive
jobs:
job-llvm-mingw: # uses cmake + make
if: github.repository_owner == 'upx'
strategy:
fail-fast: false
matrix:
include:
- name: llvm-mingw-20230614-msvcrt
llvm_version: 16.0.6
url: 'https://github.com/mstorsjo/llvm-mingw/releases/download/20230614/llvm-mingw-20230614-msvcrt-ubuntu-20.04-x86_64.tar.xz'
- name: llvm-mingw-20230614-ucrt
llvm_version: 16.0.6
url: 'https://github.com/mstorsjo/llvm-mingw/releases/download/20230614/llvm-mingw-20230614-ucrt-ubuntu-20.04-x86_64.tar.xz'
- name: llvm-mingw-20231017-msvcrt
llvm_version: 17.0.3
url: 'https://github.com/mstorsjo/llvm-mingw/releases/download/20231017/llvm-mingw-20231017-msvcrt-ubuntu-20.04-x86_64.tar.xz'
- name: llvm-mingw-20231017-ucrt
llvm_version: 17.0.3
url: 'https://github.com/mstorsjo/llvm-mingw/releases/download/20231017/llvm-mingw-20231017-ucrt-ubuntu-20.04-x86_64.tar.xz'
name: ${{ format('{0} {1}', matrix.name, matrix.llvm_version) }}
runs-on: ubuntu-latest
steps:
- name: 'Check out code'
uses: actions/checkout@v4
with: { submodules: true }
- name: ${{ format('Install {0} {1}', matrix.name, matrix.llvm_version) }}
run: |
mkdir -p -v ~/.local/bin
cd ~/.local/bin
wget -q '${{ matrix.url }}'
ls -l ./llvm-mingw*.tar.*
tar -xoaf ./llvm-mingw*.tar.*
rm ./llvm-mingw*.tar.*
# update PATH
cd ./llvm-mingw*/bin
echo "PATH=$PWD:$PATH" >> $GITHUB_ENV
- name: 'Build clang aarch64'
run: |
export CC="aarch64-w64-mingw32-clang -static" CXX="aarch64-w64-mingw32-clang++ -static"
make UPX_XTARGET=aarch64-w64-mingw32-clang xtarget/debug xtarget/release
- name: 'Build clang armv7'
run: |
export CC="armv7-w64-mingw32-clang -static" CXX="armv7-w64-mingw32-clang++ -static"
make UPX_XTARGET=armv7-w64-mingw32-clang xtarget/debug xtarget/release
- name: 'Build clang i686'
run: |
export CC="i686-w64-mingw32-clang -static" CXX="i686-w64-mingw32-clang++ -static"
make UPX_XTARGET=i686-w64-mingw32-clang xtarget/debug xtarget/release
- name: 'Build clang x86_64'
run: |
export CC="x86_64-w64-mingw32-clang -static" CXX="x86_64-w64-mingw32-clang++ -static"
make UPX_XTARGET=x86_64-w64-mingw32-clang xtarget/debug xtarget/release
- name: 'Make artifact'
run: |
N=$(echo "upx-${GITHUB_REF_NAME}-${GITHUB_SHA:0:7}-weekly-ci-${{ matrix.name }}-${{ matrix.llvm_version }}" | sed 's/[^0-9a-zA-Z_.-]/-/g')
mkdir -p "tmp/artifact/$N"
(cd build && cp -ai --parents */*/*/upx.exe "../tmp/artifact/$N")
# GitHub Actions magic: set "artifact_name" environment value for use in next step
echo "artifact_name=$N" >> $GITHUB_ENV
- name: ${{ format('Upload artifact {0}', env.artifact_name) }}
uses: actions/upload-artifact@v3
with:
name: ${{ env.artifact_name }}
path: tmp/artifact
-129
View File
@@ -1,129 +0,0 @@
# Copyright (C) Markus Franz Xaver Johannes Oberhumer
# CC CompilationCheck: test zigcc
# build with "zig cc"; see https://ziglang.org/download/
name: 'Weekly CI CC - zigcc'
on:
schedule: [cron: '40 2 * * 3'] # run weekly Wednesday 02:40 UTC
workflow_dispatch:
env:
CMAKE_REQUIRED_QUIET: "OFF"
CTEST_OUTPUT_ON_FAILURE: "ON"
DEBIAN_FRONTEND: noninteractive
# 2023-10-24
ZIG_DIST_VERSION: 0.12.0-dev.1245+a07f288eb
jobs:
job-linux-zigcc: # uses cmake + make
if: github.repository_owner == 'upx'
strategy:
fail-fast: false
matrix:
include:
- { zig_target: aarch64-linux-musl }
- { zig_target: aarch64-linux-musl, zig_pic: -fPIE }
- { zig_target: aarch64-macos-none }
- { zig_target: aarch64-macos.11.0-none }
- { zig_target: aarch64-macos.12.0-none }
- { zig_target: aarch64-macos.13.0-none }
- { zig_target: aarch64-windows-gnu }
- { zig_target: arm-linux-musleabihf }
- { zig_target: arm-linux-musleabihf, zig_pic: -fPIE }
- { zig_target: i386-linux-musl }
- { zig_target: i386-linux-musl, zig_pic: -fPIE }
- { zig_target: i386-windows-gnu }
- { zig_target: mips-linux-musl }
- { zig_target: mipsel-linux-musl }
- { zig_target: powerpc-linux-musl }
- { zig_target: powerpc64-linux-musl }
- { zig_target: powerpc64le-linux-musl }
- { zig_target: x86_64-linux-musl }
- { zig_target: x86_64-linux-musl, zig_pic: -fPIE }
- { zig_target: x86_64-macos-none }
- { zig_target: x86_64-macos.11.0-none }
- { zig_target: x86_64-macos.12.0-none }
- { zig_target: x86_64-macos.13.0-none }
- { zig_target: x86_64-windows-gnu }
name: ${{ format('zigcc {0} {1}', matrix.zig_target, matrix.zig_pic) }}
runs-on: ubuntu-latest
container: 'alpine:3.18' # older versions such as alpine:3.12 also work; no-container also works
env:
# for zig-cc wrapper scripts (see below):
ZIG_CPPFLAGS: -DUPX_DOCTEST_CONFIG_MULTITHREADING
ZIG_FLAGS: ${{ matrix.zig_flags }}
ZIG_PIC: ${{ matrix.zig_pic }}
ZIG_TARGET: ${{ matrix.zig_target }}
steps:
- name: 'Install Alpine Linux container packages'
if: ${{ job.container }}
shell: sh
run: |
apk update && apk upgrade && apk add bash cmake file git make tar xz
# set PATH like in Ubuntu
echo "PATH=$HOME/.local/bin:$PATH" >> $GITHUB_ENV
# this seems to be needed when running in a container (beause of UID mismatch??)
git config --global --add safe.directory '*'
- name: 'Check out code'
uses: actions/checkout@v4
with: { submodules: true }
- name: ${{ format('Install Zig {0}', env.ZIG_DIST_VERSION) }}
shell: bash
run: |
# GitHub Actions magic: set "UPX_GITREV_SHORT" environment value for use in steps below
rev=$(git rev-parse --short=7 HEAD)
echo "UPX_GITREV_SHORT=$rev" >> $GITHUB_ENV
# update ZIG_TARGET (i386 => x86)
ZIG_TARGET=${ZIG_TARGET/i386-/x86-}
echo "ZIG_TARGET=$ZIG_TARGET" >> $GITHUB_ENV
# install zig; note that ~/.local/bin is included in the default $PATH on Ubuntu
mkdir -p -v ~/.local/bin
cd ~/.local/bin
ZIG_DIST_NAME=zig-linux-x86_64-${ZIG_DIST_VERSION}
wget -q https://ziglang.org/builds/${ZIG_DIST_NAME}.tar.xz
ls -l ${ZIG_DIST_NAME}.tar.xz
tar -xoJf ${ZIG_DIST_NAME}.tar.xz
rm ${ZIG_DIST_NAME}.tar.xz
ln -s -v ${ZIG_DIST_NAME}/zig zig
#echo "PATH=$PATH" && which zig
echo -n 'zig version: '; zig version
# create wrapper scripts (needed for CMake)
echo -e '#!/bin/sh\nexec zig ar "$@"' > zig-ar
echo -e '#!/bin/sh\nexec zig cc -target $ZIG_TARGET $ZIG_PIC $ZIG_FLAGS $ZIG_CPPFLAGS $ZIG_CFLAGS "$@"' > zig-cc
echo -e '#!/bin/sh\nexec zig c++ -target $ZIG_TARGET $ZIG_PIC $ZIG_FLAGS $ZIG_CPPFLAGS $ZIG_CXXFLAGS "$@"' > zig-cxx
echo -e '#!/bin/sh\nexec zig ranlib "$@"' > zig-ranlib
chmod +x zig-ar zig-cc zig-cxx zig-ranlib
ls -la; head zig-ar zig-cc zig-cxx zig-ranlib
- name: ${{ format('Build Release with zig-cc -target {0} {1}', env.ZIG_TARGET, env.ZIG_PIC) }}
run: |
mkdir -p build/zig/${ZIG_TARGET}${ZIG_PIC}/release
cd build/zig/${ZIG_TARGET}${ZIG_PIC}/release
cmake ../../../.. -DCMAKE_BUILD_TYPE=Release -DCMAKE_AR=$HOME/.local/bin/zig-ar -DCMAKE_C_COMPILER=zig-cc -DCMAKE_CXX_COMPILER=zig-cxx -DCMAKE_RANLIB=$HOME/.local/bin/zig-ranlib $EXTRA_CMAKE_CONFIG_FLAGS_RELEASE
cmake --build . --config Release --parallel --verbose
file ./upx*
- name: ${{ format('Build Debug with zig-cc -target {0} {1}', env.ZIG_TARGET, env.ZIG_PIC) }}
run: |
mkdir -p build/zig/${ZIG_TARGET}${ZIG_PIC}/debug
cd build/zig/${ZIG_TARGET}${ZIG_PIC}/debug
cmake ../../../.. -DCMAKE_BUILD_TYPE=Debug -DCMAKE_AR=$HOME/.local/bin/zig-ar -DCMAKE_C_COMPILER=zig-cc -DCMAKE_CXX_COMPILER=zig-cxx -DCMAKE_RANLIB=$HOME/.local/bin/zig-ranlib $EXTRA_CMAKE_CONFIG_FLAGS_DEBUG
cmake --build . --config Debug --parallel --verbose
file ./upx*
- name: ${{ format('Make artifact from upx-{0}-{1}', github.ref_name, env.UPX_GITREV_SHORT) }}
shell: bash
run: |
N=$(echo "upx-${GITHUB_REF_NAME}-${GITHUB_SHA:0:7}-weekly-ci-zigcc-${{ matrix.zig_target }}${ZIG_PIC}" | sed 's/[^0-9a-zA-Z_.-]/-/g')
mkdir -p "tmp/artifact/$N"
(cd build && shopt -s nullglob && cp -ai --parents */upx{,.exe} */*/*/upx{,.exe} "../tmp/artifact/$N")
(cd tmp/artifact && tar --sort=name -czf "$N.tar.gz" "$N" && rm -rf "./$N")
# GitHub Actions magic: set "artifact_name" environment value for use in next step
echo "artifact_name=$N" >> $GITHUB_ENV
- name: ${{ format('Upload artifact {0}', env.artifact_name) }}
uses: actions/upload-artifact@v3
with:
name: ${{ env.artifact_name }}
path: tmp/artifact
- name: 'Run install tests'
if: ${{ contains(matrix.zig_target, '-linux') }}
run: |
(cd build/zig/${ZIG_TARGET}${ZIG_PIC}/release && DESTDIR=$PWD/Install-with-cmake cmake --install .)
(cd build/zig/${ZIG_TARGET}${ZIG_PIC}/release && DESTDIR=$PWD/Install-with-make make install)
-116
View File
@@ -1,116 +0,0 @@
# Copyright (C) Markus Franz Xaver Johannes Oberhumer
# RT RunTime checks
# runs ASAN, MSAN, qemu and valgrind checkers; slow!
name: 'Weekly CI RT - ASAN MSAN Valgrind'
on:
schedule: [cron: '00 3 * * 3'] # run weekly Wednesday 03:00 UTC
workflow_dispatch:
env:
CMAKE_REQUIRED_QUIET: "OFF"
CTEST_OUTPUT_ON_FAILURE: "ON"
DEBIAN_FRONTEND: noninteractive
jobs:
job-runtime-checkers: # uses cmake + make
if: github.repository_owner == 'upx'
strategy:
fail-fast: false
matrix:
include:
- container: 'alpine:3.18'
release: debug
qemu: 'qemu-x86_64 -cpu Westmere'
- container: 'alpine:3.18'
release: release
qemu: 'qemu-x86_64 -cpu Westmere'
- container: 'alpine:edge'
release: release
qemu: 'qemu-x86_64 -cpu Westmere'
- container: 'i386/alpine:edge'
release: release
qemu: 'qemu-i386'
name: ${{ format('{0} {1}', matrix.container, matrix.release) }}
runs-on: ubuntu-latest
container: ${{ matrix.container }}
env:
release: ${{ matrix.release }}
steps:
- name: ${{ format('Install packages {0} {1}', matrix.container, matrix.release) }}
run: |
apk update && apk upgrade
apk add bash clang cmake compiler-rt coreutils g++ git make qemu-i386 qemu-x86_64 tar valgrind
# this seems to be needed when running in a container (beause of UID mismatch??)
git config --global --add safe.directory '*'
- name: ${{ format('Check out UPX {0} source code', github.ref_name) }}
run: |
git clone --branch "$GITHUB_REF_NAME" --depth 1 https://github.com/upx/upx .
git submodule update --init
git clone --depth=1 https://github.com/upx/upx-testsuite ../upx-testsuite
- name: 'Build clang-static'
run: |
export CC="clang -static" CXX="clang++ -static"
make UPX_XTARGET=clang-static xtarget/$release
- name: 'Build clang-asan'
if: ${{ !startsWith(matrix.container, 'i386/') }} # i386: ASAN not supported
run: |
# unfortunately ASAN does not support static linking
flags="-fsanitize=address -fsanitize=pointer-compare -fsanitize=pointer-subtract -fsanitize=undefined -fno-omit-frame-pointer"
export CC="clang $flags" CXX="clang++ $flags"
make UPX_XTARGET=clang-asan xtarget/$release
- name: 'Build clang-msan'
if: ${{ !startsWith(matrix.container, 'i386/') }} # i386: MSAN not supported
run: |
# unfortunately MSAN does not support static linking
flags="-fsanitize=memory -fsanitize=undefined -fno-omit-frame-pointer -DDOCTEST_CONFIG_DISABLE=1"
export CC="clang $flags" CXX="clang++ $flags"
make UPX_XTARGET=clang-msan xtarget/$release
- name: 'Make artifact'
run: |
N=$(echo "upx-${GITHUB_REF_NAME}-${GITHUB_SHA:0:7}-weekly-ci-runtime-checkers-${{ matrix.container }}-${{ matrix.release }}" | sed 's/[^0-9a-zA-Z_.-]/-/g')
mkdir -p "tmp/artifact/$N"
(cd build && cp -ai --parents */*/*/upx "../tmp/artifact/$N")
(cd tmp/artifact && tar --sort=name -czf "$N.tar.gz" "$N" && rm -rf "./$N")
# GitHub Actions magic: set "artifact_name" environment value for use in next step
echo "artifact_name=$N" >> $GITHUB_ENV
- name: ${{ format('Upload artifact {0}', env.artifact_name) }}
if: ${{ !startsWith(matrix.container, 'i386/') }} # i386: missing nodejs on host
uses: actions/upload-artifact@v3
with:
name: ${{ env.artifact_name }}
path: tmp/artifact
- name: 'Run basic tests clang-static'
run: 'make -C build/xtarget/clang-static/$release test'
- name: 'Run basic tests clang-asan'
if: ${{ !startsWith(matrix.container, 'i386/') }} # i386: ASAN not supported
run: 'make -C build/xtarget/clang-asan/$release test'
- name: 'Run basic tests clang-msan'
if: ${{ !startsWith(matrix.container, 'i386/') }} # i386: MSAN not supported
run: 'make -C build/xtarget/clang-msan/$release test'
- name: 'Run testsuite clang-asan'
if: ${{ !startsWith(matrix.container, 'i386/') }} # i386: ASAN not supported
run: |
export ASAN_OPTIONS="detect_invalid_pointer_pairs=2"
env -C build/xtarget/clang-asan/$release "$PWD"/misc/testsuite/upx_testsuite_1.sh
- name: 'Run testsuite clang-msan'
if: ${{ !startsWith(matrix.container, 'i386/') }} # i386: MSAN not supported
run: |
env -C build/xtarget/clang-msan/$release "$PWD"/misc/testsuite/upx_testsuite_1.sh
- name: 'Run testsuite clang-static - QEMU'
if: ${{ matrix.qemu }}
run: |
export upx_exe_runner="${{ matrix.qemu }}"
env -C build/xtarget/clang-static/$release "$PWD"/misc/testsuite/upx_testsuite_1.sh
- name: 'Run testsuite clang-static - Valgrind'
if: true # very slow
run: |
export upx_exe_runner="valgrind --error-exitcode=1 --quiet"
# on current GitHub CI, takes about 30 minutes for release and 80 minutes for debug builds
# reduce time for debug builds to about 30 minutes
test "$release" = "debug" && export UPX_TESTSUITE_LEVEL=4
env -C build/xtarget/clang-static/$release "$PWD"/misc/testsuite/upx_testsuite_1.sh
+120 -204
View File
@@ -7,15 +7,35 @@
# A C++ compiler that fully implements C++17: clang-5, gcc-8 or msvc-2019-16.11
# (older or other compilers may work but are unsupported, use at your own risk)
# Sections of this CMakeLists.txt:
# - options
# - init
# - common compilation flags
# - targets
# - target compilation flags
# - test
# - install
# - print summary
# CMake version check; using a somewhat current CMake version is highly recommended
file(REMOVE "${CMAKE_CURRENT_BINARY_DIR}/CMakeFiles/.upx_cmake_config_done.txt")
if(DEFINED UPX_CONFIG_CMAKE_MINIMUM_REQUIRED_VERSION)
cmake_minimum_required(VERSION "${UPX_CONFIG_CMAKE_MINIMUM_REQUIRED_VERSION}" FATAL_ERROR)
else()
cmake_minimum_required(VERSION 3.8 FATAL_ERROR) # CMake >= 3.8 is needed for CXX_STANDARD 17
cmake_minimum_required(VERSION "3.8" FATAL_ERROR) # CMake >= 3.8 is needed for CXX_STANDARD 17
endif()
# support functions
include("${CMAKE_CURRENT_SOURCE_DIR}/misc/cmake/functions.cmake")
#***********************************************************************
# options
#***********************************************************************
upx_cmake_include_hook(1_options)
# compilation config options
if(NOT IS_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/.git")
if(NOT IS_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/.git" OR NOT EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/misc/cmake/use_strict_defaults.cmake")
# permissive config defaults when building from source code tarball
option(UPX_CONFIG_DISABLE_GITREV "Do not compile with default Git version info." ON)
option(UPX_CONFIG_DISABLE_SANITIZE "Do not compile with default sanitize options." ON)
@@ -38,45 +58,18 @@ option(UPX_CONFIG_DISABLE_SELF_PACK_TEST "Do not test packing UPX with itself" O
# init
#***********************************************************************
# Disallow in-source builds. Note that you will still have to manually
set(UPX_VERSION_STRING "4.3.0")
upx_cmake_include_hook(2_init)
# Disallow in-source build. Note that you will still have to manually
# clean up a few files if you accidentally try an in-source build.
if(IS_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/.git")
set(CMAKE_DISABLE_IN_SOURCE_BUILD ON)
set(CMAKE_DISABLE_SOURCE_CHANGES ON)
if(",${CMAKE_CURRENT_SOURCE_DIR}," STREQUAL ",${CMAKE_CURRENT_BINARY_DIR},")
message(FATAL_ERROR "ERROR: In-source builds are not allowed, please use an extra build dir.")
upx_disallow_in_source_build()
endif()
endif()
# useful for CI jobs: allow settings via environment and cache result
function(upx_cache_bool_vars)
set(default_value "${ARGV0}")
list(REMOVE_AT ARGV 0)
foreach(var ${ARGV})
set(value ${default_value})
if(DEFINED UPX_CACHE_${var}) # cached
set(value "${UPX_CACHE_${var}}")
elseif(DEFINED ${var}) # defined via "cmake -DXXX=YYY"
set(value "${${var}}")
elseif("$ENV{${var}}" MATCHES "^(0|1|OFF|ON|FALSE|TRUE)$") # environment
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
if(${CMAKE_VERSION} VERSION_GREATER "3.14.7" AND NOT DEFINED CMAKE_MSVC_RUNTIME_LIBRARY)
if(${CMAKE_VERSION} VERSION_GREATER "3.14.99" AND NOT DEFINED CMAKE_MSVC_RUNTIME_LIBRARY)
set(CMAKE_MSVC_RUNTIME_LIBRARY "MultiThreaded")
cmake_policy(SET CMP0091 NEW)
endif()
@@ -90,6 +83,7 @@ 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
UPX_CONFIG_EXPECT_THREADS UPX_CONFIG_REQUIRE_THREADS
)
# determine Git revision
@@ -134,26 +128,10 @@ else()
message(STATUS "UPX_VERSION_GITREV: not set")
endif()
# set the default build type to "Release"
get_property(is_multi_config GLOBAL PROPERTY GENERATOR_IS_MULTI_CONFIG)
if(NOT is_multi_config AND NOT CMAKE_BUILD_TYPE)
set(CMAKE_BUILD_TYPE "Release" CACHE STRING "Choose the type of build." FORCE)
endif()
# CMake init
project(upx VERSION 4.2.0 LANGUAGES C CXX)
# set the default multi-config build type to "Release"
if(is_multi_config)
set(c "${CMAKE_CONFIGURATION_TYPES}")
list(INSERT c 0 "Release")
list(INSERT c 1 "Debug")
if(CMAKE_BUILD_TYPE)
list(INSERT c 0 "${CMAKE_BUILD_TYPE}")
endif()
list(REMOVE_DUPLICATES c)
set(CMAKE_CONFIGURATION_TYPES "${c}" CACHE STRING "List of supported configuration types." FORCE)
endif()
upx_default_build_type(Release)
project(upx VERSION "${UPX_VERSION_STRING}" LANGUAGES C CXX)
upx_apply_build_type()
# set MSVC_FRONTEND and MINGW
if(NOT DEFINED MSVC_FRONTEND AND (MSVC OR CMAKE_C_COMPILER_FRONTEND_VARIANT MATCHES "^MSVC"))
@@ -173,17 +151,20 @@ include(CheckIncludeFile)
include(CheckStructHasMember)
include(CheckSymbolExists)
upx_cmake_include_hook(3_common_compilation_flags)
if(NOT DEFINED HAVE_UNISTD_H)
check_include_file("unistd.h" HAVE_UNISTD_H)
endif()
if(NOT DEFINED HAVE_UTIMENSAT)
# proper checking for utimensat() is somewhat messy
check_function_exists(utimensat HAVE_UTIMENSAT_FUNCTION__)
if(HAVE_UTIMENSAT_FUNCTION__)
check_symbol_exists(utimensat "sys/types.h;fcntl.h;sys/stat.h" HAVE_UTIMENSAT_SYMBOL__)
if(HAVE_UTIMENSAT_SYMBOL__)
CHECK_STRUCT_HAS_MEMBER("struct stat" "st_mtim.tv_nsec" "sys/types.h;fcntl.h;sys/stat.h" HAVE_STRUCT_STAT_ST_MTIM_TV_NSEC)
CHECK_STRUCT_HAS_MEMBER("struct stat" "st_mtim.tv_nsec" "sys/types.h;fcntl.h;sys/stat.h" HAVE_STRUCT_STAT_ST_MTIM_TV_NSEC) # POSIX.1-2008
if(NOT HAVE_STRUCT_STAT_ST_MTIM_TV_NSEC)
CHECK_STRUCT_HAS_MEMBER("struct stat" "st_mtimespec.tv_nsec" "sys/types.h;fcntl.h;sys/stat.h" HAVE_STRUCT_STAT_ST_MTIMESPEC_TV_NSEC)
CHECK_STRUCT_HAS_MEMBER("struct stat" "st_mtimespec.tv_nsec" "sys/types.h;fcntl.h;sys/stat.h" HAVE_STRUCT_STAT_ST_MTIMESPEC_TV_NSEC) # macOS
endif()
if(HAVE_STRUCT_STAT_ST_MTIM_TV_NSEC OR HAVE_STRUCT_STAT_ST_MTIMESPEC_TV_NSEC)
set(HAVE_UTIMENSAT 1)
@@ -215,38 +196,6 @@ if(MSVC_FRONTEND)
set(warn_WX -wd5105 ${warn_WX})
endif()
function(upx_add_definitions_with_prefix)
set(flag_prefix "${ARGV0}")
if(flag_prefix MATCHES "^empty$") # need "empty" to work around bug in old CMake versions
set(flag_prefix "")
endif()
list(REMOVE_AT ARGV 0)
set(failed "")
foreach(f ${ARGV})
set(flag "${flag_prefix}${f}")
string(REGEX REPLACE "[^0-9a-zA-Z_]" "_" cache_var "HAVE_CFLAG_${flag}")
check_c_compiler_flag("${flag}" ${cache_var})
if(${cache_var})
#message(STATUS "add_definitions: ${flag}")
add_definitions("${flag}")
else()
list(APPEND failed "${f}")
endif()
endforeach()
set(failed_flags "${failed}" PARENT_SCOPE) # return value
endfunction()
function(upx_add_definitions)
set(failed_flags "")
if(MSVC_FRONTEND AND CMAKE_C_COMPILER_ID MATCHES "Clang")
# for clang-cl try "-clang:" flag prefix first
upx_add_definitions_with_prefix("-clang:" ${ARGV})
upx_add_definitions_with_prefix("empty" ${failed_flags})
else()
upx_add_definitions_with_prefix("empty" ${ARGV})
endif()
endfunction()
if(NOT CMAKE_C_COMPILER_ID MATCHES "^MSVC")
# use -O2 instead of -O3 to reduce code size
string(REGEX REPLACE "(^| )-O3( |$$)" "\\1-O2\\2" a "${CMAKE_C_FLAGS_RELEASE}")
@@ -261,6 +210,7 @@ if(MSVC_FRONTEND OR WIN32 OR MINGW OR CYGWIN)
add_definitions(-D_CRT_SECURE_NO_DEPRECATE)
add_definitions(-D_CRT_SECURE_NO_WARNINGS)
add_definitions(-DWIN32_LEAN_AND_MEAN)
add_definitions(-D__USE_MINGW_ANSI_STDIO)
endif()
if(MSVC_FRONTEND)
# use -funsigned-char; set __cplusplus according to selected C++ standard
@@ -281,65 +231,10 @@ if(NOT CMAKE_C_COMPILER_ID MATCHES "^MSVC")
endif()
endif()
# compile a source file with -O2 even in Debug build
function(upx_compile_source_debug_with_O2)
set(flags "$<$<CONFIG:Debug>:-O2>")
if (CMAKE_VERSION VERSION_LESS 3.8)
# 3.8: The COMPILE_FLAGS source file property learned to support generator expressions
if (is_multi_config OR NOT CMAKE_BUILD_TYPE MATCHES "^Debug$")
return()
# examine MinGW/Cygwin compiler configuration
if(IS_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/.git")
upx_print_mingw_symbols()
endif()
set(flags "-O2")
endif()
if(CMAKE_GENERATOR MATCHES "Xcode") # multi-config
# NOTE: Xcode does not support per-config per-source COMPILE_FLAGS (as of CMake 3.27.7)
return()
endif()
foreach(t ${ARGV})
if(MSVC_FRONTEND)
# MSVC uses some Debug compilation options like -RTC1 that are incompatible with -O2
else()
get_source_file_property(prop ${t} COMPILE_FLAGS)
if(prop MATCHES "^(NOTFOUND)?$")
set_source_files_properties(${t} PROPERTIES COMPILE_FLAGS "${flags}")
else()
set_source_files_properties(${t} PROPERTIES COMPILE_FLAGS "${prop} ${flags}")
endif()
endif()
endforeach()
endfunction()
# compile a target with -O2 even in Debug build
function(upx_compile_target_debug_with_O2)
foreach(t ${ARGV})
if(MSVC_FRONTEND)
# MSVC uses some Debug compilation options like -RTC1 that are incompatible with -O2
else()
target_compile_options(${t} PRIVATE $<$<CONFIG:Debug>:-O2>)
endif()
endforeach()
endfunction()
# sanitize a target
function(upx_sanitize_target)
foreach(t ${ARGV})
if(UPX_CONFIG_DISABLE_SANITIZE)
# no-op
elseif(MSVC_FRONTEND)
# MSVC uses -GS (similar to -fstack-protector) by default
elseif(MINGW OR CYGWIN)
# avoid link errors with current MinGW-w64 versions
# see https://www.mingw-w64.org/contribute/#sanitizers-asan-tsan-usan
else()
# default sanitizer for Debug builds
target_compile_options(${t} PRIVATE $<$<CONFIG:Debug>:-fsanitize=undefined -fsanitize-undefined-trap-on-error -fstack-protector-all>)
# default sanitizer for Release builds
target_compile_options(${t} PRIVATE $<$<CONFIG:MinSizeRel>:-fstack-protector>)
target_compile_options(${t} PRIVATE $<$<CONFIG:Release>:-fstack-protector>)
target_compile_options(${t} PRIVATE $<$<CONFIG:RelWithDebInfo>:-fstack-protector>)
endif()
endforeach()
endfunction()
#***********************************************************************
# targets
@@ -350,44 +245,56 @@ set(UPX_CONFIG_DISABLE_THREADS ON) # multithreading is currently not used; maybe
set(UPX_CONFIG_DISABLE_BZIP2 ON) # bzip2 is currently not used; we might need it to decompress linux kernels
set(UPX_CONFIG_DISABLE_ZSTD ON) # zstd is currently not used; maybe in UPX version 5
upx_cmake_include_hook(4_targets)
if(NOT UPX_CONFIG_DISABLE_THREADS)
find_package(Threads)
endif()
# make sure that threads are indeed fully supported in C++
if(Threads_FOUND)
foreach(f std_lock_guard.cpp)
set(CMAKE_TRY_COMPILE_TARGET_TYPE "EXECUTABLE")
try_compile(result "${CMAKE_CURRENT_BINARY_DIR}"
"${CMAKE_CURRENT_SOURCE_DIR}/misc/cmake/try_compile/${f}"
OUTPUT_VARIABLE output)
if(NOT result)
# failed; under MinGW be sure to use the posix-threads and NOT the win32-threads version
#message(STATUS "Threads FAILED: ${output}") # debug output from try_compile
set(Threads_FOUND OFF)
break()
endif()
endforeach()
endif()
if(NOT UPX_CONFIG_DISABLE_BZIP2)
file(GLOB bzip2_SOURCES "vendor/bzip2/*.c")
list(SORT bzip2_SOURCES)
upx_add_glob_files(bzip2_SOURCES "vendor/bzip2/*.c")
add_library(upx_vendor_bzip2 STATIC ${bzip2_SOURCES})
if(NOT UPX_CONFIG_DISABLE_C_STANDARD)
set_property(TARGET upx_vendor_bzip2 PROPERTY C_STANDARD 11)
endif()
endif() # UPX_CONFIG_DISABLE_BZIP2
file(GLOB ucl_SOURCES "vendor/ucl/src/*.c")
list(SORT ucl_SOURCES)
upx_add_glob_files(ucl_SOURCES "vendor/ucl/src/*.c")
add_library(upx_vendor_ucl STATIC ${ucl_SOURCES})
if(NOT UPX_CONFIG_DISABLE_C_STANDARD)
set_property(TARGET upx_vendor_ucl PROPERTY C_STANDARD 11)
endif()
file(GLOB zlib_SOURCES "vendor/zlib/*.c")
list(SORT zlib_SOURCES)
upx_add_glob_files(zlib_SOURCES "vendor/zlib/*.c")
add_library(upx_vendor_zlib STATIC ${zlib_SOURCES})
if(NOT UPX_CONFIG_DISABLE_C_STANDARD)
set_property(TARGET upx_vendor_zlib PROPERTY C_STANDARD 11)
endif()
if(NOT UPX_CONFIG_DISABLE_ZSTD)
file(GLOB zstd_SOURCES "vendor/zstd/lib/*/*.c")
list(SORT zstd_SOURCES)
upx_add_glob_files(zstd_SOURCES "vendor/zstd/lib/*/*.c")
add_library(upx_vendor_zstd STATIC ${zstd_SOURCES})
if(NOT UPX_CONFIG_DISABLE_C_STANDARD)
set_property(TARGET upx_vendor_zstd PROPERTY C_STANDARD 11)
endif()
endif() # UPX_CONFIG_DISABLE_ZSTD
file(GLOB upx_SOURCES "src/*.cpp" "src/[cfu]*/*.cpp")
list(SORT upx_SOURCES)
upx_add_glob_files(upx_SOURCES "src/*.cpp" "src/[cfu]*/*.cpp")
add_executable(upx ${upx_SOURCES})
if(NOT UPX_CONFIG_DISABLE_CXX_STANDARD)
set_property(TARGET upx PROPERTY CXX_STANDARD 17)
@@ -407,14 +314,17 @@ endif()
# target compilation flags
#***********************************************************************
upx_cmake_include_hook(5_target_compilation_flags)
if(NOT UPX_CONFIG_DISABLE_BZIP2)
set(t upx_vendor_bzip2)
upx_compile_target_debug_with_O2(${t})
upx_sanitize_target(${t})
target_compile_definitions(${t} PRIVATE BZ_NO_STDIO=1)
if(MSVC_FRONTEND)
target_compile_options(${t} PRIVATE ${warn_WN} -wd4127 -wd4244 -wd4267 ${warn_WX})
else()
target_compile_options(${t} PRIVATE ${warn_Wall} -Wno-implicit-fallthrough ${warn_Werror})
target_compile_options(${t} PRIVATE ${warn_Wall} ${warn_Werror})
endif()
endif() # UPX_CONFIG_DISABLE_BZIP2
@@ -438,8 +348,8 @@ endif()
if(MSVC_FRONTEND)
target_compile_options(${t} PRIVATE -W3 ${warn_WX})
else()
target_compile_options(${t} PRIVATE -Wall ${warn_Werror})
##target_compile_options(${t} PRIVATE ${warn_Wall} -Wno-cast-align -Wno-cast-qual ${warn_Werror})
##target_compile_options(${t} PRIVATE -Wall ${warn_Werror})
target_compile_options(${t} PRIVATE ${warn_Wall} -Wno-cast-align -Wno-cast-qual ${warn_Werror})
endif()
if(NOT UPX_CONFIG_DISABLE_ZSTD)
@@ -473,7 +383,7 @@ if(NOT UPX_CONFIG_DISABLE_WERROR)
target_compile_definitions(${t} PRIVATE UPX_CONFIG_DISABLE_WERROR=0)
endif()
if(NOT UPX_CONFIG_DISABLE_BZIP2)
target_compile_definitions(${t} PRIVATE WITH_BZIP2=0) # FIXME TODO
target_compile_definitions(${t} PRIVATE WITH_BZIP2=1)
endif()
if(NOT UPX_CONFIG_DISABLE_ZSTD)
target_compile_definitions(${t} PRIVATE WITH_ZSTD=1)
@@ -484,7 +394,7 @@ if(HAVE_UTIMENSAT)
target_compile_definitions(${t} PRIVATE HAVE_STRUCT_STAT_ST_MTIMESPEC_TV_NSEC=1)
endif()
endif()
# improve speed of the debug versions
# improve speed of the Debug versions
upx_compile_source_debug_with_O2(src/compress/compress_lzma.cpp)
upx_compile_source_debug_with_O2(src/filter/filter_impl.cpp)
#upx_compile_target_debug_with_O2(${t})
@@ -496,51 +406,55 @@ else()
endif()
#***********************************************************************
# test
# ctest
# make test
# ninja test
#***********************************************************************
upx_cmake_include_hook(6_test)
if(NOT UPX_CONFIG_CMAKE_DISABLE_TEST)
include(CTest)
# TODO later: check CMAKE_CROSSCOMPILING_EMULATOR
if(NOT CMAKE_CROSSCOMPILING)
if(NOT CMAKE_CROSSCOMPILING OR CMAKE_CROSSCOMPILING_EMULATOR)
add_test(NAME upx-version COMMAND upx --version)
add_test(NAME upx-help COMMAND upx --help)
endif()
if(NOT CMAKE_CROSSCOMPILING AND NOT UPX_CONFIG_DISABLE_SELF_PACK_TEST)
add_test(NAME upx-sysinfo COMMAND upx --sysinfo -v)
if(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}")
list(REMOVE_AT ARGV 0)
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(emu "")
if(DEFINED CMAKE_CROSSCOMPILING_EMULATOR)
set(emu "${CMAKE_CROSSCOMPILING_EMULATOR}")
endif()
set(exe "${CMAKE_EXECUTABLE_SUFFIX}")
set(upx_self_exe "$<TARGET_FILE:upx>")
set(fo "--force-overwrite")
upx_add_test(upx-self-pack upx -3 "${upx_self_exe}" ${fo} -o upx-packed${exe})
upx_add_test(upx-self-pack-n2b upx -3 --nrv2b "${upx_self_exe}" ${fo} -o upx-packed-n2b${exe})
upx_add_test(upx-self-pack-n2d upx -3 --nrv2d "${upx_self_exe}" ${fo} -o upx-packed-n2d${exe})
upx_add_test(upx-self-pack-n2e upx -3 --nrv2e "${upx_self_exe}" ${fo} -o upx-packed-n2e${exe})
upx_add_test(upx-self-pack-lzma upx -1 --lzma "${upx_self_exe}" ${fo} -o upx-packed-lzma${exe})
upx_add_test(upx-list upx -l upx-packed${exe} upx-packed-n2b${exe} upx-packed-n2d${exe} upx-packed-n2e${exe} upx-packed-lzma${exe})
upx_add_test(upx-fileinfo upx --fileinfo upx-packed${exe} upx-packed-n2b${exe} upx-packed-n2d${exe} upx-packed-n2e${exe} upx-packed-lzma${exe})
upx_add_test(upx-test upx -t upx-packed${exe} upx-packed-n2b${exe} upx-packed-n2d${exe} upx-packed-n2e${exe} upx-packed-lzma${exe})
upx_add_test(upx-unpack upx -d upx-packed${exe} ${fo} -o upx-unpacked${exe})
upx_add_test(upx-run-unpacked ./upx-unpacked${exe} --version-short)
upx_add_test(upx-run-packed ./upx-packed${exe} --version-short)
upx_add_serial_test(upx-self-pack upx -3 "${upx_self_exe}" ${fo} -o upx-packed${exe})
upx_add_serial_test(upx-self-pack-n2b upx -3 --nrv2b "${upx_self_exe}" ${fo} -o upx-packed-n2b${exe})
upx_add_serial_test(upx-self-pack-n2d upx -3 --nrv2d "${upx_self_exe}" ${fo} -o upx-packed-n2d${exe})
upx_add_serial_test(upx-self-pack-n2e upx -3 --nrv2e "${upx_self_exe}" ${fo} -o upx-packed-n2e${exe})
upx_add_serial_test(upx-self-pack-lzma upx -1 --lzma "${upx_self_exe}" ${fo} -o upx-packed-lzma${exe})
upx_add_serial_test(upx-list upx -l upx-packed${exe} upx-packed-n2b${exe} upx-packed-n2d${exe} upx-packed-n2e${exe} upx-packed-lzma${exe})
upx_add_serial_test(upx-fileinfo upx --fileinfo upx-packed${exe} upx-packed-n2b${exe} upx-packed-n2d${exe} upx-packed-n2e${exe} upx-packed-lzma${exe})
upx_add_serial_test(upx-test upx -t upx-packed${exe} upx-packed-n2b${exe} upx-packed-n2d${exe} upx-packed-n2e${exe} upx-packed-lzma${exe})
upx_add_serial_test(upx-unpack upx -d upx-packed${exe} ${fo} -o upx-unpacked${exe})
upx_add_serial_test(upx-run-unpacked ${emu} ./upx-unpacked${exe} --version-short)
upx_add_serial_test(upx-run-packed ${emu} ./upx-packed${exe} --version-short)
endif() # UPX_CONFIG_DISABLE_SELF_PACK_TEST
endif()
endif() # UPX_CONFIG_CMAKE_DISABLE_TEST
#***********************************************************************
# install
# cmake --install .
# make install
# ninja install
#***********************************************************************
upx_cmake_include_hook(7_install)
if(NOT UPX_CONFIG_CMAKE_DISABLE_INSTALL)
# installation prefix and directories
@@ -551,6 +465,7 @@ endif()
if(CMAKE_INSTALL_PREFIX)
include(GNUInstallDirs)
endif()
# install files
if(CMAKE_INSTALL_PREFIX AND DEFINED CMAKE_INSTALL_FULL_BINDIR)
install(TARGETS upx DESTINATION "${CMAKE_INSTALL_FULL_BINDIR}")
install(FILES
@@ -563,31 +478,29 @@ endif()
endif() # UPX_CONFIG_CMAKE_DISABLE_INSTALL
#***********************************************************************
# finally print some info about the build configuration
# summary
# print some info about the build configuration
#***********************************************************************
function(print_var)
foreach(var ${ARGV})
if(${var})
message(STATUS "${var} = ${${var}}")
endif()
endforeach()
endfunction()
upx_cmake_include_hook(8_summary)
if(EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/maint/make/CMakeLists.maint.txt")
include("${CMAKE_CURRENT_SOURCE_DIR}/maint/make/CMakeLists.maint.txt")
endif()
print_var(CMAKE_VERSION UPX_CONFIG_CMAKE_MINIMUM_REQUIRED_VERSION CMAKE_GENERATOR)
upx_print_var(CMAKE_VERSION UPX_CONFIG_CMAKE_MINIMUM_REQUIRED_VERSION CMAKE_GENERATOR)
if(NOT UPX_CONFIG_CMAKE_DISABLE_PRINT_INFO)
print_var(CMAKE_HOST_SYSTEM_NAME CMAKE_HOST_SYSTEM_VERSION)
print_var(CMAKE_SYSTEM_NAME CMAKE_SYSTEM_VERSION CMAKE_CROSSCOMPILING)
print_var(CMAKE_C_COMPILER_ID CMAKE_C_COMPILER_VERSION CMAKE_C_COMPILER_FRONTEND_VARIANT CMAKE_C_COMPILER_ARCHITECTURE_ID CMAKE_C_PLATFORM_ID CMAKE_C_COMPILER_ABI)
print_var(CMAKE_CXX_COMPILER_ID CMAKE_CXX_COMPILER_VERSION CMAKE_CXX_COMPILER_FRONTEND_VARIANT CMAKE_CXX_COMPILER_ARCHITECTURE_ID CMAKE_CXX_PLATFORM_ID CMAKE_CXX_COMPILER_ABI)
print_var(CMAKE_POSITION_INDEPENDENT_CODE)
print_var(CYGWIN GNUC MINGW MSVC MSVC_FRONTEND MSVC_IDE WIN32 WIN64)
upx_print_var(CMAKE_HOST_SYSTEM_NAME CMAKE_HOST_SYSTEM_VERSION)
upx_print_var(CMAKE_SYSTEM_NAME CMAKE_SYSTEM_VERSION CMAKE_CROSSCOMPILING CMAKE_CROSSCOMPILING_EMULATOR)
upx_print_var(CMAKE_C_COMPILER_ID CMAKE_C_COMPILER_VERSION CMAKE_C_COMPILER_FRONTEND_VARIANT CMAKE_C_COMPILER_ARCHITECTURE_ID CMAKE_C_PLATFORM_ID CMAKE_C_COMPILER_ABI)
upx_print_var(CMAKE_CXX_COMPILER_ID CMAKE_CXX_COMPILER_VERSION CMAKE_CXX_COMPILER_FRONTEND_VARIANT CMAKE_CXX_COMPILER_ARCHITECTURE_ID CMAKE_CXX_PLATFORM_ID CMAKE_CXX_COMPILER_ABI)
upx_print_var(CMAKE_INTERPROCEDURAL_OPTIMIZATION CMAKE_POSITION_INDEPENDENT_CODE CMAKE_TRY_COMPILE_CONFIGURATION)
upx_print_var(CYGWIN GNUC MINGW MSVC MSVC_FRONTEND MSVC_IDE WIN32 WIN64)
endif() # UPX_CONFIG_CMAKE_DISABLE_PRINT_INFO
print_var(CMAKE_INSTALL_PREFIX CMAKE_CONFIGURATION_TYPES CMAKE_BUILD_TYPE)
upx_print_var(CMAKE_INSTALL_PREFIX CMAKE_CONFIGURATION_TYPES CMAKE_BUILD_TYPE)
if(Threads_FOUND)
message(STATUS "WITH_THREADS = 1")
elseif(UPX_CONFIG_REQUIRE_THREADS)
message(FATAL_ERROR "ERROR: WITH_THREADS required")
elseif(UPX_CONFIG_EXPECT_THREADS AND NOT UPX_CONFIG_DISABLE_THREADS)
message(FATAL_ERROR "ERROR: WITH_THREADS expected")
endif()
if(CMAKE_BUILD_TYPE AND NOT CMAKE_BUILD_TYPE MATCHES "^(Debug|None|Release)$")
message(WARNING "WARNING: unsupported CMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE}; please use \"Debug\" or \"Release\"")
endif()
@@ -605,4 +518,7 @@ if(NOT ",${CMAKE_C_COMPILER_FRONTEND_VARIANT}," STREQUAL ",${CMAKE_CXX_COMPILER_
endif()
endif() # UPX_CONFIG_CMAKE_DISABLE_PLATFORM_CHECK
upx_cmake_include_hook(9_finish)
file(WRITE "${CMAKE_CURRENT_BINARY_DIR}/CMakeFiles/.upx_cmake_config_done.txt" "")
# vim:set ft=cmake ts=4 sw=4 tw=0 et:
+15 -6
View File
@@ -24,14 +24,14 @@ endif
# default
#***********************************************************************
.DEFAULT_GOAL = build/release
run_cmake_config = $(CMAKE) -S . -B $1 $(UPX_CMAKE_CONFIG_FLAGS) -DCMAKE_BUILD_TYPE=$2
run_cmake_build = $(CMAKE) --build $1 $(UPX_CMAKE_BUILD_FLAGS) --config $2
# avoid re-running run_cmake_config if CMakeCache.txt already exists
run_config = $(if $(wildcard $1/CMakeCache.txt),,$(call run_cmake_config,$1,$2))
# avoid re-running run_cmake_config if .upx_cmake_config_done.txt already exists
run_config = $(if $(wildcard $1/CMakeFiles/.upx_cmake_config_done.txt),,$(call run_cmake_config,$1,$2))
run_build = $(call run_cmake_build,$1,$2)
.DEFAULT_GOAL = build/release
build/debug: PHONY
$(call run_config,$@,Debug)
$(call run_build,$@,Debug)
@@ -56,10 +56,19 @@ build/%/all: $$(dir $$@)debug $$(dir $$@)release ;
#
# extra pre-defined build configurations and some utility; optional
ifneq ($(MAKEFILE_LIST),)
include $(dir $(lastword $(MAKEFILE_LIST)))/misc/make/Makefile-extra.mk
else
include ./misc/make/Makefile-extra.mk
endif
# developer convenience
ifneq ($(wildcard /usr/bin/env),) # needs bash, perl, xargs, etc.
check-whitespace clang-format run-testsuite run-testsuite-debug run-testsuite-release: PHONY src/Makefile
CTEST = ctest
test:: $(.DEFAULT_GOAL) PHONY
cd $(.DEFAULT_GOAL) && $(CTEST)
ifneq ($(wildcard /usr/bin/env),) # need Unix utils like bash, perl, sed, xargs, etc.
ifneq ($(wildcard ./misc/scripts/.),)
check-whitespace clang-format run-testsuite run-testsuite-debug run-testsuite-release: src/Makefile PHONY
$(MAKE) -C src $@
endif
endif
+11
View File
@@ -2,11 +2,22 @@
User visible changes for UPX
==================================================================
Changes in 4.2.2 (03 Jan 2024):
* bug fixes - see https://github.com/upx/upx/milestone/15
Changes in 4.2.1 (01 Nov 2023):
* linux: /proc/self/exe now is optional
* windows: use SetFileTime to preserve sub-second file timestamps
* official Windows builds: revert activeCodePage change introduced in 4.2.0
* bug fixes - see https://github.com/upx/upx/milestone/14
Changes in 4.2.0 (26 Oct 2023):
* win32/pe and win64/pe: stricter relocation checks; please report regressions
* unix: use utimensat to preserve sub-second file timestamps
* new option '--link' to preserve hard-links (Unix only; use with care)
* add support for NO_COLOR env var; see https://no-color.org/
* disable macOS support until we fix compatibility with macOS 13+
* official Windows builds: set activeCodePage to UTF-8
* bug fixes - see https://github.com/upx/upx/milestone/13
Changes in 4.1.0 (08 Aug 2023):
+4 -4
View File
@@ -8,7 +8,7 @@
The Ultimate Packer for eXecutables
Copyright (c) 1996-2023 Markus Oberhumer, Laszlo Molnar & John Reiser
Copyright (c) 1996-2024 Markus Oberhumer, Laszlo Molnar & John Reiser
https://upx.github.io
@@ -85,9 +85,9 @@ THE FUTURE
COPYRIGHT
=========
Copyright (C) 1996-2023 Markus Franz Xaver Johannes Oberhumer
Copyright (C) 1996-2023 Laszlo Molnar
Copyright (C) 2000-2023 John F. Reiser
Copyright (C) 1996-2024 Markus Franz Xaver Johannes Oberhumer
Copyright (C) 1996-2024 Laszlo Molnar
Copyright (C) 2000-2024 John F. Reiser
UPX is distributed with full source code under the terms of the
GNU General Public License v2+; either under the pure GPLv2+ (see
+1 -1
View File
@@ -8,7 +8,7 @@
The Ultimate Packer for eXecutables
Copyright (c) 1996-2023 Markus Oberhumer, Laszlo Molnar & John Reiser
Copyright (c) 1996-2024 Markus Oberhumer, Laszlo Molnar & John Reiser
https://upx.github.io
+5 -3
View File
@@ -1,5 +1,6 @@
#
# UPX doc Makefile - needs GNU make, pod2html, pod2man and pod2text
# UPX doc Makefile - needs GNU make, sed, pod2html, pod2man and pod2text
# Copyright (C) Markus Franz Xaver Johannes Oberhumer
#
BUILT_SOURCES = upx.1 upx-doc.html upx-doc.txt
@@ -24,6 +25,9 @@ DETAB2 := sed -e 's/$(tab)/ /g'
#***********************************************************************
.DEFAULT_GOAL = all
.PHONY: PHONY
.SECONDEXPANSION:
.SUFFIXES:
all: $(BUILT_SOURCES) PHONY
@@ -34,7 +38,6 @@ mostlyclean clean distclean maintainer-clean: PHONY
# rules
#***********************************************************************
.SUFFIXES:
.SUFFIXES: .1 .html .man .pod .ps .tex .txt
%.1 : %.pod
@@ -68,4 +71,3 @@ mostlyclean clean distclean maintainer-clean: PHONY
$(BUILT_SOURCES): $(top_srcdir)/src/version.h $(MAKEFILE_LIST)
.DELETE_ON_ERROR: $(BUILT_SOURCES)
.PHONY: PHONY
+1 -1
View File
@@ -8,7 +8,7 @@
The Ultimate Packer for eXecutables
Copyright (c) 1996-2023 Markus Oberhumer, Laszlo Molnar & John Reiser
Copyright (c) 1996-2024 Markus Oberhumer, Laszlo Molnar & John Reiser
https://upx.github.io
+46 -44
View File
@@ -1,5 +1,5 @@
Decompressing ELF Directly to Memory on Linux/x86
Copyright (C) 2000-2023 John F. Reiser jreiser@BitWagon.com
Copyright (C) 2000-2024 John F. Reiser jreiser@BitWagon.com
References:
<elf.h> definitions for the ELF file format
@@ -15,7 +15,7 @@ the value that is manipulated by system call 45 (__NR_brk in
there will be no execve() except for the execve() of the decompressor
program itself. So, the decompressor program (which contains the
compressed version of the original executable) must have the same
brk() as the original executable. So, the second PT_LOAD
brk() as the original executable. So, the first PT_LOAD
ELF "segment" of the compressed program is used only to set the brk(0).
See src/p_lx_elf.cpp, function PackLinuxElf32::generateElfHdr.
All of the decompressor's code, and all of the compressed image
@@ -25,35 +25,27 @@ decompressor program.
The decompressor program stub is just under 2K bytes when linked.
After linking, the decompressor code is converted to an initialized
array, and #included into the compilation of the compressor;
see src/stub/l_le_n2b.h. To make self-contained compressed
see stub/i386-linux.elf-entry.h. To make self-contained compressed
executables even smaller, the compressor also compresses all but the
startup and decompression subroutine of the decompressor itself,
saving a few hundred bytes. The startup code first decompresses the
rest of the decompressor, then jumps to it. A nonstandard linker
script src/stub/l_lx_elf86.lds places both the .text and .data
of the decompressor into the same PT_LOAD at 0x00401000. The
compressor includes the compressed bytes of the original executable
at the end of this first PT_LOAD.
script src/stub/src/i386-linux.elf-entry.lds arranges the SECTIONS
so that PackLinuxElf32x86::buildLoader() and buildLinuxLoader()
generate the desired stub code, which goes into PT_LOAD[1].
At runtime, the decompressed stub lives at 0x00400000. In order for the
decompressed stub to work properly at an address that is different
from its link-time address, the compiled code must contain no absolute
addresses. So, the data items in l_lx_elf.c must be only parameters
and automatic (on-stack) local variables; no global data, no static data,
and no string constants. Use "size l_le_n2b.o l_6e_n2b.o" to check
that both data and bss have length zero. Also, the '&' operator
may not be used to take the address of a function.
The address 0x00400000 was chosen to be out of the way of the usual
load address 0x08048000, and to minimize fragmentation in kernel
page tables; one page of page tables covers 4 MiB. The address
0x00401000 was chosen as 1 page up from a 64 KiB boundary, to
make the startup code and its constants smaller.
At runtime, the decompressed stub lives close beyond the brk().
In order for the decompressed stub to work properly at an address
that is different from its link-time address, the compiled code must
contain no absolute addresses. So, the data items in stub code
must be only parameters and automatic (on-stack) local variables;
no global data, no static data, and no string constants. Also,
the '&' operator may not be used to take the address of a function.
Decompression of the executable begins by decompressing the Elf32_Ehdr
and Elf32_Phdr, and then uses the Ehdr and Phdrs to control decompression
of the PT_LOAD segments.
Subroutine do_xmap() of src/stub/l_lx_elf.c performs the
and Elf32_Phdr, and then uses those Ehdr and Phdrs to control decompression
of the PT_LOAD segments. Subroutine do_xmap() of src/stub/src/
i386-linux.elf-main.c performs the
"virtual execve()" using the compressed data as source, and stores
the decompressed bytes directly into the appropriate virtual addresses.
@@ -74,22 +66,17 @@ expanding $ORIGIN in -rpath, or for application code that relies on
--unmap-all-pages to achieve that effect at run time. Upx-3.04
and previous versions did this by default with no option. However,
too much other software erroneously assumes that /proc/self/exe
always exists.
always exists. upx-4.3.0 made /proc/self/exe optional so that
chroot() and related environments can work.
For Elf formats, UPX adds an environment variable named " " [three
spaces] which saves the results of readlink("/proc/self/exe",,)
If /proc/self/exe is ENOENT, then the variable has the same value
as its name "/proc/self/exe".
On arm*-linux-elf there is no good address at which to retain one
page of the compressed executable. Pages below the usual .p_vaddr
0x8000 (32KiB) are rejected by the kernel. Using a page above the
original uncompressed brk(0) would require placing the entire initial
compressed program above uncompressed brk(0), which would significantly
increase the running brk(0); but too many programs break if brk(0)
moves. Thus on arm*-linux-elf the compressed executable begins
with 0x8000==.p_vaddr, all pages mapped by execve() that are also
occupied by decompressed bytes are removed before overwriting, and
/proc/self/exe becomes a "(deleted)" symlink. It might be possible
to preserve /proc/self/exe if the original uncompressed executable
were created with 0x9000==.p_vaddr (one page higher than the usual
0x8000) so that the compressed page mapped at 0x8000 would linger.
[This has not been tested.]
All of the above documentation refers to ET_EXEC main programs,
which always use the same virtual addresses. An ET_DYN executable
(main program or shared library) follows much the same scheme,
re-using the address space that the kernel chose originally.
Linux stores the pathname argument that was specified to execve()
immediately after the '\0' which terminates the character string of the
@@ -99,9 +86,24 @@ records a pointer to that character string in Elf32_auxv[AT_EXECFN].
The pathname is not "bound" to the file as strongly as /proc/self/exe
(the file may be changed without affecting the pathname), but the
pathname does provide some information. The pathname may be relative
to the working directory, so look before any chdir().
to the working directory, so look before performing any chdir().
The Elf formats for Linux add an environment variable named " " [three
spaces] which saves the results of readlink("/proc/self/exe",,) before
the runtime stub unmaps all its pages. As of 2006-10-03 this works
for linux/elf386 and linux/ElfAMD.
On any page, then SELinux in strictest enforcing mode prohibits
simultaneous PROT_EXEC and PROT_WRITE, and also prohibits adding
PROT_EXEC if the kernel VMA struct (Virtual Memory Area struct)
that manages that page ever has had PROT_WRITE. This implies that
the only way to get PROT_EXEC is to map the page directly from a file.
Therefore, in late 2023 the various decompression stubs are being
rewritten to "bounce" the decompressed data through pages in a
memory-resident file created by the memfd_create() system call,
and subsequently mapped PROT_EXEC. Actual copying of the pages
can be avoided by careful sequence mmap() modes, but the overhead
of an additional system call is required.
The not-as-strict "targeted enforcing" mode of
SELinux seems not to demand this extra work, except for executables
that run with elevated privileges, such as various system daemons.
So "ordinary" user-mode apps can run in current "targeted enforcing"
mode. But because the actual runtime mode of SELinux is unknown
at compression time, then the memfd_create method should be used
all the time.
+5 -5
View File
@@ -22,7 +22,7 @@
<h1 id="ABSTRACT">ABSTRACT</h1>
<pre><code> The Ultimate Packer for eXecutables
Copyright (c) 1996-2023 Markus Oberhumer, Laszlo Molnar &amp; John Reiser
Copyright (c) 1996-2024 Markus Oberhumer, Laszlo Molnar &amp; John Reiser
https://upx.github.io</code></pre>
<p><b>UPX</b> is a portable, extendable, high-performance executable packer for several different executable formats. It achieves an excellent compression ratio and offers <i>*very*</i> fast decompression. Your executables suffer no memory overhead or other drawbacks for most of the formats supported, because of in-place decompression.</p>
@@ -785,13 +785,13 @@ Jens Medoch &lt;jssg@users.sourceforge.net&gt;</code></pre>
<h1 id="COPYRIGHT">COPYRIGHT</h1>
<p>Copyright (C) 1996-2023 Markus Franz Xaver Johannes Oberhumer</p>
<p>Copyright (C) 1996-2024 Markus Franz Xaver Johannes Oberhumer</p>
<p>Copyright (C) 1996-2023 Laszlo Molnar</p>
<p>Copyright (C) 1996-2024 Laszlo Molnar</p>
<p>Copyright (C) 2000-2023 John F. Reiser</p>
<p>Copyright (C) 2000-2024 John F. Reiser</p>
<p>Copyright (C) 2002-2023 Jens Medoch</p>
<p>Copyright (C) 2002-2024 Jens Medoch</p>
<p><b>UPX</b> is distributed with full source code under the terms of the GNU General Public License v2+; either under the pure GPLv2+ (see the file COPYING), or (at your option) under the GPLv+2 with special exceptions and restrictions granting the free usage for all binaries including commercial programs (see the file LICENSE).</p>
+5 -5
View File
@@ -6,7 +6,7 @@ SYNOPSIS
ABSTRACT
The Ultimate Packer for eXecutables
Copyright (c) 1996-2023 Markus Oberhumer, Laszlo Molnar & John Reiser
Copyright (c) 1996-2024 Markus Oberhumer, Laszlo Molnar & John Reiser
https://upx.github.io
UPX is a portable, extendable, high-performance executable packer for
@@ -818,13 +818,13 @@ AUTHORS
Jens Medoch <jssg@users.sourceforge.net>
COPYRIGHT
Copyright (C) 1996-2023 Markus Franz Xaver Johannes Oberhumer
Copyright (C) 1996-2024 Markus Franz Xaver Johannes Oberhumer
Copyright (C) 1996-2023 Laszlo Molnar
Copyright (C) 1996-2024 Laszlo Molnar
Copyright (C) 2000-2023 John F. Reiser
Copyright (C) 2000-2024 John F. Reiser
Copyright (C) 2002-2023 Jens Medoch
Copyright (C) 2002-2024 Jens Medoch
UPX is distributed with full source code under the terms of the GNU
General Public License v2+; either under the pure GPLv2+ (see the file
Generated
+6 -6
View File
@@ -133,7 +133,7 @@
.\" ========================================================================
.\"
.IX Title "UPX 1"
.TH UPX 1 "2023-10-26" "upx 4.2.0" " "
.TH UPX 1 "2024-01-03" "upx 4.2.2" " "
.\" For nroff, turn off justification. Always turn off hyphenation; it makes
.\" way too many mistakes in technical documents.
.if n .ad l
@@ -147,7 +147,7 @@ upx \- compress or expand executable files
.IX Header "ABSTRACT"
.Vb 3
\& The Ultimate Packer for eXecutables
\& Copyright (c) 1996\-2023 Markus Oberhumer, Laszlo Molnar & John Reiser
\& Copyright (c) 1996\-2024 Markus Oberhumer, Laszlo Molnar & John Reiser
\& https://upx.github.io
.Ve
.PP
@@ -1019,13 +1019,13 @@ Please report all bugs immediately to the authors.
.Ve
.SH "COPYRIGHT"
.IX Header "COPYRIGHT"
Copyright (C) 1996\-2023 Markus Franz Xaver Johannes Oberhumer
Copyright (C) 1996\-2024 Markus Franz Xaver Johannes Oberhumer
.PP
Copyright (C) 1996\-2023 Laszlo Molnar
Copyright (C) 1996\-2024 Laszlo Molnar
.PP
Copyright (C) 2000\-2023 John F. Reiser
Copyright (C) 2000\-2024 John F. Reiser
.PP
Copyright (C) 2002\-2023 Jens Medoch
Copyright (C) 2002\-2024 Jens Medoch
.PP
\&\fB\s-1UPX\s0\fR is distributed with full source code under the terms of the
\&\s-1GNU\s0 General Public License v2+; either under the pure GPLv2+ (see
+5 -5
View File
@@ -13,7 +13,7 @@ B<upx> S<[ I<command> ]> S<[ I<options> ]> I<filename>...
=head1 ABSTRACT
The Ultimate Packer for eXecutables
Copyright (c) 1996-2023 Markus Oberhumer, Laszlo Molnar & John Reiser
Copyright (c) 1996-2024 Markus Oberhumer, Laszlo Molnar & John Reiser
https://upx.github.io
@@ -932,13 +932,13 @@ Please report all bugs immediately to the authors.
=head1 COPYRIGHT
Copyright (C) 1996-2023 Markus Franz Xaver Johannes Oberhumer
Copyright (C) 1996-2024 Markus Franz Xaver Johannes Oberhumer
Copyright (C) 1996-2023 Laszlo Molnar
Copyright (C) 1996-2024 Laszlo Molnar
Copyright (C) 2000-2023 John F. Reiser
Copyright (C) 2000-2024 John F. Reiser
Copyright (C) 2002-2023 Jens Medoch
Copyright (C) 2002-2024 Jens Medoch
B<UPX> is distributed with full source code under the terms of the
GNU General Public License v2+; either under the pure GPLv2+ (see
+8 -8
View File
@@ -257,7 +257,7 @@ def main():
parser.add_argument(
"-allow-enabling-alpha-checkers",
action="store_true",
help="allow alpha checkers from " "clang-analyzer.",
help="allow alpha checkers from clang-analyzer.",
)
parser.add_argument(
"-clang-tidy-binary", metavar="PATH", help="path to clang-tidy binary"
@@ -270,7 +270,7 @@ def main():
parser.add_argument(
"-checks",
default=None,
help="checks filter, when not specified, use clang-tidy " "default",
help="checks filter, when not specified, use clang-tidy default",
)
config_group = parser.add_mutually_exclusive_group()
config_group.add_argument(
@@ -303,7 +303,7 @@ def main():
parser.add_argument(
"-line-filter",
default=None,
help="List of files with line ranges to filter the" "warnings.",
help="List of files with line ranges to filter the warnings.",
)
if yaml:
parser.add_argument(
@@ -335,12 +335,12 @@ def main():
)
parser.add_argument("-fix", action="store_true", help="apply fix-its")
parser.add_argument(
"-format", action="store_true", help="Reformat code " "after applying fixes"
"-format", action="store_true", help="Reformat code after applying fixes"
)
parser.add_argument(
"-style",
default="file",
help="The style of reformat " "code after applying fixes",
help="The style of reformat code after applying fixes",
)
parser.add_argument(
"-use-color",
@@ -359,14 +359,14 @@ def main():
dest="extra_arg",
action="append",
default=[],
help="Additional argument to append to the compiler " "command line.",
help="Additional argument to append to the compiler command line.",
)
parser.add_argument(
"-extra-arg-before",
dest="extra_arg_before",
action="append",
default=[],
help="Additional argument to prepend to the compiler " "command line.",
help="Additional argument to prepend to the compiler command line.",
)
parser.add_argument(
"-quiet", action="store_true", help="Run clang-tidy in quiet mode"
@@ -381,7 +381,7 @@ def main():
parser.add_argument(
"-warnings-as-errors",
default=None,
help="Upgrades warnings to errors. Same format as " "'-checks'",
help="Upgrades warnings to errors. Same format as '-checks'",
)
args = parser.parse_args()
+255
View File
@@ -0,0 +1,255 @@
#
# UPX "CMake" build file; see https://cmake.org/
# Copyright (C) Markus Franz Xaver Johannes Oberhumer
#
#***********************************************************************
# macros
#***********************************************************************
# support config hooks; developer convenience
macro(upx_cmake_include_hook section)
include("${CMAKE_CURRENT_SOURCE_DIR}/misc/cmake/hooks/CMakeLists.${section}.txt" OPTIONAL)
include("${CMAKE_CURRENT_SOURCE_DIR}/maint/make/CMakeLists.${section}.txt" OPTIONAL)
endmacro()
# Disallow in-source build. Note that you will still have to manually
# clean up a few files if you accidentally try an in-source build.
macro(upx_disallow_in_source_build)
set(CMAKE_DISABLE_IN_SOURCE_BUILD ON)
set(CMAKE_DISABLE_SOURCE_CHANGES ON)
if(",${CMAKE_CURRENT_SOURCE_DIR}," STREQUAL ",${CMAKE_CURRENT_BINARY_DIR},")
# try to clean up (does not work)
#file(REMOVE "${CMAKE_CURRENT_BINARY_DIR}/CMakeCache.txt")
#file(REMOVE "${CMAKE_CURRENT_BINARY_DIR}/CMakeFiles/cmake.check_cache")
message(FATAL_ERROR "ERROR: In-source builds are not allowed, please use an extra build dir.")
endif()
endmacro()
# set the default build type; must be called before project() cmake init
macro(upx_default_build_type type)
set(upx_global_default_build_type "${type}")
get_property(upx_global_is_multi_config GLOBAL PROPERTY GENERATOR_IS_MULTI_CONFIG)
if(NOT upx_global_is_multi_config AND NOT CMAKE_BUILD_TYPE)
set(CMAKE_BUILD_TYPE "${upx_global_default_build_type}" CACHE STRING "Choose the type of build." FORCE)
endif()
endmacro()
# set the default multi-config build type; must be called after project() cmake init
macro(upx_apply_build_type)
if(upx_global_is_multi_config)
set(c "${CMAKE_CONFIGURATION_TYPES}")
list(INSERT c 0 "${upx_global_default_build_type}")
if(CMAKE_BUILD_TYPE)
list(INSERT c 0 "${CMAKE_BUILD_TYPE}")
endif()
list(REMOVE_DUPLICATES c)
set(CMAKE_CONFIGURATION_TYPES "${c}" CACHE STRING "List of supported configuration types." FORCE)
endif()
# now also set the build type for use in try_compile()
if(NOT CMAKE_TRY_COMPILE_CONFIGURATION)
if(CMAKE_BUILD_TYPE)
set(CMAKE_TRY_COMPILE_CONFIGURATION "${CMAKE_BUILD_TYPE}")
else()
set(CMAKE_TRY_COMPILE_CONFIGURATION "${upx_global_default_build_type}")
endif()
endif()
endmacro()
#***********************************************************************
# util
#***********************************************************************
function(upx_print_var) # ARGV
foreach(var_name ${ARGV})
if(DEFINED ${var_name})
if(NOT ",${${var_name}}," STREQUAL ",,")
if(${var_name})
message(STATUS "${var_name} = ${${var_name}}")
endif()
endif()
endif()
endforeach()
endfunction()
function(upx_print_have_symbol) # ARGV; needs include(CheckSymbolExists)
foreach(symbol ${ARGV})
set(cache_var_name "HAVE_symbol_${symbol}")
check_symbol_exists(${symbol} "limits.h;stddef.h;stdint.h" ${cache_var_name})
if(${cache_var_name})
message(STATUS "HAVE ${symbol}")
endif()
endforeach()
endfunction()
# examine MinGW/Cygwin compiler configuration
function(upx_print_mingw_symbols)
if(WIN32 OR MINGW OR CYGWIN)
if(CMAKE_C_COMPILER_ID MATCHES "(Clang|GNU)")
# runtime library: msvcrt vs ucrt vs cygwin
upx_print_have_symbol(__CRTDLL__ __CYGWIN__ __CYGWIN32__ __CYGWIN64__ __MINGW32__ __MINGW64__ __MINGW64_VERSION_MAJOR __MSVCRT__ _UCRT _WIN32 _WIN64)
# exception handing: SJLJ (setjmp/longjmp) vs DWARF vs SEH
upx_print_have_symbol(__GCC_HAVE_DWARF2_CFI_ASM __SEH__ __USING_SJLJ_EXCEPTIONS__)
# threads: win32 vs posix/pthread/winpthreads vs mcfgthread
upx_print_have_symbol(_REENTRANT __USING_MCFGTHREAD__)
endif()
endif()
endfunction()
# add wildcard expansions to a variable
function(upx_add_glob_files) # ARGV
set(var_name ${ARGV0})
list(REMOVE_AT ARGV 0)
file(GLOB files ${ARGV})
set(result "")
if(DEFINED ${var_name})
set(result "${${var_name}}")
endif()
list(APPEND result "${files}")
list(SORT result)
list(REMOVE_DUPLICATES result)
##message(STATUS "upx_add_glob_files: ${var_name} = ${result}")
set(${var_name} "${result}" PARENT_SCOPE) # return value
endfunction()
# useful for CI jobs: allow settings via environment and cache result
function(upx_cache_bool_vars) # ARGV
set(default_value "${ARGV0}")
list(REMOVE_AT ARGV 0)
foreach(var_name ${ARGV})
set(value ${default_value})
if(DEFINED UPX_CACHE_VALUE_${var_name}) # check cache
set(value "${UPX_CACHE_VALUE_${var_name}}")
elseif(DEFINED ${var_name}) # defined via "cmake -DXXX=YYY"
set(value "${${var_name}}")
elseif(DEFINED ENV{${var_name}})
if("$ENV{${var_name}}" MATCHES "^(0|1|OFF|ON|FALSE|TRUE)$") # check environment
set(value "$ENV{${var_name}}")
set(UPX_CACHE_ORIGIN_FROM_ENV_${var_name} TRUE CACHE INTERNAL "" FORCE) # for info below
endif()
endif()
# convert to bool
if(value)
set(value ON)
else()
set(value OFF)
endif()
# store result
if(UPX_CACHE_ORIGIN_FROM_ENV_${var_name})
message(STATUS "setting from environment: ${var_name} = ${value}")
endif()
set(${var_name} "${value}" PARENT_SCOPE) # store result
set(UPX_CACHE_VALUE_${var_name} "${value}" CACHE INTERNAL "" FORCE) # and store in cache
endforeach()
endfunction()
#***********************************************************************
# compilation flags
#***********************************************************************
function(upx_internal_add_definitions_with_prefix) # ARGV; needs include(CheckCCompilerFlag)
set(flag_prefix "${ARGV0}")
if(flag_prefix MATCHES "^empty$") # need "empty" to work around bug in old CMake versions
set(flag_prefix "")
endif()
list(REMOVE_AT ARGV 0)
set(failed "")
foreach(f ${ARGV})
set(flag "${flag_prefix}${f}")
string(REGEX REPLACE "[^0-9a-zA-Z_]" "_" cache_var_name "HAVE_CFLAG_${flag}")
check_c_compiler_flag("${flag}" ${cache_var_name})
if(${cache_var_name})
#message(STATUS "add_definitions: ${flag}")
add_definitions("${flag}")
else()
list(APPEND failed "${f}")
endif()
endforeach()
set(failed_flags "${failed}" PARENT_SCOPE) # return value
endfunction()
function(upx_add_definitions) # ARGV; needs include(CheckCCompilerFlag)
set(failed_flags "")
if(MSVC_FRONTEND AND CMAKE_C_COMPILER_ID MATCHES "Clang")
# for clang-cl try "-clang:" flag prefix first
upx_internal_add_definitions_with_prefix("-clang:" ${ARGV})
upx_internal_add_definitions_with_prefix("empty" ${failed_flags})
else()
upx_internal_add_definitions_with_prefix("empty" ${ARGV})
endif()
endfunction()
# compile a target with -O2 optimization even in Debug build
function(upx_compile_target_debug_with_O2) # ARGV
foreach(t ${ARGV})
if(MSVC_FRONTEND)
# MSVC uses some Debug compilation options like -RTC1 that are incompatible with -O2
else()
target_compile_options(${t} PRIVATE $<$<CONFIG:Debug>:-O2>)
endif()
endforeach()
endfunction()
# compile a source file with -O2 optimization even in Debug build; messy because of CMake limitations
function(upx_compile_source_debug_with_O2) # ARGV
set(flags "$<$<CONFIG:Debug>:-O2>")
if(${CMAKE_VERSION} VERSION_LESS "3.8")
# 3.8: The COMPILE_FLAGS source file property learned to support generator expressions
if(upx_global_is_multi_config OR NOT CMAKE_BUILD_TYPE MATCHES "^Debug$")
return()
endif()
set(flags "-O2")
endif()
if(CMAKE_GENERATOR MATCHES "Xcode") # multi-config
# NOTE: Xcode does not support per-config per-source COMPILE_FLAGS (as of CMake 3.27.7)
return()
endif()
foreach(source ${ARGV})
if(MSVC_FRONTEND)
# MSVC uses some Debug compilation options like -RTC1 that are incompatible with -O2
else()
get_source_file_property(prop "${source}" COMPILE_FLAGS)
if(prop MATCHES "^(NOTFOUND)?$")
set_source_files_properties("${source}" PROPERTIES COMPILE_FLAGS "${flags}")
else()
set_source_files_properties("${source}" PROPERTIES COMPILE_FLAGS "${prop} ${flags}")
endif()
endif()
endforeach()
endfunction()
# sanitize a target: this needs proper support from your compiler AND toolchain
function(upx_sanitize_target) # ARGV
foreach(t ${ARGV})
if(UPX_CONFIG_DISABLE_SANITIZE)
# no-op
elseif(MSVC_FRONTEND)
# MSVC uses -GS (similar to -fstack-protector) by default
elseif(MINGW OR CYGWIN)
# avoid link errors with current MinGW-w64 versions
# see https://www.mingw-w64.org/contribute/#sanitizers-asan-tsan-usan
elseif(CMAKE_C_COMPILER_ID MATCHES "^GNU" AND CMAKE_C_COMPILER_VERSION VERSION_LESS "8.0")
# unsupported compiler; unreliable/broken sanitize implementation
else()
# default sanitizer for Debug builds
target_compile_options(${t} PRIVATE $<$<CONFIG:Debug>:-fsanitize=undefined -fsanitize-undefined-trap-on-error -fstack-protector-all>)
# default sanitizer for Release builds
target_compile_options(${t} PRIVATE $<$<CONFIG:MinSizeRel>:-fstack-protector>)
target_compile_options(${t} PRIVATE $<$<CONFIG:Release>:-fstack-protector>)
target_compile_options(${t} PRIVATE $<$<CONFIG:RelWithDebInfo>:-fstack-protector>)
endif()
endforeach()
endfunction()
#***********************************************************************
# test
#***********************************************************************
function(upx_add_serial_test) # ARGV
set(name "${ARGV0}")
list(REMOVE_AT ARGV 0)
add_test(NAME "${name}" COMMAND ${ARGV})
set_tests_properties("${name}" PROPERTIES RUN_SERIAL TRUE) # run these tests sequentially
endfunction()
# vim:set ft=cmake ts=4 sw=4 tw=0 et:
+10
View File
@@ -0,0 +1,10 @@
// Copyright (C) Markus Franz Xaver Johannes Oberhumer
#include <mutex>
static std::mutex lock_mutex;
int main() {
std::lock_guard<std::mutex> lock(lock_mutex);
return 0;
}
+47 -12
View File
@@ -3,6 +3,14 @@
# Copyright (C) Markus Franz Xaver Johannes Oberhumer
#
ifeq ($(UPX_MAKEFILE_EXTRA_MK_INCLUDED),)
override UPX_MAKEFILE_EXTRA_MK_INCLUDED := 1
override check_defined = $(foreach 1,$1,$(if $(filter undefined,$(origin $1)),$(error ERROR: variable '$1' is not defined),))
override check_undefined = $(foreach 1,$1,$(if $(filter undefined,$(origin $1)),,$(error ERROR: variable '$1' is already defined)))
$(call check_defined,run_config run_build)
$(call check_undefined,run_config_and_build)
#***********************************************************************
# extra builds: some pre-defined build configurations
#***********************************************************************
@@ -112,7 +120,7 @@ build/extra/gcc-std-cxx20/%: export UPX_CONFIG_DISABLE_CXX_STANDARD=ON
build/extra/gcc-std-cxx23/debug: PHONY; $(call run_config_and_build,$@,Debug)
build/extra/gcc-std-cxx23/release: PHONY; $(call run_config_and_build,$@,Release)
build/extra/gcc-std-cxx23/%: export CC = gcc -std=gnu2x
build/extra/gcc-std-cxx23/%: export CXX = g++ -std=gnu++23
build/extra/gcc-std-cxx23/%: export CXX = g++ -std=gnu++2b
build/extra/gcc-std-cxx23/%: export UPX_CONFIG_DISABLE_C_STANDARD=ON
build/extra/gcc-std-cxx23/%: export UPX_CONFIG_DISABLE_CXX_STANDARD=ON
@@ -121,36 +129,46 @@ build/extra/cross-linux-gnu-aarch64/debug: PHONY; $(call run_config_and_build,
build/extra/cross-linux-gnu-aarch64/release: PHONY; $(call run_config_and_build,$@,Release)
build/extra/cross-linux-gnu-aarch64/%: export CC = aarch64-linux-gnu-gcc
build/extra/cross-linux-gnu-aarch64/%: export CXX = aarch64-linux-gnu-g++
build/extra/cross-linux-gnu-aarch64/%: CMAKE_SYSTEM_NAME ?= Linux
build/extra/cross-linux-gnu-aarch64/%: CMAKE_CROSSCOMPILING_EMULATOR ?= qemu-aarch64
# cross compiler: Linux glibc arm-linux-gnueabihf
build/extra/cross-linux-gnu-arm-eabihf/debug: PHONY; $(call run_config_and_build,$@,Debug)
build/extra/cross-linux-gnu-arm-eabihf/release: PHONY; $(call run_config_and_build,$@,Release)
build/extra/cross-linux-gnu-arm-eabihf/%: export CC = arm-linux-gnueabihf-gcc
build/extra/cross-linux-gnu-arm-eabihf/%: export CXX = arm-linux-gnueabihf-g++ -Wno-psabi
build/extra/cross-linux-gnu-arm-eabihf/%: CMAKE_SYSTEM_NAME ?= Linux
build/extra/cross-linux-gnu-arm-eabihf/%: CMAKE_CROSSCOMPILING_EMULATOR ?= qemu-arm
# cross compiler: Windows x86 win32 MinGW (i386)
build/extra/cross-windows-mingw32/debug: PHONY; $(call run_config_and_build,$@,Debug)
build/extra/cross-windows-mingw32/release: PHONY; $(call run_config_and_build,$@,Release)
build/extra/cross-windows-mingw32/%: export CC = i686-w64-mingw32-gcc -static
build/extra/cross-windows-mingw32/%: export CXX = i686-w64-mingw32-g++ -static
build/extra/cross-windows-mingw32/%: export CC = i686-w64-mingw32-gcc -static -D_WIN32_WINNT=0x0400
build/extra/cross-windows-mingw32/%: export CXX = i686-w64-mingw32-g++ -static -D_WIN32_WINNT=0x0400
build/extra/cross-windows-mingw32/%: CMAKE_SYSTEM_NAME ?= Windows
build/extra/cross-windows-mingw32/%: CMAKE_CROSSCOMPILING_EMULATOR ?= wine
# cross compiler: Windows x64 win64 MinGW (amd64)
build/extra/cross-windows-mingw64/debug: PHONY; $(call run_config_and_build,$@,Debug)
build/extra/cross-windows-mingw64/release: PHONY; $(call run_config_and_build,$@,Release)
build/extra/cross-windows-mingw64/%: export CC = x86_64-w64-mingw32-gcc -static
build/extra/cross-windows-mingw64/%: export CXX = x86_64-w64-mingw32-g++ -static
build/extra/cross-windows-mingw64/%: export CC = x86_64-w64-mingw32-gcc -static -D_WIN32_WINNT=0x0400
build/extra/cross-windows-mingw64/%: export CXX = x86_64-w64-mingw32-g++ -static -D_WIN32_WINNT=0x0400
build/extra/cross-windows-mingw64/%: CMAKE_SYSTEM_NAME ?= Windows
build/extra/cross-windows-mingw64/%: CMAKE_CROSSCOMPILING_EMULATOR ?= wine64
# cross compiler: macOS arm64 (aarch64)
build/extra/cross-darwin-arm64/debug: PHONY; $(call run_config_and_build,$@,Debug)
build/extra/cross-darwin-arm64/release: PHONY; $(call run_config_and_build,$@,Release)
build/extra/cross-darwin-arm64/%: export CC = clang -target arm64-apple-darwin
build/extra/cross-darwin-arm64/%: export CXX = clang++ -target arm64-apple-darwin
build/extra/cross-darwin-arm64/%: CMAKE_SYSTEM_NAME ?= Darwin
# cross compiler: macOS x86_64 (amd64)
build/extra/cross-darwin-x86_64/debug: PHONY; $(call run_config_and_build,$@,Debug)
build/extra/cross-darwin-x86_64/release: PHONY; $(call run_config_and_build,$@,Release)
build/extra/cross-darwin-x86_64/%: export CC = clang -target x86_64-apple-darwin
build/extra/cross-darwin-x86_64/%: export CXX = clang++ -target x86_64-apple-darwin
build/extra/cross-darwin-x86_64/%: CMAKE_SYSTEM_NAME ?= Darwin
#***********************************************************************
# C/C++ static analyzers
@@ -189,7 +207,7 @@ build/extra/scan-build/debug: build/analyze/clang-analyzer/debug
build/extra/scan-build/release: build/analyze/clang-analyzer/release
#***********************************************************************
# advanced: generic extra target
# advanced: generic eXtra target
#***********************************************************************
# usage:
@@ -203,14 +221,14 @@ ifneq ($(CXX),)
UPX_XTARGET := $(UPX_XTARGET)
build/xtarget/$(UPX_XTARGET)/debug: PHONY; $(call run_config_and_build,$@,Debug)
build/xtarget/$(UPX_XTARGET)/release: PHONY; $(call run_config_and_build,$@,Release)
build/xtarget/$(UPX_XTARGET)/%: export CC
build/xtarget/$(UPX_XTARGET)/%: export CXX
build/xtarget/$(UPX_XTARGET)/%: export CC := $(CC)
build/xtarget/$(UPX_XTARGET)/%: export CXX := $(CXX)
# shortcuts
xtarget/all: xtarget/debug xtarget/release
xtarget/debug: build/xtarget/$(UPX_XTARGET)/debug
xtarget/release: build/xtarget/$(UPX_XTARGET)/release
# set new default
.DEFAULT_GOAL = xtarget/release
.DEFAULT_GOAL = build/xtarget/$(UPX_XTARGET)/release
endif
endif
@@ -226,12 +244,27 @@ ifneq ($(origin UPX_CMAKE_CONFIG_FLAGS),command line) # needed to work around a
# it easy to set other variables like CMAKE_AR or CMAKE_RANLIB
__add_cmake_config = $(and $($1),-D$1="$($1)")
# pass common CMake settings from environment/make to cmake
build/%: UPX_CMAKE_CONFIG_FLAGS += $(call __add_cmake_config,CMAKE_VERBOSE_MAKEFILE)
# pass common CMake toolchain settings from environment/make to cmake
build/%: UPX_CMAKE_CONFIG_FLAGS += $(call __add_cmake_config,CMAKE_ADDR2LINE)
build/%: UPX_CMAKE_CONFIG_FLAGS += $(call __add_cmake_config,CMAKE_AR)
build/%: UPX_CMAKE_CONFIG_FLAGS += $(call __add_cmake_config,CMAKE_DLLTOOL)
build/%: UPX_CMAKE_CONFIG_FLAGS += $(call __add_cmake_config,CMAKE_LINKER)
build/%: UPX_CMAKE_CONFIG_FLAGS += $(call __add_cmake_config,CMAKE_NM)
build/%: UPX_CMAKE_CONFIG_FLAGS += $(call __add_cmake_config,CMAKE_RANLIB)
build/%: UPX_CMAKE_CONFIG_FLAGS += $(call __add_cmake_config,CMAKE_OBJCOPY)
build/%: UPX_CMAKE_CONFIG_FLAGS += $(call __add_cmake_config,CMAKE_OBJDUMP)
build/%: UPX_CMAKE_CONFIG_FLAGS += $(call __add_cmake_config,CMAKE_RANLIB)
build/%: UPX_CMAKE_CONFIG_FLAGS += $(call __add_cmake_config,CMAKE_READELF)
build/%: UPX_CMAKE_CONFIG_FLAGS += $(call __add_cmake_config,CMAKE_STRIP)
build/%: UPX_CMAKE_CONFIG_FLAGS += $(call __add_cmake_config,CMAKE_TAPI)
# pass common CMake LTO toolchain settings from environment/make to cmake (for use with "-flto")
build/%: UPX_CMAKE_CONFIG_FLAGS += $(call __add_cmake_config,CMAKE_C_COMPILER_AR)
build/%: UPX_CMAKE_CONFIG_FLAGS += $(call __add_cmake_config,CMAKE_C_COMPILER_RANLIB)
build/%: UPX_CMAKE_CONFIG_FLAGS += $(call __add_cmake_config,CMAKE_CXX_COMPILER_AR)
build/%: UPX_CMAKE_CONFIG_FLAGS += $(call __add_cmake_config,CMAKE_CXX_COMPILER_RANLIB)
# pass common CMake cross compilation settings from environment/make to cmake
build/%: UPX_CMAKE_CONFIG_FLAGS += $(call __add_cmake_config,CMAKE_SYSTEM_NAME)
build/%: UPX_CMAKE_CONFIG_FLAGS += $(call __add_cmake_config,CMAKE_CROSSCOMPILING_EMULATOR)
# pass UPX config options from environment/make to cmake; see CMakeLists.txt
build/%: UPX_CMAKE_CONFIG_FLAGS += $(call __add_cmake_config,UPX_CONFIG_DISABLE_GITREV)
build/%: UPX_CMAKE_CONFIG_FLAGS += $(call __add_cmake_config,UPX_CONFIG_DISABLE_SANITIZE)
@@ -247,5 +280,7 @@ endif # bug work-around
SUBMODULES = doctest lzma-sdk ucl valgrind zlib
dummy := $(foreach m,$(SUBMODULES),$(if $(wildcard vendor/$m/[CL]*),$m,\
$(error ERROR: missing git submodule '$m'; run 'git submodule update --init')))
$(foreach 1,$(SUBMODULES),$(if $(wildcard vendor/$1/[CL]*),,\
$(error ERROR: missing git submodule '$1'; run 'git submodule update --init')))
endif # UPX_MAKEFILE_EXTRA_MK_INCLUDED
@@ -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/upx-stubtools-20221212-v6,
# NOTE: this image is based on rebuild-stubs/upx-stubtools-20221212-v7,
# 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-ubuntu2204-20230721-v1
image=upx-cross-compile-ubuntu2204-20230721-v3
[[ $1 == --print-image ]] && echo "$image" && exit 0
podman build -t "$image" -f "$argv0dir/Dockerfile" "$argv0dir"
@@ -1,8 +1,8 @@
# NOTE: this image is based on rebuild-stubs/upx-stubtools-20221212-v6,
# NOTE: this image is based on rebuild-stubs/upx-stubtools-20221212-v7,
# 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-v6
ENV UPX_CONTAINER_IMAGE_NAME=upx-cross-compile-ubuntu2204-20230721-v1
FROM localhost/upx-stubtools-20221212-v7
ENV UPX_CONTAINER_IMAGE_NAME=upx-cross-compile-ubuntu2204-20230721-v3
ARG DEBIAN_FRONTEND=noninteractive
USER root
@@ -34,6 +34,8 @@ RUN apt-get update && apt-get upgrade -y \
# Windows cross compilers
g++-mingw-w64-i686 \
g++-mingw-w64-x86-64 \
# make sure that we use posix-threads (pthread/winpthreads) and NOT win32-threads
&& for f in i686-w64-mingw32-g++ i686-w64-mingw32-gcc x86_64-w64-mingw32-g++ x86_64-w64-mingw32-gcc; do update-alternatives --set $f /usr/bin/$f-posix; done \
&& true
RUN apt-get install -y \
# clang-14 and tools
+189 -181
View File
@@ -6,8 +6,8 @@ ii acl 2.3.1-1
ii adduser 3.118ubuntu5 all add and remove users and groups
ii adwaita-icon-theme 41.0-1ubuntu1 all default icon theme of GNOME (small subset)
ii alsa-topology-conf 1.2.5.1-2 all ALSA topology configuration files
ii alsa-ucm-conf 1.2.6.3-1ubuntu1.7 all ALSA Use Case Manager configuration files
ii apt 2.4.10 amd64 commandline package manager
ii alsa-ucm-conf 1.2.6.3-1ubuntu1.9 all ALSA Use Case Manager configuration files
ii apt 2.4.11 amd64 commandline package manager
ii aria2 1.36.0-1 amd64 High speed download utility
ii at-spi2-core 2.44.0-3 amd64 Assistive Technology Service Provider Interface (dbus core)
ii base-files 12ubuntu4.4 amd64 Debian base system miscellaneous files
@@ -16,30 +16,30 @@ ii bash 5.1-6ubuntu1
ii bash-completion 1:2.11-5ubuntu1 all programmable completion for the bash shell
ii bfs 2.3.1-1 amd64 Breadth-first version of find(1)
ii binfmt-support 2.2.1-2 amd64 Support for extra binary formats
ii binutils 2.38-4ubuntu2.3 amd64 GNU assembler, linker and binary utilities
ii binutils-aarch64-linux-gnu 2.38-4ubuntu2.3 amd64 GNU binary utilities, for aarch64-linux-gnu target
ii binutils-alpha-linux-gnu 2.38-4ubuntu2.3 amd64 GNU binary utilities, for alpha-linux-gnu target
ii binutils-arm-linux-gnueabi 2.38-4ubuntu2.3 amd64 GNU binary utilities, for arm-linux-gnueabi target
ii binutils-arm-linux-gnueabihf 2.38-4ubuntu2.3 amd64 GNU binary utilities, for arm-linux-gnueabihf target
ii binutils-common:amd64 2.38-4ubuntu2.3 amd64 Common files for the GNU assembler, linker and binary utilities
ii binutils-hppa-linux-gnu 2.38-4ubuntu2.3 amd64 GNU binary utilities, for hppa-linux-gnu target
ii binutils-i686-linux-gnu 2.38-4ubuntu2.3 amd64 GNU binary utilities, for i686-linux-gnu target
ii binutils-m68k-linux-gnu 2.38-4ubuntu2.3 amd64 GNU binary utilities, for m68k-linux-gnu target
ii binutils 2.38-4ubuntu2.4 amd64 GNU assembler, linker and binary utilities
ii binutils-aarch64-linux-gnu 2.38-4ubuntu2.4 amd64 GNU binary utilities, for aarch64-linux-gnu target
ii binutils-alpha-linux-gnu 2.38-4ubuntu2.4 amd64 GNU binary utilities, for alpha-linux-gnu target
ii binutils-arm-linux-gnueabi 2.38-4ubuntu2.4 amd64 GNU binary utilities, for arm-linux-gnueabi target
ii binutils-arm-linux-gnueabihf 2.38-4ubuntu2.4 amd64 GNU binary utilities, for arm-linux-gnueabihf target
ii binutils-common:amd64 2.38-4ubuntu2.4 amd64 Common files for the GNU assembler, linker and binary utilities
ii binutils-hppa-linux-gnu 2.38-4ubuntu2.4 amd64 GNU binary utilities, for hppa-linux-gnu target
ii binutils-i686-linux-gnu 2.38-4ubuntu2.4 amd64 GNU binary utilities, for i686-linux-gnu target
ii binutils-m68k-linux-gnu 2.38-4ubuntu2.4 amd64 GNU binary utilities, for m68k-linux-gnu target
ii binutils-mingw-w64-i686 2.38-3ubuntu1+9build1 amd64 Cross-binutils for Win32 (x86) using MinGW-w64
ii binutils-mingw-w64-x86-64 2.38-3ubuntu1+9build1 amd64 Cross-binutils for Win64 (x64) using MinGW-w64
ii binutils-mips-linux-gnu 2.38-1ubuntu1cross2 amd64 GNU binary utilities, for mips-linux-gnu target
ii binutils-mips64-linux-gnuabi64 2.38-1ubuntu1cross2 amd64 GNU binary utilities, for mips64-linux-gnuabi64 target
ii binutils-mips64el-linux-gnuabi64 2.38-1ubuntu1cross2 amd64 GNU binary utilities, for mips64el-linux-gnuabi64 target
ii binutils-mipsel-linux-gnu 2.38-1ubuntu1cross2 amd64 GNU binary utilities, for mipsel-linux-gnu target
ii binutils-powerpc-linux-gnu 2.38-4ubuntu2.3 amd64 GNU binary utilities, for powerpc-linux-gnu target
ii binutils-powerpc64-linux-gnu 2.38-4ubuntu2.3 amd64 GNU binary utilities, for powerpc64-linux-gnu target
ii binutils-powerpc64le-linux-gnu 2.38-4ubuntu2.3 amd64 GNU binary utilities, for powerpc64le-linux-gnu target
ii binutils-riscv64-linux-gnu 2.38-4ubuntu2.3 amd64 GNU binary utilities, for riscv64-linux-gnu target
ii binutils-s390x-linux-gnu 2.38-4ubuntu2.3 amd64 GNU binary utilities, for s390x-linux-gnu target
ii binutils-sh4-linux-gnu 2.38-4ubuntu2.3 amd64 GNU binary utilities, for sh4-linux-gnu target
ii binutils-sparc64-linux-gnu 2.38-4ubuntu2.3 amd64 GNU binary utilities, for sparc64-linux-gnu target
ii binutils-x86-64-linux-gnu 2.38-4ubuntu2.3 amd64 GNU binary utilities, for x86-64-linux-gnu target
ii binutils-x86-64-linux-gnux32 2.38-4ubuntu2.3 amd64 GNU binary utilities, for x86-64-linux-gnux32 target
ii binutils-powerpc-linux-gnu 2.38-4ubuntu2.4 amd64 GNU binary utilities, for powerpc-linux-gnu target
ii binutils-powerpc64-linux-gnu 2.38-4ubuntu2.4 amd64 GNU binary utilities, for powerpc64-linux-gnu target
ii binutils-powerpc64le-linux-gnu 2.38-4ubuntu2.4 amd64 GNU binary utilities, for powerpc64le-linux-gnu target
ii binutils-riscv64-linux-gnu 2.38-4ubuntu2.4 amd64 GNU binary utilities, for riscv64-linux-gnu target
ii binutils-s390x-linux-gnu 2.38-4ubuntu2.4 amd64 GNU binary utilities, for s390x-linux-gnu target
ii binutils-sh4-linux-gnu 2.38-4ubuntu2.4 amd64 GNU binary utilities, for sh4-linux-gnu target
ii binutils-sparc64-linux-gnu 2.38-4ubuntu2.4 amd64 GNU binary utilities, for sparc64-linux-gnu target
ii binutils-x86-64-linux-gnu 2.38-4ubuntu2.4 amd64 GNU binary utilities, for x86-64-linux-gnu target
ii binutils-x86-64-linux-gnux32 2.38-4ubuntu2.4 amd64 GNU binary utilities, for x86-64-linux-gnux32 target
ii bsdutils 1:2.37.2-4ubuntu3 amd64 basic utilities from 4.4BSD-Lite
ii busybox 1:1.30.1-7ubuntu3 amd64 Tiny utilities for small and embedded systems
ii bzip2 1.0.8-5build1 amd64 high-quality block-sorting file compressor - utilities
@@ -96,7 +96,7 @@ ii cpp-sh4-linux-gnu 4:11.2.0--1ubuntu1
ii cpp-sparc64-linux-gnu 4:11.2.0--1ubuntu1 amd64 GNU C preprocessor (cpp) for the sparc64 architecture
ii cpp-x86-64-linux-gnux32 4:11.2.0--1ubuntu1 amd64 GNU C preprocessor (cpp) for the x32 architecture
ii cpu-checker 0.7-1.3build1 amd64 tools to help evaluate certain CPU (or BIOS) features
ii curl 7.81.0-1ubuntu1.13 amd64 command line tool for transferring data with URL syntax
ii curl 7.81.0-1ubuntu1.15 amd64 command line tool for transferring data with URL syntax
ii dash 0.5.11+git20210903+057cd650a4ed-3build1 amd64 POSIX-compliant shell
ii dbus 1.12.20-2ubuntu4.1 amd64 simple interprocess messaging system (daemon and utilities)
ii dbus-user-session 1.12.20-2ubuntu4.1 amd64 simple interprocess messaging system (systemd --user integration)
@@ -106,7 +106,7 @@ ii debconf 1.5.79ubuntu1
ii debianutils 5.5-1ubuntu2 amd64 Miscellaneous utilities specific to Debian
ii dh-elpa-helper 2.0.9ubuntu1 all helper package for emacs lisp extensions
ii diffutils 1:3.8-0ubuntu2 amd64 File comparison utilities
ii distro-info-data 0.52ubuntu0.4 all information about the distributions' releases (data files)
ii distro-info-data 0.52ubuntu0.6 all information about the distributions' releases (data files)
ii dmsetup 2:1.02.175-2.1ubuntu4 amd64 Linux Kernel Device Mapper userspace library
ii dpkg 1.21.1ubuntu2.2 amd64 Debian package management system
ii e2fsprogs 1.46.5-2ubuntu1.1 amd64 ext2/ext3/ext4 file system utilities
@@ -279,7 +279,7 @@ ii ipxe-qemu 1.21.1+git-20220113.fbbdc3926-0ubu
ii ipxe-qemu-256k-compat-efi-roms 1.0.0+git-20150424.a25a16d-0ubuntu4 all PXE boot firmware - Compat EFI ROM images for qemu
ii iso-codes 4.9.0-1 all ISO language, territory, currency, script codes and their translations
ii jq 1.6-2.1ubuntu3 amd64 lightweight and flexible command-line JSON processor
ii krb5-locales 1.19.2-2ubuntu0.2 all internationalization support for MIT Kerberos
ii krb5-locales 1.19.2-2ubuntu0.3 all internationalization support for MIT Kerberos
ii less 590-1ubuntu0.22.04.1 amd64 pager program similar to more
ii lib32asan6 11.4.0-1ubuntu1~22.04 amd64 AddressSanitizer -- a fast memory error detector (32bit)
ii lib32atomic1 12.3.0-1ubuntu1~22.04 amd64 support library providing __atomic built-in functions (32bit)
@@ -295,9 +295,9 @@ ii libaa1:amd64 1.4p5-50build1
ii libaa1:i386 1.4p5-50build1 i386 ASCII art library
ii libacl1:amd64 2.3.1-1 amd64 access control list - shared library
ii libaio1:amd64 0.3.112-13build1 amd64 Linux kernel AIO access library - shared library
ii libapparmor1:amd64 3.0.4-2ubuntu2.2 amd64 changehat AppArmor library
ii libapparmor1:i386 3.0.4-2ubuntu2.2 i386 changehat AppArmor library
ii libapt-pkg6.0:amd64 2.4.10 amd64 package management runtime library
ii libapparmor1:amd64 3.0.4-2ubuntu2.3 amd64 changehat AppArmor library
ii libapparmor1:i386 3.0.4-2ubuntu2.3 i386 changehat AppArmor library
ii libapt-pkg6.0:amd64 2.4.11 amd64 package management runtime library
ii libarchive13:amd64 3.6.0-1ubuntu1 amd64 Multi-format archive and compression library (shared library)
ii libargon2-1:amd64 0~20171227-0.3 amd64 memory-hard hashing function - runtime library
ii libaria2-0:amd64 1.36.0-1 amd64 C++ library interface to aria2
@@ -349,16 +349,16 @@ ii libatspi2.0-0:amd64 2.44.0-3
ii libattr1:amd64 1:2.5.1-1build1 amd64 extended attribute handling - shared library
ii libaudit-common 1:3.0.7-1build1 all Dynamic library for security auditing - common files
ii libaudit1:amd64 1:3.0.7-1build1 amd64 Dynamic library for security auditing
ii libavahi-client3:amd64 0.8-5ubuntu5.1 amd64 Avahi client library
ii libavahi-client3:i386 0.8-5ubuntu5.1 i386 Avahi client library
ii libavahi-common-data:amd64 0.8-5ubuntu5.1 amd64 Avahi common data files
ii libavahi-common-data:i386 0.8-5ubuntu5.1 i386 Avahi common data files
ii libavahi-common3:amd64 0.8-5ubuntu5.1 amd64 Avahi common library
ii libavahi-common3:i386 0.8-5ubuntu5.1 i386 Avahi common library
ii libavahi-client3:amd64 0.8-5ubuntu5.2 amd64 Avahi client library
ii libavahi-client3:i386 0.8-5ubuntu5.2 i386 Avahi client library
ii libavahi-common-data:amd64 0.8-5ubuntu5.2 amd64 Avahi common data files
ii libavahi-common-data:i386 0.8-5ubuntu5.2 i386 Avahi common data files
ii libavahi-common3:amd64 0.8-5ubuntu5.2 amd64 Avahi common library
ii libavahi-common3:i386 0.8-5ubuntu5.2 i386 Avahi common library
ii libavc1394-0:amd64 0.5.4-5build2 amd64 control IEEE 1394 audio/video devices
ii libavc1394-0:i386 0.5.4-5build2 i386 control IEEE 1394 audio/video devices
ii libbabeltrace1:amd64 1.5.8-2build1 amd64 Babeltrace conversion libraries
ii libbinutils:amd64 2.38-4ubuntu2.3 amd64 GNU binary utilities (private shared library)
ii libbinutils:amd64 2.38-4ubuntu2.4 amd64 GNU binary utilities (private shared library)
ii libblkid1:amd64 2.37.2-4ubuntu3 amd64 block device ID library
ii libblkid1:i386 2.37.2-4ubuntu3 i386 block device ID library
ii libboost-iostreams1.74.0:amd64 1.74.0-14ubuntu3 amd64 Boost.Iostreams Library
@@ -372,17 +372,17 @@ ii libbsd0:i386 0.11.5-1
ii libbz2-1.0:amd64 1.0.8-5build1 amd64 high-quality block-sorting file compressor library - runtime
ii libbz2-1.0:i386 1.0.8-5build1 i386 high-quality block-sorting file compressor library - runtime
ii libc-ares2:amd64 1.18.1-1ubuntu0.22.04.2 amd64 asynchronous name resolver
ii libc-bin 2.35-0ubuntu3.3 amd64 GNU C Library: Binaries
ii libc-dev-bin 2.35-0ubuntu3.3 amd64 GNU C Library: Development binaries
ii libc-bin 2.35-0ubuntu3.5 amd64 GNU C Library: Binaries
ii libc-dev-bin 2.35-0ubuntu3.5 amd64 GNU C Library: Development binaries
ii libc6-arm64-cross 2.35-0ubuntu1cross3 all GNU C Library: Shared libraries (for cross-compiling)
ii libc6-armel-cross 2.35-0ubuntu1cross3 all GNU C Library: Shared libraries (for cross-compiling)
ii libc6-armhf-cross 2.35-0ubuntu1cross3 all GNU C Library: Shared libraries (for cross-compiling)
ii libc6-dbg:amd64 2.35-0ubuntu3.3 amd64 GNU C Library: detached debugging symbols
ii libc6-dbg:amd64 2.35-0ubuntu3.5 amd64 GNU C Library: detached debugging symbols
ii libc6-dev-arm64-cross 2.35-0ubuntu1cross3 all GNU C Library: Development Libraries and Header Files (for cross-compiling)
ii libc6-dev-armel-cross 2.35-0ubuntu1cross3 all GNU C Library: Development Libraries and Header Files (for cross-compiling)
ii libc6-dev-armhf-cross 2.35-0ubuntu1cross3 all GNU C Library: Development Libraries and Header Files (for cross-compiling)
ii libc6-dev-hppa-cross 2.35-0ubuntu3cross4 all GNU C Library: Development Libraries and Header Files (for cross-compiling)
ii libc6-dev-i386 2.35-0ubuntu3.3 amd64 GNU C Library: 32-bit development libraries for AMD64
ii libc6-dev-i386 2.35-0ubuntu3.5 amd64 GNU C Library: 32-bit development libraries for AMD64
ii libc6-dev-i386-cross 2.35-0ubuntu1cross3 all GNU C Library: Development Libraries and Header Files (for cross-compiling)
ii libc6-dev-m68k-cross 2.35-0ubuntu3cross4 all GNU C Library: Development Libraries and Header Files (for cross-compiling)
ii libc6-dev-mips-cross 2.35-0ubuntu1cross1 all GNU C Library: Development Libraries and Header Files (for cross-compiling)
@@ -396,11 +396,11 @@ ii libc6-dev-riscv64-cross 2.35-0ubuntu3cross4
ii libc6-dev-s390x-cross 2.35-0ubuntu1cross3 all GNU C Library: Development Libraries and Header Files (for cross-compiling)
ii libc6-dev-sh4-cross 2.35-0ubuntu3cross4 all GNU C Library: Development Libraries and Header Files (for cross-compiling)
ii libc6-dev-sparc64-cross 2.35-0ubuntu3cross4 all GNU C Library: Development Libraries and Header Files (for cross-compiling)
ii libc6-dev-x32 2.35-0ubuntu3.3 amd64 GNU C Library: X32 ABI Development Libraries for AMD64
ii libc6-dev-x32 2.35-0ubuntu3.5 amd64 GNU C Library: X32 ABI Development Libraries for AMD64
ii libc6-dev-x32-cross 2.35-0ubuntu3cross4 all GNU C Library: Development Libraries and Header Files (for cross-compiling)
ii libc6-dev:amd64 2.35-0ubuntu3.3 amd64 GNU C Library: Development Libraries and Header Files
ii libc6-dev:amd64 2.35-0ubuntu3.5 amd64 GNU C Library: Development Libraries and Header Files
ii libc6-hppa-cross 2.35-0ubuntu3cross4 all GNU C Library: Shared libraries (for cross-compiling)
ii libc6-i386 2.35-0ubuntu3.3 amd64 GNU C Library: 32-bit shared libraries for AMD64
ii libc6-i386 2.35-0ubuntu3.5 amd64 GNU C Library: 32-bit shared libraries for AMD64
ii libc6-i386-cross 2.35-0ubuntu1cross3 all GNU C Library: Shared libraries (for cross-compiling)
ii libc6-m68k-cross 2.35-0ubuntu3cross4 all GNU C Library: Shared libraries (for cross-compiling)
ii libc6-mips-cross 2.35-0ubuntu1cross1 all GNU C Library: Shared libraries (for cross-compiling)
@@ -414,12 +414,12 @@ ii libc6-riscv64-cross 2.35-0ubuntu3cross4
ii libc6-s390x-cross 2.35-0ubuntu1cross3 all GNU C Library: Shared libraries (for cross-compiling)
ii libc6-sh4-cross 2.35-0ubuntu3cross4 all GNU C Library: Shared libraries (for cross-compiling)
ii libc6-sparc64-cross 2.35-0ubuntu3cross4 all GNU C Library: Shared libraries (for cross-compiling)
ii libc6-x32 2.35-0ubuntu3.3 amd64 GNU C Library: X32 ABI Shared libraries for AMD64
ii libc6-x32 2.35-0ubuntu3.5 amd64 GNU C Library: X32 ABI Shared libraries for AMD64
ii libc6-x32-cross 2.35-0ubuntu3cross4 all GNU C Library: Shared libraries (for cross-compiling)
ii libc6.1-alpha-cross 2.35-0ubuntu3cross4 all GNU C Library: Shared libraries (for cross-compiling)
ii libc6.1-dev-alpha-cross 2.35-0ubuntu3cross4 all GNU C Library: Development Libraries and Header Files (for cross-compiling)
ii libc6:amd64 2.35-0ubuntu3.3 amd64 GNU C Library: Shared libraries
ii libc6:i386 2.35-0ubuntu3.3 i386 GNU C Library: Shared libraries
ii libc6:amd64 2.35-0ubuntu3.5 amd64 GNU C Library: Shared libraries
ii libc6:i386 2.35-0ubuntu3.5 i386 GNU C Library: Shared libraries
ii libcaca0:amd64 0.99.beta19-2.2ubuntu4 amd64 colour ASCII art library
ii libcaca0:i386 0.99.beta19-2.2ubuntu4 i386 colour ASCII art library
ii libcacard0:amd64 1:2.8.0-3build2 amd64 Virtual Common Access Card (CAC) Emulator (runtime library)
@@ -445,14 +445,14 @@ ii libcom-err2:i386 1.46.5-2ubuntu1.1
ii libcrypt-dev:amd64 1:4.4.27-1 amd64 libcrypt development files
ii libcrypt1:amd64 1:4.4.27-1 amd64 libcrypt shared library
ii libcrypt1:i386 1:4.4.27-1 i386 libcrypt shared library
ii libcryptsetup12:amd64 2:2.4.3-1ubuntu1.1 amd64 disk encryption support - shared library
ii libctf-nobfd0:amd64 2.38-4ubuntu2.3 amd64 Compact C Type Format library (runtime, no BFD dependency)
ii libctf0:amd64 2.38-4ubuntu2.3 amd64 Compact C Type Format library (runtime, BFD dependency)
ii libcryptsetup12:amd64 2:2.4.3-1ubuntu1.2 amd64 disk encryption support - shared library
ii libctf-nobfd0:amd64 2.38-4ubuntu2.4 amd64 Compact C Type Format library (runtime, no BFD dependency)
ii libctf0:amd64 2.38-4ubuntu2.4 amd64 Compact C Type Format library (runtime, BFD dependency)
ii libcups2:amd64 2.4.1op1-1ubuntu4.7 amd64 Common UNIX Printing System(tm) - Core library
ii libcups2:i386 2.4.1op1-1ubuntu4.7 i386 Common UNIX Printing System(tm) - Core library
ii libcurl3-gnutls:amd64 7.81.0-1ubuntu1.13 amd64 easy-to-use client-side URL transfer library (GnuTLS flavour)
ii libcurl4:amd64 7.81.0-1ubuntu1.13 amd64 easy-to-use client-side URL transfer library (OpenSSL flavour)
ii libcurl4:i386 7.81.0-1ubuntu1.13 i386 easy-to-use client-side URL transfer library (OpenSSL flavour)
ii libcurl3-gnutls:amd64 7.81.0-1ubuntu1.15 amd64 easy-to-use client-side URL transfer library (GnuTLS flavour)
ii libcurl4:amd64 7.81.0-1ubuntu1.15 amd64 easy-to-use client-side URL transfer library (OpenSSL flavour)
ii libcurl4:i386 7.81.0-1ubuntu1.15 i386 easy-to-use client-side URL transfer library (OpenSSL flavour)
ii libdatrie1:amd64 0.2.13-2 amd64 Double-array trie library
ii libdatrie1:i386 0.2.13-2 i386 Double-array trie library
ii libdaxctl1:amd64 72.1-1 amd64 Utility library for managing the device DAX subsystem
@@ -566,9 +566,9 @@ ii libgdk-pixbuf-2.0-0:amd64 2.42.8+dfsg-1ubuntu0.2
ii libgdk-pixbuf-2.0-0:i386 2.42.8+dfsg-1ubuntu0.2 i386 GDK Pixbuf library
ii libgdk-pixbuf2.0-bin 2.42.8+dfsg-1ubuntu0.2 amd64 GDK Pixbuf library (thumbnailer)
ii libgdk-pixbuf2.0-common 2.42.8+dfsg-1ubuntu0.2 all GDK Pixbuf library - data files
ii libgfapi0:amd64 10.1-1ubuntu0.1 amd64 GlusterFS gfapi shared library
ii libgfrpc0:amd64 10.1-1ubuntu0.1 amd64 GlusterFS libgfrpc shared library
ii libgfxdr0:amd64 10.1-1ubuntu0.1 amd64 GlusterFS libgfxdr shared library
ii libgfapi0:amd64 10.1-1ubuntu0.2 amd64 GlusterFS gfapi shared library
ii libgfrpc0:amd64 10.1-1ubuntu0.2 amd64 GlusterFS libgfrpc shared library
ii libgfxdr0:amd64 10.1-1ubuntu0.2 amd64 GlusterFS libgfxdr shared library
ii libgirepository-1.0-1:amd64 1.72.0-1 amd64 Library for handling GObject introspection data (runtime library)
ii libgl1-amber-dri:amd64 21.3.9-0ubuntu1~22.04.1 amd64 free implementation of the OpenGL API -- Amber DRI modules
ii libgl1-mesa-dri:amd64 23.0.4-0ubuntu1~22.04.1 amd64 free implementation of the OpenGL API -- DRI modules
@@ -580,7 +580,7 @@ ii libglapi-mesa:i386 23.0.4-0ubuntu1~22.04.1
ii libglib2.0-0:amd64 2.72.4-0ubuntu2.2 amd64 GLib library of C routines
ii libglib2.0-0:i386 2.72.4-0ubuntu2.2 i386 GLib library of C routines
ii libglib2.0-data 2.72.4-0ubuntu2.2 all Common files for GLib library
ii libglusterfs0:amd64 10.1-1ubuntu0.1 amd64 GlusterFS shared library
ii libglusterfs0:amd64 10.1-1ubuntu0.2 amd64 GlusterFS shared library
ii libglvnd0:amd64 1.4.0-1 amd64 Vendor neutral GL dispatch library
ii libglvnd0:i386 1.4.0-1 i386 Vendor neutral GL dispatch library
ii libglx-mesa0:amd64 23.0.4-0ubuntu1~22.04.1 amd64 free implementation of the OpenGL API -- GLX vendor library
@@ -589,8 +589,8 @@ ii libglx0:amd64 1.4.0-1
ii libglx0:i386 1.4.0-1 i386 Vendor neutral GL dispatch library -- GLX support
ii libgmp10:amd64 2:6.2.1+dfsg-3ubuntu1 amd64 Multiprecision arithmetic library
ii libgmp10:i386 2:6.2.1+dfsg-3ubuntu1 i386 Multiprecision arithmetic library
ii libgnutls30:amd64 3.7.3-4ubuntu1.2 amd64 GNU TLS library - main runtime library
ii libgnutls30:i386 3.7.3-4ubuntu1.2 i386 GNU TLS library - main runtime library
ii libgnutls30:amd64 3.7.3-4ubuntu1.3 amd64 GNU TLS library - main runtime library
ii libgnutls30:i386 3.7.3-4ubuntu1.3 i386 GNU TLS library - main runtime library
ii libgomp1-alpha-cross 12.3.0-1ubuntu1~22.04cross1 all GCC OpenMP (GOMP) support library
ii libgomp1-arm64-cross 12.3.0-1ubuntu1~22.04cross1 all GCC OpenMP (GOMP) support library
ii libgomp1-armel-cross 12.3.0-1ubuntu1~22.04cross1 all GCC OpenMP (GOMP) support library
@@ -625,8 +625,8 @@ ii libgraphite2-3:amd64 1.3.14-1build2
ii libgraphite2-3:i386 1.3.14-1build2 i386 Font rendering engine for Complex Scripts -- library
ii libgsm1:amd64 1.0.19-1 amd64 Shared libraries for GSM speech compressor
ii libgsm1:i386 1.0.19-1 i386 Shared libraries for GSM speech compressor
ii libgssapi-krb5-2:amd64 1.19.2-2ubuntu0.2 amd64 MIT Kerberos runtime libraries - krb5 GSS-API Mechanism
ii libgssapi-krb5-2:i386 1.19.2-2ubuntu0.2 i386 MIT Kerberos runtime libraries - krb5 GSS-API Mechanism
ii libgssapi-krb5-2:amd64 1.19.2-2ubuntu0.3 amd64 MIT Kerberos runtime libraries - krb5 GSS-API Mechanism
ii libgssapi-krb5-2:i386 1.19.2-2ubuntu0.3 i386 MIT Kerberos runtime libraries - krb5 GSS-API Mechanism
ii libgstreamer-plugins-base1.0-0:amd64 1.20.1-1ubuntu0.1 amd64 GStreamer libraries from the "base" set
ii libgstreamer-plugins-base1.0-0:i386 1.20.1-1ubuntu0.1 i386 GStreamer libraries from the "base" set
ii libgstreamer-plugins-good1.0-0:amd64 1.20.3-0ubuntu1.1 amd64 GStreamer development files for libraries from the "good" set
@@ -680,15 +680,15 @@ ii libjpeg8:i386 8c-2ubuntu10
ii libjq1:amd64 1.6-2.1ubuntu3 amd64 lightweight and flexible command-line JSON processor - shared library
ii libjson-c5:amd64 0.15-3~ubuntu1.22.04.2 amd64 JSON manipulation library - shared library
ii libjsoncpp25:amd64 1.9.5-3 amd64 library for reading and writing JSON for C++
ii libk5crypto3:amd64 1.19.2-2ubuntu0.2 amd64 MIT Kerberos runtime libraries - Crypto Library
ii libk5crypto3:i386 1.19.2-2ubuntu0.2 i386 MIT Kerberos runtime libraries - Crypto Library
ii libk5crypto3:amd64 1.19.2-2ubuntu0.3 amd64 MIT Kerberos runtime libraries - Crypto Library
ii libk5crypto3:i386 1.19.2-2ubuntu0.3 i386 MIT Kerberos runtime libraries - Crypto Library
ii libkeyutils1:amd64 1.6.1-2ubuntu3 amd64 Linux Key Management Utilities (library)
ii libkeyutils1:i386 1.6.1-2ubuntu3 i386 Linux Key Management Utilities (library)
ii libkmod2:amd64 29-1ubuntu1 amd64 libkmod shared library
ii libkrb5-3:amd64 1.19.2-2ubuntu0.2 amd64 MIT Kerberos runtime libraries
ii libkrb5-3:i386 1.19.2-2ubuntu0.2 i386 MIT Kerberos runtime libraries
ii libkrb5support0:amd64 1.19.2-2ubuntu0.2 amd64 MIT Kerberos runtime libraries - Support library
ii libkrb5support0:i386 1.19.2-2ubuntu0.2 i386 MIT Kerberos runtime libraries - Support library
ii libkrb5-3:amd64 1.19.2-2ubuntu0.3 amd64 MIT Kerberos runtime libraries
ii libkrb5-3:i386 1.19.2-2ubuntu0.3 i386 MIT Kerberos runtime libraries
ii libkrb5support0:amd64 1.19.2-2ubuntu0.3 amd64 MIT Kerberos runtime libraries - Support library
ii libkrb5support0:i386 1.19.2-2ubuntu0.3 i386 MIT Kerberos runtime libraries - Support library
ii liblcms2-2:amd64 2.12~rc1-2build2 amd64 Little CMS 2 color management library
ii liblcms2-2:i386 2.12~rc1-2build2 i386 Little CMS 2 color management library
ii libldap-2.5-0:amd64 2.5.16+dfsg-0ubuntu0.22.04.1 amd64 OpenLDAP libraries
@@ -732,15 +732,15 @@ ii libncursesw6:i386 6.3-2ubuntu0.1
ii libndctl6:amd64 72.1-1 amd64 Utility library for managing the libnvdimm subsystem
ii libnettle8:amd64 3.7.3-1build2 amd64 low level cryptographic library (symmetric and one-way cryptos)
ii libnettle8:i386 3.7.3-1build2 i386 low level cryptographic library (symmetric and one-way cryptos)
ii libnghttp2-14:amd64 1.43.0-1build3 amd64 library implementing HTTP/2 protocol (shared library)
ii libnghttp2-14:i386 1.43.0-1build3 i386 library implementing HTTP/2 protocol (shared library)
ii libnghttp2-14:amd64 1.43.0-1ubuntu0.1 amd64 library implementing HTTP/2 protocol (shared library)
ii libnghttp2-14:i386 1.43.0-1ubuntu0.1 i386 library implementing HTTP/2 protocol (shared library)
ii libnl-3-200:amd64 3.5.0-0.1 amd64 library for dealing with netlink sockets
ii libnl-genl-3-200:amd64 3.5.0-0.1 amd64 library for dealing with netlink sockets - generic netlink
ii libnl-route-3-200:amd64 3.5.0-0.1 amd64 library for dealing with netlink sockets - route interface
ii libnsl-dev:amd64 1.3.0-2build2 amd64 libnsl development files
ii libnsl2:amd64 1.3.0-2build2 amd64 Public client interface for NIS(YP) and NIS+
ii libnspr4:amd64 2:4.32-3build1 amd64 NetScape Portable Runtime Library
ii libnss-systemd:amd64 249.11-0ubuntu3.10 amd64 nss module providing dynamic user and group name resolution
ii libnss-systemd:amd64 249.11-0ubuntu3.11 amd64 nss module providing dynamic user and group name resolution
ii libnss3:amd64 2:3.68.2-0ubuntu1.2 amd64 Network Security Service libraries
ii libnuma1:amd64 2.0.14-3ubuntu2 amd64 Libraries for controlling NUMA policy
ii libobjc-11-dev:amd64 11.4.0-1ubuntu1~22.04 amd64 Runtime library for GNU Objective-C applications (development files)
@@ -765,7 +765,7 @@ ii libpam-cap:amd64 1:2.44-1ubuntu0.22.04.1
ii libpam-modules-bin 1.4.0-11ubuntu2.3 amd64 Pluggable Authentication Modules for PAM - helper binaries
ii libpam-modules:amd64 1.4.0-11ubuntu2.3 amd64 Pluggable Authentication Modules for PAM
ii libpam-runtime 1.4.0-11ubuntu2.3 all Runtime support for the PAM library
ii libpam-systemd:amd64 249.11-0ubuntu3.10 amd64 system and service manager - PAM module
ii libpam-systemd:amd64 249.11-0ubuntu3.11 amd64 system and service manager - PAM module
ii libpam0g:amd64 1.4.0-11ubuntu2.3 amd64 Pluggable Authentication Modules library
ii libpango-1.0-0:amd64 1.50.6+ds-2ubuntu1 amd64 Layout and rendering of internationalized text
ii libpango-1.0-0:i386 1.50.6+ds-2ubuntu1 i386 Layout and rendering of internationalized text
@@ -782,7 +782,7 @@ ii libpcre2-8-0:i386 10.39-3ubuntu0.1
ii libpcre3:amd64 2:8.39-13ubuntu0.22.04.1 amd64 Old Perl 5 Compatible Regular Expression Library - runtime files
ii libpcre3:i386 2:8.39-13ubuntu0.22.04.1 i386 Old Perl 5 Compatible Regular Expression Library - runtime files
ii libpcsclite1:amd64 1.9.5-3ubuntu1 amd64 Middleware to access a smart card using PC/SC (library)
ii libperl5.34:amd64 5.34.0-3ubuntu1.2 amd64 shared Perl library
ii libperl5.34:amd64 5.34.0-3ubuntu1.3 amd64 shared Perl library
ii libpfm4:amd64 4.11.1+git32-gd0b85fb-1ubuntu0.1 amd64 Library to program the performance monitoring events
ii libpipeline1:amd64 1.5.5-1 amd64 Unix process pipeline manipulation library
ii libpixman-1-0:amd64 0.40.0-1ubuntu0.22.04.1 amd64 pixel-manipulation library for X and cairo
@@ -792,7 +792,7 @@ ii libpmemobj1:amd64 1.11.1-3build1
ii libpng16-16:amd64 1.6.37-3build5 amd64 PNG library - runtime (version 1.6)
ii libpng16-16:i386 1.6.37-3build5 i386 PNG library - runtime (version 1.6)
ii libpopt0:amd64 1.18-3build1 amd64 lib for parsing cmdline parameters
ii libprocps8:amd64 2:3.3.17-6ubuntu2 amd64 library for accessing process information from /proc
ii libprocps8:amd64 2:3.3.17-6ubuntu2.1 amd64 library for accessing process information from /proc
ii libproxy1v5:amd64 0.4.17-2 amd64 automatic proxy configuration management library (shared)
ii libproxy1v5:i386 0.4.17-2 i386 automatic proxy configuration management library (shared)
ii libpsl5:amd64 0.21.0-1.2build2 amd64 Library for Public Suffix List (shared libraries)
@@ -801,17 +801,17 @@ ii libpulse0:amd64 1:15.99.1+dfsg1-1ubuntu2.1
ii libpulse0:i386 1:15.99.1+dfsg1-1ubuntu2.1 i386 PulseAudio client libraries
ii libpython2.7-minimal:amd64 2.7.18-13ubuntu1.1 amd64 Minimal subset of the Python language (version 2.7)
ii libpython3-stdlib:amd64 3.10.6-1~22.04 amd64 interactive high-level object-oriented language (default python3 version)
ii libpython3.10-minimal:amd64 3.10.12-1~22.04.2 amd64 Minimal subset of the Python language (version 3.10)
ii libpython3.10-stdlib:amd64 3.10.12-1~22.04.2 amd64 Interactive high-level object-oriented language (standard library, version 3.10)
ii libpython3.10:amd64 3.10.12-1~22.04.2 amd64 Shared Python runtime library (version 3.10)
ii libpython3.10-minimal:amd64 3.10.12-1~22.04.3 amd64 Minimal subset of the Python language (version 3.10)
ii libpython3.10-stdlib:amd64 3.10.12-1~22.04.3 amd64 Interactive high-level object-oriented language (standard library, version 3.10)
ii libpython3.10:amd64 3.10.12-1~22.04.3 amd64 Shared Python runtime library (version 3.10)
ii libquadmath0-i386-cross 12.3.0-1ubuntu1~22.04cross1 all GCC Quad-Precision Math Library
ii libquadmath0-ppc64el-cross 12.3.0-1ubuntu1~22.04cross1 all GCC Quad-Precision Math Library
ii libquadmath0-x32-cross 12.3.0-1ubuntu1~22.04cross1 all GCC Quad-Precision Math Library
ii libquadmath0:amd64 12.3.0-1ubuntu1~22.04 amd64 GCC Quad-Precision Math Library
ii librados2 17.2.6-0ubuntu0.22.04.1 amd64 RADOS distributed object store client library
ii librados2 17.2.6-0ubuntu0.22.04.2 amd64 RADOS distributed object store client library
ii libraw1394-11:amd64 2.1.2-2build2 amd64 library for direct access to IEEE 1394 bus (aka FireWire)
ii libraw1394-11:i386 2.1.2-2build2 i386 library for direct access to IEEE 1394 bus (aka FireWire)
ii librbd1 17.2.6-0ubuntu0.22.04.1 amd64 RADOS block device client library
ii librbd1 17.2.6-0ubuntu0.22.04.2 amd64 RADOS block device client library
ii librdmacm1:amd64 39.0-1 amd64 Library for managing RDMA connections
ii libreadline8:amd64 8.1.2-1 amd64 GNU readline and history libraries, run-time libraries
ii librhash0:amd64 1.4.2-1ubuntu1 amd64 shared library for hash functions computing
@@ -844,8 +844,8 @@ ii libslang2:amd64 2.3.2-5build4
ii libslang2:i386 2.3.2-5build4 i386 S-Lang programming library - runtime version
ii libslirp0:amd64 4.6.1-1build1 amd64 General purpose TCP-IP emulator library
ii libsmartcols1:amd64 2.37.2-4ubuntu3 amd64 smart column output alignment library
ii libsndfile1:amd64 1.0.31-2build1 amd64 Library for reading/writing audio files
ii libsndfile1:i386 1.0.31-2build1 i386 Library for reading/writing audio files
ii libsndfile1:amd64 1.0.31-2ubuntu0.1 amd64 Library for reading/writing audio files
ii libsndfile1:i386 1.0.31-2ubuntu0.1 i386 Library for reading/writing audio files
ii libsndio7.0:amd64 1.8.1-1.1 amd64 Small audio and MIDI framework from OpenBSD, runtime libraries
ii libsndio7.0:i386 1.8.1-1.1 i386 Small audio and MIDI framework from OpenBSD, runtime libraries
ii libsodium23:amd64 1.0.18-1build2 amd64 Network communication, cryptography and signaturing library
@@ -860,11 +860,11 @@ ii libspice-server1:amd64 0.15.0-2ubuntu4
ii libsqlite3-0:amd64 3.37.2-2ubuntu0.1 amd64 SQLite 3 shared library
ii libsqlite3-0:i386 3.37.2-2ubuntu0.1 i386 SQLite 3 shared library
ii libss2:amd64 1.46.5-2ubuntu1.1 amd64 command-line interface parsing library
ii libssh-4:amd64 0.9.6-2ubuntu0.22.04.1 amd64 tiny C SSH library (OpenSSL flavor)
ii libssh-4:i386 0.9.6-2ubuntu0.22.04.1 i386 tiny C SSH library (OpenSSL flavor)
ii libssh-4:amd64 0.9.6-2ubuntu0.22.04.2 amd64 tiny C SSH library (OpenSSL flavor)
ii libssh-4:i386 0.9.6-2ubuntu0.22.04.2 i386 tiny C SSH library (OpenSSL flavor)
ii libssh2-1:amd64 1.10.0-3 amd64 SSH2 client-side library
ii libssl3:amd64 3.0.2-0ubuntu1.10 amd64 Secure Sockets Layer toolkit - shared libraries
ii libssl3:i386 3.0.2-0ubuntu1.10 i386 Secure Sockets Layer toolkit - shared libraries
ii libssl3:amd64 3.0.2-0ubuntu1.12 amd64 Secure Sockets Layer toolkit - shared libraries
ii libssl3:i386 3.0.2-0ubuntu1.12 i386 Secure Sockets Layer toolkit - shared libraries
ii libstb0:amd64 0.0~git20210910.af1a5bc+ds-1 amd64 single-file image and audio processing libraries for C/C++
ii libstb0:i386 0.0~git20210910.af1a5bc+ds-1 i386 single-file image and audio processing libraries for C/C++
ii libstdc++-10-dev-mips-cross 10.3.0-1ubuntu1cross2 all GNU Standard C++ Library v3 (development files) (mips)
@@ -908,8 +908,8 @@ ii libstdc++6-sparc64-cross 12.3.0-1ubuntu1~22.04cross1
ii libstdc++6-x32-cross 12.3.0-1ubuntu1~22.04cross1 all GNU Standard C++ Library v3 (x32)
ii libstdc++6:amd64 12.3.0-1ubuntu1~22.04 amd64 GNU Standard C++ Library v3
ii libstdc++6:i386 12.3.0-1ubuntu1~22.04 i386 GNU Standard C++ Library v3
ii libsystemd0:amd64 249.11-0ubuntu3.10 amd64 systemd utility library
ii libsystemd0:i386 249.11-0ubuntu3.10 i386 systemd utility library
ii libsystemd0:amd64 249.11-0ubuntu3.11 amd64 systemd utility library
ii libsystemd0:i386 249.11-0ubuntu3.11 i386 systemd utility library
ii libtag1v5-vanilla:amd64 1.11.1+dfsg.1-3ubuntu3 amd64 audio meta-data library - vanilla flavour
ii libtag1v5-vanilla:i386 1.11.1+dfsg.1-3ubuntu3 i386 audio meta-data library - vanilla flavour
ii libtag1v5:amd64 1.11.1+dfsg.1-3ubuntu3 amd64 audio meta-data library
@@ -921,8 +921,8 @@ ii libthai0:amd64 0.1.29-1build1
ii libthai0:i386 0.1.29-1build1 i386 Thai language support library
ii libtheora0:amd64 1.1.1+dfsg.1-15ubuntu4 amd64 Theora Video Compression Codec
ii libtheora0:i386 1.1.1+dfsg.1-15ubuntu4 i386 Theora Video Compression Codec
ii libtiff5:amd64 4.3.0-6ubuntu0.5 amd64 Tag Image File Format (TIFF) library
ii libtiff5:i386 4.3.0-6ubuntu0.5 i386 Tag Image File Format (TIFF) library
ii libtiff5:amd64 4.3.0-6ubuntu0.7 amd64 Tag Image File Format (TIFF) library
ii libtiff5:i386 4.3.0-6ubuntu0.7 i386 Tag Image File Format (TIFF) library
ii libtime-duration-perl 1.21-1 all module for rounded or exact English expression of durations
ii libtimedate-perl 2.3300-2 all collection of modules to manipulate date/time information
ii libtinfo-dev:amd64 6.3-2ubuntu0.1 amd64 transitional package for libncurses-dev
@@ -949,8 +949,8 @@ ii libubsan1-s390x-cross 12.3.0-1ubuntu1~22.04cross1
ii libubsan1-sparc64-cross 12.3.0-1ubuntu1~22.04cross1 all UBSan -- undefined behaviour sanitizer (runtime)
ii libubsan1-x32-cross 12.3.0-1ubuntu1~22.04cross1 all UBSan -- undefined behaviour sanitizer (runtime)
ii libubsan1:amd64 12.3.0-1ubuntu1~22.04 amd64 UBSan -- undefined behaviour sanitizer (runtime)
ii libudev1:amd64 249.11-0ubuntu3.10 amd64 libudev shared library
ii libudev1:i386 249.11-0ubuntu3.10 i386 libudev shared library
ii libudev1:amd64 249.11-0ubuntu3.11 amd64 libudev shared library
ii libudev1:i386 249.11-0ubuntu3.11 i386 libudev shared library
ii libunistring2:amd64 1.0-1 amd64 Unicode string library for C
ii libunistring2:i386 1.0-1 i386 Unicode string library for C
ii libunwind8:amd64 1.3.2-2build2.1 amd64 library to determine the call-chain of a program - runtime
@@ -976,8 +976,8 @@ ii libvorbis0a:amd64 1.3.7-1build2
ii libvorbis0a:i386 1.3.7-1build2 i386 decoder library for Vorbis General Audio Compression Codec
ii libvorbisenc2:amd64 1.3.7-1build2 amd64 encoder library for Vorbis General Audio Compression Codec
ii libvorbisenc2:i386 1.3.7-1build2 i386 encoder library for Vorbis General Audio Compression Codec
ii libvpx7:amd64 1.11.0-2ubuntu2 amd64 VP8 and VP9 video codec (shared library)
ii libvpx7:i386 1.11.0-2ubuntu2 i386 VP8 and VP9 video codec (shared library)
ii libvpx7:amd64 1.11.0-2ubuntu2.2 amd64 VP8 and VP9 video codec (shared library)
ii libvpx7:i386 1.11.0-2ubuntu2.2 i386 VP8 and VP9 video codec (shared library)
ii libvte-2.91-0:amd64 0.68.0-1 amd64 Terminal emulator widget for GTK+ 3.0 - runtime files
ii libvte-2.91-common 0.68.0-1 amd64 Terminal emulator widget for GTK+ 3.0 - common files
ii libvulkan1:amd64 1.3.204.1-2 amd64 Vulkan loader library
@@ -996,11 +996,11 @@ ii libwebp7:amd64 1.2.2-2ubuntu0.22.04.2
ii libwebp7:i386 1.2.2-2ubuntu0.22.04.2 i386 Lossy compression of digital photographic images
ii libwine:amd64 6.0.3~repack-1 amd64 Windows API implementation - library
ii libwine:i386 6.0.3~repack-1 i386 Windows API implementation - library
ii libx11-6:amd64 2:1.7.5-1ubuntu0.2 amd64 X11 client-side library
ii libx11-6:i386 2:1.7.5-1ubuntu0.2 i386 X11 client-side library
ii libx11-data 2:1.7.5-1ubuntu0.2 all X11 client-side library
ii libx11-xcb1:amd64 2:1.7.5-1ubuntu0.2 amd64 Xlib/XCB interface library
ii libx11-xcb1:i386 2:1.7.5-1ubuntu0.2 i386 Xlib/XCB interface library
ii libx11-6:amd64 2:1.7.5-1ubuntu0.3 amd64 X11 client-side library
ii libx11-6:i386 2:1.7.5-1ubuntu0.3 i386 X11 client-side library
ii libx11-data 2:1.7.5-1ubuntu0.3 all X11 client-side library
ii libx11-xcb1:amd64 2:1.7.5-1ubuntu0.3 amd64 Xlib/XCB interface library
ii libx11-xcb1:i386 2:1.7.5-1ubuntu0.3 i386 Xlib/XCB interface library
ii libx32asan6 11.4.0-1ubuntu1~22.04 amd64 AddressSanitizer -- a fast memory error detector (x32)
ii libx32atomic1 12.3.0-1ubuntu1~22.04 amd64 support library providing __atomic built-in functions (x32)
ii libx32gcc-11-dev 11.4.0-1ubuntu1~22.04 amd64 GCC support library (x32 development files)
@@ -1054,8 +1054,8 @@ ii libxkbcommon0:i386 1.4.0-1
ii libxml2-dev:amd64 2.9.13+dfsg-1ubuntu0.3 amd64 GNOME XML library - development files
ii libxml2:amd64 2.9.13+dfsg-1ubuntu0.3 amd64 GNOME XML library
ii libxml2:i386 2.9.13+dfsg-1ubuntu0.3 i386 GNOME XML library
ii libxpm4:amd64 1:3.5.12-1ubuntu0.22.04.1 amd64 X11 pixmap library
ii libxpm4:i386 1:3.5.12-1ubuntu0.22.04.1 i386 X11 pixmap library
ii libxpm4:amd64 1:3.5.12-1ubuntu0.22.04.2 amd64 X11 pixmap library
ii libxpm4:i386 1:3.5.12-1ubuntu0.22.04.2 i386 X11 pixmap library
ii libxrandr2:amd64 2:1.5.2-1build1 amd64 X11 RandR extension library
ii libxrandr2:i386 2:1.5.2-1build1 i386 X11 RandR extension library
ii libxrender1:amd64 1:0.9.10-1build4 amd64 X Rendering Extension client library
@@ -1098,7 +1098,7 @@ ii linux-libc-dev-s390x-cross 5.15.0-22.22cross3
ii linux-libc-dev-sh4-cross 5.15.0-22.22cross4 all Linux Kernel Headers for development (for cross-compiling)
ii linux-libc-dev-sparc64-cross 5.15.0-22.22cross4 all Linux Kernel Headers for development (for cross-compiling)
ii linux-libc-dev-x32-cross 5.15.0-22.22cross4 all Linux Kernel Headers for development (for cross-compiling)
ii linux-libc-dev:amd64 5.15.0-84.93 amd64 Linux Kernel Headers for development
ii linux-libc-dev:amd64 5.15.0-91.101 amd64 Linux Kernel Headers for development
ii lldb-14 1:14.0.0-1ubuntu1.1 amd64 Next generation, high-performance debugger
ii llvm-14 1:14.0.0-1ubuntu1.1 amd64 Modular compiler and toolchain technologies
ii llvm-14-dev 1:14.0.0-1ubuntu1.1 amd64 Modular compiler and toolchain technologies, libraries and headers
@@ -1131,19 +1131,20 @@ ii networkd-dispatcher 2.1-2ubuntu0.22.04.2
ii ninja-build 1.10.1-1 amd64 small build system closest in spirit to Make
ii ocl-icd-libopencl1:amd64 2.2.14-3 amd64 Generic OpenCL ICD Loader
ii ocl-icd-libopencl1:i386 2.2.14-3 i386 Generic OpenCL ICD Loader
ii openssl 3.0.2-0ubuntu1.10 amd64 Secure Sockets Layer toolkit - cryptographic utility
ii openssl 3.0.2-0ubuntu1.12 amd64 Secure Sockets Layer toolkit - cryptographic utility
ii ovmf 2022.02-3ubuntu0.22.04.1 all UEFI firmware for 64-bit x86 virtual machines
ii p7zip 16.02+dfsg-8 amd64 7zr file archiver with high compression ratio
ii parallel 20210822+ds-2 all build and execute command lines from standard input in parallel
ii passwd 1:4.8.1-2ubuntu2.1 amd64 change and administer password and group data
ii patch 2.7.6-7build2 amd64 Apply a diff file to an original
ii patchelf 0.14.3-1 amd64 modify properties of ELF executables
ii patchutils 0.4.2-1build2 amd64 Utilities to work with patches
ii pax-utils 1.2.9-1 amd64 Security-focused ELF files checking tool
ii paxctl 0.9-1build1 amd64 new PaX control program for using the PT_PAX_FLAGS marking
ii perl 5.34.0-3ubuntu1.2 amd64 Larry Wall's Practical Extraction and Report Language
ii perl-base 5.34.0-3ubuntu1.2 amd64 minimal Perl system
ii perl-modules-5.34 5.34.0-3ubuntu1.2 all Core Perl modules
ii procps 2:3.3.17-6ubuntu2 amd64 /proc file system utilities
ii perl 5.34.0-3ubuntu1.3 amd64 Larry Wall's Practical Extraction and Report Language
ii perl-base 5.34.0-3ubuntu1.3 amd64 minimal Perl system
ii perl-modules-5.34 5.34.0-3ubuntu1.3 all Core Perl modules
ii procps 2:3.3.17-6ubuntu2.1 amd64 /proc file system utilities
ii publicsuffix 20211207.1025-1 all accurate, machine-readable list of domain name suffixes
ii python2-minimal 2.7.18-3 amd64 minimal subset of the Python2 language
ii python2.7-minimal 2.7.18-13ubuntu1.1 amd64 Minimal subset of the Python language (version 2.7)
@@ -1153,28 +1154,31 @@ ii python3-gi 3.42.1-0ubuntu1
ii python3-lldb-14 1:14.0.0-1ubuntu1.1 amd64 Next generation, high-performance debugger, python3 lib
ii python3-minimal 3.10.6-1~22.04 amd64 minimal subset of the Python language (default python3 version)
ii python3-pkg-resources 59.6.0-1.2ubuntu0.22.04.1 all Package Discovery and Resource Access using pkg_resources
ii python3-pyasn1 0.4.8-1 all ASN.1 library for Python (Python 3 module)
ii python3-pycryptodome 3.11.0+dfsg1-3build1 amd64 cryptographic Python library (Python 3)
ii python3-pygments 2.11.2+dfsg-2 all syntax highlighting package written in Python 3
ii python3-six 1.16.0-3ubuntu1 all Python 2 and 3 compatibility library (Python 3 interface)
ii python3-yaml 5.4.1-1ubuntu1 amd64 YAML parser and emitter for Python3
ii python3.10 3.10.12-1~22.04.2 amd64 Interactive high-level object-oriented language (version 3.10)
ii python3.10-minimal 3.10.12-1~22.04.2 amd64 Minimal subset of the Python language (version 3.10)
ii qemu-block-extra 1:6.2+dfsg-2ubuntu6.13 amd64 extra block backend modules for qemu-system and qemu-utils
ii python3-zstd 1.5.0.2-1build1 amd64 python bindings to Yann Collet ZSTD compression library
ii python3.10 3.10.12-1~22.04.3 amd64 Interactive high-level object-oriented language (version 3.10)
ii python3.10-minimal 3.10.12-1~22.04.3 amd64 Minimal subset of the Python language (version 3.10)
ii qemu-block-extra 1:6.2+dfsg-2ubuntu6.15 amd64 extra block backend modules for qemu-system and qemu-utils
ii qemu-efi-aarch64 2022.02-3ubuntu0.22.04.1 all UEFI firmware for 64-bit ARM virtual machines
ii qemu-efi-arm 2022.02-3ubuntu0.22.04.1 all UEFI firmware for 32-bit ARM virtual machines
ii qemu-system 1:6.2+dfsg-2ubuntu6.13 amd64 QEMU full system emulation binaries
ii qemu-system-arm 1:6.2+dfsg-2ubuntu6.13 amd64 QEMU full system emulation binaries (arm)
ii qemu-system-common 1:6.2+dfsg-2ubuntu6.13 amd64 QEMU full system emulation binaries (common files)
ii qemu-system-data 1:6.2+dfsg-2ubuntu6.13 all QEMU full system emulation (data files)
ii qemu-system-gui 1:6.2+dfsg-2ubuntu6.13 amd64 QEMU full system emulation binaries (user interface and audio support)
ii qemu-system-mips 1:6.2+dfsg-2ubuntu6.13 amd64 QEMU full system emulation binaries (mips)
ii qemu-system-misc 1:6.2+dfsg-2ubuntu6.13 amd64 QEMU full system emulation binaries (miscellaneous)
ii qemu-system-ppc 1:6.2+dfsg-2ubuntu6.13 amd64 QEMU full system emulation binaries (ppc)
ii qemu-system-s390x 1:6.2+dfsg-2ubuntu6.13 amd64 QEMU full system emulation binaries (s390x)
ii qemu-system-sparc 1:6.2+dfsg-2ubuntu6.13 amd64 QEMU full system emulation binaries (sparc)
ii qemu-system-x86 1:6.2+dfsg-2ubuntu6.13 amd64 QEMU full system emulation binaries (x86)
ii qemu-user 1:6.2+dfsg-2ubuntu6.13 amd64 QEMU user mode emulation binaries
ii qemu-user-binfmt 1:6.2+dfsg-2ubuntu6.13 amd64 QEMU user mode binfmt registration for qemu-user
ii qemu-utils 1:6.2+dfsg-2ubuntu6.13 amd64 QEMU utilities
ii qemu-system 1:6.2+dfsg-2ubuntu6.15 amd64 QEMU full system emulation binaries
ii qemu-system-arm 1:6.2+dfsg-2ubuntu6.15 amd64 QEMU full system emulation binaries (arm)
ii qemu-system-common 1:6.2+dfsg-2ubuntu6.15 amd64 QEMU full system emulation binaries (common files)
ii qemu-system-data 1:6.2+dfsg-2ubuntu6.15 all QEMU full system emulation (data files)
ii qemu-system-gui 1:6.2+dfsg-2ubuntu6.15 amd64 QEMU full system emulation binaries (user interface and audio support)
ii qemu-system-mips 1:6.2+dfsg-2ubuntu6.15 amd64 QEMU full system emulation binaries (mips)
ii qemu-system-misc 1:6.2+dfsg-2ubuntu6.15 amd64 QEMU full system emulation binaries (miscellaneous)
ii qemu-system-ppc 1:6.2+dfsg-2ubuntu6.15 amd64 QEMU full system emulation binaries (ppc)
ii qemu-system-s390x 1:6.2+dfsg-2ubuntu6.15 amd64 QEMU full system emulation binaries (s390x)
ii qemu-system-sparc 1:6.2+dfsg-2ubuntu6.15 amd64 QEMU full system emulation binaries (sparc)
ii qemu-system-x86 1:6.2+dfsg-2ubuntu6.15 amd64 QEMU full system emulation binaries (x86)
ii qemu-user 1:6.2+dfsg-2ubuntu6.15 amd64 QEMU user mode emulation binaries
ii qemu-user-binfmt 1:6.2+dfsg-2ubuntu6.15 amd64 QEMU user mode binfmt registration for qemu-user
ii qemu-utils 1:6.2+dfsg-2ubuntu6.15 amd64 QEMU utilities
ii re2c 3.0-1 amd64 lexer generator for C, C++, Go and Rust
ii readline-common 8.1.2-1 all GNU readline and history libraries, common files
ii ripgrep 13.0.0-2ubuntu0.1 amd64 Recursively searches directories for a regex pattern
@@ -1187,11 +1191,11 @@ ii sensible-utils 0.0.17
ii session-migration 0.3.6 amd64 Tool to migrate in user session settings
ii shared-mime-info 2.1-2 amd64 FreeDesktop.org shared MIME database and spec
ii sysstat 12.5.2-2ubuntu0.2 amd64 system performance tools for Linux
ii systemd 249.11-0ubuntu3.10 amd64 system and service manager
ii systemd-sysv 249.11-0ubuntu3.10 amd64 system and service manager - SysV links
ii systemd-timesyncd 249.11-0ubuntu3.10 amd64 minimalistic service to synchronize local time with NTP servers
ii systemd 249.11-0ubuntu3.11 amd64 system and service manager
ii systemd-sysv 249.11-0ubuntu3.11 amd64 system and service manager - SysV links
ii systemd-timesyncd 249.11-0ubuntu3.11 amd64 minimalistic service to synchronize local time with NTP servers
ii sysvinit-utils 3.01-1ubuntu1 amd64 System-V-like utilities
ii tar 1.34+dfsg-1ubuntu0.1.22.04.1 amd64 GNU version of the tar archiving utility
ii tar 1.34+dfsg-1ubuntu0.1.22.04.2 amd64 GNU version of the tar archiving utility
ii time 1.9-0.1build2 amd64 GNU time program for measuring CPU resource usage
ii ubuntu-keyring 2021.03.26 all GnuPG keys of the Ubuntu archive
ii ubuntu-mono 20.10-0ubuntu2 all Ubuntu Mono Icon theme
@@ -1202,9 +1206,9 @@ ii usrmerge 25ubuntu2
ii util-linux 2.37.2-4ubuntu3 amd64 miscellaneous system utilities
ii uuid-runtime 2.37.2-4ubuntu3 amd64 runtime components for the Universally Unique ID library
ii valgrind 1:3.18.1-1ubuntu2 amd64 instrumentation framework for building dynamic analysis tools
ii vim 2:8.2.3995-1ubuntu2.11 amd64 Vi IMproved - enhanced vi editor
ii vim-common 2:8.2.3995-1ubuntu2.11 all Vi IMproved - Common files
ii vim-runtime 2:8.2.3995-1ubuntu2.11 all Vi IMproved - Runtime files
ii vim 2:8.2.3995-1ubuntu2.15 amd64 Vi IMproved - enhanced vi editor
ii vim-common 2:8.2.3995-1ubuntu2.15 all Vi IMproved - Common files
ii vim-runtime 2:8.2.3995-1ubuntu2.15 all Vi IMproved - Runtime files
ii wget 1.21.2-2ubuntu1 amd64 retrieves files from the web
ii wine 6.0.3~repack-1 all Windows API implementation - standard suite
ii wine32:i386 6.0.3~repack-1 i386 Windows API implementation - 32-bit binary loader
@@ -1212,7 +1216,7 @@ ii wine64 6.0.3~repack-1
ii x11-common 1:7.7+23ubuntu2 all X Window System (X.Org) infrastructure
ii xdg-user-dirs 0.17-2ubuntu4 amd64 tool to manage well known user directories
ii xkb-data 2.33-1 all X Keyboard Extension (XKB) configuration data
ii xxd 2:8.2.3995-1ubuntu2.11 amd64 tool to make (or reverse) a hex dump
ii xxd 2:8.2.3995-1ubuntu2.15 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
@@ -1227,7 +1231,7 @@ ii zstd 1.4.8+dfsg-3build1
||/ Name Version Architecture Description
Packages sorted by Installed-Size:
8369189 ===== TOTAL (1221 packages)
8374225 ===== TOTAL (1225 packages)
545062 libwine amd64
474522 libwine i386
270995 llvm-14-dev amd64
@@ -1287,7 +1291,7 @@ Packages sorted by Installed-Size:
34707 libicu70 i386
34444 libicu70 amd64
33103 qemu-system-ppc amd64
32781 vim-runtime all
32783 vim-runtime all
31850 g++-11-x86-64-linux-gnux32 amd64
31850 g++-11-i686-linux-gnu amd64
31553 libgl1-mesa-dri i386
@@ -1299,7 +1303,7 @@ Packages sorted by Installed-Size:
28891 g++-11 amd64
28620 clang-tools-14 amd64
28559 cpp-11-aarch64-linux-gnu amd64
28441 libperl5.34 amd64
28445 libperl5.34 amd64
28164 g++-11-arm-linux-gnueabihf amd64
28164 g++-11-arm-linux-gnueabi amd64
27997 g++-11-powerpc64le-linux-gnu amd64
@@ -1342,7 +1346,7 @@ Packages sorted by Installed-Size:
19890 cpp-11-m68k-linux-gnu amd64
19879 cpp-11-alpha-linux-gnu amd64
19769 iso-codes all
19526 binutils-aarch64-linux-gnu amd64
19527 binutils-aarch64-linux-gnu amd64
19276 libstdc++-10-dev-mips64-cross all
19270 libstdc++-10-dev-mips64el-cross all
19130 libstdc++-11-dev-sparc64-cross all
@@ -1352,7 +1356,7 @@ Packages sorted by Installed-Size:
18759 libstdc++-11-dev amd64
18548 libstdc++-11-dev-armel-cross all
18468 git amd64
18247 libc6-dbg amd64
18244 libc6-dbg amd64
18081 libstdc++-11-dev-powerpc-cross all
18002 libstdc++-11-dev-i386-cross all
17981 libstdc++-11-dev-armhf-cross all
@@ -1368,29 +1372,29 @@ Packages sorted by Installed-Size:
16432 binutils-mipsel-linux-gnu amd64
16432 binutils-mips-linux-gnu amd64
16296 systemd amd64
16196 binutils-powerpc-linux-gnu amd64
16193 binutils-powerpc64le-linux-gnu amd64
16188 binutils-powerpc64-linux-gnu amd64
15848 binutils-arm-linux-gnueabihf amd64
15848 binutils-arm-linux-gnueabi amd64
16197 binutils-powerpc-linux-gnu amd64
16194 binutils-powerpc64le-linux-gnu amd64
16189 binutils-powerpc64-linux-gnu amd64
15849 binutils-arm-linux-gnueabihf amd64
15849 binutils-arm-linux-gnueabi amd64
15600 libz3-4 amd64
15592 libgl1-amber-dri amd64
15318 binutils-x86-64-linux-gnux32 amd64
15307 binutils-i686-linux-gnu amd64
15319 binutils-x86-64-linux-gnux32 amd64
15308 binutils-i686-linux-gnu amd64
15301 liblldb-14 amd64
15293 zsh-common all
14923 ovmf all
14347 librbd1 amd64
14122 librados2 amd64
14131 librados2 amd64
13895 libgcc-11-dev amd64
13592 libc6 amd64
13593 libc6 amd64
13037 libc6-dev amd64
12823 binutils-sparc64-linux-gnu amd64
12817 binutils-s390x-linux-gnu amd64
12561 libc6-x32 amd64
12479 libc6 i386
12824 binutils-sparc64-linux-gnu amd64
12818 binutils-s390x-linux-gnu amd64
12562 libc6-x32 amd64
12480 libc6 i386
12295 libosmesa6 i386
12200 libc6-i386 amd64
12201 libc6-i386 amd64
11818 libgcc-11-dev-ppc64el-cross all
11632 libgcc-11-dev-ppc64-cross all
11597 libosmesa6 amd64
@@ -1406,17 +1410,17 @@ Packages sorted by Installed-Size:
9866 cmake-data all
9512 clang-tidy-14 amd64
9203 libgcc-11-dev-x32-cross all
9153 qemu-system-common amd64
8871 binutils-riscv64-linux-gnu amd64
9152 qemu-system-common amd64
8872 binutils-riscv64-linux-gnu amd64
8427 libasan6-riscv64-cross all
8248 libc6-dev-x32 amd64
8249 libc6-dev-x32 amd64
8197 libasan6-ppc64-cross all
8119 libpython3.10-stdlib amd64
8064 qemu-system-data all
7954 libasan6-ppc64el-cross all
7948 lib32gcc-11-dev amd64
7900 libtsan0-ppc64-cross all
7730 perl-base amd64
7734 perl-base amd64
7669 libtsan0-ppc64el-cross all
7653 libasan6-s390x-cross all
7622 libgcc-11-dev-armel-cross all
@@ -1424,7 +1428,7 @@ Packages sorted by Installed-Size:
7532 libasan6-arm64-cross all
7518 libasan6 amd64
7299 libtsan0-arm64-cross all
7261 libc6-dev-i386 amd64
7262 libc6-dev-i386 amd64
7255 libtsan0 amd64
7204 libasan6-armel-cross all
7161 libasan6-powerpc-cross all
@@ -1435,7 +1439,7 @@ Packages sorted by Installed-Size:
7072 qemu-utils amd64
6988 libx32gcc-11-dev amd64
6821 libasan6-armhf-cross all
6781 linux-libc-dev amd64
6810 linux-libc-dev amd64
6748 gstreamer1.0-plugins-good amd64
6733 dpkg amd64
6667 lib32asan6 amd64
@@ -1461,20 +1465,20 @@ Packages sorted by Installed-Size:
6068 linux-libc-dev-m68k-cross all
6050 linux-libc-dev-sh4-cross all
6035 linux-libc-dev-riscv64-cross all
5905 python3.10-minimal amd64
5850 libssl3 i386
5824 libssl3 amd64
5898 python3.10-minimal amd64
5854 libssl3 i386
5828 libssl3 amd64
5768 libpython3.10 amd64
5587 ubuntu-mono all
5576 libgcc-11-dev-sparc64-cross all
5575 libgcc-11-dev-s390x-cross all
5234 adwaita-icon-theme all
5169 binutils-sh4-linux-gnu amd64
5103 libpython3.10-minimal amd64
5038 binutils-m68k-linux-gnu amd64
5170 binutils-sh4-linux-gnu amd64
5106 libpython3.10-minimal amd64
5039 binutils-m68k-linux-gnu amd64
4978 libgcc-11-dev-powerpc-cross all
4962 binutils-alpha-linux-gnu amd64
4890 binutils-hppa-linux-gnu amd64
4963 binutils-alpha-linux-gnu amd64
4891 binutils-hppa-linux-gnu amd64
4866 ipxe-qemu all
4651 libglib2.0-0 i386
4425 libgcc-10-dev-mips64el-cross all
@@ -1482,14 +1486,15 @@ Packages sorted by Installed-Size:
4249 ncurses-term all
4236 xkb-data all
4204 llvm-14-linker-tools amd64
4156 apt amd64
4147 ripgrep amd64
4141 apt amd64
4082 libglib2.0-0 amd64
4024 python3-pygments all
3925 vim amd64
3931 vim amd64
3804 libnss3 amd64
3689 lldb-14 amd64
3643 python2.7-minimal amd64
3542 python3-pycryptodome amd64
3506 re2c amd64
3487 gojq amd64
3405 libmpfr6 amd64
@@ -1499,11 +1504,11 @@ Packages sorted by Installed-Size:
3333 libxml2-dev amd64
3261 liblsan0-ppc64-cross all
3247 libstdc++6-ppc64-cross all
3181 libapt-pkg6.0 amd64
3142 libvpx7 i386
3198 libapt-pkg6.0 amd64
3147 libvpx7 i386
3139 libhwasan0-arm64-cross all
3135 liblsan0-ppc64el-cross all
3127 libvpx7 amd64
3128 libvpx7 amd64
3102 libstdc++6-ppc64el-cross all
3013 libboost-regex1.74.0 amd64
2984 libgstreamer1.0-0 amd64
@@ -1536,7 +1541,7 @@ Packages sorted by Installed-Size:
2556 libgphoto2-6 amd64
2552 libgnutls30 i386
2545 libubsan1-sparc64-cross all
2537 libc-bin amd64
2538 libc-bin amd64
2534 libstdc++6-s390x-cross all
2528 libgphoto2-6 i386
2519 libubsan1-x32-cross all
@@ -1599,15 +1604,15 @@ Packages sorted by Installed-Size:
1483 libsamplerate0 i386
1472 sysstat amd64
1464 bash-completion all
1455 libx11-6 i386
1456 libx11-6 i386
1445 hyperfine amd64
1436 libobjc-11-dev amd64
1430 libx11-data all
1429 yash amd64
1429 libx11-data all
1425 libp11-kit0 i386
1408 llvm-14-runtime amd64
1388 procps amd64
1386 libx11-6 amd64
1387 libx11-6 amd64
1380 libepoxy0 amd64
1373 libslang2 i386
1354 libgcrypt20 amd64
@@ -1669,6 +1674,7 @@ Packages sorted by Installed-Size:
771 libcurl3-gnutls amd64
759 libdw1 i386
747 python3-gi amd64
743 python3-zstd amd64
735 libsoup2.4-1 amd64
735 libsepol2 amd64
729 libdw1 amd64
@@ -1694,14 +1700,14 @@ Packages sorted by Installed-Size:
648 libpam-systemd amd64
646 ncurses-bin amd64
638 libsndfile1 i386
632 python3.10 amd64
633 python3.10 amd64
621 libpcre2-8-0 amd64
620 findutils amd64
616 libcolord2 amd64
615 libonig5 amd64
610 libsource-highlight4v5 amd64
608 adduser all
606 libtiff5 i386
607 libtiff5 i386
606 libjpeg-turbo8 i386
600 libglx-mesa0 i386
599 libldap-2.5-0 i386
@@ -1709,19 +1715,19 @@ Packages sorted by Installed-Size:
595 libthai-data all
595 libgmp10 i386
592 zlib1g-dev amd64
591 alsa-ucm-conf all
583 libvorbisenc2 i386
583 libnl-route-3-200 amd64
582 dbus amd64
580 python3-pkg-resources all
576 libtiff5 amd64
574 libext2fs2 amd64
572 libcryptsetup12 amd64
571 libtiff5 amd64
569 libvte-2.91-0 amd64
568 libssh-4 i386
566 libglx-mesa0 amd64
565 libldap-2.5-0 amd64
564 libssh-4 i386
563 libpango-1.0-0 amd64
560 alsa-ucm-conf all
558 libtinfo6 amd64
558 libodbc2 i386
557 libmount1 i386
@@ -1795,11 +1801,12 @@ Packages sorted by Installed-Size:
394 base-files amd64
393 ncurses-base all
392 libopus0 amd64
390 python3-pyasn1 all
390 ca-certificates all
389 mount amd64
388 libexif12 amd64
382 vim-common all
382 libmount1 amd64
380 vim-common all
379 libfaudio0 amd64
376 unzip amd64
375 fontconfig amd64
@@ -1855,10 +1862,10 @@ Packages sorted by Installed-Size:
314 libmp3lame0 amd64
314 libgomp1-s390x-cross all
313 libxkbcommon0 i386
313 libctf-nobfd0 amd64
312 libpam-runtime all
312 libgphoto2-port12 i386
312 libgomp1-hppa-cross all
312 libctf-nobfd0 amd64
311 x11-common all
309 libv4lconvert0 i386
308 libgphoto2-port12 amd64
@@ -1872,7 +1879,7 @@ Packages sorted by Installed-Size:
304 libgomp1-mips64-cross all
302 libxkbcommon0 amd64
300 libsemanage2 amd64
298 libc-dev-bin amd64
299 libc-dev-bin amd64
296 libquadmath0 amd64
295 libx32quadmath0 amd64
294 libgomp1-mipsel-cross all
@@ -1887,7 +1894,7 @@ Packages sorted by Installed-Size:
282 libfuse3-3 amd64
282 libflac8 amd64
281 libflac8 i386
278 xxd amd64
280 xxd amd64
278 libz-mingw-w64 all
277 libgomp1-armel-cross all
276 at-spi2-core amd64
@@ -1947,12 +1954,12 @@ Packages sorted by Installed-Size:
240 gzip amd64
239 libgomp1-m68k-cross all
239 libctf0 amd64
238 libnghttp2-14 i386
238 libgfapi0 amd64
236 glib-networking i386
236 clang-format-14 amd64
235 libpam0g amd64
235 libjsoncpp25 amd64
234 libnghttp2-14 i386
232 ucf all
230 lz4 amd64
229 patch amd64
@@ -1967,6 +1974,7 @@ Packages sorted by Installed-Size:
221 libxcb1 i386
221 bfs amd64
220 libidn2-0 amd64
219 patchutils amd64
219 libtirpc3 amd64
219 librhash0 amd64
217 libasound2-data all
@@ -2114,9 +2122,9 @@ Packages sorted by Installed-Size:
113 libss2 amd64
113 libgfxdr0 amd64
113 lib32itm1 amd64
113 binutils amd64
112 libglib2.0-data all
112 libc-ares2 amd64
112 binutils amd64
110 libxext6 amd64
110 libitm1-sparc64-cross all
110 libio-pty-perl amd64
@@ -2181,10 +2189,10 @@ Packages sorted by Installed-Size:
86 libraw1394-11 amd64
86 libiec61883-0 i386
85 libxcb-render0 i386
85 libx11-xcb1 i386
85 libx11-xcb1 amd64
85 libwayland-client0 amd64
85 libgsm1 amd64
84 libx11-xcb1 i386
84 libx11-xcb1 amd64
84 libdrm-amdgpu1 amd64
84 file amd64
83 sysvinit-utils amd64
+1 -1
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-v6
image=upx-stubtools-20221212-v7
[[ $1 == --print-image ]] && echo "$image" && exit 0
podman build -t "$image" -f "$argv0dir/Dockerfile" "$argv0dir"
+4 -3
View File
@@ -15,7 +15,7 @@ RUN dpkg --add-architecture i386 \
# the full UPX binary inside the container via CMake:
7zip bfs busybox bzip2 cabextract ccache chrpath cmake cpio curl elfutils fd-find file fzf \
g++ gawk gdb gojq ht htop hyperfine jq libzstd-dev lsb-release lz4 lzip lzop \
mksh moreutils ninja-build p7zip parallel patch patchelf pax-utils paxctl \
mksh moreutils ninja-build p7zip parallel patch patchelf patchutils pax-utils paxctl \
python3 python3-pyasn1 python3-pycryptodome python3-zstd \
re2c ripgrep rsync screen universal-ctags unzip vim yash zip zlib1g-dev zsh zstd \
# extra packages for compiling with "gcc -m32" and and "gcc -mx32":
@@ -45,9 +45,10 @@ RUN cd /root \
# install official UPX release binaries 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 \
&& for v in 3.92 3.93 3.94 3.95 3.96 4.0.0 4.0.1 4.0.2 4.1.0 4.2.0; do wget -q https://github.com/upx/upx/releases/download/v${v}/upx-${v}-amd64_linux.tar.xz; done \
&& xzlist="3.92 3.93 3.94 3.95 3.96 4.0.0 4.0.1 4.0.2 4.1.0 4.2.0 4.2.1" \
&& for v in $xzlist; 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 \
&& for v in 3.91 3.92 3.93 3.94 3.95 3.96 4.0.0 4.0.1 4.0.2 4.1.0 4.2.0; do d=upx-${v}-amd64_linux; ./$d/upx -qq -d $d/upx -o /usr/local/bin/upx-${v}; done \
&& for v in 3.91 $xzlist; 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
+74 -72
View File
@@ -3,16 +3,16 @@ Packages:
Desired=Unknown/Install/Remove/Purge/Hold
ii 7zip 21.07+dfsg-4 amd64 7-Zip file archiver with a high compression ratio
ii adduser 3.118ubuntu5 all add and remove users and groups
ii apt 2.4.10 amd64 commandline package manager
ii apt 2.4.11 amd64 commandline package manager
ii aria2 1.36.0-1 amd64 High speed download utility
ii base-files 12ubuntu4.4 amd64 Debian base system miscellaneous files
ii base-passwd 3.5.52build1 amd64 Debian base system master password and group files
ii bash 5.1-6ubuntu1 amd64 GNU Bourne Again SHell
ii bash-completion 1:2.11-5ubuntu1 all programmable completion for the bash shell
ii bfs 2.3.1-1 amd64 Breadth-first version of find(1)
ii binutils 2.38-4ubuntu2.3 amd64 GNU assembler, linker and binary utilities
ii binutils-common:amd64 2.38-4ubuntu2.3 amd64 Common files for the GNU assembler, linker and binary utilities
ii binutils-x86-64-linux-gnu 2.38-4ubuntu2.3 amd64 GNU binary utilities, for x86-64-linux-gnu target
ii binutils 2.38-4ubuntu2.4 amd64 GNU assembler, linker and binary utilities
ii binutils-common:amd64 2.38-4ubuntu2.4 amd64 Common files for the GNU assembler, linker and binary utilities
ii binutils-x86-64-linux-gnu 2.38-4ubuntu2.4 amd64 GNU binary utilities, for x86-64-linux-gnu target
ii bsdutils 1:2.37.2-4ubuntu3 amd64 basic utilities from 4.4BSD-Lite
ii busybox 1:1.30.1-7ubuntu3 amd64 Tiny utilities for small and embedded systems
ii bzip2 1.0.8-5build1 amd64 high-quality block-sorting file compressor - utilities
@@ -26,13 +26,13 @@ ii coreutils 8.32-4.1ubuntu1 amd64
ii cpio 2.13+dfsg-7 amd64 GNU cpio -- a program to manage archives of files
ii cpp 4:11.2.0-1ubuntu1 amd64 GNU C preprocessor (cpp)
ii cpp-11 11.4.0-1ubuntu1~22.04 amd64 GNU C preprocessor
ii curl 7.81.0-1ubuntu1.14 amd64 command line tool for transferring data with URL syntax
ii curl 7.81.0-1ubuntu1.15 amd64 command line tool for transferring data with URL syntax
ii dash 0.5.11+git20210903+057cd650a4ed-3build1 amd64 POSIX-compliant shell
ii debconf 1.5.79ubuntu1 all Debian configuration management system
ii debianutils 5.5-1ubuntu2 amd64 Miscellaneous utilities specific to Debian
ii dh-elpa-helper 2.0.9ubuntu1 all helper package for emacs lisp extensions
ii diffutils 1:3.8-0ubuntu2 amd64 File comparison utilities
ii distro-info-data 0.52ubuntu0.4 all information about the distributions' releases (data files)
ii distro-info-data 0.52ubuntu0.6 all information about the distributions' releases (data files)
ii dpkg 1.21.1ubuntu2.2 amd64 Debian package management system
ii e2fsprogs 1.46.5-2ubuntu1.1 amd64 ext2/ext3/ext4 file system utilities
ii elfutils 0.186-1build1 amd64 collection of utilities to handle ELF objects
@@ -78,7 +78,7 @@ ii lib32stdc++-11-dev 11.4.0-1ubuntu1~22.04 amd64
ii lib32stdc++6 12.3.0-1ubuntu1~22.04 amd64 GNU Standard C++ Library v3 (32 bit Version)
ii lib32ubsan1 12.3.0-1ubuntu1~22.04 amd64 UBSan -- undefined behaviour sanitizer (32bit)
ii libacl1:amd64 2.3.1-1 amd64 access control list - shared library
ii libapt-pkg6.0:amd64 2.4.10 amd64 package management runtime library
ii libapt-pkg6.0:amd64 2.4.11 amd64 package management runtime library
ii libarchive13:amd64 3.6.0-1ubuntu1 amd64 Multi-format archive and compression library (shared library)
ii libaria2-0:amd64 1.36.0-1 amd64 C++ library interface to aria2
ii libasan6:amd64 11.4.0-1ubuntu1~22.04 amd64 AddressSanitizer -- a fast memory error detector
@@ -88,22 +88,22 @@ ii libattr1:amd64 1:2.5.1-1build1 amd64
ii libaudit-common 1:3.0.7-1build1 all Dynamic library for security auditing - common files
ii libaudit1:amd64 1:3.0.7-1build1 amd64 Dynamic library for security auditing
ii libbabeltrace1:amd64 1.5.8-2build1 amd64 Babeltrace conversion libraries
ii libbinutils:amd64 2.38-4ubuntu2.3 amd64 GNU binary utilities (private shared library)
ii libbinutils:amd64 2.38-4ubuntu2.4 amd64 GNU binary utilities (private shared library)
ii libblkid1:amd64 2.37.2-4ubuntu3 amd64 block device ID library
ii libboost-regex1.74.0:amd64 1.74.0-14ubuntu3 amd64 regular expression library for C++
ii libbrotli1:amd64 1.0.9-2build6 amd64 library implementing brotli encoder and decoder (shared libraries)
ii libbsd0:amd64 0.11.5-1 amd64 utility functions from BSD systems - shared library
ii libbz2-1.0:amd64 1.0.8-5build1 amd64 high-quality block-sorting file compressor library - runtime
ii libc-ares2:amd64 1.18.1-1ubuntu0.22.04.2 amd64 asynchronous name resolver
ii libc-bin 2.35-0ubuntu3.4 amd64 GNU C Library: Binaries
ii libc-dev-bin 2.35-0ubuntu3.4 amd64 GNU C Library: Development binaries
ii libc6-dev-i386 2.35-0ubuntu3.4 amd64 GNU C Library: 32-bit development libraries for AMD64
ii libc6-dev-x32 2.35-0ubuntu3.4 amd64 GNU C Library: X32 ABI Development Libraries for AMD64
ii libc6-dev:amd64 2.35-0ubuntu3.4 amd64 GNU C Library: Development Libraries and Header Files
ii libc6-i386 2.35-0ubuntu3.4 amd64 GNU C Library: 32-bit shared libraries for AMD64
ii libc6-x32 2.35-0ubuntu3.4 amd64 GNU C Library: X32 ABI Shared libraries for AMD64
ii libc6:amd64 2.35-0ubuntu3.4 amd64 GNU C Library: Shared libraries
ii libc6:i386 2.35-0ubuntu3.4 i386 GNU C Library: Shared libraries
ii libc-bin 2.35-0ubuntu3.5 amd64 GNU C Library: Binaries
ii libc-dev-bin 2.35-0ubuntu3.5 amd64 GNU C Library: Development binaries
ii libc6-dev-i386 2.35-0ubuntu3.5 amd64 GNU C Library: 32-bit development libraries for AMD64
ii libc6-dev-x32 2.35-0ubuntu3.5 amd64 GNU C Library: X32 ABI Development Libraries for AMD64
ii libc6-dev:amd64 2.35-0ubuntu3.5 amd64 GNU C Library: Development Libraries and Header Files
ii libc6-i386 2.35-0ubuntu3.5 amd64 GNU C Library: 32-bit shared libraries for AMD64
ii libc6-x32 2.35-0ubuntu3.5 amd64 GNU C Library: X32 ABI Shared libraries for AMD64
ii libc6:amd64 2.35-0ubuntu3.5 amd64 GNU C Library: Shared libraries
ii libc6:i386 2.35-0ubuntu3.5 i386 GNU C Library: Shared libraries
ii libcap-ng0:amd64 0.7.9-2.2build3 amd64 An alternate POSIX capabilities library
ii libcap2:amd64 1:2.44-1ubuntu0.22.04.1 amd64 POSIX 1003.1e capabilities (library)
ii libcc1-0:amd64 12.3.0-1ubuntu1~22.04 amd64 GCC cc1 plugin for GDB
@@ -111,10 +111,10 @@ ii libcom-err2:amd64 1.46.5-2ubuntu1.1 amd64
ii libcrypt-dev:amd64 1:4.4.27-1 amd64 libcrypt development files
ii libcrypt1:amd64 1:4.4.27-1 amd64 libcrypt shared library
ii libcrypt1:i386 1:4.4.27-1 i386 libcrypt shared library
ii libctf-nobfd0:amd64 2.38-4ubuntu2.3 amd64 Compact C Type Format library (runtime, no BFD dependency)
ii libctf0:amd64 2.38-4ubuntu2.3 amd64 Compact C Type Format library (runtime, BFD dependency)
ii libcurl3-gnutls:amd64 7.81.0-1ubuntu1.14 amd64 easy-to-use client-side URL transfer library (GnuTLS flavour)
ii libcurl4:amd64 7.81.0-1ubuntu1.14 amd64 easy-to-use client-side URL transfer library (OpenSSL flavour)
ii libctf-nobfd0:amd64 2.38-4ubuntu2.4 amd64 Compact C Type Format library (runtime, no BFD dependency)
ii libctf0:amd64 2.38-4ubuntu2.4 amd64 Compact C Type Format library (runtime, BFD dependency)
ii libcurl3-gnutls:amd64 7.81.0-1ubuntu1.15 amd64 easy-to-use client-side URL transfer library (GnuTLS flavour)
ii libcurl4:amd64 7.81.0-1ubuntu1.15 amd64 easy-to-use client-side URL transfer library (OpenSSL flavour)
ii libdb5.3:amd64 5.3.28+dfsg1-0.8ubuntu3 amd64 Berkeley v5.3 Database Libraries [runtime]
ii libdebconfclient0:amd64 0.261ubuntu1 amd64 Debian Configuration Management System (C-implementation library)
ii libdebuginfod-common 0.186-1build1 all configuration to enable the Debian debug info server
@@ -133,11 +133,11 @@ ii libgdbm-compat4:amd64 1.23-1 amd64
ii libgdbm6:amd64 1.23-1 amd64 GNU dbm database routines (runtime version)
ii libglib2.0-0:amd64 2.72.4-0ubuntu2.2 amd64 GLib library of C routines
ii libgmp10:amd64 2:6.2.1+dfsg-3ubuntu1 amd64 Multiprecision arithmetic library
ii libgnutls30:amd64 3.7.3-4ubuntu1.2 amd64 GNU TLS library - main runtime library
ii libgnutls30:amd64 3.7.3-4ubuntu1.3 amd64 GNU TLS library - main runtime library
ii libgomp1:amd64 12.3.0-1ubuntu1~22.04 amd64 GCC OpenMP (GOMP) support library
ii libgpg-error0:amd64 1.43-3 amd64 GnuPG development runtime library
ii libgpm2:amd64 1.20.7-10build1 amd64 General Purpose Mouse - shared library
ii libgssapi-krb5-2:amd64 1.19.2-2ubuntu0.2 amd64 MIT Kerberos runtime libraries - krb5 GSS-API Mechanism
ii libgssapi-krb5-2:amd64 1.19.2-2ubuntu0.3 amd64 MIT Kerberos runtime libraries - krb5 GSS-API Mechanism
ii libhiredis0.14:amd64 0.14.1-2 amd64 minimalistic C client library for Redis
ii libhogweed6:amd64 3.7.3-1build2 amd64 low level cryptographic library (public-key cryptos)
ii libicu70:amd64 70.1-2 amd64 International Components for Unicode
@@ -150,10 +150,10 @@ ii libitm1:amd64 12.3.0-1ubuntu1~22.04 amd64
ii libjansson4:amd64 2.13.1-1.1build3 amd64 C library for encoding, decoding and manipulating JSON data
ii libjq1:amd64 1.6-2.1ubuntu3 amd64 lightweight and flexible command-line JSON processor - shared library
ii libjsoncpp25:amd64 1.9.5-3 amd64 library for reading and writing JSON for C++
ii libk5crypto3:amd64 1.19.2-2ubuntu0.2 amd64 MIT Kerberos runtime libraries - Crypto Library
ii libk5crypto3:amd64 1.19.2-2ubuntu0.3 amd64 MIT Kerberos runtime libraries - Crypto Library
ii libkeyutils1:amd64 1.6.1-2ubuntu3 amd64 Linux Key Management Utilities (library)
ii libkrb5-3:amd64 1.19.2-2ubuntu0.2 amd64 MIT Kerberos runtime libraries
ii libkrb5support0:amd64 1.19.2-2ubuntu0.2 amd64 MIT Kerberos runtime libraries - Support library
ii libkrb5-3:amd64 1.19.2-2ubuntu0.3 amd64 MIT Kerberos runtime libraries
ii libkrb5support0:amd64 1.19.2-2ubuntu0.3 amd64 MIT Kerberos runtime libraries - Support library
ii libldap-2.5-0:amd64 2.5.16+dfsg-0ubuntu0.22.04.1 amd64 OpenLDAP libraries
ii liblsan0:amd64 12.3.0-1ubuntu1~22.04 amd64 LeakSanitizer -- a memory leak detector (runtime)
ii liblz4-1:amd64 1.9.3-2build2 amd64 Fast LZ compression algorithm library - runtime
@@ -171,7 +171,7 @@ ii libncurses5:amd64 6.3-2ubuntu0.1 amd64
ii libncurses6:amd64 6.3-2ubuntu0.1 amd64 shared libraries for terminal handling
ii libncursesw6:amd64 6.3-2ubuntu0.1 amd64 shared libraries for terminal handling (wide character support)
ii libnettle8:amd64 3.7.3-1build2 amd64 low level cryptographic library (symmetric and one-way cryptos)
ii libnghttp2-14:amd64 1.43.0-1build3 amd64 library implementing HTTP/2 protocol (shared library)
ii libnghttp2-14:amd64 1.43.0-1ubuntu0.1 amd64 library implementing HTTP/2 protocol (shared library)
ii libnl-3-200:amd64 3.5.0-0.1 amd64 library for dealing with netlink sockets
ii libnl-genl-3-200:amd64 3.5.0-0.1 amd64 library for dealing with netlink sockets - generic netlink
ii libnsl-dev:amd64 1.3.0-2build2 amd64 libnsl development files
@@ -184,15 +184,15 @@ ii libpam-runtime 1.4.0-11ubuntu2.3 all
ii libpam0g:amd64 1.4.0-11ubuntu2.3 amd64 Pluggable Authentication Modules library
ii libpcre2-8-0:amd64 10.39-3ubuntu0.1 amd64 New Perl Compatible Regular Expression Library- 8 bit runtime files
ii libpcre3:amd64 2:8.39-13ubuntu0.22.04.1 amd64 Old Perl 5 Compatible Regular Expression Library - runtime files
ii libperl5.34:amd64 5.34.0-3ubuntu1.2 amd64 shared Perl library
ii libperl5.34:amd64 5.34.0-3ubuntu1.3 amd64 shared Perl library
ii libpopt0:amd64 1.18-3build1 amd64 lib for parsing cmdline parameters
ii libprocps8:amd64 2:3.3.17-6ubuntu2 amd64 library for accessing process information from /proc
ii libprocps8:amd64 2:3.3.17-6ubuntu2.1 amd64 library for accessing process information from /proc
ii libpsl5:amd64 0.21.0-1.2build2 amd64 Library for Public Suffix List (shared libraries)
ii libpython2.7-minimal:amd64 2.7.18-13ubuntu1.1 amd64 Minimal subset of the Python language (version 2.7)
ii libpython3-stdlib:amd64 3.10.6-1~22.04 amd64 interactive high-level object-oriented language (default python3 version)
ii libpython3.10-minimal:amd64 3.10.12-1~22.04.2 amd64 Minimal subset of the Python language (version 3.10)
ii libpython3.10-stdlib:amd64 3.10.12-1~22.04.2 amd64 Interactive high-level object-oriented language (standard library, version 3.10)
ii libpython3.10:amd64 3.10.12-1~22.04.2 amd64 Shared Python runtime library (version 3.10)
ii libpython3.10-minimal:amd64 3.10.12-1~22.04.3 amd64 Minimal subset of the Python language (version 3.10)
ii libpython3.10-stdlib:amd64 3.10.12-1~22.04.3 amd64 Interactive high-level object-oriented language (standard library, version 3.10)
ii libpython3.10:amd64 3.10.12-1~22.04.3 amd64 Shared Python runtime library (version 3.10)
ii libquadmath0:amd64 12.3.0-1ubuntu1~22.04 amd64 GCC Quad-Precision Math Library
ii libreadline8:amd64 8.1.2-1 amd64 GNU readline and history libraries, run-time libraries
ii librhash0:amd64 1.4.2-1ubuntu1 amd64 shared library for hash functions computing
@@ -213,12 +213,12 @@ ii libsource-highlight-common 3.1.9-4.1build2 all
ii libsource-highlight4v5 3.1.9-4.1build2 amd64 source highlighting library
ii libsqlite3-0:amd64 3.37.2-2ubuntu0.1 amd64 SQLite 3 shared library
ii libss2:amd64 1.46.5-2ubuntu1.1 amd64 command-line interface parsing library
ii libssh-4:amd64 0.9.6-2ubuntu0.22.04.1 amd64 tiny C SSH library (OpenSSL flavor)
ii libssh-4:amd64 0.9.6-2ubuntu0.22.04.2 amd64 tiny C SSH library (OpenSSL flavor)
ii libssh2-1:amd64 1.10.0-3 amd64 SSH2 client-side library
ii libssl3:amd64 3.0.2-0ubuntu1.10 amd64 Secure Sockets Layer toolkit - shared libraries
ii libssl3:amd64 3.0.2-0ubuntu1.12 amd64 Secure Sockets Layer toolkit - shared libraries
ii libstdc++-11-dev:amd64 11.4.0-1ubuntu1~22.04 amd64 GNU Standard C++ Library v3 (development files)
ii libstdc++6:amd64 12.3.0-1ubuntu1~22.04 amd64 GNU Standard C++ Library v3
ii libsystemd0:amd64 249.11-0ubuntu3.10 amd64 systemd utility library
ii libsystemd0:amd64 249.11-0ubuntu3.11 amd64 systemd utility library
ii libtasn1-6:amd64 4.18.0-4build1 amd64 Manage ASN.1 structures (runtime)
ii libtime-duration-perl 1.21-1 all module for rounded or exact English expression of durations
ii libtimedate-perl 2.3300-2 all collection of modules to manipulate date/time information
@@ -229,7 +229,7 @@ ii libtirpc-dev:amd64 1.3.2-2ubuntu0.1 amd64
ii libtirpc3:amd64 1.3.2-2ubuntu0.1 amd64 transport-independent RPC library
ii libtsan0:amd64 11.4.0-1ubuntu1~22.04 amd64 ThreadSanitizer -- a Valgrind-based detector of data races (runtime)
ii libubsan1:amd64 12.3.0-1ubuntu1~22.04 amd64 UBSan -- undefined behaviour sanitizer (runtime)
ii libudev1:amd64 249.11-0ubuntu3.10 amd64 libudev shared library
ii libudev1:amd64 249.11-0ubuntu3.11 amd64 libudev shared library
ii libunistring2:amd64 1.0-1 amd64 Unicode string library for C
ii libutempter0:amd64 1.2.1-2build2 amd64 privileged helper for utmp/wtmp updates (runtime)
ii libuuid1:amd64 2.37.2-4ubuntu3 amd64 Universally Unique ID library
@@ -254,7 +254,7 @@ ii libxxhash0:amd64 0.8.1-1 amd64
ii libyaml-0-2:amd64 0.2.2-1build2 amd64 Fast YAML 1.1 parser and emitter library
ii libzstd-dev:amd64 1.4.8+dfsg-3build1 amd64 fast lossless compression algorithm -- development files
ii libzstd1:amd64 1.4.8+dfsg-3build1 amd64 fast lossless compression algorithm
ii linux-libc-dev:amd64 5.15.0-87.97 amd64 Linux Kernel Headers for development
ii linux-libc-dev:amd64 5.15.0-91.101 amd64 Linux Kernel Headers for development
ii login 1:4.8.1-2ubuntu2.1 amd64 system login tools
ii logsave 1.46.5-2ubuntu1.1 amd64 save the output of a command in a log file
ii lsb-base 11.1.0ubuntu4 all Linux Standard Base init script functionality
@@ -272,18 +272,19 @@ ii ncurses-base 6.3-2ubuntu0.1 all
ii ncurses-bin 6.3-2ubuntu0.1 amd64 terminal-related programs and man pages
ii ncurses-term 6.3-2ubuntu0.1 all additional terminal type definitions
ii ninja-build 1.10.1-1 amd64 small build system closest in spirit to Make
ii openssl 3.0.2-0ubuntu1.10 amd64 Secure Sockets Layer toolkit - cryptographic utility
ii openssl 3.0.2-0ubuntu1.12 amd64 Secure Sockets Layer toolkit - cryptographic utility
ii p7zip 16.02+dfsg-8 amd64 7zr file archiver with high compression ratio
ii parallel 20210822+ds-2 all build and execute command lines from standard input in parallel
ii passwd 1:4.8.1-2ubuntu2.1 amd64 change and administer password and group data
ii patch 2.7.6-7build2 amd64 Apply a diff file to an original
ii patchelf 0.14.3-1 amd64 modify properties of ELF executables
ii patchutils 0.4.2-1build2 amd64 Utilities to work with patches
ii pax-utils 1.2.9-1 amd64 Security-focused ELF files checking tool
ii paxctl 0.9-1build1 amd64 new PaX control program for using the PT_PAX_FLAGS marking
ii perl 5.34.0-3ubuntu1.2 amd64 Larry Wall's Practical Extraction and Report Language
ii perl-base 5.34.0-3ubuntu1.2 amd64 minimal Perl system
ii perl-modules-5.34 5.34.0-3ubuntu1.2 all Core Perl modules
ii procps 2:3.3.17-6ubuntu2 amd64 /proc file system utilities
ii perl 5.34.0-3ubuntu1.3 amd64 Larry Wall's Practical Extraction and Report Language
ii perl-base 5.34.0-3ubuntu1.3 amd64 minimal Perl system
ii perl-modules-5.34 5.34.0-3ubuntu1.3 all Core Perl modules
ii procps 2:3.3.17-6ubuntu2.1 amd64 /proc file system utilities
ii python2-minimal 2.7.18-3 amd64 minimal subset of the Python2 language
ii python2.7-minimal 2.7.18-13ubuntu1.1 amd64 Minimal subset of the Python language (version 2.7)
ii python3 3.10.6-1~22.04 amd64 interactive high-level object-oriented language (default python3 version)
@@ -291,8 +292,8 @@ ii python3-minimal 3.10.6-1~22.04 amd64
ii python3-pyasn1 0.4.8-1 all ASN.1 library for Python (Python 3 module)
ii python3-pycryptodome 3.11.0+dfsg1-3build1 amd64 cryptographic Python library (Python 3)
ii python3-zstd 1.5.0.2-1build1 amd64 python bindings to Yann Collet ZSTD compression library
ii python3.10 3.10.12-1~22.04.2 amd64 Interactive high-level object-oriented language (version 3.10)
ii python3.10-minimal 3.10.12-1~22.04.2 amd64 Minimal subset of the Python language (version 3.10)
ii python3.10 3.10.12-1~22.04.3 amd64 Interactive high-level object-oriented language (version 3.10)
ii python3.10-minimal 3.10.12-1~22.04.3 amd64 Minimal subset of the Python language (version 3.10)
ii re2c 3.0-1 amd64 lexer generator for C, C++, Go and Rust
ii readline-common 8.1.2-1 all GNU readline and history libraries, common files
ii ripgrep 13.0.0-2ubuntu0.1 amd64 Recursively searches directories for a regex pattern
@@ -303,7 +304,7 @@ ii sed 4.8-1ubuntu2 amd64
ii sensible-utils 0.0.17 all Utilities for sensible alternative selection
ii sysstat 12.5.2-2ubuntu0.2 amd64 system performance tools for Linux
ii sysvinit-utils 3.01-1ubuntu1 amd64 System-V-like utilities
ii tar 1.34+dfsg-1ubuntu0.1.22.04.1 amd64 GNU version of the tar archiving utility
ii tar 1.34+dfsg-1ubuntu0.1.22.04.2 amd64 GNU version of the tar archiving utility
ii time 1.9-0.1build2 amd64 GNU time program for measuring CPU resource usage
ii ubuntu-keyring 2021.03.26 all GnuPG keys of the Ubuntu archive
ii ucf 3.0043 all Update Configuration File(s): preserve user changes to config files
@@ -311,11 +312,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.12 amd64 Vi IMproved - enhanced vi editor
ii vim-common 2:8.2.3995-1ubuntu2.12 all Vi IMproved - Common files
ii vim-runtime 2:8.2.3995-1ubuntu2.12 all Vi IMproved - Runtime files
ii vim 2:8.2.3995-1ubuntu2.15 amd64 Vi IMproved - enhanced vi editor
ii vim-common 2:8.2.3995-1ubuntu2.15 all Vi IMproved - Common files
ii vim-runtime 2:8.2.3995-1ubuntu2.15 all Vi IMproved - Runtime files
ii wget 1.21.2-2ubuntu1 amd64 retrieves files from the web
ii xxd 2:8.2.3995-1ubuntu2.12 amd64 tool to make (or reverse) a hex dump
ii xxd 2:8.2.3995-1ubuntu2.15 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
@@ -330,12 +331,12 @@ ii zstd 1.4.8+dfsg-3build1 amd64
||/ Name Version Architecture Description
Packages sorted by Installed-Size:
754072 ===== TOTAL (324 packages)
754338 ===== TOTAL (325 packages)
52747 gcc-11 amd64
34444 libicu70 amd64
32781 vim-runtime all
32783 vim-runtime all
28891 g++-11 amd64
28441 libperl5.34 amd64
28445 libperl5.34 amd64
26284 cpp-11 amd64
20742 cmake amd64
18759 libstdc++-11-dev amd64
@@ -343,39 +344,39 @@ Packages sorted by Installed-Size:
17671 perl-modules-5.34 all
15293 zsh-common all
13895 libgcc-11-dev amd64
13592 libc6 amd64
13593 libc6 amd64
13037 libc6-dev amd64
12561 libc6-x32 amd64
12479 libc6 i386
12200 libc6-i386 amd64
12562 libc6-x32 amd64
12480 libc6 i386
12201 libc6-i386 amd64
11311 gdb amd64
10877 lib32stdc++-11-dev amd64
10439 binutils-x86-64-linux-gnu amd64
10390 libx32stdc++-11-dev amd64
9866 cmake-data all
8248 libc6-dev-x32 amd64
8249 libc6-dev-x32 amd64
8119 libpython3.10-stdlib amd64
7948 lib32gcc-11-dev amd64
7730 perl-base amd64
7734 perl-base amd64
7518 libasan6 amd64
7262 libc6-dev-i386 amd64
7255 libtsan0 amd64
7128 libmagic-mgc amd64
7112 coreutils amd64
6988 libx32gcc-11-dev amd64
6795 linux-libc-dev amd64
6810 linux-libc-dev amd64
6733 dpkg amd64
6667 lib32asan6 amd64
6570 libx32asan6 amd64
5905 python3.10-minimal amd64
5824 libssl3 amd64
5898 python3.10-minimal amd64
5828 libssl3 amd64
5768 libpython3.10 amd64
5103 libpython3.10-minimal amd64
5106 libpython3.10-minimal amd64
4249 ncurses-term all
4156 apt amd64
4147 ripgrep amd64
4141 apt amd64
4082 libglib2.0-0 amd64
3925 vim amd64
3931 vim amd64
3643 python2.7-minimal amd64
3542 python3-pycryptodome amd64
3506 re2c amd64
@@ -383,7 +384,7 @@ Packages sorted by Installed-Size:
3405 libmpfr6 amd64
3399 util-linux amd64
3347 libaria2-0 amd64
3181 libapt-pkg6.0 amd64
3198 libapt-pkg6.0 amd64
3013 libboost-regex1.74.0 amd64
2961 liblsan0 amd64
2943 parallel all
@@ -393,7 +394,7 @@ Packages sorted by Installed-Size:
2755 libstdc++6 amd64
2676 libubsan1 amd64
2662 lib32stdc++6 amd64
2537 libc-bin amd64
2538 libc-bin amd64
2518 libx32ubsan1 amd64
2510 fd-find amd64
2499 lib32ubsan1 amd64
@@ -452,7 +453,7 @@ Packages sorted by Installed-Size:
686 lib32quadmath0 amd64
683 libpcre3 amd64
646 ncurses-bin amd64
632 python3.10 amd64
633 python3.10 amd64
621 libpcre2-8-0 amd64
620 findutils amd64
615 libonig5 amd64
@@ -483,8 +484,8 @@ Packages sorted by Installed-Size:
390 python3-pyasn1 all
390 ca-certificates all
389 mount amd64
382 vim-common all
382 libmount1 amd64
380 vim-common all
376 unzip amd64
372 xz-utils amd64
368 libssh2-1 amd64
@@ -506,18 +507,18 @@ Packages sorted by Installed-Size:
320 libgomp1 amd64
320 libcrypt-dev amd64
318 libncurses5 amd64
313 libctf-nobfd0 amd64
312 libpam-runtime all
312 libctf-nobfd0 amd64
307 libsource-highlight-common all
306 libx32gomp1 amd64
300 libsemanage2 amd64
298 libc-dev-bin amd64
299 libc-dev-bin amd64
296 libquadmath0 amd64
295 libx32quadmath0 amd64
292 libk5crypto3 amd64
290 pax-utils amd64
290 liblzma5 amd64
278 xxd amd64
280 xxd amd64
273 gcc-11-base amd64
272 gcc-12-base i386
272 gcc-12-base amd64
@@ -542,6 +543,7 @@ Packages sorted by Installed-Size:
225 libcrypt1 amd64
221 bfs amd64
220 libidn2-0 amd64
219 patchutils amd64
219 libtirpc3 amd64
219 librhash0 amd64
214 dash amd64
@@ -587,8 +589,8 @@ Packages sorted by Installed-Size:
114 bzip2 amd64
113 libss2 amd64
113 lib32itm1 amd64
113 binutils amd64
112 libc-ares2 amd64
112 binutils amd64
110 libio-pty-perl amd64
105 python2-minimal amd64
105 libx32itm1 amd64
+32 -17
View File
@@ -8,7 +8,8 @@ set -e
# Copyright (C) Markus Franz Xaver Johannes Oberhumer
#
# uses optional environment variables: AR, CC, CXX, OPTIMIZE, VERBOSE, top_srcdir
# uses optional environment variables: AR, CC, CXX, OPTIMIZE, VERBOSE
# and optional settings for top_srcdir, obj_suffix and XXX_extra_flags
# shell init
### set -x # enable logging
@@ -24,19 +25,23 @@ CXX="${CXX:-c++ -std=gnu++17}"
if test "x$AR" = "x0" || test "x$AR" = "xfalse" || test "x$AR" = "x/bin/false"; then
AR="" # do not use $AR
fi
if test -z "${mandatory_flags+set}"; then
# protect against security threats caused by misguided compiler "optimizations"
mandatory_flags="-fno-strict-aliasing -fno-strict-overflow -funsigned-char"
fi
if test -z "${sensible_flags+set}"; then
# not mandatory but good practice when using <windows.h>:
mandatory_flags="$mandatory_flags -DWIN32_LEAN_AND_MEAN"
sensible_flags="-DWIN32_LEAN_AND_MEAN"
if test "x$OPTIMIZE" != "x" && test "x$OPTIMIZE" != "x0"; then
# not mandatory and not minimal, but usually a good idea:
mandatory_flags="-Wall -O2 $mandatory_flags"
sensible_flags="-Wall -O2 $sensible_flags"
fi
CC="$CC $mandatory_flags"
CXX="$CXX $mandatory_flags"
fi
CC="$CC $sensible_flags $mandatory_flags"
CXX="$CXX $sensible_flags $mandatory_flags"
# go to upx top-level directory
# HINT: set "top_srcdir" manually if your system does not have "readlink"
# HINT: set "top_srcdir" manually if your system does not have "readlink -f"
if test "x$top_srcdir" = "x"; then
my_argv0abs="$(readlink -fn "$my_argv0")"
test "x$my_argv0abs" = "x" && exit 1
@@ -80,7 +85,7 @@ check_submodule() {
# create and enter build directory; updates global $rel_top_srcdir
run "+" cd "$rel_top_srcdir" || exit 1
rel_top_srcdir=.
echo "#==== build $1 ====="
echo "#===== build $1 ====="
run "+" mkdir "build/by-hand/$1"
run "+" cd "build/by-hand/$1" || exit 1
rel_top_srcdir=../../..
@@ -91,42 +96,52 @@ check_submodule() {
}
# build
upx_submodule_defs=
run "+" mkdir -p "build/by-hand"
if check_submodule bzip2; then
upx_submodule_defs="$upx_submodule_defs -DWITH_BZIP2"
test -z "${bzip2_extra_flags+set}" && bzip2_extra_flags="-DBZ_NO_STDIO"
for f in "$rel_top_srcdir"/vendor/bzip2/*.c; do
run "CC $f" $CC -c "$f"
run "CC $f" $CC $bzip2_extra_flags -c "$f"
done
fi
if check_submodule ucl; then
#upx_submodule_defs="$upx_submodule_defs -DWITH_UCL"
test -z "${ucl_extra_flags+set}" && ucl_extra_flags=
for f in "$rel_top_srcdir"/vendor/ucl/src/*.c; do
run "CC $f" $CC -I"$rel_top_srcdir"/vendor/ucl/include -I"$rel_top_srcdir"/vendor/ucl -c "$f"
run "CC $f" $CC -I"$rel_top_srcdir"/vendor/ucl/include -I"$rel_top_srcdir"/vendor/ucl $ucl_extra_flags -c "$f"
done
fi
if check_submodule zlib; then
#upx_submodule_defs="$upx_submodule_defs -DWITH_ZLIB"
test -z "${zlib_extra_flags+set}" && zlib_extra_flags="-DHAVE_UNISTD_H -DHAVE_VSNPRINTF"
for f in "$rel_top_srcdir"/vendor/zlib/*.c; do
run "CC $f" $CC -DHAVE_UNISTD_H -DHAVE_VSNPRINTF -c "$f"
run "CC $f" $CC $zlib_extra_flags -c "$f"
done
fi
if check_submodule zstd; then
upx_submodule_defs="$upx_submodule_defs -DWITH_ZSTD"
test -z "${zstd_extra_flags+set}" && zstd_extra_flags="-DDYNAMIC_BMI2=0 -DZSTD_DISABLE_ASM"
for f in "$rel_top_srcdir"/vendor/zstd/lib/*/*.c; do
run "CC $f" $CC -DDYNAMIC_BMI2=0 -DZSTD_DISABLE_ASM -c "$f"
run "CC $f" $CC $zstd_extra_flags -c "$f"
done
fi
run "+" cd "$rel_top_srcdir" || exit 1
rel_top_srcdir=.
echo "#==== build UPX ====="
echo "#===== build UPX ====="
run "+" cd "build/by-hand" || exit 1
rel_top_srcdir=../..
for f in "$rel_top_srcdir"/src/*.cpp "$rel_top_srcdir"/src/*/*.cpp; do
run "CXX $f" $CXX -I"$rel_top_srcdir"/vendor -c "$f"
run "CXX $f" $CXX -I"$rel_top_srcdir"/vendor $upx_submodule_defs -c "$f"
done
# echo "#==== link UPX ====="
# echo "#===== link UPX ====="
test "x$obj_suffix" = "x" && obj_suffix=.o
if test "x$AR" = "x"; then
# link without using $AR
run "CXX upx" $CXX -o upx *.o */*.o
run "CXX upx" $CXX -o upx *${obj_suffix} */*${obj_suffix}
else
run "AR libupx" $AR rcs libupx_submodules.a */*.o
run "CXX upx" $CXX -o upx *.o -L. -lupx_submodules
run "AR libupx" $AR rcs ${AR_LIBFILE:-libupx_submodules.a} */*${obj_suffix}
run "CXX upx" $CXX -o upx *${obj_suffix} -L. -lupx_submodules
fi
echo "# current directory: '$(pwd)'"
ls -l upx*
+4 -3
View File
@@ -3,11 +3,12 @@
set -e; set -o pipefail
# "Gofmt's style is nobody's favourite, but gofmt is everybody's favourite." --Rob Pike
#
# NOTE: we are using clang-format-15.0.6 from upx-stubtools
# see https://github.com/upx/upx-stubtools/releases
#
# NOTE: we use .clang-format config from upx.git/.clang-format
# Copyright (C) Markus Franz Xaver Johannes Oberhumer
if [[ ! -f $UPX_CLANG_FORMAT ]]; then
UPX_CLANG_FORMAT="$HOME/local/bin/bin-upx/clang-format-15.0.6"
@@ -29,4 +30,4 @@ ulimit -v 1048576 || true
#echo $UPX_CLANG_FORMAT
exec "$UPX_CLANG_FORMAT" -style=file "$@"
exit 1
exit 99
+75
View File
@@ -0,0 +1,75 @@
#! /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")
#
# Copyright (C) Markus Franz Xaver Johannes Oberhumer
#
# mimic running "ctest", i.e. the "test" section of CMakeLists.txt; does not redirect stdout
#
# requires:
# $upx_exe (required, but with convenience fallback "./upx")
# optional settings:
# $upx_exe_runner (e.g. "qemu-x86_64 -cpu Nehalem" or "valgrind")
#
#***********************************************************************
# init & checks
#***********************************************************************
# upx_exe
[[ -z $upx_exe && -f ./upx && -x ./upx ]] && upx_exe=./upx # convenience fallback
if [[ -z $upx_exe ]]; then echo "UPX-ERROR: please set \$upx_exe"; exit 1; fi
if [[ ! -f $upx_exe ]]; then echo "UPX-ERROR: file '$upx_exe' does not exist"; exit 1; fi
upx_exe=$(readlink -fn "$upx_exe") # make absolute
[[ -f $upx_exe ]] || exit 1
upx_run=()
if [[ -n $upx_exe_runner ]]; then
# usage examples:
# export upx_exe_runner="qemu-x86_64 -cpu Nehalem"
# export upx_exe_runner="valgrind --leak-check=no --error-exitcode=1 --quiet"
# export upx_exe_runner="wine"
IFS=' ' read -r -a upx_run <<< "$upx_exe_runner" # split at spaces into array
elif [[ -n $CMAKE_CROSSCOMPILING_EMULATOR ]]; then
IFS=';' read -r -a upx_run <<< "$CMAKE_CROSSCOMPILING_EMULATOR" # split at semicolons into array
fi
upx_runner=( "${upx_run[@]}" )
upx_run+=( "$upx_exe" )
echo "upx_run='${upx_run[*]}'"
# upx_run sanity check
if ! "${upx_run[@]}" --version-short >/dev/null; then echo "UPX-ERROR: FATAL: upx --version-short FAILED"; exit 1; fi
if ! "${upx_run[@]}" -L >/dev/null 2>&1; then echo "UPX-ERROR: FATAL: upx -L FAILED"; exit 1; fi
if ! "${upx_run[@]}" --help >/dev/null; then echo "UPX-ERROR: FATAL: upx --help FAILED"; exit 1; fi
#***********************************************************************
# see CMakeLists.txt
#***********************************************************************
export UPX="--no-color --no-progress"
"${upx_run[@]}" --version
"${upx_run[@]}" --help
"${upx_run[@]}" --sysinfo -v
exe=".out"
upx_self_exe=$upx_exe
fo="--force-overwrite"
"${upx_run[@]}" -3 "${upx_self_exe}" ${fo} -o upx-packed${exe}
"${upx_run[@]}" -3 --nrv2b "${upx_self_exe}" ${fo} -o upx-packed-n2b${exe}
"${upx_run[@]}" -3 --nrv2d "${upx_self_exe}" ${fo} -o upx-packed-n2d${exe}
"${upx_run[@]}" -3 --nrv2e "${upx_self_exe}" ${fo} -o upx-packed-n2e${exe}
"${upx_run[@]}" -1 --lzma "${upx_self_exe}" ${fo} -o upx-packed-lzma${exe}
"${upx_run[@]}" -l upx-packed${exe} upx-packed-n2b${exe} upx-packed-n2d${exe} upx-packed-n2e${exe} upx-packed-lzma${exe}
"${upx_run[@]}" --fileinfo upx-packed${exe} upx-packed-n2b${exe} upx-packed-n2d${exe} upx-packed-n2e${exe} upx-packed-lzma${exe}
"${upx_run[@]}" -t upx-packed${exe} upx-packed-n2b${exe} upx-packed-n2d${exe} upx-packed-n2e${exe} upx-packed-lzma${exe}
"${upx_run[@]}" -d upx-packed${exe} ${fo} -o upx-unpacked${exe}
set -x
"${upx_runner[@]}" ./upx-unpacked${exe} --version-short
"${upx_runner[@]}" ./upx-packed${exe} --version-short
echo "All done."
+17 -11
View File
@@ -3,16 +3,25 @@
set -e; set -o pipefail
argv0=$0; argv0abs=$(readlink -fn "$argv0"); argv0dir=$(dirname "$argv0abs")
#
# Copyright (C) Markus Franz Xaver Johannes Oberhumer
#
# test file system behaviour with symlinks; requires:
# $upx_exe (required, but with convenience fallback "./upx")
# optional settings:
# $upx_exe_runner (e.g. "qemu-x86_64 -cpu Nehalem" or "valgrind")
#
# IMPORTANT NOTE: do NOT run as user root!!
# IMPORTANT NOTE: this script only works on Unix!!
umask 0022
# disable on macOS for now, see https://github.com/upx/upx/issues/612
if [[ "$(uname)" == Darwin ]]; then
echo "$0: SKIPPED"
exit 0
fi
# IMPORTANT NOTE: do NOT run as user root!!
# IMPORTANT NOTE: this script only works on Unix!!
umask 0022
id || true
echo "PWD='$PWD'"
if [[ $UID == 0 || $EUID == 0 ]]; then
@@ -20,11 +29,6 @@ if [[ $UID == 0 || $EUID == 0 ]]; then
exit 91
fi
# test file system behaviour with symlinks; requires:
# $upx_exe (required, but with convenience fallback "./upx")
# optional settings:
# $upx_exe_runner (e.g. "qemu-x86_64 -cpu Westmere" or "valgrind")
#***********************************************************************
# init & checks
#***********************************************************************
@@ -38,15 +42,17 @@ upx_exe=$(readlink -fn "$upx_exe") # make absolute
upx_run=()
if [[ -n $upx_exe_runner ]]; then
# usage examples:
# export upx_exe_runner="qemu-x86_64 -cpu Westmere"
# export upx_exe_runner="qemu-x86_64 -cpu Nehalem"
# export upx_exe_runner="valgrind --leak-check=no --error-exitcode=1 --quiet"
# export upx_exe_runner="wine"
IFS=' ' read -r -a upx_run <<< "$upx_exe_runner" # split at spaces into array
elif [[ -n $CMAKE_CROSSCOMPILING_EMULATOR ]]; then
IFS=';' read -r -a upx_run <<< "$CMAKE_CROSSCOMPILING_EMULATOR" # split at semicolons into array
fi
upx_run+=( "$upx_exe" )
echo "upx_run='${upx_run[*]}'"
# upx_run check
# upx_run sanity check
if ! "${upx_run[@]}" --version-short >/dev/null; then echo "UPX-ERROR: FATAL: upx --version-short FAILED"; exit 1; fi
if ! "${upx_run[@]}" -L >/dev/null 2>&1; then echo "UPX-ERROR: FATAL: upx -L FAILED"; exit 1; fi
if ! "${upx_run[@]}" --help >/dev/null; then echo "UPX-ERROR: FATAL: upx --help FAILED"; exit 1; fi
+147 -147
View File
@@ -46,164 +46,164 @@ b8c35fa2956da17ca505956e9f5017bb5f3a746322647e24ccb8ff28059cafa4 *powerpc-linux.
a0950546dc17fca9437219431d8ddb0249ce5b08e899e0c799a87ac982adee70 *powerpc64le-linux.elf/upx-3.95
"
expected_sha256sums__t110_compress_ucl_nrv2b_3_no_filter="\
fb458e6e7718ffd3f060fca911d069a024df8da7c75e34a0aea820a15ca03551 *amd64-linux.elf/upx-3.91
8988a2556bff2da1a5de9a5a4c909a53ae99a825fcdc7699d4c504bc697f60df *amd64-linux.elf/upx-3.95
b8bf6a29177bc7e9595d1c2a200f2c6431e12eee1ca2c8a64064a52c792b7b65 *amd64-win64.pe/upx-3.95.exe
02c17f49a54f50a9ed453227b600feb4ba5574514552d1cb344b1b012265afb2 *arm-linux.elf/upx-3.95
0006e29a124430722e691a05afab0a381d332c2ffe53c7f6a2cdf4cdea5349ce *arm-wince.pe/upx-3.91.exe
94a60c5859fc98db7671828decfb456e670a402a676d97cd4d66b5406c062f1f *arm64-linux.elf/upx-3.95
654a4e4cb325caddcf150ca90f2729c748bb0a3e99e703c6aad6a9dbc7d6d6e1 *armeb-linux.elf/upx-3.91
c68172e589871dc76cc7dff5464c87cd83a8cf9178d3b340e166912bcf6c9a0a *armeb-linux.elf/upx-3.95
ecc834183718c481c724754356977f4d63a58a07a2a308b9d2d669cf4d859b10 *i386-dos32.djgpp2.coff/upx-3.91.exe
879bdb9fc4c2ff76688250b429281a0a196c3723aabb40657f61a256d271b407 *i386-dos32.djgpp2.coff/upx-3.95.exe
582e7d54ba02aa4133a82ed423fce85376a3e2435468c2275e6500895f80b62d *i386-linux.elf/upx-3.91
00501788b58d4523faad8e0d0a9832d1f743e33739f8190be19094e2aa002c77 *i386-linux.elf/upx-3.95
9b9c922a6ddd48cf92af8aaa99452c101d69eb65f83e5fed6870bfe5450ca66c *i386-win32.pe/upx-3.91.exe
85a21b38b2c0ddf94bfd41b28c6a7af74accfa2246cb7f6c5881a0525cbbcdd0 *i386-win32.pe/upx-3.95.exe
993eb24cdacd30fd0ad915c88ea523f19748e4f4b3c4f7302dc233ceec67501e *m68k-atari.tos/upx-3.91.ttp
b48802d429cb7edab4d945a658a7f2aa65f67e48085ee9f40999e63cd164089b *mips-linux.elf/upx-3.95
aac26e3324c3a07d0cb41ee68dddc29891334e13ccd60bfb9138729a2f27742d *mipsel-linux.elf/upx-3.91
85803d12a0262bb424c95efff414e7882dc1104164c245ab90dff27ee5bd41db *mipsel-linux.elf/upx-3.95
e1ec8a1d392e0493c9fd60f3327d85aec108815100ab01ae65210cd26c917888 *powerpc-linux.elf/upx-3.91
845aad9ec6cba72b3a83c9958e9718938fdfd3d18ac76170d81f57c1c86987a0 *powerpc-linux.elf/upx-3.95
149efbda7f68c354d48771d838aca07cbdda503746bb83497ec8ab226dea4792 *powerpc64le-linux.elf/upx-3.95
d11ff80ef4e663679699d92bfd5d9ed8421dc2def0a91b104697cdb2ef0a1ffe *amd64-linux.elf/upx-3.91
14d9ecc398a3b1863b19371387cadc434b8bb9a7da9225c58d3df2ab624cbf9e *amd64-linux.elf/upx-3.95
3c161ae654b290be806a38be271a4e9498404e038d5ef163543b072077b29859 *amd64-win64.pe/upx-3.95.exe
dc1927ca0317cdefe2c07b0a76f0c2d45cf02079ee163c1ced26688277a22be3 *arm-linux.elf/upx-3.95
c5a65ebda6db5f619afad9a0c0e9ece6cb025c5fdfdec57affa26120255b5e73 *arm-wince.pe/upx-3.91.exe
4a76cf662f29ef93cb674d9dd8ec144e2388d3b05d33abd89cb0416f760330c5 *arm64-linux.elf/upx-3.95
bfca960388f228846091c7124d49e9bb1504c7696ee0b359278009fa17dfa9a7 *armeb-linux.elf/upx-3.91
35b09fdbd0f9977172ebaff8231d8e00f68a8475dcba2f75b6d05c36a39f4bb4 *armeb-linux.elf/upx-3.95
5434fa28036a14abf19e4c24fe1f8bdc4cff132ed9080cb34ef1dd3c596ebce8 *i386-dos32.djgpp2.coff/upx-3.91.exe
a194bd54d3058fd97871b96a14ede16b337241e912cd51456d2a8e5b3dfa6a39 *i386-dos32.djgpp2.coff/upx-3.95.exe
a57e4e0d72e8e5ace0e045192150c4b4e9889c0ac7630c885f8cecab8280ecda *i386-linux.elf/upx-3.91
b150460b6061cfca7ec76e868626bb33a92e2558fe1f1fc8baab8c528cd1dde4 *i386-linux.elf/upx-3.95
c9a92aa8099262b5174b50f37c4f2995ceff79a8c9ba4c755a4fd1dc98bb0f23 *i386-win32.pe/upx-3.91.exe
4f15940af27173ee18aa4fdf96b79ed4c5b563141b7362b398424366e3f51dca *i386-win32.pe/upx-3.95.exe
81539760603ca5abbc5f6f0e9f0df922129fad624643d6cfc10d820205519650 *m68k-atari.tos/upx-3.91.ttp
648378e19d72bc85950e6244d837475e21008dbf470a4cb3484fda10677b8afd *mips-linux.elf/upx-3.95
3eb9a06b68617499a0c7994b6b300e4fbe9ca3cf0c3601948ab129d9e181b345 *mipsel-linux.elf/upx-3.91
5a188e4aa04e98def8294e21a587a5e958fdd745cafa52fe584976c8b62a96e9 *mipsel-linux.elf/upx-3.95
557a255deb0250ea1d0db01b07b40603817b97b9e645328bc01aaf1c51742cae *powerpc-linux.elf/upx-3.91
0751e651da9809deea7926c4125527677d7034fbbbb4d5ae10dd692c37a47074 *powerpc-linux.elf/upx-3.95
08a46dffd447f0b1f723613bfb31d14154c1a31cc3e7982263ec4b242724410c *powerpc64le-linux.elf/upx-3.95
"
expected_sha256sums__t120_compress_ucl_nrv2d_3_no_filter="\
3f1d7ad512df7cc6f1fa4fe4a37f21d92709764fc385e307504e12208c090df4 *amd64-linux.elf/upx-3.91
a9291e95bc5c59193ae318c4bf13341ade909b8a6b42694c33cb3a9d1a084637 *amd64-linux.elf/upx-3.95
968c6c681b99c6ad21f3100527da0d2f0ccc510885d6a23b1db613207aedc739 *amd64-win64.pe/upx-3.95.exe
e06b57cd0013db94ba298bef4b30d904ad8eadafb7db6b4b4964de65f9fae0ad *arm-linux.elf/upx-3.95
bf6c7ba2a464f7dfcdff230462a23f9bcfafaebddb7746f0021367076ede58ac *arm-wince.pe/upx-3.91.exe
053c60a4a376ddf3e5ac9b91933e483b86f184f02369c1df204b32acda2d72f7 *arm64-linux.elf/upx-3.95
63bbc0b63ec9504650869e0b51a6941c9d8f6d472463e9f602e26e6a21c493fc *armeb-linux.elf/upx-3.91
f0b78117ac4a4671470cbff4b10907024d3811ee4197dcaa5cad0a84c98c8693 *armeb-linux.elf/upx-3.95
86888d40e8b17fd59a1ed78264e075e1b04b57ca020c43768b37f916beb11649 *i386-dos32.djgpp2.coff/upx-3.91.exe
57f916c1f0fb33746de4c65f232258fb48acb2aa266b59ffdeac0c654bc650ca *i386-dos32.djgpp2.coff/upx-3.95.exe
efc046cd508c647651fa6574b171fb44ebf2bf785d7bd9ec3fcc6b24b01db96b *i386-linux.elf/upx-3.91
279325e2cac136e24ec928eba687849c3359ab9ce76ad9502a64d3883029ee5c *i386-linux.elf/upx-3.95
8b7aba7c9e733bb72844d797cb9f6a7225b4ce79ee62e38a9e424b4c5cc63ade *i386-win32.pe/upx-3.91.exe
e966278db2d69913989bcfddf998e8f5b35fd8045c55b1e45065fc121c2452a0 *i386-win32.pe/upx-3.95.exe
475777e4b8284a57e61cec9fa61549b06b761f6fe77ffdf24e23997eefd87036 *m68k-atari.tos/upx-3.91.ttp
fd726e5be8f899cea4ce147beb23e7697953220f680b54d9ad12ecbbf6764fd9 *mips-linux.elf/upx-3.95
36e40ec2e07cf2a095f6d1c58d5d454a486d24fa1406890ccc3dcaf3223b1ed3 *mipsel-linux.elf/upx-3.91
97a0b1e3744f4168905c6423778f9fef887a467e9f382677f1da785f2f3fd5ea *mipsel-linux.elf/upx-3.95
1576fcc71df7ac816aa3b322b9c399df017f05e99b843b98ce02be15e5ef9148 *powerpc-linux.elf/upx-3.91
768a206b9dac7816bd9b1b5c86fbfdf1f5a6920fa2cbc35e50b19d58779b219e *powerpc-linux.elf/upx-3.95
287d53686422057d5c7ddad5c30ad2a3342424153b162f3769fe8fe717b48b91 *powerpc64le-linux.elf/upx-3.95
c7b05335f178c5c550e3d1d0d90fb6d921a4c0c66c16e215114483ade78d9b5f *amd64-linux.elf/upx-3.91
9cedd104b3bdd11c6933ecb21e0c47bda7362909905e7e63e950984825650950 *amd64-linux.elf/upx-3.95
d96be2f6f5fb0088736ff7a83a8854844ae41d61aff7862e91f09222755a56b0 *amd64-win64.pe/upx-3.95.exe
cf7c02b78bb85e9426b01aaf31a99c65944822d65eaac461de1b3db0c718625d *arm-linux.elf/upx-3.95
c05c9d17f6d74f760d0c9cdbf7c8d0f29b9059ec0048a160579d9d40ee6dde46 *arm-wince.pe/upx-3.91.exe
91c4f7d3485e53a5b9cfadc2dda610ad5507c02b2d75f70d9628e336eaf154c8 *arm64-linux.elf/upx-3.95
e4b2f54fcacc320e4a7e45b49a499b58ebf8c4ad35232e4982144c817dee19a5 *armeb-linux.elf/upx-3.91
2a0b9e1cf234ed0746b74f8e63e15bd52f74082705ee74647899da238c7cebb3 *armeb-linux.elf/upx-3.95
0d16d4489ba249636541134471ac6dca6c78874c9201dc12a7825747cd095767 *i386-dos32.djgpp2.coff/upx-3.91.exe
49671cdfa344b6d259ba339e764f0a196b190eb7a3979771b83704d26766ed63 *i386-dos32.djgpp2.coff/upx-3.95.exe
f9bde637fa12497a02d38e52fd7acba5b7220eaa3888434fc18dcbf224c14af9 *i386-linux.elf/upx-3.91
11ef9a08ea0aba3ed8d2043be6b2297e0b41f10fc5d73f9b9299fea00eb36426 *i386-linux.elf/upx-3.95
48984390e36e8b6dd133a372570d215a49e1bf2b5d8304ba060e1088149eb603 *i386-win32.pe/upx-3.91.exe
0f9d2325e0d8930b72629c37dbb333a3ac1e3d0be0f00245a376fceb287dfff6 *i386-win32.pe/upx-3.95.exe
e87f9d09fdd313c3cf552030e9596dea67cdd6178bdf6cefb0b33f1fc893339f *m68k-atari.tos/upx-3.91.ttp
d31a35f3fae92984df28dd26c90a525038be74a54714948b96914af885902fdb *mips-linux.elf/upx-3.95
26de609a6eda26fcf93273d6a95abfe211b7080abdbbdc6fd4f793ea59bb8aa6 *mipsel-linux.elf/upx-3.91
0bd931fa89c1cc5b6f0c2425f0d564808caf5223e3214fd718b6a6df2c42ca2b *mipsel-linux.elf/upx-3.95
98dc5a8995b36bca8873a41414245db7a608d644b7a75d43bdecf9d6c8660817 *powerpc-linux.elf/upx-3.91
42d0fce35d881b90986b6de32b6dd231c310023c1e3a33f16affe5b36503b663 *powerpc-linux.elf/upx-3.95
e5db79bd3323df67afc53eed8621cae8de8c57522230cb18463d0a38ef8e0e2b *powerpc64le-linux.elf/upx-3.95
"
expected_sha256sums__t130_compress_ucl_nrv2e_3_no_filter="\
3f04cc82752ee6c573e6ed22a44943caa1126503ad898def7452e25df14709ec *amd64-linux.elf/upx-3.91
7a3103783fb6c1e34b476e2cbeb7a5992c635dcd643d1ff37e5aeaf57f70f268 *amd64-linux.elf/upx-3.95
509be220b15f12853a26207f8c2fe361feed50203adb3af4e2bb03aab3467221 *amd64-win64.pe/upx-3.95.exe
e2e4dfb92a85a1e8d06d2d28778f63c3efec484b91c58236ce9df02cfe3e012e *arm-linux.elf/upx-3.95
18bf698a9ea039a0c3f1de9cab845dc1b51ad881e96daba4b7389adca830ecec *arm-wince.pe/upx-3.91.exe
b2155656ba70f468cc21fe0125dd2a2a9b0bf4b5d802eb399565c15b2997f1f8 *arm64-linux.elf/upx-3.95
4dab150e1309d643583ded5262dea6f5ffa82ef7e3533515d10ef3c95dc11ea5 *armeb-linux.elf/upx-3.91
25b072a5a86ead3bd9ddc539c3f29d5fd2c9cceb010657ace5eec827f73cec93 *armeb-linux.elf/upx-3.95
d7d0d5c45297d81cf4de9256c43ebbe236d1a839daeb16c900ebb5c1503659f0 *i386-dos32.djgpp2.coff/upx-3.91.exe
262fa423a8cdd765156b9385f4f1fe2fc8bba4b7e9904281f6f99a7a867ecdd1 *i386-dos32.djgpp2.coff/upx-3.95.exe
a74811a5f2b2bf26b1d64ff8e5ac5d9111bbc3022bea77b5389a2253a059c6e9 *i386-linux.elf/upx-3.91
b4c9632a18ac07b7351ea3a24e112ee32cba67eec194dc822f5211d793665d63 *i386-linux.elf/upx-3.95
b35b94f6f14e0795a3e30d04aa6cb9cb1fca6dc15a45cf99f9ce66646b438d74 *i386-win32.pe/upx-3.91.exe
11505bfed2b91ff3df360c3fcf5e701bce6c536f79f4743eff367bf4e16a686b *i386-win32.pe/upx-3.95.exe
ac45ed125aa0e5f002556e9410d32e4007cb905cf71354df20e38785a90e0ea0 *m68k-atari.tos/upx-3.91.ttp
773e144b638f23cfa2640e5c6760d6f847d477efa0c64c158e24be7efbdb765d *mips-linux.elf/upx-3.95
bd53867507b9449dc8c12007d8ed16ef332b8c4d96b1749cbd8b731a61402215 *mipsel-linux.elf/upx-3.91
a72cffc63f3415f5c913a504c2d2af30cd533f849cd7866b65a8b4c91301c475 *mipsel-linux.elf/upx-3.95
1c93b25a4846fce0d2242d753f0a6e662f018a8d63234236e88c7cf32e104d22 *powerpc-linux.elf/upx-3.91
263f4d184edab2716accbcdda2749a348a0b3d055d3096fa8c85d975c66a2342 *powerpc-linux.elf/upx-3.95
9b04dbab6863895dd3df5b0fe50086eff57e401d853a55fd9cdd06c0794e7ce7 *powerpc64le-linux.elf/upx-3.95
bb7df16340f56a859b10b5c591e69435b72443c4b9387b4c0afc4f3362217c5c *amd64-linux.elf/upx-3.91
bf45e190f7dfce9eec13163ccc7da85c51420736b15ef679290af7f4662e5850 *amd64-linux.elf/upx-3.95
cedb3c199f6b37c2993c2f6beaff327bebfcef0d1dd904b655f79c7261e374f6 *amd64-win64.pe/upx-3.95.exe
6887322866a5b77058c1b7ecc229fb43c80ea4d88e965dd34ad8a562604f5f4c *arm-linux.elf/upx-3.95
8b12ec425233a4f2e00769f2106a804d64100ac3d32f38db2383a0f51ab0c8fb *arm-wince.pe/upx-3.91.exe
13410a318f80b193f75b26388c45f603e62ab7e30392b248f89409f73f59dcc3 *arm64-linux.elf/upx-3.95
bf60d3e917be3abe66f15d8e61c93e2451f241e5b7e55de8c68d0a5eea4ab474 *armeb-linux.elf/upx-3.91
8b0ae4260e24398e479a6e220625f50158ab3142c565cc4929350a298437e6a8 *armeb-linux.elf/upx-3.95
8b5739273e1565e031c4335ceb76e5efc00830074093f092ab3ac2942b1f756e *i386-dos32.djgpp2.coff/upx-3.91.exe
27875bd06a68b56d4ecf4b1aac7cd088f6fd3c358970b0c0fe881026b83a4603 *i386-dos32.djgpp2.coff/upx-3.95.exe
018137b520e22511d67d6768ec57a9bc053bc7927a87fd51d60521042d2a26f2 *i386-linux.elf/upx-3.91
b9f6b51798e239c881174a9a93391ea27020fb6632f9cbf6040d2c7c43798f74 *i386-linux.elf/upx-3.95
38229e4a2d830568ed2b25f3d23cb20b7b78e912227da45fe1bae57e131470df *i386-win32.pe/upx-3.91.exe
f55a0c8f3197977bfe9bca325fb86e1a3f5effe82f4efaa062554b8dc7093e10 *i386-win32.pe/upx-3.95.exe
e08fb4722915ea11259084c1483e2f40f0a047be600e7a9f2607c44582849ef0 *m68k-atari.tos/upx-3.91.ttp
e452be5c3f9310879626387cbe60a7bd4465f0efc9b31e711733b964ab9286b8 *mips-linux.elf/upx-3.95
bca2e642253157d4e004a53cb393cecf34df82f2072bedf4c46bf32f1302da74 *mipsel-linux.elf/upx-3.91
849469774baf909c7470f5306f75e91fbed4664475d4f7d60910ce07101a0ce8 *mipsel-linux.elf/upx-3.95
59a21be192ac75bdf5ed882a53c3e2560380dd46c1af36d256c6329bbed7c2b7 *powerpc-linux.elf/upx-3.91
fa8f8f063ae7eedb936d0774485451b785387b435b9bcbe2fc0c9fbe7ed4eced *powerpc-linux.elf/upx-3.95
64ade3a0badb4357bf7714e5192be73ef03678260ac31ac729fc68d639495c56 *powerpc64le-linux.elf/upx-3.95
"
expected_sha256sums__t140_compress_lzma_2_no_filter="\
68ea7e46654a94a1c125e039b9167ee8724edf0762f5522e81cfbb94005af8fd *amd64-linux.elf/upx-3.91
7adf842624efaa46a03b1861fee62dbc01c1e22387b29fa16f530d3c6aa4d295 *amd64-linux.elf/upx-3.95
77aa80d55f83afdfb3796dfbe972b79a2195b37f84e9bb87ff7d11e497927021 *amd64-win64.pe/upx-3.95.exe
16916c440d76231df63ae5260bcf28c65476d06319d51e084f1730ab83d279bc *arm-linux.elf/upx-3.95
fae27479b40010e1d0794fe28fcc619c64a6ff21888221089fee429135658580 *arm-wince.pe/upx-3.91.exe
c7630be0a014dbef80053609329faf5bb55ca5f3abf80df26674ca311d3943ae *arm64-linux.elf/upx-3.95
4efb05939371b23037e8a0b34a35ae181d2d101afac9d3e06457d191e59a5e76 *armeb-linux.elf/upx-3.91
231d9a6e570615c2688befae04ad7ca88abe9655097e352e84cf0419190355db *armeb-linux.elf/upx-3.95
9df0142609a0a61595c500f1b9b40efab6d8c179f83068a5f4507df9a9c66d18 *i386-dos32.djgpp2.coff/upx-3.91.exe
6bdf60b30d916a9b706c7c2563907758994350b372351d7e9b1fa6427d75a01a *i386-dos32.djgpp2.coff/upx-3.95.exe
a96cc162e2a2ce59c9199534ce3c067096b655ea426b8c1ce9c4d27f282481ef *i386-linux.elf/upx-3.91
25540046329ed7bb0b071a6686d301f5cd8d3722407088514a88044a7caddc3b *i386-linux.elf/upx-3.95
93a6093dac3cb679e85900bfd60d7cf26319958245d4dc92425856c742aa95af *i386-win32.pe/upx-3.91.exe
e1cb547f4c11a58b245de0bb71e9fbedffa4d9c6f97a57ce679abbae71e0c0b9 *i386-win32.pe/upx-3.95.exe
31ba49ef577fb0031130e00198b69afec95ff9cc90806ab04d607be0627d0d1a *m68k-atari.tos/upx-3.91.ttp
69d27ee81743163b3bd9a7a9721abec70606ee38716c72410dc82bf826e508ee *mips-linux.elf/upx-3.95
6ee9682486076ea670bdfa95c7b6dd98d0274e970f7dcc7bdabda8d07558abf5 *mipsel-linux.elf/upx-3.91
b817e57dca45c26d93d2f293d77bf0a9ffa2a4232141d9e4f1a20b369c0b3bbb *mipsel-linux.elf/upx-3.95
99337dd36736e46e2ae90fcb6990746577a135d4b465e69f7f421a218e245657 *powerpc-linux.elf/upx-3.91
c1b63b66351e224cc53e33086daafefdeaf3c91a37b68426b08d2c709727f214 *powerpc-linux.elf/upx-3.95
9e28a8e6eb94549defc2a842ca24bc7a7496f581237378a118a0ee1792598ee1 *powerpc64le-linux.elf/upx-3.95
ba01763526328e15b34441891b4bfbfded4488cfc0221bd923fc33c17cd94f26 *amd64-linux.elf/upx-3.91
401dba7e1d660d732006a7b3b39d0b8806ac90530090141c583ad7037482b637 *amd64-linux.elf/upx-3.95
0afff19522cd3480f13170f6f56ad1df918ff6427fdd1f76e0014adbc492112c *amd64-win64.pe/upx-3.95.exe
a7d7457b0dc5105297f070db66bac8e581c3901efa5b4c89c991cc652edd1c58 *arm-linux.elf/upx-3.95
a2178a2be4b595adb32e11c0dcdcf6af701a3f1fc41cc4019dee00a96c997860 *arm-wince.pe/upx-3.91.exe
2e45b63d7a9897c8316436cd73ea30c788b9cc873374f572ab4119ccd4585f62 *arm64-linux.elf/upx-3.95
c77b62df69a4e0e712e7ceab519bb5e8760b6dde3b609be5422258fe8c5464a3 *armeb-linux.elf/upx-3.91
abe0d09a0e3aa9b483ba652face53718480c3a928d0cb0be183e41eb2c64f1aa *armeb-linux.elf/upx-3.95
46c1aceafa1e3a2fcf224bf6e50d1dfac2dc1519671387cb066e3454b3207635 *i386-dos32.djgpp2.coff/upx-3.91.exe
170c70a9fb257ca845bbbef5f8da0062b4197a8b3f5cf9a29f472751ab38879a *i386-dos32.djgpp2.coff/upx-3.95.exe
3a5d6531b1f1ce021282592dd645fe66affd86b36ccb72c3a4f43976fb150606 *i386-linux.elf/upx-3.91
c073fe95891b83015e7d778a44562d057d5b3bc787e37f794f0e2b9867d83d76 *i386-linux.elf/upx-3.95
3e1fcbdb6267e99c50c20c3d0e6ca7795b3c35282bd127e3f09c13ae4a9ef6d0 *i386-win32.pe/upx-3.91.exe
7618f249a922b7e504a389eb1c5c640b3bc5678ca1b4575900a778453c2666fc *i386-win32.pe/upx-3.95.exe
b1a481020f6afc2601dac02bba1582f47719c964fbb3e63090cd2ae19caf2c28 *m68k-atari.tos/upx-3.91.ttp
64574681a2cbef2e5ecd4c290e8c4ed482a1a34438e3b7151eda097c593195df *mips-linux.elf/upx-3.95
0a9f789949135858acebd4da834a2d904bbc722adc599d59ae41382475988d6a *mipsel-linux.elf/upx-3.91
69faa554496af25239a5fea6f7941c0424d8f40d8078a7e40012ba284bf7b678 *mipsel-linux.elf/upx-3.95
224cc6a5336f768457c92a317a4f7e47188779ff459b821f49d2ef2188b5674b *powerpc-linux.elf/upx-3.91
8da438605f0be0e9a00c4f169d66b4639468f8e3922ed63320f33b91d0a6b099 *powerpc-linux.elf/upx-3.95
efa063be5c8a488b16f0d03598b96e144a0c0d317c462a58a3e32585b68403a7 *powerpc64le-linux.elf/upx-3.95
"
expected_sha256sums__t150_compress_ucl_2_all_filters="\
7b164c03af75a33c19dfa45767e9f44a754fd2fecd56239609fff37244030593 *amd64-linux.elf/upx-3.91
f591bf4b34d2bdab707506ca9e7b2822b0d9bfa1dfd542b96512fcdfe18c77d3 *amd64-linux.elf/upx-3.95
a80f6756fb9acb5ac4be3f0609c37042922c769a285eca34734eb62547ce4479 *amd64-win64.pe/upx-3.95.exe
2c249c4fd65bc53376984bfbe352d7732f49d7c601dd01773a6034c127a03416 *arm-linux.elf/upx-3.95
f640a43f3e12d092a4a8e9f34d89cc02ca85d382b80e1efdeec4ecffb09aa680 *arm-wince.pe/upx-3.91.exe
8d5df9081689113edd3cdd357535aa35e45df4339ad37479d496cbd6e873f38f *arm64-linux.elf/upx-3.95
0756666adb390b4330cf3f50eee92f73cc1d0afdbcecedd7cdf94fad29bf2c71 *armeb-linux.elf/upx-3.91
7b8156540b234aec8f6bc4db8dcd9841afd0be1385d55b07bb6f918594dcde9d *armeb-linux.elf/upx-3.95
23cc97a192c76ce849d17f5a902d178ed10918007b9667913395095db285b546 *i386-dos32.djgpp2.coff/upx-3.91.exe
66ec810d94684cfa71980a1812ec158b4485b897aac52fa4617e097d69e4d10f *i386-dos32.djgpp2.coff/upx-3.95.exe
9b004924ddc9e028e556c882366e10ed11cc8f69792f658e07b2d19d370bb102 *i386-linux.elf/upx-3.91
74453c23dba3e6f3818faf85f2dd34669839b34679da70201e071566a32df26c *i386-linux.elf/upx-3.95
e91a7748c9ebafe7987127431690ae1464d8f505267a8b3837edf5f17589534b *i386-win32.pe/upx-3.91.exe
ba4c9b76016431ff30f1ead43b77a6b4ecce9757a438d05647ae3efaa33288fa *i386-win32.pe/upx-3.95.exe
e6b493dff57c763d4feb49490353dd843b15b1a1c78c000af8bf48472e11f5ae *m68k-atari.tos/upx-3.91.ttp
cdf64a07ffa09aab14f5f467da334c41b5b496b77f65034bfca94b8f917b71f6 *mips-linux.elf/upx-3.95
cf1e80d5575766df41fcc27e08e30e3aa2b3a318a0d9014e6a7241bed8fb1d75 *mipsel-linux.elf/upx-3.91
5afd8fbe8bdb25a76dd4105dbb3e4695e4332ceec9837e0609a9850cebdc524a *mipsel-linux.elf/upx-3.95
c378615d5068a5c44cb751290c732a127f88d3534d47318be41f1827a43c41b5 *powerpc-linux.elf/upx-3.91
b4b3ebd20ee61a0ed47d481e7333cef42d1a23f832c5463aff6df640d5265e65 *powerpc-linux.elf/upx-3.95
0283de59bd2bf8f9dc11e1b5ad69d666bfc7a2b2168585ae3874f758eb271336 *powerpc64le-linux.elf/upx-3.95
19d81859acc5322e7610e44aee84eed65974650d7a7afb5fb9731d11dad70144 *amd64-linux.elf/upx-3.91
9663a26ee5367181ad8d8cc0d8df0573d4cfcff0aa5c8f014e56963b80007146 *amd64-linux.elf/upx-3.95
1e2dd8689c3e7d4bd484eb53490ab0a9764c1ba4022145e309873537d63765f5 *amd64-win64.pe/upx-3.95.exe
4bf9b45b89d5668e41caf176f34b32336cbd4f858b71ed03385f69b722192796 *arm-linux.elf/upx-3.95
b94e8887f7901239b1fb4aa926c96d4dd5d935a653e619c3ab4c4124dad7380c *arm-wince.pe/upx-3.91.exe
6138f52201f283e64816f77380da10dc422d1689031fb6c72054647e48f55188 *arm64-linux.elf/upx-3.95
72c31db3472141f44f6034c9eaec3352c4f4391560a3d81fc63cb2fe45778d32 *armeb-linux.elf/upx-3.91
8cfb3a15c6d795e0be95c92791081573d5987633b52c51e044ab3baa7436c8d5 *armeb-linux.elf/upx-3.95
ef96852c3865b3e6682e345954568acdf7ef2e3f59f3aaec5477142097b029b7 *i386-dos32.djgpp2.coff/upx-3.91.exe
c2c11ca8450b0cf61eb2e4d5ee54692ca0f308be4b61c544e03bfc108a79cb0d *i386-dos32.djgpp2.coff/upx-3.95.exe
a595b6d76204351340a2f6eff0cfb7b3f64c40866fc11e6bb7ff9d534f097bee *i386-linux.elf/upx-3.91
8b1929b7753b56274c136648359a01a862ae994f291b2f511fdb1d2268bccbbc *i386-linux.elf/upx-3.95
10f32132ca0a218c069185834ace32447d4cf33c4ab7766141c4c08d967606a1 *i386-win32.pe/upx-3.91.exe
c1146e9c9b1c4e755822fbd5486c53e905b9d16028b97c55d0430bbcec467793 *i386-win32.pe/upx-3.95.exe
e217c1613fe848e6126f6a05b32aceaeda777e4d4a3755405118e3586b1bd93d *m68k-atari.tos/upx-3.91.ttp
e2ef44ac8519d9aadf99469c8c387503d8737827f840ef5e5b5695529d4de8f6 *mips-linux.elf/upx-3.95
23ebde2dc0d11ab32c056683edca55b8ece7f429cea28520653ed367f16a8b26 *mipsel-linux.elf/upx-3.91
354c349f1504b3403ca922fb275f25835a173268a58a2ca5b17b0632220bb6c8 *mipsel-linux.elf/upx-3.95
6f3197a3e460b23dde39522a12d734d3dddb1515645931e4fad622d8ffbe37b8 *powerpc-linux.elf/upx-3.91
66bc0f51d3a2905cdf39d599ec609565fbee3afc962cdb74caa431b71a0f5ee6 *powerpc-linux.elf/upx-3.95
f47a2f1d67f37af7087c94fc7a3fd3cd81ec3ed8149df79774250a4ace793768 *powerpc64le-linux.elf/upx-3.95
"
expected_sha256sums__t160_compress_all_methods_1_no_filter="\
d2ebb0a3e77b766446b0076008c63e910b3286b72ba7c4cce03782f36c0c7396 *amd64-linux.elf/upx-3.91
3de94645a9b15b723b21da216e26577f8e28d4d296ceb5b68eacf5ea4040525c *amd64-linux.elf/upx-3.95
4106f280f30fff3c39fe72b10cf450cc514d3aa9e6769255f54606c4c09bf646 *amd64-win64.pe/upx-3.95.exe
db5838a8816241e57f3271ee217cbd99b80d2c5ec15f9c71e0b1da1cced372a3 *arm-linux.elf/upx-3.95
97a78c7aef6ab3eeb2807893c4edfb529565e36b27f9982456276dde46e34d90 *arm-wince.pe/upx-3.91.exe
50c4a83017a143e386f8e8c4f1dc73827b059ffc4a94586ab949edd19f27d4b3 *arm64-linux.elf/upx-3.95
dbf432c12845fe8cebb131995cd57cc637dee8e21e8b083ed05052a2839373d8 *armeb-linux.elf/upx-3.91
751ecfef4f02003f127d7dffe9fdf12af1a449bf4546e8a6dbc86d8885441746 *armeb-linux.elf/upx-3.95
da261516dc443ac3a9dfbe9e3353313042b72e8c1fa3f7c17bf32e0ff4221a12 *i386-dos32.djgpp2.coff/upx-3.91.exe
a4eaa51e14b7bdecff560e4ed209888cda0fde955693a7005aca67361181c561 *i386-dos32.djgpp2.coff/upx-3.95.exe
48c1959184334c5eeaddad5b2141103a0a5863a3c22f068d6d977e2fb0ed1711 *i386-linux.elf/upx-3.91
eeb2cf342f9dbb87440bd4aec0b81ea3218b300124f6348758ea4bf100318ec9 *i386-linux.elf/upx-3.95
28c742067136d6023720208131a5052553cae9cd5fa1b86ffc9d7b1338ab6466 *i386-win32.pe/upx-3.91.exe
11646ac069761715b45a78c0ad769ca69f3b2e22ff70a7068bcda7118bfc82fd *i386-win32.pe/upx-3.95.exe
0e442a98a0e90716945ffe9addf9cb7079686e3cc0f968c5e557b52a36fe6ac8 *m68k-atari.tos/upx-3.91.ttp
71abe63b1bfe35d8ff9bbaab18dcf41881a94f7bcd12bd0c010205ecbee94f33 *mips-linux.elf/upx-3.95
acc0e3322b4f22aa8e5a79962cf92b1a8ad203755dfe5bab6d2a668d274e4aab *mipsel-linux.elf/upx-3.91
e875572d1be9999b9292122d2094ae54142b268d7fda4ab12544507aaf673fe3 *mipsel-linux.elf/upx-3.95
62414bff8849020ea0e93c10595fbe10e30c5effa87d25fa8b67c77bc810ccb7 *powerpc-linux.elf/upx-3.91
5c59c4dc481c71a9b02dd39f8ac6e3aec24f6ca2864ad3ff1c7cc54ab567af9e *powerpc-linux.elf/upx-3.95
71863da15c4bd482c7ad6123895b555db86610b3cc35e7ab99897d7c9dbfcc9a *powerpc64le-linux.elf/upx-3.95
a4e92543a5cf5e692823d0bc2a75a995570358ba899e273d67c1df0709d5f41d *amd64-linux.elf/upx-3.91
77e7f8b07304c8acbf55a4755854c51f5d1582558f15ec74585fc471379c81f3 *amd64-linux.elf/upx-3.95
c8c19d2e24cd9c5b416888cff1828ef7a5b09236b0c423adbc3d2215977d4756 *amd64-win64.pe/upx-3.95.exe
0aa2cd95ed88fd3e220d14e429068269556ad7dc22ef740d07faf5288fc10189 *arm-linux.elf/upx-3.95
876f3e8c159f744db0ec8bc9d9afe51be7dac4c18da744c82550d9cc8abfae64 *arm-wince.pe/upx-3.91.exe
0853acc0af2991a5c87d54215cabc46db588d2626b468559b052418fa90b40f9 *arm64-linux.elf/upx-3.95
af0cef4cd954d3eed8218c92434ab351c4d071293223361b12f10381117798c8 *armeb-linux.elf/upx-3.91
6fb686656901a4db12cdf6ffd050be225d74e1123aecea3e45d7604f0eb1104d *armeb-linux.elf/upx-3.95
f2e94193758f32cab6b11e7d72d6c35339170e7db7f2fffb828e528a2a8a9611 *i386-dos32.djgpp2.coff/upx-3.91.exe
4ff2bbd08158a94f2d3e7aff2b681b9314704aa9724319c4ea3f2ad554b97edc *i386-dos32.djgpp2.coff/upx-3.95.exe
49e38b822d774cfe637a61a36d18ce0d6b402a80cfbfe2ca16f2d63d0ea05cdf *i386-linux.elf/upx-3.91
2ffc13b1515ad20846cca5b2d1c7d5ae0d2b3410fe14ea97fbeb9da46332b7c9 *i386-linux.elf/upx-3.95
76b29c91e9429d4587192584ee8b15a2fc40f00ae6a3c83c220c245a780e31a2 *i386-win32.pe/upx-3.91.exe
5c5b5148f679341301776689d41205d746ea96c530721a64edf8c10e8876ae35 *i386-win32.pe/upx-3.95.exe
cacdad81fb8a39c08f656f07a370c2c21e0c2aa7b3a81bcac22bb114078c478a *m68k-atari.tos/upx-3.91.ttp
d9cbddf0e48f870dca28ccb394f2077d49fb7da3c7244a4c132627bc7b2c1a89 *mips-linux.elf/upx-3.95
27fad7afdbf8fdce8b9729ed9bac4e2a1fe501ebd9dda00630c7717c504eccbb *mipsel-linux.elf/upx-3.91
b11fa6e0a609bbf3222f342951cbb77b214602168bd37ddadae23afa479c2ade *mipsel-linux.elf/upx-3.95
b7e4c9b02c30dc7436ef6cc133342b93c75ba71779b564e21dc2cb88749bc113 *powerpc-linux.elf/upx-3.91
920090c1e5147f10e1be0de3ea99a8a3140a6271c260cb90eeff6549e2855828 *powerpc-linux.elf/upx-3.95
29c6854869fd0a4e95cb3d434f8b93e7728c126ce2a8f9d7163506f1271b2af0 *powerpc64le-linux.elf/upx-3.95
"
expected_sha256sums__t170_compress_all_methods_no_lzma_5_no_filter="\
6880572cb1b05e8b43af2cc0a56937ad4dc3fb32260092a1649164155b5e39de *amd64-linux.elf/upx-3.91
d6133ca17edfc370015f37182f5a6531830cefc688c127dbe0d45a7212838f0f *amd64-linux.elf/upx-3.95
027c3eb340c77f31bbc39bc05fb5ba56c2fc33529c445c288b6af26031172442 *amd64-win64.pe/upx-3.95.exe
7b9ef1fd569242b03ca8b4c6dabf880271cb3755cd00c08d15a77dc00bc05f83 *arm-linux.elf/upx-3.95
bbeb21e516bf50e7d35cffb364337c6f157a31ddcacc3d43a2b2dfda8b8da3be *arm-wince.pe/upx-3.91.exe
d8314cfd96fc2c9d83db69ea9746fdf5653fd3a6476f271d6c244976ab7ac9ff *arm64-linux.elf/upx-3.95
40c5647b8dbbc287e5686d1dc81e5adf8c68d35438039edac1f201b7f939977c *armeb-linux.elf/upx-3.91
047f325e6b0d3c1b0179b9574441957a64601ea67c55d53cf29dc830e34d7578 *armeb-linux.elf/upx-3.95
a1b89d28adae9b26d34d701acac3a32106fce77a380322ee0cbe4a852d692ce6 *i386-dos32.djgpp2.coff/upx-3.91.exe
fd05d0899b87dd4019c10a01d04228aca83203b801c0f5ecd8c25c225a9ab9af *i386-dos32.djgpp2.coff/upx-3.95.exe
58fa03662e605039f73ade85c00f8bc630623e6b10b304379b1c374f4a4330a1 *i386-linux.elf/upx-3.91
87d151c5e091586add28d63e08369692836db3cd1988edbf216a21370e01f0b5 *i386-linux.elf/upx-3.95
4e8bf3046e35facf27e060277c7e577ea367d05f531ccee950c34c6e3a151d66 *i386-win32.pe/upx-3.91.exe
8f1209d612991ac464f534206b6ce5999c6e689213fc468b289dd990309c312b *i386-win32.pe/upx-3.95.exe
6e7513be318b8e4ce2bb48a23bd47f0961ef745fd7f1e25d4439435334e62264 *m68k-atari.tos/upx-3.91.ttp
ea1abe9b33a31c5e27896eabf62a7a22640e91f03af336fc22a64366af196d8f *mips-linux.elf/upx-3.95
f8ee354abac9eeb83c2d3a9101b35181bebbc2d9e9253960b7ccf96b6670d711 *mipsel-linux.elf/upx-3.91
cfb11a2da4f598ad20f29a248ac8e28d45dea0a47984d47d075e24e63237ca07 *mipsel-linux.elf/upx-3.95
541188bdf23b4bf9513a6775ba186cf3d1cdf6a61a0c15177eb4111a51978397 *powerpc-linux.elf/upx-3.91
cc98a7992d9fee0af3a32c0408213198f8d2d407a44ae25d228057dfce0ef3dc *powerpc-linux.elf/upx-3.95
20409135c1b03e9f2dcf50266db27a6b7a0259cc073d2bc47b4264c64342bf8c *powerpc64le-linux.elf/upx-3.95
f11151a8eea22872544062dcab0190e26d63073c0e0b9e1356f31a336e7a56e4 *amd64-linux.elf/upx-3.91
047ad308483a6f2789de768f8de86a35b9a9c92d9ec4d04efeae55c7ea5c643c *amd64-linux.elf/upx-3.95
bd559454e3c5ad2e4afd145c2e366aed0e6bb6e8e059e7bd0bc72962cfd1f2ad *amd64-win64.pe/upx-3.95.exe
e1966d2e2056dc0af5bd18b880039cca83c70b5c370f3869e013384bdf8c853a *arm-linux.elf/upx-3.95
ef0a4b9341aacd4b9962f9e77c019c5e641616f4f5d713af93263cbf67e32a0f *arm-wince.pe/upx-3.91.exe
45700ca243888ec22cf84018d7b4ec47f2ee6e36edfc4a16056ea81e99eee9d0 *arm64-linux.elf/upx-3.95
fd5697370dca17662f271530af4a164790c63b164cc3160d7d8be317e624af8d *armeb-linux.elf/upx-3.91
c09ecb409692d91fc4710896f6fe934066d4bdff778c675c99e27b5c624d1d63 *armeb-linux.elf/upx-3.95
4766485709641cbbe06b09e64d0c77b66afa45eadf3ee11c0e92e5a0a97e5bc1 *i386-dos32.djgpp2.coff/upx-3.91.exe
f4de30c9fb6b695264db098790d189b01f1df950c75e34f8f445d8fa49b69755 *i386-dos32.djgpp2.coff/upx-3.95.exe
a25c10adb376e932191aeb2e11d1020e71b56a9c82ea0d7f8af71b4e05cffbf1 *i386-linux.elf/upx-3.91
4dca2d0bdc78d5d8fc582f6638c4595ee45c03ee2523e1da0cd914576ba7a5dd *i386-linux.elf/upx-3.95
f4500b64adb382552152c737880a3cd55c172d023437c996ccae5b07414dcb0e *i386-win32.pe/upx-3.91.exe
8922ab742e9641ca533af2693c85fd5121bbac677b12a2c67a33a49b6e4eb939 *i386-win32.pe/upx-3.95.exe
f95d3a1811be7665fc6cb9479eeb4e94b64d4b1f16187b06fa6c9f0c54782564 *m68k-atari.tos/upx-3.91.ttp
e637eb6b7c4c9c06488e79c26f8910cc8c40196a962339c849457e6b6a59b964 *mips-linux.elf/upx-3.95
8c1c4fe3430f1524e70c68f2c10ab67f356c94ea79cf7726a24931d29388458c *mipsel-linux.elf/upx-3.91
572283b261f90bd2b13f5a65c94f065f7a7e40ed32c2d048f314ec8a9656e365 *mipsel-linux.elf/upx-3.95
0a7c32c5b3cda6e7c90e21227f1b5af14d169d56d074644c431dbf367b308cdb *powerpc-linux.elf/upx-3.91
fe6e2d1c1b8e9119713863997f52735a4814d35c3bfba0a6ef1cd9e218510383 *powerpc-linux.elf/upx-3.95
cbeb988b78e3edd3f0d9526998b700c0b1c3c4bb29ef9e2591c4083a40126c50 *powerpc64le-linux.elf/upx-3.95
"
########## end .sha256sums.recreate
+10 -4
View File
@@ -3,17 +3,21 @@
set -e; set -o pipefail
argv0=$0; argv0abs=$(readlink -fn "$argv0"); argv0dir=$(dirname "$argv0abs")
#
# Copyright (C) Markus Franz Xaver Johannes Oberhumer
#
# very first version of the upx-testsuite; requires:
# $upx_exe (required, but with convenience fallback "./upx")
# $upx_testsuite_SRCDIR (required, but with convenience fallback)
# $upx_testsuite_BUILDDIR (optional)
#
# optional settings:
# $upx_exe_runner (e.g. "qemu-x86_64 -cpu Westmere" or "valgrind")
# $upx_exe_runner (e.g. "qemu-x86_64 -cpu Nehalem" or "valgrind")
# $UPX_TESTSUITE_VERBOSE
# $UPX_TESTSUITE_LEVEL
#
# see https://github.com/upx/upx-testsuite.git
#
#***********************************************************************
# init & checks
@@ -28,15 +32,17 @@ upx_exe=$(readlink -fn "$upx_exe") # make absolute
upx_run=()
if [[ -n $upx_exe_runner ]]; then
# usage examples:
# export upx_exe_runner="qemu-x86_64 -cpu Westmere"
# export upx_exe_runner="qemu-x86_64 -cpu Nehalem"
# export upx_exe_runner="valgrind --leak-check=no --error-exitcode=1 --quiet"
# export upx_exe_runner="wine"
IFS=' ' read -r -a upx_run <<< "$upx_exe_runner" # split at spaces into array
elif [[ -n $CMAKE_CROSSCOMPILING_EMULATOR ]]; then
IFS=';' read -r -a upx_run <<< "$CMAKE_CROSSCOMPILING_EMULATOR" # split at semicolons into array
fi
upx_run+=( "$upx_exe" )
echo "upx_run='${upx_run[*]}'"
# upx_run check, part1
# upx_run sanity check, part1
if ! "${upx_run[@]}" --version-short >/dev/null; then echo "UPX-ERROR: FATAL: upx --version-short FAILED"; exit 1; fi
if ! "${upx_run[@]}" -L >/dev/null 2>&1; then echo "UPX-ERROR: FATAL: upx -L FAILED"; exit 1; fi
if ! "${upx_run[@]}" --help >/dev/null; then echo "UPX-ERROR: FATAL: upx --help FAILED"; exit 1; fi
@@ -72,7 +78,7 @@ upx_testsuite_BUILDDIR=$(readlink -fn "$upx_testsuite_BUILDDIR") # make absolute
cd / && cd "$upx_testsuite_BUILDDIR" || exit 1
: > ./.mfxnobackup
# upx_run check, part2
# upx_run sanity check, part2
if ! "${upx_run[@]}" --version-short >/dev/null; then
echo "UPX-ERROR: FATAL: upx --version-short FAILED"
echo "please make sure that \$upx_exe contains ABSOLUTE file paths and can be run from any directory"
+28 -22
View File
@@ -3,9 +3,8 @@
# Copyright (C) Markus Franz Xaver Johannes Oberhumer
#
# NOTE: this Makefile is deprecated - please directly use the CMake build
# instead. And see the top-level Makefile for some pre-defined CMake
# build configurations.
# NOTE: this Makefile is deprecated - please directly use
# the top-level CMake build instead.
ifndef srcdir
srcdir := $(patsubst %/,%,$(dir $(lastword $(MAKEFILE_LIST))))
@@ -19,10 +18,10 @@ endif
#
# NOTE that top-level Makefile .DEFAULT_GOAL is build/release
.DEFAULT_GOAL = build/debug
.DEFAULT_GOAL = build/all
build/debug: $(top_srcdir)/build/debug/upx
build/release: $(top_srcdir)/build/release/upx
build/debug: $(top_srcdir)/build/debug
build/release: $(top_srcdir)/build/release
.NOTPARALLEL: # because the actual builds use "cmake --parallel"
.PHONY: PHONY
@@ -34,17 +33,21 @@ debug: build/debug
release: build/release
all build/all: build/debug build/release
$(top_srcdir)/build/debug/upx: PHONY
$(MAKE) -C $(top_srcdir) build/debug
$(top_srcdir)/build/release/upx: PHONY
$(MAKE) -C $(top_srcdir) build/release
# actual rules - redirect to top-level
$(top_srcdir)/build/debug: PHONY; $(MAKE) -C $(top_srcdir) build/debug
$(top_srcdir)/build/release: PHONY; $(MAKE) -C $(top_srcdir) build/release
# convenience
CTEST = ctest
test:: $(top_srcdir)/build/debug PHONY; cd $< && $(CTEST)
test:: $(top_srcdir)/build/release PHONY; cd $< && $(CTEST)
#
# "make run-testsuite"
# see https://github.com/upx/upx-testsuite.git
# git clone https://github.com/upx/upx-testsuite.git
#
# search for the UPX testsuite -- git clone https://github.com/upx/upx-testsuite.git
# search for the UPX testsuite
# you also can override upx_testsuite_SRCDIR
ifndef upx_testsuite_SRCDIR
# search standard locations below $(top_srcdir)
@@ -59,17 +62,18 @@ endif
# run the UPX testsuite
# The expected (old) checksums are in $(top_srcdir)/misc/testsuite/upx_testsuite_1-expected_sha256sums.sh
# The actual (new) checksums are in ./tmp-upx-testsuite/testsuite_1/.sha256sums.recreate
# The actual (new) checksums are in ./tmp-upx-testsuite-*/testsuite_1/.sha256sums.recreate
ifneq ($(wildcard $(upx_testsuite_SRCDIR)/files/packed/.),)
ifneq ($(wildcard $(top_srcdir)/misc/testsuite/upx_testsuite_1.sh),)
run-testsuite: run-testsuite-release
run-testsuite-%: export upx_testsuite_SRCDIR := $(upx_testsuite_SRCDIR)
run-testsuite-%: export upx_testsuite_BUILDDIR := ./tmp-upx-testsuite
run-testsuite-debug: export upx_testsuite_BUILDDIR := ./tmp-upx-testsuite-debug
run-testsuite-debug: export upx_exe := $(top_srcdir)/build/debug/upx
run-testsuite-debug: PHONY $(top_srcdir)/build/debug/upx
run-testsuite-debug: $(top_srcdir)/build/debug PHONY
time -p bash $(top_srcdir)/misc/testsuite/upx_testsuite_1.sh
run-testsuite-release: export upx_testsuite_BUILDDIR := ./tmp-upx-testsuite-release
run-testsuite-release: export upx_exe := $(top_srcdir)/build/release/upx
run-testsuite-release: PHONY $(top_srcdir)/build/release/upx
run-testsuite-release: $(top_srcdir)/build/release PHONY
time -p bash $(top_srcdir)/misc/testsuite/upx_testsuite_1.sh
endif
endif
@@ -78,10 +82,10 @@ endif
# "make check-whitespace"
#
ifneq ($(wildcard /usr/bin/env),) # needs bash, perl, xargs, etc.
CHECK_WHITESPACE = $(top_srcdir)/misc/scripts/check_whitespace.sh $(top_srcdir)
ifneq ($(wildcard /usr/bin/env),) # need Unix utils like bash, perl, sed, xargs, etc.
CHECK_WHITESPACE = bash $(top_srcdir)/misc/scripts/check_whitespace.sh $(top_srcdir)
ifneq ($(wildcard $(top_srcdir)/.git/.),)
CHECK_WHITESPACE = $(top_srcdir)/misc/scripts/check_whitespace_git.sh $(top_srcdir)
CHECK_WHITESPACE = bash $(top_srcdir)/misc/scripts/check_whitespace_git.sh $(top_srcdir)
endif
check-whitespace: PHONY; $(CHECK_WHITESPACE)
endif
@@ -93,11 +97,13 @@ endif
# automatically format some C++ source code files
ifeq ($(shell uname),Linux)
# Markus loves clang-format, but John hates it; find a compromise
CLANG_FORMAT_EXCLUDE_FILES += conf.h miniacc.h stub/%.h
CLANG_FORMAT_EXCLUDE_FILES += p_elf.h p_elf_enum.h p_lx_% p_mach% p_unix% p_vmlin%
CLANG_FORMAT_EXCLUDE_FILES += miniacc.h stub/%.h
CLANG_FORMAT_EXCLUDE_FILES += p_lx_% p_mach% p_unix% p_vmlin%
CLANG_FORMAT_FILES := $(sort $(wildcard *.[ch]* ../maint/src/*.[ch]* */*.[ch]*))
CLANG_FORMAT_FILES += $(sort $(wildcard stub/tools/*/*.[ch]*))
CLANG_FORMAT_FILES += $(sort $(wildcard ../misc/cmake/try_compile/*.[ch]*))
CLANG_FORMAT_FILES := $(filter-out $(CLANG_FORMAT_EXCLUDE_FILES),$(CLANG_FORMAT_FILES))
clang-format: PHONY $(CLANG_FORMAT_FILES)
clang-format: $(CLANG_FORMAT_FILES) PHONY
@echo "running upx-clang-format"
@$(top_srcdir)/misc/scripts/upx-clang-format.sh -i $(CLANG_FORMAT_FILES)
endif
+20 -20
View File
@@ -2,8 +2,8 @@
This file is part of the UPX executable compressor.
Copyright (C) 1996-2023 Markus Franz Xaver Johannes Oberhumer
Copyright (C) 1996-2023 Laszlo Molnar
Copyright (C) 1996-2024 Markus Franz Xaver Johannes Oberhumer
Copyright (C) 1996-2024 Laszlo Molnar
All Rights Reserved.
UPX and the UCL library are free software; you can redistribute them
@@ -753,6 +753,24 @@ inline unsigned UPX_MIN(const LE32 &a, unsigned b) { return UPX_MIN(unsigned(a),
// misc support
**************************************************************************/
// <type_traits> upx_is_integral; see conf.h
#define TT_UPX_IS_INTEGRAL(T) \
template <> \
struct upx_is_integral<T> : public std::true_type {}; \
template <> \
struct upx_is_integral<const T> : public std::true_type {}; \
template <> \
struct upx_is_integral<volatile T> : public std::true_type {}; \
template <> \
struct upx_is_integral<const volatile T> : public std::true_type {}
TT_UPX_IS_INTEGRAL(BE16);
TT_UPX_IS_INTEGRAL(BE32);
TT_UPX_IS_INTEGRAL(BE64);
TT_UPX_IS_INTEGRAL(LE16);
TT_UPX_IS_INTEGRAL(LE32);
TT_UPX_IS_INTEGRAL(LE64);
#undef TT_UPX_IS_INTEGRAL
// native types
#if (ACC_ABI_BIG_ENDIAN)
typedef BE16 NE16;
@@ -776,24 +794,6 @@ typedef LE64 NE64;
#define ne64_compare_signed le64_compare_signed
#endif
// <type_traits> upx_is_integral
#define TT_IS_INTEGRAL(T) \
template <> \
struct upx_is_integral<T> : public std::true_type {}; \
template <> \
struct upx_is_integral<const T> : public std::true_type {}; \
template <> \
struct upx_is_integral<volatile T> : public std::true_type {}; \
template <> \
struct upx_is_integral<const volatile T> : public std::true_type {}
TT_IS_INTEGRAL(BE16);
TT_IS_INTEGRAL(BE32);
TT_IS_INTEGRAL(BE64);
TT_IS_INTEGRAL(LE16);
TT_IS_INTEGRAL(LE32);
TT_IS_INTEGRAL(LE64);
#undef TT_IS_INTEGRAL
// for use with qsort()
extern "C" {
int __acc_cdecl_qsort be16_compare(const void *, const void *);
+8 -17
View File
@@ -2,8 +2,8 @@
This file is part of the UPX executable compressor.
Copyright (C) 1996-2023 Markus Franz Xaver Johannes Oberhumer
Copyright (C) 1996-2023 Laszlo Molnar
Copyright (C) 1996-2024 Markus Franz Xaver Johannes Oberhumer
Copyright (C) 1996-2024 Laszlo Molnar
All Rights Reserved.
UPX and the UCL library are free software; you can redistribute them
@@ -79,12 +79,9 @@ struct AbstractPolicy {
private:
// disable copy and move
AbstractPolicy(const AbstractPolicy &) DELETED_FUNCTION;
AbstractPolicy &operator=(const AbstractPolicy &) DELETED_FUNCTION;
AbstractPolicy(AbstractPolicy &&) noexcept DELETED_FUNCTION;
AbstractPolicy &operator=(AbstractPolicy &&) noexcept DELETED_FUNCTION;
UPX_CXX_DISABLE_COPY_MOVE(AbstractPolicy)
// disable dynamic allocation
ACC_CXX_DISABLE_NEW_DELETE
UPX_CXX_DISABLE_NEW_DELETE(AbstractPolicy)
};
#endif
@@ -147,12 +144,9 @@ struct BEPolicy
private:
// disable copy and move
BEPolicy(const BEPolicy &) DELETED_FUNCTION;
BEPolicy &operator=(const BEPolicy &) DELETED_FUNCTION;
BEPolicy(BEPolicy &&) noexcept DELETED_FUNCTION;
BEPolicy &operator=(BEPolicy &&) noexcept DELETED_FUNCTION;
UPX_CXX_DISABLE_COPY_MOVE(BEPolicy)
// disable dynamic allocation
ACC_CXX_DISABLE_NEW_DELETE
UPX_CXX_DISABLE_NEW_DELETE(BEPolicy)
};
struct LEPolicy
@@ -209,12 +203,9 @@ struct LEPolicy
private:
// disable copy and move
LEPolicy(const LEPolicy &) DELETED_FUNCTION;
LEPolicy &operator=(const LEPolicy &) DELETED_FUNCTION;
LEPolicy(LEPolicy &&) noexcept DELETED_FUNCTION;
LEPolicy &operator=(LEPolicy &&) noexcept DELETED_FUNCTION;
UPX_CXX_DISABLE_COPY_MOVE(LEPolicy)
// disable dynamic allocation
ACC_CXX_DISABLE_NEW_DELETE
UPX_CXX_DISABLE_NEW_DELETE(LEPolicy)
};
// Native Endianness policy (aka host policy)
+12 -1
View File
@@ -2,7 +2,7 @@
This file is part of the UPX executable compressor.
Copyright (C) 1996-2023 Markus Franz Xaver Johannes Oberhumer
Copyright (C) 1996-2024 Markus Franz Xaver Johannes Oberhumer
All Rights Reserved.
UPX and the UCL library are free software; you can redistribute them
@@ -564,6 +564,17 @@ TEST_CASE("acc_vget") {
CHECK_EQ(acc_vget_acc_hvoid_p(nullptr, 0), nullptr);
}
TEST_CASE("ptr_invalidate_and_poison") {
int *ip = nullptr;
ptr_invalidate_and_poison(ip);
assert(ip != nullptr);
(void) ip;
double *dp;
ptr_invalidate_and_poison(dp);
assert(dp != nullptr);
(void) dp;
}
TEST_CASE("working -fno-strict-aliasing") {
bool ok;
long v = 0;
+250 -47
View File
@@ -2,7 +2,7 @@
This file is part of the UPX executable compressor.
Copyright (C) 1996-2023 Markus Franz Xaver Johannes Oberhumer
Copyright (C) 1996-2024 Markus Franz Xaver Johannes Oberhumer
All Rights Reserved.
UPX and the UCL library are free software; you can redistribute them
@@ -24,6 +24,9 @@
<markus@oberhumer.com>
*/
// lots of tests (and probably quite a number of redundant tests)
// modern compilers will optimize away much of this code
#include "../conf.h"
/*************************************************************************
@@ -50,12 +53,22 @@ ACC_COMPILE_TIME_ASSERT_HEADER(usizeof(int) == sizeof(int))
ACC_COMPILE_TIME_ASSERT_HEADER(usizeof('a') == sizeof(char))
ACC_COMPILE_TIME_ASSERT_HEADER(usizeof("") == 1)
ACC_COMPILE_TIME_ASSERT_HEADER(usizeof("a") == 2)
ACC_COMPILE_TIME_ASSERT_HEADER(usizeof("ab") == 3)
ACC_COMPILE_TIME_ASSERT_HEADER(usizeof(L'a') == sizeof(wchar_t))
ACC_COMPILE_TIME_ASSERT_HEADER(usizeof(L"") == 1 * sizeof(wchar_t))
ACC_COMPILE_TIME_ASSERT_HEADER(usizeof(L"a") == 2 * sizeof(wchar_t))
ACC_COMPILE_TIME_ASSERT_HEADER(usizeof(L"ab") == 3 * sizeof(wchar_t))
ACC_COMPILE_TIME_ASSERT_HEADER(usizeof(0) == sizeof(int))
ACC_COMPILE_TIME_ASSERT_HEADER(usizeof(0L) == sizeof(long))
ACC_COMPILE_TIME_ASSERT_HEADER(usizeof(0LL) == sizeof(long long))
ACC_COMPILE_TIME_ASSERT_HEADER(usizeof(nullptr) == sizeof(void *))
ACC_COMPILE_TIME_ASSERT_HEADER(usizeof(sizeof(0)) == sizeof(size_t))
ACC_COMPILE_TIME_ASSERT_HEADER(usizeof(usizeof(0)) == sizeof(unsigned))
#if 0
// works, but may trigger clang/gcc warnings "-Wunused-value"
ACC_COMPILE_TIME_ASSERT_HEADER(usizeof((1LL, 1)) == sizeof(int))
ACC_COMPILE_TIME_ASSERT_HEADER(usizeof((1, 1LL)) == sizeof(long long))
#endif
namespace compile_time = upx::compile_time;
ACC_COMPILE_TIME_ASSERT_HEADER(compile_time::string_len("") == 0)
@@ -84,10 +97,167 @@ ACC_COMPILE_TIME_ASSERT_HEADER(!compile_time::string_gt("abc", "abz"))
ACC_COMPILE_TIME_ASSERT_HEADER(!compile_time::string_ge("abc", "abz"))
ACC_COMPILE_TIME_ASSERT_HEADER(compile_time::string_le("abc", "abz"))
/*************************************************************************
// UPX_CXX_DISABLE_xxx
**************************************************************************/
namespace {
template <class TA, class TB, int TC = 0>
struct MyType1 {
MyType1() noexcept {}
UPX_CXX_DISABLE_ADDRESS(MyType1)
UPX_CXX_DISABLE_COPY_MOVE(MyType1)
UPX_CXX_DISABLE_NEW_DELETE_NO_VIRTUAL(MyType1)
};
template <class TA, class TB, int TC = 0>
struct MyType2 {
MyType2() noexcept {}
UPX_CXX_DISABLE_COPY_MOVE(MyType2)
typedef MyType2<TA, TB, TC> Self;
UPX_CXX_DISABLE_ADDRESS(Self)
UPX_CXX_DISABLE_NEW_DELETE_NO_VIRTUAL(Self)
};
template <class TA, class TB, int TC = 0>
struct MyVType1 {
MyVType1() noexcept {}
virtual ~MyVType1() noexcept {}
UPX_CXX_DISABLE_ADDRESS(MyVType1)
UPX_CXX_DISABLE_COPY_MOVE(MyVType1)
UPX_CXX_DISABLE_NEW_DELETE(MyVType1)
};
template <class TA, class TB, int TC = 0>
struct MyVType2 {
MyVType2() noexcept {}
virtual ~MyVType2() noexcept {}
UPX_CXX_DISABLE_COPY_MOVE(MyVType2)
typedef MyVType2<TA, TB, TC> Self;
UPX_CXX_DISABLE_ADDRESS(Self)
UPX_CXX_DISABLE_NEW_DELETE(Self)
};
TEST_CASE("upx_cxx_disable") {
MyType1<char, int, 1> dummy1;
MyType2<char, int, 2> dummy2;
MyVType1<char, int, 1> vdummy1;
MyVType2<char, int, 2> vdummy2;
(void) dummy1;
(void) dummy2;
(void) vdummy1;
(void) vdummy2;
}
} // namespace
namespace test_disable_new_delete {
struct A1 {
int a;
};
struct A2 {
int a;
UPX_CXX_DISABLE_NEW_DELETE_NO_VIRTUAL(A2)
};
struct B1_A1 : public A1 {
int b;
};
struct B1_A2 : public A2 {
int b;
};
struct B2_A1 : public A1 {
int b;
UPX_CXX_DISABLE_NEW_DELETE_NO_VIRTUAL(B2_A1)
};
struct B2_A2 : public A2 {
int b;
UPX_CXX_DISABLE_NEW_DELETE_NO_VIRTUAL(B2_A2)
};
struct X1 {
virtual ~X1() noexcept {}
int x;
};
struct X2 {
virtual ~X2() noexcept {}
int x;
UPX_CXX_DISABLE_NEW_DELETE(X2)
};
struct Y1_X1 : public X1 {
int y;
};
struct Y1_X2 : public X2 {
int y;
};
struct Y2_X1 : public X1 {
int y;
UPX_CXX_DISABLE_NEW_DELETE(Y2_X1)
};
struct Y2_X2 : public X2 {
int y;
UPX_CXX_DISABLE_NEW_DELETE(Y2_X2)
};
struct Z1_X1 : public X1 {
virtual ~Z1_X1() noexcept {}
int z;
};
struct Z1_X2 : public X2 {
virtual ~Z1_X2() noexcept {}
int z;
};
struct Z2_X1 : public X1 {
virtual ~Z2_X1() noexcept {}
int z;
UPX_CXX_DISABLE_NEW_DELETE(Z2_X1)
};
struct Z2_X2 : public X2 {
virtual ~Z2_X2() noexcept {}
int z;
UPX_CXX_DISABLE_NEW_DELETE(Z2_X2)
};
} // namespace test_disable_new_delete
/*************************************************************************
// util
**************************************************************************/
TEST_CASE("ptr_static_cast") {
// check that we don't trigger any -Wcast-align warnings
using upx::ptr_static_cast;
void *vp = nullptr;
byte *bp = nullptr;
int *ip = nullptr;
double *dp = nullptr;
assert((vp == ptr_static_cast<void *>(vp)));
assert((vp == ptr_static_cast<void *>(bp)));
assert((vp == ptr_static_cast<void *>(ip)));
assert((vp == ptr_static_cast<void *>(dp)));
assert((bp == ptr_static_cast<byte *>(vp)));
assert((bp == ptr_static_cast<byte *>(bp)));
assert((bp == ptr_static_cast<byte *>(ip)));
assert((bp == ptr_static_cast<byte *>(dp)));
assert((ip == ptr_static_cast<int *>(vp)));
assert((ip == ptr_static_cast<int *>(bp)));
assert((ip == ptr_static_cast<int *>(ip)));
assert((ip == ptr_static_cast<int *>(dp)));
assert((dp == ptr_static_cast<double *>(vp)));
assert((dp == ptr_static_cast<double *>(bp)));
assert((dp == ptr_static_cast<double *>(ip)));
assert((dp == ptr_static_cast<double *>(dp)));
const byte *bc = nullptr;
const int *ic = nullptr;
assert((bc == ptr_static_cast<byte *>(bp)));
assert((bc == ptr_static_cast<const byte *>(bc)));
assert((bc == ptr_static_cast<byte *>(ip)));
assert((bc == ptr_static_cast<const byte *>(ic)));
assert((ic == ptr_static_cast<int *>(bp)));
assert((ic == ptr_static_cast<const int *>(bc)));
assert((ic == ptr_static_cast<int *>(ip)));
assert((ic == ptr_static_cast<const int *>(ic)));
}
TEST_CASE("noncopyable") {
struct Test : private upx::noncopyable {
int v = 1;
@@ -106,13 +276,13 @@ TEST_CASE("noncopyable") {
}
/*************************************************************************
// TriBool
// TriBool checks
**************************************************************************/
namespace {
template <class T>
struct TestTriBool {
static void test(bool expect_true, int x) noexcept {
static void test(bool expect_true) {
static_assert(std::is_class<T>::value);
static_assert(std::is_nothrow_default_constructible<T>::value);
static_assert(std::is_nothrow_destructible<T>::value);
@@ -126,6 +296,9 @@ struct TestTriBool {
static_assert(sizeof(T) == sizeof(typename T::underlying_type));
static_assert(alignof(T) == alignof(typename T::underlying_type));
#endif
static_assert(!bool(T(false)));
static_assert(bool(T(true)));
static_assert(bool(T(T::Third)) == T::is_third_true);
static_assert(T(false) == T::False);
static_assert(T(true) == T::True);
static_assert(T(T::False) == T::False);
@@ -145,63 +318,93 @@ struct TestTriBool {
static_assert(array[2].isThird());
static_assert(sizeof(array) == 3 * sizeof(T));
T a;
CHECK(!a);
CHECK(a.isStrictFalse());
CHECK(!a.isStrictTrue());
CHECK(a.isStrictBool());
CHECK(!a.isThird());
assert(a.getValue() == T::False);
assert(!a);
assert(!bool(a));
assert((!a ? true : false));
assert(a.isStrictFalse());
assert(!a.isStrictTrue());
assert(a.isStrictBool());
assert(!a.isThird());
a = false;
CHECK(!a);
CHECK(a.isStrictFalse());
CHECK(!a.isStrictTrue());
CHECK(a.isStrictBool());
CHECK(!a.isThird());
assert(a.getValue() == T::False);
assert(!a);
assert(!bool(a));
assert((!a ? true : false));
assert(a.isStrictFalse());
assert(!a.isStrictTrue());
assert(a.isStrictBool());
assert(!a.isThird());
a = true;
CHECK(a);
CHECK(!a.isStrictFalse());
CHECK(a.isStrictTrue());
CHECK(a.isStrictBool());
CHECK(!a.isThird());
assert(a.getValue() == T::True);
assert(a);
assert(bool(a));
assert((a ? true : false));
assert(!a.isStrictFalse());
assert(a.isStrictTrue());
assert(a.isStrictBool());
assert(!a.isThird());
a = T::Third;
if (expect_true)
CHECK(a);
else
CHECK(!a);
CHECK(!a.isStrictFalse());
CHECK(!a.isStrictTrue());
CHECK(!a.isStrictBool());
CHECK(a.isThird());
a = x;
if (expect_true)
CHECK(a);
else
CHECK(!a);
CHECK(!a.isStrictFalse());
CHECK(!a.isStrictTrue());
CHECK(!a.isStrictBool());
CHECK(a.isThird());
assert(a.getValue() == T::Third);
assert(T::is_third_true == expect_true);
if (expect_true) {
assert(a);
assert(bool(a));
assert((a ? true : false));
} else {
assert(!a);
assert(!bool(a));
assert((!a ? true : false));
}
assert(!a.isStrictFalse());
assert(!a.isStrictTrue());
assert(!a.isStrictBool());
assert(a.isThird());
a = 99;
assert(a.getValue() == T::Third);
if (expect_true) {
assert(a);
assert(bool(a));
assert((a ? true : false));
} else {
assert(!a);
assert(!bool(a));
assert((!a ? true : false));
}
assert(!a.isStrictFalse());
assert(!a.isStrictTrue());
assert(!a.isStrictBool());
assert(a.isThird());
mem_clear(&a);
CHECK(a.isStrictFalse());
assert(a.isStrictFalse());
}
};
} // namespace
TEST_CASE("TriBool") {
using upx::TriBool, upx::tribool;
//
static_assert(!tribool(false));
static_assert(tribool(true));
static_assert(!tribool(tribool::Third));
TestTriBool<tribool>::test(false, -1);
//
TestTriBool<TriBool<upx_int8_t> >::test(false, -1);
TestTriBool<TriBool<upx_int64_t> >::test(false, -1);
//
TestTriBool<TriBool<unsigned, 2> >::test(true, 2);
TestTriBool<TriBool<upx_int8_t, 2> >::test(true, 2);
TestTriBool<TriBool<upx_uint8_t, 2> >::test(true, 2);
TestTriBool<TriBool<upx_int64_t, 2> >::test(true, 2);
TestTriBool<TriBool<upx_uint64_t, 2> >::test(true, 2);
TestTriBool<tribool>::test(false);
#if DEBUG || 1
TestTriBool<TriBool<upx_int8_t> >::test(false);
TestTriBool<TriBool<upx_uint8_t> >::test(false);
TestTriBool<TriBool<upx_int16_t> >::test(false);
TestTriBool<TriBool<upx_uint16_t> >::test(false);
TestTriBool<TriBool<upx_int32_t> >::test(false);
TestTriBool<TriBool<upx_uint32_t> >::test(false);
TestTriBool<TriBool<upx_int64_t> >::test(false);
TestTriBool<TriBool<upx_uint64_t> >::test(false);
TestTriBool<TriBool<upx_int8_t, true> >::test(true);
TestTriBool<TriBool<upx_uint8_t, true> >::test(true);
TestTriBool<TriBool<upx_int16_t, true> >::test(true);
TestTriBool<TriBool<upx_uint16_t, true> >::test(true);
TestTriBool<TriBool<upx_int32_t, true> >::test(true);
TestTriBool<TriBool<upx_uint32_t, true> >::test(true);
TestTriBool<TriBool<upx_int64_t, true> >::test(true);
TestTriBool<TriBool<upx_uint64_t, true> >::test(true);
#endif
}
/* vim:set ts=4 sw=4 et: */
+4 -2
View File
@@ -2,7 +2,7 @@
This file is part of the UPX executable compressor.
Copyright (C) 1996-2023 Markus Franz Xaver Johannes Oberhumer
Copyright (C) 1996-2024 Markus Franz Xaver Johannes Oberhumer
All Rights Reserved.
UPX and the UCL library are free software; you can redistribute them
@@ -43,9 +43,11 @@
#pragma GCC diagnostic ignored "-Wshadow"
#endif
#if !defined(UPX_DOCTEST_CONFIG_MULTITHREADING)
#if !defined(UPX_DOCTEST_CONFIG_MULTITHREADING) && !(WITH_THREADS)
#ifndef DOCTEST_CONFIG_NO_MULTITHREADING
#define DOCTEST_CONFIG_NO_MULTITHREADING
#endif
#endif
#if defined(__clang__) && defined(__FAST_MATH__) && defined(__INTEL_LLVM_COMPILER)
// warning: comparison with NaN always evaluates to false in fast floating point modes
+1 -1
View File
@@ -2,7 +2,7 @@
This file is part of the UPX executable compressor.
Copyright (C) 1996-2023 Markus Franz Xaver Johannes Oberhumer
Copyright (C) 1996-2024 Markus Franz Xaver Johannes Oberhumer
All Rights Reserved.
UPX and the UCL library are free software; you can redistribute them
+17 -5
View File
@@ -2,7 +2,7 @@
This file is part of the UPX executable compressor.
Copyright (C) 1996-2023 Markus Franz Xaver Johannes Oberhumer
Copyright (C) 1996-2024 Markus Franz Xaver Johannes Oberhumer
All Rights Reserved.
UPX and the UCL library are free software; you can redistribute them
@@ -62,7 +62,7 @@ unsigned upx_crc32(const void *buf, unsigned len, unsigned crc)
**************************************************************************/
int upx_compress(const upx_bytep src, unsigned src_len, upx_bytep dst, unsigned *dst_len,
upx_callback_p cb, int method, int level, const upx_compress_config_t *cconf,
upx_callback_t *cb, int method, int level, const upx_compress_config_t *cconf,
upx_compress_result_t *cresult) {
int r = UPX_E_ERROR;
upx_compress_result_t cresult_buffer;
@@ -95,6 +95,10 @@ int upx_compress(const upx_bytep src, unsigned src_len, upx_bytep dst, unsigned
const unsigned orig_dst_len = *dst_len;
if (__acc_cte(false)) {
}
#if (WITH_BZIP2)
else if (M_IS_BZIP2(method))
r = upx_bzip2_compress(src, src_len, dst, dst_len, cb, method, level, cconf, cresult);
#endif
#if (WITH_LZMA)
else if (M_IS_LZMA(method))
r = upx_lzma_compress(src, src_len, dst, dst_len, cb, method, level, cconf, cresult);
@@ -112,7 +116,7 @@ int upx_compress(const upx_bytep src, unsigned src_len, upx_bytep dst, unsigned
r = upx_zstd_compress(src, src_len, dst, dst_len, cb, method, level, cconf, cresult);
#endif
else {
throwInternalError("unknown compression method");
throwInternalError("unknown compression method %d", method);
}
#if 1
@@ -140,6 +144,10 @@ int upx_decompress(const upx_bytep src, unsigned src_len, upx_bytep dst, unsigne
const unsigned orig_dst_len = *dst_len;
if (__acc_cte(false)) {
}
#if (WITH_BZIP2)
else if (M_IS_BZIP2(method))
r = upx_bzip2_decompress(src, src_len, dst, dst_len, method, cresult);
#endif
#if (WITH_LZMA)
else if (M_IS_LZMA(method))
r = upx_lzma_decompress(src, src_len, dst, dst_len, method, cresult);
@@ -161,7 +169,7 @@ int upx_decompress(const upx_bytep src, unsigned src_len, upx_bytep dst, unsigne
r = upx_zstd_decompress(src, src_len, dst, dst_len, method, cresult);
#endif
else {
throwInternalError("unknown decompression method");
throwInternalError("unknown compression method %d", method);
}
assert_noexcept(*dst_len <= orig_dst_len);
@@ -187,6 +195,10 @@ int upx_test_overlap(const upx_bytep buf, const upx_bytep tbuf, unsigned src_off
const unsigned orig_dst_len = *dst_len;
if (__acc_cte(false)) {
}
#if (WITH_BZIP2)
else if (M_IS_BZIP2(method))
r = upx_bzip2_test_overlap(buf, tbuf, src_off, src_len, dst_len, method, cresult);
#endif
#if (WITH_LZMA)
else if (M_IS_LZMA(method))
r = upx_lzma_test_overlap(buf, tbuf, src_off, src_len, dst_len, method, cresult);
@@ -204,7 +216,7 @@ int upx_test_overlap(const upx_bytep buf, const upx_bytep tbuf, unsigned src_off
r = upx_zstd_test_overlap(buf, tbuf, src_off, src_len, dst_len, method, cresult);
#endif
else {
throwInternalError("unknown decompression method");
throwInternalError("unknown compression method %d", method);
}
assert_noexcept(*dst_len <= orig_dst_len);
+7 -7
View File
@@ -2,7 +2,7 @@
This file is part of the UPX executable compressor.
Copyright (C) 1996-2023 Markus Franz Xaver Johannes Oberhumer
Copyright (C) 1996-2024 Markus Franz Xaver Johannes Oberhumer
All Rights Reserved.
UPX and the UCL library are free software; you can redistribute them
@@ -37,7 +37,7 @@ int upx_bzip2_init(void);
const char *upx_bzip2_version_string(void);
int upx_bzip2_compress ( const upx_bytep src, unsigned src_len,
upx_bytep dst, unsigned *dst_len,
upx_callback_p cb,
upx_callback_t *cb,
int method, int level,
const upx_compress_config_t *cconf,
upx_compress_result_t *cresult );
@@ -58,7 +58,7 @@ int upx_lzma_init(void);
const char *upx_lzma_version_string(void);
int upx_lzma_compress ( const upx_bytep src, unsigned src_len,
upx_bytep dst, unsigned *dst_len,
upx_callback_p cb,
upx_callback_t *cb,
int method, int level,
const upx_compress_config_t *cconf,
upx_compress_result_t *cresult );
@@ -79,7 +79,7 @@ int upx_nrv_init(void);
const char *upx_nrv_version_string(void);
int upx_nrv_compress ( const upx_bytep src, unsigned src_len,
upx_bytep dst, unsigned *dst_len,
upx_callback_p cb,
upx_callback_t *cb,
int method, int level,
const upx_compress_config_t *cconf,
upx_compress_result_t *cresult );
@@ -100,7 +100,7 @@ int upx_ucl_init(void);
const char *upx_ucl_version_string(void);
int upx_ucl_compress ( const upx_bytep src, unsigned src_len,
upx_bytep dst, unsigned *dst_len,
upx_callback_p cb,
upx_callback_t *cb,
int method, int level,
const upx_compress_config_t *cconf,
upx_compress_result_t *cresult );
@@ -123,7 +123,7 @@ int upx_zlib_init(void);
const char *upx_zlib_version_string(void);
int upx_zlib_compress ( const upx_bytep src, unsigned src_len,
upx_bytep dst, unsigned *dst_len,
upx_callback_p cb,
upx_callback_t *cb,
int method, int level,
const upx_compress_config_t *cconf,
upx_compress_result_t *cresult );
@@ -146,7 +146,7 @@ int upx_zstd_init(void);
const char *upx_zstd_version_string(void);
int upx_zstd_compress ( const upx_bytep src, unsigned src_len,
upx_bytep dst, unsigned *dst_len,
upx_callback_p cb,
upx_callback_t *cb,
int method, int level,
const upx_compress_config_t *cconf,
upx_compress_result_t *cresult );
+208
View File
@@ -0,0 +1,208 @@
/* compress_bzip2.cpp --
This file is part of the UPX executable compressor.
Copyright (C) 1996-2024 Markus Franz Xaver Johannes Oberhumer
All Rights Reserved.
UPX and the UCL library are free software; you can redistribute them
and/or modify them under the terms of the GNU General Public License as
published by the Free Software Foundation; either version 2 of
the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; see the file COPYING.
If not, write to the Free Software Foundation, Inc.,
59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
Markus F.X.J. Oberhumer
<markus@oberhumer.com>
*/
#include "../conf.h"
void bzip2_compress_config_t::reset() noexcept { mem_clear(this); }
#if WITH_BZIP2
#include "compress.h"
#include "../util/membuffer.h"
#include <bzip2/bzlib.h>
#if defined(BZ_NO_STDIO) || 1
// we need to supply bz_internal_error() when building with BZ_NO_STDIO
extern "C" {
extern void bz_internal_error(int);
void bz_internal_error(int errcode) { throwInternalError("bz_internal_error %d", errcode); }
}
#endif // BZ_NO_STDIO
static int convert_errno_from_bzip2(int r) {
switch (r) {
case BZ_OK:
return UPX_E_OK;
case BZ_MEM_ERROR:
return UPX_E_OUT_OF_MEMORY;
// TODO later: convert to UPX_E_INPUT_OVERRUN, UPX_E_OUTPUT_OVERRUN
default:
break;
}
return UPX_E_ERROR;
}
/*************************************************************************
//
**************************************************************************/
int upx_bzip2_compress(const upx_bytep src, unsigned src_len, upx_bytep dst, unsigned *dst_len,
upx_callback_t *cb_parm, int method, int level,
const upx_compress_config_t *cconf_parm, upx_compress_result_t *cresult) {
assert(method == M_BZIP2);
assert(level > 0);
assert(cresult != nullptr);
UNUSED(cb_parm);
int r = UPX_E_ERROR;
const bzip2_compress_config_t *const lcconf = cconf_parm ? &cconf_parm->conf_bzip2 : nullptr;
bzip2_compress_result_t *const res = &cresult->result_bzip2;
res->reset();
int blockSize100k = (src_len + 100000 - 1) / 100000;
if (blockSize100k < 1)
blockSize100k = 1;
if (blockSize100k > 9)
blockSize100k = 9;
// idea for later: could enhance lcconf to allow setting blockSize100k
UNUSED(lcconf);
if (level <= 3 && blockSize100k > level)
blockSize100k = level;
char *dest = (char *) dst;
char *source = (char *) const_cast<byte *>(src);
r = BZ2_bzBuffToBuffCompress(dest, dst_len, source, src_len, blockSize100k, 0, 0);
return convert_errno_from_bzip2(r);
}
/*************************************************************************
//
**************************************************************************/
int upx_bzip2_decompress(const upx_bytep src, unsigned src_len, upx_bytep dst, unsigned *dst_len,
int method, const upx_compress_result_t *cresult) {
assert(method == M_BZIP2);
UNUSED(method);
UNUSED(cresult);
char *dest = (char *) dst;
char *source = (char *) const_cast<byte *>(src);
int small = 0;
int r = BZ2_bzBuffToBuffDecompress(dest, dst_len, source, src_len, small, 0);
return convert_errno_from_bzip2(r);
}
/*************************************************************************
// test_overlap - see <ucl/ucl.h> for semantics
**************************************************************************/
int upx_bzip2_test_overlap(const upx_bytep buf, const upx_bytep tbuf, unsigned src_off,
unsigned src_len, unsigned *dst_len, int method,
const upx_compress_result_t *cresult) {
assert(method == M_BZIP2);
MemBuffer b(src_off + src_len);
memcpy(b + src_off, buf + src_off, src_len);
unsigned saved_dst_len = *dst_len;
int r = upx_bzip2_decompress(raw_index_bytes(b, src_off, src_len), src_len,
raw_bytes(b, *dst_len), dst_len, method, cresult);
if (r != UPX_E_OK)
return r;
if (*dst_len != saved_dst_len)
return UPX_E_ERROR;
// NOTE: there is a very tiny possibility that decompression has
// succeeded but the data is not restored correctly because of
// in-place buffer overlapping, so we use an extra memcmp().
if (tbuf != nullptr && memcmp(tbuf, b, *dst_len) != 0)
return UPX_E_ERROR;
return UPX_E_OK;
}
/*************************************************************************
// misc
**************************************************************************/
int upx_bzip2_init(void) { return 0; }
const char *upx_bzip2_version_string(void) { return BZ2_bzlibVersion(); }
/*************************************************************************
// doctest checks
**************************************************************************/
#if DEBUG && !defined(DOCTEST_CONFIG_DISABLE) && 1
static bool check_bzip2(const int method, const int level, const unsigned expected_c_len) {
const unsigned u_len = 16384;
const unsigned c_extra = 4096;
MemBuffer u_buf, c_buf, d_buf;
unsigned c_len, d_len;
upx_compress_result_t cresult;
int r;
u_buf.alloc(u_len);
memset(u_buf, 0, u_len);
c_buf.allocForCompression(u_len, c_extra);
d_buf.allocForDecompression(u_len);
c_len = c_buf.getSize() - c_extra;
r = upx_bzip2_compress(raw_bytes(u_buf, u_len), u_len, raw_index_bytes(c_buf, c_extra, c_len),
&c_len, nullptr, method, level, NULL_cconf, &cresult);
if (r != 0 || c_len != expected_c_len)
return false;
d_len = d_buf.getSize();
r = upx_bzip2_decompress(raw_index_bytes(c_buf, c_extra, c_len), c_len, raw_bytes(d_buf, d_len),
&d_len, method, nullptr);
if (r != 0 || d_len != u_len || memcmp(u_buf, d_buf, u_len) != 0)
return false;
d_len = u_len - 1;
r = upx_bzip2_decompress(raw_index_bytes(c_buf, c_extra, c_len), c_len, raw_bytes(d_buf, d_len),
&d_len, method, nullptr);
if (r == 0)
return false;
// TODO: rewrite Packer::findOverlapOverhead() so that we can test it here
// unsigned x_len = d_len;
// r = upx_bzip2_test_overlap(c_buf, u_buf, c_extra, c_len, &x_len, method, nullptr);
return true;
}
TEST_CASE("compress_bzip2") { CHECK(check_bzip2(M_BZIP2, 9, 46)); }
#endif // DEBUG
TEST_CASE("upx_bzip2_decompress") {
#if 0 // TODO later, see above
const byte *c_data;
byte d_buf[32];
unsigned d_len;
int r;
c_data = (const byte *) "\x28\xb5\x2f\xfd\x20\x20\x3d\x00\x00\x08\xff\x01\x00\x34\x4e\x08";
d_len = 32;
r = upx_bzip2_decompress(c_data, 16, d_buf, &d_len, M_BZIP2, nullptr);
CHECK((r == 0 && d_len == 32));
r = upx_bzip2_decompress(c_data, 15, d_buf, &d_len, M_BZIP2, nullptr);
CHECK(r == UPX_E_INPUT_OVERRUN);
d_len = 31;
r = upx_bzip2_decompress(c_data, 16, d_buf, &d_len, M_BZIP2, nullptr);
CHECK(r == UPX_E_OUTPUT_OVERRUN);
UNUSED(r);
#endif // TODO
}
#endif // WITH_BZIP2
/* vim:set ts=4 sw=4 et: */
+4 -3
View File
@@ -2,7 +2,7 @@
This file is part of the UPX executable compressor.
Copyright (C) 1996-2023 Markus Franz Xaver Johannes Oberhumer
Copyright (C) 1996-2024 Markus Franz Xaver Johannes Oberhumer
All Rights Reserved.
UPX and the UCL library are free software; you can redistribute them
@@ -293,7 +293,7 @@ struct ProgressInfo final : public ICompressProgressInfo, public CMyUnknownImp {
virtual ~ProgressInfo() {}
MY_UNKNOWN_IMP
STDMETHOD(SetRatioInfo)(const UInt64 *inSize, const UInt64 *outSize) override;
upx_callback_p cb = nullptr;
upx_callback_t *cb = nullptr;
};
STDMETHODIMP ProgressInfo::SetRatioInfo(const UInt64 *inSize, const UInt64 *outSize) {
@@ -317,7 +317,7 @@ STDMETHODIMP ProgressInfo::SetRatioInfo(const UInt64 *inSize, const UInt64 *outS
#undef RC_NORMALIZE
int upx_lzma_compress(const upx_bytep src, unsigned src_len, upx_bytep dst, unsigned *dst_len,
upx_callback_p cb, int method, int level,
upx_callback_t *cb, int method, int level,
const upx_compress_config_t *cconf_parm, upx_compress_result_t *cresult) {
assert(M_IS_LZMA(method));
assert(level > 0);
@@ -327,6 +327,7 @@ int upx_lzma_compress(const upx_bytep src, unsigned src_len, upx_bytep dst, unsi
HRESULT rh;
const lzma_compress_config_t *const lcconf = cconf_parm ? &cconf_parm->conf_lzma : nullptr;
lzma_compress_result_t *const res = &cresult->result_lzma;
res->reset();
MyLzma::InStream is;
is.AddRef();
+3 -3
View File
@@ -2,7 +2,7 @@
This file is part of the UPX executable compressor.
Copyright (C) 1996-2023 Markus Franz Xaver Johannes Oberhumer
Copyright (C) 1996-2024 Markus Franz Xaver Johannes Oberhumer
All Rights Reserved.
UPX and the UCL library are free software; you can redistribute them
@@ -66,7 +66,7 @@ extern "C" {
static void __UCL_CDECL wrap_nprogress_ucl(ucl_uint a, ucl_uint b, int state, ucl_voidp user) {
if (state != -1 && state != 3)
return;
upx_callback_p cb = (upx_callback_p) user;
upx_callback_t *cb = (upx_callback_t *) user;
if (cb && cb->nprogress)
cb->nprogress(cb, a, b);
}
@@ -77,7 +77,7 @@ static void __UCL_CDECL wrap_nprogress_ucl(ucl_uint a, ucl_uint b, int state, uc
**************************************************************************/
int upx_ucl_compress(const upx_bytep src, unsigned src_len, upx_bytep dst, unsigned *dst_len,
upx_callback_p cb_parm, int method, int level,
upx_callback_t *cb_parm, int method, int level,
const upx_compress_config_t *cconf_parm, upx_compress_result_t *cresult) {
int r;
assert(level > 0);
+3 -4
View File
@@ -2,7 +2,7 @@
This file is part of the UPX executable compressor.
Copyright (C) 1996-2023 Markus Franz Xaver Johannes Oberhumer
Copyright (C) 1996-2024 Markus Franz Xaver Johannes Oberhumer
All Rights Reserved.
UPX and the UCL library are free software; you can redistribute them
@@ -75,7 +75,7 @@ static int convert_errno_from_zlib(int zr) {
**************************************************************************/
int upx_zlib_compress(const upx_bytep src, unsigned src_len, upx_bytep dst, unsigned *dst_len,
upx_callback_p cb_parm, int method, int level,
upx_callback_t *cb_parm, int method, int level,
const upx_compress_config_t *cconf_parm, upx_compress_result_t *cresult) {
assert(method == M_DEFLATE);
assert(level > 0);
@@ -85,6 +85,7 @@ int upx_zlib_compress(const upx_bytep src, unsigned src_len, upx_bytep dst, unsi
int zr;
const zlib_compress_config_t *const lcconf = cconf_parm ? &cconf_parm->conf_zlib : nullptr;
zlib_compress_result_t *const res = &cresult->result_zlib;
res->reset();
if (level == 10)
level = 9;
@@ -99,8 +100,6 @@ int upx_zlib_compress(const upx_bytep src, unsigned src_len, upx_bytep dst, unsi
oassign(strategy, lcconf->strategy);
}
res->dummy = 0;
z_stream s;
s.zalloc = (alloc_func) nullptr;
s.zfree = (free_func) nullptr;
+4 -4
View File
@@ -2,7 +2,7 @@
This file is part of the UPX executable compressor.
Copyright (C) 1996-2023 Markus Franz Xaver Johannes Oberhumer
Copyright (C) 1996-2024 Markus Franz Xaver Johannes Oberhumer
All Rights Reserved.
UPX and the UCL library are free software; you can redistribute them
@@ -55,7 +55,7 @@ static int convert_errno_from_zstd(size_t zr) {
**************************************************************************/
int upx_zstd_compress(const upx_bytep src, unsigned src_len, upx_bytep dst, unsigned *dst_len,
upx_callback_p cb_parm, int method, int level,
upx_callback_t *cb_parm, int method, int level,
const upx_compress_config_t *cconf_parm, upx_compress_result_t *cresult) {
assert(method == M_ZSTD);
assert(level > 0);
@@ -65,6 +65,7 @@ int upx_zstd_compress(const upx_bytep src, unsigned src_len, upx_bytep dst, unsi
size_t zr;
const zstd_compress_config_t *const lcconf = cconf_parm ? &cconf_parm->conf_zstd : nullptr;
zstd_compress_result_t *const res = &cresult->result_zstd;
res->reset();
// TODO later: map level 1..10 to zstd-level 1..22
if (level == 10)
@@ -75,8 +76,6 @@ int upx_zstd_compress(const upx_bytep src, unsigned src_len, upx_bytep dst, unsi
UNUSED(lcconf);
}
res->dummy = 0;
zr = ZSTD_compress(dst, *dst_len, src, src_len, level);
if (ZSTD_isError(zr)) {
*dst_len = 0; // TODO ???
@@ -221,6 +220,7 @@ TEST_CASE("upx_zstd_decompress") {
d_len = 31;
r = upx_zstd_decompress(c_data, 16, d_buf, &d_len, M_ZSTD, nullptr);
CHECK(r == UPX_E_OUTPUT_OVERRUN);
UNUSED(r);
}
#endif // WITH_ZSTD
+110 -61
View File
@@ -2,8 +2,8 @@
This file is part of the UPX executable compressor.
Copyright (C) 1996-2023 Markus Franz Xaver Johannes Oberhumer
Copyright (C) 1996-2023 Laszlo Molnar
Copyright (C) 1996-2024 Markus Franz Xaver Johannes Oberhumer
Copyright (C) 1996-2024 Laszlo Molnar
All Rights Reserved.
UPX and the UCL library are free software; you can redistribute them
@@ -58,7 +58,7 @@ ACC_COMPILE_TIME_ASSERT_HEADER((1u << 31) << 1 == 0)
ACC_COMPILE_TIME_ASSERT_HEADER(((int) (1u << 31)) >> 31 == -1) // arithmetic right shift
ACC_COMPILE_TIME_ASSERT_HEADER((-1) >> 31 == -1) // arithmetic right shift
ACC_COMPILE_TIME_ASSERT_HEADER(CHAR_MAX == 255) // -funsigned-char
ACC_COMPILE_TIME_ASSERT_HEADER((char)(-1) == 255) // -funsigned-char
ACC_COMPILE_TIME_ASSERT_HEADER((char) (-1) == 255)
// enable some more strict warnings for Git developer builds
#if defined(UPX_CONFIG_DISABLE_WSTRICT) && (UPX_CONFIG_DISABLE_WSTRICT + 0 == 0)
@@ -94,7 +94,10 @@ ACC_COMPILE_TIME_ASSERT_HEADER((char)(-1) == 255) // -funsigned-char
#define upx_std_once_flag upx_std_atomic(size_t)
template <class NoexceptCallable>
inline void upx_std_call_once(upx_std_once_flag &flag, NoexceptCallable &&f) {
if (__acc_unlikely(!flag)) { flag = 1; f(); }
if (__acc_unlikely(!flag)) {
flag = 1;
f();
}
}
#endif // WITH_THREADS
@@ -118,7 +121,6 @@ inline constexpr bool upx_is_integral_v = upx_is_integral<T>::value;
#define upx_alignas_max alignas(std::max_align_t)
#endif
/*************************************************************************
// core
**************************************************************************/
@@ -152,7 +154,7 @@ typedef unsigned char uchar;
// convention: use "charptr" when dealing with abstract pointer arithmetics
#define charptr upx_charptr_unit_type *
// upx_charptr_unit_type is some opaque type with sizeof(type) == 1
struct alignas(1) upx_charptr_unit_type { char hidden__; };
struct alignas(1) upx_charptr_unit_type final { char hidden__; };
ACC_COMPILE_TIME_ASSERT_HEADER(sizeof(upx_charptr_unit_type) == 1)
// using the system off_t was a bad idea even back in 199x...
@@ -185,24 +187,27 @@ typedef upx_int64_t upx_off_t;
#define DELETED_FUNCTION = delete
#define UNUSED(var) ACC_UNUSED(var)
/*************************************************************************
// portab
**************************************************************************/
// just in case
// some platform system headers may pre-define these, so undef to avoid conflicts
#undef _
#undef __
#undef ___
#undef dos
#undef large
#undef linux
#undef small
#undef SP
#undef SS
#undef tos
#undef unix
#if (ACC_OS_POSIX) && !defined(__unix__)
#define __unix__ 1
#endif
#if (ACC_OS_CYGWIN || ACC_OS_DOS16 || ACC_OS_DOS32 || ACC_OS_EMX || ACC_OS_OS2 || ACC_OS_OS216 || ACC_OS_WIN16 || ACC_OS_WIN32 || ACC_OS_WIN64)
#if (ACC_OS_CYGWIN || ACC_OS_DOS16 || ACC_OS_DOS32 || ACC_OS_EMX || ACC_OS_OS2 || ACC_OS_OS216 || \
ACC_OS_WIN16 || ACC_OS_WIN32 || ACC_OS_WIN64)
#undef __unix
#undef __unix__
#endif
@@ -285,7 +290,8 @@ typedef upx_int64_t upx_off_t;
#undef PAGE_SIZE
#if !defined(O_BINARY) || (O_BINARY + 0 == 0)
# if (ACC_OS_CYGWIN || ACC_OS_DOS16 || ACC_OS_DOS32 || ACC_OS_EMX || ACC_OS_OS2 || ACC_OS_OS216 || ACC_OS_WIN16 || ACC_OS_WIN32 || ACC_OS_WIN64)
#if (ACC_OS_CYGWIN || ACC_OS_DOS16 || ACC_OS_DOS32 || ACC_OS_EMX || ACC_OS_OS2 || ACC_OS_OS216 || \
ACC_OS_WIN16 || ACC_OS_WIN32 || ACC_OS_WIN64)
#error "missing O_BINARY"
#endif
#endif
@@ -293,7 +299,6 @@ typedef upx_int64_t upx_off_t;
#define O_BINARY 0
#endif
/*************************************************************************
// util
**************************************************************************/
@@ -317,6 +322,7 @@ typedef upx_int64_t upx_off_t;
#define VALGRIND_MAKE_MEM_UNDEFINED(addr, len) 0
#endif
// TODO later: check __MINGW_PRINTF_FORMAT
#if defined(_WIN32) && defined(__MINGW32__) && defined(__GNUC__) && !defined(__clang__)
#define attribute_format(a, b) __attribute__((__format__(__gnu_printf__, a, b)))
#elif (ACC_CC_CLANG || ACC_CC_GNUC)
@@ -351,15 +357,23 @@ inline void NO_fprintf(FILE *, const char *, ...) noexcept {}
#define upx_return_address() nullptr
#endif
// TODO cleanup: we now require C++17, so remove all __packed_struct usage
#define __packed_struct(s) struct alignas(1) s {
#define __packed_struct_end() };
// TODO cleanup: we now require C++17, so remove all packed_struct usage
#define packed_struct(s) struct alignas(1) s
#define COMPILE_TIME_ASSERT_ALIGNOF_USING_SIZEOF__(a,b) { \
typedef a acc_tmp_a_t; typedef b acc_tmp_b_t; \
struct alignas(1) acc_tmp_t { acc_tmp_b_t x; acc_tmp_a_t y; acc_tmp_b_t z; }; \
#define COMPILE_TIME_ASSERT_ALIGNOF_USING_SIZEOF__(a, b) \
{ \
typedef a acc_tmp_a_t; \
typedef b acc_tmp_b_t; \
struct alignas(1) acc_tmp_t { \
acc_tmp_b_t x; \
acc_tmp_a_t y; \
acc_tmp_b_t z; \
}; \
COMPILE_TIME_ASSERT(sizeof(struct acc_tmp_t) == 2 * sizeof(b) + sizeof(a)) \
COMPILE_TIME_ASSERT(sizeof(((acc_tmp_t*)nullptr)->x)+sizeof(((acc_tmp_t*)nullptr)->y)+sizeof(((acc_tmp_t*)nullptr)->z) == 2*sizeof(b)+sizeof(a)) \
COMPILE_TIME_ASSERT(sizeof(((acc_tmp_t *) nullptr)->x) + \
sizeof(((acc_tmp_t *) nullptr)->y) + \
sizeof(((acc_tmp_t *) nullptr)->z) == \
2 * sizeof(b) + sizeof(a)) \
}
#define COMPILE_TIME_ASSERT_ALIGNOF__(a, b) \
COMPILE_TIME_ASSERT_ALIGNOF_USING_SIZEOF__(a, b) \
@@ -369,18 +383,37 @@ inline void NO_fprintf(FILE *, const char *, ...) noexcept {}
#define TABLESIZE(table) ((sizeof(table) / sizeof((table)[0])))
template <class T>
inline T ALIGN_DOWN(const T &a, const T &b) {
T r;
r = (a / b) * b;
return r;
}
template <class T>
inline T ALIGN_UP(const T &a, const T &b) {
T r;
r = ((a + b - 1) / b) * b;
return r;
}
template <class T>
inline T ALIGN_GAP(const T &a, const T &b) {
T r;
r = ALIGN_UP(a, b) - a;
return r;
}
template <class T>
inline T ALIGN_DOWN(const T& a, const T& b) { T r; r = (a / b) * b; return r; }
inline const T &UPX_MAX(const T &a, const T &b) {
if (a < b)
return b;
return a;
}
template <class T>
inline T ALIGN_UP (const T& a, const T& b) { T r; r = ((a + b - 1) / b) * b; return r; }
template <class T>
inline T ALIGN_GAP (const T& a, const T& b) { T r; r = ALIGN_UP(a, b) - a; return r; }
template <class T>
inline const T& UPX_MAX(const T& a, const T& b) { if (a < b) return b; return a; }
template <class T>
inline const T& UPX_MIN(const T& a, const T& b) { if (a < b) return a; return b; }
inline const T &UPX_MIN(const T &a, const T &b) {
if (a < b)
return a;
return b;
}
template <class T>
inline void mem_clear(T *object) noexcept {
@@ -413,12 +446,15 @@ noinline void throwAssertFailed(const char *expr, const char *file, int line, co
#undef assert
#if DEBUG || 0
// generate a warning if assert() is used inside a "noexcept" context
#define assert(e) ((void)(__acc_cte(e) || (assertFailed(#e, __FILE__, __LINE__, __func__), throw 1, 0)))
#define assert(e) \
((void) (__acc_cte(e) || (assertFailed(#e, __FILE__, __LINE__, __func__), throw 1, 0)))
#else
// turn assertion failures into exceptions
#define assert(e) ((void)(__acc_cte(e) || (throwAssertFailed(#e, __FILE__, __LINE__, __func__), throw 1, 0)))
#define assert(e) \
((void) (__acc_cte(e) || (throwAssertFailed(#e, __FILE__, __LINE__, __func__), throw 1, 0)))
#endif
#define assert_noexcept(e) ((void)(__acc_cte(e) || (assertFailed(#e, __FILE__, __LINE__, __func__), 0)))
#define assert_noexcept(e) \
((void) (__acc_cte(e) || (assertFailed(#e, __FILE__, __LINE__, __func__), 0)))
#else
#define assert_noexcept assert
#endif
@@ -426,11 +462,10 @@ noinline void throwAssertFailed(const char *expr, const char *file, int line, co
#include "util/cxxlib.h"
using upx::is_same_any_v;
using upx::noncopyable;
using upx::tribool;
using upx::OptVar;
using upx::tribool;
#define usizeof(expr) (upx::UnsignedSizeOf<sizeof(expr)>::value)
/*************************************************************************
// constants
**************************************************************************/
@@ -439,7 +474,7 @@ using upx::OptVar;
#define EXIT_OK 0
#define EXIT_ERROR 1
#define EXIT_WARN 2
//
#define EXIT_USAGE 1
#define EXIT_FILE_READ 1
#define EXIT_FILE_WRITE 1
@@ -448,12 +483,10 @@ using upx::OptVar;
#define EXIT_INIT 1
#define EXIT_INTERNAL 1
// magic constants for patching
#define UPX_MAGIC_LE32 0x21585055 /* "UPX!" */
#define UPX_MAGIC2_LE32 0xD5D0D8A1
// upx_compress() error codes
#define UPX_E_OK (0)
#define UPX_E_ERROR (-1)
@@ -467,7 +500,6 @@ using upx::OptVar;
#define UPX_E_NOT_YET_IMPLEMENTED (-9)
#define UPX_E_INVALID_ARGUMENT (-10)
// Executable formats (info: big endian types are >= 128); DO NOT CHANGE
#define UPX_F_DOS_COM 1
#define UPX_F_DOS_SYS 2
@@ -545,6 +577,7 @@ using upx::OptVar;
#define M_LZMA 14
#define M_DEFLATE 15 // zlib
#define M_ZSTD 16
#define M_BZIP2 17
// compression methods internal usage
#define M_ALL (-1)
#define M_END (-2)
@@ -559,7 +592,7 @@ using upx::OptVar;
#define M_IS_LZMA(x) (((x) &255) == M_LZMA)
#define M_IS_DEFLATE(x) ((x) == M_DEFLATE)
#define M_IS_ZSTD(x) ((x) == M_ZSTD)
#define M_IS_BZIP2(x) ((x) == M_BZIP2)
// filters internal usage
#define FT_END (-1)
@@ -567,7 +600,6 @@ using upx::OptVar;
#define FT_SKIP (-3)
#define FT_ULTRA_BRUTE (-4)
/*************************************************************************
// compression - setup and callback_t
**************************************************************************/
@@ -584,23 +616,26 @@ using upx::OptVar;
#endif
struct upx_callback_t;
typedef upx_callback_t *upx_callback_p;
typedef void (__acc_cdecl *upx_progress_func_t)
(upx_callback_p, unsigned, unsigned);
typedef void(__acc_cdecl *upx_progress_func_t)(upx_callback_t *, unsigned, unsigned);
struct upx_callback_t {
struct upx_callback_t final {
upx_progress_func_t nprogress;
void *user;
void reset() noexcept { mem_clear(this); }
};
/*************************************************************************
// compression - config_t
**************************************************************************/
struct lzma_compress_config_t {
struct bzip2_compress_config_t final {
unsigned dummy;
void reset() noexcept;
};
struct lzma_compress_config_t final {
typedef OptVar<unsigned, 2u, 0u, 4u> pos_bits_t; // pb
typedef OptVar<unsigned, 0u, 0u, 4u> lit_pos_bits_t; // lp
typedef OptVar<unsigned, 3u, 0u, 8u> lit_context_bits_t; // lc
@@ -620,11 +655,11 @@ struct lzma_compress_config_t {
void reset() noexcept;
};
struct ucl_compress_config_t : public REAL_ucl_compress_config_t {
struct ucl_compress_config_t final : public REAL_ucl_compress_config_t {
void reset() noexcept { memset(this, 0xff, sizeof(*this)); }
};
struct zlib_compress_config_t {
struct zlib_compress_config_t final {
typedef OptVar<unsigned, 8u, 1u, 9u> mem_level_t; // ml
typedef OptVar<unsigned, 15u, 9u, 15u> window_bits_t; // wb
typedef OptVar<unsigned, 0u, 0u, 4u> strategy_t; // st
@@ -636,29 +671,41 @@ struct zlib_compress_config_t {
void reset() noexcept;
};
struct zstd_compress_config_t {
struct zstd_compress_config_t final {
unsigned dummy;
void reset() noexcept;
};
struct upx_compress_config_t {
struct upx_compress_config_t final {
bzip2_compress_config_t conf_bzip2;
lzma_compress_config_t conf_lzma;
ucl_compress_config_t conf_ucl;
zlib_compress_config_t conf_zlib;
zstd_compress_config_t conf_zstd;
void reset() noexcept { conf_lzma.reset(); conf_ucl.reset(); conf_zlib.reset(); conf_zstd.reset(); }
void reset() noexcept {
conf_bzip2.reset();
conf_lzma.reset();
conf_ucl.reset();
conf_zlib.reset();
conf_zstd.reset();
}
};
#define NULL_cconf ((upx_compress_config_t *) nullptr)
/*************************************************************************
// compression - result_t
**************************************************************************/
struct lzma_compress_result_t {
struct bzip2_compress_result_t final {
unsigned dummy;
void reset() noexcept { mem_clear(this); }
};
struct lzma_compress_result_t final {
unsigned pos_bits; // pb
unsigned lit_pos_bits; // lp
unsigned lit_context_bits; // lc
@@ -671,25 +718,25 @@ struct lzma_compress_result_t {
void reset() noexcept { mem_clear(this); }
};
struct ucl_compress_result_t {
struct ucl_compress_result_t final {
ucl_uint result[16];
void reset() noexcept { mem_clear(this); }
};
struct zlib_compress_result_t {
struct zlib_compress_result_t final {
unsigned dummy;
void reset() noexcept { mem_clear(this); }
};
struct zstd_compress_result_t {
struct zstd_compress_result_t final {
unsigned dummy;
void reset() noexcept { mem_clear(this); }
};
struct upx_compress_result_t {
struct upx_compress_result_t final {
// debugging aid
struct Debug {
int method, level;
@@ -698,6 +745,7 @@ struct upx_compress_result_t {
};
Debug debug;
bzip2_compress_result_t result_bzip2;
lzma_compress_result_t result_lzma;
ucl_compress_result_t result_ucl;
zlib_compress_result_t result_zlib;
@@ -705,11 +753,14 @@ struct upx_compress_result_t {
void reset() noexcept {
debug.reset();
result_lzma.reset(); result_ucl.reset(); result_zlib.reset(); result_zstd.reset();
result_bzip2.reset();
result_lzma.reset();
result_ucl.reset();
result_zlib.reset();
result_zstd.reset();
}
};
/*************************************************************************
// globals
**************************************************************************/
@@ -764,13 +815,13 @@ void show_usage();
void show_version(bool one_line = false);
// compress/compress.cpp
// clang-format off
unsigned upx_adler32(const void *buf, unsigned len, unsigned adler = 1);
unsigned upx_crc32 (const void *buf, unsigned len, unsigned crc = 0);
// clang-format off
int upx_compress ( const upx_bytep src, unsigned src_len,
upx_bytep dst, unsigned *dst_len,
upx_callback_p cb,
upx_callback_t *cb,
int method, int level,
const upx_compress_config_t *cconf,
upx_compress_result_t *cresult );
@@ -786,7 +837,6 @@ int upx_test_overlap ( const upx_bytep buf,
const upx_compress_result_t *cresult );
// clang-format on
#include "util/snprintf.h" // must get included first!
#include "util/util.h"
#include "options.h"
@@ -797,5 +847,4 @@ int upx_test_overlap ( const upx_bytep buf,
#include "util/raw_bytes.h"
#include "util/xspan.h"
/* vim:set ts=4 sw=4 et: */
+2 -2
View File
@@ -2,8 +2,8 @@
This file is part of the UPX executable compressor.
Copyright (C) 1996-2023 Markus Franz Xaver Johannes Oberhumer
Copyright (C) 1996-2023 Laszlo Molnar
Copyright (C) 1996-2024 Markus Franz Xaver Johannes Oberhumer
Copyright (C) 1996-2024 Laszlo Molnar
All Rights Reserved.
UPX and the UCL library are free software; you can redistribute them
+2 -2
View File
@@ -2,8 +2,8 @@
This file is part of the UPX executable compressor.
Copyright (C) 1996-2023 Markus Franz Xaver Johannes Oberhumer
Copyright (C) 1996-2023 Laszlo Molnar
Copyright (C) 1996-2024 Markus Franz Xaver Johannes Oberhumer
Copyright (C) 1996-2024 Laszlo Molnar
All Rights Reserved.
UPX and the UCL library are free software; you can redistribute them
+2 -2
View File
@@ -2,8 +2,8 @@
This file is part of the UPX executable compressor.
Copyright (C) 1996-2023 Markus Franz Xaver Johannes Oberhumer
Copyright (C) 1996-2023 Laszlo Molnar
Copyright (C) 1996-2024 Markus Franz Xaver Johannes Oberhumer
Copyright (C) 1996-2024 Laszlo Molnar
All Rights Reserved.
UPX and the UCL library are free software; you can redistribute them
+2 -2
View File
@@ -2,8 +2,8 @@
This file is part of the UPX executable compressor.
Copyright (C) 1996-2023 Markus Franz Xaver Johannes Oberhumer
Copyright (C) 1996-2023 Laszlo Molnar
Copyright (C) 1996-2024 Markus Franz Xaver Johannes Oberhumer
Copyright (C) 1996-2024 Laszlo Molnar
All Rights Reserved.
UPX and the UCL library are free software; you can redistribute them
+2 -2
View File
@@ -2,8 +2,8 @@
This file is part of the UPX executable compressor.
Copyright (C) 1996-2023 Markus Franz Xaver Johannes Oberhumer
Copyright (C) 1996-2023 Laszlo Molnar
Copyright (C) 1996-2024 Markus Franz Xaver Johannes Oberhumer
Copyright (C) 1996-2024 Laszlo Molnar
All Rights Reserved.
UPX and the UCL library are free software; you can redistribute them
+2 -2
View File
@@ -2,8 +2,8 @@
This file is part of the UPX executable compressor.
Copyright (C) 1996-2023 Markus Franz Xaver Johannes Oberhumer
Copyright (C) 1996-2023 Laszlo Molnar
Copyright (C) 1996-2024 Markus Franz Xaver Johannes Oberhumer
Copyright (C) 1996-2024 Laszlo Molnar
All Rights Reserved.
UPX and the UCL library are free software; you can redistribute them
+2 -2
View File
@@ -2,8 +2,8 @@
This file is part of the UPX executable compressor.
Copyright (C) 1996-2023 Markus Franz Xaver Johannes Oberhumer
Copyright (C) 1996-2023 Laszlo Molnar
Copyright (C) 1996-2024 Markus Franz Xaver Johannes Oberhumer
Copyright (C) 1996-2024 Laszlo Molnar
All Rights Reserved.
UPX and the UCL library are free software; you can redistribute them
+2 -2
View File
@@ -2,8 +2,8 @@
This file is part of the UPX executable compressor.
Copyright (C) 1996-2023 Markus Franz Xaver Johannes Oberhumer
Copyright (C) 1996-2023 Laszlo Molnar
Copyright (C) 1996-2024 Markus Franz Xaver Johannes Oberhumer
Copyright (C) 1996-2024 Laszlo Molnar
All Rights Reserved.
UPX and the UCL library are free software; you can redistribute them
+2 -2
View File
@@ -2,8 +2,8 @@
This file is part of the UPX executable compressor.
Copyright (C) 1996-2023 Markus Franz Xaver Johannes Oberhumer
Copyright (C) 1996-2023 Laszlo Molnar
Copyright (C) 1996-2024 Markus Franz Xaver Johannes Oberhumer
Copyright (C) 1996-2024 Laszlo Molnar
All Rights Reserved.
UPX and the UCL library are free software; you can redistribute them
+2 -2
View File
@@ -2,8 +2,8 @@
This file is part of the UPX executable compressor.
Copyright (C) 1996-2023 Markus Franz Xaver Johannes Oberhumer
Copyright (C) 1996-2023 Laszlo Molnar
Copyright (C) 1996-2024 Markus Franz Xaver Johannes Oberhumer
Copyright (C) 1996-2024 Laszlo Molnar
All Rights Reserved.
UPX and the UCL library are free software; you can redistribute them
+14 -4
View File
@@ -2,8 +2,8 @@
This file is part of the UPX executable compressor.
Copyright (C) 1996-2023 Markus Franz Xaver Johannes Oberhumer
Copyright (C) 1996-2023 Laszlo Molnar
Copyright (C) 1996-2024 Markus Franz Xaver Johannes Oberhumer
Copyright (C) 1996-2024 Laszlo Molnar
All Rights Reserved.
UPX and the UCL library are free software; you can redistribute them
@@ -150,7 +150,7 @@ void throwCantPack(const char *format, ...) {
char msg[1024];
va_list ap;
va_start(ap, format);
(void) upx_safe_vsnprintf(msg, sizeof(msg), format, ap);
(void) upx_safe_vsnprintf_noexcept(msg, sizeof(msg), format, ap);
va_end(ap);
throwCantPack(msg);
}
@@ -160,7 +160,17 @@ void throwCantUnpack(const char *format, ...) {
char msg[1024];
va_list ap;
va_start(ap, format);
(void) upx_safe_vsnprintf(msg, sizeof(msg), format, ap);
(void) upx_safe_vsnprintf_noexcept(msg, sizeof(msg), format, ap);
va_end(ap);
throwCantUnpack(msg);
}
template <>
void throwInternalError(const char *format, ...) {
char msg[1024];
va_list ap;
va_start(ap, format);
(void) upx_safe_vsnprintf_noexcept(msg, sizeof(msg), format, ap);
va_end(ap);
throwCantUnpack(msg);
}
+11 -8
View File
@@ -2,8 +2,8 @@
This file is part of the UPX executable compressor.
Copyright (C) 1996-2023 Markus Franz Xaver Johannes Oberhumer
Copyright (C) 1996-2023 Laszlo Molnar
Copyright (C) 1996-2024 Markus Franz Xaver Johannes Oberhumer
Copyright (C) 1996-2024 Laszlo Molnar
All Rights Reserved.
UPX and the UCL library are free software; you can redistribute them
@@ -43,7 +43,7 @@ protected:
Throwable(const char *m = nullptr, int e = 0, bool w = false) noexcept;
public:
Throwable(const Throwable &) noexcept;
Throwable(const Throwable &) noexcept; // copy constructor
virtual ~Throwable() noexcept;
const char *getMsg() const noexcept { return msg; }
int getErrno() const noexcept { return err; }
@@ -57,14 +57,13 @@ protected:
private:
// disable copy assignment and move
Throwable &operator=(const Throwable &) DELETED_FUNCTION;
Throwable(Throwable &&) noexcept DELETED_FUNCTION;
Throwable &operator=(Throwable &&) noexcept DELETED_FUNCTION;
Throwable &operator=(const Throwable &) noexcept DELETED_FUNCTION; // copy assignment
UPX_CXX_DISABLE_MOVE(Throwable)
// disable dynamic allocation => force throwing by value
ACC_CXX_DISABLE_NEW_DELETE
UPX_CXX_DISABLE_NEW_DELETE(Throwable)
// disable taking the address => force passing by reference
// [I'm not too sure about this design decision, but we can always allow it if needed]
Throwable *operator&() const noexcept DELETED_FUNCTION;
UPX_CXX_DISABLE_ADDRESS(Throwable)
private:
static upx_std_atomic(size_t) debug_counter; // for debugging
@@ -212,6 +211,10 @@ template <class T>
void throwCantUnpack(const T *, ...) DELETED_FUNCTION;
template <>
NORET void throwCantUnpack(const char *format, ...) may_throw attribute_format(1, 2);
template <class T>
void throwInternalError(const T *, ...) DELETED_FUNCTION;
template <>
NORET void throwInternalError(const char *format, ...) may_throw attribute_format(1, 2);
#undef NORET
+2 -2
View File
@@ -2,8 +2,8 @@
This file is part of the UPX executable compressor.
Copyright (C) 1996-2023 Markus Franz Xaver Johannes Oberhumer
Copyright (C) 1996-2023 Laszlo Molnar
Copyright (C) 1996-2024 Markus Franz Xaver Johannes Oberhumer
Copyright (C) 1996-2024 Laszlo Molnar
All Rights Reserved.
UPX and the UCL library are free software; you can redistribute them
+2 -2
View File
@@ -2,8 +2,8 @@
This file is part of the UPX executable compressor.
Copyright (C) 1996-2023 Markus Franz Xaver Johannes Oberhumer
Copyright (C) 1996-2023 Laszlo Molnar
Copyright (C) 1996-2024 Markus Franz Xaver Johannes Oberhumer
Copyright (C) 1996-2024 Laszlo Molnar
All Rights Reserved.
UPX and the UCL library are free software; you can redistribute them
+2 -2
View File
@@ -2,8 +2,8 @@
This file is part of the UPX executable compressor.
Copyright (C) 1996-2023 Markus Franz Xaver Johannes Oberhumer
Copyright (C) 1996-2023 Laszlo Molnar
Copyright (C) 1996-2024 Markus Franz Xaver Johannes Oberhumer
Copyright (C) 1996-2024 Laszlo Molnar
All Rights Reserved.
UPX and the UCL library are free software; you can redistribute them
+2 -2
View File
@@ -2,8 +2,8 @@
This file is part of the UPX executable compressor.
Copyright (C) 1996-2023 Markus Franz Xaver Johannes Oberhumer
Copyright (C) 1996-2023 Laszlo Molnar
Copyright (C) 1996-2024 Markus Franz Xaver Johannes Oberhumer
Copyright (C) 1996-2024 Laszlo Molnar
All Rights Reserved.
UPX and the UCL library are free software; you can redistribute them
+2 -2
View File
@@ -2,8 +2,8 @@
This file is part of the UPX executable compressor.
Copyright (C) 1996-2023 Markus Franz Xaver Johannes Oberhumer
Copyright (C) 1996-2023 Laszlo Molnar
Copyright (C) 1996-2024 Markus Franz Xaver Johannes Oberhumer
Copyright (C) 1996-2024 Laszlo Molnar
All Rights Reserved.
UPX and the UCL library are free software; you can redistribute them
+2 -2
View File
@@ -2,8 +2,8 @@
This file is part of the UPX executable compressor.
Copyright (C) 1996-2023 Markus Franz Xaver Johannes Oberhumer
Copyright (C) 1996-2023 Laszlo Molnar
Copyright (C) 1996-2024 Markus Franz Xaver Johannes Oberhumer
Copyright (C) 1996-2024 Laszlo Molnar
All Rights Reserved.
UPX and the UCL library are free software; you can redistribute them
+3 -3
View File
@@ -2,9 +2,9 @@
This file is part of the UPX executable compressor.
Copyright (C) 1996-2023 Markus Franz Xaver Johannes Oberhumer
Copyright (C) 1996-2023 Laszlo Molnar
Copyright (C) 2000-2023 John F. Reiser
Copyright (C) 1996-2024 Markus Franz Xaver Johannes Oberhumer
Copyright (C) 1996-2024 Laszlo Molnar
Copyright (C) 2000-2024 John F. Reiser
All Rights Reserved.
UPX and the UCL library are free software; you can redistribute them
+3 -3
View File
@@ -2,9 +2,9 @@
This file is part of the UPX executable compressor.
Copyright (C) 1996-2023 Markus Franz Xaver Johannes Oberhumer
Copyright (C) 1996-2023 Laszlo Molnar
Copyright (C) 2000-2023 John F. Reiser
Copyright (C) 1996-2024 Markus Franz Xaver Johannes Oberhumer
Copyright (C) 1996-2024 Laszlo Molnar
Copyright (C) 2000-2024 John F. Reiser
All Rights Reserved.
UPX and the UCL library are free software; you can redistribute them
+3 -3
View File
@@ -2,9 +2,9 @@
This file is part of the UPX executable compressor.
Copyright (C) 1996-2023 Markus Franz Xaver Johannes Oberhumer
Copyright (C) 1996-2023 Laszlo Molnar
Copyright (C) 2000-2023 John F. Reiser
Copyright (C) 1996-2024 Markus Franz Xaver Johannes Oberhumer
Copyright (C) 1996-2024 Laszlo Molnar
Copyright (C) 2000-2024 John F. Reiser
All Rights Reserved.
UPX and the UCL library are free software; you can redistribute them
+2 -2
View File
@@ -2,8 +2,8 @@
This file is part of the UPX executable compressor.
Copyright (C) 1996-2023 Markus Franz Xaver Johannes Oberhumer
Copyright (C) 1996-2023 Laszlo Molnar
Copyright (C) 1996-2024 Markus Franz Xaver Johannes Oberhumer
Copyright (C) 1996-2024 Laszlo Molnar
All Rights Reserved.
UPX and the UCL library are free software; you can redistribute them
+2 -2
View File
@@ -2,8 +2,8 @@
This file is part of the UPX executable compressor.
Copyright (C) 1996-2023 Markus Franz Xaver Johannes Oberhumer
Copyright (C) 1996-2023 Laszlo Molnar
Copyright (C) 1996-2024 Markus Franz Xaver Johannes Oberhumer
Copyright (C) 1996-2024 Laszlo Molnar
All Rights Reserved.
UPX and the UCL library are free software; you can redistribute them
+2 -2
View File
@@ -2,8 +2,8 @@
This file is part of the UPX executable compressor.
Copyright (C) 1996-2023 Markus Franz Xaver Johannes Oberhumer
Copyright (C) 1996-2023 Laszlo Molnar
Copyright (C) 1996-2024 Markus Franz Xaver Johannes Oberhumer
Copyright (C) 1996-2024 Laszlo Molnar
All Rights Reserved.
UPX and the UCL library are free software; you can redistribute them
+3 -3
View File
@@ -2,9 +2,9 @@
This file is part of the UPX executable compressor.
Copyright (C) 1996-2023 Markus Franz Xaver Johannes Oberhumer
Copyright (C) 1996-2023 Laszlo Molnar
Copyright (C) 2004-2023 John F. Reiser
Copyright (C) 1996-2024 Markus Franz Xaver Johannes Oberhumer
Copyright (C) 1996-2024 Laszlo Molnar
Copyright (C) 2004-2024 John F. Reiser
All Rights Reserved.
UPX and the UCL library are free software; you can redistribute them
+2 -2
View File
@@ -2,8 +2,8 @@
This file is part of the UPX executable compressor.
Copyright (C) 1996-2023 Markus Franz Xaver Johannes Oberhumer
Copyright (C) 1996-2023 Laszlo Molnar
Copyright (C) 1996-2024 Markus Franz Xaver Johannes Oberhumer
Copyright (C) 1996-2024 Laszlo Molnar
All Rights Reserved.
UPX and the UCL library are free software; you can redistribute them
+2 -2
View File
@@ -2,8 +2,8 @@
This file is part of the UPX executable compressor.
Copyright (C) 1996-2023 Markus Franz Xaver Johannes Oberhumer
Copyright (C) 1996-2023 Laszlo Molnar
Copyright (C) 1996-2024 Markus Franz Xaver Johannes Oberhumer
Copyright (C) 1996-2024 Laszlo Molnar
All Rights Reserved.
UPX and the UCL library are free software; you can redistribute them
+2 -2
View File
@@ -2,8 +2,8 @@
This file is part of the UPX executable compressor.
Copyright (C) 1996-2023 Markus Franz Xaver Johannes Oberhumer
Copyright (C) 1996-2023 Laszlo Molnar
Copyright (C) 1996-2024 Markus Franz Xaver Johannes Oberhumer
Copyright (C) 1996-2024 Laszlo Molnar
All Rights Reserved.
UPX and the UCL library are free software; you can redistribute them
+2 -2
View File
@@ -2,8 +2,8 @@
This file is part of the UPX executable compressor.
Copyright (C) 1996-2023 Markus Franz Xaver Johannes Oberhumer
Copyright (C) 1996-2023 Laszlo Molnar
Copyright (C) 1996-2024 Markus Franz Xaver Johannes Oberhumer
Copyright (C) 1996-2024 Laszlo Molnar
All Rights Reserved.
UPX and the UCL library are free software; you can redistribute them
+2 -2
View File
@@ -2,8 +2,8 @@
This file is part of the UPX executable compressor.
Copyright (C) 1996-2023 Markus Franz Xaver Johannes Oberhumer
Copyright (C) 1996-2023 Laszlo Molnar
Copyright (C) 1996-2024 Markus Franz Xaver Johannes Oberhumer
Copyright (C) 1996-2024 Laszlo Molnar
All Rights Reserved.
UPX and the UCL library are free software; you can redistribute them
+25 -7
View File
@@ -2,7 +2,7 @@
This file is part of the UPX executable compressor.
Copyright (C) 1996-2023 Markus Franz Xaver Johannes Oberhumer
Copyright (C) 1996-2024 Markus Franz Xaver Johannes Oberhumer
All Rights Reserved.
UPX and the UCL library are free software; you can redistribute them
@@ -57,11 +57,26 @@ static_assert(sizeof(void *) == 8);
#if !defined(_FILE_OFFSET_BITS)
#define _FILE_OFFSET_BITS 64
#endif
#if defined(_WIN32) && defined(__MINGW32__) && defined(__GNUC__)
#if !defined(_USE_MINGW_ANSI_STDIO)
#define _USE_MINGW_ANSI_STDIO 1
#if defined(_WIN32) && defined(__MINGW32__) && (defined(__clang__) || defined(__GNUC__))
#if !defined(__USE_MINGW_ANSI_STDIO)
#define __USE_MINGW_ANSI_STDIO 1
#endif
#endif
#if defined(_WIN32)
// disable silly warnings about using "deprecated" POSIX functions like fopen()
#if !defined(_CRT_NONSTDC_NO_DEPRECATE)
#define _CRT_NONSTDC_NO_DEPRECATE 1
#endif
#if !defined(_CRT_NONSTDC_NO_WARNINGS)
#define _CRT_NONSTDC_NO_WARNINGS 1
#endif
#if !defined(_CRT_SECURE_NO_DEPRECATE)
#define _CRT_SECURE_NO_DEPRECATE 1
#endif
#if !defined(_CRT_SECURE_NO_WARNINGS)
#define _CRT_SECURE_NO_WARNINGS 1
#endif
#endif // _WIN32
// ACC and C system headers
#ifndef ACC_CFG_USE_NEW_STYLE_CASTS
@@ -98,9 +113,6 @@ static_assert(sizeof(void *) == 8);
#include <type_traits>
// C++ multithreading (UPX currently does not use multithreading)
#ifndef WITH_THREADS
#define WITH_THREADS 0
#endif
#if __STDC_NO_ATOMICS__
#undef WITH_THREADS
#endif
@@ -152,4 +164,10 @@ static_assert(sizeof(void *) == 8);
#endif
#endif
#ifdef WANT_WINDOWS_LEAN_H
#if defined(_WIN32) || defined(__CYGWIN__)
#include "util/windows_lean.h"
#endif
#endif
/* vim:set ts=4 sw=4 et: */
+68 -15
View File
@@ -2,8 +2,8 @@
This file is part of the UPX executable compressor.
Copyright (C) 1996-2023 Markus Franz Xaver Johannes Oberhumer
Copyright (C) 1996-2023 Laszlo Molnar
Copyright (C) 1996-2024 Markus Franz Xaver Johannes Oberhumer
Copyright (C) 1996-2024 Laszlo Molnar
All Rights Reserved.
UPX and the UCL library are free software; you can redistribute them
@@ -25,6 +25,7 @@
<markus@oberhumer.com> <ezerotven+github@gmail.com>
*/
#define WANT_WINDOWS_LEAN_H 1 // _WIN32_WINNT
#include "conf.h"
#include "compress/compress.h" // upx_ucl_version_string()
// for list_all_packers():
@@ -410,14 +411,19 @@ void show_version(bool one_line) {
if (v != nullptr && v[0])
fprintf(f, "zstd data compression library %s\n", v);
#endif
#if (WITH_BZIP2)
v = upx_bzip2_version_string();
if (v != nullptr && v[0])
fprintf(f, "bzip2 data compression library %s\n", v);
#endif
#if !defined(DOCTEST_CONFIG_DISABLE)
fprintf(f, "doctest C++ testing framework version %s\n", DOCTEST_VERSION_STR);
#endif
// clang-format off
fprintf(f, "Copyright (C) 1996-2023 Markus Franz Xaver Johannes Oberhumer\n");
fprintf(f, "Copyright (C) 1996-2023 Laszlo Molnar\n");
fprintf(f, "Copyright (C) 2000-2023 John F. Reiser\n");
fprintf(f, "Copyright (C) 2002-2023 Jens Medoch\n");
fprintf(f, "Copyright (C) 1996-2024 Markus Franz Xaver Johannes Oberhumer\n");
fprintf(f, "Copyright (C) 1996-2024 Laszlo Molnar\n");
fprintf(f, "Copyright (C) 2000-2024 John F. Reiser\n");
fprintf(f, "Copyright (C) 2002-2024 Jens Medoch\n");
#if (WITH_ZLIB)
fprintf(f, "Copyright (C) 1995" "-2023 Jean-loup Gailly and Mark Adler\n");
#endif
@@ -428,6 +434,9 @@ void show_version(bool one_line) {
// see vendor/zstd/LICENSE; main author is Yann Collet
fprintf(f, "Copyright (C) 2015" "-2023 Meta Platforms, Inc. and affiliates\n");
#endif
#if (WITH_BZIP2)
fprintf(f, "Copyright (C) 1996" "-2010 Julian Seward\n"); // see <bzlib.h>
#endif
#if !defined(DOCTEST_CONFIG_DISABLE)
fprintf(f, "Copyright (C) 2016" "-2023 Viktor Kirilov\n");
#endif
@@ -449,19 +458,56 @@ void show_sysinfo(const char *options_var) {
con_fprintf(f, "UPX version: ");
fflush(f);
show_version(true);
con_fprintf(f, "UPX version internal: 0x%06x %s\n", UPX_VERSION_HEX, UPX_VERSION_STRING);
}
fflush(stdout);
// Compilation Flags
if (opt->verbose >= 2) {
{
size_t cf_count = 0;
auto cf_print = [f, &cf_count](const char *name, const char *fmt, upx_int64_t v) noexcept {
auto cf_print = [f, &cf_count](const char *name, const char *fmt, upx_int64_t v,
int need_verbose = 2) noexcept {
if (opt->verbose < need_verbose)
return;
if (cf_count++ == 0)
con_fprintf(f, "\nCompilation flags:\n");
con_fprintf(f, " %s = ", name);
con_fprintf(f, fmt, v);
con_fprintf(f, "\n");
};
// language
cf_print("__cplusplus", "%lld", __cplusplus + 0, 3);
#if defined(_MSVC_LANG)
cf_print("_MSVC_LANG", "%lld", _MSVC_LANG + 0, 3);
#endif
// compiler
#if defined(ACC_CC_CLANG)
cf_print("ACC_CC_CLANG", "0x%06llx", ACC_CC_CLANG + 0, 3);
#endif
#if defined(ACC_CC_GNUC)
cf_print("ACC_CC_GNUC", "0x%06llx", ACC_CC_GNUC + 0, 3);
#endif
#if defined(ACC_CC_MSC)
cf_print("ACC_CC_MSC", "%lld", ACC_CC_MSC + 0, 3);
#endif
#if defined(__clang__)
cf_print("__clang__", "%lld", __clang__ + 0);
#endif
#if defined(__clang_major__)
cf_print("__clang_major__", "%lld", __clang_major__ + 0);
#endif
#if defined(__GNUC__)
cf_print("__GNUC__", "%lld", __GNUC__ + 0);
#endif
#if defined(__GNUC_MINOR__)
cf_print("__GNUC_MINOR__", "%lld", __GNUC_MINOR__ + 0);
#endif
#if defined(_MSC_VER)
cf_print("_MSC_VER", "%lld", _MSC_VER + 0);
#endif
#if defined(_MSC_FULL_VER)
cf_print("_MSC_FULL_VER", "%lld", _MSC_FULL_VER + 0);
#endif
// OS and libc
#if defined(WINVER)
cf_print("WINVER", "0x%04llx", WINVER + 0);
@@ -472,11 +518,11 @@ void show_sysinfo(const char *options_var) {
#if defined(__MSVCRT_VERSION__)
cf_print("__MSVCRT_VERSION__", "0x%04llx", __MSVCRT_VERSION__ + 0);
#endif
#if defined(_USE_MINGW_ANSI_STDIO)
cf_print("_USE_MINGW_ANSI_STDIO", "%lld", _USE_MINGW_ANSI_STDIO + 0);
#if defined(__MINGW64_VERSION_MAJOR)
cf_print("__MINGW64_VERSION_MAJOR", "%lld", __MINGW64_VERSION_MAJOR + 0);
#endif
#if defined(__USE_MINGW_ANSI_STDIO)
cf_print("__USE_MINGW_ANSI_STDIO", "%lld", __USE_MINGW_ANSI_STDIO + 0);
cf_print("__USE_MINGW_ANSI_STDIO", "%lld", __USE_MINGW_ANSI_STDIO + 0, 3);
#endif
#if defined(__GLIBC__)
cf_print("__GLIBC__", "%lld", __GLIBC__ + 0);
@@ -484,10 +530,15 @@ void show_sysinfo(const char *options_var) {
#if defined(__GLIBC_MINOR__)
cf_print("__GLIBC_MINOR__", "%lld", __GLIBC_MINOR__ + 0);
#endif
// compiler
#if defined(_MSC_VER) && defined(_MSC_FULL_VER)
cf_print("_MSC_VER", "%lld", _MSC_VER + 0);
cf_print("_MSC_FULL_VER", "%lld", _MSC_FULL_VER + 0);
// misc compilation options
#if defined(UPX_CONFIG_DISABLE_WSTRICT)
cf_print("UPX_CONFIG_DISABLE_WSTRICT", "%lld", UPX_CONFIG_DISABLE_WSTRICT + 0, 3);
#endif
#if defined(UPX_CONFIG_DISABLE_WERROR)
cf_print("UPX_CONFIG_DISABLE_WERROR", "%lld", UPX_CONFIG_DISABLE_WERROR + 0, 3);
#endif
#if defined(WITH_THREADS)
cf_print("WITH_THREADS", "%lld", WITH_THREADS + 0);
#endif
UNUSED(cf_count);
UNUSED(cf_print);
@@ -517,6 +568,8 @@ void show_sysinfo(const char *options_var) {
con_fprintf(f, "\n");
if (e && e[0])
con_fprintf(f, "Contents of environment variable %s: '%s'\n\n", options_var, e);
else if (e)
con_fprintf(f, "Environment variable '%s' is set but empty.\n\n", options_var);
else
con_fprintf(f, "Environment variable '%s' is not set.\n\n", options_var);
}

Some files were not shown because too many files have changed in this diff Show More