Browse Source

sysutils/docker-engine: Add various patches because Rdev is uint64 on FreeBSD

but int on most other platforms including Linux. So all this castings to int
are failing.
master
Bernhard Fröhlich 2 months ago
parent
commit
1efa338b8e
Signed by: Bernhard Froehlich <decke@bluelife.at> GPG Key ID: 4DD88C3F9F3B8333

+ 8
- 8
sysutils/docker-engine/files/patch-pkg_archive_archive__unix.go View File

@@ -1,11 +1,11 @@
--- pkg/archive/archive_unix.go.orig 2019-06-18 21:30:11 UTC
--- pkg/archive/archive_unix.go.orig 2019-06-24 10:21:29 UTC
+++ pkg/archive/archive_unix.go
@@ -63,7 +63,7 @@ func getInodeFromStat(stat interface{}) (inode uint64,
s, ok := stat.(*syscall.Stat_t)
if ok {
- inode = s.Ino
+ inode = uint64(s.Ino)
@@ -96,7 +96,7 @@ func handleTarTypeBlockCharFifo(hdr *tar.Header, path
mode |= unix.S_IFIFO
}
return
- return system.Mknod(path, mode, int(system.Mkdev(hdr.Devmajor, hdr.Devminor)))
+ return system.Mknod(path, mode, uint64(system.Mkdev(hdr.Devmajor, hdr.Devminor)))
}
func handleLChmod(hdr *tar.Header, path string, hdrInfo os.FileInfo) error {

+ 11
- 0
sysutils/docker-engine/files/patch-pkg_system_mknod.go View File

@@ -0,0 +1,11 @@
--- pkg/system/mknod.go.orig 2019-06-18 21:30:11 UTC
+++ pkg/system/mknod.go
@@ -8,7 +8,7 @@ import (
// Mknod creates a filesystem node (file, device special file or named pipe) named path
// with attributes specified by mode and dev.
-func Mknod(path string, mode uint32, dev int) error {
+func Mknod(path string, mode uint32, dev uint64) error {
return unix.Mknod(path, mode, dev)
}

+ 11
- 0
sysutils/docker-engine/files/patch-vendor_github.com_containerd_containerd_archive_tar__unix.go View File

@@ -0,0 +1,11 @@
--- vendor/github.com/containerd/containerd/archive/tar_unix.go.orig 2019-06-18 21:30:11 UTC
+++ vendor/github.com/containerd/containerd/archive/tar_unix.go
@@ -122,7 +122,7 @@ func handleTarTypeBlockCharFifo(hdr *tar.Header, path
mode |= unix.S_IFIFO
}
- return unix.Mknod(path, mode, int(unix.Mkdev(uint32(hdr.Devmajor), uint32(hdr.Devminor))))
+ return unix.Mknod(path, mode, unix.Mkdev(uint32(hdr.Devmajor), uint32(hdr.Devminor)))
}
func handleLChmod(hdr *tar.Header, path string, hdrInfo os.FileInfo) error {

+ 11
- 0
sysutils/docker-engine/files/patch-vendor_github.com_containerd_continuity_devices_devices__unix.go View File

@@ -0,0 +1,11 @@
--- vendor/github.com/containerd/continuity/devices/devices_unix.go.orig 2019-06-18 21:30:11 UTC
+++ vendor/github.com/containerd/continuity/devices/devices_unix.go
@@ -55,7 +55,7 @@ func Mknod(p string, mode os.FileMode, maj, min int) e
m |= unix.S_IFIFO
}
- return unix.Mknod(p, m, int(dev))
+ return unix.Mknod(p, m, dev)
}
// syscallMode returns the syscall-specific mode bits from Go's portable mode bits.

+ 9
- 0
sysutils/docker-engine/files/patch-vendor_github.com_containerd_continuity_fs_copy__unix.go View File

@@ -0,0 +1,9 @@
--- vendor/github.com/containerd/continuity/fs/copy_unix.go.orig 2019-06-18 21:30:11 UTC
+++ vendor/github.com/containerd/continuity/fs/copy_unix.go
@@ -108,5 +108,5 @@ func copyDevice(dst string, fi os.FileInfo) error {
if !ok {
return errors.New("unsupported stat type")
}
- return unix.Mknod(dst, uint32(fi.Mode()), int(st.Rdev))
+ return unix.Mknod(dst, uint32(fi.Mode()), st.Rdev)
}

+ 9
- 0
sysutils/docker-engine/files/patch-vendor_github.com_tonistiigi_fsutil_copy_copy__unix.go View File

@@ -0,0 +1,9 @@
--- vendor/github.com/tonistiigi/fsutil/copy/copy_unix.go.orig 2019-06-18 21:30:11 UTC
+++ vendor/github.com/tonistiigi/fsutil/copy/copy_unix.go
@@ -64,5 +64,5 @@ func copyDevice(dst string, fi os.FileInfo) error {
if !ok {
return errors.New("unsupported stat type")
}
- return unix.Mknod(dst, uint32(fi.Mode()), int(st.Rdev))
+ return unix.Mknod(dst, uint32(fi.Mode()), st.Rdev)
}

Loading…
Cancel
Save