From: Nicolas Schier <nicolas@fjasle.eu>
To: Masahiro Yamada <masahiroy@kernel.org>
Cc: linux-kbuild@vger.kernel.org, linux-kernel@vger.kernel.org,
Rasmus Villemoes <rasmus.villemoes@prevas.dk>,
Nathan Chancellor <nathan@kernel.org>,
Nick Desaulniers <ndesaulniers@google.com>
Subject: Re: [PATCH 1/7] kbuild: do not put .scmversion into the source tarball
Date: Sun, 29 Jan 2023 22:29:12 +0100 [thread overview]
Message-ID: <Y9blKNz0ZZbvsMAb@bergen.fjasle.eu> (raw)
In-Reply-To: <20230122141428.115372-1-masahiroy@kernel.org>
[-- Attachment #1: Type: text/plain, Size: 3445 bytes --]
On Sun 22 Jan 2023 23:14:21 GMT, Masahiro Yamada wrote:
> .scmversion is used by (src)rpm-pkg and deb-pkg to carry
> KERNELRELEASE.
>
> In fact, deb-pkg does not rely on it any more because the generated
> debian/rules specifies KERNELRELEASE from the command line.
>
> Do likwise for (src)rpm-pkg, and remove this feature.
>
> Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
> ---
>
> scripts/Makefile.package | 6 ++----
> scripts/package/mkspec | 6 +++---
> scripts/setlocalversion | 19 +------------------
> 3 files changed, 6 insertions(+), 25 deletions(-)
>
> diff --git a/scripts/Makefile.package b/scripts/Makefile.package
> index 525a2820976f..e84c4e8ceb8e 100644
> --- a/scripts/Makefile.package
> +++ b/scripts/Makefile.package
> @@ -32,7 +32,7 @@ export KDEB_SOURCENAME
> TAR_CONTENT := Documentation LICENSES arch block certs crypto drivers fs \
> include init io_uring ipc kernel lib mm net rust \
> samples scripts security sound tools usr virt \
> - .config .scmversion Makefile \
> + .config Makefile \
> Kbuild Kconfig COPYING $(wildcard localversion*)
> MKSPEC := $(srctree)/scripts/package/mkspec
>
> @@ -47,10 +47,8 @@ if test "$(objtree)" != "$(srctree)"; then \
> echo >&2; \
> false; \
> fi ; \
> -$(srctree)/scripts/setlocalversion --save-scmversion; \
> tar -I $(KGZIP) -c $(RCS_TAR_IGNORE) -f $(2).tar.gz \
> - --transform 's:^:$(2)/:S' $(TAR_CONTENT) $(3); \
> -rm -f $(objtree)/.scmversion
> + --transform 's:^:$(2)/:S' $(TAR_CONTENT) $(3)
>
> # rpm-pkg
> # ---------------------------------------------------------------------------
> diff --git a/scripts/package/mkspec b/scripts/package/mkspec
> index adab28fa7f89..d3c6701b7769 100755
> --- a/scripts/package/mkspec
> +++ b/scripts/package/mkspec
> @@ -90,7 +90,7 @@ $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}
> +$S $MAKE %{?_smp_mflags} KERNELRELEASE=%{version} KBUILD_BUILD_VERSION=%{release}
> $S
> %install
> mkdir -p %{buildroot}/boot
> @@ -101,8 +101,8 @@ $S
> %else
> cp \$($MAKE -s image_name) %{buildroot}/boot/vmlinuz-$KERNELRELEASE
> %endif
> -$M $MAKE %{?_smp_mflags} INSTALL_MOD_PATH=%{buildroot} modules_install
> - $MAKE %{?_smp_mflags} INSTALL_HDR_PATH=%{buildroot}/usr headers_install
> +$M $MAKE %{?_smp_mflags} KERNELRELEASE=%{version} INSTALL_MOD_PATH=%{buildroot} modules_install
> + $MAKE %{?_smp_mflags} KERNELRELEASE=%{version} INSTALL_HDR_PATH=%{buildroot}/usr headers_install
> cp System.map %{buildroot}/boot/System.map-$KERNELRELEASE
> cp .config %{buildroot}/boot/config-$KERNELRELEASE
> $S$M rm -f %{buildroot}/lib/modules/$KERNELRELEASE/build
> diff --git a/scripts/setlocalversion b/scripts/setlocalversion
> index af4754a35e66..3b31702b4a4a 100755
> --- a/scripts/setlocalversion
> +++ b/scripts/setlocalversion
> @@ -11,16 +11,11 @@
> #
>
> usage() {
> - echo "Usage: $0 [--save-scmversion] [srctree]" >&2
> + echo "Usage: $0 [srctree]" >&2
Hi Masahiro,
as .scmversion will not we generated (or removed by 'make clean' or
'make mrproper'), might it make sense to add it to
scripts/remove-stale-files?
Reviewed-by: Nicolas Schier <nicolas@fjasle.eu>
Kind regards,
Nicolas
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
next prev parent reply other threads:[~2023-01-29 21:29 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-01-22 14:14 Masahiro Yamada
2023-01-22 14:14 ` [PATCH 2/7] setlocalversion: simplify the construction of the short version Masahiro Yamada
2023-01-29 21:30 ` Nicolas Schier
2023-01-22 14:14 ` [PATCH 3/7] setlocalversion: make indentation shallower Masahiro Yamada
2023-01-29 21:31 ` Nicolas Schier
2023-01-22 14:14 ` [PATCH 4/7] setlocalversion: use only the correct release tag for git-describe Masahiro Yamada
2023-02-05 12:02 ` Masahiro Yamada
2023-01-22 14:14 ` [PATCH 5/7] setlocalversion: absorb $(KERNELVERSION) Masahiro Yamada
2023-01-22 14:14 ` [PATCH 6/7] setlocalversion: print ${KERNELRELEASE} if set Masahiro Yamada
2023-01-27 16:19 ` Masahiro Yamada
2023-01-22 14:14 ` [PATCH 7/7] kbuild: do not re-run setlocalversion for kernelrelease Masahiro Yamada
2023-02-01 13:09 ` Masahiro Yamada
2023-01-27 15:07 ` [PATCH 1/7] kbuild: do not put .scmversion into the source tarball Thierry Reding
2023-01-27 15:50 ` Masahiro Yamada
2023-01-27 19:29 ` Nathan Chancellor
2023-01-28 1:11 ` Masahiro Yamada
2023-01-29 21:29 ` Nicolas Schier [this message]
2023-01-30 1:44 ` Masahiro Yamada
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=Y9blKNz0ZZbvsMAb@bergen.fjasle.eu \
--to=nicolas@fjasle.eu \
--cc=linux-kbuild@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=masahiroy@kernel.org \
--cc=nathan@kernel.org \
--cc=ndesaulniers@google.com \
--cc=rasmus.villemoes@prevas.dk \
/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
all inboxes | Powered by JetHome®