Commit Graph

24441 Commits

Author SHA1 Message Date
Lokesh Mandvekar e2eb8e4a86
[skip-ci] RPM: adjust qemu dependencies
We only need qemu-system-[x86|aarch64]-core based on the architecture
along with qemu-img. So, there's no need to pull in all of qemu.

The qemu-system-[x86|aarch64]-core packages are not present on CentOS
Stream and RHEL, so we use qemu-kvm there instead.

Ref: https://github.com/containers/podman/pull/24369/files#r1883658262

Signed-off-by: Lokesh Mandvekar <lsm5@fedoraproject.org>
2025-01-31 17:14:07 +05:30
Ashley Cui d3706bcad1 Add BuildOrigin field to podman info
BuildOrigin is a field that can be set at build time by packagers. This helps us trace how and where the binary was built and installed from, allowing us to see if the issue is due to a specfic installation or a general podman bug. This field shows up in podman version and in podman info when populated. Note that podman info has a new field, Client, that only appears when running podman info using the remote client.

Automatically set the BuildOrigin field when building the macOS pkginstaller to pkginstaller.

Usage: make podman-remote BUILD_ORIGIN="mypackaging"

Signed-off-by: Ashley Cui <acui@redhat.com>
2025-01-30 14:48:30 -05:00
openshift-merge-bot[bot] 48f8742278
Merge pull request #25155 from baude/movedetect
Move detection of libkrun and intel
2025-01-30 15:37:07 +00:00
openshift-merge-bot[bot] 357fd2546e
Merge pull request #25159 from containers/renovate/github.com-spf13-pflag-1.x
fix(deps): update module github.com/spf13/pflag to v1.0.6
2025-01-30 15:28:51 +00:00
openshift-merge-bot[bot] be5d807b62
Merge pull request #25164 from giuseppe/replace-walk
util: replace Walk with WalkDir
2025-01-30 13:36:06 +00:00
openshift-merge-bot[bot] 787da60fcc
Merge pull request #25128 from Honny1/hc-timer
Remove timer for HealthCheck when container is paused
2025-01-30 13:16:51 +00:00
openshift-merge-bot[bot] 4fdd00e8cd
Merge pull request #25049 from FedeDP/fix/get_cmd_line_args_memleak
fix(pkg/rootless): avoid memleak during init() contructor
2025-01-30 13:08:39 +00:00
openshift-merge-bot[bot] 96d47dcc91
Merge pull request #25139 from baude/issue25112
Prevent  multiple machines running on different providers on darwin
2025-01-30 11:18:31 +00:00
Federico Di Pierro 51fd6e906c fix(pkg/rootless): avoid memleak during init() contructor.
`argv[0]`, ie: the full buffer allocated by `get_cmd_line_args`,
was going to be freed only if `can_use_shortcut()` was called.
Instead, let `init()` always manage `argv0` lifecycle.

Signed-off-by: Federico Di Pierro <nierro92@gmail.com>
2025-01-30 12:11:42 +01:00
Giuseppe Scrivano 1f3182009a
util: replace Walk with WalkDir
Closes: https://github.com/containers/podman/issues/25163

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2025-01-30 11:53:34 +01:00
Brent Baude 398377fd97 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-29 13:26:45 -06:00
Brent Baude 4eeaedfe13 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-29 13:24:18 -06:00
renovate[bot] 27386be189
fix(deps): update module github.com/spf13/pflag to v1.0.6
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-01-29 19:02:56 +00:00
Brent Baude e893747cf3 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-29 12:12:17 -06:00
Brent Baude c0aab0a85a 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-29 12:12:17 -06:00
openshift-merge-bot[bot] c285c7220f
Merge pull request #25151 from l0rd/fix-evalsymlink-windows-option3
Safer use of `filepath.EvalSymlinks()` on Windows
2025-01-29 14:36:53 +00:00
Jan Rodák 511c8b249d
Remove timer for HealthCheck when container is paused.
If is unpaused then new timer for  HealthCheck is created.

Fixes: https://issues.redhat.com/browse/RUN-2468

Signed-off-by: Jan Rodák <hony.com@seznam.cz>
2025-01-29 13:34:26 +01:00
Mario Loriedo 513b4aaceb 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 13:15:53 +01:00
openshift-merge-bot[bot] ee24214cb9
Merge pull request #25123 from containers/renovate/google.golang.org-protobuf-1.x
fix(deps): update module google.golang.org/protobuf to v1.36.4
2025-01-29 10:26:38 +00:00
openshift-merge-bot[bot] 3857bffb8e
Merge pull request #25146 from baude/nolibkrunonintel
error with libkrun on intel-based machines
2025-01-29 08:22:53 +00:00
Brent Baude 357f76daae 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-28 14:12:44 -06: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
renovate[bot] 0eefdbe30e
fix(deps): update module google.golang.org/protobuf to v1.36.4
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-01-27 13:20:31 +00: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