Commit Graph

24388 Commits

Author SHA1 Message Date
openshift-merge-bot[bot] 2a00ee8f5a
Merge pull request #25187 from TomSweeneyRedHat/dev/tsweeney/v5.4_common_0_62_0
[v5.4] Bump c/storage to v1.57.1, c/image v5.34.0, c/common v0.62.0
2025-02-03 10:19:43 +00:00
openshift-merge-bot[bot] 97432e5bd5
Merge pull request #25197 from openshift-cherrypick-robot/cherry-pick-25180-to-v5.4
[v5.4] podman exec: correctly support detaching
2025-02-03 09:34:59 +00:00
Paul Holzinger 9e2e7f2a77 podman exec: correctly support detaching
podman exec support detaching early via the detach key sequence. In that
case the podman process should exit successfully but the container exec
process keeps running.

Now I wrote automated test for both podman run and exec detach but this
uncovered several larger issues:
 - detach sequence parsing is broken[1]
 - podman-remote exec detach is broken[2]
 - detach in general seems to be buggy/racy, seeing lot of flakes that
   fail to restore the terminal and get an EIO instead, i.e.
   "Unable to restore terminal: input/output error"

Thus I cannot add tests for now but this commit should at least fix the
obvoius case as reported by the user so I like to get this in regardless
and I will work through the other issues once I have more time.

Fixes #24895

[1] https://github.com/containers/common/pull/2302
[2] https://github.com/containers/podman/issues/25089

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2025-02-03 01:50:55 +00:00
Paul Holzinger e24ccdd27b libpod: remove unused ExecStartAndAttach()
Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2025-02-03 01:50:55 +00:00
tomsweeneyredhat 25674e05cd [v5.4] Bump c/storage to v1.57.1, c/image v5.34.0, c/common v0.62.0
If not already bumped, this will bump:

c/storage v1.57.1
c/image v5.34.0
c/common v0.62.0

in preparation for Podman v5.4 and beyond.

Buildah will be vendored in a separate PR.

Signed-off-by: tomsweeneyredhat <tsweeney@redhat.com>
2025-01-31 18:36:06 -05:00
openshift-merge-bot[bot] c211617cad
Merge pull request #25167 from openshift-cherrypick-robot/cherry-pick-25155-to-v5.4
[v5.4] Move detection of libkrun and intel
2025-01-30 17:05:07 +00:00
Brent Baude 5f6adf4d80 Move detection of libkrun and intel
A review comment post merge suggested I move the detection of libkrun and intel into the provider.Get()

Signed-off-by: Brent Baude <bbaude@redhat.com>
2025-01-30 15:37:47 +00:00
openshift-merge-bot[bot] b6775e4637
Merge pull request #25166 from openshift-cherrypick-robot/cherry-pick-25139-to-v5.4
[v5.4] Prevent  multiple machines running on different providers on darwin
2025-01-30 13:30:35 +00:00
openshift-merge-bot[bot] c13ef1797f
Merge pull request #25160 from mheon/bump_540_rc2
[CI:ALL] Bump to v5.4.0-RC2
2025-01-30 13:27:50 +00:00
openshift-merge-bot[bot] fa2f2b0f75
Merge pull request #25156 from openshift-cherrypick-robot/cherry-pick-25151-to-v5.4
[v5.4] Safer use of `filepath.EvalSymlinks()` on Windows
2025-01-30 13:08:40 +00:00
Brent Baude 599da8c50b Prevent two podman machines running on darwin
As issue #25112 points out, it was possible to start a machine on one of the darwin providers and then switch providers and start another one with a different name.  This PR firstly prevents that use which is a forbidden use case.

Secondarily, performed some minor cleanup on the error messages being used so that the error would be specific to this condition.

This bug fix is for darwin only.  In the case of Windows, we probably need to answer the question I raised in #24067 first, which is whether we want to stop allowing WSL to run multiple machines.

Fixes #25112

Signed-off-by: Brent Baude <bbaude@redhat.com>
2025-01-30 11:19:32 +00:00
Brent Baude 03b100563e Remove unnecessary error handling
A function in the reset code does not return an error.  Simply removing the error variable and check for the condition (which was always false or nil)

Signed-off-by: Brent Baude <bbaude@redhat.com>
2025-01-30 11:19:32 +00:00
Brent Baude bba28688f7 Remove usused Kind() function
The Kind() exported function is unused in our code; moreover, the function cannot be accurate because in the case of darwin, applehv and libkrun use the same config in the struct and therefore, we cannot identify the provider via that method.

