5573 Commits

Author SHA1 Message Date
Alexander Larsson
722e20dfbb Update pofiles for release 1.6.0 2019-12-20 11:54:19 +01:00
Alexander Larsson
c048bdc941 Update NEWS 2019-12-20 11:33:18 +01:00
Matthias Clasen
6e45ff6d0f portal: Don't poll for updates on metered networks
Stop polling for updates on metered networks. Allow
overriding this with the new --poll-when-metered
option.

Fixes: https://github.com/flatpak/flatpak/issues/3286
2019-12-20 11:32:40 +01:00
Alexander Larsson
6179620de5 Update NEWS for release 2019-12-20 11:22:19 +01:00
Alexander Larsson
6056e4c235 Bump version to 1.6.0 2019-12-20 11:22:11 +01:00
Alexander Larsson
681ca88547 oci: Fix leak in index handling 2019-12-20 11:15:39 +01:00
Alexander Larsson
202b2508d5 filters: Fix some leaks 2019-12-20 11:15:39 +01:00
Alexander Larsson
aabcbfa586 flatpak_installation_list_unused_refs: Fix leak 2019-12-20 11:15:39 +01:00
Matthias Clasen
e6c8e796ca Merge pull request #3323 from alexlarsson/fix-leaks
Fix leaks
2019-12-19 23:17:09 -05:00
Alexander Larsson
86c9e55561 tests: Drop oci label/annotation separate tests
We only do labels now, so no need to test both.
2019-12-19 18:01:00 +01:00
Alexander Larsson
883f4bf177 oci: Fix leak 2019-12-19 17:42:32 +01:00
Alexander Larsson
0af22af913 transaction: Fix leak 2019-12-19 17:42:19 +01:00
Alexander Larsson
ca6c12d4dd authenticators: Fix leak 2019-12-19 17:42:04 +01:00
Alexander Larsson
1c737df031 completion: Fix some leaks 2019-12-19 17:09:47 +01:00
Alexander Larsson
815502b97f remote-add: Fix leak 2019-12-19 16:57:47 +01:00
Alexander Larsson
7a8801da50 Fix leak in flatpak_repo_update() 2019-12-19 16:53:14 +01:00
Alexander Larsson
7c3e6f7214 appdata: Fix leak of id string. 2019-12-19 16:52:58 +01:00
Alexander Larsson
cc4ea023f0 tests: Only fail FLATPAK_TESTS_VALGRIND_LEAKS for *definite* leaks 2019-12-19 16:52:36 +01:00
Alexander Larsson
aabadfdc8e authenticator: Fix sandboxed authenticators
We rely on broadcast signals for authenticator replies rather than unicast
as these are not filtered by the sandbox (due to them being opt-in by the
receiver).

Actually this already worked fine in the flatpak side as the generated
code already subscribes to the signals, this just switches the internal
authenticators (test and oci) to using the new way to emit signals.
2019-12-19 10:33:21 +01:00
Alexander Larsson
1291663a5a transaction: Automatically install authenticator if needed
If the local config for the remote specifies an authenticator name
and that is should in installed, automatically add it to updates
in a transaction.

The local config can either be manually configured, or automatically
from a flatpakrepo file or the summary metadata.
2019-12-19 10:33:21 +01:00
Alexander Larsson
7480bd8f07 Show authenticator info in flatpak repo output 2019-12-19 10:33:21 +01:00
Alexander Larsson
4bb2f0684a Support updating authenticator keys via remote config updates 2019-12-19 10:33:21 +01:00
Alexander Larsson
04162f3286 repo support for setting authenticator options
flatpak build-update-repo now lets you modify the
autenticator-name/install/options keys, and these are migrated to
the summary/metadata during update.
2019-12-19 10:33:21 +01:00
Alexander Larsson
798d90ef0c flatpakrepo files: Support Authenticator keys
This parses AuthenticatorName and AuthenticatorInstall
2019-12-19 10:33:21 +01:00
Alexander Larsson
8e4b0d156d remote add/modify: Add --[no-]authenticator-install options
This enables or disables auto-installation of autenticators for a remote.
If it is unset it defaults to whatever the remote wants.
2019-12-19 10:33:21 +01:00
Alexander Larsson
af2ecb7335 transaction: Make metadata updates more efficient
When we call flatpak_dir_update_remote_configuration we pass it
the pre-existing FlatpakRemoteState (if known) and also take into
account if it actually changed anything before blowing away the
cached remote state.

We also ensure we have metadata in
flatpak_dir_update_remote_configuration_for_state to ensure the passed
in optional state has metadata in it.
2019-12-19 10:33:21 +01:00
Alexander Larsson
d28189889b Minor tweaks to authenticator options commandline handling
Make checks the same and fix whitespace.
2019-12-19 10:33:21 +01:00
Alexander Larsson
1648bf34b1 remote options: Fix authenticator-name--is-set handling
This accidentally was a string instead of a boolean
2019-12-19 10:33:21 +01:00
Alexander Larsson
a5b73716d1 CLI: Limit where we warn about unset XDG_DATA_DIRS
This warning is meant for interactive use, and as per #3316 it often
breaks non-interactive stuff like scripts. So, we only warn on ttys,
and only on normally interactive operations like run, install and update
to avoid warnings in cases like building (where XDG_DATA_DIRS is not
needed) or information gathering things like e.g. flatpak info.
2019-12-19 10:29:56 +01:00
Matthew Leeds
dd5a82727c app: Improve "remote not found" error message
It often happens that people use --user or --system or --installation
and get a "Remote not found" error message, because they don't
understand that remotes have to be defined separately in each
installation. Make the error message more helpful by pointing out when
one of those options was used.

