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