Commit Graph

25449 Commits

Author SHA1 Message Date
Kir Kolyshkin 3f0cdb9414 pkg/specgen: error out when a block device isn't
In case something other than a block device is supplied, podman proceeds
to apply settings for a block device with the same minor:major.

For example, "--blkio-weight-device /dev/zero:123" (alas, this is taken
literally from podman-update(1) EXAMPLES section) sets blkio weight
for /dev/ram5. Instead, it should error out since /dev/zero is not a
block device.

Add an appropriate check.

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
2025-06-10 13:50:02 -07:00
Kir Kolyshkin 9b6e548387 pkg/specgen: refactor FinishThrottleDevices, WeightDevices
Refactor these functions to
 - avoid repetition of common code (mostly stat of block device path);
 - perform early return if nothing is to be done;
 - remove some excessive nesting.

It also improves some error messages.

This is a preparation for the next commit.

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
2025-06-10 13:50:02 -07:00
openshift-merge-bot[bot] 6b8bc6f6e6
Merge pull request #26329 from baude/validateprupdate
make validate-in-container changes
2025-06-10 20:00:44 +00:00
renovate[bot] ad882ac730
fix(deps): update module go.etcd.io/bbolt to v1.4.1
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-06-10 18:35:17 +00:00
Brent Baude d4a8598ca4 make validate-in-container changes
changing the validate-in-container make target to use
quay.io/libpod/validatepr:latest.  this allows `make validate` to run to
completion doing linting, ed's perl checks, and pre-commit.]

The image is now based on F42 `awk` is not part of the base image, so I added `awk`.

Signed-off-by: Brent Baude <bbaude@redhat.com>
2025-06-10 12:38:35 -05:00
Warren Young 0080368fd6
Clarified the consequences of --network=host
The prior version talked about potential access to DBus, but this is a
bogus warning: default OS setups do not bind DBus to localhost or to an
abstract Unix socket.  It is possible that the original author was
thinking of CVE-2020–15257, which affected containerd's abstract Unix
socket; they fixed it by switching to a named socket, just as DBus
always (?) has done.

Signed-off-by: Warren Young <wyoung@tangentsoft.com>
Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2025-06-10 18:47:55 +02:00
Paul Holzinger 22789928d4
podman machine: pull wsl image from machine-os
Starting with [1] we now build and publish the wsl image from the
machine-os repo, as such this special case is no longer needed.

[1] https://github.com/containers/podman-machine-os/pull/142

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2025-06-10 18:09:21 +02:00
Paul Holzinger 48b19e98f9
remove hack/libdm_tag.sh
This script is no longer used as the device mapper storage driver was
removed over a year ago.

Commit 60692ca already removed the build tag reference but not this
script which set a buildtag for it.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2025-06-10 17:18:19 +02:00
Paul Holzinger 9aedc47aff
rpm: build rpm with libsqlite3 tag
So we dynamically link to sqlite in fedora instead of vendoring a static
copy.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2025-06-10 17:13:20 +02:00
Paul Holzinger c6842d3425
Makefile: use libsqlite3 build when possible
Dynamically link sqlite3 when installed, the main motivation is that we
reduce the podman binary size with that. I see about 2.5 MB savings.

But also dynamically linking it means if there a vulnerabilities only
the sqlite3 distro package needs updating and we don't have to make a
new podman release with the vendored update.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2025-06-10 15:52:11 +02:00
openshift-merge-bot[bot] dbebcbe619
Merge pull request #26325 from ninja-quokka/makefile
Allow generate-bindings on darwin
2025-06-10 13:36:40 +00:00
openshift-merge-bot[bot] 5ff067cdcd
Merge pull request #26282 from alaviss/push-wotrztyxpmou
quadlet: generate RequiresMountsFor for Type=bind volumes
2025-06-10 09:02:32 +00:00
openshift-merge-bot[bot] 7e68eeb445
Merge pull request #26314 from eriksjolund/docs_prefer_userns_keep-id
docs: replace `RemapUsers=keep-id` with `UserNS=keep-id`
2025-06-10 08:37:46 +00:00
openshift-merge-bot[bot] 2617f3dc30
Merge pull request #26180 from lsm5/packit-cleanups
Packit cleanups
2025-06-10 08:18:19 +00:00
openshift-merge-bot[bot] 8ab61adc67
Merge pull request #26326 from ninja-quokka/makefile2
Remove bin/podman.cross Make target
2025-06-09 15:16:08 +00:00
openshift-merge-bot[bot] 4874c16023
Merge pull request #26324 from containers/renovate/github.com-go-swagger-go-swagger-0.x
Update module github.com/go-swagger/go-swagger to v0.32.3
2025-06-09 13:35:05 +00:00
Lewis Roy c45b27ffb0
Remove bin/podman.cross Make target
The local-cross Make target has superceeded this old Make target and the
warning to not use it has been in place now for 4+ years.

