Commit Graph

1587 Commits

Author SHA1 Message Date
Alexander Larsson
b5f1373afb Update NEWS 2016-07-01 13:59:07 +02:00
Alexander Larsson
de7445b0b5 doc/flatpak-metadata: Add some extra clarifications 2016-07-01 11:23:38 +02:00
Alexander Larsson
6901d5f52f Merge pull request #161 from matthiasclasen/metadata-docs
Document the metadata format
2016-07-01 11:06:46 +02:00
Alexander Larsson
01d4209892 Add some code I used to test the new related refs code. 2016-07-01 10:39:56 +02:00
Alexander Larsson
5da7a0411a lib: Support listing related refs 2016-07-01 10:32:57 +02:00
Matthias Clasen
a1ef27cafb Document the metadata format
This is useful information that should be available in a
single place.
2016-06-30 20:16:48 -04:00
Alexander Larsson
b9db25c4c8 Bump version number since last release 2016-06-30 17:41:20 +02:00
Alexander Larsson
eaeb132a5a builder: Set the new extension properties
Set autodelete=true on locale and debug extensions.
Set no-autodownload=true on debug extensions.
Thats what will happen anyway, but its nice to be explicit.

Also, remove subdirectories=true on the locale extensions, as
we're not using that anymore.
2016-06-30 16:55:32 +02:00
Alexander Larsson
5ab628d0ee Install/update/uninstall related refs
Any "related" references from the same remote are automatically
handled when installing, unless you specify --no-related.

The set of related refs is based on the declared extensions for
the main ref. By default, all such extensions are automatically
installed/updated unless they have "no-autodownload" set to false
in the extension info, and its not already installed locally.

Only extensions marked as "autodelete" will be automatically deleted
when you remove the main ref.

There is some special handling:

Any *.Debug or *.Locale extension is automatically treated as "autodelete".

A *.Locale extension that is autodownloaded will be subsetted using subpaths
such that existing subpaths are kept, and the current locale is added.
2016-06-30 16:55:32 +02:00
Alexander Larsson
4a40fece78 Add flatpak_dir_install_or_update
This is needed in the case where we can do any, such as when
installing related refs, which may be already installed.
2016-06-30 16:55:31 +02:00
Alexander Larsson
8293527dbd FlatpakDir: Add flatpak_dir_find_remote/local_related
This lets us find all the "related" refs to a ref in a particular
remote, or locally.  These are the things we should automatically
download or delete when installing/updating/uninstalling the ref.

The implementation currently looks at all the extensions handled by the
app/runtime. For debug extensions and extensions marked no-autodownload we
only consider them related if its already locally installed. For locale
extensions we always consider them related, but we only pull the current
locale data for it.
2016-06-30 16:55:26 +02:00
Alexander Larsson
9558d7d6ae builder: Strip "." from locale names too
For instance, "C.utf8" => "C" or "en.utf8" => "en".
Mostly this was already handled for e.g. "en_US.utf8" though...
2016-06-30 11:47:45 +02:00
Alexander Larsson
81e61391be utils: Add flatpak_summary_match_subrefs
This is useful to do extension matching in summaries
2016-06-30 11:42:39 +02:00
Alexander Larsson
5897ddd7ef utils: Add flatpak_get_current_locale_subpaths() 2016-06-30 11:41:12 +02:00
Alexander Larsson
9be05bc511 common: Remove unused functions 2016-06-29 16:43:02 +02:00
Alexander Larsson
0be93ed1dc extensions: Always create a tmpfs for subdirectory extensions.
This makes sure we can actually create a directory as needed, and not
having to have every subdirectory pre-created in the runtime.
2016-06-29 15:56:28 +02:00
Alexander Larsson
f1a2f30e41 Add tests for extensions 2016-06-29 12:54:08 +02:00
Alexander Larsson
853227a3d6 extensions: Minor cleanup
We now store the path to the extension files in the FlatpakExtension
returned from list_extensions instead of having each called look
them up.
2016-06-29 12:20:16 +02:00
Alexander Larsson
ab64f70c59 tests: Test install/updates with static deltas 2016-06-28 17:36:54 +02:00
Alexander Larsson
3d534a864a Merge pull request #157 from joaquimrocha/fix_leak
Fix leak in flatpak-installed-ref
2016-06-28 15:28:07 +02:00
Alexander Larsson
c6aa8376b1 tests/test-builder.sh: Re-silence flatpak-builder
The > /dev/null was accidentally dropped
2016-06-28 15:26:16 +02:00
Alexander Larsson
de8d8a36c2 Merge pull request #158 from hadess/wip/use-git-patch
Add "use-git" option for patch source types
2016-06-28 15:24:49 +02:00
Bastien Nocera
b9da048096 tests: Add test for "use-git" patch application 2016-06-28 15:23:44 +02:00
Alexander Larsson
b00dbed3bd builder: Report errors to stderr, not stdout 2016-06-28 15:08:09 +02:00
Alexander Larsson
7070dbf96c Make journal always available in the sandbox
I don't think it makes sense to have to enable this for everything.
It should be safe in the sense that you can't ever do more than
the user can do anyway, and there is no way to use this to communicate
with the rest of the system because you can't read from it.
The worst this could ever cause is to overload the system, but the
sandbox doesn't protect against that in any other way anyway.
2016-06-28 15:05:01 +02:00
Bastien Nocera
c646f386eb builder: Add "use-git" option for patch source type
Closes #6
2016-06-28 14:24:16 +02:00
Bastien Nocera
2facf8bbf0 utils: Add flatpak_spawnv() helper
This will allow callers to easily add new parameters without tearing
their hair out with varargs.
2016-06-28 14:24:16 +02:00
Joaquim Rocha
84043767fb Fix leak in flatpak-installed-ref
The latest_commit string needs to be freed.
2016-06-28 13:14:35 +02:00
Alexander Larsson
44b6c31efc fix warning 2016-06-28 11:41:35 +02:00
Alexander Larsson
5217885108 Update to latest libglnx with lock release fix 2016-06-28 11:41:35 +02:00
Alexander Larsson
9f047ff58e Merge pull request #154 from smcv/test-locale
test-basic: do not fail in non-English locales
2016-06-27 12:55:39 +02:00
Alexander Larsson
43dbf96f7c Merge pull request #148 from matthiasclasen/journal
make journal logging work in the sandbox
2016-06-27 11:14:11 +02:00
Alexander Larsson
5f73b1f2da Merge pull request #155 from smcv/system-bwrap
Add BWRAP and --with-system-bubblewrap configure arguments
2016-06-27 10:58:14 +02:00
Simon McVittie
a41ecc5254 test-basic: do not fail in non-English locales
One of the variations tested on Debian's reproducible build
infrastructure is that the second build is done in a French locale.
This test fails there, because it doesn't see "Usage:" in the help.

