Commit Graph

417 Commits (1b16d7cd950305d5220bc0d0d050543cb5f529b5)

Author SHA1 Message Date
Alexander Larsson 9c4007fc0d Add --state-dir option
This allows using a shared state dir for downloads and build caches.

Closes: #67
Approved by: alexlarsson
2017-11-21 13:55:00 +00:00
Alexander Larsson 0797c72db7 Add support for running tests
Modules that say "run-tests": true, will run tests after installation,
unless disabled by --disable-tests.

The tests run by default are make check or ninja test, however you
can control the make/ninja target with test-rule, or supply a list
of commands with test-commands. There is also a test-args argument
in build-options, which you can use to give e.g. network access.

The tests are run with readonly access to the install directory, so
they cannot affect the build results.

Closes: #65
Approved by: alexlarsson
2017-11-16 08:09:21 +00:00
Alexander Larsson cd6a5f4bfb Add append-pkg-config option
Closes: #64
Approved by: alexlarsson
2017-11-14 12:02:58 +00:00
larchunix 1af81b799e
Fix a typo in the docs 2017-10-30 12:23:30 +01:00
Alexander Larsson ac6a25c981 Add option to disable shallow clone for git sources
Closes: #55
Approved by: alexlarsson
2017-10-30 10:57:35 +00:00
Alexander Larsson 01eb5dc945 Add prepare-platform-commands property
This allows you to modify the base platform, before applying the
new files. For instance, this is one way to fix
https://github.com/flatpak/flatpak/issues/1024#issuecomment-333321323
where we need to remove old gstreamer plugins from the base.
2017-10-09 13:29:19 +02:00
Alexander Larsson 34710550ef Automatically compress debug info unless no-debuginfo-compression is set
This uses eu-elfcompress to compress the debuginfo. We use the older
zlib-gnu compression format which is older and has more widespread
support.

Closes: #43
Approved by: alexlarsson
2017-10-05 18:11:21 +00:00
Alexander Larsson 5818790510 Add extra-data source type
All this does is construct a finish arg, but it makes it a lot nicer
to create extra-data using manifest. Additionally, it allows you to
create per-arch extra data if you set only-arches on the source.

Closes: #40
Approved by: alexlarsson
2017-09-29 07:01:53 +00:00
Alexander Larsson 9f3e786c29 Add appdata-license field
This lets you modify the project_license field in the appdata file.
This is useful because appdata files from upstream generally only
contain license information for the app itself, whereas the
bundled app may contain other code with additional licenses.

Closes: #41
Approved by: alexlarsson
2017-09-29 07:01:40 +00:00
Alexander Larsson 38f409a041 Add make-args and make-install-args to build-options
This lets you override these on a per-arch level.

Fixes https://github.com/flatpak/flatpak/issues/1029
2017-09-22 17:07:22 +02:00
Alexander Larsson 2c86d53b63 Add locale-subset support to add-extension 2017-09-21 17:06:16 +02:00
Alexander Larsson 6b7b5fae0a Add tag property for git sources
This is essentially an alias for branch, but makes the json
nicer to read.
2017-09-18 16:03:48 +02:00
Simon McVittie 0243f05b9b flatpak-builder(1): Document what can be combined with --show-deps
As with --run, most options are not allowed here.

Signed-off-by: Simon McVittie <smcv@collabora.com>
2017-09-08 16:58:03 +01:00
Simon McVittie e177c4c07c flatpak-builder(1): Document what can be combined with --run
Most options are not allowed when combined with --run.

Signed-off-by: Simon McVittie <smcv@collabora.com>
2017-09-08 16:58:03 +01:00
Simon McVittie 9f9244b9c8 flatpak-builder(1): Document --bundle-sources
Signed-off-by: Simon McVittie <smcv@collabora.com>
2017-09-08 16:58:02 +01:00
Simon McVittie 12c5a71c42 flatpak-builder(1): Document --default-branch
Signed-off-by: Simon McVittie <smcv@collabora.com>
2017-09-08 16:58:01 +01:00
Alexander Larsson 21cd4963b1 Add append-path and append-ld-libary-path build options
These are useful for e.g. sdk extensions.
2017-09-06 19:47:12 +02:00
Alexander Larsson 9d1f1ed59c Delete non-builder files 2017-08-25 09:27:42 +02:00
Alexander Larsson c6ef29c06b builder: Add support for defining extensions in flatpak-builder
This takes a list of properties and generate finish arguments.
Additionally you can specify "bundle": true, which causes f-b to emit
an actual extension implementation, similar to e.g. the locale
and debuginfo extension.
2017-08-21 15:46:06 +02:00
Alexander Larsson 37fa3461c9 builder: Add --delete-build-dirs
This makes sure we always delete build dirs, even if there
was a build failure. This is useful for automatic build systems
like flathub or continuous integration.

