In this mode all clients get NameOwnerChanged events for all
unique names. This means you can track lifetimes of these, even if
you can't talk to them. This is useful on the a11y bus, because
we want to track when there are any listeners to a particular event,
and this is done my listing unique id:s and tracking them.
This adds a new policy level FILTERED which is betweew SEEN
and TALK. It implies all that SEEN does, but additionally lets
you send method calls to a well known name that matches a
filter which can match against interface name, member name and
object path.
Note: To make the implementation simpler, this does not grant
similar access when sending the peer messages via the unique name,
only when using the well known name does this work.
We'll need this to be able to skip system-mode tests without xattrs.
This partially reverts commit a53a752a35.
Signed-off-by: Simon McVittie <smcv@collabora.com>
This makes it easier to reason about. In the absence of
FLATPAK_SYSTEM_CACHE_DIR, it would use /var/tmp even during tests that
prefer /tmp.
Signed-off-by: Simon McVittie <smcv@collabora.com>
- Replace `if (g_test_verbose ()) g_print("...\n")` with
`g_test_message ("...")`, which prints the message if the test is
either verbose or in TAP mode. Otherwise, post-mortem debugging
of failing tests on an autobuilder is very difficult.
In some cases, since commit f1dbe9bc "tests: Print spawned program
argv in testlibrary" we already had the g_test_message(), but
still had the redundant g_print() too.
- Factor out running a subprocess into a helper function to reduce
duplication.
- Capture invoked subprocesses' stderr and stdout where possible, so we
can log it as diagnostics. Again, this should make it easier to carry
out post-mortem debugging based on autobuilder logs.
Signed-off-by: Simon McVittie <smcv@collabora.com>
As discussed in https://github.com/flatpak/flatpak/issues/975, it is
better to have the temporary repos for installing into the system repo
outside the home directory. This helps in the case when the home
directory is on a different filesystem. In particular it is more
likely to be on the same partition as the system repo in /var/lib.
There are multiple advantages if the two repos are on the same filesystem:
* Less chance of filling up the space on a filesystem that is not
the final target.
* It is possible to use fs operations like reflink or copy_file_range to
optimize the copies from the temporary repo to the system repo.
* The home directory is more often on NFS or other weird filesystem
type.
We no longer use bwrap --die-with-parent by default, because it has
problems due to the semantics of PR_SET_PDEATHSIG. In particular, it
will kill bwrap as soon as *any* thread in the parent exits, not just
the main one.
This caused weird problems in gnome-builder, as seen in:
https://bugzilla.gnome.org/show_bug.cgi?id=783950#c14
It should be safe to use this from single-threaded apps though,
so flatpak-builder can still use it. It just has to explicitly
enable it.
If a flatpakref has this set, for instance:
SuggestRemoteName=gnome-apps
Then flatpak install will ask if you want to configure
this as a "real" remote, rather than an origin remote (which
will only install that app).
This is useful when creating flatpakref files for remotes
that have multiple applications in them, such as e.g. flathub
or the gnome nightly builds. However, it should not be
set of one-application repositories.
* Get language list from AccountsService's dbus
Fixes issue #950
When xa.languages is not set in repo config, system installs will
get language list from AccountsService's dbus.
This is declared in the header file, but was never actually implemented.
Oops.
If anybody is hit by this issue, they can work around it by using
g_object_get() to get the FlatpakRemote:type property, which this is the
getter for.
Add it to the tests as well, so it gets exercised.
Signed-off-by: Philip Withnall <withnall@endlessm.com>
This takes a list of properties and generate finish arguments.
Additionally you can specify "bundle": true, which causes f-b to emit
an actual extension implementation, similar to e.g. the locale
and debuginfo extension.
Lookup extra-data files as
~/.local/share/flatpak/extra-data/SHA256/FILENAME, Similar to files
downloaded in the .flatpak-builder directory.
For now, if a corresponding file exists, assume it's the full download
and read bytes from it. Then proceed to do the same checks as for the
bytes downloaded by Soup.
In the future this directory could be used to support resumed downloads
by storing partial downloads.
Set up /var to $appdir/var binding after all the other filesystem
setup has happened. Before we did not do this, so a link from e.g.
/foo to /var/foo would be created in the appdir var rather than the tmpfs
var, which would fail with EEXIST the second time because that directory
is persisted.
In particular, this was problematic on endless os where /var/home is
a symlink.
This makes sure we always delete build dirs, even if there
was a build failure. This is useful for automatic build systems
like flathub or continuous integration.
This fixes https://github.com/flatpak/flatpak/issues/646