Fix DEB and RPM package compression for smaller installer sizes (#20689)

* Fix DEB and RPM package compression for smaller installer sizes

DEB packages were using poor compression defaults: the GUI DEB used
electron-builder's 7-Zip xz with a 4 MiB dictionary, and the CLI DEB
used the build host's default zstd level 3. Both RPMs lacked explicit
single-threaded xz settings. All four packages now use xz level 6
(64 MiB dictionary) for consistent, well-compressed output.

Made-with: Cursor

* Bump compression level to 9 for 64 MiB xz dictionary

Level 6 only gives an 8 MiB dictionary. Level 9 gives 64 MiB,
matching the compression ratio seen in the existing GUI RPM.

Made-with: Cursor
This commit is contained in:
Earle Lowe
2026-04-29 11:15:15 -05:00
committed by GitHub
parent e52610b45f
commit f28c2ea176
3 changed files with 7 additions and 4 deletions
+1 -1
View File
@@ -69,7 +69,7 @@ cp assets/systemd/*.service "dist/$CLI_DEB_BASE/etc/systemd/system/"
cp -r dist/daemon/* "dist/$CLI_DEB_BASE/opt/chia/"
ln -s ../../opt/chia/chia "dist/$CLI_DEB_BASE/usr/bin/chia"
dpkg-deb --build --root-owner-group "dist/$CLI_DEB_BASE"
dpkg-deb -Zxz -z9 --build --root-owner-group "dist/$CLI_DEB_BASE"
# CLI only .deb done
cp -r dist/daemon ../chia-blockchain-gui/packages/gui
+2 -2
View File
@@ -87,8 +87,8 @@ fpm -s dir -t rpm \
--rpm-tag '%undefine _missing_build_ids_terminate_build' \
--before-install=assets/rpm/before-install.sh \
--rpm-tag 'Requires(pre): findutils' \
--rpm-compression xzmt \
--rpm-compression-level 6 \
--rpm-compression xz \
--rpm-compression-level 9 \
.
# CLI only rpm done
cp -r dist/daemon ../chia-blockchain-gui/packages/gui
+4 -1
View File
@@ -78,6 +78,7 @@
"deb": {
"afterInstall": "../../../build_scripts/assets/deb/postinst.sh",
"afterRemove": "../../../build_scripts/assets/deb/prerm.sh",
"fpm": ["--deb-compression", "xz", "--deb-compression-level", "9"],
"depends": [
"libgbm1",
"libgtk-3-0",
@@ -103,7 +104,9 @@
"--rpm-tag=Recommends: libxcrypt-compat",
"--directories=/opt/chia",
"--rpm-tag=Requires(pre): findutils",
"--before-install=../../../build_scripts/assets/rpm/before-install.sh"
"--before-install=../../../build_scripts/assets/rpm/before-install.sh",
"--rpm-compression=xz",
"--rpm-compression-level=9"
]
}
}