This fixes https://github.com/flatpak/flatpak/issues/646
2017-08-18 16:29:17 +02:00
Philip Withnall e5e52b4b79 common/utils: Allow collection-id to be updated from repo config
In order to provide a transition path for repositories to add collection
IDs to themselves and propagate those collection IDs to clients’ remote
configurations, add another repo config key which controls whether the
repository’s collection ID is published. If xa.collection-id is set in
the repo’s published metadata, the client will update its configuration
to the given ID — but only if no ID is set already. This is a one-time
transition to prevent malicious repositories from remotely changing the
user’s configuration to associate their remote with a well-known
collection ID they don’t own.

Add a test for this.

Signed-off-by: Philip Withnall <withnall@endlessm.com>
2017-08-18 14:23:03 +02:00
Philip Withnall c4819af5a0 common: Support collection IDs for related refs and extensions
Add support for collection IDs to the code which finds and pulls
related refs and other extensions.

Currently, related refs must have the same collection ID as the parent
ref — this is the most likely scenario anyway. In future, it should be
possible to extend the code to support pulling related refs from other
collections.

Signed-off-by: Philip Withnall <withnall@endlessm.com>
2017-08-18 14:23:03 +02:00
Philip Withnall 024d835460 common: Support unsigned summary files and separate repo metadata
In order to eliminate some race conditions around updating the
summary{,.sig} file on the server, and to decouple signing the summary
from signing commits, and to support peer to peer mirrors of content
from multiple upstream collections: add support for unsigned summary
files.

This relaxes the requirement for gpg-verify-summary=true iff
collection-id is set in a remote’s local configuration. It depends on
some pending libostree changes to verify the ref for each commit using
the commit’s signed metadata. See
https://github.com/ostreedev/ostree/issues/983.

Metadata storage has moved from the summary file to a new
ostree-metadata well-known branch on each repository, since this can be
signed for each update and for each collection separately. If the
collection-id is set in a remote’s local configuration, flatpak will
retrieve all repository metadata from this branch rather than from the
summary file. If collection-id is unset, it will ignore this branch and
continue to use the summary file, which will continue to be updated (and
externally signed as summary.sig) for backwards compatibility.

Signed-off-by: Philip Withnall <withnall@endlessm.com>
2017-08-18 14:23:03 +02:00
Philip Withnall ae7d960372 common: Support collection IDs in flatpak{ref,repo} and bundle files
These are loaded from the ref/repo/bundle metadata and added to the new
remote configuration.

Signed-off-by: Philip Withnall <withnall@endlessm.com>
2017-08-18 14:23:03 +02:00
Philip Withnall 5b002edf06 builder: Add collection ID support to the flatpak builder
Pass a --collection-id argument through to `flatpak build-export`.

Also add a ‘collection-id’ property to manifest files, which can be used
to set the collection ID on an exported repo (when using --repo) without
having to provide a command line option.

Signed-off-by: Philip Withnall <withnall@endlessm.com>
2017-08-18 14:23:03 +02:00
Philip Withnall f3c898da05 app: Add support for collection IDs to built-in flatpak commands
This sets the collection ID on remote configs and in commit metadata
when building flatpaks.

Signed-off-by: Philip Withnall <withnall@endlessm.com>
2017-08-18 14:23:03 +02:00
Alexander Larsson f9a06a0fcd builder: Add --install-deps-from=REMOTE
This allows you to automatically install/update dependencies required
by the manifest. The dependencies include:
 Runtime, Sdk, Base, Sdk Extensions and Platform Extensions

There is also a --install-deps-only switch to make the build
stop after the dependencies are installed.

