Commit Graph

367 Commits (841e6c10a6754f860b1b0db1dd76bb7b7e54aba1)

Author SHA1 Message Date
Alexander Larsson bc7ebd20e2 builder: Allow .pyc files without .py
This is common for binary-only releases, for example as described
in:
https://lists.freedesktop.org/archives/flatpak/2017-June/000697.html
2017-06-13 11:17:06 +02:00
Philip Withnall 0888ec4701 builder-options: Fix setting CPPFLAGS
They were being set to an uninitialised set of flags from cxxflags.
Spotted as a compiler warning.

Signed-off-by: Philip Withnall <withnall@endlessm.com>
2017-06-06 20:09:16 +01: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 e69237f792 Handle app ids with dashes when ignoring locale/debug.
org.foo.foo-bar extensions become org.foo.foo_bar.Locale, etc, so
we need to handle this properly.
2017-05-30 18:07:46 +02:00
Alexander Larsson 333f308a2b builder: Don't warn for unknown properties starting with x-
Fixes https://github.com/flatpak/flatpak/issues/809
2017-05-26 16:34:43 +02:00
Mathieu Bridon 8b9df0ddcf Automatically use a separate builddir with Meson
Meson does not support builddir == srcdir, so there is no reason to
require developers to set "builddir" to true in their manifests, when we
can just do the right thing.
2017-05-24 15:18:26 +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
Matthias Clasen c2ed604b2e Add some hints when icons are not found
We have some extra conditions here that are not evident
from the rename-icon key in the manifest, so add some
verbose output to make it easier to figure out why an
icon is not renamed.
2017-05-22 09:25:44 +02:00
Alexander Larsson 4f828942f7 Update to latest libglnx and use the new GLnxTmpFile API 2017-05-22 09:08:49 +02:00
Alexander Larsson f4d8f5680b builder: Add CPPFLAGS similar to the existing flags 2017-05-22 08:50:18 +02:00
Alexander Larsson ff8c9ddef6 builder: Make c/cxx/ldflags not override env
This allows you to easily construct flags by appending,
but also lets you override it completely if necessary.
2017-05-22 08:41:30 +02:00
Alexander Larsson 617e3a4e4f builder: Fix segfault if appstream-compose fails
We were returning FALSE without initializing the GError.

Fixes https://github.com/flatpak/flatpak/issues/775
2017-05-19 12:00:58 +02:00
Alexander Larsson 411107a942 builder: Better debug output from the rofiles-fuse code
We now show the mount point and the source correctly.
2017-05-19 11:34:37 +02:00
Colin Walters bcced9adc7 Bump libglnx, port to new tmpfile API
I think the new tmpfile here is a lot better; there were places in flatpak where
we weren't doing "unlink on failure" etc.
2017-05-19 09:27:03 +02:00
Alexander Larsson 461084d1a9 builder: Add a install-rule to allow customized install
Fixes: https://github.com/flatpak/flatpak/issues/791
2017-05-15 09:38:22 +02:00
Alexander Larsson 4774b3c80f builder: Take "buildsystem" into consideration for cache freshness 2017-05-15 09:38:22 +02:00
Alexander Larsson fcfc732904 fix clang warning
clang complained about the undefined g_rmdir (because we didn't include
gstdio.h), so we use the regular rmdir instead.
2017-05-11 10:55:26 +02:00
Alexander Larsson 8c78700363 builder: Allow specifying the git commit if the branch is a tag
If the ref specified in "branch" is actually a tag, we were requiring
that the "commit" property must match "git rev-parse $branch", but
in the case of a tagname that actually expands to the id of the
tag object, not the commit id. We now also try to match against
"rev-parse $branch^{commit}" which expands to the actual commit
object.

We still allow the tag object for backwards compat.
2017-05-11 10:52:30 +02:00
Alexander Larsson 3d1b51b5c0 builder: Use mkdtemp for initial git/bzr checkout
Rather than just prepending _tmp this creates a unique
directory name, which means we don't run into issues
when retrying if the first checkout fails.

Fixes https://github.com/flatpak/flatpak/issues/786
2017-05-11 10:29:51 +02:00
Alexander Larsson 5cd90e416f builder: Fix ldflags support
Due to a cut-and-paste error we set it to cxxflags, not ldflags.
2017-05-04 09:42:52 +02:00
Colin Walters c50648a594 libglnx: Bump to latest master, use new file copy API
The new `glnx_regfile_copy_bytes()` is better than the previous
`flatpak_copy_bytes()` in that it will use reflink/sendfile if available.

More information in 3a4d0f4684
2017-04-28 10:04:22 -04:00
Alexander Larsson 8788f8a09e builder: Fix up unused variable warnings from clang 2017-04-24 21:48:57 +02:00
Alexander Larsson 8b13d3c5ee builder: Add progress reporing while downloading 2017-04-24 21:23:46 +02:00
Alexander Larsson 48d9cd8eae builder: Strip trailing whitespace in git submodule urls
Seen in the wild in https://github.com/Unvanquished/Unvanquished.git
2017-04-24 21:20:16 +02:00
Alexander Larsson fa996e704b builder: Update bzr bundling
Never check out directly from the cached dir, instead always
create a .flatpak-builder/bzr/ directory we can later
update from by branching from the cache and then rewriting
the parent location.
2017-04-24 15:24:05 +02:00
Alexander Larsson f4f2625f59 builder: Change how we handle pre-existing git sources
We always have a local git checkout in .flatpak-builder/git
so that we can later update in it. However, if --extra-sources
is used and the git repo exists there, we use the data there
to clone the initial repo, to avoid lots of traffic on the network.

Additionally, if --disable-update is specified we just straight
clone the local cache repo, and then rewrite the origin to the
real one. This means we never do any network i/o to the original
pull.
2017-04-24 14:13:36 +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 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