Gentoo Archives: gentoo-commits

From: Mart Raudsepp <leio@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: gnome-base/gnome-settings-daemon/, gnome-base/gnome-settings-daemon/files/
Date: Tue, 25 Dec 2018 15:51:39
Message-Id: 1545753036.8403a13490ce4e7f9c8a6c956ac11ee1289bab97.leio@gentoo
1 commit: 8403a13490ce4e7f9c8a6c956ac11ee1289bab97
2 Author: Mart Raudsepp <leio <AT> gentoo <DOT> org>
3 AuthorDate: Tue Dec 25 15:42:30 2018 +0000
4 Commit: Mart Raudsepp <leio <AT> gentoo <DOT> org>
5 CommitDate: Tue Dec 25 15:50:36 2018 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=8403a134
7
8 gnome-base/gnome-settings-daemon: fix build with glib-2.58
9
10 New glib does typeof() checking on g_clear_pointer macro calls,
11 which fails with code that passed something unsuitable as
12 g_clear_pointer destroy parameter. notify_notification_close
13 takes a second parameter, which is not a valid function signature
14 for g_clear_pointer, thus it errors now. Add upstream patch to
15 fix that.
16
17 Because in practice the destroy func call worked out fine with
18 earlier glib, without any known problems, there is no revbump by
19 considering it only a build fix (which strictly it's not).
20
21 Closes: https://bugs.gentoo.org/673706
22 Signed-off-by: Mart Raudsepp <leio <AT> gentoo.org>
23 Package-Manager: Portage-2.3.52, Repoman-2.3.11
24
25 .../files/glib-2.58-compat.patch | 33 ++++++++++++++++++++++
26 .../gnome-settings-daemon-3.24.4.ebuild | 3 +-
27 .../gnome-settings-daemon-3.26.2-r1.ebuild | 1 +
28 3 files changed, 36 insertions(+), 1 deletion(-)
29
30 diff --git a/gnome-base/gnome-settings-daemon/files/glib-2.58-compat.patch b/gnome-base/gnome-settings-daemon/files/glib-2.58-compat.patch
31 new file mode 100644
32 index 00000000000..94e1cad666e
33 --- /dev/null
34 +++ b/gnome-base/gnome-settings-daemon/files/glib-2.58-compat.patch
35 @@ -0,0 +1,33 @@
36 +From 3110457f72f70b2d283c1ad2f27b91b95d75d92f Mon Sep 17 00:00:00 2001
37 +From: Christian Hergert <chergert@××××××.com>
38 +Date: Wed, 18 Jul 2018 19:31:17 -0700
39 +Subject: [PATCH] housekeeping: fix improper notify_notification_close() usage
40 +
41 +notify_notification_close() expects that a parameter will be available for
42 +the error location, which could be a dangling pointer in a register or
43 +on the stack in the case of some architectures.
44 +
45 +This was caught by GNOME/glib#1425 which allows us to check proper type
46 +parameters.
47 +---
48 + plugins/housekeeping/gsd-disk-space.c | 4 +++-
49 + 1 file changed, 3 insertions(+), 1 deletion(-)
50 +
51 +diff --git a/plugins/housekeeping/gsd-disk-space.c b/plugins/housekeeping/gsd-disk-space.c
52 +index 0ae40193..0eee94ea 100644
53 +--- a/plugins/housekeeping/gsd-disk-space.c
54 ++++ b/plugins/housekeeping/gsd-disk-space.c
55 +@@ -1017,7 +1017,9 @@ gsd_ldsm_clean (void)
56 + g_clear_object (&ldsm_monitor);
57 + g_clear_object (&settings);
58 + g_clear_object (&privacy_settings);
59 +- g_clear_pointer (&notification, notify_notification_close);
60 ++ /* NotifyNotification::closed callback will drop reference */
61 ++ if (notification != NULL)
62 ++ notify_notification_close (notification, NULL);
63 + g_slist_free_full (ignore_paths, g_free);
64 + ignore_paths = NULL;
65 + }
66 +--
67 +2.17.0
68 +
69
70 diff --git a/gnome-base/gnome-settings-daemon/gnome-settings-daemon-3.24.4.ebuild b/gnome-base/gnome-settings-daemon/gnome-settings-daemon-3.24.4.ebuild
71 index 30c72516856..dbde38ea937 100644
72 --- a/gnome-base/gnome-settings-daemon/gnome-settings-daemon-3.24.4.ebuild
73 +++ b/gnome-base/gnome-settings-daemon/gnome-settings-daemon-3.24.4.ebuild
74 @@ -1,4 +1,4 @@
75 -# Copyright 1999-2018 Gentoo Foundation
76 +# Copyright 1999-2018 Gentoo Authors
77 # Distributed under the terms of the GNU General Public License v2
78
79 EAPI=6
80 @@ -103,6 +103,7 @@ PATCHES=(
81 # Reduce memory usage by using a fake CSS theme instead of full Adwaita for GTK+ needing plugins; requires eautoreconf
82 # Fix build system to require gudev with wayland, bug #627966
83 "${WORKDIR}"/patches/
84 + "${FILESDIR}"/glib-2.58-compat.patch
85 )
86
87 python_check_deps() {
88
89 diff --git a/gnome-base/gnome-settings-daemon/gnome-settings-daemon-3.26.2-r1.ebuild b/gnome-base/gnome-settings-daemon/gnome-settings-daemon-3.26.2-r1.ebuild
90 index fc862199ab3..b7c6a9990f9 100644
91 --- a/gnome-base/gnome-settings-daemon/gnome-settings-daemon-3.26.2-r1.ebuild
92 +++ b/gnome-base/gnome-settings-daemon/gnome-settings-daemon-3.26.2-r1.ebuild
93 @@ -98,6 +98,7 @@ PATCHES=(
94 # Allow specifying udevrulesdir via configure, bug 509484; requires eautoreconf
95 # Fix build system to require gudev with wayland, bug #627966; requires eautoreconf
96 "${WORKDIR}"/patches/
97 + "${FILESDIR}"/glib-2.58-compat.patch # included in 3.29.1+, might be backported to 3.28 too
98 )
99
100 python_check_deps() {