Refactor patches for net-snmp package
Use net-snmp-config package to package script and service file for net-snmp package. Removed servcie/config/script related patches and let net-snmp-config package be responsible for it. Keep another meta patch for build configuration related changes. Deployment test and ping test between VMs pass Config,serivce and script files check pass. Story: 2003768 Task: 27586 Depends-on: https://review.openstack.org/#/c/616097 Change-Id: Ic64543447d04543fdf9eafdc3d9ae4e2521c10df Signed-off-by: zhipengl <zhipengs.liu@intel.com>
This commit is contained in:
parent
36dc17738d
commit
96ebc7d181
2
base/net-snmp-config/centos/build_srpm.data
Normal file
2
base/net-snmp-config/centos/build_srpm.data
Normal file
@ -0,0 +1,2 @@
|
||||
SRC_DIR="files"
|
||||
TIS_PATCH_VER=0
|
48
base/net-snmp-config/centos/net-snmp-config.spec
Normal file
48
base/net-snmp-config/centos/net-snmp-config.spec
Normal file
@ -0,0 +1,48 @@
|
||||
Summary: net-snmp-config
|
||||
Name: net-snmp-config
|
||||
Version: 1.0
|
||||
Release: %{tis_patch_ver}%{?_tis_dist}
|
||||
License: Apache-2.0
|
||||
Group: base
|
||||
Packager: StarlingX
|
||||
URL: unknown
|
||||
BuildArch: noarch
|
||||
Source: %name-%version.tar.gz
|
||||
|
||||
Requires: net-snmp
|
||||
Summary: package StarlingX configuration files of net-snmp to system folder.
|
||||
|
||||
%description
|
||||
package StarlingX configuration files of net-snmp to system folder.
|
||||
|
||||
%prep
|
||||
%setup
|
||||
|
||||
%build
|
||||
|
||||
%install
|
||||
%{__install} -d %{buildroot}%{_datadir}/starlingx
|
||||
%{__install} -d %{buildroot}%{_datadir}/snmp
|
||||
%{__install} -d %{buildroot}%{_initrddir}
|
||||
%{__install} -d %{buildroot}%{_sysconfdir}/systemd/system
|
||||
|
||||
%{__install} -m 644 stx.snmpd.conf %{buildroot}%{_datadir}/starlingx/stx.snmpd.conf
|
||||
%{__install} -m 755 stx.snmpd %{buildroot}%{_initddir}/snmpd
|
||||
%{__install} -m 660 stx.snmp.conf %{buildroot}%{_datadir}/snmp/snmp.conf
|
||||
%{__install} -m 644 snmpd.service %{buildroot}%{_sysconfdir}/systemd/system/snmpd.service
|
||||
|
||||
%post
|
||||
if [ $1 -eq 1 ] ; then
|
||||
# Initial installation
|
||||
cp -f %{_datadir}/starlingx/stx.snmpd.conf %{_sysconfdir}/snmp/snmpd.conf
|
||||
chmod 640 %{_sysconfdir}/snmp/snmpd.conf
|
||||
chmod 640 %{_sysconfdir}/snmp/snmptrapd.conf
|
||||
fi
|
||||
%{_bindir}/systemctl disable snmpd.service
|
||||
|
||||
%files
|
||||
%{_datadir}/starlingx/stx.snmpd.conf
|
||||
%{_initddir}/snmpd
|
||||
%config(noreplace) %attr(0660,snmpd,snmpd) %{_datadir}/snmp/snmp.conf
|
||||
%{_sysconfdir}/systemd/system/snmpd.service
|
||||
|
14
base/net-snmp-config/files/snmpd.service
Normal file
14
base/net-snmp-config/files/snmpd.service
Normal file
@ -0,0 +1,14 @@
|
||||
[Unit]
|
||||
Description=Simple Network Management Protocol (SNMP) Daemon.
|
||||
After=syslog.target network.target
|
||||
|
||||
[Service]
|
||||
Type=notify
|
||||
Environment=OPTIONS="oamcontroller -u snmpd -Lsd -Lf /dev/null -p /var/run/snmpd.pid"
|
||||
EnvironmentFile=-/etc/sysconfig/snmpd
|
||||
ExecStart=/etc/init.d/snmpd start
|
||||
ExecStop=/etc/init.d/snmpd stop
|
||||
ExecReload=/bin/kill -HUP $MAINPID
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
@ -1,3 +1,2 @@
|
||||
COPY_LIST="files/*"
|
||||
TIS_PATCH_VER=10
|
||||
TIS_PATCH_VER=11
|
||||
BUILD_IS_SLOW=3
|
||||
|
@ -3,17 +3,15 @@ From: Scott Little <scott.little@windriver.com>
|
||||
Date: Mon, 2 Oct 2017 17:05:59 -0400
|
||||
Subject: [PATCH] WRS: 0001-Update-package-versioning-for-TIS-format.patch
|
||||
|
||||
Conflicts:
|
||||
SPECS/net-snmp.spec
|
||||
---
|
||||
SPECS/net-snmp.spec | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/SPECS/net-snmp.spec b/SPECS/net-snmp.spec
|
||||
index 9b313cb..b015436 100644
|
||||
index a59db4f..8a24ba1 100644
|
||||
--- a/SPECS/net-snmp.spec
|
||||
+++ b/SPECS/net-snmp.spec
|
||||
@@ -14,7 +14,7 @@
|
||||
@@ -11,7 +11,7 @@
|
||||
Summary: A collection of SNMP protocol tools and libraries
|
||||
Name: net-snmp
|
||||
Version: 5.7.2
|
||||
|
@ -1,11 +1,2 @@
|
||||
spec-include-TiS-patches.patch
|
||||
snmpd-service-OPTIONS.patch
|
||||
snmp-spec-add-init-script.patch
|
||||
fix-snmpd-service.patch
|
||||
fix-snmpd-initscript.patch
|
||||
run-snmpd-as-non-root-user.patch
|
||||
fix-snmpd-service-reload.patch
|
||||
0001-Update-package-versioning-for-TIS-format.patch
|
||||
snmp-spec-add-snmp-config.patch
|
||||
snmp-spec-config-file-permission.patch
|
||||
spec-configure-without-HOST-RESOURCES-MIB.patch
|
||||
spec-build-configure-changes.patch
|
||||
|
@ -1,24 +0,0 @@
|
||||
From 3558b107aa5464f867516e2d734592d0f6363b97 Mon Sep 17 00:00:00 2001
|
||||
From: Scott Little <scott.little@windriver.com>
|
||||
Date: Mon, 2 Oct 2017 17:05:58 -0400
|
||||
Subject: [PATCH 5/9] WRS: fix-snmpd-initscript.patch
|
||||
|
||||
---
|
||||
SPECS/net-snmp.spec | 1 -
|
||||
1 file changed, 1 deletion(-)
|
||||
|
||||
diff --git a/SPECS/net-snmp.spec b/SPECS/net-snmp.spec
|
||||
index 035d2f8..3e36cb5 100644
|
||||
--- a/SPECS/net-snmp.spec
|
||||
+++ b/SPECS/net-snmp.spec
|
||||
@@ -434,7 +434,6 @@ mkdir -p ${RPM_BUILD_ROOT}%{_sysconfdir}/rc.d/init.d
|
||||
install -m 755 %SOURCE13 ${RPM_BUILD_ROOT}%{_sysconfdir}/rc.d/init.d/snmpd
|
||||
|
||||
install -d ${RPM_BUILD_ROOT}%{_initrddir}
|
||||
-install -m 755 %SOURCE2 ${RPM_BUILD_ROOT}%{_initrddir}/snmpd
|
||||
install -m 755 %SOURCE3 ${RPM_BUILD_ROOT}%{_initrddir}/snmptrapd
|
||||
|
||||
install -d ${RPM_BUILD_ROOT}%{_sysconfdir}/sysconfig
|
||||
--
|
||||
2.7.4
|
||||
|
@ -1,25 +0,0 @@
|
||||
From 2b9059876d087843078b750d0d1dc0117e17d31a 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 7/9] WRS: fix-snmpd-service-reload.patch
|
||||
|
||||
---
|
||||
SOURCES/snmpd.service | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/SOURCES/snmpd.service b/SOURCES/snmpd.service
|
||||
index ad689c8..1319091 100644
|
||||
--- a/SOURCES/snmpd.service
|
||||
+++ b/SOURCES/snmpd.service
|
||||
@@ -8,7 +8,7 @@ Environment=OPTIONS="oamcontroller -u snmpd -Lsd -Lf /dev/null -p /var/run/snmpd
|
||||
EnvironmentFile=-/etc/sysconfig/snmpd
|
||||
ExecStart=/etc/init.d/snmpd start
|
||||
ExecStop=/etc/init.d/snmpd stop
|
||||
-ExecReload=/etc/init.d/snmpd restart
|
||||
+ExecReload=/bin/kill -HUP $MAINPID
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
--
|
||||
1.9.1
|
||||
|
@ -1,28 +0,0 @@
|
||||
From 43036215d0f88d6c8789a596578ea7cc0002ff61 Mon Sep 17 00:00:00 2001
|
||||
From: Scott Little <scott.little@windriver.com>
|
||||
Date: Mon, 2 Oct 2017 17:05:58 -0400
|
||||
Subject: [PATCH 4/9] WRS: fix-snmpd-service.patch
|
||||
|
||||
---
|
||||
SOURCES/snmpd.service | 5 +++--
|
||||
1 file changed, 3 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/SOURCES/snmpd.service b/SOURCES/snmpd.service
|
||||
index 8ec215b..84b6ca3 100644
|
||||
--- a/SOURCES/snmpd.service
|
||||
+++ b/SOURCES/snmpd.service
|
||||
@@ -6,8 +6,9 @@ After=syslog.target network.target
|
||||
Type=notify
|
||||
Environment=OPTIONS="oamcontroller -Lsd -Lf /dev/null -p /var/run/snmpd.pid"
|
||||
EnvironmentFile=-/etc/sysconfig/snmpd
|
||||
-ExecStart=/usr/sbin/snmpd $OPTIONS -f
|
||||
-ExecReload=/bin/kill -HUP $MAINPID
|
||||
+ExecStart=/etc/init.d/snmpd start
|
||||
+ExecStop=/etc/init.d/snmpd stop
|
||||
+ExecReload=/etc/init.d/snmpd restart
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
--
|
||||
1.9.1
|
||||
|
@ -1,41 +0,0 @@
|
||||
From 5dc19ad10a3f91803116a88c303134e9ff361bd5 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] WRS: run-snmpd-as-non-root-user.patch
|
||||
|
||||
Conflicts:
|
||||
SPECS/net-snmp.spec
|
||||
---
|
||||
SOURCES/snmpd.service | 2 +-
|
||||
SPECS/net-snmp.spec | 2 +-
|
||||
2 files changed, 2 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/SOURCES/snmpd.service b/SOURCES/snmpd.service
|
||||
index 84b6ca3..ad689c8 100644
|
||||
--- a/SOURCES/snmpd.service
|
||||
+++ b/SOURCES/snmpd.service
|
||||
@@ -4,7 +4,7 @@ After=syslog.target network.target
|
||||
|
||||
[Service]
|
||||
Type=notify
|
||||
-Environment=OPTIONS="oamcontroller -Lsd -Lf /dev/null -p /var/run/snmpd.pid"
|
||||
+Environment=OPTIONS="oamcontroller -u snmpd -Lsd -Lf /dev/null -p /var/run/snmpd.pid"
|
||||
EnvironmentFile=-/etc/sysconfig/snmpd
|
||||
ExecStart=/etc/init.d/snmpd start
|
||||
ExecStop=/etc/init.d/snmpd stop
|
||||
diff --git a/SPECS/net-snmp.spec b/SPECS/net-snmp.spec
|
||||
index 3e36cb5..9b313cb 100644
|
||||
--- a/SPECS/net-snmp.spec
|
||||
+++ b/SPECS/net-snmp.spec
|
||||
@@ -428,7 +428,7 @@ install -m 644 %SOURCE6 ${RPM_BUILD_ROOT}%{_sysconfdir}/snmp/snmptrapd.conf
|
||||
|
||||
# WRS
|
||||
install -m 644 %SOURCE12 ${RPM_BUILD_ROOT}%{_sysconfdir}/snmp/snmpd.conf
|
||||
-chmod 600 ${RPM_BUILD_ROOT}%{_sysconfdir}/snmp/snmptrapd.conf
|
||||
+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
|
||||
--
|
||||
2.7.4
|
||||
|
@ -1,42 +0,0 @@
|
||||
From 492d89dca4ca498b77847abc1f1313a800fec85e Mon Sep 17 00:00:00 2001
|
||||
From: Scott Little <scott.little@windriver.com>
|
||||
Date: Mon, 2 Oct 2017 17:05:58 -0400
|
||||
Subject: [PATCH] WRS: snmp-spec-add-init-script.patch
|
||||
|
||||
---
|
||||
SPECS/net-snmp.spec | 5 +++++
|
||||
1 file changed, 5 insertions(+)
|
||||
|
||||
diff --git a/SPECS/net-snmp.spec b/SPECS/net-snmp.spec
|
||||
index da7706b..035d2f8 100644
|
||||
--- a/SPECS/net-snmp.spec
|
||||
+++ b/SPECS/net-snmp.spec
|
||||
@@ -41,6 +41,7 @@ Source11: snmptrapd.service
|
||||
|
||||
# WRS
|
||||
Source12: snmpd.conf.cgcs
|
||||
+Source13: snmpd.cgcs
|
||||
|
||||
Patch1: net-snmp-5.7.2-pie.patch
|
||||
Patch2: net-snmp-5.5-dir-fix.patch
|
||||
@@ -429,6 +430,9 @@ install -m 644 %SOURCE6 ${RPM_BUILD_ROOT}%{_sysconfdir}/snmp/snmptrapd.conf
|
||||
install -m 644 %SOURCE12 ${RPM_BUILD_ROOT}%{_sysconfdir}/snmp/snmpd.conf
|
||||
chmod 600 ${RPM_BUILD_ROOT}%{_sysconfdir}/snmp/snmptrapd.conf
|
||||
|
||||
+mkdir -p ${RPM_BUILD_ROOT}%{_sysconfdir}/rc.d/init.d
|
||||
+install -m 755 %SOURCE13 ${RPM_BUILD_ROOT}%{_sysconfdir}/rc.d/init.d/snmpd
|
||||
+
|
||||
install -d ${RPM_BUILD_ROOT}%{_initrddir}
|
||||
install -m 755 %SOURCE2 ${RPM_BUILD_ROOT}%{_initrddir}/snmpd
|
||||
install -m 755 %SOURCE3 ${RPM_BUILD_ROOT}%{_initrddir}/snmptrapd
|
||||
@@ -568,6 +572,7 @@ rm -rf ${RPM_BUILD_ROOT}
|
||||
%dir %{_localstatedir}/run/net-snmp
|
||||
%{_prefix}/lib/tmpfiles.d/net-snmp.conf
|
||||
%{_unitdir}/snmp*
|
||||
+%{_sysconfdir}/rc.d/init.d/snmpd
|
||||
%config(noreplace) %{_sysconfdir}/sysconfig/snmpd
|
||||
%config(noreplace) %{_sysconfdir}/sysconfig/snmptrapd
|
||||
%attr(0755,root,root) %{_bindir}/net-snmp-config*
|
||||
--
|
||||
2.7.4
|
||||
|
@ -1,41 +0,0 @@
|
||||
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
|
||||
|
@ -1,27 +0,0 @@
|
||||
From 28917eb0762c08ffa8255fd29555e1d75681d6f8 Mon Sep 17 00:00:00 2001
|
||||
From: Tao Liu <tao.liu@windriver.com>
|
||||
Date: Thu, 4 Jan 2018 11:43:15 -0500
|
||||
Subject: snmp spec change config file permission
|
||||
|
||||
---
|
||||
SPECS/net-snmp.spec | 4 ++--
|
||||
1 file changed, 2 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/SPECS/net-snmp.spec b/SPECS/net-snmp.spec
|
||||
index 6fc0da2..38afcf1 100644
|
||||
--- a/SPECS/net-snmp.spec
|
||||
+++ b/SPECS/net-snmp.spec
|
||||
@@ -558,8 +558,8 @@ rm -rf ${RPM_BUILD_ROOT}
|
||||
%doc local/passtest local/ipf-mod.pl
|
||||
%doc README.thread AGENT.txt PORTING local/README.mib2c
|
||||
%dir %{_sysconfdir}/snmp
|
||||
-%config(noreplace) %attr(0600,root,root) %{_sysconfdir}/snmp/snmpd.conf
|
||||
-%config(noreplace) %attr(0600,root,root) %{_sysconfdir}/snmp/snmptrapd.conf
|
||||
+%config(noreplace) %attr(0640,root,root) %{_sysconfdir}/snmp/snmpd.conf
|
||||
+%config(noreplace) %attr(0640,root,root) %{_sysconfdir}/snmp/snmptrapd.conf
|
||||
%{_bindir}/snmpconf
|
||||
%{_bindir}/agentxtrap
|
||||
%{_bindir}/net-snmp-create-v3-user
|
||||
--
|
||||
2.7.4
|
||||
|
@ -1,25 +0,0 @@
|
||||
From d316d562a3adc3eca5952823d18687b208b1a065 Mon Sep 17 00:00:00 2001
|
||||
From: Scott Little <scott.little@windriver.com>
|
||||
Date: Mon, 2 Oct 2017 17:05:58 -0400
|
||||
Subject: [PATCH 2/9] WRS: snmpd-service-OPTIONS.patch
|
||||
|
||||
---
|
||||
SOURCES/snmpd.service | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/SOURCES/snmpd.service b/SOURCES/snmpd.service
|
||||
index adb394d..8ec215b 100644
|
||||
--- a/SOURCES/snmpd.service
|
||||
+++ b/SOURCES/snmpd.service
|
||||
@@ -4,7 +4,7 @@ After=syslog.target network.target
|
||||
|
||||
[Service]
|
||||
Type=notify
|
||||
-Environment=OPTIONS="-LS0-6d"
|
||||
+Environment=OPTIONS="oamcontroller -Lsd -Lf /dev/null -p /var/run/snmpd.pid"
|
||||
EnvironmentFile=-/etc/sysconfig/snmpd
|
||||
ExecStart=/usr/sbin/snmpd $OPTIONS -f
|
||||
ExecReload=/bin/kill -HUP $MAINPID
|
||||
--
|
||||
1.9.1
|
||||
|
@ -0,0 +1,39 @@
|
||||
diff --git a/SPECS/net-snmp.spec b/SPECS/net-snmp.spec
|
||||
index 8a24ba1..40af31f 100644
|
||||
--- a/SPECS/net-snmp.spec
|
||||
+++ b/SPECS/net-snmp.spec
|
||||
@@ -1,3 +1,6 @@
|
||||
+# WRS: Disable check
|
||||
+%global netsnmp_check 0
|
||||
+
|
||||
# use netsnmp_tcp_wrappers 0 to disable tcp_wrappers support
|
||||
%{!?netsnmp_tcp_wrappers:%global netsnmp_tcp_wrappers 1}
|
||||
# use nestnmp_check 0 to speed up packaging by disabling 'make test'
|
||||
@@ -333,7 +336,7 @@ rm testing/fulltests/default/T200*
|
||||
%endif
|
||||
|
||||
%build
|
||||
-MIBS="host agentx smux \
|
||||
+MIBS="agentx smux \
|
||||
ucd-snmp/diskio tcp-mib udp-mib mibII/mta_sendmail \
|
||||
ip-mib/ipv4InterfaceTable ip-mib/ipv6InterfaceTable \
|
||||
ip-mib/ipAddressPrefixTable/ipAddressPrefixTable \
|
||||
@@ -354,6 +357,7 @@ MIBS="$MIBS ucd-snmp/lmsensorsMib"
|
||||
--with-logfile="/var/log/snmpd.log" \
|
||||
--with-persistent-directory="/var/lib/net-snmp" \
|
||||
--with-mib-modules="$MIBS" \
|
||||
+ --with-out-mib-modules=host \
|
||||
%if %{netsnmp_tcp_wrappers}
|
||||
--with-libwrap=yes \
|
||||
%endif
|
||||
@@ -372,6 +376,7 @@ MIBS="$MIBS ucd-snmp/lmsensorsMib"
|
||||
--with-security-modules=tsm \
|
||||
--with-mysql \
|
||||
--with-systemd \
|
||||
+ --without-nl \
|
||||
--with-sys-contact="root@localhost" <<EOF
|
||||
EOF
|
||||
|
||||
--
|
||||
1.8.3.1
|
||||
|
@ -1,34 +0,0 @@
|
||||
From 0358f8ee4e56fbd3f4c54409b3dbe5c9fdff3a27 Mon Sep 17 00:00:00 2001
|
||||
From: slin14 <shuicheng.lin@intel.com>
|
||||
Date: Sun, 12 Aug 2018 22:07:24 +0800
|
||||
Subject: [PATCH] spec-configure-without-HOST-RESOURCES-MIB
|
||||
|
||||
Signed-off-by: slin14 <shuicheng.lin@intel.com>
|
||||
---
|
||||
SPECS/net-snmp.spec | 3 ++-
|
||||
1 file changed, 2 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/SPECS/net-snmp.spec b/SPECS/net-snmp.spec
|
||||
index a1b3720..e6e5d8c 100644
|
||||
--- a/SPECS/net-snmp.spec
|
||||
+++ b/SPECS/net-snmp.spec
|
||||
@@ -342,7 +342,7 @@ rm testing/fulltests/default/T200*
|
||||
%endif
|
||||
|
||||
%build
|
||||
-MIBS="host agentx smux \
|
||||
+MIBS="agentx smux \
|
||||
ucd-snmp/diskio tcp-mib udp-mib mibII/mta_sendmail \
|
||||
ip-mib/ipv4InterfaceTable ip-mib/ipv6InterfaceTable \
|
||||
ip-mib/ipAddressPrefixTable/ipAddressPrefixTable \
|
||||
@@ -363,6 +363,7 @@ MIBS="$MIBS ucd-snmp/lmsensorsMib"
|
||||
--with-logfile="/var/log/snmpd.log" \
|
||||
--with-persistent-directory="/var/lib/net-snmp" \
|
||||
--with-mib-modules="$MIBS" \
|
||||
+ --with-out-mib-modules=host \
|
||||
%if %{netsnmp_tcp_wrappers}
|
||||
--with-libwrap=yes \
|
||||
%endif
|
||||
--
|
||||
2.7.4
|
||||
|
@ -1,59 +0,0 @@
|
||||
From 387d170e5cc224b2bbfb406c03853c339cd4528e Mon Sep 17 00:00:00 2001
|
||||
From: Scott Little <scott.little@windriver.com>
|
||||
Date: Mon, 2 Oct 2017 17:05:58 -0400
|
||||
Subject: [PATCH 1/9] WRS: spec-include-TiS-patches.patch
|
||||
|
||||
---
|
||||
SPECS/net-snmp.spec | 16 ++++++++++++++--
|
||||
1 file changed, 14 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/SPECS/net-snmp.spec b/SPECS/net-snmp.spec
|
||||
index a59db4f..da7706b 100644
|
||||
--- a/SPECS/net-snmp.spec
|
||||
+++ b/SPECS/net-snmp.spec
|
||||
@@ -1,3 +1,6 @@
|
||||
+# WRS: Disable check
|
||||
+%global netsnmp_check 0
|
||||
+
|
||||
# use netsnmp_tcp_wrappers 0 to disable tcp_wrappers support
|
||||
%{!?netsnmp_tcp_wrappers:%global netsnmp_tcp_wrappers 1}
|
||||
# use nestnmp_check 0 to speed up packaging by disabling 'make test'
|
||||
@@ -35,6 +38,10 @@ Source8: net-snmptrapd.sysconfig
|
||||
Source9: net-snmp-tmpfs.conf
|
||||
Source10: snmpd.service
|
||||
Source11: snmptrapd.service
|
||||
+
|
||||
+# WRS
|
||||
+Source12: snmpd.conf.cgcs
|
||||
+
|
||||
Patch1: net-snmp-5.7.2-pie.patch
|
||||
Patch2: net-snmp-5.5-dir-fix.patch
|
||||
Patch3: net-snmp-5.6-multilib.patch
|
||||
@@ -372,6 +379,7 @@ MIBS="$MIBS ucd-snmp/lmsensorsMib"
|
||||
--with-security-modules=tsm \
|
||||
--with-mysql \
|
||||
--with-systemd \
|
||||
+ --without-nl \
|
||||
--with-sys-contact="root@localhost" <<EOF
|
||||
EOF
|
||||
|
||||
@@ -413,10 +421,14 @@ mv ${RPM_BUILD_ROOT}/%{_includedir}/net-snmp/net-snmp-config.h ${RPM_BUILD_ROOT}
|
||||
install -m644 %SOURCE4 ${RPM_BUILD_ROOT}/%{_includedir}/net-snmp/net-snmp-config.h
|
||||
%endif
|
||||
|
||||
-install -d ${RPM_BUILD_ROOT}%{_sysconfdir}/snmp
|
||||
-install -m 644 %SOURCE1 ${RPM_BUILD_ROOT}%{_sysconfdir}/snmp/snmpd.conf
|
||||
+install -d -m 750 ${RPM_BUILD_ROOT}%{_sysconfdir}/snmp
|
||||
+# install -m 644 %SOURCE1 ${RPM_BUILD_ROOT}%{_sysconfdir}/snmp/snmpd.conf
|
||||
install -m 644 %SOURCE6 ${RPM_BUILD_ROOT}%{_sysconfdir}/snmp/snmptrapd.conf
|
||||
|
||||
+# WRS
|
||||
+install -m 644 %SOURCE12 ${RPM_BUILD_ROOT}%{_sysconfdir}/snmp/snmpd.conf
|
||||
+chmod 600 ${RPM_BUILD_ROOT}%{_sysconfdir}/snmp/snmptrapd.conf
|
||||
+
|
||||
install -d ${RPM_BUILD_ROOT}%{_initrddir}
|
||||
install -m 755 %SOURCE2 ${RPM_BUILD_ROOT}%{_initrddir}/snmpd
|
||||
install -m 755 %SOURCE3 ${RPM_BUILD_ROOT}%{_initrddir}/snmptrapd
|
||||
--
|
||||
2.7.4
|
||||
|
@ -231,6 +231,7 @@ pam-config
|
||||
net-snmp-utils
|
||||
net-snmp-libs
|
||||
net-snmp-python
|
||||
net-snmp-config
|
||||
|
||||
# openldap
|
||||
openldap
|
||||
|
@ -36,6 +36,7 @@ base/sudo
|
||||
virt/cloud-init
|
||||
base/watchdog
|
||||
base/net-snmp
|
||||
base/net-snmp-config
|
||||
ldap/openldap
|
||||
ldap/openldap-config
|
||||
networking/mellanox/mlx4-config
|
||||
|
Loading…
Reference in New Issue
Block a user