Commit Graph

29883 Commits

Author SHA1 Message Date
Miloslav Trmač ee94e88cdd Use assert.ElementsMatch instead of manually copying+sorting
Signed-off-by: Miloslav Trmač <mitr@redhat.com>
2024-09-05 19:44:50 +02:00
Miloslav Trmač 1fa3161756 Use slices.Delete* instead of manual append
Conservatively use Index* + Delete to delete the
first element where it's not obvious that the code would really
want to delete all instances.

Signed-off-by: Miloslav Trmač <mitr@redhat.com>
2024-09-05 19:44:49 +02:00
Miloslav Trmač 751c13d2a0 Use slices.Clone where appropriate
Signed-off-by: Miloslav Trmač <mitr@redhat.com>
2024-09-05 19:44:47 +02:00
Miloslav Trmač e4b5fae299 Use slices.* instead of a manually-written loop
Signed-off-by: Miloslav Trmač <mitr@redhat.com>
2024-09-05 19:44:41 +02:00
openshift-merge-bot[bot] 8f0998dd44
Merge pull request #2086 from mtrmac/go1.22
Update to Go 1.22
2024-09-05 17:22:41 +00:00
Miloslav Trmač 1f25f4a8e4 Use slices.Concat where appropriate
Signed-off-by: Miloslav Trmač <mitr@redhat.com>
2024-09-05 18:56:35 +02:00
Miloslav Trmač bcaa5c9e33 Migrate the easy uses of math/rand to math/rand/v2
Leave anything requiring math/rand.Read alone.

Signed-off-by: Miloslav Trmač <mitr@redhat.com>
2024-09-05 18:56:35 +02:00
Miloslav Trmač f4597cfee5 Use range iterations
... for the trivial cases where the loop body does not reference
the iteration variable at all.

Signed-off-by: Miloslav Trmač <mitr@redhat.com>
2024-09-05 18:56:35 +02:00
Miloslav Trmač a22f90b70f Update to Go 1.22
Signed-off-by: Miloslav Trmač <mitr@redhat.com>
2024-09-05 18:56:35 +02:00
openshift-merge-bot[bot] c458e69a59
Merge pull request #2085 from containers/renovate/golang.org-x-sys-0.x
fix(deps): update module golang.org/x/sys to v0.25.0
2024-09-04 20:02:54 +00:00
renovate[bot] 5dd16181fe
fix(deps): update module golang.org/x/sys to v0.25.0
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-09-04 15:54:08 +00:00
openshift-merge-bot[bot] 465c38f894
Merge pull request #2079 from mtrmac/if-you-want-something-done-DYI1
Be explicit about impact of not writing caches
2024-09-03 20:54:38 +00:00
Miloslav Trmač cd7809d38b Be explicit about impact of not writing caches
A follow-up to https://github.com/containers/storage/pull/2031 .

Signed-off-by: Miloslav Trmač <mitr@redhat.com>
2024-09-03 20:42:58 +02:00
openshift-merge-bot[bot] 7915da61e3
Merge pull request #2080 from containers/if-you-want-something-done-DYI2
Be clearer about the layer store locking rules
2024-09-03 18:31:38 +00:00
openshift-merge-bot[bot] f708623e02
Merge pull request #2083 from giuseppe/ignore-unmount-einval
overlay: ignore EINVAL for cleanup unmount
2024-09-03 18:17:52 +00:00
openshift-merge-bot[bot] 9957e4410b
Merge pull request #2082 from containers/renovate/golang.org-x-exp-digest
fix(deps): update golang.org/x/exp digest to 9b4947d
2024-09-03 18:15:09 +00:00
Giuseppe Scrivano 16b6757422
overlay: ignore EINVAL for cleanup unmount
ignore EINVAL for unmount in the cleanup function as it means the
directory is not a mount point.  It can happen if the cleanup happens
before the mount point is created.

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2024-09-02 23:39:21 +02:00
renovate[bot] 720c1f0fd8
fix(deps): update golang.org/x/exp digest to 9b4947d
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-09-01 01:23:46 +00:00
Miloslav Trmač 74c273e30a Be clearer about the layer store locking rules
... as modified by https://github.com/containers/storage/pull/2036 .

