diff --git a/docs/flatpak-builder-docs.html b/docs/flatpak-builder-docs.html index f3a60c0c..bd5592b1 100644 --- a/docs/flatpak-builder-docs.html +++ b/docs/flatpak-builder-docs.html @@ -1,5 +1,5 @@ -Flatpak Builder Command Reference

Flatpak Builder Command Reference

Version 1.4.6


Important

+Flatpak Builder Command Reference

Flatpak Builder Command Reference

Version 1.4.7


Important

The command reference is generated from the flatpak-builder repo; see https://github.com/flatpak/flatpak-builder/tree/master/doc

Flatpak-builder is a tool to build flatpak applications. @@ -200,6 +200,19 @@

--extra-sources=SOURCE-DIR

When downloading sources (archives, files, git, bzr, svn), look in this directory for pre-existing copies and use them instead of downloading. + The directory must match the state directory structure: +

  • Files and archives must be inside the folder: downloads/<sha256>/

  • + Sources of type git, bzr and svn + must be inside the folder: <type>/<converted-uri>/ +

+ The converted-uri is constructed from path or url (in case of git) + and from url (in case of bzr and svn). :// is converted to a single + underscore and every other / is replaced by an underscore. For example, https://github.com/user/repo.git + becomes https_github.com_user_repo.git. + + In case of svn sources if revision is present, the folder name is + svn/<converted-uri>__r<revision>/. In case of git + sources, it needs to be a mirrored clone.

--extra-sources-url=URL

When downloading sources (archives, files, git, bzr, svn), look at this url for mirrored downloads before downloading from the original url. @@ -338,20 +351,19 @@ These are the properties that are accepted:

id or app-id (string)

A string defining the application id.

Note, "app-id" is deprecated and preserved only for backwards compatibility.

branch (string)

The branch to use when exporting - the application. If this is unset the defaults - come from the default-branch option.

This key overrides both the default-branch + the application. If this is unset the default + comes from the default-branch option.

This key overrides both the default-branch key, and the --default-branch commandline option. Unless you need a very specific branchname (like for a runtime or an extension) it is - recommended to use the default-branch key instead, because - you can then override the default using --default-branch when - building for instance a test build.

default-branch (string)

The default branch to use when + recommended to use the default-branch key instead, as + that can be overridden by the --default-branch option.

default-branch (string)

The default branch to use when exporting the application. Defaults to master.

This key can be overridden by the --default-branch commandline option.

collection-id (string)

The collection ID of the repository, defaults to being unset. Setting a globally unique collection ID allows the apps in the repository to be shared over - peer to peer systems without needing further configuration. + peer-to-peer systems without needing further configuration. If building in an existing repository, the collection ID must match the existing configured collection ID for that repository.

extension-tag (string)

If building an extension, the tag for the extension @@ -369,7 +381,7 @@ implies that authentication will be needed to install the flatpak.

runtime (string)

The name of the runtime that the application uses.

runtime-version (string)

The version of the runtime that the application uses, defaults to master.

sdk (string)

The name of the development runtime that the application builds with.

var (string)

Initialize the (otherwise empty) writable /var in the build with a copy of this runtime.

metadata (string)

Use this file as the base metadata file when finishing.

command (string)

The filename or path to the main binary of the application. Note that this - is really just a single file, not a commandline. If you want to pass arguments, + must be a single executable, not a commandline or an absolute path. If you want to pass arguments, install a shell script wrapper and use that as the command.

Also note that the command is used when the application is run via @@ -404,12 +416,12 @@ needed).

prepend-ld-library-path (string)

This will get prepended to LD_LIBRARY_PATH in the build environment (with an trailing colon if needed).

append-pkg-config-path (string)

This will get appended to PKG_CONFIG_PATH in the build environment (with an leading colon if needed).

prepend-pkg-config-path (string)

This will get prepended to PKG_CONFIG_PATH in the build environment (with an trailing colon if - needed).

