<div dir="ltr">Hi,<br><br>I'm interested in participating in the design & development of the proposal. <br><br>Some days ago I shared  with this list [1] a design document [2] that matches quite a lot with the "App Store" side of your proposal.<br><br>For the developer's side, I considered this options:<br>* Develop something like GitHub but using OSTree   <br>* Develop something like Docker Hub<br>* Develop something like "Google Play Developer console"<br><br>In the end I opted for the Google Play model (the developer generates a bundle "application.flatpack" file and uploads it to the store). <br><br>PROS:<br>* It solves the principal need: provide an easy channel for devs to publish their apps<br>* It's a well known process used in other platforms (Android, iOs, ...)<br>* It can be more agile (no need to wait for a build server)<br>* This kind of service seems easier to implement than the other options (GitHub  & Docker Hub)<br><br>I personally don't see the need of controlling the build process and keep the sources. If we trust a developer to control his source code and publish it in his own git repo, why don't we trust him to build his code and upload it to the store? <br><br>However, there should be some kind of control for the apps before being published, like controlling that the the "official Firefox" is published by Mozilla and no 3rd parties.<br><br>Best regards,<br><br>[1] <a href="https://lists.freedesktop.org/archives/xdg-app/2016-July/000340.html">https://lists.freedesktop.org/archives/xdg-app/2016-July/000340.html</a><br>[2] <a href="https://drive.google.com/file/d/0B-021DnJVTcZSXNyQWFZS0JDYmc/view?usp=sharing">https://drive.google.com/file/d/0B-021DnJVTcZSXNyQWFZS0JDYmc/view?usp=sharing</a><br><br><br></div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Aug 30, 2016 at 4:20 PM, Alexander Larsson <span dir="ltr"><<a href="mailto:alexl@redhat.com" target="_blank">alexl@redhat.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Flatpak and the surrounding software projects<br>
(ostree/gnome-software/<wbr>appstream/etc) are now in a pretty good<br>
state. We need to work on the portal implementation and port<br>
applications to that to make the sandboxing aspects work, but for the<br>
pure distribution usecase things mostly work.<br>
<br>
However, there are two big missing pieces in the full flatpak story:<br>
<br>
The App Store Problem<br>
=====================<br>
<br>
When a user logs in to a newly installed Linux laptop and launches the<br>
flatpak supporting software installer app (e.g. gnome-software) it<br>
should be full of all the major FOSS software from the start. Right<br>
now this only works if the user (or the admin/distro) manually found<br>
all the various upstream repositories and added them. This is neither<br>
a good experience, or very scalable.<br>
<br>
Instead we want to have a single curated entity where you can get most<br>
major FOSS software. We also want that entity to have some degree of<br>
trust, in that it does some kind of verification (manual and<br>
automatic) of the software in the repositories.<br>
<br>
The Build/Distribution Problem<br>
==============================<br>
<br>
flatpak-builder makes it reasonably easy to package an application as<br>
a flatpak, including whatever dependencies it needs. However, once you<br>
have a working build of your application things get more tricky. How<br>
do you make an official, signed build of it? How do you build on<br>
multiple arches? How do you set up and maintain a public repository?<br>
What about bandwidth costs? Mirroring, etc?<br>
<br>
All these are solvable. GPG is daunting but tutorials exists,<br>
scripting the release builds on some machine is doable, and all you<br>
need for distribution is a dumb web server somewhere. However, this is<br>
not exactly easy, and its not work that an upstream developer is<br>
interested in. There should be a simpler way to do this, that everyone<br>
could reuse.<br>
<br>
I imagine a web service that you create an account on, somewhat similar<br>
to say github or the ubuntu PPA service. Your account gets access to a<br>
per-user ostree repository, and you can create projects and upload<br>
builder json manifests for them. These get automatically build on<br>
several arches and you can pull the builds for testing. Once the build<br>
is working you can click a button to push them to a stable repository<br>
that you can tell your users to pull from.<br>
<br>
These per-user repos would be similar to github repos. I.e. many repos<br>
with little guarantees, rather than the vet:ed single access global<br>
app store. I.e. you can easily fork some existing app and throw a<br>
patch in it to let someone test your new feature.<br>
<br>
The proposal: Flathub<br>
=====================<br>
<br>
Conceptually these are two different problem, with different<br>
audiences. For instance, one can easily imagine the app store working<br>
without the shared build system. Or the build system being used without<br>
a centralized app store.<br>
<br>
We discussed this quite a bit at the Flatpak BOF at guadec however,<br>
and came to the conclusion that an initial attempt at this would best<br>
handle these as a single thing. Partly this is because it gives nice<br>
synergy effects, and that many people would probably want to use<br>
both. But it also lets us give certain guarantees for the app-store,<br>
which are important to the organization that hosts the service.<br>
<br>
For instance, having everything locally build from source, with all<br>
the sources available, makes it possible to fulfill licensing<br>
requirements (e.g. the GPL), and makes it possible to verify that the<br>
software is free software. We hope that the Gnome Foundation (or some<br>
similar organization) would help us host and maintain the system<br>
during an incubation phase, and that means we can only support free<br>
software projects.<br>
<br>
So, the proposal is to create a web service that combines these two.<br>
In many ways it is similar to github, but focusing on ostree instead<br>
of git.  The minimal viable product for this has the following<br>
features:<br>
<br>
 * Register and authenticate as a user.<br>
 * Create and edit projects.<br>
 * Assign members to projects<br>
 * Create OSTree repositories for a user<br>
 * Create OSTree repositories for a project<br>
 * Maintain member permissions for project repos.<br>
 * Create and/or register GPG keys for users/projects/repos<br>
   These would be used automatically for signing builds<br>
   in the repos.<br>
 * Trigger a build in a repository by uploading a json file<br>
   or a tarball with json file + dependent files.<br>
 * Migrate a commit from one repo/branch to another.<br>
   For instance, you may have a testing repo where you build<br>
   things. Once tested you can then take the latest build<br>
   from that and put (+re-sign) in the stable repo that you<br>
   give to users. (This is the build-commit-from flatpak<br>
   command.)<br>
 * A well known Flathub project+repo that contains the curated<br>
   "Linux upstream app store".<br>
