1
0
mirror of https://github.com/containers/podman.git synced 2026-02-05 06:45:31 +01:00

7170 Commits

Author SHA1 Message Date
Matt Heon
d220d58f08 Merge pull request #27993 from danishprakash/podman-buildah-vendor
vendor: update c/buildah to latest main
2026-02-04 16:02:39 -05:00
Paul Holzinger
8fbda3fbef Merge pull request #27999 from baude/applytransports
add bootc transports to os-apply
2026-02-03 14:53:18 +01:00
Mayowa Fajobi
1bfd4cb95b Fix healthcheck argument with spaces split in Docker API (#27818)
Fixes: #26519

Signed-off-by: MayorFaj <mayorfaj@gmail.com>
2026-02-03 12:49:28 +01:00
Paul Holzinger
cadc74b796 Merge pull request #27995 from chkpnt/proxyenv
Write DefaultEnvironment proxy values to /etc/systemd/user.conf.d/default-env.conf
2026-02-03 12:48:21 +01:00
Mario Loriedo
6e053689d5 Merge pull request #27795 from MayorFaj/fix-env-envfrom-precedence-27287
fix: ensure environment variable precedence between env and envFrom
2026-02-03 11:31:59 +01:00
Danish Prakash
827ba37b3e build: handle --iidfile-raw and --metadata-file flags
* docs: man page additions
* test/e2e: add tests for `--iidfile-raw` and `--metadata-file`
* test/buildah-bud: update buildah-bud test patch for buildah v1.42.1

Signed-off-by: Danish Prakash <contact@danishpraka.sh>
2026-02-03 09:18:29 +05:30
Brent Baude
40b2a585f9 Autocomplete machine fixes
Fixups for autocomplete for machine commands.  This was authored by Paul
Holzinger.

Thank you very much!

Signed-off-by: Brent Baude <bbaude@redhat.com>
2026-02-02 15:19:37 -06:00
Brent Baude
f4138d3599 add bootc transports to os-apply
now that we use `bootc switch` for changing out-of-band updates, we can
consider also using some of their supported transports.

* containers-storage
* oci
* oci-archive
* registry

RUN-3963
Signed-off-by: Brent Baude <bbaude@redhat.com>
2026-02-02 09:07:08 -06:00
Gregor Dschung
644bf2e04a Fix interfering escaping of commas and spaces in no_proxy variable
Signed-off-by: Gregor Dschung <gregor@chkpnt.de>
2026-02-02 15:49:25 +01:00
Gregor Dschung
a6167bdecc Write DefaultEnvironment proxy values to /etc/systemd/user.conf.d/default-env.conf
Otherwise, the proxy values aren't passed to rootless podman.

Signed-off-by: Gregor Dschung <gregor@chkpnt.de>
2026-02-02 15:49:05 +01:00
Gregor Dschung
e545f9ca61 Fix test proxyenv/env_test.go for systems that use proxy variables
Signed-off-by: Gregor Dschung <gregor@chkpnt.de>
2026-02-02 15:42:00 +01:00
Brent Baude
3d4f25e6d3 Merge pull request #27936 from inknos/get-exists-quadlet-api
Add GET /quadlets/{name}/exists
2026-01-28 10:58:46 -06:00
Brent Baude
b60d234da4 Merge pull request #27827 from lsm5/podman6-no-cni
Podman6: Remove CNI
2026-01-28 10:20:56 -06:00
Chawye Hsu
ce568f75dc chore(machine): remove unused EvalSymlinksOrClean function and tests
Related to https://github.com/containers/container-libs/pull/612

Signed-off-by: Chawye Hsu <su+git@chawyehsu.com>
2026-01-28 02:42:45 +08:00
Nicola Sella
eb0c4716d3 Add GET /quadlets/{name}/exists
Fixes: https://issues.redhat.com/browse/RUN-4068

Signed-off-by: Nicola Sella <nsella@redhat.com>
2026-01-27 16:10:56 +01:00
Lokesh Mandvekar
454167efa9 Remove CNI-specific code paths from libpod
Remove CNI-specific conditional logic and update comments throughout
the libpod networking code:

- Simplified DNS configuration logic in container_internal_common.go
  to always use netavark behavior (removed backend checks)
- Removed CNI-specific iptables chain error regex pattern
- Updated all comments referencing 'CNI' to use 'netavark' or
  'network backend'
- Renamed variable 'cniNet' to 'netInfo' for clarity
- Updated field and type documentation to remove CNI references

All networking code now assumes netavark as the sole backend.

Signed-off-by: Lokesh Mandvekar <lsm5@redhat.com>
2026-01-27 16:32:38 +05:30
Lokesh Mandvekar
f6bddc8af2 Remove CNI backend configuration from runtime
Remove runtime configuration options for CNI network backend:

Runtime options:
- Remove WithNetworkBackend() runtime option function
- Function allowed setting network backend programmatically

Flag handling:
- Remove --network-backend flag change detection
- Remove call to WithNetworkBackend() when flag changed
- Remove TODO comment about CNI plugins directory flag

The network backend configuration is now handled entirely by the
vendored common/libnetwork code, which will default to Netavark.
There is no longer any way to configure CNI as the network backend
through Podman's runtime initialization.

Note: libpod/info.go keeps existing NetworkBackend reporting logic
which will automatically report "netavark" as the only backend since
configuration defaults to netavark and cannot be changed to CNI.

Signed-off-by: Lokesh Mandvekar <lsm5@redhat.com>
2026-01-27 16:32:38 +05:30
Lokesh Mandvekar
73ef7cfcdc Remove CNI backend from CLI options and completions
Remove user-facing CLI options for CNI network backend:

CLI flags:
- Keep --network-backend global flag as hidden and deprecated for
  backward compatibility with cleanup commands from 5.x containers
- Map flag to a throwaway variable (value is ignored)
- Remove shell completion for network backend values

Shell completions:
- Remove AutocompleteNetworkBackend() function
- Remove references to CNI and Netavark type constants

Backward compatibility:
- Remove --rootless-cni flag alias for podman unshare
- Remove SetNormalizeFunc that mapped rootless-cni to rootless-netns
- Update --rootless-netns flag description to mention only netavark

The --network-backend flag remains as a hidden deprecated flag to
prevent failures when upgrading from 5.x where containers may have
cleanup commands that include this flag. The flag is accepted but
ignored. Users can no longer specify CNI as a network backend option.
The --rootless-cni alias is removed; users must use --rootless-netns.

Signed-off-by: Lokesh Mandvekar <lsm5@redhat.com>
2026-01-27 16:32:38 +05:30
Brent Baude
2d67bf3b0a Vendor common test for artifact digest lookup
Vendor latest common with artifact changes

Signed-off-by: Brent Baude <bbaude@redhat.com>
2026-01-26 15:45:56 -06:00
Paul Holzinger
c4128cbc40 Merge pull request #27880 from giuseppe/drop-pause-process
rootless: use nsfs file handles to persist namespaces
2026-01-23 13:15:56 +01:00
MayorFaj
d8f5368428 fix: correct env/envFrom precedence in kube play
Fixes: #27287

Signed-off-by: MayorFaj <mayorfaj@gmail.com>
2026-01-22 19:55:57 +00:00
lstocchi
cfa1b51775 fix hyperv ignition cleanup and error handling
this fixes two bugs in Hyper-V VM ignition handling:

1. Changed `err := readAndSplitIgnition()` to
`err = readAndSplitIgnition()` so the deferred cleanup function can
properly detect errors and clean up ignition
2. The function was trying to remove keys with pattern `vm.ElementName + index`, but
the actual keys were created using `"ignition.config." + index` pattern.

It also improve the deletion by calculating in how many parts the ignition file is splitted when being added in the registry and delete just them instead of blidnly iterating through 0-50.

Signed-off-by: lstocchi <lstocchi@redhat.com>
2026-01-21 15:50:17 +01:00
Giuseppe Scrivano
f172ff789b rootless: use nsfs file handles to persist namespaces
use name_to_handle_at and open_by_handle_at to persist rootless
namespaces without needing a pause process.

The namespace file handles are stored in a file and can be used to
rejoin the namespaces, as long as the namespaces still exist.

Fall back to the pause process approach only when the kernel doesn't
support nsfs handles (EOPNOTSUPP).

The feature is currently only enabled when the PODMAN_NO_PAUSE_PROCESS
environment variable is set.

These changes in the kernel are required (landed in Linux 6.18):

https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=3ab378cfa793

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2026-01-20 18:41:59 +01:00
Brent Baude
aba2df7517 Add podman machine os upgrade command
Implements automatic OS upgrade functionality for Podman machines that requires no user input beyond running the command. The upgrade logic automatically determines the appropriate upgrade path using a three-way comparison between client version, machine version, and OCI registry:

* When the client version is older than the machine version, no action is taken and an error is returned.
* When the client version matches the machine version, the OCI registry is queried to check for in-band updates by comparing image digests.  This handles minor, patch level, and updates oci image use cases.
* When the client version is newer than the machine version, the machine is upgraded to match the client's major.minor version.
* No manual image selection or version specification required.

The command supports dry-run mode and JSON (only) output format for automation.

Signed-off-by: Brent Baude <bbaude@redhat.com>
2026-01-16 14:14:06 -06:00
Tom Sweeney
8a33866ecd Merge pull request #27860 from ygalblum/quadlet-pod-template
Quadlet - do not link pod service units to quadlet templates - merging as our auto-merge bot seems to be offline at the moment.
2026-01-16 09:34:45 -05:00
Matt Heon
cb67dafd36 Merge pull request #26445 from aaron-ang/update-ulimit
Add ulimits to `podman update`
2026-01-16 08:38:00 -05:00
Ygal Blum
0d3c438803 Quadlet - do not link pod service units to quadlet templates
When a template container unit is linked to a pod do not add
its service to the pod units dependency

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

Signed-off-by: Ygal Blum <ygal.blum@gmail.com>
2026-01-15 09:23:01 -05:00
Nicola Sella
2e23fcc5a5 Add DELETE /libpod/quadlets
Fixes: https://issues.redhat.com/browse/RUN-3742

Signed-off-by: Nicola Sella <nsella@redhat.com>
2026-01-15 12:10:32 +01:00
Mario Loriedo
7c9d4a42c5 Merge pull request #27885 from lstocchi/i27615
Prevent starting and stopping legacy hyperv machines when not elevated
2026-01-13 14:38:07 +01:00
lstocchi
ca44e3a4d7 Fix race condition in CleanupGVProxy when reading gvproxy PID file
When startVM fails quickly, CleanupGVProxy may attempt to read the
gvproxy.pid file before gvproxy has written it, causing cleanup to
fail.

This commit adds retry logic that waits up to 2 seconds for the PID
file to appear.

Signed-off-by: lstocchi <lstocchi@redhat.com>
2026-01-09 08:07:04 +01:00
lstocchi
d2ea5a3fd0 prevent starting/stopping legacy Hyper-v machines when not elevated
Podman 5.x and earlier required to run as admin to work with Hyper-v.
Starting from Podman 6 this is not mandatory anymore as Registry
entries are handled differently. However, it may
happen the user have a legacy machine running when switching to Podman 6
or starts an old machine in elevated mode and then tries to stop it as a
normal user with Podman 6. If that happens the system will end up in a corrupted state
as the gvproxy process will not be stopped.
To prevent such scenario and issues, this commit maintains the original
behavior Podman 5.x has. Legacy Hyper-v machines needs to be handled
with elevated rights.

Signed-off-by: lstocchi <lstocchi@redhat.com>
2026-01-09 08:07:00 +01:00
Brent Baude
76e14f79f7 use bootc for os apply
Instead of using rpm-ostree, we now use bootc for os apply.  the
implementation is a little murky right now and will require some cleanup
to implement bootc's transports.  for now, we only support oci images
from registries.

once we have an upgrade command, the transports can be added and the
docs for apply can be ammended to be more clear.

Fixes: RUN-3836

Signed-off-by: Brent Baude <bbaude@redhat.com>
2026-01-08 13:32:39 -06:00
shiavm006
90f45bca77 extract shared TTY handling code into helper function
Signed-off-by: shiavm006 <shivammittal42006@gmail.com>
2026-01-07 10:19:38 +05:30
Matt Heon
2fbecb48e1 Merge pull request #27791 from ninja-quokka/kube_play_image_validation
[play_kube] Add validation to container image field
2025-12-22 14:43:56 -05:00
Lewis Denny
74c0795a7c [play_kube] Add validation to container image field
Fixes: #27784

Signed-off-by: Lewis Denny <lewisdenny@me.com>
2025-12-21 20:15:35 +10:00
Ashley Cui
aa1d7b189a Remove network-cmd-path
As part of slirp removal.
RUN-3569

Signed-off-by: Ashley Cui <acui@redhat.com>
2025-12-19 16:52:49 -05:00
Matt Heon
ac91395e1d Merge pull request #27696 from MayorFaj/fix-logs-timestamp-precision
fix(logs): improve timestamp precision in container logs
2025-12-17 15:41:43 -05:00
Matt Heon
8b9c1e2ad3 Merge pull request #27781 from cgwalters/fprintf-trailing-nl
Fix missing newlines in stderr error messages
2025-12-17 12:21:03 -05:00
Nicola Sella
3e6781f05a Add POST /libpod/quadlets
Fixes: https://issues.redhat.com/browse/RUN-3743

Signed-off-by: Nicola Sella <nsella@redhat.com>
2025-12-17 14:37:12 +01:00
Colin Walters
9a2c8b615e Fix missing newlines in stderr error messages
I happened to run `podman run --config=/path/to/file` and got
an error without a trailing newline, which was a bit jarring.

Fix the instances I noticed.

Assisted-by: OpenCode (Claude Opus 4.5)
Signed-off-by: Colin Walters <walters@verbum.org>
2025-12-17 07:36:04 -05:00
Paul Holzinger
254403dc03 Merge pull request #27426 from Honny1/local-api-artifact-add
Artifact add optimization on macOS and Windows
2025-12-12 16:49:50 +01:00
Brent Baude
f348a0717d Vendor latest mono repo for libartifact changes
This PR vendors in the strong typed libartifact code and carries the
associated changes.

Signed-off-by: Brent Baude <bbaude@redhat.com>
2025-12-10 14:44:50 -06:00
Christophe Fergeau
84a2902d32 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 16:28:16 +01:00
openshift-merge-bot[bot]
f66f7c8a5b Merge pull request #27650 from lstocchi/i27614
Prevent non hyper-v admin users to execute machine commands
2025-12-09 12:17:38 +00:00
Brent Baude
f87cefc262 Remove Intel MacOS support
This PR removes support for Intel Apple Macs. The removal includes
impacts to code, tests, Makefile, builds, release builds, and so forth.

Fixes Jira: RUN-3621

Signed-off-by: Brent Baude <bbaude@redhat.com>
2025-12-07 07:03:06 -06:00
MayorFaj
2bbf26de0c fix(logs): add tests for nanosecond precision in log timestamps
Signed-off-by: MayorFaj <mayorfaj@gmail.com>
2025-12-06 12:17:39 +00:00
MayorFaj
60a5a476d5 fix(logs): improve timestamp precision in container logs
Signed-off-by: MayorFaj <mayorfaj@gmail.com>
2025-12-05 16:28:29 +00:00
openshift-merge-bot[bot]
5508d873c1 Merge pull request #27619 from Honny1/fix-unless-stopped-reboot
Fix `unless-stopped` restart policy to match Docker behavior
2025-12-04 15:04:10 +00:00
openshift-merge-bot[bot]
0bd2b4b358 Merge pull request #27602 from ZuhairM7/fix-remote-build-secrets
bindings: fix handling of env secrets in remote builds
2025-12-04 13:15:24 +00:00
ZuhairM7
fdbb696731 bindings: fix handling of env secrets in remote builds
Previously, using --secret=id=foo,env=BAR in remote mode would fail because the client sent the env var name to the server, which tried to resolve it locally. This patch modifies the client to resolve the environment variable locally, write it to a temp file, and send it as a file-based secret.

Fixes #27494

Signed-off-by: ZuhairM7 <ZuhairM7>
Signed-off-by: ZuhairM7 <zuhairmerali@gmail.com>
2025-12-02 16:21:49 -06:00