4818 Commits

Author SHA1 Message Date
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
Matthias Clasen
9fccb90f26 Add some tests for name matching
These examples are taken from commit 8f428fd768

Closes: #2616
Approved by: alexlarsson
2019-01-21 08:27:09 +00:00
Matthias Clasen
e7c622295e Merge pull request #2610 from matthiasclasen/icon-size-limit
icon validator: Fix an off-by-one
2019-01-18 10:17:16 -05:00
Alexander Larsson
25c9a57ccb repair: Only warn about non-existing remotes for normal refs.
For example, someone today got warning messages for deploy refs:
 Remote (null) for ref deploy/runtime/org.freedesktop.Platform.html5-codecs/x86_64/18.08 is missing

Closes: #2611
Approved by: matthiasclasen
2019-01-18 15:02:56 +00:00
Philip Withnall
d9eed092cf common: Mark an error message as translatable
All the other error messages in that file are.

Signed-off-by: Philip Withnall <withnall@endlessm.com>

Closes: #2609
Approved by: matthiasclasen
2019-01-18 12:49:56 +00:00
Matthias Clasen
64958b4d80 icon validator: Fix an off-by-one
I meant to allow 16 as a size limit.
2019-01-18 07:47:38 -05:00
Simon McVittie
b0615922ff Remove leftover files from flatpak-builder
These were part of the flatpak-builder tests, and are no longer
distributed in tarballs or used by Flatpak's tests.

Signed-off-by: Simon McVittie <smcv@collabora.com>

Closes: #2607
Approved by: matthiasclasen
2019-01-17 16:58:41 +00:00
Matthew Leeds
2274242301 transaction: Refuse to let root modify a user repo
If the user (erroneously) runs as root while modifying their user
installation, e.g. with "sudo flatpak --user install ...", this can
cause "permission denied" errors later on when they try to operate on
the installation as their own user. So refuse to execute a transaction
on a user-owned installation as root. Root can still operate on their
own per-user installation.

This approach does have a weakness: if flatpak is running as root when the user
installation is first created, it will be owned by root and therefore
avoid this check. I'm not sure what could be done about that.

Fixes https://github.com/flatpak/flatpak/issues/2565

Closes: #2575
Approved by: alexlarsson
2019-01-17 07:40:29 +00:00
Matthew Leeds
ec61e6aac6 cli-transaction: Fix a typo
Closes: #2575
Approved by: alexlarsson
2019-01-17 07:40:29 +00:00
Matthias Clasen
c280d07d2f ci: Install gdk-pixbuf modules
While we don't need any of the modules (the png loader
is compiled in), gdk-pixbuf refused to operate without
a loaders.cache file, which only gets created when installing
modules :(

Closes: #2523
Approved by: alexlarsson
2019-01-17 07:27:31 +00:00
Matthias Clasen
f52d00f391 build-export: Use the icon validator
Validate all exported icons to be loadable png, svg or
jpeg files with a resolution of no more than 512x512.

Closes: #2523
Approved by: alexlarsson
2019-01-17 07:27:31 +00:00
Matthias Clasen
730dab95f5 Add a utility to validate icons
This is copied from xdg-desktop-portal.

Closes: #2523
Approved by: alexlarsson
2019-01-17 07:27:31 +00:00
Matthew Leeds
c6d511268a doc/flatpak-metadata: Link to fd.o spec consistently
Avoid linking to the same fd.o spec just linked to a few lines above,
and rearrange things to be more readable.

Closes: #2606
Approved by: matthiasclasen
2019-01-17 02:25:10 +00:00
Matthew Leeds
2e76702879 dir: Fix a few "already/not installed" error messages
There was some confusion between branches and commits.

Closes: #2604
Approved by: matthiasclasen
2019-01-16 22:00:44 +00:00
Simon McVittie
7c3140bb7a testcommon: An i386 Flatpak doesn't support x86_64 apps
The compatible architectures are not symmetric: x86_64 and aarch64 can
run i386 and arm binaries, but i386 and arm cannot usually run x86_64
and aarch64 binaries.

This caused test failures on Debian i386 autobuilders.

Signed-off-by: Simon McVittie <smcv@collabora.com>

Closes: #2603
Approved by: matthiasclasen
2019-01-16 12:51:32 +00:00
Matthias Clasen
f28e8af968 Fix xml syntax in org.freedesktop.portal.Flatpak.xml
A bit concerning that this does not break the build.
It did break the docs build in xdg-desktop-portal.

Closes: #2602
Approved by: mwleeds
2019-01-16 04:26:46 +00:00
Matthias Clasen
2f28a940b3 uninstall: Deal with empty installations
Don't let empty installations disrupt uninstall --all
or uninstall --unused. Just skip empty installations.

Closes: #2590

Closes: #2599
Approved by: mwleeds
2019-01-16 00:30:52 +00:00
Simon McVittie
2a25ecf6ee profile: Don't rely on bash syntax
In Debian, we reuse flatpak.sh in /etc/X11/Xsession.d (which is sourced
by /bin/sh, normally dash) so that these environment variables become
part of the X11 session environment. We might also have
non-bash-compatible shells that read profile.d (I'm not sure).

Fixes #2594

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

Closes: #2597
Approved by: matthiasclasen
2019-01-16 00:08:21 +00:00
Simon McVittie
96fde5b29c Install environment generator as an executable file
Signed-off-by: Simon McVittie <smcv@debian.org>

Closes: #2596
Approved by: matthiasclasen
2019-01-15 23:55:36 +00:00
Matthew Leeds
6bf47b4c26 app: Support DeployCollectionID in flatpakrepo
Unfortunately when I added the DeployCollectionID key for flatpakrepo
files I only added support for it in flatpak_dir_parse_repofile and
missed adding it to the remote-add command. So fix the oversight so that
flatpakrepo files that use the key are properly interpreted.

Closes: #2598
Approved by: matthiasclasen
2019-01-15 23:43:43 +00:00
Matthias Clasen
81b25058ae docs: Clarify that --command is only for run
This may not otherwise be obvious.

Closes: #2592
Approved by: matthiasclasen
2019-01-15 20:17:31 +00:00
Matthew Leeds
1ea2864088 Remove no longer needed #define directives
Now that we depend on libostree 2018.9, these aren't needed.

Closes: #2593
Approved by: matthiasclasen
2019-01-15 20:02:17 +00:00
Matthew Leeds
69a977d43a app: Properly return NULL not FALSE
This probably doesn't make any difference but at least the code is more
readable.

Closes: #2593
Approved by: matthiasclasen
2019-01-15 20:02:17 +00:00