标签:loongson mips64 docker patch rpmbuild
diff -Nur docker.orig/daemon/graphdriver/devmapper/deviceset.go docker/daemon/graphdriver/devmapper/deviceset.go--- docker.orig/daemon/graphdriver/devmapper/deviceset.go 2017-09-20 21:29:26.000000000 +0800
+++ docker/daemon/graphdriver/devmapper/deviceset.go 2017-11-24 16:33:26.525115486 +0800
@@ -1531,7 +1531,7 @@
return 0, 0, err
}
- dev := stat.Sys().(*syscall.Stat_t).Rdev
+ dev := uint64(stat.Sys().(*syscall.Stat_t).Rdev)
majorNum := major(dev)
minorNum := minor(dev)
@@ -1713,7 +1713,7 @@
// - Managed by docker
// - The target of this device is at major <maj> and minor <min>
// - If <inode> is defined, use that file inside the device as a loopback image. Otherwise use the device itself.
- devices.devicePrefix = fmt.Sprintf("docker-%d:%d-%d", major(sysSt.Dev), minor(sysSt.Dev), sysSt.Ino)
+ devices.devicePrefix = fmt.Sprintf("docker-%d:%d-%d", major(uint64(sysSt.Dev)), minor(uint64(sysSt.Dev)), sysSt.Ino)
logrus.Debugf("devmapper: Generated prefix: %s", devices.devicePrefix)
// Check for the existence of the thin-pool device
diff -Nur docker.orig/docker-lvm-plugin-8647404eed561d32835d6bc032b1c330ee31ed5b/vendor/src/github.com/docker/docker/pkg/system/stat_linux.go docker/docker-lvm-plugin-8647404eed561d32835d6bc032b1c330ee31ed5b/vendor/src/github.com/docker/docker/pkg/system/stat_linux.go
--- docker.orig/docker-lvm-plugin-8647404eed561d32835d6bc032b1c330ee31ed5b/vendor/src/github.com/docker/docker/pkg/system/stat_linux.go 2016-12-22 00:13:44.000000000 +0800
+++ docker/docker-lvm-plugin-8647404eed561d32835d6bc032b1c330ee31ed5b/vendor/src/github.com/docker/docker/pkg/system/stat_linux.go 2017-11-24 13:50:47.815935368 +0800
@@ -10,7 +10,7 @@
mode: s.Mode,
uid: s.Uid,
gid: s.Gid,
- rdev: s.Rdev,
+ rdev: uint64(s.Rdev),
mtim: s.Mtim}, nil
}
diff -Nur docker.orig/docker-novolume-plugin-385ec70baac3ef356f868f391c8d7818140fbd44/Godeps/_workspace/src/github.com/docker/docker/pkg/system/stat_linux.go docker/docker-novolume-plugin-385ec70baac3ef356f868f391c8d7818140fbd44/Godeps/_workspace/src/github.com/docker/docker/pkg/system/stat_linux.go
--- docker.orig/docker-novolume-plugin-385ec70baac3ef356f868f391c8d7818140fbd44/Godeps/_workspace/src/github.com/docker/docker/pkg/system/stat_linux.go 2016-09-28 21:50:34.000000000 +0800
+++ docker/docker-novolume-plugin-385ec70baac3ef356f868f391c8d7818140fbd44/Godeps/_workspace/src/github.com/docker/docker/pkg/system/stat_linux.go 2017-11-24 13:51:15.544752988 +0800
@@ -10,7 +10,7 @@
mode: s.Mode,
uid: s.Uid,
gid: s.Gid,
- rdev: s.Rdev,
+ rdev: uint64(s.Rdev),
mtim: s.Mtim}, nil
}
diff -Nur docker.orig/pkg/loopback/loopback.go docker/pkg/loopback/loopback.go
--- docker.orig/pkg/loopback/loopback.go 2017-09-20 21:29:26.000000000 +0800
+++ docker/pkg/loopback/loopback.go 2017-11-24 15:47:17.571344699 +0800
@@ -53,7 +53,7 @@
}
dev, inode, err := getLoopbackBackingFile(file)
- if err == nil && dev == targetDevice && inode == targetInode {
+ if err == nil && dev == uint64(targetDevice) && inode == targetInode {
return file
}
file.Close()
diff -Nur docker.orig/pkg/platform/architecture_linux.go docker/pkg/platform/architecture_linux.go
--- docker.orig/pkg/platform/architecture_linux.go 2017-09-20 21:29:26.000000000 +0800
+++ docker/pkg/platform/architecture_linux.go 2017-11-24 15:59:42.245902816 +0800
@@ -14,3 +14,17 @@
}
return charsToString(utsname.Machine), nil
}
+
+// Convert the OS/ARCH-specific utsname.Machine to string
+// given as an array of signed int8
+func charsToString(ca [65]int8) string {
+ s := make([]byte, len(ca))
+ var lens int
+ for ; lens < len(ca); lens++ {
+ if ca[lens] == 0 {
+ break
+ }
+ s[lens] = uint8(ca[lens])
+ }
+ return string(s[0:lens])
+}
diff -Nur docker.orig/pkg/signal/signal_linux.go docker/pkg/signal/signal_linux.go
--- docker.orig/pkg/signal/signal_linux.go 2017-09-20 21:29:26.000000000 +0800
+++ docker/pkg/signal/signal_linux.go 2017-11-24 14:06:01.824448193 +0800
@@ -30,7 +30,6 @@
"PWR": syscall.SIGPWR,
"QUIT": syscall.SIGQUIT,
"SEGV": syscall.SIGSEGV,
- "STKFLT": syscall.SIGSTKFLT,
"STOP": syscall.SIGSTOP,
"SYS": syscall.SIGSYS,
"TERM": syscall.SIGTERM,
@@ -38,7 +37,6 @@
"TSTP": syscall.SIGTSTP,
"TTIN": syscall.SIGTTIN,
"TTOU": syscall.SIGTTOU,
- "UNUSED": syscall.SIGUNUSED,
"URG": syscall.SIGURG,
"USR1": syscall.SIGUSR1,
"USR2": syscall.SIGUSR2,
diff -Nur docker.orig/pkg/system/stat_linux.go docker/pkg/system/stat_linux.go
--- docker.orig/pkg/system/stat_linux.go 2017-09-20 21:29:26.000000000 +0800
+++ docker/pkg/system/stat_linux.go 2017-11-24 13:51:30.444402271 +0800
@@ -10,7 +10,7 @@
mode: s.Mode,
uid: s.Uid,
gid: s.Gid,
- rdev: s.Rdev,
+ rdev: uint64(s.Rdev),
mtim: s.Mtim}, nil
}
diff -Nur docker.orig/vendor/src/github.com/boltdb/bolt/bolt_mips64el.go docker/vendor/src/github.com/boltdb/bolt/bolt_mips64el.go
--- docker.orig/vendor/src/github.com/boltdb/bolt/bolt_mips64el.go 1970-01-01 08:00:00.000000000 +0800
+++ docker/vendor/src/github.com/boltdb/bolt/bolt_mips64el.go 2017-11-24 15:26:48.247367232 +0800
@@ -0,0 +1,11 @@
+// +build mips64le
+package bolt
+
+// maxMapSize represents the largest mmap size supported by Bolt.
+const maxMapSize = 0xFFFFFFFFFFFF // 256TB
+
+// maxAllocSize is the size used when creating array pointers.
+const maxAllocSize = 0x7FFFFFFF
+
+// Are unaligned load/stores broken on this arch?
+var brokenUnaligned = false
diff -Nur docker.orig/vendor/src/github.com/opencontainers/runc/libcontainer/system/syscall_linux_64.go docker/vendor/src/github.com/opencontainers/runc/libcontainer/system/syscall_linux_64.go
--- docker.orig/vendor/src/github.com/opencontainers/runc/libcontainer/system/syscall_linux_64.go 2017-09-20 21:29:26.000000000 +0800
+++ docker/vendor/src/github.com/opencontainers/runc/libcontainer/system/syscall_linux_64.go 2017-11-24 15:55:46.105395846 +0800
@@ -1,4 +1,4 @@
-// +build linux,arm64 linux,amd64 linux,ppc linux,ppc64 linux,ppc64le linux,s390x
+// +build linux,arm64 linux,amd64 linux,ppc linux,ppc64 linux,ppc64le linux,s390x linux,mips64le
package system
diff -Nur docker.orig/vendor/src/github.com/tonistiigi/fifo/handle_linux.go docker/vendor/src/github.com/tonistiigi/fifo/handle_linux.go
--- docker.orig/vendor/src/github.com/tonistiigi/fifo/handle_linux.go 2017-09-20 21:29:26.000000000 +0800
+++ docker/vendor/src/github.com/tonistiigi/fifo/handle_linux.go 2017-11-24 14:25:52.777741009 +0800
@@ -36,7 +36,7 @@
h := &handle{
f: f,
name: fn,
- dev: stat.Dev,
+ dev: uint64(stat.Dev),
ino: stat.Ino,
}
@@ -62,7 +62,7 @@
if err := syscall.Stat(h.procPath(), &stat); err != nil {
return "", errors.Wrapf(err, "path %v could not be statted", h.procPath())
}
- if stat.Dev != h.dev || stat.Ino != h.ino {
+ if uint64(stat.Dev) != h.dev || stat.Ino != h.ino {
return "", errors.Errorf("failed to verify handle %v/%v %v/%v", stat.Dev, h.dev, stat.Ino, h.ino)
}
return h.procPath(), nil
diff -Nur docker.orig/vendor/src/github.com/vishvananda/netns/netns_linux_mips64le.go docker/vendor/src/github.com/vishvananda/netns/netns_linux_mips64le.go
--- docker.orig/vendor/src/github.com/vishvananda/netns/netns_linux_mips64le.go 1970-01-01 08:00:00.000000000 +0800
+++ docker/vendor/src/github.com/vishvananda/netns/netns_linux_mips64le.go 2017-11-24 15:54:50.487542244 +0800
@@ -0,0 +1,7 @@
+// +build linux,mips64le
+
+package netns
+
+const (
+ SYS_SETNS = 5303
+)
docker-1.12.6-support_loongson.patch
标签:loongson mips64 docker patch rpmbuild
原文地址:http://blog.51cto.com/zhiyuandai/2043963