From 5238bd19c870d652ce41640fe2bb3859146c42f68acadf154a657ff521cb03e3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Chv=C3=A1tal?= Date: Thu, 22 Aug 2013 10:52:35 +0000 Subject: [PATCH] Accepting request 195808 from home:namtrac:bugfix This SR fixes screen locking problems in Gnome and also automatic login. - Add patch logind_update_state_file_after_generating_the_session_fifo_not_before.patch to fix https://bugs.freedesktop.org/show_bug.cgi?id=67273 OBS-URL: https://build.opensuse.org/request/show/195808 OBS-URL: https://build.opensuse.org/package/show/Base:System/systemd?expand=0&rev=424 --- ...nerating_the_session_fifo_not_before.patch | 96 +++++++++++++++++++ systemd-mini.changes | 12 +++ systemd-mini.spec | 3 + systemd.changes | 6 ++ systemd.spec | 3 + 5 files changed, 120 insertions(+) create mode 100644 logind_update_state_file_after_generating_the_session_fifo_not_before.patch diff --git a/logind_update_state_file_after_generating_the_session_fifo_not_before.patch b/logind_update_state_file_after_generating_the_session_fifo_not_before.patch new file mode 100644 index 00000000..c82d60c7 --- /dev/null +++ b/logind_update_state_file_after_generating_the_session_fifo_not_before.patch @@ -0,0 +1,96 @@ +Index: systemd-206/src/login/logind-dbus.c +=================================================================== +--- systemd-206.orig/src/login/logind-dbus.c ++++ systemd-206/src/login/logind-dbus.c +@@ -643,6 +643,10 @@ static int bus_manager_create_session(Ma + + session->create_message = dbus_message_ref(message); + ++ /* Now, let's wait until the slice unit and stuff got ++ * created. We send the reply back from ++ * session_send_create_reply().*/ ++ + return 0; + + fail: +@@ -2356,7 +2360,6 @@ DBusHandlerResult bus_message_filter( + if (streq_ptr(path, s->scope_job)) { + free(s->scope_job); + s->scope_job = NULL; +- session_save(s); + + if (s->started) { + if (streq(result, "done")) +@@ -2365,7 +2368,8 @@ DBusHandlerResult bus_message_filter( + dbus_set_error(&error, BUS_ERROR_JOB_FAILED, "Start job for unit %s failed with '%s'", unit, result); + session_send_create_reply(s, &error); + } +- } ++ } else ++ session_save(s); + } + + session_add_to_gc_queue(s); +Index: systemd-206/src/login/logind-session-dbus.c +=================================================================== +--- systemd-206.orig/src/login/logind-session-dbus.c ++++ systemd-206/src/login/logind-session-dbus.c +@@ -535,6 +535,10 @@ int session_send_create_reply(Session *s + if (!s->create_message) + return 0; + ++ /* This is called after the session scope was successfully ++ * created, and finishes where bus_manager_create_session() ++ * left off. */ ++ + if (error) { + DBusError buffer; + +@@ -588,6 +592,10 @@ int session_send_create_reply(Session *s + return log_oom(); + } + ++ /* Update the state file before we notify the client about the ++ * result */ ++ session_save(s); ++ + if (!dbus_connection_send(s->manager->bus, reply, NULL)) + return log_oom(); + +Index: systemd-206/src/machine/machine-dbus.c +=================================================================== +--- systemd-206.orig/src/machine/machine-dbus.c ++++ systemd-206/src/machine/machine-dbus.c +@@ -350,6 +350,10 @@ int machine_send_create_reply(Machine *m + return log_oom(); + } + ++ /* Update the machine state file before we notify the client ++ * about the result. */ ++ machine_save(m); ++ + if (!dbus_connection_send(m->manager->bus, reply, NULL)) + return log_oom(); + +Index: systemd-206/src/machine/machined-dbus.c +=================================================================== +--- systemd-206.orig/src/machine/machined-dbus.c ++++ systemd-206/src/machine/machined-dbus.c +@@ -543,7 +543,6 @@ DBusHandlerResult bus_message_filter( + if (streq_ptr(path, mm->scope_job)) { + free(mm->scope_job); + mm->scope_job = NULL; +- machine_save(mm); + + if (mm->started) { + if (streq(result, "done")) +@@ -552,7 +551,8 @@ DBusHandlerResult bus_message_filter( + dbus_set_error(&error, BUS_ERROR_JOB_FAILED, "Start job for unit %s failed with '%s'", unit, result); + machine_send_create_reply(mm, &error); + } +- } ++ } else ++ machine_save(mm); + } + + machine_add_to_gc_queue(mm); diff --git a/systemd-mini.changes b/systemd-mini.changes index 35185b2f..a6943f52 100644 --- a/systemd-mini.changes +++ b/systemd-mini.changes @@ -1,3 +1,15 @@ +------------------------------------------------------------------- +Wed Aug 21 10:42:35 UTC 2013 - idonmez@suse.com + +- Add patch logind_update_state_file_after_generating_the_session_fifo_not_before.patch + to fix https://bugs.freedesktop.org/show_bug.cgi?id=67273 + +------------------------------------------------------------------- +Tue Aug 6 09:24:07 UTC 2013 - lnussel@suse.de + +- explicitly enable getty@tty1.service instead of getty@.service as + the tty1 alias has been removed from the file (bnc#833494) + ------------------------------------------------------------------- Thu Aug 1 15:52:20 UTC 2013 - fcrozat@suse.com diff --git a/systemd-mini.spec b/systemd-mini.spec index 615ada19..deca2fd2 100644 --- a/systemd-mini.spec +++ b/systemd-mini.spec @@ -171,6 +171,8 @@ Patch25: Forward-suspend-hibernate-calls-to-pm-utils.patch Patch38: rules-add-lid-switch-of-ARM-based-Chromebook-as-a-power-sw.patch # PATCH-FIX-OPENSUSE use-usr-sbin-sulogin-for-emergency-service.patch arvidjaar@gmail.com -- fix path to sulogin Patch46: use-usr-sbin-sulogin-for-emergency-service.patch +# PATCH-FIX-UPSTREAM logind_update_state_file_after_generating_the_session_fifo_not_before.patch -- fdo#67273 +Patch47: logind_update_state_file_after_generating_the_session_fifo_not_before.patch # udev patches # PATCH-FIX-OPENSUSE 1001-re-enable-by_path-links-for-ata-devices.patch @@ -415,6 +417,7 @@ cp %{SOURCE7} m4/ %patch40 -p1 %patch41 -p1 %patch46 -p1 +%patch47 -p1 # udev patches %patch1001 -p1 diff --git a/systemd.changes b/systemd.changes index 52acf962..a6943f52 100644 --- a/systemd.changes +++ b/systemd.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Wed Aug 21 10:42:35 UTC 2013 - idonmez@suse.com + +- Add patch logind_update_state_file_after_generating_the_session_fifo_not_before.patch + to fix https://bugs.freedesktop.org/show_bug.cgi?id=67273 + ------------------------------------------------------------------- Tue Aug 6 09:24:07 UTC 2013 - lnussel@suse.de diff --git a/systemd.spec b/systemd.spec index 56827189..515f27a4 100644 --- a/systemd.spec +++ b/systemd.spec @@ -166,6 +166,8 @@ Patch25: Forward-suspend-hibernate-calls-to-pm-utils.patch Patch38: rules-add-lid-switch-of-ARM-based-Chromebook-as-a-power-sw.patch # PATCH-FIX-OPENSUSE use-usr-sbin-sulogin-for-emergency-service.patch arvidjaar@gmail.com -- fix path to sulogin Patch46: use-usr-sbin-sulogin-for-emergency-service.patch +# PATCH-FIX-UPSTREAM logind_update_state_file_after_generating_the_session_fifo_not_before.patch -- fdo#67273 +Patch47: logind_update_state_file_after_generating_the_session_fifo_not_before.patch # udev patches # PATCH-FIX-OPENSUSE 1001-re-enable-by_path-links-for-ata-devices.patch @@ -410,6 +412,7 @@ cp %{SOURCE7} m4/ %patch40 -p1 %patch41 -p1 %patch46 -p1 +%patch47 -p1 # udev patches %patch1001 -p1