<div dir="ltr"><div>This is a duplicate.</div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, 1 Jul 2020 at 17:00, Alberto Milone <<a href="mailto:alberto.milone@canonical.com" target="_blank">alberto.milone@canonical.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Enable building only on amd64 using the do_dkms_nvidia_server flag.<br>
<br>
Also, modify the regular expression in <a href="http://2-binary-arch.mk" rel="noreferrer" target="_blank">2-binary-arch.mk</a>, so that<br>
names such as nvidia-440srv are allowed.<br>
<br>
BugLink: <a href="https://bugs.launchpad.net/bugs/1882093" rel="noreferrer" target="_blank">https://bugs.launchpad.net/bugs/1882093</a><br>
<br>
Signed-off-by: Alberto Milone <<a href="mailto:alberto.milone@canonical.com" target="_blank">alberto.milone@canonical.com</a>><br>
---<br>
 debian.master/rules.d/<a href="http://amd64.mk" rel="noreferrer" target="_blank">amd64.mk</a>  |  1 +<br>
 debian/dkms-versions            |  2 ++<br>
 debian/rules                    | 10 +++++++---<br>
 debian/rules.d/<a href="http://2-binary-arch.mk" rel="noreferrer" target="_blank">2-binary-arch.mk</a> |  5 +++++<br>
 debian/scripts/dkms-build       |  2 +-<br>
 5 files changed, 16 insertions(+), 4 deletions(-)<br>
<br>
diff --git a/debian.master/rules.d/<a href="http://amd64.mk" rel="noreferrer" target="_blank">amd64.mk</a> b/debian.master/rules.d/<a href="http://amd64.mk" rel="noreferrer" target="_blank">amd64.mk</a><br>
index daffd0d7a3dc..6515b13314ca 100644<br>
--- a/debian.master/rules.d/<a href="http://amd64.mk" rel="noreferrer" target="_blank">amd64.mk</a><br>
+++ b/debian.master/rules.d/<a href="http://amd64.mk" rel="noreferrer" target="_blank">amd64.mk</a><br>
@@ -23,4 +23,5 @@ do_tools_common = true<br>
 do_tools_acpidbg = true<br>
 do_zfs         = true<br>
 do_dkms_nvidia  = true<br>
+do_dkms_nvidia_server = true<br>
 do_dkms_wireguard = true<br>
diff --git a/debian/dkms-versions b/debian/dkms-versions<br>
index 6e4841390572..e7b1dda01e3f 100644<br>
--- a/debian/dkms-versions<br>
+++ b/debian/dkms-versions<br>
@@ -3,4 +3,6 @@ zfs-linux 0.7.5-1ubuntu16.9<br>
 nvidia-graphics-drivers-390 390.138-0ubuntu0.18.04.1<br>
 nvidia-graphics-drivers-435 435.21-0ubuntu0.18.04.2<br>
 nvidia-graphics-drivers-440 440.100-0ubuntu0.18.04.1<br>
+nvidia-graphics-drivers-418-server 0<br>
+nvidia-graphics-drivers-440-server 0<br>
 wireguard-linux-compat 1.0.20200611-1ubuntu1~18.04.1<br>
diff --git a/debian/rules b/debian/rules<br>
index b517f41a5beb..bebeb4e9f243 100755<br>
--- a/debian/rules<br>
+++ b/debian/rules<br>
@@ -45,6 +45,7 @@ ifneq ($(DEB_HOST_ARCH),$(DEB_BUILD_ARCH))<br>
        disable_d_i=true<br>
        do_zfs=false<br>
        do_dkms_nvidia=false<br>
+       do_dkms_nvidia_server=false<br>
        do_dkms_wireguard=false<br>
 endif<br>
<br>
@@ -78,6 +79,7 @@ ifeq ($(do_mainline_build),true)<br>
        no_dumpfile=1<br>
        do_zfs=false<br>
        do_dkms_nvidia=false<br>
+       do_dkms_nvidia_server=false<br>
        skipabi=true<br>
        skipmodule=true<br>
        skipretpoline=true<br>
@@ -112,9 +114,11 @@ endif<br>
 # Versions of dkms packages.<br>
 dkms_zfs_linux_version=$(shell gawk '/^zfs-linux / { print $$2; }' debian/dkms-versions)<br>
 dkms_spl_linux_version=$(shell gawk '/^spl-linux / { print $$2; }' debian/dkms-versions)<br>
