Add flatpak build manifest
ClosedPublic

Authored by eszlari on Jan 14 2018, 10:41 PM.

Details

Reviewers
rempt
apol
Summary

This adds a flatpak build manifest (for version 4.0) and instructions how to use it to create a bundle that can be distributed to users/testers. It's not meant to replace the stable builds on flathub.org, but to test development builds.

Test Plan

bundle tested in a VM

Diff Detail

Repository
R37 Krita
Lint
Lint Skipped
Unit
Unit Tests Skipped
eszlari requested review of this revision.Jan 14 2018, 10:41 PM
eszlari created this revision.

By the way: The resulting bundle includes python scripting support and should contain support for audio in animations (I had no idea how to test that).

eszlari updated this revision to Diff 25356.Jan 14 2018, 10:50 PM

fixed name of manifest in instructions

And in case you are not familiar with the current state of flatpak: when the user has a recent version of Plasma Discover or GNOME Software installed, it's of course enough to click the the bundle to install it.

Restricted Application added a subscriber: woltherav. · View Herald TranscriptJan 15 2018, 1:52 AM
apol added a subscriber: apol.Jan 15 2018, 3:06 AM
apol added inline comments.
packaging/linux/flatpak/org.kde.krita-dev.json
369 ↗(On Diff #25356)

Why not just use git master?

eszlari added inline comments.Jan 15 2018, 3:20 AM
packaging/linux/flatpak/org.kde.krita-dev.json
369 ↗(On Diff #25356)

How about adding a extra org.kde.krita-nightly.json like GIMP does:

https://git.gnome.org/browse/gimp/tree/build/flatpak

ngraham added a subscriber: ngraham.EditedJan 15 2018, 4:58 AM

Would you consider adding <release> information to your AppStream metadata file here, so you don't need to patch it in on Flathub?

Also, while we're at it, how about fixing the upstream AppStream ID? You've currently got it set to org.kde.krita.desktop; it should be org.kde.krita. Having the AppStream IDs match between sources has substantial benefits: https://pointieststick.wordpress.com/2018/01/14/how-you-can-help-drive-flatpak-adoption/

Relevant section of the AppStream Spec for IDs:

https://www.freedesktop.org/software/appstream/docs/chap-Metadata.html#sect-Metadata-GenericComponent

<id/>

The <id> tag is a unique identifier for this component. It must contain only ASCII characters, dots, hyphens and numbers. Spaces are not allowed.
The ID must follow a reverse-DNS scheme, consisting of {tld}.{vendor}.{product}, for example org.kde.Gwenview or com.hugski.ColorHug2. Ownership of {vendor}.{tld} in the domain name system guarantees uniqueness of IDs.

To accommodate a desktop file with a different name, you would add <launchable type="desktop-id">org.kde.krita.desktop</launchable>

Would you consider adding <release> information to your AppStream metadata file here, so you don't need to patch it in on Flathub?

It's already there on master and will be dropped when 4.0 is released.

Also, while we're at it, how about fixing the upstream AppStream ID?

Take a look at the other appdata.xml files on flathub - they all add the .desktop suffix.

rempt accepted this revision.Jan 15 2018, 1:15 PM

I have no opinion in the appstream file question, but I'm fine with having these definitions in our repo, on the same basis as the snap definitions: I cannot maintain them.

packaging/linux/flatpak/org.kde.krita-dev.json
215 ↗(On Diff #25356)

Krita doesn't need openjpeg anymore.

This revision is now accepted and ready to land.Jan 15 2018, 1:15 PM
apol added inline comments.Jan 15 2018, 2:01 PM
packaging/linux/flatpak/org.kde.krita-dev.json
369 ↗(On Diff #25356)

If you prefer, sure.

When you do I'll make the binaries built by kde nightlies use this instead of the manifest in flatpak-kde-applications.

In D9882#191275, @rempt wrote:

I have no opinion in the appstream file question, but I'm fine with having these definitions in our repo, on the same basis as the snap definitions: I cannot maintain them.

I could certainly maintain the flatpak manifest, I just thought you could use it when you make alpha/beta/RC releases to provide a bundle for Linux that includes everything (python etc.). Something you seem to struggle with when using AppImage, see https://phabricator.kde.org/T7679

If you don't want to use it, I would rename it to "org.kde.krita-nightly.json", so it will only be used for kde nightly builds.

eszlari added inline comments.Jan 15 2018, 3:21 PM
packaging/linux/flatpak/org.kde.krita-dev.json
215 ↗(On Diff #25356)

How does it support jpeg2000 now? This applies only to 4.0, not 3.3 right?

woltherav added inline comments.Jan 15 2018, 3:24 PM
packaging/linux/flatpak/org.kde.krita-dev.json
215 ↗(On Diff #25356)

It doesn't. We removed jpeg2000 support because 1. Nobody used it, and 2. Most people selected it and then were upset the resulting files couldn't be read by any other program and blamed Krita for being broken.

It seemed more sensible to just remove support.

rempt added a comment.Jan 15 2018, 4:26 PM

Yes... Sometimes a feature is not worth the fight against !@#$%-idity...

eszlari updated this revision to Diff 25491.Jan 16 2018, 5:11 PM

I changed the manifest to be usable for nightly builds and removed openjpeg.

When the KDE nightly build is switched to this manifest, it would be good, if a hint was added to krita's download page, with a link to the repo file:

https://distribute.kde.org/kdeapps.flatpakrepo

(see https://community.kde.org/Guidelines_and_HOWTOs/Flatpak)

apol accepted this revision.Jan 16 2018, 7:19 PM

I'll do the change of krita if nobody beats me to it.

packaging/linux/flatpak/org.kde.krita-nightly.json
347

RelWithDebInfo? It's a nightly build after all...

348

This is not necessary anymore.

eszlari updated this revision to Diff 25502.Jan 16 2018, 7:29 PM

change CMAKE_BUILD_TYPE to RelWithDebInfo and remove CMAKE_INSTALL_LIBDIR=lib

eszlari marked 2 inline comments as done.Jan 16 2018, 7:33 PM
apol accepted this revision.Jan 16 2018, 8:08 PM
rempt added a comment.Jan 22 2018, 1:03 PM

Did this already land, or should I commit it?

apol added a comment.Jan 22 2018, 2:05 PM

Coincidence, was just checking myself as well!
Can't find it, please push and I'll update flatpak-kde-applications so that we build the nightlies with this recipe.

rempt closed this revision.Mar 5 2018, 10:22 AM

Pushed

rempt added a comment.Mar 5 2018, 10:23 AM

Oh, one thing: we now have a new dependency, on libgif.