diff --git a/SOURCES/0001-trivial-Downgrade-a-trivial-warning-to-a-debug-state.patch b/SOURCES/0001-trivial-Downgrade-a-trivial-warning-to-a-debug-state.patch new file mode 100644 index 0000000..5426263 --- /dev/null +++ b/SOURCES/0001-trivial-Downgrade-a-trivial-warning-to-a-debug-state.patch @@ -0,0 +1,43 @@ +From b8e397e3e14b958970b7b1917590e971b2573729 Mon Sep 17 00:00:00 2001 +From: Richard Hughes +Date: Tue, 13 Aug 2019 10:59:52 +0100 +Subject: [PATCH] trivial: Downgrade a trivial warning to a debug statement + +This avoids spamming logs if system seats are set up incorrectly. If the user +is using virtual desktops it's highly unlikely they want the session devices +managed by colord. +--- + src/cd-main.c | 12 ++++++------ + 1 file changed, 6 insertions(+), 6 deletions(-) + +diff --git a/src/cd-main.c b/src/cd-main.c +index ee475f8..268d5b2 100644 +--- a/src/cd-main.c ++++ b/src/cd-main.c +@@ -532,17 +532,17 @@ cd_main_get_seat_for_process (guint pid) + + /* get session the process belongs to */ + rc = sd_pid_get_session (pid, &sd_session); +- if (rc != 0) { +- g_warning ("failed to get session [pid %u]: %s", +- pid, strerror (-rc)); ++ if (rc < 0) { ++ g_debug ("failed to get session [pid %u]: %s", ++ pid, strerror (-rc)); + goto out; + } + + /* get the seat the session is on */ + rc = sd_session_get_seat (sd_session, &sd_seat); +- if (rc != 0) { +- g_warning ("failed to get seat for session %s [pid %u]: %s", +- sd_session, pid, strerror (-rc)); ++ if (rc < 0) { ++ g_debug ("failed to get seat for session %s [pid %u]: %s", ++ sd_session, pid, strerror (-rc)); + goto out; + } + seat = g_strdup (sd_seat); +-- +2.21.0 + diff --git a/SPECS/colord.spec b/SPECS/colord.spec index 30d3409..5effedc 100644 --- a/SPECS/colord.spec +++ b/SPECS/colord.spec @@ -19,11 +19,14 @@ Summary: Color daemon Name: colord Version: 1.3.4 -Release: 1%{?dist} +Release: 2%{?dist} License: GPLv2+ and LGPLv2+ URL: http://www.freedesktop.org/software/colord/ Source0: http://www.freedesktop.org/software/colord/releases/%{name}-%{version}.tar.xz +# already upstream +Patch0: 0001-trivial-Downgrade-a-trivial-warning-to-a-debug-state.patch + BuildRequires: dbus-devel BuildRequires: docbook-utils BuildRequires: gettext @@ -107,6 +110,7 @@ This may be useful for CMYK soft-proofing or for extra device support. %prep %setup -q +%patch0 -p1 -b .less-logging %build export CFLAGS='-fno-strict-aliasing %optflags' @@ -292,6 +296,10 @@ glib-compile-schemas %{_datadir}/glib-2.0/schemas &> /dev/null || : %{_datadir}/gtk-doc/html/colord/* %changelog +* Tue Aug 13 2019 Richard Hughes 1.3.4-2 +- Downgrade a trivial warning to a debug statement +- Resolves: #1421231 + * Thu Feb 23 2017 Kalev Lember 1.3.4-1 - Update to 1.3.4 - Resolves: #1386837