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 766479 - Package for Flatpak (xdg-app)
Package for Flatpak (xdg-app)
Status: RESOLVED FIXED
Product: geary
Classification: Other
Component: build
master
Other Linux
: High enhancement
: 0.12.0
Assigned To: Geary Maintainers
Geary Maintainers
: 714466 (view as bug list)
Depends on: geary-wk2 766196 770467
Blocks:
 
 
Reported: 2016-05-15 15:08 UTC by Michael Gratton
Modified: 2017-12-08 00:44 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Flatpak builder json (3.51 KB, application/json)
2016-06-29 05:38 UTC, Mattias Eriksson
Details
updated flatpak builder file (3.56 KB, application/json)
2016-06-29 14:29 UTC, Mattias Eriksson
Details
Flatpak builder json with branch set to stable (3.58 KB, application/json)
2016-06-30 14:30 UTC, Mattias Eriksson
Details
New version of flatpak json, with pulseaudio (3.63 KB, application/json)
2016-07-01 06:15 UTC, Mattias Eriksson
Details
flatpak builder json for a nightly build (3.57 KB, application/json)
2016-08-26 11:17 UTC, Mattias Eriksson
Details

Description Michael Gratton 2016-05-15 15:08:00 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).
Comment 2 Michael Gratton 2016-06-16 19:02:28 UTC
See also Bug 714466.
Comment 3 Niels De Graef 2016-06-20 18:09:08 UTC
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.
Comment 4 Michael Gratton 2016-06-21 01:06:22 UTC
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.
Comment 5 Michael Gratton 2016-06-28 06:56:28 UTC
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.
Comment 6 Mattias Eriksson 2016-06-29 05:38:26 UTC
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
Comment 7 Mattias Eriksson 2016-06-29 14:29:55 UTC
Created attachment 330590 [details]
updated flatpak builder file

This fixes a couple of issues with images and missing locales.
Comment 8 Mattias Eriksson 2016-06-30 14:30:02 UTC
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.
Comment 9 Mattias Eriksson 2016-07-01 06:15:46 UTC
Created attachment 330697 [details]
New version of flatpak json, with pulseaudio

Added pulseaudio socket
Comment 10 Michael Gratton 2016-07-10 12:37:58 UTC
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.
Comment 11 Mattias Eriksson 2016-07-10 15:43:06 UTC
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.
Comment 12 Michael Gratton 2016-07-10 23:42:25 UTC
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!
Comment 13 Mattias Eriksson 2016-08-26 11:17:53 UTC
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.
Comment 14 Michael Gratton 2016-08-27 04:35:42 UTC
(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!
Comment 15 Michael Gratton 2016-08-30 08:12:37 UTC
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?
Comment 16 Mattias Eriksson 2016-09-05 07:14:14 UTC
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.
Comment 17 Michael Gratton 2016-09-05 10:45:59 UTC
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.
Comment 18 Michael Gratton 2017-02-07 13:59:57 UTC
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.
Comment 19 Michael Gratton 2017-12-08 00:44:28 UTC
*** Bug 714466 has been marked as a duplicate of this bug. ***