1 |
commit: 5526ee34e1764adb6e0f02d35419e78e8db37094 |
2 |
Author: Thomas Deutschmann <whissi <AT> gentoo <DOT> org> |
3 |
AuthorDate: Sat Apr 1 17:38:50 2017 +0000 |
4 |
Commit: Thomas Deutschmann <whissi <AT> gentoo <DOT> org> |
5 |
CommitDate: Sat Apr 1 17:39:26 2017 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=5526ee34 |
7 |
|
8 |
app-admin/rsyslog: Fix building without librelp (bug #614424) |
9 |
|
10 |
Package-Manager: Portage-2.3.5, Repoman-2.3.2 |
11 |
|
12 |
...g-8.24.0-fix-tcpflood-without-librelp-r1.patch} | 60 ++++++++++++---------- |
13 |
...g-8.24.0-r1.ebuild => rsyslog-8.24.0-r2.ebuild} | 2 +- |
14 |
...g-8.25.0-r1.ebuild => rsyslog-8.25.0-r2.ebuild} | 2 +- |
15 |
3 files changed, 36 insertions(+), 28 deletions(-) |
16 |
|
17 |
diff --git a/app-admin/rsyslog/files/8-stable/rsyslog-8.24.0-fix-tcpflood-without-librelp.patch b/app-admin/rsyslog/files/8-stable/rsyslog-8.24.0-fix-tcpflood-without-librelp-r1.patch |
18 |
similarity index 75% |
19 |
rename from app-admin/rsyslog/files/8-stable/rsyslog-8.24.0-fix-tcpflood-without-librelp.patch |
20 |
rename to app-admin/rsyslog/files/8-stable/rsyslog-8.24.0-fix-tcpflood-without-librelp-r1.patch |
21 |
index c3287068f0c..a03a6562722 100644 |
22 |
--- a/app-admin/rsyslog/files/8-stable/rsyslog-8.24.0-fix-tcpflood-without-librelp.patch |
23 |
+++ b/app-admin/rsyslog/files/8-stable/rsyslog-8.24.0-fix-tcpflood-without-librelp-r1.patch |
24 |
@@ -1,19 +1,27 @@ |
25 |
-From 73e3b7ab2f8a3974d31844b492ad02d61ed5727f Mon Sep 17 00:00:00 2001 |
26 |
-From: Rainer Gerhards <rgerhards@×××××××.com> |
27 |
-Date: Thu, 23 Feb 2017 13:18:44 +0100 |
28 |
-Subject: [PATCH] testbench: tcpflood failed to build if RELP support was |
29 |
- disabled |
30 |
+Patch to allow building of tcpflood without librelp |
31 |
|
32 |
-closes https://github.com/rsyslog/rsyslog/issues/1426 |
33 |
---- |
34 |
- tests/tcpflood.c | 24 +++++++++++++++++++++--- |
35 |
- 1 file changed, 21 insertions(+), 3 deletions(-) |
36 |
+Cherry pick of |
37 |
+https://github.com/rsyslog/rsyslog/commit/73e3b7ab2f8a3974d31844b492ad02d61ed5727f |
38 |
+https://github.com/rsyslog/rsyslog/pull/1493 |
39 |
|
40 |
-diff --git a/tests/tcpflood.c b/tests/tcpflood.c |
41 |
-index c500a51..aa79794 100644 |
42 |
---- a/tests/tcpflood.c |
43 |
+ |
44 |
+Gentoo-Bug: https://bugs.gentoo.org/613264 |
45 |
+Gentoo-Bug: https://bugs.gentoo.org/614424 |
46 |
+ |
47 |
+diff -u b/tests/tcpflood.c b/tests/tcpflood.c |
48 |
+--- b/tests/tcpflood.c |
49 |
+++ b/tests/tcpflood.c |
50 |
-@@ -149,7 +149,9 @@ static int numMsgsToSend = 1; /* number of messages to send */ |
51 |
+@@ -96,7 +96,9 @@ |
52 |
+ #include <string.h> |
53 |
+ #include <netinet/in.h> |
54 |
+ #include <pthread.h> |
55 |
++#ifdef ENABLE_RELP |
56 |
+ #include <librelp.h> |
57 |
++#endif |
58 |
+ #include <sys/resource.h> |
59 |
+ #include <sys/time.h> |
60 |
+ #include <errno.h> |
61 |
+@@ -149,7 +151,9 @@ |
62 |
static int numConnections = 1; /* number of connections to create */ |
63 |
static int softLimitConnections = 0; /* soft connection limit, see -c option description */ |
64 |
static int *sockArray; /* array of sockets to use */ |
65 |
@@ -23,7 +31,7 @@ index c500a51..aa79794 100644 |
66 |
static int msgNum = 0; /* initial message number to start with */ |
67 |
static int bShowProgress = 1; /* show progress messages */ |
68 |
static int bSilent = 0; /* completely silent operation */ |
69 |
-@@ -216,6 +218,7 @@ static void initTLSSess(int); |
70 |
+@@ -216,6 +220,7 @@ |
71 |
static int sendTLS(int i, char *buf, int lenBuf); |
72 |
static void closeTLSSess(int __attribute__((unused)) i); |
73 |
|
74 |
@@ -31,7 +39,7 @@ index c500a51..aa79794 100644 |
75 |
/* RELP subsystem */ |
76 |
#pragma GCC diagnostic push |
77 |
#pragma GCC diagnostic ignored "-Wformat-security" |
78 |
-@@ -235,6 +238,7 @@ initRELP_PLAIN(void) |
79 |
+@@ -235,6 +240,7 @@ |
80 |
CHKRELP(relpEngineSetEnableCmd(pRelpEngine, (unsigned char*)"syslog", |
81 |
eRelpCmdState_Required)); |
82 |
} |
83 |
@@ -39,7 +47,7 @@ index c500a51..aa79794 100644 |
84 |
|
85 |
/* prepare send subsystem for UDP send */ |
86 |
static int |
87 |
-@@ -273,6 +277,7 @@ int openConn(int *fd, const int connIdx) |
88 |
+@@ -273,6 +279,7 @@ |
89 |
port = targetPort; |
90 |
} |
91 |
if(transport == TP_RELP_PLAIN) { |
92 |
@@ -47,7 +55,7 @@ index c500a51..aa79794 100644 |
93 |
relpRetVal relp_r; |
94 |
relpClt_t *relpClt; |
95 |
char relpPort[16]; |
96 |
-@@ -286,6 +291,7 @@ int openConn(int *fd, const int connIdx) |
97 |
+@@ -286,6 +293,7 @@ |
98 |
return(1); |
99 |
} |
100 |
*fd = 1; /* mimic "all ok" state */ |
101 |
@@ -55,7 +63,7 @@ index c500a51..aa79794 100644 |
102 |
} else { /* TCP, with or without TLS */ |
103 |
if((sock=socket(AF_INET, SOCK_STREAM, 0))==-1) { |
104 |
perror("\nsocket()"); |
105 |
-@@ -336,8 +342,10 @@ int openConnections(void) |
106 |
+@@ -336,8 +344,10 @@ |
107 |
sessArray = calloc(numConnections, sizeof(gnutls_session_t)); |
108 |
# endif |
109 |
sockArray = calloc(numConnections, sizeof(int)); |
110 |
@@ -66,7 +74,7 @@ index c500a51..aa79794 100644 |
111 |
for(i = 0 ; i < numConnections ; ++i) { |
112 |
if(i % 10 == 0) { |
113 |
if(bShowProgress) |
114 |
-@@ -356,8 +364,10 @@ int openConnections(void) |
115 |
+@@ -356,8 +366,10 @@ |
116 |
* at least something. |
117 |
*/ |
118 |
if(transport == TP_RELP_PLAIN) { |
119 |
@@ -77,7 +85,7 @@ index c500a51..aa79794 100644 |
120 |
} else { /* TCP and TLS modes */ |
121 |
if(transport == TP_TLS) |
122 |
closeTLSSess(i); |
123 |
-@@ -403,14 +413,13 @@ void closeConnections(void) |
124 |
+@@ -403,14 +415,13 @@ |
125 |
|
126 |
if(bShowProgress) |
127 |
if(write(1, " close connections", sizeof(" close connections")-1)){} |
128 |
@@ -93,7 +101,7 @@ index c500a51..aa79794 100644 |
129 |
relpRetVal relpr; |
130 |
if(sockArray[i] != -1) { |
131 |
relpr = relpEngineCltDestruct(pRelpEngine, relpCltArray+i); |
132 |
-@@ -419,6 +428,7 @@ void closeConnections(void) |
133 |
+@@ -419,6 +430,7 @@ |
134 |
} |
135 |
sockArray[i] = -1; |
136 |
} |
137 |
@@ -101,7 +109,7 @@ index c500a51..aa79794 100644 |
138 |
} else { /* TCP and TLS modes */ |
139 |
if(sockArray[i] != -1) { |
140 |
/* we try to not overrun the receiver by trying to flush buffers |
141 |
-@@ -610,6 +620,7 @@ int sendMessages(struct instdata *inst) |
142 |
+@@ -610,6 +622,7 @@ |
143 |
offsSendBuf = lenBuf; |
144 |
} |
145 |
} else if(transport == TP_RELP_PLAIN) { |
146 |
@@ -109,7 +117,7 @@ index c500a51..aa79794 100644 |
147 |
relpRetVal relp_ret; |
148 |
if(sockArray[socknum] == -1) { |
149 |
/* connection was dropped, need to re-establish */ |
150 |
-@@ -627,6 +638,7 @@ int sendMessages(struct instdata *inst) |
151 |
+@@ -627,6 +640,7 @@ |
152 |
printf("\nrelpCltSendSyslog() failed with relp error code %d\n", |
153 |
relp_ret); |
154 |
} |
155 |
@@ -117,7 +125,7 @@ index c500a51..aa79794 100644 |
156 |
} |
157 |
if(lenSend != lenBuf) { |
158 |
printf("\r%5.5d\n", i); |
159 |
-@@ -1106,7 +1118,9 @@ int main(int argc, char *argv[]) |
160 |
+@@ -1106,7 +1120,9 @@ |
161 |
transport = TP_RELP_PLAIN; |
162 |
# else |
163 |
fprintf(stderr, "compiled without RELP support: " |
164 |
@@ -128,7 +136,7 @@ index c500a51..aa79794 100644 |
165 |
exit(1); |
166 |
# endif |
167 |
} else { |
168 |
-@@ -1168,7 +1182,9 @@ int main(int argc, char *argv[]) |
169 |
+@@ -1168,7 +1184,9 @@ |
170 |
if(transport == TP_TLS) { |
171 |
initTLS(); |
172 |
} else if(transport == TP_RELP_PLAIN) { |
173 |
@@ -138,7 +146,7 @@ index c500a51..aa79794 100644 |
174 |
} |
175 |
|
176 |
if(openConnections() != 0) { |
177 |
-@@ -1183,9 +1199,11 @@ int main(int argc, char *argv[]) |
178 |
+@@ -1183,9 +1201,11 @@ |
179 |
|
180 |
closeConnections(); /* this is important so that we do not finish too early! */ |
181 |
|
182 |
|
183 |
diff --git a/app-admin/rsyslog/rsyslog-8.24.0-r1.ebuild b/app-admin/rsyslog/rsyslog-8.24.0-r2.ebuild |
184 |
similarity index 99% |
185 |
rename from app-admin/rsyslog/rsyslog-8.24.0-r1.ebuild |
186 |
rename to app-admin/rsyslog/rsyslog-8.24.0-r2.ebuild |
187 |
index af14fba606d..95e5db46bf7 100644 |
188 |
--- a/app-admin/rsyslog/rsyslog-8.24.0-r1.ebuild |
189 |
+++ b/app-admin/rsyslog/rsyslog-8.24.0-r2.ebuild |
190 |
@@ -53,7 +53,7 @@ else |
191 |
doc? ( http://www.rsyslog.com/files/download/${PN}/${MY_URL_PREFIX}${PN}-doc-${MY_PV}.tar.gz -> ${MY_FILENAME_DOCS} ) |
192 |
" |
193 |
|
194 |
- PATCHES=( "${FILESDIR}"/8-stable/${PN}-8.24.0-fix-tcpflood-without-librelp.patch ) |
195 |
+ PATCHES=( "${FILESDIR}"/8-stable/${PN}-8.24.0-fix-tcpflood-without-librelp-r1.patch ) |
196 |
fi |
197 |
|
198 |
LICENSE="GPL-3 LGPL-3 Apache-2.0" |
199 |
|
200 |
diff --git a/app-admin/rsyslog/rsyslog-8.25.0-r1.ebuild b/app-admin/rsyslog/rsyslog-8.25.0-r2.ebuild |
201 |
similarity index 99% |
202 |
rename from app-admin/rsyslog/rsyslog-8.25.0-r1.ebuild |
203 |
rename to app-admin/rsyslog/rsyslog-8.25.0-r2.ebuild |
204 |
index d6a3da18e76..005d142ade3 100644 |
205 |
--- a/app-admin/rsyslog/rsyslog-8.25.0-r1.ebuild |
206 |
+++ b/app-admin/rsyslog/rsyslog-8.25.0-r2.ebuild |
207 |
@@ -53,7 +53,7 @@ else |
208 |
doc? ( http://www.rsyslog.com/files/download/${PN}/${MY_URL_PREFIX}${PN}-doc-${MY_PV}.tar.gz -> ${MY_FILENAME_DOCS} ) |
209 |
" |
210 |
|
211 |
- PATCHES=( "${FILESDIR}"/8-stable/${PN}-8.24.0-fix-tcpflood-without-librelp.patch ) |
212 |
+ PATCHES=( "${FILESDIR}"/8-stable/${PN}-8.24.0-fix-tcpflood-without-librelp-r1.patch ) |
213 |
fi |
214 |
|
215 |
LICENSE="GPL-3 LGPL-3 Apache-2.0" |