[disco/master-next 4/9] UBUNTU: [Packaging] dkms-build -- remove retpoline data from final binary packages
Andy Whitcroft
apw at canonical.com
Tue Mar 12 15:57:14 UTC 2019
We only need the *.o files for reconstruction, elide the associated
repoline data from the binary packages.
BugLink: http://bugs.launchpad.net/bugs/1764792
Signed-off-by: Andy Whitcroft <apw at canonical.com>
---
debian/scripts/dkms-build--nvidia-390 | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/debian/scripts/dkms-build--nvidia-390 b/debian/scripts/dkms-build--nvidia-390
index bbd3d97998a8..093035c756a0 100755
--- a/debian/scripts/dkms-build--nvidia-390
+++ b/debian/scripts/dkms-build--nvidia-390
@@ -15,9 +15,12 @@ shift 6
build="$( dirname "$objects" )/build"
-# Copy over the objects ready for reconstruction.
+# Copy over the objects ready for reconstruction. The objects copy contains
+# the *.o files and the *.o-ur* retpoline files to allow the kernel to track
+# any retpoline sequences therein. For our purposes we only want the *.o
+# files, elide the rest.
mkdir -p "$pkgdir/bits/scripts"
-cp -rp "$objects"/* "$pkgdir/bits"
+(cd "$objects" && find -name \*.o | cpio -Lpd "$pkgdir/bits")
# Install the support files we need.
cp "$srcdir/scripts/module-common.lds" "$pkgdir/bits/scripts"
--
2.20.1
More information about the kernel-team
mailing list