Commit Graph

1544 Commits (c59fba9be382595cc484e2fc73af9647b4632599)
 

Author SHA1 Message Date
Simon McVittie c59fba9be3 tests: don't treat helper scripts as though they were tests
We shouldn't install .test metadata for these, and run them as TAP
test scripts. In glib-tap.mk jargon that makes them "extra scripts".

Signed-off-by: Simon McVittie <smcv@debian.org>
2016-06-25 00:45:09 +01:00
Simon McVittie 58bd3e3ec8 Downgrade failure to get document portal from warning to message
Otherwise, the tests all abort when run without FUSE.

Signed-off-by: Simon McVittie <smcv@debian.org>
2016-06-25 00:45:09 +01:00
matthiasclasen 6d3d781654 Merge pull request #151 from anssih/fix/doc-builddir
Fix builddir option type in flatpak-builder documentation
2016-06-24 08:20:20 -04:00
Anssi Hannula 3fb031582e Fix builddir option type in flatpak-builder documentation 2016-06-24 11:33:02 +03:00
Alexander Larsson b7972acf74 Update NEWS 2016-06-23 13:23:46 +02:00
Alexander Larsson 769f19fd30 Bump version number to 0.6.6 2016-06-23 13:19:17 +02:00
Alexander Larsson 640bf9e69c remote-ls: Better multiarch support
By default, only show supported refs. Use --arch to limit it
to a specific arch, or --arch=* to list all.
2016-06-23 13:08:12 +02:00
Alexander Larsson db192586de make-current: Use find_installed_ref()
This means you don't have to specify the arch if you don't want.
It will still find supported apps.
2016-06-23 12:54:45 +02:00
Alexander Larsson f9ce1b16ed Make finding refs handle multi-arch
If opt_arch is not specified:
 * find_xxx_refs now return refs for all supported arches
 * find_xxx_ref looks at each supported arch in prio order
2016-06-23 12:52:55 +02:00
Alexander Larsson 9915e3740b Disable static deltas for system-helper updates
Due to an issue with ostree (https://github.com/ostreedev/ostree/pull/362)
applying non-from-scratch deltas fail when using parent_repo such as
in the system-helper case. We fix this temporarily by disabling the
use of deltas for that case.
2016-06-23 12:16:02 +02:00
Alexander Larsson 2966b25ba0 update: Always look at all existing apps when updating
Currently if you specified some of branch/name we used
find_installed_ref, but even in that case we want to
support updating two arches.
2016-06-23 11:36:51 +02:00
Alexander Larsson 34faddfa8f common: Make some internal functions static 2016-06-23 11:31:19 +02:00
Alexander Larsson 8740a9ded3 Add flatpak --supported-arches 2016-06-23 11:12:28 +02:00
Alexander Larsson fa6fb1033f lib: Add flatpak_get_supported_arches 2016-06-23 11:05:49 +02:00
Alexander Larsson bde74d25d4 common: Add flatpak_get_arches() helper 2016-06-23 11:05:42 +02:00
Matthias Clasen 0c873100b7 Document the flatpak-builder var support 2016-06-23 10:06:53 +02:00
Matthias Clasen d3629b8e72 builder: Add support for a var runtime
flatpak build-init as a --var option - support this as a
"var" key in the json.
2016-06-23 10:01:40 +02:00
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