[1/2] builddeb: allow selection of .deb compressor
diff mbox series

Message ID 09f5b36d9c64b4e6d1d235f84a7333b7802b2866.1578131485.git.mirq-linux@rere.qmqm.pl
State New
Headers show
Series
  • [1/2] builddeb: allow selection of .deb compressor
Related show

Commit Message

Michał Mirosław Jan. 4, 2020, 9:55 a.m. UTC
Select deb compression using KPKG_COMPRESS make variable. This allows to
use gzip compression for local or test builds, and that's way faster
than now-default xz compression.

Signed-off-by: Michał Mirosław <mirq-linux@rere.qmqm.pl>
---
 scripts/package/builddeb | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Masahiro Yamada Jan. 11, 2020, 6:51 a.m. UTC | #1
(+CC: Ben Hutchings, Riku Voipio)

On Sat, Jan 4, 2020 at 6:56 PM Michał Mirosław <mirq-linux@rere.qmqm.pl> wrote:
>
> Select deb compression using KPKG_COMPRESS make variable. This allows to
> use gzip compression for local or test builds, and that's way faster
> than now-default xz compression.
>
> Signed-off-by: Michał Mirosław <mirq-linux@rere.qmqm.pl>
> ---
>  scripts/package/builddeb | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/scripts/package/builddeb b/scripts/package/builddeb
> index c4c580f547ef..d289c4ebc891 100755
> --- a/scripts/package/builddeb
> +++ b/scripts/package/builddeb
> @@ -43,7 +43,7 @@ create_package() {
>
>         # Create the package
>         dpkg-gencontrol -p$pname -P"$pdir"
> -       dpkg --build "$pdir" ..
> +       dpkg-deb ${KPKG_COMPRESS:+-Z$KPKG_COMPRESS} --build "$pdir" ..
>  }
>
>  version=$KERNELRELEASE
> --
> 2.20.1
>

I have not seen any comment on this,
but using gzip is indeed way faster.


Some minor comments:

I see some variables staring "KDEB_",
but nothing starting "KPKG_".



masahiro@grover:~/workspace/linux-kbuild$ git grep KDEB_
scripts/Makefile.package:KDEB_SOURCENAME ?= linux-$(KERNELRELEASE)
scripts/Makefile.package:export KDEB_SOURCENAME
scripts/Makefile.package:       $(call cmd,src_tar,$(KDEB_SOURCENAME))
scripts/Makefile.package:               mv $(KDEB_SOURCENAME).tar.gz
../$(KDEB_SOURCENAME)_$${origversion}.orig.tar.gz
scripts/package/builddeb:# specified in KDEB_HOOKDIR) that will be
called on package install and
scripts/package/builddeb:debhookdir=${KDEB_HOOKDIR:-/etc/kernel}
scripts/package/mkdebian:if [ -n "$KDEB_PKGVERSION" ]; then
scripts/package/mkdebian:       packageversion=$KDEB_PKGVERSION
scripts/package/mkdebian:sourcename=$KDEB_SOURCENAME
scripts/package/mkdebian:if [ -n "$KDEB_CHANGELOG_DIST" ]; then
scripts/package/mkdebian:        distribution=$KDEB_CHANGELOG_DIST
scripts/package/mkdebian:        echo >&2 "Install lsb-release or set
\$KDEB_CHANGELOG_DIST explicitly"
masahiro@grover:~/workspace/linux-kbuild$ git grep KPKG_


Maybe starting KDEB_ seems to be better for consistency?

Patch
diff mbox series

diff --git a/scripts/package/builddeb b/scripts/package/builddeb
index c4c580f547ef..d289c4ebc891 100755
--- a/scripts/package/builddeb
+++ b/scripts/package/builddeb
@@ -43,7 +43,7 @@  create_package() {
 
 	# Create the package
 	dpkg-gencontrol -p$pname -P"$pdir"
-	dpkg --build "$pdir" ..
+	dpkg-deb ${KPKG_COMPRESS:+-Z$KPKG_COMPRESS} --build "$pdir" ..
 }
 
 version=$KERNELRELEASE