Gentoo Archives: gentoo-commits

From: Sam James <sam@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: gnome-base/gnome-shell/, gnome-base/gnome-shell/files/
Date: Tue, 17 May 2022 21:59:17
Message-Id: 1652824732.042dabffb96f3b8fd74e0cbb14c524c81e7304df.sam@gentoo
1 commit: 042dabffb96f3b8fd74e0cbb14c524c81e7304df
2 Author: Sam James <sam <AT> gentoo <DOT> org>
3 AuthorDate: Tue May 17 21:58:52 2022 +0000
4 Commit: Sam James <sam <AT> gentoo <DOT> org>
5 CommitDate: Tue May 17 21:58:52 2022 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=042dabff
7
8 gnome-base/gnome-shell: backport new Polkit patch (g_autoptr)
9
10 Closes: https://bugs.gentoo.org/844919
11 Signed-off-by: Sam James <sam <AT> gentoo.org>
12
13 .../gnome-shell/files/42.1-polkit-g_autoptr.patch | 53 ++++++++++++++++++++++
14 gnome-base/gnome-shell/gnome-shell-42.1-r1.ebuild | 3 ++
15 2 files changed, 56 insertions(+)
16
17 diff --git a/gnome-base/gnome-shell/files/42.1-polkit-g_autoptr.patch b/gnome-base/gnome-shell/files/42.1-polkit-g_autoptr.patch
18 new file mode 100644
19 index 000000000000..78d3de086260
20 --- /dev/null
21 +++ b/gnome-base/gnome-shell/files/42.1-polkit-g_autoptr.patch
22 @@ -0,0 +1,53 @@
23 +https://gitlab.gnome.org/GNOME/gnome-shell/-/commit/1d0a08b5e25fea7b0e792ec9798e68a7c5606a75
24 +https://bugs.gentoo.org/844919
25 +
26 +From: =?UTF-8?q?Florian=20M=C3=BCllner?= <fmuellner@×××××.org>
27 +Date: Tue, 17 May 2022 15:36:43 +0200
28 +Subject: [PATCH] build: Do not redefine polkit autocleanup
29 +
30 +PolkitAgent recently added autocleanup functions itself, so check
31 +for their existence at configure time and only define our own when
32 +they don't exist upstream.
33 +
34 +https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/5490
35 +
36 +Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2296>
37 +--- a/config.h.meson
38 ++++ b/config.h.meson
39 +@@ -33,3 +33,6 @@
40 +
41 + /* Define if fdwalk is available in libc */
42 + #mesondefine HAVE_FDWALK
43 ++
44 ++/* Define if polkit defines autocleanup functions */
45 ++#mesondefine HAVE_POLKIT_AUTOCLEANUP
46 +--- a/meson.build
47 ++++ b/meson.build
48 +@@ -169,6 +169,13 @@ cdata.set('HAVE_FDWALK',
49 + cc.has_function('fdwalk')
50 + )
51 +
52 ++polkit_has_autocleanup = cc.compiles(
53 ++ '#define POLKIT_AGENT_I_KNOW_API_IS_SUBJECT_TO_CHANGE
54 ++ #include <polkitagent/polkitagent.h>
55 ++ void main(void) { g_autoptr(PolkitAgentListener) agent = NULL; }',
56 ++ dependencies: polkit_dep)
57 ++cdata.set('HAVE_POLKIT_AUTOCLEANUP', polkit_has_autocleanup)
58 ++
59 + buildtype = get_option('buildtype')
60 + if buildtype != 'plain'
61 + all_warnings = [
62 +--- a/src/shell-polkit-authentication-agent.h
63 ++++ b/src/shell-polkit-authentication-agent.h
64 +@@ -14,8 +14,10 @@
65 +
66 + G_BEGIN_DECLS
67 +
68 ++#ifndef HAVE_POLKIT_AUTOCLEANUP
69 + /* Polkit doesn't have g_autoptr support, thus we have to manually set the autoptr function here */
70 + G_DEFINE_AUTOPTR_CLEANUP_FUNC (PolkitAgentListener, g_object_unref)
71 ++#endif
72 +
73 + #define SHELL_TYPE_POLKIT_AUTHENTICATION_AGENT (shell_polkit_authentication_agent_get_type())
74 +
75 +GitLab
76
77 diff --git a/gnome-base/gnome-shell/gnome-shell-42.1-r1.ebuild b/gnome-base/gnome-shell/gnome-shell-42.1-r1.ebuild
78 index db6f1390fcef..7a1cc841e4f9 100644
79 --- a/gnome-base/gnome-shell/gnome-shell-42.1-r1.ebuild
80 +++ b/gnome-base/gnome-shell/gnome-shell-42.1-r1.ebuild
81 @@ -140,6 +140,9 @@ PATCHES=(
82 "${FILESDIR}"/42.0-optional-bluetooth.patch
83 # Change favorites defaults, bug #479918
84 "${FILESDIR}"/40.0-defaults.patch
85 +
86 + # Upstream backport, bug #844919
87 + "${FILESDIR}"/42.1-polkit-g_autoptr.patch
88 )
89
90 src_prepare() {