public inbox for stable@vger.kernel.org
 help / color / mirror / Atom feed
From: Nicolas Schier <nicolas@fjasle.eu>
To: Alexandru Gagniuc <alexandru.gagniuc@hp.com>
Cc: masahiroy@kernel.org, nathan@kernel.org,
	linux-kbuild@vger.kernel.org, linux-kernel@vger.kernel.org,
	stable@vger.kernel.org
Subject: Re: [PATCH] kbuild: deb-pkg: don't set KBUILD_BUILD_VERSION indiscriminately
Date: Fri, 7 Mar 2025 17:36:26 +0100	[thread overview]
Message-ID: <Z8sgisZ8FI3wkpfZ@fjasle.eu> (raw)
In-Reply-To: <20250305192536.1673099-1-alexandru.gagniuc@hp.com>

Hi Alexandru,

"indiscriminately" sounds a bit weird to me (but I am a non-native speaker); do
you mean "unconditionally"?

On Wed, Mar 05, 2025 at 07:25:36PM +0000 Alexandru Gagniuc wrote:
> 
> In ThinPro, we use the convention <upstream_ver>+hp<patchlevel> for
> the kernel package. This does not have a dash in the name or version.
> This is built by editing ".version" before a build, and setting
> EXTRAVERSION="+hp" and KDEB_PKGVERSION make variables:
> 
>     echo 68 > .version
>     make -j<n> EXTRAVERSION="+hp" bindeb-pkg KDEB_PKGVERSION=6.6.6+hp69
> 
>     .deb name: linux-image-6.6.6+hp_6.6.6+hp69_amd64.deb
> 
> Since commit 7d4f07d5cb71 ("kbuild: deb-pkg: squash
> scripts/package/deb-build-option to debian/rules"), this no longer
> works. The deb build logic changed, even though, the commit message
> implies that the logic should be unmodified.
> 
> Before, KBUILD_BUILD_VERSION was not set if the KDEB_PKGVERSION did
> not contain a dash. After the change KBUILD_BUILD_VERSION is always
> set to KDEB_PKGVERSION. Since this determines UTS_VERSION,the uname
> output to look off:
> 
>     (now)      uname -a: version 6.6.6+hp ... #6.6.6+hp69
>     (expected) uname -a: version 6.6.6+hp ... #69
> 
> Update the debian/rules logic to restore the original behavior.
> 
> Cc: <stable@vger.kernel.org> # v6.12+

Shouldn't this be v6.8, as 7d4f07d5cb71 got introduced there?

> Fixes: 7d4f07d5cb71 ("kbuild: deb-pkg: squash scripts/package/deb-build-option to debian/rules")
> Signed-off-by: Alexandru Gagniuc <alexandru.gagniuc@hp.com>
> ---
>  scripts/package/debian/rules | 8 ++++++--
>  1 file changed, 6 insertions(+), 2 deletions(-)
> 
> diff --git a/scripts/package/debian/rules b/scripts/package/debian/rules
> index ca07243bd5cd..bbc214f2e6bd 100755
> --- a/scripts/package/debian/rules
> +++ b/scripts/package/debian/rules
> @@ -21,9 +21,13 @@ ifeq ($(origin KBUILD_VERBOSE),undefined)
>      endif
>  endif
>  
> -revision = $(lastword $(subst -, ,$(shell dpkg-parsechangelog -S Version)))
> +debian_revision = $(shell dpkg-parsechangelog -S Version)
> +revision = $(lastword $(subst -, ,$(debian_revision)))
>  CROSS_COMPILE ?= $(filter-out $(DEB_BUILD_GNU_TYPE)-, $(DEB_HOST_GNU_TYPE)-)
> -make-opts = ARCH=$(ARCH) KERNELRELEASE=$(KERNELRELEASE) KBUILD_BUILD_VERSION=$(revision) $(addprefix CROSS_COMPILE=,$(CROSS_COMPILE))
> +make-opts = ARCH=$(ARCH) KERNELRELEASE=$(KERNELRELEASE) $(addprefix CROSS_COMPILE=,$(CROSS_COMPILE))
> +ifneq ($(revision), $(debian_revision))
> +    make-opts+=KBUILD_BUILD_VERSION=$(revision)
> +endif
>  
>  binary-targets := $(addprefix binary-, image image-dbg headers libc-dev)
>  
> -- 
> 2.48.1
> 

Looks good to me.

Reviewed-by: Nicolas Schier <nicolas@fjasle.eu>


  reply	other threads:[~2025-03-07 16:37 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-03-05 19:25 [PATCH] kbuild: deb-pkg: don't set KBUILD_BUILD_VERSION indiscriminately Alexandru Gagniuc
2025-03-07 16:36 ` Nicolas Schier [this message]
2025-03-07 20:56   ` Nathan Chancellor
2025-03-11 18:05 ` 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=Z8sgisZ8FI3wkpfZ@fjasle.eu \
    --to=nicolas@fjasle.eu \
    --cc=alexandru.gagniuc@hp.com \
    --cc=linux-kbuild@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=masahiroy@kernel.org \
    --cc=nathan@kernel.org \
    --cc=stable@vger.kernel.org \
    /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