From d34163573bab1abc91a09edf2d9d976fa665707636508619d8b83b0899f98027 Mon Sep 17 00:00:00 2001 From: "Dr. Werner Fink" Date: Thu, 19 Dec 2013 12:51:00 +0000 Subject: [PATCH 1/2] Accepting request 211162 from home:lbssousa:branches:Base:System - Add build-sys-make-multi-seat-x-optional.patch * See: http://cgit.freedesktop.org/systemd/systemd/commit/?id=bd441fa27a22b7c6e11d9330560e0622fb69f297 * Now systemd-multi-seat-x build can be disabled with configure option --disable-multi-seat-x. It should be done when xorg-x11-server no longer needs it (work in progress). OBS-URL: https://build.opensuse.org/request/show/211162 OBS-URL: https://build.opensuse.org/package/show/Base:System/systemd?expand=0&rev=476 --- build-sys-make-multi-seat-x-optional.patch | 60 ++++++++++++++++++++++ systemd.changes | 9 ++++ systemd.spec | 3 ++ 3 files changed, 72 insertions(+) create mode 100644 build-sys-make-multi-seat-x-optional.patch diff --git a/build-sys-make-multi-seat-x-optional.patch b/build-sys-make-multi-seat-x-optional.patch new file mode 100644 index 00000000..c86042c6 --- /dev/null +++ b/build-sys-make-multi-seat-x-optional.patch @@ -0,0 +1,60 @@ +From bd441fa27a22b7c6e11d9330560e0622fb69f297 Mon Sep 17 00:00:00 2001 +From: Zbigniew Jędrzejewski-Szmek +Date: Thu, 28 Nov 2013 17:07:29 +0000 +Subject: build-sys: make multi-seat-x optional + +At some point it should become disabled by default. + +http://lists.freedesktop.org/archives/systemd-devel/2013-November/014869.html +--- +diff --git a/Makefile.am b/Makefile.am +index 90874df..3598edd 100644 +--- a/Makefile.am ++++ b/Makefile.am +@@ -4141,6 +4141,8 @@ MULTI_USER_TARGET_WANTS += \ + SYSTEM_UNIT_ALIASES += \ + systemd-logind.service dbus-org.freedesktop.login1.service + ++if ENABLE_MULTI_SEAT_X ++ + systemd_multi_seat_x_SOURCES = \ + src/login/multi-seat-x.c + +@@ -4151,6 +4153,8 @@ systemd_multi_seat_x_LDADD = \ + rootlibexec_PROGRAMS += \ + systemd-multi-seat-x + ++endif ++ + dist_udevrules_DATA += \ + src/login/70-uaccess.rules \ + src/login/70-power-switch.rules +diff --git a/configure.ac b/configure.ac +index f1b00c5..ab24266 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -794,6 +794,14 @@ fi + AM_CONDITIONAL(ENABLE_EFI, [test "x$have_efi" = "xyes"]) + + # ------------------------------------------------------------------------------ ++have_multi_seat_x=no ++AC_ARG_ENABLE(multi_seat_x, AS_HELP_STRING([--disable-multi-seat-x], [do not build multi-seat-x])) ++if test "x$enable_multi_seat_x" != "xno"; then ++ have_multi_seat_x=yes ++fi ++AM_CONDITIONAL(ENABLE_MULTI_SEAT_X, [test "$have_multi_seat_x" = "yes"]) ++ ++# ------------------------------------------------------------------------------ + AC_ARG_WITH(rc-local-script-path-start, + AS_HELP_STRING([--with-rc-local-script-path-start=PATH], + [Path to /etc/rc.local]), +@@ -1077,6 +1085,7 @@ AC_MSG_RESULT([ + nss-myhostname: ${have_myhostname} + gudev: ${enable_gudev} + gintrospection: ${enable_introspection} ++ multi-seat-x: ${have_multi_seat_x} + Python: ${have_python} + Python Headers: ${have_python_devel} + man pages: ${have_manpages} +-- +cgit v0.9.0.2-2-gbebe diff --git a/systemd.changes b/systemd.changes index ba215dd6..4db1dc06 100644 --- a/systemd.changes +++ b/systemd.changes @@ -1,3 +1,12 @@ +------------------------------------------------------------------- +Mon Dec 16 11:08:33 UTC 2013 - lbsousajr@gmail.com + +- Add build-sys-make-multi-seat-x-optional.patch + * See: http://cgit.freedesktop.org/systemd/systemd/commit/?id=bd441fa27a22b7c6e11d9330560e0622fb69f297 + * Now systemd-multi-seat-x build can be disabled with configure option + --disable-multi-seat-x. It should be done when xorg-x11-server + no longer needs it (work in progress). + ------------------------------------------------------------------- Mon Dec 16 09:43:29 UTC 2013 - fcrozat@suse.com diff --git a/systemd.spec b/systemd.spec index daa68f57..b34f9c2a 100644 --- a/systemd.spec +++ b/systemd.spec @@ -267,6 +267,8 @@ Patch1012: 1012-pam_systemd_do_override_XDG_RUNTIME_DIR_of_the_original_use 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 +# PATCH-FIX-UPSTREAM build-sys-make-multi-seat-x-optional.patch +Patch1015: build-sys-make-multi-seat-x-optional.patch %description Systemd is a system and service manager, compatible with SysV and LSB @@ -547,6 +549,7 @@ cp %{SOURCE7} m4/ %patch1012 -p1 %patch1013 -p1 %patch1014 -p1 +%patch1015 -p1 # ensure generate files are removed rm -f units/emergency.service From 41f7723e776223d791b3b8e2dd073ae22c9a984b783a1df70bbac613ce486526 Mon Sep 17 00:00:00 2001 From: "Dr. Werner Fink" Date: Thu, 19 Dec 2013 13:03:46 +0000 Subject: [PATCH 2/2] . OBS-URL: https://build.opensuse.org/package/show/Base:System/systemd?expand=0&rev=477 --- 0001-logind-garbage-collect-stale-users.patch | 28 +++++++++++++++++++ 1014-journald-with-journaling-FS.patch | 17 ++++++----- systemd-mini.spec | 6 ++++ systemd.changes | 7 +++++ systemd.spec | 3 ++ 5 files changed, 54 insertions(+), 7 deletions(-) create mode 100644 0001-logind-garbage-collect-stale-users.patch diff --git a/0001-logind-garbage-collect-stale-users.patch b/0001-logind-garbage-collect-stale-users.patch new file mode 100644 index 00000000..fd91e8b2 --- /dev/null +++ b/0001-logind-garbage-collect-stale-users.patch @@ -0,0 +1,28 @@ +From 63966da86d8e71b1f3f2b57d5448770d526421f9 Mon Sep 17 00:00:00 2001 +From: Thomas Bächler +Date: Sun, 15 Dec 2013 11:06:37 +0000 +Subject: login: Don't stop a running user manager from garbage-collecting the user. + +With the current logic, a user will never be garbage-collected, since its +manager will always be around. Change the logic such that a user is +garbage-collected when it has no sessions and linger is disabled. +--- +diff --git a/src/login/logind-user.c b/src/login/logind-user.c +index 6ba8d98..441e086 100644 +--- a/src/login/logind-user.c ++++ b/src/login/logind-user.c +@@ -629,12 +629,6 @@ int user_check_gc(User *u, bool drop_not + if (u->slice_job || u->service_job) + return 1; + +- if (u->slice && manager_unit_is_active(u->manager, u->slice) != 0) +- return 1; +- +- if (u->service && manager_unit_is_active(u->manager, u->service) != 0) +- return 1; +- + return 0; + } + +-- +cgit v0.9.0.2-2-gbebe diff --git a/1014-journald-with-journaling-FS.patch b/1014-journald-with-journaling-FS.patch index 406a6aed..6bf95fb4 100644 --- a/1014-journald-with-journaling-FS.patch +++ b/1014-journald-with-journaling-FS.patch @@ -1,5 +1,5 @@ --- systemd-208/src/journal/journald-server.c -+++ systemd-208/src/journal/journald-server.c 2013-12-06 12:37:27.482735840 +0000 ++++ systemd-208/src/journal/journald-server.c 2013-12-10 16:31:50.770235717 +0000 @@ -21,6 +21,7 @@ #include @@ -17,11 +17,12 @@ char *fn; sd_id128_t machine; char ids[33]; -@@ -905,7 +906,28 @@ static int system_journal_open(Server *s +@@ -905,7 +906,31 @@ static int system_journal_open(Server *s (void) mkdir("/var/log/journal/", 0755); fn = strappenda("/var/log/journal/", ids); - (void) mkdir(fn, 0755); ++ (void)mkdir(fn, 0755); + + /* + * On journaling and/or compressing file systems avoid doubling the @@ -29,18 +30,20 @@ + * Check for every single flag as otherwise some of the file systems + * may return EOPNOTSUPP on one unkown flag (like BtrFS does). + */ -+ if (mkdir(fn, 0755) == 0 && (fd = open(fn, O_DIRECTORY)) >= 0) { ++ if ((fd = open(fn, O_DIRECTORY)) >= 0) { + long flags; + if (ioctl(fd, FS_IOC_GETFLAGS, &flags) == 0) { -+ if (ioctl(fd, FS_IOC_SETFLAGS, flags|FS_NOATIME_FL) == 0) ++ int old = flags; ++ if (!(flags&FS_NOATIME_FL) && ioctl(fd, FS_IOC_SETFLAGS, flags|FS_NOATIME_FL) == 0) + flags |= FS_NOATIME_FL; -+ if (ioctl(fd, FS_IOC_SETFLAGS, flags|FS_NOCOW_FL) == 0) ++ if (!(flags&FS_NOCOW_FL) && ioctl(fd, FS_IOC_SETFLAGS, flags|FS_NOCOW_FL) == 0) + flags |= FS_NOCOW_FL; -+ if (s->compress) { ++ if (!(flags&FS_NOCOMP_FL) && s->compress) { + flags &= ~FS_COMPR_FL; + flags |= FS_NOCOMP_FL; + } -+ ioctl(fd, FS_IOC_SETFLAGS, flags); ++ if (old != flags) ++ ioctl(fd, FS_IOC_SETFLAGS, flags); + } + close(fd); + } diff --git a/systemd-mini.spec b/systemd-mini.spec index b27a81ac..8f21effa 100644 --- a/systemd-mini.spec +++ b/systemd-mini.spec @@ -244,6 +244,8 @@ Patch78: 0001-Fix-bad-assert-in-show_pid_array.patch 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 +# PATCH-FIX-UPSTREAM 0001-logind-garbage-collect-stale-users.patch -- Don't stop a running user manager from garbage-collecting the user. +Patch81: 0001-logind-garbage-collect-stale-users.patch # udev patches # PATCH-FIX-OPENSUSE 1001-re-enable-by_path-links-for-ata-devices.patch @@ -272,6 +274,8 @@ Patch1012: 1012-pam_systemd_do_override_XDG_RUNTIME_DIR_of_the_original_use 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 +# PATCH-FIX-UPSTREAM build-sys-make-multi-seat-x-optional.patch +Patch1015: build-sys-make-multi-seat-x-optional.patch %description Systemd is a system and service manager, compatible with SysV and LSB @@ -534,6 +538,7 @@ cp %{SOURCE7} m4/ %patch78 -p1 %patch79 -p1 %patch80 -p1 +%patch81 -p1 # udev patches %patch1001 -p1 @@ -552,6 +557,7 @@ cp %{SOURCE7} m4/ %patch1012 -p1 %patch1013 -p1 %patch1014 -p1 +%patch1015 -p1 # ensure generate files are removed rm -f units/emergency.service diff --git a/systemd.changes b/systemd.changes index 4db1dc06..686eb749 100644 --- a/systemd.changes +++ b/systemd.changes @@ -1,3 +1,10 @@ +------------------------------------------------------------------- +Wed Dec 18 18:56:01 UTC 2013 - hrvoje.senjan@gmail.com + +- Added 0001-logind-garbage-collect-stale-users.patch: Don't stop a + running user manager from garbage-collecting the user. Original + behavior caused bnc#849870 + ------------------------------------------------------------------- Mon Dec 16 11:08:33 UTC 2013 - lbsousajr@gmail.com diff --git a/systemd.spec b/systemd.spec index b34f9c2a..48dbb6c1 100644 --- a/systemd.spec +++ b/systemd.spec @@ -239,6 +239,8 @@ Patch78: 0001-Fix-bad-assert-in-show_pid_array.patch 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 +# PATCH-FIX-UPSTREAM 0001-logind-garbage-collect-stale-users.patch -- Don't stop a running user manager from garbage-collecting the user. +Patch81: 0001-logind-garbage-collect-stale-users.patch # udev patches # PATCH-FIX-OPENSUSE 1001-re-enable-by_path-links-for-ata-devices.patch @@ -531,6 +533,7 @@ cp %{SOURCE7} m4/ %patch78 -p1 %patch79 -p1 %patch80 -p1 +%patch81 -p1 # udev patches %patch1001 -p1