Commit Graph

80 Commits (master)

Author SHA1 Message Date
Dan Nicholson aec06b3945 Support passing --token-type to build-export
Provide a --token-type command line option and a token-type manifest
property that allows passing the token type to build-export. The
manifest property takes precendence over the CLI option. In either case,
the value will be passed to build-export if it's >= 0. This requires
flatpak >= 1.6 to use the --token-type option in build-export.
2020-03-19 16:29:27 +01:00
Matthew Leeds d996bb6884 doc/flatpak-builder: Improve explanation of --repo 2019-09-18 12:55:36 -07:00
Alexander Larsson aab7bcd5e9 Support --show-manifest
We want to use this in flathub to avoid all the problems we've having
parsing json manifests via the python parser, which isn't *quite* compatible
with json-glib (differs in comment and multiline string support for instance).

Closes: #307
Approved by: alexlarsson
2019-09-13 12:55:18 +00:00
Olaf Leidinger 75c24ce291 Feature: Use CCACHE_DIR from environment, if set
Closes: #288
Approved by: alexlarsson
2019-09-13 10:40:24 +00:00
Matthew Leeds d5afdbccf8 doc/flatpak-builder: Clarify --run permissions
Looking at the implementation of builder_manifest_run(), it seems the
permissions used for flatpak-builder --run are the same as for the final
app, with the exception of filesystem permissions. So add that caveat to
the man page.

Closes: #303
Approved by: alexlarsson
2019-08-29 15:40:51 +00:00
Alexander Larsson ab72117fdd Add --add/remove-tag options
We'd like to use these in flathub.

Closes: #268
Approved by: alexlarsson
2019-02-04 10:02:33 +00:00
Marius Gedminas 29e4dd332a Mention YAML as an alternative manifest format 2018-11-02 19:46:12 +01:00
TingPing 669f82094f
docs: Fix typo in example 2018-10-10 17:01:55 -04:00
Yi-Soo An e4f4cbe220 doc: Replace git.gnome.org with gitlab.gnome.org
Closes: #194
Approved by: mwleeds
2018-08-08 03:48:11 +00:00
Matthew Leeds c94db14939 doc: Uncomment P2P docs
Now that P2P support is enabled unconditionally, uncomment the
P2P-related parts of the man pages.
2018-06-29 11:03:07 -07:00
Alexander Larsson 4510aa2359 Add SVN source type
Closes: #135
Approved by: alexlarsson
2018-04-25 17:07:44 +00:00
Matthew Leeds d8e1ef8fb9 flatpak-builder(1): Add a missing comma 2018-03-30 18:32:00 -07:00
Alexander Larsson 7b042c61e6 Add --no-shallow-clone for git mirroring
This is useful e.g. when doing mirroring only, or if your git
has issues with shallow clones.

Closes: #120
Approved by: alexlarsson
2018-03-27 13:41:42 +00:00
eyelash d329cef849 fix a typo 2018-02-19 13:49:15 +01:00
Alexander Larsson 050feb1294 Add --install argument
This allows you to build and install the result in a single operation.
If a --repo is given the app is installed from there, otherwise we
build-export it to the flatpak-builder cache repo, which already has
all the objects that are needed in it, so this will not increase
disk-use.

Closes: #81
Approved by: alexlarsson
2017-12-14 09:27:59 +00:00
Alexander Larsson 2075da5919 docs: Fix spelling
Closes: #81
Approved by: alexlarsson
2017-12-14 09:27:59 +00:00
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
larchunix 1af81b799e
Fix a typo in the docs 2017-10-30 12:23:30 +01: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 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 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
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
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 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
Tanu Kaskinen e12b4ba362 docs: Typo fix: "flatpack-builder" -> "flatpak-builder" 2017-04-20 20:53:59 +03:00
Matthias Clasen a749602aee Split the manifest file docs off
Instead of one mega flatpak-builder man page, move the
file format documnentation to its own man page in the
right section, and shorten the flatpak-builder one.
2017-03-30 09:15:05 +02:00
Alexander Larsson 81c444892a builder: Make cflags, cxxflags and ldflags append, not replace
This is much more natural, and means you don't have to duplicate the
flags in each place.
2017-03-14 10:53:38 +01:00
Alexander Larsson 0f0188aacb builder: Add support for ldflags 2017-03-14 10:26:22 +01:00
Alexander Larsson 44399bcf5f builder: Add only-arches and skip-arches for sources 2017-02-28 17:41:45 +01:00
Alexander Larsson 0379c01981 builder: Add build-arches and skip-arches to modules
This lets you avoid modules on some arches.
2017-02-28 12:07:53 +01:00
Alexander Larsson c3322fd9e9 builder: Add no-make-install to modules
This is useful for modules that don't have a make install rule.
You can use the new build-commands which is run after make to
create your own custom installation phase.

