From 3acb41be2c34d3b8cd0311e2fd02eed78f5727e4df4e4e564eb1bd1e975bdf7a Mon Sep 17 00:00:00 2001 From: Dominique Leuenberger Date: Fri, 17 Feb 2017 00:53:44 +0000 Subject: [PATCH] Accepting request 457544 from home:Zaitor Commit that just missed the unstable release, also pushed to 3.22 stable three OBS-URL: https://build.opensuse.org/request/show/457544 OBS-URL: https://build.opensuse.org/package/show/GNOME:Factory/gnome-session?expand=0&rev=256 --- ...e-session-Restrict-the-login-monitor.patch | 31 +++++++++++++++++++ gnome-session.changes | 8 +++++ gnome-session.spec | 5 ++- 3 files changed, 43 insertions(+), 1 deletion(-) create mode 100644 gnome-session-Restrict-the-login-monitor.patch diff --git a/gnome-session-Restrict-the-login-monitor.patch b/gnome-session-Restrict-the-login-monitor.patch new file mode 100644 index 0000000..f59c02c --- /dev/null +++ b/gnome-session-Restrict-the-login-monitor.patch @@ -0,0 +1,31 @@ +From 73dba36e0d4f9129683caa85b4cd9b012d8e68c8 Mon Sep 17 00:00:00 2001 +From: "Owen W. Taylor" +Date: Thu, 2 Feb 2017 13:03:20 -0500 +Subject: gsm-systemd.c: Restrict the login monitor to the "session" category + +We only are interested in changes to sd_session_get_active(), so only +listen for changes in the "session" category. This reduces overhead +by a small amount, and also reduces the amount of /var/run/systemd +that needs to be read. (Bug 772537 is a failure because of a SELinux +policy preventint reading /var/run/systemd/machines - which we don't +need to monitor anyways.) +--- + gnome-session/gsm-systemd.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/gnome-session/gsm-systemd.c b/gnome-session/gsm-systemd.c +index 69971b8..539e991 100644 +--- a/gnome-session/gsm-systemd.c ++++ b/gnome-session/gsm-systemd.c +@@ -231,7 +231,7 @@ sd_source_new (void) + source = g_source_new (&sd_source_funcs, sizeof (SdSource)); + sd_source = (SdSource *)source; + +- if ((ret = sd_login_monitor_new (NULL, &sd_source->monitor)) < 0) { ++ if ((ret = sd_login_monitor_new ("session", &sd_source->monitor)) < 0) { + g_warning ("Error getting login monitor: %d", ret); + } else { + sd_source->pollfd.fd = sd_login_monitor_get_fd (sd_source->monitor); +-- +cgit v0.12 + diff --git a/gnome-session.changes b/gnome-session.changes index 15ce376..5e74c45 100644 --- a/gnome-session.changes +++ b/gnome-session.changes @@ -1,3 +1,11 @@ +------------------------------------------------------------------- +Wed Feb 15 19:22:06 UTC 2017 - zaitor@opensuse.org + +- Add gnome-session-Restrict-the-login-monitor.patch: Restrict the + login monitor to the "session" category. This reduces overhead + by a small amount, and also reduces the amount of + /var/run/systemd that needs to be read. + ------------------------------------------------------------------- Mon Nov 7 21:12:43 UTC 2016 - dimstar@opensuse.org diff --git a/gnome-session.spec b/gnome-session.spec index a9d1414..188e50f 100644 --- a/gnome-session.spec +++ b/gnome-session.spec @@ -1,7 +1,7 @@ # # spec file for package gnome-session # -# Copyright (c) 2016 SUSE LINUX GmbH, Nuernberg, Germany. +# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -26,6 +26,8 @@ Url: http://www.gnome.org Source: http://download.gnome.org/sources/gnome-session/3.22/%{name}-%{version}.tar.xz Source1: gnome Source2: gnome.desktop +# PATCH-FIX-UPSTREAM gnome-session-Restrict-the-login-monitor.patch zaitor@opensuse.org -- Restrict the login monitor to the "session" category +Patch0: gnome-session-Restrict-the-login-monitor.patch BuildRequires: fdupes BuildRequires: intltool BuildRequires: tcpd-devel @@ -105,6 +107,7 @@ functional GNOME desktop. %prep %setup -q +%patch0 -p1 %if !0%{?is_opensuse} translation-update-upstream %endif