Commit Graph

1527 Commits

Author SHA1 Message Date
Alexander Larsson
e7a04b36af Merge pull request #133 from heftig/master
system-helper: Reorder flatpak_authorize_method_handler
2016-06-21 09:06:35 +02:00
Jan Alexander Steffens (heftig)
599f8b963d system-handler: Don't leak path string
Without &, ^ay dups the string.
2016-06-20 23:42:22 +02:00
Jan Alexander Steffens (heftig)
55e26c296f system-helper: Reorder flatpak_authorize_method_handler
Reduces code duplication.
2016-06-20 23:42:01 +02:00
Alexander Larsson
0fffc8ec4c system-helper: Use org.freedesktop.DBus.Error.AccessDenied on polkit auth fail
This makes more sense than some unmapped permission error.
2016-06-20 11:16:10 +02:00
Alexander Larsson
c43a7b93af Merge pull request #128 from matthiasclasen/document-command-docs
Clarify the documentation a bit
2016-06-20 09:32:07 +02:00
Alexander Larsson
6cee12dc28 Fix website URL to not use https
We don't currently support https

Closes https://github.com/flatpak/flatpak/pull/130
2016-06-20 09:01:26 +02:00
Alexander Larsson
2083705f4b Merge pull request #131 from matthiasclasen/build-fix
Fix the build
2016-06-20 09:00:02 +02:00
Matthias Clasen
5612b5f7c6 Fix the build
The xdp-impl-dbus.h header no longer exists - it came from an
earlier version of the document commands branch where I introduced
a separate interface. Just drop the include, it is not needed.
2016-06-19 13:42:42 -04:00
Matthias Clasen
0ae7c446a1 Clarify the documentation a bit
Revise the man pages for the new document commands a bit, using
'document id' consistently, and adding cross references among them.
2016-06-18 21:08:27 -04:00
Alexander Larsson
20532c776a Merge pull request #119 from matthiasclasen/more-document-commands
More commands for document portal
2016-06-18 23:08:55 +02:00
Alexander Larsson
e86ae478f7 Fix --dev=all support
As pointed out by Jasper, we need to --dev-bind for devices to work.
2016-06-18 22:52:39 +02:00
Alexander Larsson
6cbc9a7932 dbus proxy: Don't store the temporary sockets in $XDG_RUN_DIR/bus-proxy
This just causes us to leave this empty directory around. Instead we
use hidden files directly in $XDG_RUN_DIR/.
2016-06-16 22:30:48 +02:00
Matthias Clasen
c35d7d141a Update overview man page
Group the document-related commands together, and add the new ones.
2016-06-16 15:05:18 -04:00
Matthias Clasen
9c16751709 flatpak: Add a command to list exported documents
This lists all the files that are exported, possibly limited
to a single app id.
2016-06-16 15:05:18 -04:00
Matthias Clasen
8281e614ce flatpak: Add a way to revoke privileges for exported documents
This adds --forbid-read, --forbid-write, --forbid-delete and
--forbid-grant-permissons options to flatpaks document-export
command, to let it revoke permissions on exported documents.
2016-06-16 15:05:18 -04:00
Matthias Clasen
528b1f8e29 flatpak: Add a document-unexport command
This calls org.freedesktop.portal.Documents.Delete to remove
an exported file from the document database altogether.
2016-06-16 15:05:18 -04:00
Matthias Clasen
52d32da215 flatpak: Add a document-info command
This uses the newly introduced non-portal interface to the
documents portal to obtain and show information about an
exported file.
2016-06-16 15:05:18 -04:00
Matthias Clasen
89a10ad9b2 document portal: Implement the new api 2016-06-16 15:05:17 -04:00
Matthias Clasen
8bada3a819 document portal: Add a more api
We want to let the flatpak command show more information.
These functions will not be allowed from inside the sandbox
to prevent leaking information to sandboxed applications.
  Lookup: go from a file (handed in via an fd) to a document id
  Info: return origin and permissions for an id
  List: return information about all exported documents