Fixes https://github.com/flatpak/flatpak/issues/955
2017-08-18 11:04:13 +02:00
Alexander Larsson 9c06cbb360 Add support for --extra-sources-url=URL
This makes flatpak-builder look in the specified URL for mirrored
sources before downloading the original URL.
2017-07-29 17:43:10 +02:00
Simon McVittie 33caac29d2 flatpak-metadata(5): Add very brief documentation for Policy groups
Signed-off-by: Simon McVittie <smcv@collabora.com>
2017-07-07 18:05:48 +01:00
Simon McVittie b5023ffe87 flatpak-metadata(5): Document the Instance group
Signed-off-by: Simon McVittie <smcv@collabora.com>
2017-07-07 16:08:35 +01:00
Simon McVittie 6856ca18bc flatpak-metadata(5): Document missing keys
Signed-off-by: Simon McVittie <smcv@collabora.com>
2017-07-07 16:08:35 +01:00
Simon McVittie b552d8995b flatpak-metadata(5): Document /.flatpak-info
Signed-off-by: Simon McVittie <smcv@collabora.com>
2017-07-07 16:08:35 +01:00
Philip Chimento 3b6f018809 docs: Remove --version from flatpak-build docs
This is not an option in flatpak-build; `flatpak build --version` prints
an unknown option error message.
2017-06-30 10:19:24 +02:00
Ankur Sinha (Ankur Sinha Gmail) ceccd281c3 Fix example 2017-06-28 10:51:43 +02:00
Alexander Larsson 8c6f31f9a8 builder: Add inherit-extensions features
This lets runtimes like the gnome and kde one easily inherit
extension points from the parent sdk.
2017-06-19 10:58:49 +02:00
Alexander Larsson 504a3a25ea info: Make --show-metadata machine parseable
This is useful mainly to parse the keyfile, and is not very
nice for pretty output.
2017-06-19 10:58:09 +02:00
Philip Withnall c835b38423 doc: Remove duplicate list entry from flatpak-remote.xml
Signed-off-by: Philip Withnall <withnall@endlessm.com>
2017-06-06 19:42:54 +01:00
Alexander Larsson 05f9c8730c builder: Add --export-only feature
This allows you to export a previous build, and still get features
like debug and locale extensions.

Fixes https://github.com/flatpak/flatpak/issues/824
2017-05-31 14:08:36 +02:00
Alexander Larsson d1fae1f476 remote-ls: Don't show Locale/Debug and secondary arches by default.
Locale and Debug extensions, and refs for a secondary arch, when the
primary arch alternative exists, are not shown unless you specify
--all or -a.

This makes the default output more useful.
2017-05-30 17:41:24 +02:00
Alexander Larsson f072d585b0 list: Don't list .Locale and .Debug by default (override with -a) 2017-05-30 17:41:01 +02:00
Alexander Larsson e41cb789fa builder: Add support for screenshot mirroring
Specify --mirror-screenshots-url=URL and then copy the resulting
appdata/screenshots directory to the URL, then these
will be used instead of the upstream screenshots.
2017-05-22 16:18:45 +02:00
Alexander Larsson f4d8f5680b builder: Add CPPFLAGS similar to the existing flags 2017-05-22 08:50:18 +02:00
Alexander Larsson f4281aacb1 builder: Update doc for latest cflags vs env var change 2017-05-22 08:49:52 +02:00
Alexander Larsson 461084d1a9 builder: Add a install-rule to allow customized install
Fixes: https://github.com/flatpak/flatpak/issues/791
2017-05-15 09:38:22 +02:00
Matthias Clasen 514886dd13 Document flatpakref format extensions
gnome-software is reading some extra keys. Document them.
2017-05-12 12:27:16 +02:00
Matthias Clasen b232c9e1fa Document flatpakrepo format extensions
gnome-software is reading some extra keys. Document them.
2017-05-12 12:27:16 +02:00
Matthias Clasen b6ffa5aecb Document is-set keys in repo config 2017-05-10 11:53:33 +02:00
Matthias Clasen e8836b0b52 Update docs for build-update-repo
Mention both --import-gpg and --redirect-url.
2017-05-10 11:53:33 +02:00
Matthias Clasen 172d7ad9db Use clearer terminology in docs about extensions
Differentiate between the 'extension point' (definition of
a place where extensions can be mounted) and the 'extension'
(a runtime matching an extension point).
2017-05-08 11:28:55 +02:00
Alexander Larsson f228577377 run: Handle forwarding uris better
We need to know if we're forwarding uris or files, because
if we're doing uris we need to pass on non-file uris as-is.
So, we enclose uris with "@@u @@" instead.

This also properly (un)escapes the file uris
2017-05-03 13:53:39 +02:00