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
69123b564e
builder: Make git patch apply verbose by default
...
Git is prone to ignoring patches in some cases, lets
at least print the details.
2017-04-24 10:29:57 +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
b593ff04d3
builder: Add builder_context_find_in_sources_dirs
...
This centralizes the code for searching in the sources
directory.
2017-04-24 09:02:38 +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
4c2c6af4ac
builder: Take build-commands into consideration for rebuild
2017-04-20 16:10:04 +02:00
Alexander Larsson
2f24c9bc31
builder: Use module-relative paths for archive sources too
2017-04-20 15:06:06 +02:00
Alexander Larsson
a71cd70ddb
builder: Ignore --extra-data in flatpak-builder --run
...
Fixes https://github.com/flatpak/flatpak/issues/598
2017-04-19 20:53:38 +02:00
Alexander Larsson
b8cd12930a
Report full version in http user agent
...
https://github.com/flatpak/flatpak/issues/635
2017-04-19 20:47:57 +02:00
Alexander Larsson
eebcefa3b2
builder: Print warnings for unknown properties
2017-04-19 20:22:11 +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
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
Matthias Clasen
6dd137e6a9
Make it a warning
...
Lack of rofiles-fuse is a serious enough detriment to the
user experience that we should warn about it.
2017-04-18 12:40:51 +02:00
Matthias Clasen
1adec3f186
Don't fail the build if rofiles-fuse is not available
...
My understanding is that rofiles-fuse is just an optimization,
and we support building without it anyway (using --disable-rofiles-fuse).
So, instead of failing the build, we can just not use rofiles-fuse
if it is not present on the system, which seems to be the case on
some OSes, we've seen this reported from Debian and Arch.
2017-04-18 12:40:51 +02:00
Chocobo1
32c022df5b
builder-module: add "bootstrap.sh" to autogen_names
...
Projects like libtorrent-rasterbar, qBittorrent are using this name.
2017-04-18 12:35:16 +02:00
Simon Schampijer
5d52f93a25
Bundle sources: bundling has to happen before the extracting
...
In the case of the source-file we have code that handle
the file inline. When we extract the source we do set
the url with that inline data. In get_download_location
that is also used by the bundling code we do then
check against this url and fail.
2017-04-13 13:57:56 +02:00
Simon Schampijer
a9e217a729
Bundle sources, bzr: set error when repo can not be found
2017-04-13 13:32:33 +02:00
Simon Schampijer
1bfe54a434
Bundle sources, git_get_mirror_dir: able to pass NULL for is_local
...
We only need the info in the builder_git_checkout case.
2017-04-13 13:32:33 +02:00
Simon Schampijer
d567b31d3d
Bundle sources: initialize app_dir_path later
2017-04-13 13:32:33 +02:00
Simon Schampijer
f31a310a66
Bundle source: use C-style comments
2017-04-13 13:32:33 +02:00
Simon Schampijer
60f96e31d6
Bundle sources: bundle the manifest
2017-04-13 13:32:33 +02:00
Simon Schampijer
f094ab7e55
Bundle sources: use git clone --shared for local sources checkout
...
Share the data with the read-only repository from
the extra sources.
2017-04-13 13:32:33 +02:00
Simon Schampijer
603801eeb8
Bundle sources: rename option to --extra-sources=DIR
...
The specified directory is added to the list of sources
and when downloading the sources it is looked up first
before the sources are tried to be downloaded.
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
16ca129253
Bundle sources: the path is always sources
2017-04-13 13:32:33 +02:00
Simon Schampijer
e473ca3b46
Bundle sources: add flag --bundle-sources to control the bundling
...
By default the bundling feature is turned off.
2017-04-13 13:32:33 +02:00
Simon Schampijer
057f420b47
Bundle sources: add support to bundle patches as well
...
Also add the necessary bits to consume the patches
stored.
2017-04-13 13:32:33 +02:00
Simon Schampijer
023dbecea5
Bundle sources: add support for bzr
...
This adds the bits needed to bundle bzr sources
and to consume them when provided to flatpak-builder
with the command line option.
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
Timm Bäder
4dc8ba3773
builder-manifest: Rename localized icon fields as well
...
The Icon= field inside desktop files is translatable, so rename all the
translated versions if the translation matches the untranslated icon
name.
2017-04-07 13:20:44 +02:00
Alexander Larsson
3f9e72c793
builder: Support sdk-extensions also for apps
...
For apps this just means we ensure that the required sdk extension are
available.
2017-04-04 15:52:36 +02:00
Alexander Larsson
fae922584c
builder: Add commit property to git source
...
If branch is unset this is just a nicer way to set a
particular commit. However if both are set, then we verify
that the branch/tag is at that particular commit. This is
a nice way to document that we want to use a particular tag
but still protect against the tag changing or a MITM attack
modifying what that tag means.
2017-04-04 15:21:11 +02:00
Alexander Larsson
3459ef8655
builder: Add disable-fsckobjects to git sources
...
This lets you work around clone problems for broken
git repositories.
Fixes https://github.com/flatpak/flatpak/issues/661
2017-04-04 14:31:48 +02:00
Bartłomiej Piotrowski
ac8ef8f36f
builder: make appstream-compose failure fatal
2017-03-30 15:48:38 +02:00
Matthew Leeds
d272a4d4cc
builder: Don't pass --require-version along to build
...
The --require-version option works for build-finish but not build, so
don't pass it along when using a manifest to build.
2017-03-28 08:51:36 +02:00
Matthew Leeds
543c0735f1
builder: Add a hint about --force-clean
2017-03-27 12:52:46 +02:00
Colin Walters
64fd2c2a8d
Bump libglnx, use new glnx_throw(), fix callers
...
One benefit here becomes immediately obvious - `flatpak_fail()` was lacking
`G_GNUC_PRINTF` which meant we missed a lot of type checking. Fix up the
callers.
2017-03-27 10:42:36 +02:00
Alexander Larsson
b00b8b1601
builder: Add --default-branch=BRANCH
2017-03-21 13:16:29 +01:00
Alexander Larsson
c7086364be
builder: Handle absolute paths in command
...
Don't fail with "not found" in this case because we're checking
the absolute path on the host, not in the final sandbox.
2017-03-20 17:55:14 +01:00
Alexander Larsson
9a62c456e3
builder: Remove all SDK extension from the platform
...
Instead of hardoding the locale and debug one.
This allows us to have SDK-specific extensions that
are not in the platform
2017-03-16 21:20:29 +01:00
André Klitzing
567802749c
Fix some issues with musl
...
* Use realpath instead of canonicalize_file_name
* Add missing include
2017-03-15 10:14:39 +01:00
Alexander Larsson
72e36b90a0
builder: Keep cache per arch
...
This just adds the arch name to the cache branch names, which
means a build on a different arch will not invalidate the other
arch:s build.
Fixes https://github.com/flatpak/flatpak/issues/628
2017-03-15 09:43:50 +01:00
Alexander Larsson
18f27f701b
flatpak-builder --run: Always enable the dbus proxy
...
This means we're able to own our own id as a name, etc.
2017-03-14 16:27:51 +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
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
4e2b103167
builder: Fix ordering of arch-specific build options
...
The arch-specific options override the generic ones,
not the other way around.
2017-03-14 10:37:12 +01:00
Alexander Larsson
0f0188aacb
builder: Add support for ldflags
2017-03-14 10:26:22 +01:00
Alexander Larsson
900d146810
builder: Don't strip already stripped binaries
2017-03-09 17:03:59 +01:00