Commit Graph

5837 Commits

Author SHA1 Message Date
Alexander Larsson
4d79110cb6 tests: Make OCI authenticator available 2020-05-04 16:32:22 +02:00
Alexander Larsson
1ee132e70e oci authenticator: Accept the right docker manifest when authenticating
Without this I got for the fedora registry:

```
getting token for https://registry.fedoraproject.org/v2/f32/flatpak-runtime/manifests/sha256:bd83b4f6974094848efac22b933419c1dbe11b553def148a82f821faf595de8a
F: Anonymous authentication failed: Unexpected response status 404 from repo
```
2020-05-04 16:32:22 +02:00
Alexander Larsson
0290c154bf oci authenticator: Make the authentication debug logs a bit more verbose 2020-05-04 16:32:22 +02:00
Alexander Larsson
fdfcae7a91 By default, always try to auth to OCI remotes
This makes for instance docker hub work.
2020-05-04 16:32:22 +02:00
Abderrahim Kitouni
d145723fe3 dir: set cache directory when creating child repos 2020-05-04 12:15:21 +02:00
milotype
49125443e1 Update hr.po
Update according to .po file from https://l10n.gnome.org/vertimus/flatpak/master/po/hr/
2020-05-04 12:11:59 +02:00
Rafael Fontenelle
d081ab07d1 Update Brazilian Portuguese translation 2020-05-04 12:11:18 +02:00
Matthew Leeds
e27ec1f3bc app: Add translators comments about sideloading
Fixes https://github.com/flatpak/flatpak/issues/3546
2020-05-04 12:10:49 +02:00
Matthew Leeds
fe650801c4 remote-info: Move newline
Logically, the SDK should be listed with the app info right after the
runtime, not in the commit section.
2020-05-04 12:10:19 +02:00
Matthew Leeds
311b94ed28 update: Restrict --commit to one app/runtime
Currently if you run "flatpak update --commit=XYZ", we try to use that
commit for every installed thing, which doesn't make much sense. Make it
an error not to specify a ref with --commit.
2020-05-04 12:07:50 +02:00
David Edmundson
e481e3ea58 Rename registered cgroups to have app- prefix
The newly added https://systemd.io/DESKTOP_ENVIRONMENTS/ lists an XDG
defined specification for how cgroups for applications should be named.

This will allow flatpak's to correctly follow any drop-in's set for
applications on the system as well as help next-gen system monitor's
treat flatpaks as applications.

flatpak-session-helper.service is unaffected.
2020-05-04 12:07:24 +02:00
Matthew Leeds
2be81a01c4 Merge pull request #3580 from pwithnall/related-to-ops
flatpak-transaction: Change related_to_op to related_to_ops
2020-04-30 06:17:46 -07:00
Philip Withnall
82d0a3f50a flatpak-transaction: Change related_to_op to related_to_ops
Since a single runtime (for example) can be related-to several apps,
that needs to be representable in the data format.

This is an API break, but only of API which has not been released yet.

See https://github.com/flatpak/flatpak/pull/3568#issuecomment-618251958

Signed-off-by: Philip Withnall <withnall@endlessm.com>
2020-04-30 13:14:45 +01:00
Matthew Leeds
1b8d5ecfe3 Merge pull request #3578 from flatpak/tiny-typo-fix
list: Fix a tiny whitespace error
2020-04-27 18:08:05 -07:00
Matthew Leeds
808fac7e80 list: Fix a tiny whitespace error 2020-04-27 17:54:44 -07:00
Alexander Larsson
1c04fc3bed Tests: Fix test due to change in uninstall behaviour
Removing multiple refs where one is missing is now a warning, not a
failure, so change the test to just try to remove one ref.
2020-04-23 10:59:27 +02:00
German Perconti
814c771bdc Don't error out in uninstall when one ref is not installed 2020-04-23 10:59:27 +02:00
Will Thompson
f6d8c387b2 Import German translations from Endless OS
When we add significant new source strings downstream, Endless adds
projects to our Transifex instance to get translations from paid
translators and community contributors.

Since we no longer add new source strings to Flatpak, we're removing it
from our infrastructure. I checked which strings we have translations
for downstream that are not present (if perhaps different) upstream, and
these German translations from a community member are it.
2020-04-23 10:22:06 +02:00
Philip Withnall
1c2024dc8d flatpak-transaction: Clarify units in documentation
While it can be worked out from the context, it’s clearer to state the
units that download and installed sizes are calculated in explicitly.