Signed-off-by: Brent Baude <bbaude@redhat.com>
2025-01-30 11:19:32 +00:00
Matt Heon d475b48766 Bump to v5.4.0-dev
Signed-off-by: Matt Heon <mheon@redhat.com>
2025-01-29 16:14:29 -05:00
Matt Heon 14f6a69dd3 Bump to v5.4.0-rc2
Signed-off-by: Matt Heon <mheon@redhat.com>
2025-01-29 16:14:29 -05:00
Matthew Heon d52277db75 Update release notes for v5.4.0-rc2
Signed-off-by: Matthew Heon <matthew.heon@pm.me>
2025-01-29 16:14:29 -05:00
openshift-merge-bot[bot] 7c3c3d3dd1
Merge pull request #25148 from openshift-cherrypick-robot/cherry-pick-25146-to-v5.4
[v5.4] error with libkrun on intel-based machines
2025-01-29 19:01:18 +00:00
Mario Loriedo fa0e8f0582 Safer use of `filepath.EvalSymlinks()` on Windows
The behavior of function `path/filepath.EvalSymlinks()` has
changed in Go v1.23:

- https://go-review.googlesource.com/c/go/+/565136
- https://go.dev/doc/go1.23#minor_library_changes
- https://tip.golang.org/doc/godebug

As a consequences, starting with Podman 5.3.0, when installing
on Windows (WSL) using scoop, Podman fails to start because it
fails to find helper binaries. Scoop copies Podman binaries in
a folder of type Junction and `EvalSymlinks` returns an error.
The problem is described in #24557.

To address this problem we are checking if a path is a `Symlink`
before calling `EvalSymlinks` and, if it's not (hardlinks, mount
points or canonical files), we are calling `path/filepath.Clean`
for consistency. In fact `path/filepath.EvalSymlinks`, after
evaluating a symlink target, calls `Clean` too.

Signed-off-by: Mario Loriedo <mario.loriedo@gmail.com>
2025-01-29 16:05:06 +00:00
Brent Baude 1c111eead7 error with libkrun on intel-based machines
libkrun is not supported on Intel.  We should error.

