Commit Graph

26327 Commits

Author SHA1 Message Date
Anders Hausding
8566ef71c0 fix: set header fields before response status code to prevent missing fields
Signed-off-by: Anders Hausding <anders.hausding@siemens.com>
2025-09-08 09:06:36 +02:00
openshift-merge-bot[bot]
b6d92f7df5 Merge pull request #27004 from containers/renovate/github.com-opencontainers-cgroups-0.x
fix(deps): update module github.com/opencontainers/cgroups to v0.0.5
2025-09-06 14:53:49 +00:00
Zifei Tong
a19307f502 Fix podman build "newer" pull policy
It's currently ignored.

Fixes: #22845

Signed-off-by: Zifei Tong <zifeitong@gmail.com>
2025-09-05 18:55:41 -07:00
renovate[bot]
50a3e3cf8a fix(deps): update module github.com/opencontainers/cgroups to v0.0.5
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-09-05 21:46:04 +00:00
Paul Holzinger
6c4b98c940 test/e2e: add CVE-2025-9566 regression test
Ensure we do not regress again.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2025-09-05 19:41:55 +02:00
Paul Holzinger
cab3c6de6d docs: restore podman-systemd.unit.5
There are endless of links pointing to this document we should not get
rid of that.
Also I find having two podman-quadlet with different numbers rather
confusing, while I understand the motivation I think for most users this
is not intuitive. Most people will not type the man section numbers.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2025-09-05 18:59:19 +02:00
openshift-merge-bot[bot]
c8183c50a0 Merge pull request #26929 from jankaluza/quadlet-docs
Rewrite the Quadlet documentation.
2025-09-05 14:29:27 +00:00
openshift-merge-bot[bot]
ea41e54fea Merge pull request #26995 from containers/renovate/github.com-onsi-ginkgo-v2-2.x
Update module github.com/onsi/ginkgo/v2 to v2.25.3
2025-09-05 13:56:17 +00:00
openshift-merge-bot[bot]
7a9d12b226 Merge pull request #26911 from Honny1/refactro-build-rest-api
refactor: modularize build REST API with utility functions
2025-09-05 13:30:57 +00:00
Jan Kaluza
6756eb3412 Deduplicate more options.
Signed-off-by: Jan Kaluza <jkaluza@redhat.com>
2025-09-05 15:26:16 +02:00
openshift-merge-bot[bot]
e569f80117 Merge pull request #26979 from containers/renovate/github.com-docker-docker-28.x
fix(deps): update module github.com/docker/docker to v28.4.0+incompatible
2025-09-05 10:14:10 +00:00
openshift-merge-bot[bot]
96abdfdec6 Merge pull request #26977 from jakmeier/fix-quadlet-mount-panic
quadlet: fix runtime error for invalid Mount value
2025-09-05 09:57:43 +00:00
openshift-merge-bot[bot]
2745c9e50e Merge pull request #26912 from markjdb/main
Fix several FreeBSD integration problems
2025-09-05 09:44:01 +00:00
openshift-merge-bot[bot]
a33b6bded2 Merge pull request #26988 from containers/renovate/pytest-8.x
Update dependency pytest to v8.4.2
2025-09-05 09:41:15 +00:00
openshift-merge-bot[bot]
421a7a8c34 Merge pull request #26993 from containers/renovate/actions-labeler-6.x
[skip-ci] Update actions/labeler action to v6
2025-09-05 09:18:30 +00:00
renovate[bot]
fdeaf2905f Update module github.com/onsi/ginkgo/v2 to v2.25.3
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-09-04 20:44:52 +00:00
Jakob Meier
163bdf2df8 quadlet: fix runtime error for invalid Mount value
If the `Mount` option inside a quadlet is missing the source=... part,
the code today panics with the following message.

```
panic: runtime error: index out of range [0] with length 0

goroutine 1 [running]:
github.com/containers/podman/v5/pkg/systemd/quadlet.handleStorageSource(0xc000140de0?, 0x1d?, {0x0?, 0x1?}, 0x5634e39e233e?, 0x10?)
...
```

This commit checks for the missing source and returns an error to avoid the panic.

Signed-off-by: Jakob Meier <mail@jakobmeier.ch>
2025-09-04 21:46:01 +02:00
renovate[bot]
792bbd2046 [skip-ci] Update actions/labeler action to v6
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-09-04 19:19:52 +00:00
Paul Holzinger
c24b8f6f56 Merge commit from fork
kube play: don't follow volume symlinks onto the host
2025-09-04 18:36:26 +02:00
renovate[bot]
853dd36da3 Update dependency pytest to v8.4.2
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-09-04 15:56:34 +00:00
openshift-merge-bot[bot]
c3bf7058aa Merge pull request #26986 from mheon/tmpfiles_remove
Add R! to systemd-tmpfiles script for all /tmp dirs
2025-09-04 15:55:47 +00:00
Paul Holzinger
43fbde4e66 kube play: don't follow volume symlinks onto the host
For ConfigMap and Secret kube play volumes podman populates the data
from the yaml. However the volume content is not controlled by us and we
can be tricked following a symlink to a file on the host instead.

