Merge ~liushuyu-011/ubuntu/+source/policykit-1-gnome:merge-lp2065114 into ubuntu/+source/policykit-1-gnome:debian/sid

Proposed by Zixing Liu
Status: Needs review
Proposed branch: ~liushuyu-011/ubuntu/+source/policykit-1-gnome:merge-lp2065114
Merge into: ubuntu/+source/policykit-1-gnome:debian/sid
Diff against target: 309 lines (+251/-2)
6 files modified
debian/changelog (+56/-0)
debian/control (+4/-2)
debian/patches/04-autorestart.patch (+170/-0)
debian/patches/06-authentication-failure-string.patch (+17/-0)
debian/patches/series (+2/-0)
debian/polkit-gnome-authentication-agent-1.desktop (+2/-0)
Reviewer Review Type Date Requested Status
Simon Quigley (community) Needs Information
Ubuntu Sponsors Pending
Canonical Desktop Team Pending
Review via email: mp+465737@code.launchpad.net

Description of the change

This MP merges policykit-1-gnome changes from Debian unstable into Ubuntu Oracular.

PPA build: https://launchpad.net/~liushuyu-011/+archive/ubuntu/misc/+sourcepub/16126070/+listing-archive-extra

To post a comment you must log in.
Revision history for this message
Simon Quigley (tsimonq2) wrote :

What happened to this change?

Add X-Ubuntu-Use-Langpack: yes

review: Needs Information
Revision history for this message
Zixing Liu (liushuyu-011) wrote :

> What happened to this change?
>
> Add X-Ubuntu-Use-Langpack: yes

Hmm, it seems like this field was added in Debian upstream for some reason, so it got dropped.
I will modify the changelog to reflect this

5aa5479... by Zixing Liu

finalize changelog

Revision history for this message
Marco Trevisan (TreviƱo) (3v1n0) wrote :

We maintain the package in salsa, so no need to do a PR here.

If there are ubuntu-only changes they need to be synchronized there.

https://salsa.debian.org/utopia-team/polkit-gnome

Revision history for this message
Zixing Liu (liushuyu-011) wrote :

> We maintain the package in salsa, so no need to do a PR here.
>
> If there are ubuntu-only changes they need to be synchronized there.
>
> https://salsa.debian.org/utopia-team/polkit-gnome

I see. Should I just forward all the Ubuntu deltas there as an MR on Debian Salsa?

Revision history for this message
Zixing Liu (liushuyu-011) wrote :

Unmerged commits

5aa5479... by Zixing Liu

finalize changelog

e00b72c... by Zixing Liu

update-maintainer

3785c94... by Zixing Liu

reconstruct-changelog

51ec444... by Zixing Liu

merge-changelogs

