Page MenuHomeFreeBSD

sysutils/snmp_exporter: clean up Makefile and use prometheus user/group
Needs ReviewPublic

Authored by fabian.freyer_physik.tu-berlin.de on Feb 28 2018, 9:52 PM.
Tags
None
Referenced Files
Unknown Object (File)
Feb 3 2024, 9:26 AM
Unknown Object (File)
Dec 20 2023, 3:45 AM
Unknown Object (File)
Dec 10 2023, 10:46 PM
Unknown Object (File)
Dec 8 2023, 1:07 AM
Unknown Object (File)
Nov 21 2023, 3:48 AM
Unknown Object (File)
Nov 21 2023, 3:37 AM
Unknown Object (File)
Oct 21 2023, 5:19 PM
Unknown Object (File)
Sep 6 2023, 5:08 AM
Subscribers

Details

Reviewers
lwhsu
mat
Summary

following up on @mat's comments over at D14537, I also updated this port to address the same issues:

  • don't run daemons as nobody, but use prometheus user / group
  • use DISTVERSION
  • correct ordering

Diff Detail

Repository
rP FreeBSD ports repository
Lint
Lint Skipped
Unit
Tests Skipped

Event Timeline

sysutils/snmp_exporter/files/snmp_exporter.in
52–54

Mmmm, unless the pid file is removed when the daemon is stopped, it may have been created using nobody, and the daemon will not be able to write to it under the prometheus group.

sysutils/snmp_exporter/files/snmp_exporter.in
52–54

hmm, how should I fix this, add something to pkg-message?

sysutils/snmp_exporter/files/snmp_exporter.in
52–54

Why not simply remove the file here before creating it?

sysutils/snmp_exporter/files/snmp_exporter.in
52–54

As in, just ${RM} -f it, and remove the whole -e check?

sysutils/snmp_exporter/files/snmp_exporter.in
52–54

Yes, or you could add a test to check that it has the correct user, and chown or rm it if it has the wrong user. (And make a note to remove this check in like two years when you're sure that it is not needed any more.

I think this is good to go. How do you think, @mat?

BTW, @fabian.freyer_physik.tu-berlin.de , how do you think if we move this to net-mgmt to align with prometheus itself and other exporters?

@lwhsu: sorry for not answering sooner. That sounds like a good idea. What would need to be done to move this?

@lwhsu: sorry for not answering sooner. That sounds like a good idea. What would need to be done to move this?

I'll take care of it.