Add a few niceties for making Flatpak builds of VSCode #17370

merged 3 commits into from Dec 16, 2016


None yet

3 participants


This adds the following:

  • Support signing built Flatpak builds using GnuPG.
  • Support exporting Flatpak builds to a repository, which can be used for distributing the application and updates.
  • When exporting to a repository, set the subject of the commit message for the repository to contain the built version.


Flatpak includes support for fetching applications from a repository (which may contain multiple applications and runtimes), and updates pushed to the repository are automatically picked by application managers like GNOME Software or when using the flatpak update command.

More Info

Additional reasons why one would want to prefer a repository over serving a bunch of .flatpak files:

  • Under the hood repositories are managed by OSTree, which uses a Git-like model to store data: each file is stored as blob, which gets hashed, and stored indexed by its hash —thus deduplicating data—, which makes repositories quite space efficient. If one is going to host multiple versions of Flatpak apps, a significative amount of disk space can be saved server-side.
  • Repositories can be server over plain HTTP(S) as well — nothing special is needed server-side.
  • When the flatpak-builder tool (called under the hood by the flatpak-bundler JS module) is building a .flatpak single-file bundle, it will first commit the built files into a temporary OSTree repository and then export that single commit to the .flatpak file. Using $FLATPAK_REPO just skips the latter.
  • Installation is not made more complex for users. They can still download and just double-click to open a .flatpakref file in GNOME Software, which will have the application installed and the repository configured in one go. This is nice to ensure the users will get updates (see “Referring to repositories” in the Flatpak documentation for details).

This is a follow-up to PR #16169 and a complement to issue #7112.

aperezdc added some commits Nov 28, 2016
@aperezdc aperezdc Support signing Flatpak builds with GPG
This honors the following environment variables:

- $GPG_KEY_ID: When set, it can be the identifier, full fingerprint, or
  email address of a GnuPG key which will be used to sign Flatpak builds.

- $GPG_HOMEDIR: Path to an alternative home directory to be used by GnuPG,
  instead of the default ~/.gnupg directory of the current user. This can
  be used to point GnuPG to a different keychain.
@aperezdc aperezdc Flatpak: Allow specifying the path to a destination repository
This makes the Flatpak builds honor the $FLATPAK_REPO environment variable.
When it is defined, it will be used as the path to an OSTree repository where
the Flatpak application bundle will be committed to. This allows to place
multiple builds in the same repository (along other applications, even), which
can be published. For more details abuit using repositories for publishing,

Note that setting $FLATPAK_REPO disables building a standalone .flatpak bundle
@aperezdc aperezdc Flatpak: Set the subject used for repository commits
When storing the output of a Flatpak build to a commit into an OSTree
repository (by setting the $FLATPAK_REPO environment variable), it is
good to have a descriptive subject in the commit log message.

Hi @aperezdc, I'm your friendly neighborhood Microsoft Pull Request Bot (You can call me MSBOT). Thanks for your contribution!
You've already signed the contribution license agreement. Thanks!

The agreement was validated by Microsoft and real humans are currently evaluating your PR.


@Tyriar Tyriar was assigned by bpasero Dec 16, 2016
@Tyriar Tyriar added this to the January 2017 milestone Dec 16, 2016
@Tyriar Tyriar merged commit a652dc8 into Microsoft:master Dec 16, 2016

2 checks passed

continuous-integration/appveyor/pr AppVeyor build succeeded
continuous-integration/travis-ci/pr The Travis CI build passed
aperezdc commented Dec 18, 2016 edited

That was fast! Thanks for merging this 😄

@aperezdc aperezdc deleted the aperezdc:flatpak-niceties branch Dec 18, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment