GNOME Bugzilla – Bug 766479
Package for Flatpak (xdg-app)
Last modified: 2017-12-08 00:44:28 UTC
Flatpack (up until recently called xgg-app) would be a useful way to allow users to install Geary. We should package it and get it added to the official GNOME Flatpack repo (or whatever is appropriate).
See: <https://wiki.gnome.org/Projects/SandboxedApps> <https://blogs.gnome.org/alexl/2016/02/19/building-an-xdg-app-part-1/> (Parts 1-4)
See also Bug 714466.
I think this should depend on bug 766196 imho. To explain why, I'll refer to this link: https://lists.freedesktop.org/archives/xdg-app/2015-December/000070.html The most relevant part is the following: > The typical filetypes you export are: desktop file, dbus service file > and icons. Dbus service file filenames must be the same as the well- > known name, and with the new style dbus activation for desktop files > the same is true for them. This makes it natural to make the export > rule to be that it must be prefixed by the dbus name (if any), and the > natural follow-up on that is to make the application id the same as the > dbus id. In other words, we would need to change our app id to our DBus name, which is atm "org.yorba.geary". I do believe that if we are to change our app id into something else, we might as well prefix it with org.gnome instead of org.yorba.
Well, the app id is already org.yorba.geary, but it's more that we're going to have to rename a bunch of files to match for Flatpack anyway, right? That's probably a good enough reason to do it - I'd really like to get Flatpack support for 0.12 so people on LTS distros can use it.
GNOME 3.20 runtime only includes WebKit2GTK, so this is also effectively blocked by Bug 728002 since we don't want to have to compile and package a copy of WK1.
Created attachment 330520 [details] Flatpak builder json I have created a flatpak for Geary 0.11.1, I have attached the flatpak-builder json, and the resulting flatpak can be downloaded directly from my google drive https://drive.google.com/file/d/0BzLQBLebD-lOOXJHWmtvN0luLTA/view?usp=sharing
Created attachment 330590 [details] updated flatpak builder file This fixes a couple of issues with images and missing locales.
Created attachment 330661 [details] Flatpak builder json with branch set to stable Since this is intended to be a flatpak for the stable branch, I have updated the json file to have "branch": "stable", to follow the other gnome flatpaks. The previous json without any branch info, will default to branch "master" which they use for nightly builds of git master.
Created attachment 330697 [details] New version of flatpak json, with pulseaudio Added pulseaudio socket
Hey Mattias, I was just looking through this before committing it to gnome-apps-nightly repo and noticed that the builder config as separate-locales: false set, which you mentioned the comment 7 above was needed to fix the missing locales. Was it the case that a separate org.gnome.Geary.Locale runtime was being generated but flatpack-builder was not including the translations files when generating that? Or was it the case that it didn't seem like localisation was working because you didn't try including org.gnome.Geary.Locale? I ask because none of the other apps in gnome-apps-nightly seem to have that option enabled and so all have their own Locale runtimes. I'd prefer it if the install process for Geary worked as similarly as possible as for other GNOME apps.
That was to avoid to have to install an extra package to get the locales. But with the latest flatpak release,this is not needed since it will install the locales automatically. So,you can remove it.
I see, thanks. The config has been pushed to the gnome-3-20 branch of gnome-apps-nightly, and is currently building. If you can look into producing a nightly build config for Geary's master branch, it would be very much appreciated!
Created attachment 334217 [details] flatpak builder json for a nightly build The nightly json doesn't use portals for file access, but continues to have rw access to user home directory and ro access to the rest of the filesystem. I have asked on the xdg-apps mailinglist about this.
(In reply to Mattias Eriksson from comment #13) > Created attachment 334217 [details] > flatpak builder json for a nightly build > > The nightly json doesn't use portals for file access, but continues to have > rw access to user home directory and ro access to the rest of the > filesystem. I have asked on the xdg-apps mailinglist about this. Ah, excellent! I just tweaked it a bit (fixed build on ARM; cleaned up whitespace and the portals comment; removed separate-locales), and pushed it to master. Builds have started - once they are done I'll request this be published to the nightly repo. I didn't realise it, but alexl has already published the stable version to gnome-apps, and it seems to run fine. Once the nightly is also done, I'll update the wiki accordingly and we can announce it on the list. I saw Bastien's reply to your email about the file system permissions. Since GtkFileChooserNative was only added in GTK+ 3.20, we can't rely on it for the stable builds, but it's probably worth adding in a conditional compilation for it. I've added Bug 770467 to that end. It'll be great having this for the upcoming 0.11.2 release, thanks for your work!
The nightly build seems to be working fine and as been published to the gnome-nightly-apps repo, which is great. After just having done some testing, there's currently only the following issues with both that and the the stable build, that I know of: 1. Help not being launched 2. Clicking on a http link in an email not opening 3. View Source from the message menu not working 4. Launching an attachment (rather than saving it) not working (1) We know of, and seems like it will require some Flatpak support. (2) Uses gtk_show_uri(), so according to https://blogs.gnome.org/mclasen/2016/07/08/portals-using-gtk-in-a-flatpak/ this should be working fine? (3) Also uses gtk_show_uri(), but with a file:// URI, so I don't know if that will be allowed by default? (4) Also uses gtk_show_uri() with a a file:// URI in 0.11, but g_app_info_launch on master. I guess 2, 3, & 4 may be a misconfig on may part - are any of these working for you?
having installed the rpms for: xdg-desktop-portal-0.2-1.fc24.x86_64 xdg-desktop-portal-gtk-0.2-1.fc24.x86_64 And using a updated nightly runtime and Geary from nightly, I get Help and Url selector to work. However, when I rebuilt Geary and removed the ro and rw filesystem access, I still don't get a usable fileselector. The file selector only shows the sandboxed environment.
Ah yes, installing those portals resolved (1) and (2) for me, ta. Once they are also packaged for Debian and Ubuntu users, it will be worth announcing your work on the list, I think. The other two will probably remain problematic and might also need some code changes, I've filed Bug 770886 for that. We'll need to keep the RO/RW permissions until Bug 770467 is fixed.
Thanks for all your work on this Mattias. The Flatpak packaging is looking pretty solid now, so I'm going to close this as fixed.
*** Bug 714466 has been marked as a duplicate of this bug. ***