mirror of
https://github.com/containers/podman.git
synced 2025-08-06 19:44:14 +08:00
update buildah and c/common to latest
also includes bumps for c/storage and c/image Signed-off-by: Paul Holzinger <pholzing@redhat.com>
This commit is contained in:
1
vendor/github.com/fsouza/go-dockerclient/AUTHORS
generated
vendored
1
vendor/github.com/fsouza/go-dockerclient/AUTHORS
generated
vendored
@ -1 +0,0 @@
|
||||
# The official list of authors for copyright purposes can be found on GitHub: https://github.com/fsouza/go-dockerclient/graphs/contributors
|
4
vendor/github.com/fsouza/go-dockerclient/container_restart.go
generated
vendored
4
vendor/github.com/fsouza/go-dockerclient/container_restart.go
generated
vendored
@ -12,9 +12,9 @@ import (
|
||||
//
|
||||
// - always: the docker daemon will always restart the container
|
||||
// - on-failure: the docker daemon will restart the container on failures, at
|
||||
// most MaximumRetryCount times
|
||||
// most MaximumRetryCount times
|
||||
// - unless-stopped: the docker daemon will always restart the container except
|
||||
// when user has manually stopped the container
|
||||
// when user has manually stopped the container
|
||||
// - no: the docker daemon will not restart the container automatically
|
||||
type RestartPolicy struct {
|
||||
Name string `json:"Name,omitempty" yaml:"Name,omitempty" toml:"Name,omitempty"`
|
||||
|
34
vendor/github.com/fsouza/go-dockerclient/event.go
generated
vendored
34
vendor/github.com/fsouza/go-dockerclient/event.go
generated
vendored
@ -93,6 +93,7 @@ type eventMonitoringState struct {
|
||||
C chan *APIEvents
|
||||
errC chan error
|
||||
listeners []chan<- *APIEvents
|
||||
closeConn func()
|
||||
}
|
||||
|
||||
const (
|
||||
@ -229,6 +230,11 @@ func (eventState *eventMonitoringState) disableEventMonitoring() {
|
||||
eventState.enabled = false
|
||||
close(eventState.C)
|
||||
close(eventState.errC)
|
||||
|
||||
if eventState.closeConn != nil {
|
||||
eventState.closeConn()
|
||||
eventState.closeConn = nil
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -290,7 +296,7 @@ func (eventState *eventMonitoringState) connectWithRetry(c *Client, opts EventsO
|
||||
eventChan := eventState.C
|
||||
errChan := eventState.errC
|
||||
eventState.RUnlock()
|
||||
err := c.eventHijack(opts, atomic.LoadInt64(&eventState.lastSeen), eventChan, errChan)
|
||||
closeConn, err := c.eventHijack(opts, atomic.LoadInt64(&eventState.lastSeen), eventChan, errChan)
|
||||
for ; err != nil && retries < maxMonitorConnRetries; retries++ {
|
||||
waitTime := int64(retryInitialWaitTime * math.Pow(2, float64(retries)))
|
||||
time.Sleep(time.Duration(waitTime) * time.Millisecond)
|
||||
@ -298,8 +304,11 @@ func (eventState *eventMonitoringState) connectWithRetry(c *Client, opts EventsO
|
||||
eventChan = eventState.C
|
||||
errChan = eventState.errC
|
||||
eventState.RUnlock()
|
||||
err = c.eventHijack(opts, atomic.LoadInt64(&eventState.lastSeen), eventChan, errChan)
|
||||
closeConn, err = c.eventHijack(opts, atomic.LoadInt64(&eventState.lastSeen), eventChan, errChan)
|
||||
}
|
||||
eventState.Lock()
|
||||
defer eventState.Unlock()
|
||||
eventState.closeConn = closeConn
|
||||
return err
|
||||
}
|
||||
|
||||
@ -343,7 +352,7 @@ func (eventState *eventMonitoringState) updateLastSeen(e *APIEvents) {
|
||||
}
|
||||
}
|
||||
|
||||
func (c *Client) eventHijack(opts EventsOptions, startTime int64, eventChan chan *APIEvents, errChan chan error) error {
|
||||
func (c *Client) eventHijack(opts EventsOptions, startTime int64, eventChan chan *APIEvents, errChan chan error) (closeConn func(), err error) {
|
||||
// on reconnect override initial Since with last event seen time
|
||||
if startTime != 0 {
|
||||
opts.Since = strconv.FormatInt(startTime, 10)
|
||||
@ -356,37 +365,38 @@ func (c *Client) eventHijack(opts EventsOptions, startTime int64, eventChan chan
|
||||
address = c.endpointURL.Host
|
||||
}
|
||||
var dial net.Conn
|
||||
var err error
|
||||
if c.TLSConfig == nil {
|
||||
dial, err = c.Dialer.Dial(protocol, address)
|
||||
} else {
|
||||
netDialer, ok := c.Dialer.(*net.Dialer)
|
||||
if !ok {
|
||||
return ErrTLSNotSupported
|
||||
return nil, ErrTLSNotSupported
|
||||
}
|
||||
dial, err = tlsDialWithDialer(netDialer, protocol, address, c.TLSConfig)
|
||||
}
|
||||
if err != nil {
|
||||
return err
|
||||
return nil, err
|
||||
}
|
||||
//lint:ignore SA1019 the alternative doesn't quite work, so keep using the deprecated thing.
|
||||
conn := httputil.NewClientConn(dial, nil)
|
||||
req, err := http.NewRequest(http.MethodGet, uri, nil)
|
||||
if err != nil {
|
||||
return err
|
||||
return nil, err
|
||||
}
|
||||
res, err := conn.Do(req)
|
||||
if err != nil {
|
||||
return err
|
||||
return nil, err
|
||||
}
|
||||
|
||||
keepRunning := int32(1)
|
||||
//lint:ignore SA1019 the alternative doesn't quite work, so keep using the deprecated thing.
|
||||
go func(res *http.Response, conn *httputil.ClientConn) {
|
||||
defer conn.Close()
|
||||
defer res.Body.Close()
|
||||
decoder := json.NewDecoder(res.Body)
|
||||
for {
|
||||
for atomic.LoadInt32(&keepRunning) == 1 {
|
||||
var event APIEvents
|
||||
if err = decoder.Decode(&event); err != nil {
|
||||
if err := decoder.Decode(&event); err != nil {
|
||||
if errors.Is(err, io.EOF) || errors.Is(err, io.ErrUnexpectedEOF) {
|
||||
c.eventMonitor.RLock()
|
||||
if c.eventMonitor.enabled && c.eventMonitor.C == eventChan {
|
||||
@ -409,7 +419,9 @@ func (c *Client) eventHijack(opts EventsOptions, startTime int64, eventChan chan
|
||||
c.eventMonitor.RUnlock()
|
||||
}
|
||||
}(res, conn)
|
||||
return nil
|
||||
return func() {
|
||||
atomic.StoreInt32(&keepRunning, 0)
|
||||
}, nil
|
||||
}
|
||||
|
||||
// transformEvent takes an event and determines what version it is from
|
||||
|
2
vendor/github.com/fsouza/go-dockerclient/go.mod
generated
vendored
2
vendor/github.com/fsouza/go-dockerclient/go.mod
generated
vendored
@ -1,6 +1,6 @@
|
||||
module github.com/fsouza/go-dockerclient
|
||||
|
||||
go 1.17
|
||||
go 1.18
|
||||
|
||||
require (
|
||||
github.com/Microsoft/go-winio v0.5.2
|
||||
|
365
vendor/github.com/fsouza/go-dockerclient/go.sum
generated
vendored
365
vendor/github.com/fsouza/go-dockerclient/go.sum
generated
vendored
File diff suppressed because it is too large
Load Diff
8
vendor/github.com/fsouza/go-dockerclient/misc.go
generated
vendored
8
vendor/github.com/fsouza/go-dockerclient/misc.go
generated
vendored
@ -131,13 +131,11 @@ type ServiceConfig struct {
|
||||
type NetIPNet net.IPNet
|
||||
|
||||
// MarshalJSON returns the JSON representation of the IPNet.
|
||||
//
|
||||
func (ipnet *NetIPNet) MarshalJSON() ([]byte, error) {
|
||||
return json.Marshal((*net.IPNet)(ipnet).String())
|
||||
}
|
||||
|
||||
// UnmarshalJSON sets the IPNet from a byte array of JSON.
|
||||
//
|
||||
func (ipnet *NetIPNet) UnmarshalJSON(b []byte) (err error) {
|
||||
var ipnetStr string
|
||||
if err = json.Unmarshal(b, &ipnetStr); err == nil {
|
||||
@ -181,9 +179,9 @@ func (c *Client) Info() (*DockerInfo, error) {
|
||||
//
|
||||
// Some examples:
|
||||
//
|
||||
// localhost.localdomain:5000/samalba/hipache:latest -> localhost.localdomain:5000/samalba/hipache, latest
|
||||
// localhost.localdomain:5000/samalba/hipache -> localhost.localdomain:5000/samalba/hipache, ""
|
||||
// busybox:latest@sha256:4a731fb46adc5cefe3ae374a8b6020fc1b6ad667a279647766e9a3cd89f6fa92 -> busybox, latest
|
||||
// localhost.localdomain:5000/samalba/hipache:latest -> localhost.localdomain:5000/samalba/hipache, latest
|
||||
// localhost.localdomain:5000/samalba/hipache -> localhost.localdomain:5000/samalba/hipache, ""
|
||||
// busybox:latest@sha256:4a731fb46adc5cefe3ae374a8b6020fc1b6ad667a279647766e9a3cd89f6fa92 -> busybox, latest
|
||||
func ParseRepositoryTag(repoTag string) (repository string, tag string) {
|
||||
parts := strings.SplitN(repoTag, "@", 2)
|
||||
repoTag = parts[0]
|
||||
|
29
vendor/github.com/fsouza/go-dockerclient/tls.go
generated
vendored
29
vendor/github.com/fsouza/go-dockerclient/tls.go
generated
vendored
@ -97,20 +97,19 @@ func tlsDialWithDialer(dialer *net.Dialer, network, addr string, config *tls.Con
|
||||
// this exists to silent an error message in go vet
|
||||
func copyTLSConfig(cfg *tls.Config) *tls.Config {
|
||||
return &tls.Config{
|
||||
Certificates: cfg.Certificates,
|
||||
CipherSuites: cfg.CipherSuites,
|
||||
ClientAuth: cfg.ClientAuth,
|
||||
ClientCAs: cfg.ClientCAs,
|
||||
ClientSessionCache: cfg.ClientSessionCache,
|
||||
CurvePreferences: cfg.CurvePreferences,
|
||||
InsecureSkipVerify: cfg.InsecureSkipVerify,
|
||||
MaxVersion: cfg.MaxVersion,
|
||||
MinVersion: cfg.MinVersion,
|
||||
NextProtos: cfg.NextProtos,
|
||||
PreferServerCipherSuites: cfg.PreferServerCipherSuites,
|
||||
Rand: cfg.Rand,
|
||||
RootCAs: cfg.RootCAs,
|
||||
ServerName: cfg.ServerName,
|
||||
SessionTicketsDisabled: cfg.SessionTicketsDisabled,
|
||||
Certificates: cfg.Certificates,
|
||||
CipherSuites: cfg.CipherSuites,
|
||||
ClientAuth: cfg.ClientAuth,
|
||||
ClientCAs: cfg.ClientCAs,
|
||||
ClientSessionCache: cfg.ClientSessionCache,
|
||||
CurvePreferences: cfg.CurvePreferences,
|
||||
InsecureSkipVerify: cfg.InsecureSkipVerify,
|
||||
MaxVersion: cfg.MaxVersion,
|
||||
MinVersion: cfg.MinVersion,
|
||||
NextProtos: cfg.NextProtos,
|
||||
Rand: cfg.Rand,
|
||||
RootCAs: cfg.RootCAs,
|
||||
ServerName: cfg.ServerName,
|
||||
SessionTicketsDisabled: cfg.SessionTicketsDisabled,
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user