Gentoo Archives: gentoo-commits

From: Patrick McLean <chutzpah@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: net-firewall/nftlb/, net-firewall/nftlb/files/
Date: Fri, 01 May 2020 18:30:28
Message-Id: 1588357796.1bbae6ebce830659c0ccbd8fd2e92ab8d59bd02b.chutzpah@gentoo
1 commit: 1bbae6ebce830659c0ccbd8fd2e92ab8d59bd02b
2 Author: Patrick McLean <patrick.mclean <AT> sony <DOT> com>
3 AuthorDate: Fri May 1 18:29:38 2020 +0000
4 Commit: Patrick McLean <chutzpah <AT> gentoo <DOT> org>
5 CommitDate: Fri May 1 18:29:56 2020 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=1bbae6eb
7
8 net-firewall/nftlb: Add patch for musl (bug #720264)
9
10 Closes: https://bugs.gentoo.org/720264
11 Copyright: Sony Interactive Entertainment Inc.
12 Package-Manager: Portage-2.3.99, Repoman-2.3.22
13 Signed-off-by: Patrick McLean <chutzpah <AT> gentoo.org>
14
15 net-firewall/nftlb/files/nftlb-0.6-musl.patch | 72 +++++++++++++++++++++++++++
16 net-firewall/nftlb/nftlb-0.6.ebuild | 1 +
17 2 files changed, 73 insertions(+)
18
19 diff --git a/net-firewall/nftlb/files/nftlb-0.6-musl.patch b/net-firewall/nftlb/files/nftlb-0.6-musl.patch
20 new file mode 100644
21 index 00000000000..99990726f05
22 --- /dev/null
23 +++ b/net-firewall/nftlb/files/nftlb-0.6-musl.patch
24 @@ -0,0 +1,72 @@
25 +diff --git a/configure.ac b/configure.ac
26 +index 4e7b0a9..2396857 100644
27 +--- a/configure.ac
28 ++++ b/configure.ac
29 +@@ -2,6 +2,7 @@ AC_INIT([nftlb], [0.6], [netfilter-devel@×××××××××××.org])
30 +
31 + AC_CONFIG_AUX_DIR([build-aux])
32 + AC_CONFIG_MACRO_DIR([m4])
33 ++AC_CONFIG_HEADERS([config.h])
34 + AM_INIT_AUTOMAKE([-Wall foreign subdir-objects
35 + tar-pax no-dist-gzip dist-bzip2 1.6])
36 +
37 +@@ -25,5 +26,7 @@ AC_CHECK_HEADER([ev.h], [EVENTINC="-include ev.h"],
38 + [EVENTINC="-include libev/ev.h"],
39 + [AC_MSG_ERROR([ev.h not found])])])
40 +
41 ++AC_CHECK_HEADERS([execinfo.h])
42 ++
43 + AC_CONFIG_FILES([Makefile src/Makefile])
44 + AC_OUTPUT
45 +diff --git a/src/main.c b/src/main.c
46 +index b6b5ec4..b2a080f 100644
47 +--- a/src/main.c
48 ++++ b/src/main.c
49 +@@ -18,6 +18,7 @@
50 + * along with this program. If not, see <http://www.gnu.org/licenses/>.
51 + *
52 + */
53 ++#include "config.h"
54 +
55 + #include <stdio.h>
56 + #include <stdlib.h>
57 +@@ -26,7 +27,10 @@
58 + #include <syslog.h>
59 + #include <errno.h>
60 + #include <unistd.h>
61 ++
62 ++#ifdef HAVE_EXECINFO_H
63 + #include <execinfo.h>
64 ++#endif /* HAVE_EXECINFO_H */
65 +
66 + #include "config.h"
67 + #include "objects.h"
68 +@@ -85,6 +89,7 @@ static void nftlb_sighandler(int signo)
69 + exit(EXIT_SUCCESS);
70 + }
71 +
72 ++#ifdef HAVE_EXECINFO_H
73 + static void nftlb_trace() {
74 + void *buffer[255];
75 + char **str;
76 +@@ -106,6 +111,7 @@ static void nftlb_trace() {
77 +
78 + exit(EXIT_FAILURE);
79 + }
80 ++#endif /* HAVE_EXECINFO_H */
81 +
82 + int main(int argc, char *argv[])
83 + {
84 +@@ -157,8 +163,12 @@ int main(int argc, char *argv[])
85 +
86 + if (signal(SIGINT, nftlb_sighandler) == SIG_ERR ||
87 + signal(SIGTERM, nftlb_sighandler) == SIG_ERR ||
88 ++#ifdef HAVE_EXECINFO_H
89 + signal(SIGPIPE, SIG_IGN) == SIG_ERR ||
90 + signal(SIGSEGV, nftlb_trace) == SIG_ERR) {
91 ++#else
92 ++ signal(SIGPIPE, SIG_IGN) == SIG_ERR) {
93 ++#endif /* HAVE_EXECINFO_H */
94 + fprintf(stderr, "Error assigning signals\n");
95 + syslog(LOG_ERR, "Error assigning signals");
96 + return EXIT_FAILURE;
97
98 diff --git a/net-firewall/nftlb/nftlb-0.6.ebuild b/net-firewall/nftlb/nftlb-0.6.ebuild
99 index 2cb16c51601..99822681780 100644
100 --- a/net-firewall/nftlb/nftlb-0.6.ebuild
101 +++ b/net-firewall/nftlb/nftlb-0.6.ebuild
102 @@ -25,6 +25,7 @@ RESTRICT="test"
103
104 PATCHES=(
105 "${FILESDIR}/nftlb-0.6-tests.patch"
106 + "${FILESDIR}/nftlb-0.6-musl.patch"
107 )
108
109 pkg_setup() {