Linux kbuild/kconfig development
 help / color / mirror / Atom feed
From: Nathan Chancellor <nathan@kernel.org>
To: Masahiro Yamada <masahiroy@kernel.org>
Cc: linux-kbuild@vger.kernel.org, linux-kernel@vger.kernel.org,
	Nicolas Schier <nicolas@fjasle.eu>
Subject: Re: [PATCH] kbuild: move init/build-version to scripts/
Date: Wed, 12 Jun 2024 17:00:56 -0700	[thread overview]
Message-ID: <20240613000056.GA1596562@thelio-3990X> (raw)
In-Reply-To: <20240611182502.3600062-1-masahiroy@kernel.org>

On Wed, Jun 12, 2024 at 03:24:47AM +0900, Masahiro Yamada wrote:
> At first, I thought this script would be used only in init/Makefile.
> 
> However, commit 5db8face97f8 ("kbuild: Restore .version auto-increment
> behaviour for Debian packages") and commit 1789fc912541 ("kbuild:
> rpm-pkg: invoke the kernel build from rpmbuild for binrpm-pkg")
> revealed that it was actually needed for scripts/package/mk* as well.
> 
> After all, scripts/ is a better place for it.
> 
> Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>

Reviewed-by: Nathan Chancellor <nathan@kernel.org>

> ---
> 
>  init/Makefile                   | 2 +-
>  {init => scripts}/build-version | 0
>  scripts/package/mkdebian        | 2 +-
>  scripts/package/mkspec          | 2 +-
>  4 files changed, 3 insertions(+), 3 deletions(-)
>  rename {init => scripts}/build-version (100%)
> 
> diff --git a/init/Makefile b/init/Makefile
> index ab71cedc5fd6..10b652d33e87 100644
> --- a/init/Makefile
> +++ b/init/Makefile
> @@ -52,7 +52,7 @@ CFLAGS_version.o := -include $(obj)/utsversion-tmp.h
>  # Build version-timestamp.c with final UTS_VERSION
>  #
>  
> -include/generated/utsversion.h: build-version-auto = $(shell $(src)/build-version)
> +include/generated/utsversion.h: build-version-auto = $(shell $(srctree)/scripts/build-version)
>  include/generated/utsversion.h: build-timestamp-auto = $(shell LC_ALL=C date)
>  include/generated/utsversion.h: FORCE
>  	$(call filechk,uts_version)
> diff --git a/init/build-version b/scripts/build-version
> similarity index 100%
> rename from init/build-version
> rename to scripts/build-version
> diff --git a/scripts/package/mkdebian b/scripts/package/mkdebian
> index 070149c985fe..b9a5b789c655 100755
> --- a/scripts/package/mkdebian
> +++ b/scripts/package/mkdebian
> @@ -150,7 +150,7 @@ version=$KERNELRELEASE
>  if [ -n "$KDEB_PKGVERSION" ]; then
>  	packageversion=$KDEB_PKGVERSION
>  else
> -	packageversion=$(${srctree}/scripts/setlocalversion --no-local ${srctree})-$($srctree/init/build-version)
> +	packageversion=$(${srctree}/scripts/setlocalversion --no-local ${srctree})-$($srctree/scripts/build-version)
>  fi
>  sourcename=${KDEB_SOURCENAME:-linux-upstream}
>  
> diff --git a/scripts/package/mkspec b/scripts/package/mkspec
> index ce201bfa8377..cffc2567bef2 100755
> --- a/scripts/package/mkspec
> +++ b/scripts/package/mkspec
> @@ -24,7 +24,7 @@ fi
>  cat<<EOF
>  %define ARCH ${ARCH}
>  %define KERNELRELEASE ${KERNELRELEASE}
> -%define pkg_release $("${srctree}/init/build-version")
> +%define pkg_release $("${srctree}/scripts/build-version")
>  EOF
>  
>  cat "${srctree}/scripts/package/kernel.spec"
> -- 
> 2.43.0
> 

      reply	other threads:[~2024-06-13  0:00 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-06-11 18:24 [PATCH] kbuild: move init/build-version to scripts/ Masahiro Yamada
2024-06-13  0:00 ` Nathan Chancellor [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=20240613000056.GA1596562@thelio-3990X \
    --to=nathan@kernel.org \
    --cc=linux-kbuild@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=masahiroy@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