]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commitdiff
UBUNTU: [Packaging] resync dkms-build{,--nvidia-N} from LRMv5
authorAndy Whitcroft <apw@canonical.com>
Thu, 10 Mar 2022 11:49:06 +0000 (11:49 +0000)
committerAndrea Righi <andrea.righi@canonical.com>
Thu, 9 Mar 2023 14:57:35 +0000 (15:57 +0100)
BugLink: https://bugs.launchpad.net/bugs/1786013
Signed-off-by: Andy Whitcroft <apw@canonical.com>
debian/scripts/dkms-build--nvidia-N

index 310d63b5edda4efb31cccc5299aecd75ce293a02..52711d2ac753eb0e783b8c627e6846fdd5d0a932 100755 (executable)
@@ -50,7 +50,8 @@ done
 
 # Build helper scripts.
 cat - <<'EOL' >"$pkgdir/bits/BUILD"
-[ "$1" = "unsigned" ] && signed_only=:
+[ "$1" = "unsigned" ] && { signed_only=:; shift; }
+[ "$1" = "nocheck" ] && { check_only=:; shift; }
 EOL
 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"
@@ -61,6 +62,9 @@ sed -e 's/.*-o  *\([^ ]*\) .*/rm -f \1/g' <"$pkgdir/bits/BUILD" >"$pkgdir/bits/C
 (
        cd "$pkgdir/bits" || exit 1
 
+       # Add checksum check.
+       echo "\$check_only sha256sum -c SHA256SUMS || exit 1" >>"$pkgdir/bits/BUILD"
+
        # Add .ko handling to the CLEAN/BUILD dance.
        for ko in "$pkgdir"/*.ko
        do
@@ -72,7 +76,7 @@ sed -e 's/.*-o  *\([^ ]*\) .*/rm -f \1/g' <"$pkgdir/bits/BUILD" >"$pkgdir/bits/C
 
        # Clear out anything we are not going to distribute and build unsigned .kos.
        sh ./CLEAN
-       sh ./BUILD unsigned
+       sh ./BUILD unsigned nocheck
 
        if [ "$sign" = "--custom" ]; then
                # We are building for and archive custom signing upload.  Keep everything.