Commit Graph

3224 Commits (8f001994804e5c388ae1787381bd765250c83c9b)
 

Author SHA1 Message Date
Alexander Larsson 8f00199480 Update CI to fedora 28
Closes: #163
Approved by: alexlarsson
2018-06-11 17:49:22 +00:00
Thomas Kluyver b23b2667b2 Expand on what a command is 2018-06-11 15:51:55 +02:00
Denis Ollier 7bd6440b75 Don't prune build stages from cache with --{export,finish}-only
A commonly used CI workflow [1] is to chain the following steps:

    > flatpak-builder --stop-at=<module>
    > flatpak build <commands to build module from local checkout>
    > flatpak-builder --finish-only

Unfortunately, the last step always purge all the compilation cache
created by the first one. All build steps are marked unused by default
and since they are skipped due to the option --finish-only, all of them
are always pruned by the gc function.

As a result, flatpak-builder cache becomes useless, a full compilation
is always performed.

Improve this by not cleaning unused stages when no compilation is done
by flatpak-builder (i.e: when flatpak-builder is used with --export-only
or --finish-only option).

[1]: https://gitlab.gnome.org/GNOME/Initiatives/wikis/DevOps-with-Flatpak
2018-06-11 15:47:39 +02:00
Denis Ollier 85eb2f1a64 Print more useful cURL error messages 2018-06-08 12:29:37 +02:00
Alexander Larsson d03b2797a7 Update libglnx module url 2018-05-30 12:41:05 +02:00
Denis Ollier 4bb33efbd8 Make libcurl return error on HTTP response >= 400
Closes: #157
Approved by: alexlarsson
2018-05-28 08:05:51 +00:00
Denis Ollier 4e8539ccd9 doc: fix typos in flatpak-manifest man page
Closes: #157
Approved by: alexlarsson
2018-05-28 08:05:51 +00:00
Alexander Larsson dd80a13e1b Work around libsoup type initialization deadlocks
As reported in
https://bugzilla.gnome.org/show_bug.cgi?id=796031#c1
we sometimes hang in libsoup downloading stuff. This uses
an early type initialization to avoid that.

We don't use libsoup for the main download anymore, but
its still used for some things, so better safe than sorry.

Closes: #153
Approved by: alexlarsson
2018-05-18 06:20:48 +00:00
Denis Ollier 74e43641ee flatpak-utils: Remove undefined functions
Closes: #152
Approved by: alexlarsson
2018-05-16 08:12:37 +00:00
Denis Ollier aa402ca259 flatpak-utils: Remove libsoup dead code
Closes: #152
Approved by: alexlarsson
2018-05-16 08:12:37 +00:00
Denis Ollier 9d0aa6f42e Rename download_uri() to download_data_uri()
Closes: #152
Approved by: alexlarsson
2018-05-16 08:12:37 +00:00
Denis Ollier 1f46ee7e8c Use libcurl for HTTP downloads as well
Closes: #151
Approved by: alexlarsson
2018-05-15 10:16:15 +00:00
Alexander Larsson c485399fed Allow C99 2018-05-14 16:02:42 +02:00
Alexander Larsson 31f92b5044 Fix C99 warning on rhel7 2018-05-14 15:53:20 +02:00
Denis Ollier 46f247cc1a ci: install libcurl-devel package
Closes: #143
Approved by: TingPing
2018-05-14 09:54:39 +00:00
Denis Ollier a922cd49a4 Add support for FTP sources using libcurl
Closes: #143
Approved by: TingPing
2018-05-14 09:54:39 +00:00
Alexander Larsson 36f620240e BuildOptions: Drop sdk-default-override
We now have the xxxflags-override keys to do this in a more generic way.

Closes: #150
Approved by: alexlarsson
2018-05-14 08:43:56 +00:00
Alexander Larsson ae48dbc21e BuildOptions: Add *flags-override keys
This is a more generic way than sdk-default-override to change how the various
flag fields are overridden. Now you can override both the sdk default as well as
in-file options.

Closes: #150
Approved by: alexlarsson
2018-05-14 08:43:56 +00:00
P. F. Chimento 808ebb41f6 Fix extra-data size type in manifest manpage
At least as of 0.10.10, this needs to be a number.
Closes: #149
Approved by: TingPing
2018-05-09 02:36:32 +00:00
Valentin David e6f694bc23 Add field 'sdk-default-override' in build options
Closes: #148
Approved by: alexlarsson
2018-05-07 15:26:15 +00:00
Valentin David 4e614fd513 Use SDK configuration in build options.
Closes: #148
Approved by: alexlarsson
2018-05-07 15:26:15 +00:00
Valentin David 37b9ea8d5d Load SDK configuration file.
Closes: #148
Approved by: alexlarsson
2018-05-07 15:26:15 +00:00
Valentin David 9d0a01eda4 Use 'libdir' build option.
Closes: #148
Approved by: alexlarsson
2018-05-07 15:26:15 +00:00
Valentin David c5b7a8e645 Add 'libdir' as build option.
Closes: #148
Approved by: alexlarsson
2018-05-07 15:26:15 +00:00
Alexander Larsson 8af638bdd8 flatpak_spawn: Always spawn children untranslated
We need this as we sometimes (like flatpak info) parse the command output.

Closes: #148
Approved by: alexlarsson
2018-05-07 15:26:15 +00:00
Bartłomiej Piotrowski 4b81e2d7ad docs: Mention qmake buildsystem
Closes: #144
Approved by: barthalion
2018-05-03 18:00:09 +00:00
Alexander Larsson a6afcda4ca Add bison to CI
Closes: #145
Approved by: alexlarsson
2018-05-03 15:43:41 +00:00
Alexander Larsson 1fcd849ce3 When using --download-only skip some checks
When downloading only we will not be building, so we can skip all the checks for dependencies
and for the state-dir properties.

