4840 Commits

Author SHA1 Message Date
Alexander Larsson
7b78a7d0af Update pofiles 1.2.1 2019-02-05 14:00:02 +01:00
Alexander Larsson
101f8bd8e6 Update NEWS for release 2019-02-05 12:57:31 +01:00
Alexander Larsson
06a2f4d82d Actually always return non-null from flatpak_dir_get_display_name()
This also changes this to a non-const as we need to generate it.

Closes: #2683
Approved by: alexlarsson
2019-02-05 11:45:54 +00:00
Alexander Larsson
8928a60876 Bump version to 1.2.1 2019-02-05 11:35:49 +01:00
Matthias Clasen
f8dfcf66f8 Only install polkit agent when needed
We don't need a polkit agent for simple things like
flatpak --installations. Only install it for running
actual commands.

Closes: #2679
Approved by: alexlarsson
2019-02-05 10:35:26 +00:00
Matthias Clasen
2bf420b93a icon validator: Use exec for the sandboxing
We don't really need a separate process here, and
doing things this way makes output from the sandbox
appear outside, thereby giving us meaningful error
messages for invalid icons.

Related: #2669

Closes: #2677
Approved by: alexlarsson
2019-02-05 10:00:15 +00:00
Mathieu Velten
65634d214c build-init: use the sdk branch from the sdk ref when checking extensions
Closes: #2664
Approved by: alexlarsson
2019-02-04 09:51:54 +00:00
Matthias Clasen
e209ac9e10 cli transaction: Make the checks green
Success ought to be green.

Related: #2671

Closes: #2676
Approved by: mwleeds
2019-02-02 01:38:32 +00:00
Matthias Clasen
d502d31a34 Add a define for green
Add a define for the Escape sequence for green.

Closes: #2676
Approved by: mwleeds
2019-02-02 01:38:32 +00:00
Matthias Clasen
228ee0bd0a appdata: Ignore allowed attributes
We only interested in a few of the attributes of some
tags, but we shouldn't fail if other valid attributes
are present.

Add some of the allowed attributes to the <release> element
in the appdata test and verify that we can still parse it.

The appstream spec is here:
https://www.freedesktop.org/software/appstream/docs/

Closes: #2674
Approved by: matthiasclasen
2019-02-02 00:52:32 +00:00
Piotr Drąg
8d4fa873c2 Update Polish translation
Closes: #2672
Approved by: alexlarsson
2019-02-01 17:05:48 +00:00
Alexander Larsson
f74b54503a build-commit-from: Fix the collection-ref binding
We accidentally got an extra variant making the
type variant(a(ss)) instead of just a(ss).

Closes: #2666
Approved by: alexlarsson
2019-02-01 16:48:09 +00:00
Debarshi Ray
7c8f21e0a4 profile: Unbreak XDG_DATA_DIRS when debug logging is enabled
If G_MESSAGES_DEBUG is set in the shell's start-up scripts, then the
"flatpak --installations" output is contaminated with these strings:
  (flatpak:4558): flatpak-DEBUG: ...

Fallout from 30c2919624

Closes: #2673
Approved by: alexlarsson
2019-02-01 16:30:52 +00:00
Matthias Clasen
d5e2970725 cli transaction: Adapt to an api change
In f7a566e2ab, the flatpak_installation_get_display_name()
api was changed to (almost) always return a non-NULL string. Adapt
to this change, in order to use the preferred messages here.

Closes: #2655

Closes: #2668
Approved by: alexlarsson
2019-02-01 16:30:17 +00:00
AsciiWolf
5a08abb399 Update Czech translation
Closes: #2667
Approved by: matthiasclasen
2019-01-31 20:36:07 +00:00
AsciiWolf
6075a5e7d0 Make the Nothing to do. string translatable 2019-01-31 15:19:29 +01:00
Simon McVittie
2184205801 make-test-*: Don't sandbox the icon validator
During build-time tests, bwrap doesn't necessarily work. In particular,
official Debian autobuilders can't enter namespaces.

We continue to leave the sandbox enabled in the build-export calls in
tests/test-extensions.sh, tests/test-unsigned-summaries.sh
and tests/test-update-remote-configuration.sh, which are already
skipped if bwrap isn't available. This means we exercise both the
normal and --disable-sandbox code paths.

Signed-off-by: Simon McVittie <smcv@debian.org>

Closes: #2661
Approved by: alexlarsson
2019-01-31 14:02:24 +00:00
Simon McVittie
ea227187d4 build-export: Allow sandboxing on icon validator to be disabled
During build-time tests, we can't rely on bwrap working.

Signed-off-by: Simon McVittie <smcv@debian.org>

