3042 Commits

Author SHA1 Message Date
Alexander Larsson
3f62bc63b5 Update pofiles 0.9.9 2017-09-01 16:40:52 +02:00
Alexander Larsson
4a8b8888f7 Bump version to 0.9.9 2017-09-01 16:36:40 +02:00
Alexander Larsson
5efc2c760c Update NEWS for release 2017-09-01 16:36:29 +02:00
Simon McVittie
0ec1a5452b Drop configure checks for unused libelf, libdwarf
These were only used by flatpak-builder which has now gone away.

Signed-off-by: Simon McVittie <smcv@collabora.com>
2017-09-01 16:05:24 +02:00
Alexander Larsson
de4b6840d2 Initial work on accessiblity support
This creates a dbus proxy for the a11y bus and sets AT_SPI_BUS_ADDRESS in the
environment to the filtered bus.

The app is only allowed to send a very limited amount of messages to
org.a11y.atspi.Registry on the bus, and nothing else.

This requires a patch to at-spi2-core to read the address from
AT_SPI_BUS_ADDRESS:
     https://github.com/flatpak/freedesktop-sdk-images/blob/1.6/at-spi2-core-address-env-var.patch

Fixes https://github.com/flatpak/flatpak/issues/79
2017-09-01 15:36:29 +02:00
Alexander Larsson
fa29b40fad dbus-proxy: Add sloppy-names mode
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.
2017-09-01 15:34:40 +02:00
Alexander Larsson
ec902a08fa dbus-proxy: Add support for filtering on iface/member/path
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.
2017-09-01 15:33:31 +02:00
Alexander Larsson
a8e2dcc1c3 dbus-proxy: Forbid old-style eavesdropping 2017-09-01 09:52:34 +02:00
Alexander Larsson
f9eebd7a54 run: Share the same dbus proxy for session and system bus 2017-08-31 16:55:46 +02:00
Simon McVittie
22f05803b9 Skip system-mode tests (only) if /var/tmp doesn't support xattrs
This partially reverts commit a53a752a35.

Signed-off-by: Simon McVittie <smcv@collabora.com>
2017-08-31 16:22:18 +02:00
Simon McVittie
e65bcc9fcc Bring back skip_without_user_xattrs helper function
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>
2017-08-31 16:22:18 +02:00
Simon McVittie
6e46dc8076 Revert "tests: Don't force use of /var/tmp"
This reverts commit 0648452fca.
Unfortunately, it appears we still need xattrs on the system cache.

Signed-off-by: Simon McVittie <smcv@collabora.com>
2017-08-31 16:22:18 +02:00
Simon McVittie
2cfeef6bcc Put FLATPAK_SYSTEM_CACHE_DIR alongside other test data
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>
2017-08-31 16:22:18 +02:00
Alexander Larsson
fef8743f26 run: Always create a fontconfig cache dir in the app dir
Otherwise fontconfig falls back to a shared ~/.fontconfig dir
which means caches are not per-app, and is not necessarily accessible.
2017-08-31 16:10:08 +02:00
Simon McVittie
0648452fca tests: Don't force use of /var/tmp
Now that we don't need user xattrs, a tmpfs is good enough.

Signed-off-by: Simon McVittie <smcv@collabora.com>
2017-08-31 13:35:54 +02:00
Simon McVittie
a53a752a35 tests: Don't require user xattrs
Since Flatpak 0.9.6, we use libostree in bare-user-only mode, which
does not rely on xattrs.