Signed-off-by: Simon McVittie <smcv@debian.org>
2016-06-26 16:56:42 +01:00
Simon McVittie
ee99e8afff Add BWRAP and --with-system-bubblewrap configure arguments
This lets distributors share a system copy of bubblewrap (>= 0.1.0)
between Flatpak and any other projects that benefit from it, if they are
careful to keep new versions in sync. The default is still to use the
bundled submodule, ensuring compatibility and simplifying dependencies.

Enable $PATH search everywhere that runs bwrap, so that $BWRAP doesn't
necessarily need to be a fully-qualified path.

Signed-off-by: Simon McVittie <smcv@debian.org>
2016-06-26 11:09:03 +01:00
matthiasclasen
5eede39078 Merge pull request #146 from matthiasclasen/document-d
gdb in sandbox doesn't work
2016-06-24 21:14:33 -04:00
matthiasclasen
d2c7c1b953 Merge pull request #152 from smcv/docportal
document portal: don't reply to GetMountPoint() until ready
2016-06-24 21:13:29 -04:00
matthiasclasen
9b0f0f94e0 Merge pull request #153 from smcv/tests
Various test fixes
2016-06-24 21:11:05 -04:00
Simon McVittie
6f9915eade Run tests with a private XDG_RUNTIME_DIR
Otherwise, service activation will start a new xdg-document-portal
(because we're using a private DBUS_SESSION_BUS_ADDRESS), but because
XDG_RUNTIME_DIR is shared with the real system, it won't be able to
mount its filesystem.

We need to unmount the document portal before removing the private
XDG_RUNTIME_DIR.

Signed-off-by: Simon McVittie <smcv@debian.org>
2016-06-25 00:45:10 +01:00
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
Simon McVittie
dab1d99c46 document portal: don't reply to GetMountPoint() until ready
As soon as we get our D-Bus name, we can start receiving method calls. If
we reply immediately, callers will think our mount point is ready.

In particular, if FUSE is unavailable, we want "flatpak run" to proceed
with no document portal; it currently tries and fails to bind-mount the
nonexistent document portal mount-point into the container.

Signed-off-by: Simon McVittie <smcv@debian.org>
2016-06-24 21:07:57 +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
Matthias Clasen
f6af5702db Document new socket option 2016-06-24 02:01:05 -04:00
Matthias Clasen
5fb066bf90 Add an option for journal sockets
Untested, I couldn't find a runtime that has systemd-cat or a similar
tool in it.
2016-06-24 01:52:55 -04:00
Matthias Clasen
c195c4197d Expand the flatpak run --devel docs
Mention that --devel also affects the seccomp profile.
Took me a while to find that out.
2016-06-23 14:31:40 -04:00
Alexander Larsson
b7972acf74 Update NEWS 0.6.6 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