@@ -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 | \
@@ -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
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@canonical.com> --- debian/rules.d/2-binary-arch.mk | 12 ++++++++++-- debian/scripts/misc/getabis | 16 ++++++++++++---- 2 files changed, 22 insertions(+), 6 deletions(-)