1FLATPAK BUILD-FINIS(1)       flatpak build-finish       FLATPAK BUILD-FINIS(1)
2
3
4

NAME

6       flatpak-build-finish - Finalize a build directory
7

SYNOPSIS

9       flatpak build-finish [OPTION...] DIRECTORY
10

DESCRIPTION

12       Finalizes a build directory, to prepare it for exporting.  DIRECTORY is
13       the name of the directory.
14
15       The result of this command is that desktop files, icons and D-Bus
16       service files from the files subdirectory are copied to a new export
17       subdirectory. In the metadata file, the command key is set in the
18       [Application] group, and the supported keys in the [Environment] group
19       are set according to the options.
20
21       As part of finalization you can also specify permissions that the app
22       needs, using the various options specified below. Additionally during
23       finalization the permissions from the runtime are inherited into the
24       app unless you specify --no-inherit-permissions
25
26       You should review the exported files and the application metadata
27       before creating and distributing an application bundle.
28
29       It is an error to run build-finish on a directory that has not been
30       initialized as a build directory, or has already been finalized.
31

OPTIONS

33       The following options are understood:
34
35       -h, --help
36           Show help options and exit.
37
38       --command=COMMAND
39           The command to use. If this option is not specified, the first
40           executable found in files/bin is used.
41
42           Note that the command is used when the application is run via
43           flatpak run, and does not affect what gets executed when the
44           application is run in other ways, e.g. via the desktop file or
45           D-Bus activation.
46
47       --require-version=MAJOR.MINOR.MICRO
48           Require this version of later of flatpak to install/update to this
49           build.
50
51       --share=SUBSYSTEM
52           Share a subsystem with the host session. This updates the [Context]
53           group in the metadata. SUBSYSTEM must be one of: network, ipc. This
54           option can be used multiple times.
55
56       --unshare=SUBSYSTEM
57           Don't share a subsystem with the host session. This updates the
58           [Context] group in the metadata. SUBSYSTEM must be one of: network,
59           ipc. This option can be used multiple times.
60
61       --socket=SOCKET
62           Expose a well-known socket to the application. This updates the
63           [Context] group in the metadata. SOCKET must be one of: x11,
64           wayland, fallback-x11, pulseaudio, system-bus, session-bus,
65           ssh-auth, pcsc. This option can be used multiple times.
66
67           The fallback-x11 option makes the X11 socket available only if
68           there is no Wayland socket. This option was introduced in 0.11.3.
69           To support older Flatpak releases, specify both x11 and
70           fallback-x11. The fallback-x11 option takes precedence when both
71           are supported.
72
73       --nosocket=SOCKET
74           Don't expose a well known socket to the application. This updates
75           the [Context] group in the metadata. SOCKET must be one of: x11,
76           wayland, fallback-x11, pulseaudio, system-bus, session-bus,
77           ssh-auth, pcsc. This option can be used multiple times.
78
79       --device=DEVICE
80           Expose a device to the application. This updates the [Context]
81           group in the metadata. DEVICE must be one of: dri, kvm, all. This
82           option can be used multiple times.
83
84       --nodevice=DEVICE
85           Don't expose a device to the application. This updates the
86           [Context] group in the metadata. DEVICE must be one of: dri, kvm,
87           all. This option can be used multiple times.
88
89       --allow=FEATURE
90           Allow access to a specific feature. This updates the [Context]
91           group in the metadata. FEATURE must be one of: devel, multiarch,
92           bluetooth, canbus. This option can be used multiple times.
93
94           The devel feature allows the application to access certain syscalls
95           such as ptrace(), and perf_event_open().
96
97           The multiarch feature allows the application to execute programs
98           compiled for an ABI other than the one supported natively by the
99           system. For example, for the x86_64 architecture, 32-bit x86
100           binaries will be allowed as well.
101
102           The bluetooth feature allows the application to use bluetooth
103           (AF_BLUETOOTH) sockets. Note, for bluetooth to fully work you must
104           also have network access.
105
106           The canbus feature allows the application to use canbus (AF_CAN)
107           sockets. Note, for this work you must also have network access.
108
109       --disallow=FEATURE
110           Disallow access to a specific feature. This updates the [Context]
111           group in the metadata. FEATURE must be one of: devel, multiarch,
112           bluetooth, canbus. This option can be used multiple times.
113
114       --filesystem=FS
115           Allow the application access to a subset of the filesystem. This
116           updates the [Context] group in the metadata. FS can be one of:
117           home, host, xdg-desktop, xdg-documents, xdg-download, xdg-music,
118           xdg-pictures, xdg-public-share, xdg-templates, xdg-videos, xdg-run,
119           xdg-config, xdg-cache, xdg-data, an absolute path, or a
120           homedir-relative path like ~/dir or paths relative to the xdg dirs,
121           like xdg-download/subdir. The optional :ro suffix indicates that
122           the location will be read-only. The optional :create suffix
123           indicates that the location will be read-write and created if it
124           doesn't exist. This option can be used multiple times.
125
126       --nofilesystem=FILESYSTEM
127           Remove access to the specified subset of the filesystem from the
128           application. This overrides to the Context section from the
129           application metadata. FILESYSTEM can be one of: home, host,
130           xdg-desktop, xdg-documents, xdg-download, xdg-music, xdg-pictures,
131           xdg-public-share, xdg-templates, xdg-videos, an absolute path, or a
132           homedir-relative path like ~/dir. This option can be used multiple
133           times.
134
135       --add-policy=SUBSYSTEM.KEY=VALUE
136           Add generic policy option. For example,
137           "--add-policy=subsystem.key=v1 --add-policy=subsystem.key=v2" would
138           map to this metadata:
139
140               [Policy subsystem]
141               key=v1;v2;
142
143
144           This option can be used multiple times.
145
146       --remove-policy=SUBSYSTEM.KEY=VALUE
147           Remove generic policy option. This option can be used multiple
148           times.
149
150       --env=VAR=VALUE
151           Set an environment variable in the application. This updates the
152           [Environment] group in the metadata. This overrides to the Context
153           section from the application metadata. This option can be used
154           multiple times.
155
156       --own-name=NAME
157           Allow the application to own the well known name NAME on the
158           session bus. If NAME ends with .*, it allows the application to own
159           all matching names. This updates the [Session Bus Policy] group in
160           the metadata. This option can be used multiple times.
161
162       --talk-name=NAME
163           Allow the application to talk to the well known name NAME on the
164           session bus. If NAME ends with .*, it allows the application to
165           talk to all matching names. This updates the [Session Bus Policy]
166           group in the metadata. This option can be used multiple times.
167
168       --system-own-name=NAME
169           Allow the application to own the well known name NAME on the system
170           bus. If NAME ends with .*, it allows the application to own all
171           matching names. This updates the [System Bus Policy] group in the
172           metadata. This option can be used multiple times.
173
174       --system-talk-name=NAME
175           Allow the application to talk to the well known name NAME on the
176           system bus. If NAME ends with .*, it allows the application to talk
177           to all matching names. This updates the [System Bus Policy] group
178           in the metadata. This option can be used multiple times.
179
180       --persist=FILENAME
181           If the application doesn't have access to the real homedir, make
182           the (homedir-relative) path FILENAME a bind mount to the
183           corresponding path in the per-application directory, allowing that
184           location to be used for persistent data. This updates the [Context]
185           group in the metadata. This option can be used multiple times.
186
187       --runtime=RUNTIME, --sdk=SDK
188           Change the runtime or sdk used by the app to the specified partial
189           ref. Unspecified parts of the ref are taken from the old values or
190           defaults.
191
192       --metadata=GROUP=KEY[=VALUE]
193           Set a generic key in the metadata file. If value is left out it
194           will be set to "true".
195
196       --extension=NAME=VARIABLE[=VALUE]
197           Add extension point info. See the documentation for flatpak-
198           metadata(5) for the possible values of VARIABLE and VALUE.
199
200       --remove-extension=NAME
201           Remove extension point info.
202
203       --extension-priority=VALUE
204           Set the priority (library override order) of the extension point.
205           Only useful for extensions. 0 is the default, and higher value
206           means higher priority.
207
208       --extra-data=NAME:SHA256:DOWNLOAD-SIZE:INSTALL-SIZE:URL
209           Adds information about extra data uris to the app. These will be
210           downloaded and verified by the client when the app is installed and
211           placed in the /app/extra directory. You can also supply an
212           /app/bin/apply_extra script that will be run after the files are
213           downloaded.
214
215       --no-exports
216           Don't look for exports in the build.
217
218       --no-inherit-permissions
219           Don't inherit runtime permissions in the app.
220
221       -v, --verbose
222           Print debug information during command processing.
223
224       --ostree-verbose
225           Print OSTree debug information during command processing.
226

EXAMPLES

228       $ flatpak build-finish /build/my-app --socket=x11 --share=ipc
229
230           Exporting share/applications/gnome-calculator.desktop
231           Exporting share/dbus-1/services/org.gnome.Calculator.SearchProvider.service
232           More than one executable
233           Using gcalccmd as command
234           Please review the exported files and the metadata
235

SEE ALSO

237       flatpak(1), flatpak-build-init(1), flatpak-build(1), flatpak-build-
238       export(1)
239
240
241
242flatpak                                                 FLATPAK BUILD-FINIS(1)
Impressum