Commit Graph

2293 Commits (cc6e72ce57e7eb4d97cc5615b24dfc40877cacea)
 

Author SHA1 Message Date
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
Alexander Larsson 260f3df91c system-helper: Add User=root to service file
This is needed for systemd-less activation on the system bus.
2017-01-23 16:30:52 +01:00
Bartłomiej Piotrowski 751cae4639 builder: add cmake-ninja support
The commit adds another buildsystem, cmake-ninja, that tells
CMake to generate Ninja rules instead of Makefile.

Fixes #461.
2017-01-20 15:28:27 +01:00
Matt Watson ee83b5a70d install: handle arch when installing from a flatpakref
Before this commit
$ flatpak install --arch someArch --from some.flatpakref
Would completely ignore the arch argument and only install for the
default flatpak architecture. Since flatpakref files don't include
an arch field, there's no reason we can't attempt to install the
arch specified on the command line.
2017-01-20 15:28:11 +01:00
Simon McVittie 1d6834db4d flatpak-system-helper: remove dangling reference to EXTERNAL_INSTALL_DIR
If EXTERNAL_INSTALL_DIR wasn't defined (which is likely, since nothing
in the build system does), then we would tell the system helper
to search /exports/share, which is not Flatpak's territory
(but is a semi-commonly-used path for site-specific NFS shares,
which might have contents that are inappropriate to search here).

Installations that do define an external installation directory
(Endless OS?) can easily override the Environment to include it
by placing a drop-in in
/etc/systemd/user/flatpak-system-helper.service.d/external.conf
or similar.
2017-01-20 15:05:28 +01:00
Juan Pablo Ugarte cc0c6354a2 --device=dri added support for Mali drivers 2017-01-20 15:03:56 +01:00
Alexander Larsson c329e60d73 Create the homedir last to avoid symlink issues
If the homedir is on a symlink (say /home -> /var/home) but the homedir
is in /home, then we shouldn't create a directory in /home because
then the symlink creation will fail. Instead we move the homedir
creation to the end, where we will create it in the symlink if needed.

This should fix https://github.com/flatpak/flatpak/issues/493
2017-01-19 15:36:06 +01:00
Alexander Larsson 58a5e146d3 Run: Handle dependencies when exposing symlinks
If you are exposing a symlink, say /link (-> /target) and
also a child of it, say /link/child, then we run into dependency
issues. For instance, the /link symlink is created, pointing to /target,
but then we try to to create /link/child before the /target
bind mount is setup, which will fail.

We work around this by adding a level, and the dependency of a symlink
(/target in the above case) will always be handled first. This isn't
a perfect solution, but is likely to be good enough in practice.
2017-01-19 15:36:06 +01:00
Alexander Larsson b2c7137e73 run: Create symlinks as relative paths to make them work during bwrap setup
During setup the new root is in /newroot, so absolute symlinks don't work.
We make them realtive so that we can resolve the symlinks during setup.
2017-01-19 15:36:06 +01:00
Alexander Larsson 27031df5bf flatpak_resolve_symlink: Properly make paths absolute
We need to use g_build_filename, g_build_path takes a separator
as the first arg, not a path!
2017-01-19 15:36:06 +01:00
Roman Kharin a111e8b8ed ru translations file 2017-01-19 11:49:34 +01:00
Alexander Larsson 592bea2b2e Don't break if exporting paths or symlinks to files in the runtime
For instance like in https://github.com/flatpak/flatpak/issues/494
if there is a /linuxrc -> /bin/busybox symlink, and /bin/busybox
is not in the runtime then we will fail creating it as a mountpoint
for the bind mount.

Fixes https://github.com/flatpak/flatpak/issues/494
2017-01-19 10:43:17 +01:00
Ikey Doherty 605c7ee87b Fix compiler warnings with uninitialised cleanup pointers
This change fixes GCC compiler warnings where a cleanup function was
specified on an uninitialised pointer, which in the view of GCC could
result in an errornous free of uninitialised memory, if the functions
that initialise them do not return NULL.

Signed-off-by: Ikey Doherty <ikey@solus-project.com>
2017-01-19 10:05:13 +01:00
Ikey Doherty 3b64fbc4f5 profile: Support alternative profile.d locations
Typically Linux distributions employ /etc/profile.d for system wide
environment manipulation prior to multi-user initialisation. Modern
distribution efforts split the vendor configuration from the local
sysadmin configuration and data, by not using the /etc/ directories,
for example.

To enable this stateless pattern, this change adds a new --with-profile-dir
option to use an alternative location, such as within /usr/share/. This
ensures that the data (not configuration) is owned through the update
process, and does not conflict with changes made locally to the system,
enforcing domains of ownership.

To preserve backwards compatible behaviour, the default directory remains
set to /etc/profile.d.

Signed-off-by: Ikey Doherty <ikey@solus-project.com>
2017-01-19 10:05:13 +01:00
Ikey Doherty ca107ebb16 system-helper: Allow configuration of dbus configuration directory
Newer versions of dbus support stateless directories, and many distributions
now use /usr/share/dbus-1/system.d for the vendor configuration files, as
opposed to the legacy /etc/dbus-1/system.d directory.

To enable this, we add a new --with-dbus-config-dir option to control the
configuration directory, whilst retaining backwards compatibility for those
still using older versions of dbus.

Signed-off-by: Ikey Doherty <ikey@solus-project.com>
2017-01-19 10:05:13 +01:00
Alexander Larsson afda4e6900 Update to version 0.9.1 for unstable branch 2017-01-18 17:06:42 +01:00
Alexander Larsson 87e56ed0ef Update po-files 2017-01-18 16:53:17 +01:00
Alexander Larsson 4344b3d085 Update NEWS for release 2017-01-18 16:44:38 +01:00
Alexander Larsson 84f0b90af7 Bump version to 0.8.1 2017-01-18 16:34:26 +01:00
Alexander Larsson f497abee73 Update bubblewrap to final 0.1.7 release 2017-01-18 16:26:01 +01:00
Alexander Larsson a2810186b8 appstream update: Allow component ids not ending in .desktop
This is needed for runtimes
2017-01-18 13:22:56 +01:00