diff mbox series

[3/9] UBUNTU: [Packaging] dkms-build--nvidia-N -- handle symbol versioning being enabled

Message ID 20210308150004.1746089-4-apw@canonical.com
State New
Headers show
Series LP#1918134 -- LRMv4 switch to signing with Ubuntu Kernel Modules signing key | expand

Commit Message

Andy Whitcroft March 8, 2021, 2:59 p.m. UTC
We get more linker commands emitted when symbol versioning is enabled.
We don't need to replicate these command because we consume the .o files
after these have been applied.  Elide them from the BUILD/CLEAN helpers.
This eliminates some frightening (but actually benign) error messages.

BugLink: https://bugs.launchpad.net/bugs/1918134
Signed-off-by: Andy Whitcroft <apw@canonical.com>
 debian/scripts/dkms-build--nvidia-N | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)
diff mbox series


diff --git a/debian/scripts/dkms-build--nvidia-N b/debian/scripts/dkms-build--nvidia-N
index bdec782..5f07ef2 100755
--- a/debian/scripts/dkms-build--nvidia-N
+++ b/debian/scripts/dkms-build--nvidia-N
@@ -36,9 +36,8 @@  mkdir -p "$pkgdir/bits/scripts"
 # Install the support files we need.
 cp "$srcdir/scripts/module-common.lds" "$pkgdir/bits/scripts"
-grep /usr/bin/ld.bfd "$log" | sed -e "s@$build/@@g" >"$pkgdir/bits/BUILD"
-grep /usr/bin/ld.bfd "$log" | sed -e "s@$build/@@g" \
-	-e 's/.*-o  *\([^ ]*\) .*/rm -f \1/g' >"$pkgdir/bits/CLEAN"
+grep /usr/bin/ld.bfd "$log" | grep -v scripts/genksyms/genksyms | sed -e "s@$build/@@g" >"$pkgdir/bits/BUILD"
+sed -e 's/.*-o  *\([^ ]*\) .*/rm -f \1/g' <"$pkgdir/bits/BUILD" >"$pkgdir/bits/CLEAN"
 # As the builds contain the absolute filenames as used.  Use RECONSTRUCT to
 # rebuild the .ko's, sign them, pull off the signatures and then finally clean