Created attachment 237773 [details] Patch file to add port Patch to add a port for https://github.com/DRuggeri/nut_exporter which is a Prometheus (net-mgmt/prometheus2) exporter for the "Network UPS tools" (sysutils/nut).
(In reply to bsd from comment #0) Thanks for porting this. If possible, please set your name in https://bugs.freebsd.org/bugzilla/userprefs.cgi?tab=account so we can use it in `git commit --author`
Done :-)
Created attachment 238879 [details] Patch to add sysutils/nut_exporter Update patch for 2.5.0 release.
Port builds fine with poudriere stage-qa on aarch64/13.1. Portlint gives some warnings. I will fix these. [root@jail13 /usr/ports/sysutils/nut_exporter]# UNAME_r=13.1 portlint WARN: /usr/ports/sysutils/nut_exporter/pkg-descr: contains less than 2 lines, make it longer if possible.(currently 1 line) WARN: /usr/ports/sysutils/nut_exporter/pkg-descr: includes lines that exceed 80 characters. WARN: Makefile: [17]: use tab (not space) to make indentation WARN: Makefile: [18]: use tab (not space) to make indentation WARN: Makefile: [19]: use tab (not space) to make indentation WARN: Makefile: [20]: use tab (not space) to make indentation WARN: Makefile: [21]: use tab (not space) to make indentation WARN: Makefile: [22]: use tab (not space) to make indentation WARN: Makefile: [23]: use tab (not space) to make indentation WARN: Makefile: [24]: use tab (not space) to make indentation WARN: Makefile: [25]: use tab (not space) to make indentation WARN: Makefile: [26]: use tab (not space) to make indentation WARN: Makefile: [27]: use tab (not space) to make indentation WARN: Makefile: [28]: use tab (not space) to make indentation WARN: Makefile: [29]: use tab (not space) to make indentation WARN: Makefile: [30]: use tab (not space) to make indentation WARN: Makefile: [31]: use tab (not space) to make indentation WARN: Makefile: [32]: use tab (not space) to make indentation WARN: Makefile: [33]: use tab (not space) to make indentation WARN: Makefile: COMMENT is not supposed to begin with 'A ', 'An ', or 'The '. 0 fatal errors and 20 warnings found.
PORTVERSION --> DISTVERSION DISTVERSIONPREFIX should be defined befoe DISTVERSION (we need to update example in Porters Handbook) It's not possible to use GO_MODULE ? https://docs.freebsd.org/en/books/porters-handbook/book/#using-go Best regards, Daniel
With the disclaimer that I know next-to-nothing about go's open-source packaging infrastructure ... When I made the patch, I did search for a go module, but I could only find a very old version: https://pkg.go.dev/github.com/DRuggeri/nut_exporter . If I try to use GO_MODULE I get an error: => Attempting to fetch https://proxy.golang.org/github.com/!d!ruggeri/nut_exporter/@v/v2.5.0.mod fetch: https://proxy.golang.org/github.com/!d!ruggeri/nut_exporter/@v/v2.5.0.mod: Not Found
A commit in branch main references this bug: URL: https://cgit.FreeBSD.org/ports/commit/?id=f9b0b82aa7592800fed91b535cab58c02f911316 commit f9b0b82aa7592800fed91b535cab58c02f911316 Author: Jony Hudson <jonyepsilon@google.com> AuthorDate: 2022-12-27 14:16:26 +0000 Commit: Ronald Klop <ronald@FreeBSD.org> CommitDate: 2022-12-28 16:31:05 +0000 sysutils/nut_exporter: new port Add a port for https://github.com/DRuggeri/nut_exporter which is a Prometheus (net-mgmt/prometheus2) exporter for the "Network UPS tools" (sysutils/nut). PR: 267485 Approved by: pkubaj (mentor) Differential Revision: https://reviews.freebsd.org/D37883 sysutils/Makefile | 1 + sysutils/nut_exporter/Makefile (new) | 38 ++++++++++++ sysutils/nut_exporter/distinfo (new) | 37 ++++++++++++ sysutils/nut_exporter/files/nut_exporter.in (new) | 73 +++++++++++++++++++++++ sysutils/nut_exporter/pkg-descr (new) | 4 ++ 5 files changed, 153 insertions(+)
Committed. Thanks for the patches and testing.