Closes: #2661
Approved by: alexlarsson
2019-01-31 14:02:24 +00:00
Matthew Leeds
2b40e68e16 build-commit-from: Fix handling of ostree.collection-refs-binding
In a previous iteration of the work for supporting multiple collection
bindings on a commit[1][2] the key ostree.collections-binding was used,
but it was decided that ostree.collection-refs-binding makes more sense.
So update build-commit-from in one place where the old key was still
being used. This impact of this bug is that we would overwrite the value
of ostree.collection-refs-binding on the new commit with the one on the
source commit (which may not have all the same collection-refs
associated with it).  However since the libostree support for that key
hasn't been merged that wouldn't cause any problems yet.

[1] https://github.com/flatpak/flatpak/pull/2634
[2] https://github.com/ostreedev/ostree/pull/1805

Closes: #2644
Approved by: matthiasclasen
2019-01-29 23:04:54 +00:00
Alexander Larsson
ed71e4680c Handle versions of appstream-glib prior to 0.5.15
These don't have AS_BUNDLE_KIND_FLATPAK, but we can just
assume all bundles are flatpak bundles in the appstream data
we get from flatpak.

Closes: #2650
Approved by: alexlarsson
2019-01-29 10:19:28 +00:00
Alexander Larsson
f0c404d104 Add backported version of g_date_time_new_from_iso8601
Closes: #2642
Approved by: matthiasclasen
2019-01-28 16:36:38 +00:00
Alexander Larsson
7a4f36b5fb Make dconf optional on dconf 0.26
This is needed, because e.g. xenial only has dconf 0.24 which doesn't
have the API needed.

Closes: #2643
Approved by: matthiasclasen
2019-01-28 16:33:06 +00:00
Alexander Larsson
7baac10cdb Update pofiles 1.2.0 2019-01-28 12:43:03 +01:00
Alexander Larsson
5ebcecf244 Bump version to 1.2.0 2019-01-28 11:48:50 +01:00
Alexander Larsson
110fd3b4fe Update NEWS for release 2019-01-28 11:46:13 +01:00
Alexander Larsson
bcc53c2454 validate-icon: Search the path for bwrap
Closes: #2640
Approved by: alexlarsson
2019-01-28 09:40:22 +00:00
Alexander Larsson
441c1f52ea build-commit-from: Support --extra-collection-id
If this is passed, we add an extra collection id binding to
the commit, as well as create a separate ref for that particular
collection id.

This weakly depends on:
  https://github.com/ostreedev/ostree/pull/1805
In that without that change ostree pull will not respect
multiple collection-id bindings. It will still work for
the main/first collection id though.

Closes: #2634
Approved by: alexlarsson
2019-01-28 08:37:51 +00:00
Alexander Larsson
485d51e0a7 run: Generate /run/host/font-dirs.xml config file
This file lists the directories that are remapped in the sandbox,
allowing fontconfig to use the correct cache identifier for the
host-side caches.

As an example, this generates:

```
$ ./flatpak run --command=sh org.gnome.gedit
[📦 org.gnome.gedit flatpak]$ cat /run/host/font-dirs.xml
<?xml version="1.0"?>
<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
<fontconfig>
	<remap-dir as-path="/usr/share/fonts">/run/host/fonts</remap-dir>
	<remap-dir as-path="/home/alex/.fonts">/run/host/user-fonts</remap-dir>
</fontconfig>
```

Closes: #2635
Approved by: alexlarsson
2019-01-25 12:21:45 +00:00
Matthias Clasen
c9430b15f8 cli transaction: Use raw mode
We don't want line editing to interfere with our
formatting, so we turn on raw mode while we do
fancy progress reporting. We use raw mode at the
same times as we hide the cursor.

This should prevent partial Escape sequences from
showing up in the output.

Closes: #2638
Approved by: alexlarsson
2019-01-25 12:03:47 +00:00
Matthias Clasen
a0d579bb9b Add utilities to switch in and out of raw mode
Closes: #2638
Approved by: alexlarsson
2019-01-25 12:03:47 +00:00
Yuri Chornoivan
7a321f2b8c Update Ukrainian translation
Closes: #2636
Approved by: matthiasclasen
2019-01-24 16:36:12 +00:00
Matthias Clasen
ac14058d9a Update tests to match new output
Our tests notice the string changes in the previous commit.

Closes: #2624
Approved by: matthiasclasen
2019-01-23 12:45:00 +00:00
Matthias Clasen
370c667887 columns: Be more precise and helpful
Complain about ambiguous suffixes, and and spell out
the allowed values when complaining about suffixes.

Closes: #2624
Approved by: matthiasclasen
2019-01-23 12:45:00 +00:00
Matthias Clasen
7ec898f00b Document --columns ellipsization
Update the relevant man pages with this information.

