7309 Commits

Author SHA1 Message Date
ebde5d1563 cmd: add auto completion for network create --interface-name
Fixes: #27113

Signed-off-by: Volodymyr Pankin <volopank@gmail.com>
2025-09-30 13:50:57 +02:00
6a6a8aba94 Merge pull request #27159 from nothiaki/artifact-list-virtual-size
Added virtual size option in artifact ls format
2025-09-29 14:29:03 +00:00
e57a7f3694 Merge pull request #27172 from ninja-quokka/docker_compate_145
[compat api] Remove ContainerConfig field
2025-09-29 13:45:07 +00:00
571866775d [compat api] Remove ContainerConfig field
ContainerConfig has been removed from v1.45

InspectResponse.Container has also been removed but it seems we never implemented it.

Ref: https://docs.docker.com/reference/api/engine/version-history/#v145-api-changes
Signed-off-by: Lewis Roy <lewis@redhat.com>
2025-09-27 20:50:30 +10:00
a27929aaaf test/e2e: fmt artifact list with virtual size
Signed-off-by: Celso Henrique Souza Silva <celsohenrique367@gmail.com>
2025-09-25 22:26:47 -03:00
4764b0e403 Add creation timestamp to podman artifacts
This commit implements automatic creation timestamp functionality for artifacts
as requested in GitHub issue #27081, allowing users to see when artifacts were created.

Changes made:
- Add org.opencontainers.image.created annotation with Unix nanoseconds timestamp during artifact creation
- Preserve original creation timestamp when using --append option
- Update artifact inspect and add man pages to document the new functionality
- Add comprehensive e2e and system BATS tests to verify creation timestamp behavior
- Store timestamp as integer (Unix nanoseconds) for programmatic access

The creation timestamp helps users understand artifact freshness, particularly
useful for AI models and other time-sensitive artifacts managed by tools like RamaLama.

Usage examples:
  podman artifact add myartifact:latest /path/to/file     # Creates with timestamp
  podman artifact inspect myartifact:latest              # Shows created annotation as integer
  podman artifact add --append myartifact:latest /file2  # Preserves original timestamp

Fixes: https://github.com/containers/podman/issues/27081
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2025-09-25 08:39:28 -04:00
2edf4aee5c Merge pull request #27122 from nothiaki/feat-sysctl-completion
feat(completions): sysctl completion
2025-09-25 09:32:03 +00:00
63c40feb8c test: Fix test race in 030-run
Signed-off-by: Ricardo Branco <rbranco@suse.de>
2025-09-24 18:30:40 +02:00
f0f05e22c6 cmd/podman: completion for --sysctl in create/run
Signed-off-by: Celso Henrique Souza Silva <celsohenrique367@gmail.com>
2025-09-24 13:27:10 -03:00
d7f33a79e0 Merge pull request #27138 from nimdrak/27116
test: remove hack workaround in 'use plugin in containers'
2025-09-24 08:47:01 +00:00
15fdbe9442 test: remove hack workaround in 'use plugin in containers'
Signed-off-by: ByoungUk Lee <nimdrak@gmail.com>
2025-09-22 13:56:43 +09:00
51f4e614e9 test: remove skip_if_remote from podman run - uidmapping has no /sys/kernel mounts
Fixes: #27117

Signed-off-by: ByoungUk Lee <nimdrak@gmail.com>
2025-09-22 13:52:10 +09:00
0215832852 Merge pull request #27087 from Luap99/system-test-fix
test/system: fix test race in exec leak check
2025-09-17 19:27:00 +00:00
54b51bbddf Merge pull request #27076 from Luap99/revert-debug
Revert "test/e2e: try debug potential pasta issue"
2025-09-17 14:38:46 +00:00
39750faab3 test/system: fix test race in exec leak check
On very slow systems it can be that it takes over 5s after the sleep
process was started and until the find_exec_pid_files function finds the
file. This was observed on a ppc64le machine by Red Hat QE.

Just making the sleep longer should fix that problem and it doesn't
really effect the total test time because we stop the container
afterwards so there is no extra delay added with this either.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2025-09-16 14:02:38 +02:00
b24220b0a2 Revert "test/e2e: try debug potential pasta issue"
This reverts commit f517e5216763f9e51729fa277e8e0045a484d950.

The issue #24219 has been fixed a long time ago and this no longer
flakes so we do not need to run with debug logs all the time.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2025-09-15 19:28:41 +02:00
ab5e400a9a docs: remove remote limitation note for --build-context option
- Removal of a note in the build-context documentation about remote Podman client limitations
- Removal of skip statements for build-context tests in the test suite

