Flatpak as part of the development process

Alexander Larsson alexl at redhat.com
Tue Apr 4 09:29:43 UTC 2017


On Fri, 2017-03-31 at 19:26 +0200, Aleix Pol wrote:
> 
> That said, this could have problems, such as these relative paths
> going outside of the project (e.g. "../myawesomelibrary"). This
> should
> be an error.
> 
> Does that make sense to you? Am I missing something?

flatpak-builder is a tool for building releases, in a controlled
reliable fashion. For instance, it always builds from scratch, and it
always takes a commit or tarball as input (never just some source
directory). As such, it is in a poor position to handle the regular
edit-compile-test cycle in say an IDE. For something like that the
lower level "flatpak build" operation makes a lot more sense.

For instance, you can just do this from the directory where you have
your checkout, with an initialized (by build-init) app-dir, possibly
with some dependencies installed:

$ flatpak build app-dir make
#  edit file to fix build issue
$ flatpak build app-dir make
$ flatpak build app-dir ./test-app
$ flatpak build app-dir gdb ./test-app

flatpak-builder might be useful to initialize and pre-build the
dependencies for the application though, which is how gnome-builder
uses it (see christians mail).

That said, there are some issues from your mail that we should probably
look into.

It would be nice to be able to ship a json file with a tarball, and
then allow that tarball to be referenced from the json itself. This way
you can create a rebuildable release, which is hard without this as the
json would have to contain the checksum of the tarball which would
contain the json... 

A similar feature could reference the git repo the json is in (as in,
the ".git" directory, not the checked out tree). However, as I said
before, I don't think this is going to be useful for day-to-day builds
during development.

I don't think we want to do this by referencing a local directory like
"path": "." though. Instead i think we want a separate source type like
"type": "container", which only works if you start the build by
specifying a build using --from-git or (to be added) --from-archive. 

-- 
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
 Alexander Larsson                                            Red Hat, Inc 
       alexl at redhat.com            alexander.larsson at gmail.com 
He's a maverick overambitious jungle king on the edge. She's a tortured 
streetsmart mermaid with an incredible destiny. They fight crime! 



More information about the xdg-app mailing list