* create the destination directory when installing the MIBs file
* no need to set the file permission bits of a directory not owned by us
* the MIBs installed by us are not config files, and should not be
marked with `%config`, they are just immutable files not supposed to
be edited by user.
Signed-off-by: Kefu Chai <tchaikov@gmail.com>
install -m 644 -D monitoring/ceph-mixin/prometheus_alerts.yml %{buildroot}/etc/prometheus/ceph/ceph_default_alerts.yml
# SNMP MIB
-install -m 644 -D -p monitoring/snmp/CEPH-MIB.txt %{buildroot}%{_datadir}/snmp/mibs
+install -m 644 -D -t %{buildroot}%{_datadir}/snmp/mibs monitoring/snmp/CEPH-MIB.txt
%if 0%{?suse_version}
# create __pycache__ directories and their contents
%config %{_sysconfdir}/prometheus/ceph/ceph_default_alerts.yml
%files mib
-%attr(0755,root,root) %dir %{_datadir}/snmp
-%config %{_datadir}/snmp/mibs
+%{_datadir}/snmp/mibs
%changelog