Merge lp:~ubuntu-branches/ubuntu/precise/accountsservice/precise-201112091911 into lp:ubuntu/precise/accountsservice

Proposed by Ubuntu Package Importer
Status: Merged
Merged at revision: not available
Proposed branch: lp:~ubuntu-branches/ubuntu/precise/accountsservice/precise-201112091911
Merge into: lp:ubuntu/precise/accountsservice
Diff against target: 390 lines (+384/-0) (has conflicts)
1 file modified
debian/patches/0011-add-background-file-support.patch (+384/-0)
Conflict adding file debian/patches/0011-add-background-file-support.patch.  Moved existing file to debian/patches/0011-add-background-file-support.patch.moved.
To merge this branch: bzr merge lp:~ubuntu-branches/ubuntu/precise/accountsservice/precise-201112091911
Reviewer Review Type Date Requested Status
Ubuntu branches Pending
Review via email: mp+85178@code.launchpad.net

Description of the change

The package importer has detected a possible inconsistency between the package history in the archive and the history in bzr. As the archive is authoritative the importer has made lp:ubuntu/precise/accountsservice reflect what is in the archive and the old bzr branch has been pushed to lp:~ubuntu-branches/ubuntu/precise/accountsservice/precise-201112091911. This merge proposal was created so that an Ubuntu developer can review the situations and perform a merge/upload if necessary. There are three typical cases where this can happen.
  1. Where someone pushes a change to bzr and someone else uploads the package without that change. This is the reason that this check is done by the importer. If this appears to be the case then a merge/upload should be done if the changes that were in bzr are still desirable.
  2. The importer incorrectly detected the above situation when someone made a change in bzr and then uploaded it.
  3. The importer incorrectly detected the above situation when someone just uploaded a package and didn't touch bzr.

If this case doesn't appear to be the first situation then set the status of the merge proposal to "Rejected" and help avoid the problem in future by filing a bug at https://bugs.launchpad.net/udd linking to this merge proposal.

(this is an automatically generated message)

