On 19/03/2022 17.48, Adam D. Barratt wrote:
Control: tags -1 + confirmed

On Tue, 2022-02-08 at 09:06 +0100, Andreas Beckmann wrote:
I'd like to update src:nvidia-graphics-drivers-tesla-450/non-free to
a
new upstream version to fix CVE‑2022‑21813, CVE‑2022‑21814.

This is a simple rebuild of the package from sid.


Please go ahead.

I've uploaded a rebuild of the latest version from sid (-2 instead of -1), which contains a few additional changes, please see the attached incremental debdiff from 450.172.01-1 to 450.172.01-2~deb11u1

The new autopkgtest (for testing buildability of the kernel module) currently is a (passing) no-op, it requires additional changes to dkms and autodep8 s.t. kernel headers get installed and the kernel module gets compiled.


Andreas
diff --git a/debian/README.source b/debian/README.source
index 03853038..d48a6fcf 100644
--- a/debian/README.source
+++ b/debian/README.source
@@ -13,6 +13,28 @@ Building "bleeding edge" from GIT for users
     uploaded in the archive.
 
 
+Upstream support timeframes
+
+    https://nvidia.custhelp.com/app/answers/detail/a_id/3142
+    https://docs.nvidia.com/datacenter/tesla/drivers/
+    https://web.archive.org/web/20210522000916/https://docs.nvidia.com/datacenter/tesla/drivers/
+
+    Driver Series       Supported until
+    71                          EoL
+    96                          EoL
+    173                         EoL
+    304                 12/2017 EoL
+    340                 12/2019 EoL
+    390                 12/2022
+    Tesla 410                   EoL
+    Tesla 418 (LTSB)    03/2022
+    Tesla 440           11/2020 EoL
+    Tesla 450 (LTSB)    07/2023
+    Tesla 460 (PB)      01/2022 EoL
+    Tesla 470 (LTSB)    07/2024
+    Tesla 510 (PB)      01/2023
+
+
 The branch structure in the GIT repository
 
     The following branches exist in the git repository:
@@ -39,9 +61,16 @@ The branch structure in the GIT repository
     450                       (bullseye)          460, 450-tesla
     450-tesla                 (bullseye)          460-tesla, tesla-450/master
     tesla-450/master          bullseye,sid        tesla-460/master
-    460                       (bullseye)          master, 460-tesla
-    460-tesla                 (bullseye)          tesla-460/master
-    tesla-460/master          bullseye,sid
+    460                 EoL   (bullseye)          470, 460-tesla
+    460-tesla           EoL   (bullseye)          470-tesla, tesla-460/master
+    tesla-460/master    EoL   (bullseye),(sid)    tesla-470/master, tesla-460/transition-470
+    tesla-460/transition-470  bullseye,sid
+    470                       (bullseye)          510, 470-tesla
+    470-tesla                 (bullseye)          510-tesla, tesla-470/master
+    tesla-470/master          bullseye,sid        tesla-510/master
+    510                       (bookworm)          master, 510-tesla
+    510-tesla                 (bookworm)          tesla-510/master
+    tesla-510/master          bookworm,sid
     master                    sid                 YYY
     YYY                       experimental        ZZZ, (master)
     ZZZ                       experimental        (master)
