Commit Graph

30333 Commits

Author SHA1 Message Date
Giuseppe Scrivano 8c9ca13d37
store: remove deprecated ApplyDiffWithDiffer
The ApplyDiffWithDiffer function was marked as deprecated,
with PrepareStagedLayer being the recommended replacement.
Its implementation was just a wrapper around PrepareStagedLayer.

Remove the deprecated function from the Store and LayerStore
interfaces and its implementation.

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2025-05-07 08:52:18 +02:00
openshift-merge-bot[bot] 9ef75c10ed
Merge pull request #2327 from containers/renovate/golang.org-x-sys-0.x
fix(deps): update module golang.org/x/sys to v0.33.0
2025-05-06 19:24:19 +00:00
renovate[bot] 84f6109cf0
fix(deps): update module golang.org/x/sys to v0.33.0
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-05-06 07:33:01 +00:00
openshift-merge-bot[bot] 9a881eeda3
Merge pull request #2326 from containers/renovate/golang.org-x-sync-0.x
fix(deps): update module golang.org/x/sync to v0.14.0
2025-05-06 07:32:04 +00:00
renovate[bot] 9918304cc6
fix(deps): update module golang.org/x/sync to v0.14.0
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-05-05 14:54:29 +00:00
openshift-merge-bot[bot] 0780c3ee25
Merge pull request #2324 from containers/renovate/golangci-golangci-lint-2.x
chore(deps): update dependency golangci/golangci-lint to v2.1.6
2025-05-05 14:53:41 +00:00
renovate[bot] 8f9965d400
chore(deps): update dependency golangci/golangci-lint to v2.1.6
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-05-04 17:33:24 +00:00
openshift-merge-bot[bot] 5ffb1d9d48
Merge pull request #2322 from containers/renovate/golangci-golangci-lint-2.x
chore(deps): update dependency golangci/golangci-lint to v2.1.5
2025-04-29 19:02:16 +00:00
renovate[bot] ea76ad2640
chore(deps): update dependency golangci/golangci-lint to v2.1.5
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-04-29 13:19:59 +00:00
openshift-merge-bot[bot] ff9e524dc0
Merge pull request #2312 from giuseppe/chunked-read-tarsplit-sequentially
chunked: use temporary file for tar-split data
2025-04-29 13:19:12 +00:00
Giuseppe Scrivano 729821c12e
chunked: Refactor temporary file creation
Replace the direct call to unix.Open with the O_TMPFILE flag
with the dedicated openTmpFile helper function.

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2025-04-29 12:26:57 +02:00
Giuseppe Scrivano f5bdfdc07e
chunked: use temporary file for tar-split data
Replace the in-memory buffer with a O_TMPFILE file.  This reduces the
memory requirements for a partial pull since the tar-split data can be
written to disk.

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2025-04-29 12:26:57 +02:00
Giuseppe Scrivano 3724a5a0bd
driver: add Close() method to Differ
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2025-04-28 22:08:03 +02:00
Giuseppe Scrivano 8ebe9600e3
chunked: extract blob validation into standalone function
extract the blob checksum validation logic from decodeAndValidateBlob
into a separate function.

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2025-04-28 22:07:58 +02:00
openshift-merge-bot[bot] a6ceb1257c
Merge pull request #2321 from containers/renovate/major-ci-vm-image
chore(deps): update dependency containers/automation_images to v20250422
2025-04-28 19:45:14 +00:00
renovate[bot] 519b99ceac
chore(deps): update dependency containers/automation_images to v20250422
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2025-04-23 13:13:50 +02:00
openshift-merge-bot[bot] eda48a7c38
Merge pull request #2289 from hanwen-flow/tar-fixes-2
Improve error handling in archive creation
2025-04-23 07:17:52 +00:00
openshift-merge-bot[bot] 29f052f570
Merge pull request #2318 from giuseppe/always-use-default-paths
types: Always apply rootless path defaults
2025-04-21 12:45:59 +00:00
openshift-merge-bot[bot] cdf5683faa
Merge pull request #2316 from containers/renovate/golangci-golangci-lint-2.x
chore(deps): update dependency golangci/golangci-lint to v2.1.2
2025-04-20 16:19:53 +00:00
renovate[bot] af3ccbc192
chore(deps): update dependency golangci/golangci-lint to v2.1.2
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-04-15 21:43:56 +00:00
openshift-merge-bot[bot] 6daf2ab1a6
Merge pull request #2319 from TomSweeneyRedHat/dev/tsweeney/v1.58.0
Bump c/storage to v1.58.0, then v1.59.0-dev
2025-04-15 21:43:31 +00:00
tomsweeneyredhat 1b964a2b7d Bump c/storage to v1.59.0-dev
Bump the main branch to the next dev version, v1.59.0-dev.