Signed-off-by: Simon McVittie <smcv@collabora.com>
2017-08-31 13:35:54 +02:00
Simon McVittie
86fd56dce0 Improve test diagnostics
- 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>
2017-08-30 15:45:11 +02:00
Alexander Larsson
0de2978a4d run: Allow calling personality with the current personality
Ideally we should also allow 0xffffffff, which is "read the current state",
but that doesn't seem possible with the current libseccomp.
2017-08-30 15:37:55 +02:00
Alexander Larsson
8f5e47fda5 run: Always set personality (to clear weird states) 2017-08-30 15:37:32 +02:00
Alexander Larsson
8b5aebafb9 Put system child repos in /var/tmp
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.
2017-08-30 14:07:54 +02:00
Alexander Larsson
75d7e76276 build: Add --die-with-parent option and drop it by default
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.
2017-08-30 11:21:28 +02:00
Alexander Larsson
0da103748a flatpakref: Add new SuggestRemoteName key support
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.
2017-08-28 18:17:58 +02:00
Alexander Larsson
02894b2202 common: Create remote_is_already_configured() helper
This will be reused later
2017-08-28 17:47:01 +02:00
Alexander Larsson
4178fbdc09 update-repo: Ensure we commit the appstream data with canonical permissions 2017-08-28 11:39:17 +02:00
Alexander Larsson
bad89eddeb Clean up the AccountService call by using g_autoptr 2017-08-25 14:54:45 +02:00
Alexander Larsson
2a661fd448 Fix regression in --devel
Commit 489bfddfb mistakenly ended a line with a comma instead of a semicolon which
caused --devel to break.
2017-08-25 14:44:57 +02:00
LinXuan Jiang
4fc222ac3b Get language list from AccountsService's dbus (#973)
* 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.
2017-08-25 14:25:09 +02:00
Alexander Larsson
52bd146561 Remove flatpak-builder from flatpak repo
This is now in a separate flatpak-builder repo
2017-08-25 11:10:50 +02:00
Matthias Clasen
bbfb53abd6 Merge pull request #976 from sgnn7/README_fixes
Fixed README.md
2017-08-23 14:07:09 -04:00
Matthias Clasen
4b030b934d Merge pull request #980 from pwithnall/flatpak-remote-type
Add missing flatpak_remote_get_remote_type() implementation
2017-08-23 14:03:06 -04:00
Philip Withnall
15df314ca4 lib/remote: Add implementation of flatpak_remote_get_remote_type()
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>
2017-08-23 16:59:11 +01:00
Philip Withnall
00e5a0d325 lib/remote: Add documentation for the class properties
Signed-off-by: Philip Withnall <withnall@endlessm.com>
2017-08-23 16:55:02 +01:00
Alexander Larsson
706d13895e Inherit min-percent-free-space from system repo into child repo
This way you can at least work around the free space check in *some*
way.
See https://github.com/flatpak/flatpak/issues/975
2017-08-23 11:13:45 +02:00
Srdjan Grubor
140b646a58 Fixed README.md
Many fixes to phrasing, wording, proper noun capitalization, etc
2017-08-22 10:52:33 -05:00
Matthias Clasen
503b2f8b4c Merge pull request #974 from AsciiWolf/cs-update
Update Czech translation
2017-08-22 08:42:55 -04:00
AsciiWolf
227e547367 Update Czech translation 2017-08-21 19:58:33 +02:00
Alexander Larsson
cc8c8e6e30 Update pofiles 0.9.8 2017-08-21 18:25:30 +02:00
Alexander Larsson
3ac5747e39 Bump version to 0.9.8 2017-08-21 18:15:26 +02:00
Alexander Larsson
570665d0ae Update NEWS for release 2017-08-21 18:15:18 +02:00
Alexander Larsson
a44bae6936 builder: Install all subpaths when installing dependencies
This means we e.g. always get the entire locale.
2017-08-21 17:26:03 +02:00
Alexander Larsson
c6ef29c06b builder: Add support for defining extensions in flatpak-builder
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.
2017-08-21 15:46:06 +02:00
Alexander Larsson
0305628758 common: Fix up error reporting for local extra data
Report the actual error message if we failed to read the file.
2017-08-21 10:40:20 +02:00
Manuel Quiñones
9e38de1556 extra-data: Support reading from local directory
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.
2017-08-21 10:33:15 +02:00
Matthias Clasen
39a8abb788 Merge pull request #972 from piotrdrag/pl-update-170818
Update Polish translation
2017-08-18 13:02:40 -04:00
Piotr Drąg
2d14812f18 Update Polish translation 2017-08-18 18:50:16 +02:00
Alexander Larsson
1aadc3ee40 build: Fix issues when symlinks in / point into /var
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.
2017-08-18 17:06:03 +02:00
Alexander Larsson
37fa3461c9 builder: Add --delete-build-dirs
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
2017-08-18 16:29:17 +02:00
Alexander Larsson
326507602c build-update-repo: Don't remove next-to-last deltas
When creating a new commit of an app, we create deltas of it and from
its parent to it, and remove all other deltas. This can be problematic
during the switchover to the new delta, because some active operation
may be using the current delta when its deleted.

We fix this by keeping the parent and grandparent-to-parent deltas
around (but we never *generate* them).
2017-08-18 15:53:09 +02:00
Alexander Larsson
18451644ff Update to latest libglnx (and fix some callers) 2017-08-18 15:34:29 +02:00
Philip Withnall
6321bc9c93 lib: Make P2P API unconditionally public
Rather than a lot of #ifdef mess in the public headers, Alex would
prefer that the P2P API is made unconditionally public. This assumes
that they are unlikely to change in future. If they do, we just make
them return NULL or break API and drop them.

Signed-off-by: Philip Withnall <withnall@endlessm.com>
2017-08-18 14:23:03 +02:00