25102 Commits

Author SHA1 Message Date
3edbc254dd Merge pull request #21895 from containers/renovate/github.com-hugelgupf-p9-digest
fix(deps): update github.com/hugelgupf/p9 digest to 6f4f11e
2025-02-12 18:42:04 +00:00
6167d286eb fix(deps): update github.com/hugelgupf/p9 digest to 6f4f11e
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-02-12 16:29:34 +00:00
af209f5cef Merge pull request #25179 from Honny1/artifact-add-append
Create `--append` flag to add file to existing artifact using `podman artifact add` command
2025-02-12 14:58:43 +00:00
3b5d7d1e64 artifact extract: support reflink copy
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>
2025-02-12 15:07:32 +01:00
525b11e4c7 vendor latest c/storage
To include the new fileutils.ReflinkOrCopy() function.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2025-02-12 14:53:10 +01:00
986fc9f465 update golangci-lint to v1.64.2
- 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>
2025-02-12 14:01:10 +01:00
8b6f14f95b silence false positve from golangci-lint
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>
2025-02-12 14:01:10 +01:00
34de0feda5 cmd/podman: refactor Context handling
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>
2025-02-12 14:01:10 +01:00
78717e6ae9 fix new usetesting lint issue
Using t.Setenv() is much better is automatically takes care of the env
cleanup after the test.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2025-02-12 11:32:17 +01:00
fdd442cbdf Create --append flag to add file to existing artifact
Fixes: https://issues.redhat.com/browse/RUN-2444

Signed-off-by: Jan Rodák <hony.com@seznam.cz>
2025-02-12 10:33:37 +01:00
a17175eb3a Cleanup test
Signed-off-by: Jan Rodák <hony.com@seznam.cz>
2025-02-12 10:14:47 +01:00
62cde17193 Merge pull request #25297 from mheon/fix_25291
Remove persist directory when cleaning up Conmon files
2025-02-11 21:09:46 +00:00
ce8813dc8d Remove persist directory when cleaning up Conmon files
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>
2025-02-11 14:51:34 -05:00
2f261d1e19 Merge pull request #25238 from Luap99/artifact-extract
add podman artifact extract
2025-02-11 18:47:23 +00:00
4a0b230610 Merge pull request #24775 from mheon/fix_24738
In SQLite state, use defaults for empty-string checks
2025-02-11 15:43:09 +00:00
0463ad12cb libpod: fix a confusing error message from 'podman system reset' on FreeBSD
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>
2025-02-11 15:13:29 +00:00
093571029b Merge pull request #25290 from Luap99/api-reference
docs: add v5.4 to API reference
2025-02-11 14:12:24 +00:00
3925a30fa7 add podman artifact extract
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>
2025-02-11 14:36:53 +01:00
7e1ac1db4d Merge pull request #25280 from containers/renovate/golang.org-x-net-0.x
fix(deps): update module golang.org/x/net to v0.35.0
2025-02-11 13:11:52 +00:00
79be095795 docs: add v5.4 to API reference
Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2025-02-11 14:05:00 +01:00
ad9839ac55 Run HealthCheck without creating and removing the ExecSession in the database
Fixes: https://issues.redhat.com/browse/RHEL-69970

Signed-off-by: Jan Rodák <hony.com@seznam.cz>
2025-02-11 13:59:00 +01:00
e7d9c61f9f Merge pull request #25288 from Honny1/bump-freebsd
[CI] Bump FreeBSD version to 13.4
2025-02-11 12:55:24 +00:00
2e36bc0a05 Merge pull request #25285 from containers/renovate/golang.org-x-tools-0.x
fix(deps): update module golang.org/x/tools to v0.30.0
2025-02-11 12:00:26 +00:00
af55648080 Merge pull request #25277 from Luap99/new-images
CI: new images 2025-02-10
2025-02-11 11:15:43 +00:00
e9a3c68a70 Merge pull request #25281 from mheon/cncf_code_of_conduct
Switch to the CNCF Code of Conduct
2025-02-11 10:48:13 +00:00
a6d6d6409e Bump FreeBSD version to 13.4
Version 13.3 is EOL. See https://www.freebsd.org/releases/

