Skip to contentSkip to conversation

kbuild: deb-pkg: default dpkg-buildpackage --build

PATCH Superseded Bastian Germann 3 participants 13 messages Mar 5, 2023 – Mar 10, 2023 Kbuild

v1 of 3 Superseded Latest is v3 →

lore
Share & tools
lore
#0 lore raw

cover kbuild: deb-pkg: default dpkg-buildpackage --build

deb-pkg's dpkg-buildpackage invocation was changed in v6.2, unnecessarily adding the --build parameter explicitly. Revert the change.

Bastian Germann (1):
kbuild: deb-pkg: default dpkg-buildpackage --build

 scripts/Makefile.package | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
Signature · 1 line
2.39.2
#1 lore raw

PATCH 1/1 kbuild: deb-pkg: default dpkg-buildpackage --build

deb-pkg's dpkg-buildpackage invocation was added --build=source,binary recently. Before, it relied on the default, which is --build=source,binary,all and makes no difference for the built packages as there is no "Arch: all" package.

However, the explicit --build eliminates overriding it via DPKG_FLAGS, which used to fill the gap of generating only a source package without building it.

Recover the old, default behavior.

Fixes 7bf4582d7aad ("kbuild: deb-pkg: create source package without cleaning")
---
 scripts/Makefile.package | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
scripts/Makefile.package +1 -1
index b941e6341b36..fe1721915a59 100644
@@ -120,7 +120,7 @@ debian-orig: linux.tar.gz debian
 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
+		-nc -us -uc
 
 PHONY += bindeb-pkg
 bindeb-pkg: debian
Signature · 1 line
2.39.2
Reviewed-by on v1 1/1
#2 lore raw
Quoted 32 lines · On Mon, Mar 06, 2023 at 12:25:35AM +0100 Bastian Germann wrote:

deb-pkg's dpkg-buildpackage invocation was added --build=source,binary recently. Before, it relied on the default, which is --build=source,binary,all and makes no difference for the built packages as there is no "Arch: all" package.

However, the explicit --build eliminates overriding it via DPKG_FLAGS, which used to fill the gap of generating only a source package without building it.

Recover the old, default behavior.

Fixes 7bf4582d7aad ("kbuild: deb-pkg: create source package without cleaning")
---
 scripts/Makefile.package | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
scripts/Makefile.package +1 -1
index b941e6341b36..fe1721915a59 100644
@@ -120,7 +120,7 @@ debian-orig: linux.tar.gz debian
 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
+		-nc -us -uc
 
 PHONY += bindeb-pkg
 bindeb-pkg: debian
Signature · 1 line
2.39.2
#3 lore raw
In reply to Bastian Germann
Quoted 5 lines · Bastian Germann

deb-pkg's dpkg-buildpackage invocation was added --build=source,binary recently. Before, it relied on the default, which is --build=source,binary,all and makes no difference for the built packages as there is no "Arch: all" package.

Is this paragraph true?

--build=source,binary,all sounds strange because
'all' is contained in 'binary'.

According to dpkb-buildpackage(1),

binary = any,all

full = source,binary = source,any,all (default)

--build=source,binary would build everything
even if there were 'Arch: all'.

The code change is fine.
My plan was to use --build=source,binary later, but I could not finish the entire work in the last cycle.

Quoted 28 lines

However, the explicit --build eliminates overriding it via DPKG_FLAGS, which used to fill the gap of generating only a source package without building it.

Recover the old, default behavior.

Fixes 7bf4582d7aad ("kbuild: deb-pkg: create source package without cleaning")
---
 scripts/Makefile.package | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
scripts/Makefile.package +1 -2
index b941e6341b36..fe1721915a59 100644
@@ -120,7 +120,7 @@ debian-orig: linux.tar.gz debian
 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
+               -nc -us -uc
 
 PHONY += bindeb-pkg
 bindeb-pkg: debian
--

2.39.2

Signature · 2 lines
Best Regards
Masahiro Yamada
#4 lore raw

Am 07.03.23 um 04:21 schrieb Masahiro Yamada:

