https://bugzilla.redhat.com/show_bug.cgi?id=2490148



--- Comment #6 from Mikel Olasagasti Uranga <[email protected]> ---
- Using both %{buildroot} and $RPM_BUILD_ROOT

> mkdir -p $RPM_BUILD_ROOT%{_unitdir}
> install -p -m 644 %{SOURCE3} $RPM_BUILD_ROOT%{_unitdir}/

Change to %{buildroot}



With that the spec would be fine, but I've two doubts:

- Service name

Should it be `snmp_exporter.service` or `snmp-exporter.service` (upstream name
vs downstream name)?

- etc path

I'm not sure if it should be %{_sysconfdir}/prometheus/snmp_exporter/ or just
%{_sysconfdir}/snmp_exporter/


For both items node-exporter uses your approach, but honestly I'm unsure if
it's best thing to do. 

I opened https://bugzilla.redhat.com/show_bug.cgi?id=2500076 &
https://bugzilla.redhat.com/show_bug.cgi?id=2500075 to import a couple of other
exporters and I followed these rules:

- service name is equal to package name, so with "-" instead of "_"
- config file, if any, at %{_sysconfdir}/$name_exporter/
- a environment variable at %{_sysconfdir}/sysconfig/ that is set as
"EnvironmentFile=-/etc/sysconfig/blackbox-exporter" in the service file

What do you think about these changes? As I would like to import other
exporters (mysql, postgresql, ssl, ...) I'd like to have a defined common
pattern.


-- 
You are receiving this mail because:
You are always notified about changes to this product and component
You are on the CC list for the bug.
https://bugzilla.redhat.com/show_bug.cgi?id=2490148

Report this comment as SPAM: 
https://bugzilla.redhat.com/enter_bug.cgi?product=Bugzilla&format=report-spam&short_desc=Report%20of%20Bug%202490148%23c6

-- 
_______________________________________________
package-review mailing list -- [email protected]
To unsubscribe send an email to [email protected]
Fedora Code of Conduct: 
https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: 
https://lists.fedoraproject.org/archives/list/[email protected]
Do not reply to spam, report it: 
https://forge.fedoraproject.org/infra/tickets/issues/new

Reply via email to