From 183e3475064459fb10820b1c356875244fbc3f8a Mon Sep 17 00:00:00 2001 From: Kefu Chai Date: Sat, 16 Jul 2022 11:34:40 +0800 Subject: [PATCH] ceph.spec.in: correct "%files mib" section * 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 --- ceph.spec.in | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/ceph.spec.in b/ceph.spec.in index becee7bb7485f..52a83cf6ceaf8 100644 --- a/ceph.spec.in +++ b/ceph.spec.in @@ -1501,7 +1501,7 @@ mkdir -p %{buildroot}%{_localstatedir}/lib/ceph/bootstrap-rbd-mirror 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 @@ -2583,7 +2583,6 @@ exit 0 %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 -- 2.39.5