summaryrefslogtreecommitdiff
path: root/sys-cluster/keepalived
diff options
context:
space:
mode:
Diffstat (limited to 'sys-cluster/keepalived')
-rw-r--r--sys-cluster/keepalived/Manifest3
-rw-r--r--sys-cluster/keepalived/files/keepalived-2.0.10-snmp-crash-fix.patch122
-rw-r--r--sys-cluster/keepalived/keepalived-2.1.3.ebuild81
3 files changed, 83 insertions, 123 deletions
diff --git a/sys-cluster/keepalived/Manifest b/sys-cluster/keepalived/Manifest
index 29a1fbdbc5a9..033971953a5a 100644
--- a/sys-cluster/keepalived/Manifest
+++ b/sys-cluster/keepalived/Manifest
@@ -1,4 +1,3 @@
-AUX keepalived-2.0.10-snmp-crash-fix.patch 3843 BLAKE2B 246ac57c0f25df09357a8dd6f1f504dfbaa3b690fa68b353643bb1ce1d4811178b00e6c6ef2b1fa886c8e2a343379e9ebc077b49b8c921744afef24aa9e667f9 SHA512 26b4c222966b793bb8029b8d125203ecdfd6381928812ffb1ff99a056bbdff8b85ab2b350a263459e24bc282f4af05f6dd02fea78a7162197450604694a39fac
AUX keepalived.confd-r1 63 BLAKE2B 8925b12c9936aaccf828132720a0cb74fddc4a4c8642aaa2ad08099e17e5db0170070966a4465de7bfc06317f812194d9a7928da2559ea41a994c5f8e832b9c7 SHA512 8aed0ece9d67956006c5056543bbb31c354b73b7b555f6cce039f9507da24e40e2ad15ac057dd2e39244de5319f5b9a19659e8ee5c2c7116e202f18c88e6ed74
AUX keepalived.init-r1 539 BLAKE2B 90675bc2863c7a2b704c14807ca39c7cd35e2f9281384700a7bc4e1a381f106a4734f19e3f740ad00a83c065f45ac620d8224fd125f76ed0a96ec285d3abf393 SHA512 5a5057f50c29c6e2c9f2451acf1e2aa2cdd9218a5882d3eea1a148a4ae8b259b5937387b95feab919b242a65d706e48c5afa3ed280215092295b8e8d44d1f543
AUX keepalived.service 293 BLAKE2B e80be18a91569d73e64d12ff74622c866efc03522640f33e1cb89e4d232f39bb65b3d2aa7c093e93a5fbe41937a5ab4fe3a77d6864f335e04dea6bf898d4ba84 SHA512 c9d9c190a7892b3c9535ab51da45893bf6ff6738e64f832f52e22f435e4ef4e014f74dcb63f51b76a624ba39dc4dbd3542ada1971d361fd3da966bb649355ec7
@@ -6,7 +5,9 @@ AUX keepalived.service.conf 47 BLAKE2B b6e32bf8c8a602186af776d85c6c457aad2408bec
DIST keepalived-2.0.17.tar.gz 1003077 BLAKE2B 68ce64145f917267f6f156fc7b4ffb05ce0bd24b64ddfb3cb2ae8b54850586cffa04c0b617a0f1c6cffd659bba208c145051e436e002ee048908c44fa1c433ff SHA512 6bbcd76604785ef11af4df0a72015ff75a3f47fd04dbe15913f1a30bc80371a188f54020dca881a2b6a562e6ea0b1c5c9c4561c46aa4bdbb8c9f3c54b411d1df
DIST keepalived-2.0.19.tar.gz 1025062 BLAKE2B 3a4164ea7468d5709dfc68da9008d83a15273b6a12679e67348b49fc9fba8938d2552f1cb905d0b6af497a5f4f6b3281b3478a4da8707ed35cd30a8601ed1e40 SHA512 68a510983bc043484e5edbc1d87563677a048282ec52873105f0af922e8b4de5b8e7176944010f9d4d6f65d1a4ebaf930c3d37273e28c1f115ed0fda245d8109
DIST keepalived-2.0.20.tar.gz 1036063 BLAKE2B 217dee8c6dcb148119822f3c6a0b57482e91a17671a35333d0dccf04a3f7c6606a1c9e0b3f2a3adeab838fd91b7c714a0bf11895fe0c7d90d836d3585620c8e2 SHA512 36bbc4aa0a1045486e608c9f4ed73f4335b871dae88beaed10d86445474c462136885225cd6b61219a36fca2ff43771623bc6d072e406cf684acc2ca8f2a38f6
+DIST keepalived-2.1.3.tar.gz 1077888 BLAKE2B b9469cdabe2d7532d3b3489ae27ee273a0ae92fa4487f00ac845a8b78a79b09a6556630bd2c840b5b47c99b5dec3bf9432d41a30200d4d5f84a7e7eb483cb0f2 SHA512 f1353a2dbd62fcec9c799016aff7849fb1481005b9b26f9f392752539f3ab71e617d758000e2328d40179f947e29aeeab5581bbf143fdd39d125a8bcef0ac71d
EBUILD keepalived-2.0.17.ebuild 2250 BLAKE2B b5b1a2593bf5e5637ac013c2f2dc8d220e1b9137fb02e342107cba898fc6d3888a567e5fa4b79240082bccd2e17b6bce7e564a1e1c9044e89001097830d5fe86 SHA512 cdfc2b4835e958ec1e1ad8e287ef47cc096b239b0f74849a491e7115fd15a3a1aba005c2ef6094d240884ef20e56656281f88d611bafed6b2200e208f6d4584a
EBUILD keepalived-2.0.19.ebuild 2005 BLAKE2B 506a63c5683120982778e6696f476af785538cdcc81cbe1846918e652e2a53ce61cfd4cb782473134e6ca62b4788beae65d31b391a2c3681e2d119f4dc7bba3c SHA512 7e9bf4df9bb9a0123360f9e31f536c9ad83785c0737b1e22c64a0b2f801da099babf1272365ff7c8f959f465075b0c84223c2cfd9c0e6ccdf5d15ab5c6c34311
EBUILD keepalived-2.0.20.ebuild 2001 BLAKE2B 2207a4c15a10335c03f8277eafe2f29cdd6c593c7ec918c15824e526d7d509afa4dfb3cca36e600e727a956a088df4310f86111db96451fc64a883595ced705c SHA512 7c61d2129c2a64b7ac27daeb0264df6837780dec2bc81a79cb7951d99ffa450b279141802b3e693b80ea066a8a377a2f67561516ff34e40efefae51f68bfdc37
+EBUILD keepalived-2.1.3.ebuild 2005 BLAKE2B 9e8a0a9237d32facfbe26d8303e393c8e61abd521dd332346e5916b9fed328244905019eb9cdccfd8e04a079951c393bcad0d22008d89ae83e9d788b70745e2d SHA512 5d6fe1ff61c8b260df8e703ab075a33807f0d0bc6124cd75f7b9b54196e58177c5a1567cc10514cc924f4a80e54dc3fd5062a2405d65de06d08df18469e8864b
MISC metadata.xml 640 BLAKE2B 5644b98bf487637c431299fe61e1185731d9fc22e9a19b9a3218855318a9c40500339c628671eb958c2bcee99d867a8e9c93903fdcdad25ad566659422dd2119 SHA512 6fd4981067e0a2e74511db7be79d656c62b39c1f43f860e0d981b6c9770cb2da6b4fd3e40af1ed23adc8bbbd01202e6c45e58b6f86480a807d193aae1a3f7ad3
diff --git a/sys-cluster/keepalived/files/keepalived-2.0.10-snmp-crash-fix.patch b/sys-cluster/keepalived/files/keepalived-2.0.10-snmp-crash-fix.patch
deleted file mode 100644
index c1a5ab36180c..000000000000
--- a/sys-cluster/keepalived/files/keepalived-2.0.10-snmp-crash-fix.patch
+++ /dev/null
@@ -1,122 +0,0 @@
-diff --git a/keepalived/check/check_snmp.c b/keepalived/check/check_snmp.c
-index 67ae0e4f9..95c6e6f83 100644
---- a/keepalived/check/check_snmp.c
-+++ b/keepalived/check/check_snmp.c
-@@ -1451,6 +1451,9 @@ static struct variable8 check_vars[] = {
- void
- check_snmp_agent_init(const char *snmp_socket)
- {
-+ if (snmp_running)
-+ return;
-+
- /* We handle the global oid if we are running SNMP */
- snmp_agent_init(snmp_socket, true);
- snmp_register_mib(check_oid, OID_LENGTH(check_oid), "Healthchecker",
-@@ -1462,6 +1465,9 @@ check_snmp_agent_init(const char *snmp_socket)
- void
- check_snmp_agent_close()
- {
-+ if (!snmp_running)
-+ return;
-+
- snmp_unregister_mib(check_oid, OID_LENGTH(check_oid));
- snmp_agent_close(true);
- }
-diff --git a/keepalived/core/snmp.c b/keepalived/core/snmp.c
-index a9472feae..eb5bed20a 100644
---- a/keepalived/core/snmp.c
-+++ b/keepalived/core/snmp.c
-@@ -325,6 +325,9 @@ snmp_unregister_mib(oid *myoid, size_t len)
- void
- snmp_agent_init(const char *snmp_socket, bool base_mib)
- {
-+ if (snmp_running)
-+ return;
-+
- log_message(LOG_INFO, "Starting SNMP subagent");
- netsnmp_enable_subagent();
- snmp_disable_log();
-@@ -378,6 +381,9 @@ snmp_agent_init(const char *snmp_socket, bool base_mib)
- void
- snmp_agent_close(bool base_mib)
- {
-+ if (!snmp_running)
-+ return;
-+
- if (base_mib)
- snmp_unregister_mib(global_oid, OID_LENGTH(global_oid));
- snmp_shutdown(global_name);
-diff --git a/keepalived/vrrp/vrrp_snmp.c b/keepalived/vrrp/vrrp_snmp.c
-index ca9d46768..db696159c 100644
---- a/keepalived/vrrp/vrrp_snmp.c
-+++ b/keepalived/vrrp/vrrp_snmp.c
-@@ -4552,6 +4552,9 @@ vrrp_handles_global_oid(void)
- void
- vrrp_snmp_agent_init(const char *snmp_socket)
- {
-+ if (snmp_running)
-+ return;
-+
- /* We let the check process handle the global OID if it is running and with snmp */
- snmp_agent_init(snmp_socket, vrrp_handles_global_oid());
-
-@@ -4581,6 +4584,9 @@ vrrp_snmp_agent_init(const char *snmp_socket)
- void
- vrrp_snmp_agent_close(void)
- {
-+ if (!snmp_running)
-+ return;
-+
- #ifdef _WITH_SNMP_VRRP_
- if (global_data->enable_snmp_vrrp)
- snmp_unregister_mib(vrrp_oid, OID_LENGTH(vrrp_oid));
-diff --git a/lib/scheduler.c b/lib/scheduler.c
-index 0a1c334c3..9090a7f88 100644
---- a/lib/scheduler.c
-+++ b/lib/scheduler.c
-@@ -1630,7 +1630,7 @@ thread_fetch_next_queue(thread_master_t *m)
- if (!ev->read) {
- log_message(LOG_INFO, "scheduler: No read thread bound on fd:%d (fl:0x%.4X)"
- , ev->fd, ep_ev->events);
-- assert(0);
-+ continue;
- }
- thread_move_ready(m, &m->read, ev->read, THREAD_READY_FD);
- ev->read = NULL;
-@@ -1641,7 +1641,7 @@ thread_fetch_next_queue(thread_master_t *m)
- if (!ev->write) {
- log_message(LOG_INFO, "scheduler: No write thread bound on fd:%d (fl:0x%.4X)"
- , ev->fd, ep_ev->events);
-- assert(0);
-+ continue;
- }
- thread_move_ready(m, &m->write, ev->write, THREAD_READY_FD);
- ev->write = NULL;
-@@ -1710,7 +1710,12 @@ process_threads(thread_master_t *m)
- thread = thread_trim_head(thread_list);
- if (!shutting_down ||
- (thread->type == THREAD_READY_FD &&
-- (thread->u.fd == m->timer_fd || thread->u.fd == m->signal_fd)) ||
-+ (thread->u.fd == m->timer_fd ||
-+ thread->u.fd == m->signal_fd
-+#ifdef _WITH_SNMP_
-+ || FD_ISSET(thread->u.fd, &m->snmp_fdset)
-+#endif
-+ )) ||
- thread->type == THREAD_CHILD ||
- thread->type == THREAD_CHILD_TIMEOUT ||
- thread->type == THREAD_CHILD_TERMINATED ||
-diff --git a/lib/utils.c b/lib/utils.c
-index 6f9ec254d..e5b82b524 100644
---- a/lib/utils.c
-+++ b/lib/utils.c
-@@ -789,7 +789,9 @@ FILE *fopen_safe(const char *path, const char *mode)
- {
- int fd;
- FILE *file;
-+#ifdef ENABLE_LOG_FILE_APPEND
- int flags = O_NOFOLLOW | O_CREAT | O_CLOEXEC;
-+#endif
- int sav_errno;
- char file_tmp_name[] = "/tmp/keepalivedXXXXXX";
-
diff --git a/sys-cluster/keepalived/keepalived-2.1.3.ebuild b/sys-cluster/keepalived/keepalived-2.1.3.ebuild
new file mode 100644
index 000000000000..12763f521185
--- /dev/null
+++ b/sys-cluster/keepalived/keepalived-2.1.3.ebuild
@@ -0,0 +1,81 @@
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit autotools systemd
+
+DESCRIPTION="A strong & robust keepalive facility to the Linux Virtual Server project"
+HOMEPAGE="https://www.keepalived.org/"
+SRC_URI="https://www.keepalived.org/software/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~hppa ~ia64 ~ppc ~ppc64 ~s390 ~sparc ~x86"
+IUSE="+bfd dbus -json regex snmp"
+
+RDEPEND="dev-libs/libnl:=
+ dev-libs/openssl:=
+ dev-libs/popt
+ net-libs/libnfnetlink
+ sys-apps/iproute2
+ regex? ( >=dev-libs/libpcre2-8 )
+ dbus? ( sys-apps/dbus dev-libs/glib:2 )
+ json? ( dev-libs/json-c:= )
+ snmp? ( net-analyzer/net-snmp )"
+DEPEND="${RDEPEND}
+ >=sys-kernel/linux-headers-4.4"
+
+DOCS=(
+ README CONTRIBUTORS INSTALL ChangeLog AUTHOR TODO
+ doc/keepalived.conf.SYNOPSIS doc/NOTE_vrrp_vmac.txt
+)
+
+src_prepare() {
+ default
+
+ eautoreconf
+}
+
+src_configure() {
+ # keepalived has support to dynamically use some libraries instead of
+ # linking them:
+ #--enable-dynamic-linking \
+ #--enable-libiptc-dynamic \
+ #--enable-libnl-dynamic \
+ #--enable-libxtables-dynamic \
+ STRIP=/bin/true \
+ econf \
+ --with-init=custom \
+ --with-kernel-dir=/usr \
+ --enable-sha1 \
+ --enable-vrrp \
+ $(use_enable bfd) \
+ $(use_enable dbus) \
+ $(use_enable json) \
+ $(use_enable regex) \
+ $(use_enable snmp) \
+ $(use_enable snmp snmp-rfc)
+}
+
+src_install() {
+ default
+
+ newinitd "${FILESDIR}"/keepalived.init-r1 keepalived
+ newconfd "${FILESDIR}"/keepalived.confd-r1 keepalived
+
+ systemd_newunit "${FILESDIR}"/${PN}.service ${PN}.service
+ systemd_install_serviced "${FILESDIR}/${PN}.service.conf"
+
+ use snmp && dodoc doc/*MIB.txt
+
+ docinto genhash
+ dodoc genhash/README genhash/AUTHOR genhash/ChangeLog
+ # This was badly named by upstream, it's more HOWTO than anything else.
+ newdoc INSTALL INSTALL+HOWTO
+
+ # Security risk to bundle SSL certs
+ rm -v "${ED}"/etc/keepalived/samples/*.pem || die
+ # Clean up sysvinit files
+ rm -rv "${ED}"/etc/sysconfig || die
+}