Bug#928497: nvidia-persistenced: Error in nvidia-persistenced source (postinst)

Marcelo "Elppans" Klumpp elppansmk at gmail.com
Mon May 6 07:01:22 BST 2019


Package: nvidia-persistenced
Version: 418.56
Severity: important

Dear Maintainer,

*** Reporter, please consider answering these questions, where appropriate ***

   * What led up to the situation?
   * What exactly did you do (or not do) that was effective (or
     ineffective)?
   * What was the outcome of this action?
   * What outcome did you expect instead?

*** End of the template - remove these template lines ***


-- System Information:
Debian Release: 9.9
  APT prefers stable-updates
  APT policy: (500, 'stable-updates'), (500, 'stable')
Architecture: amd64 (x86_64)

Kernel: Linux 4.9.0-9-amd64 (SMP w/1 CPU core)
Locale: LANG=pt_BR.UTF-8, LC_CTYPE=pt_BR.UTF-8 (charmap=UTF-8), LANGUAGE=pt_BR:pt:en (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)

Versions of packages nvidia-persistenced depends on:
ii  libc6                                2.24-11+deb9u4
pn  libnvidia-cfg1 | libnvidia-cfg1-any  <none>

nvidia-persistenced recommends no packages.

nvidia-persistenced suggests no packages.


Hello...
There is an ambiguous configuration error in the file "debian/nvidia-persistenced.postinst":

This code:

#!/bin/sh
set -e

case "$1" in
  'configure')
     if ! getent passwd nvpd >/dev/null; then
       # Create ad-hoc system user/group
       adduser --system --group \
               --home /var/run/nvpd/ \
               --gecos 'nVidia Persistence daemon' \
               --no-create-home \
               nvpd
     fi
     ;;
esac

#DEBHELPER#

It means that you should create a "home" folder in /var/run/nvpd/, but at the end of the code it says DO NOT CREATE the folder.

If you want to create a folder, how can you NOT CREATE the folder you are creating?

Because of this, when installing the package, the following error occurs and the service does not start:

Alert: The home directory /var/run/nvpd/ you specified can not be accessed: No such file or directory

Alert: The home directory /var/run/nvpd/ you specified can not be accessed: No such file or directory
Adding system user 'nvpd' (UID 118) ...
Adding new group 'nvpd' (GID 124) ...
Adding new user 'nvpd' (UID 118) with group 'nvpd' ...
Not creating personal directory '/var/run/nvpd/'.
Created symlink /etc/systemd/system/multi-user.target.wants/nvidia-persistenced.service → /lib/systemd/system/nvidia-persistenced.service.
Job for nvidia-persistenced.service failed because the control process exited with error code.
See "systemctl status nvidia-persistenced.service" and "journalctl -xe" for details.

To correct, you must modify the code to:

#!/bin/sh
set -e

if [ "$1" = "configure" ]; then
     if ! getent passwd nvpd >/dev/null; then
       # Create ad-hoc system user/group
       adduser --system --group \
               --home /var/run/nvpd/ \
               --gecos 'NVIDIA Persistence Daemon' \
               --no-create-home \
               nvpd
     fi
fi

#DEBHELPER#


More information about the pkg-nvidia-devel mailing list