Commit Graph

2210 Commits (7f31a1acae8f9825ccd083cf450cf411e467fb68)
 

Author SHA1 Message Date
Alexander Larsson 3833cc938e Update bubblewrap dep to 0.1.4
No real changes, but lets use the release
2016-11-29 09:45:06 +01:00
Alexander Larsson 439d5fb554 leak tests: Add various suppressions to make most non-flatpak things go away 2016-11-28 17:24:02 +01:00
Alexander Larsson 462178bcd3 builder-options: Fix leaks 2016-11-28 17:23:38 +01:00
Alexander Larsson ad7e016349 repo-update: Don't leak from_parent 2016-11-28 16:12:38 +01:00
Alexander Larsson 3e9ce0034e repo-update: Don't leak delta_data 2016-11-28 16:12:21 +01:00
Alexander Larsson ddb40187c6 Fix various leaks found by valgrind 2016-11-28 15:17:04 +01:00
Alexander Larsson c7776d0a6f Require new ostree and drop old workaroung
OSTree 2016.4 fixes the scanning and purging issues that
forced us to do a double-pull during sudir installs.
2016-11-28 12:25:59 +01:00
Mario Sanchez Prada 8193b9f282 Extra checks mounting /etc/{resolv.conf|localtime} without session helper
When no session helper is available (e.g. running flatpak run from a
socket-activated service unit), we need to be extra careful before
making these two files appear inside the sandbox. Otherwise, if they
are not reachable on the host system (or just symlinks to non-existent
targets), flatpak won't be able to create the sandbox, which will fail
due to a "No such file or directory error".

https://github.com/flatpak/flatpak/issues/409
2016-11-25 08:46:48 +01:00
Mario Sanchez Prada 2c05e868d9 Fix wrong reference to the user installation instead of the system one
This seems like a simple typo introduced in eeaa8320, which is causing
to ignore the system installation when auto completing.
2016-11-25 08:46:48 +01:00
Alexander Larsson f869397208 Update to latest bubblewrap to get bind-mount fix 2016-11-22 12:46:28 +01:00
Alexander Larsson cc36dbcbbf run: Allow --filesystem=foo to expose sockets
We already kind of support this by exposing the parent directory,
so this isn't really less secure, and you should not be able to
access it unless your user is allowed to anyway.
2016-11-22 11:39:58 +01:00
Alexander Larsson 60b8a0eb47 run: Make /var/run symlink relative
This lets it work during early setup phase when the new root is at
/newroot. This allows us to create things in /var/run with
e.g. --filesystem=/var/run/foo.
2016-11-22 11:37:45 +01:00
Alexander Larsson 100038513d builder: Fix coverity warning
If type is NULL we should never look at it.
2016-11-21 10:28:13 +01:00
Matt Watson 36e844af56 tests: don't stomp on LD_LIBRARY_PATH
We should append to it, but not totally replace it, or things like
running test under jhbuild will not work properly.
2016-11-17 16:34:30 +01:00
Alexander Larsson 78873ac61a bubblewrap: Update to latest with bind-mount fixes 2016-11-15 15:10:21 +01:00
Matthew Leeds 7b8becd1b2 builder: Don't download modules that won't be built
Currently flatpak-builder downloads the sources for all modules, even if
the --stop-at option prevents them from being built. This commit changes
the behavior so that we don't bother to download the ignored modules.
2016-11-15 15:01:05 +01:00
Alexander Larsson bd3eae146a document-portal: Fix warnings on 32bit builds
fi->fh is a uint64, and if we cast that directly to a pointer
on a 32bit arch then we get a warning, so lets first cast
to gsize, and then to pointer.

Should fix https://github.com/flatpak/flatpak/issues/173
2016-11-15 11:32:28 +01:00
Alexander Larsson ca99d5be58 build-init: Give error if initializing with a partial dependency
If you're building a runtime and have a base runtime with expected
extensions, fail to build if the actually installed extension is
partial (i.e. if it has a subdir specified).

Fixes https://github.com/flatpak/flatpak/issues/390
2016-11-15 11:11:00 +01:00
Alexander Larsson 3896c8d683 Support relative pathnames in various --gpg=FILE commandline options
We juse use g_file_new_for_commandline_arg instead of g_file_new_for_path.
This is somewhat related to https://github.com/flatpak/flatpak/issues/401
but doesn't actually handle the specific case of tilde.
2016-11-15 10:44:26 +01:00
Alexander Larsson 2acb3f81a5 Special handling of accesible XDG_XYZ_HOME subdirs
If the app is explictitly given access to a subdirectory of
one of the xdg config/cache/data directories, with read-write
(or create) access, then also bind-mount that directory
into the corresponding .var/app/$APPID directory.

This allows apps that want it to keep re-using global directories
for storing per-app information.

For instance, if your app uses "~/.config/foo" to store configuration
data, then you can use --filesystem=xdg-config/foo, which will look
for the directory, and if it exist, let the app access it, as well
as mirror the content in ~/.var/app/$appid/config/foo.