Fixes https://github.com/flatpak/flatpak/issues/3296
2019-12-19 09:53:22 +01:00
Umang Jain
142a7fd855 dir: Immediately return if getting remote state is cancelled
Immediately return the error instead of saving the error and
continuing on an optional codepath if _flatpak_dir_get_remote_state
is cancelled.
2019-12-18 10:36:05 +01:00
Alexander Larsson
4c3e59cd12 utils: Fix chaining of progress
With the latest ostree that enables the chaining of progress the
testsuite broke because we were not getting changed events. Looking
into this the reason seems to be that when we run the
ostree_async_progress_finish() on the chained progress it is marked
as dead, which causes ostree_async_progress_copy_state() to not copy
any data when called from handle_chained_progress().

The fix is to copy the content manually before calling the finish().

Also, the entire callback chaining system seems wildly
overcomplicated, so I simplified it by relying on the existing change
notification of OstreeAsyncProgress.
2019-12-18 09:46:39 +01:00
Alexander Larsson
85a53947b3 man: Document the authentcator options
This adds --authenticator-name and --authenticator-opion to remote-add
and remote-modify docs.
2019-12-17 15:25:42 +01:00
Alexander Larsson
ca343957fc Update CLI to new authenticator options format
We're using a per-key format now, so switch from
  --authenticator-options=blob
to
  --authenticator-option=key=value

In both remote-modify and remote-add
2019-12-17 15:25:42 +01:00
Alexander Larsson
a9888574ec authenticator: Empty authenticator name means none 2019-12-17 15:25:42 +01:00
Alexander Larsson
ecf4c3630a authenticator: Set the xa.authenticator-name-is-set key
This is set when the option is explicitly set and should not be
auto-overridden.
2019-12-17 15:25:42 +01:00
Alexander Larsson
65f2bdf840 oci-authenticator: Remove leftover TODO comment
We *do* handle dying peers now, so remove TODO about this.
2019-12-17 15:00:23 +01:00
Alexander Larsson
24145b0845 oci-authenticator: Reply to the close message
The client will be waiting for the response, so make sure we send it!
2019-12-17 15:00:23 +01:00
Simon McVittie
777d80e2e4 testlibrary: Fix some leaks in the test itself
Signed-off-by: Simon McVittie <smcv@collabora.com>
2019-12-17 15:00:07 +01:00
Alexander Larsson
7ecc9fa12c oci-authenticator: Skip interaction of no-interaction is set 2019-12-17 14:59:43 +01:00
Alexander Larsson
4106fc4677 authenticators: For no-interaction dirs, send no-interaction flag
For apps that run in the backgroun without interaction, pass this info
to the authenticator.

This can be used to avoid sending unnecessary webflow or basic auth
request, but those were already silenced by FlatpakTransaction. However
this also allows the authenticator to avoid doing direct, native user
interaction which was otherwise not avoidable.
2019-12-17 14:59:43 +01:00
Simon McVittie
10ee004d77 dir: Don't leak result of flatpak_get_current_locale_langs()
Signed-off-by: Simon McVittie <smcv@collabora.com>
2019-12-17 14:59:24 +01:00
Simon McVittie
b72cd803e0 flatpak.supp: Silence GFile leak in flatpak_get_user_base_dir_location()
This is deliberately allocated once per process and never freed.

Signed-off-by: Simon McVittie <smcv@collabora.com>
2019-12-17 14:58:15 +01:00
Alexander Larsson
0b732ba111 dir: Fix leak in flatpak_remote_state_lookup_cache()
For some reason we're assigning refdata the same thing twice, leaking
the first copy.
2019-12-17 14:55:13 +01:00
Alexander Larsson
24558eec47 dir: Fix leak in flatpak_dir_p2p_state_free
We forgot to free the results_refs member
2019-12-17 14:55:13 +01:00
Alexander Larsson
f983ed616b dir: Actually free the main memory chunk in flatpak_dir_p2p_state_free 2019-12-17 14:55:13 +01:00
Alexander Larsson
d7474daaf2 dir: Fix leak
When recreating self->repo, also clear self->cache_dir, otherwise it was
leaking when we replaced it.
2019-12-17 14:55:13 +01:00
Alexander Larsson
e645424e69 Cli-transaction: Fix leak
We didn't free the table printer used.
2019-12-17 14:55:13 +01:00
Alexander Larsson
bc1edce45a tests: Add new glib suppression
Seems there is a new GPrivate method in town!
2019-12-17 14:55:13 +01:00
Alexander Larsson
510fbce093 Remove extraneous ostree_async_progress_finish()
These should only be called at the leaf level, because the first
time its called no more change events will ever be sent on that
progress, which is not right possibly in the middle of an operation.
2019-12-17 14:55:13 +01:00