Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp6960820rwb; Mon, 5 Dec 2022 22:02:18 -0800 (PST) X-Google-Smtp-Source: AA0mqf417GD4OerRPR5Tp9oiaJht0cK4K0MOZ1EWH2ayQRgFeH+jJyhKGdflMB7fDdN2COoKlRlx X-Received: by 2002:a17:902:e052:b0:189:7a8b:5350 with SMTP id x18-20020a170902e05200b001897a8b5350mr47897140plx.44.1670306538205; Mon, 05 Dec 2022 22:02:18 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1670306538; cv=none; d=google.com; s=arc-20160816; b=Z1ho8ipjqYGVnigVd8IG7HOD0xG8Rh5pcafKheCmDqsaxq0hxEmklqZ/+kLEZAo2O8 GTRQuxgfhmC3an/+LdgLcIs0ERiqAsmpAVVF3oTInlQHGzWx2MHetPjGOwvpFidpRtUR dgHWQHLEbBYZiZUXDEZdoSzd5ffz03mQyx4Si1VFx8fmJm4KQ9M71P3OCnUQ/v8l1sOW ItymohBMxOflX3QZsHRTlw9CuB1ZE7PMbigQSM/ba1OzG7py8hHQThvWHQbcwf5KUc34 HlGg5vlHIAD4fGPa6a/frECibeL6YZYv3ZeVV3C4wG7Uz1LODYFEJRccZf+iSBketNq1 ILhA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=8d8E8Zxi4DqG9crOyp7Wd4237RTp+YfV9h1RI5HT8ns=; b=aamQEf5wjyHqNIjcLARilCi9DXfcm0qoOB8+8G18iav2RnUOWgcqeCl8Wf/kf+/KZh Mb+KZ4YHGT428XNjKJKmwjy3gUD5VzdTxr8dNaa95BVEqA1lBv8OKRR+yrpOWd0XHHbG 19dbV5R3LqE/E5Al+LYxphn/+2r/EfOglnvJzx3+c0JXprqSyGeDznxcahP+guSWo0H1 uAnM8Wv8+KtuwVav5ygx6CNyZbQecvThyhfVBWbsG4YREfBwmAfm/e2awnz4iksrRryM +dYwFTecp4+/qrVHVqn5+Czs1+MTFf1icKLtemKmSeLH+EqAeZsE9vidAr5wP2igoTni 6VlQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=bombadil.20210309 header.b=YbqO6Nip; 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id t12-20020a170902e1cc00b001897bfc97fesi15230135pla.54.2022.12.05.22.02.07; Mon, 05 Dec 2022 22:02:18 -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=@infradead.org header.s=bombadil.20210309 header.b=YbqO6Nip; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231434AbiLFFoY (ORCPT + 79 others); Tue, 6 Dec 2022 00:44:24 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35160 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229471AbiLFFoW (ORCPT ); Tue, 6 Dec 2022 00:44:22 -0500 Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:3::133]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C639122B08; Mon, 5 Dec 2022 21:44:21 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; h=Content-Transfer-Encoding: Content-Type:In-Reply-To:From:References:Cc:To:Subject:MIME-Version:Date: Message-ID:Sender:Reply-To:Content-ID:Content-Description; bh=8d8E8Zxi4DqG9crOyp7Wd4237RTp+YfV9h1RI5HT8ns=; b=YbqO6NipmViunyBd6gU24DjXkn QG8F3ldjr1F0ffg3hmymn24e4QBZ3QRgGGp8LT3EA9gug5C1IpZ4o7gKUBpPyHZ8fRefsOr6SJvr6 5kfx5WRJyUcODSVhMZ1Rtwb1eTCTYAOSAqxj0Z1+JsmqToI7LxKKaAa6qkMPHxOcGBku5Ur2uwsYK gGiPrEDtLTZTI0NQgwgjYVUPI9O38yd3WFAi2DLalgEgqH7cIJVTuNQjvOU1PZ/kjD2G25d9CBEK8 l2vWvdXJs1F57sq8kjc3Sksr8d7TgLhz4GooK8myupvDUvOzpfxUEItd9M0YEjVvRD0qf2TGeDvLO KvkqMgqA==; Received: from [2601:1c2:d80:3110::a2e7] by bombadil.infradead.org with esmtpsa (Exim 4.94.2 #2 (Red Hat Linux)) id 1p2QkY-001T07-0K; Tue, 06 Dec 2022 05:44:14 +0000 Message-ID: Date: Mon, 5 Dec 2022 21:44:12 -0800 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.5.0 Subject: Re: [PATCH next v2] kbuild: add ability to make source rpm buildable using koji Content-Language: en-US To: Jonathan Toppins , linux-kbuild@vger.kernel.org Cc: masahiroy@kernel.org, dzickus@redhat.com, ihuguet@redhat.com, ivecera@redhat.com, jtornosm@redhat.com, kheib@redhat.com, linux-kernel@vger.kernel.org, michal.lkml@markovi.net, ndesaulniers@google.com, Nathan Chancellor , Nicolas Schier References: <88901065-469f-0988-f56b-c84d1fabbe8a@redhat.com> From: Randy Dunlap In-Reply-To: <88901065-469f-0988-f56b-c84d1fabbe8a@redhat.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-4.7 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_NONE 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: X-Mailing-List: linux-kernel@vger.kernel.org Hi, On 12/5/22 21:37, Jonathan Toppins wrote: > On 11/21/22 09:48, Jonathan Toppins wrote: >> From: Ivan Vecera >> >> Changes: >> - added new target 'srcrpm-pkg' to generate source rpm >> - added required build tools to spec file >> - removed locally compiled host tools to force their re-compile >> >> Signed-off-by: Ivan Vecera >> Signed-off-by: Jonathan Toppins >> Acked-by: Íñigo Huguet >> Tested-by: Ivan Vecera >> --- >> >> Notes: >>      v2: >>       * updated UTS_MACHINE to be $(UTS_MACHINE)-linux >>         suggested by Masahiro Yamada > > Quick ping, wanted to make sure I didn't miss any requests. Looking at patchwork there appear to be no replies to this version. Would it be reasonable to assume this version will be accepted and make it into the next kernel? I have a request: Tell us what "koji" is. I'm surprised that that word is not in the patch description at all. Thanks. >> >>   scripts/Makefile.package | 10 ++++++++++ >>   scripts/package/mkspec   |  7 +++++++ >>   2 files changed, 17 insertions(+) >> >> diff --git a/scripts/Makefile.package b/scripts/Makefile.package >> index 8bbcced67c22..1290f1c631fb 100644 >> --- a/scripts/Makefile.package >> +++ b/scripts/Makefile.package >> @@ -62,6 +62,16 @@ rpm-pkg: >>       +rpmbuild $(RPMOPTS) --target $(UTS_MACHINE)-linux -ta $(KERNELPATH).tar.gz \ >>       --define='_smp_mflags %{nil}' >>   +# srcrpm-pkg >> +# --------------------------------------------------------------------------- >> +PHONY += srcrpm-pkg >> +srcrpm-pkg: >> +    $(MAKE) clean >> +    $(CONFIG_SHELL) $(MKSPEC) >$(objtree)/kernel.spec >> +    $(call cmd,src_tar,$(KERNELPATH),kernel.spec) >> +    +rpmbuild $(RPMOPTS) --target $(UTS_MACHINE)-linux -ts $(KERNELPATH).tar.gz \ >> +    --define='_smp_mflags %{nil}' --define='_srcrpmdir $(srctree)' >> + >>   # binrpm-pkg >>   # --------------------------------------------------------------------------- >>   PHONY += binrpm-pkg >> diff --git a/scripts/package/mkspec b/scripts/package/mkspec >> index 70392fd2fd29..dda00a948a01 100755 >> --- a/scripts/package/mkspec >> +++ b/scripts/package/mkspec >> @@ -33,6 +33,8 @@ EXCLUDES="$RCS_TAR_IGNORE --exclude=*vmlinux* --exclude=*.mod \ >>   --exclude=*.o --exclude=*.ko --exclude=*.cmd --exclude=Documentation \ >>   --exclude=.config.old --exclude=.missing-syscalls.d --exclude=*.s" >>   +test -n "$LOCALVERSION" && MAKE="$MAKE LOCALVERSION=$LOCALVERSION" >> + >>   # We can label the here-doc lines for conditional output to the spec file >>   # >>   # Labels: >> @@ -49,6 +51,9 @@ sed -e '/^DEL/d' -e 's/^\t*//' <>       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: gcc make openssl openssl-devel perl python3 rsync >> + >>       # $UTS_MACHINE as a fallback of _arch in case >>       # /usr/lib/rpm/platform/*/macros was not included. >>       %define _arch %{?_arch:$UTS_MACHINE} >> @@ -80,6 +85,8 @@ $S$M    against the $__KERNELRELEASE kernel package. >>   $S$M >>   $S    %prep >>   $S    %setup -q >> +$S    rm -f scripts/basic/fixdep scripts/kconfig/conf >> +$S    rm -f tools/objtool/{fixdep,objtool} >>   $S >>   $S    %build >>   $S    $MAKE %{?_smp_mflags} KBUILD_BUILD_VERSION=%{release} > -- ~Randy