Fixes https://github.com/flatpak/flatpak/issues/458
2017-02-28 11:30:59 +01:00
Matthias Clasen a95dbc8e9b Document --from-git and --from-git-branch 2017-02-23 17:15:35 +01:00
Alexander Larsson 364499939d builder: Add --skip-if-unchanged
This lets you skip rebuilds unless the actual json changes.
This is useful for continuos builds that only run if the json
changes, not on any commit to any git source.
2017-02-22 15:12:59 +01:00
Alexander Larsson 61db31bb00 builder: Add ensure-writable to module 2017-02-22 09:48:00 +01:00
Mathieu Bridon b996a636ff builder: Add a "simple" buildsystem
This just runs the specified "build-commands" one after the other,
ignoring makefiles, configure scripts, and all the rest.

Relates to #134
2017-02-20 16:08:35 +01:00
Alexander Larsson c4da82341b builder: Add --build-shell=MODULE support
This lets you prepare a build directory for a given module
and start a build shell inside it. Very useful for debugging.
2017-02-20 15:02:09 +01:00
Alexander Larsson 18b8c67207 builder: Use rofiles-fuse for the cache
Instead of building directly into the app directory we build into a
rofiles-fuse mount of it, which allows us to safely check out the
cache into the app directory using hardlinks (because rofiles-fuse
will not let you modify hardlinked files).

Additionally, every time we commit to the cache we check out all
the new and modified files into the appdir so that we get hardlinks
to the repo for the new files too.

The advantage of having hardlinks to the repo is that we can commit
much more efficient since we don't have to do a full checksum of
the hardlinked files.

There are some issues here:
 eu-strip fails due to doing in-place editin
 rofiles-fuse is using lots of CPU, unclear if this is faster, needs
 measurements
 needs testing of how well the fallback works (ie. if fuse is not
 working).

rofuse: use kernel caches

rofiles: check out after commit

Use devino cache

Only check out new files from cache after commit
2017-02-15 16:09:48 +01:00
Alexander Larsson 3287fdbbbb builder: Add config-opts to the docs for build-options
Reported in https://github.com/flatpak/flatpak/issues/560
2017-02-14 10:11:49 +01:00
Alexander Larsson f2fb0eaf55 By default, don't rebuild apps if the SDK changes
Rebuilding all apps because a minor change in the runtime is way too wasteful
and generated unnecessary app updates, especially since runtimes are supposed
to be API stable.

We add an a --rebuild-on-sdk-change option which you use to disable this feature,
for instance if you're building against an unstable SDK.
2017-02-10 16:37:33 +01:00
Alexander Larsson 69235eeb77 builder: Support cleanup-platform-commands 2017-02-06 10:22:09 +01:00
Bartłomiej Piotrowski 751cae4639 builder: add cmake-ninja support
The commit adds another buildsystem, cmake-ninja, that tells
CMake to generate Ninja rules instead of Makefile.

Fixes #461.
2017-01-20 15:28:27 +01:00
Simon McVittie 6d930d8fd0 flatpak-builder(1): fix typo
Found by Debian's Lintian tool.
2016-12-22 09:28:25 +01:00
Patrick Griffis 21b65947e8 builder: Add buildsystem option and meson support
Closes #400
2016-11-30 16:59:20 +01:00
Alexander Larsson 632f714509 builder: Add "options" property to patch sources
This lets you specify custom arguments to the patch command.

Fixes https://github.com/flatpak/flatpak/issues/417
2016-11-30 10:17:15 +01:00
Alexander Larsson de72ba66ae builder: document --jobs option 2016-11-30 10:17:03 +01:00