Compare commits

...

566 Commits
v5.5.0 ... main

Author SHA1 Message Date
openshift-merge-bot[bot] b2ccef27fa
Merge pull request #26655 from containers/renovate/common-image-and-storage-deps
fix(deps): update module github.com/containers/common to v0.64.0
2025-07-17 17:00:16 +00:00
renovate[bot] 3c33b33424
fix(deps): update module github.com/containers/common to v0.64.0
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-07-17 04:10:47 +00:00
openshift-merge-bot[bot] 0ae8a689c0
Merge pull request #26394 from Luap99/code-doc
docs: add description about our code structure
2025-07-16 19:18:05 +00:00
Paul Holzinger 82ad043197
docs: add description about our code structure
Document most important directories when trying to understand our
project.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2025-07-16 15:59:48 +02:00
openshift-merge-bot[bot] 27487fd94d
Merge pull request #26643 from Luap99/rm-dead-conmon
podman rm: handle case where conmon was killed
2025-07-16 12:39:11 +00:00
openshift-merge-bot[bot] 39868323a2
Merge pull request #26648 from containers/renovate/common-image-and-storage-deps
fix(deps): update common, image, and storage deps
2025-07-16 10:58:34 +00:00
renovate[bot] da3df0c45b
fix(deps): update common, image, and storage deps
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-07-16 04:46:14 +00:00
Paul Holzinger c1cf4b0d89
podman rm: handle case where conmon was killed
When conmon was killed podman rm -f currently fails but running it again
then works which doesn't really makes sense. We should properly remove
the contianer even if conmon is dead.

In fact the code already handles ErrConmonDead as stop error when we
remove the container but this error was never thrown anywhere. To fix
this throw ErrConmonDead instead of ErrInternal because that is not an
intenral error if something else killed conmon.

With this we can correctly cleanup and remove the container. The fact
that this works on the first try is important for quadlet units as they
only run the ExecStopPost= command once to remove it.

Fixes: #26640

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2025-07-15 17:15:19 +02:00
Paul Holzinger 8b1f06bf8f
podman inspect: fix error difference between local and remote
There is no reason for local and rmeote to use a different error that
just differs in quoting. Make them consitent to simplify the tests.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2025-07-15 17:15:19 +02:00
openshift-merge-bot[bot] 4364db989a
Merge pull request #26638 from containers/renovate/common-image-and-storage-deps
Update module github.com/containers/storage to v1.59.0
2025-07-15 09:51:46 +00:00
openshift-merge-bot[bot] f3761f97d1
Merge pull request #26619 from Craig-Spencer-12/exec-pid-leak-test
Fix test that checks for podman exec leaks
2025-07-15 09:38:01 +00:00
openshift-merge-bot[bot] c2e4f33b91
Merge pull request #26637 from containers/renovate/github.com-opencontainers-cgroups-0.x
Update module github.com/opencontainers/cgroups to v0.0.4
2025-07-15 09:26:47 +00:00
renovate[bot] 21356fa06b
Update module github.com/containers/storage to v1.59.0
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-07-15 02:16:24 +00:00
renovate[bot] df7d787b4c
Update module github.com/opencontainers/cgroups to v0.0.4
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-07-14 23:46:15 +00:00
openshift-merge-bot[bot] 6b9a3066b6
Merge pull request #26631 from Luap99/autoupdate-error
podman auto-update: include container in invalid policy message
2025-07-14 17:34:37 +00:00
openshift-merge-bot[bot] 9ed9da3446
Merge pull request #26602 from containers/renovate/common-image-and-storage-deps
Update common, image, and storage deps
2025-07-14 16:47:20 +00:00
Craig Spencer 55296e1c44 Fix test that checks for podman exec leaks
Updated helper function "find_exec_pid_files" and called it the "podman exec - leak check" test.

Fixes: #26616

Signed-off-by: Craig Spencer <craig.spencer812@gmail.com>
2025-07-14 12:18:17 -04:00
openshift-merge-bot[bot] b05b9d043d
Merge pull request #26533 from ArthurWuTW/26506
volume export: refuse to write to terminal (TTY)
2025-07-14 15:58:56 +00:00
renovate[bot] e899f49926
Update common, image, and storage deps
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-07-14 15:42:59 +00:00
Arthur Wu b48eb6e2fb volume export: refuse to write to terminal (TTY)
Prevent `podman volume export` from showing raw tar contents directly to the terminal (STDOUT). If not redirected and without output flag, error message is expected.

Fixes: #26506

Signed-off-by: Arthur Wu <lion811004@gmail.com>
2025-07-14 10:20:22 -04:00
openshift-merge-bot[bot] ffcd19735f
Merge pull request #26630 from containers/renovate/go-github.com-go-viper-mapstructure-v2-vulnerability
Update module github.com/go-viper/mapstructure/v2 to v2.3.0 [SECURITY]
2025-07-14 13:38:44 +00:00
Paul Holzinger e55270a51a
podman auto-update: include container in invalid policy message
I noticed recently when I made a typo that then auto-update errored but
it did not tell me which container was incorrect so I had to check all
containers myself. Include the container ID in the error to make it
clear which container has the issue.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2025-07-14 14:34:22 +02:00
renovate[bot] 4bc22a4b3c
Update module github.com/go-viper/mapstructure/v2 to v2.3.0 [SECURITY]
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-07-14 12:31:17 +00:00
openshift-merge-bot[bot] 76b70b630c
Merge pull request #26612 from Luap99/Maintainers
Maintainers: add Lewis, Jan and Nicola as Reviewers
2025-07-14 12:30:16 +00:00
openshift-merge-bot[bot] 7efa0b829a
Merge pull request #26611 from containers/renovate/golang.org-x-net-0.x
fix(deps): update module golang.org/x/net to v0.42.0
2025-07-11 14:28:26 +00:00
openshift-merge-bot[bot] de51ef1cd6
Merge pull request #26615 from containers/renovate/golangci-golangci-lint-2.x
chore(deps): update dependency golangci/golangci-lint to v2.2.2
2025-07-11 14:25:15 +00:00
openshift-merge-bot[bot] c305a932cc
Merge pull request #26609 from Luap99/bindings-fixes
pkg/bindings/containers: some attach/logs handling fixes
2025-07-11 14:16:31 +00:00
openshift-merge-bot[bot] b059e47ff2
Merge pull request #26604 from l0rd/seccomp-winpath
Fix seccomp profile path on Windows
2025-07-11 14:13:35 +00:00
renovate[bot] 0c586807ea
chore(deps): update dependency golangci/golangci-lint to v2.2.2
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-07-11 13:37:46 +00:00
openshift-merge-bot[bot] e28445e9da
Merge pull request #26575 from ypu/journalctl
System tests: Update the journalctl function to ignore No entry message
2025-07-11 13:36:54 +00:00
Paul Holzinger 215cecdbaa
Maintainers: add Nicola Sella as Reviewer
Nicola has done valuable contributions to the project over the past
months.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2025-07-11 12:31:16 +02:00
Paul Holzinger 78d4f63b93
Maintainers: add Jan Kaluza as Reviewer
Jan has done valuable contributions to the project over the past months.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2025-07-11 12:31:16 +02:00
Paul Holzinger 5731557d54
Maintainers: add Lewis Roy as Reviewer
Lewis has done valuable contributions to the project over the past
months.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2025-07-11 12:31:16 +02:00
renovate[bot] b4ed23dc27
fix(deps): update module golang.org/x/net to v0.42.0
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-07-11 09:30:42 +00:00
openshift-merge-bot[bot] ff1a3c5fa8
Merge pull request #26610 from containers/renovate/golang.org-x-crypto-0.x
fix(deps): update module golang.org/x/crypto to v0.40.0
2025-07-11 08:27:30 +00:00
openshift-merge-bot[bot] d07dd054df
Merge pull request #26607 from ygalblum/quadlet-image-pull-policy
Quadlet - add support for the Policy key for .image files
2025-07-11 08:13:38 +00:00
renovate[bot] 8987fd412a
fix(deps): update module golang.org/x/crypto to v0.40.0
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-07-11 00:26:01 +00:00
Paul Holzinger 047d231008
test/e2e: podman update make env check stricter
We don't need a tty here and then we are able to check for the
exact output.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2025-07-10 19:57:16 +02:00
Paul Holzinger a360b29626
pkg/bindings/containers: do not ignore ErrUnexpectedEOF
Do not ignore ErrUnexpectedEOF from DemuxHeader(), if we fail to parse
the header there must have been a clear protocal error between client
and server which should be reported and not silently ignored. I wonder
ig this might explain why we have missing remote exec/attach output
without any error, it is possible we are eating some internal errors due
this.

Commit ba8eba83ef added the ErrUnexpectedEOF check but without any
explanation why that would be needed. The tests from that commit pass
without it locally but not in CI. With some debugging best I found the
issue is actually a test bug. The channel is not consumed until it is
closed which means the main test exists before the log reading goroutine
is done. And if the main test exists the first step it does is to kill
the podman service which then can trigger the ErrUnexpectedEOF server on
the still open http connection and thus the test case failed there.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2025-07-10 19:57:16 +02:00
Paul Holzinger ffec133766
pkg/bindings/containers: do not create sub slice
DemuxFrame() already returns a byte slice with the correct length so
this makes it simpler and the caller does not need to check this at all.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2025-07-10 19:57:16 +02:00
Paul Holzinger f42453457c
pkg/bindings/containers: don't check for short read
io.ReadFull() already returns ErrUnexpectedEOF if there was a short read
so this check is redundant and can be dropped.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2025-07-10 19:57:16 +02:00
openshift-merge-bot[bot] 9f264850d6
Merge pull request #26586 from Craig-Spencer-12/kube-secret-error
Clarifiy error message when using an improperly formatted secret with kube
2025-07-10 17:38:18 +00:00
Ygal Blum 439448c287 Quadlet - add support for the Policy key for .image files
Resolves: #26446

Signed-off-by: Ygal Blum <ygal.blum@gmail.com>
2025-07-10 13:06:38 -04:00
Craig Spencer 5e44c17309 Clarifies error message when using an improperly formatted secret with kube
Fixes: #26586

Signed-off-by: Craig Spencer <craig.spencer812@gmail.com>
2025-07-10 12:19:28 -04:00
openshift-merge-bot[bot] cc84e29ddd
Merge pull request #26599 from giuseppe/fix-one-time-example
docs: replace fuse-overlayfs example with additionalimagestore
2025-07-10 13:09:09 +00:00
Mario Loriedo 3e8b2d7d96 Fix seccomp profile path on Windows
Call specgen.ConvertWinMountPath() on seccomp profile paths provided via
security-opt parameter.

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

Signed-off-by: Mario Loriedo <mario.loriedo@gmail.com>
2025-07-10 15:02:54 +02:00
openshift-merge-bot[bot] 86dafb60bc
Merge pull request #26603 from containers/renovate/golang.org-x-term-0.x
fix(deps): update module golang.org/x/term to v0.33.0
2025-07-10 09:54:19 +00:00
renovate[bot] c01eaa87dd
fix(deps): update module golang.org/x/term to v0.33.0
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-07-10 08:47:54 +00:00
Giuseppe Scrivano 1c943f0ad8
docs: replace fuse-overlayfs example with additionalimagestore
The fuse-overlayfs example was misleading as setting fuse-overlayfs
will cause a persistent storage configuration change rather than a
one-time option.

Closes: https://github.com/containers/podman/issues/26590

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2025-07-09 23:13:41 +02:00
openshift-merge-bot[bot] faf975c737
Merge pull request #26593 from Luap99/ebpf
hack/podman_cleanup_tracer.bt: fixes to make it work on newer versions
2025-07-09 19:32:59 +00:00
Paul Holzinger b59648a2d6
hack/podman_cleanup_tracer.bt: check map before deleting keys
It seems the new bpftrace version since 0.22 logs a warning if we try to
delete a key that does not exist.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2025-07-09 14:02:11 +02:00
Paul Holzinger 1f8bc9d736
hack/podman_cleanup_tracer.bt: clamp str size for strcontains()
On bpftrace 0.22 this fails to compile and load so the script currently
does not show us anything in CI there.

We need to clamp the string size a bit 128 chars seems more than enough
for the podman/conmon binary path length.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2025-07-09 14:02:10 +02:00
Paul Holzinger 5e5bfadf93
hack/podman_cleanup_tracer.bt: use new max str lenth
The default has been set to 1024 which should bee good enough and better
than having to unroll this loop like that.
This is supported since bpftrace 0.22 which is in fedora 42.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2025-07-09 14:02:10 +02:00
openshift-merge-bot[bot] a479783d4b
Merge pull request #26583 from flouthoc/libpod_build
[docs] libpod/build: add headers
2025-07-08 16:44:51 +00:00
flouthoc 152849ebd2
libpod/build: add headers
Add `headers` for `/libpod/build`

Closes: https://github.com/containers/podman/issues/26440

Signed-off-by: flouthoc <flouthoc.git@gmail.com>
2025-07-08 06:51:32 -07:00
openshift-merge-bot[bot] 0737c19689
Merge pull request #26524 from mheon/libartifact_locking
Add basic locking to Libartifact
2025-07-08 13:01:25 +00:00
Yiqiao Pu c735f8e237 Update the journalctl function to ignore No entry message
For currently version of journalctl, --user option only works when
the persistent storage is enabled. So we need to check this option
before we use it. Otherwise a set of tests will failed with can
not find expected output from journalctl with rootless user.

Signed-off-by: Yiqiao Pu <ypu@redhat.com>
2025-07-08 20:29:32 +08:00
openshift-merge-bot[bot] aab1029b4f
Merge pull request #26584 from ninja-quokka/tidy_artifact_types
[Artifacts] Tidy artifact types
2025-07-08 10:16:01 +00:00
openshift-merge-bot[bot] 6100b04ce9
Merge pull request #26574 from containers/renovate/common-image-and-storage-deps
fix(deps): update common, image, and storage deps
2025-07-08 10:02:15 +00:00
renovate[bot] 0e106c24e0
fix(deps): update common, image, and storage deps
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-07-08 09:13:21 +00:00
openshift-merge-bot[bot] b047cfc7e9
Merge pull request #26563 from ygalblum/quadlet-warn-exec-parse-fail
Quadlet - print warning when fail to parse
2025-07-08 08:42:16 +00:00
Lewis Roy 0f61e48ac5
[Artifacts] Remove erroneous ArtifactListOptions var ImagePushOptions
This var has so far been unuesd so easy to remove

Signed-off-by: Lewis Roy <lewis@redhat.com>
2025-07-08 06:53:41 +10:00
Lewis Roy 53b5cb5581
[Artifacts] Add note about ArtifactInspectOptions Remote var
Signed-off-by: Lewis Roy <lewis@redhat.com>
2025-07-08 06:53:05 +10:00
Ygal Blum cd807f8ff6 Quadlet - print warning when fail to parse
Fixes: #26542

Signed-off-by: Ygal Blum <ygal.blum@gmail.com>
2025-07-07 14:49:32 -04:00
openshift-merge-bot[bot] 8575b10776
Merge pull request #26582 from Craig-Spencer-12/manpages
manpages: adds example for podman system renumber
2025-07-07 18:17:30 +00:00
Craig Spencer 2b4b4c5b06 manpages: adds example for podman system renumber
Signed-off-by: Craig Spencer <craig.spencer812@gmail.com>
2025-07-07 13:58:56 -04:00
openshift-merge-bot[bot] d5a3878b69
Merge pull request #26553 from l0rd/wsl-utf8
Enforce WSL UTF-8 encoded output
2025-07-07 17:52:48 +00:00
Matt Heon b10beb5395 Add basic locking to Libartifact
Lock access to and modification of the index.json file, to ensure
concurrent addition/removal does not result in lost state. Use a
standard c/storage lockfile, making use of its r/w locking
ability to support concurrent access, only serializing writes.

This is not a very efficient locking scheme around artifact
removal and - especially - addition. I view this as the first
step, establishing any sort of mutual exclusion to prevent state
corruption. Step 2 is to adapt the staged removal work being
done to make image removal require only minimal use of locks,
ensuring it works with artifact addition. This staged addition
means we won't have to hold the lock for the full artifact pull.

Signed-off-by: Matt Heon <mheon@redhat.com>
2025-07-07 13:50:00 -04:00
openshift-merge-bot[bot] 462df8f894
Merge pull request #26573 from imphil/checkpoint-docs-archive
Fix documentation around checkpoints
2025-07-07 10:14:01 +00:00
Philipp Wagner c5c6e44d7d Fix documentation around checkpoints
Checkpoint archives can now be zstd compressed, and are so by default.
Update the documentation to match.

Signed-off-by: Philipp Wagner <phw@ibm.com>
2025-07-06 17:16:29 +02:00
openshift-merge-bot[bot] c8272b23a5
Merge pull request #26552 from AgentEpsilon/quadlet-service-unsupported-keys
Quadlet - Error when units define User, Group, or DynamicUser in Serv…
2025-07-04 14:56:04 +00:00
openshift-merge-bot[bot] fe3e83faa7
Merge pull request #26568 from l0rd/debug-WSL
cirrus: setup WSL logging
2025-07-04 14:33:51 +00:00
Mario Loriedo 4410fcb394 cirrus: setup WSL logging
To debug some of the WSL issues we are seeing try to setup logging,
the script parts are taken from the offical logging script[1].

[1] https://raw.githubusercontent.com/microsoft/WSL/master/diagnostics/collect-wsl-logs.ps1

Signed-off-by: Mario Loriedo <mario.loriedo@gmail.com>
2025-07-04 14:28:58 +02:00
openshift-merge-bot[bot] 00c431c3ca
Merge pull request #26238 from ArthurWuTW/26102
tmpfs: Add support for noatime mount option
2025-07-04 10:55:02 +00:00
openshift-merge-bot[bot] 98c271985d
Merge pull request #26570 from containers/renovate/common-image-and-storage-deps
fix(deps): update github.com/containers/image/v5 digest to 3532547
2025-07-04 10:10:57 +00:00
openshift-merge-bot[bot] 293a2ed3e7
Merge pull request #26564 from mheon/fix_rhel_96776
Fix `podman inspect` to correctly handle log_size_max
2025-07-04 09:45:33 +00:00
renovate[bot] 99e719aec8
fix(deps): update github.com/containers/image/v5 digest to 3532547
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-07-04 02:53:24 +00:00
Matt Heon 13816eb86f Fix `podman inspect` to correctly handle log_size_max
When generating Conmon's command line, we read containers.conf to
get log_size_max and used it if the container didn't override it.
However, `podman inspect` only reads from the container's own
config, and ignores containers.conf. Unify the way we determine
maximum log size with a single function and use it for both
inspect and containers.conf, and add a test for this behavior.

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

Signed-off-by: Matt Heon <mheon@redhat.com>
2025-07-03 16:04:48 -04:00
Evan Miller 31b4efcaec warn instead of error, lift logic to main.go
Signed-off-by: Evan Miller <miller.evan815@gmail.com>
2025-07-02 18:23:00 -07:00
Mario Loriedo 68e7136536 Enforce wsl.exe UTF-8 encoded output
Currently WSL uses UTF-16 encoded output by default but is planning
to use UTF-8.

See https://github.com/containers/podman/issues/26527

To get ready for the change we are enforcing UTF-8 encoded output by
setting the environment variable `WSL_UTF8=1` and by updating the
code that transfomed wsl output from UTF-16 to UTF-8.

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

Signed-off-by: Mario Loriedo <mario.loriedo@gmail.com>
2025-07-02 20:18:52 +00:00
Mario Loriedo 9fbe2fffe9 WSL commands execution refactoring
Introduced a new function to encapsulate the code to execute WSL
commands.

Signed-off-by: Mario Loriedo <mario.loriedo@gmail.com>
2025-07-02 20:18:52 +00:00
openshift-merge-bot[bot] 8234879708
Merge pull request #26559 from zeha/patch-1
Clarify meaning of --syslog
2025-07-02 17:50:26 +00:00
Chris Hofstaedtler 0f403ac43e
Clarify meaning of --syslog
Given container logs end up in syslog by default, somewhat-clarify that `--syslog` is about podman logs, not container logs.

Signed-off-by: Chris Hofstaedtler <zeha@users.noreply.github.com>
2025-07-02 18:32:52 +02:00
openshift-merge-bot[bot] 2a6f190e8f
Merge pull request #26540 from cevich/add_release_test
Add conditional release-checking system test
2025-07-02 12:34:47 +00:00
openshift-merge-bot[bot] cb2de88d13
Merge pull request #26551 from containers/renovate/common-image-and-storage-deps
fix(deps): update common, image, and storage deps
2025-07-02 11:58:05 +00:00
Evan Miller 4b1f7bcb9a Quadlet - Error when units define User, Group, or DynamicUser in Service group
Fixes: #26543

Signed-off-by: Evan Miller <miller.evan815@gmail.com>
2025-07-02 00:34:46 -07:00
renovate[bot] 5391721aa3
fix(deps): update common, image, and storage deps
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-07-02 03:28:11 +00:00
openshift-merge-bot[bot] 5d48c0b299
Merge pull request #26541 from Luap99/grpcnotrace
add grpcnotrace build tag to reduce binary size
2025-07-01 19:27:55 +00:00
openshift-merge-bot[bot] 72393c1c53
Merge pull request #26522 from ygalblum/quadlet-pod-service-environment
Quadlet - Do not override existing Environment in Service group for Pod units
2025-07-01 19:25:06 +00:00
openshift-merge-bot[bot] 313c48872f
Merge pull request #26537 from Luap99/update-CI-img
update CI images 2025-06-27
2025-07-01 19:22:15 +00:00
openshift-merge-bot[bot] c9f6feb6d5
Merge pull request #26545 from containers/renovate/github.com-shirou-gopsutil-v4-4.x
fix(deps): update module github.com/shirou/gopsutil/v4 to v4.25.6
2025-07-01 16:26:26 +00:00
openshift-merge-bot[bot] 6355a15082
Merge pull request #25922 from jakecorrenti/krunkit-cmdline
machine: enable nested virt on libkrun by default
2025-07-01 13:39:19 +00:00
renovate[bot] 10a5f9715b
fix(deps): update module github.com/shirou/gopsutil/v4 to v4.25.6
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-07-01 07:13:01 +00:00
Paul Holzinger d8599658ff
Makefile: add Makefile to sources
During my binary size reduce experiments I often switch build tags
around but make binaries does not recompile in these cases.
It is annoying to always do touch cmd/podman/main.go so let's add it to
the SOURCES instead so the Makefile will recompile on changes.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2025-06-30 19:39:45 +02:00
Paul Holzinger 145fb74dbf
rpm: add grpcnotrace build tag
Like done in the Makefile.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2025-06-30 19:39:45 +02:00
Paul Holzinger 3d453572a9
Makefile: add grpcnotrace build tag
The build tag was added to remove the "golang.org/x/net/trace"
dependency[1]. So let's use that.
With that we reoduce the binary size by 432KB.

[1] https://github.com/grpc/grpc-go/pull/6954

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2025-06-30 19:22:08 +02:00
Chris Evich 62bfeb5d88
Add conditional release-checking system test
Unfortunately on a number of occasions, Podman has been released
officially with a `-dev` suffix in the version number.  Assist in
catching this mistake at release time by the addition of a simple
conditional test.  Note that it must be positively enabled by a
magic env. var. before executing the system tests.

Also (thanks to @lsm5) update the TMT test to trigger the new
condition for future Fedora releases.

Signed-off-by: Chris Evich <cevich@redhat.com>
2025-06-30 11:28:32 -04:00
openshift-merge-bot[bot] 87d88c3b09
Merge pull request #26432 from stefwalter/dont-html-escape-json
api: Don't HTML escape application/json responses
2025-06-30 14:47:55 +00:00
openshift-merge-bot[bot] 43b74b1754
Merge pull request #26322 from NotSoFancyName/issue-26247
quadlet: handle generate environment params that inherit from host
2025-06-30 11:44:33 +00:00
Stef Walter fed198eaf9 api: Don't HTML escape application/json responses
An HTTP response with Content-Type application/json does not need
to be HTML escaped. Doing this causes encoding issues in the Podman
REST API output as seen in the issue:

Fixes #17769

Remove the HTML escaping from Content-Type: application/json responses.

Signed-off-by: Stef Walter <stef@thewalter.net>
Co-Authored-By: Claude <noreply@anthropic.com>
2025-06-30 12:54:19 +02:00
openshift-merge-bot[bot] 2a399c5c90
Merge pull request #26532 from containers/renovate/golangci-golangci-lint-2.x
chore(deps): update dependency golangci/golangci-lint to v2.2.1
2025-06-30 10:40:42 +00:00
openshift-merge-bot[bot] 2673ca264b
Merge pull request #26525 from Luap99/vendor
vendor: update docker v28.3.0 and c/{common,image,storage} to main
2025-06-30 10:26:55 +00:00
Paul Holzinger ffbb0ed7b0
update CI images 2025-06-27
from https://github.com/containers/automation_images/pull/408

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2025-06-30 12:05:56 +02:00
renovate[bot] 92a6298729
chore(deps): update dependency golangci/golangci-lint to v2.2.1
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-06-30 09:46:18 +00:00
openshift-merge-bot[bot] 7321c16752
Merge pull request #26508 from actionmancan/update-neil-smith-github-username
Update Neil Smith's GitHub username in MAINTAINERS.md
2025-06-29 22:26:47 +00:00
Paul Holzinger 38ed6c6589
vendor: update c/{common,image,storage} to main
Mainly to pull in the rekor removal from c/image which removes a bunch
of dependencies.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2025-06-27 16:35:40 +02:00
Paul Holzinger 5786d5f846
fix new lint errors from the docker update
Some new deprecated fields, we still have to set them since clients
might still use them.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2025-06-27 16:35:40 +02:00
Ygal Blum f1a1948b23 Quadlet - Do not override existing Environment in Service group for Pod units
Fixes: #26521

Signed-off-by: Ygal Blum <ygal.blum@gmail.com>
2025-06-27 09:56:43 -04:00
Paul Holzinger cf87278e66
vendor: update docker to v28.3.0
Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2025-06-27 15:46:38 +02:00
openshift-merge-bot[bot] 1a3b35673d
Merge pull request #26461 from Luap99/deadcode
remove deadcode
2025-06-26 19:36:02 +00:00
openshift-merge-bot[bot] 3000b1e239
Merge pull request #26512 from Luap99/machine-tls-cert
pkg/machine/e2e: add CVE-2025-6032 regression test
2025-06-26 17:40:10 +00:00
Paul Holzinger 570fbf0078
pkg/domain/infra/tunnel: ignore error from removeContainer()
All callers ignore the error anyways so no reason to return it as the
function itself already logs it.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2025-06-26 19:37:17 +02:00
Paul Holzinger 247c1dfb53
libpod: remove deadcode
Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2025-06-26 19:37:16 +02:00
Paul Holzinger 09caf60687
remove test/framework/framework.go
Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2025-06-26 19:37:16 +02:00
Paul Holzinger d2291d7f1a
pkg/util: remove deadcode
Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2025-06-26 19:37:16 +02:00
Paul Holzinger 552e38ec6d
remove pkg/util/camelcase
It is not used here.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2025-06-26 19:37:16 +02:00
Paul Holzinger 6893ecc469
pkg/rootless: remove deadcode
Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2025-06-26 19:37:16 +02:00
Paul Holzinger 880808dfb9
pkg/parallel: remove deadcode
Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2025-06-26 19:37:15 +02:00
Paul Holzinger 6bfd28bc6f
pkg/namespaces: remove deadcode
These types are not used.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2025-06-26 19:37:15 +02:00
Paul Holzinger f3c82a917c
pkg/machine: remove deadcode
Yes this is a lot.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2025-06-26 19:37:15 +02:00
Paul Holzinger d919a3666b
pkg/libartifact: remove deadcode
Can always added back if it is really needed at some point.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2025-06-26 19:37:15 +02:00
Paul Holzinger 6da360a223
pkg/fileserver: remove deadcode
We don't need a stub implementation as this code should never end up
being imported on non windows platforms.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2025-06-26 19:37:15 +02:00
Paul Holzinger fb5cbb9b1f
pkg/farm: remove deadcode
Note sure what these are supposed to be used for but they are unused.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2025-06-26 19:37:14 +02:00
Paul Holzinger 1a0917de35
pkg/errorhandling: remove deadcode
Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2025-06-26 19:37:14 +02:00
Paul Holzinger 4d5e0a647c
podman images --sort use ChoiceValue flag
Make use of our custom ChoiceValue flag type instead of using yet
another type. With that we can remove the StringSet type.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2025-06-26 19:37:14 +02:00
Paul Holzinger a92e685c0b
pkg/domain: remove deadcode
Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2025-06-26 19:37:14 +02:00
Paul Holzinger fc21bcd7d1
pkg/bindings: remove deadcode
Only one function, there are more public bindings that call a legit
server endpoint but are unused by podman-remote. As external users might
need/want them they should stay.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2025-06-26 19:37:13 +02:00
Paul Holzinger 9d328d8782
pkg/api: remove deadcode
One might think Close() should be called but we are already using
Shutdown() which is the graceful way to stop the server so we don't
actually need Close().

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2025-06-26 19:37:13 +02:00
Paul Holzinger 75bad52af5
remove unused ShouldRestart() code
Deadcode should that the ShouldRestart() API endpoint was never wired
into the router so the endpoint did not existed and the bindings called
a non existing endpoint which returnd 404 which the binding code
assumed means no restart.

As such remove all this code as it didn't do anything useful. And IMO
exposing a shouldrestart API always feeled wrong to me. The client
should not have to deal with this.

This commit does not change the behavior but it also does not make an
attempt to fix the broken restart handling with the rmeote client. Given
we do not seem to have any user reports about this it seems it is not
used.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2025-06-26 19:37:13 +02:00
Paul Holzinger 1d3089ea82
cmd/podman: remove deadcode
These functions are not used.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2025-06-26 19:37:13 +02:00
Paul Holzinger 054036f073
podman images --sort autocomplete options
The functionwas added but never wired into the cli option so there never
where shell completions for this.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2025-06-26 19:37:12 +02:00
G A Neil Smith c99d237349 Update Neil Smith's GitHub username in MAINTAINERS.md
- Changed GitHub username from 'Neil-Smith' to 'actionmancan'
- Maintains Neil Smith's role as Community Manager

Signed-off-by: G A Neil Smith <nesmith@redhat.com>
2025-06-26 12:39:44 -04:00
openshift-merge-bot[bot] 494287518b
Merge pull request #26467 from ygalblum/secret-create-ignore
Secret create - add ignore option to allow noop
2025-06-26 15:25:52 +00:00
Jake Correnti 2ef0148b8a
machine: enable nested virt on libkrun by default
With the recent release of krunkit 0.2.0, a CLI option was added to
enable nested virtualization on macOS hosts with an M3 or higher. Enable
this by default. If the host does not support this feature, krunkit will
ignore the argument and continue starting the VM.

Signed-off-by: Jake Correnti <jakecorrenti+github@proton.me>
2025-06-26 09:53:06 -04:00
openshift-merge-bot[bot] 8761b67ca5
Merge pull request #26513 from Luap99/dns-flake
test/e2e: fix podman run check dns flake
2025-06-26 13:09:05 +00:00
openshift-merge-bot[bot] 683e9b2c94
Merge pull request #26434 from mheon/import_export
Add remote support for `podman volume import` and `podman volume export`
2025-06-25 19:48:14 +00:00
Paul Holzinger e00dfa606a
pkg/machine/e2e: add CVE-2025-6032 regression test
Setup a local web server both for HTTP and HTTPS and make sure the
client rejects the connection and does not try to pull the image.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2025-06-25 19:27:45 +02:00
openshift-merge-bot[bot] ac5b9b03ff
Merge pull request #26511 from slp/krunkit-0.2.2
Bump bundled krunkit from 0.2.1 to 0.2.2
2025-06-25 15:28:24 +00:00
Paul Holzinger b5783ae1fb
test/e2e: fix podman run check dns flake
For unknown reasons systemd-resolved sometimes responds with NXDOMAIN
instead REFUSED which it seems to use by default for a local name
without domain part. So the fact that this works at all right now is
super weird.

In any case we just want to make sure the name did not get resolved so
allow both here to fix the flake.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2025-06-25 16:58:10 +02:00
Sergio Lopez b099a93580
Bump bundled krunkit from 0.2.1 to 0.2.2
Bump bundled krunkit to 0.2.2. This bundle also includes libkrun
1.14.0, allowing us to enable nested virt on M3 and M4 systems by
default.

Signed-off-by: Sergio Lopez <slp@redhat.com>
2025-06-25 13:09:29 +02:00
openshift-merge-bot[bot] 7780e28b45
Merge pull request #26491 from ArthurWuTW/25389
Pod YAML: Add support for `lifecycle.stopSignal`
2025-06-24 19:44:30 +00:00
Ygal Blum bfc327a08e Secret create - add ignore option to allow noop
Signed-off-by: Ygal Blum <ygal.blum@gmail.com>
2025-06-24 15:43:38 -04:00
openshift-merge-bot[bot] 1f1618fcb0
Merge pull request #26478 from ygalblum/pull-with-policy
Podman pull - add policy flag
2025-06-24 18:54:26 +00:00
openshift-merge-bot[bot] 844ed8296d
Merge pull request #26485 from gumimin/update-latest
cmd/podman: add --latest option to update #26380
2025-06-24 18:15:40 +00:00
openshift-merge-bot[bot] eece0a1204
Merge pull request #26500 from giuseppe/docs-fix-chown-documentation
docs: document when a volume is chowned
2025-06-24 14:07:22 +00:00
Paul Holzinger 230bb355d4
Merge commit from fork
machine init: fix tls check
2025-06-24 15:49:06 +02:00
Hayato Kihara f21dacc4fb cmd/podman: add --latest option to update #26380
Allow users to target the most recently created container with
`podman update --latest` (short `-l`). The same option already exists
on many other commands, so this brings update in line with the rest of
the CLI and saves users from typing or looking up the newest container.

Fixes: #26380

Signed-off-by: Hayato Kihara <kai.21banana@gmail.com>
2025-06-24 22:06:26 +09:00
Giuseppe Scrivano f266034d56
docs: document when a volume is chowned
add documentation to clarify when a volume is chowned.

Closes: https://github.com/containers/podman/issues/26474

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2025-06-24 12:10:06 +02:00
openshift-merge-bot[bot] 5cbd47b45c
Merge pull request #26341 from timcoding1988/update_image_sfx
1. update image_fix 2. skip checkpoint_tests duo to rawhide issue
2025-06-23 19:27:08 +00:00
openshift-merge-bot[bot] 719ea83555
Merge pull request #26454 from TomSweeneyRedHat/dev/tsweeney/tweaked_Governance
[CI:DOCS] Tweak Governance slightly
2025-06-23 18:59:27 +00:00
Matt Heon 98876454cb Refactor `volume import` to support the remote client
As with `volume export`, this was coded up exclusively in cmd/
instead of in libpod. Move it into Libpod, add a REST endpoint,
add bindings, and now everything talks using the ContainerEngine
wiring.

Also similar to `volume export` this also makes things work much
better with volumes that require mounting - we can now guarantee
they're actually mounted, instead of just hoping.

Includes some refactoring of `volume export` as well, to simplify
its implementation and ensure both Import and Export work with
readers/writers, as opposed to just files.

Fixes #26409

Signed-off-by: Matt Heon <mheon@redhat.com>
2025-06-23 13:42:22 -04:00
Tim Zhou 67fa077a5c update image_fix -> automation_images#407
skip test duo to rawhide know issues

Signed-off-by: Tim Zhou <tizhou@redhat.com>
2025-06-23 13:24:58 -04:00
Ygal Blum 5ab4328318 Podman pull - add policy flag
Signed-off-by: Ygal Blum <ygal.blum@gmail.com>
2025-06-23 11:28:39 -04:00
openshift-merge-bot[bot] 72e8c82c37
Merge pull request #26490 from Luap99/pasta-testfix
test/e2e: fix "with unsafe hostPath subpaths" test
2025-06-23 15:06:37 +00:00
openshift-merge-bot[bot] b433eb5e6d
Merge pull request #26471 from Luap99/refresh-panic
fix panic on state refresh
2025-06-23 15:03:43 +00:00
openshift-merge-bot[bot] 14a99b3d65
Merge pull request #26476 from sushmitha37/add-machine-start-examples
update podman-machine-start with examples for --no-info and --quiet
2025-06-23 13:14:19 +00:00
Arthur Wu 17601aa913 Pod YAML: Add support for `lifecycle.stopSignal`
The field allows users to specify a custom stop signal (e.g., SIGUSR1) per container.
If defined, it overrides the default stop signal (SIGTERM) or that defined in the image metadata.

Fixes: #25389

Signed-off-by: Arthur Wu <lion811004@gmail.com>
2025-06-23 08:23:31 -04:00
Paul Holzinger 726b506acc
machine init: fix tls check
Ensure we verify the TLS connection when pulling the OCI image.

Fixes: CVE-2025-6032

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2025-06-23 14:12:55 +02:00
sushmitha37 ca1c4388b3
update podman-machine-start with examples for --no-info and --quiet
Fixes: #26375

Signed-off-by: sushmitha37 <sushu52581@gmail.com>
2025-06-23 16:10:26 +05:30
Paul Holzinger 01fb3aaae4
test/e2e: fix "with unsafe hostPath subpaths" test
A recent pasta update changed the selinux rules and we now run pasta
under pasta_t and no longer the container_runtime_t type. The pasta type
has much stricter type rules on what the file we hand it must be
labelled. This test tries to mount the runroot which gets relabeled with
the container_file_t type but that means pasta can no longer access its
pid file we give it. To fix this test here simply mount a subdir.

see #26473

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2025-06-23 11:54:02 +02:00
openshift-merge-bot[bot] 7808625785
Merge pull request #26472 from Luap99/quadlet-nologrus
quadlet: remove indirect logrus import
2025-06-19 19:45:24 +00:00
openshift-merge-bot[bot] 617cdc4b36
Merge pull request #26466 from nbspsemicolon/quadlet-pod-exitpolicy
pkg/systemd: expose [Pod] ExitPolicy key for pod create --exit-policy
2025-06-19 19:01:13 +00:00
Paul Holzinger 964069326d
quadlet: remove indirect logrus import
Reduces quadlet binary size about 170kb.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2025-06-19 18:47:40 +02:00
openshift-merge-bot[bot] 5c89b64441
Merge pull request #26463 from shu-kitamura/example_generate-spec
docs: add three examples to podman-generate-spec man page
2025-06-19 11:59:16 +00:00
shu-kitamura fa67681601 docs: add three examples to podman-generate-spec man page
This patch adds three examples to the podman-generate-spec.1 man page:

- Example of executed without any options
- Example of executed with the `--compact` option
- Example of executed with the `--filename` option

Fixes: #26377

Signed-off-by: shu-kitamura <shusei3316@yahoo.co.jp>
2025-06-19 20:17:08 +09:00
Paul Holzinger e4c810a8f1
fix panic on state refresh
In order to use parallel.Enqueue() it is required to call
parallel.SetMaxThreads() first. However in our main call we have been
doing this after we setup the initial runtime so just move this up.
And while at it move up the cpu and memory profile setup as well so we
can capture the earlier parts as well.

