Hi ports, Claudio,
I noticed my for some time already that my -current node_exporters were
returning no data for node_filesystem_* metrics. There has been a PR [0]
that updates x/sys dep to a version that doesn't issue direct syscalls.
I backported it, given that node_exporter releases are quite sporadic.
I think it's one of my first times working with a Go port, and I'm not
super about sure what I did. Even with the patched go.mod, I couldn't
make modgo-gen-modules include x/sys v0.15.0 in the output. I don't know
if there is a better approach.
arm64 is happy, IBT amd64 is happy, non-IBT amd64 is happy.
Lucas
[0]: https://github.com/prometheus/node_exporter/pull/2863
diff /usr/ports
commit - a3b92e22af6789ff442dcf57773c1bb5b261ba96
path + /usr/ports
blob - f2926a220810d15825049f192edcb3cb44016426
file + sysutils/node_exporter/Makefile
--- sysutils/node_exporter/Makefile
+++ sysutils/node_exporter/Makefile
@@ -2,6 +2,7 @@ COMMENT = prometheus exporter for hardware and OS met
MODGO_MODNAME = github.com/prometheus/node_exporter
MODGO_VERSION = v1.7.0
+REVISION = 0
DISTNAME = node_exporter-${MODGO_VERSION}
@@ -32,5 +33,6 @@ do-install:
${INSTALL_DATA} ${WRKSRC}/NOTICE ${PREFIX}/share/doc/node_exporter/
.include "modules.inc"
+MODGO_MODULES += golang.org/x/sys v0.15.0
.include <bsd.port.mk>
blob - 1d1fa1ecd4108e9f29cf31c867727c30d30d7ee1
file + sysutils/node_exporter/distinfo
--- sysutils/node_exporter/distinfo
+++ sysutils/node_exporter/distinfo
@@ -188,6 +188,8 @@ SHA256 (go_modules/golang.org/x/sys/@v/v0.11.0.mod) =
SHA256 (go_modules/golang.org/x/sys/@v/v0.12.0.mod) = 8DMzMJb+GY8xUd7tk/LeunTlC7/nc5E0BFvDt85KUCQ=
SHA256 (go_modules/golang.org/x/sys/@v/v0.13.0.mod) = 8DMzMJb+GY8xUd7tk/LeunTlC7/nc5E0BFvDt85KUCQ=
SHA256 (go_modules/golang.org/x/sys/@v/v0.13.0.zip) = PRSa/Jk5mANUN0wNR0Ydzb0dOYDrL3fmAwSyP+5vPTc=
+SHA256 (go_modules/golang.org/x/sys/@v/v0.15.0.mod) = 0iezJfYh9OvijTm6dz6pm4cPOTt8CcNFksNlsW3VYN4=
+SHA256 (go_modules/golang.org/x/sys/@v/v0.15.0.zip) = hhLrQWxznDsEzkjcvmVjLG+8QnAx/Zgcrs7sZBDR4fw=
SHA256 (go_modules/golang.org/x/sys/@v/v0.2.0.mod) = 8DMzMJb+GY8xUd7tk/LeunTlC7/nc5E0BFvDt85KUCQ=
SHA256 (go_modules/golang.org/x/sys/@v/v0.5.0.mod) = 8DMzMJb+GY8xUd7tk/LeunTlC7/nc5E0BFvDt85KUCQ=
SHA256 (go_modules/golang.org/x/sys/@v/v0.6.0.mod) = 8DMzMJb+GY8xUd7tk/LeunTlC7/nc5E0BFvDt85KUCQ=
@@ -430,6 +432,8 @@ SIZE (go_modules/golang.org/x/sys/@v/v0.11.0.mod) = 33
SIZE (go_modules/golang.org/x/sys/@v/v0.12.0.mod) = 33
SIZE (go_modules/golang.org/x/sys/@v/v0.13.0.mod) = 33
SIZE (go_modules/golang.org/x/sys/@v/v0.13.0.zip) = 1901653
+SIZE (go_modules/golang.org/x/sys/@v/v0.15.0.mod) = 33
+SIZE (go_modules/golang.org/x/sys/@v/v0.15.0.zip) = 1901954
SIZE (go_modules/golang.org/x/sys/@v/v0.2.0.mod) = 33
SIZE (go_modules/golang.org/x/sys/@v/v0.5.0.mod) = 33
SIZE (go_modules/golang.org/x/sys/@v/v0.6.0.mod) = 33
blob - /dev/null
file + sysutils/node_exporter/patches/patch-go_mod (mode 644)
--- /dev/null
+++ sysutils/node_exporter/patches/patch-go_mod
@@ -0,0 +1,15 @@
+Update golang.org/x/sys to v0.15.0
+https://github.com/prometheus/node_exporter/pull/2863
+
+Index: go.mod
+--- go.mod.orig
++++ go.mod
+@@ -29,7 +29,7 @@ require (
+ github.com/prometheus/procfs v0.12.0
+ github.com/safchain/ethtool v0.3.0
+ golang.org/x/exp v0.0.0-20230522175609-2e198f4a06a1
+- golang.org/x/sys v0.13.0
++ golang.org/x/sys v0.15.0
+ howett.net/plist v1.0.0
+ )
+
blob - /dev/null
file + sysutils/node_exporter/patches/patch-go_sum (mode 644)
--- /dev/null
+++ sysutils/node_exporter/patches/patch-go_sum
@@ -0,0 +1,17 @@
+Update golang.org/x/sys to v0.15.0
+https://github.com/prometheus/node_exporter/pull/2863
+
+Index: go.sum
+--- go.sum.orig
++++ go.sum
+@@ -142,8 +142,8 @@ golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5
+ golang.org/x/sys v0.8.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
+ golang.org/x/sys v0.9.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
+ golang.org/x/sys v0.10.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
+-golang.org/x/sys v0.13.0 h1:Af8nKPmuFypiUBjVoU9V20FiaFXOcuZI21p0ycVYYGE=
+-golang.org/x/sys v0.13.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
++golang.org/x/sys v0.15.0 h1:h48lPFYpsTvQJZF4EKyI4aLHaev3CxivZmv7yZig9pc=
++golang.org/x/sys v0.15.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
+ golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
+ golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8=
+ golang.org/x/term v0.5.0/go.mod h1:jMB1sMXY+tzblOD4FWmEbocvup2/aLOaQEp7JmGp78k=
No comments:
Post a Comment