Commit graph

26201 commits

Author SHA1 Message Date
Matt Heon
4fdb90e02c Deterministically order pod inspect fields
There are two fields I'm worried about: shared namespaces and pod
containers. Both are generated via loops over maps and are thus
non-deterministic in ordering. Throw a sort on each to fix the
order so we can actually diff `podman pod inspect` output.

Signed-off-by: Matt Heon <mheon@redhat.com>
2026-02-05 14:15:29 -05:00
Matt Heon
f3a6457c8e
Merge pull request #28029 from inknos/backport-quadlets-to-5.8
Backport quadlets to 5.8
2026-02-05 12:05:44 -05:00
Nicola Sella
bae88e1e5e
Add GET /quadlets/{name}/exists
Fixes: https://issues.redhat.com/browse/RUN-4068

Signed-off-by: Nicola Sella <nsella@redhat.com>
2026-02-05 14:56:03 +01:00
Nicola Sella
d6023e431f
Add DELETE /libpod/quadlets
Fixes: https://issues.redhat.com/browse/RUN-3742

Signed-off-by: Nicola Sella <nsella@redhat.com>
2026-02-05 14:55:46 +01:00
Nicola Sella
f2fcc7f09c
Add POST /libpod/quadlets
Fixes: https://issues.redhat.com/browse/RUN-3743

Signed-off-by: Nicola Sella <nsella@redhat.com>
2026-02-05 14:53:34 +01:00
Nicola Sella
01e0db2931
Add GET /quadlets/{name}/file
Fixes: https://issues.redhat.com/browse/RUN-3716

Signed-off-by: Nicola Sella <nsella@redhat.com>
2026-02-05 14:52:30 +01:00
Paul Holzinger
ec1b7c989f
Merge pull request #27738 from podmanbot/bump-5.7.2-dev
Bump Podman to v5.7.2-dev
2025-12-10 20:33:24 +01:00
Matt Heon
9550970714
Merge pull request #27742 from Luap99/5.7-backport
[v5.7] Use explicit download-artifact name and path for win-installer release
2025-12-10 12:12:35 -05:00
Mario Loriedo
2b52342af9
Use explicit download-artifact name and path for win-installer release
Signed-off-by: Mario Loriedo <mario.loriedo@gmail.com>
(cherry picked from commit 22b10fa153)
Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2025-12-10 17:30:42 +01:00
mheon
36c405582a Bump Podman to v5.7.2-dev
Signed-off-by: mheon <7735048+mheon@users.noreply.github.com>
2025-12-10 14:49:35 +00:00
openshift-merge-bot[bot]
e34994be03
Merge pull request #27732 from mheon/bump_571
Bump to v5.7.1
2025-12-10 14:13:26 +00:00
Matt Heon
f845d14e94
Bump to v5.7.1
Signed-off-by: Matt Heon <mheon@redhat.com>
2025-12-09 15:11:03 -05:00
Matt Heon
6ecc622841 Final release notes update for v5.7.1
Signed-off-by: Matt Heon <mheon@redhat.com>
2025-12-09 15:10:13 -05:00
openshift-merge-bot[bot]
41a9712157
Merge pull request #27731 from openshift-cherrypick-robot/cherry-pick-27727-to-v5.7
[v5.7] kube play: Fix fd leak when handling symlinks
2025-12-09 20:05:32 +00:00
Christophe Fergeau
d0558385ec kube play: Fix fd leak when handling symlinks
The `*os.File` returned by `pathrs.OpenatInRoot` needs to
be closed before returning from `openSymlinkPath`

