aboutsummaryrefslogtreecommitdiff
path: root/sysutils/nomad
diff options
context:
space:
mode:
authorJohn Hixson <jhixson@FreeBSD.org>2020-07-24 18:51:14 +0000
committerJohn Hixson <jhixson@FreeBSD.org>2020-07-24 18:51:14 +0000
commitbb233723118cf56ec454f3fdb0f46521d503d6a9 (patch)
tree3f55655bddc5042f9991e643646d53bca77e36ab /sysutils/nomad
parent4b19dcf6745cd95a262939b156e0e90929a3885b (diff)
downloadports-bb233723118cf56ec454f3fdb0f46521d503d6a9.tar.gz
ports-bb233723118cf56ec454f3fdb0f46521d503d6a9.zip
Notes
Diffstat (limited to 'sysutils/nomad')
-rw-r--r--sysutils/nomad/Makefile2
-rw-r--r--sysutils/nomad/distinfo6
-rw-r--r--sysutils/nomad/files/patch-command_agent_host_freebsd.go53
-rw-r--r--sysutils/nomad/files/patch-command_agent_host_unix.go9
-rw-r--r--sysutils/nomad/files/patch-vendor_github.com_docker_docker_pkg_mount_mountinfo__freebsd.go11
5 files changed, 66 insertions, 15 deletions
diff --git a/sysutils/nomad/Makefile b/sysutils/nomad/Makefile
index 2967e52f4c60..82e9bcade666 100644
--- a/sysutils/nomad/Makefile
+++ b/sysutils/nomad/Makefile
@@ -2,7 +2,7 @@
PORTNAME= nomad
DISTVERSIONPREFIX= v
-DISTVERSION= 0.11.3
+DISTVERSION= 0.12.1
CATEGORIES= sysutils
MAINTAINER= jhixson@FreeBSD.org
diff --git a/sysutils/nomad/distinfo b/sysutils/nomad/distinfo
index b6371ba0411b..9caa4461e2d1 100644
--- a/sysutils/nomad/distinfo
+++ b/sysutils/nomad/distinfo
@@ -1,3 +1,3 @@
-TIMESTAMP = 1591646478
-SHA256 (hashicorp-nomad-v0.11.3_GH0.tar.gz) = 4ac797fd87a9e24a99e45a5dae91dd1064ab90a9da180ee2d0914a6ded4d3272
-SIZE (hashicorp-nomad-v0.11.3_GH0.tar.gz) = 53230128
+TIMESTAMP = 1595616407
+SHA256 (hashicorp-nomad-v0.12.1_GH0.tar.gz) = 02f7b2319d5ab7bab644f51de1c248e534498aefe50bf26291a888a99d993359
+SIZE (hashicorp-nomad-v0.12.1_GH0.tar.gz) = 51227967
diff --git a/sysutils/nomad/files/patch-command_agent_host_freebsd.go b/sysutils/nomad/files/patch-command_agent_host_freebsd.go
new file mode 100644
index 000000000000..c01701479b37
--- /dev/null
+++ b/sysutils/nomad/files/patch-command_agent_host_freebsd.go
@@ -0,0 +1,53 @@
+--- command/agent/host/freebsd.go.orig 2020-07-24 18:38:57 UTC
++++ command/agent/host/freebsd.go
+@@ -0,0 +1,50 @@
++// +build freebsd
++
++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.Mntonname[:]))
++ }
++
++ return paths
++}
diff --git a/sysutils/nomad/files/patch-command_agent_host_unix.go b/sysutils/nomad/files/patch-command_agent_host_unix.go
new file mode 100644
index 000000000000..d03910dbb50b
--- /dev/null
+++ b/sysutils/nomad/files/patch-command_agent_host_unix.go
@@ -0,0 +1,9 @@
+--- command/agent/host/unix.go.orig 2020-07-08 22:29:33 UTC
++++ command/agent/host/unix.go
+@@ -64,5 +64,5 @@ func (d *df) total() uint64 {
+ }
+
+ func (d *df) available() uint64 {
+- return d.s.Bavail * uint64(d.s.Bsize)
++ return uint64(d.s.Bavail) * uint64(d.s.Bsize)
+ }
diff --git a/sysutils/nomad/files/patch-vendor_github.com_docker_docker_pkg_mount_mountinfo__freebsd.go b/sysutils/nomad/files/patch-vendor_github.com_docker_docker_pkg_mount_mountinfo__freebsd.go
deleted file mode 100644
index 749f5a041073..000000000000
--- a/sysutils/nomad/files/patch-vendor_github.com_docker_docker_pkg_mount_mountinfo__freebsd.go
+++ /dev/null
@@ -1,11 +0,0 @@
---- vendor/github.com/docker/docker/pkg/mount/mountinfo_freebsd.go.orig 2019-04-09 15:51:37 UTC
-+++ vendor/github.com/docker/docker/pkg/mount/mountinfo_freebsd.go
-@@ -37,7 +37,7 @@ func parseMountTable(filter FilterFunc) ([]*Info, erro
-
- if filter != nil {
- // filter out entries we're not interested in
-- skip, stop = filter(p)
-+ //skip, stop = filter(p)
- if skip {
- continue
- }