2016-06-16 15:04:28 -04:00
Alexander Larsson
cbe35fedbc system-helper: Correctly copy the system config when modifying a repo
We were accidentally using the passed in copy of the rest of the config
when we should be using the one we read.
2016-06-16 19:56:50 +02:00
Alexander Larsson
1d185f7dd6 Merge pull request #121 from smcv/installed-tests
test-run: avoid testing cases of filesystem binding that won't work
2016-06-16 17:15:37 +02:00
Simon McVittie
ec81d5c61b test-run: avoid testing cases of filesystem binding that won't work
This test effectively assumed that ${test_builddir} is in /home, /opt,
a non-FHS top level directory, or some other directory that isn't
in dont_mount_in_root[] in flatpak-run.c. In a distro build where
${libexecdir} is below /usr, when running the installed-tests
so ${test_builddir} is ${libexecdir}, this assumption doesn't hold.

We can't just copy the file we're dealing with into a subdirectory
of /tmp or /var/tmp either, because those directories aren't
part of --filesystem=host. Meanwhile, we also don't want to pollute
$HOME with test detritus.

For the best possible coverage given all those constraints, we try
three directories: ${test_builddir}; ${TEST_DATA_DIR}, which is
in /var/tmp; and ~/.flatpak-tests, but only if it already exists.

When testing --[no]filesystem=host overrides, we don't even try
${TEST_DATA_DIR}, because we know it's in /var/tmp which can only
be shared explicitly, but we do try the others.

Signed-off-by: Simon McVittie <smcv@debian.org>
2016-06-16 00:10:42 -04:00
Alexander Larsson
de13e496c1 sandbox: Make /var/tmp and /tmp different dirs, not symlinks
This means you can use either or both of --filesystem=/tmp and
--filesystem=/var/tmp to share the host tmpdirs.
2016-06-16 01:33:28 +02:00
Matthias Clasen
04d444782c Make variables static
Otherwise, they cause unexpected linking conflicts.
2016-06-15 14:07:36 -04:00
Matthias Clasen
98a66ce6d8 Rename export-file to document-export
This fits better with the naming scheme for commands in general, and
will let us add more document portal related commands in the future.
2016-06-15 14:07:36 -04:00
Alexander Larsson
a84f725211 Support --device=all
This gives the application full access to the host /dev. Obviously
this is not great in terms of sandboxing, but its nice for applications
that use flatpak mostly as a way to do distribution of the app.

Also, its not like the app has full access to anything, its still
limited to the access right of the user.
2016-06-14 22:33:14 +02:00
Alexander Larsson
1abcc8d080 Merge pull request #108 from ximion/master
Silence compiler warning about unused result of write()
2016-06-14 05:25:00 +02:00
Alexander Larsson
e6260085a1 Merge pull request #112 from smcv/build
Get "make distcheck" to work
2016-06-14 05:00:36 +02:00
Simon McVittie
3fc47aa0d3 Link libselinux into bwrap (if enabled) with LDADD, not LDFLAGS
As explained in bubblewrap commit f6ca3690, libraries should
always go in LDADD and not LDFLAGS, because the order of arguments
to the linker matters. Many distributions' linkers are tolerant
enough that it doesn't matter in practice, but it matters for
static linking, and it might also matter on Ubuntu.

Signed-off-by: Simon McVittie <smcv@debian.org>
2016-06-12 17:08:47 -04:00
Simon McVittie
ccaa7428ae autogen.sh: rely on VPATH when generating Makefile-*.am.inc
This avoids hard-coding the (potentially absolute) srcdir used at
autogen time into the build system. It's fine for an Automake build
system to use relative paths in dependencies and rely on them being
interpreted as relative to ${srcdir} even though the current working
directory is ${buildddir}, because of make's "VPATH" feature, and we
do it all the time in the handwritten parts of the build system.

In particular, this (finally) makes distcheck work.