Signed-off-by: Jan Rodák <hony.com@seznam.cz>
2025-02-11 11:15:02 +01:00
a2380bca1e fix(deps): update module golang.org/x/tools to v0.30.0
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-02-10 22:02:40 +00:00
f906c6df57 Switch to the CNCF Code of Conduct
As part of the CNCF Sandbox, we are replacing our existing COC
with the standard CNCF version.

Signed-off-by: Matt Heon <mheon@redhat.com>
2025-02-10 14:36:32 -05:00
74a100f542 fix(deps): update module golang.org/x/net to v0.35.0
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-02-10 19:02:53 +00:00
e943a2b064 Merge pull request #25275 from dfr/freebsd-hascapresource
libpod: make hasCapSysResource platform-specific
2025-02-10 19:01:07 +00:00
7e612f6ebb test/system: remove tar version check
All the VM images should have a new enough version.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2025-02-10 18:55:20 +01:00
d13915f87a new images 2025-02-10
From https://github.com/containers/automation_images/pull/400

Noteworthy here is the new debian tar package which should have the
right fix for our test issue, i.e.
https://github.com/containers/podman/issues/19407

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2025-02-10 18:50:30 +01:00
cb53abca28 In SQLite state, use defaults for empty-string checks
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>
2025-02-10 12:42:11 -05:00
8bb1768b72 Merge pull request #25235 from lsm5/main-build-origin
[skip-ci] RPM: set BUILD_ORIGIN
2025-02-10 17:03:03 +00:00
a475083bff Merge pull request #25169 from mheon/graph_stop
Add graph-based pod stop
2025-02-10 17:00:19 +00:00
8d42125338 Merge pull request #25267 from containers/renovate/golang.org-x-crypto-0.x
fix(deps): update module golang.org/x/crypto to v0.33.0
2025-02-10 14:56:28 +00:00
ab0410948a libpod: make hasCapSysResource platform-specific
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>
2025-02-10 14:52:10 +00:00
a5ed4230d8 Merge pull request #25273 from Luap99/apiv2-flake
test/apiv2: fix registry push flake
2025-02-10 13:52:01 +00:00
3c3baefa8c Update rpm/podman.spec
Co-authored-by: Paul Holzinger <git@holzinger.dev>
Signed-off-by: Lokesh Mandvekar <lsm5@redhat.com>
2025-02-10 18:19:52 +05:30
5bada90190 test/apiv2: fix registry push flake
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>
2025-02-10 13:40:29 +01:00
f73c976bca fix(deps): update module golang.org/x/crypto to v0.33.0
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-02-10 12:13:54 +00:00
1d06a1f8d5 Merge pull request #24864 from lsm5/rpm-macro-cleanup
[skip-ci] RPM: cleanup macro defs
2025-02-10 11:09:45 +00:00
b06c7d78d3 [skip-ci] RPM: set buildOrigin in LDFLAG
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>
2025-02-10 16:36:42 +05:30
7185d46ce1 Merge pull request #25237 from l0rd/stop-automatic-wsl-hyperv-installation
Remove the option to install WSL/HyperV on Windows
2025-02-10 10:33:58 +00:00
3967ac21ea Merge pull request #25247 from containers/renovate/google.golang.org-protobuf-1.x
fix(deps): update module google.golang.org/protobuf to v1.36.5
2025-02-07 20:43:43 +00:00
e7ea47e2f2 Merge pull request #25256 from containers/renovate/github.com-vbauerster-mpb-v8-8.x
fix(deps): update module github.com/vbauerster/mpb/v8 to v8.9.2
2025-02-07 17:07:14 +00:00
24b686e70c Merge pull request #25244 from giuseppe/mount-fix-segfault
images: fix segfault when mounting without cap_sys_admin
2025-02-07 15:30:59 +00:00
708b34993d Merge pull request #25252 from Luap99/build-origin
Makefile: escape BUILD_ORIGIN properly
2025-02-07 15:28:13 +00:00
91e4f6918a Remove the option to install WSL/HyperV
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>
2025-02-07 16:10:54 +01:00
dce52b3e77 Improve winmake.ps1 clean target
Signed-off-by: Mario Loriedo <mario.loriedo@gmail.com>
2025-02-07 16:08:35 +01:00