Commit Graph

2313 Commits

Author SHA1 Message Date
Alexander Larsson
02202b9e76 utils: Add flatpak_copy_bytes
This copies data from one fd to another.
2017-02-07 16:39:23 +01:00
Alexander Larsson
b585e4008e builder: Store the context in the BuilderCache
This allows the cache to respect global options
2017-02-07 16:39:23 +01:00
Alexander Larsson
4190458d8a Make flatpak-builder run not forward wrong build-finish flags
Some of the build-finish flags we may use make no sense
to pass to flatpak build, so skip them
2017-02-07 16:39:23 +01:00
AsciiWolf
8d4b95605e Added Czech translation 2017-02-07 09:06:08 +01:00
Alexander Larsson
8f62e46265 Add flatpak --gl-drivers to show the active drivers 2017-02-06 14:37:27 +01:00
Alexander Larsson
b24228277d Support appdata in share/metainfo also with rename-appdata-file 2017-02-06 11:59:03 +01:00
Jan Grulich
7c7c64c378 Search also in share/metainfo subdir for appstream metadata 2017-02-06 11:54:15 +01:00
Alexander Larsson
69235eeb77 builder: Support cleanup-platform-commands 2017-02-06 10:22:09 +01:00
Alexander Larsson
193a88e171 flatpak build: Support --sdk-dir= and --metadata=
We need these to be able to run processes in the newly created platform
in flatpak-builder, which we need for cleanup-platform-commands support.
2017-02-06 10:22:09 +01:00
Roger
1086be4316 Remove extra bracket 2017-02-04 10:25:54 +01:00
Alexander Larsson
2e453048e0 extensions: Support enable/install-if=active-gl-driver
Only use/download this extension if it matches an active gl driver.
2017-02-03 09:49:05 +01:00
Alexander Larsson
d4d15c7211 Initial flatpak_get_gl_drivers() implementation
This is supposed to list all the currently loaded "non-standard" gl drivers.
If FLATPAK_GL_DRIVERS is set, then that is used, otherwise it looks
for an nvidia driver and if so, uses that, and always adding "default"
at the end which is meant to resolve to a stable mesa fallback build, as
well as "host" which can be used if you have a host-side driver
as an unmaintained extension.
2017-02-03 09:48:16 +01:00
Alexander Larsson
160f3a9820 extensions: Handle priorities with merge-dirs 2017-02-03 08:17:22 +01:00
Alexander Larsson
c88f1aa835 extensions: Support merge-dirs=list..
This causes the listed directories to become symlink farms
into all the subdirectory extensions.
2017-02-02 13:56:34 +01:00
Alexander Larsson
4feb82e75b builder: Remove the sdk locale/debug extension from the platform
Without this the platform metadata has locale extensions from
both the sdk and the platform
2017-02-02 13:55:30 +01:00
Alexander Larsson
402ff9d738 build: Set FLATPAK_DEST to the mountpoint we're building into 2017-02-02 09:18:29 +01:00
Alexander Larsson
7eeda3b7b3 list: Don't error out if a ref is in the repo, but not deployed 2017-02-02 09:18:03 +01:00
Alexander Larsson
5e1d456b8b extensions: Support subdirectory-suffix=foo
If directory is "foo" and the extension id ends with ".ext" and
subdirectory-suffix is "sub" then the extension point will
be "/usr/foo/ext/sub" rather than just "/usr/foo/ext".

This is very useful when the extension point naming scheme is
"reversed". For instance, this happens for the /usr/share/themes directory.
An extension point for a gtk3 theme would be in /usr/share/themes/$NAME/gtk-3.0,
which could be achived by using subdirectory-suffix=gtk-3.0.
2017-02-01 19:59:12 +01:00
Alexander Larsson
a3da0b3da8 extensions: Add add_ld_path property
If your extension points set this, then each extension will have
the corresponding subdirectory added to LD_LIBRARY_PATH.