diff --git a/debian/changelog b/debian/changelog
index 10c0a787..7a864cf1 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,21 @@
+nvidia-graphics-drivers-tesla-450 (450.172.01-2~deb11u1) bullseye; urgency=medium
+
+  * Rebuild for bullseye.
+
+ -- Andreas Beckmann <a...@debian.org>  Sun, 20 Mar 2022 16:53:36 +0100
+
+nvidia-graphics-drivers-tesla-450 (450.172.01-2) unstable; urgency=medium
+
+  * Add xorg-video-abi-25 (Xorg Xserver 21) as alternative dependency.
+    (Closes: #1005932)
+  * Backport pde_data changes from 470.103.01 to fix kernel module build for
+    Linux 5.17.
+  * dkms.conf: Use a BUILD_EXCLUSIVE equivalent hack to skip building for -rt
+    kernels, not supported upstream (510.54-1).
+  * Declare Testsuite: autopkgtest-pkg-dkms (510.54-1).
+
+ -- Andreas Beckmann <a...@debian.org>  Mon, 28 Feb 2022 21:03:12 +0100
+
 nvidia-graphics-drivers-tesla-450 (450.172.01-1) unstable; urgency=medium
 
   * New upstream Tesla release 450.172.01 (2022-01-31).
@@ -919,6 +937,19 @@ nvidia-graphics-drivers (430.14-1) experimental; urgency=medium
 
  -- Andreas Beckmann <a...@debian.org>  Sat, 25 May 2019 13:49:09 +0200
 
+nvidia-graphics-drivers-tesla-418 (418.226.00-2) unstable; urgency=medium
+
+  * Backport stdarg.h and stddef.h changes from 495.44 to fix kernel module
+    build for Linux 5.16.
+  * Backport pde_data changes from 470.103.01 to fix kernel module build for
+    Linux 5.17.  (Closes: #1005405)
+  * nvidia-tesla-418-kernel-support: Provide
+    /etc/modprobe.d/nvidia-options.conf as a template taking into account the
+    module renaming. This is a slave alternative of the nvidia alternative
+    (470.86-1).  (Closes: #999670)
+
+ -- Andreas Beckmann <a...@debian.org>  Fri, 25 Feb 2022 13:48:18 +0100
+
 nvidia-graphics-drivers-tesla-418 (418.226.00-1) unstable; urgency=medium
 
   * New upstream Tesla release 418.226.00 (2021-10-26).
@@ -927,6 +958,7 @@ nvidia-graphics-drivers-tesla-418 (418.226.00-1) unstable; urgency=medium
   * bug-script: Show the nvidia and glx alternatives (470.82.00-1).
   * nvidia-tesla-418-alternative: libnvidia-cfg.so.1 on its own is not
     sufficient to activate a nvidia alternative (470.82.00-1).
+    (Closes: #996595)
   * Fix bashisms in upstream scripts (470.82.00-1).
   * libegl1-mesa is a transitional package since buster (470.82.00-1).
   * Update lintian overrides.
@@ -1718,6 +1750,14 @@ nvidia-graphics-drivers (396.18-1) experimental; urgency=medium
 
  -- Andreas Beckmann <a...@debian.org>  Sun, 22 Apr 2018 13:59:45 +0200
 
+nvidia-graphics-drivers (390.147-2) UNRELEASED; urgency=medium
+
+  * Add xorg-video-abi-25 (Xorg Xserver 21) as alternative dependency.
+  * Backport pde_data changes from 470.103.01 to fix kernel module build for
+    Linux 5.17.
+
+ -- Andreas Beckmann <a...@debian.org>  Wed, 16 Feb 2022 18:28:11 +0100
+
 nvidia-graphics-drivers (390.147-1) UNRELEASED; urgency=medium
 
   * New upstream legacy branch release 390.147 (2021-12-16).
@@ -4396,6 +4436,9 @@ nvidia-graphics-drivers (343.22-1) experimental; urgency=medium
 
 nvidia-graphics-drivers (340.108-2) UNRELEASED; urgency=medium
 
+  * Backport pde_data changes from 470.103.01 to fix kernel module build for
+    Linux 5.17.
+
   * Backport drm_driver_has_gem_prime_callbacks changes from 460.39 to fix drm
     detection for Linux 5.11.
   * Backport drm_driver_has_legacy_dev_list changes from 361.16 and disable
diff --git a/debian/control b/debian/control
index 4493cf2c..4e2d1063 100644
--- a/debian/control
+++ b/debian/control
@@ -22,6 +22,7 @@ Build-Depends:
 Rules-Requires-Root: no
 Standards-Version: 4.6.0
 Homepage: https://www.nvidia.com
+Testsuite: autopkgtest-pkg-dkms
 XS-Autobuild: yes
 
 Package: nvidia-tesla-450-driver
diff --git a/debian/control.in b/debian/control.in
index 845c0838..be3353e3 100644
--- a/debian/control.in
+++ b/debian/control.in
@@ -20,6 +20,7 @@ Build-Depends:
 Rules-Requires-Root: no
 Standards-Version: 4.6.0
 Homepage: https://www.nvidia.com
+Testsuite: autopkgtest-pkg-dkms
 XS-Autobuild: yes
 
 Package: ${nvidia}-driver
diff --git a/debian/control.md5sum b/debian/control.md5sum
index 6ffa7187..1ea8c0a2 100644
--- a/debian/control.md5sum
+++ b/debian/control.md5sum
@@ -1,5 +1,5 @@
-130502a4eb100c5e394e351e4eb3db21  debian/control
-54e4307de20d5fcb8174aa0dbc38d22a  debian/control.in
+cafeb234d54db1323b822619f8d482b6  debian/control
+f2359280315be698140d6056eb4026d9  debian/control.in
 8489c83cfe0171c9de6d052c01a6d19b  debian/gen-control.pl
-6bfc0c007f80086f8f7c18ab39645b27  debian/rules
-878036b63bb96eeaa5b663bc6835293c  debian/rules.defs
+8b3b2a5a7d42142a1e99af3746cb168b  debian/rules
+fba81381b3a764bbaa7fa57064502029  debian/rules.defs
diff --git a/debian/module/debian/patches/0006-backport-pde_data-changes-from-470.103.01.patch b/debian/module/debian/patches/0006-backport-pde_data-changes-from-470.103.01.patch
new file mode 100644
index 00000000..f955afa1
--- /dev/null
+++ b/debian/module/debian/patches/0006-backport-pde_data-changes-from-470.103.01.patch
@@ -0,0 +1,81 @@
+From a61d2c8c83c9f76b0de49051324df215313d1ce0 Mon Sep 17 00:00:00 2001
+From: Andreas Beckmann <a...@debian.org>
+Date: Wed, 16 Feb 2022 16:56:45 +0100
+Subject: [PATCH] backport pde_data changes from 470.103.01
+
+---
+ common/inc/nv-procfs.h |  6 ++++--
+ conftest.sh            | 19 ++++++++++++++++++-
+ nvidia/nvidia.Kbuild   |  1 +
+ 3 files changed, 23 insertions(+), 3 deletions(-)
+
+diff --git a/common/inc/nv-procfs.h b/common/inc/nv-procfs.h
+index 107b324..1f2b3f9 100644
+--- a/common/inc/nv-procfs.h
++++ b/common/inc/nv-procfs.h
+@@ -86,9 +86,11 @@ typedef struct file_operations nv_proc_ops_t;
+     })
+ 
+ #if defined(NV_PDE_DATA_PRESENT)
+-# define NV_PDE_DATA(inode) PDE_DATA(inode)
++#define NV_PDE_DATA(inode) pde_data(inode)
++#elif defined(NV_PDE_DATA_UPPER_CASE_PRESENT)
++#define NV_PDE_DATA(inode) PDE_DATA(inode)
+ #else
+-# define NV_PDE_DATA(inode) PDE(inode)->data
++#define NV_PDE_DATA(inode) PDE(inode)->data
+ #endif
+ 
+ #if defined(NV_PROC_REMOVE_PRESENT)
+diff --git a/conftest.sh b/conftest.sh
+index c9a040d..07a4cda 100755
+--- a/conftest.sh
++++ b/conftest.sh
+@@ -1307,6 +1307,23 @@ compile_test() {
+         ;;
+ 
+         pde_data)
++            #
++            # Determine if the pde_data() function is present.
++            #
++            # The commit c28198889c15 removed the function
++            # 'PDE_DATA()', and replaced it with 'pde_data()'
++            # ("proc: remove PDE_DATA() completely") in v5.17-rc1. 
++            #
++            CODE="
++            #include <linux/proc_fs.h>
++            void conftest_pde_data(void) {
++                pde_data();
++            }"
++
++            compile_check_conftest "$CODE" "NV_PDE_DATA_PRESENT" "" "functions"
++        ;;
++
++        PDE_DATA)
+             #
+             # Determine if the PDE_DATA() function is present.
+             #
+@@ -1319,7 +1336,7 @@ compile_test() {
+                 PDE_DATA();
+             }"
+ 
+-            compile_check_conftest "$CODE" "NV_PDE_DATA_PRESENT" "" "functions"
++            compile_check_conftest "$CODE" "NV_PDE_DATA_UPPER_CASE_PRESENT" "" "functions"
+         ;;
+ 
+         get_num_physpages)
+diff --git a/nvidia/nvidia.Kbuild b/nvidia/nvidia.Kbuild
+index bc1f1af..1629f93 100644
+--- a/nvidia/nvidia.Kbuild
++++ b/nvidia/nvidia.Kbuild
+@@ -117,6 +117,7 @@ NV_CONFTEST_FUNCTION_COMPILE_TESTS += pci_get_domain_bus_and_slot
+ NV_CONFTEST_FUNCTION_COMPILE_TESTS += get_num_physpages
+ NV_CONFTEST_FUNCTION_COMPILE_TESTS += efi_enabled
+ NV_CONFTEST_FUNCTION_COMPILE_TESTS += pde_data
++NV_CONFTEST_FUNCTION_COMPILE_TESTS += PDE_DATA
+ NV_CONFTEST_FUNCTION_COMPILE_TESTS += proc_remove
+ NV_CONFTEST_FUNCTION_COMPILE_TESTS += pm_vt_switch_required
+ NV_CONFTEST_FUNCTION_COMPILE_TESTS += xen_ioemu_inject_msi
+-- 
+2.20.1
+
diff --git a/debian/module/debian/patches/bashisms.patch b/debian/module/debian/patches/bashisms.patch
index e351491c..00912efa 100644
--- a/debian/module/debian/patches/bashisms.patch
+++ b/debian/module/debian/patches/bashisms.patch
@@ -3,7 +3,7 @@ Description: fix bashisms in conftest.sh
 
 --- a/conftest.sh
 +++ b/conftest.sh