env (object)

This is a dictionary defining environment variables to be set during the build. Elements in this override the properties that set the environment, like cflags and ldflags. Keys with a null value unset the corresponding variable.

secret-env (array of strings)

This is a array defining which host environment variables is transfered to build-commands or post-install environment.

build-args (array of strings)

This is an array containing extra options to pass to flatpak build.

test-args (array of strings)

Similar to build-args but affects the tests, not the normal build.

config-opts (array of strings)

This is an array containing extra options passed to the build system during configuration.

secret-opts (array of strings)

This is an array of options that will be passed to - configure, meant to be used to pass secrets through host environment variables. Put - the option with an environment variables and will be resolved beforehand. '-DSECRET_ID=$CI_SECRET'

make-args (array of strings)

An array of extra arguments that will be passed to make

make-install-args (array of strings)

An array of extra arguments that will be passed to make install

strip (boolean)

If this is true (the default is false) then all ELF files will be stripped after install.

no-debuginfo (boolean)

By default (if strip is not true) flatpak-builder extracts all debug info in ELF files to a separate files - and puts this in an extension. If you want to disable this, set no-debuginfo to true.

no-debuginfo-compression (boolean)

By default when extracting debuginfo we compress the debug sections. If you want to disable this, set no-debuginfo-compression to true.

arch (object)

This is a dictionary defining for each arch a separate build options object that override the main one.

Extension

- Extension define extension points in the app/runtime that can be implemented by extensions, supplying extra files - which are available during runtime.. + needed).

env (object)

This is a dictionary defining environment variables to be set during the build. Elements in this override the properties that set the environment, like cflags and ldflags. Keys with a null value unset the corresponding variable.

secret-env (array of strings)

This is an array defining which host environment variables are transfered to the build-commands or post-install environment.

build-args (array of strings)

This is an array containing extra options to pass to flatpak build.

test-args (array of strings)

Similar to build-args but affects the tests, not the normal build.

config-opts (array of strings)

This is an array containing extra options passed to the build system during configuration.

secret-opts (array of strings)

This is an array of options that will be passed to + configure. This is meant to be used to pass secrets through host environment variables. + Environment variables in the options will be expanded. '-DSECRET_ID=$CI_SECRET'

make-args (array of strings)

An array of extra arguments that will be passed to make

make-install-args (array of strings)

An array of extra arguments that will be passed to make install

strip (boolean)

If this is true (the default is false) then all ELF files will be stripped after install.

no-debuginfo (boolean)

By default (if strip is not true) flatpak-builder extracts all debug info in ELF files to separate files + and puts them into an extension. If you want to disable this, set no-debuginfo to true.

no-debuginfo-compression (boolean)

By default when extracting debuginfo the debug sections are compressed. If you want to disable this, set no-debuginfo-compression to true.

arch (object)

This is a dictionary defining a separate build options object for each arch, to override the main build options.

Extension

+ Defines extension points in the app or runtime that can be implemented by extensions, + supplying extra files which are available during runtime.

These are the properties that are accepted:

directory (string)

@@ -420,7 +432,7 @@ created in the extension directory is omitted from the result, and instead packaged in a separate extension.

remove-after-build (boolean)

If this is true, the extension is - removed during when finishing. This is only + removed when finishing. This is only interesting for extensions in the add-build-extensions property.

Additionally the standard flatpak extension properties @@ -484,7 +496,8 @@ build/$modulename-$count in the state dir (which is typically .flatpak-builder/). Additionally there is a symlink build/$modulename to the latest version. In order to generate reproducible builds this directory is also mounted as /run/build/$modulename - in the sandbox (or /run/build-runtime/$modulename when building runtimes). + in the sandbox (or /run/build-runtime/$modulename when building runtimes) and also as + /run/active-build since 1.4.7. This is used as current working directory for all build ops.

The destination directory for installation is accessible for writing at the place it will seen at runtime.