Update to nomad-0.12.3.
This commit is contained in:
parent
bb956ed931
commit
36602dfd65
@ -1,11 +1,11 @@
|
||||
# $OpenBSD: Makefile,v 1.19 2020/06/06 10:52:57 ajacoutot Exp $
|
||||
# $OpenBSD: Makefile,v 1.20 2020/08/19 13:22:27 ajacoutot Exp $
|
||||
|
||||
# bunch of undefined things in crypto/blake2b, shirou/gopsutil/disk, shirou/gopsutil/mem
|
||||
NOT_FOR_ARCHS= i386
|
||||
|
||||
COMMENT= cluster scheduler
|
||||
|
||||
GH_TAGNAME= v0.11.3
|
||||
GH_TAGNAME= v0.12.3
|
||||
GH_ACCOUNT= hashicorp
|
||||
GH_PROJECT= nomad
|
||||
|
||||
|
@ -1,2 +1,2 @@
|
||||
SHA256 (nomad-0.11.3.tar.gz) = SseX/Yep4kqZ5FpdrpHdEGSrkKnaGA7i0JFKbe1NMnI=
|
||||
SIZE (nomad-0.11.3.tar.gz) = 53230128
|
||||
SHA256 (nomad-0.12.3.tar.gz) = DJ+Nls72oyxj4XTHSPFtZIyfwfvqYuZhQJN/+sToMT4=
|
||||
SIZE (nomad-0.12.3.tar.gz) = 51432205
|
||||
|
56
sysutils/nomad/patches/patch-command_agent_host_openbsd_go
Normal file
56
sysutils/nomad/patches/patch-command_agent_host_openbsd_go
Normal file
@ -0,0 +1,56 @@
|
||||
$OpenBSD: patch-command_agent_host_openbsd_go,v 1.1 2020/08/19 13:22:27 ajacoutot Exp $
|
||||
|
||||
Index: command/agent/host/openbsd.go
|
||||
--- command/agent/host/openbsd.go.orig
|
||||
+++ command/agent/host/openbsd.go
|
||||
@@ -0,0 +1,50 @@
|
||||
+// +build openbsd
|
||||
+
|
||||
+package host
|
||||
+
|
||||
+import (
|
||||
+ "syscall"
|
||||
+)
|
||||
+
|
||||
+func IntToString(orig []int8) string {
|
||||
+ ret := make([]byte, len(orig))
|
||||
+ size := -1
|
||||
+ for i, o := range orig {
|
||||
+ if o == 0 {
|
||||
+ size = i
|
||||
+ break
|
||||
+ }
|
||||
+ ret[i] = byte(o)
|
||||
+ }
|
||||
+ if size == -1 {
|
||||
+ size = len(orig)
|
||||
+ }
|
||||
+
|
||||
+ return string(ret[0:size])
|
||||
+}
|
||||
+
|
||||
+// mountedPaths produces a list of mounts
|
||||
+func mountedPaths() []string {
|
||||
+ var paths []string
|
||||
+
|
||||
+ n, err := syscall.Getfsstat(nil, 1)
|
||||
+ if err != nil {
|
||||
+ return []string{err.Error()}
|
||||
+ }
|
||||
+
|
||||
+ data := make([]syscall.Statfs_t, n)
|
||||
+ _, err = syscall.Getfsstat(data, 1)
|
||||
+ if err != nil {
|
||||
+ return []string{err.Error()}
|
||||
+ }
|
||||
+
|
||||
+ empty := syscall.Statfs_t{}
|
||||
+ for _, stat := range data {
|
||||
+ if stat == empty {
|
||||
+ return []string{"empy stat struct returned"}
|
||||
+ }
|
||||
+ paths = append(paths, IntToString(stat.F_mntonname[:]))
|
||||
+ }
|
||||
+
|
||||
+ return paths
|
||||
+}
|
17
sysutils/nomad/patches/patch-command_agent_host_unix_go
Normal file
17
sysutils/nomad/patches/patch-command_agent_host_unix_go
Normal file
@ -0,0 +1,17 @@
|
||||
$OpenBSD: patch-command_agent_host_unix_go,v 1.1 2020/08/19 13:22:27 ajacoutot Exp $
|
||||
|
||||
Index: command/agent/host/unix.go
|
||||
--- command/agent/host/unix.go.orig
|
||||
+++ command/agent/host/unix.go
|
||||
@@ -60,9 +60,9 @@ func makeDf(path string) (*df, error) {
|
||||
}
|
||||
|
||||
func (d *df) total() uint64 {
|
||||
- return d.s.Blocks * uint64(d.s.Bsize)
|
||||
+ return d.s.F_blocks * uint64(d.s.F_bsize)
|
||||
}
|
||||
|
||||
func (d *df) available() uint64 {
|
||||
- return d.s.Bavail * uint64(d.s.Bsize)
|
||||
+ return uint64(d.s.F_bavail) * uint64(d.s.F_bsize)
|
||||
}
|
Loading…
Reference in New Issue
Block a user