a7bf77d... by Zixing Liu

    - 04-autorestart.patch: Add gnome session restart support to ensure we
      always have an authentication agent running. To be forwarded upstream.
    - 06-authentication-failure-string.patch:
      Improve error message displayed when authentication fails.
    - Tell the .desktop file for the authentication agent to auto-restart the
      agent in case of failure.
    - Build-Depend on dh-sequence-translations

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1diff --git a/debian/changelog b/debian/changelog
2index e160e8d..766f4ab 100644
3--- a/debian/changelog
4+++ b/debian/changelog
5@@ -1,3 +1,20 @@
6+policykit-1-gnome (0.105-8ubuntu1) oracular; urgency=medium
7+
8+ * Merge with Debian unstable (LP: #2065114). Remaining changes:
9+ - 04-autorestart.patch: Add gnome session restart support to ensure we
10+ always have an authentication agent running. To be forwarded upstream.
11+ - 06-authentication-failure-string.patch:
12+ Improve error message displayed when authentication fails.
13+ - Tell the .desktop file for the authentication agent to auto-restart the
14+ agent in case of failure.
15+ - Build-Depend on dh-sequence-translations
16+ * Dropped Changes:
17+ - Add X-Ubuntu-Use-Langpack: yes (this change is included in Debian now)
18+ + so that we continue using Ubuntu language packs even if this package
19+ is demoted to universe
20+
21+ -- Zixing Liu <zixing.liu@canonical.com> Tue, 07 May 2024 16:28:43 -0600
22+
23 policykit-1-gnome (0.105-8) unstable; urgency=medium
24
25 * Team upload
26@@ -19,6 +36,45 @@ policykit-1-gnome (0.105-8) unstable; urgency=medium
27
28 -- Simon McVittie <smcv@debian.org> Sun, 26 Feb 2023 18:06:10 +0000
29
30+policykit-1-gnome (0.105-7ubuntu5) noble; urgency=medium
31+
32+ * No-change rebuild for CVE-2024-3094
33+
34+ -- Steve Langasek <steve.langasek@ubuntu.com> Sun, 31 Mar 2024 17:01:50 +0000
35+
36+policykit-1-gnome (0.105-7ubuntu4) noble; urgency=medium
37+
38+ * No-change rebuild against libglib2.0-0t64
39+
40+ -- Steve Langasek <steve.langasek@ubuntu.com> Fri, 08 Mar 2024 06:42:34 +0000
41+
42+policykit-1-gnome (0.105-7ubuntu3) jammy; urgency=medium
43+
44+ * No-change rebuild against latest gdk-pixbuf
45+
46+ -- Jeremy Bicha <jeremy.bicha@canonical.com> Wed, 09 Mar 2022 18:53:43 -0500
47+
48+policykit-1-gnome (0.105-7ubuntu2) disco; urgency=medium
49+
50+ * Add X-Ubuntu-Use-Langpack: yes
51+ - so that we continue using Ubuntu language packs even if this package
52+ is demoted to universe
53+
54+ -- Jeremy Bicha <jbicha@debian.org> Sat, 09 Feb 2019 09:51:08 -0500
55+
56+policykit-1-gnome (0.105-7ubuntu1) disco; urgency=medium
57+
58+ * Sync with Debian. Remaining changes:
59+ - 04-autorestart.patch: Add gnome session restart support to ensure we
60+ always have an authentication agent running. To be forwarded upstream.
61+ - 06-authentication-failure-string.patch:
62+ Improve error message displayed when authentication fails.
63+ - Tell the .desktop file for the authentication agent to auto-restart the
64+ agent in case of failure.
65+ - Build-Depend on dh-sequence-translations
66+
67+ -- Jeremy Bicha <jbicha@ubuntu.com> Sat, 09 Feb 2019 01:32:51 -0500
68+
69 policykit-1-gnome (0.105-7) unstable; urgency=medium
70
71 * Update Vcs-* for migration to salsa
72diff --git a/debian/control b/debian/control
73index d4fac13..446ccf0 100644
74--- a/debian/control
75+++ b/debian/control
76@@ -1,10 +1,12 @@
77 Source: policykit-1-gnome
78 Section: gnome
79 Priority: optional
80-Maintainer: Utopia Maintenance Team <pkg-utopia-maintainers@lists.alioth.debian.org>
81+Maintainer: Ubuntu Developers <ubuntu-devel-discuss@lists.ubuntu.com>
82+XSBC-Original-Maintainer: Utopia Maintenance Team <pkg-utopia-maintainers@lists.alioth.debian.org>
83 Uploaders: Michael Biebl <biebl@debian.org>,
84 Martin Pitt <mpitt@debian.org>
85-Build-Depends: debhelper (>= 10~),
86+Build-Depends: debhelper (>= 10),
87+ dh-sequence-translations,
88 gtk-doc-tools (>= 1.3),
89 gnome-common,
90 intltool,
91diff --git a/debian/patches/04-autorestart.patch b/debian/patches/04-autorestart.patch
92new file mode 100644
93index 0000000..fea545a
94--- /dev/null
95+++ b/debian/patches/04-autorestart.patch
96@@ -0,0 +1,170 @@
97+Description: Add gnome session restart support to ensure we always have
98+ a authentication agent running
99+Author: Michael Vogt <mvo@ubuntu.com>
100+Origin: inspired by the at-spi dbus support code
101+Bug-Ubuntu: http://launchpad.net/bugs/623819
102+Index: policykit-1-gnome-0.105/src/main.c
103+===================================================================
104+--- policykit-1-gnome-0.105.orig/src/main.c 2011-10-25 11:30:59.000000000 -0400
105++++ policykit-1-gnome-0.105/src/main.c 2011-12-19 09:23:47.635697248 -0500
106+@@ -38,11 +38,150 @@
107+
108+ static GDBusConnection *session_bus_connection = NULL;
109+
110++// session management support for auto-restart
111++#define SM_DBUS_NAME "org.gnome.SessionManager"
112++#define SM_DBUS_PATH "/org/gnome/SessionManager"
113++#define SM_DBUS_INTERFACE "org.gnome.SessionManager"
114++#define SM_CLIENT_DBUS_INTERFACE "org.gnome.SessionManager.ClientPrivate"
115++
116++static GDBusProxy *sm_proxy;
117++static GDBusProxy *client_proxy = NULL;
118++
119++static GMainLoop *loop;
120++
121++
122++static void
123++stop_cb (void)
124++{
125++ g_main_loop_quit (loop);
126++}
127++
128++static gboolean
129++end_session_response (gboolean is_okay, const gchar *reason)
130++{
131++ GVariant *res;
132++ GError *error = NULL;
133++
134++ res = g_dbus_proxy_call_sync (client_proxy,
135++ "EndSessionResponse",
136++ g_variant_new ("(bs)",
137++ is_okay,
138++ reason),
139++ G_DBUS_CALL_FLAGS_NONE,
140++ -1, /* timeout */
141++ NULL, /* GCancellable */
142++ &error);
143++ if (! res) {
144++ g_warning ("Failed to call EndSessionResponse: %s", error->message);
145++ g_error_free (error);
146++ return FALSE;
147++ }
148++
149++ g_variant_unref (res);
150++ return TRUE;
151++}
152++
153++static void
154++query_end_session_cb (void)
155++{
156++ end_session_response (TRUE, "");
157++}
158++
159++static void
160++end_session_cb (void)
161++{
162++ end_session_response (TRUE, "");
163++ g_main_loop_quit (loop);
164++}
165++
166++static void
167++signal_cb (GDBusProxy *proxy, gchar *sender_name, gchar *signal_name,
168++ GVariant *parameters, gpointer user_data)
169++{
170++ if (strcmp (signal_name, "Stop") == 0) {
171++ stop_cb ();
172++ } else if (strcmp (signal_name, "QueryEndSession") == 0) {
173++ query_end_session_cb ();
174++ } else if (strcmp (signal_name, "EndSession") == 0) {
175++ end_session_cb ();
176++ }
177++}
178++
179++static gboolean
180++register_client_to_gnome_session (void)
181++{
182++ GError *error = NULL;
183++ GVariant *res;
184++ const char *startup_id;
185++ const char *app_id;
186++ char *client_id;
187++
188++ startup_id = g_getenv ("DESKTOP_AUTOSTART_ID");
189++ app_id = "polkit-gnome-authentication-agent-1.desktop";
190++
191++ sm_proxy = g_dbus_proxy_new_for_bus_sync (G_BUS_TYPE_SESSION,
192++ G_DBUS_PROXY_FLAGS_NONE,
193++ NULL, /* GDBusInterfaceInfo */
194++ SM_DBUS_NAME,
195++ SM_DBUS_PATH,
196++ SM_DBUS_INTERFACE,
197++ NULL, /* GCancellable */
198++ &error);
199++ if (sm_proxy == NULL) {
200++ g_message("Failed to get session manager: %s", error->message);
201++ g_error_free (error);
202++ return FALSE;
203++ }
204++
205++ res = g_dbus_proxy_call_sync (sm_proxy,
206++ "RegisterClient",
207++ g_variant_new ("(ss)",
208++ app_id,
209++ startup_id),
210++ G_DBUS_CALL_FLAGS_NONE,
211++ -1, /* timeout */
212++ NULL, /* GCancellable */
213++ &error);
214++ if (! res) {
215++ g_warning ("Failed to register client: %s", error->message);
216++ g_error_free (error);
217++ return FALSE;
218++ }
219++
220++ if (! g_variant_is_of_type (res, G_VARIANT_TYPE ("(o)"))) {
221++ g_warning ("RegisterClient returned unexpected type %s",
222++ g_variant_get_type_string (res));
223++ return FALSE;
224++ }
225++
226++ g_variant_get (res, "(&o)", &client_id);
227++
228++ // implement the signals to fix "policykit agent not responding"
229++ // error (LP: #623819)
230++ client_proxy = g_dbus_proxy_new_for_bus_sync (G_BUS_TYPE_SESSION,
231++ G_DBUS_PROXY_FLAGS_NONE,
232++ NULL, /* GDBusInterfaceInfo */
233++ SM_DBUS_NAME,
234++ client_id,
235++ SM_CLIENT_DBUS_INTERFACE,
236++ NULL, /* GCancellable */
237++ &error);
238++ g_variant_unref (res);
239++ if (client_proxy == NULL) {
240++ g_message("Failed to get client proxy: %s", error->message);
241++ g_error_free (error);
242++ return FALSE;
243++ }
244++
245++ g_signal_connect (client_proxy, "g-signal", G_CALLBACK (signal_cb), NULL);
246++
247++ return TRUE;
248++}
249++
250+ int
251+ main (int argc, char **argv)
252+ {
253+ gint ret;
254+- GMainLoop *loop;
255+ PolkitAgentListener *listener;
256+ GError *error;
257+
258+@@ -101,6 +240,8 @@
259+ */
260+ session_bus_connection = g_bus_get_sync (G_BUS_TYPE_SESSION, NULL, NULL);
261+
262++ register_client_to_gnome_session();
263++
264+ g_main_loop_run (loop);
265+
266+ ret = 0;
267diff --git a/debian/patches/06-authentication-failure-string.patch b/debian/patches/06-authentication-failure-string.patch
268new file mode 100644
269index 0000000..d5ce982
270--- /dev/null
271+++ b/debian/patches/06-authentication-failure-string.patch
272@@ -0,0 +1,17 @@
273+Description: Improve error message displayed when authentication fails
274+Bug: https://bugzilla.gnome.org/show_bug.cgi?id=592978
275+Bug-Ubuntu: http://launchpad.net/bugs/411559
276+
277+Index: policykit-1-gnome-0.105/src/polkitgnomeauthenticator.c
278+===================================================================
279+--- policykit-1-gnome-0.105.orig/src/polkitgnomeauthenticator.c 2011-12-19 09:25:02.275695807 -0500
280++++ policykit-1-gnome-0.105/src/polkitgnomeauthenticator.c 2011-12-19 09:25:02.343695805 -0500
281+@@ -454,7 +454,7 @@
282+ {
283+ gchar *s;
284+
285+- s = g_strconcat ("<b>", _("Authentication Failure"), "</b>", NULL);
286++ s = g_strconcat ("<b>", _("Your authentication attempt was unsuccessful. Please try again."), "</b>", NULL);
287+ polkit_gnome_authentication_dialog_set_info_message (
288+ POLKIT_GNOME_AUTHENTICATION_DIALOG (authenticator->dialog),
289+ s);
290diff --git a/debian/patches/series b/debian/patches/series
291index 97aa177..878aea1 100644
292--- a/debian/patches/series
293+++ b/debian/patches/series
294@@ -2,3 +2,5 @@
295 0002-Auth-dialog-Make-the-label-wrap-at-70-chars.patch
296 0003-Get-user-icon-from-accountsservice-instead-of-lookin.patch
297 0004-Use-fresh-X11-timestamps-when-displaying-authenticat.patch
298+04-autorestart.patch
299+06-authentication-failure-string.patch
300diff --git a/debian/polkit-gnome-authentication-agent-1.desktop b/debian/polkit-gnome-authentication-agent-1.desktop
301index 5550429..1fbc984 100644
302--- a/debian/polkit-gnome-authentication-agent-1.desktop
303+++ b/debian/polkit-gnome-authentication-agent-1.desktop
304@@ -85,3 +85,5 @@ Type=Application
305 Categories=
306 NoDisplay=true
307 OnlyShowIn=XFCE;Unity;X-Cinnamon;
308+X-GNOME-AutoRestart=true
309+AutostartCondition=GNOME3 unless-session gnome

Subscribers

People subscribed via source and target branches