Commit Graph

4866 Commits

Author SHA1 Message Date
Alexander Larsson
26b6bb4990 build-update-repo: Add --no-update-[summary,appstream]
We'd like to use these in flat-manager for more detailed updates
of the repo.

Closes: #2730
Approved by: alexlarsson
2019-02-27 11:20:58 +00:00
AsciiWolf
cc4090f1c9 Update Czech translation
Closes: #2728
Approved by: matthiasclasen
2019-02-26 15:16:40 +00:00
AsciiWolf
75690a08bb Fix missing translatable string
Closes: #2724
Approved by: mwleeds
2019-02-25 22:10:10 +00:00
Matthew Leeds
e8816b7663 Remove extra newlines in variable definiton blocks
Uncrustify has an option "nl_func_var_def_blk" which is supposed to
ensure there's a newline character between the block of variable
definitions and the rest of the function body, but it gets confused and
thinks that the first instance of "g_autoptr" or "g_auto" being used on
a variable is the start of the function body. So this commit removes
those extra newline characters and removes that option in uncrustify.cfg
so they don't get re-added the next time uncrustify is run.

Here's the command I used:

perl -0777 -i -pe 's/\n(\n\s*g_auto\()/\1/g' `git ls-tree --name-only
-r HEAD | grep \\\.[ch]$ | grep -v common/valgrind-private.h |
grep -v app/flatpak-polkit-agent-text-listener\\\.[ch]`

I ran it again with "g_autoptr" in place of "g_auto", and made a few
manual edits to add back the newline when the g_auto* was in the middle
of a function body rather than at the top.

Closes: #2715
Approved by: matthiasclasen
2019-02-25 18:12:30 +00:00
Matthew Leeds
a0d3d65476 Remove extra newlines near curly braces
Edit uncrustify.cfg to add options to remove extra newlines near opening
and closing braces, and run uncrustify again.

Closes: #2715
Approved by: matthiasclasen
2019-02-25 18:12:30 +00:00
Matthew Leeds
8d962a686f Run uncrustify
I had to make a few manual edits but other than those the changes look
reasonable.

Closes: #2715
Approved by: matthiasclasen
2019-02-25 18:12:30 +00:00
Matthew Leeds
7d72dd713f uncrustify: Exclude app/flatpak-polkit-agent-text-listener.[ch]
These are copied from polkit so we don't want to uncrustify them.

Closes: #2715
Approved by: matthiasclasen
2019-02-25 18:12:30 +00:00
Matthias Clasen
4c5c359c91 Convert dconf settings to keyfile
We do a one-time conversion of existing dconf user settings
into a keyfile in the apps XDG_CONFIG_DIR, where the glib
keyfile settingsbackend will look for it.

Closes: #2678
Approved by: alexlarsson
2019-02-21 01:09:58 +00:00
Matthias Clasen
9e25dfabcd dconf: Prepare for reading user values
Pass the DCONF_READ flags down, so we can use a different one.

Closes: #2678
Approved by: alexlarsson
2019-02-21 01:09:58 +00:00
Alexander Larsson
28e96288c4 Fix issues with XDG_RUNTIME_DIR being /var/run which is a symlink
Whenever we use $XDG_RUNTIME_DIR and expose it somehow in the sandbox
we fully resolve the path, because if (as happens on gentoo for instance)
it contains /var/run -> ../run, then flatpak thinks we need to
add the /var/run symlink in the runtime even though we already
exposed that.

Closes: #2710
Approved by: matthiasclasen
2019-02-20 19:43:28 +00:00
Kukuh Syafaat
13e449b503 Update Indonesian translation
Closes: #2709
Approved by: matthiasclasen
2019-02-18 15:20:14 +00:00
Matthew Leeds
368f7ae0b1 .gitignore: Ignore tags file
This is generated by the "ctags" command.
2019-02-15 15:42:00 -08:00
Matthew Leeds
182706b938 installation: Remove no longer needed ostree version checks
Flatpak depends on ostree 2018.9, so there's no need for these checks
any more.

Closes: #2704
Approved by: alexlarsson
2019-02-14 10:20:23 +00:00
Matthias Clasen
ce0981cb6d table printer: Use cell width, throughout
This should make it safe to use Escape sequences
in table content without messing up the alignment.

Closes: #2689
Approved by: alexlarsson
2019-02-14 09:12:40 +00:00
Matthias Clasen
71b5b66da6 Add utilities for 'cell width'
These functions are like g_utf8_strlen and g_utf8_offset_to_pointer,
but know to skip the Escape sequences we use.

Closes: #2689
Approved by: alexlarsson
2019-02-14 09:12:40 +00:00
Matthias Clasen
e9382b34bd cli transaction: Make the checks green
Success ought to be green.

Related: #2671

Closes: #2676
Approved by: mwleeds

Closes: #2689
Approved by: alexlarsson
2019-02-14 09:12:40 +00:00
Patrick Griffis
d2dff2875b Support multiple nvidia cards
Closes: #2695
Approved by: alexlarsson
2019-02-14 08:48:47 +00:00
Matthew Leeds
4607739677 Delete stray semicolons
Closes: #2703
Approved by: matthiasclasen
2019-02-14 06:14:59 +00:00
Piotr Drąg
5c19c3242d Update Polish translation
Closes: #2700
Approved by: matthiasclasen
2019-02-13 14:11:07 +00:00
AsciiWolf
4fe2d19ed2 Update Czech translation
Closes: #2697
Approved by: matthiasclasen
2019-02-12 01:41:33 +00:00
Alexander Larsson
cd2142888f Don't expose /proc when running apply_extra
As shown by CVE-2019-5736, it is sometimes possible for the sandbox
app to access outside files using /proc/self/exe. This is not
typically an issue for flatpak as the sandbox runs as the user which
has no permissions to e.g. modify the host files.

However, when installing apps using extra-data into the system repo
we *do* actually run a sandbox as root. So, in this case we disable mounting
/proc in the sandbox, which will neuter attacks like this.
2019-02-11 14:36:41 +01:00
Matthew Leeds
b85f386a6b .gitignore: Add missing files
Closes: #2691
Approved by: matthiasclasen
2019-02-11 12:47:06 +00:00
Matthew Leeds
61f44231fe Unstable version should be 1.3.0 not 1.3.1
1.3.0 hasn't been released, so that should be the next unstable version.

Closes: #2688
Approved by: matthiasclasen
2019-02-08 15:50:10 +00:00
Alexander Larsson
7c9368d100 CLI: Handle consoles reporting zero size
For whatever reason, in the buildbot environment the TIOCGWINSZ
ioctl returns a 0x0 size, which causes a divide by zero. We
handle this by returning a default 80x24 size.

Closes: #2685
Approved by: alexlarsson
2019-02-06 09:31:45 +00:00
Alexander Larsson
2ea428a541 Revert "cli transaction: Make the checks green"
This reverts commit e209ac9e10.

We're counting thee escape sequences as width, until we fix
this we disable this.

Closes: #2686
Approved by: alexlarsson
2019-02-06 09:17:49 +00:00
Alexander Larsson
24398ad1c2 Change version to 1.3.1, do stable work on flatpak-1.2.x branch 2019-02-05 14:19:00 +01:00
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