Commit Graph

7164 Commits

Author SHA1 Message Date
Alexander Larsson
e0a25e7650 http: Also accept image indexes when FLATPAK_HTTP_FLAGS_ACCEPT_OCI 2020-06-05 09:35:30 +02:00
Alexander Larsson
01919d251e oci: Use content type from server if not in contents 2020-06-05 09:35:30 +02:00
Alexander Larsson
7820057336 Add content_type output to flatpak_load_uri()
We want this to get the oci mimetypes
2020-06-05 09:35:30 +02:00
Alexander Larsson
bfa71e208a Add FlatpakZstdDecompressor converter (and libzstd dep)
We will need this to decompress oci deltas.
2020-06-05 09:35:30 +02:00
Alexander Larsson
8e0e5a5749 oci: Always checksum entire layer when pulling
It turns out that libarchive doesn't always read the entire file until
the end if it can figure out that the tarfile ended. Normally this is
not hit, because the decompressor reads all the input, but for
uncompressed tarfiles (like those from applied deltas) this is
important.
2020-06-05 09:35:30 +02:00
Alexander Larsson
c2529d0bf8 oci: Use /var/tmp for tmpdir instead of /tmp
The files we're creating could potentially be large, so lets
not overflow ram if /tmp is a tmpfs.
2020-06-05 09:35:30 +02:00
Matthew Leeds
f44afe9d60 Merge pull request #3629 from cho2/l10n
Update Indonesian translation
2020-05-31 09:53:10 -07:00
Kukuh Syafaat
fea5074840 Update Indonesian translation 2020-05-30 22:26:47 +07:00
Matthew Leeds
ff677cfdbc Merge pull request #3623 from tw-translation/trans-200517
i18n: zh_TW: update translation
2020-05-29 17:41:04 -07:00
Matthew Leeds
7575388a02 Merge pull request #3631 from flatpak/build-update-repo-typo
doc: Fix typo in build-update-repo page
2020-05-26 08:19:31 -07:00
Matthew Leeds
0ed5477a22 doc: Fix typo in build-update-repo page 2020-05-22 11:12:55 -07:00
Kukuh Syafaat
289a3baa05 Update Indonesian translation 2020-05-21 16:31:59 +07:00
Yi-Jyun Pan
92386e2e81 i18n: zh_TW: fix issues mentioned by @zerng07 2020-05-18 01:59:37 +08:00
Yi-Jyun Pan
c5d5ebc03b i18n: zh_TW: update translation 2020-05-17 17:45:56 +08:00
Ryan Gonzalez
381f751f0a remote-add: Don't make the repo existence optional
A repository needs to exist for a remote to be written inside,
otherwise the OstreeRepo instance will be NULL and a crash will
occur once the instance is accessed.

Fixes #3612.
2020-05-13 12:24:11 -05:00
Henri Chain
0c291cf1c9 run: Change systemd unit name
As per https://github.com/systemd/systemd/pull/15647 replace "apps-" with "app-" in the scope name. Also escape app id to avoid using the special char `.`.
2020-05-13 09:57:53 +02:00
Matthew Leeds
f8dff22f19 README: Link to Flathub discourse
We don't have a separate discourse for Flatpak; it seems fine to link to
the Flathub one.

Fixes https://github.com/flatpak/flatpak/issues/3602
2020-05-12 09:26:36 +02:00
Matthew Leeds
125492bf7a app: Make upgrade an alias for update
Fixes https://github.com/flatpak/flatpak/issues/3607
2020-05-12 09:25:49 +02:00
Alexander Larsson
171218969b tokens: Request tokens during resolve if we get 401 status
If downloading a specific commit (or oci manifest) we may get a 401 back.
If so, request a token and try again. In this case we don't yet know the
token type, so pass MAXINT32 for "don't know".
2020-05-05 13:08:57 +02:00
Alexander Larsson
f6a0fa41a1 Add FLATPAK_HTTP_ERROR_UNAUTHORIZED (i.e. http status 401) 2020-05-05 13:08:57 +02:00
Alexander Larsson
e3c31309a4 Rename internal error FLATPAK_OCI_ERROR to FLATPAK_HTTP_ERROR
This is what it is really, and I want to extend it with more http errors
that are not necessarily oci related.
2020-05-05 13:08:57 +02:00
Alexander Larsson
6c3f150a05 oci: Don't crash when loading manifest by digest with no ref label 2020-05-05 11:26:20 +02:00
Alexander Larsson
a94e36d002 oci: Actually respect the commit argument when pulling
We now allow this to be set with update --commit=123abc in the oci case
too.
2020-05-05 09:33:09 +02:00
Alexander Larsson
cf49bd4ac8 oci: Support reconstructure individual commit objects (sorta)
This downloads a manifest by digest and reconstructs the commit except
for the tree/metadata reference. This allows things like flatpak remote-info
and flatpak update --commit=xxx to work.
2020-05-05 09:33:09 +02:00
Alexander Larsson
56f530ca1f dir: Add flatpak_remote_state_new_oci_registry helper
This is duplicated in a few places
2020-05-05 09:33:09 +02:00
Alexander Larsson
2028a5323f dir: Share some code that downloads commit objects
Only have the single function flatpak_remote_state_load_ref_commit()
that loads the commit objects (and don't support loading other types
of objects as that is not used).

This is a minor cleanup, but it also will be useful later when
we want to be able to "load" commits from OCI repositories.
2020-05-05 09:33:09 +02:00
Alexander Larsson
530475b9ab Tests: Support HEAD requests in oci-registry-server
This just does a GET, which is not quite right, but will work.
This is needed for the authenticator.
2020-05-04 16:32:22 +02:00
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