Commit Graph

61 Commits (master)

Author SHA1 Message Date
Dan Nicholson aec06b3945 Support passing --token-type to build-export
Provide a --token-type command line option and a token-type manifest
property that allows passing the token type to build-export. The
manifest property takes precendence over the CLI option. In either case,
the value will be passed to build-export if it's >= 0. This requires
flatpak >= 1.6 to use the --token-type option in build-export.
2020-03-19 16:29:27 +01:00
Bastien Nocera 3fda50c199 source archive: Add 7zip support 2020-03-19 16:27:30 +01:00
Bastien Nocera 38b6c80a3b archive source: Allow overriding the archive type
This allows unpacking files that would otherwise not be recognised as of
a particular type, such as self-extracting files supported by zip, 7z or
cabextract.
2020-03-19 16:27:30 +01:00
Bastien Nocera 35e8761268 doc: Fix typos 2019-10-15 13:16:38 +02:00
Linus Jahn 28aaaaa55e source-git: Add option to disable submodules
Closes: #295
Approved by: alexlarsson
2019-09-13 10:51:18 +00:00
Bastien Nocera 0e88f5430c docs: Fix default value for script source's "dest-filename"
The description for "dest-filename" was copy/pasted from the "file"
source's documentation for the same property. The default filename is
actually autogen.sh
2019-02-13 18:34:57 -05:00
Alexander Larsson 00f63cfe7e manifest: Add default-branch key
This is similar to branch and used if branch is not set. However, this
key (as opposed to branch) is overridden by the --default-branch option.

The idea is that most apps in flathub would use default-branch=stable, so
that a standart flatpak-builder command will build a "stable" release.
However, when building a test build we can use --default-branch=test to
override that. Then special cases like theme extensions and other things
that require a specific branch value to work at all can use branch="1.0".

Closes: #264
Approved by: alexlarsson
2019-01-26 03:16:27 +00:00
Matthias Clasen e040f26d87 docs: Clarify that command: is only for flatpak run
This may not otherwise be obvious.

Closes: #258
Approved by: alexlarsson
2019-01-16 11:42:07 +00:00
Alexander Larsson 4d2ff1a196 build-options: Allow null values to unset env vars
Closes: #257
Approved by: alexlarsson
2019-01-14 10:31:42 +00:00
Olaf Leidinger 81996ddaed Mention git via SSH
Closes: #253
Approved by: alexlarsson
2019-01-10 11:25:53 +00:00
Alexander Larsson 0dad44b214 patch source: Add paths option to specify multiple patches
In many cases you have a list of patches to apply, with the same
args. This allows you to do that by just listing the patches in
order, thus making the manifest more compact.

Closes: #204
Approved by: alexlarsson
2018-08-17 10:22:17 +00:00
eszlari e64943f2ff doc: add FLATPAK_BUILDER_BUILDDIR
Closes: #202
Approved by: TingPing
2018-08-13 18:02:24 +00:00
Yi-Soo An e4f4cbe220 doc: Replace git.gnome.org with gitlab.gnome.org
Closes: #194
Approved by: mwleeds
2018-08-08 03:48:11 +00:00
P. F. Chimento 895fe4744a manpage: More info about extension metadata.
This refers to the flatpak-metadata manpage for more info on the extension
metadata properties, as well as clarifying a key piece of information about
the directory property.

See flatpak#1341.
Closes: #187
Approved by: TingPing
2018-07-26 14:16:01 +00:00
Matthew Leeds c94db14939 doc: Uncomment P2P docs
Now that P2P support is enabled unconditionally, uncomment the
P2P-related parts of the man pages.
2018-06-29 11:03:07 -07:00
Bastien Nocera d5cfd1e873 builder: Add "use-git-am" option to apply patches with git-am
So that git-formatted patches are used to their full effect, such as
handling renames correctly.
2018-06-27 16:33:19 +02:00
Bastien Nocera ecb82a4e18 builder: Add "git-init" option for archives
This will initialise a git repository with the archive's contents, to
allow us to apply git-formatted patches easily, allowing binary files
patching, file renaming, and all the advanced features offered by git
patches over plain patches.
2018-06-27 16:33:19 +02:00
Alexander Larsson 9c10e1d086 file/archive source: Add mirror-urls 2018-06-21 11:48:38 +02:00
Alexander Larsson a415eed100 archive source: Add dest-filename support
This allows you to override the base-name, which affects how the
file is uncompressed.

Fixes https://github.com/flatpak/flatpak-builder/issues/158
2018-06-21 10:47:21 +02:00
Thomas Kluyver b23b2667b2 Expand on what a command is 2018-06-11 15:51:55 +02: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 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 c5b7a8e645 Add 'libdir' as build option.
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 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 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 4510aa2359 Add SVN source type
Closes: #135
Approved by: alexlarsson
2018-04-25 17:07:44 +00: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 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
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 1619ef1861 Add inherit-sdk-extensions property
This is similar to inherit-extensions, but the extensions
are not also inherited into the platform when it is created.

