After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 761298 - Change the application id
Change the application id
Status: RESOLVED FIXED
Product: swell-foop
Classification: Applications
Component: general
git master
Other Linux
: Normal normal
: ---
Assigned To: swell-foop-maint
swell-foop-maint
Depends on:
Blocks:
 
 
Reported: 2016-01-29 16:08 UTC by Emmanuele Bassi (:ebassi)
Modified: 2016-02-29 22:50 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Use a valid dbus name as app id (bgo#761298) (834 bytes, patch)
2016-02-29 21:49 UTC, Robert Roth
committed Details | Review

Description Emmanuele Bassi (:ebassi) 2016-01-29 16:08:11 UTC
The application id used by Swell Foop is: 'org.gnome.swell-foop'. This is not a valid DBus name, because it contains a dash. See:

http://dbus.freedesktop.org/doc/dbus-specification.html#message-protocol-names

Since application ids go on the session bus, and are used for various other session-like things (like XDG-App), the application id should be changed to a valid DBus name, for instance:

  org.gnome.swell_foop
  org.gnome.SwellFoop
Comment 1 Michael Catanzaro 2016-01-29 16:18:56 UTC
I think we should also add a runtime warning in GLib; it should have detected this.
Comment 2 Emmanuele Bassi (:ebassi) 2016-01-29 16:32:04 UTC
Yes, there's an inconsistency in rules between names on the bus and interface names; the authoritative answer of the DBus maintainer is that it's too late to fix the inconsistency, and that developers should use the strictest subset, which does not allow dashes in a name.
Comment 3 Emmanuele Bassi (:ebassi) 2016-01-29 16:35:19 UTC
Technically speaking: GApplication is correct. The name on the bus being exported is valid.

Thje problem is that XDG-App limits what the bus can export from the sandbox, which means that the application id should match the name on the bus, which should match the interface rules.

We could add a warning to GApplication, but obviously it's perfectly legitimate to write applications that work outside the sandbox with that API.

XDG-App should warn, and consider '-' and '_' on the app id semantically equivalent; but I'd rather fix the apps while we're finding this issues as well.
Comment 4 Robert Roth 2016-02-29 21:49:56 UTC
Created attachment 322708 [details] [review]
Use a valid dbus name as app id (bgo#761298)
Comment 5 Robert Roth 2016-02-29 21:51:48 UTC
The proposed patch only changes the application id, and as far as I see (please correct me if I'm wrong) there's nothing else required. I am not sure if the app-id should match the gschema name, but if possible, I would like to avoid "moving" the settings schema.
Comment 6 Michael Catanzaro 2016-02-29 22:19:32 UTC
Review of attachment 322708 [details] [review]:

You don't need to move the settings schema.
Comment 7 Robert Roth 2016-02-29 22:49:53 UTC
Review of attachment 322708 [details] [review]:

Pushed to master, closing this bug. If we feel there's a need to validate the application id, feel free to report a bug against glib or xdg-app to warn for similar issues, as   reocmmended by Emmanuele.
Comment 8 Robert Roth 2016-02-29 22:50:14 UTC
This problem has been fixed in the unstable development version. The fix will be available in the next major software release. You may need to upgrade your Linux distribution to obtain that newer version.