We also support a priority property in the ExtensionOf group
in the extensions themselves to set the search order.
2017-02-01 19:46:25 +01:00
Alexander Larsson
7f8ad5b3a1 extensions: Make extension tmpfs requirement independent on order
If we sort, or subset the extensions we use, then we can't just
set need_tmpfs on the first one, instead do the checking
for the first one when we're applying the extensions.
2017-02-01 19:42:57 +01:00
Alexander Larsson
cc6e72ce57 Respect flatpak required versions for runtimes (as well as apps) 2017-02-01 17:59:03 +01:00
Alexander Larsson
668a8d817b build: Fix support for flatpak-build and subdir extensions
In this case we need to create a tmpfs on the extension point
so that the real mountpoint can be created.
2017-02-01 17:59:03 +01:00
Alexander Larsson
56fe910fc1 Fix build-sign manpage example
Fixes https://github.com/flatpak/flatpak/issues/523
2017-01-31 10:45:38 +01:00
Alexander Larsson
475dcb178a Support extra-data for runtime extensions too
This is very interesting for e.g. the nvidia drivers
2017-01-30 17:00:53 +01:00
Mario Sanchez Prada
bfd43c1f98 Check if symlink target for /etc/localtime exists in the runtime
On unmonitored systems (if the session helper is not available), we
currently decide whether to create a symlink or a read-only bind mount
for /etc/localtime based on whether that's a symlink in the host or
not, but we don't check whether that symlink would be reachable in
the sandboxed environment, which might lead to bad situations.

This patch adds some extra checks relying on GFile's API to check
whether that symlink would be reachable before making the final
decision: if it's not, then do a bind mount despite of the file
being a symlink in the host.

https://github.com/flatpak/flatpak/issues/409
2017-01-30 14:35:04 +01:00
Alexander Larsson
7975dc489e tests: Remove some leftover debug spew 2017-01-30 14:33:43 +01:00
Mario Sanchez Prada
1d7357616b Don't ignore OSTree errors when fetching the extra-data sources
In extract_extra_data(), flatpak currently returns TRUE whenever
flatpak_repo_get_extra_data_sources() returns NULL, which is correct
most of the times since that's usually caused by the extra-data
finish-args argument not being present.

However, that operation relies on OSTree's ostree_repo_load_variant()
too, which could fail for unrelated reasons. And in those cases flatpak
would still keep returning TRUE here even in cases where the extra-data
sources could be there, but an error happened while retrieving it.

This seems to be a bug leading to unlikely -yet possible- situations,
where the user would end up with an "external app" like Spotify reported
to be succesfully installed but without the files/extra directory, which
is useless.
2017-01-30 12:25:39 +01:00
Alexander Larsson
9bb4bc8dff README: Add some text about installation
See e.g. https://github.com/flatpak/flatpak/issues/514
2017-01-30 12:14:29 +01:00
Alexander Larsson
55553af813 Remove old --with-priv-mode=caps
This doesn't work anymore
2017-01-30 12:11:55 +01:00
Christian
8897bc0857 Update German translation
Proof-read from https://l10n.gnome.org/vertimus/flatpak/master/po/de
2017-01-30 11:38:55 +01:00
Alexander Larsson
bebd932976 build-finish: Add support for --sdk and --runtime
This lets you override the sdk and runtime used for the app.
You can build in one sdk/runtime but then run the final app
in another.
2017-01-30 10:30:40 +01:00
Alexander Larsson
e38d980bca builder: Initial version of extension building support 2017-01-27 15:27:55 +01:00
Alexander Larsson
b8c3b5aa44 Fix tests now that build-init requires the runtime to be installed 2017-01-27 13:56:04 +01:00
Owen W. Taylor
5f12c9e328 flatpak-session-helper.c: Make failure of TIOCSCTTY a g_debug()
Just because stdout/stderr happen to be going to a terminal doesn't
necessarily mean that we want the command launched by HostCommand
to take ownership of the terminal - in the case where 'flatpak run'
is launched from a terminal, stderr will typically be left pointing
to the terminal for any command. In that case the terminal already
has a controlling process, and TIOCSCTTY will fail; avoid scary
messages by making the failure only a g_debug()
2017-01-27 10:47:13 +01:00
Alexander Larsson
84aed615da run: Fix e.g. --filesystem=xdg-config/foo without :create
Fixes https://github.com/flatpak/flatpak/issues/463
2017-01-27 10:43:59 +01:00
Alexander Larsson
7d4ca72cba builder: User the new --type=runtime to build runtimes 2017-01-27 10:07:23 +01:00
Alexander Larsson
ad51737f57 build-init: Support --type=extension and --type=runtime
This adds the lowlevel support for building extensions and
runtimes in a nicer way.
2017-01-26 18:19:46 +01:00
Alexander Larsson
e3555b4be0 build-init: Support prefs for sdk/runtime args
We now support specifying a general partial ref rather than just
the name for build-init.
2017-01-26 18:19:46 +01:00
Alexander Larsson
637f6e1c07 info: Split out pref lookup into helper function 2017-01-26 18:19:46 +01:00
Alexander Larsson
3f5311a444 build-finish: Support creating extension points 2017-01-26 18:19:46 +01:00
Alexander Larsson
bc5ea57226 Run: Make sure all mounted sources are read-only
It turned out that some sources where bind-mounted read-write
which should have been read-only:

 * Extensions
 * Fonts
 * resolv.conf
 * localtime
 * machine-id

