SHA256
1
0
forked from pool/systemd

Accepting request 211088 from Base:System

- Update insserv-generator.patch: fix crash in insserv generator
  (bnc#854314).
- Update apply-ACL-for-nvidia-device-nodes.patch with latest fixes
  for Nvidia cards (bnc#808319). (forwarded request 211000 from fcrozat)

OBS-URL: https://build.opensuse.org/request/show/211088
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/systemd?expand=0&rev=170
This commit is contained in:
Stephan Kulow 2013-12-19 11:51:56 +00:00 committed by Git OBS Bridge
parent 8e02a34e98
commit 4ccf744c9a
5 changed files with 135 additions and 29 deletions

View File

@ -7,34 +7,29 @@ set ACL on nvidia devices (bnc#808319).
src/login/logind-acl.c | 3 +++ src/login/logind-acl.c | 3 +++
1 file changed, 3 insertions(+) 1 file changed, 3 insertions(+)
--- systemd-206.orig/src/login/logind-acl.c
+++ systemd-206/src/login/logind-acl.c
@@ -24,6 +24,7 @@
#include <acl/libacl.h>
#include <errno.h>
#include <string.h>
+#include <strv.h>
#include "logind-acl.h" Index: systemd-208/src/login/logind-acl.c
#include "util.h" ===================================================================
@@ -287,6 +288,22 @@ int devnode_acl_all(struct udev *udev, --- systemd-208.orig/src/login/logind-acl.c
+++ systemd-208/src/login/logind-acl.c
@@ -287,6 +287,22 @@ int devnode_acl_all(struct udev *udev,
r = devnode_acl(n, flush, del, old_uid, add, new_uid); r = devnode_acl(n, flush, del, old_uid, add, new_uid);
} }
+ /* only search for nvidia* if /dev/nvidiactl exists */ + /* only apply ACL on nvidia* if /dev/nvidiactl exists */
+ if (!devnode_acl("/dev/nvidiactl", flush, del, old_uid, add, new_uid)) { + if (devnode_acl("/dev/nvidiactl", flush, del, old_uid, add, new_uid) >= 0) {
+ char** directory; + int i;
+ char **f, *resolved; + char *devname;
+ +
+ if (get_files_in_directory ("/dev", &directory)) { + for (i = 0; i <= 256 ; i++) {
+ STRV_FOREACH(f,directory) + if (asprintf(&devname, "/dev/nvidia%d", i) < 0)
+ if (startswith(*f,"nvidia")) { + break;
+ resolved = strjoin("/dev/", *f, NULL); + if (devnode_acl(devname, flush, del, old_uid, add, new_uid) < 0) {
+ devnode_acl(resolved, flush, del, old_uid, add, new_uid); + free(devname);
+ free(resolved); + break;
+ } + }
+ free(devname);
+ } + }
+ strv_free(directory);
+ } + }
+ +
finish: finish:

View File

@ -13,9 +13,11 @@ systemd unit drop-in files to add dependencies
create mode 100644 src/insserv-generator/Makefile create mode 100644 src/insserv-generator/Makefile
create mode 100644 src/insserv-generator/insserv-generator.c create mode 100644 src/insserv-generator/insserv-generator.c
--- systemd-206_git201308300826.orig/Makefile.am Index: systemd-208/Makefile.am
+++ systemd-206_git201308300826/Makefile.am ===================================================================
@@ -321,6 +321,7 @@ rootlibexec_PROGRAMS = \ --- systemd-208.orig/Makefile.am
+++ systemd-208/Makefile.am
@@ -322,6 +322,7 @@ rootlibexec_PROGRAMS = \
systemd-sleep systemd-sleep
systemgenerator_PROGRAMS = \ systemgenerator_PROGRAMS = \
@ -23,7 +25,7 @@ systemd unit drop-in files to add dependencies
systemd-getty-generator \ systemd-getty-generator \
systemd-fstab-generator \ systemd-fstab-generator \
systemd-system-update-generator systemd-system-update-generator
@@ -1655,6 +1656,14 @@ systemd_delta_LDADD = \ @@ -1682,6 +1683,14 @@ systemd_delta_LDADD = \
libsystemd-shared.la libsystemd-shared.la
# ------------------------------------------------------------------------------ # ------------------------------------------------------------------------------
@ -38,8 +40,10 @@ systemd unit drop-in files to add dependencies
systemd_getty_generator_SOURCES = \ systemd_getty_generator_SOURCES = \
src/getty-generator/getty-generator.c src/getty-generator/getty-generator.c
Index: systemd-208/src/insserv-generator/Makefile
===================================================================
--- /dev/null --- /dev/null
+++ systemd-206_git201308300826/src/insserv-generator/Makefile +++ systemd-208/src/insserv-generator/Makefile
@@ -0,0 +1,28 @@ @@ -0,0 +1,28 @@
+# This file is part of systemd. +# This file is part of systemd.
+# +#
@ -69,9 +73,11 @@ systemd unit drop-in files to add dependencies
+ $(MAKE) -C .. clean + $(MAKE) -C .. clean
+ +
+.PHONY: all clean +.PHONY: all clean
Index: systemd-208/src/insserv-generator/insserv-generator.c
===================================================================
--- /dev/null --- /dev/null
+++ systemd-206_git201308300826/src/insserv-generator/insserv-generator.c +++ systemd-208/src/insserv-generator/insserv-generator.c
@@ -0,0 +1,309 @@ @@ -0,0 +1,312 @@
+/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/ +/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
+ +
+/*** +/***
@ -119,6 +125,9 @@ systemd unit drop-in files to add dependencies
+ if (endswith(name, ".sh")) + if (endswith(name, ".sh"))
+ /* Drop .sh suffix */ + /* Drop .sh suffix */
+ strcpy(stpcpy(r, name) - 3, ".service"); + strcpy(stpcpy(r, name) - 3, ".service");
+ if (startswith(name, "boot."))
+ /* Drop SuSE-style boot. prefix */
+ strcpy(stpcpy(r, name + 5), ".service");
+ else + else
+ /* Normal init script name */ + /* Normal init script name */
+ strcpy(stpcpy(r, name), ".service"); + strcpy(stpcpy(r, name), ".service");
@ -227,7 +236,7 @@ systemd unit drop-in files to add dependencies
+ /* we ignore <interactive>, not used, equivalent to X-Interactive */ + /* we ignore <interactive>, not used, equivalent to X-Interactive */
+ if (parsed && !startswith_no_case (parsed[0], "<interactive>")) { + if (parsed && !startswith_no_case (parsed[0], "<interactive>")) {
+ _cleanup_free_ char *facility = NULL; + _cleanup_free_ char *facility = NULL;
+ if (sysv_translate_facility(parsed[0], NULL, &facility) < 0) + if (sysv_translate_facility(parsed[0], NULL, &facility) < 0 || !facility)
+ continue; + continue;
+ if (streq(facility, SPECIAL_REMOTE_FS_TARGET)) { + if (streq(facility, SPECIAL_REMOTE_FS_TARGET)) {
+ _cleanup_free_ char *unit = NULL; + _cleanup_free_ char *unit = NULL;

View File

@ -1,3 +1,72 @@
-------------------------------------------------------------------
Mon Dec 16 09:43:29 UTC 2013 - fcrozat@suse.com
- Update insserv-generator.patch: fix crash in insserv generator
(bnc#854314).
- Update apply-ACL-for-nvidia-device-nodes.patch with latest fixes
for Nvidia cards (bnc#808319).
-------------------------------------------------------------------
Fri Dec 6 13:30:19 UTC 2013 - werner@suse.de
- Add patch
1014-journald-with-journaling-FS.patch
which now uses the file system ioctls for switching off atime,
compression, and copy-on-write of the journal directory of the
the systemd-journald (bnc#838475)
- Let us build require the package config for libpcre (bnc#853293)
-------------------------------------------------------------------
Thu Nov 28 10:25:58 UTC 2013 - lbsousajr@gmail.com
- Add U_logind_revert_lazy_session_activation_on_non_vt_seats.patch
* See: http://cgit.freedesktop.org/systemd/systemd/commit/?id=3fdb2494c1e24c0a020f5b54022d2c751fd26f50
-------------------------------------------------------------------
Tue Nov 26 15:12:58 UTC 2013 - werner@suse.de
- Add patch
1012-pam_systemd_do_override_XDG_RUNTIME_DIR_of_the_original_user.patch
to avoid (xdg-)su to set XDG_RUNTIME_DIR to the original user and
avoid that e.g. pulseaudio will create /run/user/<pid>/pulse owned
by root (bnc#852015)
-------------------------------------------------------------------
Thu Nov 21 12:27:11 UTC 2013 - werner@suse.de
- Add patch
1011-check-4-valid-kmsg-device.patch
to avoid a busy systemd-journald (bnc#851393)
-------------------------------------------------------------------
Wed Nov 6 09:42:05 UTC 2013 - werner@suse.de
- Add patch
1010-do-not-install-sulogin-unit-with-poweroff.patch
that is do not install console-shell.service in any system target
as this will cause automatic poweroff at boot (bnc#849071)
-------------------------------------------------------------------
Mon Nov 4 15:23:02 UTC 2013 - werner@suse.de
- Add upstream patch
0001-analyze-set-text-on-side-with-most-space.patch
to place the text on the side with most space
-------------------------------------------------------------------
Fri Oct 25 12:12:48 UTC 2013 - werner@suse.de
- Add upstream patch
0001-analyze-set-white-background.patch
to make SVG output of systemd analyze readable
-------------------------------------------------------------------
Mon Oct 21 09:27:36 UTC 2013 - werner@suse.de
- Add patch
1009-make-xsltproc-use-correct-ROFF-links.patch
to have valid ROFF links in manual pages working again (bnc#842844)
------------------------------------------------------------------- -------------------------------------------------------------------
Tue Oct 15 13:50:52 CEST 2013 - fcrozat@suse.com Tue Oct 15 13:50:52 CEST 2013 - fcrozat@suse.com

View File

@ -73,6 +73,7 @@ BuildRequires: pkgconfig(liblzma)
BuildRequires: pkgconfig(libmicrohttpd) BuildRequires: pkgconfig(libmicrohttpd)
%endif %endif
BuildRequires: pkgconfig(libpci) >= 3 BuildRequires: pkgconfig(libpci) >= 3
BuildRequires: pkgconfig(libpcre)
%if ! 0%{?bootstrap} %if ! 0%{?bootstrap}
BuildRequires: pkgconfig(libqrencode) BuildRequires: pkgconfig(libqrencode)
%endif %endif
@ -239,6 +240,10 @@ Patch76: 0001-drop-ins-check-return-value.patch
Patch77: 0001-shared-util-Fix-glob_extend-argument.patch Patch77: 0001-shared-util-Fix-glob_extend-argument.patch
# PATCH-FIX-UPSTREAM 0001-Fix-bad-assert-in-show_pid_array.patch fcrozat@suse.com -- Fix bad assert in show_pid_array # PATCH-FIX-UPSTREAM 0001-Fix-bad-assert-in-show_pid_array.patch fcrozat@suse.com -- Fix bad assert in show_pid_array
Patch78: 0001-Fix-bad-assert-in-show_pid_array.patch Patch78: 0001-Fix-bad-assert-in-show_pid_array.patch
# PATCH-FIX-UPSTREAM 0001-analyze-set-white-background.patch werner@suse.com -- Make background of systemd-analyze SVG white
Patch79: 0001-analyze-set-white-background.patch
# PATCH-FIX-UPSTREAM 0001-analyze-set-text-on-side-with-most-space.patch werner@suse.com -- Place the text on the side with most space
Patch80: 0001-analyze-set-text-on-side-with-most-space.patch
# udev patches # udev patches
# PATCH-FIX-OPENSUSE 1001-re-enable-by_path-links-for-ata-devices.patch # PATCH-FIX-OPENSUSE 1001-re-enable-by_path-links-for-ata-devices.patch
@ -255,6 +260,18 @@ Patch1006: 1006-udev-always-rename-network.patch
Patch1007: 1007-physical-hotplug-cpu-and-memory.patch Patch1007: 1007-physical-hotplug-cpu-and-memory.patch
# PATCH-FIX-OPENSUSE 1008-add-msft-compability-rules.patch # PATCH-FIX-OPENSUSE 1008-add-msft-compability-rules.patch
Patch1008: 1008-add-msft-compability-rules.patch Patch1008: 1008-add-msft-compability-rules.patch
# PATCH-FIX-OPENSUSE 1009-make-xsltproc-use-correct-ROFF-links.patch -- Make ROFF links working again in manual pages (bnc#842844)
Patch1009: 1009-make-xsltproc-use-correct-ROFF-links.patch
# PATCH-FIX-OPENSUSE 1010-do-not-install-sulogin-unit-with-poweroff.patch -- Avoid installing console-shell.service (bnc#849071)
Patch1010: 1010-do-not-install-sulogin-unit-with-poweroff.patch
# PATCH-FIX-OPENSUSE 1011-check-4-valid-kmsg-device.patch -- Avoid busy systemd-journald (bnc#851393)
Patch1011: 1011-check-4-valid-kmsg-device.patch
# PATCH-FIX-UPSTREAM 1012-pam_systemd_do_override_XDG_RUNTIME_DIR_of_the_original_user.patch
Patch1012: 1012-pam_systemd_do_override_XDG_RUNTIME_DIR_of_the_original_user.patch
# PATCH-FIX-UPSTREAM U_logind_revert_lazy_session_activation_on_non_vt_seats.patch
Patch1013: U_logind_revert_lazy_session_activation_on_non_vt_seats.patch
# PATCH-FIX-OPENSUSE 1014-journald-with-journaling-FS.patch
Patch1014: 1014-journald-with-journaling-FS.patch
%description %description
Systemd is a system and service manager, compatible with SysV and LSB Systemd is a system and service manager, compatible with SysV and LSB
@ -515,6 +532,8 @@ cp %{SOURCE7} m4/
%patch76 -p1 %patch76 -p1
%patch77 -p1 %patch77 -p1
%patch78 -p1 %patch78 -p1
%patch79 -p1
%patch80 -p1
# udev patches # udev patches
%patch1001 -p1 %patch1001 -p1
@ -527,6 +546,12 @@ cp %{SOURCE7} m4/
%patch1007 -p1 %patch1007 -p1
%patch1008 -p1 %patch1008 -p1
%endif %endif
%patch1009 -p1
%patch1010 -p1
%patch1011 -p1
%patch1012 -p1
%patch1013 -p1
%patch1014 -p1
# ensure generate files are removed # ensure generate files are removed
rm -f units/emergency.service rm -f units/emergency.service

View File

@ -1,3 +1,11 @@
-------------------------------------------------------------------
Mon Dec 16 09:43:29 UTC 2013 - fcrozat@suse.com
- Update insserv-generator.patch: fix crash in insserv generator
(bnc#854314).
- Update apply-ACL-for-nvidia-device-nodes.patch with latest fixes
for Nvidia cards (bnc#808319).
------------------------------------------------------------------- -------------------------------------------------------------------
Fri Dec 6 13:30:19 UTC 2013 - werner@suse.de Fri Dec 6 13:30:19 UTC 2013 - werner@suse.de