Quoted 17 lines · Bastian Germann
Quoted 5 lines

deb-pkg's dpkg-buildpackage invocation was added --build=source,binary recently. Before, it relied on the default, which is --build=source,binary,all and makes no difference for the built packages as there is no "Arch: all" package.

Is this paragraph true?

--build=source,binary,all sounds strange because
'all' is contained in 'binary'.

According to dpkb-buildpackage(1),

Quoted 7 lines

binary = any,all

full = source,binary = source,any,all (default)

--build=source,binary would build everything
even if there were 'Arch: all'.

You are right. The point was that it does not change the output.

Quoted 38 lines

The code change is fine.
My plan was to use --build=source,binary later, but I could not finish the entire work in the last cycle.

Quoted 28 lines

However, the explicit --build eliminates overriding it via DPKG_FLAGS, which used to fill the gap of generating only a source package without building it.

Recover the old, default behavior.

Fixes 7bf4582d7aad ("kbuild: deb-pkg: create source package without cleaning")
---
  scripts/Makefile.package | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
scripts/Makefile.package +1 -2
index b941e6341b36..fe1721915a59 100644
@@ -120,7 +120,7 @@ debian-orig: linux.tar.gz debian
  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
+               -nc -us -uc
 
  PHONY += bindeb-pkg
  bindeb-pkg: debian
--

2.39.2

#5 lore raw
Quoted 21 lines · Bastian Germann

Am 07.03.23 um 04:21 schrieb Masahiro Yamada:

Quoted 19 lines · Bastian Germann
Quoted 5 lines

deb-pkg's dpkg-buildpackage invocation was added --build=source,binary recently. Before, it relied on the default, which is --build=source,binary,all and makes no difference for the built packages as there is no "Arch: all" package.

Is this paragraph true?

--build=source,binary,all sounds strange because
'all' is contained in 'binary'.

According to dpkb-buildpackage(1),

binary = any,all

Quoted 8 lines
Quoted 5 lines

full = source,binary = source,any,all (default)

--build=source,binary would build everything
even if there were 'Arch: all'.

You are right. The point was that it does not change the output.

How do you want to rephrase this?

Signature · 2 lines
Best Regards
Masahiro Yamada
#6 lore raw

v2 cover kbuild: deb-pkg: default dpkg-buildpackage --build

deb-pkg's dpkg-buildpackage invocation was changed in v6.2, unnecessarily adding the --build parameter explicitly. Revert the change.

Changelog:
v2:
* Rephrase the commit message not to misrepresent the build options

Bastian Germann (1):
kbuild: deb-pkg: default dpkg-buildpackage --build

 scripts/Makefile.package | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
Signature · 1 line
2.39.2
#7 lore raw

PATCH v2 1/1 kbuild: deb-pkg: default dpkg-buildpackage --build

deb-pkg's dpkg-buildpackage invocation was added --build=source,binary recently. Before, it relied on the default, which is the same, so it no difference for the built packages.

However, the explicit --build eliminates overriding it via DPKG_FLAGS, which used to fill the gap of generating only a source package without building it.

Recover the old, default behavior.

Fixes 7bf4582d7aad ("kbuild: deb-pkg: create source package without cleaning")
---
 scripts/Makefile.package | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
scripts/Makefile.package +1 -1
index b941e6341b36..fe1721915a59 100644
@@ -120,7 +120,7 @@ debian-orig: linux.tar.gz debian
 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
+		-nc -us -uc
 
 PHONY += bindeb-pkg
 bindeb-pkg: debian
Signature · 1 line
2.39.2
#8 lore raw
Quoted 31 lines · Bastian Germann

deb-pkg's dpkg-buildpackage invocation was added --build=source,binary recently. Before, it relied on the default, which is the same, so it no difference for the built packages.

However, the explicit --build eliminates overriding it via DPKG_FLAGS, which used to fill the gap of generating only a source package without building it.

Recover the old, default behavior.

Fixes 7bf4582d7aad ("kbuild: deb-pkg: create source package without cleaning")
---
 scripts/Makefile.package | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
