public inbox for linux-kbuild@vger.kernel.org
 help / color / mirror / Atom feed
* Patch: Suppress irrelevant warning when generating a debian package
@ 2020-03-24 10:24 Reinhard Karcher
  2020-03-29 12:01 ` Masahiro Yamada
  0 siblings, 1 reply; 7+ messages in thread
From: Reinhard Karcher @ 2020-03-24 10:24 UTC (permalink / raw)
  To: linux-kbuild; +Cc: 954778

Creating a Debian package by compiling the kernel using make bindeb-pkg
without creating debug information creates a warning that no
debug package was created.
This patch excludes the debug package from the control file,
if no debug package is created by this configuration.

By making a contribution to this project, I certify that:
The contribution was created in whole or in part by me and I have the right to
submit it under the open source license indicated in the file.
Signed-off-by: Reinhard Karcher <reinhard.karcher@gmx.net>
---
The condition to include the debug package is copied from the file
builddeb in the same directory.

diff --git a/scripts/package/mkdebian b/scripts/package/mkdebian
index 357dc56bcf30..1673b9f84804 100755
--- a/scripts/package/mkdebian
+++ b/scripts/package/mkdebian
@@ -198,7 +198,10 @@ Description: Linux support headers for userspace
development
  This package provides userspaces headers from the Linux kernel.  These
headers
  are used by the installed headers for GNU glibc and other system libraries.
 Multi-Arch: same
+EOF

+if [ -n "$BUILD_DEBUG" ] ; then
+cat <<EOF >> debian/control
 Package: $dbg_packagename
 Section: debug
 Architecture: $debarch
@@ -206,6 +209,7 @@ Description: Linux kernel debugging symbols for $version
  This package will come in handy if you need to debug the kernel. It provides
  all the necessary debug symbols for the kernel and its modules.
 EOF
+fi

 cat <<EOF > debian/rules
 #!$(command -v $MAKE) -f

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

* Re: Patch: Suppress irrelevant warning when generating a debian package
  2020-03-24 10:24 Patch: Suppress irrelevant warning when generating a debian package Reinhard Karcher
@ 2020-03-29 12:01 ` Masahiro Yamada
  2020-03-29 12:55   ` Reinhard Karcher
  0 siblings, 1 reply; 7+ messages in thread
From: Masahiro Yamada @ 2020-03-29 12:01 UTC (permalink / raw)
  To: Reinhard Karcher; +Cc: Linux Kbuild mailing list, 954778

On Tue, Mar 24, 2020 at 7:24 PM Reinhard Karcher
<reinhard.karcher@gmx.net> wrote:
>
> Creating a Debian package by compiling the kernel using make bindeb-pkg
> without creating debug information creates a warning that no
> debug package was created.
> This patch excludes the debug package from the control file,
> if no debug package is created by this configuration.

OK, this seems correct.

> By making a contribution to this project, I certify that:
> The contribution was created in whole or in part by me and I have the right to
> submit it under the open source license indicated in the file.

Please drop this.

Signed-off-by implies this.
No need to explain this in an individual patch.


> Signed-off-by: Reinhard Karcher <reinhard.karcher@gmx.net>
> ---
> The condition to include the debug package is copied from the file
> builddeb in the same directory.
>
> diff --git a/scripts/package/mkdebian b/scripts/package/mkdebian
> index 357dc56bcf30..1673b9f84804 100755
> --- a/scripts/package/mkdebian
> +++ b/scripts/package/mkdebian
> @@ -198,7 +198,10 @@ Description: Linux support headers for userspace
> development
>   This package provides userspaces headers from the Linux kernel.  These
> headers
>   are used by the installed headers for GNU glibc and other system libraries.
>  Multi-Arch: same
> +EOF
>
> +if [ -n "$BUILD_DEBUG" ] ; then


This file does not define BUILD_DEBUG.
So, this conditional is always false, isn't it?

It should be:

if is_enabled CONFIG_DEBUG_INFO; then




> +cat <<EOF >> debian/control
>  Package: $dbg_packagename
>  Section: debug
>  Architecture: $debarch
> @@ -206,6 +209,7 @@ Description: Linux kernel debugging symbols for $version
>   This package will come in handy if you need to debug the kernel. It provides
>   all the necessary debug symbols for the kernel and its modules.
>  EOF
> +fi
>
>  cat <<EOF > debian/rules
>  #!$(command -v $MAKE) -f
>
>
>


-- 
Best Regards
Masahiro Yamada

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

* Re: Patch: Suppress irrelevant warning when generating a debian package
  2020-03-29 12:01 ` Masahiro Yamada