To post a comment you must log in.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== added file 'debian/patches/0011-add-background-file-support.patch'
2--- debian/patches/0011-add-background-file-support.patch 1970-01-01 00:00:00 +0000
3+++ debian/patches/0011-add-background-file-support.patch 2011-12-09 19:21:24 +0000
4@@ -0,0 +1,384 @@
5+Index: accountsservice-0.6.15/data/org.freedesktop.Accounts.User.xml
6+===================================================================
7+--- accountsservice-0.6.15.orig/data/org.freedesktop.Accounts.User.xml 2011-10-17 15:56:32.000000000 -0400
8++++ accountsservice-0.6.15/data/org.freedesktop.Accounts.User.xml 2011-12-07 09:56:38.006039122 -0500
9+@@ -296,6 +296,41 @@
10+ </doc:doc>
11+ </method>
12+
13++ <method name="SetBackgroundFile">
14++ <annotation name="org.freedesktop.DBus.GLib.Async" value=""/>
15++ <arg name="filename" direction="in" type="s">
16++ <doc:doc>
17++ <doc:summary>
18++ The absolute filename of a png file to use as the users background.
19++ </doc:summary>
20++ </doc:doc>
21++ </arg>
22++ <doc:doc>
23++ <doc:description>
24++ <doc:para>
25++ Sets the users background.
26++ </doc:para>
27++ </doc:description>
28++ <doc:permission>
29++ The caller needs one of the following PolicyKit authorizations:
30++ <doc:list>
31++ <doc:item>
32++ <doc:term>org.freedesktop.accounts.change-own-user-data</doc:term>
33++ <doc:definition>To change his own background</doc:definition>
34++ </doc:item>
35++ <doc:item>
36++ <doc:term>org.freedesktop.accounts.user-administration</doc:term>
37++ <doc:definition>To change the background of another user</doc:definition>
38++ </doc:item>
39++ </doc:list>
40++ </doc:permission>
41++ <doc:errors>
42++ <doc:error name="org.freedesktop.Accounts.Error.PermissionDenied">if the caller lacks the appropriate PolicyKit authorization</doc:error>
43++ <doc:error name="org.freedesktop.Accounts.Error.Failed">if the operation failed</doc:error>
44++ </doc:errors>
45++ </doc:doc>
46++ </method>
47++
48+ <method name="SetIconFile">
49+ <annotation name="org.freedesktop.DBus.GLib.Async" value=""/>
50+ <arg name="filename" direction="in" type="s">
51+@@ -651,6 +686,16 @@
52+ </doc:para>
53+ </doc:description>
54+ </doc:doc>
55++ </property>
56++
57++ <property name="BackgroundFile" type="s" access="read">
58++ <doc:doc>
59++ <doc:description>
60++ <doc:para>
61++ The filename of a png file containing the users background.
62++ </doc:para>
63++ </doc:description>
64++ </doc:doc>
65+ </property>
66+
67+ <property name="IconFile" type="s" access="read">
68+Index: accountsservice-0.6.15/src/libaccountsservice/act-user.c
69+===================================================================
70+--- accountsservice-0.6.15.orig/src/libaccountsservice/act-user.c 2011-10-17 15:56:32.000000000 -0400
71++++ accountsservice-0.6.15/src/libaccountsservice/act-user.c 2011-12-07 10:00:38.786041671 -0500
72+@@ -57,6 +57,7 @@
73+ PROP_AUTOMATIC_LOGIN,
74+ PROP_SYSTEM_ACCOUNT,
75+ PROP_LOGIN_FREQUENCY,
76++ PROP_BACKGROUND_FILE,
77+ PROP_ICON_FILE,
78+ PROP_LANGUAGE,
79+ PROP_X_SESSION,
80+@@ -86,6 +87,7 @@
81+ char *shell;
82+ char *email;
83+ char *location;
84++ char *background_file;
85+ char *icon_file;
86+ char *language;
87+ char *x_session;
88+@@ -231,6 +233,9 @@
89+ case PROP_LOCATION:
90+ g_value_set_string (value, user->location);
91+ break;
92++ case PROP_BACKGROUND_FILE:
93++ g_value_set_string (value, user->background_file);
94++ break;
95+ case PROP_ICON_FILE:
96+ g_value_set_string (value, user->icon_file);
97+ break;
98+@@ -357,6 +362,13 @@
99+ 0,
100+ G_PARAM_READABLE));
101+ g_object_class_install_property (gobject_class,
102++ PROP_BACKGROUND_FILE,
103++ g_param_spec_string ("background-file",
104++ "Background File",
105++ "The path to a background for this user.",
106++ NULL,
107++ G_PARAM_READABLE));
108++ g_object_class_install_property (gobject_class,
109+ PROP_ICON_FILE,
110+ g_param_spec_string ("icon-file",
111+ "Icon File",
112+@@ -452,6 +464,7 @@
113+
114+ g_free (user->user_name);
115+ g_free (user->real_name);
116++ g_free (user->background_file);
117+ g_free (user->icon_file);
118+ g_free (user->language);
119+ g_free (user->object_path);
120+@@ -802,6 +815,22 @@
121+ }
122+
123+ /**
124++ * act_user_get_background_file:
125++ * @user: a #ActUser
126++ *
127++ * Returns the path to the account background belonging to @user.
128++ *
129++ * Returns: (transfer none): a path to a background
130++ */
131++const char *
132++act_user_get_background_file (ActUser *user)
133++{
134++ g_return_val_if_fail (ACT_IS_USER (user), NULL);
135++
136++ return user->background_file;
137++}
138++
139++/**
140+ * act_user_get_icon_file:
141+ * @user: a #ActUser
142+ *
143+@@ -1015,6 +1044,15 @@
144+ user->login_frequency = new_login_frequency;
145+ g_object_notify (G_OBJECT (user), "login-frequency");
146+ }
147++ } else if (strcmp (key, "BackgroundFile") == 0) {
148++ const char *new_background_file;
149++
150++ new_background_file = g_value_get_string (value);
151++ if (g_strcmp0 (user->background_file, new_background_file) != 0) {
152++ g_free (user->background_file);
153++ user->background_file = g_value_dup_string (value);
154++ g_object_notify (G_OBJECT (user), "background-file");
155++ }
156+ } else if (strcmp (key, "IconFile") == 0) {
157+ const char *new_icon_file;
158+
159+@@ -1380,6 +1418,37 @@
160+ g_error_free (error);
161+ return;
162+ }
163++}
164++
165++/**
166++ * act_user_set_background_file:
167++ * @user: the user object to alter.
168++ * @background_file: path to an background
169++ *
170++ * Assigns a new background for @user.
171++ *
172++ * Note this function is synchronous and ignores errors.
173++ **/
174++void
175++act_user_set_background_file (ActUser *user,
176++ const char *background_file)
177++{
178++ GError *error = NULL;
179++
180++ g_return_if_fail (ACT_IS_USER (user));
181++ g_return_if_fail (background_file != NULL);
182++ g_return_if_fail (DBUS_IS_G_PROXY (user->accounts_proxy));
183++
184++ if (!dbus_g_proxy_call (user->accounts_proxy,
185++ "SetBackgroundFile",
186++ &error,
187++ G_TYPE_STRING, background_file,
188++ G_TYPE_INVALID,
189++ G_TYPE_INVALID)) {
190++ g_warning ("SetBackgroundFile call failed: %s", error->message);
191++ g_error_free (error);
192++ return;
193++ }
194+ }
195+
196+ /**
197+Index: accountsservice-0.6.15/src/user.c
198+===================================================================
199+--- accountsservice-0.6.15.orig/src/user.c 2011-12-07 09:49:41.000000000 -0500
200++++ accountsservice-0.6.15/src/user.c 2011-12-07 10:22:38.070055634 -0500
201+@@ -66,6 +66,7 @@
202+ PROP_PASSWORD_MODE,
203+ PROP_PASSWORD_HINT,
204+ PROP_LOGIN_FREQUENCY,
205++ PROP_BACKGROUND_FILE,
206+ PROP_ICON_FILE,
207+ PROP_LOCKED,
208+ PROP_AUTOMATIC_LOGIN,
209+@@ -101,6 +102,7 @@
210+ gchar *x_session;
211+ gchar *location;
212+ guint64 login_frequency;
213++ gchar *background_file;
214+ gchar *icon_file;
215+ gboolean locked;
216+ gboolean automatic_login;
217+@@ -197,6 +199,9 @@
218+ case PROP_LOCATION:
219+ g_value_set_string (value, user->location);
220+ break;
221++ case PROP_BACKGROUND_FILE:
222++ g_value_set_string (value, user->background_file);
223++ break;
224+ case PROP_ICON_FILE:
225+ if (user->icon_file)
226+ g_value_set_string (value, user->icon_file);
227+@@ -350,6 +355,13 @@
228+ 0,
229+ G_PARAM_READWRITE));
230+ g_object_class_install_property (gobject_class,
231++ PROP_BACKGROUND_FILE,
232++ g_param_spec_string ("background-file",
233++ "Background file",
234++ "The background file to use for this user.",
235++ NULL,
236++ G_PARAM_READABLE));
237++ g_object_class_install_property (gobject_class,
238+ PROP_ICON_FILE,
239+ g_param_spec_string ("icon-file",
240+ "Icon file",
241+@@ -393,6 +405,7 @@
242+ user->account_type = ACCOUNT_TYPE_STANDARD;
243+ user->home_dir = NULL;
244+ user->shell = NULL;
245++ user->background_file = NULL;
246+ user->icon_file = NULL;
247+ user->email = NULL;
248+ user->language = NULL;
249+@@ -417,6 +430,7 @@
250+ g_free (user->real_name);
251+ g_free (user->home_dir);
252+ g_free (user->shell);
253++ g_free (user->background_file);
254+ g_free (user->icon_file);
255+ g_free (user->email);
256+ g_free (user->language);
257+@@ -659,6 +673,12 @@
258+ user->password_hint = s;
259+ }
260+
261++ s = g_key_file_get_string (keyfile, "User", "Background", NULL);
262++ if (s != NULL) {
263++ g_free (user->background_file);
264++ user->background_file = s;
265++ }
266++
267+ s = g_key_file_get_string (keyfile, "User", "Icon", NULL);
268+ if (s != NULL) {
269+ g_free (user->icon_file);
270+@@ -687,6 +707,9 @@
271+ if (user->password_hint)
272+ g_key_file_set_string (keyfile, "User", "PasswordHint", user->password_hint);
273+
274++ if (user->background_file)
275++ g_key_file_set_string (keyfile, "User", "Background", user->background_file);
276++
277+ if (user->icon_file)
278+ g_key_file_set_string (keyfile, "User", "Icon", user->icon_file);
279+ }
280+@@ -1416,6 +1439,94 @@
281+ }
282+
283+ static void
284++user_change_background_file_authorized_cb (Daemon *daemon,
285++ User *user,
286++ DBusGMethodInvocation *context,
287++ gpointer data)
288++{
289++ gchar *filename;
290++ GFile *file;
291++ GFileInfo *info;
292++ GFileType type;
293++
294++ filename = g_strdup (data);
295++
296++ if (filename == NULL ||
297++ *filename == '\0') {
298++ g_free (filename);
299++ filename = NULL;
300++
301++ goto background_saved;
302++ }
303++
304++ file = g_file_new_for_path (filename);
305++ info = g_file_query_info (file, G_FILE_ATTRIBUTE_STANDARD_TYPE,
306++ 0, NULL, NULL);
307++ type = g_file_info_get_file_type (info);
308++
309++ g_object_unref (info);
310++ g_object_unref (file);
311++
312++ if (type != G_FILE_TYPE_REGULAR) {
313++ g_debug ("not a regular file\n");
314++ throw_error (context, ERROR_FAILED, "file '%s' is not a regular file", filename);
315++ g_free (filename);
316++ return;
317++ }
318++
319++background_saved:
320++ g_free (user->background_file);
321++ user->background_file = filename;
322++
323++ save_extra_data (user);
324++
325++ g_signal_emit (user, signals[CHANGED], 0);
326++
327++ g_object_notify (G_OBJECT (user), "background-file");
328++
329++ dbus_g_method_return (context);
330++}
331++
332++gboolean
333++user_set_background_file (User *user,
334++ const gchar *filename,
335++ DBusGMethodInvocation *context)
336++{
337++ gchar *sender;
338++ DBusConnection *connection;
339++ DBusError dbus_error;
340++ uid_t uid;
341++ const gchar *action_id;
342++
343++ connection = dbus_g_connection_get_connection (user->system_bus_connection);
344++ sender = dbus_g_method_get_sender (context);
345++ dbus_error_init (&dbus_error);
346++ uid = dbus_bus_get_unix_user (connection, sender, &dbus_error);
347++ if (dbus_error_is_set (&dbus_error)) {
348++ throw_error (context, ERROR_FAILED, dbus_error.message);
349++ dbus_error_free (&dbus_error);
350++
351++ return TRUE;
352++ }
353++
354++ if (user->uid == uid)
355++ action_id = "org.freedesktop.accounts.change-own-user-data";
356++ else
357++ action_id = "org.freedesktop.accounts.user-administration";
358++
359++ daemon_local_check_auth (user->daemon,
360++ user,
361++ action_id,
362++ TRUE,
363++ user_change_background_file_authorized_cb,
364++ context,
365++ g_strdup (filename),
366++ (GDestroyNotify)g_free);
367++
368++ return TRUE;
369++}
370++
371++static void
372+ user_change_icon_file_authorized_cb (Daemon *daemon,
373+ User *user,
374+ DBusGMethodInvocation *context,
375+Index: accountsservice-0.6.15/src/user.h
376+===================================================================
377+--- accountsservice-0.6.15.orig/src/user.h 2011-10-17 15:56:32.000000000 -0400
378++++ accountsservice-0.6.15/src/user.h 2011-12-07 10:23:06.910055939 -0500
379+@@ -92,6 +92,9 @@
380+ gboolean user_set_shell (User *user,
381+ const gchar *shell,
382+ DBusGMethodInvocation *context);
383++gboolean user_set_background_file(User *user,
384++ const gchar *filename,
385++ DBusGMethodInvocation *context);
386+ gboolean user_set_icon_file (User *user,
387+ const gchar *filename,
388+ DBusGMethodInvocation *context);
389
390=== renamed file 'debian/patches/0011-add-background-file-support.patch' => 'debian/patches/0011-add-background-file-support.patch.moved'

Subscribers

People subscribed via source and target branches

to all changes: