You are not logged in.

#1 2020-11-28 15:07:41

jonathon
Member
Registered: 2016-09-19
Posts: 66

[nvidia-390xx] Switch it to a metapackage for nvidia-390xx-dkms?

I'm currently looking after nvidia-390xx in the AUR.

Given people already have to manually repackage nvidia-390xx each time the kernel ABI changes I'm considering switching the nvidia-390xx package so it's a metapackage which depends on nvidia-390xx-dkms instead.

Pro:
* This removes the need for users to manually repackage every so often.

Con:
* DKMS will recompile the module for every kernel update, not just when an ABI change occurs.

Does anyone have any views on this? Should the package be let alone in its "pure" state, or does bringing in the DKMS version make more sense when this isn't in a repo?

Initial WIP `git diff` for reference:

diff --git a/PKGBUILD b/PKGBUILD
index 2a9ec86..476593f 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -7,11 +7,12 @@
 pkgbase=nvidia-390xx
 pkgname=(nvidia-390xx nvidia-390xx-dkms)
 pkgver=390.138
-pkgrel=7
+pkgrel=8
 pkgdesc="NVIDIA drivers for linux, 390xx legacy branch"
 arch=('x86_64')
 url="https://www.nvidia.com/"
-makedepends=("nvidia-390xx-utils=${pkgver}" 'libglvnd' 'linux-headers')
+depends=('linux' 'libglvnd' "nvidia-390xx-utils=${pkgver}")
+makedepends=('linux-headers')
 conflicts=('nvidia')
 license=('custom')
 options=('!strip')
@@ -77,25 +78,27 @@ build() {
 
 package_nvidia-390xx() {
     pkgdesc="NVIDIA drivers for linux, 390xx legacy branch"
-    depends=('linux' "nvidia-390xx-utils=${pkgver}" 'libglvnd')
+    depends+=('nvidia-390xx-dkms')
+    #depends=('linux' "nvidia-390xx-utils=${pkgver}" 'libglvnd')
 
-    _extradir="/usr/lib/modules/$(</usr/src/linux/version)/extramodules"
-    install -Dt "${pkgdir}${_extradir}" -m644 \
-      "${srcdir}/${_pkg}/kernel"/nvidia{,-modeset,-drm,-uvm}.ko
+    #_extradir="/usr/lib/modules/$(</usr/src/linux/version)/extramodules"
+    #install -Dt "${pkgdir}${_extradir}" -m644 \
+    #  "${srcdir}/${_pkg}/kernel"/nvidia{,-modeset,-drm,-uvm}.ko
 
-    find "${pkgdir}" -name '*.ko' -exec gzip -n {} +
+    #find "${pkgdir}" -name '*.ko' -exec gzip -n {} +
 
-    echo "blacklist nouveau" |
-        install -Dm644 /dev/stdin "${pkgdir}/usr/lib/modprobe.d/${pkgname}.conf"
+    #echo "blacklist nouveau" |
+    #    install -Dm644 /dev/stdin "${pkgdir}/usr/lib/modprobe.d/${pkgname}.conf"
 
-    install -Dt "${pkgdir}/usr/share/licenses/${pkgname}" -m644 "${srcdir}/${_pkg}/LICENSE"
+    #install -Dt "${pkgdir}/usr/share/licenses/${pkgname}" -m644 "${srcdir}/${_pkg}/LICENSE"
 }
 
 package_nvidia-390xx-dkms() {
     pkgdesc="NVIDIA driver sources for linux, 390xx legacy branch"
-    depends=('dkms' "nvidia-390xx-utils=$pkgver" 'libglvnd')
+    depends+=('dkms' 'linux-headers')
+    #depends=('dkms' "nvidia-390xx-utils=$pkgver" 'libglvnd')
     provides=("nvidia-390xx=$pkgver")
-    conflicts+=('nvidia-390xx')
+    #conflicts+=('nvidia-390xx')
 
     cd ${_pkg}
 

Last edited by jonathon (2020-11-28 15:09:20)

Offline

#2 2020-11-28 15:14:07

Scimmia
Bug Wrangler
Registered: 2012-09-01
Posts: 8,315

Re: [nvidia-390xx] Switch it to a metapackage for nvidia-390xx-dkms?

Actual module packages are nice for older systems, you can build it on one system then install it on another without having to have all of the build tools and take the time on the older system. They fill different niches.

Note that the -dkms version should NOT depend on linux-headers.

Offline

#3 2020-11-29 01:59:48

eschwartz
Trusted User/Bug Wrangler
Registered: 2014-08-08
Posts: 3,924

Re: [nvidia-390xx] Switch it to a metapackage for nvidia-390xx-dkms?

You're currently installing to a versioned directory which includes the pkgrel of the kernel package... due to, a year ago, the linux package dropping support for this useful feature in the commit "5.3.6.arch1-1: removal of extramodules-ARCH"

How does sticking it into /usr/lib/modules/5.9.10-arch1-1/extramodules/ help avoid unneeded rebuilds?

(My understanding is this is used by convention, solely to distinguish between in-tree and out of tree modules.)

Last edited by eschwartz (2020-11-29 02:01:47)


Managing AUR repos The Right Way -- aurpublish (now a standalone tool)

Offline

Board footer

Powered by FluxBB