-@@ -4562,7 +4562,7 @@ case "$5" in
+@@ -4579,7 +4579,7 @@ case "$5" in
  
          if [ -n "$VGX_BUILD" ]; then
              if [ -f /proc/xen/capabilities ]; then
diff --git a/debian/module/debian/patches/cc_version_check-gcc5.patch b/debian/module/debian/patches/cc_version_check-gcc5.patch
index e6262799..de7ad78d 100644
--- a/debian/module/debian/patches/cc_version_check-gcc5.patch
+++ b/debian/module/debian/patches/cc_version_check-gcc5.patch
@@ -5,7 +5,7 @@ Description: ignore __GNUC_MINOR__ from GCC 5 onwards
 
 --- a/conftest.sh
 +++ b/conftest.sh
-@@ -4392,7 +4392,7 @@ case "$5" in
+@@ -4409,7 +4409,7 @@ case "$5" in
          kernel_cc_minor=`echo ${kernel_cc_version} | cut -d '.' -f 2`
  
          echo "
diff --git a/debian/module/debian/patches/nvidia-use-ARCH.o_binary.patch b/debian/module/debian/patches/nvidia-use-ARCH.o_binary.patch
index a20cb201..899f0d79 100644
--- a/debian/module/debian/patches/nvidia-use-ARCH.o_binary.patch
+++ b/debian/module/debian/patches/nvidia-use-ARCH.o_binary.patch
@@ -5,7 +5,7 @@ Description: Select the correct nv-kernel.o blob for the target architecture
 
 --- a/nvidia/nvidia.Kbuild
 +++ b/nvidia/nvidia.Kbuild
