diff --git a/centos_pkg_dirs b/centos_pkg_dirs index c4cfbe982..b5c88a76d 100644 --- a/centos_pkg_dirs +++ b/centos_pkg_dirs @@ -99,4 +99,5 @@ tools/kexec-tools tools/libbpf networking/iproute networking/iptables +networking/keepalived networking/libnftnl diff --git a/centos_srpms_3rdparties.lst b/centos_srpms_3rdparties.lst index b7040bde9..4b196d3cb 100644 --- a/centos_srpms_3rdparties.lst +++ b/centos_srpms_3rdparties.lst @@ -1,5 +1,6 @@ iproute-5.12.0-4.el8.src.rpm#https://vault.centos.org/8-stream/BaseOS/Source/SPackages/iproute-5.12.0-4.el8.src.rpm iptables-1.8.4-21.el8.src.rpm#https://vault.centos.org/8-stream/BaseOS/Source/SPackages/iptables-1.8.4-21.el8.src.rpm +keepalived-2.1.5-6.el8.src.rpm#http://vault.centos.org/8-stream/AppStream/Source/SPackages/keepalived-2.1.5-6.el8.src.rpm libnftnl-1.1.5-4.el8.src.rpm#https://vault.centos.org/8-stream/BaseOS/Source/SPackages/libnftnl-1.1.5-4.el8.src.rpm libvirt-python-4.7.0-1.fc28.src.rpm#https://libvirt.org/sources/python/libvirt-python-4.7.0-1.fc28.src.rpm linuxptp-3.1.1-1.el8.src.rpm#http://vault.centos.org/8-stream/AppStream/Source/SPackages/linuxptp-3.1.1-1.el8.src.rpm diff --git a/networking/keepalived/centos/build_srpm.data b/networking/keepalived/centos/build_srpm.data new file mode 100644 index 000000000..69abd61b8 --- /dev/null +++ b/networking/keepalived/centos/build_srpm.data @@ -0,0 +1 @@ +TIS_PATCH_VER=PKG_GITREVCOUNT diff --git a/networking/keepalived/centos/meta_patches/PATCH_ORDER b/networking/keepalived/centos/meta_patches/PATCH_ORDER new file mode 100644 index 000000000..88d17423a --- /dev/null +++ b/networking/keepalived/centos/meta_patches/PATCH_ORDER @@ -0,0 +1,3 @@ +keepalived.spec-Modify-Release-field-for-StarlingX.patch +keepalived.spec-Disable-dependency-on-snmp.patch +keepalived.spec-Remove-usr-share-doc-keepalived-READ.patch diff --git a/networking/keepalived/centos/meta_patches/keepalived.spec-Disable-dependency-on-snmp.patch b/networking/keepalived/centos/meta_patches/keepalived.spec-Disable-dependency-on-snmp.patch new file mode 100644 index 000000000..44bcc0499 --- /dev/null +++ b/networking/keepalived/centos/meta_patches/keepalived.spec-Disable-dependency-on-snmp.patch @@ -0,0 +1,57 @@ +From 2c2b300edea3dea24d59dce0347a70d37994c135 Mon Sep 17 00:00:00 2001 +From: "M. Vefa Bicakci" +Date: Wed, 10 Nov 2021 20:52:06 -0500 +Subject: [PATCH] keepalived.spec: Disable dependency on snmp + +This commit removes keepalived package's dependency on SNMP. This was +done for two reasons: + +- keepalived's configure script fails with the following error message + when attempting to check the sanity of the C compiler flags needed to + link keepalived with the net-snmp library. + + configure:11981: checking whether C compiler supports flag "..." from Net-SNMP + configure:11992: gcc -o conftest -O2 -g -pipe -Wall ... + /usr/lib64/libnetsnmpmibs.so: undefined reference to `headerGetEntry' + collect2: error: ld returned 1 exit status + + This occurs because of the mock build environment has a version of RPM + (and hence librpm) that is more recent than the one shipped with + CentOS 7.x, and librpm's "headerGetEntry" function has since been + deprecated, but net-snmp library is expected to dynamically link + against an RPM library with the "headerGetEntry" function defined. + + For the record, another colleague has encountered this issue in the + past, but with lldp instead of keepalived: + https://gist.github.com/ericho/049d1908f5d80485541e918515996702 + +- To resolve the aforementioned issue, one can build net-snmp library in + StarlingX as well. net-snmp used to be included in StarlingX's integ + repository, but it was removed with the following commit: + https://review.opendev.org/c/starlingx/integ/+/765381 + +keepalived is being updated in StarlingX, because OpenStack's neutron +depends on keepalived, and the stock version in CentOS 7 is not +compatible with the recently updated iptables. A software architect +colleague confirmed that neutron does not need to use keepalived in +StarlingX's context. This change is made to avoid the need to re-package +a large number of dependencies due to the recent iptables update. + +Signed-off-by: M. Vefa Bicakci +--- + SPECS/keepalived.spec | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/SPECS/keepalived.spec b/SPECS/keepalived.spec +index 13650da79d64..8087fd474585 100644 +--- a/SPECS/keepalived.spec ++++ b/SPECS/keepalived.spec +@@ -1,4 +1,4 @@ +-%bcond_without snmp ++%bcond_with snmp + %bcond_without vrrp + %bcond_without sha1 + %bcond_with iptables +-- +2.29.2 + diff --git a/networking/keepalived/centos/meta_patches/keepalived.spec-Modify-Release-field-for-StarlingX.patch b/networking/keepalived/centos/meta_patches/keepalived.spec-Modify-Release-field-for-StarlingX.patch new file mode 100644 index 000000000..679144ec1 --- /dev/null +++ b/networking/keepalived/centos/meta_patches/keepalived.spec-Modify-Release-field-for-StarlingX.patch @@ -0,0 +1,29 @@ +From 63e4c62e7b642e273409b28bac8658af627553b6 Mon Sep 17 00:00:00 2001 +From: "M. Vefa Bicakci" +Date: Wed, 10 Nov 2021 19:01:31 -0500 +Subject: [PATCH] keepalived.spec: Modify Release field for StarlingX + +This commit modifies the Release field of the keepalived package's spec +file for StarlingX. + +Signed-off-by: M. Vefa Bicakci +--- + SPECS/keepalived.spec | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/SPECS/keepalived.spec b/SPECS/keepalived.spec +index b719d6cf2789..13650da79d64 100644 +--- a/SPECS/keepalived.spec ++++ b/SPECS/keepalived.spec +@@ -10,7 +10,7 @@ + Name: keepalived + Summary: High Availability monitor built upon LVS, VRRP and service pollers + Version: 2.1.5 +-Release: 6%{?dist} ++Release: 6%{?_tis_dist}.%{tis_patch_ver} + License: GPLv2+ + URL: http://www.keepalived.org/ + Group: System Environment/Daemons +-- +2.29.2 + diff --git a/networking/keepalived/centos/meta_patches/keepalived.spec-Remove-usr-share-doc-keepalived-READ.patch b/networking/keepalived/centos/meta_patches/keepalived.spec-Remove-usr-share-doc-keepalived-READ.patch new file mode 100644 index 000000000..b0e8ef2c1 --- /dev/null +++ b/networking/keepalived/centos/meta_patches/keepalived.spec-Remove-usr-share-doc-keepalived-READ.patch @@ -0,0 +1,38 @@ +From e111abc4421d848c99b30f6aaf077d08aea61337 Mon Sep 17 00:00:00 2001 +From: "M. Vefa Bicakci" +Date: Wed, 10 Nov 2021 21:34:32 -0500 +Subject: [PATCH] keepalived.spec: Remove /usr/share/doc/keepalived/README + +This commit removes the file "/usr/share/doc/keepalived/README" from the +installation directory, because the same file is already installed into +"/usr/share/doc/keepalived-/README", and RPM reports the +following error about the former file: + + Checking for unpackaged file(s): /usr/lib/rpm/check-files \ + /builddir/build/BUILDROOT/keepalived-2.1.5-6.tis.1.x86_64 + RPM build errors: + error: Installed (but unpackaged) file(s) found: + /usr/share/doc/keepalived/README + Installed (but unpackaged) file(s) found: + /usr/share/doc/keepalived/README + +Signed-off-by: M. Vefa Bicakci +--- + SPECS/keepalived.spec | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/SPECS/keepalived.spec b/SPECS/keepalived.spec +index 8087fd474585..44b5a3f06578 100644 +--- a/SPECS/keepalived.spec ++++ b/SPECS/keepalived.spec +@@ -69,6 +69,7 @@ rm -rf %{buildroot} + make install DESTDIR=%{buildroot} + rm -rf %{buildroot}%{_initrddir}/ + rm -rf %{buildroot}%{_sysconfdir}/keepalived/samples/ ++rm -f %{buildroot}%{_docdir}/%{name}/README + %{__install} -p -D -m 0644 %{SOURCE1} %{buildroot}%{_unitdir}/keepalived.service + mkdir -p %{buildroot}%{_libexecdir}/keepalived + +-- +2.29.2 + diff --git a/networking/keepalived/centos/srpm_path b/networking/keepalived/centos/srpm_path new file mode 100644 index 000000000..85172d2d5 --- /dev/null +++ b/networking/keepalived/centos/srpm_path @@ -0,0 +1 @@ +mirror:Source/keepalived-2.1.5-6.el8.src.rpm