[disco/master-next 5/9] UBUNTU: [Packaging] dkms-build--nvidia* -- check gcc version against primary build
Andy Whitcroft
apw at canonical.com
Tue Mar 12 15:57:15 UTC 2019
The binaries have the gcc version burned into them in a way which is not
trivially correctable (as the length is not consistent). Check that the
compiler version is the same in both builds using the version recorded
in the buildinfo.
BugLink: http://bugs.launchpad.net/bugs/1764792
Signed-off-by: Andy Whitcroft <apw at canonical.com>
---
debian/scripts/dkms-build--nvidia-390 | 15 ++++++++++++++-
1 file changed, 14 insertions(+), 1 deletion(-)
diff --git a/debian/scripts/dkms-build--nvidia-390 b/debian/scripts/dkms-build--nvidia-390
index 093035c756a0..ee05d575af6d 100755
--- a/debian/scripts/dkms-build--nvidia-390
+++ b/debian/scripts/dkms-build--nvidia-390
@@ -47,9 +47,22 @@ grep /usr/bin/ld.bfd "$log" | sed -e "s@$build/@@g" \
elif [ "$sign" = "--lrm" ]; then
# We are in LRM build the package a copy in any signatures we can
# find for them. These will be added after linking.
+ base="/usr/lib/linux/$abi_flavour"
+
+ # Check the GCC version we are using against that used in the kernel
+ # NOTE: that we treat this as only a warning, as if the binaries did come
+ # out differently then we will actually
+ echo "II: checking gcc version ..."
+ cat "$base/compiler"
+ gcc --version
+ gcc_was=$(cat "$base/compiler" | sed -e 's/^GCC:/gcc/')
+ gcc_is=$(gcc --version | head -1)
+ if [ "$gcc_was" != "$gcc_is" ]; then
+ echo "WW: gcc version missmatch between linux and linux-restricted-modules"
+ echo "WW: was: $gcc_was is: $gcc_is"
+ fi
# Apply any local signatures.
- base="/usr/lib/linux/$abi_flavour"
echo "II: adding signatures from $base ..."
cp "$base/signatures/$package/"*".ko.sig" "$pkgdir/bits"
sha256sum -c "$base/signatures/$package/SHA256SUMS" || exit 1
--
2.20.1
More information about the kernel-team
mailing list