Removing it to clean up the Makefile slightly.

Signed-off-by: Lewis Roy <lewis@redhat.com>
2025-06-09 22:20:45 +10:00
Lewis Roy c96d87ccad
Allow generate-bindings on darwin
This exclusion has been there since the make target was added[1]. I wasn't
able to find the reason but this runs on Darwin today and is useful to
be able to run when you are developing bindings on a Mac.

[1] https://github.com/containers/podman/pull/8956

Signed-off-by: Lewis Roy <lewis@redhat.com>
2025-06-09 22:10:41 +10:00
renovate[bot] 087a44a8e7
Update module github.com/go-swagger/go-swagger to v0.32.3
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-06-09 11:31:23 +00:00
Erik Sjölund f0c15f1c7a
docs: replace RemapUsers=keep-id with UserNS=keep-id
Git commit 0c3b5e433e
added a comment that RemapUsers is deprecated.
Use UserNS=keep-id instead.

Signed-off-by: Erik Sjölund <erik.sjolund@gmail.com>
2025-06-08 09:06:25 +02:00
openshift-merge-bot[bot] 246a688ee0
Merge pull request #26288 from Luap99/vendor
vendor: update docker, common, image, storage and buildah
2025-06-06 21:01:43 +00:00
openshift-merge-bot[bot] d5d9cf3013
Merge pull request #26286 from containers/renovate/github.com-vbauerster-mpb-v8-8.x
fix(deps): update module github.com/vbauerster/mpb/v8 to v8.10.2
2025-06-06 20:58:59 +00:00
openshift-merge-bot[bot] 31ecb0d2ee
Merge pull request #26306 from Luap99/ssl-env
pkg/machine: remove some unsused services and add the /etc/environment.d SSL vars back
2025-06-06 19:11:47 +00:00
openshift-merge-bot[bot] 1b71250cd3
Merge pull request #26299 from containers/renovate/golang.org-x-net-0.x
fix(deps): update module golang.org/x/net to v0.41.0
2025-06-06 18:49:42 +00:00
renovate[bot] a87bef9606
fix(deps): update module golang.org/x/net to v0.41.0
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-06-06 17:51:55 +00:00
Paul Holzinger 0f7b21ad00
pkg/machine: remove unsused net recover file
This is not used in the code so it can be deleted.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2025-06-06 19:46:05 +02:00
Paul Holzinger 0c77654be7
Revert "podman machine: fix proxy test"
This reverts commit 0b8dd90840.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2025-06-06 19:46:05 +02:00
Paul Holzinger adc35b157e
pkg/machine: remove old fw_cfg service
It has not been in use since commit f218f8430a and should have been
removed there. It seems somehow it is causing a bug since our env file
is empty. In that case it triggers a segfault and since that happens
from within pam we are unable to login in any way.

I reported the issue[1] but because we don't need this just remove it so
we don't have to wait for a fix.

[1] https://bugzilla.redhat.com/show_bug.cgi?id=2370858

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2025-06-06 19:44:00 +02:00
openshift-merge-bot[bot] e8e5dce121
Merge pull request #26293 from Luap99/podman-rosetta
pkg/machine/e2e: skip rosetta test
2025-06-06 16:26:40 +00:00
openshift-merge-bot[bot] 2a5c2f35f5
Merge pull request #26303 from lsm5/rpm-epoch-copr-constraint
RPM: Limit Epoch 102 to podman-next copr
2025-06-06 14:37:58 +00:00
Paul Holzinger 0b8dd90840
podman machine: fix proxy test
Do not write /etc/environment.d files, something is broken in the new
image that causes the boot to fail when any basic var is set there.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2025-06-06 16:13:44 +02:00
Paul Holzinger 0c406f25ad
pkg/machine/e2e: skip rosetta test
We disabled it in the machine os image so it can no longer be used
currently.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2025-06-06 15:48:28 +02:00
Lokesh Mandvekar 793242da8d
RPM: Limit Epoch 102 to podman-next copr
Users of WSL images currently get podman from the copr rpm on the
release PR with Epoch: 102. This is a problem if the user is looking to
update the image with packages from official Fedora repos.

This commit limits Epoch: 102 to only the podman rpms on
rhcontainerbot/podman-next copr. All other rpms, including other copr
rpms, will use the default Epoch.

Signed-off-by: Lokesh Mandvekar <lsm5@fedoraproject.org>
2025-06-06 08:25:32 -04:00
Hiếu Lê 18ecd2046b
quadlet: generate RequiresMountsFor for Type=bind volumes
This makes sure that the volume source is available before the volume is
created.

Fixes: https://github.com/containers/podman/issues/26125

