From 42e868ac936ec4426c3971fa8eef8e9195131456 Mon Sep 17 00:00:00 2001 From: "Austin S. Hemmelgarn" Date: Thu, 3 Sep 2026 07:12:13 -0400 Subject: [PATCH 1/3] Add support for Zopfli compression. Zopfli is a tool for gzip/deflate/zlib compatible compression that runs much slower than the standard implementations, but produces measurably better compression ratios. The resultant compressed files are 100% compatible with standrd gzip tooling for extraction, so this provides a way for users to get better compression ratios without sacrificing portability of the resultant archives. --- .github/workflows/build.yml | 6 +++--- makeself.1 | 3 +++ makeself.sh | 9 +++++++++ test/extracttest | 10 ++++++++++ 4 files changed, 25 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index dbc8ace..738ae87 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -32,17 +32,17 @@ jobs: if: matrix.container == 'ubuntu:latest' run: | apt update - apt -y install git make pbzip2 binutils bzip2 zstd gnupg openssl + apt -y install git make pbzip2 binutils bzip2 zstd gnupg openssl zopfli - name: Install RockyLinux packages if: matrix.container == 'rockylinux:9' run: | dnf groupinstall -y "Development Tools" "RPM Development Tools" - dnf install -y zstd binutils binutils-devel gnupg2 pbzip2 openssl + dnf install -y zstd binutils binutils-devel gnupg2 pbzip2 openssl zopfli - name: Install Alpine packages if: matrix.container == 'alpine:latest' - run: apk add --no-cache bash git make libarchive-tools gnupg coreutils binutils bzip2 zstd openssl + run: apk add --no-cache bash git make libarchive-tools gnupg coreutils binutils bzip2 zstd openssl zopfli - name: Install macOS packages if: runner.os == 'macOS' diff --git a/makeself.1 b/makeself.1 index fa21216..d8f3dd4 100644 --- a/makeself.1 +++ b/makeself.1 @@ -50,6 +50,9 @@ Compress using lz4. .B --pigz Compress using pigz. .TP +.B --zopfli +Compress using zopfli. +.TP .B --zstd Compress using zstd. .TP diff --git a/makeself.sh b/makeself.sh index 776ebd3..3e68ee1 100755 --- a/makeself.sh +++ b/makeself.sh @@ -62,6 +62,7 @@ MS_Usage() echo " --quiet | -q : Do not print any messages other than errors." echo " --gzip : Compress using gzip (default if detected)" echo " --pigz : Compress with pigz" + echo " --zopfli : Compress with zopfli" echo " --zstd : Compress with zstd" echo " --bzip2 : Compress using bzip2 instead of gzip" echo " --pbzip2 : Compress using pbzip2 instead of gzip" @@ -217,6 +218,10 @@ do COMPRESS=pigz shift ;; + --zopfli) + COMPRESS=zopfli + shift + ;; --zstd) COMPRESS=zstd shift @@ -512,6 +517,10 @@ pigz) fi GUNZIP_CMD="gzip -cd" ;; +zopfli) + GZIP_CMD="zopfli -c" + GUNZIP_CMD="gzip -cd" + ;; zstd) GZIP_CMD="zstd -$COMPRESS_LEVEL" if test $THREADS -ne $DEFAULT_THREADS; then # Leave as the default if threads not indicated diff --git a/test/extracttest b/test/extracttest index 5fb7b5c..8bb5545 100644 --- a/test/extracttest +++ b/test/extracttest @@ -58,6 +58,16 @@ testZstd() assertEquals $? 0 } +testZopfli() +{ + # Skip if zopfli is not available + which zopfli || startSkipping + setupTests --zopfli + + ./makeself-test.run --check + assertEquals $? 0 +} + # Load and run shUnit2. source "./shunit2/shunit2" From 0a11dac9001c0e724dbd992700e5dddc3f349c5e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?St=C3=A9phane=20Peter?= Date: Thu, 3 Sep 2026 19:26:59 -0700 Subject: [PATCH 2/3] Update zopfli command check in extracttest Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> --- test/extracttest | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/extracttest b/test/extracttest index 8bb5545..0bdfb8b 100644 --- a/test/extracttest +++ b/test/extracttest @@ -61,7 +61,7 @@ testZstd() testZopfli() { # Skip if zopfli is not available - which zopfli || startSkipping + command -v zopfli >/dev/null 2>&1 || startSkipping setupTests --zopfli ./makeself-test.run --check From a24799e092827795372fd0226aae68963fdf9e13 Mon Sep 17 00:00:00 2001 From: "Austin S. Hemmelgarn" Date: Fri, 4 Sep 2026 06:57:04 -0400 Subject: [PATCH 3/3] Drop zopfli from Rocky 9 test case. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit It’s technically available via EPEL, but it’s also likely fine to just skip that case instead of dealing with pulling in EPEL given that the packaged version is functionally identical across the tested distros. --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 738ae87..64de82c 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -38,7 +38,7 @@ jobs: if: matrix.container == 'rockylinux:9' run: | dnf groupinstall -y "Development Tools" "RPM Development Tools" - dnf install -y zstd binutils binutils-devel gnupg2 pbzip2 openssl zopfli + dnf install -y zstd binutils binutils-devel gnupg2 pbzip2 openssl - name: Install Alpine packages if: matrix.container == 'alpine:latest'