Commit Graph

56 Commits

Author SHA1 Message Date
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
Matthew Leeds
7b8becd1b2 builder: Don't download modules that won't be built
Currently flatpak-builder downloads the sources for all modules, even if
the --stop-at option prevents them from being built. This commit changes
the behavior so that we don't bother to download the ignored modules.
2016-11-15 15:01:05 +01:00
Matthew Leeds
ba8e6153f9 doc: Fix typos 2016-11-03 15:24:39 -05:00
Alexander Larsson
4cb3f7fd79 builder: Support application inheritance
When initializing a build you can initialize the application directory
with the files from another directory, and optionally a set of its
extensions. This allows one to create a "base" application that
can be derived from in multiple forms. A typical example is an application
framework like Electron. The base electron app has all the dependencies
needed to write Electron app, and then your manifest can add the specific
files needed for your application.

An example snipped could look something like:

    "base": "org.base.App",
    "base-version": "stable",
    "base-extensions": ["org.base.app.Locale", "org.base.app.Debug" ],
2016-10-17 11:40:57 +02:00
Matt Watson
b9521e719b builder: add allow missing runtimes options
The --allow-missing-runtimes options will allow flatpak builder to
not abort immediately if the sdk or runtime for the app being built
are missing.

This option will be useless when building anything in the modules
section of the app manifest. The calls to flatpak-build will fail
because of the missing sdk.

However, it may be useful when an application does not require
building anything inside the sandbox, and the application files
will be installed via other means.
2016-10-17 09:49:34 +02:00
Matt Watson
e968b87f6a builder: add a build finish option
With the option you can resume an application build where it left
off when calling flatpak-buidler --build-only
2016-10-17 09:49:34 +02:00
Alexander Larsson
f9ed36e092 docs: Fix docs for no-debuginfo
This was documented in reverse, see:

https://github.com/flatpak/flatpak/issues/349
2016-10-17 09:42:56 +02:00
Alexander Larsson
91c9d474dd flatpak-builder: Add support for --show-deps 2016-09-20 15:58:43 +02:00
Alexander Larsson
b0a7f8052b builder: Add --sandbox support
This disables build-args support, which is nice when building things
on e.g. a shared build-machine, where we don't want the build to
be able to break out of the sandbox (by specifying e.g. --share=network).
2016-08-22 17:23:32 +02:00
Alexander Larsson
fb3bfae85b builder: Add --stop-at=module
Stop building at a specified module from the json file.
This is useful during development. For instance, you can do --stop-at=main-app
to build all the dependencies into the appdir, then you can do a build of an
already checked out git repo (possibly with changes).
2016-08-19 11:25:23 +02:00
Matthew Leeds
25d88477c5 builder: Allow git sources to be specified as paths
Currently to use a local copy of a git repo you have to specify the url
as "file:///path/to/repo". This commit allows you to specify a path directly
as "/path/to/repo", which is faster and more space-efficient because
git-clone will hardlink the objects rather than copying them.
2016-07-29 16:01:30 -04:00
matthiasclasen
5216540b7b Merge pull request #205 from mwleeds/fix-typos
doc/flatpak-builder: Fix typos
2016-07-23 15:17:28 -04:00
Matthew Leeds
783f8ba1fe doc/flatpak-builder: Fix typos 2016-07-22 15:05:15 -04:00
Matthew Leeds
90bd06304a docs: Clarify which options can be used multiple times
Some of the options do not explicitly say they can be used multiple
times even though it's clear from the code that they can. This commit
fixes that by saying so in the manpages.
2016-07-22 13:32:45 -04:00
Bastien Nocera
c646f386eb builder: Add "use-git" option for patch source type
Closes #6
2016-06-28 14:24:16 +02:00
Anssi Hannula
3fb031582e Fix builddir option type in flatpak-builder documentation 2016-06-24 11:33:02 +03:00
Matthias Clasen
0c873100b7 Document the flatpak-builder var support 2016-06-23 10:06:53 +02:00
Matthias Clasen
d40253444a flatpak-builder docs: fix nonexisting reference
flatpak doesn't have a build-build command.
2016-06-09 22:34:32 -04:00
Alexander Larsson
56cd2940aa Merge pull request #95 from matthiasclasen/manifest-docs
consider sources
2016-06-09 12:32:19 +02:00
Matthias Clasen
991c6b837a Document recursive modules and includes 2016-06-09 06:27:44 -04:00
Alexander Larsson
bd66da0dad builder: Add support for patching mtime in python bytecode headers
This makes them work at runtime (as the mtime will then be 0) and
makes builds more repeatable.
2016-06-08 13:28:27 +02:00
Matthias Clasen
33f14a7002 Document /app/manifest.json
This is a nice bit of reproducibility that we shouldn't leave
undocumented.
2016-06-07 15:20:20 -04:00
Matthias Clasen
a512da2592 Recommend a shell script wrapper for passing arguments
This has come up as a question, so document it.
2016-06-03 09:08:55 -04:00
matthiasclasen
4d8445fbb7 Small additions to flatpak-builder(1) (#63)
Document that app-id is the same as id, and fix a case
of suffixed<>suffix confusion.
2016-06-02 08:52:25 +02:00
Alexander Larsson
f9cbcc3996 Merge pull request #49 from jsoref/spelling
spelling fixes
2016-05-27 09:02:14 +02:00