2271 Commits

Author SHA1 Message Date
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
Matt Watson
f7027edaff 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.

(cherry picked from commit ee83b5a70d)
2017-01-24 09:54:11 +01:00
Roman Kharin
b4228c5c99 ru translations file
(cherry picked from commit a111e8b8ed)
2017-01-24 09:54:11 +01:00
Simon McVittie
6adeb71212 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.

(cherry picked from commit 1d6834db4d)
2017-01-20 15:08:47 +01:00
Juan Pablo Ugarte
73446d63b4 --device=dri added support for Mali drivers
(cherry picked from commit cc0c6354a2)
2017-01-20 15:08:47 +01:00
Alexander Larsson
e190908589 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

(cherry picked from commit fa6f7228886e983a5c1ff64e1d9db8ea0014ec26)
2017-01-19 15:33:51 +01:00
Alexander Larsson
21a0bd9ed3 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.

(cherry picked from commit 5c4c4bbe56807ce94ef2eb0cc860b1cf488371f5)
2017-01-19 15:33:47 +01:00
Alexander Larsson
1851df22e4 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.

(cherry picked from commit b1dd1c3f7a865f39ef9f296e3a0f96304f96247c)
2017-01-19 15:33:43 +01:00
Alexander Larsson
d24b862a50 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!

(cherry picked from commit 896c483cac6897cef6202055ed127e37e09f5ab8)
2017-01-19 15:33:39 +01:00
Alexander Larsson
e5346b7709 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

(cherry picked from commit 592bea2b2e)
2017-01-19 15:33:34 +01:00
Ikey Doherty
91d4663ace 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>
(cherry picked from commit 605c7ee87b)
2017-01-19 15:33:30 +01:00
Ikey Doherty
97322c81d5 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>
(cherry picked from commit 3b64fbc4f5)
2017-01-19 15:33:25 +01:00
Ikey Doherty
2d7a828809 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>
(cherry picked from commit ca107ebb16)
2017-01-19 15:33:21 +01:00
Alexander Larsson
87e56ed0ef Update po-files 0.8.1 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
Alexander Larsson
9791268c6b document portal: Support access() on directories 2017-01-18 11:32:44 +01:00
Alexander Larsson
4be202442d document portal: Add some debug spew 2017-01-18 11:32:44 +01:00
Alexander Larsson
8909b5437d document-portal: Treat newly created files (EXCL) as truncated ones
The EXCL pretty much guarantees it is a new file.
2017-01-18 11:32:44 +01:00
Alexander Larsson
13b0c78fe5 document portal: Report right error for setattr 2017-01-18 11:32:44 +01:00
Simon McVittie
dd96ac54f1 tests: Install testpython.py executable
The test that uses this file executes it. Install it as an extra
script rather than data to ensure that it can work.
2017-01-18 08:41:03 +01:00
Simon McVittie
63daf2bb95 testlibrary: ensure that contents_array is NULL-terminated
Otherwise g_strjoinv() wanders off the end into uninitialized memory.

Signed-off-by: Simon McVittie <smcv@debian.org>
2017-01-18 08:41:03 +01:00
Alexander Larsson
902fb71399 Use seccomp to filter out TIOCSTI ioctl
This would otherwise let the sandbox add input to the controlling tty.
2017-01-17 16:36:56 +01:00
Alexander Larsson
455b681cd7 Update to latest bubblewrap version 2017-01-17 16:30:06 +01:00
Matthias Clasen
16bdb672a9 Document RuntimeRepo key
Not being documented makes it hard to know that this actually
takes the url of a flatpakrepo file, as opposed to the other url
key in this file, which takes the url to a remote.
2017-01-16 13:38:15 +01:00
Matthias Clasen
165129070a Document the DefaultBranch key
This can be set in .flatpakrepo files for a while.
It just wasn't documented.
2017-01-16 13:38:15 +01:00
Piotr Drąg
920def9f76 Update POTFILES.in 2017-01-16 13:36:36 +01:00
Alexander Larsson
8152331bd0 Make sure /var/tmp is not on tmpfs
Apps may rely on /var/tmp not being in ram, for instance when
downloading large files. See for instance:

  http://0pointer.net/blog/projects/tmp.html

We make /var/tmp point to ~/.var/app/cache/tmp so that each app get
its own instane, and so that its cleared whe removing xdg-cache-dir
for the app.
2017-01-16 13:04:55 +01:00
Alexander Larsson
c4f0f3245d Fix update of standalone bundle
We regressed on being able to install a bundle twice to update it.

This fixes https://github.com/flatpak/flatpak/issues/462
2017-01-16 11:51:14 +01:00
Alexander Larsson
5c2999fe20 Initilize MAINTAINERCLEANFILES so sub-makefiles can append to it 2017-01-16 11:37:44 +01:00
Cosimo Cecchi
78c3391b78 system-helper: make sure to run with XDG_DATA_DIRS set
Otherwise we can see in the log that update-mime-database will complain
about it not being set when installing an application using the system
helper.
2017-01-16 11:36:48 +01:00
Alexander Larsson
0fd0978987 Fix test crash introduced with error message 2017-01-16 11:20:47 +01:00
Alexander Larsson
da0970e290 Remove accidentally added generated files (from pt_BR.po) 2017-01-12 14:58:21 +01:00
Michal Rostecki
2860c0c4ad configure: Look for the libdwarf headers also in /usr/include/libdwarf
Before this change, configure script looked for them only in
$includedir, which doesn't work well with jhbuild.

Fixes #471
2017-01-12 11:52:05 +01:00
Alexander Larsson
4e1bf67bff Print a warning if the remote metadata cache is not found 2017-01-12 10:45:44 +01:00
Fábio Nogueira
1dc4701404 pt_BR translations file 2017-01-12 10:05:49 +01:00
Fábio Nogueira
1c3b173309 19% 2017-01-12 10:05:49 +01:00
Fábio Nogueira
0f7f9bae04 pt_BR translations file 2017-01-12 10:05:49 +01:00