aboutsummaryrefslogtreecommitdiffstats
path: root/sysutils/beats
diff options
context:
space:
mode:
authorgirgen <girgen@FreeBSD.org>2017-12-28 19:24:48 +0800
committergirgen <girgen@FreeBSD.org>2017-12-28 19:24:48 +0800
commit637f190138818e49d3266a305fa6ed1875cb2c7a (patch)
tree62cc6cf4ceea459173ef3d5c8faedbfccd032fcb /sysutils/beats
parentbca5047fd7c438ecf1ed067ce203e7dbc85b2489 (diff)
downloadfreebsd-ports-gnome-637f190138818e49d3266a305fa6ed1875cb2c7a.tar.gz
freebsd-ports-gnome-637f190138818e49d3266a305fa6ed1875cb2c7a.tar.zst
freebsd-ports-gnome-637f190138818e49d3266a305fa6ed1875cb2c7a.zip
Better fix for gosigar
WWW: https://github.com/elastic/gosigar/issues/89
Diffstat (limited to 'sysutils/beats')
-rw-r--r--sysutils/beats/Makefile1
-rw-r--r--sysutils/beats/files/patch-gosigar_freebsd.go26
-rw-r--r--sysutils/beats/files/patch-gosigar_linux_common.go18
3 files changed, 27 insertions, 18 deletions
diff --git a/sysutils/beats/Makefile b/sysutils/beats/Makefile
index 37acf52f8d62..1ba1bb4f9423 100644
--- a/sysutils/beats/Makefile
+++ b/sysutils/beats/Makefile
@@ -3,6 +3,7 @@
PORTNAME= beats
PORTVERSION= 6.1.1
+PORTREVISION= 1
DISTVERSIONPREFIX=v
CATEGORIES= sysutils
diff --git a/sysutils/beats/files/patch-gosigar_freebsd.go b/sysutils/beats/files/patch-gosigar_freebsd.go
new file mode 100644
index 000000000000..d6669ba813b0
--- /dev/null
+++ b/sysutils/beats/files/patch-gosigar_freebsd.go
@@ -0,0 +1,26 @@
+commit 988370a873665ea56d5cf1c287c7274f88c429a3
+Author: Palle Girgensohn <girgen@pingpong.net>
+Date: Thu Dec 28 11:55:29 2017 +0100
+
+ Use the common version of Get(pid)
+
+diff --git a/sigar_freebsd.go b/sigar_freebsd.go
+index 0a31d08..602b4a0 100644
+--- a/sigar_freebsd.go
++++ vendor/github.com/elastic/gosigar/sigar_freebsd.go
+@@ -4,7 +4,6 @@ package gosigar
+
+ import (
+ "io/ioutil"
+- "runtime"
+ "strconv"
+ "strings"
+ "unsafe"
+@@ -107,7 +106,3 @@ func parseCpuStat(self *Cpu, line string) error {
+ self.Idle, _ = strtoull(fields[4])
+ return nil
+ }
+-
+-func (self *ProcTime) Get(pid int) error {
+- return ErrNotImplemented{runtime.GOOS}
+-}
diff --git a/sysutils/beats/files/patch-gosigar_linux_common.go b/sysutils/beats/files/patch-gosigar_linux_common.go
deleted file mode 100644
index 459cbe05cbff..000000000000
--- a/sysutils/beats/files/patch-gosigar_linux_common.go
+++ /dev/null
@@ -1,18 +0,0 @@
---- vendor/github.com/elastic/gosigar/sigar_linux_common.go.orig 2017-12-21 14:43:33.660692000 +0100
-+++ vendor/github.com/elastic/gosigar/sigar_linux_common.go 2017-12-21 14:44:02.666180000 +0100
-@@ -274,6 +274,7 @@
- return nil
- }
-
-+/*
- func (self *ProcTime) Get(pid int) error {
- contents, err := readProcFile(pid, "stat")
- if err != nil {
-@@ -297,6 +298,7 @@
-
- return nil
- }
-+*/
-
- func (self *ProcArgs) Get(pid int) error {
- contents, err := readProcFile(pid, "cmdline")