linux-kbuild.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Masahiro Yamada <masahiroy@kernel.org>
To: Jonathan Toppins <jtoppins@redhat.com>
Cc: linux-kbuild@vger.kernel.org, dzickus@redhat.com,
	kheib@redhat.com, jtornosm@redhat.com, ihuguet@redhat.com,
	Ivan Vecera <ivecera@redhat.com>,
	Michal Marek <michal.lkml@markovi.net>,
	Nick Desaulniers <ndesaulniers@google.com>,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH next] kbuild: add ability to make source rpm buildable using koji
Date: Sun, 27 Nov 2022 08:10:47 +0900	[thread overview]
Message-ID: <CAK7LNATPZkMCabD5aGNamp-gH3aZvFPr2_Yq=N=rM_ht2i3p6g@mail.gmail.com> (raw)
In-Reply-To: <5b59fdb7db34f5292b1d138939c6b70b2b2039dd.1666703850.git.jtoppins@redhat.com>

On Tue, Oct 25, 2022 at 10:17 PM Jonathan Toppins <jtoppins@redhat.com> wrote:
>
> From: Ivan Vecera <ivecera@redhat.com>
>
> 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 <ivecera@redhat.com>
> Signed-off-by: Jonathan Toppins <jtoppins@redhat.com>


Applied to linux-kbuild.
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..e0830a870394 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) -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*//' <<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: 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}
> --
> 2.31.1
>


-- 
Best Regards
Masahiro Yamada

      parent reply	other threads:[~2022-11-26 23:11 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-10-25 13:17 [PATCH next] kbuild: add ability to make source rpm buildable using koji Jonathan Toppins
2022-11-02  7:04 ` Íñigo Huguet
2022-11-08  7:44 ` Ivan Vecera
2022-11-13 13:33 ` Masahiro Yamada
2022-11-21 14:21   ` Jonathan Toppins
2022-11-26 23:10 ` Masahiro Yamada [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='CAK7LNATPZkMCabD5aGNamp-gH3aZvFPr2_Yq=N=rM_ht2i3p6g@mail.gmail.com' \
    --to=masahiroy@kernel.org \
    --cc=dzickus@redhat.com \
    --cc=ihuguet@redhat.com \
    --cc=ivecera@redhat.com \
    --cc=jtoppins@redhat.com \
    --cc=jtornosm@redhat.com \
    --cc=kheib@redhat.com \
    --cc=linux-kbuild@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=michal.lkml@markovi.net \
    --cc=ndesaulniers@google.com \
    /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;
as well as URLs for NNTP newsgroup(s).