Commit Graph

20 Commits

Author SHA1 Message Date
Kir Kolyshkin c3ff7f58df Use any instead of interface{}
It's available since Go 1.18 (see https://pkg.go.dev/builtin#any).

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
2025-03-31 15:37:25 -07:00
Kir Kolyshkin 773a3eff25 drivers/overlay: fix ST1003 linter warning
> drivers/overlay/composefs.go:56:2: ST1003: var writerJson should be writerJSON (staticcheck)

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
2025-03-26 18:47:22 -07:00
openshift-merge-bot[bot] 8a1de75726
Merge pull request #2200 from giuseppe/fix-comment
composefs: fix comment
2024-12-19 14:34:14 +00:00
Giuseppe Scrivano cdfa958ef7
composefs: remove cgo dependency
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2024-12-19 10:49:38 +01:00
Giuseppe Scrivano a44601f013
composefs: fix comment
Linux 6.12 was already released and it supports mounting EROFS through
a file.

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2024-12-19 10:07:27 +01:00
Giuseppe Scrivano 7981709024
composefs: make error clearer
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2024-10-24 14:49:06 +02:00
Giuseppe Scrivano db1be7432a
composefs: use mount from file where supported
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=fb176750266a3d7f42ebdcf28e8ba40350b27847
adds the possibility to mount a EROFS file system directly from its backing file instead of using a loopback device.

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2024-10-23 14:23:51 +02:00
Giuseppe Scrivano dceaef7150
composefs: refactor openComposefsMount
preparation for the next commit

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2024-10-23 14:23:51 +02:00
Giuseppe Scrivano 384c325d7b
composefs: remove \n from fsconfig_create error
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2024-10-23 14:23:51 +02:00
Kir Kolyshkin 83c0c077c5 all: remove old-style +build tags
Brought to you by

	go fix ./...

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
2024-09-19 17:00:48 -07:00
Giuseppe Scrivano 932bb5f629
overlay: split open mount and move mount
this is a preparation patch for the next commit

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2024-08-21 08:19:48 +02:00
Giuseppe Scrivano 1a6957bced
composefs: read errorfs from the mount fd
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2024-08-06 15:46:50 +02:00
Giuseppe Scrivano 4457fb6fe3
composefs: use new mount API
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2024-08-06 15:46:50 +02:00
Giuseppe Scrivano 39098fb973
composefs: prefer std library functions
avoid dealing directly with file descriptors but use the standard
library functions.

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2024-07-30 18:14:45 +02:00
Giuseppe Scrivano 5bc4390aa1
composefs: do not pass "ro" as a mount option
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2024-07-30 18:10:29 +02:00
Giuseppe Scrivano 26c520ecf3
overlay: improve some composefs errors
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2024-07-24 16:35:52 +02:00
Paul Holzinger 2a4b851f39
composefs: return mkcomposefs stderr as part of error
Writing the error to stderr is not helpful when using the podman API.
The error would only be visable on the server which is bad and likely is
not noticed at all.

Also for the regular podman cli it would be hard for a user to know if
the stderr from mkcompose is related to the returned podman error.

To fix this capture the stderr and append it to the error as string,
this should be fine assuming mkcomposefs doesn't print a ton on stderr
which I assume is not the case.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2024-04-18 15:27:08 +02:00
Giuseppe Scrivano 539d0fe583
overlay: use the fs-verity computed by the differ
avoid to reopen the files twice to calculate their fs-verity digest.

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2024-01-19 12:50:36 +01:00
Giuseppe Scrivano c5dd86d2bc
overlay: use the fsverity package
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2024-01-17 16:10:14 +01:00
Giuseppe Scrivano 6c3d7958f1
overlay: always build composefs
and honor the use_composefs configuration from the storage.conf file.

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2023-12-11 15:06:41 +01:00