Signed-off-by: Christophe Fergeau <cfergeau@redhat.com>
2025-12-09 18:29:38 +00:00
openshift-merge-bot[bot]
f0fc84b0fe
Merge pull request #27726 from mheon/backports_571
Backports for v5.7.1
2025-12-09 17:28:09 +00:00
Matt Heon
214f5b2fd9 Update release notes for v5.7.1
Signed-off-by: Matt Heon <matthew.heon@pm.me>
2025-12-09 11:00:23 -05:00
Mikhail Dmitrichenko
678d1b4bfd avoid potential nil ptr deref in image rm
In function rm variable `report` might be initialized as nil as a result
of call
`registry.ImageEngine().Remove(registry.Context(), args, imageOpts)`.
Then, there is a call `registry.SetExitCode(report.ExitCode)` without
explicit nil check before. Check `len(rmErrors) > 0` doesn't guarantee
that report is a non-nil value.
So such call may lead to nil deref.

This commit adds check `report` for nil before its dereference.

Found by Linux Verification Center (linuxtesting.org) with SVACE.

Signed-off-by: Mikhail Dmitrichenko <m.dmitrichenko222@gmail.com>
2025-12-09 09:50:33 -05:00
Mikhail Dmitrichenko
ba6e527289 fix: check err returned by newGenericDecompressor
There is a couple of newGenericDecompressor function usages, where
returned possibly non-nil `err` is not checked before dereferencing
returned decompressor. It may lead to nil ptr dereferencing.

This commit adds check for `err` to prevent dereferencing potentially
nullable decompressor.

Found by Linux Verification Center (linuxtesting.org) with SVACE

Signed-off-by: Mikhail Dmitrichenko <m.dmitrichenko222@gmail.com>
2025-12-09 09:50:13 -05:00
Doug Rabson
68022802fc pkg/specgen/generate: Fix adding host devices on FreeBSD
This was not working when emulating Linux container images on FreeBSD.
The code to handle host devices on FreeBSD relies on the container
having a devfs mount. Unfortunately, the Linux emulation code which adds
this was happening after the host device handling. This changes the
logic so that host device management happens after Linux emulation.

Signed-off-by: Doug Rabson <dfr@rabson.org>
2025-12-09 09:47:22 -05:00
openshift-merge-bot[bot]
8e31387701
Merge pull request #27714 from l0rd/win-default-helper-binaries-cp
[v5.7] Replace FindExecutablePeer with FindHelperBinary
2025-12-09 01:20:41 +00:00
Mario Loriedo
a27cc24f80 Replace FindExecutablePeer with FindHelperBinary
The WSL machine start was using the function FindExecutablePeer that
ignores user configuration (helper_binaries_dir). FindHelperBinary
instead is used when starting the machine for the rest of the providers
and honors user configuration.

This commit requires 4877783c37

Signed-off-by: Mario Loriedo <mario.loriedo@gmail.com>
2025-12-08 14:42:36 +01:00
openshift-merge-bot[bot]
ce8a3404c4
Merge pull request #27697 from TomSweeneyRedHat/dev/tsweeney/common-v0.66.1-v5.7
[v5.7] Bump common to v0.66.1
2025-12-06 15:43:40 +00:00
tomsweeneyredhat
dc7509fe38 [v5.7] Bump common to v0.66.1
Bump common to v0.66.1 in order to get some new
Windows functionality in for Podman v5.7.1

Signed-off-by: tomsweeneyredhat <tsweeney@redhat.com>
2025-12-05 17:09:13 -05:00
openshift-merge-bot[bot]
02b167c0fc
Merge pull request #27684 from openshift-cherrypick-robot/cherry-pick-27672-to-v5.7
[v5.7] libpod: fix workdir MkdirAll() all check
2025-12-04 18:46:01 +00:00
Paul Holzinger
7ce2e00ab1 libpod: simplify resolveWorkDir()
The code checks for isPathOnVolume and isPathOnMount so we can just use
the SecureJoin here directly to check for path existance.

Then instead of walking symlinks and trying to guess if they are on a
mount just assume if it is a link (path is different from the normal
joined one) then don't error out early and let the OCI runtime deal with
it. The runtime does produce a less readable error but it still fails
and we have much less fragile code.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2025-12-04 16:09:56 +00:00
Paul Holzinger
e576e002e9 libpod: fix workdir MkdirAll() all check
MkdirAll can fail with EEXIST when the path is a symlink and the target
doesn't exist. As such we should ignore the error.