Also document a LOCKING BUG I don't now care to fix.

Signed-off-by: Miloslav Trmač <mitr@redhat.com>
2024-08-30 16:38:22 +02:00
openshift-merge-bot[bot] 8bc8379af2
Merge pull request #2077 from containers/renovate/major-ci-vm-image
chore(deps): update dependency containers/automation_images to v20240821
2024-08-29 10:34:27 +00:00
renovate[bot] 4591ffb1a7
chore(deps): update dependency containers/automation_images to v20240821
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-08-28 20:06:22 +00:00
openshift-merge-bot[bot] 20daaa6305
Merge pull request #2076 from cgwalters/sync-man-page-conf
Sync man page with storage.conf
2024-08-28 13:47:49 +00:00
Colin Walters 8f19c1693f Sync man page with storage.conf
xref https://github.com/containers/storage/pull/2065#issuecomment-2313002081

This does the same for the man page that I did for the default
storage.conf previously; instead of trying to squash all the
`pull_options` into a single option that we document "ad-hoc", make
it its own table just like the other sections.

- Add notes about "string bools" around relevant values.
- Avoid redundantly specifying the default; the default is the first
  thing we show after the `=`.

Synchronize the text between the man page and the default
`storage.conf`.

Signed-off-by: Colin Walters <walters@verbum.org>
2024-08-27 14:41:22 -04:00
openshift-merge-bot[bot] 0540c85523
Merge pull request #2073 from containers/renovate/golangci-golangci-lint-1.x
[CI:DOCS] Update dependency golangci/golangci-lint to v1.60.3
2024-08-27 12:45:15 +00:00
renovate[bot] d8da7b377a
[CI:DOCS] Update dependency golangci/golangci-lint to v1.60.3
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-08-25 15:14:38 +00:00
openshift-merge-bot[bot] 2db1d730d0
Merge pull request #2072 from cgwalters/more-doc-composefs-zstd
docs: Fill in more about composefs and zstd:chunked
2024-08-25 15:13:52 +00:00
openshift-merge-bot[bot] 9a14315ced
Merge pull request #2074 from dfr/freebsd-exists
pkg/fileutils: fix Lexists on FreeBSD (second attempt)
2024-08-25 11:58:34 +00:00
Doug Rabson 7afe759198 pkg/fileutils: fix Lexists on FreeBSD (second attempt)
The previous attempt worked with 'podman image load' but not 'podman
image save' since the error returned from Lexists for non-existent files
was not recognized by os.IsNotExist. This version returns well-formed
errors for non-existent files and works with both 'podman image load'
and 'podman image save'.

Signed-off-by: Doug Rabson <dfr@rabson.org>
2024-08-23 11:13:03 +01:00
Colin Walters 9a5c0986a4 docs: Fill in more about composefs and zstd:chunked
I've been reading more of the code and looking
at the filesystem in these modes.

Signed-off-by: Colin Walters <walters@verbum.org>
2024-08-22 15:22:22 -04:00
openshift-merge-bot[bot] 4e18d1f7fa
Merge pull request #2071 from dfr/freebsd-exists
pkg/fileutils: fix Lexists on FreeBSD
2024-08-21 16:38:55 +00:00
Doug Rabson a603753982 pkg/fileutils: fix Lexists on FreeBSD
The faccessat system call does not support AT_SYMLINK_NOFOLLOW on
FreeBSD versions before 15.0. This works around the limitation by
falling back to os.Lstat if faccessat returns an EINVAL error.

