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
This commit is contained in:
Dominique Leuenberger 2017-02-17 00:53:44 +00:00 committed by Git OBS Bridge
parent 0b0b69a18a
commit 3acb41be2c
3 changed files with 43 additions and 1 deletions

View File

@ -0,0 +1,31 @@
From 73dba36e0d4f9129683caa85b4cd9b012d8e68c8 Mon Sep 17 00:00:00 2001
From: "Owen W. Taylor" <otaylor@fishsoup.net>
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

View File

@ -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

View File

@ -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