Signed-off-by: tomsweeneyredhat <tsweeney@redhat.com>
2025-04-15 10:57:10 -04:00
tomsweeneyredhat 19ffd5bbbc Bump c/storage to v1.58.0
The first SIC Vendor Dance step for Podman v5.5.
Bump c/storage to v1.58.0

Signed-off-by: tomsweeneyredhat <tsweeney@redhat.com>
2025-04-15 10:56:07 -04:00
Giuseppe Scrivano 5d76a2ef43
types: Always apply rootless path defaults
When running as non-root, the code previously checked
if usePerUserStorage() before applying default paths
for RunRoot and GraphRoot if they were missing from
the configuration file. This check prevented defaults
from being applied if the STORAGE_DRIVER environment
variable was set.

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2025-04-14 12:31:13 +02:00
Han-Wen Nienhuys 39fc1cbaf5 pkg/archive: split tar writing in prepareAddFile() and addFile()
This allows disinguishing between inherent fatal error (writing to the
tar archive failed, eg. disk full) and non-fatal error
(tarWithOptionsTo is racing with another process mutating the file
system.)
    
Signed-off-by: Han-Wen Nienhuys <hanwen@engflow.com>
2025-04-14 09:09:21 +02:00
Han-Wen Nienhuys 16d5eaa528 pkg/archive: rework "whiteout for non-empty file" error handling
This code was imported in commit f39066fe1b (Sep 7, 2017, "Update
packages to match latest code in moby/pkg") without any further comments.

The error check cannot trigger, because there is only whiteout
converter (overlayfs => AUFS), and that only acts on char devices and
directories.

Document in detail what is going on.

Signed-off-by: Han-Wen Nienhuys <hanwen@engflow.com>
2025-04-14 08:59:55 +02:00
Han-Wen Nienhuys 53171408e1 pkg/archive: update ta.SeenFiles only after file write
Otherwise, if addFile errors out before writing the entry for a file
with hardlink, subsequent files with hardlinks would reference a file
that is not in the tar file.

Use hdr.Name (which is passed through CanonicalTarNameForPath) instead
of the 'name' parameter.

Signed-off-by: Han-Wen Nienhuys <hanwen@engflow.com>
2025-04-14 08:59:55 +02:00
Han-Wen Nienhuys d64c52710e pkg/archive: move tarWithOptionsTo to toplevel
Signed-off-by: Han-Wen Nienhuys <hanwen@engflow.com>
2025-04-14 08:59:55 +02:00
Han-Wen Nienhuys 5e7d3c2ed3 pkg/archive: document behavior of TarWithOptions for concurrent updates.
Signed-off-by: Han-Wen Nienhuys <hanwen@engflow.com>
2025-04-14 08:59:55 +02:00
Han-Wen Nienhuys fb10300cd2 pkg/archive: remove error return from getInodeFromStat
This routine does no I/O, so it cannot fail.

Signed-off-by: Han-Wen Nienhuys <hanwen@engflow.com>
2025-04-14 08:58:54 +02:00
openshift-merge-bot[bot] f01643a253
Merge pull request #2313 from hanwen-flow/file-close
pkg/archive: catch file Close() error
2025-04-10 09:18:06 +00:00
Han-Wen Nienhuys 6dc9471950 pkg/archive: catch file Close() error
Signed-off-by: Han-Wen Nienhuys <hanwen@engflow.com>
2025-04-09 14:15:20 +02:00
openshift-merge-bot[bot] b1d1b4586e
Merge pull request #2311 from containers/renovate/golang.org-x-sys-0.x
fix(deps): update module golang.org/x/sys to v0.32.0
2025-04-08 18:00:38 +00:00
renovate[bot] 0137706ca2
fix(deps): update module golang.org/x/sys to v0.32.0
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-04-08 17:26:15 +00:00
openshift-merge-bot[bot] dd907122f7
Merge pull request #2310 from containers/renovate/golang.org-x-sync-0.x
fix(deps): update module golang.org/x/sync to v0.13.0
2025-04-08 17:25:26 +00:00
renovate[bot] 04a95cd7d9
fix(deps): update module golang.org/x/sync to v0.13.0
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-04-05 13:36:11 +00:00
openshift-merge-bot[bot] 2312459c26
Merge pull request #2309 from containers/renovate/github.com-moby-sys-user-0.x
fix(deps): update module github.com/moby/sys/user to v0.4.0
2025-04-04 20:56:05 +00:00
renovate[bot] 7d1c9b5d39
fix(deps): update module github.com/moby/sys/user to v0.4.0
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-04-04 12:32:36 +00:00
openshift-merge-bot[bot] 2dfd3025f0
Merge pull request #2307 from kolyshkin/nolint
ci: add nolintlint and unconvert linters, fix found issues
2025-04-04 12:31:46 +00:00
Kir Kolyshkin eac477b548 ci: add nolintlint and unconvert linters
Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
2025-04-01 16:18:56 -07:00
Kir Kolyshkin bf43840fb7 pkg/unshare: fix nolint annotation
> pkg/unshare/unshare_linux.go:471:64: directive `// nolint: revive,goprintffuncname` should be written without leading space as `//nolint: revive,goprintffuncname` (nolintlint)
> func bailOnError(err error, format string, a ...interface{}) { // nolint: revive,goprintffuncname
>                                                                ^

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
2025-04-01 16:18:56 -07:00
Kir Kolyshkin 83f8eab00a pkg/reexec: rm unused nolint: annotation
> pkg/reexec/reexec.go:52:27: directive `//nolint: unused` is unused for linter "unused" (nolintlint)
> func naiveSelf() string { //nolint: unused
>                           ^

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
2025-04-01 16:18:55 -07:00
Kir Kolyshkin 8395a8b205 Fix and annotate Stat_t fields conversion
For struct Stat_t in syscall pkg:
 - Ino is always uint64;
 - Dev/Rdev can be uint64, uint32, or int32;
 - Nlink might be uint64, uint32, or uint16.

Fix the code accordingly, adding or removing typecasts where needed,
and annotating those with //nolint:unconvert to calm down the unconvert
linter.

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
2025-04-01 16:18:55 -07:00
Kir Kolyshkin b7fb12e894 Remove unneeded conversion
Those are the cases where the value being converted is already of that
type (checked to be that way for all os/arch combinations).

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
2025-04-01 16:18:43 -07:00
Kir Kolyshkin 29a197522e drivers/copy: simplify atime conversion
Mostly to avoid explicit typecasts.

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
2025-04-01 16:18:38 -07:00
Kir Kolyshkin a9a5184637 pkg/system: refactor TestChtimesLinux
1. Move common code to atime() helper.
2. Use Atim.Unix to simplify conversion and avoid explicit typecasts.

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
2025-04-01 16:12:12 -07:00
openshift-merge-bot[bot] f1c4bdf1d7
Merge pull request #2306 from kolyshkin/modernize
Use `slices` and `maps` more where appropriate
2025-04-01 22:00:08 +00:00
openshift-merge-bot[bot] 6f4bc1fa7c
Merge pull request #2305 from kolyshkin/for-range
Use for range over integers
2025-04-01 21:57:19 +00:00
openshift-merge-bot[bot] 0b4d9cfd53
Merge pull request #2308 from Luap99/btrfs-noversion
dirvers/btrfs: remove btrfs_noversion tag
2025-04-01 21:54:35 +00:00
openshift-merge-bot[bot] 67591acf91
Merge pull request #2304 from kolyshkin/any
Use any instead of interface{}
2025-04-01 15:06:13 +00:00