From ead6a57d6cdd1776ed3c67c624cc8c397dd08e7e Mon Sep 17 00:00:00 2001 From: Ryan O'Hara Date: Sun, 10 Apr 2016 23:31:30 -0500 Subject: [PATCH] Install VRRP MIB --- install-vrrp-mib.patch | 35 +++++++++++++++++++++++++++++++++++ keepalived.spec | 13 +++++++++++-- 2 files changed, 46 insertions(+), 2 deletions(-) create mode 100644 install-vrrp-mib.patch diff --git a/install-vrrp-mib.patch b/install-vrrp-mib.patch new file mode 100644 index 0000000..c44cdab --- /dev/null +++ b/install-vrrp-mib.patch @@ -0,0 +1,35 @@ +From 15105f7a4d8c6661326e3e70b6bdc27b36e88cd7 Mon Sep 17 00:00:00 2001 +From: Ryan O'Hara +Date: Tue, 5 Apr 2016 08:50:33 -0500 +Subject: [PATCH] Install VRRP-MIB when applicable + +It appears that the condition in Makefile.in for installing VRRP-MIB +was using a non-existent macro, SNMP_RFC2_SUPPORT. This patch removes +two conditions from Makefile.in that use undefined macros and adds a +condition to install VRRP-MIB when SNMP_RFCV2_SUPPORT is set +appropriately. +--- + Makefile.in | 5 +---- + 1 file changed, 1 insertion(+), 4 deletions(-) + +diff --git a/Makefile.in b/Makefile.in +index e77f046..fa88656 100644 +--- a/Makefile.in ++++ b/Makefile.in +@@ -85,12 +85,9 @@ install: + $(MAKE) -C genhash install + ifeq (@SNMP_SUPPORT@, _WITH_SNMP_) + mkdir -p $(DESTDIR)/usr/share/snmp/mibs/ +-ifeq (@SNMP_RFC2_SUPPORT@, _WITH_SNMP_RFC2_) ++ifeq (@SNMP_RFCV2_SUPPORT@, _WITH_SNMP_RFCV2_) + cp -f doc/VRRP-MIB $(DESTDIR)/usr/share/snmp/mibs/ + endif +-ifeq (@SNMP_RFC3_SUPPORT@, _WITH_SNMP_RFC3_) +- cp -f doc/VRRPv3-MIB $(DESTDIR)/usr/share/snmp/mibs/ +-endif + ifeq (@SNMP_RFCV3_SUPPORT@, _WITH_SNMP_RFCV3_) + cp -f doc/VRRPv3-MIB $(DESTDIR)/usr/share/snmp/mibs/ + endif +-- +2.4.3 + diff --git a/keepalived.spec b/keepalived.spec index 4535873..571a149 100644 --- a/keepalived.spec +++ b/keepalived.spec @@ -9,7 +9,7 @@ Name: keepalived Summary: High Availability monitor built upon LVS, VRRP and service pollers Version: 1.2.20 -Release: 1%{?dist} +Release: 2%{?dist} License: GPLv2+ URL: http://www.keepalived.org/ Group: System Environment/Daemons @@ -17,6 +17,8 @@ Group: System Environment/Daemons Source0: http://www.keepalived.org/software/keepalived-%{version}.tar.gz Source1: keepalived.service +Patch0: install-vrrp-mib.patch + Requires(post): systemd Requires(preun): systemd Requires(postun): systemd @@ -49,13 +51,14 @@ infrastructures. %prep %setup -q +%patch0 -p1 %build %configure \ %{?with_debug:--enable-debug} \ %{?with_profile:--enable-profile} \ %{!?with_vrrp:--disable-vrrp} \ - %{?with_snmp:--enable-snmp} \ + %{?with_snmp:--enable-snmp --enable-snmp-rfc} \ %{?with_sha1:--enable-sha1} %{__make} %{?_smp_mflags} STRIP=/bin/true @@ -73,6 +76,8 @@ mkdir -p %{buildroot}%{_datadir}/snmp/mibs/ %{buildroot}%{_datadir}/snmp/mibs/KEEPALIVED-MIB.txt %{__mv} %{buildroot}%{_datadir}/snmp/mibs/VRRP-MIB \ %{buildroot}%{_datadir}/snmp/mibs/VRRP-MIB.txt + %{__mv} %{buildroot}%{_datadir}/snmp/mibs/VRRPv3-MIB \ + %{buildroot}%{_datadir}/snmp/mibs/VRRPv3-MIB.txt %endif %clean @@ -99,6 +104,7 @@ rm -rf %{buildroot} %if %{with snmp} %{_datadir}/snmp/mibs/KEEPALIVED-MIB.txt %{_datadir}/snmp/mibs/VRRP-MIB.txt +%{_datadir}/snmp/mibs/VRRPv3-MIB.txt %endif %{_bindir}/genhash %{_unitdir}/keepalived.service @@ -107,6 +113,9 @@ rm -rf %{buildroot} %{_mandir}/man8/keepalived.8* %changelog +* Sun Apr 10 2016 Ryan O'Hara - 1.2.20-2 +- Install VRRP MIB + * Mon Apr 04 2016 Ryan O'Hara - 1.2.20-1 - Update to 1.2.20 (#1323526)