Commit Graph

468 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
Matthew Leeds d996bb6884 doc/flatpak-builder: Improve explanation of --repo 2019-09-18 12:55:36 -07:00
Alexander Larsson aab7bcd5e9 Support --show-manifest
We want to use this in flathub to avoid all the problems we've having
parsing json manifests via the python parser, which isn't *quite* compatible
with json-glib (differs in comment and multiline string support for instance).

Closes: #307
Approved by: alexlarsson
2019-09-13 12:55:18 +00:00
Linus Jahn 28aaaaa55e source-git: Add option to disable submodules
Closes: #295
Approved by: alexlarsson
2019-09-13 10:51:18 +00:00
Olaf Leidinger 75c24ce291 Feature: Use CCACHE_DIR from environment, if set
Closes: #288
Approved by: alexlarsson
2019-09-13 10:40:24 +00:00
Matthew Leeds d5afdbccf8 doc/flatpak-builder: Clarify --run permissions
Looking at the implementation of builder_manifest_run(), it seems the
permissions used for flatpak-builder --run are the same as for the final
app, with the exception of filesystem permissions. So add that caveat to
the man page.

Closes: #303
Approved by: alexlarsson
2019-08-29 15:40:51 +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 ab72117fdd Add --add/remove-tag options
We'd like to use these in flathub.

Closes: #268
Approved by: alexlarsson
2019-02-04 10:02:33 +00: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
Marius Gedminas 29e4dd332a Mention YAML as an alternative manifest format 2018-11-02 19:46:12 +01:00
TingPing 669f82094f
docs: Fix typo in example 2018-10-10 17:01:55 -04: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 89f1fd534a doc: Point to the source of the generated HTML
When you're looking at the Flatpak Builder Command Reference on
docs.flatpak.org, it's not clear that it was generated from the
flatpak-builder repo. So add a notice to the docbook that's used to
generate the HTML. This was pointed out by
https://github.com/flatpak/flatpak-docs/pull/134
2018-07-07 17:26:22 +02: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
Matthew Leeds d8e1ef8fb9 flatpak-builder(1): Add a missing comma 2018-03-30 18:32:00 -07: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 7b042c61e6 Add --no-shallow-clone for git mirroring
This is useful e.g. when doing mirroring only, or if your git
has issues with shallow clones.

Closes: #120
Approved by: alexlarsson
2018-03-27 13:41:42 +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
eyelash d329cef849 fix a typo 2018-02-19 13:49:15 +01: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 050feb1294 Add --install argument
This allows you to build and install the result in a single operation.
If a --repo is given the app is installed from there, otherwise we
build-export it to the flatpak-builder cache repo, which already has
all the objects that are needed in it, so this will not increase
disk-use.

Closes: #81
Approved by: alexlarsson
2017-12-14 09:27:59 +00:00
Alexander Larsson 2075da5919 docs: Fix spelling
Closes: #81
Approved by: alexlarsson
2017-12-14 09:27:59 +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