[PATCH] UBUNTU: [Packaging] buildinfo -- include origin package mark to modules files
Marcelo Henrique Cerri
marcelo.cerri at canonical.com
Wed Dec 5 16:56:52 UTC 2018
BugLink: http://bugs.launchpad.net/bugs/1806380
Include a flag at the end of each line of the
"debian.$branch/abi/*/$arch/$flavour.modules" file indicating the
package that each module is currently shipped in.
This will cause the build to fail when a module is silently moved from
or to the linux-modules-extra package.
Signed-off-by: Marcelo Henrique Cerri <marcelo.cerri at canonical.com>
---
debian/rules.d/2-binary-arch.mk | 12 ++++++++++--
debian/scripts/misc/getabis | 16 ++++++++++++----
2 files changed, 22 insertions(+), 6 deletions(-)
diff --git a/debian/rules.d/2-binary-arch.mk b/debian/rules.d/2-binary-arch.mk
index 20f744c012a9..d3b163bfc00d 100644
--- a/debian/rules.d/2-binary-arch.mk
+++ b/debian/rules.d/2-binary-arch.mk
@@ -407,8 +407,16 @@ 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
+ > "$(abidir)/$*.modules"; \
+ for dir in "$(pkgdir_bin)" "$(pkgdir)" "$(pkgdir_ex)"; do \
+ mark=; \
+ case "$$dir" in \
+ *extra*) mark=' extra';; \
+ esac; \
+ find "$$dir" -name \*.ko | \
+ sed -e 's/.*\/\([^\/]*\)\.ko/\1'"$$mark"'/' >> "$(abidir)/$*.modules"; \
+ done; \
+ sort -o "$(abidir)/$*.modules" "$(abidir)/$*.modules"
# Build the final ABI firmware information.
find $(pkgdir_bin) $(pkgdir) $(pkgdir_ex) -name \*.ko | \
diff --git a/debian/scripts/misc/getabis b/debian/scripts/misc/getabis
index 42690b0311e2..585a9ca8b145 100755
--- a/debian/scripts/misc/getabis
+++ b/debian/scripts/misc/getabis
@@ -65,8 +65,19 @@ getall() {
echo -n "extracting$prefixes..."
for filename in $filenames
do
- dpkg-deb --extract $filename tmp
+ dpkg-deb --extract "$filename" tmp
+ # Extract the modules list, so we can mark each line
+ # with its origin.
+ case "$filename" in
+ *extra*) mark=' extra';;
+ esac
+ files=$(dpkg-deb --vextract "$filename" tmp)
+ [ "$?" -ne 0 ] && continue
+ echo "$files" | sed -n -e '/.*\/\([^\/]*\)\.ko/s//\1'"$mark"'/p' >> \
+ "$abidir/$arch/$sub.modules"
+
done
+ sort -o "$abidir/$arch/$sub.modules" "$abidir/$arch/$sub.modules"
# FORM 1: linux-image et al extracted here.
if [ -d tmp/boot ]; then
echo -n "images..."
@@ -83,9 +94,6 @@ getall() {
else
echo -n "NO RETPOLINE FILE..."
fi
- (cd tmp; find lib/modules/$verabi-$sub/kernel -name '*.ko') | \
- sed -e 's/.*\/\([^\/]*\)\.ko/\1/' | sort > \
- $abidir/$arch/$sub.modules
(
cd tmp;
# Prevent exposing some errors when called by python scripts. SIGPIPE seems to get
--
2.17.1
More information about the kernel-team
mailing list