UBUNTU: [Packaging] make ZSTD module compression conditional
BugLink: https://bugs.launchpad.net/bugs/2045593 Make ZSTD module compression conditional. Only enable it when building on recent series, such that backports of v6.5 kernels to jammy keep uncompressed modules, with zstd compressed .deb. Fixes: b2638e9702 ("UBUNTU: [Packaging] ZSTD compress modules") Signed-off-by: Dimitri John Ledkov <dimitri.ledkov@canonical.com> Acked-by: Andrea Righi <andrea.righi@canonical.com> Acked-by: Roxana Nicolescu <roxana.nicolescu@canonical.com> Signed-off-by: Dimitri John Ledkov <dimitri.ledkov@canonical.com>
This commit is contained in:
committed by
Paolo Pisati
parent
0d83bfeb20
commit
77087f6c67
Vendored
+6
@@ -199,6 +199,12 @@ do_dtbs=false
|
||||
# FIPS check
|
||||
do_fips_checks=false
|
||||
|
||||
# ZSTD compressed kernel modules
|
||||
do_zstd_ko=true
|
||||
ifeq ($(series),jammy)
|
||||
do_zstd_ko=
|
||||
endif
|
||||
|
||||
# Support parallel=<n> in DEB_BUILD_OPTIONS (see #209008)
|
||||
#
|
||||
# These 2 environment variables set the -j value of the kernel build. For example,
|
||||
|
||||
Vendored
+5
-5
@@ -567,8 +567,8 @@ define dh_all
|
||||
dh_installchangelogs -p$(1)
|
||||
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
|
||||
# Compress kernel modules, on mantic+
|
||||
$(if $(do_zstd_ko),find debian/$(1) -name '*.ko' -print0 | xargs -0 -n1 -P $(CONCURRENCY_LEVEL) zstd -19 --quiet --rm, true)
|
||||
dh_fixperms -p$(1) -X/boot/
|
||||
dh_shlibdeps -p$(1) $(shlibdeps_opts)
|
||||
dh_installdeb -p$(1)
|
||||
@@ -621,7 +621,7 @@ binary-%: checks-%
|
||||
dh_testroot
|
||||
|
||||
$(call dh_all,$(pkgimg)) -- -Znone
|
||||
$(call dh_all,$(pkgimg_mods)) -- -Znone
|
||||
$(call dh_all,$(pkgimg_mods))$(if $(do_zstd_ko), -- -Znone)
|
||||
|
||||
ifeq ($(do_extras_package),true)
|
||||
ifeq ($(ship_extras_package),false)
|
||||
@@ -633,13 +633,13 @@ ifeq ($(do_extras_package),true)
|
||||
| tee -a $(target_flavour).not-shipped.log;
|
||||
else
|
||||
if [ -f $(DEBIAN)/control.d/$(target_flavour).inclusion-list ] ; then \
|
||||
$(call dh_all_inline,$(pkgimg_ex)) -- -Znone; \
|
||||
$(call dh_all_inline,$(pkgimg_ex))$(if $(do_zstd_ko), -- -Znone); \
|
||||
fi
|
||||
endif
|
||||
endif
|
||||
|
||||
$(foreach _m,$(all_standalone_dkms_modules), \
|
||||
$(if $(enable_$(_m)),$(call dh_all,$(dkms_$(_m)_pkg_name)-$*) -- -Znone;)\
|
||||
$(if $(enable_$(_m)),$(call dh_all,$(dkms_$(_m)_pkg_name)-$*)$(if $(do_zstd_ko), -- -Znone);)\
|
||||
)
|
||||
|
||||
$(call dh_all,$(pkgbldinfo))
|
||||
|
||||
Reference in New Issue
Block a user