Fixes: CVE-2025-9566

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2025-09-04 16:18:35 +02:00
Matt Heon
4b66e5a27b Add R! to systemd-tmpfiles script for all /tmp dirs
We already used `x` in tmpfiles, to ensure systemd did not remove
our directories or clean their contents (we really need them to
be left unmodified). However, systemd-tmpfiles lets us use more
than one directive per line, which means we can safely add an R!
(recursive remove on reboot) to these lines to ensure that, if
/tmp is not a tmpfs, systemd-tmpfiles will still remove our
temporary files, ensuring reboots are still accurately detected.

Signed-off-by: Matt Heon <mheon@redhat.com>
2025-09-04 09:51:37 -04:00
Paul Holzinger
c2506656c4 spf13/pflag: replace deprecated ParseErrorsWhitelist
Use ParseErrorsAllowlist instead, should still work the exact same.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2025-09-04 14:04:47 +02:00
Paul Holzinger
ca9c8d104e update module github.com/spf13/pflag to v1.0.10
Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2025-09-04 14:02:50 +02:00
openshift-merge-bot[bot]
2499de2f27 Merge pull request #26982 from containers/renovate/actions-stale-10.x
[skip-ci] Update actions/stale action to v10
2025-09-04 09:24:20 +00:00
openshift-merge-bot[bot]
836b897178 Merge pull request #26980 from containers/renovate/actions-setup-go-6.x
[skip-ci] Update actions/setup-go action to v6
2025-09-04 09:21:31 +00:00
renovate[bot]
889a5fd0ac [skip-ci] Update actions/stale action to v10
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-09-04 09:11:18 +00:00
openshift-merge-bot[bot]
a589f51209 Merge pull request #26971 from mheon/fix_26968
Fix a locking bug in that could cause a double-unlock
2025-09-04 09:10:30 +00:00
renovate[bot]
f22506b74f [skip-ci] Update actions/setup-go action to v6
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-09-04 05:39:43 +00:00
renovate[bot]
310f196aea fix(deps): update module github.com/docker/docker to v28.4.0+incompatible
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-09-04 03:10:33 +00:00
openshift-merge-bot[bot]
6cc74679e2 Merge pull request #26976 from Luap99/buildah-test-fix
test/buildah-bud: enable one skipped test
2025-09-03 20:54:40 +00:00
Paul Holzinger
faceb67782 test/buildah-bud: enable one skipped test
For podman build --squash is different from the buildah bud --squash
option, in podman it must use --squash-all.

Fixes: #26906

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2025-09-03 20:25:12 +02:00
openshift-merge-bot[bot]
be3f06ed96 Merge pull request #26974 from Luap99/vendor
vendor: update go.podman.io/{common,image,storage}
2025-09-03 16:45:22 +00:00
Paul Holzinger
dbfddb82cb vendor: update go.podman.io/{common,image,storage}
Update to the latest tags to make sure they all work correctly.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2025-09-03 17:46:02 +02:00
Matthew Heon
2c6dadd724 Fix a locking bug in that could cause a double-unlock
The `cleanupExecBundle` function was only meant to be called on a
locked container, as it does some state mutation operations. It
also has a timed wait (if the directory is busy and can't be
removed yet, give it a few milliseconds) in which it deliberately
yields the lock to not block the container for that time.

The `healthCheckExec()` function calls `cleanupExecBundle` out of
a `defer` block. This is after the `defer c.lock.Unlock()` so it
fires afterwards when the function returns, so we're normally
fine - the container is still locked when our defer runs. The
problem is that `healthCheckExec()` also unlocks the container
during the expensive exec operation, and can actually fail and
return while not holding the lock - meaning our `defer` can fire
on an unlocked container, leading to a potential double unlock
in `cleanupExecBundle`.

We could, potentially, re-lock the container after the exec
occurs, but we're actually waiting for a `select` to trigger to
end the function, so that's not a good solution. Instead, just
re-lock (if necessary) in the defer, before invoking
`cleanupExecBundle()`. The `defer c.lock.Unlock()` will fire
right after and unlock after us.

Fixes #26968