Closes: #2624
Approved by: matthiasclasen
2019-01-23 12:45:00 +00:00
Matthias Clasen
1770a7b600 Mention ellipsization in --columns=help output
Closes: #2624
Approved by: matthiasclasen
2019-01-23 12:45:00 +00:00
Matthias Clasen
57b55d9781 icon-validator: Use readlink() properly
This function helpfully does not 0-terminate the buffer,
so we have to do that ourselves. Also make the buffer
as large as possibly required, and handle errors.

Closes: #2630
Approved by: matthiasclasen
2019-01-23 12:44:38 +00:00
Matthias Clasen
350456abdd Turn off completion debug
This accidentally snuck in.

Closes: #2623
Approved by: matthiasclasen
2019-01-21 22:16:34 +00:00
Ryan Gonzalez
3333069a68 remote-delete: Avoid a "remote not found" error when deleting an -origin remote
Closes: #2626
Approved by: matthiasclasen
2019-01-21 22:02:35 +00:00
Ryan Gonzalez
26d2fb18fe remote-delete: Avoid deleting all refs
Fixes #2625

Closes: #2626
Approved by: matthiasclasen
2019-01-21 22:02:35 +00:00
AsciiWolf
80f48ccec0 Update Czech translation
Closes: #2622
Approved by: matthiasclasen
2019-01-21 17:21:43 +00:00
Matthias Clasen
ae1dc979df Make tests work
We can't look at the FLATPAK_VALIDATE_ICON environment variable
inside the sandbox. Use /proc/self/exe to find the binary to reexec.

Closes: #2618
Approved by: alexlarsson
2019-01-21 09:17:29 +00:00
Matthias Clasen
39152a6d40 Copy sandbox setup from libgnome-desktop
We need to handle source directories not existing, for example /lib64
on a pure 32-bit system.

Because relative symlinks in a directory that is itself a symlink do
not have the same meaning as the same relative symlink in a bind-mount
of that directory, ideally we want to use --symlink for /lib and /lib64
on merged-/usr systems, but --ro-bind on non-merged-/usr systems.

Also bind /etc/ld.so.cache into the sandbox.

This is especially important for libstdc++ on distributions that
don't have it directly in a libdir and the runtime linker doesn't
look where needed without /etc/ld.so.cache (e.g. if libstdc++ is
in a GCC per-version subdirectory handled via /etc/ld.so.conf.d/).

Changes originally made in libgnome-desktop by Iain Lane (see
<https://bugzilla.gnome.org/show_bug.cgi?id=787072>).

Adapted from https://github.com/flatpak/xdg-desktop-portal/pull/289
by Simon McVittie.

Closes: #2618
Approved by: alexlarsson
2019-01-21 09:17:29 +00:00
Matthias Clasen
8f4d929e45 build-export: Use the --sandbox option for icon validation
Instead of setting up the sandbox ourselves, rely
on the --sandbox option to do so.

Closes: #2618
Approved by: alexlarsson
2019-01-21 09:17:29 +00:00
Matthias Clasen
81265f5115 Make the icon validator sandbox itself
Make the icon validator reexec itself inside a sandbos
if the --sandbox option is given. This lets us share
the sandbox setup between all users of this tool.

An additional advantage is that this makes the sandbox
setup code testable by iself.

Closes: #2618
Approved by: alexlarsson
2019-01-21 09:17:29 +00:00
Matthias Clasen
52e511e501 info, remote-info: Use print_wrapped
This makes the NAME - DESCRIPTION line at the top
wrap nicely at word boundaries.

Closes: #2620
Approved by: alexlarsson
2019-01-21 09:01:22 +00:00
Matthias Clasen
1c831c131f Test appdata date parsing
Add a few dates to our appdata testdata,
and verify the results.

Closes: #2619
Approved by: alexlarsson
2019-01-21 08:46:57 +00:00
Matthias Clasen
69212da002 Parse date attributes in appdata
The spec allowed either timestamp or date to
be specified for a release, so we should support
both.

Closes: #2614

Closes: #2619
Approved by: alexlarsson
2019-01-21 08:46:57 +00:00
Matthias Clasen
6ad0332cca Make --columns more powerful
Allow to override ellipsization with a suffix on the colum.
Use
:s or :start for ellipsization at the start,
:m or :middle for ellipsization in the middle,
:e or :end for ellipsization at the end,
:f or :full for no ellipsization.
This can be helpful when it is important to see certain
columns in full.

Closes: #2621
Approved by: alexlarsson
2019-01-21 08:32:13 +00:00
Matthias Clasen
7b94d827d7 Allow multiple name segments after prefix
This lets us export D-Bus service files for
names like org.foo.Bar.Application.Tracker.service
when the app-id is org.foo.Bar.

Closes: #2615

Closes: #2616
Approved by: alexlarsson
2019-01-21 08:27:09 +00:00
Matthias Clasen
e7172516a0 Add one more name matching test
This one is from #2615 and does not work.

Closes: #2616
Approved by: alexlarsson
2019-01-21 08:27:09 +00:00