Note there is something fundemantal wrong here with the path access as
it is following the symlink to the host, however it is only for a
stat() so it is not an security issue here.

Fixes: 637c264e2e ("fix issues found by nilness")

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2025-12-04 16:09:55 +00:00
openshift-merge-bot[bot]
9356a82cd4
Merge pull request #27665 from TomSweeneyRedHat/dev/tsweeney/buildah_v1.42.2_v5.7
[v5.7] Bump Buildah to v1.42.2, runc to v1.3.4
2025-12-03 12:27:28 +00:00
tomsweeneyredhat
f348d1bd5b [v5.7] Bump Buildah to v1.42.2, runc to v1.3.4
This bumps Buildah to v1.42.2 and runc to v1.3.4.
This fixes the regressions in run that were created during the
recent fixes for the thre CVEs.

Signed-off-by: tomsweeneyredhat <tsweeney@redhat.com>
2025-12-02 14:57:09 -05:00
openshift-merge-bot[bot]
140893c2cb
Merge pull request #27611 from openshift-cherrypick-robot/cherry-pick-27604-to-v5.7
[v5.7] podman system migrate fixes when pause process and conmon got killed
2025-11-26 19:42:31 +00:00
openshift-merge-bot[bot]
f5f40e9a07
Merge pull request #27607 from openshift-cherrypick-robot/cherry-pick-27606-to-v5.7
[v5.7] pkg/machine: make mount units hook into local-fs
2025-11-26 10:23:18 +00:00
Paul Holzinger
9538a7d976 rootless_linux.c: use shortcut for system commands
There doesn't seem any reason why the system commands should not join
the userns. In particular the main commands use ParentNSRequired and
UnshareNSRequired when they don't want to be joined to the main userns.
Since the system command don't set these the go code does the join and
re-exec anyway so might as well use the shortcut to speed that up.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2025-11-26 10:18:30 +00:00
Paul Holzinger
0647387bfe SetupRootless handle case where conmon pid are not valid
When trying to join the conmon pid to recreate the pause process based
on the namespace it can be that the pid is no longer valid, i.e. when
conmon crashed or was killed.

Currently we have a big issue that can be reproduced using:
$ podman run -d quay.io/libpod/testimage:20241011 sleep 100
$ killall -9 conmon
$ killall catatonit

All commands would fail as we keep trying to rejoin the namespace of the
non existing conmon process.

So to address that fall back to creating a new namespace if we fail to
join the conmon pids.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2025-11-26 10:18:30 +00:00
Paul Holzinger
118ec04065 preallocate paths in SetupRootless
Just a minor improvement as we know the size needed for the slice we can
allocate it only once instead of the append having to resize it.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2025-11-26 10:18:30 +00:00
Paul Holzinger
6a9ce66e5c fix noMoveProcess in SetupRootless
Based on the description in commit 63ef557 this was added so that the
migrate command does not move the pause process into a separate cgroup.

It should however not disable the rejoining of the userns when the pause
process join failed. BEcause of this we end up calling migrate without a
userns and that then can fail if there are actual contianer it tries to
cleanup.

Fixes: 63ef5576ed ("command: migrate doesn't move process to cgroup")

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2025-11-26 10:18:30 +00:00
Paul Holzinger
973ab34078 use return error handling in SetupRootless
There is no good reason to use logrus and os.Exit() here, other parts of
this function already return the error so do the same. The main podman
process will exit then with the normal formatted error message.

