All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/2] kbuild: add srcdeb-pkg target
@ 2023-04-17 14:25 Masahiro Yamada
  2023-04-17 14:25 ` [PATCH 2/2] kbuild: deb-pkg: add KDEB_SOURCE_COMPRESS to specify compression type Masahiro Yamada
  2023-04-17 14:52 ` [PATCH 1/2] kbuild: add srcdeb-pkg target Ben Hutchings
  0 siblings, 2 replies; 8+ messages in thread
From: Masahiro Yamada @ 2023-04-17 14:25 UTC (permalink / raw)
  To: linux-kbuild
  Cc: linux-kernel, Ben Hutchings, Bastian Germann, Masahiro Yamada,
	Nicolas Schier, Nathan Chancellor, Nick Desaulniers

This new target builds only the debian source package.

Unify the build rules of deb-pkg, srcdeb-pkg, bindeb-pkg to avoid
code duplication.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
Reviewed-by: Nicolas Schier <nicolas@fjasle.eu>
---

 scripts/Makefile.package | 28 +++++++++++++++++++++-------
 1 file changed, 21 insertions(+), 7 deletions(-)

diff --git a/scripts/Makefile.package b/scripts/Makefile.package
index 4d90691505b1..d8a36304b26e 100644
--- a/scripts/Makefile.package
+++ b/scripts/Makefile.package
@@ -5,7 +5,6 @@ include $(srctree)/scripts/Kbuild.include
 include $(srctree)/scripts/Makefile.lib
 
 KERNELPATH := kernel-$(subst -,_,$(KERNELRELEASE))
-KBUILD_PKG_ROOTCMD ?="fakeroot -u"
 # Include only those top-level files that are needed by make, plus the GPL copy
 TAR_CONTENT := Documentation LICENSES arch block certs crypto drivers fs \
                include init io_uring ipc kernel lib mm net rust \
@@ -86,6 +85,9 @@ binrpm-pkg:
 	+rpmbuild $(RPMOPTS) --define "_builddir $(objtree)" --target \
 		$(UTS_MACHINE)-linux -bb $(objtree)/binkernel.spec
 
+# deb-pkg srcdeb-pkg bindeb-pkg
+# ---------------------------------------------------------------------------
+
 quiet_cmd_debianize = GEN     $@
       cmd_debianize = $(srctree)/scripts/package/mkdebian $(mkdebian-opts)
 
@@ -104,14 +106,25 @@ debian-orig: linux.tar.gz debian
 		cp $< ../$(orig-name); \
 	fi
 
-PHONY += deb-pkg
-deb-pkg: debian-orig
-	+dpkg-buildpackage -r$(KBUILD_PKG_ROOTCMD) -a$$(cat debian/arch) $(DPKG_FLAGS) \
-		--build=source,binary -nc -us -uc
+KBUILD_PKG_ROOTCMD ?= 'fakeroot -u'
+
+PHONY += deb-pkg srcdeb-pkg bindeb-pkg
+
+deb-pkg:    private build-type := source,binary
+srcdeb-pkg: private build-type := source
+bindeb-pkg: private build-type := binary
 
-PHONY += bindeb-pkg
+deb-pkg srcdeb-pkg: debian-orig
 bindeb-pkg: debian
-	+dpkg-buildpackage -r$(KBUILD_PKG_ROOTCMD) -a$$(cat debian/arch) $(DPKG_FLAGS) -b -nc -uc
+deb-pkg srcdeb-pkg bindeb-pkg:
+	+$(strip dpkg-buildpackage \
+	--build=$(build-type) --no-pre-clean --unsigned-changes \
+	$(if $(findstring source, $(build-type)), \
+		--unsigned-source) \
+	$(if $(findstring binary, $(build-type)), \
+		-r$(KBUILD_PKG_ROOTCMD) -a$$(cat debian/arch), \
+		--no-check-builddeps) \
+	$(DPKG_FLAGS))
 
 PHONY += intdeb-pkg
 intdeb-pkg:
@@ -208,6 +221,7 @@ help:
 	@echo '  srcrpm-pkg          - Build only the source kernel RPM package'
 	@echo '  binrpm-pkg          - Build only the binary kernel RPM package'
 	@echo '  deb-pkg             - Build both source and binary deb kernel packages'
