4295 Commits

Author SHA1 Message Date
2455ac327d Merge pull request #27153 from rhatdan/cursor
Add --replace option to podman artifact add command
2025-10-07 17:09:03 +00:00
98cb7b75d9 quadlet: standardize Convert function signatures
Remove unused 'name' parameter from ConvertPod and reorder ConvertContainer
parameters to match other Convert functions (unitFile, unitsInfoMap, isUser).

Signed-off-by: Jan Rodák <hony.com@seznam.cz>
2025-10-06 18:26:47 +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
09e535fb46 quadlet: remove unused 'name' parameter from ConvertNetwork and ConvertVolume
The 'name' parameter was unused in both ConvertNetwork and ConvertVolume functions.
Remove the parameter entirely and update all function calls accordingly.

This fixes revive linter warnings:
- pkg/systemd/quadlet/quadlet.go:961:47: unused-parameter: parameter 'name' seems to be unused
- pkg/systemd/quadlet/quadlet.go:1050:45: unused-parameter: parameter 'name' seems to be unused

Signed-off-by: Jan Rodák <hony.com@seznam.cz>
2025-10-06 14:00:49 +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
0a58e05a68 Merge pull request #27142 from nothiaki/feat-artifact-rm-ignore
Feat artifact rm ignore
2025-10-03 15:45:28 +00: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
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
090304a054 lint: reenable revive unused-parameter check
Signed-off-by: Matt Souza <medsouz99@gmail.com>
2025-10-01 10:42:08 -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
b5de5efb3e cmd/podman/system: fix error handling in renumber and migrate commands
- Change function signatures to return error instead of calling os.Exit()
- Update cobra commands to use RunE instead of Run for proper error handling
- Remove unused imports (fmt, os, define)
- Remove FIXME comments about error handling inconsistency

This allows defer statements to run properly and improves testability.

Signed-off-by: Osama Abdelkader <osama.abdelkader@gmail.com>
2025-09-27 23:51:12 +03: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
5ae0e0de3d cmd/podman: added virtual size option in artifact ls
Signed-off-by: Celso Henrique Souza Silva <celsohenrique367@gmail.com>
2025-09-24 19:03:02 -03: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
78e5a521b0 inline some conditionals
Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2025-09-10 16:17:04 +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
c2506656c4 spf13/pflag: replace deprecated ParseErrorsWhitelist
Use ParseErrorsAllowlist instead, should still work the exact same.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2025-09-04 14:04:47 +02:00
a98154a978 Switch common, storage and image to monorepo.
Signed-off-by: Jan Kaluza <jkaluza@redhat.com>
2025-09-01 12:33:04 +02:00
b9812e3d9e Mention zstandard tarball import support
The `podman-import` man page already mentions support for zstd
compressed tarball support but the cli output didn't.

Signed-off-by: Jelle van der Waa <jvanderwaa@redhat.com>
2025-08-29 17:51:04 +02: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
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
cfe4d46d89 Optimize image loading for Podman machines
Add support for loading images directly from machine paths to avoid
unnecessary file transfers when the image archive is already accessible
on the running machine through mounted directories.

Changes include:
- New /libpod/local/images/load API endpoint for direct machine loading
- Machine detection and path mapping functionality
- Fallback in tunnel mode to try optimized loading first

This optimization significantly speeds up image loading operations
when working with remote Podman machines by eliminating redundant
file transfers for already-accessible image archives.

Fixes: https://issues.redhat.com/browse/RUN-3249
Fixes: https://github.com/containers/podman/issues/26321

Signed-off-by: Jan Rodák <hony.com@seznam.cz>
2025-08-19 12:33:15 +02:00
f38e32760d feat: Add artifact remove --all option
Prior to this commit `artifact remove --all` was not supported on remote
clients.

This patch adds a new artifact API endpoint `artifact/remove` which can
either take a list of artifacts to remove or remove all artifacts by
setting all=true.

This patch removes the temporary warning message in the tunnel interface
implementation of ArtifactRm if `--all` was passed on the command line
and uses the new `artifact/remove` endpoint.

This patch also updates the `artifact remove` command both remote and
local to accept a list of artifacts to remove rather than limiting to
just one.

Signed-off-by: Lewis Roy <lewis@redhat.com>
2025-08-13 23:00:20 +10:00
a75f74b1d3 Fixes: #26691
Signed-off-by: Oleksandr Krutko <alexander.krutko@gmail.com>
2025-08-06 22:34:18 +03:00
67ec2037c0 Add support for configuring tls verification with machine init
This patch adds a new --tls-verify flag to the `podman machine init`
sub command which matches many of our other commands. This allows the
user to optionally control whether TLS verification is enabled or
disabled for download of the machine image.

