Commit Graph
2310 Commits
Author SHA1 Message Date
Richard Hughes 48e0543661 Don't include newlines in error messages
(cherry picked from commit d2307ca8b1)
2017-02-28 19:53:22 +01:00
Richard Hughes ae45231173 Return the container from flatpak_get_system_installations()
This matches what other functions in libflatpak do, and also fixes a memory
leak in the error path.

(cherry picked from commit 6125dabf58)
2017-02-28 19:52:46 +01:00
Alexander Larsson 5591f60519 document portal: Disable spice_read as it seems broken
We're getting "fuse: copy from pipe: short read" from
libfuse and a broken filesystem with this. See
https://github.com/flatpak/flatpak/issues/570

I've tried to look into if this is fixable, but I can't
really find any way we could do things differently that
may help, so the fix is to disable spice_read.

(cherry picked from commit 4fdac9e5d4)
2017-02-27 11:44:44 +01:00
Mario Sanchez Prada a44b6191d7 Initialize g_autofree string to NULL, not to crash when early returning
Otherwise, anytime we fail in ostree_repo_write_metadata() will cause
an invalid free to happen, and flatpak to crash.

(cherry picked from commit d0b5b51076)
2017-02-27 11:44:36 +01:00
Alexander Larsson ff3c34b5ad update: Don't update related refs from different remote
In case you happen to have a reference A with a related reference
B (say a runtime and a GL extension), and they come from different
remotes, then updating A should not cause B to update from the same
remote as A, but rather the current remote.

(cherry picked from commit 6793d90b82)
2017-02-27 11:44:30 +01:00
Alexander Larsson 5b29eebf9e Fix repeated download of locates on update
When we update an app and add updates for all the related
operations, such as locates, and it is already installed,
make sure we inherit the current subpaths rather than
use the default ones.

Fixes https://github.com/flatpak/flatpak/issues/587

(cherry picked from commit 51e14fe33b)
2017-02-27 11:44:21 +01:00
Alexander Larsson 37a19ce172 Don't remove origin remotes if some other ref uses it
This fixes https://github.com/flatpak/flatpak/issues/586

(cherry picked from commit cc03a2b94b)
2017-02-27 11:43:53 +01:00
Ray Strode 24632dab0b run: propagate wildcard xauth entries to app bundle
At the moment, flatpak applications are only given FamilyLocal family
xauth cookies from the Xauthority file.  This is so, the sandboxed
application doesn't inadvertently get access to displays on other
computers.

But FamilyLocal isn't the only xauth family that's local.  FamilyWild
entries can be local as well.

Furthermore, FamilyWild entries are preferable to FamilyLocal entries
when found, because they don't break if the system hostname is changed.

This commit makes FamilyWild xauth entries get propagated in the same
way as their FamilyLocal counterparts.