Signed-off-by: Philip Withnall <withnall@endlessm.com>
2020-04-23 10:13:19 +02:00
Philip Withnall
b743ca6478 flatpak-transaction: Clarify some documentation around skipped ops
Make it explicit that skipped ops are excluded when returning the ops in
a transaction, or when working out whether it’s empty.

Signed-off-by: Philip Withnall <withnall@endlessm.com>
2020-04-23 10:13:19 +02:00
Philip Withnall
5824668418 flatpak-transaction: Add flatpak_transaction_operation_get_is_skipped()
This exposes the `skip` member of `FlatpakTransactionOperation`, as it’s
needed for callers to usefully traverse the operation graph (which is
now accessible using
`flatpak_transaction_operation_get_related_to_op()`).

Signed-off-by: Philip Withnall <withnall@endlessm.com>
2020-04-23 10:13:19 +02:00
Valentin David
4df019063b Add sysusers.d configuration file
This will make systemd create the system-helper user if it is missing.
2020-04-23 09:58:34 +02:00
Philip Withnall
d51e7468e1 dir: Fix a typo in a flags enum name
Signed-off-by: Philip Withnall <withnall@endlessm.com>
2020-04-23 09:56:35 +02:00
Matthew Leeds
129d72e667 transaction: Fix a typo in a comment 2020-04-16 09:22:11 +02:00
Matthew Leeds
cff972e422 testlibrary: Simplify code a bit 2020-04-16 09:22:11 +02:00
Matthew Leeds
f6e81f8caf testlibrary: Fix a whitespace issue 2020-04-16 09:22:11 +02:00
Matthew Leeds
e847bb31b6 installation: Re-implement list_installed_refs_for_update()
Re-implement flatpak_installation_list_installed_refs_for_update() using
a FlatpakTransaction, so we can guarantee it always gives the same set
of things to update as the update command. This API is used by GNOME
Software and many times in the past g-s has not shown the same list of
apps to be updated as the flatpak CLI. See:
- https://gitlab.gnome.org/GNOME/gnome-software/issues/539
- https://gitlab.gnome.org/GNOME/gnome-software/-/merge_requests/430

This commit also expands the unit tests for this API, which were already
quite good. Now we test that missing subpaths of locale extensions show
up as updates, and updates that have been pulled but not deployed show
up as well. The latter is a break from how this function used to behave,
but it seems unlikely to break any application.
2020-04-16 09:22:11 +02:00
Matthew Leeds
f61f9d17da transaction: Use correct subpaths for locales
Currently, if you add an app update to a transaction and its locale
extension does not have subpaths installed for every configured
language, the locale will be updated accordingly. But if you add only
the locale extension to the transaction to be updated, the transaction
is a no-op because we treat subpaths == NULL to mean the currently
installed set of subpaths, and
flatpak_dir_needs_update_for_commit_and_subpaths() decides there's
nothing to do.

This doesn't seem like the right behavior, so update
flatpak_transaction_add_ref() so that we take the configured set of
locales into account as we do in add_related().