This was most likely introduced by commit 46d874aa52 ("Refactor graph
traversal & use for pod stop") which started using parallel.Enqueue() in
removePod() which then can get called from refresh() when a container
has autoremoval configured.

I tried many hard resets in VMs to reproduce but was unable to do so.
I always got "retrieving temporary directory for container xxx: no such
container" erros instead and it failed to autoremove but no panics.
Besides that many times c/storage was corrupted which made the image I
used unusable and it had to be deleted which is concerning in itself.

Fixes #26469

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2025-06-19 12:46:23 +02:00
nbspsemicolon 5989370c39
pkg/systemd: expose [Pod] ExitPolicy key for pod create --exit-policy
Add ExitPolicy key to pod quadlets with logic to default to stop.

Docs updated with clarifcation on default value and usage example.

Simple assert added to bats to verify default constraint exists.

Changed argument order in ginkgo basic pod unit test

Signed-off-by: Neil Bailey <nbsp@nbailey.net>
2025-06-18 15:08:31 -04:00
openshift-merge-bot[bot] dfd205fa24
Merge pull request #26459 from giuseppe/add-volume-uid-gid
volumes: add new --uid and --gid option
2025-06-18 14:49:51 +00:00
Giuseppe Scrivano 1f9893817b
volumes: add new --uid and --gid option
they allow to override the owner of the volume.  Differently from
-o=uid= and -o=gid= they are not passed down to the mount operation.

Closes: https://issues.redhat.com/browse/RHEL-76452

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2025-06-18 15:33:09 +02:00
openshift-merge-bot[bot] 70435a0fe8
Merge pull request #26460 from shu-kitamura/example_secret-rm-ingnore
docs: add an example to podman-secret-rm man page
2025-06-18 13:08:58 +00:00
shu-kitamura d79d596bce docs: add an example to podman-secret-rm man page
This patch adds an example of using the `--ingore` option to the podman-secret-rm.1 man page.

Fixes: #26361

Signed-off-by: shu-kitamura <shusei3316@yahoo.co.jp>
2025-06-18 21:10:17 +09:00
openshift-merge-bot[bot] 9a0a13d2a2
Merge pull request #26452 from Luap99/cleanup
repo cleanup: remove unused files
2025-06-18 11:34:34 +00:00
openshift-merge-bot[bot] 8f9f2ac104
Merge pull request #26457 from containers/renovate/pytest-8.x
chore(deps): update dependency pytest to v8.4.1
2025-06-18 10:06:32 +00:00
renovate[bot] a218dfa2fd
chore(deps): update dependency pytest to v8.4.1
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-06-18 08:48:28 +00:00
tomsweeneyredhat d7f980b719 [CI:DOCS] Tweak Governace slightly
When I worked up changes to Buildah's Governance, I found
that Podman's version was missing a few links, and there were
a few minor grammatical tweaks needed.

This addresses those.

For reference, Buildah's Governance Update PR: https://github.com/containers/buildah/pull/6124

Signed-off-by: tomsweeneyredhat <tsweeney@redhat.com>
2025-06-17 16:21:24 -04:00
Paul Holzinger a93b63c4ad
remove .github/workflows/pr-title.yml
This is not used and AFAICT has not trigger any actions for a very long
time I guess:
https://github.com/containers/podman/actions/workflows/pr-title.yml

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2025-06-17 18:43:24 +02:00
Paul Holzinger 0439167943
remove hack/install_catatonit.sh
This was not updated to the latest versions and CI and basically any
user should get in from their distro repos.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2025-06-17 18:35:28 +02:00
Paul Holzinger bf7c9a1536
Makefile: remove some old files from clean target
These have not been build or used for a very long time so they can be
dropped IMO.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2025-06-17 18:31:10 +02:00
Paul Holzinger 8cfe7bb003
remove cni/
We no longer support CNI upstream and this default config file has not
been nedded for years since we started to generate our own default file
internally. And since 4.0.0 the default config file only exist in the
bianry and not on disk so this should not be installed by anyone even if
they still happen to use CNI.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2025-06-17 18:22:01 +02:00
Paul Holzinger 6623ab8d17
remove pkg/timetype
This package is no longer used. It was moved to c/common in
659c178c2c

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2025-06-17 18:16:24 +02:00
Paul Holzinger 5d88999447
remove contrib/modules-load.d
We used this to load the iptables module, since f41 we use nftables by
default which does not need this at all so drop the module load file.

If some distros default still to the legacy iptables they can manually
add the moduled load file back.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2025-06-17 18:11:06 +02:00
Paul Holzinger 241f2d7928
remove contrib/snapcraft
AFAICT we never published a snap podman package and this here has never
been updated so remove it.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2025-06-17 18:04:16 +02:00
Paul Holzinger 4582c3413f
remove contrib/script/size.sh
This script does not bring accurate results. For nice dependency
analysis I can recommend goda:

https://github.com/loov/goda

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2025-06-17 18:01:51 +02:00
Paul Holzinger 605b1f7386
remove contrib/remote/containers.conf
The config file is installed in the remote zip as an example but the
content in there is not being updated and no longer really the way to do
things. With podman 5.0 we have a proper system connection file and
people in general should just use the system connection commands.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2025-06-17 17:59:06 +02:00
Paul Holzinger e9aad3d40d
remove contrib/dependabot-dance
This script was used when dependabot could not deal with vendoring, we
long since moved to renovate which handles it fine with manual steps so
remove this script.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2025-06-17 17:55:35 +02:00
Paul Holzinger 14b1ee5837
remove contrib/dependencies.txt
This list is not up to date, a full list can be found in the
rpm/podman.spec file.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2025-06-17 17:54:52 +02:00
Paul Holzinger febb667865
remove contrib/containers-common
It doesn't seem to be used anywhere and is not maintained. An up to date
specfile is found in the c/common repo.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2025-06-17 17:51:48 +02:00
openshift-merge-bot[bot] 20d5b78a79
Merge pull request #26442 from shu-kitamura/example_network-rm-time
docs: add an example to podman-network-rm man page
2025-06-17 13:32:02 +00:00
openshift-merge-bot[bot] 474740fe2e
Merge pull request #26427 from b3n4kh/issue-26349-force-flag-docs
Issue 26349 force flag docs
2025-06-17 11:13:13 +00:00
shu-kitamura 4ec7d35cbb Removed the 'Deleted: ' prefix from each example
Signed-off-by: shu-kitamura <shusei3316@yahoo.co.jp>
2025-06-17 19:00:44 +09:00
Benjamin Akhras 6b996445bc
add more exmples applying current style for each page
Signed-off-by: Benjamin Akhras <b@akhras.at>
2025-06-16 19:52:36 +02:00
openshift-merge-bot[bot] f235d47e1d
Merge pull request #26308 from kolyshkin/blkdev
podman-update: fix block device handling
2025-06-16 14:46:05 +00:00
shu-kitamura 15d8b5b2fb docs: add an example to podman-network-rm man page
This patch adds an example of using the --time option to the podman-network-rm.1 man page.

Fixes: #26373
Signed-off-by: shu-kitamura <shusei3316@yahoo.co.jp>
2025-06-16 23:31:59 +09:00
openshift-merge-bot[bot] 547de9296a
Merge pull request #26407 from shu-kitamura/example_mac-address
Manpages: podman network connect missing example with --mac-address option
2025-06-16 14:02:57 +00:00
openshift-merge-bot[bot] 233cae8f61
Merge pull request #26430 from Luap99/artifact-mount-name
artifact mount: improve single file behavior and add name option to specify a custom container name
2025-06-16 13:51:43 +00:00
openshift-merge-bot[bot] 38b52e380c
Merge pull request #26435 from ArthurWuTW/26359
docs: add examples to podman-system-migrate man page
2025-06-16 09:28:22 +00:00
openshift-merge-bot[bot] c294f82e46
Merge pull request #26436 from ninja-quokka/add_ST1005
[CI] Correct ST1005 staticcheck lint rule
2025-06-16 09:16:48 +00:00
Lewis Roy 139d3fc82b
[CI] Correct ST1005 staticcheck lint rule
This rule was incorrectly disabled in #26400

You can see here [1] adding "-" disables a rule and ST1005 is enabled by
default.

[1] https://golangci-lint.run/usage/linters/#staticcheck

Signed-off-by: Lewis Roy <lewis@redhat.com>
2025-06-15 21:50:56 +10:00
Arthur Wu 6510d81f69 docs: add examples to podman-system-migrate man page
This patch adds two usage examples to the podman-system-migrate.1 man page:
- Normal invocation, with no expected output
- Migration to a new OCI runtime (e.g., from crun to runc)

Fixes: #26359
Signed-off-by: Arthur Wu <lion811004@gmail.com>
2025-06-15 01:48:21 -04:00
Matt Heon 63bf454d66 Refactor `podman export` to work with the remote client
Previously, our approach was to inspect the volume, grab its
mountpoint, and tar that up, all in the CLI code. There's no
reason why that has to be in the CLI - if we move it into
Libpod, and add a REST endpoint to stream the tar, we can
enable it for the remote client as well.

As a bonus, previously, we could not properly handle volumes that
needed to be mounted. Now, we can mount the volume if necessary,
and as such export works with more types of volumes, including
volume drivers.

Signed-off-by: Matt Heon <mheon@redhat.com>
2025-06-14 07:42:38 -04:00
Paul Holzinger 0ab8a3c576
artifact mount: add new name option to specify filename
An artifact without the title annoation just gets the digest as name
which is less than ideal. While it is a decent default to avoid
conflicts users would like to configure the name.

With the name=abc option we will call the file abc in case of a signle
artifact and otherwise we use abc-x where x is the layer index starting
at 0 to avoid conflicts.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2025-06-14 12:25:21 +02:00
shu-kitamura c647a7200e Fixes: #26374 add example network connect with mac address
Signed-off-by: shu-kitamura <shusei3316@yahoo.co.jp>
2025-06-14 16:45:41 +09:00
Paul Holzinger 21f34601eb
artifact mount: improve single blob behavior
If the artifact has a single blob then use the dst path directly as
mount in case it does not exist.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2025-06-14 09:16:06 +02:00
openshift-merge-bot[bot] 17a386a19d
Merge pull request #26408 from berrange/remove-header
docs: remove bogus markdown heading in podman-ps
2025-06-14 06:13:42 +00:00
Daniel P. Berrangé 6368b248f0 docs: remove bogus markdown heading in podman-ps
The prior commit that expanded the examples added an out of
place heading to the manpage for podman-ps, which looks like
a probable AI tool hallucination.

Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2025-06-13 16:46:58 +01:00
openshift-merge-bot[bot] b74a7177fa
Merge pull request #26403 from jobselko/fix_26358
Update podman system prune doc
2025-06-13 10:03:13 +00:00
openshift-merge-bot[bot] 282bcd878a
Merge pull request #26402 from mareklibra/26348.latest
fix 26348: add container diff --latest doc
2025-06-13 10:00:30 +00:00
openshift-merge-bot[bot] 60859b07b7
Merge pull request #26201 from lstocchi/wsl
fix wsl install workflow on machine init command
2025-06-13 09:43:50 +00:00
Jitka Obselkova fd325e33fd
Update podman system prune doc
Fixes #26358

Signed-off-by: Jitka Obselkova <jobselko@redhat.com>
2025-06-13 11:36:05 +02:00
openshift-merge-bot[bot] 2708735b1d
Merge pull request #26393 from devop-mmcgrath/fix-stats-manpage-format
Fix stats manpage format - fix for #26367
2025-06-13 09:35:34 +00:00
Marek Libra bd2c838b0e
fix 26348: add container diff --latest doc
Signed-off-by: Marek Libra <marek.libra@gmail.com>
2025-06-13 11:28:11 +02:00
openshift-merge-bot[bot] f6df4c259e
Merge pull request #26398 from jnahorny/fix_26355
Fix 26355: move 'Examples' section down in the podman-volume-create
2025-06-13 09:27:17 +00:00
openshift-merge-bot[bot] 6e87eefc77
Merge pull request #26400 from mareklibra/26108.linterST1005
fix(ci): add ST1005 linter rule
2025-06-13 09:24:34 +00:00
openshift-merge-bot[bot] dbc8b93e0f
Merge pull request #26397 from mheon/fix_26354
Add examples of `--all` flag
2025-06-13 09:21:44 +00:00
Mike McGrath ffa4c124a1 Add missing --pod examples to podman ps manpage
The --pod flag is important for users working with pods but lacked
documentation examples. Added examples showing:
- Basic --pod usage to display pod information
- Using --pod with -a to show all containers and their pods
- Filtering containers by pod name
- Custom formatting with pod-related placeholders

Also: removed trailing whitespace on a few lines

Fixes #26367
Assisted-by: Claude Sonnet 4

Removed trailing whitespace on a few lines

Signed-off-by: Mike McGrath <mmcgrath@fedoraproject.org>

MH: Squashed, force-pushed to reset CI
Signed-off-by: Matt Heon <mheon@redhat.com>
2025-06-13 05:11:21 -04:00
Jarek Górny 93d66542d4 Move 'Examples' section down in the podman-volume-create man page
Fix #26355

Signed-off-by: Jarek Górny <jaroslaw.gorny@gmail.com>
2025-06-13 11:05:06 +02:00
Marek Libra bb571b48c3
fix(ci): add ST1005 linter rule
Enable linter rule ST1005 - Incorrectly formatted error string

Signed-off-by: Marek Libra <marek.libra@gmail.com>
2025-06-13 10:55:48 +02:00
Matt Heon cbba265f29 Add examples of `--all` flag
The following manpages were missing examples of the `--all` flag:
* podman init
* podman pod pause
* podman secret rm
* podman system connection remove
* podman system prune

Added examples of all.

Fixes #26354

Signed-off-by: Matt Heon <mheon@redhat.com>
2025-06-13 04:47:22 -04:00
openshift-merge-bot[bot] f69f92cdf7
Merge pull request #26391 from Phaow/manpages
Manpages: podman machine init add example with --now
2025-06-13 08:01:57 +00:00
Penghao 1a461fe41a Manpages: podman machine init add example with --now
Signed-off-by: Penghao <pewang@redhat.com>
2025-06-13 08:00:01 +02:00
openshift-merge-bot[bot] 98e6d857d1
Merge pull request #26263 from tangentsoft/network-host-doc-warning
Clarified the consequences of --network=host
2025-06-12 16:07:19 +00:00
openshift-merge-bot[bot] 09e2a87508
Merge pull request #26368 from baude/reviewercraig
Add Craig Loewen to Reviewer role
2025-06-12 15:42:32 +00:00
openshift-merge-bot[bot] a2ab16a7d2
Merge pull request #26385 from xstasi/main
Improve documentation for podman-secret-inspect, closes #26362
2025-06-12 15:28:17 +00:00
openshift-merge-bot[bot] 9748554ba0
Merge pull request #26352 from axel7083/fix/net/valid-url
fix: absolute path usage for kube play on Windows
2025-06-12 15:25:25 +00:00
Alessandro Grassi 24e5c00e6e Update docs/source/markdown/podman-secret-inspect.1.md
Co-authored-by: Jan Rodák <hony.com@seznam.cz>
Signed-off-by: Alessandro Grassi <alessandro@aggro.it>
2025-06-12 15:52:31 +02:00
Alessandro Grassi 4a35cf00ec Improve documentation for podman-secret-inspect, closes #26362
Signed-off-by: Alessandro Grassi <alessandro@aggro.it>
2025-06-12 15:51:57 +02:00
openshift-merge-bot[bot] 0825e7d2cc
Merge pull request #26388 from tyll/rmi-no-prune
man pages: Add an example about --no-prune
2025-06-12 13:42:50 +00:00
openshift-merge-bot[bot] c94f5fd318
Merge pull request #26370 from mheon/manpage_fixes
Bunch of trivial manpage fixes
2025-06-12 13:34:09 +00:00
Brent Baude ad7087af56 Add Craig Loewen to Reviewer role
As title suggests, this PR is to add Craig as a reviewer role to the
Podman project.  Craig is an expert in Windows and WSL.  His
collaboration in issues, discussions, and pull requests should be an
asset to the project.

Signed-off-by: Brent Baude <bbaude@redhat.com>
2025-06-12 08:33:57 -05:00
openshift-merge-bot[bot] db70a5c6e8
Merge pull request #26386 from ffmancera/main
Manpages: add podman exec missing example of detach option
2025-06-12 13:31:27 +00:00
openshift-merge-bot[bot] 9541c09620
Merge pull request #26334 from Luap99/sqlite-dynamic-link
dynamically link sqlite
2025-06-12 13:25:54 +00:00
Till Maas ae49463a8f man pages: Add an example about --no-prune
Signed-off-by: Till Maas <opensource@till.name>
2025-06-12 15:13:10 +02:00
Fernando Fernandez Mancera 085082a805 Manpages: add podman exec missing example of detach option
Signed-off-by: Fernando Fernandez Mancera <ffmancera@riseup.net>
2025-06-12 14:43:15 +02:00
axel7083 d680c48eaf fix(cmd): improve ValidURL reliability
fixes https://github.com/containers/podman/issues/26350

Signed-off-by: axel7083 <42176370+axel7083@users.noreply.github.com>
2025-06-12 14:07:16 +02:00
openshift-merge-bot[bot] 1e53cacb08
Merge pull request #26232 from 2004joshua/buildxInspect
podman buildx inspect
2025-06-12 08:02:31 +00:00
Matt Heon d1187be8a3 Bunch of trivial manpage fixes
In a lot of places, `Example` -> `Examples` for consistency

Plus similar trivial fixes

Signed-off-by: Matt Heon <mheon@redhat.com>
2025-06-12 02:22:42 -04:00
openshift-merge-bot[bot] 08657e4d16
Merge pull request #26336 from Luap99/wsl-machine-image
podman machine: pull wsl image from machine-os
2025-06-11 14:20:50 +00:00
openshift-merge-bot[bot] 3c74a44eb7
Merge pull request #26343 from giuseppe/random-fixes
some random fixes
2025-06-11 13:25:42 +00:00
Giuseppe Scrivano 1141ae4a87
libpod: log file doesn't need to be executable
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2025-06-11 13:22:14 +02:00
Giuseppe Scrivano 9922bddb1f
libpod: do not dereference nil pointer
on errors the event pointer is nil.

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2025-06-11 13:22:14 +02:00
Giuseppe Scrivano 54afcdf6b3
libpod: fix file descriptor leak
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2025-06-11 13:22:03 +02:00
openshift-merge-bot[bot] 3d1a943226
Merge pull request #26337 from containers/renovate/go.etcd.io-bbolt-1.x
fix(deps): update module go.etcd.io/bbolt to v1.4.1
2025-06-11 08:38:49 +00:00
Kir Kolyshkin 5838bfef9a podman-update: fix EXAMPLES
Mainly this fixes an issue of using /dev/zero for block device examples.

Also:
 * fix section title;
 * remove separate cgroup v2 and v1 examples, only leaving one;
 * break long lines.

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
2025-06-10 14:25:57 -07:00
Kir Kolyshkin 2221ca9943 test: check podman update errors on non-block devices
This is a test case for an issue fixed by the previous commit.

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
2025-06-10 14:25:53 -07:00
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
Volodymyr Pankin 2b6c477884 quadlet: handle generate environment params that inherit from host
Fixes: #26247

Signed-off-by: Volodymyr Pankin <volopank@gmail.com>
2025-06-10 20:50:13 +02: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
ArthurWuTW 2825521337 tmpfs: Add support for noatime mount option
'noatime' flag disables updates to file access times when files are read. This can reduce unnecessary writes and improve performance, especially in read-heavy workloads. Previously, tmpfs did not recognize the 'noatime' mount option and would return an error.

With this change, tmpfs now properly accepts and handles the 'noatime' option.

Fixes: #26102

Signed-off-by: Arthur Wu <lion811004@gmail.com>
2025-06-06 22:21:45 -04: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
openshift-merge-bot[bot] 4030ee62c8
Merge pull request #26221 from Luap99/resolv
libpod: don't force only network search domains
2025-06-04 08:56:08 +00:00
Lewis Roy 99cfdc04db
feat: Add OCI Artifact support to the Podman REST API
This patch adds a new endpoint to the REST API called "artifacts" with
the following methods:
- Add
- Extract
- Inspect
- List
- Pull
- Push
- Remove

This API will be utilised by the Podman bindings to add OCI Artifact
support to our remote clients.

Jira: https://issues.redhat.com/browse/RUN-2711

Signed-off-by: Lewis Roy <lewis@redhat.com>
2025-06-04 15:49:34 +10:00
openshift-merge-bot[bot] 6a39f37845
Merge pull request #26216 from flouthoc/reuse-excludes
build: reuse `parse.ContainerIgnoreFile` from buildah
2025-06-03 23:59:19 +00:00
flouthoc eadded9154
build: reuse parse.ContainerIgnoreFile from buildah
podman's logic to parse excludes from `--ignorefile` is not consistent
with buildah, use code directly from imagebuilder.

Closes: https://github.com/containers/podman/issues/25746

Signed-off-by: flouthoc <flouthoc.git@gmail.com>
2025-06-03 12:03:06 -07:00
Joshua Arrevillaga 87450b8f8b podman buildx inspect support
Added support for "podman buildx inspect". The goal was to replicate the default output from "docker buildx inspect" as
much as possible but a problem encountered was podman not supporting BuildKit. To replicate the output I resorted to
printing the statements with default values but only changed the driver name to use podman instead of docker. Since
there was no buildkit, gave it the value of "N/A" to depict it's not supported. For Platforms, I resorted to using
the emulated architectures found on your linux system + the host architecture of your local machine or podman server. The
bootstrap flag was also added but is considered a NOP since there is no buildkit container to run before running inspect.
An extra field was added to the HostInfo struct so when you run "podman info" the emulated architectures will show, this
was used so you can grab the information from the podman engine.

Fixes #13014

Signed-off-by: Joshua Arrevillaga <2004jarrevillaga@gmail.com>
2025-06-03 11:07:08 -04:00
openshift-merge-bot[bot] a3e65c7e55
Merge pull request #26256 from containers/renovate/github.com-shirou-gopsutil-v4-4.x
fix(deps): update module github.com/shirou/gopsutil/v4 to v4.25.5
2025-06-03 10:25:51 +00:00
openshift-merge-bot[bot] a9aec98395
Merge pull request #26265 from containers/renovate/pytest-8.x
chore(deps): update dependency pytest to v8.4.0
2025-06-02 21:01:07 +00:00
openshift-merge-bot[bot] 226155e7ef
Merge pull request #26252 from sonnysasaka/fix-error-check
podman system check: Fix error check logic
2025-06-02 18:29:32 +00:00
renovate[bot] 0719acbe7f
chore(deps): update dependency pytest to v8.4.0
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-06-02 18:27:42 +00:00
openshift-merge-bot[bot] 87eeb3cf38
Merge pull request #26264 from Luap99/kube-empty-alias
play kube: never add empty alias
2025-06-02 18:26:49 +00:00
Paul Holzinger 89b8e23385
test/system: check --dns-option behavior
We should fully replace the options, now that we vendored the
libnetwork/resolvconf changes into podman this just works.

Fixes: #22399

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2025-06-02 19:02:13 +02:00
Sonny Sasaka c87a761e05 podman system check: Fix error check logic
Previously there is a minor logic error, which causes podman system
check to do the check twice although there is no repair flag.

Signed-off-by: Sonny Sasaka <sonnysasaka@gmail.com>
2025-06-02 09:58:42 -07:00
Paul Holzinger 75dc508e98
libpod: don't force only network search domains
We like to append the host servers in that case so that we do not only
force dns.podman.

Fixes: #24713
Fixes: https://issues.redhat.com/browse/RHEL-83787

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2025-06-02 18:45:11 +02:00
renovate[bot] 04a1a39a69
fix(deps): update module github.com/shirou/gopsutil/v4 to v4.25.5
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-06-02 16:21:25 +00:00
Paul Holzinger 869fceb0fd
update c/common to latest main
Contains the resolv.conf setup changes.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2025-06-02 18:13:25 +02:00
Paul Holzinger da95bbdd5d
play kube: never add empty alias
Netavark v1.15 added new warnings on some invalid names and that
triggerd a new test failure in podman e2e test.

The "Podman kube play with disabled cgroup" case now complains about an
empty name:
podman [options] kube play /tmp/CI_aM20/podman-e2e-3156601197/subtest-3441376193/p/kube.yaml
[WARN  netavark::network::bridge] invalid network alias "": name is empty, ignoring this name

This is because this test does not set a container name thus the code
was adding an empty string so to fix it check if the name is not empty
first.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2025-06-02 17:58:30 +02:00
openshift-merge-bot[bot] 746cbf12c9
Merge pull request #26248 from mtrmac/ostree
Don't BuildRequires: ostree-devel
2025-06-02 12:50:03 +00:00
openshift-merge-bot[bot] 961807a254
Merge pull request #26253 from containers/renovate/github.com-opencontainers-runtime-tools-digest
fix(deps): update github.com/opencontainers/runtime-tools digest to 0ea5ed0
2025-06-02 12:00:30 +00:00
renovate[bot] b64817de40
fix(deps): update github.com/opencontainers/runtime-tools digest to 0ea5ed0
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-06-01 01:58:59 +00:00
Miloslav Trmač 2c252a7614 Don't BuildRequires: ostree-devel
We are not opting into the ostree backend, and it doesn't
build: https://github.com/containers/image/pull/2821 .
So, stop referencing the dependency.

Should not change behavior.

Signed-off-by: Miloslav Trmač <mitr@redhat.com>
2025-05-31 01:43:49 +02:00
openshift-merge-bot[bot] 27593b9e33
Merge pull request #26225 from Luap99/df-panic
system df --verbose don't crash
2025-05-30 22:04:53 +00:00
openshift-merge-bot[bot] 3b91669cd4
Merge pull request #26235 from mheon/fix_26101
Allow not specifying type with --mount flag
2025-05-30 20:50:20 +00:00
Matthew Heon 3837339e0e Allow not specifying type with --mount flag
Docker does not require `--type` to be passed, defaulting to
`type=volume` in cases where it's not passed. Do the same in our
volume parsing, and add a test to verify this works as expected.

Fixes #26101

Signed-off-by: Matthew Heon <matthew.heon@pm.me>
2025-05-30 14:47:13 -04:00
Matthew Heon 775a85004f Add "dest" as an alias for "destination" in `--mount`
Given I wrote this and I still mess it up on a regular basis, I
cannot be alone in forgetting whether "dst" or "dest" is the
correct short option for "destination". Let's just make both
valid, I don't see a reason not to.

Signed-off-by: Matthew Heon <matthew.heon@pm.me>
2025-05-30 14:47:13 -04:00
openshift-merge-bot[bot] 2f91c5c6c3
Merge pull request #26245 from Luap99/quadlet-docs
docs: quadlet can translate names now
2025-05-30 17:48:50 +00:00
Paul Holzinger f2d941b241
docs: quadlet can translate names now
Remove no longer correct statement that quadlet that does not translate
our own custom unit types

Fixes: e498c652 ("Quadlet - translate dependencies on other quadlet units")
Fixes: #26243

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2025-05-30 18:06:03 +02:00
openshift-merge-bot[bot] 5e4adb661c
Merge pull request #26174 from fpoirotte/kube_cpuset_cgroup
Support --cpuset-cpus and --cpuset-mems in podman kube play
2025-05-30 14:37:57 +00:00
openshift-merge-bot[bot] 48f22340a1
Merge pull request #26242 from lsm5/pre-checkpoint-skip-aarch64-followup
e2e: ref full URL for aarch64 criu precheckpoint issues
2025-05-30 13:27:13 +00:00
Lokesh Mandvekar db53f6240d
e2e: ref full URL for aarch64 criu precheckpoint issues
Followup on #26234.

Signed-off-by: Lokesh Mandvekar <lsm5@fedoraproject.org>
2025-05-30 08:50:55 -04:00
openshift-merge-bot[bot] 398594ea5f
Merge pull request #26237 from p12tic/fix-log-tag-priority
specgen/generate: Fix log tag priority
2025-05-30 12:43:04 +00:00
openshift-merge-bot[bot] 39692c5648
Merge pull request #26230 from jankaluza/26078
Handle "Entrypoint":[] in compat containers/create API.
2025-05-30 10:38:54 +00:00
openshift-merge-bot[bot] 82fcf45103
Merge pull request #26234 from lsm5/pre-checkpoint-skip-aarch64
e2e: skip pre-checkpoint tests on aarch64
2025-05-30 10:16:20 +00:00
Povilas Kanapickas a17f8afbbc specgen/generate: Fix log tag priority
Currently setting log_tag from containers.conf will override any value
set via --log-opt tag=value option. This commit fixes this.

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

Signed-off-by: Povilas Kanapickas <povilas@radix.lt>
2025-05-30 01:37:21 +03:00
Lokesh Mandvekar 5e7c0a66ce
e2e: skip pre-checkpoint tests on aarch64
Per Adrian Reber, the aarch64 kernel doesn't support the soft dirty bit
and support isn't expected anytime soon.

Ref: https://github.com/checkpoint-restore/criu/issues/2676

Signed-off-by: Lokesh Mandvekar <lsm5@fedoraproject.org>
2025-05-29 12:25:37 -04:00
Jan Kaluza 3a981915f0 Handle "Entrypoint":[] in compat containers/create API.
When using `docker compose run --entrypoint ''`, docker sends
`"Entrypoint": []` in the JSON. Podman currently treats that
as `nil` and fallback to default image entrypoint.

This is not what is expected by the user. Instead, it should
not use any entrypoint.

This commit fixes it by properly propagating the `[]` downstream
to libpod.

Fixes: #26078

Signed-off-by: Jan Kaluza <jkaluza@redhat.com>
2025-05-29 08:45:35 +02:00
openshift-merge-bot[bot] 23ded8bcee
Merge pull request #26207 from giuseppe/fix-flake-kmsg
test: fix race conditions in /dev/kmsg tests
2025-05-28 21:14:39 +00:00
Paul Holzinger 415668c802
system df --verbose don't crash
When a container has no image, i.e. using rootfs like our new infra
containers then the Image function crashed trying to show the first 12
image ID chars. If there is no image simply show nothing there.

Fixes: #26224

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2025-05-28 20:50:17 +02:00
openshift-merge-bot[bot] dad0b294d4
Merge pull request #26217 from mheon/fix_26168
Fix SQLite volume lookup queries matching too liberally
2025-05-28 18:42:06 +00:00
openshift-merge-bot[bot] 089547dba2
Merge pull request #26222 from Luap99/vendor
vendor: update c/{buildah,common,image,storage} to main
2025-05-28 18:00:10 +00:00
Matthew Heon b276e7ef21 Fix SQLite volume lookup queries matching too liberally
Specifically, this does two things:

1. Turn on case-sensitive LIKE queries. Technically, this is not
specific to volumes, as it will also affect container and pod
lookups - but there, it only affects IDs. So `podman rm abc123`
will not be the same as `podman rm ABC123` but I don't think
anyone was manually entering uppercase SHA256 hash IDs so it
shouldn't matter.

2. Escape the _ and % characters in volume lookup queries. These
are SQLite wildcards, and meant that `podman volume rm test_1`
would also match `podman volume rm testa2` (or any character in
place of the underscore). This isn't done with pod and container
lookups, but again those just use LIKE for IDs - so technically
`podman volume rm abc_123` probably works and removes containers
with an ID matching that pattern... I don't think that matters
though.

Fixes #26168

Signed-off-by: Matthew Heon <matthew.heon@pm.me>
2025-05-28 13:10:10 -04:00
openshift-merge-bot[bot] a484f78c44
Merge pull request #26209 from jankaluza/26190
Recreate the Rootfs in mountStorage for infra-container.
2025-05-28 14:35:04 +00:00
Paul Holzinger b551939be6
vendor: update c/{buildah,common,image,storage} to main
Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2025-05-28 14:53:37 +02:00
Jan Kaluza e0b08fcfa3 Recreate the Rootfs in mountStorage for infra-container.
After the system reboot, the Rootfs for infra-container can
be removed. This can happen when it is stored on tmpfs.

This commit recreates the infra-container directory which is
used for Rootfs for infra-container before mounting it.

Fixes: #26190

Signed-off-by: Jan Kaluza <jkaluza@redhat.com>
2025-05-27 16:31:44 +02:00
openshift-merge-bot[bot] e98e128012
Merge pull request #26200 from l0rd/win-overlay-vols
Fix overlay volumes on Windows
2025-05-27 14:20:12 +00:00
openshift-merge-bot[bot] fec6e691ad
Merge pull request #26181 from ashley-cui/podmanio
Trigger podman.io version bump from release action
2025-05-27 14:08:06 +00:00
openshift-merge-bot[bot] d667e2fe51
Merge pull request #26202 from Luap99/compat-base-hosts
compat API: respect base_hosts_file containers.conf option
2025-05-27 13:40:23 +00:00
openshift-merge-bot[bot] 4120115c86
Merge pull request #26193 from refi64/container-graph-errors
libpod: Don't exclude running deps from the container graph inputs
2025-05-27 13:15:36 +00:00
Giuseppe Scrivano ca20c42a52
test: fix race conditions in /dev/kmsg tests
The e2e tests for device access involving /dev/kmsg could fail
intermittently.  This was due to a race condition where concurrent
writes to the kernel log buffer by other processes, while the test
was reading from /dev/kmsg, could cause the read to fail with ESPIPE.

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

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2025-05-27 15:12:14 +02:00
Mario Loriedo f25cefcb1b Fix overlay volumes on Windows
The Windows source folder path was not converted in the corresponding
machine folder path when the volume was of type overlay as it does for
other bind mount volumes.

Fix #25988

Signed-off-by: Mario Loriedo <mario.loriedo@gmail.com>
2025-05-27 15:11:36 +02:00
openshift-merge-bot[bot] 10b89050b0
Merge pull request #26204 from containers/renovate/setuptools-80.x
chore(deps): update dependency setuptools to ~=80.9.0
2025-05-27 07:28:45 +00:00
renovate[bot] d5520ded64
chore(deps): update dependency setuptools to ~=80.9.0
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-05-27 04:00:34 +00:00
Ryan Gonzalez 051be9b2d2 libpod: Don't exclude running deps from the container graph inputs
getAllDependencies() skips recursing into dependencies that are already
running, but BuildContainerGraph() expects a *complete* set of inputs
and returns an error if any are missing. Thus, podman will fail to start
a container with already-running direct dependencies that, in turn, have
their own dependencies.

None of the other callers of BuildContainerGraph() omit anything from
their list of containers, so follow the same approach here, and just
let startNode figure out if a start is actually needed.

Fixes: containers/podman-compose#921

Signed-off-by: Ryan Gonzalez <ryan.gonzalez@collabora.com>
2025-05-26 20:29:53 -05:00
Paul Holzinger 66bf98e27c
compat API: respect base_hosts_file containers.conf option
Hard coding to none without checking containers.conf is not a good idea
as users who liked the previous behavior and the podman default behavior
of keeping the hosts entries can no longer do that.

With this commit they can set base_hosts_file = "/etc/hosts" to restore
the previous behavior.

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

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2025-05-26 16:16:10 +02:00
openshift-merge-bot[bot] f4a0197933
Merge pull request #26176 from l0rd/win-arm64-e2e
Fix machine e2e tests to pass on ARM64 Windows too
2025-05-26 13:49:21 +00:00
Ashley Cui 416bb84c0e Trigger podman.io version bump from release action
Our release is created by a GitHub action, and GitHub prevents workflows from running on events that were caused by other workflows to prevent unlimited recursion.
To get around this, use a reusable workflow to trigger the podman.io version bump from the release action.

Signed-off-by: Ashley Cui <acui@redhat.com>
2025-05-22 10:04:00 -04:00
Lokesh Mandvekar ad05a878df
Packit: remove propose-downstream for centos stream
If we're not planning to automatically push every new release to centos
stream, then this job only ends up causing noise.

Signed-off-by: Lokesh Mandvekar <lsm5@fedoraproject.org>
2025-05-22 09:45:42 -04:00
Lokesh Mandvekar 44ec71358e
Packit: use fedora-all alias for tests
Signed-off-by: Lokesh Mandvekar <lsm5@fedoraproject.org>
2025-05-22 09:44:46 -04:00
François Poirotte 9d4267c8f2
Disable the tests for rootless pods
Access to the cpuset cgroup controller is needed to run these tests.
Configuration on the CI workers prevents access to this controller
for rootless pods.

Signed-off-by: François Poirotte <clicky@erebot.net>
2025-05-22 11:45:01 +02:00
François Poirotte 5bfdb25b26
Support --cpuset-<cpus/mems> in podman kube play
This commit adds two new annotations named
io.podman.annotations.cpuset/$ctrname and
io.podman.annotations.memory-nodes/$ctrname

The first one allows restricting a container's execution to specific
CPU cores while the second restricts memory allocations to specific
NUMA memory nodes. They are also added automatically when the
--cpuset-cpus and --cpuset-mems options are used.

Fixes: containers#26172

Signed-off-by: François Poirotte <clicky@erebot.net>
2025-05-22 11:45:01 +02:00
Paul Holzinger 5797c1dd27
pkg/machine: don't use dummy linger service
There is no reason to deifne a dummy service to run sleep just to get
the podman.socket enabled. Enabeling a service is just creating the
symlink so we can do that for the user sessions as well.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2025-05-21 19:08:41 +02:00
Paul Holzinger 79a857e0a0
pkg/machine: correctly enable lingering
When a custom username is requested we must stil enable lingering for
it. The linger setup in the coreos image with the hard coded core user
doesn't really make sense as it doesn't work when another name is used.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2025-05-21 19:08:41 +02:00
Mario Loriedo 9872f0e83c Update expected output for a machine copy test
The podman machine copy test "attempt copying file to a new directory"
was failing because on recent version of Windows the error message
doesn't match the expected error message. To make it work on new and
old version of Windows both old and new error messages are now
considered as valid.

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

Signed-off-by: Mario Loriedo <mario.loriedo@gmail.com>
2025-05-21 18:40:52 +02:00
Mario Loriedo af495e1aa9 Replace alpine_nginx with TESTIMAGE in e2e tests
The image quay.io/libpod/alpine_nginx doesn't have a `linux/arm64` version
and the test "Single character volume mount" on Windows ARM64 was
failing. Changing it to TESTIMAGE (quay.io/libpod/testimage) fixes it.

Signed-off-by: Mario Loriedo <mario.loriedo@gmail.com>
2025-05-21 18:40:52 +02:00
Mario Loriedo 9a452db918 Support '$FOCUS' env variable on winmake too
Signed-off-by: Mario Loriedo <mario.loriedo@gmail.com>
2025-05-21 18:40:52 +02:00
openshift-merge-bot[bot] 27fdd7fc6d
Merge pull request #26087 from lsm5/openssf-passing
README.md: add openssf passing badge
2025-05-21 15:23:53 +00:00
openshift-merge-bot[bot] b2fcf00222
Merge pull request #26175 from lsm5/tmt-lint
lint: cleanups after TMT inclusion
2025-05-21 14:44:56 +00:00
Lokesh Mandvekar 6265ef07ae
pre-commit: exclude rpm/gating.yaml from check-yaml
check-yaml for whatever reason doesn't like `!Policy` in
rpm/gating.yaml.

Signed-off-by: Lokesh Mandvekar <lsm5@fedoraproject.org>
2025-05-21 10:17:08 -04:00
Lokesh Mandvekar 50379429ca
lint: Fix linter issues on TMT files
Signed-off-by: Lokesh Mandvekar <lsm5@fedoraproject.org>
2025-05-21 10:16:25 -04:00
openshift-merge-bot[bot] 9138a6fae0
Merge pull request #26166 from mheon/bump_release_notes_550_main
Update release notes on main
2025-05-21 14:06:00 +00:00
openshift-merge-bot[bot] 6f37ac8ef0
Merge pull request #26150 from ashley-cui/releaseprocess
Update RELEASE_PROCESS.md
2025-05-21 14:03:15 +00:00
openshift-merge-bot[bot] b61e99662d
Merge pull request #26148 from Luap99/test-dns
test/e2e: do not check dns.podman
2025-05-21 14:00:34 +00:00
openshift-merge-bot[bot] 7df8098d6c
Merge pull request #26165 from eriksjolund/drop-pre-checkpoint-requirement
docs: drop --pre-checkpoint requirement
2025-05-21 13:57:46 +00:00
openshift-merge-bot[bot] 6d23f22750
Merge pull request #24369 from lsm5/tmt-fedora-centos
[skip-ci] TMT: run system tests on Fedora
2025-05-21 07:56:20 +00:00
openshift-merge-bot[bot] 5629ba8a8d
Merge pull request #26149 from azdle/docker-api-container-status
compat: fix ContainerState.Status JSON values
2025-05-20 17:53:12 +00:00
Matt Heon cff69f89e9 Update release notes on main
We are apparently really behind, I knew 5.5 wasn't added but
apparently 5.4 also wasn't done.

Signed-off-by: Matt Heon <mheon@redhat.com>
2025-05-20 13:43:06 -04:00
Patrick Barrett c39fd061f0 fix CONTRIBUTING to say reference issue number 'or' url
Signed-off-by: Patrick Barrett <patrick@psbarrett.com>
2025-05-20 11:41:22 -05:00
openshift-merge-bot[bot] 9800f643be
Merge pull request #26155 from lsm5/packit-post-f40
[skip-ci] Packit: set fedora-all after F40 EOL
2025-05-20 16:22:27 +00:00
openshift-merge-bot[bot] c8362a1d3a
Merge pull request #26162 from Luap99/mount-sort
libpod: fix mount order for "/" volume
2025-05-20 15:27:12 +00:00
Patrick Barrett 92a15085cb compat: fix Container State.Status JSON values
This mirrors the conversion currently being done in `LibpodToContainer`
into `LibpodToContainerJSON`, converting podman style statuses to docker
style statuses as defined in their OpenAPI definition:

https://docs.docker.com/reference/api/engine/version/v1.49/#tag/Container/operation/ContainerInspect

Fixes: #17728

Signed-off-by: Patrick Barrett <patrick@psbarrett.com>
2025-05-20 10:22:45 -05:00
openshift-merge-bot[bot] 12172249b6
Merge pull request #26163 from containers/renovate/setuptools-80.x
chore(deps): update dependency setuptools to ~=80.8.0
2025-05-20 15:10:23 +00:00
renovate[bot] f10e2ffd36
chore(deps): update dependency setuptools to ~=80.8.0
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-05-20 14:38:17 +00:00
openshift-merge-bot[bot] e32b57b1ea
Merge pull request #26115 from inknos/compat-get-info-defaultaddresspool
compat: Add DefaultAddressPools field to GET /info
2025-05-20 14:37:22 +00:00
Paul Holzinger 953e385bd2
libpod: fix mount order for "/" volume
The count function for / and /proc results in the same value so the
order is not guaranteed. We must ensure that a / mount is always first
in the spec so that other mounts are not overshadowed by it.

Fixes: #26161

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2025-05-20 15:52:27 +02:00
openshift-merge-bot[bot] 8f8a90aa9b
Merge pull request #26156 from Luap99/fcos-image-remove
github: remove fcos next image workflow
2025-05-20 00:13:12 +00:00
Ashley Cui b9cc2d87d7 Update RELEASE_PROCESS.md
We've added a bunch of new automation to make releases easier. Update RELEASE_PROCESS.md to reflect the changes.

Signed-off-by: Ashley Cui <acui@redhat.com>
2025-05-19 14:36:20 -04:00
Paul Holzinger 6d6ebad829
github: remove fcos next image workflow
We do our proper machine os image builds in podman-machine-os now and
with [1] we also publish a next tag for easy testing. As such this
action is no longer needed.

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

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2025-05-19 18:37:38 +02:00
Lokesh Mandvekar 3ab45807b4
[skip-ci] Packit: set fedora-all after F40 EOL
As the title says.

Signed-off-by: Lokesh Mandvekar <lsm5@fedoraproject.org>
2025-05-19 12:07:54 -04:00
openshift-merge-bot[bot] 7aa4baa257
Merge pull request #26146 from mtrmac/ssh-localhost
Be explicit about ssh configs suitable only for localhost
2025-05-19 10:00:48 +00:00
Paul Holzinger 736ca60378
test/e2e: do not check dns.podman
A recent change[1] in netavark makes it so we no longer set the default
dns.podman search domain. As such we must no longer test for it.

Follow up to 254ab3b90f ("test/system: do not check dns.podman")

[1] https://github.com/containers/netavark/pull/1214

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2025-05-16 14:18:19 +02:00
Nicola Sella 7c0262db3d
compat: Add DefaultAddressPools field to GET /info
Signed-off-by: Nicola Sella <nsella@redhat.com>
2025-05-16 13:16:27 +02:00
Miloslav Trmač 265ca77276 Be explicit about ssh configs suitable only for localhost
... and warn loudly against generalization.

Should not change behavior.

Signed-off-by: Miloslav Trmač <mitr@redhat.com>
2025-05-15 23:04:49 +02:00
openshift-merge-bot[bot] 5fef6b714d
Merge pull request #26116 from inknos/compat-post-containers-create-cgroupsnsmode
compat: Add CgroupnsMode to POST /containers/create
2025-05-15 18:20:38 +00:00
openshift-merge-bot[bot] 3bf3d869b6
Merge pull request #26127 from martinetd/restart-hooks
podman: remember hooks-dir on restarts
2025-05-15 14:18:30 +00:00
openshift-merge-bot[bot] 9dcff99d59
Merge pull request #26124 from Luap99/nilness
fix issues found by nilness
2025-05-15 14:02:03 +00:00
Nicola Sella b82f2962c3
compat: Add CgroupnsMode to POST /containers/create
Signed-off-by: Nicola Sella <nsella@redhat.com>
2025-05-15 15:31:16 +02:00
openshift-merge-bot[bot] ee283c7514
Merge pull request #26141 from containers/renovate/setuptools-80.x
Update dependency setuptools to ~=80.7.1
2025-05-15 09:59:03 +00:00
renovate[bot] 06ddffc81d
Update dependency setuptools to ~=80.7.1
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-05-15 09:29:59 +00:00
openshift-merge-bot[bot] c983430aa0
Merge pull request #26140 from ashley-cui/winrel
Update release action
2025-05-15 09:12:18 +00:00
openshift-merge-bot[bot] 6579913a07
Merge pull request #26131 from siteshwar/disable-osh
Packit: disable OpenScanHub scans
2025-05-15 09:09:32 +00:00
Erik Sjölund 9c206a467d
docs: drop --pre-checkpoint requirement
runc is not the only runtime supporting --pre-checkpoint

crun commit 0683fec8b mentions

"This commit takes the interface as implemented in runc and implements it
for crun. "

Signed-off-by: Erik Sjölund <erik.sjolund@gmail.com>
2025-05-15 08:42:31 +02:00
Dominique Martinet 90ee7c86a3 podman: remember hooks-dir on restarts
When podman restarts config values within the Engine are lost.
Add --hook-dirs arguments as appropriate to the cleanup command
so that hooks are preserved on restarts due to the on-restart setting

Tests: add a check that prestart/poststop hooks ran every time after 2
restarts.
`wait_for_restart_count` was re-used to wait for restarts and moved to
helpers file.

Signed-off-by: Dominique Martinet <dominique.martinet@atmark-techno.com>
Fixes: #17935
2025-05-15 14:23:22 +09:00
Ashley Cui 53f118d135 GHA Release: Fix windows installer uploads
The new arm and amd installers were left behind, upload them automatically to the GH release

Signed-off-by: Ashley Cui <acui@redhat.com>
2025-05-14 16:09:26 -04:00
Ashley Cui 3e08c2abf0 Revert "GHA: Pin Go to 1.24.2"
This reverts commit fb9ef0dda0.
Use latest stable go to build release artifacts.

Signed-off-by: Ashley Cui <acui@redhat.com>
2025-05-14 16:08:33 -04:00
openshift-merge-bot[bot] 571a2e48c9
Merge pull request #26137 from Luap99/purego
fix macos compile issue with go 1.24.3
2025-05-14 17:59:02 +00:00
Paul Holzinger db65baaa21
fix macos compile issue with go 1.24.3
Some changes in go broke purego and that causes a compile error on
macos. This update fixes it.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2025-05-14 18:11:55 +02:00
Siteshwar Vashisht 206d92c25f Packit: disable OpenScanHub scans
Re-enabling them can be considered in the future if OpenScanHub starts
scanning Go code.

Signed-off-by: Siteshwar Vashisht <svashisht@redhat.com>
2025-05-14 17:55:33 +02:00
openshift-merge-bot[bot] f1b457729f
Merge pull request #26133 from ashley-cui/gha
GHA: Pin Go to 1.24.2
2025-05-14 15:37:49 +00:00
Ashley Cui fb9ef0dda0 GHA: Pin Go to 1.24.2
There is a bug that makes building with the latest go to fail. Pin to 1.24.2 for now.

Signed-off-by: Ashley Cui <acui@redhat.com>
2025-05-14 11:08:25 -04:00
openshift-merge-bot[bot] 863621ee5a
Merge pull request #26123 from containers/renovate/github.com-vbauerster-mpb-v8-8.x
fix(deps): update module github.com/vbauerster/mpb/v8 to v8.10.1
2025-05-13 16:57:50 +00:00
renovate[bot] fe84fbae72
fix(deps): update module github.com/vbauerster/mpb/v8 to v8.10.1
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-05-13 15:58:27 +00:00
Paul Holzinger 637c264e2e
fix issues found by nilness
The conditions are always true so they can be removed. And in the case
of exportCheckpoint() the scope means addToTarFiles was overwritten and
thus when it looped over it later the slice was always empty.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2025-05-13 17:20:10 +02:00
openshift-merge-bot[bot] 76e11cf5fc
Merge pull request #25608 from containers/renovate/github.com-crc-org-vfkit-0.x
fix(deps): update module github.com/crc-org/vfkit to v0.6.1
2025-05-13 12:19:13 +00:00
openshift-merge-bot[bot] 1cc6b5c1cc
Merge pull request #26119 from slp/update-krunkit-0.2.1
Bump bundled krunkit to 0.2.1
2025-05-13 10:33:56 +00:00
openshift-merge-bot[bot] 9938feb356
Merge pull request #25537 from containers/renovate/github.com-rootless-containers-rootlesskit-v2-2.x
fix(deps): update module github.com/rootless-containers/rootlesskit/v2 to v2.3.5
2025-05-13 10:03:37 +00:00
openshift-merge-bot[bot] a1ac6c33cc
Merge pull request #26113 from ygalblum/quadlet-pod-name
Quadlet - restore pod name to not use systemd specifiers
2025-05-12 23:22:28 +00:00
openshift-merge-bot[bot] cbcb777920
Merge pull request #26112 from siteshwar/fix-shellcheck
Fix a shellcheck warning about word splitting
2025-05-12 23:19:42 +00:00
openshift-merge-bot[bot] 45fc915dd9
Merge pull request #26117 from containers/renovate/setuptools-80.x
chore(deps): update dependency setuptools to ~=80.4.0
2025-05-12 16:58:17 +00:00
openshift-merge-bot[bot] 93fd26bc58
Merge pull request #25660 from ver4a/main
Fix parsing of paths for unmask
2025-05-12 16:55:30 +00:00
Sergio Lopez 6ae920de8b Bump bundled krunkit to 0.2.1
Bump the bundled krunkit version from 0.2.0 to 0.2.1.

Signed-off-by: Sergio Lopez <slp@redhat.com>
2025-05-12 18:38:28 +02:00
openshift-merge-bot[bot] 6601a0d061
Merge pull request #25980 from containers/renovate/github.com-containernetworking-plugins-1.x
fix(deps): update module github.com/containernetworking/plugins to v1.7.1
2025-05-12 16:32:42 +00:00
openshift-merge-bot[bot] df90606d53
Merge pull request #26086 from Honny1/hc-timeout
Fix: Ensure HealthCheck exec session terminates on timeout
2025-05-12 15:44:18 +00:00
renovate[bot] 59d9f1ea5d
chore(deps): update dependency setuptools to ~=80.4.0
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-05-12 15:36:49 +00:00
openshift-merge-bot[bot] e68bd8964d
Merge pull request #20955 from containers/renovate/docker-7.x
chore(deps): update dependency docker to v7
2025-05-12 15:35:56 +00:00
renovate[bot] 5471f6e191
chore(deps): update dependency docker to v7
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-05-12 15:16:16 +00:00
renovate[bot] 59c45a01c7
fix(deps): update module github.com/rootless-containers/rootlesskit/v2 to v2.3.5
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-05-12 15:16:07 +00:00
renovate[bot] 6a96f70180
fix(deps): update module github.com/crc-org/vfkit to v0.6.1
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-05-12 15:14:39 +00:00
renovate[bot] b572b892b1
fix(deps): update module github.com/containernetworking/plugins to v1.7.1
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-05-12 15:12:48 +00:00
Jan Rodák 077649f9d0
Fix: Use SIGKILL instead of SIGTERM when ExecStopContainer timeout is 0
Aligns behavior with documentation stating SIGKILL should be sent immediately if the timeout is zero.

Signed-off-by: Jan Rodák <hony.com@seznam.cz>
2025-05-12 17:01:42 +02:00
Jan Rodák 499ea1168b
Fix: Ensure HealthCheck exec session terminates on timeout
Previously, the HealthCheck exec session would not terminate on timeout, allowing the healthcheck to run indefinitely.

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

Signed-off-by: Jan Rodák <hony.com@seznam.cz>
2025-05-12 17:01:35 +02:00
Paul Holzinger 74f04e9118
Merge commit from fork
[skip-ci] Tighten version match
2025-05-12 15:54:30 +02:00
Ashley Cui d7fefb7064 [skip-ci] Tighten version match
Tighten the regex needed to match a valid version.

Signed-off-by: Ashley Cui <acui@redhat.com>
2025-05-12 09:44:00 -04:00
Ygal Blum 700c679cd2 Quadlet - Update the docs to reflect the default naming of resources
Signed-off-by: Ygal Blum <ygal.blum@gmail.com>
2025-05-12 09:33:28 -04:00
Ygal Blum 09d9d3e26b Revert "Quadlet - fix pod name to depend on the name of the generate service"
This reverts commit 4f38c2fea2.

Fixes: #26105
Signed-off-by: Ygal Blum <ygal.blum@gmail.com>
2025-05-12 09:33:16 -04:00
Siteshwar Vashisht 5be3f8d480 Fix a shellcheck warning about word splitting
Error: SHELLCHECK_WARNING (CWE-156): [#def2]
/etc/profile.d/podman-docker.sh:4:10: warning[SC2046]: Quote this to prevent word splitting.
    2|
    3|   if [ -z "${DOCKER_HOST-}" ]; then
    4|->     if [ $(id -u) -eq 0 ]; then
    5|   	export DOCKER_HOST=unix:///run/podman/podman.sock
    6|       else

Resolves: https://openscanhub.fedoraproject.org/task/52458/log/podman-5.4.2-1.fc43/scan-results.html#def2

Signed-off-by: Siteshwar Vashisht <svashisht@redhat.com>
2025-05-12 15:03:54 +02:00
openshift-merge-bot[bot] c0b352f2eb
Merge pull request #26103 from containers/renovate/github.com-vishvananda-netlink-1.x
fix(deps): update module github.com/vishvananda/netlink to v1.3.1
2025-05-12 10:20:37 +00:00
renovate[bot] a5748206d1
fix(deps): update module github.com/vishvananda/netlink to v1.3.1
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-05-09 21:52:54 +00:00
openshift-merge-bot[bot] 811aabd3b0
Merge pull request #26079 from mvfc/main
Take WSL path from PATH instead of forcing it to WindowsApps
2025-05-09 13:05:03 +00:00
Šimon Škoda 7a161115f9 Fix parsing of paths for unmask
This fixes an issue where multiple paths separated by a colon were
treated as a single path, contrary to what docs say and unlike how mask
option works.

Test was updated with a case that fails without this commit.

Signed-off-by: Šimon Škoda <ver4a@uncontrol.me>
2025-05-09 11:25:30 +00:00
openshift-merge-bot[bot] e138304f33
Merge pull request #26089 from l0rd/release-win-arm64-artifacts
Release win arm64 artifacts
2025-05-08 20:44:29 +00:00
openshift-merge-bot[bot] ec9406af4c
Merge pull request #26076 from containers/renovate/golang.org-x-net-0.x
fix(deps): update module golang.org/x/net to v0.40.0
2025-05-08 15:36:35 +00:00
Matheus Vitório b6eeaea7f3 Take path for wsl instead of forcing through WindowsApps
Signed-off-by: Matheus Cunha <matheusvflor@hotmail.com>
2025-05-08 16:39:03 +02:00
openshift-merge-bot[bot] 58b2eae38c
Merge pull request #25906 from jankaluza/25104-pidfs
Verify the ExecSession pid before killing it.
2025-05-08 10:03:50 +00:00
renovate[bot] d12588f581
fix(deps): update module golang.org/x/net to v0.40.0
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-05-08 09:55:33 +00:00
Mario Loriedo 136f2e1ba4 Update win-installer github job for arm64
Adds the build of the arm64 windows installer as part of the release
GitHub workflow.

When a Windows installer is uploaded to the GitHub release, it is named
consistently with the macOS one:

   `podman-installer-windows-${GOARCH}.exe`

Signed-off-by: Mario Loriedo <mario.loriedo@gmail.com>
2025-05-07 18:50:04 +02:00
Mario Loriedo efc3b178bb Build windows arm64 artifacts
Includes the necessary changes so that the `Makefile` target
`release-artifacts` builds the `-windows_arm64.zip` too.

In particular the arm64 versions of gvproxy and win-sshproxy
are downloaded as part of the windows arm64 release zip file.

Signed-off-by: Mario Loriedo <mario.loriedo@gmail.com>
2025-05-07 18:43:59 +02:00
Mario Loriedo 35e1c2033a Fix windows arm64 installer build
This is a followup of https://github.com/containers/podman/pull/26048

It fixes `process-release.ps1` that was always looking for the amd64 release
zip file, even if `$env:PODMAN_ARCH` was set to arm64. With this fix it looks
for the right zip file.

It fixes `winmake.ps1` that, when the `-arch` param was not passed, set `$env:PODMAN_ARCH`
to the empty string instead of the local `$env:GOARCH`.

Signed-off-by: Mario Loriedo <mario.loriedo@gmail.com>
2025-05-07 18:33:32 +02:00
Lokesh Mandvekar f4819412b8
README.md: add openssf passing badge
[NO NEW TESTS NEEDED]

Signed-off-by: Lokesh Mandvekar <lsm5@fedoraproject.org>
2025-05-07 18:39:18 +05:30
openshift-merge-bot[bot] 1b55e39487
Merge pull request #26083 from itoffshore/secret-create
Update podman-secret-create.1.md
2025-05-07 12:57:54 +00:00
openshift-merge-bot[bot] ce47c999a5
Merge pull request #26085 from containers/renovate/github.com-containers-gvisor-tap-vsock-0.x
fix(deps): update module github.com/containers/gvisor-tap-vsock to v0.8.6
2025-05-07 10:17:30 +00:00
renovate[bot] 9dffc251fc
fix(deps): update module github.com/containers/gvisor-tap-vsock to v0.8.6
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-05-07 09:32:21 +00:00
Stuart Cardall d6239385fd
Update podman-secret-create.1.md
* Adds example showing secure secret generation / rotation & mounting
* fixes https://github.com/containers/podman/issues/26064

Signed-off-by: Stuart Cardall <itoffshore@users.noreply.github.com>
2025-05-06 22:41:49 +01:00
openshift-merge-bot[bot] ebbf90decc
Merge pull request #26082 from ygalblum/quadlet-pod-name
Quadlet - fix pod name to depend on the name of the generate service
2025-05-06 19:51:51 +00:00
openshift-merge-bot[bot] a2f486feb3
Merge pull request #26039 from containers/renovate/github.com-vishvananda-netlink-digest
fix(deps): update github.com/vishvananda/netlink digest to 9d88d83
2025-05-06 19:13:19 +00:00
openshift-merge-bot[bot] 857cfb9062
Merge pull request #25861 from cesargoncalves/main
update podman socket output to include also exposed ports
2025-05-06 19:10:36 +00:00
Ygal Blum 4f38c2fea2 Quadlet - fix pod name to depend on the name of the generate service
Signed-off-by: Ygal Blum <ygal.blum@gmail.com>
2025-05-06 12:02:01 -04:00
openshift-merge-bot[bot] 0ed3df8b41
Merge pull request #26075 from containers/renovate/golang.org-x-crypto-0.x
fix(deps): update module golang.org/x/crypto to v0.38.0
2025-05-06 14:56:10 +00:00
renovate[bot] 4a4b8dcfe9
fix(deps): update module golang.org/x/crypto to v0.38.0
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-05-06 10:09:13 +00:00
Jan Kaluza f825639ebc Verify the ExecSession pid before killing it.
When container is being removed, podman iterates
through its exec sessions and checks whether exec
session pid is still alive.

The problem is that the pid can be reused for other processes,
so that it may not belong to exec session.
In this scenario podman may kill another process

This commit prevents it by doing following changes:

- Adds the PIDData string to ExecSession struct. This string
  is used to store additional context for a PID to later verify
  that the PID killed by the podman is really the one started by
  it.
- Adds new package called pidhandle which implements the methods
  generating the PIDData, and killing the PID with the PIDData
  ensuring the right PID is killed by verifying the metadata.

The new code uses pidfd_open and name_to_handle_at when available.
It fallbacks to process start-time get using the gopsutil package.

Fixes: #25104

Signed-off-by: Jan Kaluza <jkaluza@redhat.com>
2025-05-06 06:24:13 +02:00
openshift-merge-bot[bot] cd4a7b1f3a
Merge pull request #26074 from containers/renovate/golang.org-x-term-0.x
fix(deps): update module golang.org/x/term to v0.32.0
2025-05-05 21:03:20 +00:00
openshift-merge-bot[bot] e3df077f0a
Merge pull request #26029 from Luap99/machine-tz
pkg/machine: more timezone fixes
2025-05-05 21:00:35 +00:00
renovate[bot] 32d389a19c
fix(deps): update module golang.org/x/term to v0.32.0
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-05-05 18:53:33 +00:00
openshift-merge-bot[bot] 344796ae6b
Merge pull request #26038 from containers/renovate/github.com-hugelgupf-p9-digest
fix(deps): update github.com/hugelgupf/p9 digest to abc96d2
2025-05-05 18:51:58 +00:00
openshift-merge-bot[bot] 6fe66afaa7
Merge pull request #26072 from containers/renovate/golang.org-x-sys-0.x
fix(deps): update module golang.org/x/sys to v0.33.0
2025-05-05 18:29:44 +00:00
renovate[bot] 1f7d8e2273
fix(deps): update github.com/vishvananda/netlink digest to 9d88d83
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-05-05 18:28:00 +00:00
renovate[bot] fbdeff2b88
fix(deps): update module golang.org/x/sys to v0.33.0
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-05-05 17:33:37 +00:00
openshift-merge-bot[bot] 865c2c2b91
Merge pull request #26059 from ashley-cui/devbump
Automatically bump to -dev after tag
2025-05-05 15:10:13 +00:00
openshift-merge-bot[bot] e34185feea
Merge pull request #26065 from containers/renovate/golangci-golangci-lint-2.x
chore(deps): update dependency golangci/golangci-lint to v2.1.6
2025-05-05 14:56:28 +00:00
openshift-merge-bot[bot] 45c03c9dec
Merge pull request #26070 from containers/renovate/golang.org-x-sync-0.x
fix(deps): update module golang.org/x/sync to v0.14.0
2025-05-05 14:22:41 +00:00
openshift-merge-bot[bot] 65352aa6cf
Merge pull request #26048 from l0rd/winmake-arm64-support
Update winmake.ps1 to build arm64 artifacts
2025-05-05 14:11:36 +00:00
renovate[bot] 0b1623e2e4
fix(deps): update module golang.org/x/sync to v0.14.0
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-05-05 13:31:53 +00:00
openshift-merge-bot[bot] 401d1708fc
Merge pull request #26068 from giuseppe/fix-md-example
docs: fix markdown format
2025-05-05 13:30:08 +00:00
openshift-merge-bot[bot] 5b1eb7b1d6
Merge pull request #26061 from containers/renovate/setuptools-80.x
chore(deps): update dependency setuptools to ~=80.2.0
2025-05-05 10:36:09 +00:00
Giuseppe Scrivano 5d6c784252
docs: fix markdown format
Closes: https://github.com/containers/podman/issues/26063

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2025-05-05 10:15:12 +02:00
renovate[bot] ec6423e73b
chore(deps): update dependency golangci/golangci-lint to v2.1.6
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-05-04 17:48:26 +00:00
renovate[bot] 78065fd8c7
chore(deps): update dependency setuptools to ~=80.2.0
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-05-03 03:22:47 +00:00
Ashley Cui 3448ba5091 Automatically bump to -dev after tag
Create GitHub action to automatically bump to a -dev version after a release is tagged.

On a branch:
- The bump will always be a z bump on branches
- If the bump is to an RC, then the bump will be back down to dev (ie, 9.9.0-rc1 to 9.9.0-dev)
- If the bump is not an RC, the bump wil be up to dev (ie, 9.9.0 to 9.9.1-dev)

On main:
- If the X.Y version on main is smaller than the X.Y on the release tag, this action will open a PR to bump the version on main to the release tag's X.Y+1
- Major version (X) dev bumps will still need to be manual

Signed-off-by: Ashley Cui <acui@redhat.com>
2025-05-02 17:32:35 -04:00
Mario Loriedo 7fddbd4d4d Update winmake.ps1 to build arm64 artifacts
Winmake could only build amd64 artifacts (podman-remote, gvproxy,
win-sshproxy, podman.msi and podman-setup.exe).

This commit makes the necessary change to winmake so that it:
1) builds arm64 artifacts when executed on arm64
2) cross-compiles to arm64/amd64 with the  `-architecture` parameter