Closes: #145
Approved by: alexlarsson
2018-05-03 15:43:41 +00:00
Alexander Larsson 82f2de0936 tests: dist the yaml test files 2018-04-26 15:31:58 +02:00
Alexander Larsson 45a983f865 Bump version to 0.10.10 2018-04-26 12:03:06 +02:00
Alexander Larsson 2dcf397f95 Update NEWS for release 2018-04-26 12:02:55 +02:00
Alexander Larsson 87ff0ef94f docs: Mention yaml support 2018-04-26 11:51:59 +02:00
Alexander Larsson 7ea5de35c4 docs: Add build environment to manifest doc 2018-04-26 11:51:59 +02:00
Alexander Larsson 2391d046c3 Set FLATPAK_BUILDER_N_JOBS in build env
This is set to what flatpak itself would otherwise use for make -jN
and can be used in e.g. buildsystem simple modules.
2018-04-26 11:51:59 +02:00
Alexander Larsson 2d80983775 Add directory source
This adds a source type that copies an entire directory, optionally skipping
some files. Additionally it also skips the .flatpak-directory dir and
the build dir to avoid weird recursion.

Since we can't really checksum an entire directory a dir source is always
rebuilt.

Closes: #136
Approved by: alexlarsson
2018-04-26 07:15:38 +00:00
Alexander Larsson fa37c55e9c cache: Add builder_cache_checksum_random()
This is helpful when you have a source that should trigger a rebuild every time.

Closes: #136
Approved by: alexlarsson
2018-04-26 07:15:38 +00:00
Alexander Larsson aa2601dbb3 flatpak_cp_a: Add support for skipping some source files
Closes: #136
Approved by: alexlarsson
2018-04-26 07:15:38 +00:00
Alexander Larsson 4510aa2359 Add SVN source type
Closes: #135
Approved by: alexlarsson
2018-04-25 17:07:44 +00:00
Alexander Larsson c9df9b89fc Always pass --unshare=network when building sandboxed
It may be the case that we've e.g. specified a custom metadata file that
has network access, so always disable it explicitly during the builds.
2018-04-25 15:41:02 +02:00
Cosimo Cecchi 842b6400b7 doc: fix typo
Closes: #134
Approved by: mwleeds
2018-04-24 22:49:37 +00:00
Sam Spilsbury 6db7bbca71 doc: s/occurr/occur/
Closes: #132
Approved by: alexlarsson
2018-04-23 22:49:52 +00:00
Alexander Larsson ed2eabc65b --run: bind-mount both /run/build and /run/build-runtime
We need /run/build-runtime if what we're building was a runtime, and
its not clear what we're building, so just bind both.
2018-04-23 14:19:26 +02:00
Alexander Larsson e779d3c485 Support using app-extensions during the build
This adds add-build-extensions which is similar to add-extensions
except the extension is added at build-init time, so can be
used during the build. It can also optionally be removed after
the build is done.

This depends on the flatpak work in:
  https://github.com/flatpak/flatpak/pull/1598

With this I was able to build the following app which runs 32bit binaries
in a 64bit build:

```
{
    "app-id": "org.example.Multilib",
    "runtime": "org.freedesktop.Platform",
    "sdk": "org.freedesktop.Sdk",
    "runtime-version": "1.6",
    "command": "/usr/bin/true",
    "add-build-extensions": {
        "org.freedesktop.Platform.Compat32": {
            "directory": "lib/32bit",
            "add-ld-path": "lib",
            "version": "1.6"
        }
    },
    "modules": [
        {
            "name": "test 32bit",
            "buildsystem": "simple",
            "build-commands": [
                "ln -s /app/lib/32bit/lib/ld-linux.so.2 /app/lib/ld-linux.so.2",
                "/app/lib/32bit/bin/echo echoing from 32bit world"
            ]
        }
    ]
}
```

Closes: #129
Approved by: alexlarsson
2018-04-23 07:06:07 +00:00
Alexander Larsson 0de0b8d615 Fix non-yaml build 2018-04-19 15:50:49 +02:00
Alexander Larsson 3d62f01610 Record the built extensions in the metadata
This adds a section to the main metadata like:
```
[Build]
built-extension=org.the.App.Locale;
```

This can be used to figure out what refs where built that are
related to the app, for example if you want to bundle them all.

Closes: #128
Approved by: alexlarsson
2018-04-19 12:54:02 +00:00
Alexander Larsson 28984bcd81 Add libyaml-devel to CI install set
Closes: #127
Approved by: alexlarsson
2018-04-19 12:44:38 +00:00
Ryan Gonzalez e24c2218f1 Add YAML support as an alternative to JSON (closes #2)
Closes: #127
Approved by: alexlarsson
2018-04-19 12:44:38 +00:00
Sam Spilsbury 8eabc27920 manifest: Add support for "extension-tag"
This passes an --extension-tag to flatpak build-init which will
set the "tag" option on the ExtensionOf section in the metadata.

Closes: #126
Approved by: alexlarsson
2018-04-19 11:25:13 +00:00
Alexander Larsson cbca5b5dce Fix --install to not pass --subpath= to flatpak install
This isn't really right, as install doesn't handle an empty subpath
like that. In fact, doing so will break exports.

Closes: #124
Approved by: alexlarsson
2018-04-06 14:25:39 +00:00
Matthew Leeds d8e1ef8fb9 flatpak-builder(1): Add a missing comma 2018-03-30 18:32:00 -07:00