From: Peter Jung <admin@ptr1337.dev>
To: Masahiro Yamada <masahiroy@kernel.org>
Cc: jose.fernandez@linux.dev,
"Thomas Weißschuh" <linux@weissschuh.net>,
"Christian Heusel" <christian@heusel.eu>,
"Nathan Chancellor" <nathan@kernel.org>,
"Nicolas Schier" <nicolas@fjasle.eu>,
linux-kbuild@vger.kernel.org, linux-kernel@vger.kernel.org,
bpf@vger.kernel.org
Subject: Re: [PATCH] kbuild: add resolve_btfids to pacman PKGBUILD
Date: Mon, 4 Nov 2024 15:44:04 +0100 [thread overview]
Message-ID: <b5c2bf57-c051-40e3-a4a6-ccd38b728752@ptr1337.dev> (raw)
In-Reply-To: <CAK7LNAQ=sCsTXB_O58W=AH=k8Vqzoi+hh6-BKhEjZYh-+xCvBQ@mail.gmail.com>
On 03.11.24 10:47, Masahiro Yamada wrote:
> On Sat, Nov 2, 2024 at 9:06 PM Peter Jung<admin@ptr1337.dev> wrote:
>> If the config is using DEBUG_INFO_BTF, it is required to,
>> package resolve_btfids with.
>> Compiling dkms modules will fail otherwise.
>>
>> Add a check, if resolve_btfids is present and then package it, if required.
>>
>> Signed-off-by: Peter Jung<admin@ptr1337.dev>
>> ---
>> scripts/package/PKGBUILD | 5 +++++
>> 1 file changed, 5 insertions(+)
>>
>> diff --git a/scripts/package/PKGBUILD b/scripts/package/PKGBUILD
>> index f83493838cf9..4010899652b8 100644
>> --- a/scripts/package/PKGBUILD
>> +++ b/scripts/package/PKGBUILD
>> @@ -91,6 +91,11 @@ _package-headers() {
>> "${srctree}/scripts/package/install-extmod-build" "${builddir}"
>> fi
>>
>> + # required when DEBUG_INFO_BTF_MODULES is enabled
>> + if [ -f tools/bpf/resolve_btfids/resolve_btfids ]; then
>> + install -Dt "$builddir/tools/bpf/resolve_btfids" tools/bpf/resolve_btfids/resolve_btfids
>> + fi
>> +
> This is not the right place.
>
> scripts/package/install-extmod-build is a script to set up
> the build environment to build external modules.
> It is shared by rpm-pkg, deb-pkg, and pacman-pkg.
>
>
> https://github.com/torvalds/linux/blob/v6.12-rc5/scripts/package/install-extmod-build#L34
>
> You will see how objtool is copied.
>
>
>
>
> (Anyway, it depends on your urgency.
> My hope is to support objtool and resolve_btfids in more generic ways.)
>
Thanks Masahiro for the suggestion. I will look into and likely bring a v2.
I did not know about other distribution/package managers, if this is
also a problem at them.
At archlinux we have included this since a while already in the
PKGBUILD, see here:
https://gitlab.archlinux.org/archlinux/packaging/packages/linux/-/blob/main/PKGBUILD?ref_type=heads#L151-152
I will also make the change to grep for DEBUG_INFO_BTF in the config
with the is_enabled function, instead of checking the path
Regards,
Peter
prev parent reply other threads:[~2024-11-04 14:44 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-11-02 12:05 [PATCH] kbuild: add resolve_btfids to pacman PKGBUILD Peter Jung
2024-11-03 4:39 ` Thomas Weißschuh
2024-11-03 9:47 ` Masahiro Yamada
2024-11-04 14:44 ` Peter Jung [this message]
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=b5c2bf57-c051-40e3-a4a6-ccd38b728752@ptr1337.dev \
--to=admin@ptr1337.dev \
--cc=bpf@vger.kernel.org \
--cc=christian@heusel.eu \
--cc=jose.fernandez@linux.dev \
--cc=linux-kbuild@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@weissschuh.net \
--cc=masahiroy@kernel.org \
--cc=nathan@kernel.org \
--cc=nicolas@fjasle.eu \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox