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>
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>
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>
use MkdirAllAndChownNew instead of checking for the directory
existence first and then create it if missing.
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
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>
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>
drivers/driver.go:499:18: printf: non-constant format string in call to github.com/sirupsen/logrus.Errorf (govet)
drivers/overlay/overlay.go:1495:44: printf: non-constant format string in call to (*github.com/sirupsen/logrus.Logger).Logf (govet)
Signed-off-by: Jan Rodák <hony.com@seznam.cz>
I'd like to support passing a file descriptor root for the
container storage, and not an absolute path.
In the bootc codebase (partially a philosophy inherited
from ostree) we've heavily invested in fd-relative accesses,
primarily because it's common for us to operate in different
namespaces/roots, and fd-relative access avoids a lot of
possible footguns when dealing with absolute paths. It's
also more efficient, avoiding the need for the kernel to
traverse full paths a lot.
This is just one of a few preparatory changes necessary
in making it work to do:
`podman --root=/proc/self/fd/3 --runroot=... pull busybox`
That was breaking because the fd was being closed when forking
the child untar process here. Fix this by switching over
to always passing the root via fd on Unix.
Signed-off-by: Colin Walters <walters@verbum.org>
These aren't installed yet so they'll just live in the git repository
but hopefully we can expand them and use them as a central reference
point for "how do I do (zstd:chunked)|(composefs)". We have copies
of that kind of instruction in other downstream places but
I think here makes the most sense.
Signed-off-by: Colin Walters <walters@verbum.org>