mirror of
https://github.com/containers/podman.git
synced 2025-09-26 16:25:00 +08:00
Bump c/common to v0.47.4
As the title says. Signed-off-by: tomsweeneyredhat <tsweeney@redhat.com>
This commit is contained in:
7
vendor/github.com/containers/common/libimage/copier.go
generated
vendored
7
vendor/github.com/containers/common/libimage/copier.go
generated
vendored
@ -7,6 +7,7 @@ import (
|
||||
"strings"
|
||||
"time"
|
||||
|
||||
"github.com/containers/common/libimage/manifests"
|
||||
"github.com/containers/common/pkg/config"
|
||||
"github.com/containers/common/pkg/retry"
|
||||
"github.com/containers/image/v5/copy"
|
||||
@ -26,8 +27,10 @@ const (
|
||||
)
|
||||
|
||||
// LookupReferenceFunc return an image reference based on the specified one.
|
||||
// This can be used to pass custom blob caches to the copy operation.
|
||||
type LookupReferenceFunc func(ref types.ImageReference) (types.ImageReference, error)
|
||||
// The returned reference can return custom ImageSource or ImageDestination
|
||||
// objects which intercept or filter blobs, manifests, and signatures as
|
||||
// they are read and written.
|
||||
type LookupReferenceFunc = manifests.LookupReferenceFunc
|
||||
|
||||
// CopyOptions allow for customizing image-copy operations.
|
||||
type CopyOptions struct {
|
||||
|
12
vendor/github.com/containers/common/libimage/manifests/manifests.go
generated
vendored
12
vendor/github.com/containers/common/libimage/manifests/manifests.go
generated
vendored
@ -27,6 +27,12 @@ import (
|
||||
|
||||
const instancesData = "instances.json"
|
||||
|
||||
// LookupReferenceFunc return an image reference based on the specified one.
|
||||
// The returned reference can return custom ImageSource or ImageDestination
|
||||
// objects which intercept or filter blobs, manifests, and signatures as
|
||||
// they are read and written.
|
||||
type LookupReferenceFunc func(ref types.ImageReference) (types.ImageReference, error)
|
||||
|
||||
// ErrListImageUnknown is returned when we attempt to create an image reference
|
||||
// for a List that has not yet been saved to an image.
|
||||
var ErrListImageUnknown = stderrors.New("unable to determine which image holds the manifest list")
|
||||
@ -57,6 +63,7 @@ type PushOptions struct {
|
||||
SignBy string // fingerprint of GPG key to use to sign images
|
||||
RemoveSignatures bool // true to discard signatures in images
|
||||
ManifestType string // the format to use when saving the list - possible options are oci, v2s1, and v2s2
|
||||
SourceFilter LookupReferenceFunc // filter the list source
|
||||
}
|
||||
|
||||
// Create creates a new list containing information about the specified image,
|
||||
@ -221,6 +228,11 @@ func (l *list) Push(ctx context.Context, dest types.ImageReference, options Push
|
||||
if err != nil {
|
||||
return nil, "", err
|
||||
}
|
||||
if options.SourceFilter != nil {
|
||||
if src, err = options.SourceFilter(src); err != nil {
|
||||
return nil, "", err
|
||||
}
|
||||
}
|
||||
copyOptions := &cp.Options{
|
||||
ImageListSelection: options.ImageListSelection,
|
||||
Instances: options.Instances,
|
||||
|
29
vendor/github.com/containers/common/libnetwork/cni/cni_conversion.go
generated
vendored
29
vendor/github.com/containers/common/libnetwork/cni/cni_conversion.go
generated
vendored
@ -222,14 +222,33 @@ func (n *cniNetwork) createCNIConfigListFromNetwork(network *types.Network, writ
|
||||
err error
|
||||
)
|
||||
if len(network.Subnets) > 0 {
|
||||
defIpv4Route := false
|
||||
defIpv6Route := false
|
||||
for _, subnet := range network.Subnets {
|
||||
route, err := newIPAMDefaultRoute(util.IsIPv6(subnet.Subnet.IP))
|
||||
if err != nil {
|
||||
return nil, "", err
|
||||
}
|
||||
routes = append(routes, route)
|
||||
ipam := newIPAMLocalHostRange(subnet.Subnet, subnet.LeaseRange, subnet.Gateway)
|
||||
ipamRanges = append(ipamRanges, []ipamLocalHostRangeConf{*ipam})
|
||||
|
||||
// only add default route for not internal networks
|
||||
if !network.Internal {
|
||||
ipv6 := util.IsIPv6(subnet.Subnet.IP)
|
||||
if !ipv6 && defIpv4Route {
|
||||
continue
|
||||
}
|
||||
if ipv6 && defIpv6Route {
|
||||
continue
|
||||
}
|
||||
|
||||
if ipv6 {
|
||||
defIpv6Route = true
|
||||
} else {
|
||||
defIpv4Route = true
|
||||
}
|
||||
route, err := newIPAMDefaultRoute(ipv6)
|
||||
if err != nil {
|
||||
return nil, "", err
|
||||
}
|
||||
routes = append(routes, route)
|
||||
}
|
||||
}
|
||||
ipamConf = newIPAMHostLocalConf(routes, ipamRanges)
|
||||
} else {
|
||||
|
2
vendor/github.com/containers/common/libnetwork/cni/config.go
generated
vendored
2
vendor/github.com/containers/common/libnetwork/cni/config.go
generated
vendored
@ -82,7 +82,7 @@ func (n *cniNetwork) networkCreate(newNetwork *types.Network, defaultNet bool) (
|
||||
return nil, errors.Wrapf(types.ErrInvalidArg, "unsupported driver %s", newNetwork.Driver)
|
||||
}
|
||||
|
||||
err = internalutil.ValidateSubnets(newNetwork, usedNetworks)
|
||||
err = internalutil.ValidateSubnets(newNetwork, !newNetwork.Internal, usedNetworks)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
6
vendor/github.com/containers/common/libnetwork/internal/util/validate.go
generated
vendored
6
vendor/github.com/containers/common/libnetwork/internal/util/validate.go
generated
vendored
@ -65,11 +65,11 @@ func ValidateSubnet(s *types.Subnet, addGateway bool, usedNetworks []*net.IPNet)
|
||||
}
|
||||
|
||||
// ValidateSubnets will validate the subnets for this network.
|
||||
// It also sets the gateway if the gateway is empty and it sets
|
||||
// It also sets the gateway if the gateway is empty and addGateway is set to true
|
||||
// IPv6Enabled to true if at least one subnet is ipv6.
|
||||
func ValidateSubnets(network *types.Network, usedNetworks []*net.IPNet) error {
|
||||
func ValidateSubnets(network *types.Network, addGateway bool, usedNetworks []*net.IPNet) error {
|
||||
for i := range network.Subnets {
|
||||
err := ValidateSubnet(&network.Subnets[i], !network.Internal, usedNetworks)
|
||||
err := ValidateSubnet(&network.Subnets[i], addGateway, usedNetworks)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
9
vendor/github.com/containers/common/libnetwork/netavark/config.go
generated
vendored
9
vendor/github.com/containers/common/libnetwork/netavark/config.go
generated
vendored
@ -115,16 +115,13 @@ func (n *netavarkNetwork) networkCreate(newNetwork *types.Network, defaultNet bo
|
||||
return nil, errors.Wrapf(types.ErrInvalidArg, "unsupported driver %s", newNetwork.Driver)
|
||||
}
|
||||
|
||||
err = internalutil.ValidateSubnets(newNetwork, usedNetworks)
|
||||
// add gatway when not internal or dns enabled
|
||||
addGateway := !newNetwork.Internal || newNetwork.DNSEnabled
|
||||
err = internalutil.ValidateSubnets(newNetwork, addGateway, usedNetworks)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
// FIXME: If we have a working solution for internal networks with dns this check should be removed.
|
||||
if newNetwork.DNSEnabled && newNetwork.Internal {
|
||||
return nil, errors.New("cannot set internal and dns enabled")
|
||||
}
|
||||
|
||||
newNetwork.Created = time.Now()
|
||||
|
||||
if !defaultNet {
|
||||
|
4
vendor/github.com/containers/common/libnetwork/netavark/network.go
generated
vendored
4
vendor/github.com/containers/common/libnetwork/netavark/network.go
generated
vendored
@ -231,7 +231,9 @@ func parseNetwork(network *types.Network) error {
|
||||
return errors.Errorf("invalid network ID %q", network.ID)
|
||||
}
|
||||
|
||||
return util.ValidateSubnets(network, nil)
|
||||
// add gatway when not internal or dns enabled
|
||||
addGateway := !network.Internal || network.DNSEnabled
|
||||
return util.ValidateSubnets(network, addGateway, nil)
|
||||
}
|
||||
|
||||
func (n *netavarkNetwork) createDefaultNetwork() (*types.Network, error) {
|
||||
|
2
vendor/github.com/containers/common/pkg/auth/auth.go
generated
vendored
2
vendor/github.com/containers/common/pkg/auth/auth.go
generated
vendored
@ -248,7 +248,7 @@ func getUserAndPass(opts *LoginOptions, password, userFromAuthFile string) (user
|
||||
}
|
||||
if password == "" {
|
||||
fmt.Fprint(opts.Stdout, "Password: ")
|
||||
pass, err := terminal.ReadPassword(0)
|
||||
pass, err := terminal.ReadPassword(int(os.Stdin.Fd()))
|
||||
if err != nil {
|
||||
return "", "", errors.Wrap(err, "reading password")
|
||||
}
|
||||
|
2
vendor/github.com/containers/common/version/version.go
generated
vendored
2
vendor/github.com/containers/common/version/version.go
generated
vendored
@ -1,4 +1,4 @@
|
||||
package version
|
||||
|
||||
// Version is the version of the build.
|
||||
const Version = "0.47.3"
|
||||
const Version = "0.47.4"
|
||||
|
Reference in New Issue
Block a user