ACK: [PATCH] UBUNTU: SAUCE: override KERNELRELEASE instead of KERNELVERSION

Agathe Porte agathe.porte at canonical.com
Mon Dec 4 10:14:13 UTC 2023


2023-12-04 03:06 CET, Masahiro Yamada:
> It is wrong to override KERNELVERSION, as doing so does not ensure
> the expected KERNELRELEASE. KERNELRELEASE is the essential part and
> must agree with debian/control because it results in the 'uname -r'
> in the compiled kernel.
> 
> scripts/setlocalversion may append additional strings depending on
> CONFIG options and localversion* files. For example, if there exists
> 'localversion' file in the top directory, scripts/setlocalversion
> will append a string written in it. This must not happen.
> 
> Debian kernel [1] and the upstream kernel [2] correctly override
> KERNELRELEASE.
> 
> Let's fix Ubuntu kernel now.
> 
> [1]: https://salsa.debian.org/kernel-team/linux/-/blob/debian/6.5.10-1/debian/rules.real#L141
> [2]: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/scripts/package/debian/rules?id=v6.7-rc3#n18
> 
> Signed-off-by: Masahiro Yamada <masahiro.yamada at canonical.com>
> ---
> 
>  debian/rules.d/0-common-vars.mk | 3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)
> 
> diff --git a/debian/rules.d/0-common-vars.mk b/debian/rules.d/0-common-vars.mk
> index d62a9b063241..2ac46b6433c5 100644
> --- a/debian/rules.d/0-common-vars.mk
> +++ b/debian/rules.d/0-common-vars.mk
> @@ -238,10 +238,9 @@ kmake = make ARCH=$(build_arch) \
>  	CROSS_COMPILE=$(CROSS_COMPILE) \
>  	HOSTCC=$(HOSTCC) \
>  	CC=$(CROSS_COMPILE)$(gcc) \
> -	KERNELVERSION=$(abi_release)-$(target_flavour) \
> +	KERNELRELEASE=$(abi_release)-$(target_flavour) \
>  	CONFIG_DEBUG_SECTION_MISMATCH=y \
>  	KBUILD_BUILD_VERSION="$(uploadnum)" \
> -	LOCALVERSION= localver-extra= \
>  	CFLAGS_MODULE="-DPKG_ABI=$(abinum)" \
>  	PYTHON=$(PYTHON)
>  ifneq ($(LOCAL_ENV_CC),)

Acked-by: Agathe Porte <agathe.porte at canonical.com>



More information about the kernel-team mailing list