Signed-off-by: Doug Rabson <dfr@rabson.org>
2024-08-21 15:25:07 +01:00
openshift-merge-bot[bot] 7908bb8450
Merge pull request #2069 from giuseppe/composefs-do-not-make-mount-visible
composefs fixes
2024-08-21 12:39:37 +00:00
openshift-merge-bot[bot] 8ec73cadc7
Merge pull request #2070 from containers/renovate/golangci-golangci-lint-1.x
[CI:DOCS] Update dependency golangci/golangci-lint to v1.60.2
2024-08-21 10:35:51 +00:00
Giuseppe Scrivano 05df80ed37
overlay: use directly MkdirAllAndChownNew
use MkdirAllAndChownNew instead of checking for the directory
existence first and then create it if missing.

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2024-08-21 08:43:25 +02:00
Giuseppe Scrivano 57a4177cf7
overlay: move check for mounted dir earlier
move the check for a previously mounted "merged" directory before
attempting any composefs mount.
It prevents mounting the composefs blobs to then throw them away as it
reuses the already existing mounted path when possible.

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2024-08-21 08:19:49 +02:00
Giuseppe Scrivano f6ca3171c1
overlay, diff: do not make composefs mount visible
but access directly the files through the mount fd.

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2024-08-21 08:19:48 +02: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 689ee947fa
overlay: use Itoa instead of Sprintf("%d")
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2024-08-21 08:19:45 +02:00
renovate[bot] bff1751e59
[CI:DOCS] Update dependency golangci/golangci-lint to v1.60.2
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-08-20 21:54:50 +00:00
openshift-merge-bot[bot] e5de483a85
Merge pull request #2061 from Honny1/store-list-layers-images-containers
Create `Store.List` method for listing layers, images, containers
2024-08-20 21:54:06 +00:00
openshift-merge-bot[bot] 87436820a4
Merge pull request #2068 from containers/renovate/github.com-microsoft-hcsshim-0.x
fix(deps): update module github.com/microsoft/hcsshim to v0.12.6
2024-08-20 21:48:36 +00:00
renovate[bot] d4c302f9ba
fix(deps): update module github.com/microsoft/hcsshim to v0.12.6
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-08-20 00:29:44 +00:00
Daniel J Walsh f4fccb75fd
Merge pull request #2066 from cgwalters/toml-cleanup
storage.conf: Various cleanups
2024-08-19 11:43:18 -04:00
Jan Rodák b175ede0f9
Create newTestStore
Signed-off-by: Jan Rodák <hony.com@seznam.cz>
2024-08-19 15:25:58 +02:00
Jan Rodák 6d129bfe6d
Create test for store.List
Signed-off-by: Jan Rodák <hony.com@seznam.cz>
2024-08-19 15:25:41 +02:00
Jan Rodák 5f12aa1d3a
Create MultiList method for store
Signed-off-by: Jan Rodák <hony.com@seznam.cz>
2024-08-19 15:25:38 +02:00
openshift-merge-bot[bot] 2944d5b06e
Merge pull request #2064 from Honny1/golangci-lint-renovate
Prepare a golangci-lint installation for automatic update using renovate
2024-08-19 12:22:22 +00:00
Jan Rodák 52828e9aec
Prepare a golangci-lint installation for automatic update using renovate
Signed-off-by: Jan Rodák <hony.com@seznam.cz>
2024-08-19 11:14:21 +02:00
Colin Walters ed561808ab storage.conf: Various cleanups
The default storage.conf we ship is inconsistent in a few ways;
there's a lot of fixes rolled up into this single commit.

First: we were using a toml "inline table" for the pull options,
and then documenting each key in that table in one blob above.
It simply looks much nicer to use a non-inline table - then
we can move the docs next to each individual value. This is also
more consistent with other sections of the config.

I also thinned out a bit the doc comments; I think instead of trying
to have a longer explanation of zstd:chunked in the comments here
we should refer to the man page, which is a better place to have
details (and that we should fill out more).

Per another PR, I also stumbled across the fact that we have a
lot of "string bool" values and cannot be native TOML booleans. Document
that clearly next to each type.

We already have default values in the *code* for all
of these, so comment them all out to be consistent with other
values. (We're then getting closer to having the config file
be entirely comments, but that's a distinct project)

Finally, update the recent man pages I added to match
these changes.

Signed-off-by: Colin Walters <walters@verbum.org>
2024-08-17 14:08:26 +00:00
openshift-merge-bot[bot] 8960db0702
Merge pull request #2063 from Honny1/fix-linter
Update golangci-lint
2024-08-16 12:57:14 +00:00