kbuild, deb-pkg: pass options to dpkg-deb via KBUILD_DEBOPTS
Subsystems (2)
PATCH 1/1 kbuild, deb-pkg: pass options to dpkg-deb via KBUILD_DEBOPTS
Call dpkg-deb directly instead of using the dpkg front-end, and pass it any options found in the new KBUILD_DEBOPTS variable. With "-Zxz", this allows compressing packages with xz instead of gzip, which provides very significant space savings (x86-64 allmodconfig):
gzip xz
linux-firmware-image.deb 1.2M 903K
linux-headers.deb 7.3M 5.1M
linux-image.deb 197M 118M
linux-libc-dev.deb 855K 653KSigned-off-by Romain Francoise <[email protected]>
--- Documentation/kbuild/kbuild.txt | 6 ++++++ scripts/package/builddeb | 2 +- 2 files changed, 7 insertions(+), 1 deletions(-) mode change 100644 => 100755 scripts/package/builddeb
Documentation/kbuild/kbuild.txt +6 -0
@@ -81,6 +81,12 @@ the UTS_MACHINE variable, and on some architectures also the kernel config. The value of KBUILD_DEBARCH is assumed (not checked) to be a valid Debian architecture. +KBUILD_DEBOPTS +-------------------------------------------------- +For the deb-pkg target, allows passing options to dpkg-deb. For example, +setting this variable to "-Zxz" will result in xz-compressed packages +(instead of the default gzip). + ARCH -------------------------------------------------- Set ARCH to the architecture to be built.
scripts/package/builddeb +1 -1
@@ -63,7 +63,7 @@ create_package() { # Create the package dpkg-gencontrol -isp $forcearch -p$pname -P"$pdir" - dpkg --build "$pdir" .. + dpkg-deb $KBUILD_DEBOPTS --build "$pdir" .. } # Some variables and settings used throughout the script
Signature · 1 line
1.7.9.1