Skip to content

Commit 0c6ac2d

Browse files
committed
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
1 parent e10d9ae commit 0c6ac2d

File tree

3 files changed

+6
-3
lines changed

3 files changed

+6
-3
lines changed

build_scripts/build_linux_deb-2-installer.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ cp assets/systemd/*.service "dist/$CLI_DEB_BASE/etc/systemd/system/"
6969
cp -r dist/daemon/* "dist/$CLI_DEB_BASE/opt/chia/"
7070

7171
ln -s ../../opt/chia/chia "dist/$CLI_DEB_BASE/usr/bin/chia"
72-
dpkg-deb --build --root-owner-group "dist/$CLI_DEB_BASE"
72+
dpkg-deb -Zxz -z6 --build --root-owner-group "dist/$CLI_DEB_BASE"
7373
# CLI only .deb done
7474

7575
cp -r dist/daemon ../chia-blockchain-gui/packages/gui

build_scripts/build_linux_rpm-2-installer.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ fpm -s dir -t rpm \
8787
--rpm-tag '%undefine _missing_build_ids_terminate_build' \
8888
--before-install=assets/rpm/before-install.sh \
8989
--rpm-tag 'Requires(pre): findutils' \
90-
--rpm-compression xzmt \
90+
--rpm-compression xz \
9191
--rpm-compression-level 6 \
9292
.
9393
# CLI only rpm done

build_scripts/electron-builder.json

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,7 @@
7878
"deb": {
7979
"afterInstall": "../../../build_scripts/assets/deb/postinst.sh",
8080
"afterRemove": "../../../build_scripts/assets/deb/prerm.sh",
81+
"fpm": ["--deb-compression", "xz", "--deb-compression-level", "6"],
8182
"depends": [
8283
"libgbm1",
8384
"libgtk-3-0",
@@ -103,7 +104,9 @@
103104
"--rpm-tag=Recommends: libxcrypt-compat",
104105
"--directories=/opt/chia",
105106
"--rpm-tag=Requires(pre): findutils",
106-
"--before-install=../../../build_scripts/assets/rpm/before-install.sh"
107+
"--before-install=../../../build_scripts/assets/rpm/before-install.sh",
108+
"--rpm-compression=xz",
109+
"--rpm-compression-level=6"
107110
]
108111
}
109112
}

0 commit comments

Comments
 (0)