[Unstable][PATCH v2 1/5] UBUNTU: [Packaging] buildinfo: Use modinfo data for the ABI
Juerg Haefliger
juerg.haefliger at canonical.com
Thu Jun 10 08:08:03 UTC 2021
Instead of just listing the provided modules, collect the modinfo data
from all modules and put it in a modules subdirectory provided by the
buildinfo package. This also includes the firmware information so drop
the fwinfo file.
For Hirsute this adds roughly 25MB to the amd64 generic buildinfo package:
$ du -h /usr/lib/linux/5.11.0-14-generic/modules/
25M /usr/lib/linux/5.11.0-14-generic/modules/
Signed-off-by: Juerg Haefliger <juergh at canonical.com>
---
debian/rules.d/2-binary-arch.mk | 18 ++++++++----------
1 file changed, 8 insertions(+), 10 deletions(-)
diff --git a/debian/rules.d/2-binary-arch.mk b/debian/rules.d/2-binary-arch.mk
index 5ae9a989207c..fbc7ce928587 100644
--- a/debian/rules.d/2-binary-arch.mk
+++ b/debian/rules.d/2-binary-arch.mk
@@ -460,14 +460,13 @@ 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
-
- # Build the final ABI firmware information.
+ install -d $(abidir)/$*.modules
find $(pkgdir_bin) $(pkgdir) $(pkgdir_ex) -name \*.ko | \
while read ko; do \
- /sbin/modinfo $$ko | grep ^firmware || true; \
- done | sort -u >$(abidir)/$*.fwinfo
+ modname=$${ko##*/}; \
+ modname=$${modname%.ko}; \
+ /sbin/modinfo "$${ko}" > $(abidir)/$*.modules/"$${modname}"; \
+ done
# Build the final ABI compiler information.
ko=$$(find $(pkgdir_bin) $(pkgdir) $(pkgdir_ex) -name \*.ko | head -1); \
@@ -495,10 +494,9 @@ endif
$(pkgdir_bldinfo)/usr/lib/linux/$(abi_release)-$*/config
install -m644 $(abidir)/$* \
$(pkgdir_bldinfo)/usr/lib/linux/$(abi_release)-$*/abi
- install -m644 $(abidir)/$*.modules \
- $(pkgdir_bldinfo)/usr/lib/linux/$(abi_release)-$*/modules
- install -m644 $(abidir)/$*.fwinfo \
- $(pkgdir_bldinfo)/usr/lib/linux/$(abi_release)-$*/fwinfo
+ install -d $(pkgdir_bldinfo)/usr/lib/linux/$(abi_release)-$*/modules
+ install -m644 $(abidir)/$*.modules/* \
+ $(pkgdir_bldinfo)/usr/lib/linux/$(abi_release)-$*/modules/
install -m644 $(abidir)/$*.retpoline \
$(pkgdir_bldinfo)/usr/lib/linux/$(abi_release)-$*/retpoline
install -m644 $(abidir)/$*.compiler \
--
2.27.0
More information about the kernel-team
mailing list