Pull request #26628 adds support for --build-context for the remote client.

Signed-off-by: Jan Rodák <hony.com@seznam.cz>
2025-09-15 15:50:02 +02:00
8631032556 run modernize -fix ./...
Using golang.org/x/tools/gopls/internal/analysis/modernize/cmd/modernize

+ some manual cleanup in libpod/lock/shm/shm_lock_test.go as it
  generated an unused variable
+ restored one removed comment

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2025-09-10 16:17:04 +02:00
b97525a78d use strings.SplitSeq where possible
Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2025-09-10 16:17:04 +02:00
8537afca66 test/e2e: fix podman run default mask test with crun 1.24
The ls call for the directory now fails with EACCES, see
https://github.com/containers/crun/issues/1876

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2025-09-10 14:52:09 +02:00
3bb32d846b test/system: skip noswap memory mounts correctly
On debian with an older we get this error instead:
fsconfig() failed: tmpfs: Unknown parameter 'noswap'

So handle that case as well to skip the test correctly.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2025-09-10 14:52:08 +02:00
52fcdcf64c test/system: skip idmapped mount correctly
The full error message is:
failed to create idmapped mount: mount_setattr /tmp/CI_SKPI/podman_bats.RX6gD9/rootfs: invalid argument

So in order to match this account for the variable part.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2025-09-10 14:52:08 +02:00
936a01e088 Quadlet build - consider File path that starts with a systemd specifier as absolute
Fixes https://github.com/containers/podman/issues/26746

Signed-off-by: Ygal Blum <ygal.blum@gmail.com>
2025-09-09 13:57:36 -04:00
6c4b98c940 test/e2e: add CVE-2025-9566 regression test
Ensure we do not regress again.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2025-09-05 19:41:55 +02:00
96abdfdec6 Merge pull request #26977 from jakmeier/fix-quadlet-mount-panic
quadlet: fix runtime error for invalid Mount value
2025-09-05 09:57:43 +00:00
163bdf2df8 quadlet: fix runtime error for invalid Mount value
If the `Mount` option inside a quadlet is missing the source=... part,
the code today panics with the following message.

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

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

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

Signed-off-by: Jakob Meier <mail@jakobmeier.ch>
2025-09-04 21:46:01 +02:00
853dd36da3 Update dependency pytest to v8.4.2
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-09-04 15:56:34 +00:00
faceb67782 test/buildah-bud: enable one skipped test
For podman build --squash is different from the buildah bud --squash
option, in podman it must use --squash-all.

Fixes: #26906

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2025-09-03 20:25:12 +02:00
ca19491f91 Merge pull request #26947 from Luap99/system-test-fixes
test/system: some small fixes
2025-09-02 14:21:23 +00:00
9d7a24e654 Merge pull request #26945 from Luap99/vol-opts
do not pass volume options as bind mounts options to runtime
2025-09-02 14:18:15 +00:00
247a80db45 test/system: remove distro-integration bats tag
The distro-integration tag was added for fedora openQA to only run a
subset of tests. However since it was added only a few new tests have
been labelled like that and in general a normal contributor or even
maintianer has no idea when to add this tag.

We also have been seeing several regressions getting into fedora that
these tests would have caught. As such I worked with Adam to enable all
tests for fedora openQA so we actually have proper coverage. This has
been working for a few weeks so I think we can dop these tags so
upstream does not need to bother with them at all.

https://pagure.io/fedora-qa/os-autoinst-distri-fedora/issue/373

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2025-09-02 12:10:08 +02:00
ee45782079 test/system: fix podman load - from URL
The test pulled a new $IMAGE already because it runs the http server
container. So this doesn't striclty ensure the load works correctly.

Make sure to actually test the load of a different image, so we use
$PODMAN_NONLOCAL_IMAGE_FQN for that like another load test already
does.

I noticed this as the image pull on the webserver start flaked in
a openQA run. Using _prefetch should help to reduce the network pulls
here as it caches the image locally once it is pulled for the first
time.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2025-09-02 12:10:08 +02:00
20fb712872 test/system: do not connect to github server
This is an unnecessary network connection that flakes from time to time.
Spawn our own local server instead and use that. That also allows to
check that the actual file content has been copied.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2025-09-02 11:51:08 +02:00
428c854be6 Merge pull request #26932 from ogajduse/feature/quadlet-httpproxy-26925
quadlet: add HttpProxy option for Container sections
2025-09-01 16:04:15 +00:00
c65fd9a2c2 quadlet: add HttpProxy option for Container sections
Add support for HttpProxy key in quadlet Container sections to control
proxy environment variable inheritance during image pulls and builds.

