Bump image, storage, and image-spec
Bump containers/image (pulling in its new dependency on ostree-go), containers/storage, and updated image-spec. This pulls in the OCI v1.0 specifications and code that allows us to support 1.0 images. Signed-off-by: Dan Walsh <dwalsh@redhat.com> Signed-off-by: Nalin Dahyabhai <nalin@redhat.com>
This commit is contained in:
parent
5138691c3b
commit
d76645680f
117 changed files with 3965 additions and 991 deletions
24
vendor/github.com/containers/storage/pkg/loopback/attach_loopback.go
generated
vendored
24
vendor/github.com/containers/storage/pkg/loopback/attach_loopback.go
generated
vendored
|
@ -38,7 +38,15 @@ func getNextFreeLoopbackIndex() (int, error) {
|
|||
return index, err
|
||||
}
|
||||
|
||||
func openNextAvailableLoopback(index int, sparseFile *os.File) (loopFile *os.File, err error) {
|
||||
func openNextAvailableLoopback(index int, sparseName string, sparseFile *os.File) (loopFile *os.File, err error) {
|
||||
// Read information about the loopback file.
|
||||
var st syscall.Stat_t
|
||||
err = syscall.Fstat(int(sparseFile.Fd()), &st)
|
||||
if err != nil {
|
||||
logrus.Errorf("Error reading information about loopback file %s: %v", sparseName, err)
|
||||
return nil, ErrAttachLoopbackDevice
|
||||
}
|
||||
|
||||
// Start looking for a free /dev/loop
|
||||
for {
|
||||
target := fmt.Sprintf("/dev/loop%d", index)
|
||||
|
@ -77,6 +85,18 @@ func openNextAvailableLoopback(index int, sparseFile *os.File) (loopFile *os.Fil
|
|||
// Otherwise, we keep going with the loop
|
||||
continue
|
||||
}
|
||||
|
||||
// Check if the loopback driver and underlying filesystem agree on the loopback file's
|
||||
// device and inode numbers.
|
||||
dev, ino, err := getLoopbackBackingFile(loopFile)
|
||||
if err != nil {
|
||||
logrus.Errorf("Error getting loopback backing file: %s", err)
|
||||
return nil, ErrGetLoopbackBackingFile
|
||||
}
|
||||
if dev != st.Dev || ino != st.Ino {
|
||||
logrus.Errorf("Loopback device and filesystem disagree on device/inode for %q: %#x(%d):%#x(%d) vs %#x(%d):%#x(%d)", sparseName, dev, dev, ino, ino, st.Dev, st.Dev, st.Ino, st.Ino)
|
||||
}
|
||||
|
||||
// In case of success, we finished. Break the loop.
|
||||
break
|
||||
}
|
||||
|
@ -110,7 +130,7 @@ func AttachLoopDevice(sparseName string) (loop *os.File, err error) {
|
|||
}
|
||||
defer sparseFile.Close()
|
||||
|
||||
loopFile, err := openNextAvailableLoopback(startIndex, sparseFile)
|
||||
loopFile, err := openNextAvailableLoopback(startIndex, sparseName, sparseFile)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
|
4
vendor/github.com/containers/storage/pkg/plugins/discovery.go
generated
vendored
4
vendor/github.com/containers/storage/pkg/plugins/discovery.go
generated
vendored
|
@ -15,8 +15,8 @@ import (
|
|||
var (
|
||||
// ErrNotFound plugin not found
|
||||
ErrNotFound = errors.New("plugin not found")
|
||||
socketsPath = "/run/oci-storage/plugins"
|
||||
specsPaths = []string{"/etc/oci-storage/plugins", "/usr/lib/oci-storage/plugins"}
|
||||
socketsPath = "/run/containers/storage/plugins"
|
||||
specsPaths = []string{"/etc/containers/storage/plugins", "/usr/lib/containers/storage/plugins"}
|
||||
)
|
||||
|
||||
// localRegistry defines a registry that is local (using unix socket).
|
||||
|
|
9
vendor/github.com/containers/storage/pkg/plugins/plugins.go
generated
vendored
9
vendor/github.com/containers/storage/pkg/plugins/plugins.go
generated
vendored
|
@ -3,10 +3,11 @@
|
|||
//
|
||||
// Storage discovers plugins by looking for them in the plugin directory whenever
|
||||
// a user or container tries to use one by name. UNIX domain socket files must
|
||||
// be located under /run/oci-storage/plugins, whereas spec files can be located
|
||||
// either under /etc/oci-storage/plugins or /usr/lib/oci-storage/plugins. This
|
||||
// is handled by the Registry interface, which lets you list all plugins or get
|
||||
// a plugin by its name if it exists.
|
||||
// be located under /run/containers/storage/plugins, whereas spec files can be
|
||||
// located either under /etc/containers/storage/plugins or
|
||||
// /usr/lib/containers/storage/plugins. This is handled by the Registry
|
||||
// interface, which lets you list all plugins or get a plugin by its name if it
|
||||
// exists.
|
||||
//
|
||||
// The plugins need to implement an HTTP server and bind this to the UNIX socket
|
||||
// or the address specified in the spec files.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue