Flatpak Builder Manifest
flatpak-builder manifest files
| Type | object |
|---|---|
| File match |
**/*.flatpak.json
**/*.flatpak.yaml
**/*.flatpak.yml
|
| Schema URL | https://catalog.lintel.tools/schemas/schemastore/flatpak-builder-manifest/latest.json |
| Source | https://www.schemastore.org/flatpak-manifest.json |
Validate with Lintel
npx @lintel/lintel check
Configuration manifest for flatpak-builder describing how to build a Flatpak application or runtime
Properties
The name of the runtime that the application uses
The name of the development runtime that the application builds with
A string defining the application id
A string defining the application id
The branch to use when exporting the application. If this is unset the defaults come from the default-branch option
The default branch to use when exporting the application. Defaults to master. This key can be overridden by the --default-branch commandline option
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. If building in an existing repository, the collection ID must match the existing configured collection ID for that repository
If building an extension, the tag for the extension point to use. Since flatpak 0.11.4 a runtime may define multiple locations for the same extension point with the intention that different branches for the extension are mounted at each location. When building an extension it is necessary to know what extension point to install the extension to. This option resolves any ambiguity in which extension point to choose. If not specified, the default choice is to install into either the only location for the extension point or into the location for the untagged extension point. If there are multiple locations for the same extension point defined with different tags then an error will occur
The version of the runtime that the application uses, defaults to master
Initialize the (otherwise empty) writable /var in the build with a copy of this runtime
Use this file as the base metadata file when finishing
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, install a shell script wrapper and use that as the command. Also note that the command is used when the application is run via flatpak run, and does not affect what gets executed when the application is run in other ways, e.g. via the desktop file or D-Bus activation
Build a new runtime instead of an application
Build an extension
Separate out locale files and translations to an extension runtime. Defaults to true
When building a runtime sdk, also create a platform based on it with this id
The metadata file to use for the platform we create
If true, use a writable copy of the sdk for /usr. Defaults to true if build-runtime is specified
Run appstream-compose during cleanup phase. Defaults to true
Install these extra sdk extensions in /usr
Install these extra sdk extensions when creating the platform
Start with the files from the specified application. This can be used to create applications that extend another application
Use this specific version of the application specified in base. If unspecified, this uses the value specified in branch
Install these extra extensions from the base application when initializing the application directory
Inherit these extra extension points from the base application or sdk when finishing the build
Inherit these extra extension points from the base application or sdk when finishing the build, but do not inherit them into the platform
Add these tags to the metadata file
Object specifying the build environment
28 nested properties
This is set in the environment variable CFLAGS during the build. Multiple specifications of this (in e.g. per-arch area) are concatenated, separated by spaces
If this is true, clear cflags from previous build options before adding it from these options
This is set in the environment variable CPPFLAGS during the build. Multiple specifications of this (in e.g. per-arch area) are concatenated, separated by spaces
If this is true, clear cppflags from previous build options before adding it from these options
This is set in the environment variable CXXFLAGS during the build. Multiple specifications of this (in e.g. per-arch area) are concatenated, separated by spaces
If this is true, clear cxxflags from previous build options before adding it from these options
This is set in the environment variable LDFLAGS during the build. Multiple specifications of this (in e.g. per-arch area) are concatenated, separated by spaces
If this is true, clear ldflags from previous build options before adding it from these options
The build prefix for the modules (defaults to /app for applications and /usr for runtimes)
The build libdir for the modules (defaults to /app/lib for applications and /usr/lib for runtimes)
This will get appended to PATH in the build environment (with an leading colon if needed)
This will get prepended to PATH in the build environment (with an trailing colon if needed)
This will get appended to LD_LIBRARY_PATH in the build environment (with an leading colon if needed)
This will get prepended to LD_LIBRARY_PATH in the build environment (with an trailing colon if needed)
This will get appended to PKG_CONFIG_PATH in the build environment (with an leading colon if needed)
This will get prepended to PKG_CONFIG_PATH in the build environment (with an trailing colon if needed)
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
This is a array defining which host environment variables is transferred to build-commands or post-install environment
This is an array containing extra options to pass to flatpak build
Similar to build-args but affects the tests, not the normal build
This is an array containing extra options to pass to configure
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'
An array of extra arguments that will be passed to make
An array of extra arguments that will be passed to make install
If this is true (the default is false) then all ELF files will be stripped after install
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
By default when extracting debuginfo we compress the debug sections. If you want to disable this, set no-debuginfo-compression to true
This is a dictionary defining for each arch a separate build options object that override the main one
An array of objects specifying the modules to be built in order. String members in the array are interpreted as the name of a separate json or yaml file that contains a module
This is a dictionary of extension objects. The key is the name of the extension
This is a dictionary of extension objects similar to add-extensions. The main difference is that the extensions are added early and are available for use during the build
An array of file patterns that should be removed at the end. Patterns starting with / are taken to be full pathnames (without the /app prefix), otherwise they just match the basename
An array of commandlines that are run during the cleanup phase
Extra files to clean up in the platform
An array of commandlines that are run during the cleanup phase of the platform
An array of commandlines that are run after importing the base platform, but before applying the new files from the sdk. This is a good place to e.g. delete things from the base that may conflict with the files added in the sdk
An array of arguments passed to the flatpak build-finish command
Any desktop file with this name will be renamed to a name based on id during the cleanup phase
Any appdata (metainfo) file with this name will be renamed to a name based on id during the cleanup phase
Any mimetypes file with this name will me renamed to a name based on id during the cleanup phase
Any icon with this name will be renamed to a name based on id during the cleanup phase. Note that this is the icon name, not the full filenames, so it should not include a filename extension
Any mime icons with any of these names will be renamed to a name prefixed with id during the cleanup phase. Note that this is the icon name, not the full filenames, so it should not include a filename extension
Replace the appdata (metainfo) project_license field with this string. This is useful as the upstream license is typically only about the application itself, whereas the bundled app can contain other licenses too
If rename-icon is set, keep a copy of the old icon file
This string will be prefixed to the Name key in the main application desktop file
This string will be suffixed to the Name key in the main application desktop file
One of
Definitions
Custom property (ignored by flatpak-builder)
Comment property (ignored by flatpak-builder)
JSON schema (ignored by flatpak-builder)
Object specifying the build environment
This is set in the environment variable CFLAGS during the build. Multiple specifications of this (in e.g. per-arch area) are concatenated, separated by spaces
If this is true, clear cflags from previous build options before adding it from these options
This is set in the environment variable CPPFLAGS during the build. Multiple specifications of this (in e.g. per-arch area) are concatenated, separated by spaces
If this is true, clear cppflags from previous build options before adding it from these options
This is set in the environment variable CXXFLAGS during the build. Multiple specifications of this (in e.g. per-arch area) are concatenated, separated by spaces
If this is true, clear cxxflags from previous build options before adding it from these options
This is set in the environment variable LDFLAGS during the build. Multiple specifications of this (in e.g. per-arch area) are concatenated, separated by spaces
If this is true, clear ldflags from previous build options before adding it from these options
The build prefix for the modules (defaults to /app for applications and /usr for runtimes)
The build libdir for the modules (defaults to /app/lib for applications and /usr/lib for runtimes)
This will get appended to PATH in the build environment (with an leading colon if needed)
This will get prepended to PATH in the build environment (with an trailing colon if needed)
This will get appended to LD_LIBRARY_PATH in the build environment (with an leading colon if needed)
This will get prepended to LD_LIBRARY_PATH in the build environment (with an trailing colon if needed)
This will get appended to PKG_CONFIG_PATH in the build environment (with an leading colon if needed)
This will get prepended to PKG_CONFIG_PATH in the build environment (with an trailing colon if needed)
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
This is a array defining which host environment variables is transferred to build-commands or post-install environment
This is an array containing extra options to pass to flatpak build
Similar to build-args but affects the tests, not the normal build
This is an array containing extra options to pass to configure
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'
An array of extra arguments that will be passed to make
An array of extra arguments that will be passed to make install
If this is true (the default is false) then all ELF files will be stripped after install
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
By default when extracting debuginfo we compress the debug sections. If you want to disable this, set no-debuginfo-compression to true
This is a dictionary defining for each arch a separate build options object that override the main one
Extension define extension points in the app/runtime that can be implemented by extensions, supplying extra files which are available during runtime
The directory where the extension is mounted. If the extension point is for an application, this path is relative to /app, otherwise it is relative to /usr
If this is true, then the data created in the extension directory is omitted from the result, and instead packaged in a separate extension
If this is true, the extension is removed when finishing. This is only interesting for extensions in the add-build-extensions property
Whether to automatically delete extensions matching this extension point when deleting a 'related' application or runtime. Available since 0.6.7
Whether to automatically download extensions matching this extension point when updating or installing a 'related' application or runtime. Available since 0.6.7
If this key is set to true, then flatpak will look for extensions whose name is a prefix of the extension point name, and mount them at the corresponding name below the subdirectory. Available since 0.1
A condition that must be true for the extension to be auto-downloaded. As of 1.1.1 this supports multiple conditions separated by semi-colons
A condition that must be true for the extension to be auto-downloaded
A condition that must be true for the extension to be enabled. As of 1.1.1 this supports multiple conditions separated by semi-colons
A condition that must be false for the extension to be considered unused when pruning. For example, flatpak uninstall --unused uses this information
A list of relative paths of directories below the extension point directory that will be merged. Available since 0.9.1, and backported to the 0.8.x branch in 0.8.3
A suffix that gets appended to the directory name. This is very useful when the extension point naming scheme is reversed. For example, an extension point for GTK+ themes would be /usr/share/themes/$NAME/gtk-3.0, which could be achieved using subdirectory-suffix=gtk-3.0. Available since 0.9.1, and backported to the 0.8.x branch in 0.8.3
If set, then the extensions are partially downloaded by default, based on the currently configured locales. This means that the extension contents should be a set of directories with the language code as name. Available since 0.9.13 (and 0.6.6 for any extensions called *.Locale)
The branch to use when looking for the extension. If this is not specified, it defaults to the branch of the application or runtime that the extension point is for. Available since 0.4.1
The branches to use when looking for the extension. If this is not specified, it defaults to the branch of the application or runtime that the extension point is for. Available since 0.9.1, and backported to the 0.8.x branch in 0.8.4
Each module specifies a source that has to be separately built and installed. It contains the build options and a list of sources to download and extract before building. Modules can be nested, in order to turn related modules on and off with a single key
The name of the module, used in e.g. build logs. The name is also used for constructing filenames and commandline arguments, therefore using spaces or '/' in this string is a bad idea
If true, skip this module
An array of objects defining sources that will be downloaded and extracted in order. String members in the array are interpreted as the name of a separate json or yaml file that contains sources
An array of options that will be passed to configure
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'
An array of arguments that will be passed to make
An array of arguments that will be passed to make install
If true, remove the configure script before starting build
Ignore the existence of an autogen script
Don't call make with arguments to build in parallel
Name of the rule passed to make for the install phase, default is install
Don't run the make install (or equivalent) stage
Don't fix up the *.py[oc] header timestamps for ostree use
Use cmake instead of configure (deprecated: use buildsystem instead)
Build system to use: autotools, cmake, cmake-ninja, meson, simple, qmake
Use a build directory that is separate from the source directory
Build inside this subdirectory of the extracted sources
Object specifying the build environment
28 nested properties
This is set in the environment variable CFLAGS during the build. Multiple specifications of this (in e.g. per-arch area) are concatenated, separated by spaces
If this is true, clear cflags from previous build options before adding it from these options
This is set in the environment variable CPPFLAGS during the build. Multiple specifications of this (in e.g. per-arch area) are concatenated, separated by spaces
If this is true, clear cppflags from previous build options before adding it from these options
This is set in the environment variable CXXFLAGS during the build. Multiple specifications of this (in e.g. per-arch area) are concatenated, separated by spaces
If this is true, clear cxxflags from previous build options before adding it from these options
This is set in the environment variable LDFLAGS during the build. Multiple specifications of this (in e.g. per-arch area) are concatenated, separated by spaces
If this is true, clear ldflags from previous build options before adding it from these options
The build prefix for the modules (defaults to /app for applications and /usr for runtimes)
The build libdir for the modules (defaults to /app/lib for applications and /usr/lib for runtimes)
This will get appended to PATH in the build environment (with an leading colon if needed)
This will get prepended to PATH in the build environment (with an trailing colon if needed)
This will get appended to LD_LIBRARY_PATH in the build environment (with an leading colon if needed)
This will get prepended to LD_LIBRARY_PATH in the build environment (with an trailing colon if needed)
This will get appended to PKG_CONFIG_PATH in the build environment (with an leading colon if needed)
This will get prepended to PKG_CONFIG_PATH in the build environment (with an trailing colon if needed)
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
This is a array defining which host environment variables is transferred to build-commands or post-install environment
This is an array containing extra options to pass to flatpak build
Similar to build-args but affects the tests, not the normal build
This is an array containing extra options to pass to configure
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'
An array of extra arguments that will be passed to make
An array of extra arguments that will be passed to make install
If this is true (the default is false) then all ELF files will be stripped after install
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
By default when extracting debuginfo we compress the debug sections. If you want to disable this, set no-debuginfo-compression to true
This is a dictionary defining for each arch a separate build options object that override the main one
An array of commands to run during build (between make and make install if those are used). This is primarily useful when using the simple buildsystem. Each command is run in /bin/sh -c, so it can use standard POSIX shell syntax such as piping output
An array of shell commands that are run after the install phase. Can for example clean up the install dir, or install extra files
An array of file patterns that should be removed at the end. Patterns starting with / are taken to be full pathnames (without the /app prefix), otherwise they just match the basename. Note that any patterns will only match files installed by this module
The way the builder works is that files in the install directory are hard-links to the cached files, so you're not allowed to modify them in-place. If you list a file in this then the hardlink will be broken and you can modify it. This is a workaround, ideally installing files should replace files, not modify existing ones
If non-empty, only build the module on the arches listed
Don't build on any of the arches listed
Extra files to clean up in the platform
If true this will run the tests after installing
The target to build when running the tests. Defaults to 'check' for make and 'test' for ninja. Set to empty to disable
Array of commands to run during the tests
Array of paths to LICENSE files of the module
An array of objects specifying the modules to be built in order. String members in the array are interpreted as the name of a separate json or yaml file that contains a module
These contain a pointer to the source that will be extracted into the source directory before the build starts. They can be of several types, distinguished by the type property. Additionally, the sources list can contain a plain string, which is interpreted as the name of a separate json or yaml file that is read and inserted at this point. The file can contain a single source, or an array of sources
Type of the source
If non-empty, only build the module on the arches listed
Don't build on any of the arches listed
Directory inside the source dir where this source will be extracted
Type of the source
If non-empty, only build the module on the arches listed
Don't build on any of the arches listed
Directory inside the source dir where this source will be extracted
The path of the archive
The URL of a remote archive that will be downloaded. This overrides path if both are specified
A list of alternative urls that are used if the main url fails
Sets the HTTP "Referer" header when downloading the archive
Disables decompression of downloads over HTTP for misconfigured servers
The type of archive if it cannot be guessed from the path
Whether to initialise the repository as a git repository
The md5 checksum of the file, verified after download. Note that md5 is no longer considered a safe checksum, we recommend you use at least sha256
The sha1 checksum of the file, verified after download. Note that sha1 is no longer considered a safe checksum, we recommend you use at least sha256
The sha256 checksum of the file, verified after download
The sha512 checksum of the file, verified after download
The number of initial pathname components to strip during extraction. Defaults to 1
Filename to for the downloaded file, defaults to the basename of url
Type of the source
If non-empty, only build the module on the arches listed
Don't build on any of the arches listed
Directory inside the source dir where this source will be extracted
The path to a local checkout of the git repository. Due to how git-clone works, this will be much faster than specifying a URL of file:///
URL of the git repository. This overrides path if both are specified. When using git via SSH, the correct syntax is ssh://user@domain/path/to/repo.git
The branch to use from the git repository
The tag to use from the git repository
The commit to use from the git repository. If branch is also specified, then it is verified that the branch/tag is at this specific commit. This is a readable way to document that you're using a particular tag, but verify that it does not change
Don't use transfer.fsckObjects=1 to mirror git repository. This may be needed for some (broken) repositories
Don't optimize by making a shallow clone when downloading the git repo
Don't checkout the git submodules when cloning the repository
Don't explicitly fetch or checkout LFS git objects
URL of the bzr repository
Type of the source
If non-empty, only build the module on the arches listed
Don't build on any of the arches listed
Directory inside the source dir where this source will be extracted
A specific revision to use in the branch
URL of the svn repository, including branch/tag part
Type of the source
If non-empty, only build the module on the arches listed
Don't build on any of the arches listed
Directory inside the source dir where this source will be extracted
A specific revision number to use
The path of a local directory whose content will be copied into the source dir. Note that directory sources don't currently support caching, so they will be rebuilt each time
Type of the source
If non-empty, only build the module on the arches listed
Don't build on any of the arches listed
Directory inside the source dir where this source will be extracted
Source files to ignore in the directory
Type of the source
If non-empty, only build the module on the arches listed
Don't build on any of the arches listed
Directory inside the source dir where this source will be extracted
The path of a local file that will be copied into the source dir
The URL of a remote file that will be downloaded and copied into the source dir. This overrides path if both are specified
Sets the HTTP "Referer" header when downloading the file
Disables decompression of downloads over HTTP for misconfigured servers
A list of alternative urls that are used if the main url fails
The md5 checksum of the file, verified after download. Note that md5 is no longer considered a safe checksum, we recommend you use at least sha256
The sha1 checksum of the file, verified after download. Note that sha1 is no longer considered a safe checksum, we recommend you use at least sha256
The sha256 checksum of the file, verified after download
The sha512 checksum of the file, verified after download
Filename to for the downloaded file, defaults to the basename of url
An array of shell commands that will be put in a shellscript file
Type of the source
If non-empty, only build the module on the arches listed
Don't build on any of the arches listed
Directory inside the source dir where this source will be extracted
Filename to use inside the source dir, default to autogen.sh
Filename to use inside the source dir
Type of the source
If non-empty, only build the module on the arches listed
Don't build on any of the arches listed
Directory inside the source dir where this source will be extracted
Text data that will be put in the file
Whether content is base64-encoded
An array of shell commands that will be run during source extraction
Type of the source
If non-empty, only build the module on the arches listed
Don't build on any of the arches listed
Directory inside the source dir where this source will be extracted
Type of the source
If non-empty, only build the module on the arches listed
Don't build on any of the arches listed
Directory inside the source dir where this source will be extracted
The path of a patch file that will be applied in the source dir
An list of paths to patch files that will be applied in the source dir, in order
The value of the -p argument to patch, defaults to 1
Whether to use 'git apply' rather than 'patch' to apply the patch, required when the patch file contains binary diffs
Whether to use 'git am' rather than 'patch' to apply the patch, required when the patch file contains binary diffs. You cannot use this at the same time as use-git
Extra options to pass to the patch command
The name to use for the downloaded extra data
The url to the extra data
The sha256 of the extra data
The size of the extra data
Type of the source
If non-empty, only build the module on the arches listed
Don't build on any of the arches listed
Directory inside the source dir where this source will be extracted
The extra installed size this adds to the app (optional)