@ 2020-03-29 12:55   ` Reinhard Karcher
  2020-03-29 13:30     ` Bug#954778: " Masahiro Yamada
  0 siblings, 1 reply; 7+ messages in thread
From: Reinhard Karcher @ 2020-03-29 12:55 UTC (permalink / raw)
  To: Linux Kbuild mailing list; +Cc: 954778

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

Am Sonntag, 29. März 2020, 14:01 schrieb Masahiro Yamada:
> 
> > By making a contribution to this project, I certify that:
> > The contribution was created in whole or in part by me and I have the
> > right to submit it under the open source license indicated in the file.
> 
> Please drop this.
> 
> Signed-off-by implies this.
> No need to explain this in an individual patch.

Droped in attached new version.

> > +if [ -n "$BUILD_DEBUG" ] ; then
> 
> This file does not define BUILD_DEBUG.
> So, this conditional is always false, isn't it?
> 
> It should be:
> 
> if is_enabled CONFIG_DEBUG_INFO; then
> 

The definition of BUILD_DEBUG is copied from builddeb too. 
See attached patch.

--
Best regards
Reinhard Karcher

[-- Attachment #2: remove_debug_warning.patch --]
[-- Type: text/x-patch, Size: 1508 bytes --]

from Reinhard.Karcher reinhard.karcher@gmx.net

Creating a Debian package by compiling the kernel
make bindeb-pkg
without creating debug information creates a warning that no
debug package was created
This patch excludes the debug package from the control file,
if no debug package is created by this configuration

Signed-off-by:Reinhard Karcher <reinhard.karcher@gmx.net>

diff --git a/scripts/package/mkdebian b/scripts/package/mkdebian
index 357dc56bcf30..572abe5a149e 100755
--- a/scripts/package/mkdebian
+++ b/scripts/package/mkdebian
@@ -96,6 +96,7 @@ fi
 sourcename=$KDEB_SOURCENAME
 packagename=linux-image-$version
 kernel_headers_packagename=linux-headers-$version
+BUILD_DEBUG=$(if_enabled_echo CONFIG_DEBUG_INFO Yes)
 dbg_packagename=$packagename-dbg
 debarch=
 set_debarch
@@ -198,7 +199,10 @@ Description: Linux support headers for userspace development
  This package provides userspaces headers from the Linux kernel.  These headers
  are used by the installed headers for GNU glibc and other system libraries.
 Multi-Arch: same
+EOF

+if [ -n "$BUILD_DEBUG" ] ; then
+cat <<EOF >> debian/control
 Package: $dbg_packagename
 Section: debug
 Architecture: $debarch
@@ -206,6 +210,7 @@ Description: Linux kernel debugging symbols for $version
  This package will come in handy if you need to debug the kernel. It provides
  all the necessary debug symbols for the kernel and its modules.
 EOF
+fi

 cat <<EOF > debian/rules
 #!$(command -v $MAKE) -f

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

* Re: Bug#954778: Patch: Suppress irrelevant warning when generating a debian package
  2020-03-29 12:55   ` Reinhard Karcher
@ 2020-03-29 13:30     ` Masahiro Yamada
  2020-03-29 14:28       ` Reinhard Karcher
  2020-03-29 15:01       ` Reinhard Karcher
  0 siblings, 2 replies; 7+ messages in thread
From: Masahiro Yamada @ 2020-03-29 13:30 UTC (permalink / raw)
  To: Reinhard Karcher, 954778; +Cc: Linux Kbuild mailing list

On Sun, Mar 29, 2020 at 9:57 PM Reinhard Karcher
<reinhard.karcher@gmx.net> wrote:
>
> Am Sonntag, 29. März 2020, 14:01 schrieb Masahiro Yamada:
> >
> > > By making a contribution to this project, I certify that:
> > > The contribution was created in whole or in part by me and I have the
> > > right to submit it under the open source license indicated in the file.
> >
> > Please drop this.
> >
> > Signed-off-by implies this.
> > No need to explain this in an individual patch.
>
> Droped in attached new version.
>
> > > +if [ -n "$BUILD_DEBUG" ] ; then
> >
> > This file does not define BUILD_DEBUG.
> > So, this conditional is always false, isn't it?
> >
> > It should be:
> >
> > if is_enabled CONFIG_DEBUG_INFO; then
> >
>
> The definition of BUILD_DEBUG is copied from builddeb too.
> See attached patch.


No.

I want you to directly use

if is_enabled CONFIG_DEBUG_INFO; then
...
fi





I guess builddeb used BUILD_DEBUG
to avoid running grep twice.

It does not apply to mkdebian.



-- 
Best Regards
Masahiro Yamada

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

* Re: Bug#954778: Patch: Suppress irrelevant warning when generating a debian package
  2020-03-29 13:30     ` Bug#954778: " Masahiro Yamada
@ 2020-03-29 14:28       ` Reinhard Karcher
  2020-03-29 15:01       ` Reinhard Karcher
  1 sibling, 0 replies; 7+ messages in thread
From: Reinhard Karcher @ 2020-03-29 14:28 UTC (permalink / raw)
  To: Linux Kbuild mailing list; +Cc: 954778

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

Am Sonntag, 29. März 2020, 15:30 schrieb Masahiro Yamada:
> 
> I want you to directly use
> 
> if is_enabled CONFIG_DEBUG_INFO; then
> ...
> fi
> 

Corrected patch attached

--
Best regards
Reinhard Karcher

[-- Attachment #2: remove_debug_warning.patch --]
[-- Type: text/x-patch, Size: 1260 bytes --]

from Reinhard.Karcher reinhard.karcher@gmx.net

Creating a Debian package by compiling the kernel
make bindeb-pkg
without creating debug information creates a warning that no
debug package was created
This patch excludes the debug package from the control file,
if no debug package is created by this configuration

Signed-off-by:Reinhard Karcher <reinhard.karcher@gmx.net>

diff --git a/scripts/package/mkdebian b/scripts/package/mkdebian
index 357dc56bcf30..327ea3c2a785 100755
--- a/scripts/package/mkdebian
+++ b/scripts/package/mkdebian
@@ -198,7 +198,10 @@ Description: Linux support headers for userspace development
  This package provides userspaces headers from the Linux kernel.  These headers
  are used by the installed headers for GNU glibc and other system libraries.
 Multi-Arch: same
+EOF

+if is_enabled CONFIG_DEBUG_INFO; then
+cat <<EOF >> debian/control
 Package: $dbg_packagename
 Section: debug
 Architecture: $debarch
@@ -206,6 +209,7 @@ Description: Linux kernel debugging symbols for $version
  This package will come in handy if you need to debug the kernel. It provides
  all the necessary debug symbols for the kernel and its modules.
 EOF
+fi

 cat <<EOF > debian/rules
 #!$(command -v $MAKE) -f

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

* Re: Bug#954778: Patch: Suppress irrelevant warning when generating a debian package
  2020-03-29 13:30     ` Bug#954778: " Masahiro Yamada
  2020-03-29 14:28       ` Reinhard Karcher
@ 2020-03-29 15:01       ` Reinhard Karcher
  2020-03-30  0:33         ` Masahiro Yamada
  1 sibling, 1 reply; 7+ messages in thread
From: Reinhard Karcher @ 2020-03-29 15:01 UTC (permalink / raw)
  To: Linux Kbuild mailing list; +Cc: 954778

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

There was a blank line missing between the package definitions.
Sorry for late testing.

--
Best regards
Reinhard Karcher

[-- Attachment #2: remove_debug_warning.patch --]
[-- Type: text/x-patch, Size: 1238 bytes --]

from Reinhard.Karcher reinhard.karcher@gmx.net

Creating a Debian package by compiling the kernel
make bindeb-pkg
without creating debug information creates a warning that no
debug package was created
This patch excludes the debug package from the control file,
if no debug package is created by this configuration

Signed-off-by:Reinhard Karcher <reinhard.karcher@gmx.net>

diff --git a/scripts/package/mkdebian b/scripts/package/mkdebian
index 357dc56bcf30..df1adbfb8ead 100755
--- a/scripts/package/mkdebian
+++ b/scripts/package/mkdebian
@@ -198,6 +198,10 @@ Description: Linux support headers for userspace development
  This package provides userspaces headers from the Linux kernel.  These headers
  are used by the installed headers for GNU glibc and other system libraries.
 Multi-Arch: same
+EOF
+
+if is_enabled CONFIG_DEBUG_INFO; then
+cat <<EOF >> debian/control

 Package: $dbg_packagename
 Section: debug
@@ -206,6 +210,7 @@ Description: Linux kernel debugging symbols for $version
  This package will come in handy if you need to debug the kernel. It provides
  all the necessary debug symbols for the kernel and its modules.
 EOF
+fi

 cat <<EOF > debian/rules
 #!$(command -v $MAKE) -f

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

* Re: Bug#954778: Patch: Suppress irrelevant warning when generating a debian package
  2020-03-29 15:01       ` Reinhard Karcher
@ 2020-03-30  0:33         ` Masahiro Yamada
  0 siblings, 0 replies; 7+ messages in thread
From: Masahiro Yamada @ 2020-03-30  0:33 UTC (permalink / raw)
  To: Reinhard Karcher; +Cc: Linux Kbuild mailing list, 954778

On Mon, Mar 30, 2020 at 12:01 AM Reinhard Karcher
<reinhard.karcher@gmx.net> wrote:
>
> There was a blank line missing between the package definitions.
> Sorry for late testing.
>
> --
> Best regards
> Reinhard Karcher


The attached patch is not in a correct patch format.

This time, I manually crufted the format, and applied.

But, next time, please send it to ML instead of attachment,
in a correct format.

git supports useful commands to do this.

  [1]  "git format-patch"  to create a patch
  [2]  "git send-email" to send it to ML


I reworded the log as follows:

------------------>8---------------
kbuild: deb-pkg: fix warning when CONFIG_DEBUG_INFO is unset

Creating a Debian package without CONFIG_DEBUG_INFO produces
a warning that no debug package was created.

This patch excludes the debug package from the control file,
if no debug package is created by this configuration.

Signed-off-by: Reinhard Karcher <reinhard.karcher@gmx.net>
Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
------------------>8---------------


-- 
Best Regards
Masahiro Yamada

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

end of thread, other threads:[~2020-03-30  0:33 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-03-24 10:24 Patch: Suppress irrelevant warning when generating a debian package Reinhard Karcher
2020-03-29 12:01 ` Masahiro Yamada
2020-03-29 12:55   ` Reinhard Karcher
2020-03-29 13:30     ` Bug#954778: " Masahiro Yamada
2020-03-29 14:28       ` Reinhard Karcher
2020-03-29 15:01       ` Reinhard Karcher
2020-03-30  0:33         ` Masahiro Yamada

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox