* [gentoo-commits] repo/gentoo:master commit in: net-firewall/nftlb/files/, net-firewall/nftlb/
@ 2023-01-31 23:53 Patrick McLean
0 siblings, 0 replies; 3+ messages in thread
From: Patrick McLean @ 2023-01-31 23:53 UTC (permalink / raw
To: gentoo-commits
commit: 380e498e2f0e5177be1e0aab3693e1dd716b9a50
Author: Patrick McLean <chutzpah <AT> gentoo <DOT> org>
AuthorDate: Tue Jan 31 23:52:55 2023 +0000
Commit: Patrick McLean <chutzpah <AT> gentoo <DOT> org>
CommitDate: Tue Jan 31 23:53:15 2023 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=380e498e
net-firewall/nftlb: add 1.0.8
Signed-off-by: Patrick McLean <chutzpah <AT> gentoo.org>
net-firewall/nftlb/Manifest | 1 +
net-firewall/nftlb/files/nftlb-1.0.8-musl.patch | 73 ++++++++++++++++++++++++
net-firewall/nftlb/files/nftlb-1.0.8-tests.patch | 45 +++++++++++++++
net-firewall/nftlb/nftlb-1.0.8.ebuild | 64 +++++++++++++++++++++
4 files changed, 183 insertions(+)
diff --git a/net-firewall/nftlb/Manifest b/net-firewall/nftlb/Manifest
index 4f11c545f7eb..3834aa2431d2 100644
--- a/net-firewall/nftlb/Manifest
+++ b/net-firewall/nftlb/Manifest
@@ -1,3 +1,4 @@
DIST nftlb-1.0.4.tar.gz 199236 BLAKE2B 457fc617af75513330b7c6730a3ee67061d5df4d1faf74a0d57ffaa7ef003e882136a9e0300fe61f1f0235ef752a5d695cfdf9a5e1cecf9b57553d4c9151bfd6 SHA512 89b0dba85029236f55289818c7b7ec6fe6e2e1f33003fc7fb9fa3ae763b96395827ba9d8134aa4ac80f8be0da6e17be132e9293b46c9264d9c49062e4db6688a
DIST nftlb-1.0.6.tar.gz 201767 BLAKE2B d81607ad88c88f3cf97124bf2db6ad8b210fe8f60d72661094dfbbbfc66c4b911985944f08b5483ceec420850b18cb0fe3a8fd6fa7fb76fa4da456870367cecd SHA512 63fa1e9b5fbd18e5c852adb2415dcd6e24bad899fe647641ea6e8dbca4b7c2808c939bdf5f7700a586304f3126088bb74a0fce79c72e8bc92df1e7a9c111feca
DIST nftlb-1.0.7.tar.gz 201988 BLAKE2B 794778523b3a60a351fd071e6ff129197203ddfb1b80823dd6b05c30cb530040da465a10d2ffbf11cad063c2a453bb9baebd6e689b9166d4fcb0fe9fd17760e8 SHA512 eb1e9847f340e57b75a5b8680774d8208b282faccdef48e316b2bd52b10349eeda70643386e0e899d0f6a2f506964cf1b7a7ec2d86279f83ca87a9afa8f047bc
+DIST nftlb-1.0.8.gh.tar.gz 256936 BLAKE2B 1ab9fb508c8613304ebde7185a8ad8ddabb483d17c8b872cfb7da8a0b0e5a8d40f74a74361d1d5b8304d45c00357eea1f88f2cc39e5afe537791278277462407 SHA512 f612b7065fb5011f1af34cabe0945b7b0c1479241b4673d86e2e97d06bffdfefcc5ca4ec3ad3752faa92862306ed8ad28754838236476fe9db88099bc389cf7c
diff --git a/net-firewall/nftlb/files/nftlb-1.0.8-musl.patch b/net-firewall/nftlb/files/nftlb-1.0.8-musl.patch
new file mode 100644
index 000000000000..75e84b14629b
--- /dev/null
+++ b/net-firewall/nftlb/files/nftlb-1.0.8-musl.patch
@@ -0,0 +1,73 @@
+diff --git a/configure.ac b/configure.ac
+index 8ec1711..1de7be7 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -2,6 +2,7 @@ AC_INIT([nftlb], [1.0.8], [netfilter-devel@vger.kernel.org])
+
+ AC_CONFIG_AUX_DIR([build-aux])
+ AC_CONFIG_MACRO_DIR([m4])
++AC_CONFIG_HEADERS([config.h])
+ AM_INIT_AUTOMAKE([-Wall foreign subdir-objects
+ tar-pax no-dist-gzip dist-bzip2 1.6])
+
+@@ -25,5 +26,7 @@ AC_CHECK_HEADER([ev.h], [EVENTINC="-include ev.h"],
+ [EVENTINC="-include libev/ev.h"],
+ [AC_MSG_ERROR([ev.h not found])])])
+
++AC_CHECK_HEADERS([execinfo.h])
++
+ AC_CONFIG_FILES([Makefile src/Makefile])
+ AC_OUTPUT
+diff --git a/src/main.c b/src/main.c
+index 2149e34..9ff3f7b 100644
+--- a/src/main.c
++++ b/src/main.c
+@@ -18,6 +18,7 @@
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
++#include "config.h"
+
+ #include <stdio.h>
+ #include <stdlib.h>
+@@ -25,6 +26,10 @@
+ #include <errno.h>
+ #include <unistd.h>
+
++#ifdef HAVE_EXECINFO_H
++ #include <execinfo.h>
++#endif /* HAVE_EXECINFO_H */
++
+ #include "config.h"
+ #include "objects.h"
+ #include "server.h"
+@@ -88,6 +93,7 @@ static void nftlb_sighandler(int signo)
+ exit(EXIT_SUCCESS);
+ }
+
++#ifdef HAVE_EXECINFO_H
+ static void nftlb_trace() {
+ int level;
+
+@@ -100,6 +106,7 @@ static void nftlb_trace() {
+ if (!obj_recovery())
+ exit(EXIT_FAILURE);
+ }
++#endif /* HAVE_EXECINFO_H */
+
+ static int main_process(const char *config, int mode)
+ {
+@@ -189,9 +196,13 @@ int main(int argc, char *argv[])
+
+ if (signal(SIGINT, nftlb_sighandler) == SIG_ERR ||
+ signal(SIGTERM, nftlb_sighandler) == SIG_ERR ||
++#ifdef HAVE_EXECINFO_H
+ signal(SIGPIPE, SIG_IGN) == SIG_ERR ||
+ signal(SIGABRT, nftlb_trace) == SIG_ERR ||
+ signal(SIGSEGV, nftlb_trace) == SIG_ERR) {
++#else
++ signal(SIGPIPE, SIG_IGN) == SIG_ERR) {
++#endif /* HAVE_EXECINFO_H */
+ zcu_log_print(LOG_ERR, "Error assigning signals");
+ return EXIT_FAILURE;
+ }
diff --git a/net-firewall/nftlb/files/nftlb-1.0.8-tests.patch b/net-firewall/nftlb/files/nftlb-1.0.8-tests.patch
new file mode 100644
index 000000000000..2eed096cad15
--- /dev/null
+++ b/net-firewall/nftlb/files/nftlb-1.0.8-tests.patch
@@ -0,0 +1,45 @@
+diff --git a/tests/config_exec/exec_tests.sh b/tests/config_exec/exec_tests.sh
+index f63950e..a55b467 100755
+--- a/tests/config_exec/exec_tests.sh
++++ b/tests/config_exec/exec_tests.sh
+@@ -36,6 +36,8 @@ fi
+
+ echo "-- Executing configuration tests"
+
++retval=0
++
+ for test in `ls -d ${TESTS}`; do
+ if [[ ! ${test} =~ ^..._ ]]; then
+ continue;
+@@ -58,6 +60,7 @@ for test in `ls -d ${TESTS}`; do
+
+ if [ $statusexec -ne 0 ]; then
+ echo -e "\e[31mNFT EXEC ERROR\e[0m"
++ retval=1
+ continue;
+ fi
+
+@@ -65,6 +68,7 @@ for test in `ls -d ${TESTS}`; do
+
+ if [ ! -f ${outputfile} ]; then
+ echo "Dump file doesn't exist"
++ retval=1
+ continue;
+ fi
+
+@@ -76,6 +80,7 @@ for test in `ls -d ${TESTS}`; do
+ rm -f ${reportfile}
+ else
+ echo -e "\e[31mNFT DUMP ERROR\e[0m"
++ retval=1
+ if [ $APPLY_REPORTS -eq 1 ]; then
+ cat ${reportfile} > ${outputfile}
+ echo -e "APPLIED"
+@@ -89,4 +94,7 @@ fi
+
+ if [ "`grep 'nft command error' /var/log/syslog`" != "" ]; then
+ echo -e "\e[33m* command errors found, please check syslog\e[0m"
++ retval=1
+ fi
++
++exit ${retval}
diff --git a/net-firewall/nftlb/nftlb-1.0.8.ebuild b/net-firewall/nftlb/nftlb-1.0.8.ebuild
new file mode 100644
index 000000000000..d95684584df6
--- /dev/null
+++ b/net-firewall/nftlb/nftlb-1.0.8.ebuild
@@ -0,0 +1,64 @@
+# Copyright 2020-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit linux-info autotools
+
+DESCRIPTION="nftables load balancer"
+HOMEPAGE="https://github.com/zevenet/nftlb"
+SRC_URI="https://github.com/zevenet/${PN}/archive/v${PV}.tar.gz -> ${P}.gh.tar.gz"
+
+LICENSE="AGPL-3"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+
+DEPEND="
+ net-firewall/nftables:=[modern-kernel]
+ dev-libs/jansson:=
+ dev-libs/libev:=
+"
+RDEPEND="${DEPEND}"
+
+# tests need root access
+RESTRICT="test"
+
+PATCHES=(
+ "${FILESDIR}/nftlb-1.0.8-tests.patch"
+ "${FILESDIR}/nftlb-1.0.8-musl.patch"
+)
+
+pkg_setup() {
+ local CONFIG_CHECK="
+ ~NF_TABLES
+ ~NFT_NUMGEN
+ ~NFT_HASH
+ ~NF_NAT
+ ~IP_NF_NAT
+ "
+
+ linux-info_pkg_setup
+
+ if kernel_is lt 4 19; then
+ eerror "${PN} requires kernel version 4.19 or newer"
+ fi
+}
+
+src_prepare() {
+ # there are some compiler artifacts in the tarball
+ find "${S}" -name '*.o' -delete || die
+
+ default
+ eautoreconf
+}
+
+src_test() {
+ pushd tests >/dev/null || die
+
+ sed -e "s:/var/log/syslog:\"${T}/tests.log\":" \
+ -i exec_tests.sh || die
+
+ ./exec_tests.sh || die "tests failed"
+
+ popd >/dev/null || die
+}
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: net-firewall/nftlb/files/, net-firewall/nftlb/
@ 2022-03-18 17:46 Patrick McLean
0 siblings, 0 replies; 3+ messages in thread
From: Patrick McLean @ 2022-03-18 17:46 UTC (permalink / raw
To: gentoo-commits
commit: 22ea1a2297215693cd3d7d485c1b776258c21aa2
Author: Patrick McLean <chutzpah <AT> gentoo <DOT> org>
AuthorDate: Fri Mar 18 17:44:48 2022 +0000
Commit: Patrick McLean <chutzpah <AT> gentoo <DOT> org>
CommitDate: Fri Mar 18 17:46:27 2022 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=22ea1a22
net-firewall/nftlb: add 1.0
Signed-off-by: Patrick McLean <chutzpah <AT> gentoo.org>
net-firewall/nftlb/Manifest | 1 +
net-firewall/nftlb/files/nftlb-1.0-musl.patch | 73 ++++++++++++++++++++++++++
net-firewall/nftlb/files/nftlb-1.0-tests.patch | 45 ++++++++++++++++
net-firewall/nftlb/nftlb-1.0.ebuild | 61 +++++++++++++++++++++
4 files changed, 180 insertions(+)
diff --git a/net-firewall/nftlb/Manifest b/net-firewall/nftlb/Manifest
index db2d378839cc..6fc0af900ead 100644
--- a/net-firewall/nftlb/Manifest
+++ b/net-firewall/nftlb/Manifest
@@ -1 +1,2 @@
DIST nftlb-0.6.tar.gz 121216 BLAKE2B 98b69c35070eb733a218ac1b1aaa7816de1e4f149c8447fee298b4cf50c57610c816fb178d4115e1e7af5cea0f5b20df36eb5b79655e0d7c69ff30e363985104 SHA512 95b879cfc187fe94cc6876f4af3fe77795c1e0228850cfb38b95206685d9065076b6905d365da7ec5f92773cf8f72f6e441d9140d9b10b02eaf9b6c862c31006
+DIST nftlb-1.0.tar.gz 195057 BLAKE2B b8237b7ba6f6f61dde726d53b63f2488bf38646984b252317ba0f47727ae91e5f4d58c32c0f0d609b134124efd29fdce2b9c10a981a3892220dac78c84946f48 SHA512 f93db34e4372d8f16e99650f3ade62908ce65722fadd521c6d698ab81b24502f6d82e1945b06b166876ebeb39e1907c97a40776ddf985b035b883e93f62e8766
diff --git a/net-firewall/nftlb/files/nftlb-1.0-musl.patch b/net-firewall/nftlb/files/nftlb-1.0-musl.patch
new file mode 100644
index 000000000000..399136754554
--- /dev/null
+++ b/net-firewall/nftlb/files/nftlb-1.0-musl.patch
@@ -0,0 +1,73 @@
+diff --git a/configure.ac b/configure.ac
+index 84bfd96..3f6f81d 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -2,6 +2,7 @@ AC_INIT([nftlb], [1.0], [netfilter-devel@vger.kernel.org])
+
+ AC_CONFIG_AUX_DIR([build-aux])
+ AC_CONFIG_MACRO_DIR([m4])
++AC_CONFIG_HEADERS([config.h])
+ AM_INIT_AUTOMAKE([-Wall foreign subdir-objects
+ tar-pax no-dist-gzip dist-bzip2 1.6])
+
+@@ -25,5 +26,7 @@ AC_CHECK_HEADER([ev.h], [EVENTINC="-include ev.h"],
+ [EVENTINC="-include libev/ev.h"],
+ [AC_MSG_ERROR([ev.h not found])])])
+
++AC_CHECK_HEADERS([execinfo.h])
++
+ AC_CONFIG_FILES([Makefile src/Makefile])
+ AC_OUTPUT
+diff --git a/src/main.c b/src/main.c
+index 9854f95..8e7df1d 100644
+--- a/src/main.c
++++ b/src/main.c
+@@ -18,6 +18,7 @@
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
++#include "config.h"
+
+ #include <stdio.h>
+ #include <stdlib.h>
+@@ -25,7 +26,10 @@
+ #include <string.h>
+ #include <errno.h>
+ #include <unistd.h>
++
++#ifdef HAVE_EXECINFO_H
+ #include <execinfo.h>
++#endif /* HAVE_EXECINFO_H */
+
+ #include "config.h"
+ #include "objects.h"
+@@ -88,6 +92,7 @@ static void nftlb_sighandler(int signo)
+ exit(EXIT_SUCCESS);
+ }
+
++#ifdef HAVE_EXECINFO_H
+ static void nftlb_trace() {
+ void *buffer[255];
+ char **str;
+@@ -109,6 +114,7 @@ static void nftlb_trace() {
+
+ exit(EXIT_FAILURE);
+ }
++#endif /* HAVE_EXECINFO_H */
+
+ int main(int argc, char *argv[])
+ {
+@@ -166,9 +172,13 @@ int main(int argc, char *argv[])
+
+ if (signal(SIGINT, nftlb_sighandler) == SIG_ERR ||
+ signal(SIGTERM, nftlb_sighandler) == SIG_ERR ||
++#ifdef HAVE_EXECINFO_H
+ signal(SIGPIPE, SIG_IGN) == SIG_ERR ||
+ signal(SIGABRT, nftlb_trace) == SIG_ERR ||
+ signal(SIGSEGV, nftlb_trace) == SIG_ERR) {
++#else
++ signal(SIGPIPE, SIG_IGN) == SIG_ERR) {
++#endif /* HAVE_EXECINFO_H */
+ tools_printlog(LOG_ERR, "Error assigning signals");
+ return EXIT_FAILURE;
+ }
diff --git a/net-firewall/nftlb/files/nftlb-1.0-tests.patch b/net-firewall/nftlb/files/nftlb-1.0-tests.patch
new file mode 100644
index 000000000000..48685074cb83
--- /dev/null
+++ b/net-firewall/nftlb/files/nftlb-1.0-tests.patch
@@ -0,0 +1,45 @@
+diff --git a/tests/exec_tests.sh b/tests/exec_tests.sh
+index 2a30a07..7814f5a 100755
+--- a/tests/exec_tests.sh
++++ b/tests/exec_tests.sh
+@@ -36,6 +36,8 @@ fi
+
+ echo "-- Executing configuration tests"
+
++retval=0
++
+ for test in `ls -d ${TESTS}`; do
+ if [[ ! ${test} =~ ^..._ ]]; then
+ continue;
+@@ -58,6 +60,7 @@ for test in `ls -d ${TESTS}`; do
+
+ if [ $statusexec -ne 0 ]; then
+ echo -e "\e[31mNFT EXEC ERROR\e[0m"
++ retval=1
+ continue;
+ fi
+
+@@ -65,6 +68,7 @@ for test in `ls -d ${TESTS}`; do
+
+ if [ ! -f ${outputfile} ]; then
+ echo "Dump file doesn't exist"
++ retval=1
+ continue;
+ fi
+
+@@ -76,6 +80,7 @@ for test in `ls -d ${TESTS}`; do
+ rm -f ${reportfile}
+ else
+ echo -e "\e[31mNFT DUMP ERROR\e[0m"
++ retval=1
+ if [ $APPLY_REPORTS -eq 1 ]; then
+ cat ${reportfile} > ${outputfile}
+ echo -e "APPLIED"
+@@ -89,4 +94,7 @@ fi
+
+ if [ "`grep 'nft command error' /var/log/syslog`" != "" ]; then
+ echo -e "\e[33m* command errors found, please check syslog\e[0m"
++ retval=1
+ fi
++
++exit ${retval}
diff --git a/net-firewall/nftlb/nftlb-1.0.ebuild b/net-firewall/nftlb/nftlb-1.0.ebuild
new file mode 100644
index 000000000000..f1e9170bcbc4
--- /dev/null
+++ b/net-firewall/nftlb/nftlb-1.0.ebuild
@@ -0,0 +1,61 @@
+# Copyright 2020-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit linux-info autotools
+
+DESCRIPTION="nftables load balancer"
+HOMEPAGE="https://github.com/zevenet/nftlb"
+SRC_URI="https://github.com/zevenet/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="AGPL-3"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+
+DEPEND="
+ net-firewall/nftables:=[modern-kernel]
+ dev-libs/jansson:=
+ dev-libs/libev:=
+"
+RDEPEND="${DEPEND}"
+
+# tests need root access
+RESTRICT="test"
+
+PATCHES=(
+ "${FILESDIR}/nftlb-1.0-tests.patch"
+ "${FILESDIR}/nftlb-1.0-musl.patch"
+)
+
+pkg_setup() {
+ local CONFIG_CHECK="
+ ~NF_TABLES
+ ~NFT_NUMGEN
+ ~NFT_HASH
+ ~NF_NAT
+ ~IP_NF_NAT
+ "
+
+ linux-info_pkg_setup
+
+ if kernel_is lt 4 19; then
+ eerror "${PN} requires kernel version 4.19 or newer"
+ fi
+}
+
+src_prepare() {
+ default
+ eautoreconf
+}
+
+src_test() {
+ pushd tests >/dev/null || die
+
+ sed -e "s:/var/log/syslog:\"${T}/tests.log\":" \
+ -i exec_tests.sh || die
+
+ ./exec_tests.sh || die "tests failed"
+
+ popd >/dev/null || die
+}
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: net-firewall/nftlb/files/, net-firewall/nftlb/
@ 2020-04-30 22:45 Patrick McLean
0 siblings, 0 replies; 3+ messages in thread
From: Patrick McLean @ 2020-04-30 22:45 UTC (permalink / raw
To: gentoo-commits
commit: aa21372a486469fc40fab5a32e618cbbcb4bae56
Author: Patrick McLean <patrick.mclean <AT> sony <DOT> com>
AuthorDate: Thu Apr 30 22:45:23 2020 +0000
Commit: Patrick McLean <chutzpah <AT> gentoo <DOT> org>
CommitDate: Thu Apr 30 22:45:33 2020 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=aa21372a
net-firewall/nftlb: New package
Copyright: Sony Interactive Entertainment Inc.
Package-Manager: Portage-2.3.99, Repoman-2.3.22
Signed-off-by: Patrick McLean <chutzpah <AT> gentoo.org>
net-firewall/nftlb/Manifest | 1 +
net-firewall/nftlb/files/nftlb-0.6-tests.patch | 47 ++++++++++++++++++++++
net-firewall/nftlb/metadata.xml | 8 ++++
net-firewall/nftlb/nftlb-0.6.ebuild | 55 ++++++++++++++++++++++++++
4 files changed, 111 insertions(+)
diff --git a/net-firewall/nftlb/Manifest b/net-firewall/nftlb/Manifest
new file mode 100644
index 00000000000..db2d378839c
--- /dev/null
+++ b/net-firewall/nftlb/Manifest
@@ -0,0 +1 @@
+DIST nftlb-0.6.tar.gz 121216 BLAKE2B 98b69c35070eb733a218ac1b1aaa7816de1e4f149c8447fee298b4cf50c57610c816fb178d4115e1e7af5cea0f5b20df36eb5b79655e0d7c69ff30e363985104 SHA512 95b879cfc187fe94cc6876f4af3fe77795c1e0228850cfb38b95206685d9065076b6905d365da7ec5f92773cf8f72f6e441d9140d9b10b02eaf9b6c862c31006
diff --git a/net-firewall/nftlb/files/nftlb-0.6-tests.patch b/net-firewall/nftlb/files/nftlb-0.6-tests.patch
new file mode 100644
index 00000000000..05baa7ee03a
--- /dev/null
+++ b/net-firewall/nftlb/files/nftlb-0.6-tests.patch
@@ -0,0 +1,47 @@
+diff --git a/tests/exec_tests.sh b/tests/exec_tests.sh
+index d96eaa3..b7f812d 100755
+--- a/tests/exec_tests.sh
++++ b/tests/exec_tests.sh
+@@ -33,6 +33,8 @@ fi
+
+ echo "-- Executing configuration tests"
+
++retval=0
++
+ for test in `ls -d ${TESTS}`; do
+ if [[ ! ${test} =~ ^..._ ]]; then
+ continue;
+@@ -55,14 +57,16 @@ for test in `ls -d ${TESTS}`; do
+
+ if [ $statusexec -ne 0 ]; then
+ echo -e "\e[31mNFT EXEC ERROR\e[0m"
++ retval=1
+ continue;
+ fi
+
+ #~ nftfile=`echo ${file} | awk -F'.' '{ print $1 }'`
+- $NFTBIN list ruleset > ${reportfile}
++ $NFTBIN list ruleset > ${reportfile} || retval=1
+
+ if [ ! -f ${outputfile} ]; then
+ echo "Dump file doesn't exist"
++ retval=1
+ continue;
+ fi
+
+@@ -74,6 +78,7 @@ for test in `ls -d ${TESTS}`; do
+ rm -f ${reportfile}
+ else
+ echo -e "\e[31mNFT DUMP ERROR\e[0m"
++ retval=1
+ fi
+ done
+
+@@ -83,4 +88,7 @@ fi
+
+ if [ "`grep 'nft command error' /var/log/syslog`" != "" ]; then
+ echo -e "\e[33m* command errors found, please check syslog\e[0m"
++ retval=1
+ fi
++
++exit ${retval}
diff --git a/net-firewall/nftlb/metadata.xml b/net-firewall/nftlb/metadata.xml
new file mode 100644
index 00000000000..56cae167d37
--- /dev/null
+++ b/net-firewall/nftlb/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="person">
+ <email>chutzpah@gentoo.org</email>
+ <name>Patrick McLean</name>
+ </maintainer>
+</pkgmetadata>
diff --git a/net-firewall/nftlb/nftlb-0.6.ebuild b/net-firewall/nftlb/nftlb-0.6.ebuild
new file mode 100644
index 00000000000..2cb16c51601
--- /dev/null
+++ b/net-firewall/nftlb/nftlb-0.6.ebuild
@@ -0,0 +1,55 @@
+# Copyright 2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit linux-info autotools
+
+DESCRIPTION="nftables load balancer"
+HOMEPAGE="https://github.com/zevenet/nftlb"
+SRC_URI="https://github.com/zevenet/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="AGPL-3"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+
+DEPEND="
+ net-firewall/nftables:=[modern-kernel]
+ dev-libs/jansson:=
+ dev-libs/libev:=
+"
+RDEPEND="${DEPEND}"
+
+# tests need root access
+RESTRICT="test"
+
+PATCHES=(
+ "${FILESDIR}/nftlb-0.6-tests.patch"
+)
+
+pkg_setup() {
+ local CONFIG_CHECK="~NF_TABLES ~NFT_NUMGEN
+ ~NFT_HASH ~NF_NAT ~IP_NF_NAT"
+
+ linux-info_pkg_setup
+
+ if kernel_is lt 4 19; then
+ eerror "${PN} requires kernel version 4.19 or newer"
+ fi
+}
+
+src_prepare() {
+ default
+ eautoreconf
+}
+
+src_test() {
+ pushd tests >/dev/null || die
+
+ sed -e "s:/var/log/syslog:\"${T}/tests.log\":" \
+ -i exec_tests.sh || die
+
+ ./exec_tests.sh || die "tests failed"
+
+ popd >/dev/null || die
+}
^ permalink raw reply related [flat|nested] 3+ messages in thread
end of thread, other threads:[~2023-01-31 23:53 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-01-31 23:53 [gentoo-commits] repo/gentoo:master commit in: net-firewall/nftlb/files/, net-firewall/nftlb/ Patrick McLean
-- strict thread matches above, loose matches on Subject: below --
2022-03-18 17:46 Patrick McLean
2020-04-30 22:45 Patrick McLean
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox