Commit Graph

1428 Commits

Author SHA1 Message Date
Alexander Larsson
16251bbb63 Merge pull request #70 from danvratil/dev/fix-dir-export
Fix path generation when recursively exporting a directory
2015-05-07 14:48:39 +02:00
Dan Vrátil
0f53360959 Fix path generation when recursively exporting a directory
It is not guaranteed that source_relpath ends with '/', so g_strconcat()
would generate invalid path, like "share/icons/hicolor64x64/apps". Use
g_build_filename() instead to ensure we don't miss any separators.
2015-05-07 14:14:04 +02:00
Alexander Larsson
e2734654f8 xdg-dbus-proxy: Add support for syncing via fd
When we've listened to all sockets we write to the fd, and when
the other end of the fd is closed we exit. This can be used to
limit the lifetime of the proxy to the container.
2015-05-07 12:09:14 +02:00
Alexander Larsson
34d7c14394 Close any unexpectedly inherited fds in helper monitor and init. 2015-05-06 18:04:35 +02:00
Alexander Larsson
4e1856bed1 Merge pull request #69 from danvratil/dev/envvars
Don't leak environment variables into sandbox, except whitelisted ones
2015-05-06 17:54:22 +02:00
Dan Vrátil
0a76e872df Report error when --var option is missing '=' 2015-05-06 17:47:56 +02:00
Dan Vrátil
63e4e822f2 Actually unset the env variable when the value is empty 2015-05-06 17:47:56 +02:00
Dan Vrátil
23259c2582 Ignore errors in add_env_overrides() 2015-05-06 17:47:56 +02:00
Dan Vrátil
f035cbef48 Don't clear the [Vars] group in build-finish command and improve error reporting 2015-05-06 17:47:51 +02:00
Dan Vrátil
69d50fa9f9 Allow runtime and apps to override environment variables
Sometimes it's necessary to override environment variables coming from
outside the sandbox in order to point to the right places in the sandbox
(like QT_PLUGIN_PATH pointing to /self/lib/qt5/plugins).

To do so, runtimes and applications can add ENV=VALUE entries into [Vars]
section in their metadata files. Specifying an empty value is also possible,
which will effectively unset the variable.
2015-05-06 15:57:57 +02:00
Alexander Larsson
5f6ebafb75 Only print headers when logging 2015-05-06 15:04:47 +02:00
Alexander Larsson
01bd1a3dfd Make xdg-dbus-proxy talk command line args and install it 2015-05-06 15:01:55 +02:00
Alexander Larsson
7183917583 Break out dbus proxy implementation to separate file 2015-05-06 12:38:52 +02:00
Alexander Larsson
c0dca8dee4 dbus-proxy: Add some test policy 2015-05-05 17:23:58 +02:00
Alexander Larsson
564ba32250 Better handling of fd passing 2015-05-05 17:23:58 +02:00
Alexander Larsson
0d520ea6e2 Add wildcard policies 2015-05-05 17:23:58 +02:00
Alexander Larsson
00d3fe5908 DBusProxy: Add non-filtering mode 2015-05-05 17:23:58 +02:00
Alexander Larsson
f179f78386 Flesh out filtering 2015-05-05 17:23:58 +02:00
Alexander Larsson
9078f5609b Add some minimal policy on send/receive 2015-05-05 17:23:57 +02:00
Alexander Larsson
004b7b2ca0 Parse dbus headers 2015-05-05 17:23:57 +02:00
Alexander Larsson
6048b38158 dbus proxy in progress 2015-05-05 17:23:57 +02:00
Alexander Larsson
ffb051b30d Merge pull request #63 from matthiasclasen/add-readme
Add a README
2015-05-04 16:12:48 +02:00
Alexander Larsson
d00a65b683 Merge pull request #67 from spk121/spk121
Fix debug message format string
2015-04-23 08:34:45 +02:00
Mike Gran
7b6a9a8d96 Fix debug message format string
The format string %ld is incorrect for i686