(cherry picked from commit a82708cb10)
2017-02-27 11:43:16 +01:00
Alexander Larsson fad0ab1ca1 Fix no-systemd-user warning (it doesn't affect sandboxing anymore)
(cherry picked from commit d27799518d)
2017-02-27 11:41:10 +01:00
Matthew Leeds dbadcba471 doc: Fix a typo
(cherry picked from commit 9067c8322d)
2017-02-27 11:40:44 +01:00
Alexander Larsson b02a3cf42a Update pofiles 0.8.3 2017-02-14 11:16:37 +01:00
Alexander Larsson 69579d062d Bump version to 0.8.3 2017-02-14 11:16:03 +01:00
Alexander Larsson 9383a3949b Update NEWS 2017-02-14 11:15:28 +01:00
Alexander Larsson f2df66d70d builder: Add config-opts to the docs for build-options
Reported in https://github.com/flatpak/flatpak/issues/560

(cherry picked from commit 3287fdbbbb)
2017-02-14 11:14:47 +01:00
Alexander Larsson ff8cb3aa37 document-portal: Fix ownership of basic directories
We now report these as the user uid+gid instead of root.

(cherry picked from commit 84246b6ec5)
2017-02-14 11:14:44 +01:00
Mario Sanchez Prada f8c74167fd Allow cancelling the downloading process for extra data
So far, the installation of external apps can only be cancelled
before flatpak starts downloading the extra data, as there's no
cancellable being passed to g_input_stream_read_async().

This fixes that problem, making it possible to cancel installs
from GNOME Software regardless of the installation stage.

(cherry picked from commit 86bf88d89f)
2017-02-14 11:14:41 +01:00
Mario Sanchez Prada 01c5727cfa Report progress for extra data downloads, as we do for OSTree pulls
Otherwise, clients such as GNOME Software won't be able to report
any progress once the flatpak application has been downloaded and
we enter the stage to download the extra data.

(cherry picked from commit 2e1740297c)
2017-02-14 11:14:38 +01:00
Mario Sanchez Prada da3f059485 Use the thread's default context to download extra data, not a new one
Otherwise, all the progress reporting for the extra data being downloaded
won't work, as the main context used by OstreeAsyncProgress will not be
the same than the one from the nested main loop used to download this.

(cherry picked from commit ca952b0f21)
2017-02-14 11:14:34 +01:00
Alexander Larsson 922ae44746 Update NEWS for release 2017-02-13 16:34:37 +01:00
Alexander Larsson bbad2b1fff builder: Pass the right prefix args for cmake buildsystem
This erronously checked only if cmake is set to true, but missed
the buildsystem=cmake case.

Fixes https://github.com/flatpak/flatpak/issues/546
2017-02-13 15:22:05 +01:00
Alexander Larsson 0e8d2884d6 Don't user user namespaces when bubblewrap is setuid
It turns out that it is impossible for to get ptrace capabilities
for child user namespaces in the current kernel if the user
namespace is created as root, which is what happens when bwrap
is setuid root (see https://github.com/flatpak/flatpak/issues/557
for details).

This is very problematic, as ptrace rights controls access to
/proc/$pid/root which is what we base the detection of peer
app id and rights on for portals.

For now, we disable user namespaces (except for the case of
unprivileged user namespaces, where it is necessary and works).

(cherry picked from commit 521e7e6a37)
2017-02-13 15:12:44 +01:00
Alexander Larsson 860ef3a798 dri: Fix nvidia driver with shared network
If we have network access, then nvidia talks to the xserver
and for some reason it then also needs /dev/nvidia-modeset.
So, lets add that to the dri device list.

(cherry picked from commit 763a686d87)
2017-02-08 16:44:31 +01:00
Alexander Larsson 898402e840 Add flatpak --gl-drivers to show the active drivers
(cherry picked from commit 8f62e46265)
2017-02-06 15:10:36 +01:00
Alexander Larsson 6476774eb6 Support appdata in share/metainfo also with rename-appdata-file
(cherry picked from commit b24228277d)
2017-02-06 15:10:32 +01:00
Jan Grulich 817a069981 Search also in share/metainfo subdir for appstream metadata
(cherry picked from commit 7c7c64c378)
2017-02-06 15:10:29 +01:00
Roger 7b828a88b2 Remove extra bracket
(cherry picked from commit 1086be4316)
2017-02-06 15:10:22 +01:00
Alexander Larsson 3c8288f0e9 extensions: Support enable/install-if=active-gl-driver
Only use/download this extension if it matches an active gl driver.

(cherry picked from commit 2e453048e0)
2017-02-06 15:10:19 +01:00
Alexander Larsson 2ae9d9aaba 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.

(cherry picked from commit d4d15c7211)
2017-02-06 15:10:15 +01:00
Alexander Larsson caa41bbb7f extensions: Handle priorities with merge-dirs
(cherry picked from commit 160f3a9820)
2017-02-06 15:10:12 +01:00
Alexander Larsson bd9ff4de31 extensions: Support merge-dirs=list..
This causes the listed directories to become symlink farms
into all the subdirectory extensions.

(cherry picked from commit c88f1aa835)
2017-02-06 15:10:07 +01:00
Alexander Larsson 89f7bed5fe list: Don't error out if a ref is in the repo, but not deployed
(cherry picked from commit 7eeda3b7b3)
2017-02-06 15:09:50 +01:00
Alexander Larsson 444f36c4cc 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.

(cherry picked from commit 5e1d456b8b)
2017-02-06 15:09:31 +01:00
Alexander Larsson 5c9b12a630 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.

(cherry picked from commit a3da0b3da8)
2017-02-06 15:01:41 +01:00
Alexander Larsson ab6915509c 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.

(cherry picked from commit 7f8ad5b3a1)
2017-02-06 14:56:10 +01:00
Alexander Larsson 42dafedbcb Respect flatpak required versions for runtimes (as well as apps)
(cherry picked from commit cc6e72ce57)
2017-02-06 14:56:03 +01:00
Alexander Larsson 10ddde03fb Support extra-data for runtime extensions too
This is very interesting for e.g. the nvidia drivers

(cherry picked from commit 475dcb178a)
2017-02-06 14:55:57 +01:00
Mario Sanchez Prada 74146cde10 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.

(cherry picked from commit 1d7357616b)
2017-02-06 14:55:47 +01:00
Alexander Larsson 2fa7e6b16c README: Add some text about installation
See e.g. https://github.com/flatpak/flatpak/issues/514

(cherry picked from commit 9bb4bc8dff)
2017-02-06 14:55:42 +01:00
Alexander Larsson 481b766823 Remove old --with-priv-mode=caps
This doesn't work anymore

(cherry picked from commit 55553af813)
2017-02-06 14:55:36 +01:00
Alexander Larsson 3bd1405364 Update po-files 0.8.2 2017-01-27 11:34:55 +01:00
Alexander Larsson d3e0f2d73f Update version to 0.8.2 2017-01-27 11:34:17 +01:00
Alexander Larsson 12a406a850 Update NEWS 2017-01-27 11:33:59 +01:00
Owen W. Taylor 0f14c3758d 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()

(cherry picked from commit 5f12c9e328)
2017-01-27 10:51:09 +01:00
Alexander Larsson 7e3cd93794 run: Fix e.g. --filesystem=xdg-config/foo without :create
Fixes https://github.com/flatpak/flatpak/issues/463

(cherry picked from commit 84aed615da)
2017-01-27 10:51:06 +01:00
Alexander Larsson 7db0ac595c 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.

(cherry picked from commit bc5ea57226)
2017-01-27 10:50:55 +01:00
Alexander Larsson 6cabfad7e3 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.

(cherry picked from commit ab446ebac5)
2017-01-27 10:50:41 +01:00
Alexander Larsson ae043da727 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

(cherry picked from commit 9bb9534f00)
2017-01-24 09:54:11 +01:00
Alexander Larsson 161401317e 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.

(cherry picked from commit 0bea92bd73)
2017-01-24 09:54:11 +01:00
Dušan Kazik 6652544cf0 Updated slovak translation
Added some new strings
(cherry picked from commit cee05a6d9f)
2017-01-24 09:54:11 +01:00
Alexander Larsson f0fd031fb1 system-helper: Add User=root to service file
This is needed for systemd-less activation on the system bus.

(cherry picked from commit 260f3df91c)
2017-01-24 09:54:11 +01:00