Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
merged 3 commits into from
Dec 16, 2016
Merged

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

merged 3 commits into from
Dec 16, 2016

Conversation

aperezdc
Copy link
Contributor

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.

Rationale

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.

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.
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,
check:

   http://flatpak.org/developer.html#Distributing_Applications

Note that setting $FLATPAK_REPO disables building a standalone .flatpak bundle
file.
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.
@msftclas
Copy link

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.

TTYL, MSBOT;

@Tyriar Tyriar added this to the January 2017 milestone Dec 16, 2016
@Tyriar Tyriar merged commit a652dc8 into microsoft:master Dec 16, 2016
@aperezdc
Copy link
Contributor Author

aperezdc commented Dec 18, 2016

That was fast! Thanks for merging this 😄

@aperezdc aperezdc deleted the flatpak-niceties branch December 18, 2016 18:50
@github-actions github-actions bot locked and limited conversation to collaborators Mar 27, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants