commit 549f7bbef33efff5b68b1a7e4ad81a3c13f90141b24d246320f595b3ef8a5e27 Author: Adrian Schröter Date: Tue Oct 29 09:36:13 2024 +0100 Sync from SUSE:SLFO:Main nvidia-persistenced revision c45a7d6ad784727fa10d06a1ed3fdb8c diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..9b03811 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,23 @@ +## Default LFS +*.7z filter=lfs diff=lfs merge=lfs -text +*.bsp filter=lfs diff=lfs merge=lfs -text +*.bz2 filter=lfs diff=lfs merge=lfs -text +*.gem filter=lfs diff=lfs merge=lfs -text +*.gz filter=lfs diff=lfs merge=lfs -text +*.jar filter=lfs diff=lfs merge=lfs -text +*.lz filter=lfs diff=lfs merge=lfs -text +*.lzma filter=lfs diff=lfs merge=lfs -text +*.obscpio filter=lfs diff=lfs merge=lfs -text +*.oxt filter=lfs diff=lfs merge=lfs -text +*.pdf filter=lfs diff=lfs merge=lfs -text +*.png filter=lfs diff=lfs merge=lfs -text +*.rpm filter=lfs diff=lfs merge=lfs -text +*.tbz filter=lfs diff=lfs merge=lfs -text +*.tbz2 filter=lfs diff=lfs merge=lfs -text +*.tgz filter=lfs diff=lfs merge=lfs -text +*.ttf filter=lfs diff=lfs merge=lfs -text +*.txz filter=lfs diff=lfs merge=lfs -text +*.whl filter=lfs diff=lfs merge=lfs -text +*.xz filter=lfs diff=lfs merge=lfs -text +*.zip filter=lfs diff=lfs merge=lfs -text +*.zst filter=lfs diff=lfs merge=lfs -text diff --git a/nvidia-persistenced-560.35.03.tar.bz2 b/nvidia-persistenced-560.35.03.tar.bz2 new file mode 100644 index 0000000..ab1e6e7 --- /dev/null +++ b/nvidia-persistenced-560.35.03.tar.bz2 @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:f5c7afbb690b97d15058b2c5df422fe3594b41e159fb98745cbd1689d77b459b +size 49873 diff --git a/nvidia-persistenced.changes b/nvidia-persistenced.changes new file mode 100644 index 0000000..2080e05 --- /dev/null +++ b/nvidia-persistenced.changes @@ -0,0 +1,16 @@ +------------------------------------------------------------------- +Thu Oct 24 13:53:14 UTC 2024 - Stefan Dirsch + +- corrected license tag (GPL-2.0-or-later -> MIT) + +------------------------------------------------------------------- +Mon Sep 23 08:33:17 UTC 2024 - Stefan Dirsch + +- don't require libnvidia-cfg.so.1()(64bit), because this is part + of NVIDIA's proprietary userspace libs, which we cannot ship + +------------------------------------------------------------------- +Fri Sep 20 10:58:39 UTC 2024 - Stefan Dirsch + +- created package + --> https://github.com/openSUSE/nvidia-driver-G06/issues/16 diff --git a/nvidia-persistenced.service b/nvidia-persistenced.service new file mode 100644 index 0000000..941c596 --- /dev/null +++ b/nvidia-persistenced.service @@ -0,0 +1,14 @@ +[Unit] +Description=NVIDIA Persistence Daemon +After=syslog.target + +[Service] +Type=forking +PIDFile=/var/run/nvidia-persistenced/nvidia-persistenced.pid +Restart=always +ExecStart=/usr/bin/nvidia-persistenced --verbose +ExecStopPost=/bin/rm -rf /var/run/nvidia-persistenced/* +TimeoutSec=300 + +[Install] +WantedBy=multi-user.target diff --git a/nvidia-persistenced.spec b/nvidia-persistenced.spec new file mode 100644 index 0000000..5850b97 --- /dev/null +++ b/nvidia-persistenced.spec @@ -0,0 +1,92 @@ +# +# spec file for package nvidia-persistenced +# +# Copyright (c) 2024 SUSE LLC +# +# All modifications and additions to the file contributed by third parties +# remain the property of their copyright owners, unless otherwise agreed +# upon. The license for this file, and modifications and additions to the +# file, is the same license as for the pristine package itself (unless the +# license for the pristine package is not an Open Source License, in which +# case the license is the MIT License). An "Open Source License" is a +# license that conforms to the Open Source Definition (Version 1.9) +# published by the Open Source Initiative. + +# Please submit bugfixes or comments via https://bugs.opensuse.org/ +# + + +Name: nvidia-persistenced +Version: 560.35.03 +Release: 0 +Summary: A daemon to maintain persistent software state in the NVIDIA driver +License: MIT +URL: http://www.nvidia.com/object/unix.html +ExclusiveArch: x86_64 aarch64 + +Source0: https://download.nvidia.com/XFree86/%{name}/%{name}-%{version}.tar.bz2 +Source1: %{name}.service + +BuildRequires: gcc +BuildRequires: libtirpc-devel +BuildRequires: m4 +BuildRequires: systemd-rpm-macros + +Requires(post): systemd +Requires(preun):systemd +Requires(postun):systemd +### we cannot require it since it's part of NVIDIA's proprietary userspace libs, +### which we cannot ship +#Requires: libnvidia-cfg.so.1()(64bit) + +%description +The %{name} utility is used to enable persistent software state in the NVIDIA +driver. When persistence mode is enabled, the daemon prevents the driver from +releasing device state when the device is not in use. This can improve the +startup time of new clients in this scenario. + +%prep +%autosetup +# Remove additional CFLAGS added when enabling DEBUG +sed -i -e '/+= -O0 -g/d' utils.mk + +%build +export CFLAGS="%{optflags} -I%{_includedir}/tirpc" +%make_build \ + DEBUG=1 \ + LIBS="-ldl -ltirpc" \ + NV_VERBOSE=1 \ + PREFIX=%{_prefix} \ + STRIP_CMD=true + +%install +%make_install \ + NV_VERBOSE=1 \ + PREFIX=%{_prefix} \ + STRIP_CMD=true + +mkdir -p %{buildroot}%{_sharedstatedir}/%{name} + +# Systemd unit files +install -p -m 644 -D %{SOURCE1} %{buildroot}%{_unitdir}/%{name}.service + +%pre +%service_add_pre %{name}.service + +%post +%service_add_post %{name}.service + +%preun +%service_del_preun %{name}.service + +%postun +%service_del_postun %{name}.service + +%files +%license COPYING +%{_bindir}/%{name} +%attr(644, root, root) %{_mandir}/man1/%{name}.1.* +%{_sharedstatedir}/%{name} +%{_unitdir}/%{name}.service + +%changelog