<br>
Bring the features!<br>
===================<br>
<br>
This MVP should be pretty simple to get going. Once that is working we<br>
can start doing more complex things. Here is a mostly unsorted list of<br>
things we probably want:<br>
<br>
A way to request that a project or build should be available in the<br>
app store. This should put the build in a review queue that the<br>
curators of the app store can view and work on.<br>
<br>
Automatic scanning/review of builds. For instance, this could ensure<br>
that apps have valid appdata, desktop files, icons etc. It could also<br>
do some simple license scanning, CVE scanning, etc. The sky is the<br>
limit. This is very useful for automatic-review of the app store<br>
review queue, but is also nice feedback for normal builds.<br>
<br>
We want to keep all downloaded source for all builds forever in a<br>
directory that is shared by every build, both to avoid multiple<br>
downloads, but also so that we can always rebuild things, and fulfill<br>
license requirements for GPL:ed software.<br>
<br>
Also, we need to keep the json manifest and required files for all<br>
builds done ever, so that they are reproducible. Maybe these can be<br>
stored in the ostree repository itself?<br>
<br>
Set up mirroring/CDN for the repos that get heavy traffic, to handle<br>
heavy network loads and to get better download performance.<br>
<br>
Collect download statistics and make available to users/projects.<br>
<br>
Automatically scan and hardlink common object files across repos to<br>
keep down disk requirements, while still allowing users full access to<br>
do whatever they want in their repos.<br>
<br>
A REST API and a command line tool to make it easier to submit builds,<br>
etc.<br>
<br>
A web app-store frontend equivalent to gnome-software. This lets you<br>
browse the appdata files, rate/comment on apps and install them (it<br>
could generate key-value files that would open in gnome-software for<br>
installation).<br>
<br>
Also, there is the question of what runtimes we should allow on the<br>
site. They would need to be on the build servers to be able to build<br>
things. Should we allow people to add runtimes themselves? Should we<br>
redistribute the runtime on the appstore (probably, to get the<br>
mirroring, etc).<br>
<br>
Have some way to donate/pay for applications. Here be dragons...<br>
<br>
Allow pre-built (i.e. not built on Flathub) flatpaks in the<br>
app-store. Dragons abound here too, but useful for larger projects<br>
like libreoffice that do their own builds.<br>
<br>
Support for user-private repositories. This seems useful, but there is<br>
no support for authentication in ostree atm, so would have to be added.<br>
<br>
Build on weaker architectures, like ARM, using the userspace emulation<br>
stuff that bastien has been working on.<br>
<br>
Going forward<br>
=============<br>
<br>
I don't really have a lot of experience building services like this,<br>
and I'm pretty busy with the flatpak core stuff. So I would love if<br>
people who are interested in working on this could chime in.<br>
<br>
One very important issue is where to host this initially. I want to<br>
bring this up with the Gnome Foundation as a start, but we may also<br>
want to talk to e.g. Digital Ocean for hosting. They seem to be<br>
sponsoring a lot of free software stuff.<br>
<span class="HOEnZb"><font color="#888888"><br>
--<br>
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-<wbr>=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-<wbr>=-=-=-=-=-=-=-=<br>
 Alexander Larsson                                            Red Hat, Inc<br>
       <a href="mailto:alexl@redhat.com">alexl@redhat.com</a>            <a href="mailto:alexander.larsson@gmail.com">alexander.larsson@gmail.com</a><br>
He's a lonely guerilla sorceror with a passion for fast cars. She's a<br>
ditzy communist bounty hunter living on borrowed time. They fight crime!<br>
<br>
<br>
______________________________<wbr>_________________<br>
xdg-app mailing list<br>
<a href="mailto:xdg-app@lists.freedesktop.org">xdg-app@lists.freedesktop.org</a><br>
<a href="https://lists.freedesktop.org/mailman/listinfo/xdg-app" rel="noreferrer" target="_blank">https://lists.freedesktop.org/<wbr>mailman/listinfo/xdg-app</a><br>
</font></span></blockquote></div><br></div>