Created attachment 255171 [details] patch - update to 0.26.0 (new upstream release) - add new port sysutils/snmp_exporter20 containing the previous version (0.20.0), for users who want to continue using their existing configuration. - add a pkg-message and UPDATING entry to document the breaking change and the new port - while here, switch from GH_TUPLE to go:modules. NB, i added the existing maintainer as maintainer for the new port. i would be willing to maintain both ports, but i do not want to maintain snmp_exporter20 only since i don't use it (but i did test it). tested on FreeBSD 15.0/arm64.
Maintainer Timeout.
Changes like - content, err := ioutil.ReadFile("generator.yml") + content, err := ioutil.ReadFile("/usr/local/etc/snmp_exporter/generator.yml") look suspicious. I don't think our port should diverge from what the upstream does. And the "/usr/local" can't be hardcoded into patches too.
it's technically not hardcoded into the patch as the Makefile replaces it with ${LOCALBASE} later. but i didn't add this, it was already part of the port. do you want me to refactor it to remove this? (i suppose this will require providing these paths in the rc.d script instead.)
Since the upstream uses relative paths, the software is expected to be run in a specific working dir. In this case it is the rc.d script's responsibility to cd into a correct directory. Patching in absolute paths will also prevent an user from running the program manually in his own working dir. So yes, if I'm not missing something, then the paths patch should be removed and rc.d script should be taught to change the dir instead.
Any progress?
i'm hoping to have a new patch this week, my spare time has been taken by other things recently, sorry!
Created attachment 258056 [details] patch new patch: - update to 0.28.0 - remove the local patch to generator/main.go - fix developer warning in Makefile (GH_PROJECT) - document two more breaking changes in upstream, and the removal of the local generator patch i haven't removed the generator patch from sysutils/snmp_exporter20 because the purpose of that port is to avoid breaking changes.
(In reply to Lexi Winter from comment #7) Thank you for the update. Would you like to take up maintainership over this port?
as there's been no update from the current maintainer and i use this port extensively, i would be happy to take over maintainership.
A commit in branch main references this bug: URL: https://cgit.FreeBSD.org/ports/commit/?id=acc7dc88f94413568e8feba7e03db323a28b69dd commit acc7dc88f94413568e8feba7e03db323a28b69dd Author: Lexi Winter <lexi@hemlock.eden.le-fay.org> AuthorDate: 2024-11-14 14:15:44 +0000 Commit: Robert Clausecker <fuz@FreeBSD.org> CommitDate: 2025-03-16 10:19:27 +0000 sysutils/snmp_exporter: update to 0.28.0 Assign maintainership to submitter. changes since the previous port version (0.20.0) are too numerous to list here but can be found at the GitHub releases page: https://github.com/prometheus/snmp_exporter/releases this release introduces a breaking change in the configuration file format. to address this: - add a new pkg-message that explains the situation on upgrade. - add an UPDATING entry to warn ports users about the change. - add a new port called 'sysutils/snmp_exporter20' containing the old 0.20.0 version; users who don't want to immediately update their configuration can instead switch to this new port to continue using the old version. PR: 282759 Approved by: fabian.freyer@physik.tu-berlin.de (maintainer timeout) UPDATING | 30 +++++++++++ sysutils/snmp_exporter/Makefile | 37 ++------------ sysutils/snmp_exporter/distinfo | 56 ++------------------ sysutils/snmp_exporter/files/pkg-message.in | 39 ++++++++++++++ sysutils/snmp_exporter20/Makefile (new) | 59 ++++++++++++++++++++++ sysutils/snmp_exporter20/distinfo (new) | 51 +++++++++++++++++++ sysutils/snmp_exporter20/files/generator.yml (new) | 23 +++++++++ .../files/patch-generator_main.go | 0 .../snmp_exporter20/files/pkg-message.in (new) | 13 +++++ .../snmp_exporter20/files/snmp_exporter.in (new) | 57 +++++++++++++++++++++ sysutils/snmp_exporter20/pkg-descr (new) | 3 ++ sysutils/snmp_exporter20/pkg-plist (new) | 3 ++ 12 files changed, 286 insertions(+), 85 deletions(-)
Thank you for your contribution. Sorry for the slow commit.