Support for runtime repo references in flatpakrefs

Alexander Larsson alexl at redhat.com
Mon Dec 5 09:10:49 UTC 2016


On lör, 2016-12-03 at 01:07 +0100, Jorge García wrote:
> Hi,
> 
> > > I think this is a great addition that will make much easier the
installation of flatpak apps. Please, take a look at this issue [1]
for more ideas to make it even simpler.
> 

Yeah, that should be easy to add.

> > > > > > > > Seen that you are improving the flatpakref files I have written some
ideas/proposals that maybe could be useful too. You will find them
below.> 

Thanks & best regards,
Jorge> 
> 
> 

* Consider adding a FlatpakRefSchema or FlatpakRefVersion field> 

  As the format of flatpakref files can be changed/improved in the
future, this field can help parse them properly

I think we can mostly extend them in compatible ways, but I guess we
could add a version field so that in case we have to create an
incompatible version we can make old versions fail on them in a sane
way.

> > > > > > > * Consider using the same extension for .flatpakref and .flatpakrepo
files> 

   gedit.flatpakref is a reference to the gedit application in a
repository> 

   gnome-repository.flatpakref could be a reference to the gnome
repository => Doesn't need to be named gnome.flatpakrepo (the flatpak
program can read the contents and parse them accordingly)

Its nice to have different names for them because then they get
different mimetypes and the desktops can set different apps to handle
them as needed.

> > > > * Related to the new field RuntimeRepo, maybe you could add a
RuntimeRepoIntegrity with the sha256 of the external file (or
something a little bit more elaborated like browsers subresource-
integrity [2]

But then you would fail if some small part of the runtime repo file
(like the title or icon) changes. We could store the GPG key though,
that shouldn't change over time.

> > > > > * Consider adding a new field with the size of the app and required
runtimes:> 

  Currently a user can't now beforehand how many megabytes will be
downloaded when installing an app and its required runtimes. Is
during the downloading process when some information is shown.

We do have sizes stored in the summary files both for the app and the
runtime, so its easy to calculate (without downloading), and I believe
gnome-software does this already.

> > >  What if the disk is almost full and the app and runtimes don't fit?
flatpak should be able to warn the user before even beginning the
downloading process.

I dunno, that seems quite high level for a command line tool like
flatpak. It would be nice if gnome-software did though.

> > * Consider adding a new field with the arches (i386, x86_64, ...)
available

That is easily to figure out via the repo itself though, having it in
the file just means you have to update it when the repo changes. I
don't see the advantage in that.

> > > > > > > > > > Currently flatpakref don't have any field with the info of the
architectures this app is available in the repo. Is when the remote
is added and queried when this info can be obtained. Maybe having
this info beforehand could help flatpak/gnome software inform the
user if the app can be installed.> 
> 

* Consider adding a entry with the xdg_desktop_portal required to run
the app> 

  It could be useful to know in the flatpakref file if the app
requires and specific version of xdg_desktop_portal_XXX installed to
run properly. See [3]

Yeah, we haven't really figured out the story wrt versioning of things
like portals (or other host-side services).


> > > * Mirrors> 

  Currently flatpakref files only have a url field. It could be
useful to have a list of alternative mirrors

OSTree actually supports mirror urls, so this should work on the lower
level, however I believe it needs some minor work in flatpak to
properly handle this.

> * Repo requires authentication
> 
>   It could be useful to know if the repo requires some kind of user authentication (basic, oauth, ...) for downloading the apps/runtimes. THis could be used for private enterprise repos or for app purchases in a Flatpak App Store

Well, first we need a story to support authentication at all. But yeah,
that sounds useful.

> > > > * Consider adding a entry about the required permissions that the app
will need> 

  Users might want to know it the app requires to use the
camera/whatever before installing it

Same here, the repo has all this info in an efficient to get way, the
idea is to avoid having to repeat the entire repo info in the
flatpakref file so that you can create it once and then focus on
maintaining your repo with up-to-date info.


-- 
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
 Alexander Larsson                                            Red Hat, Inc 
       alexl at redhat.com            alexander.larsson at gmail.com 
He's an impetuous coffee-fuelled paranormal investigator who hangs with 
the wrong crowd. She's a mentally unstable tomboy schoolgirl from the 
wrong side of the tracks. They fight crime! 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/flatpak/attachments/20161205/414bceb2/attachment.html>


More information about the xdg-app mailing list