diff mbox series

[v2,1/1] builddeb: introduce profile excluding the dbg pkg

Message ID 20230306223208.6277-2-bage@linutronix.de (mailing list archive)
State New, archived
Headers show
Series builddeb: introduce profile excluding the dbg pkg | expand

Commit Message

Bastian Germann March 6, 2023, 10:32 p.m. UTC
Enabling CONFIG_DEBUG_INFO implies building the binary linux-image-*-dbg.
As this increases package build time significantly, one might want to
exclude it from being built.

Add build profile pkg.$sourcename.nokerneldbg for that package
so it can be excluded via e.g.
`make DPKG_FLAGS="-P=pkg.linux-upstream.nokerneldbg" deb-pkg`

The name is the same that is used in Debian's linux package since version
5.17~rc4-1~exp1.

Link: https://wiki.debian.org/BuildProfileSpec
Link: https://salsa.debian.org/kernel-team/linux/-/commit/140798ec2789
Signed-off-by: Bastian Germann <bage@linutronix.de>
---
 scripts/package/mkdebian | 1 +
 1 file changed, 1 insertion(+)

Comments

Masahiro Yamada March 12, 2023, 5:40 a.m. UTC | #1
On Tue, Mar 7, 2023 at 7:32 AM Bastian Germann <bage@linutronix.de> wrote:
>
> Enabling CONFIG_DEBUG_INFO implies building the binary linux-image-*-dbg.
> As this increases package build time significantly, one might want to
> exclude it from being built.


Did you confirm if this patch saved the build time in any way?
If so, please provide me with the steps to test it.


>
> Add build profile pkg.$sourcename.nokerneldbg for that package
> so it can be excluded via e.g.
> `make DPKG_FLAGS="-P=pkg.linux-upstream.nokerneldbg" deb-pkg`

The correct command is:

 `make DPKG_FLAGS="-Ppkg.linux-upstream.nokerneldbg" deb-pkg`


-P<profile>                         (without '=' for the short option)
       or
--build-profiles=<profile>    (with '=' for the long option)



I will postpone this because just adding Build-Profiles does nothing.




>
> The name is the same that is used in Debian's linux package since version
> 5.17~rc4-1~exp1.
>
> Link: https://wiki.debian.org/BuildProfileSpec
> Link: https://salsa.debian.org/kernel-team/linux/-/commit/140798ec2789
> Signed-off-by: Bastian Germann <bage@linutronix.de>
> ---
>  scripts/package/mkdebian | 1 +
>  1 file changed, 1 insertion(+)
>
> diff --git a/scripts/package/mkdebian b/scripts/package/mkdebian
> index f74380036bb5..8a7969926e53 100755
> --- a/scripts/package/mkdebian
> +++ b/scripts/package/mkdebian
> @@ -227,6 +227,7 @@ if is_enabled CONFIG_DEBUG_INFO; then
>  cat <<EOF >> debian/control
>
>  Package: linux-image-$version-dbg
> +Build-Profiles: <!pkg.$sourcename.nokerneldbg>
>  Section: debug
>  Architecture: $debarch
>  Description: Linux kernel debugging symbols for $version
> --
> 2.39.2
>


--
Best Regards
Masahiro Yamada
diff mbox series

Patch

diff --git a/scripts/package/mkdebian b/scripts/package/mkdebian
index f74380036bb5..8a7969926e53 100755
--- a/scripts/package/mkdebian
+++ b/scripts/package/mkdebian
@@ -227,6 +227,7 @@  if is_enabled CONFIG_DEBUG_INFO; then
 cat <<EOF >> debian/control
 
 Package: linux-image-$version-dbg
+Build-Profiles: <!pkg.$sourcename.nokerneldbg>
 Section: debug
 Architecture: $debarch
 Description: Linux kernel debugging symbols for $version