Message ID | 20221228191014.659746-1-masahiroy@kernel.org |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:4e01:0:0:0:0:0 with SMTP id p1csp2046161wrt; Wed, 28 Dec 2022 11:14:07 -0800 (PST) X-Google-Smtp-Source: AMrXdXv0jmcYyV3PHU8J50CEutq3iFV1+sP0uCAQDKhRQOhhoDVK6PRoXN/FvVSgAWPnljs1G/yL X-Received: by 2002:a17:903:2349:b0:189:bdd4:1d60 with SMTP id c9-20020a170903234900b00189bdd41d60mr48994610plh.7.1672254846799; Wed, 28 Dec 2022 11:14:06 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1672254846; cv=none; d=google.com; s=arc-20160816; b=OItlA7CMLx+0/HvC0UWUVXBaCaxBY8S0ioYWtdSL5glPacenk1+v0PKUr4FPLr1RqZ 5P+pMYbR4r2Eao0FO5UzCdKaAGBXWc4tU5trZ/zcJt1s9z48mgTyZOAUGY5ZbgJzu7/P vT4Wa5TF3D2islaN9eQERuXyu2iWjjymYK8YRfamY5dpWQ6UvprSgNDtvnCHJZ8sJ/e9 XR3As0uV/qKLqXBFzja9b4/CjBdQjqlZawxS60KckbkRLwCwZNj6aM9uS51GnIsWP7lF fWT66vCR/e3QNmZjes26cMigSccKzQ7bz77ax/d0tazN3Ao0mfON0NUhDk32MImpQr4b Qf+Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=GDHqGxhRqyup4BMdGbY1FaE/YimD/AtU/0oTnZ1ZyDw=; b=ueiT4qiZI2GLw5VYbM7ta0pH3IPFhWwSNRutJhjahhv738Iz4+aFhYxDi8Co/nBb8U EgomEAaZlWD0/zVa2XwjU/TL23TqkYARJdOKnnp4HUcmUWHAWdo5SwjIeyuq2mw760Dv 43vL+TXdRgdoEhaDTCwIqF5PUBkPiSfIJRYcTkrt/RWNquZw8pWO6E4ilUXuJ3YFqdAY 7qp42rN+Mm3szjHIK+6XhFE+EqEUZQQPB80kWc7/hWuODMqbIV3m818kJfvzf0xzsTsk 90uCcS7I7ZeZ0Bs6yXYTiy4ah49ww0uOe2NonPGaxETEo4KG44+jza/0fLNXix30hdQM jL/A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=YptHzzDm; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id y13-20020a1709029b8d00b001890f0086b7si16485047plp.454.2022.12.28.11.13.54; Wed, 28 Dec 2022 11:14:06 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=YptHzzDm; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232366AbiL1TKc (ORCPT <rfc822;eddaouddi.ayoub@gmail.com> + 99 others); Wed, 28 Dec 2022 14:10:32 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41306 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230224AbiL1TKb (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Wed, 28 Dec 2022 14:10:31 -0500 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 06C2314D2B; Wed, 28 Dec 2022 11:10:31 -0800 (PST) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 92CF2615ED; Wed, 28 Dec 2022 19:10:30 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 6F2C6C433D2; Wed, 28 Dec 2022 19:10:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1672254629; bh=NDaJHiYbI1eAcF8Qz6/6BoaxzjqK+j8AikgdtIirofo=; h=From:To:Cc:Subject:Date:From; b=YptHzzDmaVigBO+yhhTMg1gtUXHQ4eAYcGZp82FEDH4+2HHKwU5ot0I9TppGl+4lq UiKbytKGJL/J2WfCuECQdN6b7KbjwTG8AfuWXO08lsMY0ktQe/TgCmh1uBoHJXyReZ FmQysuNFOYEuUDh5Sm7Vfyx65ydxoU/BuHXDr1jNaf5xmtqX+fUQ12mRrRJz0VfRAx 2UWS09DgMXBoC+855b7vhkq26FPlU8m2Zcv+iKk9ExdI2uMwPD3eAAqkFC8fk12w12 271yV8gE/Hm4JtBwAlViPNv3g5uSCA0JJxbfcDgnL7LGgLRQ1VxRkqmxJdm8Y0XDqW /rchBx/pbsocw== From: Masahiro Yamada <masahiroy@kernel.org> To: linux-kbuild@vger.kernel.org Cc: linux-kernel@vger.kernel.org, Alexander Gordeev <agordeev@linux.ibm.com>, Masahiro Yamada <masahiroy@kernel.org>, Guoqing Jiang <guoqing.jiang@linux.dev>, Ivan Vecera <ivecera@redhat.com>, Jonathan Toppins <jtoppins@redhat.com>, Nathan Chancellor <nathan@kernel.org>, Nick Desaulniers <ndesaulniers@google.com>, Nicolas Schier <nicolas@fjasle.eu>, =?utf-8?b?w43DsWlnbyBIdWd1ZXQ=?= <ihuguet@redhat.com> Subject: [PATCH] kbuild: rpm-pkg: add libelf-devel as alternative for BuildRequires Date: Thu, 29 Dec 2022 04:10:14 +0900 Message-Id: <20221228191014.659746-1-masahiroy@kernel.org> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1753486298395883310?= X-GMAIL-MSGID: =?utf-8?q?1753486298395883310?= |
Series |
kbuild: rpm-pkg: add libelf-devel as alternative for BuildRequires
|
|
Commit Message
Masahiro Yamada
Dec. 28, 2022, 7:10 p.m. UTC
Guoqing Jiang reports that openSUSE cannot compile the kernel rpm due
to "BuildRequires: elfutils-libelf-devel" added by commit 8818039f959b
("kbuild: add ability to make source rpm buildable using koji").
The relevant package name in openSUSE is libelf-devel.
Add it an alternative package.
BTW, if it is impossible to solve the build requirement, the final
resort would be:
$ make RPMOPTS=--nodeps rpm-pkg
This passes --nodeps to the rpmbuild command so it will not verify
build dependencies. This is useful to test rpm builds on non-rpm
system. On Debian/Ubuntu, for example, you can install rpmbuild by
'apt-get install rpm'.
NOTE1:
Likewise, it is possible to bypass the build dependency check for
debian package builds:
$ make DPKG_FLAGS=-d deb-pkg
NOTE2:
The 'or' operator is supported since RPM 4.13. So, old distros such
as CentOS 7 will break. I suggest installing newer rpmbuild in such
cases.
Link: https://lore.kernel.org/linux-kbuild/ee227d24-9c94-bfa3-166a-4ee6b5dfea09@linux.dev/T/#u
Fixes: 8818039f959b ("kbuild: add ability to make source rpm buildable using koji")
Reported-by: Guoqing Jiang <guoqing.jiang@linux.dev>
Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
---
scripts/package/mkspec | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
Comments
On Thu, Dec 29, 2022 at 04:10:14AM +0900, Masahiro Yamada wrote: > Guoqing Jiang reports that openSUSE cannot compile the kernel rpm due > to "BuildRequires: elfutils-libelf-devel" added by commit 8818039f959b > ("kbuild: add ability to make source rpm buildable using koji"). > The relevant package name in openSUSE is libelf-devel. > > Add it an alternative package. > > BTW, if it is impossible to solve the build requirement, the final > resort would be: > > $ make RPMOPTS=--nodeps rpm-pkg > > This passes --nodeps to the rpmbuild command so it will not verify > build dependencies. This is useful to test rpm builds on non-rpm > system. On Debian/Ubuntu, for example, you can install rpmbuild by > 'apt-get install rpm'. > > NOTE1: > Likewise, it is possible to bypass the build dependency check for > debian package builds: > > $ make DPKG_FLAGS=-d deb-pkg > > NOTE2: > The 'or' operator is supported since RPM 4.13. So, old distros such > as CentOS 7 will break. I suggest installing newer rpmbuild in such > cases. > > Link: https://lore.kernel.org/linux-kbuild/ee227d24-9c94-bfa3-166a-4ee6b5dfea09@linux.dev/T/#u > Fixes: 8818039f959b ("kbuild: add ability to make source rpm buildable using koji") > Reported-by: Guoqing Jiang <guoqing.jiang@linux.dev> > Signed-off-by: Masahiro Yamada <masahiroy@kernel.org> Reviewed-by: Nathan Chancellor <nathan@kernel.org> > --- > > scripts/package/mkspec | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > > diff --git a/scripts/package/mkspec b/scripts/package/mkspec > index dda00a948a01..adab28fa7f89 100755 > --- a/scripts/package/mkspec > +++ b/scripts/package/mkspec > @@ -51,7 +51,8 @@ sed -e '/^DEL/d' -e 's/^\t*//' <<EOF > URL: https://www.kernel.org > $S Source: kernel-$__KERNELRELEASE.tar.gz > Provides: $PROVIDES > -$S BuildRequires: bc binutils bison dwarves elfutils-libelf-devel flex > +$S BuildRequires: bc binutils bison dwarves > +$S BuildRequires: (elfutils-libelf-devel or libelf-devel) flex > $S BuildRequires: gcc make openssl openssl-devel perl python3 rsync > > # $UTS_MACHINE as a fallback of _arch in case > -- > 2.34.1 >
On 12/29/22 03:10, Masahiro Yamada wrote: > Guoqing Jiang reports that openSUSE cannot compile the kernel rpm due > to "BuildRequires: elfutils-libelf-devel" added by commit 8818039f959b > ("kbuild: add ability to make source rpm buildable using koji"). > The relevant package name in openSUSE is libelf-devel. > > Add it an alternative package. > > BTW, if it is impossible to solve the build requirement, the final > resort would be: > > $ make RPMOPTS=--nodeps rpm-pkg > > This passes --nodeps to the rpmbuild command so it will not verify > build dependencies. This is useful to test rpm builds on non-rpm > system. On Debian/Ubuntu, for example, you can install rpmbuild by > 'apt-get install rpm'. > > NOTE1: > Likewise, it is possible to bypass the build dependency check for > debian package builds: > > $ make DPKG_FLAGS=-d deb-pkg > > NOTE2: > The 'or' operator is supported since RPM 4.13. So, old distros such > as CentOS 7 will break. I suggest installing newer rpmbuild in such > cases. > > Link: https://lore.kernel.org/linux-kbuild/ee227d24-9c94-bfa3-166a-4ee6b5dfea09@linux.dev/T/#u > Fixes: 8818039f959b ("kbuild: add ability to make source rpm buildable using koji") > Reported-by: Guoqing Jiang <guoqing.jiang@linux.dev> > Signed-off-by: Masahiro Yamada <masahiroy@kernel.org> > --- > > scripts/package/mkspec | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > > diff --git a/scripts/package/mkspec b/scripts/package/mkspec > index dda00a948a01..adab28fa7f89 100755 > --- a/scripts/package/mkspec > +++ b/scripts/package/mkspec > @@ -51,7 +51,8 @@ sed -e '/^DEL/d' -e 's/^\t*//' <<EOF > URL: https://www.kernel.org > $S Source: kernel-$__KERNELRELEASE.tar.gz > Provides: $PROVIDES > -$S BuildRequires: bc binutils bison dwarves elfutils-libelf-devel flex > +$S BuildRequires: bc binutils bison dwarves > +$S BuildRequires: (elfutils-libelf-devel or libelf-devel) flex > $S BuildRequires: gcc make openssl openssl-devel perl python3 rsync > > # $UTS_MACHINE as a fallback of _arch in case Thanks for the quick fix! I verified the above works for openSUSE leap 15.4. Tested-by: Guoqing Jiang <guoqing.jiang@linux.dev> Thanks, Guoqing
On 12/28/22 14:10, Masahiro Yamada wrote: > Guoqing Jiang reports that openSUSE cannot compile the kernel rpm due > to "BuildRequires: elfutils-libelf-devel" added by commit 8818039f959b > ("kbuild: add ability to make source rpm buildable using koji"). > The relevant package name in openSUSE is libelf-devel. > > Add it an alternative package. > > BTW, if it is impossible to solve the build requirement, the final > resort would be: > > $ make RPMOPTS=--nodeps rpm-pkg > > This passes --nodeps to the rpmbuild command so it will not verify > build dependencies. This is useful to test rpm builds on non-rpm > system. On Debian/Ubuntu, for example, you can install rpmbuild by > 'apt-get install rpm'. > > NOTE1: > Likewise, it is possible to bypass the build dependency check for > debian package builds: > > $ make DPKG_FLAGS=-d deb-pkg > > NOTE2: > The 'or' operator is supported since RPM 4.13. So, old distros such > as CentOS 7 will break. I suggest installing newer rpmbuild in such > cases. > > Link: https://lore.kernel.org/linux-kbuild/ee227d24-9c94-bfa3-166a-4ee6b5dfea09@linux.dev/T/#u > Fixes: 8818039f959b ("kbuild: add ability to make source rpm buildable using koji") > Reported-by: Guoqing Jiang <guoqing.jiang@linux.dev> > Signed-off-by: Masahiro Yamada <masahiroy@kernel.org> Acked-by: Jonathan Toppins <jtoppins@redhat.com>
diff --git a/scripts/package/mkspec b/scripts/package/mkspec index dda00a948a01..adab28fa7f89 100755 --- a/scripts/package/mkspec +++ b/scripts/package/mkspec @@ -51,7 +51,8 @@ sed -e '/^DEL/d' -e 's/^\t*//' <<EOF URL: https://www.kernel.org $S Source: kernel-$__KERNELRELEASE.tar.gz Provides: $PROVIDES -$S BuildRequires: bc binutils bison dwarves elfutils-libelf-devel flex +$S BuildRequires: bc binutils bison dwarves +$S BuildRequires: (elfutils-libelf-devel or libelf-devel) flex $S BuildRequires: gcc make openssl openssl-devel perl python3 rsync # $UTS_MACHINE as a fallback of _arch in case