+	@echo '  srcdeb-pkg          - Build only the source kernel deb package'
 	@echo '  bindeb-pkg          - Build only the binary kernel deb package'
 	@echo '  snap-pkg            - Build only the binary kernel snap package'
 	@echo '                        (will connect to external hosts)'
-- 
2.37.2


^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [PATCH 2/2] kbuild: deb-pkg: add KDEB_SOURCE_COMPRESS to specify compression type
  2023-04-17 14:25 [PATCH 1/2] kbuild: add srcdeb-pkg target Masahiro Yamada
@ 2023-04-17 14:25 ` Masahiro Yamada
  2023-04-19 20:34   ` Nicolas Schier
  2023-04-17 14:52 ` [PATCH 1/2] kbuild: add srcdeb-pkg target Ben Hutchings
  1 sibling, 1 reply; 8+ messages in thread
From: Masahiro Yamada @ 2023-04-17 14:25 UTC (permalink / raw)
  To: linux-kbuild
  Cc: linux-kernel, Ben Hutchings, Bastian Germann, Masahiro Yamada,
	Nathan Chancellor, Nick Desaulniers, Nicolas Schier

Add KDEB_SOURCE_COMPRESS to specify the compression for the orig and
debian tarballs. (The existing KDEB_COMPRESS is used to specify the
compression for binary packages.)

Supported algorithms are gzip, bzip2, lzma, and xz, all of which are
supported by dpkg-source.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
---

 scripts/Makefile.package | 31 +++++++++++++++++++++++--------
 1 file changed, 23 insertions(+), 8 deletions(-)

diff --git a/scripts/Makefile.package b/scripts/Makefile.package
index d8a36304b26e..ce3d8b4e9cb0 100644
--- a/scripts/Makefile.package
+++ b/scripts/Makefile.package
@@ -41,19 +41,25 @@ check-git:
 		false; \
 	fi
 
-git-config-tar.gz  = -c tar.tar.gz.command="$(KGZIP)"
-git-config-tar.bz2 = -c tar.tar.bz2.command="$(KBZIP2)"
-git-config-tar.xz  = -c tar.tar.xz.command="$(XZ)"
-git-config-tar.zst = -c tar.tar.zst.command="$(ZSTD)"
+git-config-tar.gz   = -c tar.tar.gz.command="$(KGZIP)"
+git-config-tar.bz2  = -c tar.tar.bz2.command="$(KBZIP2)"
+git-config-tar.lzma = -c tar.tar.lzma.command="$(LZMA)"
+git-config-tar.xz   = -c tar.tar.xz.command="$(XZ)"
+git-config-tar.zst  = -c tar.tar.zst.command="$(ZSTD)"
 
 quiet_cmd_archive = ARCHIVE $@
       cmd_archive = git -C $(srctree) $(git-config-tar$(suffix $@)) archive \
                     --output=$$(realpath $@) --prefix=$(basename $@)/ $(archive-args)
 
+suffix-gzip  := .gz
+suffix-bzip2 := .bz2
+suffix-lzma  := .lzma
+suffix-xz    := .xz
+
 # Linux source tarball
 # ---------------------------------------------------------------------------
 
-linux-tarballs := $(addprefix linux, .tar.gz)
+linux-tarballs := $(addprefix linux, .tar.gz .tar.bz2 .tar.lzma .tar.xz)
 
 targets += $(linux-tarballs)
 $(linux-tarballs): archive-args = $$(cat $<)
@@ -88,6 +94,15 @@ binrpm-pkg:
 # deb-pkg srcdeb-pkg bindeb-pkg
 # ---------------------------------------------------------------------------
 
+KDEB_SOURCE_COMPRESS ?= gzip
+
+PHONY += linux.tar.unsupported_deb_compress
+linux.tar.unsupported_deb_compress:
+	@echo "error: $(KDEB_SOURCE_COMPRESS): unsupported debian source compression" >&2
+	@false
+
+debian-orig-suffix := $(if $(filter gzip bzip2 lzma xz, $(KDEB_SOURCE_COMPRESS)),$(suffix-$(KDEB_SOURCE_COMPRESS)),.unsupported_deb_compress)
+
 quiet_cmd_debianize = GEN     $@
       cmd_debianize = $(srctree)/scripts/package/mkdebian $(mkdebian-opts)
 
@@ -97,9 +112,9 @@ debian: FORCE
 PHONY += debian-orig
 debian-orig: private source = $(shell dpkg-parsechangelog -S Source)
 debian-orig: private version = $(shell dpkg-parsechangelog -S Version | sed 's/-[^-]*$$//')
-debian-orig: private orig-name = $(source)_$(version).orig.tar.gz
+debian-orig: private orig-name = $(source)_$(version).orig.tar$(debian-orig-suffix)
 debian-orig: mkdebian-opts = --need-source
-debian-orig: linux.tar.gz debian
+debian-orig: linux.tar$(debian-orig-suffix) debian
 	$(Q)if [ "$(df  --output=target .. 2>/dev/null)" = "$(df --output=target $< 2>/dev/null)" ]; then \
 		ln -f $< ../$(orig-name); \
 	else \
@@ -120,7 +135,7 @@ deb-pkg srcdeb-pkg bindeb-pkg:
 	+$(strip dpkg-buildpackage \
 	--build=$(build-type) --no-pre-clean --unsigned-changes \
 	$(if $(findstring source, $(build-type)), \
-		--unsigned-source) \
+		--unsigned-source --compression=$(KDEB_SOURCE_COMPRESS)) \
 	$(if $(findstring binary, $(build-type)), \
 		-r$(KBUILD_PKG_ROOTCMD) -a$$(cat debian/arch), \
 		--no-check-builddeps) \
-- 
2.37.2


^ permalink raw reply related	[flat|nested] 8+ messages in thread

* Re: [PATCH 1/2] kbuild: add srcdeb-pkg target
  2023-04-17 14:25 [PATCH 1/2] kbuild: add srcdeb-pkg target Masahiro Yamada
  2023-04-17 14:25 ` [PATCH 2/2] kbuild: deb-pkg: add KDEB_SOURCE_COMPRESS to specify compression type Masahiro Yamada
@ 2023-04-17 14:52 ` Ben Hutchings
  2023-04-18  1:17   ` Masahiro Yamada
  1 sibling, 1 reply; 8+ messages in thread
From: Ben Hutchings @ 2023-04-17 14:52 UTC (permalink / raw)
  To: Masahiro Yamada, linux-kbuild
  Cc: linux-kernel, Bastian Germann, Nicolas Schier, Nathan Chancellor,
	Nick Desaulniers

[-- Attachment #1: Type: text/plain, Size: 1247 bytes --]

On Mon, 2023-04-17 at 23:25 +0900, Masahiro Yamada wrote:
> This new target builds only the debian source package.
> 
> Unify the build rules of deb-pkg, srcdeb-pkg, bindeb-pkg to avoid
> code duplication.
> 
> Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
> Reviewed-by: Nicolas Schier <nicolas@fjasle.eu>
> ---
[...]
>  bindeb-pkg: debian
> -	+dpkg-buildpackage -r$(KBUILD_PKG_ROOTCMD) -a$$(cat debian/arch) $(DPKG_FLAGS) -b -nc -uc
> +deb-pkg srcdeb-pkg bindeb-pkg:
> +	+$(strip dpkg-buildpackage \
> +	--build=$(build-type) --no-pre-clean --unsigned-changes \
> +	$(if $(findstring source, $(build-type)), \
> +		--unsigned-source) \
> +	$(if $(findstring binary, $(build-type)), \
> +		-r$(KBUILD_PKG_ROOTCMD) -a$$(cat debian/arch), \
> +		--no-check-builddeps) \
[...]

There is no need to make the use of --unsigned-source (-us) or -r
conditional on the build type.  They will be ignored if not applicable.

This is also adding --no-check-builddeps (-d), which is not explained
in the commit message.  It might be valid to add this for srcdeb-pkg,
but the build dependency check is valuable for bindeb-pkg and deb-pkg.

Ben.

-- 
Ben Hutchings
Sturgeon's Law: Ninety percent of everything is crap.

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH 1/2] kbuild: add srcdeb-pkg target
  2023-04-17 14:52 ` [PATCH 1/2] kbuild: add srcdeb-pkg target Ben Hutchings
@ 2023-04-18  1:17   ` Masahiro Yamada
  2023-04-22 11:02     ` Ben Hutchings
  0 siblings, 1 reply; 8+ messages in thread
From: Masahiro Yamada @ 2023-04-18  1:17 UTC (permalink / raw)
  To: Ben Hutchings
  Cc: linux-kbuild, linux-kernel, Bastian Germann, Nicolas Schier,
	Nathan Chancellor, Nick Desaulniers

On Mon, Apr 17, 2023 at 11:52 PM Ben Hutchings <ben@decadent.org.uk> wrote:
>
> On Mon, 2023-04-17 at 23:25 +0900, Masahiro Yamada wrote:
> > This new target builds only the debian source package.
> >
> > Unify the build rules of deb-pkg, srcdeb-pkg, bindeb-pkg to avoid
> > code duplication.
> >
> > Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
> > Reviewed-by: Nicolas Schier <nicolas@fjasle.eu>
> > ---
> [...]
> >  bindeb-pkg: debian
> > -     +dpkg-buildpackage -r$(KBUILD_PKG_ROOTCMD) -a$$(cat debian/arch) $(DPKG_FLAGS) -b -nc -uc
> > +deb-pkg srcdeb-pkg bindeb-pkg:
> > +     +$(strip dpkg-buildpackage \
> > +     --build=$(build-type) --no-pre-clean --unsigned-changes \
> > +     $(if $(findstring source, $(build-type)), \
> > +             --unsigned-source) \
> > +     $(if $(findstring binary, $(build-type)), \
> > +             -r$(KBUILD_PKG_ROOTCMD) -a$$(cat debian/arch), \
> > +             --no-check-builddeps) \
> [...]
>
> There is no need to make the use of --unsigned-source (-us) or -r
> conditional on the build type.  They will be ignored if not applicable.



True, but you can also say there is no need
to pass options that we know are unnecessary.


My motivation is to make unneeded options
really don't-care.



2/2 will add KDEB_SOURCE_COMPRESS.

If I do not make it optional,
"KDEB_SOURCE_COMPRESS=foo make bindeb-pkg"
would fail.




dpkg-buildpackage --build=binary --no-pre-clean --unsigned-changes
--unsigned-source --compression=foo -r'fakeroot -u' -a$(cat
debian/arch)
dpkg-buildpackage: info: source package linux-upstream
dpkg-buildpackage: info: source version 6.3.0-rc7-00003-geb58366b57fe-33
dpkg-buildpackage: info: source distribution kinetic
dpkg-buildpackage: info: source changed by Masahiro Yamada
<masahiro.yamada@canonical.com>
dpkg-buildpackage: info: host architecture amd64
 dpkg-source --compression=foo --before-build .
dpkg-source: error: foo is not a supported compression

Use --help for program usage information.





"dpkg-buildpackage --build=binary" does not
generate a source package, but still checks
if --compression=foo is correct.



> This is also adding --no-check-builddeps (-d), which is not explained
> in the commit message.  It might be valid to add this for srcdeb-pkg,
> but the build dependency check is valuable for bindeb-pkg and deb-pkg.


Yes.
So, I added --no-check-builddeps to the else arm.



I will add the following commit description:


--no-check-builddeps is added to srcbin-pkg
so that build dependencies will not be checked.





>
> Ben.
>
> --
> Ben Hutchings
> Sturgeon's Law: Ninety percent of everything is crap.



-- 
Best Regards
Masahiro Yamada

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH 2/2] kbuild: deb-pkg: add KDEB_SOURCE_COMPRESS to specify compression type
  2023-04-17 14:25 ` [PATCH 2/2] kbuild: deb-pkg: add KDEB_SOURCE_COMPRESS to specify compression type Masahiro Yamada
@ 2023-04-19 20:34   ` Nicolas Schier
  2023-04-20  7:17     ` Masahiro Yamada
  0 siblings, 1 reply; 8+ messages in thread
From: Nicolas Schier @ 2023-04-19 20:34 UTC (permalink / raw)
  To: Masahiro Yamada
  Cc: linux-kbuild, linux-kernel, Ben Hutchings, Bastian Germann,
	Nathan Chancellor, Nick Desaulniers

[-- Attachment #1: Type: text/plain, Size: 4075 bytes --]

On Mon 17 Apr 2023 23:25:48 GMT, Masahiro Yamada wrote:
> Add KDEB_SOURCE_COMPRESS to specify the compression for the orig and
> debian tarballs. (The existing KDEB_COMPRESS is used to specify the
> compression for binary packages.)

Sounds to me, that it would make sense to sum-up some documentation for 
kbuild Debian package configuration.

> Supported algorithms are gzip, bzip2, lzma, and xz, all of which are
> supported by dpkg-source.
> 
> Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
> ---
> 
>  scripts/Makefile.package | 31 +++++++++++++++++++++++--------
>  1 file changed, 23 insertions(+), 8 deletions(-)
> 
> diff --git a/scripts/Makefile.package b/scripts/Makefile.package
> index d8a36304b26e..ce3d8b4e9cb0 100644
> --- a/scripts/Makefile.package
> +++ b/scripts/Makefile.package
> @@ -41,19 +41,25 @@ check-git:
>  		false; \
>  	fi
>  
> -git-config-tar.gz  = -c tar.tar.gz.command="$(KGZIP)"
> -git-config-tar.bz2 = -c tar.tar.bz2.command="$(KBZIP2)"
> -git-config-tar.xz  = -c tar.tar.xz.command="$(XZ)"
> -git-config-tar.zst = -c tar.tar.zst.command="$(ZSTD)"
> +git-config-tar.gz   = -c tar.tar.gz.command="$(KGZIP)"
> +git-config-tar.bz2  = -c tar.tar.bz2.command="$(KBZIP2)"
> +git-config-tar.lzma = -c tar.tar.lzma.command="$(LZMA)"
> +git-config-tar.xz   = -c tar.tar.xz.command="$(XZ)"
> +git-config-tar.zst  = -c tar.tar.zst.command="$(ZSTD)"
>  
>  quiet_cmd_archive = ARCHIVE $@
>        cmd_archive = git -C $(srctree) $(git-config-tar$(suffix $@)) archive \
>                      --output=$$(realpath $@) --prefix=$(basename $@)/ $(archive-args)
>  
> +suffix-gzip  := .gz
> +suffix-bzip2 := .bz2
> +suffix-lzma  := .lzma
> +suffix-xz    := .xz
> +
>  # Linux source tarball
>  # ---------------------------------------------------------------------------
>  
> -linux-tarballs := $(addprefix linux, .tar.gz)
> +linux-tarballs := $(addprefix linux, .tar.gz .tar.bz2 .tar.lzma .tar.xz)
>  
>  targets += $(linux-tarballs)
>  $(linux-tarballs): archive-args = $$(cat $<)
> @@ -88,6 +94,15 @@ binrpm-pkg:
>  # deb-pkg srcdeb-pkg bindeb-pkg
>  # ---------------------------------------------------------------------------
>  
> +KDEB_SOURCE_COMPRESS ?= gzip

According to dpkg-source(1), xz is the default compression for deb 
source format >= 2.  Shouldn't we use xz here by default as well?

Reviewed-by: Nicolas Schier <nicolas@fjasle.eu>

Thanks and kind regards,
Nicolas


> +
> +PHONY += linux.tar.unsupported_deb_compress
> +linux.tar.unsupported_deb_compress:
> +	@echo "error: $(KDEB_SOURCE_COMPRESS): unsupported debian source compression" >&2
> +	@false
> +
> +debian-orig-suffix := $(if $(filter gzip bzip2 lzma xz, $(KDEB_SOURCE_COMPRESS)),$(suffix-$(KDEB_SOURCE_COMPRESS)),.unsupported_deb_compress)
> +
>  quiet_cmd_debianize = GEN     $@
>        cmd_debianize = $(srctree)/scripts/package/mkdebian $(mkdebian-opts)
>  
> @@ -97,9 +112,9 @@ debian: FORCE
>  PHONY += debian-orig
>  debian-orig: private source = $(shell dpkg-parsechangelog -S Source)
>  debian-orig: private version = $(shell dpkg-parsechangelog -S Version | sed 's/-[^-]*$$//')
> -debian-orig: private orig-name = $(source)_$(version).orig.tar.gz
> +debian-orig: private orig-name = $(source)_$(version).orig.tar$(debian-orig-suffix)
>  debian-orig: mkdebian-opts = --need-source
> -debian-orig: linux.tar.gz debian
> +debian-orig: linux.tar$(debian-orig-suffix) debian
>  	$(Q)if [ "$(df  --output=target .. 2>/dev/null)" = "$(df --output=target $< 2>/dev/null)" ]; then \
>  		ln -f $< ../$(orig-name); \
>  	else \
> @@ -120,7 +135,7 @@ deb-pkg srcdeb-pkg bindeb-pkg:
>  	+$(strip dpkg-buildpackage \
>  	--build=$(build-type) --no-pre-clean --unsigned-changes \
>  	$(if $(findstring source, $(build-type)), \
> -		--unsigned-source) \
> +		--unsigned-source --compression=$(KDEB_SOURCE_COMPRESS)) \
>  	$(if $(findstring binary, $(build-type)), \
>  		-r$(KBUILD_PKG_ROOTCMD) -a$$(cat debian/arch), \
>  		--no-check-builddeps) \
> -- 
> 2.37.2

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH 2/2] kbuild: deb-pkg: add KDEB_SOURCE_COMPRESS to specify compression type
  2023-04-19 20:34   ` Nicolas Schier
@ 2023-04-20  7:17     ` Masahiro Yamada
  2023-04-22 11:04       ` Ben Hutchings
  0 siblings, 1 reply; 8+ messages in thread
From: Masahiro Yamada @ 2023-04-20  7:17 UTC (permalink / raw)
  To: Nicolas Schier
  Cc: linux-kbuild, linux-kernel, Ben Hutchings, Bastian Germann,
	Nathan Chancellor, Nick Desaulniers

On Thu, Apr 20, 2023 at 5:34 AM Nicolas Schier <nicolas@fjasle.eu> wrote:
>
> On Mon 17 Apr 2023 23:25:48 GMT, Masahiro Yamada wrote:
> > Add KDEB_SOURCE_COMPRESS to specify the compression for the orig and
> > debian tarballs. (The existing KDEB_COMPRESS is used to specify the
> > compression for binary packages.)
>
> Sounds to me, that it would make sense to sum-up some documentation for
> kbuild Debian package configuration.
>
> > Supported algorithms are gzip, bzip2, lzma, and xz, all of which are
> > supported by dpkg-source.
> >
> > Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
> > ---
> >
> >  scripts/Makefile.package | 31 +++++++++++++++++++++++--------
> >  1 file changed, 23 insertions(+), 8 deletions(-)
> >
> > diff --git a/scripts/Makefile.package b/scripts/Makefile.package
> > index d8a36304b26e..ce3d8b4e9cb0 100644
> > --- a/scripts/Makefile.package
> > +++ b/scripts/Makefile.package
> > @@ -41,19 +41,25 @@ check-git:
> >               false; \
> >       fi
> >
> > -git-config-tar.gz  = -c tar.tar.gz.command="$(KGZIP)"
> > -git-config-tar.bz2 = -c tar.tar.bz2.command="$(KBZIP2)"
> > -git-config-tar.xz  = -c tar.tar.xz.command="$(XZ)"
> > -git-config-tar.zst = -c tar.tar.zst.command="$(ZSTD)"
> > +git-config-tar.gz   = -c tar.tar.gz.command="$(KGZIP)"
> > +git-config-tar.bz2  = -c tar.tar.bz2.command="$(KBZIP2)"
> > +git-config-tar.lzma = -c tar.tar.lzma.command="$(LZMA)"
> > +git-config-tar.xz   = -c tar.tar.xz.command="$(XZ)"
> > +git-config-tar.zst  = -c tar.tar.zst.command="$(ZSTD)"
> >
> >  quiet_cmd_archive = ARCHIVE $@
> >        cmd_archive = git -C $(srctree) $(git-config-tar$(suffix $@)) archive \
> >                      --output=$$(realpath $@) --prefix=$(basename $@)/ $(archive-args)
> >
> > +suffix-gzip  := .gz
> > +suffix-bzip2 := .bz2
> > +suffix-lzma  := .lzma
> > +suffix-xz    := .xz
> > +
> >  # Linux source tarball
> >  # ---------------------------------------------------------------------------
> >
> > -linux-tarballs := $(addprefix linux, .tar.gz)
> > +linux-tarballs := $(addprefix linux, .tar.gz .tar.bz2 .tar.lzma .tar.xz)
> >
> >  targets += $(linux-tarballs)
> >  $(linux-tarballs): archive-args = $$(cat $<)
> > @@ -88,6 +94,15 @@ binrpm-pkg:
> >  # deb-pkg srcdeb-pkg bindeb-pkg
> >  # ---------------------------------------------------------------------------
> >
> > +KDEB_SOURCE_COMPRESS ?= gzip
>
> According to dpkg-source(1), xz is the default compression for deb
> source format >= 2.  Shouldn't we use xz here by default as well?


Yes.
xz is the default because we switched to format 3.0 (quilt).

But, we used gzip for a long time, so I did not change it
in this commit.


I do not have a strong opinion.

Ben (debian kernel maintainer) is in the CC list,
perhaps he has some preference.






--
Best Regards
Masahiro Yamada

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH 1/2] kbuild: add srcdeb-pkg target
  2023-04-18  1:17   ` Masahiro Yamada
@ 2023-04-22 11:02     ` Ben Hutchings
  0 siblings, 0 replies; 8+ messages in thread
From: Ben Hutchings @ 2023-04-22 11:02 UTC (permalink / raw)
  To: Masahiro Yamada
  Cc: linux-kbuild, linux-kernel, Bastian Germann, Nicolas Schier,
	Nathan Chancellor, Nick Desaulniers

[-- Attachment #1: Type: text/plain, Size: 583 bytes --]

On Tue, 2023-04-18 at 10:17 +0900, Masahiro Yamada wrote:
> On Mon, Apr 17, 2023 at 11:52 PM Ben Hutchings <ben@decadent.org.uk> wrote:
[...]
> > This is also adding --no-check-builddeps (-d), which is not explained
> > in the commit message.  It might be valid to add this for srcdeb-pkg,
> > but the build dependency check is valuable for bindeb-pkg and deb-pkg.
> 
> 
> Yes.
> So, I added --no-check-builddeps to the else arm.
[...]

Sorry, I read that wrongly.

Ben.

-- 
Ben Hutchings
Theory and practice are closer in theory than in practice - John Levine

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH 2/2] kbuild: deb-pkg: add KDEB_SOURCE_COMPRESS to specify compression type
  2023-04-20  7:17     ` Masahiro Yamada
@ 2023-04-22 11:04       ` Ben Hutchings
  0 siblings, 0 replies; 8+ messages in thread
From: Ben Hutchings @ 2023-04-22 11:04 UTC (permalink / raw)
  To: Masahiro Yamada, Nicolas Schier
  Cc: linux-kbuild, linux-kernel, Bastian Germann, Nathan Chancellor,
	Nick Desaulniers

[-- Attachment #1: Type: text/plain, Size: 869 bytes --]

On Thu, 2023-04-20 at 16:17 +0900, Masahiro Yamada wrote:
> On Thu, Apr 20, 2023 at 5:34 AM Nicolas Schier <nicolas@fjasle.eu> wrote:
[...]
> > > +KDEB_SOURCE_COMPRESS ?= gzip
> > 
> > According to dpkg-source(1), xz is the default compression for deb
> > source format >= 2.  Shouldn't we use xz here by default as well?
> 
> 
> Yes.
> xz is the default because we switched to format 3.0 (quilt).
> 
> But, we used gzip for a long time, so I did not change it
> in this commit.
> 
> 
> I do not have a strong opinion.
> 
> Ben (debian kernel maintainer) is in the CC list,
> perhaps he has some preference.

I think it makes sense to keep source compression unchanged in this
commit, but you could add another commit to change the default.

Ben.

-- 
Ben Hutchings
Theory and practice are closer in theory than in practice - John Levine

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2023-04-22 11:04 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-04-17 14:25 [PATCH 1/2] kbuild: add srcdeb-pkg target Masahiro Yamada
2023-04-17 14:25 ` [PATCH 2/2] kbuild: deb-pkg: add KDEB_SOURCE_COMPRESS to specify compression type Masahiro Yamada
2023-04-19 20:34   ` Nicolas Schier
2023-04-20  7:17     ` Masahiro Yamada
2023-04-22 11:04       ` Ben Hutchings
2023-04-17 14:52 ` [PATCH 1/2] kbuild: add srcdeb-pkg target Ben Hutchings
2023-04-18  1:17   ` Masahiro Yamada
2023-04-22 11:02     ` Ben Hutchings

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.