- HttpProxy=true enables proxy inheritance (default podman behavior)
- HttpProxy=false disables proxy inheritance
- When omitted, uses podman's default behavior

This addresses the need for declarative proxy configuration in IPv6-only
networks and other scenarios where proxy settings need to be controlled
at the container level without manual workarounds.

Fixes #26925

Signed-off-by: Ondřej Gajdušek <ogajduse@redhat.com>
2025-09-01 13:45:06 +02:00
46d757501a do not pass [no]copy as bind mounts options to runtime
Starting with runc 1.3.0 it errors when we pass unknown mount options to
the runtime, the copy/nocopy options are specific to podman when we
mount the volume and are not valid mount options for the runtime.

Fixes: #26938

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2025-09-01 12:48:43 +02:00
4e2a04dedc do not pass volume-opt as bind mounts options to runtime
Starting with runc 1.3.0 it errors when we pass unknown mount options to
the runtime, the volume-opt options are specifc to the volume we create
and should not be passed to the mount in the oci spec.

Fixes: #26938

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2025-09-01 12:48:43 +02:00
a98154a978 Switch common, storage and image to monorepo.
Signed-off-by: Jan Kaluza <jkaluza@redhat.com>
2025-09-01 12:33:04 +02:00
80348a50d0 chore(deps): update module github.com/go-viper/mapstructure/v2 to v2.4.0 [security]
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-08-29 09:40:26 +00:00
3effff42eb tests: Get rid of netcat on the host and use Bash's /dev/tcp
The only remaining uses of nc now are in containers.

Signed-off-by: Ricardo Branco <rbranco@suse.de>
2025-08-28 17:43:47 +02:00
b5a0c495c0 Merge pull request #26920 from ricardobranco777/socat
tests: Replace ncat for socat
2025-08-28 14:46:12 +00:00
0ff079d320 tests: Replace ncat for socat
Signed-off-by: Ricardo Branco <rbranco@suse.de>
2025-08-28 15:38:12 +02:00
cb59650a16 Merge pull request #26891 from winterqt/push-ozksmwkumrrs
fix(libpod): truncate long hostnames to correct maximum length
2025-08-28 12:55:27 +00:00
68b6876481 Merge pull request #26895 from intirix/tcp-close
Add support for criu's tcp-close functionality.
2025-08-28 10:40:59 +00:00
9c3652c188 Add support for criu's tcp-close functionality.
Fixes: #26676
Signed-off-by: Jeff Mercer <jeff.mercer@gmail.com>
2025-08-27 18:52:34 -04:00
e467439ab8 test/e2e: actually start container in startContainer
https://github.com/containers/podman/pull/26891#pullrequestreview-3152061969

Signed-off-by: Winter M <winter@antithesis.com>
2025-08-27 16:14:15 -04:00
835c581c4b Merge pull request #26737 from arsenalzp/podman-26691
Podman wait condition for return of first container
2025-08-27 16:03:29 +00:00
8e59c948df test/buildah-bud: skip new failing test
see #26906

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2025-08-26 10:03:57 +02:00
df80fbcab6 test/e2e: remove image diff test skips
This should work with the latest buildah.

Fixes: #26680

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2025-08-26 10:03:57 +02:00
2dd3111098 fix(libpod): truncate long hostnames to correct maximum length
Since #24675, we've been truncating hostnames derived from the container name
to 253 characters. However, if a user were to create a container with a long
name and not set a hostname, this would still fail.

Seemingly, the maximum length for hostnames is (and always(?) has been) 64, as
made evident by these headers from various kernel versions:

- https://elixir.bootlin.com/linux/v6.16/source/include/uapi/linux/utsname.h#L15
- https://elixir.bootlin.com/linux/v4.20/source/include/uapi/linux/utsname.h#L15
- https://elixir.bootlin.com/linux/v3.19.8/source/include/uapi/linux/utsname.h#L14

I've confirmed this issue (and fix) on Linux 6.1, but happy to do so on a more
recent kernel as well.

Signed-off-by: Winter M <winter@antithesis.com>
2025-08-22 17:52:00 -04:00