Many of these are not generally writable by the user, but
some are, which is pretty bad. For instance if the an
app is user-installed it will be able to write to its
locale data.

We fix this by using --ro-bind where needed.
2017-01-26 18:19:46 +01:00
Alexander Larsson
fe0c8ef5af Fix unused variable 2017-01-26 18:19:46 +01:00
Alexander Larsson
19ea75c52c flatpak remotes: show both user and system by default
This makes it easier to know all that is available in a single
operation. We also show for each remote if it is user
or system.

See https://github.com/flatpak/flatpak/issues/505
2017-01-26 10:48:57 +01:00
Alexander Larsson
f0cad76ff8 Rename flatpak remote-list to flatpak remotes
The old name is deprecated and not documented, but still
works.

Fixes https://github.com/flatpak/flatpak/issues/482
2017-01-26 10:41:18 +01:00
Alexander Larsson
703824ab4b flatpak list: show more info by default
Even without -d this shows the whole ref, as well
as the source of the app (user/system) and if it
is a runtime.
This is important now as the default is to show
both user and system and both apps and runtime.
2017-01-26 10:29:07 +01:00
Alexander Larsson
aad7ccbf37 Make flatpak list show both apps and runtimes by default
This makes more sense and seems what people expect, as per:
https://github.com/flatpak/flatpak/issues/490
https://github.com/flatpak/flatpak/issues/505
2017-01-26 10:17:45 +01:00
Alexander Larsson
ab446ebac5 Make /etc writable when building a runtime
We make /etc just a symlink to /usr/etc when we're building a runtime
and /etc is supposed to be writable. Otherwise the bind-mount we
normally have there don't allow use to replace existing files in /etc.
2017-01-25 15:28:42 +01:00
Alexander Larsson
9bb9534f00 install: When installing app, if runtime update fails that is not fatal
For instance, if you're offline, but are installing a local app
we should not fail if the update of the runtime fails.

This fixes https://github.com/flatpak/flatpak/issues/507
2017-01-24 09:47:47 +01:00
Alexander Larsson
0bea92bd73 dbus-proxy: Make it work if XDG_RUNTIME_DIR not set
The socket directory then ended up in $HOME which was read-only, so
we couldn't create the socket. We solve this by putting the sockets
in a subdirectory and always making this directory writable in the
proxy.
2017-01-23 18:27:00 +01:00
Dušan Kazik
cee05a6d9f Updated slovak translation
Added some new strings
2017-01-23 18:23:57 +01:00