When the fs supports reflinks use that over a normal copy, this speeds
things up a lot when big files are used.
Signed-off-by: Paul Holzinger <pholzing@redhat.com>
- exportloopref is deprecated and deactivated so it should be removed
from the disable list.
- tenv is deprecated and was replaced by usetesting
Signed-off-by: Paul Holzinger <pholzing@redhat.com>
This is valid and the upstream linter allows it but somehow with
golangci-lint it produces an error:
Success matcher only support a single error value, or function with Gomega as its first parameter
I reported a bug upstream[1] but for now let's just ignore it so we can
update the linter.
[1] https://github.com/golangci/golangci-lint/issues/5398
Signed-off-by: Paul Holzinger <pholzing@redhat.com>
The PodmanOptionsKey is never used anywhere so it is pointless to add
this. Second having several functions to return the same context makes
no sense so fold them all into one. Lastly create the context once and
always return the same one instead of having to nil check each time.
Signed-off-by: Paul Holzinger <pholzing@redhat.com>
This seems to have been added as part of the cleanup of our
handling of OOM files, but code was never added to remove it, so
we leaked a single directory with an exit file and OOM file per
container run. Apparently have been doing this for a while - I'd
guess since March of '23 - so I'm surprised more people didn't
notice.
Fixes#25291
Signed-off-by: Matt Heon <mheon@redhat.com>
This was discovered by a user while testing Podman on FreeBSD
(oci-playground/freebsd-podman-testing/issues/17). The error message
didn't stop 'podman system reset' from working and this commit simply
suppressses the error on FreeBSD.
Signed-off-by: Doug Rabson <dfr@rabson.org>
Add a new command to extract the blob content of the artifact store to a
local path.
Fixes https://issues.redhat.com/browse/RUN-2445
Signed-off-by: Paul Holzinger <pholzing@redhat.com>
As part of our database init, we perform a check of the current
values for a few fields (graph driver, graph root, static dir,
and a few more) to validate that Libpod is being started with a
sane & sensible config, and the user's containers can actually be
expected to work. Basically, we take the current runtime config
and compare against values cached in the database from the first
time Podman was run.
We've had some issues with this logic before this year around
symlink resolution, but this is a new edge case. Somehow, the
database is being loaded with the empty string for some fields
(at least graph driver) which is causing comparisons to fail
because we will never compare against "" for those fields - we
insert the default value instead, assuming we have one.
Having a value of "" in the database largely invalidates the
check so arguably we could just drop it, but what BoltDB did -
and what SQLite does after this patch - is to use the default
value for comparison instead of "". This should still catch some
edge cases, and shouldn't be too harmful.
What this does not do is identify or solve the reason that we are
seeing the empty string in the database at all. From my read on
the logic, it must mean that the graph driver is explicitly set
to "" in the c/storage config at the time Podman is first run and
I'm not precisely sure how that happens.
Fixes#24738
Signed-off-by: Matt Heon <mheon@redhat.com>
I'm not sure if there is an equivalent to CAP_SYS_RESOURCE on FreeBSD
but for now, I have added a no-op stub which returns false.
Signed-off-by: Doug Rabson <dfr@rabson.org>
In our CI env we use a special registries.conf file
(test/registries.conf) to redirect some parts but it also defines:
[[registry]]
location="localhost:5000"
insecure=true
That means that port 5000 is trusted by default so the
/v1.40/images/localhost:5000/myrepo/push?tag=mytag test in 12-imagesMore
fails when the test registry uses port 5000.
Example failure:
not ok 360 [12-imagesMore] POST /v1.40/images/localhost:5000/myrepo/push?tag=mytag [-d {}] : status
# expected: 500
# actual: 200
# response: {"status":"The push refers to repository [localhost:5000/myrepo:mytag]"}
{"status":"mytag: digest: sha256:d40f8191d6dae366339e318d1004258022f56bd8c649720a72060fad20019c9d size: 758"}
To avoid using port 5000 simply start at 5001.
Signed-off-by: Paul Holzinger <pholzing@redhat.com>
For Copr builds, it will mention the Copr info from where the rpm is
installed.
For non-copr builds, it will mention the value of the packager macro
if set, and skip this field altogether if not.
On local rpm builds, this shows:
```
Build Origin: Lokesh Mandvekar <lsm5@fedoraproject.org>
```
On koji rpm builds, this shows:
```
Build Origin: Fedora Project
```
On copr rpm builds (for eg. rhcontainerbot/playground), this shows:
```
Build Origin: Copr: rhcontainerbot/playground
```
Signed-off-by: Lokesh Mandvekar <lsm5@fedoraproject.org>
The Windows installer was able to automatically enable the
Windows features for WSL or HyperV when they were not
already enabled. This PR removes this capability.
Having the installer to automatically install the right prerequiste
(WSL or HyperV) was helpful as users won't have to do it manually to
use Podman after the installation. But it also made the code of
installer more complicated as it needed to manage the installation
of these OS features and a reboot. And we weren't able to automatically
test these scenarios that required a reboot.
In other words the Windows installer, that merely just extracted
some files in a folder, required, to support the installation of
WSL and HyperV, an advanced knowledge of WiX toolkit and of the
Windows Installer SDK, plus contributors-time to manually test
the scenarios that require a reboot.
We decided to remove this capability based on the following reasons:
- We had a couple of regressions in the last month that were hard to
analyse and fix (#24624 and #24735)
- Podman maintainers currently have a scarce knowledge of the Windows Installer
and there is no plan to invest in that
- Manually installing WSL or HyperV is not hard (e.g. run `wsl --install`) and
are features that admins can manage on their fleet of Windows machines
- Competitors such as Docker Desktop don't automatically install these
components
- Podman `machine init` currently verifies if WSL and HyperV are installed and
guide the user to install them when they are not
Signed-off-by: Mario Loriedo <mario.loriedo@gmail.com>