7335 Commits

Author SHA1 Message Date
7fecff5c29 Merge pull request #27239 from Honny1/fix-mapping-ns
Fix --userns=ns:<path> conflicting with runc 1.1.11+
2025-10-07 19:21:01 +00:00
2455ac327d Merge pull request #27153 from rhatdan/cursor
Add --replace option to podman artifact add command
2025-10-07 17:09:03 +00:00
79ecc1d56b Fix --userns=ns:<path> conflicting with runc 1.1.11+
Remove dummy UID/GID mappings added when joining existing user
namespaces, which runc 1.1.11+ rejects as conflicting.

RUNC fix: https://github.com/opencontainers/runc/pull/4124

Fixes #27148

Signed-off-by: Jan Rodák <hony.com@seznam.cz>
2025-10-07 15:45:45 +02:00
b765c91580 Add --replace option to podman artifact add command
This commit implements the --replace functionality for the artifact add command,
allowing users to replace existing artifacts without having to manually remove
them first.

Changes made:
- Add Replace field to ArtifactAddOptions entity types
- Add --replace CLI flag with validation to prevent conflicts with --append
- Implement replace logic in ABI backend to remove existing artifacts before adding
- Update API handlers and tunnel implementation for podman-remote support
- Add comprehensive documentation and examples to man page
- Add e2e and system BATS tests for --replace functionality
- Fix code formatting in pkg/bindings/artifacts/types_pull_options.go:
  * Reorder imports with proper spacing
  * Fix function declaration spacing
  * Convert spaces to proper tab indentation
  * Remove extraneous blank lines

The --replace option follows the same pattern as other podman replace options
like 'podman container create --replace' and 'podman pod create --replace'.
It gracefully handles cases where no existing artifact exists (no error thrown).

Usage examples:
  podman artifact add --replace quay.io/myimage/artifact:latest /path/to/file
  podman artifact add --replace localhost/test/artifact /tmp/newfile.txt

Fixes: Implements requested --replace functionality for artifact add command
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2025-10-06 12:22:40 -04:00
3e774ee285 test/system: actually wait for container removal
podman wait by default waits for exit not removal as the man page
documents.

Fixes: 3a98b6dc0e ("test: Wait for killed container to avoid leak")

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2025-10-06 16:01:31 +02:00
fdb5ac5e8f test/system: run_podman ? needs quoting
Bash will expand a signle ? to a file name which consists of a single
char, and thus if you have a file named "a" in the cwd it will add a as
argument which causes podman a ... to be executed which clearly fails
the test.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2025-10-06 16:01:31 +02:00
8daac5220c Merge pull request #25647 from aguidirh/fix/issue-23915
fix: #23915 podman build is not parsing sbom command line arguments
2025-10-06 10:16:24 +00:00
4bd6aff4b6 fix: #23915 podman build is not parsing sbom command line arguments
Signed-off-by: Alex Guidi <aguidi@redhat.com>

add sbom flags on server side for podman-remote

Signed-off-by: Alex Guidi <aguidi@redhat.com>
2025-10-03 22:28:36 +02:00
ef584d4d6d Merge pull request #27169 from ygalblum/quadlet-template-dependency
Quadlet - Support template dependency
2025-10-03 15:51:31 +00:00
0a58e05a68 Merge pull request #27142 from nothiaki/feat-artifact-rm-ignore
Feat artifact rm ignore
2025-10-03 15:45:28 +00:00
a0992f7afd Merge pull request #27230 from ricardobranco777/fix/130-kill
test: Wait for killed container to avoid leak
2025-10-03 14:07:59 +00:00
089d153fb6 Merge pull request #27203 from nothiaki/quadlets-api-resource
pkg/api: api list quadlets resource
2025-10-03 12:59:32 +00:00
3a98b6dc0e test: Wait for killed container to avoid leak
Signed-off-by: Ricardo Branco <rbranco@suse.de>
2025-10-03 13:51:06 +02:00
77dd165e47 Merge pull request #27193 from shiavm006/fix-secret-ls-format-docs
secrets: align 'secret ls' format docs and completion
2025-10-02 19:40:20 +00:00
00309d3955 secret ls: align docs, completion, and tests; fix formatting
- Use SecretListReport for --format completion and correct help text
- Update manpage placeholders and ordering per xref rules
- Add and adjust e2e tests; verify CreatedAt contains 'ago'
- gofmt formatting fixes