Signed-off-by: Simon McVittie <smcv@debian.org>
2016-06-12 10:35:33 +01:00
Simon McVittie
ee77be10b5 tests: clean up what is distributed
Listing variables whose values are conditional in EXTRA_DIST is
problematic: if Flatpak was configured without installed-tests,
we would not distribute those files. This is a problem during
distcheck, where installed-tests are disabled.

For files not placed in a special subdirectory, glib-tap.mk handles
this for us. For the keyring and the databases, we have to do it
ourselves, by arranging for them to be in a dist_ variable that is
special to Automake - when determining what to distribute, Automake
includes anything that is selected for distribution under any
combination of conditionals.

While I'm here, include test keyring's README in tarballs: its advice
is equally applicable in a tarball release.

Signed-off-by: Simon McVittie <smcv@debian.org>
2016-06-12 10:35:13 +01:00
Simon McVittie
f8f4f530ab Permission store, document portal: do not distribute generated files
Signed-off-by: Simon McVittie <smcv@debian.org>
2016-06-12 10:35:13 +01:00
Simon McVittie
2e729aacab lib: do not distribute generated files in tarball
Signed-off-by: Simon McVittie <smcv@debian.org>
2016-06-12 10:35:13 +01:00
Simon McVittie
c18626f11c common: don't distribute generated GDBus files in tarballs
Signed-off-by: Simon McVittie <smcv@debian.org>
2016-06-12 10:35:13 +01:00
Matthias Klumpp
0a90e6ec3e Silence compiler warning about unused result of write()
This way we return a critical warning in the unlikely event of a write
error.
2016-06-10 19:35:49 +02:00
Alexander Larsson
c741200fa5 NEWS: Update for release 0.6.5 2016-06-10 13:44:52 +02:00
Alexander Larsson
10c6e15506 Merge pull request #32 from matthiasclasen/completion
Handle bash completion in C
2016-06-10 13:00:43 +02:00
Alexander Larsson
874fbbff34 Fix various leaks 2016-06-10 12:59:30 +02:00
Alexander Larsson
528b150162 Update valgrind test support 2016-06-10 12:59:11 +02:00
Alexander Larsson
2e7d89a9c2 Update to latest bubblewrap 2016-06-10 10:09:02 +02:00
Alexander Larsson
b84d3641f6 Merge pull request #105 from matthiasclasen/doc-cleanups
Misc man page cleanups
2016-06-10 09:14:37 +02:00
Alexander Larsson
4468ba522b Merge pull request #106 from matthiasclasen/document-portal-fixes
Some document portal cleanups
2016-06-10 09:13:37 +02:00
Matthias Clasen
0d2b3ec5d0 flatpak enter: Add completion
This was the last command without completion, so we're complete!
2016-06-10 01:09:51 -04:00
Matthias Clasen
de967dfb5b flatpak enter: Stop parsing context options
We don't make any use of these options, and the documentation
does not mention them either, so stop accepting them.
2016-06-10 01:07:07 -04:00
Matthias Clasen
302dbd2910 Trivial whitespace fix 2016-06-10 00:54:04 -04:00
Matthias Clasen
7cdb8c386c completion: Ensure --help options show up
Help was not showing up in completions, which is unfortunate.
2016-06-10 00:47:20 -04:00
Matthias Clasen
f53533ff48 Fix compiler warnings
There are a number of -Wshadow warnings in document-portal/.
Fix them.
2016-06-09 23:47:41 -04:00
Matthias Clasen
fbefba695c document portal: Improve logging
Make the error printing more pretty.
2016-06-09 23:30:12 -04:00
Matthias Clasen
c5155402b2 document portal: Make -v work
We need to set the log handler for our docmain, not the NULL domain.
2016-06-09 23:19:18 -04:00
Matthias Clasen
f1350f7853 flatpak-override docs: Add missing options
The --system-own-name and --system-talk-name options were missing
here.
2016-06-09 22:57:46 -04:00