Signed-off-by: Brent Baude <bbaude@redhat.com>
2025-01-29 08:23:47 +00:00
openshift-merge-bot[bot] c6fe3b575b
Merge pull request #25141 from containers/renovate/pytest-8.x
chore(deps): update dependency pytest to v8.3.4
2025-01-28 15:54:27 +00:00
renovate[bot] 14cd6ff1d2
chore(deps): update dependency pytest to v8.3.4
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-01-28 14:32:40 +00:00
openshift-merge-bot[bot] 4ea199d744
Merge pull request #25111 from hdub-tech/docs/podman-build-secrets
Improve podman build secrets docs / Makefile validatepr description
2025-01-28 14:31:51 +00:00
openshift-merge-bot[bot] 92bce4fd80
Merge pull request #25135 from l0rd/win-installer-block-351-upgrade
Avoid upgrading from v5.3.1 on Windows
2025-01-28 12:11:35 +00:00
openshift-merge-bot[bot] dedbea55fb
Merge pull request #25130 from Luap99/vendor
vendor latest c/{buildah,common,image,storage}
2025-01-28 10:24:23 +00:00
Paul Holzinger 97323a691a
test/buildah-bud: skip two new problematic tests on remote
They are new and failing on remote, needs to be looked at (#25138)
For now skip them so we can have a proper buildah vendored for rc2.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2025-01-27 20:04:52 +01:00
openshift-merge-bot[bot] eea2866a09
Merge pull request #25133 from lsm5/rawhide-selinux-system-test
system-tests: switch ls with getfattr for selinux tests
2025-01-27 19:04:05 +00:00
openshift-merge-bot[bot] aa1cf0201c
Merge pull request #25134 from andrew-sayers/patch-3
Fix podman-restart.service when there are no containers
2025-01-27 16:54:51 +00:00
openshift-merge-bot[bot] 8d65d1e9e2
Merge pull request #25102 from Honny1/prune
Clean up after unexpectedly terminated build
2025-01-27 16:52:06 +00:00
Andrew Sayers 527a51dcc4
Fix podman-restart.service when there are no containers
If no containers need to be restarted, podman-restart prints "Error: you must provide at least one name or id" then fails.

Update the service file to handle start and stop symmetrically.

See discussion in https://github.com/containers/podman/pull/25131

Signed-off-by: Andrew Sayers <andrew-github.com@pileofstuff.org>
2025-01-27 14:53:35 +00:00
Mario Loriedo 3aa09dd521 Avoid upgrading from v5.3.1 on Windows
Added a condition in the Windows WiX bundle that
prevents upgrades from v5.3.1 and recommend the
user to upgrade to v5.3.2 first.

That's needed because version 5.3.1 of the installer
had a bug that got patched in v5.3.2 only.

c.f. https://github.com/containers/podman/issues/24735

Signed-off-by: Mario Loriedo <mario.loriedo@gmail.com>
2025-01-27 15:52:18 +01:00
openshift-merge-bot[bot] 9403c3d98d
Merge pull request #24678 from rhatdan/manifest
Add podman manifest rm --ignore
2025-01-27 14:52:05 +00:00
Jan Rodák 81eb84fdaa
Clean up after unexpectedly terminated build
The `podman system prune` command is able to remove build containers that were created during the build, but were not removed because the build terminated unexpectedly.

By default, build containers are not removed to prevent interference with builds in progress. Use the **--build** flag when running the command to remove build containers as well.

Fixes: https://issues.redhat.com/browse/RHEL-62009

Signed-off-by: Jan Rodák <hony.com@seznam.cz>
2025-01-27 14:21:27 +01:00
Lokesh Mandvekar 06c103469d
system-tests: switch ls with getfattr for selinux tests
The test `podman selinux: check unsupported relabel` has been failing
recently on Fedora rawhide.

This is due to a regression in the `ls` command itself. Workaround for
now is to switch to `getfattr -n security.selinux ...`.

Ref: https://github.com/containers/podman/issues/25132#issuecomment-2615744915

Fixes: #25132

Signed-off-by: Lokesh Mandvekar <lsm5@fedoraproject.org>
2025-01-27 18:40:43 +05:30
Paul Holzinger 141bd613b8
vendor latest c/{buildah,common,image,storage}
Make sure everything passes for rc2.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2025-01-27 12:41:14 +01:00
openshift-merge-bot[bot] c76c13f179
Merge pull request #25106 from Fak3/patch-1
docs: mount.md - idmapped mounts only work for root user
2025-01-27 11:36:09 +00:00
H Dub bbf00ec6bf
Makefile: Add validatepr description for 'make help' output
Signed-off-by: H Dub <14808878+hdub-tech@users.noreply.github.com>
2025-01-24 14:44:00 -06:00
H Dub 0d2431dca2
docs: Enhance podman build --secret documentation and add examples
Signed-off-by: H Dub <14808878+hdub-tech@users.noreply.github.com>
2025-01-24 14:43:46 -06:00
Evstifeev Roman 016f41ab49 docs: mount.md - idmapped mounts only work for root user
As reported in #24918 and clarified in https://github.com/containers/crun/issues/1632#issuecomment-2567991631

Signed-off-by: Evstifeev Roman <someuniquename@gmail.com>
2025-01-24 14:07:49 +05:00
openshift-merge-bot[bot] 3b6c7665b9
Merge pull request #25077 from tangentsoft/quadlet-5-symlink-bypass
Quadlet 5 symlink bypass
2025-01-23 19:26:16 +00:00
openshift-merge-bot[bot] 02dd3e123f
Merge pull request #25086 from mheon/bump_540_rc1
Bump to v5.4.0-RC1
2025-01-23 16:21:24 +00:00
openshift-merge-bot[bot] da8db52fc3
Merge pull request #25092 from Luap99/api-create-command
do not set the CreateCommand for API users
2025-01-23 15:45:35 +00:00
openshift-merge-bot[bot] f12bc49b9f
Merge pull request #25018 from containers/renovate/google.golang.org-protobuf-1.x
fix(deps): update module google.golang.org/protobuf to v1.36.3
2025-01-23 14:12:01 +00:00
openshift-merge-bot[bot] c8fc73e19c
Merge pull request #25097 from mtrmac/PodmanOptions
Refactor Podman E2E helpers to allow passing/adding more options to the low-level executor
2025-01-23 10:20:25 +00:00
openshift-merge-bot[bot] c0ec44f8e0
Merge pull request #25096 from mtrmac/zstd-chunked-without-tests
Update c/image + existing tests to resolve the signing ambiguity
2025-01-23 10:06:53 +00:00
Miloslav Trmač 4bdb947d72 Define, and use, PodmanExitCleanlyWithOptions
This is a generalization of PodmanExitCleanly, scalable
to an arbitrary number of possible options.

Should not change behavior.

Signed-off-by: Miloslav Trmač <mitr@redhat.com>
2025-01-23 01:10:31 +01:00
Miloslav Trmač df9e8c3ce6 Eliminate PodmanSystemdScope
It seems this utility is not all that generally useful,
so eliminate it from the global namespace and use
PodmanWithOptions directly.

Should not change behavior.

Signed-off-by: Miloslav Trmač <mitr@redhat.com>
2025-01-23 01:10:18 +01:00
Miloslav Trmač 7c40e85968 Fix image ID query
Read the full one, not the truncated one

Signed-off-by: Miloslav Trmač <mitr@redhat.com>
2025-01-23 00:11:24 +01:00
Miloslav Trmač 11ee6c4f90 Revert "Use the config digest to compare images loaded/pulled using different methods"
This reverts commit 1d7ec1ef5f.

Signed-off-by: Miloslav Trmač <mitr@redhat.com>
2025-01-23 00:11:24 +01:00
Miloslav Trmač 6639c20278 Update c/image after https://github.com/containers/image/pull/2613
This resolves the "signing ambiguity" by requiring that images
must have a DiffID entry, and it must match, in partial pulls.

Signed-off-by: Miloslav Trmač <mitr@redhat.com>
2025-01-23 00:11:24 +01:00
Miloslav Trmač f20d9bd637 Update expected errors when pulling encrypted images
https://github.com/containers/image/issues/2646 will track actually
returning a meaningful error instead of these internal details.

Signed-off-by: Miloslav Trmač <mitr@redhat.com>
2025-01-23 00:11:24 +01:00