Signed-off-by: Hiếu Lê <leorize+oss@disroot.org>
2025-06-05 18:22:28 -05:00
openshift-merge-bot[bot] 5a0b3e0919
Merge pull request #26298 from ashley-cui/rel
Make podman.io update action reusable
2025-06-05 21:43:10 +00:00
Ashley Cui b85d770be0 Make podman.io update action reusable
Signed-off-by: Ashley Cui <acui@redhat.com>
2025-06-05 17:22:26 -04:00
openshift-merge-bot[bot] 17e9ada37d
Merge pull request #26272 from sonnysasaka/check-quicker
Skip layer digests for podman system check --quick
2025-06-05 18:47:01 +00:00
Sonny Sasaka 971321228c Skip layer digests for podman system check --quick
podman system check --quick currently only skips layer contents, but
practically it's not much quicker than without the flag.

This changes the flag to also skip checking layer digests which speed up
the check significantly.

In some cases, it is useful to opt for a quicker check if we prioritize
detecting and fixing severe corruption and can tolerate minor damage.

The check option is derived from CRI-O's internal repair:
9e4d86d823/internal/lib/container_server.go (L860)

Signed-off-by: Sonny Sasaka <sonnysasaka@gmail.com>
2025-06-05 17:00:50 +00:00
Paul Holzinger 465578d7ec
test/buildah-bud: skip new build-with-two-outputs on remote
The --output option is not supported with remote.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2025-06-05 14:42:12 +02:00
Paul Holzinger 4286f03b34
test/buildah-bud: update buildah-tests.diff
The buildah test code chnages so I had to manually resolve the conflict.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2025-06-05 13:39:22 +02:00
Nalin Dahyabhai c1653bdc29
Build the `dumpspec` test helper for the `buildah bud` tests
Newer versions expect to use a new test helper.

Signed-off-by: Nalin Dahyabhai <nalin@redhat.com>
Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2025-06-05 12:19:59 +02:00
Paul Holzinger ac71bc6cf2
vendor: update buildah to latest main
Includes one breaking change for the flag as BuildOutputs now accept a
slice.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2025-06-05 12:19:59 +02:00
Paul Holzinger 96abeafc61
vendor: update c/{common,image,storage} to latest main
Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2025-06-05 12:19:59 +02:00
Paul Holzinger d44f0afa84
vendor: update github.com/docker/docker to v28.2.2
Two incomptable changes, they removed the BridgeNfIP6tables
and BridgeNfIptables fields so we must drop them. As they are not
important ones that should not cause problems.

Second, they moved to using DockerOCIImageConfig from another new module.
The json format did not chnage so this is not an external API break.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2025-06-05 12:19:58 +02:00
renovate[bot] 94478a4144
fix(deps): update module github.com/vbauerster/mpb/v8 to v8.10.2
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-06-05 09:28:54 +00:00
openshift-merge-bot[bot] 4871ad1dc6
Merge pull request #26278 from Luap99/quadlet-network-interface
quadlet: add InterfaceName option to network unit
2025-06-04 18:08:07 +00:00
Paul Holzinger a0f7db44e8
quadlet: add InterfaceName option to network unit
I noticed this was missing, its a simple 1 to 1 mapping to
--interface-name.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2025-06-04 16:46:39 +02:00
openshift-merge-bot[bot] badf6b8b17
Merge pull request #26111 from ninja-quokka/restful_art
feat: Add OCI Artifact support to the Podman REST API
2025-06-04 14:34:52 +00:00
openshift-merge-bot[bot] 2d234fab34
Merge pull request #26177 from Luap99/machine-linger
pkg/machine: setup lingering for custom username and remove unnecessary sleep service
2025-06-04 14:04:37 +00:00
lstocchi 8532ecb710
fix wsl install workflow on machine init command
this patch changes how the detection of wsl works.
The old way of using wsl --status command output to detect some missing features required by WSL is not fully reliable.
WSL checks if the wsl feature is enabled and if the vmcompute service do exist. However, this is not enough to identify if the virtual machine platform feature is enabled. The vmcompute service could exist because it has been installed by other tools or it could exist but being stopped.

The way proposed by this patch is to try execute the import command and,
if it fails, check the error and if it is related to the Host Compute
Service try to install all features required by WSL.

The flow is the same as before, the user is asked to execute the podman
machine init command with elevated privileges. Eventually, after
enabling WSL and VMP features, the user is asked to reboot the machine.

When the machine restarts, the powershell gets invoked again and execute
the command init.

The code also fixes some issues that could cause misbehaviors when
invoking recursively the elevated shell, like an unreleased lock, or a
missing file.

Signed-off-by: lstocchi <lstocchi@redhat.com>
2025-06-04 14:26:48 +02:00