Created attachment 223408 [details] sysutils/node_exporter: Update to v1.1.2 This patch updates node_exporter to v1.1.2, which includes minor fixes since the v1.1.0 release. A full changelog is available at: https://github.com/prometheus/node_exporter/releases/tag/v1.1.2 -David
Build and package info is available at https://gitlab.com/swills/freebsd-ports/pipelines/272939064
Hi David, Thanks for your patch (also for net-mgmt/prometheus2)! The build on Poudriere is fine. But when I run 'make test' outside of Poudriere on a real life box, I get: #make test ===> Testing for node_exporter-1.1.2 ===> node_exporter-1.1.2 depends on executable: promtool - found ===> node_exporter-1.1.2 depends on executable: bash - found ===> node_exporter-1.1.2 depends on executable: gsed - found /bin/rm -f /poudriere/ports/default/sysutils/node_exporter/work/node_exporter-1.1.2/go.mod /usr/bin/env WRKSRC=/poudriere/ports/default/sysutils/node_exporter/work/node_exporter-1.1.2 REWARNFILE=/poudriere/ports/default/sysutils/node_exporter/work/reinplace_warnings.txt /poudriere/ports/default/Mk/Scripts/sed_checked.sh -e 's|sed|/usr/local/bin/gsed|g' /poudriere/ports/default/sysutils/node_exporter/work/node_exporter-1.1.2/ttar /bin/rm -f -r /poudriere/ports/default/sysutils/node_exporter/work/src /bin/ln -sf /poudriere/ports/default/sysutils/node_exporter/work/node_exporter-1.1.2/vendor /poudriere/ports/default/sysutils/node_exporter/work/src /bin/mkdir -p /poudriere/ports/default/sysutils/node_exporter/work/node_exporter-1.1.2/vendor/github.com/prometheus/node_exporter /bin/ln -sf /poudriere/ports/default/sysutils/node_exporter/work/node_exporter-1.1.2/collector /poudriere/ports/default/sysutils/node_exporter/work/node_exporter-1.1.2/vendor/github.com/prometheus/node_exporter/collector /usr/bin/env WRKSRC=/poudriere/ports/default/sysutils/node_exporter/work/node_exporter-1.1.2 REWARNFILE=/poudriere/ports/default/sysutils/node_exporter/work/reinplace_warnings.txt /poudriere/ports/default/Mk/Scripts/sed_checked.sh -E 's|(\$\(GO\) test)|env GOPATH="/poudriere/ports/default/sysutils/node_exporter/work" \1 -v|g' /poudriere/ports/default/sysutils/node_exporter/work/node_exporter-1.1.2/Makefile (cd /poudriere/ports/default/sysutils/node_exporter/work/node_exporter-1.1.2; for t in ./...; do echo "===> Testing ${t}"; /usr/bin/env XDG_DATA_HOME=/poudriere/ports/default/sysutils/node_exporter/work XDG_CONFIG_HOME=/poudriere/ports/default/sysutils/node_exporter/work HOME=/poudriere/ports/default/sysutils/node_exporter/work PATH=/poudriere/ports/default/sysutils/node_exporter/work/.bin:/sbin:/bin:/usr/sbin:/usr/local/kde4/bin:/usr/local/kde4/share:/usr/local/bin:/usr/local/sbin:/usr/bin NO_PIE=yes MK_DEBUG_FILES=no MK_KERNEL_SYMBOLS=no SHELL=/bin/sh NO_LINT=YES PREFIX=/usr/local LOCALBASE=/usr/local CC="cc" CFLAGS="-O2 -pipe -fstack-protector-strong -fno-strict-aliasing " CPP="cpp" CPPFLAGS="" LDFLAGS=" -fstack-protector-strong " LIBS="" CXX="c++" CXXFLAGS="-O2 -pipe -fstack-protector-strong -fno-strict-aliasing " MANPREFIX="/usr/local" BSD_INSTALL_PROGRAM="install -s -m 555" BSD_INSTALL_LIB="install -s -m 0644" BSD_INSTALL_SCRIPT="install -m 555" BSD_INSTALL_DATA="install -m 0644" BSD_INSTALL_MAN="install -m 444" CGO_ENABLED=1 CGO_CFLAGS="-I/usr/local/include" CGO_LDFLAGS="-L/usr/local/lib" GOARM= GOPATH="/poudriere/ports/default/distfiles/go/sysutils_node_exporter" GOBIN="/poudriere/ports/default/sysutils/node_exporter/work/bin" GO111MODULE=on GOFLAGS=-modcacherw GOSUMDB=sum.golang.org GO_NO_VENDOR_CHECKS=1 GOPROXY=off /usr/local/bin/go test -v -mod=vendor ${t}; done) ===> Testing ./... go: go.mod file not found in current directory or any parent directory; see 'go help modules' *** Error code 1 Stop. make: stopped in /poudriere/ports/default/sysutils/node_exporter Does this also happen on your boxes? Is there something missing (g.mod?) on my side? Thanks for any hint or clarification.
Honestly, I don't really know anything about that pre-test target. It was added by a committer a while back. I ran it once after it was added, but at some point it asked for `sudo` to install something for some reason, which I'm uncomfortable with so aborted. I don't know why it would install anything (or the port itself) just to run some tests. As far as I can tell, it isn't documented in the porters handbook either. I'd be happy to just tear it out since I didn't add it, can't really maintain it due to lack of documentation, and don't know what it's doing. -David
(In reply to David O'Rourke from comment #3) I already figured that ;) From my point of view it would also be better if the port contains only working targets. Besides, the maintainer decides how the port is developed further ... And if the pre-test target would be needed again one day, the code can be reconstructed via the history.
Hi David, Since I don't know if we are waiting for each other to see what happens next, I will now make the following suggestion: Are you okay if I remove the test target completely, try Poudriere again and then commit? Thank you very much for a short feedback.
Hi, Sorry for the lack of a response here, it was a busy week and I forgot about this so thanks for the prodding. > Are you okay if I remove the test target completely, try Poudriere again and then commit? That sounds fine, I'd be happy for you to remove that target :) Thanks, -David
A commit references this bug: Author: rhurlin Date: Mon Mar 29 06:13:50 UTC 2021 New revision: 569430 URL: https://svnweb.freebsd.org/changeset/ports/569430 Log: sysutils/node_exporter: Update to v1.1.2 Removed nonfunctional test target from port for now. Changelog: https://github.com/prometheus/node_exporter/releases/tag/v1.1.2 PR: 254393 Submitted by: David O'Rourke <dor.bsd@xm0.uk> (maintainer) Changes: head/sysutils/node_exporter/Makefile head/sysutils/node_exporter/Makefile.modules head/sysutils/node_exporter/distinfo
Committed, thanks! As agreed, I have removed everything belonging to the non-functioning test target.