* xdg-app-utils.c (load_contents): modify format string
2015-04-22 14:43:25 -07:00
Alexander Larsson
fb0948021d Make symlinks lib64 -> usr/lib64, etc if those exist in the runtime 2015-04-17 16:12:45 +02:00
Alexander Larsson
fc8db2b39e Merge pull request #65 from dsvensson/ds-no-libattr
Switch to using glibc xattrs.
2015-04-07 09:23:12 +02:00
Alexander Larsson
891594c1e3 xdg-app-builtins-list.c: Cleanup comma separator code
This leads to less duplication and avoids a dead code warning.
2015-04-07 09:21:03 +02:00
Daniel Svensson
73580f48a7 Remove dead code xdg-app-dir.c.
Introduced in daf41bab, and db191015.
2015-04-07 09:18:49 +02:00
Daniel Svensson
35ec44e012 Remove dead code xdg-app-builtins-build-init.c.
Was made dead by 734ca13f.
2015-04-07 09:18:45 +02:00
Daniel Svensson
7d6cc2c5d7 Remove dead code in xdg-app-builtins-build-finish.c.
Introduced as dead code in 85670c63.
2015-04-07 09:18:40 +02:00
Daniel Svensson
36645a680c Switch to using glibc xattrs.
Updates libglnx to reflect a similar change in that project.
2015-04-05 22:13:45 +02:00
Alexander Larsson
4845d1cf37 build-finish: Only export files with app-id prefix 2015-04-01 14:15:14 +02:00
Alexander Larsson
f39b59689d Pass name into build-init and store in metadata
We also drop this as an argument to build-export.

This lets us verify that the name is valid up-front, and having the
name in the metadata is useful for other things. For instance,
build-finish can verify that all exported files have the right prefix.
2015-04-01 14:03:51 +02:00
Alexander Larsson
61a8a1b5dc Merge pull request #64 from amigadave/master
Add COPYING to reflect license headers
2015-04-01 09:01:06 +02:00
David King
d667f4e81c Add COPYING to reflect license headers 2015-03-31 15:36:29 +01:00
Matthias Clasen
e3081def05 Add a README
Pretty minimal, just a link to the wiki.
2015-03-28 16:12:03 -04:00
Alexander Larsson
07cd13e757 Add copyright headers 0.1 2015-03-23 12:17:58 +01:00
Alexander Larsson
6b9f8407fe Merge pull request #62 from amigadave/attr-header
Check for libattr header
2015-03-23 12:10:52 +01:00
Alexander Larsson
b886cdb5c9 Fix build on older glib 2015-03-23 11:36:48 +01:00
Alexander Larsson
ee2edada58 Bump version to 0.1 2015-03-23 11:16:41 +01:00
Alexander Larsson
a4f60de77f helper: Manually apply bind flags recursively
When we do a recursive bind mount we need to also apply the
flags recursively. We do this manually by parsing /proc/self/mountinfo.
2015-03-23 11:16:41 +01:00
Alexander Larsson
b4c77b8c02 Require ostree 2015.3
This is latest version that is in fedora 21 atm. Its got some fixes
that are nice to have, but unfortunately deltas are not yet stable
in it.
2015-03-23 11:16:41 +01:00
Alexander Larsson
0eada3ef66 Fix dist 2015-03-23 11:16:41 +01:00
Alexander Larsson
a88795c4b1 fixup g_steal_pointer use 2015-03-23 11:16:41 +01:00
David King
b025874806 Check for libattr header 2015-03-21 19:04:43 +01:00
Alexander Larsson
8f427c4fb6 Use g_steal_pointer 2015-03-20 16:55:05 +01:00
Alexander Larsson
ad8164a47f Use glnx_set_error_from_errno 2015-03-20 16:45:09 +01:00
Alexander Larsson
b99e01b25b Switch to GLnxDirFd 2015-03-20 16:41:06 +01:00
Alexander Larsson
88c5c65e2d Use cleanup macros from libglnx 2015-03-20 16:36:17 +01:00
Alexander Larsson
c856556b8a Convert to g_autoptr 2015-03-20 16:33:18 +01:00