aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLenard Spencer <lenardrspencer@gmail.com>2021-08-14 19:42:34 +0200
committerWilly Sudiarto Raharjo <willysr@slackbuilds.org>2021-08-19 18:33:45 +0700
commit2da036e180da06c249d99840e79018345736f986 (patch)
tree47e4ef45eac5d2fad13bb201cef794816f2d32f0
parent3bdbf701ff7b7b2d462bd1c500f9e0541c300a07 (diff)
system/nvidia-legacy390-driver: Updated for version 390.144.
Signed-off-by: Matteo Bernardini <ponce@slackbuilds.org> Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
-rw-r--r--system/nvidia-legacy390-driver/douninst.sh4
-rw-r--r--system/nvidia-legacy390-driver/nvidia-installer-removed-sysctl-h.patch72
-rw-r--r--system/nvidia-legacy390-driver/nvidia-legacy390-driver.SlackBuild53
-rw-r--r--system/nvidia-legacy390-driver/nvidia-legacy390-driver.info50
-rw-r--r--system/nvidia-legacy390-driver/nvidia-switch11
-rw-r--r--system/nvidia-legacy390-driver/rc.nvidia-persistenced2
6 files changed, 105 insertions, 87 deletions
diff --git a/system/nvidia-legacy390-driver/douninst.sh b/system/nvidia-legacy390-driver/douninst.sh
index d9c58a7dc2263..1bf7bd2edfb63 100644
--- a/system/nvidia-legacy390-driver/douninst.sh
+++ b/system/nvidia-legacy390-driver/douninst.sh
@@ -1,9 +1,9 @@
( cd usr/libSUFFIX/xorg/modules/extensions
- if [ -e libglx.so-xorg ]; then
+ if [ -f libglx.so-xorg ]; then
mv libglx.so-xorg libglx.so
else
if [ ! -e libglx.so ]; then
- echo -e "WARNING: libglx.so not found! Please reinstall xorg-server!\n"
+ echo -e "WARNING: libglx.so not found! Please reinstall xorg-server!\n"
fi
fi
)
diff --git a/system/nvidia-legacy390-driver/nvidia-installer-removed-sysctl-h.patch b/system/nvidia-legacy390-driver/nvidia-installer-removed-sysctl-h.patch
index 7b230fcb11d38..df61dfa85d1b5 100644
--- a/system/nvidia-legacy390-driver/nvidia-installer-removed-sysctl-h.patch
+++ b/system/nvidia-legacy390-driver/nvidia-installer-removed-sysctl-h.patch
@@ -1,36 +1,58 @@
-diff -Naur nvidia-installer-460.67.orig/kernel.c nvidia-installer-460.67/kernel.c
---- nvidia-installer-460.67.orig/kernel.c 2021-03-10 19:24:00.000000000 -0500
-+++ nvidia-installer-460.67/kernel.c 2021-04-16 17:59:48.828574898 -0400
-@@ -23,7 +23,10 @@
+diff -Nur nvidia-installer-390.143.orig/kernel.c nvidia-installer-390.143/kernel.c
+--- nvidia-installer-390.143.orig/kernel.c 2021-03-12 02:29:56.000000000 -0500
++++ nvidia-installer-390.143/kernel.c 2021-06-23 11:15:12.813980616 -0400
+@@ -23,7 +23,6 @@
#include <sys/utsname.h>
#include <sys/types.h>
#include <sys/stat.h>
-#include <sys/sysctl.h>
-+#include <gnu/libc-version.h>
-+#if __GLIBC__ == 2 && __GLIBC_MINOR__ <= 30
-+ #include <sys/sysctl.h>
-+#endif
#include <ctype.h>
#include <stdlib.h>
#include <dirent.h>
-@@ -1076,7 +1079,8 @@
- }
+@@ -1055,9 +1050,9 @@
+ #define PRINTK_LOGLEVEL_KERN_ALERT 1
- if (!loglevel_set) {
-- /*
-+#if __GLIBC__ == 2 && __GLIBC_MINOR__ <= 30
-+ /*
- * Explicitly initialize the value of len, even though it looks like the
- * syscall should do that, since in practice it doesn't always actually
- * set the value of the pointed-to length parameter.
-@@ -1090,6 +1094,10 @@
- loglevel_set = TRUE;
- }
- }
-+#else /* sys/sysctl.h has been removed from glibc 2.32 and later */
-+ if (!old_level)
-+ loglevel_set = TRUE;
-+#endif
+ /*
+- * Attempt to set the printk loglevel, first using the /proc/sys interface,
+- * and falling back to the deprecated sysctl if that fails. Pass the previous
+- * loglevel back to the caller and return TRUE on success, or FALSE on failure.
++ * Attempt to set the printk loglevel using the /proc/sys interface.
++ * Pass the previous loglevel back to the caller and return TRUE on success,
++ * or FALSE on failure.
+ */
+ static int set_loglevel(int level, int *old_level)
+ {
+@@ -1067,6 +1062,9 @@
+ fp = fopen("/proc/sys/kernel/printk", "r+");
+ if (fp) {
+ if (!old_level || fscanf(fp, "%d ", old_level) == 1) {
++ /* Use a dynamic buffer for the string: the kernel does not range
++ * check the loglevel, so the value reported by the procfs file
++ * may have an unknown number of digits. */
+ char *strlevel = nvasprintf("%d", level);
+
+ fseek(fp, 0, SEEK_SET);
+@@ -1079,23 +1077,6 @@
+ fclose(fp);
}
+- if (!loglevel_set) {
+- /*
+- * Explicitly initialize the value of len, even though it looks like the
+- * syscall should do that, since in practice it doesn't always actually
+- * set the value of the pointed-to length parameter.
+- */
+- size_t len = sizeof(int);
+- int name[] = { CTL_KERN, KERN_PRINTK };
+-
+- if (!old_level ||
+- sysctl(name, ARRAY_LEN(name), old_level, &len, NULL, 0) == 0) {
+- if (sysctl(name, ARRAY_LEN(name), NULL, 0, &level, len) == 0) {
+- loglevel_set = TRUE;
+- }
+- }
+- }
+-
return loglevel_set;
+ }
+
diff --git a/system/nvidia-legacy390-driver/nvidia-legacy390-driver.SlackBuild b/system/nvidia-legacy390-driver/nvidia-legacy390-driver.SlackBuild
index 1a79768f7be33..22ac352e2e9f7 100644
--- a/system/nvidia-legacy390-driver/nvidia-legacy390-driver.SlackBuild
+++ b/system/nvidia-legacy390-driver/nvidia-legacy390-driver.SlackBuild
@@ -23,13 +23,11 @@
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-# see changelog.txt
-
cd $(dirname $0) ; CWD=$(pwd)
PRGNAM=nvidia-legacy390-driver
-VERSION=${VERSION:-390.143}
-BUILD=${BUILD:-3}
+VERSION=${VERSION:-390.144}
+BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
PKGTYPE=${PKGTYPE:-tgz}
@@ -43,6 +41,18 @@ if [ -z "$ARCH" ]; then
esac
fi
+# If the variable PRINT_PACKAGE_NAME is set, then this script will report what
+# the name of the created package would be, and then exit. This information
+# could be useful to other scripts.
+if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then
+ echo "$PRGNAM-$VERSION$MULTI-$TARGET-$BUILD$TAG.$PKGTYPE"
+ exit 0
+fi
+
+TMP=${TMP:-/tmp/SBo}
+PKG=$TMP/package-$PRGNAM
+OUTPUT=${OUTPUT:-/tmp}
+
if [ "$ARCH" = "i586" ]; then
SLKCFLAGS="-O2 -march=i586 -mtune=i686"
TARGET="x86"
@@ -65,30 +75,6 @@ else
COMPAT32=no
fi
-if [ "$ARCH" = "x86_64" -a "${COMPAT32}" = "yes" ]; then
- COMP32="--install-compat32-libs --compat32-prefix=$PKG/usr"
- MULTI="_multilib"
-else
- if [ ! "$ARCH" = "x86_64" ]; then
- COMP32=""
- else
- COMP32="--no-install-compat32-libs"
- MULTI=""
- fi
-fi
-
-# If the variable PRINT_PACKAGE_NAME is set, then this script will report what
-# the name of the created package would be, and then exit. This information
-# could be useful to other scripts.
-if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then
- echo "$PRGNAM-$VERSION$MULTI-$TARGET-$BUILD$TAG.$PKGTYPE"
- exit 0
-fi
-
-TMP=${TMP:-/tmp/SBo}
-PKG=$TMP/package-$PRGNAM
-OUTPUT=${OUTPUT:-/tmp}
-
# Abort if an Nvidia driver is still installed:
if [ -x /usr/bin/nvidia-installer ]; then
echo -e "\n A previous Nvidia installation has been detected!"
@@ -158,7 +144,16 @@ mv -f $PKG/usr/bin/nvidia-installer $TMP/$SRCNAM
mv -f $PKG/usr/man/man1/nvidia-installer.1.gz $TMP/$SRCNAM
if [ "$ARCH" = "x86_64" -a "${COMPAT32}" = "yes" ]; then
- mkdir $PKG/usr/lib
+ COMP32="--install-compat32-libs --compat32-prefix=$PKG/usr"
+ MULTI="_multilib"
+ mkdir $PKG/usr/lib
+else
+ if [ ! "$ARCH" = "x86_64" ]; then
+ COMP32=""
+ else
+ COMP32="--no-install-compat32-libs"
+ MULTI=""
+ fi
fi
# Install the binary libs using nvidia-installer compiled above
diff --git a/system/nvidia-legacy390-driver/nvidia-legacy390-driver.info b/system/nvidia-legacy390-driver/nvidia-legacy390-driver.info
index b314520d533c2..95ba867a06d74 100644
--- a/system/nvidia-legacy390-driver/nvidia-legacy390-driver.info
+++ b/system/nvidia-legacy390-driver/nvidia-legacy390-driver.info
@@ -1,30 +1,30 @@
PRGNAM="nvidia-legacy390-driver"
-VERSION="390.143"
+VERSION="390.144"
HOMEPAGE="http://www.nvidia.com"
-DOWNLOAD="https://download.nvidia.com/XFree86/Linux-x86/390.143/NVIDIA-Linux-x86-390.143.run \
- https://download.nvidia.com/XFree86/nvidia-installer/nvidia-installer-390.143.tar.bz2 \
- https://download.nvidia.com/XFree86/nvidia-modprobe/nvidia-modprobe-390.143.tar.bz2 \
- https://download.nvidia.com/XFree86/nvidia-persistenced/nvidia-persistenced-390.143.tar.bz2 \
- https://download.nvidia.com/XFree86/nvidia-settings/nvidia-settings-390.143.tar.bz2 \
- https://download.nvidia.com/XFree86/nvidia-xconfig/nvidia-xconfig-390.143.tar.bz2"
-MD5SUM="7b5704f3c89223d5ecb4f26ca9463c26 \
- def90705f245c17a93303a863ee591ab \
- 5ee49194c37c97d81cddc34068d8f723 \
- 1c897a24ea263abd89f23504632ac842 \
- 6adc329cd15cdb88587190330a91e098 \
- dcfdf003fd33372698eb4be07f65f1af"
-DOWNLOAD_x86_64="https://download.nvidia.com/XFree86/Linux-x86_64/390.143/NVIDIA-Linux-x86_64-390.143.run \
- https://download.nvidia.com/XFree86/nvidia-installer/nvidia-installer-390.143.tar.bz2 \
- https://download.nvidia.com/XFree86/nvidia-modprobe/nvidia-modprobe-390.143.tar.bz2 \
- https://download.nvidia.com/XFree86/nvidia-persistenced/nvidia-persistenced-390.143.tar.bz2 \
- https://download.nvidia.com/XFree86/nvidia-settings/nvidia-settings-390.143.tar.bz2 \
- https://download.nvidia.com/XFree86/nvidia-xconfig/nvidia-xconfig-390.143.tar.bz2"
-MD5SUM_x86_64="1b526fa9567a09eb1e18545f675c8f82 \
- def90705f245c17a93303a863ee591ab \
- 5ee49194c37c97d81cddc34068d8f723 \
- 1c897a24ea263abd89f23504632ac842 \
- 6adc329cd15cdb88587190330a91e098 \
- dcfdf003fd33372698eb4be07f65f1af"
+DOWNLOAD="https://download.nvidia.com/XFree86/Linux-x86/390.144/NVIDIA-Linux-x86-390.144.run \
+ https://download.nvidia.com/XFree86/nvidia-installer/nvidia-installer-390.144.tar.bz2 \
+ https://download.nvidia.com/XFree86/nvidia-modprobe/nvidia-modprobe-390.144.tar.bz2 \
+ https://download.nvidia.com/XFree86/nvidia-persistenced/nvidia-persistenced-390.144.tar.bz2 \
+ https://download.nvidia.com/XFree86/nvidia-settings/nvidia-settings-390.144.tar.bz2 \
+ https://download.nvidia.com/XFree86/nvidia-xconfig/nvidia-xconfig-390.144.tar.bz2"
+MD5SUM="6ee8cd784135bd79f5e416b6815f443d \
+ cc853483eff91a2bf1ef5592ddf95c49 \
+ 82635038ff0a1ce11249eccbd6b036b9 \
+ 6cb95ae84dfa1e632e10b8b73f0ac35e \
+ 12cb4f4c98400b4c839ffbb8acdcbf9d \
+ 26c9a1ab380adb23ee103db31d39cb63"
+DOWNLOAD_x86_64="https://download.nvidia.com/XFree86/Linux-x86_64/390.144/NVIDIA-Linux-x86_64-390.144.run \
+ https://download.nvidia.com/XFree86/nvidia-installer/nvidia-installer-390.144.tar.bz2 \
+ https://download.nvidia.com/XFree86/nvidia-modprobe/nvidia-modprobe-390.144.tar.bz2 \
+ https://download.nvidia.com/XFree86/nvidia-persistenced/nvidia-persistenced-390.144.tar.bz2 \
+ https://download.nvidia.com/XFree86/nvidia-settings/nvidia-settings-390.144.tar.bz2 \
+ https://download.nvidia.com/XFree86/nvidia-xconfig/nvidia-xconfig-390.144.tar.bz2"
+MD5SUM_x86_64="dc6a203e3c32456e16e6fae5c8a7c728 \
+ cc853483eff91a2bf1ef5592ddf95c49 \
+ 82635038ff0a1ce11249eccbd6b036b9 \
+ 6cb95ae84dfa1e632e10b8b73f0ac35e \
+ 12cb4f4c98400b4c839ffbb8acdcbf9d \
+ 26c9a1ab380adb23ee103db31d39cb63"
REQUIRES="nvidia-legacy390-kernel"
MAINTAINER="Lenard Spencer"
EMAIL="lenardrspencer@gmail.com"
diff --git a/system/nvidia-legacy390-driver/nvidia-switch b/system/nvidia-legacy390-driver/nvidia-switch
index 2e71e3b75b542..3fa408c09d404 100644
--- a/system/nvidia-legacy390-driver/nvidia-switch
+++ b/system/nvidia-legacy390-driver/nvidia-switch
@@ -40,6 +40,7 @@ else
fi
CWD=$(pwd)
LIBSUFFIX="LIBDIRSUFFIX" # This will be replaced in the build script
+INC="${ROOT}usr/include/GL"
LIB="${ROOT}usr/lib${LIBSUFFIX}"
XMOD="${LIB}/xorg/modules"
XLIB="$XMOD/extensions"
@@ -49,20 +50,20 @@ save_glx(){
cd "$XLIB"
case "$1" in
"nvidia")
- if [ -e libglx.so ]; then
- cp -a libglx.so libglx.so-xorg
+ if [ -f libglx.so ]; then
+ mv libglx.so libglx.so-xorg
fi
ln -sf libglx.so.$NV_VERSION libglx.so
;;
"xorg")
- if [ -e libglx.so-xorg ]; then
+ if [ -f libglx.so-xorg ]; then
rm -f libglx.so
mv libglx.so-xorg libglx.so
else
if [ ! -e libglx.so ]; then
- echo -e "WARNING: libglx.so not found! Please reinstall xorg-server!\n"
+ echo -e "WARNING: libglx.so not found! Please reinstall xorg-server!\n"
else
- if [ -L libglx.so ]; then
+ if [ -h libglx.so ]; then
rm libglx.so
echo -e "WARNING: removed dead symlink libglx.so! Please reinstall xorg-server!\n"
fi
diff --git a/system/nvidia-legacy390-driver/rc.nvidia-persistenced b/system/nvidia-legacy390-driver/rc.nvidia-persistenced
index 59bdf18d1114c..b95480a4e023a 100644
--- a/system/nvidia-legacy390-driver/rc.nvidia-persistenced
+++ b/system/nvidia-legacy390-driver/rc.nvidia-persistenced
@@ -1,4 +1,4 @@
-#!/bin/sh -e
+#!/bin/bash -e
#
# NVIDIA Persistence Daemon Init Script
#