It depends on https://github.com/containers/podman/pull/26023 that
removes the need to build `check.c` code (that is not used anyway).

Signed-off-by: Mario Loriedo <mario.loriedo@gmail.com>
2025-05-02 20:22:28 +02:00
openshift-merge-bot[bot] 400a9a528b
Merge pull request #25722 from l0rd/fix-hyperv-volumes-with-space
Fix machines failing to start when a volume's path contains spaces
2025-05-02 14:03:15 +00:00
openshift-merge-bot[bot] 5e8e829d7b
Merge pull request #25945 from ninja-quokka/podman_machine_swap
feat: Add support for configuring swap in Podman machine
2025-05-02 13:21:48 +00:00
openshift-merge-bot[bot] b5befcd514
Merge pull request #26046 from containers/renovate/github.com-vbauerster-mpb-v8-8.x
fix(deps): update module github.com/vbauerster/mpb/v8 to v8.10.0
2025-05-02 11:14:46 +00:00
Lokesh Mandvekar 2419732eb7
[skip-ci] TMT: system tests
This commit introduces TMT test jobs triggered via packit to run system
tests on testing-farm infrastructure. Tests are run for
Fedora 41, 42 and rawhide on x86_64. The same
test plan will be reused by Fedora for bodhi, zuul and fedora-ci gating
tests. Packit will handle syncing of test plan and sources from upstream
to downstream.

Packit failure notification has also been updated to be less noisy and
let people know they are free to ignore any failures.

TODO:
1. Enable jobs for CentOS Stream and aarch64 envs.
2. Enable separate set of jobs for release branches as they need to be
   tested with official distro packages, not with bleeding-edge
   packages.

Signed-off-by: Lokesh Mandvekar <lsm5@fedoraproject.org>
2025-05-02 16:40:20 +05:30
Paul Holzinger ac6080bea9
pkg/machinie: use TZ env for reading local timezone
The TZ var can be commonly used to overwrite the timezone so we should
honour that one as well.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2025-05-02 11:56:47 +02:00
Paul Holzinger a90fad3fc8
pkg/machine: rework getLocalTimeZone on linux
Get the timezone off the localtime symlink like systemd does it.
It is more efficient then fork/exec another command for it that may or
may not exits and the /etc/timezone files doesn't exist on most distros
so that is not a great fallback.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2025-05-02 11:56:47 +02:00
Paul Holzinger 193d7b8202
pkg/machine: properly setup zoneinfo symlink
If you run timedatectl inside it will not show the correct timezone, it
seems systemd really wants a relative link which is also documented by
coreos[1]. Also we can just use path.Join() directly and don't have to
convert the path again on windows.

[1] https://docs.fedoraproject.org/en-US/fedora-coreos/time-zone/#_setting_the_time_zone_via_ignition

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2025-05-02 11:56:46 +02:00
Paul Holzinger b431f06e64
pkg/machine: do not add broken localtime symlink
The timezone might be empty so the zoneinfo link would then be invalid.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2025-05-02 11:56:46 +02:00
openshift-merge-bot[bot] 804ad4e491
Merge pull request #26023 from l0rd/win-installer-remove-provider-check
Remove providers checks from the Windows Installer
2025-05-02 09:49:13 +00:00
renovate[bot] 039679d0ae
fix(deps): update module github.com/vbauerster/mpb/v8 to v8.10.0
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-05-02 06:13:38 +00:00
openshift-merge-bot[bot] 7800db68a9
Merge pull request #26040 from containers/renovate/github.com-shirou-gopsutil-v4-4.x
fix(deps): update module github.com/shirou/gopsutil/v4 to v4.25.4
2025-05-01 19:22:59 +00:00
openshift-merge-bot[bot] 083c8bc075
Merge pull request #26031 from containers/renovate/setuptools-80.x
chore(deps): update dependency setuptools to ~=80.1.0
2025-05-01 13:52:10 +00:00
renovate[bot] ebcdd3c8cd
fix(deps): update module github.com/shirou/gopsutil/v4 to v4.25.4
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-05-01 10:32:51 +00:00
renovate[bot] bc810cb07d
fix(deps): update github.com/hugelgupf/p9 digest to abc96d2
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-05-01 01:44:20 +00:00
openshift-merge-bot[bot] 06b684268e
Merge pull request #26027 from Luap99/signal
sigproxy: ignore SIGSTOP and handle case where container is already removed
2025-04-30 18:30:41 +00:00
renovate[bot] b7f67badf3
chore(deps): update dependency setuptools to ~=80.1.0
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-04-30 18:14:59 +00:00
openshift-merge-bot[bot] 8f22a0cf16
Merge pull request #26022 from giuseppe/test-do-not-set-limits-on-dev-zero
test: use block devices for I/O limit tests
2025-04-30 18:14:04 +00:00
Paul Holzinger 941a6d0c05
pkg/signal: ignore SIGTOP for signal proxy
It makes no sense to forward it, SIGSTOP cannot be handled by
userspace (like SIGKILL) and it didn't do anything before so this just
makes it more explicit.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2025-04-30 19:43:13 +02:00
Paul Holzinger a4d0067249
pkg/signal: rework CatchAll() behavior
Instead of catching all signals and then ignoring them inside the loop
again just don't register them in Notify() to begin with.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2025-04-30 19:42:15 +02:00
Paul Holzinger 8de2e0ec21
sigproxy: ignore if container already removed
If the container is already removed do not log a warning as this happens
in parallel so it is possible the container was already removed. The
flake was shown in https://github.com/containers/podman/pull/26017.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2025-04-30 19:42:15 +02:00
openshift-merge-bot[bot] 9ce708774e
Merge pull request #26026 from baude/issue25950
Do not error on tz detection
2025-04-30 16:04:13 +00:00
openshift-merge-bot[bot] d8d0913ea3
Merge pull request #26007 from ygalblum/quadlet-remove-cid
Quadlet - remove the usage of cid and podid for container and pod files
2025-04-30 15:28:29 +00:00
Giuseppe Scrivano 80065f7224
ci: Load null_blk for I/O limit tests
Load the `null_blk` kernel module to have the `/dev/nullb0` device
available for the tests.

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2025-04-30 16:21:38 +02:00
Giuseppe Scrivano 8160e02459
test/e2e: Use nullb0 for IO limit tests
The tests for device I/O limits were using `/dev/zero`,
which is not a block device suitable for these cgroup
controls.

Update the tests to use `/dev/nullb0` if it exists.

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2025-04-30 16:21:38 +02:00
Giuseppe Scrivano 3b61e56152
test/system: Use correct device for I/O limit tests
The tests were incorrectly using `/dev/zero`.  These options are
intended to set I/O limits on specific block devices.

The test already sets up a loopback device, so reuse it.

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2025-04-30 16:21:38 +02:00
Giuseppe Scrivano f6b91d7be0
inspect: Ignore character devices for IO limits
Cgroup block I/O limits cannot be applied to character devices.

Ignore character devices in the inspect output.

Update the API tests to use the null block device `/dev/nullb0` (if
available) instead of `/dev/zero` for testing I/O limits.

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2025-04-30 16:21:38 +02:00
openshift-merge-bot[bot] 4e3226cf1a
Merge pull request #26000 from l0rd/docs-with-podman
Build documentation in a container on Win arm64
2025-04-30 14:02:56 +00:00
openshift-merge-bot[bot] 033eee076f
Merge pull request #26025 from Luap99/btrfs_noversion
Stop setting btrfs_noversion build tag
2025-04-30 13:57:27 +00:00
Brent Baude d7eaf42727 Do not error on tz detection
In cases where systemd was not available, podman machine was erroring
out using timedatectl (it requires systemd).  on other providers like
windows, we don't do any timezone detection so it seems valid to return
a "" for timezone.  This fixes the first problem described #25950.

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

