Commit Graph

30 Commits

Author SHA1 Message Date
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
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
Alexander Larsson
a30be79d49 builder: Drop the storing of local files to data: uris
This just risks making the manifest very large, in case some
file is large, and it didn't even solve the whole problem,
which bundling sources is.
2017-04-24 12:00:00 +02:00
Alexander Larsson
0a0e311311 Don't bundle inline (data:) URIs
These are already bundled with the json itself.
2017-04-24 11:34:49 +02:00
Alexander Larsson
a5157d445b builder: Use context_find_in_sources_dirs to simplify code
Instead of open-coding the search everywhere. Also some places
are changed to use flatpak_build_file to further simplify
the code.
2017-04-24 09:02:42 +02:00
Alexander Larsson
3058d413f0 builder: Use flatpak_mkdir_p instead of query + mkdir 2017-04-21 16:38:05 +02:00
Simon Schampijer
bb11ef3c37 Merge remote-tracking branch 'upstream/master' into bundle-sources 2017-04-21 00:13:01 +02:00
Alexander Larsson
63978c299a builder: Load source files from the directory of the module
This means if you include a json snippet in a subdirectory, then
that module will load e.g. patches from the same subdirectory.
2017-04-19 18:54:33 +02:00
Simon Schampijer
d567b31d3d Bundle sources: initialize app_dir_path later 2017-04-13 13:32:33 +02:00
Simon Schampijer
4357ba6844 Bundle sources: allow use case to mix local and online sources
Fix checksum check for archives and files when sources are from
a local directory.
2017-04-13 13:32:33 +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
e9429d6759 builder: Silence unused return value warning 2017-02-28 11:05:01 +01:00
Alexander Larsson
ee83364a8e builder: Work around g_file_replace truncating hardlinked dests
If the target is the rofiles-fuse and a file is hardlinked, then
copy will fall back to truncation, which will fail with READONLY.
We work around this sometimes by deleting the destination first
and sometimes by using g_file_set_contents instead.
2017-02-15 18:04:00 +01:00
Mario Sanchez Prada
df680dc0a6 Fix clang build: remove unused variables 2017-02-14 09:00:57 +01:00
Alexander Larsson
08ea3baf49 builder: Download files and archives directly to disk, don't keep them in memory.
This works much better for larger sources.
2017-02-09 12:26:05 +01:00
Alexander Larsson
91c9d474dd flatpak-builder: Add support for --show-deps 2016-09-20 15:58:43 +02:00
Alexander Larsson
e792686892 builder: Propagate build-args to shell sources
This way you can e.g. do network i/o in them.
Thats not a recommended way to do it though, as you work around
a lot of the feature in flatpak-builder like the caching and
verification.
2016-09-05 22:01:56 +02:00
Alexander Larsson
c24528d369 Rename source files to flatpak 2016-05-09 09:00:20 +02:00
Alexander Larsson
1ffdf27d92 uncruftify: Initial run, all non-problematic changes 2016-05-06 16:03:27 +02:00
Tristan Van Berkom
bc7bfeef6f BuilderSourceFile: Delete destination file
Sometimes you want to replace an existing file, like a config.sub,
and sometimes that existing config.sub does not have the writable
bits set. Just delete the file if we intend to replace it anyway.
2016-04-27 14:15:05 +02:00
Alexander Larsson
87ad85116e builder: Fix random crash due to uninitialized memory 2016-01-18 16:14:42 +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
43a09b3646 Fix unused variable warnings 2015-12-15 14:34:52 +01:00
Alexander Larsson
a66da8e53c builder: Fix build with old glib 2015-12-14 14:49:31 +01:00
Alexander Larsson
b716e0d8eb Builder: Add a resolved version of the manifest to the built app 2015-12-09 14:26:41 +01:00
Alexander Larsson
5b6f3749d5 builder: Support data: uri for files 2015-12-09 13:00:30 +01:00
Alexander Larsson
f16cc44a30 builder: Use SoupRequest to simplify download helpers
Also, this allows us to support data: uris, etc
2015-12-09 12:55:10 +01:00
Alexander Larsson
3fdfef7e40 builder: Allow optionally specifying remote file sources 2015-12-09 12:01:55 +01:00
Alexander Larsson
f710eb9322 Correct license, we're LGPL 2+, not 3+
Some files accidentally got the LGPL 3+ header, but we
want to be LGPL2+.
2015-11-26 14:50:21 +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