This will help the unit test in the following commit to pass.
2020-04-16 09:22:11 +02:00
Matthew Leeds
e6b906f842 transaction: Add transaction_operation_get_related_to_op()
This will be used in the following commit, so we can track what
installed thing needs an update when there's a transaction operation to
e.g. install its missing runtime or extension.
2020-04-16 09:22:11 +02:00
Matthew Leeds
56071df5fb installation: Replace some debug statements
These were committed recently by accident; use g_debug() instead.
2020-04-16 09:22:11 +02:00
BiteDasher
f05e4f97ec Update russian translation (#3547)
* Update russian translation

Some strings have been fixed
2020-04-16 08:57:38 +02:00
milotype
5354cc3705 Update Croatian hr.po 2020-04-16 08:57:01 +02:00
Matthew Leeds
112614d289 quiet-transaction: Remove side-effect on no-interaction
Currently when you create a FlatpakQuietTransaction object using a
FlatpakDir, the dir will have no_interaction set to TRUE even after the
transaction runs. I don't think it makes sense to have a side effect
like that, and it causes the remote-delete command to fail in the case
where it has to uninstall things. So, restore the old no_interaction
value during destruction of the FlatpakQuietTransaction.

Fixes https://github.com/flatpak/flatpak/issues/3140
2020-04-16 08:56:39 +02:00
Jan Grulich
f3c0d3e87f CUPS socket: do not print error when we found CUPS server 2020-04-16 08:54:44 +02:00
BiteDasher
376ba7aeb4 Update russian translation (#3535)
* Update russian translation

100% complete
2020-04-07 12:51:18 +02:00
Alexander Larsson
171fca1d49 Merge pull request #3543 from bittin/patch-1
Update sv.po
2020-04-07 12:50:32 +02:00
bittin
a28e2fade5 Update sv.po
Trying to do a PR with updated Swedish translations
2020-04-07 12:30:20 +02:00
Alexander Larsson
bac2e70525 Update pofiles for release 1.7.2 2020-04-03 17:17:58 +02:00
Alexander Larsson
885d7b989c Bump version to 1.7.2 2020-04-03 17:05:32 +02:00
Alexander Larsson
14a64c4715 Update NEWS for 1.7.2 2020-04-03 17:05:15 +02:00
Alexander Larsson
e96ac8398e Merge pull request #3532 from alexlarsson/extra-data-size-in-summary
Extra data size in summary
2020-04-03 17:02:17 +02:00
Alexander Larsson
b4b72b8de2 Use extra-data download size from summary if available
This avoids an extra download when new new extra-data information is
available in the summary.
2020-04-03 16:45:45 +02:00
Alexander Larsson
bf0bd3874b Add extra data download size to sparse cache in summary
This adds the nr of extra datas, as well as the total size in the sparse
cache for all refs that has them. This is what we need for in the download,
and having it in the summary means we don't have to separately download
the commit.

Additionally we add a cache version field to the summary so that we
can know if we can rely on the existance of the new data.
2020-04-03 16:27:33 +02:00
Alexander Larsson
c3616ab1eb Merge pull request #3530 from alexlarsson/re-fix-progress
Re-fix progress
2020-04-03 16:25:50 +02:00
Alexander Larsson
3eaec588d7 Don't always create commitpartial files in child repos
We used to always create a commitpartial file in child repo, because
ostree doesn't follow parent repos when loading commitpartial state,
and when the commit was in the parent repo it would find the commit
but no commitpartial and assume the commit was complete and do nothing.

However, having a commitpartial file seems to break delta downloads in
ostree, as per: https://github.com/ostreedev/ostree/issues/2053
causing us to download too much data when using deltas.

So, we now only create a commitpartial if there is one in the parent
repo.  This still means we will get the ostree problems in case there
is one, but in the much more common case we avoid the issue.

In order to "fix" the uncommon case we also (separately) cap the
reported progress at 100%. (We should probably also fix the upstream
ostree issue too.)
2020-04-03 12:56:59 +02:00
Alexander Larsson
ee702c8a91 Remove outdated comments
We no longer create a transaction in flatpak_dir_setup_extra_data since
203a10ae25, so don't claim to.
2020-04-03 12:55:44 +02:00
Alexander Larsson
a154b7d28a Progress: Artificially limit progress to 100%
Due to bugs in ostree (see
e.g. https://github.com/flatpak/flatpak/pull/3524) it sometimes
happens that we download more data than we expect to. This isn't
great, but when it happens its better to limit the progress to 100%
anyway to avoid breaking apps (for example, the flatpak CLI doesn't
really handle this very well).
2020-04-03 12:53:16 +02:00
Alexander Larsson
203a10ae25 Revert "Revert "extra-data: Simplify extra-data progress setup""
This reverts commit 2120b99ac6.
2020-04-03 09:32:21 +02:00
Alexander Larsson
d276771289 Merge pull request #3528 from ispanos/patch-1
Added flatpak remote-modify reference
2020-04-02 09:02:48 +02:00
Yiannis
e459703b38 Added flatpak remote-modify reference
`flatpak remote-modify --collection-id= ` can be use to set the collection ID of the remote server.
I spent quite a while trying to find how to set it, until I found this blog post:
https://blogs.gnome.org/mclasen/2018/08/26/about-flatpak-installations/
2020-04-01 23:08:20 +03:00