Signed-off-by: shiavm006 <shivammittal42006@gmail.com>
2025-10-02 17:33:38 +05:30
6405925f79 Add artifact fallback to podman inspect command
This commit implements automatic artifact fallback for the podman inspect command
as requested in GitHub issue #27075.

Changes made:
- Add ArtifactType constant to cmd/podman/common/inspect.go
- Update AutocompleteInspectType to include artifact type in completions
- Add artifact case to main inspect switch statement for explicit --type artifact
- Implement artifact fallback in inspectAll function for automatic detection
- Update shell completion to recognize artifacts in getEntityType function
- Update command help text, usage, and examples to include artifacts
- Update podman-inspect.1.md man page with artifact documentation
- Add comprehensive e2e tests for artifact inspect functionality

The inspect command now automatically falls back to artifact inspection when
no container, image, volume, network, or pod matches the specified name.
Users can also explicitly use --type artifact for direct artifact inspection.

This maintains backward compatibility while extending functionality to support
the artifact object type seamlessly.

Examples:
  podman inspect myartifact                        # Auto-detects artifact
  podman inspect --type artifact myartifact       # Explicit artifact type
  podman inspect --format '{{.Name}}' myartifact  # Format support

Fixes: https://github.com/containers/podman/issues/27075
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2025-10-02 06:52:32 -04:00
a724fce8aa pkg/api: api list quadlets resource
Signed-off-by: Celso Henrique Souza Silva <celsohenrique367@gmail.com>
2025-10-01 21:10:36 -03:00
3c3b805ea7 cmd/podman: --ignore errors flag to artifact rm
Signed-off-by: Celso Henrique Souza Silva <celsohenrique367@gmail.com>
2025-10-01 18:22:26 -03:00
d0212f91b3 Merge pull request #27126 from medsouz/unused-parameter
lint: reenable revive unused-parameter check
2025-10-01 16:17:31 +00:00
f9de4b033f Merge pull request #27205 from nimdrak/27115
test: remove outdated skip in podman run check personality support test
2025-10-01 15:22:36 +00:00
090304a054 lint: reenable revive unused-parameter check
Signed-off-by: Matt Souza <medsouz99@gmail.com>
2025-10-01 10:42:08 -04:00
88bca78c6e stop service instances
Signed-off-by: Ygal Blum <ygal.blum@gmail.com>
2025-10-01 09:49:38 -04:00
004e6ced76 test: remove outdated skip in podman run check personality support test
Signed-off-by: ByoungUk Lee <nimdrak@gmail.com>
2025-10-01 15:12:43 +09:00
83e65f91a4 Quadlet - Support template dependency
Add support for Volumes and Networks
Add e2e and system tests

Resolves: https://github.com/containers/podman/issues/25136

Signed-off-by: Ygal Blum <ygal.blum@gmail.com>
2025-09-30 13:41:20 -04:00
3747e3db3f Merge pull request #24601 from meln5674/feature/remote-tls
Support (m)TLS API Socket
2025-09-30 16:19:14 +00:00
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
feb36e4fe6 Implement TLS API Support
* Added flags to point to TLS PEM files to use for exposing and connecting
  to an encrypted remote API socket with server and client authentication.
* Added TLS fields for system connection ls templates.
* Added special "tls" format for system connection ls to list TLS fields
  in human-readable table format.
* Updated remote integration and system tests to allow specifying a
  "transport" to run the full suite against a unix, tcp, tls, or mtls
  system service.
* Added system tests to verify basic operation of unix, tcp, tls, and mtls
  services, clients, and connections.

Signed-off-by: Andrew Melnick <meln5674.5674@gmail.com>
2025-09-26 09:09:54 -06: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