Signed-off-by: Brent Baude <bbaude@redhat.com>
2025-04-30 08:03:34 -05:00
Paul Holzinger c9b1bd1cf3
Stop setting btrfs_noversion build tag
c/storage no longer uses this tag after
https://github.com/containers/storage/pull/2308.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2025-04-30 14:22:25 +02:00
Mario Loriedo 9c5f7662d1 Remove providers checks from the Windows Installer
This PR removes the file `check.c` and the instructions
to build it. The file was still built but the resulting
dll was not used by the installer anymore (see
https://github.com/containers/podman/pull/25237).

Signed-off-by: Mario Loriedo <mario.loriedo@gmail.com>
2025-04-30 14:21:00 +02:00
openshift-merge-bot[bot] dd8fbb7582
Merge pull request #26015 from markjdb/main
Makefile: move some Go-related variable definitions up
2025-04-30 12:18:13 +00:00
Ygal Blum 9b2fb40ab8 Quadlet - remove the usage of cid and podid for container and pod files
Signed-off-by: Ygal Blum <ygal.blum@gmail.com>
2025-04-30 07:59:15 -04:00
Mario Loriedo 8e6ecb97c9 Fix running machines with volumes containing spaces
Machines configured to mount local paths containing
spaces failed to start on Hyper-V and silently failed
to mount the folder on macOS/Linux.

On Windows/hyperv, where local paths are mounted
running a 9p client inside the VM, the local host
path needs to be surrounding with quotation marks
before using in a `podman machine ssh ...` command.

A similar behavior happened on Linux/QEMU where the
path was used in a SSH command to mount the folder
using virtiofs. Quoting the path when buidling the
command arguments fixed the problem.

On macOS/libkit,applehv the path was written as is
in a systemd unit name to instruct how to mount it.
Escaping space chars so that they are are parsed
successfully fixed this:
```diff
-- enable path with spaces.mount
++ enable path\x20with\x20spaces.mount
```

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

Signed-off-by: Mario Loriedo <mario.loriedo@gmail.com>
2025-04-30 08:54:42 +02:00
openshift-merge-bot[bot] 8a042370b1
Merge pull request #26014 from ashley-cui/machospr
Fix mach os pr release action
2025-04-29 18:23:34 +00:00
openshift-merge-bot[bot] 79a820ac3b
Merge pull request #25832 from jakecorrenti/handle-sigint
Handle machine start state when sent a signal
2025-04-29 17:22:13 +00:00
openshift-merge-bot[bot] 8e97c6f6ba
Merge pull request #26011 from Luap99/5.6-dev
bump main to 5.6-dev
2025-04-29 17:03:06 +00:00
Mark Johnston ad20e257d6 Makefile: move some Go-related variable definitions up
Otherwise we evaluate NATIVE_GOOS before it is set, which breaks the
FreeBSD build since various make variables are not set correctly.

Fixes: #26006
Signed-off-by: Mark Johnston <mark.johnston@klarasystems.com>
2025-04-29 16:55:04 +00:00
Jake Correnti 24267452e6
Handle signal preventing Start from completing
In the instance where the user sends a signal, such as SIGINT (Ctl-c)
when a Podman Machine is in the middle of starting, make sure the state
doesn't get stuck in the "Currently Starting" status.

Resolves: #24416

Signed-off-by: Jake Correnti <jakecorrenti+github@proton.me>
2025-04-29 10:09:58 -04:00
Mario Loriedo f6be9fbc7f Build documentation in a container on Win arm64
Locally building the windows installer requires to
build the documentation. And building documentation
requires Pandoc.

There is no pre-built binaries for Windows arm64
and this makes it complicated to build the Podman
Windows installer on Windows arm64.

To unlock this scenario we are adding a new winmake.ps1
target to build the documentation in a container (where
Pandoc is pre-installed).

Signed-off-by: Mario Loriedo <mario.loriedo@gmail.com>
2025-04-29 15:36:37 +02:00
Ashley Cui 2b06c01357 Fix mach os pr release action
- Remove branch restrictions
- Do not open PR on main
- Add release note to PR

Signed-off-by: Ashley Cui <acui@redhat.com>
2025-04-29 09:24:47 -04:00
openshift-merge-bot[bot] 1e4287d54c
Merge pull request #26010 from Luap99/bindings-pull
pkg/bindings: fix infinite loop/memory leak in image pull
2025-04-29 13:10:54 +00:00
Paul Holzinger 8d65e0e36c
bump main to 5.6-dev
Also remove the outdated comment that said to update the version in the
README.md file, that is no longer there since commit 8e7f98ae65
("docs(readme): add status badges and remove hardcoded release info").

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2025-04-29 14:08:03 +02:00
Paul Holzinger 579b17425e
pkg/bindings: wrap image push decode error
If this fails we should know exactly what failed. The underlying
connection error might just be unexpected EOF or somthing which is not
helpful.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2025-04-29 12:20:37 +02:00
Paul Holzinger 6c0e581fa9
pkg/bindings: fix infinite loop/memory leak in image pull
In the case of an Decoder error which is not EOF we loop forever, as the
Decoder stores some errors each next Decode() call will keep returning
the same error. Thus we loop forever until we run out of memory as each
error was stored in pullErrors array as described in [1].

Note this does not actually fix whatever causes the underlying
connection error in the issue, it just fixes the loop/memory leak.

[1] https://github.com/containers/podman/issues/25974

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2025-04-29 12:19:37 +02:00
openshift-merge-bot[bot] b4954ac2e8
Merge pull request #26004 from containers/renovate/github.com-opencontainers-cgroups-0.x
fix(deps): update module github.com/opencontainers/cgroups to v0.0.2
2025-04-29 09:34:47 +00:00
openshift-merge-bot[bot] 8c78fe204d
Merge pull request #26009 from arixmkii/check-c-gcc-15
Update "check.c" to be C23 compliant
2025-04-29 09:31:35 +00:00
Arthur Sengileyev ae9e85bfc5 Update "check.c" to be C23 compliant
Fixes compilation errors with GCC 15.

Signed-off-by: Arthur Sengileyev <arthur.sengileyev@gmail.com>
2025-04-29 11:10:45 +03:00
Lewis Roy 7b1055a5fb
feat: Add support for configuring swap in Podman machine
Add `--swap` argument to `podman machine init` command.

Passing an int64 value to this flag will trigger the Podman machine
ignition file to be generated with a zram-generator.conf file containing
the --swap value as the zram-size argument.

This file is read by the zram-generator systemd service on boot
resulting in a zram swap device being created.

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

Signed-off-by: Lewis Roy <lewis@redhat.com>
2025-04-29 12:20:24 +10:00
openshift-merge-bot[bot] ce0bac24e5
Merge pull request #25986 from Honny1/fix-unlimited-ulimits
Fix handling of "r_limits" in Podman REST API /libpod/containers/create
2025-04-28 22:27:40 +00:00
openshift-merge-bot[bot] 9e9b531dd1
Merge pull request #26002 from Honny1/fix-name
OWNERS: Fix GitHub handle
2025-04-28 18:20:53 +00:00
renovate[bot] 6c9f378a9b
fix(deps): update module github.com/opencontainers/cgroups to v0.0.2
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-04-28 18:19:46 +00:00
openshift-merge-bot[bot] a2d542df37
Merge pull request #26001 from ygalblum/quadlet-consolidate-service-init
Quadlet - use helper function to initialize service struct
2025-04-28 18:18:08 +00:00
Ygal Blum 3f56de0199 Quadlet - use helper function to initialize service struct
Signed-off-by: Ygal Blum <ygal.blum@gmail.com>
2025-04-28 12:54:56 -04:00
openshift-merge-bot[bot] 2679304aa8
Merge pull request #25983 from matejvasek/fix-inherit-label
Fix: inheritlabels=true if query param absent
2025-04-28 16:02:48 +00:00
Mario Loriedo 2588b96993 Fix logging podman machine server9 output
Command `podman machine init` for Hyper-V machines invokes the command
`podman machine server9` and redirects it's output to a file. But the
file descriptor was closed before beeing used and the output file was
always empty.

Signed-off-by: Mario Loriedo <mario.loriedo@gmail.com>
2025-04-28 15:42:43 +00:00
Jan Rodák fd444bd7d7
OWNERS: Fix Github handle
The `OWNERS` file contains an incorrect Github handle `honny1`. The correct Github handle is `Honny1`. This causes `/approve` comments to have no effect on PR. The `MAINTAINERS.md` file contains the correct Github handle.

Signed-off-by: Jan Rodák <hony.com@seznam.cz>
2025-04-28 16:58:18 +02:00
openshift-merge-bot[bot] d03d994835
Merge pull request #25975 from ygalblum/quadlet-consolidate-add-keys
Quadlet - use helper function for handling key=val type keys
2025-04-28 14:03:56 +00:00
Jan Rodák e66ff395b7
Fix handling of "r_limits" in Podman REST API /libpod/containers/create
The JSON decoder correctly cannot decode (overflow) negative values (e.g., `-1`) for fields of type `uint64`, as `-1` is used to represent `max` in `POSIXRlimit`. To handle this, we use `tmpSpecGenerator` to decode the request body. The `tmpSpecGenerator` replaces the `POSIXRlimit` type with a `tmpRlimit` type that uses the `json.Number` type for decoding values. The `tmpRlimit` is then converted into the `POSIXRlimit` type and assigned to the `SpecGenerator`.

This approach ensures compatibility with the Podman CLI and remote API, which already handle `-1` by casting it to `uint64` (`uint64(-1)` equals `MaxUint64`) to signify `max`.

Fixes: https://issues.redhat.com/browse/RUN-2859
Fixes: https://github.com/containers/podman/issues/24886

Signed-off-by: Jan Rodák <hony.com@seznam.cz>
2025-04-28 15:02:19 +02:00
openshift-merge-bot[bot] 4be34dedc5
Merge pull request #25991 from arixmkii/fix-named-volume-test
Disable FS mount in volume only test
2025-04-28 11:47:55 +00:00
openshift-merge-bot[bot] 42cee9d977
Merge pull request #25946 from ninja-quokka/docker_compat_force_image_remove
bug: Correct Docker compat REST API image delete endpoint
2025-04-28 11:03:41 +00:00
openshift-merge-bot[bot] b75a0f5135
Merge pull request #25995 from containers/renovate/setuptools-80.x
chore(deps): update dependency setuptools to v80
2025-04-28 10:11:09 +00:00
openshift-merge-bot[bot] b5f5738a14
Merge pull request #25982 from mheon/add_mohan
Add Mohan Boddu as community manager
2025-04-28 07:53:54 +00:00
renovate[bot] 7819879776
chore(deps): update dependency setuptools to v80
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-04-27 17:44:15 +00:00
Lewis Roy 6e7de438cc
bug: Correct Docker compat REST API image delete endpoint
The Docker `-XDELETE image/$name?force=true` endpoint only removes
containers using an image if they are in a non running state.

In Podman, when forcefully removing images we also forcefully delete
containers using the image including running containers.

This patch changes the Docker image force delete compat API to act like the
Docker API while maintaining commands like `podman rmi -f $imagename`

It also corrects the API return code returned when an image is requested
to be deleted with running containers using it.

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

Signed-off-by: Lewis Roy <lewis@redhat.com>
2025-04-27 20:51:11 +10:00
Cesar Goncalves a969dbd73e
update podman socket output to include also exposed ports
Fixes https://github.com/containers/podman/issues/25851

Co-authored-by: Brent Baude <bbaude@redhat.com>
Signed-off-by: Cesar Goncalves <mail@cesargoncalves.com>
2025-04-27 11:11:28 +01:00
Arthur Sengileyev 585f046e95 Disable FS mount in volume only test
The test is checking that named volumes could be used. FS mount is not
needed and there is no code testing anything around it.

Signed-off-by: Arthur Sengileyev <arthur.sengileyev@gmail.com>
2025-04-26 13:44:36 +03:00
flouthoc 4268c61dd0 Added tests for inheritlabel fix
Signed-off-by: flouthoc <flouthoc.git@gmail.com>
2025-04-25 19:29:18 +02:00
Matej Vašek 0c4d023822
Fix: inheritlabels=true if query param absent
The inheritlabels param must default to true if query param is absent.

Signed-off-by: Matej Vašek <matejvasek@gmail.com>
2025-04-25 19:17:00 +02:00
openshift-merge-bot[bot] 5c5ecdea88
Merge pull request #24150 from dfr/freebsd-system-reset
libpod: fix a confusing error message from 'podman system reset' on F…
2025-04-25 15:34:00 +00:00
Matt Heon 75f05a9807 Add Mohan Boddu as community manager
This PR nominates Mohan Boddu as a new Community Manager for the
Podman Container Tools project.

Signed-off-by: Matt Heon <mheon@redhat.com>
2025-04-25 10:55:57 -04:00
openshift-merge-bot[bot] ac12341046
Merge pull request #25942 from rcmadhankumar/set-default-mount-option
Remove using `rw` as a default mount option
2025-04-25 13:35:29 +00:00
openshift-merge-bot[bot] 2c317bb519
Merge pull request #25977 from containers/renovate/golangci-golangci-lint-2.x
chore(deps): update dependency golangci/golangci-lint to v2.1.5
2025-04-25 11:53:53 +00:00
openshift-merge-bot[bot] 463e3a5d8a
Merge pull request #25978 from containers/renovate/github.com-cpuguy83-go-md2man-v2-2.x
fix(deps): update module github.com/cpuguy83/go-md2man/v2 to v2.0.7
2025-04-25 10:44:50 +00:00
renovate[bot] 710c077342
chore(deps): update dependency golangci/golangci-lint to v2.1.5
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-04-25 10:20:27 +00:00
renovate[bot] 7e14a03409
fix(deps): update module github.com/cpuguy83/go-md2man/v2 to v2.0.7
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-04-25 00:30:23 +00:00
openshift-merge-bot[bot] c28fd3cbd8
Merge pull request #25966 from Luap99/start-rm
remote: don't print bogus error when starting container attached
2025-04-24 18:58:00 +00:00
Ygal Blum 633f727f2d Quadlet - use helper function for handling key=val type keys
Signed-off-by: Ygal Blum <ygal.blum@gmail.com>
2025-04-24 14:15:39 -04:00
openshift-merge-bot[bot] 2b647bf3f8
Merge pull request #25964 from SuNNjek/quadlet-pod-labels
Add Label to quadlet pod
2025-04-24 15:31:07 +00:00
openshift-merge-bot[bot] 83d989f3c3
Merge pull request #25960 from ricardobranco777/bats_tap_option
hack/bats: Pass --tap (-t) option to bats
2025-04-24 14:41:07 +00:00
Robin Heinemeier 802fc15b1e Add Label to quadlet pod
Signed-off-by: Robin Heinemeier <sunnerlp@gmail.com>
2025-04-24 13:37:42 +00:00
Paul Holzinger 0eac57ed31
podman start: remove container if needed
Like podman run --rm, start --attach must also ensure the contianer is
removed before it exist. Otherwise there is a race where the container
still exist after the command exits, because removal would only happen
by the cleanup process in the background.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2025-04-24 15:32:50 +02:00
openshift-merge-bot[bot] 5a823e33ef
Merge pull request #25963 from lsm5/packit-no-merge-pr-in-ci
Packit: couple of fixes for release process
2025-04-24 12:32:29 +00:00
Paul Holzinger 3a2d7587fe
remote: don't print bogus error when starting container attached
This looks like debug leftover, in any case this is not an error so
simply remove the line.

Fixes #25965

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2025-04-24 14:31:22 +02:00
Lokesh Mandvekar 9b751a27b9
[skip-ci] Packit: do not merge PR in CI
Packit's default behaviour of merging commits on PR copr build jobs ends
up creating a HEAD commit ID that doesn't exist upstream. This commit
disables that behaviour.

This way, copr builds from release PR can be used for podman-machine-os
builds.

Co-authored-by: Matej Focko <mfocko@users.noreply.github.com>
Signed-off-by: Lokesh Mandvekar <lsm5@fedoraproject.org>
2025-04-24 16:48:33 +05:30
Lokesh Mandvekar e443bffe5a
[skip-ci] Packit: re-enable fedora-41 targets
Signed-off-by: Lokesh Mandvekar <lsm5@fedoraproject.org>
2025-04-24 16:17:22 +05:30
Ricardo Branco 4dd9340a56
hack/bats: Pass --tap (-t) option to bats
Signed-off-by: Ricardo Branco <rbranco@suse.de>
2025-04-24 11:38:29 +02:00
openshift-merge-bot[bot] bc81470714
Merge pull request #25956 from ricardobranco777/hack_bats_multiple
hack/bats: Fix to allow multiple tests
2025-04-24 07:51:08 +00:00
Ricardo Branco bfd5de309f
hack/bats: Fix to allow multiple tests
Signed-off-by: Ricardo Branco <rbranco@suse.de>
2025-04-23 18:43:05 +02:00
openshift-merge-bot[bot] c55353f1d0
Merge pull request #25955 from ricardobranco777/podman_rootless_user
hack/bats: Allow specifying PODMAN_ROOTLESS_USER
2025-04-23 14:11:52 +00:00
rcmadhankumar bf7dcd5619 Fix: Remove appending rw as the default mount option
The backstory for this is that runc 1.2 (opencontainers/runc#3967)
fixed a long-standing bug in our mount flag handling (a bug that crun
still has). Before runc 1.2, when dealing with locked mount flags that
user namespaced containers cannot clear, trying to explicitly clearing
locked flags (like rw clearing MS_RDONLY) would silently ignore the rw
flag in most cases and would result in a read-only mount. This is
obviously not what the user expects.

What runc 1.2 did is that it made it so that passing clearing flags
like rw would always result in an attempt to clear the flag (which was
not the case before), and would (in all cases) explicitly return an
error if we try to clear locking flags. (This also let us finally fix a
bunch of other long-standing issues with locked mount flags causing
seemingly spurious errors).

The problem is that podman sets rw on all mounts by default (even if
the user doesn't specify anything). This is actually a no-op in
runc 1.1 and crun because of a bug in how clearing flags were handled
(rw is the absence of MS_RDONLY but until runc 1.2 we didn't correctly
track clearing flags like that, meaning that rw would literally be
handled as if it were not set at all by users) but in runc 1.2 leads to
unfortunate breakages and a subtle change in behaviour (before, a ro
mount being bind-mounted into a container would also be ro -- though
due to the above bug even setting rw explicitly would result in ro in
most cases -- but with runc 1.2 the mount will always be rw even if
the user didn't explicitly request it which most users would find
surprising). By the way, this "always set rw" behaviour is a departure
from Docker and it is not necesssary.

Signed-off-by: rcmadhankumar <madhankumar.chellamuthu@suse.com>
2025-04-23 17:18:03 +05:30
Ricardo Branco c1ad54f89a
hack/bats: Allow specifying PODMAN_ROOTLESS_USER
Signed-off-by: Ricardo Branco <rbranco@suse.de>
2025-04-23 13:44:06 +02:00
Doug Rabson 0463ad12cb libpod: fix a confusing error message from 'podman system reset' on FreeBSD
This was discovered by a user while testing Podman on FreeBSD
(oci-playground/freebsd-podman-testing/issues/17). The error message
didn't stop 'podman system reset' from working and this commit simply
suppressses the error on FreeBSD.

Signed-off-by: Doug Rabson <dfr@rabson.org>
2025-02-11 15:13:29 +00:00
2061 changed files with 46985 additions and 120555 deletions

View File

@ -31,7 +31,7 @@ env:
DEBIAN_NAME: "debian-13"
# Image identifiers
IMAGE_SUFFIX: "c20250422t130822z-f42f41d13"
IMAGE_SUFFIX: "c20250627t155202z-f42f41d13"
# EC2 images
FEDORA_AMI: "fedora-aws-${IMAGE_SUFFIX}"
@ -856,6 +856,8 @@ podman_machine_windows_task:
Get-Volume
main_script: ".\\repo\\contrib\\cirrus\\win-podman-machine-main.ps1"
always:
wsl_logs_artifacts:
path: ./*.zip
# Required for `contrib/cirrus/logformatter` to work properly
html_artifacts:
path: ./*.html

158
.github/workflows/dev-bump.yml vendored Normal file
View File

@ -0,0 +1,158 @@
name: Bump to -dev version
on:
push:
tags:
- '*'
jobs:
bump:
name: Bump to -dev
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
ref: ${{ github.ref_name }}
token: ${{ secrets.PODMANBOT_TOKEN }}
- name: Bump
id: bump
run: |
ref=${{ github.ref_name }}
version=${ref#v}
if [[ $version == *-rc* ]]; then
devbump="${version%-*}-dev"
echo "::notice:: is a rc - bumping z down to $devbump"
else
arr=($(echo "$version" | tr . '\n'))
arr[2]=$((${arr[2]}+1))
devbump="$(IFS=. ; echo "${arr[*]}")-dev"
echo "::notice:: bumping z up to $devbump"
fi
sed -i "s/const RawVersion = ".*"/const RawVersion = \"${devbump}\"/g" version/rawversion/version.go
echo "devbump=$devbump" >> $GITHUB_OUTPUT
- name: Push
run: |
# Make committer the user who triggered the action, either through cutting a release or manual trigger
# GitHub gives everyone a noreply email associated with their account, use that email for the sign-off
git config --local user.name ${{ github.actor }}
git config --local user.email "${{ github.actor_id }}+${{ github.actor }}@users.noreply.github.com"
bumpbranch="bump-${{ steps.bump.outputs.devbump }}"
git checkout -b $bumpbranch
git add version/rawversion/version.go
git commit --signoff -m "Bump Podman to v${{ steps.bump.outputs.devbump }}"
git remote add podmanbot https://github.com/podmanbot/podman
git push -f podmanbot "$bumpbranch"
- name: Check open PRs
id: checkpr
env:
GH_TOKEN: ${{ secrets.PODMANBOT_TOKEN }}
run: |
prs=$(gh pr list \
--repo ${{ github.repository }} \
--head bump-${{ steps.bump.outputs.devbump }} \
--state open \
--json title \
--jq 'length')
if ((prs > 0)); then
echo "SKIPPING: PR already exists to update from ${{ github.ref_name }}."
else
echo "prexists=false" >> "$GITHUB_OUTPUT"
fi
- name: Open PR
if: steps.checkpr.outputs.prexists == 'false'
id: pr
run: |
bumpbranch="bump-${{ steps.bump.outputs.devbump }}"
ref=${{ github.ref_name }}
base=${ref%.*}
body=$(printf '```release-note\nNone\n```\n')
gh pr create \
--title "Bump Podman to v${{ steps.bump.outputs.devbump }}" \
--body "$body" \
--head "podmanbot:$bumpbranch" \
--base "$base" \
--repo ${{ github.repository }}
env:
GH_TOKEN: ${{ secrets.PODMANBOT_TOKEN }}
mainbump:
name: Bump on main
runs-on: ubuntu-latest
env:
GH_TOKEN: ${{ github.token }}
steps:
- uses: actions/checkout@v4
with:
ref: main
token: ${{ secrets.PODMANBOT_TOKEN }}
- name: Check version on main
id: check
run: |
mainvers=`grep -P '(?<=const RawVersion = ")(\d.\d)' -o version/rawversion/version.go`
ref=${{ github.ref_name }}
releasevers=${ref#v}
if echo "${mainvers},${releasevers}" | tr ',' '\n' | sort -V -C
then
echo "bump=true" >> $GITHUB_OUTPUT
echo "Main is lower than release, so we need to bump main"
else
echo "::notice:: SKIPPING: Main is higher than release, no need to bump"
fi
- name: Bump main
id: bump
if: steps.check.outputs.bump == 'true'
run: |
ref=${{ github.ref_name }}
releasevers=${ref#v}
arr=($(echo "$releasevers" | tr . '\n'))
arr[1]=$((${arr[1]}+1))
arr[2]=0
devbump="$(IFS=. ; echo "${arr[*]}")-dev"
echo "::notice:: Bumping main to: $devbump"
sed -i "s/const RawVersion = \".*\"/const RawVersion = \"$devbump\"/g" version/rawversion/version.go
echo "devbump=$devbump" >> $GITHUB_OUTPUT
- name: Push
if: steps.check.outputs.bump == 'true'
run: |
# Make committer the user who triggered the action, either through cutting a release or manual trigger
# GitHub gisves everyone a noreply email associated with their account, use that email for the sign-off
git config --local user.name ${{ github.actor }}
git config --local user.email "${{ github.actor_id }}+${{ github.actor }}@users.noreply.github.com"
bumpbranch="bump-main-${{ steps.bump.outputs.devbump }}"
git checkout -b $bumpbranch
git add version/rawversion/version.go
git commit --signoff -m "Bump main to v${{ steps.bump.outputs.devbump }}"
git remote add podmanbot https://github.com/podmanbot/podman
git push -f podmanbot "$bumpbranch"
- name: Check open PRs
id: checkpr
if: steps.check.outputs.bump == 'true'
env:
GH_TOKEN: ${{ secrets.PODMANBOT_TOKEN }}
run: |
prs=$(gh pr list \
--repo ${{ github.repository }} \
--head bump-main-${{ steps.bump.outputs.devbump }} \
--state open \
--json title \
--jq 'length')
if ((prs > 0)); then
echo "SKIPPING: PR already exists to update to ${{ steps.bump.outputs.devbump }}."
else
echo "prexists=false" >> "$GITHUB_OUTPUT"
fi
- name: Open PR
if: steps.check.outputs.bump == 'true' && steps.checkpr.outputs.prexists == 'false'
run: |
bumpbranch="bump-main-${{ steps.bump.outputs.devbump }}"
body=$(printf '```release-note\nNone\n```\n')
gh pr create \
--title "Bump main to v${{ steps.bump.outputs.devbump }}" \
--body "$body" \
--head "podmanbot:$bumpbranch" \
--base "main" \
--repo ${{ github.repository }}
env:
GH_TOKEN: ${{ secrets.PODMANBOT_TOKEN }}

View File

@ -1,97 +0,0 @@
name: Build FCOS image with packages from rhcontainerbot/podman-next
on:
push:
branches:
- main
# Run everyday at midnight and pull the latest packages from the copr
schedule:
- cron: '0 0 * * *'
env:
IMAGE_NAME: fcos
# IMAGE_ARCHS has to be comma separated
IMAGE_ARCHS: amd64, arm64
IMAGE_REGISTRY: quay.io/podman
COPR_OWNER: rhcontainerbot
COPR_PROJECT: podman-next
jobs:
fcos-podman-next-image-build:
runs-on: ubuntu-latest
steps:
- name: Install qemu dependency
run: |
sudo apt update
sudo apt -y install qemu-user-static
- name: Set up wait-for-copr
# Do not run on scheduled nightly builds
if: ${{ github.event_name != 'schedule' }}
run: |
pip3 install git+https://github.com/packit/wait-for-copr.git@main
- name: Check out code
uses: actions/checkout@v4
- name: Get short SHA from HEAD
run: echo "SHORT_SHA=$(git rev-parse --short HEAD)" >> "$GITHUB_ENV"
id: short_sha
- name: Wait for successful podman-next build with the latest commit
# Do not run on scheduled nightly builds
if: ${{ github.event_name != 'schedule' }}
run: |
# TODO: add this in the Containerfile itself or as a --build-arg
wait-for-copr --owner ${{ env.COPR_OWNER }} --project ${{ env.COPR_PROJECT }} podman ${{ env.SHORT_SHA }}
echo "podman-next build successful."
- name: Build FCOS Image
id: build_image_multiarch
# Ref: https://github.com/redhat-actions/buildah-build
uses: redhat-actions/buildah-build@v2
with:
image: ${{ env.IMAGE_NAME }}
tags: ${{ env.COPR_PROJECT }} podman-${{ env.SHORT_SHA }}
archs: ${{ env.IMAGE_ARCHS }}
containerfiles: ./contrib/podman-next/fcos-podmanimage/Containerfile
labels: |
org.opencontainers.image.title=fcos-podman-next image
org.opencontainers.image.source=https://raw.githubusercontent.com/${{ github.repository }}/${{ github.sha }}/contrib/podman-next/fcos-podmanimage/Containerfile
org.opencontainers.image.url=https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}
org.opencontainers.image.description=FCOS image with rpms from rhcontainerbot/podman-next copr
org.opencontainers.image.revision=${{ github.sha }}
- name: Echo Outputs
run: |
echo "Image: ${{ steps.build_image_multiarch.outputs.image }}"
echo "Tags: ${{ steps.build_image_multiarch.outputs.tags }}"
echo "Tagged Image: ${{ steps.build_image_multiarch.outputs.image-with-tag }}"
- name: Check images created
run: buildah images | grep '${{ env.IMAGE_NAME }}'
- name: Check image metadata
run: |
set -x
# COPR_PROJECT envvar is used for the `podman-next` floating tag
buildah inspect ${{ steps.build_image_multiarch.outputs.image }}:${{ env.COPR_PROJECT }} | jq ".OCIv1.architecture"
buildah inspect ${{ steps.build_image_multiarch.outputs.image }}:${{ env.COPR_PROJECT }} | jq ".Docker.architecture"
buildah inspect ${{ steps.build_image_multiarch.outputs.image }}:podman-${{ env.SHORT_SHA }} | jq ".OCIv1.architecture"
buildah inspect ${{ steps.build_image_multiarch.outputs.image }}:podman-${{ env.SHORT_SHA }} | jq ".Docker.architecture"
- name: Run image
run: podman run --privileged --rm ${{ steps.build_image_multiarch.outputs.image-with-tag }} podman system info
- name: Push to Quay
id: push-to-quay
# Ref: https://github.com/redhat-actions/push-to-registry
uses: redhat-actions/push-to-registry@v2
with:
image: ${{ env.IMAGE_NAME }}
tags: ${{ steps.build_image_multiarch.outputs.tags }}
registry: ${{ env.IMAGE_REGISTRY }}
username: ${{ secrets.QUAY_PODMAN_USERNAME }}
password: ${{ secrets.QUAY_PODMAN_PASSWORD }}

View File

@ -2,11 +2,6 @@ name: "Machine OS PR"
on:
pull_request_target:
# prevent action from running on older release-process branches
# TODO: remove when we move to new release flow
branches:
- 'v5.5'
- 'main'
paths:
- 'version/rawversion/version.go'
@ -32,10 +27,15 @@ jobs:
- name: Get version
id: getversion
run: |
VERSION=$(curl "https://raw.githubusercontent.com/$PODMAN_REPO/$SHA/version/rawversion/version.go" | sed -n 's/^const RawVersion = \"\(.*\)\"$/\1/p')
VERSION=$(curl "https://raw.githubusercontent.com/$PODMAN_REPO/$SHA/version/rawversion/version.go" | sed -n 's/^const RawVersion = \"\([0-9]\+\.[0-9]\+\.[0-9]\+\(-rc[0-9]\+\|-dev\)\?\)"$/\1/p')
# ignore -dev version bumps unless on main
if [[ ${{github.base_ref}} != "main" ]] && [[ $VERSION == *-dev ]] ; then
echo "::warning:: SKIPPING: dev bump not on main"
if [[ -z "$VERSION" ]] ; then
echo "::error:: Invalid version string"
exit 1
elif [[ $VERSION == *-dev ]] ; then
echo "::warning:: SKIPPING: dev bump"
elif [[ ${{github.base_ref}} == "main" ]] ; then
echo "::warning:: SKIPPING: main branch"
elif [[ ${{github.base_ref}} == *-rhel ]] ; then
echo "::warning:: SKIPPING: rhel branch"
else
@ -75,9 +75,11 @@ jobs:
- name: Bump version
if: steps.getversion.outputs.update == 'true'
env:
VERS: ${{steps.getversion.outputs.version}}
run: |
echo ${{steps.getversion.outputs.version}}
sed -i 's/export PODMAN_VERSION=".*"/export PODMAN_VERSION="${{steps.getversion.outputs.version}}"/g' podman-rpm-info-vars.sh
update=$(printf 's/export PODMAN_VERSION=".*"/export PODMAN_VERSION="%s"/g\n' "$VERS")
sed -i "$update" podman-rpm-info-vars.sh
sed -i 's/export PODMAN_PR_NUM=".*"/export PODMAN_PR_NUM="${{github.event.number}}"/g' podman-rpm-info-vars.sh
echo "Updated file:"
cat podman-rpm-info-vars.sh
@ -128,9 +130,11 @@ jobs:
id: pr
run: |
bumpbranch="pr${{github.event.number}}"
body=$(printf 'Triggered by https://github.com/%s/pull/%s\n\n```release-note\nRelease v%s\n```\n' \
"$PODMAN_REPO" "${{github.event.number}}" "${{ steps.getversion.outputs.version }}")
uri=`gh pr create \
--title "Bump Podman to v${{ steps.getversion.outputs.version }}" \
--body "Triggered by https://github.com/$PODMAN_REPO/pull/${{github.event.number}}" \
--body "$body" \
--head "podmanbot:$bumpbranch" \
--base "${{github.base_ref}}" \
--repo $UPSTREAM_MACHINE_OS`

View File

@ -1,24 +0,0 @@
# Upstream: github.com/tzkhan/pr-update-action
name: "PR title check"
on:
pull_request_target:
branches:
- "!master" # causes errors; reason unknown
permissions:
contents: read
jobs:
update_pr:
permissions:
pull-requests: write # for tzkhan/pr-update-action to update PRs
runs-on: ubuntu-latest
steps:
- uses: tzkhan/pr-update-action@bbd4c9395df8a9c4ef075b8b7fe29f2ca76cdca9 # v2
with:
repo-token: "${{ secrets.GITHUB_TOKEN }}"
base-branch-regex: '^(?!master).*$'
title-template: '[%basebranch%]'
title-prefix-space: true

View File

@ -144,6 +144,9 @@ jobs:
windows-installer:
name: Build Windows Installer
strategy:
matrix:
arch: [amd64, arm64]
runs-on: windows-latest
needs: [check, build-artifacts]
env:
@ -198,13 +201,29 @@ jobs:
}
Pop-Location
Exit $code
- name: Display structure of downloaded files
env:
PODMAN_ARCH: ${{ matrix.arch }}
- name: Display structure of built files
run: |
Push-Location contrib\win-installer
Get-ChildItem
Pop-Location
- name: Artifact
- name: Rename the installer
run: |
Push-Location contrib\win-installer
Copy-Item -Path podman-${{steps.getversion.outputs.version}}-setup.exe -Destination podman-installer-windows-${{ matrix.arch }}.exe
Pop-Location
- name: Upload the installer
uses: actions/upload-artifact@v4
with:
name: win-installer-${{ matrix.arch }}
path: |
.\contrib\win-installer\podman-installer-windows-${{ matrix.arch }}.exe
# For backwards compatibility, we also upload the amd64 windows
# installer using the old name
- name: Upload the installer (legacy)
uses: actions/upload-artifact@v4
if: ${{ matrix.arch == 'amd64' }}
with:
name: win-installer
path: |
@ -245,6 +264,8 @@ jobs:
run: |
mv win-installer/* release-artifacts
mv mac-installers/* release-artifacts
mv win-installer-amd64/* release-artifacts
mv win-installer-arm64/* release-artifacts
pushd release-artifacts
sha256sum * > shasums
popd
@ -324,3 +345,12 @@ jobs:
to: Podman List <podman@lists.podman.io>
from: ${{secrets.ACTION_MAIL_SENDER}}
body: file://./email_body.txt
updatepodmanio:
name: Update podman.io
uses: ./.github/workflows/update-podmanio.yml
needs: [check, release]
if: needs.check.outputs.buildonly == 'false'
secrets: inherit
with:
version: ${{ needs.check.outputs.version }}

View File

@ -6,7 +6,16 @@ on:
workflow_dispatch:
inputs:
version:
description: 'Release version to build and upload (e.g. "v9.8.7")'
description: 'Release version to bump on podman.io'
required: true
workflow_call:
inputs:
version:
description: 'Release version to bump on podman.io'
type: string
required: true
secrets:
PODMANBOT_TOKEN:
required: true
jobs:

View File

@ -5,6 +5,27 @@
downstream_package_name: podman
upstream_tag_template: v{version}
# These files get synced from upstream to downstream (Fedora / CentOS Stream) on every
# propose-downstream job. This is done so tests maintained upstream can be run
# downstream in Zuul CI and Bodhi.
# Ref: https://packit.dev/docs/configuration#files_to_sync
files_to_sync:
- src: rpm/gating.yaml
dest: gating.yaml
delete: true
- src: plans/
dest: plans/
delete: true
mkpath: true
- src: test/tmt/
dest: test/tmt/
delete: true
mkpath: true
- src: .fmf/
dest: .fmf/
delete: true
- .packit.yaml
packages:
podman-fedora:
pkg_tool: fedpkg
@ -15,6 +36,9 @@ packages:
podman-eln:
specfile_path: rpm/podman.spec
# Disable automatic merging for Copr builds (and subsequent Testing Farm)
merge_pr_in_ci: false
srpm_build_deps:
- git-archive-all
- make
@ -32,10 +56,11 @@ jobs:
message: "[NON-BLOCKING] Packit jobs failed. @containers/packit-build please check. Everyone else, feel free to ignore."
enable_net: true
targets:
- fedora-latest-stable-x86_64
- fedora-latest-stable-aarch64
- fedora-development-x86_64
- fedora-development-aarch64
- fedora-all-x86_64
- fedora-all-aarch64
# Re-enable these scans if OpenScanHub starts scanning go packages
# https://packit.dev/posts/openscanhub-prototype
osh_diff_scan_after_copr_build: false
# Ignore until golang is updated in distro buildroot to go 1.23.3+
- job: copr_build
@ -75,6 +100,20 @@ jobs:
project: podman-next
enable_net: true
# Tests on Fedora
- job: tests
trigger: pull_request
packages: [podman-fedora]
notifications: *packit_generic_failure_notification
targets:
- fedora-all
tmt_plan: "/plans/system/*"
tf_extra_params:
environments:
- artifacts:
- type: repository-file
id: https://copr.fedorainfracloud.org/coprs/rhcontainerbot/podman-next/repo/fedora-$releasever/rhcontainerbot-podman-next-fedora-$releasever.repo
- job: tests
identifier: cockpit-revdeps
trigger: pull_request
@ -103,13 +142,6 @@ jobs:
dist_git_branches: &fedora_targets
- fedora-all
- job: propose_downstream
trigger: release
update_release: false
packages: [podman-centos]
dist_git_branches:
- c10s
- job: koji_build
trigger: commit
packages: [podman-fedora]

View File

@ -21,6 +21,7 @@ repos:
- id: check-executables-have-shebangs
- id: check-merge-conflict
- id: check-yaml
exclude: rpm/gating.yaml
- repo: https://github.com/codespell-project/codespell
# Configuration for codespell is in .codespellrc
rev: v2.4.1

View File

@ -117,6 +117,10 @@ Pull requests that change the vendor/ directory directly will not be accepted.
Instead, changes should be submitted to the original package (defined by the path in `vendor/`; for example, `vendor/github.com/containers/storage` is the [containers/storage library](https://github.com/containers/storage/).
Once the changes have been merged into the original package, Podman's vendor directory can be updated by using `go get` on the appropriate version of the package, then running `make vendor` or `make vendor-in-container`.
## Codebase structure
Description about important directories in our repository is found [here](./docs/CODE_STRUCTURE.md).
## Testing
Podman provides an extensive suite of regression tests in the `test/` directory.
@ -236,7 +240,7 @@ Its important to describe the change in plain English for the reviewer to ver
Solve only one problem per patch.
If your description starts to get long, thats a sign that you probably need to split up your patch.
If the patch fixes a logged bug entry, refer to that bug entry by number and URL.
If the patch fixes a logged bug entry, refer to that bug entry by number or URL.
If the patch follows from a mailing list discussion, give a URL to the mailing list archive.
Please format these lines as `Fixes:` followed by the URL or, for Github bugs, the bug number preceded by a #.
For example:

View File

@ -174,7 +174,7 @@ Emeritus Maintainers have no responsibilities or requirements beyond those of an
# Maintainers File
The definitive source of truth for maintainers of a repository is the MAINTAINERS.md file in that repository. The [MAINTAINERS.md](./MAINTAINERS.md) file in the main Podman repository is used for project-spanning roles, including Core Maintainer and Community Manager. Some repositories in the project will also have an OWNERS file, used by the CI system to map users to roles. Any changes to the [OWNERS](./OWNERS) file must make a corresponding change to the [MAINTAINERS.md](./MAINTAINERS.md) file to ensure that file maintains up to date. Most changes to MAINTAINERS.md will require a change to the repositorys OWNERS file (e.g. adding a Reviewer) but some will not (e.g. promoting a Maintainer to a Core Maintainer, which comes with no additional CI-related privileges).
The definitive source of truth for maintainers of this repository is the local [MAINTAINERS.md](./MAINTAINERS.md) file. The [MAINTAINERS.md](./MAINTAINERS.md) file in the main Podman repository is used for project-spanning roles, including Core Maintainer and Community Manager. Some repositories in the project will also have a local [OWNERS](./OWNERS) file, which the CI system uses to map users to roles. Any changes to the [OWNERS](./OWNERS) file must make a corresponding change to the [MAINTAINERS.md](./MAINTAINERS.md) file to ensure that file remains up to date. Most changes to [MAINTAINERS.md](./MAINTAINERS.md) will require a change to the repositorys [OWNERS](./OWNERS) file (e.g., adding a Reviewer), but some will not (e.g., promoting a Maintainer to a Core Maintainer, which comes with no additional CI-related privileges).
---

View File

@ -3,6 +3,9 @@
[GOVERNANCE.md](https://github.com/containers/podman/blob/main/GOVERNANCE.md)
describes the Podman project's governance and the Project Roles used below.
Please note that this file only includes Podman's Maintainers and Reviewers.
Maintainers and Reviewers for the Skopeo and Buildah projects are found in their respective repository's MAINTAINERS.md files.
## Maintainers
| Maintainer | GitHub ID | Project Roles | Affiliation |
@ -13,7 +16,8 @@ describes the Podman project's governance and the Project Roles used below.
| Paul Holzinger | [Luap99](https://github.com/Luap99) | Core Maintainer | [Red Hat](https://github.com/RedHatOfficial) |
| Giuseppe Scrivano | [giuseppe](https://github.com/giuseppe) | Core Maintainer | [Red Hat](https://github.com/RedHatOfficial) |
| Miloslav Trmač | [mtrmac](https://github.com/mtrmac) | Core Maintainer | [Red Hat](https://github.com/RedHatOfficial) |
| Neil Smith | [Neil-Smith](https://github.com/Neil-Smith) | Community Manager | [Red Hat](https://github.com/RedHatOfficial) |
| Mohan Boddu | [mohanboddu](https://github.com/mohanboddu) | Community Manager | [Red Hat](https://github.com/RedHatOfficial) |
| Neil Smith | [actionmancan](https://github.com/actionmancan) | Community Manager | [Red Hat](https://github.com/RedHatOfficial) |
| Tom Sweeney | [TomSweeneyRedHat](https://github.com/TomSweeneyRedHat/) | Maintainer and Community Manager | [Red Hat](https://github.com/RedHatOfficial) |
| Ygal Blum | [ygalblum](https://github.com/ygalblum) | Maintainer | [Red Hat](https://github.com/RedHatOfficial) |
| Ashley Cui | [ashley-cui](https://github.com/ashley-cui) | Maintainer | [Red Hat](https://github.com/RedHatOfficial) |
@ -22,10 +26,14 @@ describes the Podman project's governance and the Project Roles used below.
| Jake Correnti | [jakecorrenti](https://github.com/jakecorrenti) | Reviewer | [Red Hat](https://github.com/RedHatOfficial) |
| Jason Greene | [n1hility](https://github.com/n1hility) | Reviewer | [Red Hat](https://github.com/RedHatOfficial) |
| Jhon Honce | [jwhonce](https://github.com/jwhonce) | Reviewer | [Red Hat](https://github.com/RedHatOfficial) |
| Jan Kaluza | [jankaluza](https://github.com/jankaluza) | Reviewer | [Red Hat](https://github.com/RedHatOfficial) |
| Craig Loewen | [craigloewen-msft](https://github.com/craigloewen-msft) | Reviewer | [Microsoft](https://github.com/microsoft) |
| Urvashi Mohnani | [umohnani8](https://github.com/umohnani8) | Reviewer | [Red Hat](https://github.com/RedHatOfficial) |
| Aditya Rajan | [flouthoc](https://github.com/flouthoc) | Reviewer | [Red Hat](https://github.com/RedHatOfficial) |
| Jan Rodák | [Honny1](https://github.com/Honny1) | Reviewer | [Red Hat](https://github.com/RedHatOfficial) |
| Valentin Rothberg | [vrothberg](https://github.com/vrothberg) | Reviewer | [Red Hat](https://github.com/RedHatOfficial) |
| Lewis Roy | [ninja-quokka](https://github.com/ninja-quokka) | Reviewer | [Red Hat](https://github.com/RedHatOfficial) |
| Nicola Sella | [inknos](https://github.com/inknos) | Reviewer | [Red Hat](https://github.com/RedHatOfficial) |
| Dan Walsh | [rhatdan](https://github.com/rhatdan) | Reviewer | [Red Hat](https://github.com/RedHatOfficial) |
## Alumni

View File

@ -25,6 +25,15 @@ SHELL := $(shell command -v bash;)
GO ?= go
GO_LDFLAGS:= $(shell if $(GO) version|grep -q gccgo ; then echo "-gccgoflags"; else echo "-ldflags"; fi)
GOCMD = CGO_ENABLED=$(CGO_ENABLED) GOOS=$(GOOS) GOARCH=$(GOARCH) $(GO)
# Podman does not work w/o CGO_ENABLED, except in some very specific cases.
# Windows and Mac (both podman-remote client only) require CGO_ENABLED=0.
CGO_ENABLED ?= 1
# Default to the native OS type and architecture unless otherwise specified
NATIVE_GOOS := $(shell env -u GOOS $(GO) env GOOS)
GOOS ?= $(call err_if_empty,NATIVE_GOOS)
# Default to the native architecture type
NATIVE_GOARCH := $(shell env -u GOARCH $(GO) env GOARCH)
GOARCH ?= $(NATIVE_GOARCH)
COVERAGE_PATH ?= .coverage
DESTDIR ?=
EPOCH_TEST_COMMIT ?= $(shell git merge-base $${DEST_BRANCH:-main} HEAD)
@ -43,16 +52,16 @@ ETCDIR ?= /etc
LIBDIR ?= ${PREFIX}/lib
TMPFILESDIR ?= ${LIBDIR}/tmpfiles.d
USERTMPFILESDIR ?= ${PREFIX}/share/user-tmpfiles.d
MODULESLOADDIR ?= ${LIBDIR}/modules-load.d
SYSTEMDDIR ?= ${LIBDIR}/systemd/system
USERSYSTEMDDIR ?= ${LIBDIR}/systemd/user
SYSTEMDGENERATORSDIR ?= ${LIBDIR}/systemd/system-generators
USERSYSTEMDGENERATORSDIR ?= ${LIBDIR}/systemd/user-generators
REMOTETAGS ?= remote exclude_graphdriver_btrfs btrfs_noversion containers_image_openpgp
REMOTETAGS ?= remote exclude_graphdriver_btrfs containers_image_openpgp
BUILDTAGS ?= \
grpcnotrace \
$(shell hack/apparmor_tag.sh) \
$(shell hack/btrfs_installed_tag.sh) \
$(shell hack/btrfs_tag.sh) \
$(shell hack/sqlite_tag.sh) \
$(shell hack/systemd_tag.sh) \
$(shell hack/libsubid_tag.sh) \
$(if $(filter linux,$(GOOS)), seccomp,)
@ -61,7 +70,7 @@ BUILDTAGS += ${EXTRA_BUILDTAGS}
# N/B: This value is managed by Renovate, manual changes are
# possible, as long as they don't disturb the formatting
# (i.e. DO NOT ADD A 'v' prefix!)
GOLANGCI_LINT_VERSION := 2.1.2
GOLANGCI_LINT_VERSION := 2.2.2
PYTHON ?= $(shell command -v python3 python|head -n1)
PKG_MANAGER ?= $(shell command -v dnf yum|head -n1)
# ~/.local/bin is not in PATH on all systems
@ -83,7 +92,7 @@ endif
# and except anything in a dot subdirectory. If any of these files is
# newer than our target (bin/podman{,-remote}), a rebuild is
# triggered.
SOURCES = $(shell find . -path './.*' -prune -o \( \( -name '*.go' -o -name '*.c' \) -a ! -name '*_test.go' \) -print)
SOURCES = $(shell find . -path './.*' -prune -o \( \( -name '*.go' -o -name '*.c' \) -a ! -name '*_test.go' \) -print) Makefile
BUILDTAGS_CROSS ?= containers_image_openpgp exclude_graphdriver_btrfs exclude_graphdriver_overlay
CONTAINER_RUNTIME := $(shell command -v podman 2> /dev/null || echo docker)
@ -179,15 +188,6 @@ CROSS_BUILD_TARGETS := \
# Dereference variable $(1), return value if non-empty, otherwise raise an error.
err_if_empty = $(if $(strip $($(1))),$(strip $($(1))),$(error Required variable $(1) value is undefined, whitespace, or empty))
# Podman does not work w/o CGO_ENABLED, except in some very specific cases.
# Windows and Mac (both podman-remote client only) require CGO_ENABLED=0.
CGO_ENABLED ?= 1
# Default to the native OS type and architecture unless otherwise specified
NATIVE_GOOS := $(shell env -u GOOS $(GO) env GOOS)
GOOS ?= $(call err_if_empty,NATIVE_GOOS)
# Default to the native architecture type
NATIVE_GOARCH := $(shell env -u GOARCH $(GO) env GOARCH)
GOARCH ?= $(NATIVE_GOARCH)
ifeq ($(call err_if_empty,GOOS),windows)
BINSFX := .exe
SRCBINDIR := bin/windows
@ -362,7 +362,7 @@ $(IN_CONTAINER): %-in-container:
$(PODMANCMD) run --rm --env HOME=/root \
-v $(CURDIR):/src -w /src \
--security-opt label=disable \
docker.io/library/golang:1.22 \
quay.io/libpod/validatepr:latest \
make $(*)
@ -479,21 +479,7 @@ podman-testing: bin/podman-testing
.PHONY: generate-bindings
generate-bindings: .install.golangci-lint
ifneq ($(GOOS),darwin)
$(GOCMD) generate ./pkg/bindings/... ;
endif
# DO NOT USE: use local-cross instead
bin/podman.cross.%:
TARGET="$*"; \
GOOS="$${TARGET%%.*}"; \
GOARCH="$${TARGET##*.}"; \
CGO_ENABLED=0 \
$(GO) build \
$(BUILDFLAGS) \
$(GO_LDFLAGS) '$(LDFLAGS_PODMAN)' \
-tags '$(BUILDTAGS_CROSS)' \
-o "$@" ./cmd/podman
.PHONY: local-cross
local-cross: $(CROSS_BUILD_TARGETS) ## Cross compile podman binary for multiple architectures
@ -771,7 +757,7 @@ system.test-binary: .install.ginkgo
$(GO) test -c ./test/system
.PHONY: test-binaries
test-binaries: test/checkseccomp/checkseccomp test/goecho/goecho install.catatonit test/version/version
test-binaries: test/checkseccomp/checkseccomp test/goecho/goecho test/version/version
@echo "Canonical source version: $(call err_if_empty,RELEASE_VERSION)"
.PHONY: tests-included
@ -848,13 +834,12 @@ podman-remote-release-%.zip: test/version/version ## Build podman-remote for %=$
$(MAKE) $(GOPLAT) podman-remote; \
fi
if [[ "$(GOOS)" == "windows" ]]; then \
$(MAKE) $(GOPLAT) TMPDIR="" win-gvproxy; \
$(MAKE) $(GOPLAT) TMPDIR="" win-gvproxy-$(GOARCH); \
fi
if [[ "$(GOOS)" == "darwin" ]]; then \
$(MAKE) $(GOPLAT) podman-mac-helper;\
fi
cp -r ./docs/build/remote/$(GOOS) "$(tmpsubdir)/$(releasedir)/docs/"
cp ./contrib/remote/containers.conf "$(tmpsubdir)/$(releasedir)/"
$(MAKE) $(GOPLAT) $(_dstargs) SELINUXOPT="" install.remote
cd "$(tmpsubdir)" && \
zip --recurse-paths "$(CURDIR)/$@" "./$(releasedir)"
@ -863,10 +848,15 @@ podman-remote-release-%.zip: test/version/version ## Build podman-remote for %=$
# Downloads pre-built gvproxy and win-sshproxy helpers. See comment on GVPROXY_VERSION declaration
.PHONY: win-gvproxy
win-gvproxy: test/version/version
win-gvproxy: win-gvproxy-amd64 # Keep this target for backwards compatibility
win-gvproxy-%: test/version/version
$(eval GOARCH := $*)
$(eval GVPROXY_FILENAME := $(if $(filter arm64,$(GOARCH)), gvproxy-windows-arm64.exe,gvproxy-windowsgui.exe))
$(eval SSHPROXY_FILENAME := $(if $(filter arm64,$(GOARCH)), win-sshproxy-arm64.exe, win-sshproxy.exe))
mkdir -p bin/windows/
curl -sSL -o bin/windows/gvproxy.exe --retry 5 https://github.com/containers/gvisor-tap-vsock/releases/download/$(GVPROXY_VERSION)/gvproxy-windowsgui.exe
curl -sSL -o bin/windows/win-sshproxy.exe --retry 5 https://github.com/containers/gvisor-tap-vsock/releases/download/$(GVPROXY_VERSION)/win-sshproxy.exe
curl -sSL -o bin/windows/gvproxy.exe --retry 5 https://github.com/containers/gvisor-tap-vsock/releases/download/$(GVPROXY_VERSION)/$(GVPROXY_FILENAME)
curl -sSL -o bin/windows/win-sshproxy.exe --retry 5 https://github.com/containers/gvisor-tap-vsock/releases/download/$(GVPROXY_VERSION)/$(SSHPROXY_FILENAME)
.PHONY: rpm
rpm: ## Build rpm packages
@ -888,10 +878,6 @@ rpm-install: package ## Install rpm packages
.PHONY: install
install: install.bin install.remote install.man install.systemd ## Install binaries to system locations
.PHONY: install.catatonit
install.catatonit:
./hack/install_catatonit.sh
.PHONY: install.remote
install.remote:
install ${SELINUXOPT} -d -m 755 $(DESTDIR)$(BINDIR)
@ -931,11 +917,6 @@ install.testing:
install ${SELINUXOPT} -d -m 755 $(DESTDIR)$(BINDIR)
install ${SELINUXOPT} -m 755 bin/podman-testing $(DESTDIR)$(BINDIR)/podman-testing
.PHONY: install.modules-load
install.modules-load: # This should only be used by distros which might use iptables-legacy, this is not needed on RHEL
install ${SELINUXOPT} -m 755 -d $(DESTDIR)${MODULESLOADDIR}
install ${SELINUXOPT} -m 644 contrib/modules-load.d/podman-iptables.conf $(DESTDIR)${MODULESLOADDIR}/podman-iptables.conf
.PHONY: install.man
install.man:
install ${SELINUXOPT} -d -m 755 $(DESTDIR)$(MANDIR)/man1
@ -1060,6 +1041,8 @@ release-artifacts: clean-binaries
mv podman-remote-release-darwin_arm64.zip release/
$(MAKE) podman-remote-release-windows_amd64.zip
mv podman-remote-release-windows_amd64.zip release/
$(MAKE) podman-remote-release-windows_arm64.zip
mv podman-remote-release-windows_arm64.zip release/
$(MAKE) podman-remote-static-linux_amd64
tar -cvzf podman-remote-static-linux_amd64.tar.gz bin/podman-remote-static-linux_amd64
$(MAKE) podman-remote-static-linux_arm64
@ -1078,11 +1061,7 @@ uninstall:
rm -f $(DESTDIR)$(BINDIR)/podman
rm -f $(DESTDIR)$(BINDIR)/podman-remote
# Remove related config files
rm -f $(DESTDIR)${ETCDIR}/cni/net.d/87-podman-bridge.conflist
rm -f $(DESTDIR)${TMPFILESDIR}/podman.conf
rm -f $(DESTDIR)${SYSTEMDDIR}/io.podman.socket
rm -f $(DESTDIR)${USERSYSTEMDDIR}/io.podman.socket
rm -f $(DESTDIR)${SYSTEMDDIR}/io.podman.service
rm -f $(DESTDIR)${SYSTEMDDIR}/podman.service
rm -f $(DESTDIR)${SYSTEMDDIR}/podman.socket
rm -f $(DESTDIR)${USERSYSTEMDDIR}/podman.socket
@ -1096,7 +1075,6 @@ clean-binaries: ## Remove platform/architecture specific binary files
.PHONY: clean
clean: clean-binaries ## Clean all make artifacts
rm -rf \
_output \
$(wildcard podman-*.msi) \
$(wildcard podman-remote*.zip) \
$(wildcard podman_tmp_*) \
@ -1106,11 +1084,6 @@ clean: clean-binaries ## Clean all make artifacts
test/goecho/goecho \
test/version/version \
test/__init__.py \
test/testdata/redis-image \
libpod/container_ffjson.go \
libpod/pod_ffjson.go \
libpod/container_easyjson.go \
libpod/pod_easyjson.go \
docs/build \
.venv
make -C docs clean

5
OWNERS
View File

@ -16,8 +16,10 @@ reviewers:
- baude
- flouthoc
- giuseppe
- honny1
- Honny1
- inknos
- jakecorrenti
- jankaluza
- jwhonce
- l0rd
- lsm5
@ -25,6 +27,7 @@ reviewers:
- mtrmac
- n1hility
- nalind
- ninja-quokka
- rhatdan
- umohnani8
- vrothberg

View File

@ -4,6 +4,7 @@
![License](https://img.shields.io/badge/License-Apache_2.0-blue.svg)
![GitHub release (latest SemVer)](https://img.shields.io/github/v/release/containers/podman)
[![Go Report Card](https://goreportcard.com/badge/github.com/containers/libpod)](https://goreportcard.com/report/github.com/containers/libpod)
[![OpenSSF Best Practices](https://www.bestpractices.dev/projects/10499/badge)](https://www.bestpractices.dev/projects/10499)
<br/>

View File

@ -1,5 +1,193 @@
# Release Notes
## 5.5.0
### Features
- A new command has been added, `podman machine cp`, to copy files into a running `podman machine` VM.
- A new command has been added, `podman artifact extract`, to copy some or all of the contents of an OCI artifact to a location on disk.
- The `--mount` option to `podman create`, `podman run`, and `podman pod create` now supports a new mount type, `--mount type=artifact`, to mount OCI artifacts into containers.
- The `podman artifact add` command now features two new options, `--append` (to add new files to an existing artifact) and `--file-type` (to specify the MIME type of the file added to the artifact) ([#25884](https://github.com/containers/podman/issues/25884)).
- The `podman artifact rm` command now features a new option, `--all`, to remove all artifacts in the local store.
- The `--filter` option to `podman pause`, `podman ps`, `podman restart`, `podman rm`, `podman start`, `podman stop`, and `podman unpause` now accepts a new filter, `command`, which filters on the first element (`argv[0]`) of the command run in the container.
- The `podman exec` command now supports a new option, `--cidfile`, to specify the ID of the container to exec into via a file ([#21256](https://github.com/containers/podman/issues/21256)).
- The `podman kube generate` and `podman kube play` commands now supports a new annotation, `io.podman.annotation.pids-limit/$containername`, preserving the PID limit for containers across `kube generate` and `kube play` ([#24418](https://github.com/containers/podman/issues/24418)).
- Quadlet `.container` units now support three new keys, `Memory=` (set maximum memory for the created container), `ReloadCmd` (execute a command via systemd `ExecReload`), and `ReloadSignal` (kill the container with the given signal via systemd `ExecReload`) ([#22036](https://github.com/containers/podman/issues/22036)).
- Quadlet `.container`, `.image`, and `.build` units now support two new keys, `Retry` (number of times to retry pulling image on failure) and `RetryDelay` (delay between retries) ([#25109](https://github.com/containers/podman/issues/25109)).
- Quadlet `.pod` units now support a new key, `HostName=`, to set the pod's hostname ([#25639](https://github.com/containers/podman/issues/25639)).
- Quadlet files now support a new option, `UpheldBy`, in the `Install` section, corresponding to the systemd `Upholds` option.
- The names of Quadlet units specified as systemd dependencies are now automatically translated - e.g. `Wants=my.container` is now valid.
- Podman now generates events for the creation and removal of secrets ([#24030](https://github.com/containers/podman/issues/24030)).
- A new global option has been added to Podman, `--cdi-spec-dir`, to specify additional search paths for CDI specs to the CDI loader ([#18292](https://github.com/containers/podman/issues/18292) and [#25691](https://github.com/containers/podman/issues/25691)).
- The `podman build` command now supports a new option, `--inherit-labels` (defaults to true), which controls whether labels are inherited from the base image or base stages.
- The `podman update` command now supports two new options, `--env` and `--unsetenv`, to alter the environment variables of existing containers ([#24875](https://github.com/containers/podman/issues/24875)).
### Breaking Changes
- Due to changes in Docker API types, two small breaking changes have been made in the Go bindings for the REST API. The `containers.Commit()` function now returns a new struct (`types.IDResponse`) with identical contents, and the `containers.ExecCreate` function's `handlers.ExecCreateConfig` parameter now contains a different embedded struct, potentially requiring changes to how it is assigned to.
### Changes
- Podman now requires at least Go 1.23 to build.
- Healthchecks have been refactored to avoid writing to the database as much as possible, greatly improving performance on systems with many simultaneous healthchecks running.
- Healthchecks now have a new status, `stopped`, which is reported if the container the healthcheck was run on stopped before the check could be completed ([#25276](https://github.com/containers/podman/issues/25276)).
- Containers in pods are now stopped in order based on their dependencies, with the infra container being stopped last, preventing application containers from losing networking before they are stopped due to the infra container stopping prematurely.
- Due to challenges with handling automatic installation, the Windows installer no longer installs WSLv2 or Hyper-V.
- Quadlet will now print warnings when skipping lines to help identify malformed Quadlet files ([#25339](https://github.com/containers/podman/issues/25339)).
- Creating `podman machine` VMs with a host mount over the VM's `/tmp` directory is no longer allowed ([#18230](https://github.com/containers/podman/issues/18230)).
- The `podman logs` command now allows options to be specified after the container name (e.g. `podman logs $containername --follow`) ([#25653](https://github.com/containers/podman/issues/25653)).
- Podman, by default, no longer uses a pause image for pod infra and service containers. Instead, a root filesystem containing only the `catatonit` binary will be used ([#23292](https://github.com/containers/podman/issues/23292)).
- The `podman system reset` command no longer removes the user's `podman.sock` API socket.
- When using Netavark v1.15 and higher, containers in non-default networks will no longer have the default search domain `dns.podman` added. Queries resolving such names will still work.
- Stopping a Quadlet `.network` unit will now delete the network (if no containers are actively using it) ([#23678](https://github.com/containers/podman/issues/23678)).
- For security hardening, the `/proc/interrupts` and `/sys/devices/system/cpu/$CPU/thermal_throttle` paths are now masked by default in containers ([#25634](https://github.com/containers/podman/issues/25634)).
### Bugfixes
- Fixed a bug where healthchecks would still run while a container was paused ([#24590](https://github.com/containers/podman/issues/24590)).
- Fixed a bug where the remote Podman client on Windows could not mount named volumes with a single-character name into containers ([#25218](https://github.com/containers/podman/issues/25218)).
- Fixed a bug where mounting an image could panic when run without `CAP_SYS_ADMIN` ([#25241](https://github.com/containers/podman/issues/25241)).
- Fixed a bug where Podman would not report errors when setting up healthchecks ([#25034](https://github.com/containers/podman/issues/25034)).
- Fixed a bug where the `podman exec` command would not add the additional groups of the user the exec session was run as unless the user was explicitly added with the `--user` option ([#25610](https://github.com/containers/podman/issues/25610)).
- Fixed a bug where errors during the `podman network connect` and `podman network disconnect` commands could create errors in the database which would cause `podman inspect` on the container to fail.
- Fixed a bug where the `podman kube generate` command did not correctly generate YAML for volume mounts using a subpath.
- Fixed a bug where the `podman system df` command could show a negative reclaimable size.
- Fixed a bug where accessing a rootful `podman machine` VM that was not `podman-machine-default` (the default VM) with the `podman machine ssh` command would put the user into the rootless shell ([#25332](https://github.com/containers/podman/issues/25332)).
- Fixed a bug where the `podman machine init` would report nonsensical memory values in error messages when trying to create a machine with more memory than the system.
- Fixed a bug where the remote Podman client's `podman start --attach` command would incorrectly print an error when run on a container created with the `--rm` option ([#25965](https://github.com/containers/podman/issues/25965)).
- Fixed a bug where the remote Podman client's `podman pull` command could hang and leak memory if the server was unexpectedly stopped or encountered an error during a pull.
- Fixed a bug where the remote Podman client's `podman cp` command would, on Windows, often fail to copy files into the container due to improper handling of Windows paths ([#14862](https://github.com/containers/podman/issues/14862)).
- Fixed a bug where the `podman container clone` command did not correctly copy healthcheck settings to the new container ([#21630](https://github.com/containers/podman/issues/21630)).
- Fixed a bug where the `podman kube play` command would fail to start empty pods ([#25786](https://github.com/containers/podman/issues/25786)).
- Fixed a bug where the `podman volume ls` command did not output headers when no volumes were present ([#25911](https://github.com/containers/podman/issues/25911)).
- Fixed a bug where healthcheck configuration provided by a container's image could not be overridden unless the `--health-cmd` option was specified when creating the container ([#20212](https://github.com/containers/podman/issues/20212)).
- Fixed a bug where the `--user` option to `podman create` and `podman run` could not be used with users added to the container by the `--hostuser` option ([#25805](https://github.com/containers/podman/issues/25805)).
- Fixed a bug where the `podman system reset` command on FreeBSD would incorrectly print an error.
- Fixed a bug where stopping the `podman machine start` command with SIGINT could result in machine state being incorrectly set to "Starting" ([#24416](https://github.com/containers/podman/issues/24416)).
- Fixed a bug where the `podman machine start` command would fail when starting a VM with volume mounts containing spaces using the HyperV machine provider ([#25500](https://github.com/containers/podman/issues/25500)).
### API
- Fixed a bug where the Compat Create API for Containers ignored ulimits specified in the request when Podman was run rootless ([#25881](https://github.com/containers/podman/issues/25881)).
### Misc
- Erroneous errors from the `ExecStartAndAttach()` function in the Go bindings for the REST API have been silenced, where the function would incorrectly report errors when stdin was consumed after the exec session was stopped ([#25344](https://github.com/containers/podman/issues/25344)).
- Updated Buildah to v1.40.0
- Updated the containers/common library to v0.63.0
- Updated the containers/image library to v5.35.0
- Updated the containers/storage library to v1.58.0
## 5.4.2
### Bugfixes
- Fixed a bug where the `podman import` command could not import images compressed with algorithms other than gzip ([#25593](https://github.com/containers/podman/issues/25593)).
- Fixed a bug where the `podman cp` command could deadlock when copying into a non-empty volume on a container that is not running ([#25585](https://github.com/containers/podman/issues/25585)).
### API
- Fixed a bug where the default values for some fields in the Libpod Create endpoint for Containers did not have sensible defaults for some healthcheck fields, causing unrestricted log growth for containers which did not set these fields ([#25473](https://github.com/containers/podman/issues/25473)).
### Misc
- Updated vendored Buildah to v1.39.4
- Updated the containers/common library to v0.62.3
- Updated the containers/image library to v5.34.3
- Updated the containers/storage library to v1.57.2
## 5.4.1
### Bugfixes
- Fixed a bug where volume quotas were not being applied ([#25368](https://github.com/containers/podman/issues/25368)).
- Fixed a bug where the `--pid-limit=-1` option did not function properly with containers using the `runc` OCI runtime.
- Fixed a bug where the `podman artifact pull` command did not respect the `--retry-delay` option.
- Fixed a bug where Podman would leak a file and directory for every container created.
- Fixed a bug where the `podman wait` command would sometimes error when waiting for a container set to auto-remove.
- Fixed a bug where Quadlet `.kube` units would not report an error (and stay running) even when a pod failed to start ([#20667](https://github.com/containers/podman/issues/20667)).
### API
- Fixed a bug where the Compat DF endpoint did not correctly report total size of all images.
### Misc
- Updated Buildah to v1.39.2
- Updated the containers/common library to v0.62.1
- Updated the containers/image library to v5.34.1
## 5.4.0
### Features
- A preview of Podman's support for OCI artifacts has been added through the `podman artifact` suite of commands, including `add`, `inspect`, `ls`, `pull`, `push`, and `rm`. This support is very early and not fully complete, and the command line interface for these tools has not been finalized. We welcome feedback on the new artifact experience through our issue tracker!
- The `podman update` command now supports a wide variety of options related to healthchecks (including `--health-cmd` to define a new healthcheck and `--no-healthcheck` to disable an existing healthcheck), allowing healthchecks to be added to, removed from, and otherwise updated on existing containers. You can find full details on the 15 added options in the manpage.
- The `--mount type=volume` option for the `podman run`, `podman create`, and `podman volume create` commands now supports a new option, `subpath=`, to make only a subset of the volume visible in the container ([#20661](https://github.com/containers/podman/issues/20661)).
- The `--userns=keep-id` option for the `podman run`, `podman create`, and `podman pod create` commands now supports a new option, `--userns=keep-id:size=`, to configure the size of the user namespace ([#24387](https://github.com/containers/podman/issues/24837)).
- The `podman kube play` command now supports Container Device Interface (CDI) devices ([#17833](https://github.com/containers/podman/issues/17833)).
- The `podman machine init` command now supports a new option, `--playbook`, to run an Ansible playbook in the created VM on first boot for initial configuration.
- Quadlet `.pod` files now support a new field, `ShmSize`, to specify the size of the pod's shared SHM ([#22915](https://github.com/containers/podman/issues/22915)).
- The `podman run`, `podman create`, and `podman pod create` commands now support a new option, `--hosts-file`, to define the base file used for `/etc/hosts` in the container.
- The `podman run`, `podman create`, and `podman pod create` commands now support a new option, `--no-hostname`, which disables the creation of `/etc/hostname` in the container ([#25002](https://github.com/containers/podman/issues/25002)).
- The `podman network create` command now supports a new option for `bridge` networks, `--opt mode=unmanaged`, which allows Podman to use an existing network bridge on the system without changes.
- The `--network` option to `podman run`, `podman create`, and `podman pod create` now accepts a new option for `bridge` networks, `host_interface_name`, which specifies a name for the network interface created outside the container.
- The `podman manifest rm` command now supports a new option, `--ignore`, to not error when removing manifests that do not exist.
- The `podman system prune` command now supports a new option, `--build`, to remove build containers leftover from prematurely terminated builds.
- The `podman events` command now generates events for the creation and removal of networks ([#24032](https://github.com/containers/podman/issues/24032)).
### Breaking Changes
- Due to a lack of availability of hardware to test on, the Podman maintainers are no longer capable of providing full support for Podman on Intel Macs. Binaries and machine images will still be produced, and pull requests related to MacOS on Intel systems will still be merged, but bugs will be fixed on a best effort basis only. We welcome any potential new maintainers who would be able to assist in restoring full support.
- Quadlet previously incorrectly allowed `:` as a character to define comments. This was a mistake; developer intent and documentation was that `#` and `;` were to be used as comment characters instead, matching systemd. This has been corrected, and semicolons now define comments instead of colons.
### Changes
- Podman now passes container hostnames to Netavark, which will use them for any DHCP requests for the container.
- Partial pulls of `zstd:chunked` images now only happen for images that have a `RootFS.DiffID` entry in the image's OCI config JSON, and require the layer contents to match. This resolves issues with image ID ambiguity when partial pulls were enabled.
- Packagers can now set the `BUILD_ORIGIN` environment variable when building podman from the `Makefile`. This provides information on who built the Podman binary, and is displayed in `podman version` and `podman info`. This will help upstream bug reports, allowing maintainers to trace how and where the binary was built and installed from.
### Bugfixes
- Fixed a bug where `podman machine` VMs on WSL could fail to start when using usermode networking could fail to start due to a port conflict ([#20327](https://github.com/containers/podman/issues/20327)).
- Fixed a bug where overlay mounts could not be made at paths where the image specifies a volume ([#24555](https://github.com/containers/podman/issues/24555)).
- Fixed a bug where the `podman build` command did not honor the `no_pivot_root` setting from `containers.conf` ([#24546](https://github.com/containers/podman/issues/24546)).
- Fixed a bug where volumes would have the wrong permissions if `podman cp` was used to copy into a fresh volume in a container that had never been started.
- Fixed a bug where using `podman cp` to copy into a named volume requiring a mount (image volumes, volumes backed by a volume plugin, or other volumes with options) would fail when the container being copied into was stopped.
- Fixed a bug where rlimits would be set incorrectly when Podman was run as root but without `CAP_SYS_RESOURCE` ([#24692](https://github.com/containers/podman/issues/24692)).
- Fixed a bug where the `podman stats --all` command would fail if a container started with `--cgroups=none` was present ([#24632](https://github.com/containers/podman/issues/24632)).
- Fixed a bug where the `podman info` command would only return details on one image store even if additional image stores were configured in `storage.conf`.
- Fixed a bug where the `podman update` command could reset resource limits that were not being modified to default ([#24610](https://github.com/containers/podman/issues/24610)).
- Fixed a bug where the remote Podman client's `podman update` command could not update resource limits on devices mounted into the container ([#24734](https://github.com/containers/podman/issues/24734)).
- Fixed a bug where the `podman manifest annotate` command could panic when the `--index` option was used ([#24750](https://github.com/containers/podman/issues/24750)).
- Fixed a bug where a Quadlet container reusing another container's network could cause errors if the second container was not already running.
- Fixed a bug where Quadlet files containing lines with a trailing backslash could cause an infinite loop during parsing ([#24810](https://github.com/containers/podman/issues/24810)).
- Fixed a bug where Quadlet would, when run as a non-root user, not generate for files in subfolders of `/etc/containers/systemd/users/` ([#24783](https://github.com/containers/podman/issues/24783)).
- Fixed a bug where values in Quadlet files containing octal escape sequences were incorrectly unescaped.
- Fixed a bug where `podman generate kube` could generate persistent volumes with mixed-case names or names containing an underscore, which are not supported by Kubernetes ([#16542](https://github.com/containers/podman/issues/16542)).
- Fixed a bug where the `ptmxmode` option to `--mount type=devpts` did not function.
- Fixed a bug where shell completion on Windows would include `.exe` in the executable name, breaking completion on some shells.
- Fixed a bug where the output of `podman inspect` on containers did not include the ID of the network the container was joined to, improving Docker compatibility ([#24910](https://github.com/containers/podman/issues/24910)).
- Fixed a bug where containers created with the remote API incorrectly included a create command ([#25026](https://github.com/containers/podman/issues/25026)).
- Fixed a bug where it was possible to specify the `libkrun` backend for VMs on Intel Macs (`libkrun` only supports Arm systems).
- Fixed a bug where `libkrun` and `applehv` VMs from `podman machine` could be started at the same time on Macs ([#25112](https://github.com/containers/podman/issues/25112)).
- Fixed a bug where `podman exec` commands could not detach from the exec session using the detach keys ([#24895](https://github.com/containers/podman/issues/24895)).
- Fixed a bug where Podman would fail to start due to a database configuration mismatch when certain fields were configured to the empty string ([#24738](https://github.com/containers/podman/issues/24738)).
### API
- The Compat and Libpod Build APIs for Images now support a new query parameter, `nohosts`, which (when set to true) does not create `/etc/hosts` in the image when building.
- Fixed a bug where the Compat Create API for Containers did not honor CDI devices, preventing (among other things) the use of GPUs with `docker compose` ([#19338](https://github.com/containers/podman/issues/19338)).
### Misc
- The Docker alias script has been fixed to better handle variable substitution.
- Fixed a bug where `podman-restart.service` functioned incorrectly when no containers were present.
- Updated Buildah to v1.39.0
- Updated the containers/common library to v0.62.0
- Updated the containers/storage library to v1.57.1
- Updated the containers/image library to v5.34.0
## 5.3.2
### Security
- This release contains Buildah v1.38.1 which addresses [CVE-2024-11218](https://github.com/advisories/GHSA-5vpc-35f4-r8w6).
### Bugfixes
- Fixed a bug where Quadlet `.build` files could create an invalid podman command line when `Pull=` was used ([#24599](https://github.com/containers/podman/issues/24599)).
- Fixed a bug where the Mac installer did not install the Podman manpages ([#24756](https://github.com/containers/podman/issues/24756)).
### Misc
- Updated Buildah to v1.38.1
- Updated the containers/common library to v0.61.1
- Updated the containers/storage library to v1.56.1
- Updated the containers/image library to v5.33.1
## 5.3.1
### Bugfixes
- Fixed a bug where the `--ignition-path` option to `podman machine init` would prevent creation of necessary files for the VM, rendering it unusable ([#23544](https://github.com/containers/podman/issues/23544)).
- Fixed a bug where rootless containers using the `bridge` networking mode would be unable to start due to a panic caused by a nil pointer dereference ([#24566](https://github.com/containers/podman/issues/24566)).
- Fixed a bug where Podman containers would try to set increased rlimits when started in a user namespace, rendering containers unable to start ([#24508](https://github.com/containers/podman/issues/24508)).
- Fixed a bug where certain SSH configurations would make the remote Podman client unable to connect to the server ([#24567](https://github.com/containers/podman/issues/24567)).
- Fixed a bug where the Windows installer could install WSLv2 when upgrading an existing Podman installation that used the Hyper-V virtualization backend.
## 5.3.0
### Features
- The `podman kube generate` and `podman kube play` commands can now create and run Kubernetes Job YAML ([#17011](https://github.com/containers/podman/issues/17011)).

View File

@ -12,10 +12,10 @@ development efforts occur on the *main* branch. Branches with a
## Release workflow expectations
* You have push access to the [upstream podman repository](https://github.com/containers/podman.git)
* You have push access to the [upstream podman repository](https://github.com/containers/podman.git), and the upstream [podman-machine-os repository](https://github.com/containers/podman-machine-os)
* You understand all basic `git` operations and concepts, like creating commits,
local vs. remote branches, rebasing, and conflict resolution.
* You have access to your public and private *GPG* keys.
* You have access to your public and private *GPG* keys. They should also be documented on our [release keys repo](https://github.com/containers/release-keys).
* You have reliable internet access (i.e. not the public WiFi link at McDonalds)
* Other podman maintainers are online/available for assistance if needed.
* For a **major** release, you have 4-8 hours of time available, most of which will
@ -25,12 +25,11 @@ development efforts occur on the *main* branch. Branches with a
* You will announce the release on the proper platforms
(i.e. Podman blog, Twitter, Mastodon Podman and Podman-Desktop mailing lists)
# Prechecks
# Release cadence
Two days before actually cutting a release (including RCs), send an announcement to the
[podman-desktop](mailto:podman-desktop@lists.podman.io)
mailing list about the upcoming release. This will help the Podman Desktop team test and schedule
their own new release.
Upstream major or minor releases occur the 2nd week of February, May, August, November.
Branching and RC's may start several weeks beforehand.
Patch releases occur as-needed.
# Releases
@ -66,9 +65,8 @@ spelled with complete minutiae.
1. Create a new upstream release branch (if none already exist).
1. Check if a release branch is needed. Typically, major and minor version bumps
should be branched sometime during the release candidate phase. Patch
releases typically already have a branch created.
1. Check if a release branch is needed. All major and minor releases should be branched before RC1.
Patch releases typically already have a branch created.
Branching ensures all changes are curated before inclusion in the
release, and no new features land after the *release-candidate* phases
are complete.
@ -78,13 +76,11 @@ spelled with complete minutiae.
`git checkout -b vX.Y`. Where `X.Y` represent the complete release
version-name, including any suffix (if any) like `-rhel`. ***DO NOT***
include any `-rc` suffix in the branch name.
1. Edit the `.cirrus.yml` file, changing the `DEST_BRANCH` value (under the
`env` section) to the new, complete branch name (e.x. `vX.Y`).
Commit and sign, using the description
`Cirrus: Update operating branch`.
1. Push the new branch otherwise unmodified (`git push upstream vX.Y`).
1. Automation will begin executing on the branch immediately. Because
the repository allows out-of-sequence PR merging, it is possible that
1. Check if a release branch is needed on the `podman-machine-os` repo.
If so, repeat above steps for `podman-machine-os`.
1. Back on the podman repo, automation will begin executing on the branch immediately.
Because the repository allows out-of-sequence PR merging, it is possible that
merge order introduced bugs/defects. To establish a clean
baseline, observe the initial CI run on the branch for any unexpected
failures. This can be done by going directly to
@ -153,12 +149,7 @@ spelled with complete minutiae.
1. Commit the `RELEASE_NOTES.md` changes, using the description
`Create release notes for vX.Y.Z` (where `X`, `Y`, and `Z` are the
actual version numbers).
1. Open a Release Notes PR, or include this commit with the version bump PR
* If you decide to open a PR with just release notes, make sure that
the commit has the prefix `[CI:DOCS]` to avoid triggering
lengthy automated testing.
* Otherwise, the release notes commit can also be included in the
following release PR.
1. Open a Release Notes PR, or include this commit with the version bump PR.
1. Update version numbers and push tag
@ -177,29 +168,53 @@ spelled with complete minutiae.
task `Optional Release Test`. In the right-hand window pane, click
the `trigger` button and wait for the test to go green. *This is a
critical step* which confirms the commit is worthy of becoming a release.
1. In the PR, under the *Checks* tab, a GitHub actions [task](https://github.com/containers/podman/actions/workflows/machine-os-pr.yml) will run.
This action opens a PR on the [podman-machine-os repo](https://github.com/containers/podman-machine-os), which builds VM images for the release. The action will also link the `podman-machine-os` pr in a comment on the podman PR
This action also automatically applies the `do-not-merge/wait-machine-image-build` to the Podman PR, which blocks merging until VM images are built and published.
1. Go to the `podman-machine-os` bump pr, by clicking the link in the comment, or by finding it in the [podman-machine-os repo](https://github.com/containers/podman-machine-os/pulls).
1. Wait for automation to finish running
1. Once you are sure that there will be no more force pushes on the Podman release PR, merge the `podman-machine-os` bump PR
1. Tag the `podman-machine-os` bump commit with the same version as the podman release. (git tag -s -m 'vX.Y.Z' vX.Y.Z)
1. Push the tag.
1. The tag will automatically trigger a Cirrus task, named “Publish Image”,
to publish the release images. It will push the images to Quay and cut a release on the `podman-machine-os` repo. Wait for this task to complete. You can monitor the task on the [Cirrus CI dashboard](https://cirrus-ci.com/github/containers/podman-machine-os)
1. Return to the Podman repo
1. The `do-not-merge/wait-podman-machine-os` label should be automatically
un-set once the `podman-machine-os` release is finished.
1. Wait for all other PR checks to pass.
1. Wait for other maintainers to merge the PR.
1. Tag the `Bump to vX.Y.Z` commit as a release by running
`git tag -s -m 'vX.Y.Z' vX.Y.Z $HASH` where `$HASH` is specified explicitly
and carefully, to avoid (basically) unfixable accidents (if they are pushed).
1. Change `version/rawversion/version.go` again. This time, bump the **patch** version and
re-add the `-dev` suffix to indicate this is a non-released version of Podman.
1. Change `contrib/spec/podman.spec.in`, bumping **patch** number of `Version`.
1. Commit these changes with the message `Bump to X.Y.Z-dev`.
1. Push your local branch to your GitHub fork (and the PR) again.
1. The PR should now have two commits that look very similar to
https://github.com/containers/podman/pull/7787
Note: Backports and release note commits may also be included in the release PR.
1. Wait for at least all the "Build" and "Verify" (or similar) CI Testing
steps to complete successfully. No need to wait for complete integration
4and system-testing (it was already done on substantially the same code, above).
1. Merge the PR (or ask someone else to review and merge, to be safer).
`git tag -s -m 'vX.Y.Z' vX.Y.Z $HASH` where `$HASH` is specified explicitly and carefully, to avoid (basically) unfixable accidents
(if they are pushed).
1. **Note:** This is the last point where any test-failures can be addressed
by code changes. After pushing the new version-tag upstream, no further
changes can be made to the code without lots of unpleasant efforts. Please
seek assistance if needed, before proceeding.
1. Assuming the "Bump to ..." PR merged successfully, and you're **really**
confident the correct commit has been tagged, push it with
`git push upstream vX.Y.Z`
1. Monitor release automation
1. After the tag is pushed, the release GitHub action should run.
This action creates the GitHub release from the pushed tag,
and automatically builds and uploads the binaries and installers to the release.
1. The following artifacts should be attached to the release:
* podman-installer-macos-amd64.pkg
* podman-installer-macos-arm64.pkg
* podman-installer-macos-universal.pkg
* podman-installer-windows-amd64.exe
* podman-installer-windows-arm64.exe
* podman-remote-release-darwin_amd64.zip
* podman-remote-release-darwin_arm64.zip
* podman-remote-release-windows_amd64.zip
* podman-remote-release-windows_arm64.zip
* podman-remote-static-linux_amd64.tar.gz
* podman-remote-static-linux_arm64.tar.gz
* shasums
1. An email should have been sent to the [podman](mailto:podman@lists.podman.io) mailing list.
Keep an eye on it make sure the email went through to the list.
1. The release action will also bump the Podman version on podman.io. It will open a PR if a non-rc latest version is released. Go to the [podman.io](https://github.com/containers/podman.io) repo and merge the PR opened by this action, if needed.
1. After the tag is pushed, an action to bump to -dev will run. A PR will be opened for this bump. Merge this PR if needed.
1. Locate, Verify release testing is proceeding
@ -220,68 +235,6 @@ spelled with complete minutiae.
"View All Tasks".
1. Keep this page open to monitor its progress and for use in future steps.
1. Bump main `-dev` version
1. If you made a release branch and bumped **major** or **minor** version
Complete the "Update version numbers and push tag" steps above on the
*main* branch. Bump the **minor** version and set the **patch**
version to 0. For example, after pushing the v2.2.0 release, *main*
should be set to v2.3.0-dev.
1. Create a "Bump to vX.Y.Z-dev" commit with these changes.
1. Update `RELEASE_NOTES.md` on main. Commit these changes.
1. Create a PR with the above commits, and oversee it's merging.
1. Create GitHub Release entry and upload assets
1. Return to the Cirrus-CI Build page for the new release tag, confirm
(or wait for) it to complete, re-running any failed tasks as appropriate.
1. Go to `https://github.com/containers/podman/releases/tag/vX.Y.Z` and
press the "Edit Release" button. Change the name to the form `vX.Y.Z`
1. If this is a release candidate be certain to click the pre-release
checkbox at the bottom of the page.
1. If this new release will be the latest version released, be certain to
click the latest release checkbox at the bottom of the page.
1. Copy and paste the release notes for the release into the body of
the release.
1. Click the Publish button to make the release (or pre-release)
available.
1. For all releases, including RC's, artifacts should be published. The
release-artifacts, upload-win-installer, and mac-pkg GitHub Actions
should automatically take care of building, signing, and uploading artifacts.
Check the "Actions" tab, after publishing you should see the jobs running.
There may be more than one running due to the multiple
event states triggered, but this can be ignored, as any duplicates
will gracefully back-off. The job takes 5-6 minutes to complete.
Please note that the Windows action depends on the artifact action, and will be
triggered after the artifact action succeeds.
If any of these actions are somehow not triggered, you can manually trigger them
### *CLI Approach*
1. Install the [GitHub CLI](https://github.com/cli/cli#installation)
1. Run (replacing below version number to release version)
```
gh workflow run "ACTION NAME" -F version="vX.Y.Z"
```
### *GUI Approach*
1. Go to the "Actions" tab
1. On the left pick the required action to be triggered.
1. A blue box will appear above the job list with a right side drop
-down. Click the drop-down and specify the version number in the
dialog that appears
1. Check that all following artifacts are now attached to the release
* podman-remote-release-darwin_amd64.zip
* podman-remote-release-darwin_arm64.zip
* podman-remote-release-windows_amd64.zip
* podman-vX.Y.Z.msi
* podman-remote-static-linux_amd64.tar.gz
* podman-remote-static-linux_arm64.tar.gz
* podman-installer-macos-amd64.pkg
* podman-installer-macos-arm64.pkg
* podman-5.2.1-setup.exe
* shasums
1. Update Cirrus-CI cron job list
1. After any Major or significant minor (esp. `-rhel`) releases, it's critical to
maintain the Cirrus-CI cron job list. This applies to all containers-org repos,
@ -310,9 +263,5 @@ spelled with complete minutiae.
Highlight key features and important changes or fixes. Link to the GitHub release.
Make sure the blog post is properly tagged with the Announcement, Release, and Podman tags,
and any other appropriate tags.
1. For all releases, including patch releases and RC's, send an email to the [podman](mailto:podman@lists.podman.io) and [podman-desktop](mailto:podman-desktop@lists.podman.io) mailing lists. This should be automated by the release-artifacts
action, but it's best to keep and eye on it to see if the email went through to the lists.
Link the to release blog and GitHub release.
1. Update [LATEST_VERSION](https://github.com/containers/podman.io/blob/main/static/data/global.ts) on the Podman.io website.
1. Tweet the release. Make a Mastodon post about the release.
1. RC's can also be announced if needed.

View File

@ -11,7 +11,6 @@ Windows.
- [Git and go](#git-and-go)
- [Pandoc](#pandoc)
- [.NET SDK](#net-sdk)
- [Visual Studio Build Tools](#visual-studio-build-tools)
- [Virtualization Provider](#virtualization-provider)
- [WSL](#wsl)
- [Hyper-V](#hyper-v)
@ -59,17 +58,19 @@ reloaded. This can also be manually changed by configuring the `PATH`:
$env:Path += ";C:\Program Files\Go\bin\;C:\Program Files\Git\cmd\"
```
### Pandoc
### Pandoc (optional)
[Pandoc](https://pandoc.org/) is used to generate Podman documentation. It is
required for building the documentation and the
[bundle installer](#build-the-installer). It can be avoided when building and
testing the
[Podman client for Windows](#build-and-test-the-podman-client-for-windows) or
[the standalone `podman.msi` installer](#build-and-test-the-standalone-podmanmsi-file).
used for building the documentation.
Pandoc can be installed from https://pandoc.org/installing.html. When performing
the Pandoc installation one, has to choose the option "Install for all users"
(to put the binaries into "Program Files" directory).
Alternatively, Podman documentation can be built using a container with the target
`docs-using-podman` in the `winmake.ps1` script.
```pwsh
.\winmake docs-using-podman
```
### .NET SDK
@ -88,30 +89,6 @@ used too and can be installed using `dotnet install`:
dotnet tool install --global wix
```
### Visual Studio Build Tools
The installer includes a C program that checks the installation of the
pre-required virtualization providers (WSL or Hyper-V). Building this program
requires the
[Microsoft C/C++ compiler](https://learn.microsoft.com/en-us/cpp/build/building-on-the-command-line?view=msvc-170) and the
[PowerShell Module VSSetup](https://github.com/microsoft/vssetup.powershell):
1. Download the Build Tools for Visual Studio 2022 installer
```pwsh
Invoke-WebRequest -Uri 'https://aka.ms/vs/17/release/vs_BuildTools.exe' -OutFile "$env:TEMP\vs_BuildTools.exe"
```
2. Run the installer with the parameter to include the optional C/C++ Tools
```pwsh
& "$env:TEMP\vs_BuildTools.exe" --passive --wait `
--add Microsoft.VisualStudio.Workload.VCTools `
--includeRecommended `
--remove Microsoft.VisualStudio.Component.VC.CMake.Project
```
3. Install the PowerShell Module VSSetup
```pwsh
Install-Module VSSetup
```
### Virtualization Provider
Running Podman on Windows requires a virtualization provider. The supported
@ -312,8 +289,7 @@ To learn how to use the Podman client, refer to its
## Build and test the Podman Windows installer
The Podman Windows installer (e.g., `podman-5.1.0-dev-setup.exe`) is a bundle
that includes an msi package (`podman.msi`) and installs the WSL kernel
(`podman-wslkerninst.exe`). It's built using the
that includes an msi package (`podman.msi`). It's built using the
[WiX Toolset](https://wixtoolset.org/) and the
[PanelSwWixExtension](https://github.com/nirbar/PanelSwWixExtension/tree/master5)
WiX extension. The source code is in the folder `contrib\win-installer`.
@ -326,7 +302,7 @@ To build the installation bundle, run the following command:
.\winmake.ps1 installer
```
:information_source: making `podman-remote`, `win-gvproxy`, and `docs` is
:information_source: making `podman-remote`, `win-gvproxy`, and `docs` (or `docs-using-podman`) is
required before running this command.
Locate the installer in the `contrib\win-installer` folder (relative to checkout
@ -334,9 +310,6 @@ root) with a name like `podman-5.2.0-dev-setup.exe`.
The `installer` target of `winmake.ps1` runs the script
`contrib\win-installer\build.ps1` that, in turns, executes:
- `build-hooks.bat`: builds `podman-wslkerninst.exe` (WSL kernel installer) and
`podman-msihooks.dll` (helper that checks if WSL and Hyper-V are installed).
- `dotnet build podman.wixproj`: builds `podman.msi` from the WiX source files `podman.wxs`,
`pages.wxs`, `podman-ui.wxs` and `welcome-install-dlg.wxs`.
- `dotnet build podman-setup.wixproj`: builds `podman-setup.exe` file from
@ -519,7 +492,13 @@ tools:
[`.pre-commit-config.yaml`](.pre-commit-config.yaml)
:information_source: Install [golangci-lint](https://golangci-lint.run) and
[pre-commit](https://pre-commit.com) to run `winmake.ps1 lint`.
[pre-commit](https://pre-commit.com) to run `winmake.ps1 lint`:
```pwsh
winget install -e golangci-lint.golangci-lint
winget install -e Python.Python.3.13
pip install pre-commit
```
### winmake validatepr

View File

@ -48,7 +48,7 @@ func installWslKernel() error {
)
backoff := 500 * time.Millisecond
for i := 1; i < 6; i++ {
err = wutil.SilentExec(wutil.FindWSL(), "--update")
err = wutil.SilentExec("--update")
if err == nil {
break
}

View File

@ -2,6 +2,7 @@ package artifact
import (
"fmt"
"path/filepath"
"github.com/containers/common/pkg/completion"
"github.com/containers/podman/v5/cmd/podman/common"
@ -61,6 +62,8 @@ func init() {
}
func add(cmd *cobra.Command, args []string) error {
artifactName := args[0]
blobs := args[1:]
opts := new(entities.ArtifactAddOptions)
annots, err := utils.ParseAnnotations(addOpts.Annotations)
@ -72,7 +75,18 @@ func add(cmd *cobra.Command, args []string) error {
opts.Append = addOpts.Append
opts.FileType = addOpts.FileType
report, err := registry.ImageEngine().ArtifactAdd(registry.Context(), args[0], args[1:], opts)
artifactBlobs := make([]entities.ArtifactBlob, 0, len(blobs))
for _, blobPath := range blobs {
artifactBlob := entities.ArtifactBlob{
BlobFilePath: blobPath,
FileName: filepath.Base(blobPath),
}
artifactBlobs = append(artifactBlobs, artifactBlob)
}
report, err := registry.ImageEngine().ArtifactAdd(registry.Context(), artifactName, artifactBlobs, opts)
if err != nil {
return err
}

View File

@ -25,6 +25,7 @@ import (
"github.com/containers/podman/v5/cmd/podman/utils"
"github.com/containers/podman/v5/pkg/domain/entities"
"github.com/containers/podman/v5/pkg/env"
"github.com/openshift/imagebuilder"
"github.com/sirupsen/logrus"
"github.com/spf13/cobra"
)
@ -522,7 +523,7 @@ func buildFlagsWrapperToOptions(c *cobra.Command, contextDir string, flags *Buil
Annotations: flags.Annotation,
Args: args,
BlobDirectory: flags.BlobCache,
BuildOutput: flags.BuildOutput,
BuildOutputs: flags.BuildOutputs,
CacheFrom: cacheFrom,
CacheTo: cacheTo,
CacheTTL: cacheTTL,
@ -585,9 +586,9 @@ func buildFlagsWrapperToOptions(c *cobra.Command, contextDir string, flags *Buil
}
if flags.IgnoreFile != "" {
excludes, err := parseDockerignore(flags.IgnoreFile)
excludes, err := imagebuilder.ParseIgnore(flags.IgnoreFile)
if err != nil {
return nil, fmt.Errorf("unable to obtain decrypt config: %w", err)
return nil, fmt.Errorf("unable to parse ignore file: %w", err)
}
opts.Excludes = excludes
}
@ -628,21 +629,6 @@ func getDecryptConfig(decryptionKeys []string) (*encconfig.DecryptConfig, error)
return decConfig, nil
}
func parseDockerignore(ignoreFile string) ([]string, error) {
excludes := []string{}
ignore, err := os.ReadFile(ignoreFile)
if err != nil {
return excludes, err
}
for _, e := range strings.Split(string(ignore), "\n") {
if len(e) == 0 || e[0] == '#' {
continue
}
excludes = append(excludes, e)
}
return excludes, nil
}
func areContainerfilesValid(contextDir string, containerFiles []string) error {
for _, f := range containerFiles {
if isURL(f) || f == "/dev/stdin" {

View File

@ -627,7 +627,7 @@ func DefineCreateFlags(cmd *cobra.Command, cf *entities.ContainerCreateOptions,
createFlags.StringVar(
&cf.HealthTimeout,
healthTimeoutFlagName, define.DefaultHealthCheckTimeout,
"the maximum time allowed to complete the healthcheck before an interval is considered failed",
"the maximum time allowed to complete the healthcheck before an interval is considered failed and SIGKILL is sent to the healthcheck process",
)
_ = cmd.RegisterFlagCompletionFunc(healthTimeoutFlagName, completion.AutocompleteNone)

View File

@ -7,6 +7,7 @@ import (
"github.com/containers/podman/v5/cmd/podman/common"
"github.com/containers/podman/v5/cmd/podman/registry"
"github.com/containers/podman/v5/cmd/podman/validate"
"github.com/containers/podman/v5/libpod/define"
"github.com/containers/podman/v5/pkg/domain/entities"
"github.com/containers/podman/v5/pkg/specgen"
@ -24,7 +25,7 @@ var (
Short: "Update an existing container",
Long: updateDescription,
RunE: update,
Args: cobra.ExactArgs(1),
Args: validate.IDOrLatestArgs,
ValidArgsFunction: common.AutocompleteContainers,
Example: `podman update --cpus=5 foobar_container`,
}
@ -39,13 +40,17 @@ var (
Example: `podman container update --cpus=5 foobar_container`,
}
)
var (
updateOpts entities.ContainerCreateOptions
)
type ContainerUpdateOptions struct {
entities.ContainerCreateOptions
Latest bool
}
var updateOptions ContainerUpdateOptions
func updateFlags(cmd *cobra.Command) {
common.DefineCreateDefaults(&updateOpts)
common.DefineCreateFlags(cmd, &updateOpts, entities.UpdateMode)
common.DefineCreateDefaults(&updateOptions.ContainerCreateOptions)
common.DefineCreateFlags(cmd, &updateOptions.ContainerCreateOptions, entities.UpdateMode)
}
func init() {
@ -53,12 +58,14 @@ func init() {
Command: updateCommand,
})
updateFlags(updateCommand)
validate.AddLatestFlag(updateCommand, &updateOptions.Latest)
registry.Commands = append(registry.Commands, registry.CliCommand{
Command: containerUpdateCommand,
Parent: containerCmd,
})
updateFlags(containerUpdateCommand)
validate.AddLatestFlag(containerUpdateCommand, &updateOptions.Latest)
}
func GetChangedHealthCheckConfiguration(cmd *cobra.Command, vals *entities.ContainerCreateOptions) define.UpdateHealthCheckConfig {
@ -129,12 +136,12 @@ func update(cmd *cobra.Command, args []string) error {
s := &specgen.SpecGenerator{}
s.ResourceLimits = &specs.LinuxResources{}
err = createOrUpdateFlags(cmd, &updateOpts)
err = createOrUpdateFlags(cmd, &updateOptions.ContainerCreateOptions)
if err != nil {
return err
}
s.ResourceLimits, err = specgenutil.GetResources(s, &updateOpts)
s.ResourceLimits, err = specgenutil.GetResources(s, &updateOptions.ContainerCreateOptions)
if err != nil {
return err
}
@ -143,17 +150,21 @@ func update(cmd *cobra.Command, args []string) error {
s.ResourceLimits = &specs.LinuxResources{}
}
healthCheckConfig := GetChangedHealthCheckConfiguration(cmd, &updateOpts)
healthCheckConfig := GetChangedHealthCheckConfiguration(cmd, &updateOptions.ContainerCreateOptions)
opts := &entities.ContainerUpdateOptions{
NameOrID: strings.TrimPrefix(args[0], "/"),
Resources: s.ResourceLimits,
ChangedHealthCheckConfiguration: &healthCheckConfig,
DevicesLimits: GetChangedDeviceLimits(s),
Latest: updateOptions.Latest,
}
if !updateOptions.Latest {
opts.NameOrID = strings.TrimPrefix(args[0], "/")
}
if cmd.Flags().Changed("restart") {
policy, retries, err := util.ParseRestartPolicy(updateOpts.Restart)
policy, retries, err := util.ParseRestartPolicy(updateOptions.Restart)
if err != nil {
return err
}

View File

@ -0,0 +1,81 @@
package images
import (
"fmt"
"strings"
"github.com/containers/podman/v5/cmd/podman/registry"
"github.com/spf13/cobra"
)
type buildNode struct {
Name string
Endpoint string
Status string
BuildkitVersion string
Platforms []string
}
type buildxInspectOutput struct {
builderName string
driverName string
Nodes []buildNode
}
var buildxInspectCmd = &cobra.Command{
Use: "inspect",
Short: "Inspects build capabilities",
Long: "Displays information about the current builder instance (compatibility with Docker buildx inspect)",
RunE: runBuildxInspect,
Example: `podman buildx inspect
podman buildx inspect --bootstrap`,
}
func init() {
buildxInspectCmd.Flags().Bool("bootstrap", false, "Currently a No Op for podman")
registry.Commands = append(registry.Commands, registry.CliCommand{
Command: buildxInspectCmd,
Parent: buildxCmd,
})
}
func runBuildxInspect(cmd *cobra.Command, args []string) error {
info, err := registry.ContainerEngine().Info(registry.Context())
if err != nil {
return fmt.Errorf("retrieving podman information: %w", err)
}
nativePlatform := fmt.Sprintf("%s/%s", info.Host.OS, info.Host.Arch)
// Constants are based on default values for Docker buildx inspect.
defaultNode := buildNode{
Name: "default",
Endpoint: "default",
Status: "running",
BuildkitVersion: "N/A",
Platforms: []string{nativePlatform},
}
defaultNode.Platforms = append(defaultNode.Platforms, info.Host.EmulatedArchitectures...)
out := buildxInspectOutput{
builderName: "default",
driverName: "podman",
Nodes: []buildNode{defaultNode},
}
fmt.Printf("Name: %s\n", out.builderName)
fmt.Printf("Driver: %s\n", out.driverName)
fmt.Println()
fmt.Println("Nodes:")
fmt.Printf("Name: %s\n", out.Nodes[0].Name)
fmt.Printf("Endpoint: %s\n", out.Nodes[0].Endpoint)
fmt.Printf("Status: %s\n", out.Nodes[0].Status)
fmt.Printf("Buildkit version: %s\n", out.Nodes[0].BuildkitVersion)
fmt.Printf("Platforms: %s\n", strings.Join(out.Nodes[0].Platforms, ", "))
fmt.Println("Labels: ")
return nil
}

View File

@ -130,7 +130,7 @@ func importCon(cmd *cobra.Command, args []string) error {
}
errFileName := parse.ValidateFileName(source)
errURL := parse.ValidURL(source)
errURL := parse.ValidWebURL(source)
if errURL == nil {
importOpts.SourceIsURL = true
}

View File

@ -10,11 +10,11 @@ import (
"time"
"unicode"
"github.com/containers/common/pkg/completion"
"github.com/containers/common/pkg/report"
"github.com/containers/image/v5/docker/reference"
"github.com/containers/podman/v5/cmd/podman/common"
"github.com/containers/podman/v5/cmd/podman/registry"
"github.com/containers/podman/v5/cmd/podman/validate"
"github.com/containers/podman/v5/pkg/domain/entities"
"github.com/docker/go-units"
"github.com/spf13/cobra"
@ -62,13 +62,6 @@ var (
// Options for presenting data
listFlag = listFlagType{}
sortFields = entities.NewStringSet(
"created",
"id",
"repository",
"size",
"tag")
)
func init() {
@ -102,9 +95,18 @@ func imageListFlagSet(cmd *cobra.Command) {
flags.BoolVar(&listFlag.noTrunc, "no-trunc", false, "Do not truncate output")
flags.BoolVarP(&listFlag.quiet, "quiet", "q", false, "Display only image IDs")
// set default sort value
listFlag.sort = "created"
sort := validate.Value(&listFlag.sort,
"created",
"id",
"repository",
"size",
"tag",
)
sortFlagName := "sort"
flags.StringVar(&listFlag.sort, sortFlagName, "created", "Sort by "+sortFields.String())
_ = cmd.RegisterFlagCompletionFunc(sortFlagName, completion.AutocompleteNone)
flags.Var(sort, sortFlagName, "Sort by "+sort.Choices())
_ = cmd.RegisterFlagCompletionFunc(sortFlagName, common.AutocompleteImageSort)
flags.BoolVarP(&listFlag.history, "history", "", false, "Display the image name history")
}
@ -118,11 +120,6 @@ func images(cmd *cobra.Command, args []string) error {
listOptions.Filter = append(listOptions.Filter, "reference="+args[0])
}
if cmd.Flags().Changed("sort") && !sortFields.Contains(listFlag.sort) {
return fmt.Errorf("\"%s\" is not a valid field for sorting. Choose from: %s",
listFlag.sort, sortFields.String())
}
summaries, err := registry.ImageEngine().List(registry.Context(), listOptions)
if err != nil {
return err

View File

@ -9,6 +9,7 @@ import (
"github.com/containers/buildah/pkg/cli"
"github.com/containers/common/pkg/auth"
"github.com/containers/common/pkg/completion"
"github.com/containers/common/pkg/config"
"github.com/containers/image/v5/types"
"github.com/containers/podman/v5/cmd/podman/common"
"github.com/containers/podman/v5/cmd/podman/registry"
@ -25,6 +26,7 @@ type pullOptionsWrapper struct {
TLSVerifyCLI bool // CLI only
CredentialsCLI string
DecryptionKeys []string
PolicyCLI string
}
var (
@ -101,6 +103,11 @@ func pullFlags(cmd *cobra.Command) {
flags.String(platformFlagName, "", "Specify the platform for selecting the image. (Conflicts with arch and os)")
_ = cmd.RegisterFlagCompletionFunc(platformFlagName, completion.AutocompleteNone)
policyFlagName := "policy"
// Explicitly set the default to "always" to avoid the default being "missing"
flags.StringVar(&pullOptions.PolicyCLI, policyFlagName, "always", `Pull image policy ("always"|"missing"|"never"|"newer")`)
_ = cmd.RegisterFlagCompletionFunc(policyFlagName, common.AutocompletePullOption)
flags.Bool("disable-content-trust", false, "This is a Docker specific option and is a NOOP")
flags.BoolVarP(&pullOptions.Quiet, "quiet", "q", false, "Suppress output information when pulling images")
flags.BoolVar(&pullOptions.TLSVerifyCLI, "tls-verify", true, "Require HTTPS and verify certificates when contacting registries")
@ -143,6 +150,12 @@ func imagePull(cmd *cobra.Command, args []string) error {
pullOptions.SkipTLSVerify = types.NewOptionalBool(!pullOptions.TLSVerifyCLI)
}
pullPolicy, err := config.ParsePullPolicy(pullOptions.PolicyCLI)
if err != nil {
return err
}
pullOptions.PullPolicy = pullPolicy
if cmd.Flags().Changed("retry") {
retry, err := cmd.Flags().GetUint("retry")
if err != nil {

View File

@ -369,7 +369,7 @@ func readerFromArg(fileName string) (*bytes.Reader, error) {
switch {
case fileName == "-": // Read from stdin
reader = os.Stdin
case parse.ValidURL(fileName) == nil:
case parse.ValidWebURL(fileName) == nil:
response, err := http.Get(fileName)
if err != nil {
return nil, err

View File

@ -95,7 +95,7 @@ func cp(_ *cobra.Command, args []string) error {
cpOpts.SrcPath = srcPath
cpOpts.DestPath = destPath
err = secureCopy(&cpOpts)
err = localhostSSHCopy(&cpOpts)
if err != nil {
return fmt.Errorf("copy failed: %s", err.Error())
}
@ -105,7 +105,8 @@ func cp(_ *cobra.Command, args []string) error {
return nil
}
func secureCopy(opts *cpOptions) error {
// localhostSSHCopy uses scp to copy files from/to a localhost machine using ssh.
func localhostSSHCopy(opts *cpOptions) error {
srcPath := opts.SrcPath
destPath := opts.DestPath
sshConfig := opts.Machine.SSH
@ -123,7 +124,7 @@ func secureCopy(opts *cpOptions) error {
}
args := []string{"-r", "-i", sshConfig.IdentityPath, "-P", strconv.Itoa(sshConfig.Port)}
args = append(args, machine.CommonSSHArgs()...)
args = append(args, machine.LocalhostSSHArgs()...) // Warning: This MUST NOT be generalized to allow communication over untrusted networks.
args = append(args, []string{srcPath, destPath}...)
cmd := exec.Command("scp", args...)

View File

@ -3,6 +3,7 @@
package machine
import (
"errors"
"fmt"
"os"
@ -83,6 +84,14 @@ func init() {
)
_ = initCmd.RegisterFlagCompletionFunc(memoryFlagName, completion.AutocompleteNone)
swapFlagName := "swap"
flags.Uint64VarP(
&initOpts.Swap,
swapFlagName, "s", 0,
"Swap in MiB",
)
_ = initCmd.RegisterFlagCompletionFunc(swapFlagName, completion.AutocompleteNone)
flags.BoolVar(
&now,
"now", false,
@ -224,6 +233,14 @@ func initMachine(cmd *cobra.Command, args []string) error {
err = shim.Init(initOpts, provider)
if err != nil {
// The installation is partially complete and podman should
// exit gracefully with no error and no success message.
// Examples:
// - a user has chosen to perform their own reboot
// - reexec for limited admin operations, returning to parent
if errors.Is(err, define.ErrInitRelaunchAttempt) {
return nil
}
return err
}

View File

@ -119,6 +119,7 @@ func outputTemplate(cmd *cobra.Command, responses []*entities.ListReporter) erro
"CPUs": "CPUS",
"Memory": "MEMORY",
"DiskSize": "DISK SIZE",
"Swap": "SWAP",
})
rpt := report.New(os.Stdout, cmd.Name())
@ -182,6 +183,7 @@ func toMachineFormat(vms []*machine.ListResponse, defaultCon *config.Connection)
response.VMType = vm.VMType
response.CPUs = vm.CPUs
response.Memory = strUint(uint64(vm.Memory.ToBytes()))
response.Swap = strUint(uint64(vm.Swap.ToBytes()))
response.DiskSize = strUint(uint64(vm.DiskSize.ToBytes()))
response.Port = vm.Port
response.RemoteUsername = vm.RemoteUsername
@ -225,6 +227,7 @@ func toHumanFormat(vms []*machine.ListResponse, defaultCon *config.Connection) [
response.VMType = vm.VMType
response.CPUs = vm.CPUs
response.Memory = units.BytesSize(float64(vm.Memory.ToBytes()))
response.Swap = units.BytesSize(float64(vm.Swap.ToBytes()))
response.DiskSize = units.BytesSize(float64(vm.DiskSize.ToBytes()))
humanResponses = append(humanResponses, response)

View File

@ -115,6 +115,6 @@ func ssh(cmd *cobra.Command, args []string) error {
}
}
err = machine.CommonSSHShell(sshOpts.Username, mc.SSH.IdentityPath, mc.Name, mc.SSH.Port, sshOpts.Args)
err = machine.LocalhostSSHShell(sshOpts.Username, mc.SSH.IdentityPath, mc.Name, mc.SSH.Port, sshOpts.Args)
return utils.HandleOSExecError(err)
}

View File

@ -157,14 +157,21 @@ func parseEnvOrLabelFile(envOrLabel map[string]string, filename, configType stri
return scanner.Err()
}
// ValidURL checks a string urlStr is a url or not
func ValidURL(urlStr string) error {
url, err := url.ParseRequestURI(urlStr)
// ValidWebURL checks a string urlStr is a url or not
func ValidWebURL(urlStr string) error {
parsedURL, err := url.ParseRequestURI(urlStr)
if err != nil {
return fmt.Errorf("invalid url %q: %w", urlStr, err)
return fmt.Errorf("invalid URL %q: %w", urlStr, err)
}
if url.Scheme == "" {
return fmt.Errorf("invalid url %q: missing scheme", urlStr)
// to be a valid web url, scheme must be either http or https
if parsedURL.Scheme != "http" && parsedURL.Scheme != "https" {
return fmt.Errorf("invalid URL %q: unsupported scheme %q", urlStr, parsedURL.Scheme)
}
// ensure url contain a host
if parsedURL.Host == "" {
return fmt.Errorf("invalid URL %q: missing host", urlStr)
}
return nil
}

View File

@ -158,3 +158,69 @@ func TestGetAllLabelsFile(t *testing.T) {
result, _ := GetAllLabels(fileLabels, Var1)
assert.Equal(t, len(result), 3)
}
func TestValidWebURL(t *testing.T) {
tests := []struct {
name string
input string
wantErr bool
}{
{
name: "Valid HTTP URL",
input: "http://example.com",
wantErr: false,
},
{
name: "Valid HTTPS URL",
input: "https://example.com",
wantErr: false,
},
{
name: "Missing scheme",
input: "example.com",
wantErr: true,
},
{
name: "Unsupported scheme - FTP",
input: "ftp://example.com",
wantErr: true,
},
{
name: "Missing host",
input: "https://",
wantErr: true,
},
{
name: "Local file path - Windows style",
input: "C:/hello/world",
wantErr: true,
},
{
name: "Local file path - Unix style",
input: "/usr/local/bin",
wantErr: true,
},
{
name: "Invalid URL characters",
input: "https://example.com/%%%",
wantErr: true,
},
{
name: "Valid URL with port",
input: "https://example.com:8080",
wantErr: false,
},
{
name: "Valid URL with path",
input: "https://example.com/path/to/resource",
wantErr: false,
},
}
for _, tt := range tests {
t.Run(tt.name, func(t *testing.T) {
err := ValidWebURL(tt.input)
assert.Equal(t, tt.wantErr, err != nil, "ValidWebURL(%q) = %v, wantErr %v", tt.input, err, tt.wantErr)
})
}
}

View File

@ -293,6 +293,34 @@ func persistentPreRunE(cmd *cobra.Command, args []string) error {
}
}
}
if cmd.Flag("cpu-profile").Changed {
f, err := os.Create(podmanConfig.CPUProfile)
if err != nil {
return err
}
if err := pprof.StartCPUProfile(f); err != nil {
return err
}
}
if cmd.Flag("memory-profile").Changed {
// Same value as the default in github.com/pkg/profile.
runtime.MemProfileRate = 4096
if rate := os.Getenv("MemProfileRate"); rate != "" {
r, err := strconv.Atoi(rate)
if err != nil {
return err
}
runtime.MemProfileRate = r
}
}
if podmanConfig.MaxWorks <= 0 {
return fmt.Errorf("maximum workers must be set to a positive number (got %d)", podmanConfig.MaxWorks)
}
if err := parallel.SetMaxThreads(uint(podmanConfig.MaxWorks)); err != nil {
return err
}
}
if err := readRemoteCliFlags(cmd, podmanConfig); err != nil {
@ -346,35 +374,6 @@ func persistentPreRunE(cmd *cobra.Command, args []string) error {
}
}
if !registry.IsRemote() {
if cmd.Flag("cpu-profile").Changed {
f, err := os.Create(podmanConfig.CPUProfile)
if err != nil {
return err
}
if err := pprof.StartCPUProfile(f); err != nil {
return err
}
}
if cmd.Flag("memory-profile").Changed {
// Same value as the default in github.com/pkg/profile.
runtime.MemProfileRate = 4096
if rate := os.Getenv("MemProfileRate"); rate != "" {
r, err := strconv.Atoi(rate)
if err != nil {
return err
}
runtime.MemProfileRate = r
}
}
if podmanConfig.MaxWorks <= 0 {
return fmt.Errorf("maximum workers must be set to a positive number (got %d)", podmanConfig.MaxWorks)
}
if err := parallel.SetMaxThreads(uint(podmanConfig.MaxWorks)); err != nil {
return err
}
}
// Setup Rootless environment, IFF:
// 1) in ABI mode
// 2) running as non-root
@ -675,7 +674,7 @@ func rootFlags(cmd *cobra.Command, podmanConfig *entities.PodmanConfig) {
pFlags.StringArrayVar(&podmanConfig.RuntimeFlags, runtimeflagFlagName, []string{}, "add global flags for the container runtime")
_ = rootCmd.RegisterFlagCompletionFunc(runtimeflagFlagName, completion.AutocompleteNone)
pFlags.BoolVar(&podmanConfig.Syslog, "syslog", false, "Output logging information to syslog as well as the console (default false)")
pFlags.BoolVar(&podmanConfig.Syslog, "syslog", false, "Output podman-internal logs to syslog as well as the console (default false)")
}
}

View File

@ -57,6 +57,8 @@ func init() {
flags.BoolVar(&createOpts.Replace, "replace", false, "If a secret with the same name exists, replace it")
flags.BoolVar(&createOpts.Ignore, "ignore", false, "If a secret with the same name exists, ignore and do not create a new secret")
labelFlagName := "label"
flags.StringArrayVarP(&labels, labelFlagName, "l", nil, "Specify labels on the secret")
_ = createCmd.RegisterFlagCompletionFunc(labelFlagName, completion.AutocompleteNone)
@ -65,6 +67,11 @@ func init() {
func create(cmd *cobra.Command, args []string) error {
name := args[0]
// Validate that --ignore and --replace are not used together
if createOpts.Ignore && createOpts.Replace {
return errors.New("cannot use --ignore and --replace flags together")
}
var err error
path := args[1]

View File

@ -64,8 +64,11 @@ func check(cmd *cobra.Command, args []string) error {
return err
}
if !checkOptions.Repair && !checkOptions.RepairLossy && response.Errors {
return errors.New("damage detected in local storage")
if !checkOptions.Repair && !checkOptions.RepairLossy {
if response.Errors {
return errors.New("damage detected in local storage")
}
return nil
}
recheckOptions := checkOptions

View File

@ -275,7 +275,10 @@ func (d *dfContainer) ContainerID() string {
}
func (d *dfContainer) Image() string {
return d.SystemDfContainerReport.Image[0:12]
if len(d.SystemDfContainerReport.Image) >= 12 {
return d.SystemDfContainerReport.Image[0:12]
}
return ""
}
func (d *dfContainer) Command() string {

View File

@ -50,20 +50,6 @@ func IDOrLatestArgs(cmd *cobra.Command, args []string) error {
return nil
}
// CheckAllLatestAndCIDFile checks that --all and --latest are used correctly for containers and pods
// If idFileFlag is set, also checks for the --cidfile or --pod-id-file flag.
// Note: this has been deprecated, use CheckAllLatestAndIDFile instead
func CheckAllLatestAndCIDFile(c *cobra.Command, args []string, ignoreArgLen bool, cidfile bool) error {
return CheckAllLatestAndIDFile(c, args, ignoreArgLen, "cidfile")
}
// CheckAllLatestAndPodIDFile checks that --all and --latest are used correctly.
// If withIDFile is set, also check for the --pod-id-file flag.
// Note: this has been deprecated, use CheckAllLatestAndIDFile instead
func CheckAllLatestAndPodIDFile(c *cobra.Command, args []string, ignoreArgLen bool, withIDFile bool) error {
return CheckAllLatestAndIDFile(c, args, ignoreArgLen, "pod-id-file")
}
// CheckAllLatestAndIDFile checks that --all and --latest are used correctly for containers and pods
// If idFileFlag is set, also checks for the --cidfile or --pod-id-file flag.
func CheckAllLatestAndIDFile(c *cobra.Command, args []string, ignoreArgLen bool, idFileFlag string) error {

View File

@ -23,7 +23,8 @@ var (
ValidArgsFunction: completion.AutocompleteNone,
Example: `podman volume create myvol
podman volume create
podman volume create --label foo=bar myvol`,
podman volume create --label foo=bar myvol
podman volume create --uid 4321 --gid 1234 myvol`,
}
)
@ -33,6 +34,8 @@ var (
Label []string
Opts []string
Ignore bool
UID int
GID int
}{}
)
@ -57,6 +60,14 @@ func init() {
ignoreFlagName := "ignore"
flags.BoolVar(&opts.Ignore, ignoreFlagName, false, "Don't fail if volume already exists")
uidFlagName := "uid"
flags.IntVar(&opts.UID, uidFlagName, 0, "Set the UID of the volume owner")
_ = createCommand.RegisterFlagCompletionFunc(uidFlagName, completion.AutocompleteNone)
gidFlagName := "gid"
flags.IntVar(&opts.GID, gidFlagName, 0, "Set the GID of the volume owner")
_ = createCommand.RegisterFlagCompletionFunc(gidFlagName, completion.AutocompleteNone)
}
func create(cmd *cobra.Command, args []string) error {
@ -77,6 +88,12 @@ func create(cmd *cobra.Command, args []string) error {
if err != nil {
return fmt.Errorf("unable to process options: %w", err)
}
if cmd.Flags().Changed("uid") {
createOpts.UID = &opts.UID
}
if cmd.Flags().Changed("gid") {
createOpts.GID = &opts.GID
}
response, err := registry.ContainerEngine().VolumeCreate(context.Background(), createOpts)
if err != nil {
return err

View File

@ -4,15 +4,14 @@ import (
"context"
"errors"
"fmt"
"os"
"github.com/containers/common/pkg/completion"
"github.com/containers/podman/v5/cmd/podman/common"
"github.com/containers/podman/v5/cmd/podman/registry"
"github.com/containers/podman/v5/pkg/domain/entities"
"github.com/containers/podman/v5/pkg/errorhandling"
"github.com/containers/podman/v5/utils"
"github.com/sirupsen/logrus"
"github.com/spf13/cobra"
"golang.org/x/term"
)
var (
@ -21,7 +20,6 @@ podman volume export
Allow content of volume to be exported into external tar.`
exportCommand = &cobra.Command{
Annotations: map[string]string{registry.EngineMode: registry.ABIMode},
Use: "export [options] VOLUME",
Short: "Export volumes",
Args: cobra.ExactArgs(1),
@ -32,10 +30,7 @@ Allow content of volume to be exported into external tar.`
)
var (
// Temporary struct to hold cli values.
cliExportOpts = struct {
Output string
}{}
targetPath string
)
func init() {
@ -46,54 +41,31 @@ func init() {
flags := exportCommand.Flags()
outputFlagName := "output"
flags.StringVarP(&cliExportOpts.Output, outputFlagName, "o", "/dev/stdout", "Write to a specified file (default: stdout, which must be redirected)")
flags.StringVarP(&targetPath, outputFlagName, "o", "", "Write to a specified file (default: stdout, which must be redirected)")
_ = exportCommand.RegisterFlagCompletionFunc(outputFlagName, completion.AutocompleteDefault)
}
func export(cmd *cobra.Command, args []string) error {
var inspectOpts entities.InspectOptions
containerEngine := registry.ContainerEngine()
ctx := context.Background()
exportOpts := entities.VolumeExportOptions{}
if cliExportOpts.Output == "" {
return errors.New("expects output path, use --output=[path]")
}
inspectOpts.Type = common.VolumeType
volumeData, errs, err := containerEngine.VolumeInspect(ctx, args, inspectOpts)
if err != nil {
return err
}
if len(errs) > 0 {
return errorhandling.JoinErrors(errs)
}
if len(volumeData) < 1 {
return errors.New("no volume data found")
}
mountPoint := volumeData[0].VolumeConfigResponse.Mountpoint
driver := volumeData[0].VolumeConfigResponse.Driver
volumeOptions := volumeData[0].VolumeConfigResponse.Options
volumeMountStatus, err := containerEngine.VolumeMounted(ctx, args[0])
if err != nil {
return err
}
if mountPoint == "" {
return errors.New("volume is not mounted anywhere on host")
}
// Check if volume is using external plugin and export only if volume is mounted
if driver != "" && driver != "local" {
if !volumeMountStatus.Value {
return fmt.Errorf("volume is using a driver %s and volume is not mounted on %s", driver, mountPoint)
if targetPath != "" {
targetFile, err := os.Create(targetPath)
if err != nil {
return fmt.Errorf("unable to create target file path %q: %w", targetPath, err)
}
}
// Check if volume is using `local` driver and has mount options type other than tmpfs
if driver == "local" {
if mountOptionType, ok := volumeOptions["type"]; ok {
if mountOptionType != "tmpfs" && !volumeMountStatus.Value {
return fmt.Errorf("volume is using a driver %s and volume is not mounted on %s", driver, mountPoint)
}
defer targetFile.Close()
exportOpts.Output = targetFile
} else {
if cmd.Flag("output").Changed {
return errors.New("must provide valid path for file to write to")
}
if term.IsTerminal(int(os.Stdout.Fd())) {
return errors.New("cannot write to terminal, use command-line redirection or the --output flag")
}
exportOpts.Output = os.Stdout
}
logrus.Debugf("Exporting volume data from %s to %s", mountPoint, cliExportOpts.Output)
err = utils.CreateTarFromSrc(mountPoint, cliExportOpts.Output)
return err
return containerEngine.VolumeExport(ctx, args[0], exportOpts)
}

View File

@ -1,7 +1,7 @@
package volumes
import (
"errors"
"context"
"fmt"
"os"
@ -9,15 +9,12 @@ import (
"github.com/containers/podman/v5/cmd/podman/parse"
"github.com/containers/podman/v5/cmd/podman/registry"
"github.com/containers/podman/v5/pkg/domain/entities"
"github.com/containers/podman/v5/pkg/errorhandling"
"github.com/containers/podman/v5/utils"
"github.com/spf13/cobra"
)
var (
importDescription = `Imports contents into a podman volume from specified tarball (.tar, .tar.gz, .tgz, .bzip, .tar.xz, .txz).`
importCommand = &cobra.Command{
Annotations: map[string]string{registry.EngineMode: registry.ABIMode},
Use: "import VOLUME [SOURCE]",
Short: "Import a tarball contents into a podman volume",
Long: importDescription,
@ -37,65 +34,26 @@ func init() {
}
func importVol(cmd *cobra.Command, args []string) error {
var inspectOpts entities.InspectOptions
var tarFile *os.File
containerEngine := registry.ContainerEngine()
ctx := registry.Context()
// create a slice of volumes since inspect expects slice as arg
volumes := []string{args[0]}
tarPath := args[1]
opts := entities.VolumeImportOptions{}
if tarPath != "-" {
err := parse.ValidateFileName(tarPath)
if err != nil {
return err
}
// open tar file
tarFile, err = os.Open(tarPath)
if err != nil {
return err
}
filepath := args[1]
if filepath == "-" {
opts.Input = os.Stdin
} else {
tarFile = os.Stdin
if err := parse.ValidateFileName(filepath); err != nil {
return err
}
targetFile, err := os.Open(filepath)
if err != nil {
return fmt.Errorf("unable open input file: %w", err)
}
defer targetFile.Close()
opts.Input = targetFile
}
inspectOpts.Type = common.VolumeType
inspectOpts.Type = common.VolumeType
volumeData, errs, err := containerEngine.VolumeInspect(ctx, volumes, inspectOpts)
if err != nil {
return err
}
if len(errs) > 0 {
return errorhandling.JoinErrors(errs)
}
if len(volumeData) < 1 {
return errors.New("no volume data found")
}
mountPoint := volumeData[0].VolumeConfigResponse.Mountpoint
driver := volumeData[0].VolumeConfigResponse.Driver
volumeOptions := volumeData[0].VolumeConfigResponse.Options
volumeMountStatus, err := containerEngine.VolumeMounted(ctx, args[0])
if err != nil {
return err
}
if mountPoint == "" {
return errors.New("volume is not mounted anywhere on host")
}
// Check if volume is using external plugin and export only if volume is mounted
if driver != "" && driver != "local" {
if !volumeMountStatus.Value {
return fmt.Errorf("volume is using a driver %s and volume is not mounted on %s", driver, mountPoint)
}
}
// Check if volume is using `local` driver and has mount options type other than tmpfs
if driver == "local" {
if mountOptionType, ok := volumeOptions["type"]; ok {
if mountOptionType != "tmpfs" && !volumeMountStatus.Value {
return fmt.Errorf("volume is using a driver %s and volume is not mounted on %s", driver, mountPoint)
}
}
}
// dont care if volume is mounted or not we are gonna import everything to mountPoint
return utils.UntarToFileSystem(mountPoint, tarFile, nil)
containerEngine := registry.ContainerEngine()
ctx := context.Background()
return containerEngine.VolumeImport(ctx, args[0], opts)
}

View File

@ -64,9 +64,6 @@ func prune(cmd *cobra.Command, args []string) error {
if !force {
reader := bufio.NewReader(os.Stdin)
fmt.Println("WARNING! This will remove all volumes not used by at least one container. The following volumes will be removed:")
if err != nil {
return err
}
listOptions.Filter, err = parse.FilterArgumentsIntoFilters(filter)
if err != nil {
return err

View File

@ -574,6 +574,20 @@ func warnIfAmbiguousName(unit *parser.UnitFile, group string) {
}
}
// Warns if the unit has any properties defined in the Service group that are known to cause issues.
// We want to warn instead of erroring to avoid breaking any existing users' units,
// or to allow users to use these properties if they know what they are doing.
// We implement this here instead of in quadlet.initServiceUnitFile to avoid
// having to refactor a large amount of code in the generator just for a warning.
func warnIfUnsupportedServiceKeys(unit *parser.UnitFile) {
for _, key := range quadlet.UnsupportedServiceKeys {
_, hasKey := unit.Lookup(quadlet.ServiceGroup, key)
if hasKey {
Logf("Warning: using key %s in the Service group is not supported - use at your own risk", key)
}
}
}
func generateUnitsInfoMap(units []*parser.UnitFile) map[string]*quadlet.UnitInfo {
unitsInfoMap := make(map[string]*quadlet.UnitInfo)
for _, unit := range units {
@ -604,6 +618,9 @@ func generateUnitsInfoMap(units []*parser.UnitFile) map[string]*quadlet.UnitInfo
case strings.HasSuffix(unit.Filename, ".pod"):
serviceName = quadlet.GetPodServiceName(unit)
containers = make([]string, 0)
// Prefill resouceNames for .pod files.
// This is requires for referencing the pod from .container files
resourceName = quadlet.GetPodResourceName(unit)
default:
Logf("Unsupported file type %q", unit.Filename)
continue
@ -719,6 +736,8 @@ func process() bool {
var service *parser.UnitFile
var warnings, err error
warnIfUnsupportedServiceKeys(unit)
switch {
case strings.HasSuffix(unit.Filename, ".container"):
warnIfAmbiguousName(unit, quadlet.ContainerGroup)
@ -736,7 +755,7 @@ func process() bool {
case strings.HasSuffix(unit.Filename, ".build"):
service, warnings, err = quadlet.ConvertBuild(unit, unitsInfoMap, isUserFlag)
case strings.HasSuffix(unit.Filename, ".pod"):
service, err = quadlet.ConvertPod(unit, unit.Filename, unitsInfoMap, isUserFlag)
service, warnings, err = quadlet.ConvertPod(unit, unit.Filename, unitsInfoMap, isUserFlag)
default:
Logf("Unsupported file type %q", unit.Filename)
continue

View File

@ -1,37 +0,0 @@
{
"cniVersion": "0.4.0",
"name": "podman",
"plugins": [
{
"type": "bridge",
"bridge": "cni-podman0",
"isGateway": true,
"ipMasq": true,
"hairpinMode": true,
"ipam": {
"type": "host-local",
"routes": [{ "dst": "0.0.0.0/0" }],
"ranges": [
[
{
"subnet": "10.88.0.0/16",
"gateway": "10.88.0.1"
}
]
]
}
},
{
"type": "portmap",
"capabilities": {
"portMappings": true
}
},
{
"type": "firewall"
},
{
"type": "tuning"
}
]
}

View File

@ -1,20 +0,0 @@
## `cni` ##
**Note**: The CNI backend is deprecated and will be removed in the next major Podman version 5.0, in preference
of Netavark, see **[podman-network(1)](../docs/source/markdown/podman-network.1.md)** on how to change the backend.
There are a wide variety of different [CNI](https://github.com/containernetworking/cni) network configurations. This
directory just contains an example configuration that can be used as the
basis for your own configuration.
To use this configuration, place it in `/etc/cni/net.d` (or the directory
specified by `cni_config_dir` in your `containers.conf`).
For example a basic network configuration can be achieved with:
```bash
sudo mkdir -p /etc/cni/net.d
curl -qsSL https://raw.githubusercontent.com/containers/podman/main/cni/87-podman-bridge.conflist | sudo tee /etc/cni/net.d/87-podman-bridge.conflist
```
Dependent upon your CNI configuration, you will need to install as a minimum the `port` and `bridge` [CNI plugins](https://github.com/containernetworking/plugins) into `/opt/cni/bin` (or the directory specified by `cni_plugin_dir` in containers.conf). Please refer to the [CNI](https://github.com/containernetworking) project page in GitHub for more information.

View File

@ -209,6 +209,12 @@ mount -t tmpfs -o size=75%,mode=0700 none /var/lib/containers
showrun echo "Setting CI_DESIRED_STORAGE [=$CI_DESIRED_STORAGE] for *e2e* tests"
echo "STORAGE_FS=$CI_DESIRED_STORAGE" >>/etc/ci_environment
if ((CONTAINER==0)); then # not yet inside a container
# Load null_blk to use /dev/nullb0 for testing block
# devices limits
modprobe null_blk nr_devices=1 || :
fi
# Required to be defined by caller: The environment where primary testing happens
# shellcheck disable=SC2154
showrun echo "about to set up for TEST_ENVIRON [=$TEST_ENVIRON]"

View File

@ -0,0 +1,108 @@
# MIT License
#
# Copyright (c) Microsoft Corporation.
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
#
# The above copyright notice and this permission notice shall be included in all
# copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
# SOFTWARE
# This script is an adapted version of
# https://github.com/Microsoft/WSL/blob/master/diagnostics/collect-wsl-logs.ps1
#Requires -RunAsAdministrator
[CmdletBinding()]
Param (
$LogProfile = $null
)
Set-StrictMode -Version Latest
$folder = "WslLogs" + (Get-Date -Format "yyyy-MM-dd_HH-mm-ss")
mkdir -p $folder | Out-Null
if ($LogProfile -eq $null -Or ![System.IO.File]::Exists($LogProfile))
{
if ($LogProfile -eq $null)
{
$url = "https://raw.githubusercontent.com/microsoft/WSL/master/diagnostics/wsl.wprp"
}
elseif ($LogProfile -eq "storage")
{
$url = "https://raw.githubusercontent.com/microsoft/WSL/master/diagnostics/wsl_storage.wprp"
}
else
{
Write-Error "Unknown log profile: $LogProfile"
exit 1
}
$LogProfile = "$folder/wsl.wprp"
try {
Invoke-WebRequest -UseBasicParsing $url -OutFile $LogProfile
}
catch {
throw
}
}
reg.exe export HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Lxss $folder/HKCU.txt 2>&1 | Out-Null
reg.exe export HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Lxss $folder/HKLM.txt 2>&1 | Out-Null
reg.exe export HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\P9NP $folder/P9NP.txt 2>&1 | Out-Null
reg.exe export HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\WinSock2 $folder/Winsock2.txt 2>&1 | Out-Null
# Skipping the next reg.exe command because it's failing with error
# "ERROR: The system was unable to find the specified registry key or value"
# on the CI server (Windows Server 2022)
# reg.exe export "HKEY_CLASSES_ROOT\CLSID\{e66b0f30-e7b4-4f8c-acfd-d100c46c6278}" $folder/wslsupport-proxy.txt 2>&1 | Out-Null
reg.exe export "HKEY_CLASSES_ROOT\CLSID\{a9b7a1b9-0671-405c-95f1-e0612cb4ce7e}" $folder/wslsupport-impl.txt 2>&1 | Out-Null
Get-ItemProperty -Path "Registry::HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion" > $folder/windows-version.txt
Get-Service wslservice -ErrorAction Ignore | Format-list * -Force > $folder/wslservice.txt
$wslconfig = "$env:USERPROFILE/.wslconfig"
if (Test-Path $wslconfig)
{
Copy-Item $wslconfig $folder | Out-Null
}
get-appxpackage MicrosoftCorporationII.WindowsSubsystemforLinux -ErrorAction Ignore > $folder/appxpackage.txt
get-acl "C:\ProgramData\Microsoft\Windows\WindowsApps" -ErrorAction Ignore | Format-List > $folder/acl.txt
Get-WindowsOptionalFeature -Online > $folder/optional-components.txt
bcdedit.exe > $folder/bcdedit.txt
$uninstallLogs = "$env:TEMP/wsl-uninstall-logs.txt"
if (Test-Path $uninstallLogs)
{
Copy-Item $uninstallLogs $folder | Out-Null
}
$wprOutputLog = "$folder/wpr.txt"
wpr.exe -start $LogProfile -filemode 2>&1 >> $wprOutputLog
if ($LastExitCode -Ne 0)
{
Write-Host -ForegroundColor Yellow "Log collection failed to start (exit code: $LastExitCode), trying to reset it."
wpr.exe -cancel 2>&1 >> $wprOutputLog
wpr.exe -start $LogProfile -filemode 2>&1 >> $wprOutputLog
if ($LastExitCode -Ne 0)
{
Write-Host -ForegroundColor Red "Couldn't start log collection (exitCode: $LastExitCode)"
}
}
Write-Host "`nWSL Log collection is running."

View File

@ -0,0 +1,45 @@
# MIT License
#
# Copyright (c) Microsoft Corporation.
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
#
# The above copyright notice and this permission notice shall be included in all
# copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
# SOFTWARE
# This script is an adapted version of
# https://github.com/Microsoft/WSL/blob/master/diagnostics/collect-wsl-logs.ps1
#Requires -RunAsAdministrator
Set-StrictMode -Version Latest
# get the directory that has a name that starts with WslLogs
$folder = Get-ChildItem -Directory | Where-Object { $_.Name -like "WslLogs*" } | Select-Object -First 1
$wprOutputLog = "$folder/wpr.txt"
Write-Host "Saving WSL logs..."
wpr.exe -stop $folder/logs.etl 2>&1 >> $wprOutputLog
$logArchive = "$(Resolve-Path $folder).zip"
Compress-Archive -Path $folder -DestinationPath $logArchive
Remove-Item $folder -Recurse
$fileName = (Get-Item $logArchive).Name
$parentFolder = (Get-Item $logArchive).Directory.Parent.FullName
Move-Item -Path $logArchive -Destination $parentFolder
Write-Host -ForegroundColor Green "Logs saved in: ${parentFolder}/${fileName}"

View File

@ -41,4 +41,15 @@ $Env:TMP = 'Z:\'
$Env:TEMP = 'Z:\'
Write-Host "`nRunning podman-machine e2e tests"
Run-Command ".\winmake localmachine"
if ($Env:TEST_FLAVOR -eq "machine-wsl") {
Run-Command "$PSScriptRoot\win-collect-wsl-logs-start.ps1"
}
try {
Run-Command ".\winmake localmachine"
} finally {
if ($Env:TEST_FLAVOR -eq "machine-wsl") {
Run-Command "$PSScriptRoot\win-collect-wsl-logs-stop.ps1"
}
}

View File

@ -1,56 +0,0 @@
#!/usr/bin/bash -e
#
# Script used for downloading man pages and config files from
# github.com/containers libraries (storage, common, image)
#
# Must be run from directory containing input specfile
#
die() {
echo "$(basename $0): $*" >&2
exit 1
}
branchversion() {
gomod=$(git rev-parse --show-toplevel)/go.mod
v=$(awk -v X=github.com/containers/$1 '$1 ~ X { print $2 }' <$gomod)
hash=$(expr "$v" : "v.*-[0-9.]\+-\([0-9a-f]\+\)")
if [[ -n "$hash" ]]; then
v="$hash"
fi
echo "$v"
}
SPECFILE=containers-common.spec
if [[ ! -e $SPECFILE.in ]]; then
die "Please run me from the same directory as $SPECFILE.in"
fi
declare -A moduleversion
for module in common image storage; do
v=$(branchversion $module)
if [[ -z "$v" ]]; then
die "Could not find version for module '$v'"
fi
moduleversion[$module]=$v
done
builddir=containers-common-${moduleversion[common]}
mkdir -p $builddir
sed -e "s/COMMON_BRANCH/${moduleversion[common]}/g" \
-e "s/IMAGE_BRANCH/${moduleversion[image]}/g" \
-e "s/STORAGE_BRANCH/${moduleversion[storage]}/g" \
<$SPECFILE.in >$builddir/$SPECFILE
cd $builddir
spectool -fg $SPECFILE
if [[ ! -e storage.conf ]]; then
die "spectool did not pull storage.conf"
fi
echo "Changing storage.conf..."
sed -i -e 's/^driver.*=.*/driver = "overlay"/' -e 's/^mountopt.*=.*/mountopt = "nodev,metacopy=on"/' \
storage.conf

View File

@ -1,175 +0,0 @@
# Below definitions are used to deliver config files from a particular branch
# of c/image, c/common, c/storage vendored in all of Buildah, Podman and Skopeo.
# These vendored components must have the same version. If it is not the case,
# pick the oldest version on c/image, c/common, c/storage vendored in
# Buildah/Podman/Skopeo.
%global skopeo_branch main
%global image_branch IMAGE_BRANCH
%global common_branch COMMON_BRANCH
%global storage_branch STORAGE_BRANCH
%global shortnames_branch main
%global github_containers https://raw.githubusercontent.com/containers
Epoch: 4
Name: containers-common
Version: COMMON_BRANCH
Release: %autorelease
Summary: Common configuration and documentation for containers
License: ASL 2.0
BuildArch: noarch
BuildRequires: go-md2man
Provides: skopeo-containers = %{epoch}:%{version}-%{release}
Requires: (container-selinux >= 2:2.162.1 if selinux-policy)
Requires: oci-runtime
Requires: container-network-stack
Recommends: netavark
Recommends: fuse-overlayfs
Recommends: slirp4netns
Source1: %{github_containers}/common/%{common_branch}/docs/containers.conf.5.md
Source2: %{github_containers}/common/%{common_branch}/pkg/config/containers.conf
Source3: %{github_containers}/common/%{common_branch}/pkg/seccomp/seccomp.json
Source4: %{github_containers}/common/%{common_branch}/pkg/subscriptions/mounts.conf
Source5: %{github_containers}/image/%{image_branch}/docs/containers-auth.json.5.md
Source6: %{github_containers}/image/%{image_branch}/docs/containers-certs.d.5.md
Source7: %{github_containers}/image/%{image_branch}/docs/containers-policy.json.5.md
Source8: %{github_containers}/image/%{image_branch}/docs/containers-registries.conf.5.md
Source9: %{github_containers}/image/%{image_branch}/docs/containers-registries.conf.d.5.md
Source10: %{github_containers}/image/%{image_branch}/docs/containers-registries.d.5.md
Source11: %{github_containers}/image/%{image_branch}/docs/containers-signature.5.md
Source12: %{github_containers}/image/%{image_branch}/docs/containers-transports.5.md
Source13: %{github_containers}/image/%{image_branch}/registries.conf
Source14: %{github_containers}/common/%{common_branch}/docs/containers-mounts.conf.5.md
Source15: %{github_containers}/shortnames/%{shortnames_branch}/shortnames.conf
Source16: %{github_containers}/skopeo/%{skopeo_branch}/default.yaml
Source17: %{github_containers}/skopeo/%{skopeo_branch}/default-policy.json
Source18: %{github_containers}/storage/%{storage_branch}/docs/containers-storage.conf.5.md
Source19: %{github_containers}/storage/%{storage_branch}/storage.conf
Source20: RPM-GPG-KEY-redhat-release
Source21: registry.access.redhat.com.yaml
Source22: registry.redhat.io.yaml
Source23: %{github_containers}/common/%{common_branch}/docs/Containerfile.5.md
Source24: %{github_containers}/common/%{common_branch}/docs/containerignore.5.md
Source25: %{github_containers}/common/%{common_branch}/docs/links/.containerignore.5
%description
This package contains common configuration files and documentation for container
tools ecosystem, such as Podman, Buildah and Skopeo.
It is required because the most of configuration files and docs come from projects
which are vendored into Podman, Buildah, Skopeo, etc. but they are not packaged
separately.
%prep
cp %{SOURCE1} .
cp %{SOURCE2} .
cp %{SOURCE3} .
cp %{SOURCE4} .
cp %{SOURCE5} .
cp %{SOURCE6} .
cp %{SOURCE7} .
cp %{SOURCE8} .
cp %{SOURCE9} .
cp %{SOURCE10} .
cp %{SOURCE11} .
cp %{SOURCE12} .
cp %{SOURCE13} .
cp %{SOURCE14} .
cp %{SOURCE15} 000-shortnames.conf
cp %{SOURCE16} .
cp %{SOURCE17} policy.json
cp %{SOURCE18} .
cp %{SOURCE19} .
cp %{SOURCE20} .
cp %{SOURCE21} .
cp %{SOURCE22} .
cp %{SOURCE23} .
cp %{SOURCE24} .
cp %{SOURCE25} .
%build
mkdir -p man5
for FILE in $(ls *.5.md); do
go-md2man -in $FILE -out man5/$(basename $FILE .md)
done
cp man5/containerignore.5 man5/.containerignore.5
%install
# install config and policy files for registries
install -dp %{buildroot}%{_sysconfdir}/containers/{certs.d,oci/hooks.d}
install -dp %{buildroot}%{_sharedstatedir}/containers/sigstore
install -Dp -m0644 default.yaml -t %{buildroot}%{_sysconfdir}/containers/registries.d
install -Dp -m0644 storage.conf -t %{buildroot}%{_datadir}/containers
install -Dp -m0644 registries.conf -t %{buildroot}%{_sysconfdir}/containers
install -Dp -m0644 000-shortnames.conf -t %{buildroot}%{_sysconfdir}/containers/registries.conf.d
install -Dp -m0644 policy.json -t %{buildroot}%{_sysconfdir}/containers
install -Dp -m0644 RPM-GPG-KEY-redhat-release -t %{buildroot}%{_sysconfdir}/pki/rpm-gpg
install -Dp -m0644 registry.access.redhat.com.yaml -t %{buildroot}%{_sysconfdir}/containers/registries.d
install -Dp -m0644 registry.redhat.io.yaml -t %{buildroot}%{_sysconfdir}/containers/registries.d
# install manpages
for FILE in $(ls -a man5 | grep 5); do
install -Dp -m0644 man5/$FILE -t %{buildroot}%{_mandir}/man5
done
# install config files for mounts, containers and seccomp
install -m0644 mounts.conf %{buildroot}%{_datadir}/containers/mounts.conf
install -m0644 seccomp.json %{buildroot}%{_datadir}/containers/seccomp.json
install -m0644 containers.conf %{buildroot}%{_datadir}/containers/containers.conf
# install secrets patch directory
install -d -p -m 755 %{buildroot}/%{_datadir}/rhel/secrets
# rhbz#1110876 - update symlinks for subscription management
ln -s %{_sysconfdir}/pki/entitlement %{buildroot}%{_datadir}/rhel/secrets/etc-pki-entitlement
ln -s %{_sysconfdir}/rhsm %{buildroot}%{_datadir}/rhel/secrets/rhsm
ln -s %{_sysconfdir}/yum.repos.d/redhat.repo %{buildroot}%{_datadir}/rhel/secrets/redhat.repo
%post
if [[ ! -f %{_mandir}/man5/Dockerfile.5.gz ]]; then
echo .so %{_mandir}/man5/Containerfile.5 > %{_mandir}/man5/Dockerfile.5
gzip %{_mandir}/man5/Dockerfile.5
fi
if [[ ! -f %{_mandir}/man5/dockerignore.5.gz ]]; then
echo .so %{_mandir}/man5/containerignore.5 > %{_mandir}/man5/dockerignore.5
gzip %{_mandir}/man5/dockerignore.5
fi
if [[ ! -f %{_mandir}/man5/.dockerignore.5.gz ]]; then
echo .so %{_mandir}/man5/containerignore.5 > %{_mandir}/man5/.dockerignore.5
gzip %{_mandir}/man5/.dockerignore.5
fi
%files
%dir %{_sysconfdir}/containers
%dir %{_sysconfdir}/containers/certs.d
%dir %{_sysconfdir}/containers/oci
%dir %{_sysconfdir}/containers/oci/hooks.d
%dir %{_sysconfdir}/containers/registries.conf.d
%dir %{_sysconfdir}/containers/registries.d
%config(noreplace) %{_sysconfdir}/containers/policy.json
%config(noreplace) %{_sysconfdir}/containers/registries.conf
%config(noreplace) %{_sysconfdir}/containers/registries.conf.d/000-shortnames.conf
%{_sysconfdir}/pki/rpm-gpg/RPM-GPG-KEY-redhat-release
%config(noreplace) %{_sysconfdir}/containers/registries.d/default.yaml
%{_sysconfdir}/containers/registries.d/registry.redhat.io.yaml
%{_sysconfdir}/containers/registries.d/registry.access.redhat.com.yaml
%ghost %{_sysconfdir}/containers/storage.conf
%ghost %{_sysconfdir}/containers/containers.conf
%dir %{_sharedstatedir}/containers/sigstore
%ghost %{_mandir}/man5/Dockerfile.5.gz
%ghost %{_mandir}/man5/dockerignore.5.gz
%ghost %{_mandir}/man5/.dockerignore.5.gz
%{_mandir}/man5/Containerfile.5.gz
%{_mandir}/man5/containerignore.5.gz
%{_mandir}/man5/.containerignore.5.gz
%{_mandir}/man5/containers*.5.gz
%dir %{_datadir}/containers
%{_datadir}/containers/storage.conf
%{_datadir}/containers/containers.conf
%{_datadir}/containers/mounts.conf
%{_datadir}/containers/seccomp.json
%dir %{_datadir}/rhel/secrets
%{_datadir}/rhel/secrets/*
%changelog
%autochangelog

View File

@ -1,114 +0,0 @@
#! /usr/bin/env bash
#
# dependabot-dance - invoked to perform manual steps on podman dependabot PRs
#
# As best I can tell (please correct me if mistaken), dependabot's job is
# to submit PRs with a change only in 'go.mod' but without actually
# running 'make vendor' to update the source files under vendor. This
# requires a human to run those steps.
#
# This script automates that, with a few safety checks.
#
ME=$(basename $0)
missing=" argument is missing; see $ME --help for details"
usage="Usage: $ME [--help] [-v|--verbose]
$ME performs a series of magical steps to get dependabot PRs
ready for merge. The important one is 'make vendor-in-container',
everything else is scaffolding to check out the PR and push it back.
Flags:
--help display usage message
-v, --verbose verbose output
"
verbose=
for i
do
value=$(expr "$i" : '[^=]*=\(.*\)')
case "$i" in
-h*|--help) echo "$usage"; exit 0;;
-v|--verbose) verbose=$i; shift;;
-*) echo "$ME: unrecognized option $i" >&2
echo "$usage" >&2
exit 1;;
*) break;;
esac
done
die () {
echo "$ME: $*" >&2
exit 1
}
function branch_dance() {
local branch="$1"
# User will appreciate seeing 'git' and 'make' commands, but nothing else
set -x
git checkout -t $branch
set +x
# Commit must be from dependabot
author=$(git show --no-patch --format='format:%an' HEAD)
if ! [[ $author =~ dependabot ]]; then
echo
echo "Commit author is '$author' (expected 'dependabot')"
echo -n "Continue? [y/N] "
read answer
case "$answer" in
[yY]*) ;;
*) exit 1;;
esac
fi
# This is what does all the work
set -x
make vendor-in-container
set +x
# Now make sure at least *something* changed under vendor
modified=$(git ls-files -m vendor)
if [[ -z "$modified" ]]; then
echo "No files changed under 'vendor' -- nothing to do!"
return
fi
# Okay, here we go
set -x
git add vendor
git commit -a --amend -s --no-edit
git push --force
set +x
# Try to leave things in relatively clean state; remove local branch copy
local tracking_branch=$(git branch --show-current)
git checkout main
git branch -d $tracking_branch
}
# Make sure we're cd'ed to the top level of a podman repo
test -d .git || die "No .git subdirectory (please cd to top level)"
# Clear all dependabot remote branches
git branch -r | grep /dependabot/go_modules/ \
| xargs --no-run-if-empty git branch -r -d
# ...and pull new ones
git pull --all
# Abort on any error from here on
set -e
# We cannot have any git-modified files
modified=$(git ls-files -m)
test -z "$modified" || die "Modified files exist: $modified"
for branch in $(git branch -r | grep /dependabot/go_modules/); do
echo
echo ">>>>> $branch"
branch_dance $branch
done

View File

@ -1,32 +0,0 @@
# Fedora dependencies for building podman
btrfs-progs-devel
bzip2
containernetworking-cni
device-mapper-devel
findutils
git
glib2-devel
glibc-static
golang
gpgme-devel
iptables
libassuan-devel
libseccomp-devel
libselinux-devel
lsof
make
nmap-ncat
procps-ng
python
python3-dateutil
python3-pip
python3-psutil
python3-pytoml
python3-pyyaml
rsync
slirp4netns
unzip
which
xz
zip

View File

@ -1,5 +0,0 @@
# On fedora 36 ip_tables is no longer auto loaded and rootless user have no permsissions to load it.
# When we have actual nftables support in the future we might want to revisit this.
# If you use iptables-nft this is not needed.
ip_tables
ip6_tables

View File

@ -9,7 +9,7 @@ else
endif
GVPROXY_VERSION=$(shell $(GO) list -m -f '{{.Version}}' github.com/containers/gvisor-tap-vsock)
VFKIT_VERSION ?= 0.6.1
KRUNKIT_VERSION ?= 0.2.0
KRUNKIT_VERSION ?= 0.2.2
GVPROXY_RELEASE_URL ?= https://github.com/containers/gvisor-tap-vsock/releases/download/$(GVPROXY_VERSION)/gvproxy-darwin
VFKIT_RELEASE_URL ?= https://github.com/crc-org/vfkit/releases/download/v$(VFKIT_VERSION)/vfkit-unsigned
KRUNKIT_RELEASE_URL ?= https://github.com/containers/krunkit/releases/download/v$(KRUNKIT_VERSION)/krunkit-podman-unsigned-$(KRUNKIT_VERSION).tgz

View File

@ -1,21 +0,0 @@
FROM quay.io/fedora/fedora-coreos:stable
# Setup the podman-next copr repo
# The source file for the dnf repo may say `rawhide` but it's release
# agnostic and `rawhide` in the name is unlikely to change compared
# with URLs containing fedora release numbers.
ADD https://copr.fedorainfracloud.org/coprs/rhcontainerbot/podman-next/repo/fedora-rawhide/rhcontainerbot-podman-next-fedora-rawhide.repos /etc/yum.repos.d/rhcontainerbot-podman-next-fedora.repo
ADD https://download.copr.fedorainfracloud.org/results/rhcontainerbot/podman-next/pubkey.gpg /etc/pki/rpm-gpg/rhcontainerbot-podman-next-fedora.gpg
# Replace aardvark-dns, containers-common[-extra], crun, netavark, podman
# Install crun-wasm and wasmedge-rt
# Remove moby-engine, containerd, runc
# Note: Currently does not result in a size reduction for the container image
RUN rpm-ostree override replace --experimental --freeze \
--from repo="copr:copr.fedorainfracloud.org:rhcontainerbot:podman-next" \
aardvark-dns containers-common containers-common-extra crun crun-wasm netavark podman && \
rpm-ostree install wasmedge-rt && \
rpm-ostree override remove moby-engine containerd runc && \
ostree container commit
LABEL quay.expires-after=30d

View File

@ -1,11 +0,0 @@
# The container's configuration file specifies all of the available configuration
# command-line options/flags for container engine tools like Podman
# but in a TOML format that can be easily modified and versioned.
[engine]
# Default Remote URI to access the Podman service.
# Examples:
# remote rootless ssh://engineering.lab.company.com/run/user/1000/podman/podman.sock
# remote rootful ssh://root@10.10.1.136:22/run/podman/podman.sock
# remote_uri= ""

View File

@ -1,5 +0,0 @@
#!/bin/sh
: "${GOPATH?Need to set GOPATH}"
cd cmd/podman/ && eval `go build -work -a 2>&1` && find $WORK -type f -name "*.a" | xargs -I{} du -hxs "{}" | sort -rh | sed -e s:${WORK}/::g

View File

@ -1,12 +0,0 @@
#snapcraft specifics
/parts/
/stage/
/prime/
*.snap
.snapcraft
__pycache__
*.pyc
*_source.tar.bz2
snap/.snapcraft

View File

@ -1,82 +0,0 @@
<h1 align="center">
<img src="https://raw.githubusercontent.com/containers/podman.io/main/images/podman.svg?sanitize=true" alt="podman">
<br />
</h1>
<p align="center"><b>This is the snap for <a href="https://podman.io/">podman</a></b>, <i>“Managing Pods, Containers, and Container Images in Multiple Formats (Docker, OCI, ...).”</i>. It works on Ubuntu, Fedora, Debian, RHEL, SUSE, and other major Linux
distributions.</p>
<!-- Uncomment and modify this when you are provided a build status badge
<p align="center">
<a href="https://build.snapcraft.io/user/snapcrafters/fork-and-rename-me"><img src="https://build.snapcraft.io/badge/snapcrafters/fork-and-rename-me.svg" alt="Snap Status"></a>
</p>
-->
<!-- Uncomment and modify this when you have a screenshot
![podman](screenshot.png?raw=true "podman")
-->
<p align="center">Published for <img src="https://raw.githubusercontent.com/anythingcodes/slack-emoji-for-techies/gh-pages/emoji/tux.png" align="top" width="24" /> with 💝 by Snapcrafters</p>
## Install
sudo snap install podman
([Don't have snapd installed?](https://snapcraft.io/docs/core/install))
## Remaining tasks
<!-- Uncomment and modify this when you have a screenshot
![podman](screenshot.png?raw=true "podman")
-->
Snapcrafters ([join us](https://forum.snapcraft.io/t/join-snapcrafters/1325))
are working to land snap install documentation and
the [snapcraft.yaml](https://github.com/snapcrafters/podman/blob/main/snap/snapcraft.yaml)
upstream so `podman` can authoritatively publish future releases.
- [x] Fork the [Snapcrafters template](https://github.com/snapcrafters/fork-and-rename-me) repository to your own GitHub account.
- If you have already forked the Snapcrafter template to your account and want to create another snap, you'll need to use GitHub's [Import repository](https://github.com/new/import) feature because you can only fork a repository once.
- [x] Rename the forked Snapcrafters template repository
- [x] Update the description of the repository
- [x] Update logos and references to `podman` and `[podman]`
- [ ] Create a snap that runs in `devmode`
- [x] Register the snap in the store, **using the preferred upstream name**
- [ ] Add a screenshot to this `README.md`
- [ ] Publish the `devmode` snap in the Snap store edge channel
- [ ] Add install instructions to this `README.md`
- [ ] Update snap store metadata, icons and screenshots
- [ ] Convert the snap to `strict` confinement, or `classic` confinement if it qualifies
- [ ] Publish the confined snap in the Snap store beta channel
- [ ] Update the install instructions in this `README.md`
- [ ] Post a call for testing on the [Snapcraft Forum](https://forum.snapcraft.io) - [link]()
- [ ] Make a post in the [Snapcraft Forum](https://forum.snapcraft.io) asking for a transfer of the snap name from you to snapcrafters - [link]()
- [ ] Ask a [Snapcrafters admin](https://github.com/orgs/snapcrafters/people?query=%20role%3Aowner) to fork your repo into github.com/snapcrafters, and configure the repo for automatic publishing into edge on commit
- [ ] Add the provided Snapcraft build badge to this `README.md`
- [ ] Publish the snap in the Snap store stable channel
- [ ] Update the install instructions in this `README.md`
- [ ] Post an announcement in the [Snapcraft Forum](https://forum.snapcraft.io) - [link]()
- [ ] Submit a pull request or patch upstream that adds snap install documentation - [link]()
- [ ] Submit a pull request or patch upstream that adds the `snapcraft.yaml` and any required assets/launchers - [link]()
- [ ] Add upstream contact information to the `README.md`
- If upstream accept the PR:
- [ ] Request upstream create a Snap store account
- [ ] Contact the Snap Advocacy team to request the snap be transferred to upstream
- [ ] Ask the Snap Advocacy team to celebrate the snap - [link]()
If you have any questions, [post in the Snapcraft forum](https://forum.snapcraft.io).
<!--
## The Snapcrafters
| [![Your Name](https://gravatar.com/avatar/bc0bced65e963eb5c3a16cab8b004431/?s=128)](https://github.com/yourname/) |
| :---: |
| [Your Name](https://github.com/yourname/) |
-->
<!-- Uncomment and modify this when you have upstream contacts
## Upstream
| [![Upstream Name](https://gravatar.com/avatar/bc0bced65e963eb5c3a16cab8b004431?s=128)](https://github.com/upstreamname) |
| :---: |
| [Upstream Name](https://github.com/upstreamname) |
-->

View File

@ -1,45 +0,0 @@
name: podman # you probably want to 'snapcraft register <name>'
version: '0.11.1.1' # just for humans, typically '1.2+git' or '1.3.2'
summary: Manage pods, containers and container images
description: |
`podman` is a tool for managing Pods, Containers, and Container Images
in multiple formats including Docker/OSI images. It exposes the same
command line interface as Docker, but runs containers unprivileged by
default.
confinement: devmode # use 'strict' once you have the right plugs and slots
base: core18
parts:
podman:
plugin: go
source: https://github.com/containers/podman/archive/v0.11.1.1.tar.gz
go-importpath: github.com/containers/podman
build-packages:
# https://podman.io/getting-started/installation#build-and-run-dependencies
- btrfs-tools
- git
- golang-go
- go-md2man
- iptables
- libassuan-dev
- libdevmapper-dev
- libglib2.0-dev
- libc6-dev
- libgpgme11-dev
- libgpg-error-dev
- libostree-dev
- libprotobuf-dev
- libprotobuf-c0-dev
- libseccomp-dev
- libselinux1-dev
- pkg-config
stage-packages:
- libarchive13
- libassuan0
- libgpgme11
- libicu60
- libostree-1-1
- libsoup2.4-1
- libxml2

View File

@ -3,15 +3,15 @@ FROM registry.fedoraproject.org/fedora:latest
WORKDIR /go/src/github.com/containers/podman
RUN dnf install -y systemd-devel \
awk \
btrfs-progs-devel \
git \
golang \
gpgme-devel \
libassuan-devel \
libseccomp-devel \
gpgme-devel \
device-mapper-devel \
btrfs-progs-devel \
golang \
make \
man-db \
git \
perl-Clone \
perl-FindBin \
pre-commit && dnf clean all
pre-commit && dnf clean all

View File

@ -1,67 +0,0 @@
function Build-WSLKernelInstaller {
param (
[string]$wslkerninstFolder,
[string]$artifactsFolder
);
Set-Variable GOARCH=amd64
go build -ldflags -H=windowsgui -o "$artifactsFolder\podman-wslkerninst.exe" "$wslkerninstFolder"
}
function Build-MSIHooks {
param (
[string]$msiHooksFolder,
[string]$artifactsFolder
);
# Build using x86 toolchain, see comments in check.c for rationale and details
if ( Get-MingW ) {
Build-MSIHooks-Using-MingW $msiHooksFolder $artifactsFolder
} elseif ( Get-VSBuildTools ) {
$vsinstance = Get-VSSetupInstance | Select-VSSetupInstance -Product Microsoft.VisualStudio.Product.BuildTools -Latest
Build-MSIHooks-Using-VSBuildTools $msiHooksFolder $artifactsFolder $vsinstance
} else {
$msg = "A C/C++ compiler is required to build `"$msiHooksFolder\check.c`". "
$msg += "Supported compilers are MinGW CC (`"x86_64-w64-mingw32-gcc`") and the "
$msg += "`"Microsoft.VisualStudio.Product.BuildTools`" with `"VSSetup`" PowerShell extension."
Write-Error -Message $msg -ErrorAction Stop
}
}
function Get-MingW {
return Get-Command "x86_64-w64-mingw32-gcc" -errorAction SilentlyContinue
}
function Get-VSBuildTools {
return ((Get-Command "Get-VSSetupInstance" -errorAction SilentlyContinue) -and `
(@(Get-VSSetupInstance | Select-VSSetupInstance -Product "Microsoft.VisualStudio.Product.BuildTools").Count -gt 0))
}
function Build-MSIHooks-Using-MingW {
param (
[string]$msiHooksFolder,
[string]$artifactsFolder
);
Set-Variable GOARCH=amd64
x86_64-w64-mingw32-gcc $msiHooksFolder/check.c -shared -lmsi -mwindows -o $artifactsFolder/podman-msihooks.dll
}
function Build-MSIHooks-Using-VSBuildTools {
param (
[string]$msiHooksFolder,
[string]$artifactsFolder,
[Microsoft.VisualStudio.Setup.Instance]$vsinstance
);
$vspath = $vsinstance.InstallationPath
$vsinstanceid = $vsinstance.InstanceId
Import-Module "$vspath\Common7\Tools\Microsoft.VisualStudio.DevShell.dll"
Enter-VsDevShell $vsinstanceid -DevCmdArguments '-arch=amd64 -host_arch=amd64'
cl.exe /W4 /Fo$artifactsFolder\ $msiHooksFolder\check.c Advapi32.lib Msi.lib /link /DLL /out:$artifactsFolder\podman-msihooks.dll
}
$wslkerninstFolder="$PSScriptRoot\..\..\cmd\podman-wslkerninst"
$msiHooksFolder="$PSScriptRoot\podman-msihooks"
$artifactsFolder="$PSScriptRoot\artifacts"
Build-WSLKernelInstaller $wslkerninstFolder $artifactsFolder
Build-MSIHooks $msiHooksFolder $artifactsFolder

View File

@ -55,6 +55,7 @@ if ($args.Count -lt 1 -or $args[0].Length -lt 1) {
Write-Host 'Uses Env Vars: '
Write-Host ' $ENV:FETCH_BASE_URL - GitHub Repo Address to locate release on'
Write-Host ' $ENV:V531_SETUP_EXE_PATH - Path to v5.3.1 setup.exe used to build the patch'
Write-Host ' $ENV:PODMAN_ARCH - Installer target platform (x64 or arm64)'
Write-Host 'Env Settings for signing (optional)'
Write-Host ' $ENV:VAULT_ID'
Write-Host ' $ENV:APP_ID'
@ -103,11 +104,18 @@ if ($ENV:INSTVER -eq "") {
Exit 1
}
.\build-hooks.ps1; ExitOnError
$installerPlatform = ""
if ($null -eq $ENV:PODMAN_ARCH -or "" -eq $ENV:PODMAN_ARCH -or "amd64" -eq $ENV:PODMAN_ARCH) {
$installerPlatform = "x64"
} elseif ($ENV:PODMAN_ARCH -eq "arm64") {
$installerPlatform = "arm64"
} else {
Write-Host "Unknown architecture $ENV:PODMAN_ARCH. Valid options are amd64 or arm64."
Exit 1
}
SignItem @("artifacts/win-sshproxy.exe",
"artifacts/podman.exe",
"artifacts/podman-msihooks.dll",
"artifacts/podman-wslkerninst.exe")
"artifacts/podman.exe")
$gvExists = Test-Path "artifacts/gvproxy.exe"
if ($gvExists) {
SignItem @("artifacts/gvproxy.exe")
@ -126,10 +134,10 @@ if ($gvExists) {
if (Test-Path ./obj) {
Remove-Item ./obj -Recurse -Force -Confirm:$false
}
dotnet build podman.wixproj /property:DefineConstants="VERSION=$ENV:INSTVER" -o .; ExitOnError
dotnet build podman.wixproj /property:DefineConstants="VERSION=$ENV:INSTVER" /property:InstallerPlatform="$installerPlatform" -o .; ExitOnError
SignItem @("en-US\podman.msi")
dotnet build podman-setup.wixproj /property:DefineConstants="VERSION=$ENV:INSTVER" -o .; ExitOnError
dotnet build podman-setup.wixproj /property:DefineConstants="VERSION=$ENV:INSTVER" /property:InstallerPlatform="$installerPlatform" -o .; ExitOnError
wix burn detach podman-setup.exe -engine engine.exe; ExitOnError
SignItem @("engine.exe")

View File

@ -1,130 +0,0 @@
#include <windows.h>
#include <MsiQuery.h>
BOOL isWSLEnabled();
BOOL isHyperVEnabled();
LPCWSTR boolToNStr(BOOL bool);
LPCSTR szSvcNameHyperv = TEXT("vmms");
/**
* CheckWSL is a custom action loaded by the Podman Windows installer
* to determine whether the system already has WSL installed.
*
* The intention is that this action is compiled for x86_64, which
* can be ran on both Intel and Arm based systems (the latter through
* emulation). While the code should build fine on MSVC and clang, the
* intended usage is MingW-W64 (cross-compiling gcc targeting Windows).
*
* Previously this was implemented as a Golang c-shared cgo library,
* however, the WoW x86_64 emulation layer struggled with dynamic
* hot-loaded transformation of the goruntime into an existing process
* (required by MSI custom actions). In the future this could be
* converted back, should the emulation issue be resolved.
*/
__declspec(dllexport) UINT __cdecl CheckWSL(MSIHANDLE hInstall) {
BOOL hasWSL = isWSLEnabled();
// Set a property with the WSL state for the installer to operate on
MsiSetPropertyW(hInstall, L"HAS_WSLFEATURE", boolToNStr(hasWSL));
return 0;
}
/**
* CheckHyperV is a custom action loaded by the Podman Windows installer
* to determine whether the system already has Hyper-V installed.
*/
__declspec(dllexport) UINT __cdecl CheckHyperV(MSIHANDLE hInstall) {
BOOL hasHyperV = isHyperVEnabled();
// Set a property with the HyperV state for the installer to operate on
MsiSetPropertyW(hInstall, L"HAS_HYPERVFEATURE", boolToNStr(hasHyperV));
return 0;
}
LPCWSTR boolToNStr(BOOL bool) {
return bool ? L"1" : L"0";
}
BOOL isWSLEnabled() {
/*
* The simplest, and most reliable check across all variants and versions
* of WSL appears to be changing the default version to WSL 2 and check
* for errors, which we need to do anyway.
*/
STARTUPINFOW startup;
PROCESS_INFORMATION process;
ZeroMemory(&startup, sizeof(STARTUPINFOW));
startup.cb = sizeof(STARTUPINFOW);
// These settings hide the console window, so there is no annoying flash
startup.dwFlags = STARTF_USESHOWWINDOW;
startup.wShowWindow = SW_HIDE;
// CreateProcessW requires lpCommandLine to be mutable
wchar_t cmd[] = L"wsl --set-default-version 2";
if (! CreateProcessW(NULL, cmd, NULL, NULL, FALSE, CREATE_NEW_CONSOLE,
NULL, NULL, &startup, &process)) {
return FALSE;
}
DWORD exitCode;
WaitForSingleObject(process.hProcess, INFINITE);
if (! GetExitCodeProcess(process.hProcess, &exitCode)) {
return FALSE;
}
return exitCode == 0;
}
BOOL isHyperVEnabled() {
/*
* Checks if the Windows service `vmms` is running to
* determine if Hyper-V is enabled.
*/
SC_HANDLE schSCManager;
SC_HANDLE schService;
SERVICE_STATUS_PROCESS ssStatus;
DWORD dwBytesNeeded;
// Get a handle to the SCM database.
schSCManager = OpenSCManager(
NULL, // local computer
NULL, // servicesActive database
SERVICE_QUERY_STATUS); // service query access rights
if (NULL == schSCManager) {
return FALSE;
}
// Get a handle to the service.
schService = OpenService(
schSCManager,
szSvcNameHyperv,
SERVICE_QUERY_STATUS);
if (schService == NULL) {
CloseServiceHandle(schSCManager);
return FALSE;
}
// Check the status
if (!QueryServiceStatusEx(
schService, // handle to service
SC_STATUS_PROCESS_INFO, // information level
(LPBYTE) &ssStatus, // address of structure
sizeof(SERVICE_STATUS_PROCESS), // size of structure
&dwBytesNeeded ) ) {
CloseServiceHandle(schService);
CloseServiceHandle(schSCManager);
return FALSE;
}
CloseServiceHandle(schService);
CloseServiceHandle(schSCManager);
return ssStatus.dwCurrentState == SERVICE_RUNNING;
}

View File

@ -1,6 +1,5 @@
<Project Sdk="WixToolset.Sdk/5.0.2">
<PropertyGroup>
<InstallerPlatform>x64</InstallerPlatform>
<EnableDefaultCompileItems>false</EnableDefaultCompileItems>
<OutputType>Bundle</OutputType>
</PropertyGroup>

View File

@ -1,6 +1,5 @@
<Project Sdk="WixToolset.Sdk/5.0.2">
<PropertyGroup>
<InstallerPlatform>x64</InstallerPlatform>
<EnableDefaultCompileItems>false</EnableDefaultCompileItems>
</PropertyGroup>
<ItemGroup>

View File

@ -51,9 +51,7 @@
-->
<SetProperty Id="HIDE_PROVIDER_CHOICE" After="AppSearch" Value="1" Sequence="first" Condition="(SKIP_CONFIG_FILE_CREATION = 1) OR (MACHINE_PROVIDER_CONFIG_FILE_PATH) OR (MAIN_EXECUTABLE_FILE_PATH)" />
<CustomAction Id="OpenGuide" DllEntry="WixShellExec" Impersonate="yes" BinaryRef="Wix4UtilCA_X86" />
<CustomAction Id="CheckWSL" Execute="firstSequence" DllEntry="CheckWSL" BinaryRef="PodmanHooks" />
<CustomAction Id="CheckHyperV" Execute="firstSequence" DllEntry="CheckHyperV" BinaryRef="PodmanHooks" />
<CustomAction Id="OpenGuide" DllEntry="WixShellExec" Impersonate="yes" BinaryRef="Wix4UtilCA_$(sys.BUILDARCHSHORT)" />
<util:BroadcastEnvironmentChange />
<Feature Id="Complete" Level="1">
<ComponentRef Id="INSTALLDIR_Component" />
@ -82,12 +80,6 @@
<Publish Dialog="ExitDialog" Control="Finish" Event="DoAction" Value="OpenGuide" Condition="(WIXUI_EXITDIALOGOPTIONALCHECKBOX = 1) AND (NOT Installed) AND (NOT UpdateStarted)" />
</UI>
<InstallExecuteSequence>
<Custom Action="CheckWSL" Before="InstallFiles" />
<Custom Action="CheckHyperV" Before="InstallFiles" />
</InstallExecuteSequence>
<Binary Id="PodmanHooks" SourceFile="artifacts/podman-msihooks.dll" />
<StandardDirectory Id="ProgramFiles6432Folder">
<Directory Id="RedHatPFiles" Name="RedHat">
<Directory Id="INSTALLDIR" Name="Podman">

View File

@ -97,10 +97,14 @@ try {
$restore = 1
$ProgressPreference = 'SilentlyContinue';
if ($null -eq $ENV:PODMAN_ARCH -or "" -eq $ENV:PODMAN_ARCH ) {
Write-Warning "PODMAN_ARCH not set, defaulting to amd64"
$ENV:PODMAN_ARCH = "amd64"
}
if ($releaseDir.Length -gt 0) {
Copy-Item -Path "$releaseDir/podman-remote-release-windows_amd64.zip" "release.zip"
Copy-Item -Path "$releaseDir/podman-remote-release-windows_${ENV:PODMAN_ARCH}.zip" "release.zip"
} else {
DownloadOrSkip "$base_url/releases/download/$version/podman-remote-release-windows_amd64.zip" "release.zip"
DownloadOrSkip "$base_url/releases/download/$version/podman-remote-release-windows_${ENV:PODMAN_ARCH}.zip" "release.zip"
DownloadOptional "$base_url/releases/download/$version/shasums" ..\shasums
}
Expand-Archive -Path release.zip

View File

@ -1,7 +1,7 @@
# DOCKER_HOST initialization
if [ -z "${DOCKER_HOST-}" ]; then
if [ $(id -u) -eq 0 ]; then
if [ "$(id -u)" -eq 0 ]; then
export DOCKER_HOST=unix:///run/podman/podman.sock
else
if [ -n "${XDG_RUNTIME_DIR-}" ]; then

89
docs/CODE_STRUCTURE.md Normal file
View File

@ -0,0 +1,89 @@
# Podman Codebase structure
Description about important directories in our repository.
### bin/
- Build binaries are put here, podman, podman-remote, quadlet, etc...
### cmd/
- Each directory here builds its own binary.
#### cmd/podman/
- Podman CLI code, CLI commands and flags are defined here, we are using the [Cobra CLI library](https://github.com/spf13/cobra) for command line parsing.
#### cmd/quadlet/
- Quadlet CLI code.
### contrib/
- CI scripts, packaging files some container image build files.
### docs/
- Sphinx based documentation for Podman that is build on [Read the Docs](https://readthedocs.com/) and hosted at [docs.podman.io](https://docs.podman.io/).
- More information is found in [README.md](./README.md).
### libpod/ (only works on linux and freebsd)
- Underlying core for most Podman operations, defines container, pod, volume management operations.
- Contains the database to store these information on disk, either Sqlite or Botldb (our old db format).
- Integrates with our other libraries such as:
- containers/storage to create and mount container storage.
- containers/buildah for building images.
- containers/common/libnetwork for network management.
### pkg/
- Various packages to do all sorts of different things.
#### pkg/api/
- The HTTP REST API server code.
#### pkg/bindings/
- The HTTP REST API client code.
- This package must have a stable API as it is for use by external consumers as well.
#### pkg/domain/
- "glue" code between cli and the actual operations performed.
##### pkg/domain/entities/
- The package defines two interfaces (ContainerEngine, ImageEngine) that more or less have a function for each cli command defined.
- It also defines a lot of types (structs) for the various options the functions accept.
##### pkg/domain/infra/tunnel/
- Implements the two interfaces for the remote mode (podman-remote) which just maps each operations to the bindings code from pkg/bindings which then talks to the remote server.
##### pkg/domain/infra/abi/
- Implements the two interfaces for the local mode (podman) that calls then directly into the core parts of libpod/ or our other libraries containers/{common,image,storage}...
#### pkg/libartifact/
- Core code for the new podman artifact commands.
#### pkg/machine/
- Core code for podman machine commands.
##### pkg/machine/e2e/
- e2e tests for podman machine commands.
- Runs on Windows, MacOS and Linux.
### test/
- Various tests suites, see the test [README.md](../test/README.md) for more details.
- These run on linux only.
### vendor/
- Directory created with "go mod vendor".
- This includes all go deps in our repo, DO NOT edit this directory directly, changes in dependencies must be made in their respective upstream repositories and then updated in go.mod.

21
docs/Containerfile Normal file
View File

@ -0,0 +1,21 @@
# The resulting image can be used to generate podman-remote documentation.
#
# The CMD expects that the podman git repository is bind mounted to /podman.
# The generated documentation will be copied to ./docs/build/remote/.
#
# Example usage:
# podman build --build-arg TARGET_OS=windows -t podman-docs-generator $(pwd)/docs
# podman run --rm -v $(pwd):/podman podman-docs-generator
#
FROM docker.io/golang:latest
ARG TARGET_OS=windows # valid values: macos, linux, windows
RUN apt-get update && apt-get install -y pandoc man
RUN mkdir -p /podman-copy/podman
ENV TARGET_OS=$TARGET_OS
WORKDIR /podman-copy/podman
CMD echo "Copying /podman/ to /podman-copy/. It will take some time but 1) the build will be faster 2) the local bin folder won't be overridden." && \
cp -a /podman/ /podman-copy/ && \
echo "Generating docs" && make podman-remote-${TARGET_OS}-docs && \
echo "Copying generated docs to /podman/" && mkdir -p /podman/docs/build/ && \
mkdir -p /podman/docs/build/remote/ && \
cp -a /podman-copy/podman/docs/build/remote/${TARGET_OS}/* /podman/docs/build/remote/

View File

@ -112,6 +112,7 @@ Note: **N/A** means that the option cannot be supported in a single-node Podman
| resources\.requests | ✅ |
| lifecycle\.postStart | no |
| lifecycle\.preStop | no |
| lifecycle\.stopSignal | ✅ |
| terminationMessagePath | no |
| terminationMessagePolicy | no |
| livenessProbe | ✅ |

View File

@ -7,8 +7,7 @@
The maximum time allowed to complete the healthcheck before an interval is considered failed. Like start-period, the
value can be expressed in a time format such as **1m22s**. The default value is **30s**.
Note: A timeout marks the healthcheck as failed but does not terminate the running process.
This ensures that a slow but eventually successful healthcheck does not disrupt the container
but is still accounted for in the health status.
Note: A timeout marks the healthcheck as failed. If the healthcheck command itself runs longer than the specified *timeout*,
it will be sent a `SIGKILL` signal.
Note: This parameter will overwrite related healthcheck configuration from the image.

View File

@ -1,5 +1,5 @@
####> This option file is used in:
####> podman attach, container diff, container inspect, diff, exec, init, inspect, kill, logs, mount, network reload, pause, pod inspect, pod kill, pod logs, pod rm, pod start, pod stats, pod stop, pod top, port, restart, rm, start, stats, stop, top, unmount, unpause, wait
####> podman attach, container diff, container inspect, diff, exec, init, inspect, kill, logs, mount, network reload, pause, pod inspect, pod kill, pod logs, pod rm, pod start, pod stats, pod stop, pod top, port, restart, rm, start, stats, stop, top, unmount, unpause, update, wait
####> If file is edited, make sure the changes
####> are applicable to all of those.
#### **--latest**, **-l**

View File

@ -13,7 +13,7 @@ Options common to all mount types:
- *src*, *source*: mount source spec for **bind**, **glob**, and **volume**.
Mandatory for **artifact**, **bind**, **glob**, **image** and **volume**.
- *dst*, *destination*, *target*: mount destination spec.
- *dst*, *dest*, *destination*, *target*: mount destination spec.
When source globs are specified without the destination directory,
the files and directories are mounted with their complete path
@ -32,17 +32,28 @@ Options specific to type=**artifact**:
- *title*: If the artifact source contains multiple blobs a title can be set
which is compared against `org.opencontainers.image.title` annotation.
- *name*: This can be used to overwrite the filename we use inside the container
for mounting. On a single blob artifact the name is used as is if *dst* is a
directory and otherwise ignored. With a multi blob artifact the name will be
used with an index suffix `<name>-x` where x is the layer index in the artifact
starting with 0.
The *src* argument contains the name of the artifact, which must already exist locally.
The *dst* argument contains the target path, if the path in the container is a
directory or does not exist the blob title (`org.opencontainers.image.title`
annotation) will be used as filename and joined to the path. If the annotation
does not exist the digest will be used as filename instead. This results in all blobs
of the artifact mounted into the container at the given path.
directory the blob title (`org.opencontainers.image.title` annotation) will be used as
filename and joined to the path. If the annotation does not exist the digest will be
used as filename instead. This results in all blobs of the artifact mounted into the
container at the given path.
However, if the *dst* path is an existing file in the container, then the blob will be
mounted directly on it. This only works when the artifact contains a single blob
or when either *digest* or *title* are specified.
If the *dst* path does not already exist in the container then if the artifact contains
a single blob it behaves like existing file case and mounts directly to that path.
If the artifact has more than one blob it works like the existing directory case and
mounts each blob as file within the *dst* path.
Options specific to type=**volume**:
- *ro*, *readonly*: *true* or *false* (default if unspecified: *false*).
@ -89,6 +100,8 @@ Options specific to type=**tmpfs** and **ramfs**:
- *tmpcopyup*: Enable copyup from the image directory at the same location to the tmpfs/ramfs. Used by default.
- *noatime*: Disable updating file access times when the file is read.
- *notmpcopyup*: Disable copying files from the image to the tmpfs/ramfs.
- *U*, *chown*: *true* or *false* (default if unspecified: *false*). Recursively change the owner and group of the source volume based on the UID and GID of the container.

View File

@ -27,7 +27,7 @@ Valid _mode_ values are:
- **container:**_id_: Reuse another container's network stack.
- **host**: Do not create a network namespace, the container uses the host's network. Note: The host mode gives the container full access to local system services such as D-bus and is therefore considered insecure.
- **host**: Use the host's network namespace for the container instead of creating an isolated namespace. Warning: This gives the container full access to abstract Unix domain sockets and to TCP/UDP sockets bound to localhost. Since these mechanisms are often used to prevent access to sensitive system services, isolating them from access by external entities, use of this option may be considered a security vulnerability.
- **ns:**_path_: Path to a network namespace to join.

View File

@ -30,9 +30,7 @@ Valid _mode_ values are:
**auto**[:_OPTIONS,..._]: automatically create a unique user namespace.
* `rootful mode`: The `--userns=auto` flag requires that the user name __containers__ be specified in the /etc/subuid and /etc/subgid files, with an unused range of subordinate user IDs that Podman containers are allowed to allocate.
Example: `containers:2147483647:2147483648`.
* `rootful mode`: The `--userns=auto` flag requires that the user name __containers__ be specified in the /etc/subuid and /etc/subgid files, with an unused range of subordinate user IDs that Podman containers are allowed to allocate. Example: `containers:2147483647:2147483648`.
* `rootless mode`: The users range from the /etc/subuid and /etc/subgid files will be used. Note running a single container without using --userns=auto will use the entire range of UIDs and not allow further subdividing. See subuid(5).

View File

@ -54,10 +54,25 @@ See examples.
`Chowning Volume Mounts`
By default, Podman does not change the owner and group of source volume
directories mounted into containers. If a <<container|pod>> is created in a new
user namespace, the UID and GID in the container may correspond to another UID
and GID on the host.
When a named volume is first mounted to a container, Podman
automatically adjusts the ownership of the volume's mount point during
container initialization. This chown operation occurs under the
following conditions:
- The volume was not used yet (has `NeedsChown` set to true)
- The volume is empty or has not been copied up yet
- The volume is not managed by an external volume driver
- The volume driver is not "image"
For volumes with idmapped mounts (using the `idmap` option), the
ownership change takes into account the container's user namespace
mappings, but the idmapped volume retains proper UID/GID mapping. For
volumes without idmapping, the mount point is chowned to match the
container's process user and group, mapped to the host user namespace
if user namespace remapping is enabled.
If a <<container|pod>> is created in a new user namespace, the UID and
GID in the container may correspond to another UID and GID on the host.
The `:U` suffix tells Podman to use the correct host UID and GID based on the
UID and GID within the <<container|pod>>, to change recursively the owner and

View File

@ -84,10 +84,11 @@ to do the checkpoint:
#### **--export**, **-e**=*archive*
Export the checkpoint to a tar.gz file. The exported checkpoint can be used
to import the *container* on another system and thus enabling container live
migration. This checkpoint archive also includes all changes to the *container's*
root file-system, if not explicitly disabled using **--ignore-rootfs**.
Export the checkpoint to an archive. The archive type is specified with
**--compress**. The exported checkpoint can be used to import the *container* on
another system and thus enabling container live migration. This checkpoint
archive also includes all changes to the *container's* root file-system, if not
explicitly disabled using **--ignore-rootfs**.
#### **--file-locks**
@ -99,7 +100,7 @@ The default is **false**.
#### **--ignore-rootfs**
If a checkpoint is exported to a tar.gz file it is possible with the help of **--ignore-rootfs** to explicitly disable including changes to the root file-system into the checkpoint archive file.\
If a checkpoint is exported to an archive it is possible with the help of **--ignore-rootfs** to explicitly disable including changes to the root file-system into the checkpoint archive file.\
The default is **false**.\
*IMPORTANT: This OPTION only works in combination with __--export, -e__.*
@ -107,7 +108,7 @@ The default is **false**.\
This OPTION must be used in combination with the **--export, -e** OPTION.
When this OPTION is specified, the content of volumes associated with
the *container* is not included into the checkpoint tar.gz file.\
the *container* is not included into the checkpoint archive.\
The default is **false**.
#### **--keep**, **-k**
@ -128,7 +129,7 @@ The default is **false**.
#### **--pre-checkpoint**, **-P**
Dump the *container's* memory information only, leaving the *container* running. Later
operations supersedes prior dumps. It only works on `runc 1.0-rc3` or `higher`.\
operations supersedes prior dumps.\
The default is **false**.
The functionality to only checkpoint the memory of the container and in a second
@ -205,12 +206,12 @@ Create a checkpoint image for the container "mywebserver".
Dumps the container's memory information of the latest container into an archive.
```
# podman container checkpoint -P -e pre-checkpoint.tar.gz -l
# podman container checkpoint -P -e pre-checkpoint.tar.zst -l
```
Keep the container's memory information from an older dump and add the new container's memory information.
```
# podman container checkpoint --with-previous -e checkpoint.tar.gz -l
# podman container checkpoint --with-previous -e checkpoint.tar.zst -l
```
Dump the container's memory information of the latest container into an archive with the specified compress method.

View File

@ -25,7 +25,7 @@ Alter the output into a different format. The only valid format for **podman con
@@option latest
## EXAMPLE
## EXAMPLES
```
# podman container diff container1
@ -44,6 +44,11 @@ $ podman container diff --format json container1 container2
}
```
```
$ podman container diff --latest
C /etc
```
## SEE ALSO
**[podman(1)](podman.1.md)**, **[podman-container(1)](podman-container.1.md)**

View File

@ -76,7 +76,7 @@ Valid placeholders for the Go template are listed below:
In addition to normal output, display the total file size if the type is a container.
## EXAMPLE
## EXAMPLES
Inspect the specified container and print its information in json format.
```

View File

@ -159,7 +159,7 @@ option is ignored. Defaults to not restoring *containers* with established TCP
connections.\
The default is **false**.
## EXAMPLE
## EXAMPLES
Restore the container "mywebserver".
```
# podman container restore mywebserver

View File

@ -25,7 +25,7 @@ Alter the output into a different format. The only valid format for **podman di
@@option latest
## EXAMPLE
## EXAMPLES
Show container-modified files versus the container's image:
```

View File

@ -88,6 +88,11 @@ Execute command as the specified user in selected container:
$ podman exec --user root ctrID ls
```
Execute command but do not attach to the exec session leaving the command running in the background:
```
$ podman exec -d ctrID find /path/to/search -name yourfile
```
## SEE ALSO
**[podman(1)](podman.1.md)**, **[podman-run(1)](podman-run.1.md)**

View File

@ -13,16 +13,14 @@ Create a new farm with connections that Podman knows about which were added via
An empty farm can be created without adding any connections to it. Add or remove
connections from a farm via the *podman farm update* command.
## EXAMPLE
## EXAMPLES
Create the specified farm:
Create the specified farm with no connections:
```
$ podman farm create farm2
```
Create multiple farms:
Create a farm with connections:
```
$ podman farm create farm1 f37 f38
```

View File

@ -24,3 +24,147 @@ Output to the given file.
#### **--name**, **-n**
Rename the pod or container, so that it does not conflict with the existing entity. This is helpful when the JSON is to be used before the source pod or container is deleted.
## EXAMPLES
Generate Specgen JSON based on a container.
```
$ podman generate spec container1
{
"name": "container1-clone",
"command": [
"/bin/sh"
],
"env": {
"PATH": "/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin",
"container": "podman"
},
"sdnotifyMode": "container",
"pidns": {
"nsmode": "default"
},
"utsns": {
"nsmode": "private"
},
"containerCreateCommand": [
"podman",
"run",
"--name",
"container1",
"cea2ff433c61"
],
"init_container_type": "",
"image": "cea2ff433c610f5363017404ce989632e12b953114fefc6f597a58e813c15d61",
"ipcns": {
"nsmode": "default"
},
"shm_size": 65536000,
"shm_size_systemd": 0,
"selinux_opts": [
"disable"
],
"userns": {
"nsmode": "default"
},
"idmappings": {
"HostUIDMapping": true,
"HostGIDMapping": true,
"UIDMap": null,
"GIDMap": null,
"AutoUserNs": false,
"AutoUserNsOpts": {
"Size": 0,
"InitialSize": 0,
"PasswdFile": "",
"GroupFile": "",
"AdditionalUIDMappings": null,
"AdditionalGIDMappings": null
}
},
"umask": "0022",
"cgroupns": {
"nsmode": "default"
},
"netns": {
"nsmode": "slirp4netns"
},
"Networks": null,
"use_image_hosts": false,
"resource_limits": {}
}
```
Generate Specgen JSON based on a container. The output is single line.
```
$ podman generate spec --compact container1
{"name":"container1-clone","command":["/bin/sh"],...
```
Generate Specgen JSON based on a container, writing the output to the specified file.
```
$ podman generate spec --filename output.json container1
output.json
$ cat output.json
{
"name": "container1-clone",
"command": [
"/bin/sh"
],
"env": {
"PATH": "/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin",
"container": "podman"
},
"sdnotifyMode": "container",
"pidns": {
"nsmode": "default"
},
"utsns": {
"nsmode": "private"
},
"containerCreateCommand": [
"podman",
"run",
"--name",
"container1",
"cea2ff433c61"
],
"init_container_type": "",
"image": "cea2ff433c610f5363017404ce989632e12b953114fefc6f597a58e813c15d61",
"ipcns": {
"nsmode": "default"
},
"shm_size": 65536000,
"shm_size_systemd": 0,
"selinux_opts": [
"disable"
],
"userns": {
"nsmode": "default"
},
"idmappings": {
"HostUIDMapping": true,
"HostGIDMapping": true,
"UIDMap": null,
"GIDMap": null,
"AutoUserNs": false,
"AutoUserNsOpts": {
"Size": 0,
"InitialSize": 0,
"PasswdFile": "",
"GroupFile": "",
"AdditionalUIDMappings": null,
"AdditionalGIDMappings": null
}
},
"umask": "0022",
"cgroupns": {
"nsmode": "default"
},
"netns": {
"nsmode": "slirp4netns"
},
"Networks": null,
"use_image_hosts": false,
"resource_limits": {}
}
```

View File

@ -23,7 +23,7 @@ The output is prefixed with the following symbols:
Alter the output into a different format. The only valid format for **podman image diff** is `json`.
## EXAMPLE
## EXAMPLES
Display image differences from images parent layer:
```

View File

@ -30,7 +30,7 @@ Mount all images.
Print the mounted images in specified format (json).
## EXAMPLE
## EXAMPLES
Mount multiple images. Note: In rootless mode, image mounting works only after executing the podman unshare command to enter the user namespace.
```

View File

@ -46,5 +46,11 @@ Unmount all images:
```
podman image unmount --all
```
Force unmount image with a given ID:
```
podman image unmount --force imageID
```
## SEE ALSO
**[podman(1)](podman.1.md)**, **[podman-image-mount(1)](podman-image-mount.1.md)**, **[podman-mount(1)](podman-mount.1.md)**

View File

@ -119,7 +119,7 @@ Lists only the image IDs.
Sort by *created*, *id*, *repository*, *size* or *tag* (default: **created**)
When sorting by *repository* it also sorts by the *tag* as second criteria to provide a stable output.
## EXAMPLE
## EXAMPLES
List all non-dangling images in local storage:
```

View File

@ -24,22 +24,31 @@ Initialize all containers. Containers that have already initialized (including c
@@option latest
## EXAMPLE
## EXAMPLES
Initialize specified container with a given ID.
```
podman init 35480fc9d568
$ podman init 35480fc9d568
```
Initialize specified container with a given name.
```
podman init test1
$ podman init test1
```
Initialize the latest container. (This option is not available with the remote Podman client, including Mac and Windows (excluding WSL2) machines)
```
podman init --latest
$ podman init --latest
```
Initialize all containers.
```
$ podman init --all
9d2629dda7b9d4ca35c1fc63fa56592a08b9d5ab988b4301fddf16b623f676cc
a9b78bcac97e131236930e3fa0be576e95ab89c96a7cb6fb1c821b772db9f623
9db345273719c14bc254f90ef2df24779193b42d68b1364c0914ca6f76cf5e9c
```
## SEE ALSO
**[podman(1)](podman.1.md)**, **[podman-start(1)](podman-start.1.md)**

View File

@ -38,7 +38,7 @@ In addition to normal output, display the total file size if the type is a conta
Return JSON for the specified type. Type can be 'container', 'image', 'volume', 'network', 'pod', or 'all' (default: all)
(Only meaningful when invoked as *podman inspect*)
## EXAMPLE
## EXAMPLES
Inspect the fedora image:
```

View File

@ -57,6 +57,10 @@ Note: To customize the name of the infra container created during `podman kube p
Note: Use the **io.podman.annotations.pids-limit/$ctrname** annotation to configure the pod's pids limit.
Note: Use the **io.podman.annotations.cpuset/$ctrname** annotation to restrict a container's execution to a specific set of CPU cores. This is equivalent to the `--cpuset-cpus=number` option in podman-run(1).
Note: Use the **io.podman.annotations.memory-nodes/$ctrname** annotation to restrict a container's memory allocations to a specific set of memory nodes on NUMA systems. This is equivalent to the `--cpuset-mems=nodes` option in podman-run(1).
`Kubernetes PersistentVolumeClaims`
A Kubernetes PersistentVolumeClaim represents a Podman named volume. Only the PersistentVolumeClaim name is required by Podman to create a volume. Kubernetes annotations can be used to make use of the available options for Podman volumes.

View File

@ -17,13 +17,6 @@ The local client further supports loading an **oci-dir** or a **docker-dir** as
The **quiet** option suppresses the progress output when set.
Note: `:` is a restricted character and cannot be part of the file name.
**podman [GLOBAL OPTIONS]**
**podman load [GLOBAL OPTIONS]**
**podman load [OPTIONS]**
## OPTIONS
#### **--help**, **-h**

View File

@ -104,6 +104,12 @@ if there is no existing remote connection configurations.
API forwarding, if available, follows this setting.
#### **--swap**, **-s**=*number*
Swap (in MiB). Note: 1024MiB = 1GiB.
Renders a `zram-generator.conf` file with zram-size set to the value passed to --swap
#### **--timezone**
Set the timezone for the machine and containers. Valid values are `local` or
@ -193,6 +199,12 @@ Initialize a Podman machine for the specified name pulling the content from the
$ podman machine init myvm
```
Initialize and start a new Podman machine in one step.
```
podman machine init --now
```
Initialize the default Podman machine pulling the content from the internet defaulting to rootful mode. The default is rootless.
```
$ podman machine init --rootful

View File

@ -50,6 +50,7 @@ Valid placeholders for the Go template are listed below:
| .RemoteUsername | VM Username for rootless Podman |
| .Running | Is machine running |
| .Stream | Stream name |
| .Swap | Allocated swap for machine |
| .UserModeNetworking | Whether machine uses user-mode networking |
| .VMType | VM type |

View File

@ -40,6 +40,12 @@ Are you sure you want to continue? [y/N] y
$
```
Force reset without confirmation.
```
$ podman machine reset --force
$
```
## SEE ALSO
**[podman(1)](podman.1.md)**, **[podman-machine(1)](podman-machine.1.md)**

View File

@ -44,6 +44,40 @@ Suppress machine starting status output.
Start the specified podman machine.
```
$ podman machine start myvm
Starting machine "myvm"
This machine is currently configured in rootless mode. If your containers
require root permissions (e.g. ports < 1024), or if you run into compatibility
issues with non-podman clients, you can switch using the following command:
podman machine set --rootful myvm
API forwarding listening on: /var/folders/my/k1kpd8ds7p938mchyb1r_4mw0000gn/T/podman/myvm-api.sock
The system helper service is not installed; the default Docker API socket
address can't be used by podman. If you would like to install it, run the following commands:
sudo /opt/homebrew/Cellar/podman/5.2.4/bin/podman-mac-helper install
podman machine stop myvm; podman machine start myvm
You can still connect Docker API clients by setting DOCKER_HOST using the
following command in your terminal session:
export DOCKER_HOST='unix:///var/folders/my/k1kpd8ds7p938mchyb1r_4mw0000gn/T/podman/myvm-api.sock'
Machine "myvm" started successfully
```
Start with --no-info:
```
$ podman machine start --no-info myvm
Starting machine "myvm"
Machine "myvm" started successfully
```
Start with --quiet:
```
$ podman machine start --quiet myvm
Machine "myvm" started successfully
```
## SEE ALSO

Some files were not shown because too many files have changed in this diff Show More