Signed-off-by: Matthew Heon <matthew.heon@pm.me>
2025-09-03 10:19:37 -04:00
openshift-merge-bot[bot]
5e5f0a1dd2 Merge pull request #26963 from Luap99/fix-local-cross
Revert "Remove bin/podman.cross Make target"
2025-09-03 11:07:53 +00:00
Paul Holzinger
5c810ea1c8 Makefile: add SOURCES dep to bin/podman.cross.% target
Without this the corss binaries will never get rebuild until the user
manually deletes them which is not very useful.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2025-09-03 12:11:23 +02:00
Paul Holzinger
b62f887fbd Makefile: add proper docs for bin/podman.cross.%
To avoid any confusion where people think this target is unused.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2025-09-03 12:11:23 +02:00
Paul Holzinger
3633cd53e8 Revert "Remove bin/podman.cross Make target"
This reverts commit c45b27ffb0.

This commit was just wrong, local-cross depends on this target as it
calls a target like "bin/podman.cross.linux.amd64". Without this it is
just broken as there is no matching target.

$ make bin/podman.cross.linux.amd64
make: *** No rule to make target 'bin/podman.cross.linux.amd64'.  Stop.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2025-09-03 12:11:23 +02:00
Jan Rodák
98072bfcea refactor: modularize build REST API with utility functions
- Extract BuildQuery and BuildContext structs from inline definitions
- Split monolithic BuildImage into focused helper functions
- Add generic JSON parsing utilities (ParseOptionalJSONField, etc.)
- Introduce ResponseSender for consistent build response streaming

Signed-off-by: Jan Rodák <hony.com@seznam.cz>
2025-09-03 10:54:41 +02:00
Mark Johnston
2acf5c0119 libpod: Fix the jailName helper
At one point, we created multiple jails per container in order to enable
network configuration from outside the container jail.  On FreeBSD 14.x
and later this is not necessary and there is only one jail per
container.  In this case, return the correct jail name.

Signed-off-by: Mark Johnston <mark.johnston@klarasystems.com>
2025-09-02 16:17:18 +00:00
Mark Johnston
a250fee0ec libpod: Fix "top" support on FreeBSD
FreeBSD's ps ignores -J if -a is specified, so "podman top" would
effectively just run ps -a, not terribly useful.  But there's no need to
specify -a when specifying a selector such as -J (or -G or -U, etc.).

Signed-off-by: Mark Johnston <mark.johnston@klarasystems.com>
2025-09-02 16:17:18 +00:00
Mark Johnston
5ba23ccad5 compat: Deduplicate the Linux and FreeBSD containers/stats helpers
Signed-off-by: Mark Johnston <mark.johnston@klarasystems.com>
2025-09-02 16:17:11 +00:00
Mark Johnston
a341a4ee24 compat: Add a stub container/stats handler for FreeBSD
The container/stats endpoint was unimplemented.  Copy over the structure
from the Linux endpoint handler, albeit with most of the stats
unpopulated.  This is similar to how "podman stats" returns very little
info on FreeBSD.  On the other hand, some orchestration tools will query
the stats endpoint to check liveness of a container, so it's useful to
implement it even though some fields are unimplemented for now.

Signed-off-by: Mark Johnston <mark.johnston@klarasystems.com>
2025-09-02 16:14:25 +00:00
openshift-merge-bot[bot]
6d0b28a5c4 Merge pull request #26943 from containers/renovate/github.com-shirou-gopsutil-v4-4.x
fix(deps): update module github.com/shirou/gopsutil/v4 to v4.25.8
2025-09-02 14:54:04 +00:00
openshift-merge-bot[bot]
ca19491f91 Merge pull request #26947 from Luap99/system-test-fixes
test/system: some small fixes
2025-09-02 14:21:23 +00:00
openshift-merge-bot[bot]
9d7a24e654 Merge pull request #26945 from Luap99/vol-opts
do not pass volume options as bind mounts options to runtime
2025-09-02 14:18:15 +00:00
Jan Kaluza
9de737bf29 Change the syntax to not depend on jinja2.
Signed-off-by: Jan Kaluza <jkaluza@redhat.com>
2025-09-02 16:04:34 +02:00
Jan Kaluza
c12b1b32bc Rewrite the Quadlet documentation.
This commit does the following:

- Splits the podman-systemd.unit.5.md into multiple files - one for each
  quadlet file type, podman-quadlet.7.md for general quadlet information
  and podman-quadlet-basic-usage.7.md for quadlet examples.
- Removes the original podman-systemd.unit.5.md file.
- Adds support for jinja2 templating language in the markdown_preprocess.
- Uses jinja2 in options/*.md to use the single .md file for both podman
  subcommands man-pages and quadlet man-pages. This deduplicates
  the Quadlet man-pages a lot.
- Adds new `@@option quadlet:source.md` preprocess command to import
  such .md files from options directory.

Signed-off-by: Jan Kaluza <jkaluza@redhat.com>
2025-09-02 12:49:45 +02:00