The default remains to leave the TLS verification decision to the
backend library which defaults to enabling it, this patch just
allows the user to explicitly set it on the CLI.

Fixes: #26517

Signed-off-by: Lewis Roy <lewis@redhat.com>
2025-08-05 21:02:28 +10:00
8e5ed09f0a Merge pull request #26723 from shiavm006/docs-fix-kube-play-annotation-flag
docs(kube play): clarify --annotation flag only affects containers, not pods
2025-08-01 12:14:17 +00:00
5ab92a7499 docs(kube play): clarify --annotation flag only affects containers, not pods
Signed-off-by: shiavm006 <shivammittal42006@gmail.com>
2025-07-31 20:17:19 +05:30
23ebb7d94c feat: add Podman artifact support to Go bindings and remote clients
Add the Go bindings implementation necessary to support Artifacts.
Implement the tunnel interface that consumes the Artifacts Go bindings.

With this patch, users of the Podman remote clients will now be able to
manage OCI artifacts via the Podman CLI and Podman machine.

Jira: https://issues.redhat.com/browse/RUN-2714#

Signed-off-by: Lewis Roy <lewis@redhat.com>
2025-08-01 00:10:50 +10:00
a9ed97d4cf Merge pull request #26692 from giuseppe/add-certdir-creds-to-podman-create-run
podman: add --creds and --cert-dir to create/run
2025-07-28 20:21:22 +00:00
df2862e72c Consolidate the definition and consumption of --sign* CLI options
There are three copies of them, and already a shared utility, so
also define the options in a single place.

This will make it easier to add more options, and it reduces the risk
of incorrectly ordering the parameters to PrepareSigning.

Should not change behavior.

Signed-off-by: Miloslav Trmač <mitr@redhat.com>
2025-07-25 22:33:39 +02:00
7f2908afcf podman: add --creds and --cert-dir to create/run
Add --creds flag to podman create and podman run commands to support
registry authentication during image pulling.

Without this flag, users must perform a separate `podman pull
--creds/--cert-dir` first and then remember to specify `--pull=never`.

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2025-07-25 17:45:23 +02:00
3e673591ad Update compat-volumes setting for remotes
The "compat-volumes" setting shouldn't be provided by the compat build
endpoint, the docker daemon's isn't expected to recognize it.

It is also a conditional boolean flag, so if it isn't specified by the
caller, don't send a value from a client to the server, so that the
server will be able to apply its own default.

Signed-off-by: Nalin Dahyabhai <nalin@redhat.com>
2025-07-23 15:54:28 -04:00
7517e3267a remote build: relay more new flags introduced in buildah 1.41
Wire up the source-date-epoch, rewrite-timestamp, and created-annotation
flags so that a client can correctly ask a server to honor them.

Signed-off-by: Nalin Dahyabhai <nalin@redhat.com>
2025-07-23 15:52:43 -04:00
2f71314b4a Add CLI updates for inherit and unset annotations
Add CLI updates for --inheritannotations and --unsetannotations

Signed-off-by: tomsweeneyredhat <tsweeney@redhat.com>
2025-07-23 10:36:22 -04:00
022bac25ea Quadlet - fix dropin overwrites if different parent dirs
fixes #26555

Signed-off-by: Andreas <43118918+eulores@users.noreply.github.com>
2025-07-22 14:42:53 +02:00
051676bc97 Merge pull request #26330 from flouthoc/quadlet-work
Add support for `podman quadlet`
2025-07-21 12:36:48 +00:00
f293c1a179 Initial implementation of podman quadlet commands
This adds `podman quadlet list`, `podman quadlet install`,
`podman quadlet rm` and `podman quadlet print`.

Signed-off-by: Matt Heon <mheon@redhat.com>
Co-authored-by: flouthoc <flouthoc.git@gmail.com>
Signed-off-by: flouthoc <flouthoc.git@gmail.com>
2025-07-18 13:57:11 -07:00
b05b9d043d Merge pull request #26533 from ArthurWuTW/26506
volume export: refuse to write to terminal (TTY)
2025-07-14 15:58:56 +00:00
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
d5a3878b69 Merge pull request #26553 from l0rd/wsl-utf8
Enforce WSL UTF-8 encoded output
2025-07-07 17:52:48 +00:00
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
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
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