NACK: [noble PATCH] UBUNTU: SAUCE: do not attempt to compress modules where no module exists

Thibault Ferrante thibault.ferrante at canonical.com
Mon Dec 4 10:21:35 UTC 2023


Already submitted/acked here https://lists.ubuntu.com/archives/kernel-team/2023-November/147197.html

On 04-12-2023 02:37, Masahiro Yamada wrote:
> When building the Ubuntu kernel from the terminal, you will encounter
> a build error like follows:
> 
>    find debian/linux-tools-6.6.0-14 -name '*.ko' -print0 | xargs -0 -n1 -P 24 zstd -19 --quiet --rm
>    stdout is a console, aborting
>    make: *** [debian/rules.d/2-binary-arch.mk:802: binary-perarch] Error 123
> 
> This code is implemented in dh_all, so it is executed for all packages,
> even though not all of them contain modules.
> 
> Without the -r option, xargs runs the given command at least once.
> 'zstd -19 --quiet --rm' reads from stdin, and writes to stdout, which
> is a terminal. The zstd command gracefully errors out instead of messing
> up the terminal.
> 
> This issue may go unnoticed when you build the kernel in cbd or
> launchpad, where the stdout is redirected to a logger. You can
> observe garbled characters in a log file, at least.
> 
> Signed-off-by: Masahiro Yamada <masahiro.yamada at canonical.com>
> ---
> 
>   debian/rules.d/2-binary-arch.mk | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/debian/rules.d/2-binary-arch.mk b/debian/rules.d/2-binary-arch.mk
> index 53fbb55c198a..f89efd270e1c 100644
> --- a/debian/rules.d/2-binary-arch.mk
> +++ b/debian/rules.d/2-binary-arch.mk
> @@ -568,7 +568,7 @@ define dh_all
>   	dh_installdocs -p$(1)
>   	dh_compress -p$(1)
>   	# Compress kernel modules
> -	find debian/$(1) -name '*.ko' -print0 | xargs -0 -n1 -P $(CONCURRENCY_LEVEL) zstd -19 --quiet --rm
> +	find debian/$(1) -name '*.ko' -print0 | xargs -0 -n1 -r -P $(CONCURRENCY_LEVEL) zstd -19 --quiet --rm
>   	dh_fixperms -p$(1) -X/boot/
>   	dh_shlibdeps -p$(1) $(shlibdeps_opts)
>   	dh_installdeb -p$(1)


-- 
--
Thibault



More information about the kernel-team mailing list