Commit Graph

4790 Commits

Author SHA1 Message Date
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
Alexander Larsson
cafe28f92d Update pofiles 1.1.3 2019-01-15 16:09:13 +01:00
Alexander Larsson
5880a6923f Update valgrind suppressions
This adds some new ones from new deps we picked up.
2019-01-15 16:02:34 +01:00
Alexander Larsson
ba4463caea completion: Avoid read-past-start-of-string
This just reorders the check, so in practice it should make no difference
but it fixed a valgrind warning.

Closes: #2591
Approved by: alexlarsson
2019-01-15 12:13:15 +00:00
Alexander Larsson
76a47c28d0 completion: Add some initial sanity bounds checking to flatpak_complete
Closes: #2591
Approved by: alexlarsson
2019-01-15 12:13:15 +00:00
Alexander Larsson
ab124a3cdc Dist profile/flatpak.sh 2019-01-14 18:14:48 +01:00
Alexander Larsson
3493ed1230 Dist env.d/60-flatpak 2019-01-14 18:11:39 +01:00
Alexander Larsson
38d6e1673a Bump version to 1.1.3 2019-01-14 18:07:17 +01:00
Alexander Larsson
8ebf486152 Update NEWS for release 2019-01-14 18:07:17 +01:00
Alexander Larsson
a143161131 tests: Fix tests on intel gpus
We can't assume have-intel-gpu is not true!

Closes: #2589
Approved by: alexlarsson
2019-01-14 16:48:32 +00:00
Matthias Clasen
f2303ee4c5 Export dconf data
We want to move away from using dconf inside the sandbox,
and instead use the keyfile backend for GSettings, which
has gained the capability to read defaults and locks.

This change makes the dconf database contents and locks
available in a suitable format. The files appear inside
the sandbox in the /etc/glib-2.0/settings directory.

We only export the default values for keys in the dconf
subtree whose path matches the app id, as well as prefixes
listed in paths key from the X-DConf group in metadata.

This commit adds a new dependency, since we're now linking
against libdconf.

Closes: #2295
Approved by: alexlarsson
2019-01-14 15:34:11 +00:00
Matthias Clasen
7a6e52eca8 Add tests for appdata parsing
Closes: #2580
Approved by: alexlarsson
2019-01-14 15:06:41 +00:00
Matthias Clasen
f9c6a769ef Stop linking libflatpak against listappstream-glib
We no longer use it here. flatpak itself still links
against it. This avoids problems with consumers who
might also link against libappstream.

Closes: #2580
Approved by: alexlarsson
2019-01-14 15:06:41 +00:00
Matthias Clasen
5db64fe342 Add a minimal GMarkup-based appdata parser
This parser nderstands just enough appdata to pull
out the strings we want.

Closes: #2580
Approved by: alexlarsson
2019-01-14 15:06:41 +00:00
Matthias Clasen
728f917418 Move appdata parsing to its own file
This is just moving some code around for now.
It is still using libappstream-glib.

Closes: #2580
Approved by: alexlarsson
2019-01-14 15:06:41 +00:00
Matthias Clasen
9dff4bbb85 Move flatpak_dir_load_appstream_store
This function has libappstream-glib types in the
api, which we want to drop. And it is only used
in app/, so move it there.

Closes: #2580
Approved by: alexlarsson
2019-01-14 15:06:41 +00:00
Matthias Clasen
4b3087c356 Update tests
We have tests that catch changes in the default
installation display names. Amazing

Closes: #2583
Approved by: alexlarsson
2019-01-14 13:59:14 +00:00
Matthias Clasen
faab490f1e Improve FlatpakInstallation docs
Document the values returned by flatpak_installation_get_id()
and by flatpak_installation_get_display_name() for standard
installations.

Closes: #2583
Approved by: alexlarsson
2019-01-14 13:59:14 +00:00
Matthias Clasen
f7a566e2ab Make sure we have IDs and display names
Return non-NULL strings from flatpak_dir_get_id()
and flatpak_dir_get_display_name() for user installations,
to save library users the hassle of dealing with NULL
return values.

Closes: #2583
Approved by: alexlarsson
2019-01-14 13:59:14 +00:00
Matthias Clasen
eaebab1285 Translate the display name of the default installation
Change the terminology from 'directory' to 'installation',
and mark the string for translation.

Closes: #2583
Approved by: alexlarsson
2019-01-14 13:59:14 +00:00
Matthias Clasen
bd6f71a3c8 Update colum tests
We have tests for internal apis now, and they
catch when we change those apis. Yay.

Closes: #2460
Approved by: alexlarsson
2019-01-14 13:35:56 +00:00
Matthias Clasen
d1b4719ab8 table printer: Redo column handling
Move expand and ellipsize to the Column struct,
and change flatpak_table_printer_set_column_titles
to flatpak_table_printer_set_columns that sets up
not just the title, but also expand and ellipsize.

Update all callers.

Closes: #2460
Approved by: alexlarsson
2019-01-14 13:35:56 +00:00
Matthias Clasen
8dca651085 search: Match other lists for table setup
Use the same setup code for the columns here as
we do in in list and remote-ls. One difference
was that search was not expanding. This is now
fixed, and search behaves the same as the others.

Closes: #2460
Approved by: alexlarsson
2019-01-14 13:35:56 +00:00
Matthias Clasen
a8bfcb038a Fix list ellipsizing
We were inadvertedly adding extra columns when
trying to set existing columns as ellipsizable.
Oops.

Closes: #2460
Approved by: alexlarsson
2019-01-14 13:35:56 +00:00
Matthias Clasen
f28fa5aefd Fix remote-ls ellipsizing
We were inadvertedly adding extra columns when
trying to set existing columns as ellipsizable.
Oops.

Closes: #2460
Approved by: alexlarsson
2019-01-14 13:35:56 +00:00
Matthias Clasen
e7d6d0147e remote-ls: Fix a regression
We were trying to be smart about showing origin,
but recent rearrangement of columns made us show
refs instead.

Closes: #2460
Approved by: alexlarsson
2019-01-14 13:35:55 +00:00
Matthias Clasen
7ade0d07fe repair: Do some basic check for remotes
We should point out if refs in the repo refer
to missing or disabled remotes, this is useful
information.

Closes: #2473
Approved by: alexlarsson
2019-01-14 13:21:12 +00:00
Matthias Clasen
71411ee88c repair: Document --reinstall-all
Closes: #2473
Approved by: alexlarsson
2019-01-14 13:21:12 +00:00
Matthias Clasen
c68bcac795 repair: Reinstall appstream too
--reinstall-all means to the re-create all checkouts,
so lets recreate appstream checkouts as well.

Closes: #2473
Approved by: alexlarsson
2019-01-14 13:21:12 +00:00