-dkms_nvidia_390_version=$(shell gawk '/^nvidia-graphics-drivers-390/ { print $$2; }' debian/dkms-versions)<br>
-dkms_nvidia_435_version=$(shell gawk '/^nvidia-graphics-drivers-435/ { print $$2; }' debian/dkms-versions)<br>
-dkms_nvidia_440_version=$(shell gawk '/^nvidia-graphics-drivers-440/ { print $$2; }' debian/dkms-versions)<br>
+dkms_nvidia_390_version=$(shell gawk '/^nvidia-graphics-drivers-390 / { print $$2; }' debian/dkms-versions)<br>
+dkms_nvidia_435_version=$(shell gawk '/^nvidia-graphics-drivers-435 / { print $$2; }' debian/dkms-versions)<br>
+dkms_nvidia_440_version=$(shell gawk '/^nvidia-graphics-drivers-440 / { print $$2; }' debian/dkms-versions)<br>
+dkms_nvidia_418_server_version=$(shell gawk '/^nvidia-graphics-drivers-418-server / { print $$2; }' debian/dkms-versions)<br>
+dkms_nvidia_440_server_version=$(shell gawk '/^nvidia-graphics-drivers-440-server / { print $$2; }' debian/dkms-versions)<br>
 dkms_wireguard_version=$(shell gawk '/^wireguard-linux-compat / { print $$2; }' debian/dkms-versions)<br>
<br>
 # Debian Build System targets<br>
diff --git a/debian/rules.d/<a href="http://2-binary-arch.mk" rel="noreferrer" target="_blank">2-binary-arch.mk</a> b/debian/rules.d/<a href="http://2-binary-arch.mk" rel="noreferrer" target="_blank">2-binary-arch.mk</a><br>
index 62af6bf55f11..b7d88126a3b7 100644<br>
--- a/debian/rules.d/<a href="http://2-binary-arch.mk" rel="noreferrer" target="_blank">2-binary-arch.mk</a><br>
+++ b/debian/rules.d/<a href="http://2-binary-arch.mk" rel="noreferrer" target="_blank">2-binary-arch.mk</a><br>
@@ -409,6 +409,11 @@ ifeq ($(do_dkms_nvidia),true)<br>
        $(call build_dkms, $(bldinfo_pkg_name)-$*, $(pkgdir_bldinfo)/usr/lib/linux/$(abi_release)-$*/signatures, nvidia-440, pool/restricted/n/nvidia-graphics-drivers-440/nvidia-kernel-source-440_$(dkms_nvidia_440_version)_$(arch).deb pool/restricted/n/nvidia-graphics-drivers-440/nvidia-dkms-440_$(dkms_nvidia_440_version)_$(arch).deb)<br>
 endif<br>
<br>
+ifeq ($(do_dkms_nvidia_server),true)<br>
+       $(call build_dkms, $(bldinfo_pkg_name)-$*, $(pkgdir_bldinfo)/usr/lib/linux/$(abi_release)-$*/signatures, nvidia-418srv, pool/restricted/n/nvidia-graphics-drivers-418-server/nvidia-kernel-source-418-server_$(dkms_nvidia_418_server_version)_$(arch).deb pool/restricted/n/nvidia-graphics-drivers-418-server/nvidia-dkms-418-server_$(dkms_nvidia_418_server_version)_$(arch).deb)<br>
+       $(call build_dkms, $(bldinfo_pkg_name)-$*, $(pkgdir_bldinfo)/usr/lib/linux/$(abi_release)-$*/signatures, nvidia-440srv, pool/restricted/n/nvidia-graphics-drivers-440-server/nvidia-kernel-source-440-server_$(dkms_nvidia_440_server_version)_$(arch).deb pool/restricted/n/nvidia-graphics-drivers-440-server/nvidia-dkms-440-server_$(dkms_nvidia_440_server_version)_$(arch).deb)<br>
+endif<br>
+<br>
        # Build the final ABI information.<br>
        install -d $(abidir)<br>
        sed -e 's/^\(.\+\)[[:space:]]\+\(.\+\)[[:space:]]\(.\+\)$$/\3 \2 \1/'   \<br>
diff --git a/debian/scripts/dkms-build b/debian/scripts/dkms-build<br>
index 908f0316e311..55d09d920746 100755<br>
--- a/debian/scripts/dkms-build<br>
+++ b/debian/scripts/dkms-build<br>
@@ -180,7 +180,7 @@ done<br>
 # as squirreled away, and the log in case it is useful.  Finally pass a formed<br>
 # signing command line in case we need to do that.<br>
 dkms_build_specific="$srcdir/$0--$package"<br>
-dkms_build_generic=$(echo "$dkms_build_specific" | sed -e 's/-[0-9][0-9]*$/-N/')<br>
+dkms_build_generic=$(echo "$dkms_build_specific" | sed -n -e 's/-[0-9][0-9]*[a-z]*$/-N/p')<br>
 for dkms_build in "$dkms_build_specific" "$dkms_build_generic"<br>
 do<br>
        if [ ! -e "$dkms_build" ]; then<br>
-- <br>
2.25.1<br>
<br>
</blockquote></div><br clear="all"><div><br></div>-- <br><div dir="ltr"><div dir="ltr">Alberto Milone</div></div></div>