Alexander Larsson
aaa36bab45
oci: Support deltas when using system-helper
...
When mirroring to a local OCI dir we apply deltas and generate
uncompressed layer blobs instead of regular blobs. Then we pick this
up on the system-helper side.
2020-06-05 09:35:30 +02:00
Alexander Larsson
f2cb157294
oci: Use the correct progress layer size when using deltas
2020-06-05 09:35:30 +02:00
Alexander Larsson
37dcccea61
oci: Add flatpak_oci_registry_apply_delta_to_blob()
...
This is a version of flatpak_oci_registry_apply_delta() that generates
a new blob in a local repo, rather than a temporary file. This is used
when mirroring using a delta into a child oci registry for system-helper
use.
2020-06-05 09:35:30 +02:00
Alexander Larsson
5d8fd2d1be
oci: Set token on child oci registry and pass to system-helper
...
When we create a system child registry we also set the current token on
it. This is not used directly in the client, however its saved in a
file called .token and re-read in the system-helper, allowing it to
also do the remote registry operations it needs to verify the child
registry.
2020-06-05 09:35:30 +02:00
Alexander Larsson
d4962628aa
oci: Add flatpak_oci_registry_is_local()
2020-06-05 09:35:30 +02:00
Alexander Larsson
8c454f99f2
oci: Add debug spew when using deltas
2020-06-05 09:35:30 +02:00
Alexander Larsson
4539d186a5
oci: Make libzstd optional (and disable OCI deltas if not there)
2020-06-05 09:35:30 +02:00
Alexander Larsson
31612d7568
CI: Add libzstd-dev dependency
2020-06-05 09:35:30 +02:00
Alexander Larsson
7be653a14d
oci: Find and apply available deltas when pulling
2020-06-05 09:35:30 +02:00
Alexander Larsson
0fce4c6d7f
oci: Pass FlatpakPullFlags to pull_from_oci()
...
We want to handle FLATPAK_PULL_FLAGS_NO_STATIC_DELTAS
2020-06-05 09:35:30 +02:00
Alexander Larsson
abf5b2db44
oci: Add basic functions to find and apply OCI deltas
...
This is based on the OCI delta work at:
https://github.com/containers/image/pull/902
2020-06-05 09:35:30 +02:00
Alexander Larsson
3d8ca04565
oci: Add helpers to parse OCI delta index and manifest
2020-06-05 09:35:30 +02:00
Alexander Larsson
eaeb52b6a3
flatpak_oci_registry_load_blob: Allow tags (and digests) arg
...
We typically only load by digest id, resolving tags in other ways.
However, we need to load the _deltaindex tag by tagname, so support
this when possible.
2020-06-05 09:35:30 +02:00
Alexander Larsson
29da4ca430
oci: Store the last layer diff-id in the commit metadata (xa.diff-id)
...
We an use the commit content as original data for deltas going from
this diff-id, so this will be useful later.
2020-06-05 09:35:30 +02:00
Alexander Larsson
90f5fdb44d
oci: Add flatpak_oci_image_get_n_layers() helper
2020-06-05 09:35:30 +02:00
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
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