spiegel_podman/cmd
Lokesh Mandvekar 8fd34d5bfd
Add build-tagged splits for cp command to support podman-remote
The original cp.go uses buildah/copier which depends on libimage,
making it unavailable in remote builds. This change splits cp
implementation into separate local and remote variants:

- cmd/podman/containers/cp.go: Shared command definitions, flags, and
  init function (no build tag)
- cmd/podman/containers/cp_local.go: Local implementation using
  buildah/copier (//go:build !remote)
- cmd/podman/containers/cp_remote.go: Remote implementation using
  stdlib archive/tar (//go:build remote)

The remote implementation:
- Uses ContainerEngine interface methods that work over REST API:
  ContainerStat, ContainerCopyToArchive, ContainerCopyFromArchive
- Properly handles file and directory copying in both directions
- Uses CopyOptions.Rename for file renaming when copying to specific
  filenames
- Returns error for container-to-container copying (not supported with
  podman-remote)

This follows the same pattern used for other libimage-dependent code
in commit 4231526e18.

Fixes system tests that require cp functionality with podman-remote.

Signed-off-by: Lokesh Mandvekar <lsm5@redhat.com>
2026-01-14 19:28:30 +05:30
..
podman Add build-tagged splits for cp command to support podman-remote 2026-01-14 19:28:30 +05:30
podman-mac-helper Replace deprecated ioutil 2022-09-20 15:34:27 -04:00
podman-wslkerninst Add new windows installer and build 2022-09-06 16:12:09 -05:00
quadlet Quadlet: exit 0 when there are no files to process 2023-02-07 15:18:03 -05:00
rootlessport Replace deprecated ioutil 2022-09-20 15:34:27 -04:00
winpath Fix spelling "setup" -> "set up" and similar 2022-06-22 18:39:21 +02:00