diff options
author | Aaron Plattner <aplattner@nvidia.com> | 2009-01-30 18:55:20 -0800 |
---|---|---|
committer | Aaron Plattner <aplattner@nvidia.com> | 2009-01-30 18:55:20 -0800 |
commit | 807962e20e70938934f069e91b86464a0381fcf9 (patch) | |
tree | 931f23a5e69add968998850f0822f58289203b2e | |
parent | 93461d368967342e206d2f5fbe3eb0307af98bb4 (diff) |
71.86.0871.86.08
-rw-r--r-- | DRIVER_VERSION | 2 | ||||
-rw-r--r-- | backup.c | 6 | ||||
-rw-r--r-- | command-list.c | 126 | ||||
-rw-r--r-- | files.c | 4 | ||||
-rw-r--r-- | install-from-cwd.c | 25 | ||||
-rw-r--r-- | misc.c | 60 | ||||
-rw-r--r-- | misc.h | 3 | ||||
-rw-r--r-- | nvidia-installer.1.m4 | 43 | ||||
-rw-r--r-- | nvidia-installer.c | 15 | ||||
-rw-r--r-- | nvidia-installer.h | 72 | ||||
-rw-r--r-- | option_table.h | 8 |
11 files changed, 297 insertions, 67 deletions
diff --git a/DRIVER_VERSION b/DRIVER_VERSION index dd1ac03..9fe54a8 100644 --- a/DRIVER_VERSION +++ b/DRIVER_VERSION @@ -1 +1 @@ -71.86.07 +71.86.08 @@ -532,7 +532,9 @@ static int do_uninstall(Options *op) tmpstr = nvstrcat("Uninstalling ", b->description, " (", b->version, "):", NULL); - + + run_distro_hook(op, "pre-uninstall"); + ui_status_begin(op, tmpstr, "Uninstalling"); free(tmpstr); @@ -654,6 +656,8 @@ static int do_uninstall(Options *op) /* XXX what to do if this fails?... nothing */ } + run_distro_hook(op, "post-uninstall"); + return TRUE; } /* do_uninstall() */ diff --git a/command-list.c b/command-list.c index 3e5724d..669e8c5 100644 --- a/command-list.c +++ b/command-list.c @@ -29,6 +29,8 @@ #include <sys/types.h> #include <sys/stat.h> +#include <fcntl.h> +#include <sys/mman.h> #include <fts.h> #include <unistd.h> #include <dirent.h> @@ -63,7 +65,7 @@ static void find_conflicting_kernel_modules(Options *op, Package *p, FileList *l); -static void find_existing_files(Package *p, FileList *l, unsigned int); +static void find_existing_files(Package *p, FileList *l, uint64_t); static void condense_file_list(Package *p, FileList *l); @@ -93,7 +95,7 @@ CommandList *build_command_list(Options *op, Package *p) FileList *l; CommandList *c; int i, cmd; - unsigned int installable_files; + uint64_t installable_files; char *tmp; installable_files = get_installable_file_mask(op); @@ -465,6 +467,15 @@ int execute_command_list(Options *op, CommandList *c, typedef struct { const char *name; int len; + + /* + * if requiredString is non-NULL, then a file must have this + * string in order to be considered a conflicting file; we use + * this to only consider "libglx.*" files conflicts if they have + * the string "glxModuleData". + */ + + const char *requiredString; } ConflictingFileInfo; static void find_conflicting_files(Options *op, @@ -478,15 +489,15 @@ static void find_conflicting_libraries(Options *op, FileList *l); static ConflictingFileInfo __xfree86_libs[] = { - { "libGLcore.", 10 /* strlen("libGLcore.") */ }, - { "libGL.", 6 /* strlen("libGL.") */ }, - { "libGLwrapper.", 13 /* strlen("libGLwrapper.") */ }, - { "libglx.", 7 /* strlen("libglx.") */ }, - { "libXvMCNVIDIA", 13 /* strlen("libXvMCNVIDIA") */ }, - { "libnvidia-cfg.", 14 /* strlen("libnvidia-cfg.") */ }, - { "nvidia_drv.", 11 /* strlen("nvidia_drv.") */ }, - { "libcuda.", 8 /* strlen("libcuda.") */ }, - { NULL, 0 } + { "libGLcore.", 10, /* strlen("libGLcore.") */ NULL }, + { "libGL.", 6, /* strlen("libGL.") */ NULL }, + { "libGLwrapper.", 13, /* strlen("libGLwrapper.") */ NULL }, + { "libglx.", 7, /* strlen("libglx.") */ "glxModuleData" }, + { "libXvMCNVIDIA", 13, /* strlen("libXvMCNVIDIA") */ NULL }, + { "libnvidia-cfg.", 14, /* strlen("libnvidia-cfg.") */ NULL }, + { "nvidia_drv.", 11, /* strlen("nvidia_drv.") */ NULL }, + { "libcuda.", 8, /* strlen("libcuda.") */ NULL }, + { NULL, 0, NULL } }; /* @@ -524,11 +535,11 @@ static void find_conflicting_xfree86_libraries_fullpath(Options *op, static ConflictingFileInfo __opengl_libs[] = { - { "libGLcore.", 10 /* strlen("libGLcore.") */ }, - { "libGL.", 6 /* strlen("libGL.") */ }, - { "libnvidia-tls.", 14 /* strlen("libnvidia-tls.") */ }, - { "libGLwrapper.", 13 /* strlen("libGLwrapper.") */ }, - { "libcuda.", 8 /* strlen("libcuda.") */ }, + { "libGLcore.", 10, /* strlen("libGLcore.") */ NULL }, + { "libGL.", 6, /* strlen("libGL.") */ NULL }, + { "libnvidia-tls.", 14, /* strlen("libnvidia-tls.") */ NULL }, + { "libGLwrapper.", 13, /* strlen("libGLwrapper.") */ NULL }, + { "libcuda.", 8, /* strlen("libcuda.") */ NULL }, { NULL, 0 } }; @@ -601,7 +612,7 @@ static void find_conflicting_kernel_modules(Options *op, * FileList. */ -static void find_existing_files(Package *p, FileList *l, unsigned int flag) +static void find_existing_files(Package *p, FileList *l, uint64_t flag) { int i; struct stat stat_buf; @@ -617,6 +628,82 @@ static void find_existing_files(Package *p, FileList *l, unsigned int flag) +/* + * ignore_conflicting_file() - ignore (i.e., do not put it on the list + * of files to backup) the conflicting file 'filename' if requiredString + * is non-NULL and we cannot find the string in 'filename'. + */ + +static int ignore_conflicting_file(Options *op, + const char *filename, + const char *requiredString) +{ + int fd = -1; + struct stat stat_buf; + char *file = MAP_FAILED; + int ret = FALSE; + int i, len; + + /* if no requiredString, do not ignore this conflicting file */ + + if (!requiredString) return FALSE; + + if ((fd = open(filename, O_RDONLY)) == -1) { + ui_error(op, "Unable to open '%s' for reading (%s)", + filename, strerror(errno)); + goto cleanup; + } + + if (fstat(fd, &stat_buf) == -1) { + ui_error(op, "Unable to determine size of '%s' (%s)", + filename, strerror(errno)); + goto cleanup; + } + + if ((file = mmap(0, stat_buf.st_size, PROT_READ, + MAP_FILE | MAP_SHARED, fd, 0)) == MAP_FAILED) { + ui_error(op, "Unable to map file '%s' for reading (%s)", + filename, strerror(errno)); + goto cleanup; + } + + /* + * if the requiredString is not found within the mapping of file, + * ignore the conflicting file; when scanning for the string, + * ensure that the string is either at the end of the file, or + * followed by '\0'. + */ + + ret = TRUE; + + len = strlen(requiredString); + + for (i = 0; (i + len) <= stat_buf.st_size; i++) { + if ((strncmp(&file[i], requiredString, len) == 0) && + (((i + len) == stat_buf.st_size) || (file[i+len] == '\0'))) { + ret = FALSE; + break; + } + } + + /* fall through to cleanup */ + + cleanup: + + if (file != MAP_FAILED) { + munmap(file, stat_buf.st_size); + } + + if (fd != -1) { + close(fd); + } + + return ret; + +} /* ignore_conflicting_file() */ + + + /* * find_conflicting_files() - search for any conflicting @@ -645,8 +732,11 @@ static void find_conflicting_files(Options *op, case FTS_F: case FTS_SLNONE: for (i = 0; files[i].name; i++) { - if (!strncmp(ent->fts_name, files[i].name, files[i].len)) + if (!strncmp(ent->fts_name, files[i].name, files[i].len) && + !ignore_conflicting_file(op, ent->fts_path, + files[i].requiredString)) { add_file_to_list(NULL, ent->fts_path, l); + } } break; @@ -582,6 +582,7 @@ int set_destinations(Options *op, Package *p) break; case FILE_TYPE_UTILITY_BINARY: + case FILE_TYPE_UTILITY_BIN_SYMLINK: prefix = op->utility_prefix; dir = op->utility_bindir; path = ""; @@ -901,10 +902,9 @@ int add_kernel_module_to_package(Options *op, Package *p) void remove_non_kernel_module_files_from_package(Options *op, Package *p) { int i; - unsigned int flags; for (i = 0; i < p->num_entries; i++) { - flags = p->entries[i].flags & FILE_TYPE_MASK; + uint64_t flags = p->entries[i].flags & FILE_TYPE_MASK; if ((flags != FILE_TYPE_KERNEL_MODULE) && (flags != FILE_TYPE_KERNEL_MODULE_CMD)) p->entries[i].flags &= ~FILE_TYPE_MASK; diff --git a/install-from-cwd.c b/install-from-cwd.c index 4edd31f..7a7aac4 100644 --- a/install-from-cwd.c +++ b/install-from-cwd.c @@ -78,6 +78,7 @@ int install_from_cwd(Options *op) Package *p; CommandList *c; const char *msg; + int ran_pre_install_hook = FALSE; static const char edit_your_xf86config[] = "Please update your XF86Config or xorg.conf file as " @@ -118,6 +119,17 @@ int install_from_cwd(Options *op) if (!check_for_existing_driver(op, p)) return FALSE; + /* run the distro preinstall hook */ + + if (!run_distro_hook(op, "pre-install")) { + if (!ui_yes_no(op, TRUE, + "The distribution-provided pre-install script failed! " + "Continue installation anyway?")) { + goto failed; + } + } + ran_pre_install_hook = TRUE; + /* attempt to build a kernel module for the target kernel */ if (!op->no_kernel_module) { @@ -216,6 +228,10 @@ int install_from_cwd(Options *op) if (!do_install(op, p, c)) goto failed; + /* run the distro postinstall script */ + + run_distro_hook(op, "post-install"); + /* * XXX IMPLEMENT ME: generate an XF86Config file? */ @@ -262,7 +278,10 @@ int install_from_cwd(Options *op) "on fixing installation problems in the README available " "on the Linux driver download page at www.nvidia.com."); } - + + if (ran_pre_install_hook) + run_distro_hook(op, "failed-install"); + return FALSE; } /* install_from_cwd() */ @@ -618,6 +637,8 @@ static Package *parse_manifest (Options *op) p->entries[n].flags |= FILE_TYPE_INSTALLER_BINARY; else if (strcmp(flag, "UTILITY_BINARY") == 0) p->entries[n].flags |= FILE_TYPE_UTILITY_BINARY; + else if (strcmp(flag, "UTILITY_BIN_SYMLINK") == 0) + p->entries[n].flags |= FILE_TYPE_UTILITY_BIN_SYMLINK; else if (strcmp(flag, "DOT_DESKTOP") == 0) p->entries[n].flags |= FILE_TYPE_DOT_DESKTOP; else if (strcmp(flag, "XMODULE_SHARED_LIB") == 0) @@ -756,7 +777,7 @@ void add_package_entry(Package *p, char *name, char *target, char *dst, - unsigned int flags, + uint64_t flags, mode_t mode) { int n; @@ -1347,8 +1347,8 @@ void check_installed_files_from_package(Options *op, Package *p) { int i, ret = TRUE; float percent; - unsigned int installable_files; - + uint64_t installable_files; + ui_status_begin(op, "Running post-install sanity check:", "Checking"); installable_files = get_installable_file_mask(op); @@ -1488,9 +1488,9 @@ static int check_file(Options *op, const char *filename, * should be considered installable. */ -unsigned int get_installable_file_mask(Options *op) +uint64_t get_installable_file_mask(Options *op) { - unsigned int installable_files = FILE_TYPE_INSTALLABLE_FILE; + uint64_t installable_files = FILE_TYPE_INSTALLABLE_FILE; if (!op->opengl_headers) installable_files &= ~FILE_TYPE_OPENGL_HEADER; return installable_files; @@ -2268,6 +2268,58 @@ int check_selinux(Options *op) return TRUE; } /* check_selinux */ + +/* + * run_distro_hook() - run a distribution-provided hook script + */ + +int run_distro_hook(Options *op, const char *hook) +{ + int ret, status, shouldrun = op->run_distro_scripts; + char *cmd = nvstrcat("/usr/lib/nvidia/", hook, NULL); + + if (op->kernel_module_only) { + ui_expert(op, + "Not running distribution-provided %s script %s because " + "--kernel-module-only was specified.", + hook, cmd); + ret = TRUE; + goto done; + } + + if (access(cmd, X_OK) < 0) { + /* it's okay if the script doesn't exist or isn't executable */ + ui_expert(op, "No distribution %s script found.", hook); + ret = TRUE; + goto done; + } + + /* in expert mode, ask before running distro hooks */ + if (op->expert) { + shouldrun = ui_yes_no(op, shouldrun, + "Run distribution-provided %s script %s?", + hook, cmd); + } + + if (!shouldrun) { + ui_expert(op, + "Not running distribution-provided %s script %s", + hook, cmd); + ret = TRUE; + goto done; + } + + ui_status_begin(op, "Running distribution scripts", "Executing %s", cmd); + status = run_command(op, cmd, NULL, TRUE, 0, TRUE); + ui_status_end(op, "done."); + + ret = (status == 0); + +done: + nvfree(cmd); + return ret; +} + /* * nv_format_text_rows() - this function breaks the given string str * into some number of rows, where each row is not longer than the @@ -109,7 +109,7 @@ int do_install(Options *op, Package *p, CommandList *c); void should_install_opengl_headers(Options *op, Package *p); void should_install_compat32_files(Options *op, Package *p); void check_installed_files_from_package(Options *op, Package *p); -unsigned int get_installable_file_mask(Options *op); +uint64_t get_installable_file_mask(Options *op); int tls_test(Options *op, int compat_32_libs); int check_runtime_configuration(Options *op, Package *p); void collapse_multiple_slashes(char *s); @@ -117,6 +117,7 @@ int is_symbolic_link_to(const char *path, const char *dest); Distribution get_distribution(Options *op); int check_for_running_x(Options *op); int check_for_modular_xorg(Options *op); +int run_distro_hook(Options *op, const char *hook); TextRows *nv_format_text_rows(const char *prefix, const char *buf, int width, int word_boundary); diff --git a/nvidia-installer.1.m4 b/nvidia-installer.1.m4 index 3354aed..d386208 100644 --- a/nvidia-installer.1.m4 +++ b/nvidia-installer.1.m4 @@ -1,7 +1,7 @@ dnl This file is to be preprocessed by m4. changequote([[[, ]]]) define(__OPTIONS__, [[[include([[[options.1.inc]]])dnl]]])dnl -.\" Copyright (C) 2005 NVIDIA Corporation. +.\" Copyright (C) 2005-2009 NVIDIA Corporation. .\" __HEADER__ .\" Define the URL macro and then load the URL package if it exists. @@ -9,7 +9,7 @@ __HEADER__ \\$2 \(laURL: \\$1 \(ra\\$3 .. .if \n[.g] .mso www.tmac -.TH nvidia\-installer 1 2005-09-01 "nvidia\-installer __VERSION__" +.TH nvidia\-installer 1 2009-01-09 "nvidia\-installer __VERSION__" .SH NAME nvidia\-installer \- install, upgrade, or uninstall the NVIDIA Accelerated Graphics Driver Set .SH SYNOPSIS @@ -85,6 +85,43 @@ is released under the GPL and available here: Patches are welcome. dnl Call gen-manpage-opts to generate this section. __OPTIONS__ +.SH "DISTRIBUTION HOOK SCRIPTS" +.PP +Because the NVIDIA installer may interact badly with distribution packages that contain the NVIDIA driver, +.B nvidia\-installer +provides a mechanism for the distribution to handle manual installation of the driver. +If they exist, +.B nvidia\-installer +will run the following scripts: +.RS +\(bu /usr/lib/nvidia/pre\-install +.br +\(bu /usr/lib/nvidia/pre\-uninstall +.br +\(bu /usr/lib/nvidia/post\-uninstall +.br +\(bu /usr/lib/nvidia/post\-install +.br +\(bu /usr/lib/nvidia/failed\-install +.RE +Note that if installation of a new driver requires uninstallation of a previously installed driver, the +.B pre\- +and +.B post\-uninstall +scripts will be called +.I after +the +.B pre\-install +script. +If the install fails, the installer will execute +.B /usr/lib/nvidia/failed\-install +instead of +.BR /usr/lib/nvidia/post\-install . +These scripts should not require user interaction. +.PP +Use the +.B \-\-no\-distro\-scripts +option to disable execution of these scripts. .SH EXAMPLES .TP .B nvidia\-installer \-\-latest @@ -112,4 +149,4 @@ NVIDIA Corporation .BR nvidia-settings (1), .I /usr/share/doc/NVIDIA_GLX-1.0/README.txt .SH COPYRIGHT -Copyright \(co 2005 NVIDIA Corporation. +Copyright \(co 2005-2009 NVIDIA Corporation. diff --git a/nvidia-installer.c b/nvidia-installer.c index 943f02d..e95e249 100644 --- a/nvidia-installer.c +++ b/nvidia-installer.c @@ -32,6 +32,7 @@ #include <limits.h> #include <string.h> #include <ctype.h> +#include <libgen.h> #include <sys/types.h> #include <sys/stat.h> @@ -201,6 +202,7 @@ Options *parse_commandline(int argc, char *argv[]) { Options *op; int c, option_index = 0; + char *program_name; const int num_opts = sizeof(__options) / sizeof(__options[0]) - 1; /* Allocate space for the long options. */ @@ -247,6 +249,7 @@ Options *parse_commandline(int argc, char *argv[]) op->selinux_option = SELINUX_DEFAULT; op->sigwinch_workaround = TRUE; + op->run_distro_scripts = TRUE; while (1) { @@ -428,6 +431,9 @@ Options *parse_commandline(int argc, char *argv[]) case NO_CC_VERSION_CHECK_OPTION: op->ignore_cc_version_check = TRUE; break; + case NO_DISTRO_SCRIPTS_OPTION: + op->run_distro_scripts = FALSE; + break; default: fmterr(""); @@ -479,6 +485,15 @@ Options *parse_commandline(int argc, char *argv[]) op->installer_prefix = op->utility_prefix; } + /* + * if the installer was invoked as "nvidia-uninstall", perform an + * uninstallation. + */ + program_name = strdup(argv[0]); + if (strcmp(basename(program_name), "nvidia-uninstall") == 0) + op->uninstall = TRUE; + free(program_name); + return (op); } /* parse_commandline() */ diff --git a/nvidia-installer.h b/nvidia-installer.h index e719b8a..20544ba 100644 --- a/nvidia-installer.h +++ b/nvidia-installer.h @@ -29,6 +29,7 @@ #define __NVIDIA_INSTALLER_H__ #include <sys/types.h> +#include <stdint.h> /* @@ -92,8 +93,8 @@ typedef enum { } Distribution; -typedef unsigned int uint32; -typedef unsigned char uint8; +typedef uint32_t uint32; +typedef uint8_t uint8; @@ -136,6 +137,7 @@ typedef struct __options { int selinux_enabled; int sigwinch_workaround; int no_x_check; + int run_distro_scripts; char *opengl_prefix; char *opengl_libdir; @@ -223,8 +225,8 @@ typedef struct __package_entry { * field is assigned by the set_destinations() * function. */ - - unsigned int flags; + + uint64_t flags; mode_t mode; ino_t inode; @@ -289,38 +291,39 @@ typedef struct { /* file types */ -#define FILE_TYPE_MASK 0x00ffffff - -#define FILE_TYPE_KERNEL_MODULE_SRC 0x00000001 -#define FILE_TYPE_KERNEL_MODULE_CMD 0x00000002 -#define FILE_TYPE_OPENGL_HEADER 0x00000004 -#define FILE_TYPE_OPENGL_LIB 0x00000008 -#define FILE_TYPE_XLIB_STATIC_LIB 0x00000010 -#define FILE_TYPE_XLIB_SHARED_LIB 0x00000020 -#define FILE_TYPE_DOCUMENTATION 0x00000040 -#define FILE_TYPE_OPENGL_SYMLINK 0x00000080 -#define FILE_TYPE_XLIB_SYMLINK 0x00000100 -#define FILE_TYPE_KERNEL_MODULE 0x00000200 -#define FILE_TYPE_INSTALLER_BINARY 0x00000400 -#define FILE_TYPE_UTILITY_BINARY 0x00000800 -#define FILE_TYPE_LIBGL_LA 0x00001000 -#define FILE_TYPE_TLS_LIB 0x00002000 -#define FILE_TYPE_TLS_SYMLINK 0x00004000 -#define FILE_TYPE_UTILITY_LIB 0x00008000 -#define FILE_TYPE_DOT_DESKTOP 0x00010000 -#define FILE_TYPE_UTILITY_SYMLINK 0x00020000 -#define FILE_TYPE_XMODULE_SHARED_LIB 0x00040000 -#define FILE_TYPE_XMODULE_SYMLINK 0x00080000 -#define FILE_TYPE_MANPAGE 0x00100000 +#define FILE_TYPE_MASK 0x00000000ffffffffULL + +#define FILE_TYPE_KERNEL_MODULE_SRC 0x0000000000000001ULL +#define FILE_TYPE_KERNEL_MODULE_CMD 0x0000000000000002ULL +#define FILE_TYPE_OPENGL_HEADER 0x0000000000000004ULL +#define FILE_TYPE_OPENGL_LIB 0x0000000000000008ULL +#define FILE_TYPE_XLIB_STATIC_LIB 0x0000000000000010ULL +#define FILE_TYPE_XLIB_SHARED_LIB 0x0000000000000020ULL +#define FILE_TYPE_DOCUMENTATION 0x0000000000000040ULL +#define FILE_TYPE_OPENGL_SYMLINK 0x0000000000000080ULL +#define FILE_TYPE_XLIB_SYMLINK 0x0000000000000100ULL +#define FILE_TYPE_KERNEL_MODULE 0x0000000000000200ULL +#define FILE_TYPE_INSTALLER_BINARY 0x0000000000000400ULL +#define FILE_TYPE_UTILITY_BINARY 0x0000000000000800ULL +#define FILE_TYPE_LIBGL_LA 0x0000000000001000ULL +#define FILE_TYPE_TLS_LIB 0x0000000000002000ULL +#define FILE_TYPE_TLS_SYMLINK 0x0000000000004000ULL +#define FILE_TYPE_UTILITY_LIB 0x0000000000008000ULL +#define FILE_TYPE_DOT_DESKTOP 0x0000000000010000ULL +#define FILE_TYPE_UTILITY_LIB_SYMLINK 0x0000000000020000ULL +#define FILE_TYPE_XMODULE_SHARED_LIB 0x0000000000040000ULL +#define FILE_TYPE_XMODULE_SYMLINK 0x0000000000080000ULL +#define FILE_TYPE_MANPAGE 0x0000000000100000ULL +#define FILE_TYPE_UTILITY_BIN_SYMLINK 0x0000000010000000ULL /* file class: this is used to distinguish OpenGL libraries */ -#define FILE_CLASS_MASK 0xff000000 +#define FILE_CLASS_MASK 0xf000000000000000ULL -#define FILE_CLASS_NEW_TLS 0x01000000 -#define FILE_CLASS_CLASSIC_TLS 0x02000000 -#define FILE_CLASS_NATIVE 0x04000000 -#define FILE_CLASS_COMPAT32 0x08000000 +#define FILE_CLASS_NEW_TLS 0x1000000000000000ULL +#define FILE_CLASS_CLASSIC_TLS 0x2000000000000000ULL +#define FILE_CLASS_NATIVE 0x4000000000000000ULL +#define FILE_CLASS_COMPAT32 0x8000000000000000ULL #define FILE_TYPE_XLIB_LIB (FILE_TYPE_XLIB_STATIC_LIB | \ FILE_TYPE_XLIB_SHARED_LIB) @@ -363,7 +366,8 @@ typedef struct { FILE_TYPE_XLIB_SYMLINK | \ FILE_TYPE_TLS_SYMLINK | \ FILE_TYPE_XMODULE_SYMLINK | \ - FILE_TYPE_UTILITY_SYMLINK) + FILE_TYPE_UTILITY_LIB_SYMLINK| \ + FILE_TYPE_UTILITY_BIN_SYMLINK) #define FILE_TYPE_RTLD_CHECKED (FILE_TYPE_OPENGL_LIB | \ FILE_TYPE_TLS_LIB) @@ -481,7 +485,7 @@ void add_package_entry(Package *p, char *name, char *target, char *dst, - unsigned int flags, + uint64_t flags, mode_t mode); /* XXX */ diff --git a/option_table.h b/option_table.h index 9fc968b..cdbe43c 100644 --- a/option_table.h +++ b/option_table.h @@ -52,7 +52,8 @@ enum { X_LIBRARY_PATH_OPTION, NO_KERNEL_MODULE_OPTION, NO_X_CHECK_OPTION, - NO_CC_VERSION_CHECK_OPTION + NO_CC_VERSION_CHECK_OPTION, + NO_DISTRO_SCRIPTS_OPTION }; static const NVOption __options[] = { @@ -419,6 +420,11 @@ static const NVOption __options[] = { "installation in case of failures. Use this option to override this " "check." }, + { "no-distro-scripts", NO_DISTRO_SCRIPTS_OPTION, 0, + "Normally, nvidia-installer will run scripts from /usr/lib/nvidia before " + "and after installing or uninstalling the driver. Use this option to " + "disable execution of these scripts." }, + /* Orphaned options: These options were in the long_options table in * nvidia-installer.c but not in the help. */ { "debug", 'd', 0, NULL }, |