Re: [PATCH] kbuild: rpm-pkg: append %{?dist} macro to Release tag

Yafang Shao <[email protected]> Sun, 12 Jul 2026 14:34:04 +0800
Newsgroups gmane.linux.kbuild.devel,gmane.linux.kernel.bpf
Message-ID <CALOAHbCjOsc2JcwwMLOdpx9kQw5TncLZBtGJZfimq-UNcHJg9Q@mail.gmail.com>
On Sun, Jul 12, 2026 at 2:29 PM Yafang Shao <[email protected]> wrote:
>
> Add support for the %{?dist} macro in the kernel.spec file. This enables
> building and releasing kernel RPMs with a custom distribution suffix
> (e.g., via rpmbuild's --define option) to better match production
> environment tracking.
>
> Signed-off-by: Yafang Shao <[email protected]>
> ---
>  scripts/package/kernel.spec | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/scripts/package/kernel.spec b/scripts/package/kernel.spec
> index b3c956205af0..c732415662ef 100644
> --- a/scripts/package/kernel.spec
> +++ b/scripts/package/kernel.spec
> @@ -6,7 +6,7 @@
>  Name: kernel
>  Summary: The Linux Kernel
>  Version: %(echo %{KERNELRELEASE} | sed -e 's/-/_/g')
> -Release: %{pkg_release}
> +Release: %{pkg_release}%{?dist}
>  License: GPL
>  Group: System Environment/Kernel
>  Vendor: The Linux Community
> --
> 2.47.3
>

oops!
Apologies for the confusion. Please disregard the patch, as it was an
accepted patch accidentally included in the same directory and sent
alongside the intended one:

  https://lore.kernel.org/linux-kbuild/[email protected]/


--
Regards
Yafang