Closes: #121
Approved by: alexlarsson
2018-03-27 14:10:15 +00:00
Alexander Larsson b9a143cc9c build options: Add prepend-*-path options
This is useful for example if you're using a sdk-extension that
is supposed to override some binaries from /usr/bin.

Closes: #119
Approved by: alexlarsson
2018-03-27 13:18:09 +00:00
Will Thompson c06ee375c3 docs: fix "concatinated" and "inbetween" typos
"In between" is two separate words, but I think rewording it is clearer.

Closes: #94
Approved by: pwithnall
2018-01-08 10:54:53 +00:00
Alexander Larsson 6529c39083 Support including json snippet for sources
This allows inclusion of sources from an external json source similar
to how we do it for modules.

For example, you can use:

"sources": [
    {
        "type": "shell",
        "commands": [ "echo BEFORE include" ]
    },
    "include.json",
    {
        "type": "shell",
        "commands": [ "echo AFTER include" ]
    }
]

with include.json containing:
[
    {
        "type": "shell",
        "commands": [ "echo Shell 1" ]
    },
    {
        "type": "shell",
        "commands": [ "echo Shell 2" ]
    }
]

This is very useful in the case where the included file is
auto-generated from some other source, such as an npm lockfile.

Closes: #77
Approved by: alexlarsson
2017-12-08 15:00:56 +00:00
Alexander Larsson adc84ac4ca
Add more checksum types for files and archives (#75)
* Add more checksum types for files and archives

Many upstreams don't use sha256, some use even stronger checksums like
sha512, and its nice to be able to use these. Some system uses
weaker checksums, which you can work around by recomputing your own,
but sometimes that is a bit painful, for example when you're
auto-generating flatpak-builder manifests based on some other format
such as npm lock files.

This adds all the checksum types that GChecksum supports in the
glib version we currently use: md5, sha1, sha256, sha512
2017-12-07 15:40:04 +01:00
Alexander Larsson 0797c72db7 Add support for running tests
Modules that say "run-tests": true, will run tests after installation,
unless disabled by --disable-tests.

The tests run by default are make check or ninja test, however you
can control the make/ninja target with test-rule, or supply a list
of commands with test-commands. There is also a test-args argument
in build-options, which you can use to give e.g. network access.

The tests are run with readonly access to the install directory, so
they cannot affect the build results.

Closes: #65
Approved by: alexlarsson
2017-11-16 08:09:21 +00:00
Alexander Larsson cd6a5f4bfb Add append-pkg-config option
Closes: #64
Approved by: alexlarsson
2017-11-14 12:02:58 +00:00
Alexander Larsson ac6a25c981 Add option to disable shallow clone for git sources
Closes: #55
Approved by: alexlarsson
2017-10-30 10:57:35 +00:00
Alexander Larsson 01eb5dc945 Add prepare-platform-commands property
This allows you to modify the base platform, before applying the
new files. For instance, this is one way to fix
https://github.com/flatpak/flatpak/issues/1024#issuecomment-333321323
where we need to remove old gstreamer plugins from the base.
2017-10-09 13:29:19 +02:00
Alexander Larsson 34710550ef Automatically compress debug info unless no-debuginfo-compression is set
This uses eu-elfcompress to compress the debuginfo. We use the older
zlib-gnu compression format which is older and has more widespread
support.

Closes: #43
Approved by: alexlarsson
2017-10-05 18:11:21 +00:00
Alexander Larsson 5818790510 Add extra-data source type
All this does is construct a finish arg, but it makes it a lot nicer
to create extra-data using manifest. Additionally, it allows you to
create per-arch extra data if you set only-arches on the source.

Closes: #40
Approved by: alexlarsson
2017-09-29 07:01:53 +00:00
Alexander Larsson 9f3e786c29 Add appdata-license field
This lets you modify the project_license field in the appdata file.
This is useful because appdata files from upstream generally only
contain license information for the app itself, whereas the
bundled app may contain other code with additional licenses.

Closes: #41
Approved by: alexlarsson
2017-09-29 07:01:40 +00:00
Alexander Larsson 38f409a041 Add make-args and make-install-args to build-options
This lets you override these on a per-arch level.

Fixes https://github.com/flatpak/flatpak/issues/1029
2017-09-22 17:07:22 +02:00
Alexander Larsson 2c86d53b63 Add locale-subset support to add-extension 2017-09-21 17:06:16 +02:00
Alexander Larsson 6b7b5fae0a Add tag property for git sources
This is essentially an alias for branch, but makes the json
nicer to read.
2017-09-18 16:03:48 +02:00
Alexander Larsson 21cd4963b1 Add append-path and append-ld-libary-path build options
These are useful for e.g. sdk extensions.
2017-09-06 19:47:12 +02:00
Alexander Larsson c6ef29c06b builder: Add support for defining extensions in flatpak-builder
This takes a list of properties and generate finish arguments.
Additionally you can specify "bundle": true, which causes f-b to emit
an actual extension implementation, similar to e.g. the locale
and debuginfo extension.
2017-08-21 15:46:06 +02:00