]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
ceph.spec.in: correct "%files mib" section 47124/head
authorKefu Chai <tchaikov@gmail.com>
Sat, 16 Jul 2022 03:34:40 +0000 (11:34 +0800)
committerKefu Chai <tchaikov@gmail.com>
Sat, 16 Jul 2022 11:04:55 +0000 (19:04 +0800)
* 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>
ceph.spec.in

index becee7bb7485f63be031f0b6274a5e50c667903f..52a83cf6ceaf8be3777d2962535d45ba7ab390bf 100644 (file)
@@ -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