You can also use a ":create" to enforce the directory to be created
and thus always do the mapping.
2016-11-14 18:58:44 +01:00
Alexander Larsson a07a146827 Allow filesystem options for xdg-[config,cache,data] for the regular xdg dirs
This means you can give access to e.g. ~/.config/dconf as --xdg-config/dconf
which then also respects XDG_CONFIG_DIR settings.
2016-11-14 18:58:44 +01:00
Alexander Larsson 2dd9b8627a Add support for --filesystem=XXX:create
This means the same as XXX:rw, but if the location doesn't exist
a directory is created there.
2016-11-14 18:58:44 +01:00
Alexander Larsson b19ea63526 By default, hide the user flatpak directory
This way you can't e.g. modify your or other applications
and runtimes. If you really need to to this, your
app can explicitly request access to this directory.
2016-11-14 18:58:44 +01:00
Alexander Larsson e1d1a29a6f run: Hide ~/.var/app (except your dir)
Unless you specifically set --filesystem=~/.var/app you will not
have any access to files from other apps
2016-11-14 18:58:44 +01:00
matthiasclasen 1685c1dcfa Merge pull request #403 from piotrdrag/pl-update-161113
Update Polish translation 161113
2016-11-14 10:24:38 -05:00
Piotr Drąg 60c2a3d048 Update Polish translation 2016-11-13 13:57:36 +01:00
Alexander Larsson e32612f1c9 Handle bind-mounts of locations that are symlinks
If we're specifying --filesystem=/some/path, where the final element
in the path is a symlink we need to special case this. We used
to rely on bubblewrap resolving the symlink for the source and
creating a bind mount directly to that, but this does not work
if the parent directory is already visible in the sandbox, because
we can't bind-mount on top of the pre-existing symlink.

Instead we detect this the symlink early, resolve the target and
bind mount in that, then we create a real symlink in its place.
However, that doesn't work if the paren't *doesn't* exist, so
we have to check for this and not create the symlink if it is
already going to be visible in the sandbox.
2016-11-11 22:21:07 +01:00
Alexander Larsson 18ad54b4a0 utils: Add utils to read and resolve symlinks 2016-11-11 22:17:56 +01:00
Alexander Larsson a8e1738860 build-finish: Don't warn for all non-valid names during export
Its pretty common to e.g. ship an icon theme bundled in the app,
but you then don't want to have a warning for every file.
So, instead make this a debug message.
2016-11-11 14:55:27 +01:00
Alexander Larsson 5c2d0065db document-portal: Correctly detect truncation and exclusive mode 2016-11-11 11:19:46 +01:00
Alexander Larsson 4c77e37960 system-helper: Move option resetting to before using them
This means coverity will not complain about them being always
set to false.
2016-11-11 11:16:01 +01:00
Alexander Larsson cecae8295c Fix build due to missing include 2016-11-11 11:15:00 +01:00
Alexander Larsson 19c9bbfbd4 Update to latest libglnx with some fixes 2016-11-11 11:12:29 +01:00
Alexander Larsson 63842a1247 flatpak_installation_update_appstream_sync: Remove dead code 2016-11-11 11:07:05 +01:00
Alexander Larsson b61259dc79 document-portal: Fix file trucation
We were checking the error return in the wrong way.
2016-11-11 11:00:30 +01:00
Alexander Larsson e175774d35 flatpak_run_add_x11_args: Only use tmp_fd inside != -1 check 2016-11-11 10:59:00 +01:00
Alexander Larsson 786f87fb9c document-portal: Fail fd validation if we can't open directory
We need to check if the open succeeded.
2016-11-11 10:56:25 +01:00
Alexander Larsson f48e863f4b oci: Don't allow closing the json writer twice
We're already checking if self->str != NUL before we get the
string, but closing the writer assumes self->str != NULL.
2016-11-11 10:53:05 +01:00
Alexander Larsson 7c0ef5dccb builder-source: Check for type == NULL before dereferencing 2016-11-11 10:48:37 +01:00
Alexander Larsson 9a2e68406c flatpak_number_prompt: Add missing va_end 2016-11-11 10:44:11 +01:00
Alexander Larsson 6c0fd7d16c flatpak_yes_no_prompt: Add missing va_end 2016-11-11 10:43:27 +01:00
Alexander Larsson 46889979ea document-portal: Fix fd leak 2016-11-11 10:42:29 +01:00
Alexander Larsson c01bbb5466 Update to latest bubblewrap git version
This is not strictly needed feature-wise, but it has a few fixes.
2016-11-11 10:42:29 +01:00
Alexander Larsson 966457593d build-sign: Don't crash if ref not found
As reported in https://github.com/flatpak/flatpak/issues/388
2016-11-11 10:42:29 +01:00
Mario Sanchez Prada 57ac7cb56c Use an allow_active=auth_admin_keep policy default for the configure-remote policy
This will avoid clients such as GNOME Software from asking for the password
repeateadly when configuring different repos one after another.
2016-11-09 15:01:57 +01:00
Mario Sanchez Prada 472150fa6c Don't modify remotes when updating metadata when there are no changes
This avoids an unnecessary call to flatpak_dir_modify_remote() or to
the system helper's D-Bus method ConfigureRemote, which also prevents
bothering the user to authenticate via PolKit for no reason.
2016-11-09 15:01:57 +01:00
Mario Sanchez Prada ca581ad6a1 Integrate flatpak_dir_update_remote_configuration() with the system helper
Add logic in flatpak_dir_update_remote_configuration() so that the step of
configuring the local remotes after fetching the required date from the
server's summary file is performed via the system helper when present.

Note this will require the user authorizing the action by introducing
the password explicitly when asked, but this is necessary as updating
the local remotes configuration is something that can't be allowed
without explicit authentication.
2016-11-09 15:01:57 +01:00
matthiasclasen 0349b42a12 Merge pull request #394 from mwleeds/patch-3
doc: Fix typos
2016-11-03 18:58:38 -04:00
Matthew Leeds ba8e6153f9 doc: Fix typos 2016-11-03 15:24:39 -05:00
matthiasclasen f8123f0a24 Merge pull request #393 from mariospr/misc-fixes
Small fixups
2016-11-03 15:14:39 -04:00