ACK: [Lunar] UBUNTU: [Packaging] Fix module-check error when modules are compressed

Dimitri John Ledkov dimitri.ledkov at canonical.com
Thu Jan 12 14:26:16 UTC 2023


that's good. we also had some older patches on launchpad trying to
enable install/packaging of compressed modules as well. They were
static lists however, not generic ".ko.*" like here which covers all
compression methods correctly.

Ack-by: Dimitri John Ledkov <dimitri.ledkov at canonical.com>

On Thu, 12 Jan 2023 at 13:48, Masahiro Yamada
<masahiro.yamada at canonical.com> wrote:
>
> Some parts in the packaging scripts are written based on the assumption
> that module file names always end with the .ko suffix.
>
> The module suffix might be .ko.gz, .ko.xz, or .ko.zst if module
> compression is enabled.
>
> If CONFIG_MODULE_COMPRESS_GZIP/XZ/ZSTD is enabled, the module-check
> fails with a lot of "MISS" because currently only files with *.ko
> suffix are picked up.
>
> Ubuntu kernels do not enable module compression by default, but users
> may tweak CONFIG options when they build their custom kernel.
>
> Modules are compressed in some distributions, for example in Fedora,
> modules are *.ko.xz.
>
> Signed-off-by: Masahiro Yamada <masahiro.yamada at canonical.com>
> ---
>  debian/rules.d/2-binary-arch.mk | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/debian/rules.d/2-binary-arch.mk b/debian/rules.d/2-binary-arch.mk
> index 365656ea6272b..08b07ceba2347 100644
> --- a/debian/rules.d/2-binary-arch.mk
> +++ b/debian/rules.d/2-binary-arch.mk
> @@ -477,8 +477,8 @@ endif
>                 $(builddir)/build-$*/Module.symvers | sort > $(abidir)/$*
>
>         # Build the final ABI modules information.
> -       find $(pkgdir_bin) $(pkgdir) $(pkgdir_ex) -name \*.ko | \
> -               sed -e 's/.*\/\([^\/]*\)\.ko/\1/' | sort > $(abidir)/$*.modules
> +       find $(pkgdir_bin) $(pkgdir) $(pkgdir_ex) \( -name '*.ko' -o -name '*.ko.*' \) | \
> +               sed -e 's/.*\/\([^\/]*\)\.ko.*/\1/' | sort > $(abidir)/$*.modules
>
>         # Build the final ABI built-in modules information.
>         if [ -f $(pkgdir)/lib/modules/$(abi_release)-$*/modules.builtin ] ; then \
> --
> 2.34.1
>
>
> --
> kernel-team mailing list
> kernel-team at lists.ubuntu.com
> https://lists.ubuntu.com/mailman/listinfo/kernel-team



-- 
okurrr,

Dimitri



More information about the kernel-team mailing list