integ/base/net-snmp/centos/meta_patches/snmp-spec-add-snmp-config.p...

42 lines
1.3 KiB
Diff

From 5204f1aaeb0a71eba1cacd16fdf716b3d01c0985 Mon Sep 17 00:00:00 2001
From: Scott Little <scott.little@windriver.com>
Date: Mon, 2 Oct 2017 17:05:59 -0400
Subject: [PATCH 9/9] WRS: snmp-spec-add-snmp-config.patch
---
SPECS/net-snmp.spec | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/SPECS/net-snmp.spec b/SPECS/net-snmp.spec
index b015436..6fc0da2 100644
--- a/SPECS/net-snmp.spec
+++ b/SPECS/net-snmp.spec
@@ -42,6 +42,7 @@ Source11: snmptrapd.service
# WRS
Source12: snmpd.conf.cgcs
Source13: snmpd.cgcs
+Source14: snmp.conf.cgcs
Patch1: net-snmp-5.7.2-pie.patch
Patch2: net-snmp-5.5-dir-fix.patch
@@ -433,6 +434,8 @@ chmod 660 ${RPM_BUILD_ROOT}%{_sysconfdir}/snmp/*
mkdir -p ${RPM_BUILD_ROOT}%{_sysconfdir}/rc.d/init.d
install -m 755 %SOURCE13 ${RPM_BUILD_ROOT}%{_sysconfdir}/rc.d/init.d/snmpd
+install -m 660 %SOURCE14 ${RPM_BUILD_ROOT}%{_datadir}/snmp/snmp.conf
+
install -d ${RPM_BUILD_ROOT}%{_initrddir}
install -m 755 %SOURCE3 ${RPM_BUILD_ROOT}%{_initrddir}/snmptrapd
@@ -567,6 +570,7 @@ rm -rf ${RPM_BUILD_ROOT}
%attr(0644,root,root) %{_mandir}/man1/net-snmp-create-v3-user*
%attr(0644,root,root) %{_mandir}/man1/snmpconf.1.gz
%dir %{_datadir}/snmp
+%config(noreplace) %attr(0660,snmpd,snmpd) %{_datadir}/snmp/snmp.conf
%{_datadir}/snmp/snmpconf-data
%dir %{_localstatedir}/run/net-snmp
%{_prefix}/lib/tmpfiles.d/net-snmp.conf
--
2.7.4