All of lore.kernel.org
 help / color / mirror / Atom feed
From: Masahiro Yamada <masahiroy@kernel.org>
To: Josh Triplett <josh@joshtriplett.org>
Cc: Linux Kbuild mailing list <linux-kbuild@vger.kernel.org>,
	Michal Marek <michal.lkml@markovi.net>
Subject: Re: "make bindeb-pkg" fails with CONFIG_MODULES disabled
Date: Sat, 26 Sep 2020 14:45:38 +0900	[thread overview]
Message-ID: <CAK7LNAR5ArP8RGHHOXAauTvXcQgvstP=Ydh8Nc+Kv-0NYhhP2g@mail.gmail.com> (raw)
In-Reply-To: <20200925222934.GA126388@localhost>

On Sat, Sep 26, 2020 at 7:29 AM Josh Triplett <josh@joshtriplett.org> wrote:
>
> With CONFIG_MODULES disabled, "make bindeb-pkg" fails in
> scripts/package/builddeb with:
>
> find: ‘Module.symvers’: No such file or directory
>
> The deploy_kernel_headers function in scripts/package/builddeb calls:
>
> find arch/$SRCARCH/include Module.symvers include scripts -type f
>
> But find errors out if any of its command-line arguments doesn't exist.
>
> This could be fixed by checking whether that file exists first, but if
> CONFIG_MODULES is disabled, it doesn't really make sense to build the
> linux-headers package at all. Perhaps that whole package could be
> disabled when modules are disabled?

I agree.


How about something like the following?


diff --git a/scripts/package/builddeb b/scripts/package/builddeb
index 6df3c9f8b2da..8277144298a0 100755
--- a/scripts/package/builddeb
+++ b/scripts/package/builddeb
@@ -202,8 +202,10 @@ EOF
 done

 if [ "$ARCH" != "um" ]; then
-       deploy_kernel_headers debian/linux-headers
-       create_package linux-headers-$version debian/linux-headers
+       if is_enabled CONFIG_MODULES; then
+               deploy_kernel_headers debian/linux-headers
+               create_package linux-headers-$version debian/linux-headers
+       fi

        deploy_libc_headers debian/linux-libc-dev
        create_package linux-libc-dev debian/linux-libc-dev
diff --git a/scripts/package/mkdebian b/scripts/package/mkdebian
index 48fbd3d0284a..88c5e25662bd 100755
--- a/scripts/package/mkdebian
+++ b/scripts/package/mkdebian
@@ -183,13 +183,6 @@ Description: Linux kernel, version $version
  This package contains the Linux kernel, modules and corresponding other
  files, version: $version.

-Package: $kernel_headers_packagename
-Architecture: $debarch
-Description: Linux kernel headers for $version on $debarch
- This package provides kernel header files for $version on $debarch
- .
- This is useful for people who need to build external modules
-
 Package: linux-libc-dev
 Section: devel
 Provides: linux-kernel-headers
@@ -200,6 +193,17 @@ Description: Linux support headers for userspace
development
 Multi-Arch: same
 EOF

+if is_enabled CONFIG_MODULES; then
+cat <<EOF >> debian/control
+Package: $kernel_headers_packagename
+Architecture: $debarch
+Description: Linux kernel headers for $version on $debarch
+ This package provides kernel header files for $version on $debarch
+ .
+ This is useful for people who need to build external modules
+EOF
+fi
+
 if is_enabled CONFIG_DEBUG_INFO; then
 cat <<EOF >> debian/control






-- 
Best Regards
Masahiro Yamada

  reply	other threads:[~2020-09-26  5:46 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-09-25 22:29 "make bindeb-pkg" fails with CONFIG_MODULES disabled Josh Triplett
2020-09-26  5:45 ` Masahiro Yamada [this message]
2020-09-26  8:45   ` Josh Triplett
2020-10-13 16:48     ` Masahiro Yamada
2020-10-20 17:21       ` Josh Triplett

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAK7LNAR5ArP8RGHHOXAauTvXcQgvstP=Ydh8Nc+Kv-0NYhhP2g@mail.gmail.com' \
    --to=masahiroy@kernel.org \
    --cc=josh@joshtriplett.org \
    --cc=linux-kbuild@vger.kernel.org \
    --cc=michal.lkml@markovi.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.