-@@ -37,7 +37,10 @@
+@@ -37,7 +37,10 @@ NVIDIA_KO = nvidia/nvidia.ko
  # and needs to be re-executed.
  #
  
diff --git a/debian/module/debian/patches/series.in b/debian/module/debian/patches/series.in
index dd3f3004..30ade15f 100644
--- a/debian/module/debian/patches/series.in
+++ b/debian/module/debian/patches/series.in
@@ -1,5 +1,6 @@
 # kernel support
 kernel-5.7.0-set-memory-array.patch
+0006-backport-pde_data-changes-from-470.103.01.patch
 
 # build system updates
 bashisms.patch
diff --git a/debian/not-installed.in b/debian/not-installed.in
index 2a378b4d..29ec4441 100644
--- a/debian/not-installed.in
+++ b/debian/not-installed.in
@@ -1,3 +1,4 @@
+# upstream packaging
 .manifest
 LICENSE
 makeself-help-script.sh
@@ -7,15 +8,19 @@ nvidia-installer
 nvidia-installer.1
 pkg-history.txt
 
+# installed by dh_installchangelogs
 NVIDIA_Changelog
 
+# built from src:nvidia-modprobe
 nvidia-modprobe
 nvidia-modprobe.1
 
+# built from src:nvidia-persistenced
 nvidia-persistenced
 nvidia-persistenced-init.tar.bz2
 nvidia-persistenced.1
 
+# built from src:nvidia-settings*
 nvidia-settings
 nvidia-settings.1
 nvidia-settings.desktop
@@ -23,14 +28,15 @@ nvidia-settings.png
 libnvidia-gtk2.so.#VERSION#
 libnvidia-gtk3.so.#VERSION#
 
+# built from src:nvidia-xconfig
 nvidia-xconfig
 nvidia-xconfig.1
 
+# built from src:egl-wayland
 libnvidia-egl-wayland.so.1.*.*
 10_nvidia_wayland.json
 
-libEGL.so.#VERSION#
-
+# built from src:libglvnd
 libEGL.so.1.1.0
 libGL.so.1.7.0
 libGLESv1_CM.so.1.2.0
@@ -39,6 +45,7 @@ libGLX.so.0
 libGLdispatch.so.0
 libOpenGL.so.0
 
+# shipped unversioned by src:nvidia-graphics-drivers
 10_nvidia.json
 nvidia_icd.json
 nvidia_layers.json
@@ -47,3 +54,7 @@ libOpenCL.so.1.0.0
 nvidia-cuda-mps-server
 nvidia-cuda-mps-control
 nvidia-cuda-mps-control.1
+
+# not shipped
+
+libEGL.so.#VERSION#
diff --git a/debian/nvidia-kernel-dkms.dkms.in b/debian/nvidia-kernel-dkms.dkms.in
index 97d5f40f..dc91af91 100644
--- a/debian/nvidia-kernel-dkms.dkms.in
+++ b/debian/nvidia-kernel-dkms.dkms.in
@@ -3,6 +3,10 @@
 PACKAGE_NAME="#MODULE#"
 PACKAGE_VERSION="#VERSION#"
 
+# The NVIDIA driver does not support real-time kernels.
+# Can't easily set this via BUILD_EXCLUSIVE.
+[[ "$kernelver" =~ "-rt-" ]] && build_exclude="yes"
+
 AUTOINSTALL=yes
 PATCH=(#MODULE_PATCHES#)
 
diff --git a/debian/rules b/debian/rules
index e0c9e7fd..70866996 100755
--- a/debian/rules
+++ b/debian/rules
@@ -90,7 +90,7 @@ ALL_CONTROL	:= $(wildcard $(patsubst %,debian/%*,$(CONTROL_PREFIXES)))
 LEGACY_CONTROL	:= $(wildcard $(patsubst %,debian/%*,$(CONTROL_PREFIXES_RENAMED)))
 RENAME_CONTROL	 = $(filter-out $(LEGACY_CONTROL),$(ALL_CONTROL))
 RENAMED_CONTROL	 = $(foreach f,$(RENAME_CONTROL),$(call applyprefixrenamelist,$f,$(CONTROL_PREFIXES)))
-TEMPLATES	:= $(wildcard debian/*.in debian/module/debian/*.in debian/module/debian/patches/*.in debian/detect/*.in)
+TEMPLATES	:= $(wildcard debian/*.in debian/module/debian/*.in debian/module/debian/patches/*.in debian/detect/*.in debian/tests/*.in)
 AUTOGEN		+= $(patsubst %.in,%,$(TEMPLATES))
 AUTOGEN		+= debian/module/debian/changelog
 AUTOGEN		+= debian/module/debian/bug-control
@@ -99,7 +99,9 @@ AUTOGEN		+= debian/bug-control
 AUTOGEN		+= debian/substvars
 AUTOGEN		+= $(if $(has_vulkan),nonglvnd/nvidia_icd.json)
 AUTOGEN		+= $(AUTOKEEP)
-AUTOKEEP	 = debian/watch debian/control
+AUTOKEEP	 = debian/watch
+AUTOKEEP	+= debian/tests/autopkgtest-pkg-dkms.conf
+AUTOKEEP	+= debian/control
 AUTOCLEAN	 = $(filter-out $(AUTOKEEP),$(AUTOGEN))
 
 empty		 =
diff --git a/debian/rules.defs b/debian/rules.defs
index 6032cb04..4ed62c81 100644
--- a/debian/rules.defs
+++ b/debian/rules.defs
@@ -4,10 +4,10 @@ NVIDIA_TESLA		 = $(TESLA_MAJOR)
 #NVIDIA_LEGACY		 =
 #WATCH_VERSION		 =
 
-XORG_ABI_LIST		 = 24 23 20 19 18 15 14 13 12 11 10 8 6.0
-XORG_BOUND		 = (<< 2:1.20.99)
+XORG_ABI_LIST		 = 25 24 23 20 19 18 15 14 13 12 11 10 8 6.0
+XORG_BOUND		 = (<< 2:21.99)
 
-LINUX_KMOD_TESTED	 = 5.16
+LINUX_KMOD_TESTED	 = 5.17
 
 ARCH_LIST		 = amd64
 ARCH_LIST		+= i386
diff --git a/debian/tests/autopkgtest-pkg-dkms.conf b/debian/tests/autopkgtest-pkg-dkms.conf
new file mode 100644
index 00000000..813da0cd
--- /dev/null
+++ b/debian/tests/autopkgtest-pkg-dkms.conf
@@ -0,0 +1 @@
+architecture = amd64 arm64 ppc64el
diff --git a/debian/tests/autopkgtest-pkg-dkms.conf.in b/debian/tests/autopkgtest-pkg-dkms.conf.in
new file mode 100644
index 00000000..5062b82d
--- /dev/null
+++ b/debian/tests/autopkgtest-pkg-dkms.conf.in
@@ -0,0 +1 @@
+architecture = #ARCH_LIST#

Reply via email to