Commit Graph

31 Commits (18451644ffba004395bb016adbdb0bfe7d6ff50e)

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 1820ebdc72 builder: Better handling of default-branch
Instead of constantly looking at the option we change the
manifest value if its unset. This means we can access the
default branch outside of builder-main.c, and that we get
it into the serialized manifest in the build.
2017-06-19 21:16:46 +02:00
Alexander Larsson fbde709739 builder: Convert bundle sources to cached stage
Instead of mixing the source bundling with the build we make
it a separate step at the end, with cache support just like the
other stages.

Being at the end means we can reuse the cached stages from the
build if we enable bundle-sources after an existing build.

Also, this changes how the json and local files/patches are stored.
Now they are in a subdirectory called "manifest" in the sources
directory, with proper handling of relative pathnames for included
modules, etc. This also means we don't look for these file in the
extra-sources directory, but rather next to the json like we
do normally.
2017-04-24 13:52:38 +02:00
Simon Schampijer bb11ef3c37 Merge remote-tracking branch 'upstream/master' into bundle-sources 2017-04-21 00:13:01 +02:00
Alexander Larsson d60bfcdf95 builder: handle module-relative paths for json includes
I.e. each include is relative to the location of the "parent"
json directory.
2017-04-19 17:46:28 +02:00
Simon Schampijer 894311e243 flatpak-builder: bundle module sources as runtime
This adds a step to the build process to bundle
the module sources, used for building the flatpak,
as a runtime extension.

The sources can then be installed like the
debug or translation runtime.

This also adds an option to flatpak-builder
for specifying sources directories. One can specify
source dirctories with the use-sources argument. This
will skip the download part of the processing
and will extract the sources from the given sources
directory directly for further processing.

Those source directories do need the same
structure as the ones that flatpak-builder
creates during processing in .flatpak-builder
and which is also used in the exported sources
runtime.
2017-04-13 13:32:33 +02:00
Alexander Larsson b00b8b1601 builder: Add --default-branch=BRANCH 2017-03-21 13:16:29 +01:00
Alexander Larsson b6d06ba8ef Bump manifest cache version to rebuild everything
This is due to the append changes, etc
Also, we drop all _compat_ cache checksums
2017-03-14 12:02:35 +01:00
Alexander Larsson 60cadead5c builder: Properly handle relative module include paths from git
We load the sub-modules from the base directory (i.e. where
the manifest is stored).
2017-03-06 09:20:34 +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 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 bcbd92f774 builder: Bump checksum version to invalidate all caches
Since we changed how the post process handles python
files in the init stage we need to rebuild everything.
2017-02-16 15:52:25 +01:00
Alexander Larsson a5e1b2200a builder: Move python timestamp checkin to post-process
This changes what files we look at to only those in this module,
which is generally right, but to handle the base-layer sdk
case we also have to run the python fixup in the initial layer.
2017-02-16 10:51:00 +01:00
Alexander Larsson fad8af2f36 builder: Break out name generation for Debug and Locale extensions
These helpers lets us tweak these names
2016-10-26 20:57: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
Alexander Larsson 91c9d474dd flatpak-builder: Add support for --show-deps 2016-09-20 15:58:43 +02:00
Alexander Larsson 5ef43f6ee3 builder: Bump manifest version to trigger rebuild with new mtimes
To make sure we're not using old caches with the previous mtime
timestamps encoded we bump the manifest version to force a rebuild.
2016-09-09 09:44:54 +02:00
Matthias Clasen 75218c4a65 Fix license headers
We were referring to the nonexisting "version 2" of the
Lesser GPL. It should be "version 2.1".
2016-07-29 14:27:49 -04:00
Alexander Larsson 33c0d49212 builder: Support permission ops with --run 2016-05-26 12:24:43 +02:00
Alexander Larsson 1ffdf27d92 uncruftify: Initial run, all non-problematic changes 2016-05-06 16:03:27 +02:00
Alexander Larsson 7e6b18eddc builder: Actually respect the defined branch 2016-03-23 16:42:40 +01:00
Alexander Larsson 6c5feb4e05 builder: Add support for --run to start a command in the build dir 2016-02-17 10:26:35 +01:00
Alexander Larsson 43ac6421f9 builder: Store exact sdk commit id in the build cache and manifest
This means we rebuild everything if the sdk changes, and you can also
see what version an app was built against.
2016-02-03 10:57:50 +01:00
Alexander Larsson 6189fd3f7a build-finish: Fix exports
This was reading an unintialized variable
2016-01-19 16:53:11 +01:00
Alexander Larsson e91a4c79e0 Builder: Support commiting a platform 2016-01-18 15:22:56 +01:00
Alexander Larsson 3341fb08ad builder: Allow building runtime sdks (based on existing sdk)
This includes a few different changes:
 * Add build-runtime boolean property
 * Rename "app-id" property to "id"
 * Add metadata property to use a custom base metadata file
 * Default to writable-sdk to TRUE for runtimes
 * Default prefix to /usr for runtimes
 * Put manifest in usr for runtimes
 * Pick up debuginfo from usr for runtimes
 * Make build-finish work on runtimes, but only export appdata
2016-01-18 11:43:02 +01:00
Alexander Larsson 5896b5ae08 builder: Pass down keep-build-dirs via BuildContext 2016-01-11 11:40:46 +01:00
Alexander Larsson 1264335458 builder: Add --disable-updates
Download sources, but never update existing sources (like git or bzr).
2015-12-21 10:39:23 +01:00
Alexander Larsson 54c52d9363 builder: Add --keep-build-dirs option
This is useful if you want to later make changes to the built stuff.
2015-12-09 21:10:22 +01:00
Alexander Larsson b2790349d6 Add xdg-app-builder
This is a tool that makes it easy to build applications and their
dependecies by automating the configure && make && make install steps.
2015-11-25 15:26:32 +01:00