Commit Graph

5 Commits

Author SHA1 Message Date
Paul Holzinger d240865a45 lint: update golangci-lint to v1.56.2
Adds a couple of new linters with many new warnings:
- perfsprint (fixed in code, excluded for tests)
- revive (fix the problems, disabled the dot import check as we use it
  for ginkgo)
- inamedparam (disabled because it is opinionated)
- testifylint (great linter but we have like 1000+ issues that I have no
  time fixing now)

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2024-03-05 18:10:32 +01:00
Gordon Messmer 9c69ae85ec Support the execution of SSH commands with optional input.
Because the SSH exec functions do not currently support execution with
input, some users (such as the podman-image-scp) must operate in two
phases, first copying a file to the remote host, and then executing a
command with shell redirection and removing the temporary file.

This API extension allows those users to simplify their code and
avoid the use of temporary files.

Signed-off-by: Gordon Messmer <gordon.messmer@gmail.com>
2024-02-07 09:05:31 -08:00
Paul Holzinger 330f41d7a2 pkg/config: add new connections.conf file
podman systemd conenction and farm currently both write containers.conf
to store their settings. Each write removes comments from the user
config file and thus makes it not great to use.

The new approach is to have a seperate file connections.conf (json
format) to store both conenctions and farms for podman. We continue to
read containers.conf for the connections and farms as well and podman
can read both. This means we have a read only store in containers.conf
(manually added by users), they cannot be removed by the podman cli.

This is a breaking chnage and will require many chnages in podman to
migrate to the new APIs added in this commit.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2024-01-29 17:05:03 +01:00
Valentin Rothberg 14bddff8d5 linters: enable mirror
Useful micro optimizations.

Signed-off-by: Valentin Rothberg <vrothberg@redhat.com>
2023-09-01 11:20:53 +02:00
Charlie Doern 64be63d976 ssh package
initial implementation of the ssh package including:

- nativeConnectionCreate() / golangConnectionCreate()
- n/a / golangConnectionDial()
- nativeConnectionScp() / golangConnectionScp()
- nativeConnectionExec() / golangConnectionExeC()

the way this works, is there are publicly accessible functions Create, Exec, Dial and Scp. podman will have a new global flag --ssh` that will allow users to choose native or golang based ssh functions. The functionality in containers/common (here) also checks if you have the necessary binaries installed

closes 

Signed-off-by: Charlie Doern <cdoern@redhat.com>
2022-08-08 09:22:46 -04:00