And also log an error about the last return which should never happen as
we should have exited above if the re-exec worked or errored out.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2025-11-26 10:18:30 +00:00
Paul Holzinger
363665a456 pkg/machine: make mount units hook into local-fs
The virtiofs mount points do not actually are network mounts so we can
mount them earlier and using multi-user.target to enable them was wrong.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2025-11-25 20:27:47 +00:00
openshift-merge-bot[bot]
8ca1ebb0cd
Merge pull request #27547 from openshift-cherrypick-robot/cherry-pick-27506-to-v5.7
[v5.7] docs: fix redoc swagger URL
2025-11-17 18:02:12 +00:00
Paul Holzinger
db82b92d0a docs: fix redoc swagger URL
Currently our API docs are not working as it fails to fetch the js file
with the redoc code which renders the swagger.

The reason this fails is because we have been tracking the "next"
version and that was recently bumped to v3.0.0-rc.0 which also seem to
have moved the location to use "bundle" (no s). As such we now get a 404
as the CDN doesn't find the file. [1]

I don't get why we have been tracking next to begin with, using latest
would still work as it points but that could be moved anytime as well so
switch the URL to pull in the lastest v2 version which should be safer
against unexpected changes like that.

While it could of course also break in a minor v2 release hard coding an
exact version would mean a fair amount of churn updating this (which I
guess would not happen) so this looks like the best compromise to me.

[1] https://www.npmjs.com/package/redoc/v/3.0.0-rc.0

Fixes: #27505

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2025-11-17 16:08:42 +00:00
openshift-merge-bot[bot]
258bb70019
Merge pull request #27509 from podmanbot/bump-5.7.1-dev
Bump Podman to v5.7.1-dev
2025-11-12 10:51:48 +00:00
lsm5
9257ac4822 Bump Podman to v5.7.1-dev
Signed-off-by: lsm5 <247367+lsm5@users.noreply.github.com>
2025-11-11 18:51:37 +00:00
openshift-merge-bot[bot]
cdcd8da1ba
Merge pull request #27500 from lsm5/570-release
Bump to v5.7.0
2025-11-11 18:47:28 +00:00
Lokesh Mandvekar
0370128fc8
Bump to v5.7.0
Signed-off-by: Lokesh Mandvekar <lsm5@redhat.com>
2025-11-11 08:51:07 -05:00
Lokesh Mandvekar
84c31b8fae
Create release notes for v5.7.0
Signed-off-by: Lokesh Mandvekar <lsm5@redhat.com>
2025-11-11 08:51:07 -05:00
openshift-merge-bot[bot]
54402fe649
Merge pull request #27490 from lsm5/v5.7
[v5.7] Packit/TMT: remove podman-next repos from release branches
2025-11-10 18:50:32 +00:00
openshift-merge-bot[bot]
6289badee4
Merge pull request #27492 from openshift-cherrypick-robot/cherry-pick-27472-to-v5.7
[v5.7] various different test fixes
2025-11-10 15:58:30 +00:00
Paul Holzinger
b6b8d23abd hack/bats: port it to use the new remote support
The system tests can setup their own server now so just use that and
don't require the user to spawn its own.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2025-11-10 15:14:48 +00:00
Paul Holzinger
129c344b49 test/system: fix broken podman_runtime
This got broken during the remote testing rewrite to enable tls testing
in commit feb36e4fe6. The problem is the function didn't use the proper
podman command with the remote arg so it tried to connect to the default
socket with remote testing.

And in the checkpoint file we use it before the PODMAN_CMD was defined
so fix this by moving the basic_setup before and the use the variable
PODMAN_RUNTIME instead of having to do another info call.

Also fix the debug log output to correctly log the podman commands with
all arguments on a single line.

Fixes: feb36e4fe6 ("Implement TLS API Support")
Fixes: #27266

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2025-11-10 15:14:48 +00:00
Paul Holzinger
708f7a14f3 test/system: fix artifact test cleanup
Make sure to rmeove the artifact but we don't need to remove the
testfiles as they are part under PODMAN_TMPDIR which gets removed by
default so don't bother with that.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2025-11-10 15:14:48 +00:00
Paul Holzinger
e737d75b2f test/system: merge artifact tests into single file
There is no need for several files here, it just means the setup and
helpers get duplicated.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2025-11-10 15:14:48 +00:00