scripts/Makefile.package +1 -2
index b941e6341b36..fe1721915a59 100644
@@ -120,7 +120,7 @@ debian-orig: linux.tar.gz debian
 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
+               -nc -us -uc
 
 PHONY += bindeb-pkg
 bindeb-pkg: debian
--
Quoted 2 lines

2.39.2

I applied this, then dropped it.

This patch is wrong.

If this patch is applied, 'make deb-pkg'
would not produce the source package at all.

Now I recalled the reason why I added this.

dpkg-buildpackage(1):

full
Builds everything. This is an alias for source,any,all, and the same as the default case when no build option is specified.
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

NACK

--
Best Regards
Masahiro Yamada

#9 lore raw

Am 10.03.23 um 15:37 schrieb Masahiro Yamada:

Quoted 2 lines

If this patch is applied, 'make deb-pkg'
would not produce the source package at all.

How so? Are you saying make deb-pkg never built a source package with <= 6.2? Because those never specified a --build.

Quoted 10 lines

Now I recalled the reason why I added this.

dpkg-buildpackage(1):

full
Builds everything. This is an alias for source,any,all, and the same as the default case when no build option is specified.
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

full is the default for --build. I guess the wording here is so tedious because you can have -S, -b, -B and so on which all imply some --build.

Quoted 1 line

NACK

#10 lore raw

Am 10.03.23 um 15:49 schrieb Bastian Germann:

Quoted 13 lines

Am 10.03.23 um 15:37 schrieb Masahiro Yamada:

Quoted 2 lines

If this patch is applied, 'make deb-pkg'
would not produce the source package at all.

How so? Are you saying make deb-pkg never built a source package with <= 6.2? Because those never specified a --build.

Quoted 6 lines

Now I recalled the reason why I added this.

dpkg-buildpackage(1):

Quoted 9 lines
Quoted 4 lines

  full
      Builds everything.  This is an alias for source,any,all, and the same as the default case when no build option is specified. ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

full is the default for --build. I guess the wording here is so tedious because you can have -S, -b, -B and so on which all imply some --build.

Quoted 1 line

NACK

I see. The option -nc implies -b. So yes, you are right.

#11 lore raw
In reply to Bastian Germann
Quoted 1 line · Bastian Germann

deb-pkg's dpkg-buildpackage invocation was changed in v6.2, unnecessarily

v6.3

Quoted 11 lines

adding the --build parameter explicitly. Revert the change.

Bastian Germann (1):
kbuild: deb-pkg: default dpkg-buildpackage --build

 scripts/Makefile.package | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
Signature · 1 line
2.39.2

Masahiro prepared a patch [1] for explicitly introducing a 'srcdeb-pkg' target, but scheduled its inclusion for v6.4.

Kind regards,
Nicolas

[1]: https://lore.kernel.org/linux-kbuild/CAK7LNAR82ZgvKof9VMXRM4A_h22ZNCyoaKoHW-ONJ+4vctCu_A@mail.gmail.com/T/#m59cc003498dab9b7246198ac3172527256bd1304

#12 lore raw

Am 06.03.23 um 15:30 schrieb Nicolas Schier:

Quoted 13 lines · Bastian Germann
Quoted 1 line

deb-pkg's dpkg-buildpackage invocation was changed in v6.2, unnecessarily

v6.3

Quoted 8 lines

adding the --build parameter explicitly. Revert the change.

Bastian Germann (1):

   kbuild: deb-pkg: default dpkg-buildpackage --build
  scripts/Makefile.package | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
Quoted 6 lines
Quoted 3 lines
Signature · 1 line
2.39.2

Masahiro prepared a patch [1] for explicitly introducing a 'srcdeb-pkg' target, but scheduled its inclusion for v6.4.

Thanks for the pointer. I would still find it nice not to break the use case in 6.3.

Quoted 5 lines

Kind regards,
Nicolas

[1]: https://lore.kernel.org/linux-kbuild/CAK7LNAR82ZgvKof9VMXRM4A_h22ZNCyoaKoHW-ONJ+4vctCu_A@mail.gmail.com/T/#m59cc003498dab9b7246198ac3172527256bd1304