1 |
commit: 3109511a3326008f8eea588d8e4db981780ee006 |
2 |
Author: Thomas Deutschmann <whissi <AT> gentoo <DOT> org> |
3 |
AuthorDate: Sat Aug 10 20:28:28 2019 +0000 |
4 |
Commit: Thomas Deutschmann <whissi <AT> gentoo <DOT> org> |
5 |
CommitDate: Sat Aug 10 20:29:12 2019 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=3109511a |
7 |
|
8 |
app-admin/rsyslog: drop old |
9 |
|
10 |
Package-Manager: Portage-2.3.71, Repoman-2.3.17 |
11 |
Signed-off-by: Thomas Deutschmann <whissi <AT> gentoo.org> |
12 |
|
13 |
app-admin/rsyslog/Manifest | 12 - |
14 |
.../files/rsyslog-8.1903.0-add-missing-tests.patch | 736 --------------------- |
15 |
...g-8.1903.0-add-py3-support-to-omhttp-test.patch | 83 --- |
16 |
...8.1903.0-fix-py3-compatibility-in-diag.sh.patch | 22 - |
17 |
...-8.38.0-fix-omprog-output-capture-mt-test.patch | 66 -- |
18 |
...slog-8.39.0-fix-liblogging_stdlog-linking.patch | 321 --------- |
19 |
.../files/rsyslog-8.40.0-fix-omusrmsg.patch | 13 - |
20 |
app-admin/rsyslog/rsyslog-8.1901.0.ebuild | 457 ------------- |
21 |
app-admin/rsyslog/rsyslog-8.1903.0.ebuild | 463 ------------- |
22 |
app-admin/rsyslog/rsyslog-8.1905.0.ebuild | 463 ------------- |
23 |
app-admin/rsyslog/rsyslog-8.38.0-r2.ebuild | 456 ------------- |
24 |
app-admin/rsyslog/rsyslog-8.39.0-r1.ebuild | 459 ------------- |
25 |
app-admin/rsyslog/rsyslog-8.40.0-r1.ebuild | 457 ------------- |
26 |
13 files changed, 4008 deletions(-) |
27 |
|
28 |
diff --git a/app-admin/rsyslog/Manifest b/app-admin/rsyslog/Manifest |
29 |
index 33325242c61..31b25f54a46 100644 |
30 |
--- a/app-admin/rsyslog/Manifest |
31 |
+++ b/app-admin/rsyslog/Manifest |
32 |
@@ -1,16 +1,4 @@ |
33 |
-DIST rsyslog-8.1901.0.tar.gz 2750872 BLAKE2B 8bc07bd0c73cf309b5fb853e3bc66e555dee4284d0c8ede5b73420db7b42758f5fcfbc7ca90b618cc27e7067795f2725f5ed96f59170f3d2690a0653f2b69847 SHA512 2b8b2d40d3df4c47dba765d70fc716dc127ce776b31f217f78a3e1c2bf820e41799a5069d7f41f04ce39baead286ecd42fb353492873e3795aff704d686d67cb |
34 |
-DIST rsyslog-8.1903.0.tar.gz 2786605 BLAKE2B 2c60450b5f5a54f3d4fe4f9f51c81145cdebb1b0e1dd4b76f2ad23803c8bb417affbdcc9b4a0d8ccb65b0e98f5cb5cf187ce219be3e44e44c5bd253cae5f95dc SHA512 0f698c264a4afba56467b341c094be7357fba08a6ee7a24bb1b053c06da04e83eb1832ee46b68ea21f8f4de841cd97aaadc46e78bb4adfe23604c9fe95103fa9 |
35 |
DIST rsyslog-8.1904.0.tar.gz 2902708 BLAKE2B 515d5e32c2dc6cdd8dd51fc595ad775503438603f28828e9f1a427b184a5a61de32af2ee90334b7d56a9404106d74da47386a18a370278d5a16422a6bb09f556 SHA512 cccb48f06508d7e7c2dd788903f4d7ddb3020cdf6079aea1d52387c56b920f10b08957a79b5d420ccdb54cae50d1da6e5eb80cde9498bceaeda4f6ce37f694fd |
36 |
-DIST rsyslog-8.1905.0.tar.gz 2911703 BLAKE2B 5767ff2e5f1104522bde2178ecadfacac3d0754fd746754b7b29509aea45c40b17cb37d0323e6b1116fc95f2e7b1f43277ef9c96695bdf89805f9ba90944f608 SHA512 e014d48c213723317b8d07e3083e32a480e2b896eccc0dc7a491798cf56fcc1e341acba64ab44c1d935e964082c405f2f1135bd420d821e163c148e736332d0b |
37 |
DIST rsyslog-8.1907.0.tar.gz 2926855 BLAKE2B 65c674e53bfa960e3fe5c7f41a304cf8736fe72e2391895dde9fdc17fabeb2f92fccab48965d5e1689a5852136a43a3355f89c9fa9d1d1974335ce80204bb4ac SHA512 2aa3f6106e48fa63c6d4389f83e7a3212817c626d04881682236055792cf5c9d8a941638c9a508c470b6a24c934ef5cb0eda65ea25179d98831afbe2a27c1519 |
38 |
-DIST rsyslog-8.38.0.tar.gz 2721798 BLAKE2B 578bc9eefce4893a9c1eb54ee7360cd9fa51b3c87ffe07a0fd5b122987f991835f603417243084de0b59286e993ad1c84237e61c44bc18457b3660668421101b SHA512 9dc3bdc4ef01c2af433478e182704694cb50849d811d476a03e4ce03b3c5aecfb506e7f1c1e51fadcd63da60b067d8011b92b8c9354a688fe66f7b6ffd8f9254 |
39 |
-DIST rsyslog-8.39.0.tar.gz 2721560 BLAKE2B 0680cb31d0a07e5676a5c5626e46fa174b8df08ceec49b514624ff8ffeb750bbf199f73af1d89b9dfad121a292084d75b0a1218fb33138f1d7a149fd730cb3d9 SHA512 f46ead433f703df4af6ddc4bbb178ea145d7d2a35ee7749c32b9889f299ba20c83ed76c246530608198e84fef1f2bf10097344c31d5df38b9e0ae47cf4bee479 |
40 |
-DIST rsyslog-8.40.0.tar.gz 2726022 BLAKE2B 33f7f2018200a20b01dbfabeeab592aa09d530edd313bb13f16c47cf3f67aebd9c465af3f1e468ca3d352cd83e4f4eee567c6fd54bbaee1723bee56f4631b440 SHA512 3d5d4f92e37ad9bf3767d5d7fc87fcb7956656f676a9495c78abd12fe9072ec8763b50543b198308a71d5d919721fb9b84b6725dd83a9d9b8a1639d81382c0dd |
41 |
-DIST rsyslog-doc-8.1901.0.tar.gz 7768575 BLAKE2B 40bc8b038fd0210d0cac01704624d87c2a73701a7494e5970423adf14948e46d1cff6df5894a82e6664d891d0c2760a5a0154bc42fb410ecf6dd25f3166e17b8 SHA512 afcc592ce4bf0dbe048786627d87b783f1c99e7711c44ffcc41cde67b2b2fef55c944b5c90e7272a84bbec95b78c0174df634b02baad2ac5819b3611efc1cb98 |
42 |
-DIST rsyslog-doc-8.1903.0.tar.gz 7816457 BLAKE2B 0628a5e7f0a2c8229470f6b05c22fa0d01de12eace4f895e17a47e7003bf078be5f3b2df15cd13a4cf53384d285b558b0936308cb58e7c7e71796ca99447da3e SHA512 b42f950499798fd2bbf9e2ac2da074781955cc552628edcd928f25943b6b80d5f2e1a2eab3b8fb0fa2f6278f2b4366f096c3e976a91223e545b4306479ca4f5d |
43 |
DIST rsyslog-doc-8.1904.0.tar.gz 8042650 BLAKE2B 585fe5c63eee1fb46f94dcd3d529045b3900e08c291e0e71ed9bf32a6200e6c7283820b262bd56e9aeb74cc227ecd518caafec5a8f87c1d8523d5d7fd95030aa SHA512 da0ff00fbe71756b3c27fd8b94e88611452c3ba611e583862556393faaaa596ca8f32f694ad40a3e1df67385d9f9ca80db6a58f5d2e336fe95639dd7cd0de828 |
44 |
-DIST rsyslog-doc-8.1905.0.tar.gz 8054440 BLAKE2B 76f832fcbb41d405240f7bce4796edf4a56da5ff809ed846edbbb1b780a35837a8d061519dbec2e7afbe46a71f617d5f92f431f45f6723c055bab2fdf0df28fb SHA512 7b468aaa79a2098746bc5592f2c03270aaacb07dd06fd3be7a8c62bfe531b266e27265d873290f9a6bfb26135a4a6c49be96177a3449ff7dba54f1193c452ad3 |
45 |
DIST rsyslog-doc-8.1907.0.tar.gz 8071764 BLAKE2B 90c18a93bb2f2c9158a4696245c44c36ab4c40597d1eb8df8af257f57aa17e71436bd60792c4f982ebc15395abacd53281046e4ae6df65c306f815e6599fb8bc SHA512 72dcddef6e36a92d2bdcf54072fff7516b6c731f43a53ef8f5d4ebdbe46bc7aeb63bbc3e739a6e5897602ea7705c4bdd8f57aa10796955ed772a6c7cf552c5e5 |
46 |
-DIST rsyslog-doc-8.38.0.tar.gz 7662314 BLAKE2B 57a121950a3f6630e4736a1ff998e93b543389107d146ddb148ecd2702bb208d21a7f4d77f2fd958f2a56e092341fc6a24ed1cc80a910cb1adb54c65b5b2da04 SHA512 e28a09ae2fcddc711d2cfd31207c9862192598e49964a47b41fc8fa3ae5b1e08b7e2589fb5af859d58d4bf028574eb56cac6514401aa56cb482fa1166863e6a5 |
47 |
-DIST rsyslog-doc-8.39.0.tar.gz 7674833 BLAKE2B 1526e0637c3ab9846f447dcea48efbfd17aa517c2fc875c46ac190428db6aa2a0f81f8aaed6e5b0b6991a5c13f45bc818be76c0fe4444c0eb45628ebf48b4956 SHA512 a6d09d384616a264fdf6e09fa0f61bd82a42340bac426d93119e11158f293dd58f894623aca30f2137e51bf701531f07938d014c9b8ec97d0a796447de3089de |
48 |
-DIST rsyslog-doc-8.40.0.tar.gz 7709769 BLAKE2B cda3bbd005120e7100bb36cf4c0f99d3a037525c5451ead5957f4dfe06eaceeba8fb2e266f53203bee6fae97898774ee17862a52ca1dae99aeb3534bbfadcd60 SHA512 2e2f37336948984a8cf0e098eb46e61fe4de6366d63a98204ecd558f4e21b7c1f222659f7bdecdd22e0a61d34c442b4734dbe72a72e8716c768a900b954d473f |
49 |
|
50 |
diff --git a/app-admin/rsyslog/files/rsyslog-8.1903.0-add-missing-tests.patch b/app-admin/rsyslog/files/rsyslog-8.1903.0-add-missing-tests.patch |
51 |
deleted file mode 100644 |
52 |
index da9c79c6829..00000000000 |
53 |
--- a/app-admin/rsyslog/files/rsyslog-8.1903.0-add-missing-tests.patch |
54 |
+++ /dev/null |
55 |
@@ -1,736 +0,0 @@ |
56 |
---- /dev/null |
57 |
-+++ b/tests/omhttp-auth-vg.sh |
58 |
-@@ -0,0 +1,3 @@ |
59 |
-+#!/bin/bash |
60 |
-+export USE_VALGRIND="YES" |
61 |
-+source ${srcdir:=.}/omhttp-auth.sh |
62 |
---- /dev/null |
63 |
-+++ b/tests/omhttp-auth.sh |
64 |
-@@ -0,0 +1,45 @@ |
65 |
-+#!/bin/bash |
66 |
-+# This file is part of the rsyslog project, released under ASL 2.0 |
67 |
-+ |
68 |
-+# Starting actual testbench |
69 |
-+. ${srcdir:=.}/diag.sh init |
70 |
-+ |
71 |
-+export NUMMESSAGES=100 |
72 |
-+ |
73 |
-+port="$(get_free_port)" |
74 |
-+omhttp_start_server $port --userpwd="bob:bobbackwards" |
75 |
-+ |
76 |
-+generate_conf |
77 |
-+add_conf ' |
78 |
-+template(name="tpl" type="string" |
79 |
-+ string="{\"msgnum\":\"%msg:F,58:2%\"}") |
80 |
-+ |
81 |
-+module(load="../contrib/omhttp/.libs/omhttp") |
82 |
-+ |
83 |
-+if $msg contains "msgnum:" then |
84 |
-+ action( |
85 |
-+ # Payload |
86 |
-+ name="my_http_action" |
87 |
-+ type="omhttp" |
88 |
-+ errorfile="'$RSYSLOG_DYNNAME/omhttp.error.log'" |
89 |
-+ template="tpl" |
90 |
-+ |
91 |
-+ server="localhost" |
92 |
-+ serverport="'$port'" |
93 |
-+ restpath="my/endpoint" |
94 |
-+ batch="off" |
95 |
-+ |
96 |
-+ # Auth |
97 |
-+ usehttps="off" |
98 |
-+ uid="bob" |
99 |
-+ pwd="bobbackwards" |
100 |
-+ ) |
101 |
-+' |
102 |
-+startup |
103 |
-+injectmsg |
104 |
-+shutdown_when_empty |
105 |
-+wait_shutdown |
106 |
-+omhttp_get_data $port my/endpoint |
107 |
-+omhttp_stop_server |
108 |
-+seq_check |
109 |
-+exit_test |
110 |
---- /dev/null |
111 |
-+++ b/tests/omhttp-basic-vg.sh |
112 |
-@@ -0,0 +1,3 @@ |
113 |
-+#!/bin/bash |
114 |
-+export USE_VALGRIND="YES" |
115 |
-+source ${srcdir:=.}/omhttp-basic.sh |
116 |
---- /dev/null |
117 |
-+++ b/tests/omhttp-basic.sh |
118 |
-@@ -0,0 +1,43 @@ |
119 |
-+#!/bin/bash |
120 |
-+# This file is part of the rsyslog project, released under ASL 2.0 |
121 |
-+ |
122 |
-+# Starting actual testbench |
123 |
-+. ${srcdir:=.}/diag.sh init |
124 |
-+ |
125 |
-+export NUMMESSAGES=10000 |
126 |
-+ |
127 |
-+port="$(get_free_port)" |
128 |
-+omhttp_start_server $port |
129 |
-+ |
130 |
-+generate_conf |
131 |
-+add_conf ' |
132 |
-+template(name="tpl" type="string" |
133 |
-+ string="{\"msgnum\":\"%msg:F,58:2%\"}") |
134 |
-+ |
135 |
-+module(load="../contrib/omhttp/.libs/omhttp") |
136 |
-+ |
137 |
-+if $msg contains "msgnum:" then |
138 |
-+ action( |
139 |
-+ # Payload |
140 |
-+ name="my_http_action" |
141 |
-+ type="omhttp" |
142 |
-+ errorfile="'$RSYSLOG_DYNNAME/omhttp.error.log'" |
143 |
-+ template="tpl" |
144 |
-+ |
145 |
-+ server="localhost" |
146 |
-+ serverport="'$port'" |
147 |
-+ restpath="my/endpoint" |
148 |
-+ batch="off" |
149 |
-+ |
150 |
-+ # Auth |
151 |
-+ usehttps="off" |
152 |
-+ ) |
153 |
-+' |
154 |
-+startup |
155 |
-+injectmsg |
156 |
-+shutdown_when_empty |
157 |
-+wait_shutdown |
158 |
-+omhttp_get_data $port my/endpoint |
159 |
-+omhttp_stop_server |
160 |
-+seq_check |
161 |
-+exit_test |
162 |
---- /dev/null |
163 |
-+++ b/tests/omhttp-batch-fail-with-400.sh |
164 |
-@@ -0,0 +1,52 @@ |
165 |
-+#!/bin/bash |
166 |
-+# This file is part of the rsyslog project, released under ASL 2.0 |
167 |
-+ |
168 |
-+# Starting actual testbench |
169 |
-+. ${srcdir:=.}/diag.sh init |
170 |
-+ |
171 |
-+port="$(get_free_port)" |
172 |
-+omhttp_start_server $port --fail-with-400-after 1000 |
173 |
-+ |
174 |
-+generate_conf |
175 |
-+add_conf ' |
176 |
-+module(load="../contrib/omhttp/.libs/omhttp") |
177 |
-+ |
178 |
-+main_queue(queue.dequeueBatchSize="2048") |
179 |
-+ |
180 |
-+template(name="tpl" type="string" |
181 |
-+ string="{\"msgnum\":\"%msg:F,58:2%\"}") |
182 |
-+ |
183 |
-+# Wrap message as a single batch for retry |
184 |
-+template(name="tpl_retry" type="string" string="[%msg%]") |
185 |
-+ |
186 |
-+ |
187 |
-+ruleset(name="ruleset_omhttp") { |
188 |
-+ action( |
189 |
-+ name="action_omhttp" |
190 |
-+ type="omhttp" |
191 |
-+ errorfile="'$RSYSLOG_DYNNAME/omhttp.error.log'" |
192 |
-+ template="tpl" |
193 |
-+ |
194 |
-+ server="localhost" |
195 |
-+ serverport="'$port'" |
196 |
-+ restpath="my/endpoint" |
197 |
-+ batch="off" |
198 |
-+ |
199 |
-+ retry="on" |
200 |
-+ |
201 |
-+ # Auth |
202 |
-+ usehttps="off" |
203 |
-+ ) & stop |
204 |
-+} |
205 |
-+ |
206 |
-+if $msg contains "msgnum:" then |
207 |
-+ call ruleset_omhttp |
208 |
-+' |
209 |
-+startup |
210 |
-+injectmsg 0 10000 |
211 |
-+shutdown_when_empty |
212 |
-+wait_shutdown |
213 |
-+omhttp_get_data $port my/endpoint |
214 |
-+omhttp_stop_server |
215 |
-+seq_check 0 999 |
216 |
-+exit_test |
217 |
---- /dev/null |
218 |
-+++ b/tests/omhttp-batch-jsonarray-compress-vg.sh |
219 |
-@@ -0,0 +1,3 @@ |
220 |
-+#!/bin/bash |
221 |
-+export USE_VALGRIND="YES" |
222 |
-+source ${srcdir:=.}/omhttp-batch-jsonarray-compress.sh |
223 |
---- /dev/null |
224 |
-+++ b/tests/omhttp-batch-jsonarray-compress.sh |
225 |
-@@ -0,0 +1,48 @@ |
226 |
-+#!/bin/bash |
227 |
-+# This file is part of the rsyslog project, released under ASL 2.0 |
228 |
-+ |
229 |
-+# Starting actual testbench |
230 |
-+. ${srcdir:=.}/diag.sh init |
231 |
-+ |
232 |
-+export NUMMESSAGES=50000 |
233 |
-+ |
234 |
-+port="$(get_free_port)" |
235 |
-+omhttp_start_server $port --decompress |
236 |
-+ |
237 |
-+generate_conf |
238 |
-+add_conf ' |
239 |
-+template(name="tpl" type="string" |
240 |
-+ string="{\"msgnum\":\"%msg:F,58:2%\"}") |
241 |
-+ |
242 |
-+module(load="../contrib/omhttp/.libs/omhttp") |
243 |
-+ |
244 |
-+main_queue(queue.dequeueBatchSize="2048") |
245 |
-+ |
246 |
-+if $msg contains "msgnum:" then |
247 |
-+ action( |
248 |
-+ # Payload |
249 |
-+ name="my_http_action" |
250 |
-+ type="omhttp" |
251 |
-+ errorfile="'$RSYSLOG_DYNNAME/omhttp.error.log'" |
252 |
-+ template="tpl" |
253 |
-+ |
254 |
-+ server="localhost" |
255 |
-+ serverport="'$port'" |
256 |
-+ restpath="my/endpoint" |
257 |
-+ batch="on" |
258 |
-+ batch.format="jsonarray" |
259 |
-+ batch.maxsize="1000" |
260 |
-+ compress="on" |
261 |
-+ |
262 |
-+ # Auth |
263 |
-+ usehttps="off" |
264 |
-+ ) |
265 |
-+' |
266 |
-+startup |
267 |
-+injectmsg |
268 |
-+shutdown_when_empty |
269 |
-+wait_shutdown |
270 |
-+omhttp_get_data $port my/endpoint jsonarray |
271 |
-+omhttp_stop_server |
272 |
-+seq_check |
273 |
-+exit_test |
274 |
---- /dev/null |
275 |
-+++ b/tests/omhttp-batch-jsonarray-retry-vg.sh |
276 |
-@@ -0,0 +1,3 @@ |
277 |
-+#!/bin/bash |
278 |
-+export USE_VALGRIND="YES" |
279 |
-+source ${srcdir:=.}/omhttp-batch-jsonarray-retry.sh |
280 |
---- /dev/null |
281 |
-+++ b/tests/omhttp-batch-jsonarray-retry.sh |
282 |
-@@ -0,0 +1,78 @@ |
283 |
-+#!/bin/bash |
284 |
-+# This file is part of the rsyslog project, released under ASL 2.0 |
285 |
-+ |
286 |
-+# Starting actual testbench |
287 |
-+. ${srcdir:=.}/diag.sh init |
288 |
-+ |
289 |
-+export NUMMESSAGES=50000 |
290 |
-+ |
291 |
-+port="$(get_free_port)" |
292 |
-+omhttp_start_server $port --fail-every 100 |
293 |
-+ |
294 |
-+generate_conf |
295 |
-+add_conf ' |
296 |
-+module(load="../contrib/omhttp/.libs/omhttp") |
297 |
-+ |
298 |
-+main_queue(queue.dequeueBatchSize="2048") |
299 |
-+ |
300 |
-+template(name="tpl" type="string" |
301 |
-+ string="{\"msgnum\":\"%msg:F,58:2%\"}") |
302 |
-+ |
303 |
-+# Echo message as-is for retry |
304 |
-+template(name="tpl_echo" type="string" string="%msg%") |
305 |
-+ |
306 |
-+ruleset(name="ruleset_omhttp_retry") { |
307 |
-+ action( |
308 |
-+ name="action_omhttp" |
309 |
-+ type="omhttp" |
310 |
-+ errorfile="'$RSYSLOG_DYNNAME/omhttp.error.log'" |
311 |
-+ template="tpl_echo" |
312 |
-+ |
313 |
-+ server="localhost" |
314 |
-+ serverport="'$port'" |
315 |
-+ restpath="my/endpoint" |
316 |
-+ batch="on" |
317 |
-+ batch.maxsize="100" |
318 |
-+ batch.format="jsonarray" |
319 |
-+ |
320 |
-+ retry="on" |
321 |
-+ retry.ruleset="ruleset_omhttp_retry" |
322 |
-+ |
323 |
-+ # Auth |
324 |
-+ usehttps="off" |
325 |
-+ ) & stop |
326 |
-+} |
327 |
-+ |
328 |
-+ruleset(name="ruleset_omhttp") { |
329 |
-+ action( |
330 |
-+ name="action_omhttp" |
331 |
-+ type="omhttp" |
332 |
-+ errorfile="'$RSYSLOG_DYNNAME/omhttp.error.log'" |
333 |
-+ template="tpl" |
334 |
-+ |
335 |
-+ server="localhost" |
336 |
-+ serverport="'$port'" |
337 |
-+ restpath="my/endpoint" |
338 |
-+ batch="on" |
339 |
-+ batch.maxsize="100" |
340 |
-+ batch.format="jsonarray" |
341 |
-+ |
342 |
-+ retry="on" |
343 |
-+ retry.ruleset="ruleset_omhttp_retry" |
344 |
-+ |
345 |
-+ # Auth |
346 |
-+ usehttps="off" |
347 |
-+ ) & stop |
348 |
-+} |
349 |
-+ |
350 |
-+if $msg contains "msgnum:" then |
351 |
-+ call ruleset_omhttp |
352 |
-+' |
353 |
-+startup |
354 |
-+injectmsg |
355 |
-+shutdown_when_empty |
356 |
-+wait_shutdown |
357 |
-+omhttp_get_data $port my/endpoint jsonarray |
358 |
-+omhttp_stop_server |
359 |
-+seq_check |
360 |
-+exit_test |
361 |
---- /dev/null |
362 |
-+++ b/tests/omhttp-batch-jsonarray-vg.sh |
363 |
-@@ -0,0 +1,3 @@ |
364 |
-+#!/bin/bash |
365 |
-+export USE_VALGRIND="YES" |
366 |
-+source ${srcdir:=.}/omhttp-batch-jsonarray.sh |
367 |
---- /dev/null |
368 |
-+++ b/tests/omhttp-batch-jsonarray.sh |
369 |
-@@ -0,0 +1,47 @@ |
370 |
-+#!/bin/bash |
371 |
-+# This file is part of the rsyslog project, released under ASL 2.0 |
372 |
-+ |
373 |
-+# Starting actual testbench |
374 |
-+. ${srcdir:=.}/diag.sh init |
375 |
-+ |
376 |
-+export NUMMESSAGES=50000 |
377 |
-+ |
378 |
-+port="$(get_free_port)" |
379 |
-+omhttp_start_server $port |
380 |
-+ |
381 |
-+generate_conf |
382 |
-+add_conf ' |
383 |
-+template(name="tpl" type="string" |
384 |
-+ string="{\"msgnum\":\"%msg:F,58:2%\"}") |
385 |
-+ |
386 |
-+module(load="../contrib/omhttp/.libs/omhttp") |
387 |
-+ |
388 |
-+main_queue(queue.dequeueBatchSize="2048") |
389 |
-+ |
390 |
-+if $msg contains "msgnum:" then |
391 |
-+ action( |
392 |
-+ # Payload |
393 |
-+ name="my_http_action" |
394 |
-+ type="omhttp" |
395 |
-+ errorfile="'$RSYSLOG_DYNNAME/omhttp.error.log'" |
396 |
-+ template="tpl" |
397 |
-+ |
398 |
-+ server="localhost" |
399 |
-+ serverport="'$port'" |
400 |
-+ restpath="my/endpoint" |
401 |
-+ batch="on" |
402 |
-+ batch.format="jsonarray" |
403 |
-+ batch.maxsize="1000" |
404 |
-+ |
405 |
-+ # Auth |
406 |
-+ usehttps="off" |
407 |
-+ ) |
408 |
-+' |
409 |
-+startup |
410 |
-+injectmsg |
411 |
-+shutdown_when_empty |
412 |
-+wait_shutdown |
413 |
-+omhttp_get_data $port my/endpoint jsonarray |
414 |
-+omhttp_stop_server |
415 |
-+seq_check |
416 |
-+exit_test |
417 |
---- /dev/null |
418 |
-+++ b/tests/omhttp-batch-kafkarest-retry-vg.sh |
419 |
-@@ -0,0 +1,3 @@ |
420 |
-+#!/bin/bash |
421 |
-+export USE_VALGRIND="YES" |
422 |
-+source ${srcdir:=.}/omhttp-batch-kafkarest-retry.sh |
423 |
---- /dev/null |
424 |
-+++ b/tests/omhttp-batch-kafkarest-retry.sh |
425 |
-@@ -0,0 +1,78 @@ |
426 |
-+#!/bin/bash |
427 |
-+# This file is part of the rsyslog project, released under ASL 2.0 |
428 |
-+ |
429 |
-+# Starting actual testbench |
430 |
-+. ${srcdir:=.}/diag.sh init |
431 |
-+ |
432 |
-+export NUMMESSAGES=50000 |
433 |
-+ |
434 |
-+port="$(get_free_port)" |
435 |
-+omhttp_start_server $port --fail-every 100 |
436 |
-+ |
437 |
-+generate_conf |
438 |
-+add_conf ' |
439 |
-+module(load="../contrib/omhttp/.libs/omhttp") |
440 |
-+ |
441 |
-+main_queue(queue.dequeueBatchSize="2048") |
442 |
-+ |
443 |
-+template(name="tpl" type="string" |
444 |
-+ string="{\"msgnum\":\"%msg:F,58:2%\"}") |
445 |
-+ |
446 |
-+# Echo message as-is for retry |
447 |
-+template(name="tpl_echo" type="string" string="%msg%") |
448 |
-+ |
449 |
-+ruleset(name="ruleset_omhttp_retry") { |
450 |
-+ action( |
451 |
-+ name="action_omhttp" |
452 |
-+ type="omhttp" |
453 |
-+ errorfile="'$RSYSLOG_DYNNAME/omhttp.error.log'" |
454 |
-+ template="tpl_echo" |
455 |
-+ |
456 |
-+ server="localhost" |
457 |
-+ serverport="'$port'" |
458 |
-+ restpath="my/endpoint" |
459 |
-+ batch="on" |
460 |
-+ batch.maxsize="100" |
461 |
-+ batch.format="kafkarest" |
462 |
-+ |
463 |
-+ retry="on" |
464 |
-+ retry.ruleset="ruleset_omhttp_retry" |
465 |
-+ |
466 |
-+ # Auth |
467 |
-+ usehttps="off" |
468 |
-+ ) & stop |
469 |
-+} |
470 |
-+ |
471 |
-+ruleset(name="ruleset_omhttp") { |
472 |
-+ action( |
473 |
-+ name="action_omhttp" |
474 |
-+ type="omhttp" |
475 |
-+ errorfile="'$RSYSLOG_DYNNAME/omhttp.error.log'" |
476 |
-+ template="tpl" |
477 |
-+ |
478 |
-+ server="localhost" |
479 |
-+ serverport="'$port'" |
480 |
-+ restpath="my/endpoint" |
481 |
-+ batch="on" |
482 |
-+ batch.maxsize="100" |
483 |
-+ batch.format="kafkarest" |
484 |
-+ |
485 |
-+ retry="on" |
486 |
-+ retry.ruleset="ruleset_omhttp_retry" |
487 |
-+ |
488 |
-+ # Auth |
489 |
-+ usehttps="off" |
490 |
-+ ) & stop |
491 |
-+} |
492 |
-+ |
493 |
-+if $msg contains "msgnum:" then |
494 |
-+ call ruleset_omhttp |
495 |
-+' |
496 |
-+startup |
497 |
-+injectmsg |
498 |
-+shutdown_when_empty |
499 |
-+wait_shutdown |
500 |
-+omhttp_get_data $port my/endpoint kafkarest |
501 |
-+omhttp_stop_server |
502 |
-+seq_check |
503 |
-+exit_test |
504 |
---- /dev/null |
505 |
-+++ b/tests/omhttp-batch-kafkarest.sh |
506 |
-@@ -0,0 +1,47 @@ |
507 |
-+#!/bin/bash |
508 |
-+# This file is part of the rsyslog project, released under ASL 2.0 |
509 |
-+ |
510 |
-+# Starting actual testbench |
511 |
-+. ${srcdir:=.}/diag.sh init |
512 |
-+ |
513 |
-+export NUMMESSAGES=50000 |
514 |
-+ |
515 |
-+port="$(get_free_port)" |
516 |
-+omhttp_start_server $port |
517 |
-+ |
518 |
-+generate_conf |
519 |
-+add_conf ' |
520 |
-+template(name="tpl" type="string" |
521 |
-+ string="{\"msgnum\":\"%msg:F,58:2%\"}") |
522 |
-+ |
523 |
-+module(load="../contrib/omhttp/.libs/omhttp") |
524 |
-+ |
525 |
-+main_queue(queue.dequeueBatchSize="2048") |
526 |
-+ |
527 |
-+if $msg contains "msgnum:" then |
528 |
-+ action( |
529 |
-+ # Payload |
530 |
-+ name="my_http_action" |
531 |
-+ type="omhttp" |
532 |
-+ errorfile="'$RSYSLOG_DYNNAME/omhttp.error.log'" |
533 |
-+ template="tpl" |
534 |
-+ |
535 |
-+ server="localhost" |
536 |
-+ serverport="'$port'" |
537 |
-+ restpath="my/endpoint" |
538 |
-+ batch="on" |
539 |
-+ batch.format="kafkarest" |
540 |
-+ batch.maxsize="100" |
541 |
-+ |
542 |
-+ # Auth |
543 |
-+ usehttps="off" |
544 |
-+ ) |
545 |
-+' |
546 |
-+startup |
547 |
-+injectmsg |
548 |
-+shutdown_when_empty |
549 |
-+wait_shutdown |
550 |
-+omhttp_get_data $port my/endpoint kafkarest |
551 |
-+omhttp_stop_server |
552 |
-+seq_check |
553 |
-+exit_test |
554 |
---- /dev/null |
555 |
-+++ b/tests/omhttp-batch-newline.sh |
556 |
-@@ -0,0 +1,47 @@ |
557 |
-+#!/bin/bash |
558 |
-+# This file is part of the rsyslog project, released under ASL 2.0 |
559 |
-+ |
560 |
-+# Starting actual testbench |
561 |
-+. ${srcdir:=.}/diag.sh init |
562 |
-+ |
563 |
-+export NUMMESSAGES=50000 |
564 |
-+ |
565 |
-+port="$(get_free_port)" |
566 |
-+omhttp_start_server $port |
567 |
-+ |
568 |
-+generate_conf |
569 |
-+add_conf ' |
570 |
-+template(name="tpl" type="string" |
571 |
-+ string="{\"msgnum\":\"%msg:F,58:2%\"}") |
572 |
-+ |
573 |
-+module(load="../contrib/omhttp/.libs/omhttp") |
574 |
-+ |
575 |
-+main_queue(queue.dequeueBatchSize="2048") |
576 |
-+ |
577 |
-+if $msg contains "msgnum:" then |
578 |
-+ action( |
579 |
-+ # Payload |
580 |
-+ name="my_http_action" |
581 |
-+ type="omhttp" |
582 |
-+ errorfile="'$RSYSLOG_DYNNAME/omhttp.error.log'" |
583 |
-+ template="tpl" |
584 |
-+ |
585 |
-+ server="localhost" |
586 |
-+ serverport="'$port'" |
587 |
-+ restpath="my/endpoint" |
588 |
-+ batch="on" |
589 |
-+ batch.format="newline" |
590 |
-+ batch.maxsize="100" |
591 |
-+ |
592 |
-+ # Auth |
593 |
-+ usehttps="off" |
594 |
-+ ) |
595 |
-+' |
596 |
-+startup |
597 |
-+injectmsg |
598 |
-+shutdown_when_empty |
599 |
-+wait_shutdown |
600 |
-+omhttp_get_data $port my/endpoint newline |
601 |
-+omhttp_stop_server |
602 |
-+seq_check |
603 |
-+exit_test |
604 |
---- /dev/null |
605 |
-+++ b/tests/omhttp-retry-vg.sh |
606 |
-@@ -0,0 +1,3 @@ |
607 |
-+#!/bin/bash |
608 |
-+export USE_VALGRIND="YES" |
609 |
-+source ${srcdir:=.}/omhttp-retry.sh |
610 |
---- /dev/null |
611 |
-+++ b/tests/omhttp-retry.sh |
612 |
-@@ -0,0 +1,46 @@ |
613 |
-+#!/bin/bash |
614 |
-+# This file is part of the rsyslog project, released under ASL 2.0 |
615 |
-+ |
616 |
-+# Starting actual testbench |
617 |
-+. ${srcdir:=.}/diag.sh init |
618 |
-+ |
619 |
-+export NUMMESSAGES=10000 |
620 |
-+ |
621 |
-+port="$(get_free_port)" |
622 |
-+omhttp_start_server $port --fail-every 1000 |
623 |
-+ |
624 |
-+generate_conf |
625 |
-+add_conf ' |
626 |
-+module(load="../contrib/omhttp/.libs/omhttp") |
627 |
-+ |
628 |
-+main_queue(queue.dequeueBatchSize="2048") |
629 |
-+ |
630 |
-+template(name="tpl" type="string" |
631 |
-+ string="{\"msgnum\":\"%msg:F,58:2%\"}") |
632 |
-+ |
633 |
-+if $msg contains "msgnum:" then |
634 |
-+ action( |
635 |
-+ # Payload |
636 |
-+ action.resumeRetryCount="-1" |
637 |
-+ name="my_http_action" |
638 |
-+ type="omhttp" |
639 |
-+ errorfile="'$RSYSLOG_DYNNAME/omhttp.error.log'" |
640 |
-+ template="tpl" |
641 |
-+ |
642 |
-+ server="localhost" |
643 |
-+ serverport="'$port'" |
644 |
-+ restpath="my/endpoint" |
645 |
-+ batch="off" |
646 |
-+ |
647 |
-+ # Auth |
648 |
-+ usehttps="off" |
649 |
-+ ) |
650 |
-+' |
651 |
-+startup |
652 |
-+injectmsg |
653 |
-+shutdown_when_empty |
654 |
-+wait_shutdown |
655 |
-+omhttp_get_data $port my/endpoint |
656 |
-+omhttp_stop_server |
657 |
-+seq_check |
658 |
-+exit_test |
659 |
---- /dev/null |
660 |
-+++ b/tests/omhttp_server.py |
661 |
-@@ -0,0 +1,130 @@ |
662 |
-+#!/usr/bin/env python |
663 |
-+ |
664 |
-+import argparse |
665 |
-+import json |
666 |
-+import os |
667 |
-+import zlib |
668 |
-+import base64 |
669 |
-+ |
670 |
-+try: |
671 |
-+ from BaseHTTPServer import BaseHTTPRequestHandler, HTTPServer # Python 2 |
672 |
-+except ImportError: |
673 |
-+ from http.server import BaseHTTPRequestHandler, HTTPServer # Python 3 |
674 |
-+ |
675 |
-+# Keep track of data received at each path |
676 |
-+data = {} |
677 |
-+ |
678 |
-+metadata = {'posts': 0, 'fail_after': 0, 'fail_every': -1, 'decompress': False, 'userpwd': ''} |
679 |
-+ |
680 |
-+ |
681 |
-+class MyHandler(BaseHTTPRequestHandler): |
682 |
-+ """ |
683 |
-+ POST'd data is kept in the data global dict. |
684 |
-+ Keys are the path, values are the raw received data. |
685 |
-+ Two post requests to <host>:<port>/post/endpoint means data looks like... |
686 |
-+ {"/post/endpoint": ["{\"msgnum\":\"00001\"}", "{\"msgnum\":\"00001\"}"]} |
687 |
-+ |
688 |
-+ GET requests return all data posted to that endpoint as a json list. |
689 |
-+ Note that rsyslog usually sends escaped json data, so some parsing may be needed. |
690 |
-+ A get request for <host>:<post>/post/endpoint responds with... |
691 |
-+ ["{\"msgnum\":\"00001\"}", "{\"msgnum\":\"00001\"}"] |
692 |
-+ """ |
693 |
-+ |
694 |
-+ def validate_auth(self): |
695 |
-+ # header format for basic authentication |
696 |
-+ # 'Authorization: Basic <base 64 encoded uid:pwd>' |
697 |
-+ if 'Authorization' not in self.headers: |
698 |
-+ self.send_response(401) |
699 |
-+ self.end_headers() |
700 |
-+ self.wfile.write('missing "Authorization" header') |
701 |
-+ return False |
702 |
-+ |
703 |
-+ auth_header = self.headers['Authorization'] |
704 |
-+ _, b64userpwd = auth_header.split() |
705 |
-+ userpwd = base64.b64decode(b64userpwd) |
706 |
-+ if userpwd != metadata['userpwd']: |
707 |
-+ self.send_response(401) |
708 |
-+ self.end_headers() |
709 |
-+ self.wfile.write('invalid auth: {0}'.format(userpwd)) |
710 |
-+ return False |
711 |
-+ |
712 |
-+ return True |
713 |
-+ |
714 |
-+ def do_POST(self): |
715 |
-+ metadata['posts'] += 1 |
716 |
-+ |
717 |
-+ if metadata['userpwd']: |
718 |
-+ if not self.validate_auth(): |
719 |
-+ return |
720 |
-+ |
721 |
-+ if metadata['fail_with_400_after'] != -1 and metadata['posts'] > metadata['fail_with_400_after']: |
722 |
-+ self.send_response(400) |
723 |
-+ self.end_headers() |
724 |
-+ self.wfile.write('BAD REQUEST') |
725 |
-+ return |
726 |
-+ |
727 |
-+ if metadata['posts'] > 1 and metadata['fail_every'] != -1 and metadata['posts'] % metadata['fail_every'] == 0: |
728 |
-+ self.send_response(500) |
729 |
-+ self.end_headers() |
730 |
-+ self.wfile.write('INTERNAL ERROR') |
731 |
-+ return |
732 |
-+ |
733 |
-+ content_length = int(self.headers['Content-Length']) |
734 |
-+ raw_data = self.rfile.read(content_length) |
735 |
-+ |
736 |
-+ if metadata['decompress']: |
737 |
-+ post_data = zlib.decompress(raw_data, 31) |
738 |
-+ else: |
739 |
-+ post_data = raw_data |
740 |
-+ |
741 |
-+ if self.path not in data: |
742 |
-+ data[self.path] = [] |
743 |
-+ data[self.path].append(post_data) |
744 |
-+ |
745 |
-+ res = json.dumps({'msg': 'ok'}) |
746 |
-+ |
747 |
-+ self.send_response(200) |
748 |
-+ self.send_header('Content-Type', 'application/json') |
749 |
-+ self.send_header('Content-Length', len(res)) |
750 |
-+ self.end_headers() |
751 |
-+ |
752 |
-+ self.wfile.write(res) |
753 |
-+ return |
754 |
-+ |
755 |
-+ def do_GET(self): |
756 |
-+ if self.path in data: |
757 |
-+ result = data[self.path] |
758 |
-+ else: |
759 |
-+ result = [] |
760 |
-+ |
761 |
-+ res = json.dumps(result) |
762 |
-+ |
763 |
-+ self.send_response(200) |
764 |
-+ self.send_header('Content-Type', 'application/json') |
765 |
-+ self.send_header('Content-Length', len(res)) |
766 |
-+ self.end_headers() |
767 |
-+ |
768 |
-+ self.wfile.write(res) |
769 |
-+ return |
770 |
-+ |
771 |
-+ |
772 |
-+if __name__ == '__main__': |
773 |
-+ parser = argparse.ArgumentParser(description='Archive and delete core app log files') |
774 |
-+ parser.add_argument('-p', '--port', action='store', type=int, default=8080, help='port') |
775 |
-+ parser.add_argument('-i', '--interface', action='store', type=str, default='localhost', help='port') |
776 |
-+ parser.add_argument('--fail-after', action='store', type=int, default=0, help='start failing after n posts') |
777 |
-+ parser.add_argument('--fail-every', action='store', type=int, default=-1, help='fail every n posts') |
778 |
-+ parser.add_argument('--fail-with-400-after', action='store', type=int, default=-1, help='fail with 400 after n posts') |
779 |
-+ parser.add_argument('--decompress', action='store_true', default=False, help='decompress posted data') |
780 |
-+ parser.add_argument('--userpwd', action='store', default='', help='only accept this user:password combination') |
781 |
-+ args = parser.parse_args() |
782 |
-+ metadata['fail_after'] = args.fail_after |
783 |
-+ metadata['fail_every'] = args.fail_every |
784 |
-+ metadata['fail_with_400_after'] = args.fail_with_400_after |
785 |
-+ metadata['decompress'] = args.decompress |
786 |
-+ metadata['userpwd'] = args.userpwd |
787 |
-+ server = HTTPServer((args.interface, args.port), MyHandler) |
788 |
-+ pid = os.getpid() |
789 |
-+ print('starting omhttp test server at {interface}:{port} with pid {pid}' |
790 |
-+ .format(interface=args.interface, port=args.port, pid=pid)) |
791 |
-+ server.serve_forever() |
792 |
|
793 |
diff --git a/app-admin/rsyslog/files/rsyslog-8.1903.0-add-py3-support-to-omhttp-test.patch b/app-admin/rsyslog/files/rsyslog-8.1903.0-add-py3-support-to-omhttp-test.patch |
794 |
deleted file mode 100644 |
795 |
index 6600c61666e..00000000000 |
796 |
--- a/app-admin/rsyslog/files/rsyslog-8.1903.0-add-py3-support-to-omhttp-test.patch |
797 |
+++ /dev/null |
798 |
@@ -1,83 +0,0 @@ |
799 |
-From c82b747eaf96cc77efa530ca5844ba01b91bfc88 Mon Sep 17 00:00:00 2001 |
800 |
-From: Thomas Deutschmann <whissi@××××××.de> |
801 |
-Date: Sat, 6 Apr 2019 00:28:54 +0200 |
802 |
-Subject: [PATCH] tests: omhttp: add Python 3 compatibility |
803 |
- |
804 |
-Fixes: https://github.com/rsyslog/rsyslog/issues/3599 |
805 |
---- |
806 |
- tests/omhttp_server.py | 22 +++++++++++----------- |
807 |
- 1 file changed, 11 insertions(+), 11 deletions(-) |
808 |
- |
809 |
-diff --git a/tests/omhttp_server.py b/tests/omhttp_server.py |
810 |
-index 6962138fa..d3fdb3a9a 100644 |
811 |
---- a/tests/omhttp_server.py |
812 |
-+++ b/tests/omhttp_server.py |
813 |
-@@ -36,16 +36,16 @@ def validate_auth(self): |
814 |
- if 'Authorization' not in self.headers: |
815 |
- self.send_response(401) |
816 |
- self.end_headers() |
817 |
-- self.wfile.write('missing "Authorization" header') |
818 |
-+ self.wfile.write(b'missing "Authorization" header') |
819 |
- return False |
820 |
- |
821 |
- auth_header = self.headers['Authorization'] |
822 |
- _, b64userpwd = auth_header.split() |
823 |
-- userpwd = base64.b64decode(b64userpwd) |
824 |
-+ userpwd = base64.b64decode(b64userpwd).decode('utf-8') |
825 |
- if userpwd != metadata['userpwd']: |
826 |
- self.send_response(401) |
827 |
- self.end_headers() |
828 |
-- self.wfile.write('invalid auth: {0}'.format(userpwd)) |
829 |
-+ self.wfile.write(b'invalid auth: {0}'.format(userpwd)) |
830 |
- return False |
831 |
- |
832 |
- return True |
833 |
-@@ -60,16 +60,16 @@ def do_POST(self): |
834 |
- if metadata['fail_with_400_after'] != -1 and metadata['posts'] > metadata['fail_with_400_after']: |
835 |
- self.send_response(400) |
836 |
- self.end_headers() |
837 |
-- self.wfile.write('BAD REQUEST') |
838 |
-+ self.wfile.write(b'BAD REQUEST') |
839 |
- return |
840 |
- |
841 |
- if metadata['posts'] > 1 and metadata['fail_every'] != -1 and metadata['posts'] % metadata['fail_every'] == 0: |
842 |
- self.send_response(500) |
843 |
- self.end_headers() |
844 |
-- self.wfile.write('INTERNAL ERROR') |
845 |
-+ self.wfile.write(b'INTERNAL ERROR') |
846 |
- return |
847 |
- |
848 |
-- content_length = int(self.headers['Content-Length']) |
849 |
-+ content_length = int(self.headers['Content-Length'] or 0) |
850 |
- raw_data = self.rfile.read(content_length) |
851 |
- |
852 |
- if metadata['decompress']: |
853 |
-@@ -79,12 +79,12 @@ def do_POST(self): |
854 |
- |
855 |
- if self.path not in data: |
856 |
- data[self.path] = [] |
857 |
-- data[self.path].append(post_data) |
858 |
-+ data[self.path].append(post_data.decode('utf-8')) |
859 |
- |
860 |
-- res = json.dumps({'msg': 'ok'}) |
861 |
-+ res = json.dumps({'msg': 'ok'}).encode('utf8') |
862 |
- |
863 |
- self.send_response(200) |
864 |
-- self.send_header('Content-Type', 'application/json') |
865 |
-+ self.send_header('Content-Type', 'application/json; charset=utf-8') |
866 |
- self.send_header('Content-Length', len(res)) |
867 |
- self.end_headers() |
868 |
- |
869 |
-@@ -97,10 +97,10 @@ def do_GET(self): |
870 |
- else: |
871 |
- result = [] |
872 |
- |
873 |
-- res = json.dumps(result) |
874 |
-+ res = json.dumps(result).encode('utf8') |
875 |
- |
876 |
- self.send_response(200) |
877 |
-- self.send_header('Content-Type', 'application/json') |
878 |
-+ self.send_header('Content-Type', 'application/json; charset=utf-8') |
879 |
- self.send_header('Content-Length', len(res)) |
880 |
- self.end_headers() |
881 |
- |
882 |
|
883 |
diff --git a/app-admin/rsyslog/files/rsyslog-8.1903.0-fix-py3-compatibility-in-diag.sh.patch b/app-admin/rsyslog/files/rsyslog-8.1903.0-fix-py3-compatibility-in-diag.sh.patch |
884 |
deleted file mode 100644 |
885 |
index 615bb50bdb9..00000000000 |
886 |
--- a/app-admin/rsyslog/files/rsyslog-8.1903.0-fix-py3-compatibility-in-diag.sh.patch |
887 |
+++ /dev/null |
888 |
@@ -1,22 +0,0 @@ |
889 |
-From f0847e46c148233b6ab5d6088ca4e1dc664e82a4 Mon Sep 17 00:00:00 2001 |
890 |
-From: Thomas Deutschmann <whissi@××××××.de> |
891 |
-Date: Sat, 6 Apr 2019 02:07:51 +0200 |
892 |
-Subject: [PATCH] testbench: fix Python 3 compatibility |
893 |
- |
894 |
---- |
895 |
- tests/diag.sh | 2 +- |
896 |
- 1 file changed, 1 insertion(+), 1 deletion(-) |
897 |
- |
898 |
-diff --git a/tests/diag.sh b/tests/diag.sh |
899 |
-index 5b4b3df46..2926e6ac2 100755 |
900 |
---- a/tests/diag.sh |
901 |
-+++ b/tests/diag.sh |
902 |
-@@ -1334,7 +1334,7 @@ get_inode() { |
903 |
- printf 'FAIL: file "%s" does not exist in get_inode\n' "$1" |
904 |
- error_exit 100 |
905 |
- fi |
906 |
-- python -c 'import os; import stat; print os.lstat("'$1'")[stat.ST_INO]' |
907 |
-+ python -c 'import os; import stat; print(os.lstat("'$1'")[stat.ST_INO])' |
908 |
- } |
909 |
- |
910 |
- |
911 |
|
912 |
diff --git a/app-admin/rsyslog/files/rsyslog-8.38.0-fix-omprog-output-capture-mt-test.patch b/app-admin/rsyslog/files/rsyslog-8.38.0-fix-omprog-output-capture-mt-test.patch |
913 |
deleted file mode 100644 |
914 |
index c78e0e502d4..00000000000 |
915 |
--- a/app-admin/rsyslog/files/rsyslog-8.38.0-fix-omprog-output-capture-mt-test.patch |
916 |
+++ /dev/null |
917 |
@@ -1,66 +0,0 @@ |
918 |
-From 0b0a1262f2b401ea16b7d0b36d8254c500cb9d8e Mon Sep 17 00:00:00 2001 |
919 |
-From: Joan Sala <jsiwrk@×××××.com> |
920 |
-Date: Thu, 20 Sep 2018 22:37:58 +0200 |
921 |
-Subject: [PATCH] testbench: fix incompatibility of one omprog test with |
922 |
- Python3 |
923 |
- |
924 |
-Python3 writes to stderr immediately, and this caused the |
925 |
-captured output to differ with respect to Python2. Simplified |
926 |
-the test to do a single write to stderr. Also a cast to int |
927 |
-was needed when calculating 'numRepeats'. |
928 |
- |
929 |
-closes #3030 |
930 |
---- |
931 |
- tests/omprog-output-capture-mt.sh | 2 +- |
932 |
- .../testsuites/omprog-output-capture-mt-bin.py | 17 +++++++---------- |
933 |
- 2 files changed, 8 insertions(+), 11 deletions(-) |
934 |
- |
935 |
-diff --git a/tests/omprog-output-capture-mt.sh b/tests/omprog-output-capture-mt.sh |
936 |
-index 50f5c6354..080fabd2a 100755 |
937 |
---- a/tests/omprog-output-capture-mt.sh |
938 |
-+++ b/tests/omprog-output-capture-mt.sh |
939 |
-@@ -24,7 +24,7 @@ else |
940 |
- LINE_LENGTH=511 # 512 minus 1 byte (for the newline char) |
941 |
- fi |
942 |
- |
943 |
--export command_line="/usr/bin/stdbuf -oL -eL $srcdir/testsuites/omprog-output-capture-mt-bin.py $LINE_LENGTH" |
944 |
-+export command_line="/usr/bin/stdbuf -oL $srcdir/testsuites/omprog-output-capture-mt-bin.py $LINE_LENGTH" |
945 |
- |
946 |
- check_command_available stdbuf |
947 |
- generate_conf |
948 |
-diff --git a/tests/testsuites/omprog-output-capture-mt-bin.py b/tests/testsuites/omprog-output-capture-mt-bin.py |
949 |
-index 6c81da24b..03097f37b 100755 |
950 |
---- a/tests/testsuites/omprog-output-capture-mt-bin.py |
951 |
-+++ b/tests/testsuites/omprog-output-capture-mt-bin.py |
952 |
-@@ -10,7 +10,7 @@ |
953 |
- logLine = sys.stdin.readline() |
954 |
- while logLine: |
955 |
- logLine = logLine.strip() |
956 |
-- numRepeats = lineLength / len(logLine) |
957 |
-+ numRepeats = int(lineLength / len(logLine)) |
958 |
- lineToStdout = (linePrefix + "[stdout] " + logLine*numRepeats)[:lineLength] |
959 |
- lineToStderr = (linePrefix + "[stderr] " + logLine*numRepeats)[:lineLength] |
960 |
- |
961 |
-@@ -22,16 +22,13 @@ |
962 |
- # size of the block buffer is generally greater than PIPE_BUF). |
963 |
- sys.stdout.write(lineToStdout + "\n") |
964 |
- |
965 |
-- # Write to stderr using two writes. Since stderr is unbuffered, each write will be written |
966 |
-- # immediately to the pipe, and this will cause intermingled lines in the output file. |
967 |
-- # However, we avoid this by executing this script with 'stdbuf -eL', which forces line |
968 |
-- # buffering for stderr. We could alternatively do a single write. |
969 |
-- sys.stderr.write(lineToStderr) |
970 |
-- sys.stderr.write("\n") |
971 |
-+ # Write to stderr using a single write. Since stderr is unbuffered, each write will be |
972 |
-+ # written immediately (and atomically) to the pipe. |
973 |
-+ sys.stderr.write(lineToStderr + "\n") |
974 |
- |
975 |
-- # Note: In future versions of Python3, stderr will possibly be line buffered (see |
976 |
-- # https://bugs.python.org/issue13601). |
977 |
-- # Note: When writing to stderr using the Python logging module, it seems that line |
978 |
-+ # Note (FTR): In future versions of Python3, stderr will possibly be line buffered (see |
979 |
-+ # https://bugs.python.org/issue13601). The previous write will also be atomic in this case. |
980 |
-+ # Note (FTR): When writing to stderr using the Python logging module, it seems that line |
981 |
- # buffering is also used (although this could depend on the Python version). |
982 |
- |
983 |
- logLine = sys.stdin.readline() |
984 |
|
985 |
diff --git a/app-admin/rsyslog/files/rsyslog-8.39.0-fix-liblogging_stdlog-linking.patch b/app-admin/rsyslog/files/rsyslog-8.39.0-fix-liblogging_stdlog-linking.patch |
986 |
deleted file mode 100644 |
987 |
index 6ccf8f0252d..00000000000 |
988 |
--- a/app-admin/rsyslog/files/rsyslog-8.39.0-fix-liblogging_stdlog-linking.patch |
989 |
+++ /dev/null |
990 |
@@ -1,321 +0,0 @@ |
991 |
-https://github.com/rsyslog/rsyslog/pull/3240 |
992 |
- |
993 |
---- a/configure.ac |
994 |
-+++ b/configure.ac |
995 |
-@@ -1436,6 +1436,12 @@ fi |
996 |
- AM_CONDITIONAL(ENABLE_KSI_LS12, test x$enable_ksi_ls12 = xyes) |
997 |
- |
998 |
- # liblogging-stdlog support |
999 |
-+# we use liblogging-stdlog inside the testbench, which is why we need to check for it in any case |
1000 |
-+PKG_CHECK_MODULES(LIBLOGGING_STDLOG, liblogging-stdlog >= 1.0.3, |
1001 |
-+ AC_DEFINE(HAVE_LIBLOGGING_STDLOG, 1, [Define to 1 if liblogging-stdlog is available.]), |
1002 |
-+ [AC_MSG_NOTICE([liblogging-stdlog not found, parts of the testbench will not run])] |
1003 |
-+) |
1004 |
-+ |
1005 |
- AC_ARG_ENABLE(liblogging-stdlog, |
1006 |
- [AS_HELP_STRING([--enable-liblogging-stdlog],[Enable liblogging-stdlog support @<:@default=no@:>@])], |
1007 |
- [case "${enableval}" in |
1008 |
-@@ -1445,18 +1451,15 @@ AC_ARG_ENABLE(liblogging-stdlog, |
1009 |
- esac], |
1010 |
- [enable_liblogging_stdlog=no] |
1011 |
- ) |
1012 |
-+if test "x$enable_liblogging_stdlog" = "xyes" -a "x$HAVE_LIBLOGGING_STDLOG" != "x1"; then |
1013 |
-+ AC_MSG_ERROR(--enable-liblogging-stdlog set but liblogging was not found) |
1014 |
-+fi |
1015 |
-+AM_CONDITIONAL(ENABLE_LIBLOGGING_STDLOG, [test "x$enable_liblogging_stdlog" = "xyes"]) |
1016 |
- if test "x$enable_liblogging_stdlog" = "xyes"; then |
1017 |
-- PKG_CHECK_MODULES(LIBLOGGING_STDLOG, liblogging-stdlog >= 1.0.3, |
1018 |
-- AC_DEFINE(HAVE_LIBLOGGING_STDLOG, 1, [Define to 1 if liblogging-stdlog is available.]) |
1019 |
-- ) |
1020 |
-+ AC_MSG_NOTICE(DEBUG: liblogging_stdlog enabled) |
1021 |
-+else |
1022 |
-+ AC_MSG_NOTICE(DEBUG: liblogging_stdlog disabled) |
1023 |
- fi |
1024 |
--AM_CONDITIONAL(ENABLE_LIBLOGGING_STDLOG, test x$enable_liblogging_stdlog = xyes) |
1025 |
-- |
1026 |
--# we use liblogging-stdlog inside the testbench, which is why we need to check for it in any case |
1027 |
--PKG_CHECK_MODULES(LIBLOGGING_STDLOG, liblogging-stdlog >= 1.0.3, |
1028 |
-- AC_DEFINE(HAVE_LIBLOGGING_STDLOG, 1, [Define to 1 if liblogging-stdlog is available.]), |
1029 |
-- [AC_MSG_NOTICE([liblogging-stdlog not found, parts of the testbench will not run])] |
1030 |
--) |
1031 |
- |
1032 |
- # RFC 3195 support |
1033 |
- AC_ARG_ENABLE(rfc3195, |
1034 |
---- a/plugins/imklog/Makefile.am |
1035 |
-+++ b/plugins/imklog/Makefile.am |
1036 |
-@@ -10,6 +10,11 @@ if ENABLE_IMKLOG_LINUX |
1037 |
- imklog_la_SOURCES += bsd.c |
1038 |
- endif |
1039 |
- |
1040 |
--imklog_la_CPPFLAGS = -I$(top_srcdir) $(PTHREADS_CFLAGS) $(RSRT_CFLAGS) $(LIBLOGGING_STDLOG_CFLAGS) |
1041 |
--imklog_la_LDFLAGS = -module -avoid-version $(LIBLOGGING_STDLOG_LIBS) |
1042 |
-+imklog_la_CPPFLAGS = -I$(top_srcdir) $(PTHREADS_CFLAGS) $(RSRT_CFLAGS) |
1043 |
-+imklog_la_LDFLAGS = -module -avoid-version |
1044 |
- imklog_la_LIBADD = |
1045 |
-+ |
1046 |
-+if ENABLE_LIBLOGGING_STDLOG |
1047 |
-+imklog_la_CPPFLAGS += $(LIBLOGGING_STDLOG_CFLAGS) |
1048 |
-+imklog_la_LDFLAGS += $(LIBLOGGING_STDLOG_LIBS) |
1049 |
-+endif |
1050 |
---- a/plugins/immark/Makefile.am |
1051 |
-+++ b/plugins/immark/Makefile.am |
1052 |
-@@ -1,6 +1,11 @@ |
1053 |
- pkglib_LTLIBRARIES = immark.la |
1054 |
- |
1055 |
- immark_la_SOURCES = immark.c immark.h |
1056 |
--immark_la_CPPFLAGS = $(RSRT_CFLAGS) -I$(top_srcdir) $(PTHREADS_CFLAGS) $(LIBLOGGING_STDLOG_CFLAGS) |
1057 |
--immark_la_LDFLAGS = -module -avoid-version $(LIBLOGGING_STDLOG_LIBS) |
1058 |
-+immark_la_CPPFLAGS = $(RSRT_CFLAGS) -I$(top_srcdir) $(PTHREADS_CFLAGS) |
1059 |
-+immark_la_LDFLAGS = -module -avoid-version |
1060 |
- immark_la_LIBADD = |
1061 |
-+ |
1062 |
-+if ENABLE_LIBLOGGING_STDLOG |
1063 |
-+immark_la_CPPFLAGS += $(LIBLOGGING_STDLOG_CFLAGS) |
1064 |
-+immark_la_LDFLAGS += $(LIBLOGGING_STDLOG_LIBS) |
1065 |
-+endif |
1066 |
---- a/plugins/imtcp/Makefile.am |
1067 |
-+++ b/plugins/imtcp/Makefile.am |
1068 |
-@@ -1,6 +1,11 @@ |
1069 |
- pkglib_LTLIBRARIES = imtcp.la |
1070 |
- |
1071 |
- imtcp_la_SOURCES = imtcp.c |
1072 |
--imtcp_la_CPPFLAGS = -I$(top_srcdir) $(PTHREADS_CFLAGS) $(RSRT_CFLAGS) $(LIBLOGGING_STDLOG_CFLAGS) |
1073 |
--imtcp_la_LDFLAGS = -module -avoid-version $(LIBLOGGING_STDLOG_LIBS) |
1074 |
-+imtcp_la_CPPFLAGS = -I$(top_srcdir) $(PTHREADS_CFLAGS) $(RSRT_CFLAGS) |
1075 |
-+imtcp_la_LDFLAGS = -module -avoid-version |
1076 |
- imtcp_la_LIBADD = |
1077 |
-+ |
1078 |
-+if ENABLE_LIBLOGGING_STDLOG |
1079 |
-+imtcp_la_CPPFLAGS += $(LIBLOGGING_STDLOG_CFLAGS) |
1080 |
-+imtcp_la_LDFLAGS += $(LIBLOGGING_STDLOG_LIBS) |
1081 |
-+endif |
1082 |
---- a/plugins/imudp/Makefile.am |
1083 |
-+++ b/plugins/imudp/Makefile.am |
1084 |
-@@ -1,6 +1,11 @@ |
1085 |
- pkglib_LTLIBRARIES = imudp.la |
1086 |
- |
1087 |
- imudp_la_SOURCES = imudp.c |
1088 |
--imudp_la_CPPFLAGS = -I$(top_srcdir) $(PTHREADS_CFLAGS) $(RSRT_CFLAGS) $(LIBLOGGING_STDLOG_CFLAGS) |
1089 |
--imudp_la_LDFLAGS = -module -avoid-version $(LIBLOGGING_STDLOG_LIBS) |
1090 |
-+imudp_la_CPPFLAGS = -I$(top_srcdir) $(PTHREADS_CFLAGS) $(RSRT_CFLAGS) |
1091 |
-+imudp_la_LDFLAGS = -module -avoid-version |
1092 |
- imudp_la_LIBADD = $(IMUDP_LIBS) |
1093 |
-+ |
1094 |
-+if ENABLE_LIBLOGGING_STDLOG |
1095 |
-+imudp_la_CPPFLAGS += $(LIBLOGGING_STDLOG_CFLAGS) |
1096 |
-+imudp_la_LDFLAGS += $(LIBLOGGING_STDLOG_LIBS) |
1097 |
-+endif |
1098 |
---- a/plugins/imuxsock/Makefile.am |
1099 |
-+++ b/plugins/imuxsock/Makefile.am |
1100 |
-@@ -1,6 +1,11 @@ |
1101 |
- pkglib_LTLIBRARIES = imuxsock.la |
1102 |
- |
1103 |
- imuxsock_la_SOURCES = imuxsock.c |
1104 |
--imuxsock_la_CPPFLAGS = -DSD_EXPORT_SYMBOLS -I$(top_srcdir) $(PTHREADS_CFLAGS) $(RSRT_CFLAGS) $(LIBLOGGING_STDLOG_CFLAGS) |
1105 |
--imuxsock_la_LDFLAGS = -module -avoid-version $(LIBLOGGING_STDLOG_LIBS) |
1106 |
-+imuxsock_la_CPPFLAGS = -DSD_EXPORT_SYMBOLS -I$(top_srcdir) $(PTHREADS_CFLAGS) $(RSRT_CFLAGS) |
1107 |
-+imuxsock_la_LDFLAGS = -module -avoid-version |
1108 |
- imuxsock_la_LIBADD = |
1109 |
-+ |
1110 |
-+if ENABLE_LIBLOGGING_STDLOG |
1111 |
-+imuxsock_la_CPPFLAGS += $(LIBLOGGING_STDLOG_CFLAGS) |
1112 |
-+imuxsock_la_LDFLAGS += $(LIBLOGGING_STDLOG_LIBS) |
1113 |
-+endif |
1114 |
---- a/plugins/mmexternal/Makefile.am |
1115 |
-+++ b/plugins/mmexternal/Makefile.am |
1116 |
-@@ -1,8 +1,13 @@ |
1117 |
- pkglib_LTLIBRARIES = mmexternal.la |
1118 |
- |
1119 |
- mmexternal_la_SOURCES = mmexternal.c |
1120 |
--mmexternal_la_CPPFLAGS = $(RSRT_CFLAGS) $(PTHREADS_CFLAGS) $(LIBLOGGING_STDLOG_CFLAGS) |
1121 |
--mmexternal_la_LDFLAGS = -module -avoid-version $(LIBLOGGING_STDLOG_LIBS) |
1122 |
-+mmexternal_la_CPPFLAGS = $(RSRT_CFLAGS) $(PTHREADS_CFLAGS) |
1123 |
-+mmexternal_la_LDFLAGS = -module -avoid-version |
1124 |
- mmexternal_la_LIBADD = |
1125 |
- |
1126 |
-+if ENABLE_LIBLOGGING_STDLOG |
1127 |
-+mmexternal_la_CPPFLAGS += $(LIBLOGGING_STDLOG_CFLAGS) |
1128 |
-+mmexternal_la_LDFLAGS += $(LIBLOGGING_STDLOG_LIBS) |
1129 |
-+endif |
1130 |
-+ |
1131 |
- EXTRA_DIST = |
1132 |
---- a/plugins/omtesting/Makefile.am |
1133 |
-+++ b/plugins/omtesting/Makefile.am |
1134 |
-@@ -1,6 +1,11 @@ |
1135 |
- pkglib_LTLIBRARIES = omtesting.la |
1136 |
- |
1137 |
- omtesting_la_SOURCES = omtesting.c |
1138 |
--omtesting_la_CPPFLAGS = -I$(top_srcdir) $(PTHREADS_CFLAGS) $(RSRT_CFLAGS) $(LIBLOGGING_STDLOG_CFLAGS) |
1139 |
--omtesting_la_LDFLAGS = -module -avoid-version $(LIBLOGGING_STDLOG_LIBS) |
1140 |
-+omtesting_la_CPPFLAGS = -I$(top_srcdir) $(PTHREADS_CFLAGS) $(RSRT_CFLAGS) |
1141 |
-+omtesting_la_LDFLAGS = -module -avoid-version |
1142 |
- omtesting_la_LIBADD = |
1143 |
-+ |
1144 |
-+if ENABLE_LIBLOGGING_STDLOG |
1145 |
-+omtesting_la_CPPFLAGS += $(LIBLOGGING_STDLOG_CFLAGS) |
1146 |
-+omtesting_la_LDFLAGS += $(LIBLOGGING_STDLOG_LIBS) |
1147 |
-+endif |
1148 |
---- a/runtime/Makefile.am |
1149 |
-+++ b/runtime/Makefile.am |
1150 |
-@@ -112,8 +112,15 @@ else |
1151 |
- librsyslog_la_CPPFLAGS = -DSD_EXPORT_SYMBOLS -D_PATH_MODDIR=\"$(pkglibdir)/\" -I\$(top_srcdir) -I\$(top_srcdir)/grammar |
1152 |
- endif |
1153 |
- #librsyslog_la_LDFLAGS = -module -avoid-version |
1154 |
--librsyslog_la_CPPFLAGS += $(PTHREADS_CFLAGS) $(RSRT_CFLAGS) $(LIBUUID_CFLAGS) $(LIBFASTJSON_CFLAGS) ${LIBESTR_CFLAGS} ${LIBLOGGING_STDLOG_CFLAGS} -I\$(top_srcdir)/tools |
1155 |
--librsyslog_la_LIBADD = $(DL_LIBS) $(RT_LIBS) $(LIBUUID_LIBS) $(LIBFASTJSON_LIBS) ${LIBESTR_LIBS} ${LIBLOGGING_STDLOG_LIBS} |
1156 |
-+librsyslog_la_CPPFLAGS += $(PTHREADS_CFLAGS) $(RSRT_CFLAGS) $(LIBUUID_CFLAGS) $(LIBFASTJSON_CFLAGS) ${LIBESTR_CFLAGS} |
1157 |
-+librsyslog_la_LIBADD = $(DL_LIBS) $(RT_LIBS) $(LIBUUID_LIBS) $(LIBFASTJSON_LIBS) ${LIBESTR_LIBS} |
1158 |
-+ |
1159 |
-+if ENABLE_LIBLOGGING_STDLOG |
1160 |
-+librsyslog_la_CPPFLAGS += ${LIBLOGGING_STDLOG_CFLAGS} |
1161 |
-+librsyslog_la_LIBADD += $(LIBLOGGING_STDLOG_LIBS) |
1162 |
-+endif |
1163 |
-+ |
1164 |
-+librsyslog_la_CPPFLAGS += -I\$(top_srcdir)/tools |
1165 |
- |
1166 |
- # |
1167 |
- # regular expression support |
1168 |
-@@ -121,9 +128,15 @@ librsyslog_la_LIBADD = $(DL_LIBS) $(RT_LIBS) $(LIBUUID_LIBS) $(LIBFASTJSON_LIBS |
1169 |
- if ENABLE_REGEXP |
1170 |
- pkglib_LTLIBRARIES += lmregexp.la |
1171 |
- lmregexp_la_SOURCES = regexp.c regexp.h |
1172 |
--lmregexp_la_CPPFLAGS = $(PTHREADS_CFLAGS) $(RSRT_CFLAGS) $(LIBLOGGING_STDLOG_CFLAGS) |
1173 |
--lmregexp_la_LDFLAGS = -module -avoid-version $(LIBLOGGING_STDLOG_LIBS) |
1174 |
--lmregexp_la_LIBADD = |
1175 |
-+lmregexp_la_CPPFLAGS = $(PTHREADS_CFLAGS) $(RSRT_CFLAGS) |
1176 |
-+lmregexp_la_LDFLAGS = -module -avoid-version |
1177 |
-+lmregexp_la_LIBADD = |
1178 |
-+ |
1179 |
-+if ENABLE_LIBLOGGING_STDLOG |
1180 |
-+lmregexp_la_CPPFLAGS += $(LIBLOGGING_STDLOG_CFLAGS) |
1181 |
-+lmregexp_la_LDFLAGS += $(LIBLOGGING_STDLOG_LIBS) |
1182 |
-+endif |
1183 |
-+ |
1184 |
- endif |
1185 |
- |
1186 |
- # |
1187 |
-@@ -131,9 +144,14 @@ endif |
1188 |
- # |
1189 |
- pkglib_LTLIBRARIES += lmzlibw.la |
1190 |
- lmzlibw_la_SOURCES = zlibw.c zlibw.h |
1191 |
--lmzlibw_la_CPPFLAGS = $(PTHREADS_CFLAGS) $(RSRT_CFLAGS) $(LIBLOGGING_STDLOG_CFLAGS) |
1192 |
--lmzlibw_la_LDFLAGS = -module -avoid-version $(LIBLOGGING_STDLOG_LIBS) |
1193 |
--lmzlibw_la_LIBADD = |
1194 |
-+lmzlibw_la_CPPFLAGS = $(PTHREADS_CFLAGS) $(RSRT_CFLAGS) |
1195 |
-+lmzlibw_la_LDFLAGS = -module -avoid-version |
1196 |
-+lmzlibw_la_LIBADD = |
1197 |
-+ |
1198 |
-+if ENABLE_LIBLOGGING_STDLOG |
1199 |
-+lmzlibw_la_CPPFLAGS += $(LIBLOGGING_STDLOG_CFLAGS) |
1200 |
-+lmzlibw_la_LDFLAGS += $(LIBLOGGING_STDLOG_LIBS) |
1201 |
-+endif |
1202 |
- |
1203 |
- |
1204 |
- if ENABLE_INET |
1205 |
-@@ -142,18 +160,28 @@ pkglib_LTLIBRARIES += lmnet.la lmnetstrms.la |
1206 |
- # network support |
1207 |
- # |
1208 |
- lmnet_la_SOURCES = net.c net.h |
1209 |
--lmnet_la_CPPFLAGS = $(PTHREADS_CFLAGS) $(RSRT_CFLAGS) $(LIBLOGGING_STDLOG_CFLAGS) |
1210 |
--lmnet_la_LDFLAGS = -module -avoid-version ../compat/compat_la-getifaddrs.lo $(LIBLOGGING_STDLOG_LIBS) |
1211 |
--lmnet_la_LIBADD = |
1212 |
-+lmnet_la_CPPFLAGS = $(PTHREADS_CFLAGS) $(RSRT_CFLAGS) |
1213 |
-+lmnet_la_LDFLAGS = -module -avoid-version ../compat/compat_la-getifaddrs.lo |
1214 |
-+lmnet_la_LIBADD = |
1215 |
-+ |
1216 |
-+if ENABLE_LIBLOGGING_STDLOG |
1217 |
-+lmnet_la_CPPFLAGS += $(LIBLOGGING_STDLOG_CFLAGS) |
1218 |
-+lmnet_la_LDFLAGS += $(LIBLOGGING_STDLOG_LIBS) |
1219 |
-+endif |
1220 |
- |
1221 |
- # network stream master class and stream factory |
1222 |
- lmnetstrms_la_SOURCES = netstrms.c netstrms.h \ |
1223 |
- netstrm.c netstrm.h \ |
1224 |
- nssel.c nssel.h \ |
1225 |
- nspoll.c nspoll.h |
1226 |
--lmnetstrms_la_CPPFLAGS = $(PTHREADS_CFLAGS) $(RSRT_CFLAGS) $(LIBLOGGING_STDLOG_CFLAGS) |
1227 |
--lmnetstrms_la_LDFLAGS = -module -avoid-version $(LIBLOGGING_STDLOG_LIBS) |
1228 |
--lmnetstrms_la_LIBADD = |
1229 |
-+lmnetstrms_la_CPPFLAGS = $(PTHREADS_CFLAGS) $(RSRT_CFLAGS) |
1230 |
-+lmnetstrms_la_LDFLAGS = -module -avoid-version |
1231 |
-+lmnetstrms_la_LIBADD = |
1232 |
-+ |
1233 |
-+if ENABLE_LIBLOGGING_STDLOG |
1234 |
-+lmnetstrms_la_CPPFLAGS += $(LIBLOGGING_STDLOG_CFLAGS) |
1235 |
-+lmnetstrms_la_LDFLAGS += $(LIBLOGGING_STDLOG_LIBS) |
1236 |
-+endif |
1237 |
- |
1238 |
- # netstream drivers |
1239 |
- |
1240 |
-@@ -162,9 +190,15 @@ pkglib_LTLIBRARIES += lmnsd_ptcp.la |
1241 |
- lmnsd_ptcp_la_SOURCES = nsd_ptcp.c nsd_ptcp.h \ |
1242 |
- nsdsel_ptcp.c nsdsel_ptcp.h \ |
1243 |
- nsdpoll_ptcp.c nsdpoll_ptcp.h |
1244 |
--lmnsd_ptcp_la_CPPFLAGS = $(PTHREADS_CFLAGS) $(RSRT_CFLAGS) $(LIBLOGGING_STDLOG_CFLAGS) |
1245 |
--lmnsd_ptcp_la_LDFLAGS = -module -avoid-version $(LIBLOGGING_STDLOG_LIBS) |
1246 |
--lmnsd_ptcp_la_LIBADD = |
1247 |
-+lmnsd_ptcp_la_CPPFLAGS = $(PTHREADS_CFLAGS) $(RSRT_CFLAGS) |
1248 |
-+lmnsd_ptcp_la_LDFLAGS = -module -avoid-version |
1249 |
-+lmnsd_ptcp_la_LIBADD = |
1250 |
-+ |
1251 |
-+if ENABLE_LIBLOGGING_STDLOG |
1252 |
-+lmnsd_ptcp_la_CPPFLAGS += $(LIBLOGGING_STDLOG_CFLAGS) |
1253 |
-+lmnsd_ptcp_la_LDFLAGS += $(LIBLOGGING_STDLOG_LIBS) |
1254 |
-+endif |
1255 |
-+ |
1256 |
- endif # if ENABLE_INET |
1257 |
- |
1258 |
- # |
1259 |
-@@ -226,20 +260,30 @@ lmtcpsrv_la_SOURCES = \ |
1260 |
- tcps_sess.h \ |
1261 |
- tcpsrv.c \ |
1262 |
- tcpsrv.h |
1263 |
--lmtcpsrv_la_CPPFLAGS = $(PTHREADS_CFLAGS) $(RSRT_CFLAGS) $(LIBLOGGING_STDLOG_CFLAGS) |
1264 |
--lmtcpsrv_la_LDFLAGS = -module -avoid-version $(LIBLOGGING_STDLOG_LIBS) |
1265 |
-+lmtcpsrv_la_CPPFLAGS = $(PTHREADS_CFLAGS) $(RSRT_CFLAGS) |
1266 |
-+lmtcpsrv_la_LDFLAGS = -module -avoid-version |
1267 |
- lmtcpsrv_la_LIBADD = |
1268 |
- |
1269 |
-+if ENABLE_LIBLOGGING_STDLOG |
1270 |
-+lmtcpsrv_la_CPPFLAGS += $(LIBLOGGING_STDLOG_CFLAGS) |
1271 |
-+lmtcpsrv_la_LDFLAGS += $(LIBLOGGING_STDLOG_LIBS) |
1272 |
-+endif |
1273 |
-+ |
1274 |
- # |
1275 |
- # TCP (stream) client support |
1276 |
- # |
1277 |
- lmtcpclt_la_SOURCES = \ |
1278 |
- tcpclt.c \ |
1279 |
- tcpclt.h |
1280 |
--lmtcpclt_la_CPPFLAGS = $(PTHREADS_CFLAGS) $(RSRT_CFLAGS) $(LIBLOGGING_STDLOG_CFLAGS) |
1281 |
--lmtcpclt_la_LDFLAGS = -module -avoid-version $(LIBLOGGING_STDLOG_LIBS) |
1282 |
-+lmtcpclt_la_CPPFLAGS = $(PTHREADS_CFLAGS) $(RSRT_CFLAGS) |
1283 |
-+lmtcpclt_la_LDFLAGS = -module -avoid-version |
1284 |
- lmtcpclt_la_LIBADD = |
1285 |
- |
1286 |
-+if ENABLE_LIBLOGGING_STDLOG |
1287 |
-+lmtcpclt_la_CPPFLAGS += $(LIBLOGGING_STDLOG_CFLAGS) |
1288 |
-+lmtcpclt_la_LDFLAGS += $(LIBLOGGING_STDLOG_LIBS) |
1289 |
-+endif |
1290 |
-+ |
1291 |
- |
1292 |
- # |
1293 |
- # support library for Guardtime KSI-LS12 |
1294 |
---- a/tools/Makefile.am |
1295 |
-+++ b/tools/Makefile.am |
1296 |
-@@ -37,7 +37,14 @@ rsyslogd_SOURCES = \ |
1297 |
- iminternal.h \ |
1298 |
- \ |
1299 |
- ../dirty.h |
1300 |
--rsyslogd_CPPFLAGS = $(PTHREADS_CFLAGS) $(RSRT_CFLAGS) $(LIBLOGGING_STDLOG_CFLAGS) -DSD_EXPORT_SYMBOLS |
1301 |
-+rsyslogd_CPPFLAGS = $(PTHREADS_CFLAGS) $(RSRT_CFLAGS) |
1302 |
-+ |
1303 |
-+if ENABLE_LIBLOGGING_STDLOG |
1304 |
-+rsyslogd_CPPFLAGS += $(LIBLOGGING_STDLOG_CFLAGS) |
1305 |
-+endif |
1306 |
-+ |
1307 |
-+rsyslogd_CPPFLAGS += -DSD_EXPORT_SYMBOLS |
1308 |
-+ |
1309 |
- # note: it looks like librsyslog.la must be explicitely given on LDDADD, |
1310 |
- # otherwise dependencies are not properly calculated (resulting in a |
1311 |
- # potentially incomplete build, a problem we had several times...) |
1312 |
|
1313 |
diff --git a/app-admin/rsyslog/files/rsyslog-8.40.0-fix-omusrmsg.patch b/app-admin/rsyslog/files/rsyslog-8.40.0-fix-omusrmsg.patch |
1314 |
deleted file mode 100644 |
1315 |
index 9247d0b067f..00000000000 |
1316 |
--- a/app-admin/rsyslog/files/rsyslog-8.40.0-fix-omusrmsg.patch |
1317 |
+++ /dev/null |
1318 |
@@ -1,13 +0,0 @@ |
1319 |
-https://github.com/rsyslog/rsyslog/issues/3346 |
1320 |
- |
1321 |
---- a/tools/omusrmsg.c |
1322 |
-+++ b/tools/omusrmsg.c |
1323 |
-@@ -261,7 +261,7 @@ static rsRetVal wallmsg(uchar* pMsg, instanceData *pData) |
1324 |
- |
1325 |
- /* compute the device name */ |
1326 |
- strcpy(p, _PATH_DEV); |
1327 |
-- memcpy(p, ut.ut_line, UNAMESZ); |
1328 |
-+ strncat(p, ut.ut_line, UNAMESZ); |
1329 |
- |
1330 |
- /* we must be careful when writing to the terminal. A terminal may block |
1331 |
- * (for example, a user has pressed <ctl>-s). In that case, we can not |
1332 |
|
1333 |
diff --git a/app-admin/rsyslog/rsyslog-8.1901.0.ebuild b/app-admin/rsyslog/rsyslog-8.1901.0.ebuild |
1334 |
deleted file mode 100644 |
1335 |
index e9efd66166d..00000000000 |
1336 |
--- a/app-admin/rsyslog/rsyslog-8.1901.0.ebuild |
1337 |
+++ /dev/null |
1338 |
@@ -1,457 +0,0 @@ |
1339 |
-# Copyright 1999-2019 Gentoo Authors |
1340 |
-# Distributed under the terms of the GNU General Public License v2 |
1341 |
- |
1342 |
-EAPI="6" |
1343 |
-PYTHON_COMPAT=( python{2_7,3_5,3_6,3_7} ) |
1344 |
- |
1345 |
-inherit autotools eutils linux-info python-any-r1 systemd |
1346 |
- |
1347 |
-DESCRIPTION="An enhanced multi-threaded syslogd with database support and more" |
1348 |
-HOMEPAGE="https://www.rsyslog.com/" |
1349 |
- |
1350 |
-if [[ ${PV} == "9999" ]]; then |
1351 |
- EGIT_REPO_URI="https://github.com/rsyslog/${PN}.git" |
1352 |
- |
1353 |
- DOC_REPO_URI="https://github.com/rsyslog/${PN}-doc.git" |
1354 |
- |
1355 |
- inherit git-r3 |
1356 |
-else |
1357 |
- KEYWORDS="amd64 arm ~arm64 hppa x86" |
1358 |
- |
1359 |
- SRC_URI=" |
1360 |
- https://www.rsyslog.com/files/download/${PN}/${P}.tar.gz |
1361 |
- doc? ( https://www.rsyslog.com/files/download/${PN}/${PN}-doc-${PV}.tar.gz ) |
1362 |
- " |
1363 |
-fi |
1364 |
- |
1365 |
-LICENSE="GPL-3 LGPL-3 Apache-2.0" |
1366 |
-SLOT="0" |
1367 |
-IUSE="curl dbi debug doc elasticsearch +gcrypt gnutls jemalloc kafka kerberos kubernetes libressl mdblookup" |
1368 |
-IUSE+=" mongodb mysql normalize clickhouse omhttp omhttpfs omudpspoof openssl postgres" |
1369 |
-IUSE+=" rabbitmq redis relp rfc3195 rfc5424hmac snmp ssl systemd test usertools +uuid xxhash zeromq" |
1370 |
-RESTRICT="!test? ( test )" |
1371 |
- |
1372 |
-RDEPEND=" |
1373 |
- >=dev-libs/libfastjson-0.99.8:= |
1374 |
- >=dev-libs/libestr-0.1.9 |
1375 |
- >=sys-libs/zlib-1.2.5 |
1376 |
- curl? ( >=net-misc/curl-7.35.0 ) |
1377 |
- dbi? ( >=dev-db/libdbi-0.8.3 ) |
1378 |
- elasticsearch? ( >=net-misc/curl-7.35.0 ) |
1379 |
- gcrypt? ( >=dev-libs/libgcrypt-1.5.3:= ) |
1380 |
- jemalloc? ( >=dev-libs/jemalloc-3.3.1:= ) |
1381 |
- kafka? ( >=dev-libs/librdkafka-0.9.0.99:= ) |
1382 |
- kerberos? ( virtual/krb5 ) |
1383 |
- kubernetes? ( >=net-misc/curl-7.35.0 ) |
1384 |
- mdblookup? ( dev-libs/libmaxminddb:= ) |
1385 |
- mongodb? ( >=dev-libs/mongo-c-driver-1.1.10:= ) |
1386 |
- mysql? ( virtual/libmysqlclient:= ) |
1387 |
- normalize? ( |
1388 |
- >=dev-libs/libee-0.4.0 |
1389 |
- >=dev-libs/liblognorm-2.0.3:= |
1390 |
- ) |
1391 |
- clickhouse? ( >=net-misc/curl-7.35.0 ) |
1392 |
- omhttpfs? ( >=net-misc/curl-7.35.0 ) |
1393 |
- omudpspoof? ( >=net-libs/libnet-1.1.6 ) |
1394 |
- postgres? ( >=dev-db/postgresql-8.4.20:= ) |
1395 |
- rabbitmq? ( >=net-libs/rabbitmq-c-0.3.0:= ) |
1396 |
- redis? ( >=dev-libs/hiredis-0.11.0:= ) |
1397 |
- relp? ( >=dev-libs/librelp-1.2.17:= ) |
1398 |
- rfc3195? ( >=dev-libs/liblogging-1.0.1:=[rfc3195] ) |
1399 |
- rfc5424hmac? ( |
1400 |
- !libressl? ( >=dev-libs/openssl-0.9.8y:0= ) |
1401 |
- libressl? ( dev-libs/libressl:= ) |
1402 |
- ) |
1403 |
- snmp? ( >=net-analyzer/net-snmp-5.7.2 ) |
1404 |
- ssl? ( |
1405 |
- gnutls? ( >=net-libs/gnutls-2.12.23:0= ) |
1406 |
- openssl? ( |
1407 |
- !libressl? ( dev-libs/openssl:0= ) |
1408 |
- libressl? ( dev-libs/libressl:0= ) |
1409 |
- ) |
1410 |
- ) |
1411 |
- systemd? ( >=sys-apps/systemd-234 ) |
1412 |
- uuid? ( sys-apps/util-linux:0= ) |
1413 |
- xxhash? ( dev-libs/xxhash:= ) |
1414 |
- zeromq? ( |
1415 |
- >=net-libs/czmq-3.0.2 |
1416 |
- )" |
1417 |
-DEPEND="${RDEPEND} |
1418 |
- >=sys-devel/autoconf-archive-2015.02.24 |
1419 |
- virtual/pkgconfig |
1420 |
- elibc_musl? ( sys-libs/queue-standalone ) |
1421 |
- test? ( |
1422 |
- >=dev-libs/liblogging-1.0.1[stdlog] |
1423 |
- jemalloc? ( <sys-libs/libfaketime-0.9.7 ) |
1424 |
- !jemalloc? ( sys-libs/libfaketime ) |
1425 |
- ${PYTHON_DEPS} |
1426 |
- )" |
1427 |
- |
1428 |
-REQUIRED_USE=" |
1429 |
- kubernetes? ( normalize ) |
1430 |
- ssl? ( || ( gnutls openssl ) ) |
1431 |
-" |
1432 |
- |
1433 |
-if [[ ${PV} == "9999" ]]; then |
1434 |
- DEPEND+=" doc? ( >=dev-python/sphinx-1.1.3-r7 )" |
1435 |
- DEPEND+=" >=sys-devel/flex-2.5.39-r1" |
1436 |
- DEPEND+=" >=sys-devel/bison-2.4.3" |
1437 |
- DEPEND+=" >=dev-python/docutils-0.12" |
1438 |
-fi |
1439 |
- |
1440 |
-CONFIG_CHECK="~INOTIFY_USER" |
1441 |
-WARNING_INOTIFY_USER="CONFIG_INOTIFY_USER isn't set. Imfile module on this system will only support polling mode!" |
1442 |
- |
1443 |
-pkg_setup() { |
1444 |
- use test && python-any-r1_pkg_setup |
1445 |
-} |
1446 |
- |
1447 |
-src_unpack() { |
1448 |
- if [[ ${PV} == "9999" ]]; then |
1449 |
- git-r3_fetch |
1450 |
- git-r3_checkout |
1451 |
- else |
1452 |
- unpack ${P}.tar.gz |
1453 |
- fi |
1454 |
- |
1455 |
- if use doc; then |
1456 |
- if [[ ${PV} == "9999" ]]; then |
1457 |
- local _EGIT_BRANCH= |
1458 |
- if [[ -n "${EGIT_BRANCH}" ]]; then |
1459 |
- # Cannot use rsyslog commits/branches for documentation repository |
1460 |
- _EGIT_BRANCH=${EGIT_BRANCH} |
1461 |
- unset EGIT_BRANCH |
1462 |
- fi |
1463 |
- |
1464 |
- git-r3_fetch "${DOC_REPO_URI}" |
1465 |
- git-r3_checkout "${DOC_REPO_URI}" "${S}"/docs |
1466 |
- |
1467 |
- if [[ -n "${_EGIT_BRANCH}" ]]; then |
1468 |
- # Restore previous EGIT_BRANCH information |
1469 |
- EGIT_BRANCH=${_EGIT_BRANCH} |
1470 |
- fi |
1471 |
- else |
1472 |
- cd "${S}" || die "Cannot change dir into '${S}'" |
1473 |
- mkdir docs || die "Failed to create docs directory" |
1474 |
- cd docs || die "Failed to change dir into '${S}/docs'" |
1475 |
- unpack ${PN}-doc-${PV}.tar.gz |
1476 |
- fi |
1477 |
- fi |
1478 |
-} |
1479 |
- |
1480 |
-src_prepare() { |
1481 |
- default |
1482 |
- |
1483 |
- eautoreconf |
1484 |
-} |
1485 |
- |
1486 |
-src_configure() { |
1487 |
- # Maintainer notes: |
1488 |
- # * Guardtime support is missing because libgt isn't yet available |
1489 |
- # in portage. |
1490 |
- # * Hadoop's HDFS file system output module is currently not |
1491 |
- # supported in Gentoo because nobody is able to test it |
1492 |
- # (JAVA dependency). |
1493 |
- # * dev-libs/hiredis doesn't provide pkg-config (see #504614, |
1494 |
- # upstream PR 129 and 136) so we need to export HIREDIS_* |
1495 |
- # variables because rsyslog's build system depends on pkg-config. |
1496 |
- |
1497 |
- if use redis; then |
1498 |
- export HIREDIS_LIBS="-L${EPREFIX}/usr/$(get_libdir) -lhiredis" |
1499 |
- export HIREDIS_CFLAGS="-I${EPREFIX}/usr/include" |
1500 |
- fi |
1501 |
- |
1502 |
- local myeconfargs=( |
1503 |
- --disable-debug-symbols |
1504 |
- --disable-generate-man-pages |
1505 |
- --without-valgrind-testbench |
1506 |
- --disable-liblogging-stdlog |
1507 |
- $(use_enable test testbench) |
1508 |
- $(use_enable test libfaketime) |
1509 |
- $(use_enable test extended-tests) |
1510 |
- # Input Plugins without depedencies |
1511 |
- --enable-imdiag |
1512 |
- --enable-imfile |
1513 |
- --enable-impstats |
1514 |
- --enable-imptcp |
1515 |
- # Message Modificiation Plugins without depedencies |
1516 |
- --enable-mmanon |
1517 |
- --enable-mmaudit |
1518 |
- --enable-mmcount |
1519 |
- --enable-mmfields |
1520 |
- --enable-mmjsonparse |
1521 |
- --enable-mmpstrucdata |
1522 |
- --enable-mmrm1stspace |
1523 |
- --enable-mmsequence |
1524 |
- --enable-mmutf8fix |
1525 |
- # Output Modification Plugins without dependencies |
1526 |
- --enable-mail |
1527 |
- --enable-omprog |
1528 |
- --enable-omruleset |
1529 |
- --enable-omstdout |
1530 |
- --enable-omuxsock |
1531 |
- # Misc |
1532 |
- --enable-fmhash |
1533 |
- $(use_enable xxhash fmhash-xxhash) |
1534 |
- --enable-pmaixforwardedfrom |
1535 |
- --enable-pmciscoios |
1536 |
- --enable-pmcisconames |
1537 |
- --enable-pmlastmsg |
1538 |
- $(use_enable normalize pmnormalize) |
1539 |
- --enable-pmnull |
1540 |
- --enable-pmpanngfw |
1541 |
- --enable-pmsnare |
1542 |
- # DB |
1543 |
- $(use_enable dbi libdbi) |
1544 |
- $(use_enable mongodb ommongodb) |
1545 |
- $(use_enable mysql) |
1546 |
- $(use_enable postgres pgsql) |
1547 |
- $(use_enable redis omhiredis) |
1548 |
- # Debug |
1549 |
- $(use_enable debug) |
1550 |
- $(use_enable debug diagtools) |
1551 |
- $(use_enable debug valgrind) |
1552 |
- # Misc |
1553 |
- $(use_enable clickhouse) |
1554 |
- $(use_enable curl fmhttp) |
1555 |
- $(use_enable elasticsearch) |
1556 |
- $(use_enable gcrypt libgcrypt) |
1557 |
- $(use_enable jemalloc) |
1558 |
- $(use_enable kafka imkafka) |
1559 |
- $(use_enable kafka omkafka) |
1560 |
- $(use_enable kerberos gssapi-krb5) |
1561 |
- $(use_enable kubernetes mmkubernetes) |
1562 |
- $(use_enable normalize mmnormalize) |
1563 |
- $(use_enable mdblookup mmdblookup) |
1564 |
- $(use_enable omhttp) |
1565 |
- $(use_enable omhttpfs) |
1566 |
- $(use_enable omudpspoof) |
1567 |
- $(use_enable rabbitmq omrabbitmq) |
1568 |
- $(use_enable relp) |
1569 |
- $(use_enable rfc3195) |
1570 |
- $(use_enable rfc5424hmac mmrfc5424addhmac) |
1571 |
- $(use_enable snmp) |
1572 |
- $(use_enable snmp mmsnmptrapd) |
1573 |
- $(use_enable gnutls) |
1574 |
- $(use_enable openssl) |
1575 |
- $(use_enable systemd imjournal) |
1576 |
- $(use_enable systemd omjournal) |
1577 |
- $(use_enable usertools) |
1578 |
- $(use_enable uuid) |
1579 |
- $(use_enable zeromq imczmq) |
1580 |
- $(use_enable zeromq omczmq) |
1581 |
- --with-systemdsystemunitdir="$(systemd_get_systemunitdir)" |
1582 |
- ) |
1583 |
- |
1584 |
- econf "${myeconfargs[@]}" |
1585 |
-} |
1586 |
- |
1587 |
-src_compile() { |
1588 |
- default |
1589 |
- |
1590 |
- if use doc && [[ "${PV}" == "9999" ]]; then |
1591 |
- einfo "Building documentation ..." |
1592 |
- local doc_dir="${S}/docs" |
1593 |
- cd "${doc_dir}" || die "Cannot chdir into \"${doc_dir}\"!" |
1594 |
- sphinx-build -b html source build || die "Building documentation failed!" |
1595 |
- fi |
1596 |
-} |
1597 |
- |
1598 |
-src_test() { |
1599 |
- local _has_increased_ulimit= |
1600 |
- |
1601 |
- # Sometimes tests aren't executable (i.e. when added via patch) |
1602 |
- einfo "Adjusting permissions of test scripts ..." |
1603 |
- find "${S}"/tests -type f -name '*.sh' \! -perm -111 -exec chmod a+x '{}' \; || \ |
1604 |
- die "Failed to adjust test scripts permission" |
1605 |
- |
1606 |
- if ulimit -n 3072; then |
1607 |
- _has_increased_ulimit="true" |
1608 |
- fi |
1609 |
- |
1610 |
- if ! emake --jobs 1 check; then |
1611 |
- eerror "Test suite failed! :(" |
1612 |
- |
1613 |
- if [[ -z "${_has_increased_ulimit}" ]]; then |
1614 |
- eerror "Probably because open file limit couldn't be set to 3072." |
1615 |
- fi |
1616 |
- |
1617 |
- if has userpriv ${FEATURES}; then |
1618 |
- eerror "Please try to reproduce the test suite failure with FEATURES=-userpriv " \ |
1619 |
- "before you submit a bug report." |
1620 |
- fi |
1621 |
- |
1622 |
- fi |
1623 |
-} |
1624 |
- |
1625 |
-src_install() { |
1626 |
- local DOCS=( |
1627 |
- AUTHORS |
1628 |
- ChangeLog |
1629 |
- "${FILESDIR}"/README.gentoo |
1630 |
- ) |
1631 |
- |
1632 |
- use doc && local HTML_DOCS=( "${S}/docs/build/." ) |
1633 |
- |
1634 |
- default |
1635 |
- |
1636 |
- newconfd "${FILESDIR}/${PN}.confd-r1" ${PN} |
1637 |
- newinitd "${FILESDIR}/${PN}.initd-r1" ${PN} |
1638 |
- |
1639 |
- keepdir /var/empty/dev |
1640 |
- keepdir /var/spool/${PN} |
1641 |
- keepdir /etc/ssl/${PN} |
1642 |
- keepdir /etc/${PN}.d |
1643 |
- |
1644 |
- insinto /etc |
1645 |
- newins "${FILESDIR}/${PN}.conf" ${PN}.conf |
1646 |
- |
1647 |
- insinto /etc/rsyslog.d/ |
1648 |
- newins "${FILESDIR}/50-default-r1.conf" 50-default.conf |
1649 |
- |
1650 |
- insinto /etc/logrotate.d/ |
1651 |
- newins "${FILESDIR}/${PN}-r1.logrotate" ${PN} |
1652 |
- |
1653 |
- if use mysql; then |
1654 |
- insinto /usr/share/doc/${PF}/scripts/mysql |
1655 |
- doins plugins/ommysql/createDB.sql |
1656 |
- fi |
1657 |
- |
1658 |
- if use postgres; then |
1659 |
- insinto /usr/share/doc/${PF}/scripts/pgsql |
1660 |
- doins plugins/ompgsql/createDB.sql |
1661 |
- fi |
1662 |
- |
1663 |
- prune_libtool_files --modules |
1664 |
-} |
1665 |
- |
1666 |
-pkg_postinst() { |
1667 |
- local advertise_readme=0 |
1668 |
- |
1669 |
- if [[ -z "${REPLACING_VERSIONS}" ]]; then |
1670 |
- # This is a new installation |
1671 |
- |
1672 |
- advertise_readme=1 |
1673 |
- |
1674 |
- if use mysql || use postgres; then |
1675 |
- echo |
1676 |
- elog "Sample SQL scripts for MySQL & PostgreSQL have been installed to:" |
1677 |
- elog " /usr/share/doc/${PF}/scripts" |
1678 |
- fi |
1679 |
- |
1680 |
- if use ssl; then |
1681 |
- echo |
1682 |
- elog "To create a default CA and certificates for your server and clients, run:" |
1683 |
- elog " emerge --config =${PF}" |
1684 |
- elog "on your logging server. You can run it several times," |
1685 |
- elog "once for each logging client. The client certificates will be signed" |
1686 |
- elog "using the CA certificate generated during the first run." |
1687 |
- fi |
1688 |
- fi |
1689 |
- |
1690 |
- if [[ ${advertise_readme} -gt 0 ]]; then |
1691 |
- # We need to show the README file location |
1692 |
- |
1693 |
- echo "" |
1694 |
- elog "Please read" |
1695 |
- elog "" |
1696 |
- elog " ${EPREFIX}/usr/share/doc/${PF}/README.gentoo*" |
1697 |
- elog "" |
1698 |
- elog "for more details." |
1699 |
- fi |
1700 |
-} |
1701 |
- |
1702 |
-pkg_config() { |
1703 |
- if ! use ssl ; then |
1704 |
- einfo "There is nothing to configure for rsyslog unless you" |
1705 |
- einfo "used USE=ssl to build it." |
1706 |
- return 0 |
1707 |
- fi |
1708 |
- |
1709 |
- # Make sure the certificates directory exists |
1710 |
- local CERTDIR="${EROOT}/etc/ssl/${PN}" |
1711 |
- if [[ ! -d "${CERTDIR}" ]]; then |
1712 |
- mkdir "${CERTDIR}" || die |
1713 |
- fi |
1714 |
- einfo "Your certificates will be stored in ${CERTDIR}" |
1715 |
- |
1716 |
- # Create a default CA if needed |
1717 |
- if [[ ! -f "${CERTDIR}/${PN}_ca.cert.pem" ]]; then |
1718 |
- einfo "No CA key and certificate found in ${CERTDIR}, creating them for you..." |
1719 |
- certtool --generate-privkey \ |
1720 |
- --outfile "${CERTDIR}/${PN}_ca.privkey.pem" &>/dev/null |
1721 |
- chmod 400 "${CERTDIR}/${PN}_ca.privkey.pem" |
1722 |
- |
1723 |
- cat > "${T}/${PF}.$$" <<- _EOF |
1724 |
- cn = Portage automated CA |
1725 |
- ca |
1726 |
- cert_signing_key |
1727 |
- expiration_days = 3650 |
1728 |
- _EOF |
1729 |
- |
1730 |
- certtool --generate-self-signed \ |
1731 |
- --load-privkey "${CERTDIR}/${PN}_ca.privkey.pem" \ |
1732 |
- --outfile "${CERTDIR}/${PN}_ca.cert.pem" \ |
1733 |
- --template "${T}/${PF}.$$" &>/dev/null |
1734 |
- chmod 400 "${CERTDIR}/${PN}_ca.privkey.pem" |
1735 |
- |
1736 |
- # Create the server certificate |
1737 |
- echo |
1738 |
- einfon "Please type the Common Name of the SERVER you wish to create a certificate for: " |
1739 |
- read -r CN |
1740 |
- |
1741 |
- einfo "Creating private key and certificate for server ${CN}..." |
1742 |
- certtool --generate-privkey \ |
1743 |
- --outfile "${CERTDIR}/${PN}_${CN}.key.pem" &>/dev/null |
1744 |
- chmod 400 "${CERTDIR}/${PN}_${CN}.key.pem" |
1745 |
- |
1746 |
- cat > "${T}/${PF}.$$" <<- _EOF |
1747 |
- cn = ${CN} |
1748 |
- tls_www_server |
1749 |
- dns_name = ${CN} |
1750 |
- expiration_days = 3650 |
1751 |
- _EOF |
1752 |
- |
1753 |
- certtool --generate-certificate \ |
1754 |
- --outfile "${CERTDIR}/${PN}_${CN}.cert.pem" \ |
1755 |
- --load-privkey "${CERTDIR}/${PN}_${CN}.key.pem" \ |
1756 |
- --load-ca-certificate "${CERTDIR}/${PN}_ca.cert.pem" \ |
1757 |
- --load-ca-privkey "${CERTDIR}/${PN}_ca.privkey.pem" \ |
1758 |
- --template "${T}/${PF}.$$" &>/dev/null |
1759 |
- chmod 400 "${CERTDIR}/${PN}_${CN}.cert.pem" |
1760 |
- |
1761 |
- else |
1762 |
- einfo "Found existing ${CERTDIR}/${PN}_ca.cert.pem, skipping CA and SERVER creation." |
1763 |
- fi |
1764 |
- |
1765 |
- # Create a client certificate |
1766 |
- echo |
1767 |
- einfon "Please type the Common Name of the CLIENT you wish to create a certificate for: " |
1768 |
- read -r CN |
1769 |
- |
1770 |
- einfo "Creating private key and certificate for client ${CN}..." |
1771 |
- certtool --generate-privkey \ |
1772 |
- --outfile "${CERTDIR}/${PN}_${CN}.key.pem" &>/dev/null |
1773 |
- chmod 400 "${CERTDIR}/${PN}_${CN}.key.pem" |
1774 |
- |
1775 |
- cat > "${T}/${PF}.$$" <<- _EOF |
1776 |
- cn = ${CN} |
1777 |
- tls_www_client |
1778 |
- dns_name = ${CN} |
1779 |
- expiration_days = 3650 |
1780 |
- _EOF |
1781 |
- |
1782 |
- certtool --generate-certificate \ |
1783 |
- --outfile "${CERTDIR}/${PN}_${CN}.cert.pem" \ |
1784 |
- --load-privkey "${CERTDIR}/${PN}_${CN}.key.pem" \ |
1785 |
- --load-ca-certificate "${CERTDIR}/${PN}_ca.cert.pem" \ |
1786 |
- --load-ca-privkey "${CERTDIR}/${PN}_ca.privkey.pem" \ |
1787 |
- --template "${T}/${PF}.$$" &>/dev/null |
1788 |
- chmod 400 "${CERTDIR}/${PN}_${CN}.cert.pem" |
1789 |
- |
1790 |
- rm -f "${T}/${PF}.$$" |
1791 |
- |
1792 |
- echo |
1793 |
- einfo "Here is the documentation on how to encrypt your log traffic:" |
1794 |
- einfo " https://www.rsyslog.com/doc/rsyslog_tls.html" |
1795 |
-} |
1796 |
|
1797 |
diff --git a/app-admin/rsyslog/rsyslog-8.1903.0.ebuild b/app-admin/rsyslog/rsyslog-8.1903.0.ebuild |
1798 |
deleted file mode 100644 |
1799 |
index d1b23d297f7..00000000000 |
1800 |
--- a/app-admin/rsyslog/rsyslog-8.1903.0.ebuild |
1801 |
+++ /dev/null |
1802 |
@@ -1,463 +0,0 @@ |
1803 |
-# Copyright 1999-2019 Gentoo Authors |
1804 |
-# Distributed under the terms of the GNU General Public License v2 |
1805 |
- |
1806 |
-EAPI="6" |
1807 |
-PYTHON_COMPAT=( python{2_7,3_5,3_6,3_7} ) |
1808 |
- |
1809 |
-inherit autotools eutils linux-info python-any-r1 systemd |
1810 |
- |
1811 |
-DESCRIPTION="An enhanced multi-threaded syslogd with database support and more" |
1812 |
-HOMEPAGE="https://www.rsyslog.com/" |
1813 |
- |
1814 |
-if [[ ${PV} == "9999" ]]; then |
1815 |
- EGIT_REPO_URI="https://github.com/rsyslog/${PN}.git" |
1816 |
- |
1817 |
- DOC_REPO_URI="https://github.com/rsyslog/${PN}-doc.git" |
1818 |
- |
1819 |
- inherit git-r3 |
1820 |
-else |
1821 |
- KEYWORDS="~amd64 ~arm ~arm64 ~hppa ~x86" |
1822 |
- |
1823 |
- SRC_URI=" |
1824 |
- https://www.rsyslog.com/files/download/${PN}/${P}.tar.gz |
1825 |
- doc? ( https://www.rsyslog.com/files/download/${PN}/${PN}-doc-${PV}.tar.gz ) |
1826 |
- " |
1827 |
-fi |
1828 |
- |
1829 |
-LICENSE="GPL-3 LGPL-3 Apache-2.0" |
1830 |
-SLOT="0" |
1831 |
-IUSE="curl dbi debug doc elasticsearch +gcrypt gnutls jemalloc kafka kerberos kubernetes libressl mdblookup" |
1832 |
-IUSE+=" mongodb mysql normalize clickhouse omhttp omhttpfs omudpspoof openssl postgres" |
1833 |
-IUSE+=" rabbitmq redis relp rfc3195 rfc5424hmac snmp ssl systemd test usertools +uuid xxhash zeromq" |
1834 |
-RESTRICT="!test? ( test )" |
1835 |
- |
1836 |
-RDEPEND=" |
1837 |
- >=dev-libs/libfastjson-0.99.8:= |
1838 |
- >=dev-libs/libestr-0.1.9 |
1839 |
- >=sys-libs/zlib-1.2.5 |
1840 |
- curl? ( >=net-misc/curl-7.35.0 ) |
1841 |
- dbi? ( >=dev-db/libdbi-0.8.3 ) |
1842 |
- elasticsearch? ( >=net-misc/curl-7.35.0 ) |
1843 |
- gcrypt? ( >=dev-libs/libgcrypt-1.5.3:= ) |
1844 |
- jemalloc? ( >=dev-libs/jemalloc-3.3.1:= ) |
1845 |
- kafka? ( >=dev-libs/librdkafka-0.9.0.99:= ) |
1846 |
- kerberos? ( virtual/krb5 ) |
1847 |
- kubernetes? ( >=net-misc/curl-7.35.0 ) |
1848 |
- mdblookup? ( dev-libs/libmaxminddb:= ) |
1849 |
- mongodb? ( >=dev-libs/mongo-c-driver-1.1.10:= ) |
1850 |
- mysql? ( virtual/libmysqlclient:= ) |
1851 |
- normalize? ( |
1852 |
- >=dev-libs/libee-0.4.0 |
1853 |
- >=dev-libs/liblognorm-2.0.3:= |
1854 |
- ) |
1855 |
- clickhouse? ( >=net-misc/curl-7.35.0 ) |
1856 |
- omhttpfs? ( >=net-misc/curl-7.35.0 ) |
1857 |
- omudpspoof? ( >=net-libs/libnet-1.1.6 ) |
1858 |
- postgres? ( >=dev-db/postgresql-8.4.20:= ) |
1859 |
- rabbitmq? ( >=net-libs/rabbitmq-c-0.3.0:= ) |
1860 |
- redis? ( >=dev-libs/hiredis-0.11.0:= ) |
1861 |
- relp? ( >=dev-libs/librelp-1.2.17:= ) |
1862 |
- rfc3195? ( >=dev-libs/liblogging-1.0.1:=[rfc3195] ) |
1863 |
- rfc5424hmac? ( |
1864 |
- !libressl? ( >=dev-libs/openssl-0.9.8y:0= ) |
1865 |
- libressl? ( dev-libs/libressl:= ) |
1866 |
- ) |
1867 |
- snmp? ( >=net-analyzer/net-snmp-5.7.2 ) |
1868 |
- ssl? ( |
1869 |
- gnutls? ( >=net-libs/gnutls-2.12.23:0= ) |
1870 |
- openssl? ( |
1871 |
- !libressl? ( dev-libs/openssl:0= ) |
1872 |
- libressl? ( dev-libs/libressl:0= ) |
1873 |
- ) |
1874 |
- ) |
1875 |
- systemd? ( >=sys-apps/systemd-234 ) |
1876 |
- uuid? ( sys-apps/util-linux:0= ) |
1877 |
- xxhash? ( dev-libs/xxhash:= ) |
1878 |
- zeromq? ( |
1879 |
- >=net-libs/czmq-3.0.2 |
1880 |
- )" |
1881 |
-DEPEND="${RDEPEND} |
1882 |
- >=sys-devel/autoconf-archive-2015.02.24 |
1883 |
- virtual/pkgconfig |
1884 |
- elibc_musl? ( sys-libs/queue-standalone ) |
1885 |
- test? ( |
1886 |
- >=dev-libs/liblogging-1.0.1[stdlog] |
1887 |
- jemalloc? ( <sys-libs/libfaketime-0.9.7 ) |
1888 |
- !jemalloc? ( sys-libs/libfaketime ) |
1889 |
- ${PYTHON_DEPS} |
1890 |
- )" |
1891 |
- |
1892 |
-REQUIRED_USE=" |
1893 |
- kubernetes? ( normalize ) |
1894 |
- ssl? ( || ( gnutls openssl ) ) |
1895 |
-" |
1896 |
- |
1897 |
-if [[ ${PV} == "9999" ]]; then |
1898 |
- DEPEND+=" doc? ( >=dev-python/sphinx-1.1.3-r7 )" |
1899 |
- DEPEND+=" >=sys-devel/flex-2.5.39-r1" |
1900 |
- DEPEND+=" >=sys-devel/bison-2.4.3" |
1901 |
- DEPEND+=" >=dev-python/docutils-0.12" |
1902 |
-fi |
1903 |
- |
1904 |
-PATCHES=( |
1905 |
- "${FILESDIR}"/${P}-add-missing-tests.patch |
1906 |
- "${FILESDIR}"/${P}-add-py3-support-to-omhttp-test.patch |
1907 |
- "${FILESDIR}"/${P}-fix-py3-compatibility-in-diag.sh.patch |
1908 |
-) |
1909 |
- |
1910 |
-CONFIG_CHECK="~INOTIFY_USER" |
1911 |
-WARNING_INOTIFY_USER="CONFIG_INOTIFY_USER isn't set. Imfile module on this system will only support polling mode!" |
1912 |
- |
1913 |
-pkg_setup() { |
1914 |
- use test && python-any-r1_pkg_setup |
1915 |
-} |
1916 |
- |
1917 |
-src_unpack() { |
1918 |
- if [[ ${PV} == "9999" ]]; then |
1919 |
- git-r3_fetch |
1920 |
- git-r3_checkout |
1921 |
- else |
1922 |
- unpack ${P}.tar.gz |
1923 |
- fi |
1924 |
- |
1925 |
- if use doc; then |
1926 |
- if [[ ${PV} == "9999" ]]; then |
1927 |
- local _EGIT_BRANCH= |
1928 |
- if [[ -n "${EGIT_BRANCH}" ]]; then |
1929 |
- # Cannot use rsyslog commits/branches for documentation repository |
1930 |
- _EGIT_BRANCH=${EGIT_BRANCH} |
1931 |
- unset EGIT_BRANCH |
1932 |
- fi |
1933 |
- |
1934 |
- git-r3_fetch "${DOC_REPO_URI}" |
1935 |
- git-r3_checkout "${DOC_REPO_URI}" "${S}"/docs |
1936 |
- |
1937 |
- if [[ -n "${_EGIT_BRANCH}" ]]; then |
1938 |
- # Restore previous EGIT_BRANCH information |
1939 |
- EGIT_BRANCH=${_EGIT_BRANCH} |
1940 |
- fi |
1941 |
- else |
1942 |
- cd "${S}" || die "Cannot change dir into '${S}'" |
1943 |
- mkdir docs || die "Failed to create docs directory" |
1944 |
- cd docs || die "Failed to change dir into '${S}/docs'" |
1945 |
- unpack ${PN}-doc-${PV}.tar.gz |
1946 |
- fi |
1947 |
- fi |
1948 |
-} |
1949 |
- |
1950 |
-src_prepare() { |
1951 |
- default |
1952 |
- |
1953 |
- eautoreconf |
1954 |
-} |
1955 |
- |
1956 |
-src_configure() { |
1957 |
- # Maintainer notes: |
1958 |
- # * Guardtime support is missing because libgt isn't yet available |
1959 |
- # in portage. |
1960 |
- # * Hadoop's HDFS file system output module is currently not |
1961 |
- # supported in Gentoo because nobody is able to test it |
1962 |
- # (JAVA dependency). |
1963 |
- # * dev-libs/hiredis doesn't provide pkg-config (see #504614, |
1964 |
- # upstream PR 129 and 136) so we need to export HIREDIS_* |
1965 |
- # variables because rsyslog's build system depends on pkg-config. |
1966 |
- |
1967 |
- if use redis; then |
1968 |
- export HIREDIS_LIBS="-L${EPREFIX}/usr/$(get_libdir) -lhiredis" |
1969 |
- export HIREDIS_CFLAGS="-I${EPREFIX}/usr/include" |
1970 |
- fi |
1971 |
- |
1972 |
- local myeconfargs=( |
1973 |
- --disable-debug-symbols |
1974 |
- --disable-generate-man-pages |
1975 |
- --without-valgrind-testbench |
1976 |
- --disable-liblogging-stdlog |
1977 |
- $(use_enable test testbench) |
1978 |
- $(use_enable test libfaketime) |
1979 |
- $(use_enable test extended-tests) |
1980 |
- # Input Plugins without depedencies |
1981 |
- --enable-imdiag |
1982 |
- --enable-imfile |
1983 |
- --enable-impstats |
1984 |
- --enable-imptcp |
1985 |
- # Message Modificiation Plugins without depedencies |
1986 |
- --enable-mmanon |
1987 |
- --enable-mmaudit |
1988 |
- --enable-mmcount |
1989 |
- --enable-mmfields |
1990 |
- --enable-mmjsonparse |
1991 |
- --enable-mmpstrucdata |
1992 |
- --enable-mmrm1stspace |
1993 |
- --enable-mmsequence |
1994 |
- --enable-mmutf8fix |
1995 |
- # Output Modification Plugins without dependencies |
1996 |
- --enable-mail |
1997 |
- --enable-omprog |
1998 |
- --enable-omruleset |
1999 |
- --enable-omstdout |
2000 |
- --enable-omuxsock |
2001 |
- # Misc |
2002 |
- --enable-fmhash |
2003 |
- $(use_enable xxhash fmhash-xxhash) |
2004 |
- --enable-pmaixforwardedfrom |
2005 |
- --enable-pmciscoios |
2006 |
- --enable-pmcisconames |
2007 |
- --enable-pmlastmsg |
2008 |
- $(use_enable normalize pmnormalize) |
2009 |
- --enable-pmnull |
2010 |
- --enable-pmpanngfw |
2011 |
- --enable-pmsnare |
2012 |
- # DB |
2013 |
- $(use_enable dbi libdbi) |
2014 |
- $(use_enable mongodb ommongodb) |
2015 |
- $(use_enable mysql) |
2016 |
- $(use_enable postgres pgsql) |
2017 |
- $(use_enable redis omhiredis) |
2018 |
- # Debug |
2019 |
- $(use_enable debug) |
2020 |
- $(use_enable debug diagtools) |
2021 |
- $(use_enable debug valgrind) |
2022 |
- # Misc |
2023 |
- $(use_enable clickhouse) |
2024 |
- $(use_enable curl fmhttp) |
2025 |
- $(use_enable elasticsearch) |
2026 |
- $(use_enable gcrypt libgcrypt) |
2027 |
- $(use_enable jemalloc) |
2028 |
- $(use_enable kafka imkafka) |
2029 |
- $(use_enable kafka omkafka) |
2030 |
- $(use_enable kerberos gssapi-krb5) |
2031 |
- $(use_enable kubernetes mmkubernetes) |
2032 |
- $(use_enable normalize mmnormalize) |
2033 |
- $(use_enable mdblookup mmdblookup) |
2034 |
- $(use_enable omhttp) |
2035 |
- $(use_enable omhttpfs) |
2036 |
- $(use_enable omudpspoof) |
2037 |
- $(use_enable rabbitmq omrabbitmq) |
2038 |
- $(use_enable relp) |
2039 |
- $(use_enable rfc3195) |
2040 |
- $(use_enable rfc5424hmac mmrfc5424addhmac) |
2041 |
- $(use_enable snmp) |
2042 |
- $(use_enable snmp mmsnmptrapd) |
2043 |
- $(use_enable gnutls) |
2044 |
- $(use_enable openssl) |
2045 |
- $(use_enable systemd imjournal) |
2046 |
- $(use_enable systemd omjournal) |
2047 |
- $(use_enable usertools) |
2048 |
- $(use_enable uuid) |
2049 |
- $(use_enable zeromq imczmq) |
2050 |
- $(use_enable zeromq omczmq) |
2051 |
- --with-systemdsystemunitdir="$(systemd_get_systemunitdir)" |
2052 |
- ) |
2053 |
- |
2054 |
- econf "${myeconfargs[@]}" |
2055 |
-} |
2056 |
- |
2057 |
-src_compile() { |
2058 |
- default |
2059 |
- |
2060 |
- if use doc && [[ "${PV}" == "9999" ]]; then |
2061 |
- einfo "Building documentation ..." |
2062 |
- local doc_dir="${S}/docs" |
2063 |
- cd "${doc_dir}" || die "Cannot chdir into \"${doc_dir}\"!" |
2064 |
- sphinx-build -b html source build || die "Building documentation failed!" |
2065 |
- fi |
2066 |
-} |
2067 |
- |
2068 |
-src_test() { |
2069 |
- local _has_increased_ulimit= |
2070 |
- |
2071 |
- # Sometimes tests aren't executable (i.e. when added via patch) |
2072 |
- einfo "Adjusting permissions of test scripts ..." |
2073 |
- find "${S}"/tests -type f -name '*.sh' \! -perm -111 -exec chmod a+x '{}' \; || \ |
2074 |
- die "Failed to adjust test scripts permission" |
2075 |
- |
2076 |
- if ulimit -n 3072; then |
2077 |
- _has_increased_ulimit="true" |
2078 |
- fi |
2079 |
- |
2080 |
- if ! emake --jobs 1 check; then |
2081 |
- eerror "Test suite failed! :(" |
2082 |
- |
2083 |
- if [[ -z "${_has_increased_ulimit}" ]]; then |
2084 |
- eerror "Probably because open file limit couldn't be set to 3072." |
2085 |
- fi |
2086 |
- |
2087 |
- if has userpriv ${FEATURES}; then |
2088 |
- eerror "Please try to reproduce the test suite failure with FEATURES=-userpriv " \ |
2089 |
- "before you submit a bug report." |
2090 |
- fi |
2091 |
- |
2092 |
- fi |
2093 |
-} |
2094 |
- |
2095 |
-src_install() { |
2096 |
- local DOCS=( |
2097 |
- AUTHORS |
2098 |
- ChangeLog |
2099 |
- "${FILESDIR}"/README.gentoo |
2100 |
- ) |
2101 |
- |
2102 |
- use doc && local HTML_DOCS=( "${S}/docs/build/." ) |
2103 |
- |
2104 |
- default |
2105 |
- |
2106 |
- newconfd "${FILESDIR}/${PN}.confd-r1" ${PN} |
2107 |
- newinitd "${FILESDIR}/${PN}.initd-r1" ${PN} |
2108 |
- |
2109 |
- keepdir /var/empty/dev |
2110 |
- keepdir /var/spool/${PN} |
2111 |
- keepdir /etc/ssl/${PN} |
2112 |
- keepdir /etc/${PN}.d |
2113 |
- |
2114 |
- insinto /etc |
2115 |
- newins "${FILESDIR}/${PN}.conf" ${PN}.conf |
2116 |
- |
2117 |
- insinto /etc/rsyslog.d/ |
2118 |
- newins "${FILESDIR}/50-default-r1.conf" 50-default.conf |
2119 |
- |
2120 |
- insinto /etc/logrotate.d/ |
2121 |
- newins "${FILESDIR}/${PN}-r1.logrotate" ${PN} |
2122 |
- |
2123 |
- if use mysql; then |
2124 |
- insinto /usr/share/doc/${PF}/scripts/mysql |
2125 |
- doins plugins/ommysql/createDB.sql |
2126 |
- fi |
2127 |
- |
2128 |
- if use postgres; then |
2129 |
- insinto /usr/share/doc/${PF}/scripts/pgsql |
2130 |
- doins plugins/ompgsql/createDB.sql |
2131 |
- fi |
2132 |
- |
2133 |
- prune_libtool_files --modules |
2134 |
-} |
2135 |
- |
2136 |
-pkg_postinst() { |
2137 |
- local advertise_readme=0 |
2138 |
- |
2139 |
- if [[ -z "${REPLACING_VERSIONS}" ]]; then |
2140 |
- # This is a new installation |
2141 |
- |
2142 |
- advertise_readme=1 |
2143 |
- |
2144 |
- if use mysql || use postgres; then |
2145 |
- echo |
2146 |
- elog "Sample SQL scripts for MySQL & PostgreSQL have been installed to:" |
2147 |
- elog " /usr/share/doc/${PF}/scripts" |
2148 |
- fi |
2149 |
- |
2150 |
- if use ssl; then |
2151 |
- echo |
2152 |
- elog "To create a default CA and certificates for your server and clients, run:" |
2153 |
- elog " emerge --config =${PF}" |
2154 |
- elog "on your logging server. You can run it several times," |
2155 |
- elog "once for each logging client. The client certificates will be signed" |
2156 |
- elog "using the CA certificate generated during the first run." |
2157 |
- fi |
2158 |
- fi |
2159 |
- |
2160 |
- if [[ ${advertise_readme} -gt 0 ]]; then |
2161 |
- # We need to show the README file location |
2162 |
- |
2163 |
- echo "" |
2164 |
- elog "Please read" |
2165 |
- elog "" |
2166 |
- elog " ${EPREFIX}/usr/share/doc/${PF}/README.gentoo*" |
2167 |
- elog "" |
2168 |
- elog "for more details." |
2169 |
- fi |
2170 |
-} |
2171 |
- |
2172 |
-pkg_config() { |
2173 |
- if ! use ssl ; then |
2174 |
- einfo "There is nothing to configure for rsyslog unless you" |
2175 |
- einfo "used USE=ssl to build it." |
2176 |
- return 0 |
2177 |
- fi |
2178 |
- |
2179 |
- # Make sure the certificates directory exists |
2180 |
- local CERTDIR="${EROOT}/etc/ssl/${PN}" |
2181 |
- if [[ ! -d "${CERTDIR}" ]]; then |
2182 |
- mkdir "${CERTDIR}" || die |
2183 |
- fi |
2184 |
- einfo "Your certificates will be stored in ${CERTDIR}" |
2185 |
- |
2186 |
- # Create a default CA if needed |
2187 |
- if [[ ! -f "${CERTDIR}/${PN}_ca.cert.pem" ]]; then |
2188 |
- einfo "No CA key and certificate found in ${CERTDIR}, creating them for you..." |
2189 |
- certtool --generate-privkey \ |
2190 |
- --outfile "${CERTDIR}/${PN}_ca.privkey.pem" &>/dev/null |
2191 |
- chmod 400 "${CERTDIR}/${PN}_ca.privkey.pem" |
2192 |
- |
2193 |
- cat > "${T}/${PF}.$$" <<- _EOF |
2194 |
- cn = Portage automated CA |
2195 |
- ca |
2196 |
- cert_signing_key |
2197 |
- expiration_days = 3650 |
2198 |
- _EOF |
2199 |
- |
2200 |
- certtool --generate-self-signed \ |
2201 |
- --load-privkey "${CERTDIR}/${PN}_ca.privkey.pem" \ |
2202 |
- --outfile "${CERTDIR}/${PN}_ca.cert.pem" \ |
2203 |
- --template "${T}/${PF}.$$" &>/dev/null |
2204 |
- chmod 400 "${CERTDIR}/${PN}_ca.privkey.pem" |
2205 |
- |
2206 |
- # Create the server certificate |
2207 |
- echo |
2208 |
- einfon "Please type the Common Name of the SERVER you wish to create a certificate for: " |
2209 |
- read -r CN |
2210 |
- |
2211 |
- einfo "Creating private key and certificate for server ${CN}..." |
2212 |
- certtool --generate-privkey \ |
2213 |
- --outfile "${CERTDIR}/${PN}_${CN}.key.pem" &>/dev/null |
2214 |
- chmod 400 "${CERTDIR}/${PN}_${CN}.key.pem" |
2215 |
- |
2216 |
- cat > "${T}/${PF}.$$" <<- _EOF |
2217 |
- cn = ${CN} |
2218 |
- tls_www_server |
2219 |
- dns_name = ${CN} |
2220 |
- expiration_days = 3650 |
2221 |
- _EOF |
2222 |
- |
2223 |
- certtool --generate-certificate \ |
2224 |
- --outfile "${CERTDIR}/${PN}_${CN}.cert.pem" \ |
2225 |
- --load-privkey "${CERTDIR}/${PN}_${CN}.key.pem" \ |
2226 |
- --load-ca-certificate "${CERTDIR}/${PN}_ca.cert.pem" \ |
2227 |
- --load-ca-privkey "${CERTDIR}/${PN}_ca.privkey.pem" \ |
2228 |
- --template "${T}/${PF}.$$" &>/dev/null |
2229 |
- chmod 400 "${CERTDIR}/${PN}_${CN}.cert.pem" |
2230 |
- |
2231 |
- else |
2232 |
- einfo "Found existing ${CERTDIR}/${PN}_ca.cert.pem, skipping CA and SERVER creation." |
2233 |
- fi |
2234 |
- |
2235 |
- # Create a client certificate |
2236 |
- echo |
2237 |
- einfon "Please type the Common Name of the CLIENT you wish to create a certificate for: " |
2238 |
- read -r CN |
2239 |
- |
2240 |
- einfo "Creating private key and certificate for client ${CN}..." |
2241 |
- certtool --generate-privkey \ |
2242 |
- --outfile "${CERTDIR}/${PN}_${CN}.key.pem" &>/dev/null |
2243 |
- chmod 400 "${CERTDIR}/${PN}_${CN}.key.pem" |
2244 |
- |
2245 |
- cat > "${T}/${PF}.$$" <<- _EOF |
2246 |
- cn = ${CN} |
2247 |
- tls_www_client |
2248 |
- dns_name = ${CN} |
2249 |
- expiration_days = 3650 |
2250 |
- _EOF |
2251 |
- |
2252 |
- certtool --generate-certificate \ |
2253 |
- --outfile "${CERTDIR}/${PN}_${CN}.cert.pem" \ |
2254 |
- --load-privkey "${CERTDIR}/${PN}_${CN}.key.pem" \ |
2255 |
- --load-ca-certificate "${CERTDIR}/${PN}_ca.cert.pem" \ |
2256 |
- --load-ca-privkey "${CERTDIR}/${PN}_ca.privkey.pem" \ |
2257 |
- --template "${T}/${PF}.$$" &>/dev/null |
2258 |
- chmod 400 "${CERTDIR}/${PN}_${CN}.cert.pem" |
2259 |
- |
2260 |
- rm -f "${T}/${PF}.$$" |
2261 |
- |
2262 |
- echo |
2263 |
- einfo "Here is the documentation on how to encrypt your log traffic:" |
2264 |
- einfo " https://www.rsyslog.com/doc/rsyslog_tls.html" |
2265 |
-} |
2266 |
|
2267 |
diff --git a/app-admin/rsyslog/rsyslog-8.1905.0.ebuild b/app-admin/rsyslog/rsyslog-8.1905.0.ebuild |
2268 |
deleted file mode 100644 |
2269 |
index 1161ca1f6d6..00000000000 |
2270 |
--- a/app-admin/rsyslog/rsyslog-8.1905.0.ebuild |
2271 |
+++ /dev/null |
2272 |
@@ -1,463 +0,0 @@ |
2273 |
-# Copyright 1999-2019 Gentoo Authors |
2274 |
-# Distributed under the terms of the GNU General Public License v2 |
2275 |
- |
2276 |
-EAPI="6" |
2277 |
-PYTHON_COMPAT=( python{2_7,3_5,3_6,3_7} ) |
2278 |
- |
2279 |
-inherit autotools eutils linux-info python-any-r1 systemd |
2280 |
- |
2281 |
-DESCRIPTION="An enhanced multi-threaded syslogd with database support and more" |
2282 |
-HOMEPAGE="https://www.rsyslog.com/" |
2283 |
- |
2284 |
-if [[ ${PV} == "9999" ]]; then |
2285 |
- EGIT_REPO_URI="https://github.com/rsyslog/${PN}.git" |
2286 |
- |
2287 |
- DOC_REPO_URI="https://github.com/rsyslog/${PN}-doc.git" |
2288 |
- |
2289 |
- inherit git-r3 |
2290 |
-else |
2291 |
- KEYWORDS="~amd64 ~arm ~arm64 ~hppa ~x86" |
2292 |
- |
2293 |
- SRC_URI=" |
2294 |
- https://www.rsyslog.com/files/download/${PN}/${P}.tar.gz |
2295 |
- doc? ( https://www.rsyslog.com/files/download/${PN}/${PN}-doc-${PV}.tar.gz ) |
2296 |
- " |
2297 |
-fi |
2298 |
- |
2299 |
-LICENSE="GPL-3 LGPL-3 Apache-2.0" |
2300 |
-SLOT="0" |
2301 |
-IUSE="curl dbi debug doc elasticsearch +gcrypt gnutls jemalloc kafka kerberos kubernetes libressl mdblookup" |
2302 |
-IUSE+=" mongodb mysql normalize clickhouse omhttp omhttpfs omudpspoof openssl postgres" |
2303 |
-IUSE+=" rabbitmq redis relp rfc3195 rfc5424hmac snmp ssl systemd test usertools +uuid xxhash zeromq" |
2304 |
-RESTRICT="!test? ( test )" |
2305 |
- |
2306 |
-RDEPEND=" |
2307 |
- >=dev-libs/libfastjson-0.99.8:= |
2308 |
- >=dev-libs/libestr-0.1.9 |
2309 |
- >=sys-libs/zlib-1.2.5 |
2310 |
- curl? ( >=net-misc/curl-7.35.0 ) |
2311 |
- dbi? ( >=dev-db/libdbi-0.8.3 ) |
2312 |
- elasticsearch? ( >=net-misc/curl-7.35.0 ) |
2313 |
- gcrypt? ( >=dev-libs/libgcrypt-1.5.3:= ) |
2314 |
- jemalloc? ( >=dev-libs/jemalloc-3.3.1:= ) |
2315 |
- kafka? ( >=dev-libs/librdkafka-0.9.0.99:= ) |
2316 |
- kerberos? ( virtual/krb5 ) |
2317 |
- kubernetes? ( >=net-misc/curl-7.35.0 ) |
2318 |
- mdblookup? ( dev-libs/libmaxminddb:= ) |
2319 |
- mongodb? ( >=dev-libs/mongo-c-driver-1.1.10:= ) |
2320 |
- mysql? ( virtual/libmysqlclient:= ) |
2321 |
- normalize? ( |
2322 |
- >=dev-libs/libee-0.4.0 |
2323 |
- >=dev-libs/liblognorm-2.0.3:= |
2324 |
- ) |
2325 |
- clickhouse? ( >=net-misc/curl-7.35.0 ) |
2326 |
- omhttpfs? ( >=net-misc/curl-7.35.0 ) |
2327 |
- omudpspoof? ( >=net-libs/libnet-1.1.6 ) |
2328 |
- postgres? ( >=dev-db/postgresql-8.4.20:= ) |
2329 |
- rabbitmq? ( >=net-libs/rabbitmq-c-0.3.0:= ) |
2330 |
- redis? ( >=dev-libs/hiredis-0.11.0:= ) |
2331 |
- relp? ( >=dev-libs/librelp-1.2.17:= ) |
2332 |
- rfc3195? ( >=dev-libs/liblogging-1.0.1:=[rfc3195] ) |
2333 |
- rfc5424hmac? ( |
2334 |
- !libressl? ( >=dev-libs/openssl-0.9.8y:0= ) |
2335 |
- libressl? ( dev-libs/libressl:= ) |
2336 |
- ) |
2337 |
- snmp? ( >=net-analyzer/net-snmp-5.7.2 ) |
2338 |
- ssl? ( |
2339 |
- gnutls? ( >=net-libs/gnutls-2.12.23:0= ) |
2340 |
- openssl? ( |
2341 |
- !libressl? ( dev-libs/openssl:0= ) |
2342 |
- libressl? ( dev-libs/libressl:0= ) |
2343 |
- ) |
2344 |
- ) |
2345 |
- systemd? ( >=sys-apps/systemd-234 ) |
2346 |
- uuid? ( sys-apps/util-linux:0= ) |
2347 |
- xxhash? ( dev-libs/xxhash:= ) |
2348 |
- zeromq? ( |
2349 |
- >=net-libs/czmq-3.0.2 |
2350 |
- )" |
2351 |
-DEPEND="${RDEPEND} |
2352 |
- >=sys-devel/autoconf-archive-2015.02.24 |
2353 |
- virtual/pkgconfig |
2354 |
- elibc_musl? ( sys-libs/queue-standalone ) |
2355 |
- test? ( |
2356 |
- >=dev-libs/liblogging-1.0.1[stdlog] |
2357 |
- jemalloc? ( <sys-libs/libfaketime-0.9.7 ) |
2358 |
- !jemalloc? ( sys-libs/libfaketime ) |
2359 |
- ${PYTHON_DEPS} |
2360 |
- )" |
2361 |
- |
2362 |
-REQUIRED_USE=" |
2363 |
- kubernetes? ( normalize ) |
2364 |
- ssl? ( || ( gnutls openssl ) ) |
2365 |
-" |
2366 |
- |
2367 |
-if [[ ${PV} == "9999" ]]; then |
2368 |
- DEPEND+=" doc? ( >=dev-python/sphinx-1.1.3-r7 )" |
2369 |
- DEPEND+=" >=sys-devel/flex-2.5.39-r1" |
2370 |
- DEPEND+=" >=sys-devel/bison-2.4.3" |
2371 |
- DEPEND+=" >=dev-python/docutils-0.12" |
2372 |
-fi |
2373 |
- |
2374 |
-CONFIG_CHECK="~INOTIFY_USER" |
2375 |
-WARNING_INOTIFY_USER="CONFIG_INOTIFY_USER isn't set. Imfile module on this system will only support polling mode!" |
2376 |
- |
2377 |
-pkg_setup() { |
2378 |
- use test && python-any-r1_pkg_setup |
2379 |
-} |
2380 |
- |
2381 |
-src_unpack() { |
2382 |
- if [[ ${PV} == "9999" ]]; then |
2383 |
- git-r3_fetch |
2384 |
- git-r3_checkout |
2385 |
- else |
2386 |
- unpack ${P}.tar.gz |
2387 |
- fi |
2388 |
- |
2389 |
- if use doc; then |
2390 |
- if [[ ${PV} == "9999" ]]; then |
2391 |
- local _EGIT_BRANCH= |
2392 |
- if [[ -n "${EGIT_BRANCH}" ]]; then |
2393 |
- # Cannot use rsyslog commits/branches for documentation repository |
2394 |
- _EGIT_BRANCH=${EGIT_BRANCH} |
2395 |
- unset EGIT_BRANCH |
2396 |
- fi |
2397 |
- |
2398 |
- git-r3_fetch "${DOC_REPO_URI}" |
2399 |
- git-r3_checkout "${DOC_REPO_URI}" "${S}"/docs |
2400 |
- |
2401 |
- if [[ -n "${_EGIT_BRANCH}" ]]; then |
2402 |
- # Restore previous EGIT_BRANCH information |
2403 |
- EGIT_BRANCH=${_EGIT_BRANCH} |
2404 |
- fi |
2405 |
- else |
2406 |
- cd "${S}" || die "Cannot change dir into '${S}'" |
2407 |
- mkdir docs || die "Failed to create docs directory" |
2408 |
- cd docs || die "Failed to change dir into '${S}/docs'" |
2409 |
- unpack ${PN}-doc-${PV}.tar.gz |
2410 |
- fi |
2411 |
- fi |
2412 |
-} |
2413 |
- |
2414 |
-src_prepare() { |
2415 |
- default |
2416 |
- |
2417 |
- # https://github.com/rsyslog/rsyslog/issues/3626 |
2418 |
- sed -i \ |
2419 |
- -e '\|^#!/bin/bash$|a exit 77' \ |
2420 |
- tests/mmkubernetes-cache-expir*.sh \ |
2421 |
- || die "Failed to disabled known test failure mmkubernetes-cache-expir*.sh" |
2422 |
- |
2423 |
- eautoreconf |
2424 |
-} |
2425 |
- |
2426 |
-src_configure() { |
2427 |
- # Maintainer notes: |
2428 |
- # * Guardtime support is missing because libgt isn't yet available |
2429 |
- # in portage. |
2430 |
- # * Hadoop's HDFS file system output module is currently not |
2431 |
- # supported in Gentoo because nobody is able to test it |
2432 |
- # (JAVA dependency). |
2433 |
- # * dev-libs/hiredis doesn't provide pkg-config (see #504614, |
2434 |
- # upstream PR 129 and 136) so we need to export HIREDIS_* |
2435 |
- # variables because rsyslog's build system depends on pkg-config. |
2436 |
- |
2437 |
- if use redis; then |
2438 |
- export HIREDIS_LIBS="-L${EPREFIX}/usr/$(get_libdir) -lhiredis" |
2439 |
- export HIREDIS_CFLAGS="-I${EPREFIX}/usr/include" |
2440 |
- fi |
2441 |
- |
2442 |
- local myeconfargs=( |
2443 |
- --disable-debug-symbols |
2444 |
- --disable-generate-man-pages |
2445 |
- --without-valgrind-testbench |
2446 |
- --disable-liblogging-stdlog |
2447 |
- $(use_enable test testbench) |
2448 |
- $(use_enable test libfaketime) |
2449 |
- $(use_enable test extended-tests) |
2450 |
- # Input Plugins without depedencies |
2451 |
- --enable-imdiag |
2452 |
- --enable-imfile |
2453 |
- --enable-impstats |
2454 |
- --enable-imptcp |
2455 |
- # Message Modificiation Plugins without depedencies |
2456 |
- --enable-mmanon |
2457 |
- --enable-mmaudit |
2458 |
- --enable-mmcount |
2459 |
- --enable-mmfields |
2460 |
- --enable-mmjsonparse |
2461 |
- --enable-mmpstrucdata |
2462 |
- --enable-mmrm1stspace |
2463 |
- --enable-mmsequence |
2464 |
- --enable-mmutf8fix |
2465 |
- # Output Modification Plugins without dependencies |
2466 |
- --enable-mail |
2467 |
- --enable-omprog |
2468 |
- --enable-omruleset |
2469 |
- --enable-omstdout |
2470 |
- --enable-omuxsock |
2471 |
- # Misc |
2472 |
- --enable-fmhash |
2473 |
- $(use_enable xxhash fmhash-xxhash) |
2474 |
- --enable-pmaixforwardedfrom |
2475 |
- --enable-pmciscoios |
2476 |
- --enable-pmcisconames |
2477 |
- --enable-pmlastmsg |
2478 |
- $(use_enable normalize pmnormalize) |
2479 |
- --enable-pmnull |
2480 |
- --enable-pmpanngfw |
2481 |
- --enable-pmsnare |
2482 |
- # DB |
2483 |
- $(use_enable dbi libdbi) |
2484 |
- $(use_enable mongodb ommongodb) |
2485 |
- $(use_enable mysql) |
2486 |
- $(use_enable postgres pgsql) |
2487 |
- $(use_enable redis omhiredis) |
2488 |
- # Debug |
2489 |
- $(use_enable debug) |
2490 |
- $(use_enable debug diagtools) |
2491 |
- $(use_enable debug valgrind) |
2492 |
- # Misc |
2493 |
- $(use_enable clickhouse) |
2494 |
- $(use_enable curl fmhttp) |
2495 |
- $(use_enable elasticsearch) |
2496 |
- $(use_enable gcrypt libgcrypt) |
2497 |
- $(use_enable jemalloc) |
2498 |
- $(use_enable kafka imkafka) |
2499 |
- $(use_enable kafka omkafka) |
2500 |
- $(use_enable kerberos gssapi-krb5) |
2501 |
- $(use_enable kubernetes mmkubernetes) |
2502 |
- $(use_enable normalize mmnormalize) |
2503 |
- $(use_enable mdblookup mmdblookup) |
2504 |
- $(use_enable omhttp) |
2505 |
- $(use_enable omhttpfs) |
2506 |
- $(use_enable omudpspoof) |
2507 |
- $(use_enable rabbitmq omrabbitmq) |
2508 |
- $(use_enable relp) |
2509 |
- $(use_enable rfc3195) |
2510 |
- $(use_enable rfc5424hmac mmrfc5424addhmac) |
2511 |
- $(use_enable snmp) |
2512 |
- $(use_enable snmp mmsnmptrapd) |
2513 |
- $(use_enable gnutls) |
2514 |
- $(use_enable openssl) |
2515 |
- $(use_enable systemd imjournal) |
2516 |
- $(use_enable systemd omjournal) |
2517 |
- $(use_enable usertools) |
2518 |
- $(use_enable uuid) |
2519 |
- $(use_enable zeromq imczmq) |
2520 |
- $(use_enable zeromq omczmq) |
2521 |
- --with-systemdsystemunitdir="$(systemd_get_systemunitdir)" |
2522 |
- ) |
2523 |
- |
2524 |
- econf "${myeconfargs[@]}" |
2525 |
-} |
2526 |
- |
2527 |
-src_compile() { |
2528 |
- default |
2529 |
- |
2530 |
- if use doc && [[ "${PV}" == "9999" ]]; then |
2531 |
- einfo "Building documentation ..." |
2532 |
- local doc_dir="${S}/docs" |
2533 |
- cd "${doc_dir}" || die "Cannot chdir into \"${doc_dir}\"!" |
2534 |
- sphinx-build -b html source build || die "Building documentation failed!" |
2535 |
- fi |
2536 |
-} |
2537 |
- |
2538 |
-src_test() { |
2539 |
- local _has_increased_ulimit= |
2540 |
- |
2541 |
- # Sometimes tests aren't executable (i.e. when added via patch) |
2542 |
- einfo "Adjusting permissions of test scripts ..." |
2543 |
- find "${S}"/tests -type f -name '*.sh' \! -perm -111 -exec chmod a+x '{}' \; || \ |
2544 |
- die "Failed to adjust test scripts permission" |
2545 |
- |
2546 |
- if ulimit -n 3072; then |
2547 |
- _has_increased_ulimit="true" |
2548 |
- fi |
2549 |
- |
2550 |
- if ! emake --jobs 1 check; then |
2551 |
- eerror "Test suite failed! :(" |
2552 |
- |
2553 |
- if [[ -z "${_has_increased_ulimit}" ]]; then |
2554 |
- eerror "Probably because open file limit couldn't be set to 3072." |
2555 |
- fi |
2556 |
- |
2557 |
- if has userpriv ${FEATURES}; then |
2558 |
- eerror "Please try to reproduce the test suite failure with FEATURES=-userpriv " \ |
2559 |
- "before you submit a bug report." |
2560 |
- fi |
2561 |
- |
2562 |
- fi |
2563 |
-} |
2564 |
- |
2565 |
-src_install() { |
2566 |
- local DOCS=( |
2567 |
- AUTHORS |
2568 |
- ChangeLog |
2569 |
- "${FILESDIR}"/README.gentoo |
2570 |
- ) |
2571 |
- |
2572 |
- use doc && local HTML_DOCS=( "${S}/docs/build/." ) |
2573 |
- |
2574 |
- default |
2575 |
- |
2576 |
- newconfd "${FILESDIR}/${PN}.confd-r1" ${PN} |
2577 |
- newinitd "${FILESDIR}/${PN}.initd-r1" ${PN} |
2578 |
- |
2579 |
- keepdir /var/empty/dev |
2580 |
- keepdir /var/spool/${PN} |
2581 |
- keepdir /etc/ssl/${PN} |
2582 |
- keepdir /etc/${PN}.d |
2583 |
- |
2584 |
- insinto /etc |
2585 |
- newins "${FILESDIR}/${PN}.conf" ${PN}.conf |
2586 |
- |
2587 |
- insinto /etc/rsyslog.d/ |
2588 |
- newins "${FILESDIR}/50-default-r1.conf" 50-default.conf |
2589 |
- |
2590 |
- insinto /etc/logrotate.d/ |
2591 |
- newins "${FILESDIR}/${PN}-r1.logrotate" ${PN} |
2592 |
- |
2593 |
- if use mysql; then |
2594 |
- insinto /usr/share/doc/${PF}/scripts/mysql |
2595 |
- doins plugins/ommysql/createDB.sql |
2596 |
- fi |
2597 |
- |
2598 |
- if use postgres; then |
2599 |
- insinto /usr/share/doc/${PF}/scripts/pgsql |
2600 |
- doins plugins/ompgsql/createDB.sql |
2601 |
- fi |
2602 |
- |
2603 |
- prune_libtool_files --modules |
2604 |
-} |
2605 |
- |
2606 |
-pkg_postinst() { |
2607 |
- local advertise_readme=0 |
2608 |
- |
2609 |
- if [[ -z "${REPLACING_VERSIONS}" ]]; then |
2610 |
- # This is a new installation |
2611 |
- |
2612 |
- advertise_readme=1 |
2613 |
- |
2614 |
- if use mysql || use postgres; then |
2615 |
- echo |
2616 |
- elog "Sample SQL scripts for MySQL & PostgreSQL have been installed to:" |
2617 |
- elog " /usr/share/doc/${PF}/scripts" |
2618 |
- fi |
2619 |
- |
2620 |
- if use ssl; then |
2621 |
- echo |
2622 |
- elog "To create a default CA and certificates for your server and clients, run:" |
2623 |
- elog " emerge --config =${PF}" |
2624 |
- elog "on your logging server. You can run it several times," |
2625 |
- elog "once for each logging client. The client certificates will be signed" |
2626 |
- elog "using the CA certificate generated during the first run." |
2627 |
- fi |
2628 |
- fi |
2629 |
- |
2630 |
- if [[ ${advertise_readme} -gt 0 ]]; then |
2631 |
- # We need to show the README file location |
2632 |
- |
2633 |
- echo "" |
2634 |
- elog "Please read" |
2635 |
- elog "" |
2636 |
- elog " ${EPREFIX}/usr/share/doc/${PF}/README.gentoo*" |
2637 |
- elog "" |
2638 |
- elog "for more details." |
2639 |
- fi |
2640 |
-} |
2641 |
- |
2642 |
-pkg_config() { |
2643 |
- if ! use ssl ; then |
2644 |
- einfo "There is nothing to configure for rsyslog unless you" |
2645 |
- einfo "used USE=ssl to build it." |
2646 |
- return 0 |
2647 |
- fi |
2648 |
- |
2649 |
- # Make sure the certificates directory exists |
2650 |
- local CERTDIR="${EROOT}/etc/ssl/${PN}" |
2651 |
- if [[ ! -d "${CERTDIR}" ]]; then |
2652 |
- mkdir "${CERTDIR}" || die |
2653 |
- fi |
2654 |
- einfo "Your certificates will be stored in ${CERTDIR}" |
2655 |
- |
2656 |
- # Create a default CA if needed |
2657 |
- if [[ ! -f "${CERTDIR}/${PN}_ca.cert.pem" ]]; then |
2658 |
- einfo "No CA key and certificate found in ${CERTDIR}, creating them for you..." |
2659 |
- certtool --generate-privkey \ |
2660 |
- --outfile "${CERTDIR}/${PN}_ca.privkey.pem" &>/dev/null |
2661 |
- chmod 400 "${CERTDIR}/${PN}_ca.privkey.pem" |
2662 |
- |
2663 |
- cat > "${T}/${PF}.$$" <<- _EOF |
2664 |
- cn = Portage automated CA |
2665 |
- ca |
2666 |
- cert_signing_key |
2667 |
- expiration_days = 3650 |
2668 |
- _EOF |
2669 |
- |
2670 |
- certtool --generate-self-signed \ |
2671 |
- --load-privkey "${CERTDIR}/${PN}_ca.privkey.pem" \ |
2672 |
- --outfile "${CERTDIR}/${PN}_ca.cert.pem" \ |
2673 |
- --template "${T}/${PF}.$$" &>/dev/null |
2674 |
- chmod 400 "${CERTDIR}/${PN}_ca.privkey.pem" |
2675 |
- |
2676 |
- # Create the server certificate |
2677 |
- echo |
2678 |
- einfon "Please type the Common Name of the SERVER you wish to create a certificate for: " |
2679 |
- read -r CN |
2680 |
- |
2681 |
- einfo "Creating private key and certificate for server ${CN}..." |
2682 |
- certtool --generate-privkey \ |
2683 |
- --outfile "${CERTDIR}/${PN}_${CN}.key.pem" &>/dev/null |
2684 |
- chmod 400 "${CERTDIR}/${PN}_${CN}.key.pem" |
2685 |
- |
2686 |
- cat > "${T}/${PF}.$$" <<- _EOF |
2687 |
- cn = ${CN} |
2688 |
- tls_www_server |
2689 |
- dns_name = ${CN} |
2690 |
- expiration_days = 3650 |
2691 |
- _EOF |
2692 |
- |
2693 |
- certtool --generate-certificate \ |
2694 |
- --outfile "${CERTDIR}/${PN}_${CN}.cert.pem" \ |
2695 |
- --load-privkey "${CERTDIR}/${PN}_${CN}.key.pem" \ |
2696 |
- --load-ca-certificate "${CERTDIR}/${PN}_ca.cert.pem" \ |
2697 |
- --load-ca-privkey "${CERTDIR}/${PN}_ca.privkey.pem" \ |
2698 |
- --template "${T}/${PF}.$$" &>/dev/null |
2699 |
- chmod 400 "${CERTDIR}/${PN}_${CN}.cert.pem" |
2700 |
- |
2701 |
- else |
2702 |
- einfo "Found existing ${CERTDIR}/${PN}_ca.cert.pem, skipping CA and SERVER creation." |
2703 |
- fi |
2704 |
- |
2705 |
- # Create a client certificate |
2706 |
- echo |
2707 |
- einfon "Please type the Common Name of the CLIENT you wish to create a certificate for: " |
2708 |
- read -r CN |
2709 |
- |
2710 |
- einfo "Creating private key and certificate for client ${CN}..." |
2711 |
- certtool --generate-privkey \ |
2712 |
- --outfile "${CERTDIR}/${PN}_${CN}.key.pem" &>/dev/null |
2713 |
- chmod 400 "${CERTDIR}/${PN}_${CN}.key.pem" |
2714 |
- |
2715 |
- cat > "${T}/${PF}.$$" <<- _EOF |
2716 |
- cn = ${CN} |
2717 |
- tls_www_client |
2718 |
- dns_name = ${CN} |
2719 |
- expiration_days = 3650 |
2720 |
- _EOF |
2721 |
- |
2722 |
- certtool --generate-certificate \ |
2723 |
- --outfile "${CERTDIR}/${PN}_${CN}.cert.pem" \ |
2724 |
- --load-privkey "${CERTDIR}/${PN}_${CN}.key.pem" \ |
2725 |
- --load-ca-certificate "${CERTDIR}/${PN}_ca.cert.pem" \ |
2726 |
- --load-ca-privkey "${CERTDIR}/${PN}_ca.privkey.pem" \ |
2727 |
- --template "${T}/${PF}.$$" &>/dev/null |
2728 |
- chmod 400 "${CERTDIR}/${PN}_${CN}.cert.pem" |
2729 |
- |
2730 |
- rm -f "${T}/${PF}.$$" |
2731 |
- |
2732 |
- echo |
2733 |
- einfo "Here is the documentation on how to encrypt your log traffic:" |
2734 |
- einfo " https://www.rsyslog.com/doc/rsyslog_tls.html" |
2735 |
-} |
2736 |
|
2737 |
diff --git a/app-admin/rsyslog/rsyslog-8.38.0-r2.ebuild b/app-admin/rsyslog/rsyslog-8.38.0-r2.ebuild |
2738 |
deleted file mode 100644 |
2739 |
index 320c0365205..00000000000 |
2740 |
--- a/app-admin/rsyslog/rsyslog-8.38.0-r2.ebuild |
2741 |
+++ /dev/null |
2742 |
@@ -1,456 +0,0 @@ |
2743 |
-# Copyright 1999-2018 Gentoo Authors |
2744 |
-# Distributed under the terms of the GNU General Public License v2 |
2745 |
- |
2746 |
-EAPI="6" |
2747 |
-PYTHON_COMPAT=( python{2_7,3_5,3_6,3_7} ) |
2748 |
- |
2749 |
-inherit autotools eutils linux-info python-any-r1 systemd |
2750 |
- |
2751 |
-DESCRIPTION="An enhanced multi-threaded syslogd with database support and more" |
2752 |
-HOMEPAGE="https://www.rsyslog.com/" |
2753 |
- |
2754 |
-if [[ ${PV} == "9999" ]]; then |
2755 |
- EGIT_REPO_URI="https://github.com/rsyslog/${PN}.git" |
2756 |
- |
2757 |
- DOC_REPO_URI="https://github.com/rsyslog/${PN}-doc.git" |
2758 |
- |
2759 |
- inherit git-r3 |
2760 |
-else |
2761 |
- KEYWORDS="amd64 arm ~arm64 hppa x86" |
2762 |
- |
2763 |
- SRC_URI=" |
2764 |
- https://www.rsyslog.com/files/download/${PN}/${P}.tar.gz |
2765 |
- doc? ( https://www.rsyslog.com/files/download/${PN}/${PN}-doc-${PV}.tar.gz ) |
2766 |
- " |
2767 |
- |
2768 |
- PATCHES=( |
2769 |
- "${FILESDIR}"/${P}-fix-omprog-output-capture-mt-test.patch |
2770 |
- "${FILESDIR}"/${PN}-8.40.0-fix-omusrmsg.patch |
2771 |
- ) |
2772 |
-fi |
2773 |
- |
2774 |
-LICENSE="GPL-3 LGPL-3 Apache-2.0" |
2775 |
-SLOT="0" |
2776 |
-IUSE="curl dbi debug doc elasticsearch +gcrypt gnutls jemalloc kafka kerberos kubernetes libressl mdblookup" |
2777 |
-IUSE+=" mongodb mysql normalize omhttp omhttpfs omudpspoof openssl postgres rabbitmq redis relp rfc3195 rfc5424hmac" |
2778 |
-IUSE+=" snmp ssl systemd test usertools +uuid xxhash zeromq" |
2779 |
-RESTRICT="!test? ( test )" |
2780 |
- |
2781 |
-RDEPEND=" |
2782 |
- >=dev-libs/libfastjson-0.99.8:= |
2783 |
- >=dev-libs/libestr-0.1.9 |
2784 |
- >=dev-libs/liblogging-1.0.1:=[stdlog] |
2785 |
- >=sys-libs/zlib-1.2.5 |
2786 |
- curl? ( >=net-misc/curl-7.35.0 ) |
2787 |
- dbi? ( >=dev-db/libdbi-0.8.3 ) |
2788 |
- elasticsearch? ( >=net-misc/curl-7.35.0 ) |
2789 |
- gcrypt? ( >=dev-libs/libgcrypt-1.5.3:= ) |
2790 |
- jemalloc? ( >=dev-libs/jemalloc-3.3.1:= ) |
2791 |
- kafka? ( >=dev-libs/librdkafka-0.9.0.99:= ) |
2792 |
- kerberos? ( virtual/krb5 ) |
2793 |
- kubernetes? ( >=net-misc/curl-7.35.0 ) |
2794 |
- mdblookup? ( dev-libs/libmaxminddb:= ) |
2795 |
- mongodb? ( >=dev-libs/mongo-c-driver-1.1.10:= ) |
2796 |
- mysql? ( virtual/libmysqlclient:= ) |
2797 |
- normalize? ( |
2798 |
- >=dev-libs/libee-0.4.0 |
2799 |
- >=dev-libs/liblognorm-2.0.3:= |
2800 |
- ) |
2801 |
- omhttpfs? ( >=net-misc/curl-7.35.0 ) |
2802 |
- omudpspoof? ( >=net-libs/libnet-1.1.6 ) |
2803 |
- postgres? ( >=dev-db/postgresql-8.4.20:= ) |
2804 |
- rabbitmq? ( >=net-libs/rabbitmq-c-0.3.0:= ) |
2805 |
- redis? ( >=dev-libs/hiredis-0.11.0:= ) |
2806 |
- relp? ( >=dev-libs/librelp-1.2.17:= ) |
2807 |
- rfc3195? ( >=dev-libs/liblogging-1.0.1:=[rfc3195] ) |
2808 |
- rfc5424hmac? ( |
2809 |
- !libressl? ( >=dev-libs/openssl-0.9.8y:0= ) |
2810 |
- libressl? ( dev-libs/libressl:= ) |
2811 |
- ) |
2812 |
- snmp? ( >=net-analyzer/net-snmp-5.7.2 ) |
2813 |
- ssl? ( |
2814 |
- gnutls? ( >=net-libs/gnutls-2.12.23:0= ) |
2815 |
- openssl? ( |
2816 |
- !libressl? ( dev-libs/openssl:0= ) |
2817 |
- libressl? ( dev-libs/libressl:0= ) |
2818 |
- ) |
2819 |
- ) |
2820 |
- systemd? ( >=sys-apps/systemd-234 ) |
2821 |
- uuid? ( sys-apps/util-linux:0= ) |
2822 |
- xxhash? ( dev-libs/xxhash:= ) |
2823 |
- zeromq? ( |
2824 |
- >=net-libs/czmq-3.0.2 |
2825 |
- )" |
2826 |
-DEPEND="${RDEPEND} |
2827 |
- >=sys-devel/autoconf-archive-2015.02.24 |
2828 |
- virtual/pkgconfig |
2829 |
- test? ( |
2830 |
- jemalloc? ( <sys-libs/libfaketime-0.9.7 ) |
2831 |
- !jemalloc? ( sys-libs/libfaketime ) |
2832 |
- ${PYTHON_DEPS} |
2833 |
- )" |
2834 |
- |
2835 |
-REQUIRED_USE=" |
2836 |
- kubernetes? ( normalize ) |
2837 |
- ssl? ( || ( gnutls openssl ) ) |
2838 |
-" |
2839 |
- |
2840 |
-if [[ ${PV} == "9999" ]]; then |
2841 |
- DEPEND+=" doc? ( >=dev-python/sphinx-1.1.3-r7 )" |
2842 |
- DEPEND+=" >=sys-devel/flex-2.5.39-r1" |
2843 |
- DEPEND+=" >=sys-devel/bison-2.4.3" |
2844 |
- DEPEND+=" >=dev-python/docutils-0.12" |
2845 |
-fi |
2846 |
- |
2847 |
-CONFIG_CHECK="~INOTIFY_USER" |
2848 |
-WARNING_INOTIFY_USER="CONFIG_INOTIFY_USER isn't set. Imfile module on this system will only support polling mode!" |
2849 |
- |
2850 |
-pkg_setup() { |
2851 |
- use test && python-any-r1_pkg_setup |
2852 |
-} |
2853 |
- |
2854 |
-src_unpack() { |
2855 |
- if [[ ${PV} == "9999" ]]; then |
2856 |
- git-r3_fetch |
2857 |
- git-r3_checkout |
2858 |
- else |
2859 |
- unpack ${P}.tar.gz |
2860 |
- fi |
2861 |
- |
2862 |
- if use doc; then |
2863 |
- if [[ ${PV} == "9999" ]]; then |
2864 |
- local _EGIT_BRANCH= |
2865 |
- if [[ -n "${EGIT_BRANCH}" ]]; then |
2866 |
- # Cannot use rsyslog commits/branches for documentation repository |
2867 |
- _EGIT_BRANCH=${EGIT_BRANCH} |
2868 |
- unset EGIT_BRANCH |
2869 |
- fi |
2870 |
- |
2871 |
- git-r3_fetch "${DOC_REPO_URI}" |
2872 |
- git-r3_checkout "${DOC_REPO_URI}" "${S}"/docs |
2873 |
- |
2874 |
- if [[ -n "${_EGIT_BRANCH}" ]]; then |
2875 |
- # Restore previous EGIT_BRANCH information |
2876 |
- EGIT_BRANCH=${_EGIT_BRANCH} |
2877 |
- fi |
2878 |
- else |
2879 |
- cd "${S}" || die "Cannot change dir into '${S}'" |
2880 |
- mkdir docs || die "Failed to create docs directory" |
2881 |
- cd docs || die "Failed to change dir into '${S}/docs'" |
2882 |
- unpack ${PN}-doc-${PV}.tar.gz |
2883 |
- fi |
2884 |
- fi |
2885 |
-} |
2886 |
- |
2887 |
-src_prepare() { |
2888 |
- default |
2889 |
- |
2890 |
- eautoreconf |
2891 |
-} |
2892 |
- |
2893 |
-src_configure() { |
2894 |
- # Maintainer notes: |
2895 |
- # * Guardtime support is missing because libgt isn't yet available |
2896 |
- # in portage. |
2897 |
- # * Hadoop's HDFS file system output module is currently not |
2898 |
- # supported in Gentoo because nobody is able to test it |
2899 |
- # (JAVA dependency). |
2900 |
- # * dev-libs/hiredis doesn't provide pkg-config (see #504614, |
2901 |
- # upstream PR 129 and 136) so we need to export HIREDIS_* |
2902 |
- # variables because rsyslog's build system depends on pkg-config. |
2903 |
- |
2904 |
- if use redis; then |
2905 |
- export HIREDIS_LIBS="-L${EPREFIX}/usr/$(get_libdir) -lhiredis" |
2906 |
- export HIREDIS_CFLAGS="-I${EPREFIX}/usr/include" |
2907 |
- fi |
2908 |
- |
2909 |
- local myeconfargs=( |
2910 |
- --disable-debug-symbols |
2911 |
- --disable-generate-man-pages |
2912 |
- --without-valgrind-testbench |
2913 |
- --disable-liblogging-stdlog |
2914 |
- $(use_enable test testbench) |
2915 |
- $(use_enable test libfaketime) |
2916 |
- $(use_enable test extended-tests) |
2917 |
- # Input Plugins without depedencies |
2918 |
- --enable-imdiag |
2919 |
- --enable-imfile |
2920 |
- --enable-impstats |
2921 |
- --enable-imptcp |
2922 |
- # Message Modificiation Plugins without depedencies |
2923 |
- --enable-mmanon |
2924 |
- --enable-mmaudit |
2925 |
- --enable-mmcount |
2926 |
- --enable-mmfields |
2927 |
- --enable-mmjsonparse |
2928 |
- --enable-mmpstrucdata |
2929 |
- --enable-mmrm1stspace |
2930 |
- --enable-mmsequence |
2931 |
- --enable-mmutf8fix |
2932 |
- # Output Modification Plugins without dependencies |
2933 |
- --enable-mail |
2934 |
- --enable-omprog |
2935 |
- --enable-omruleset |
2936 |
- --enable-omstdout |
2937 |
- --enable-omuxsock |
2938 |
- # Misc |
2939 |
- --enable-fmhash |
2940 |
- $(use_enable xxhash fmhash-xxhash) |
2941 |
- --enable-pmaixforwardedfrom |
2942 |
- --enable-pmciscoios |
2943 |
- --enable-pmcisconames |
2944 |
- --enable-pmlastmsg |
2945 |
- --enable-pmsnare |
2946 |
- # DB |
2947 |
- $(use_enable dbi libdbi) |
2948 |
- $(use_enable mongodb ommongodb) |
2949 |
- $(use_enable mysql) |
2950 |
- $(use_enable postgres pgsql) |
2951 |
- $(use_enable redis omhiredis) |
2952 |
- # Debug |
2953 |
- $(use_enable debug) |
2954 |
- $(use_enable debug diagtools) |
2955 |
- $(use_enable debug valgrind) |
2956 |
- # Misc |
2957 |
- $(use_enable curl fmhttp) |
2958 |
- $(use_enable elasticsearch) |
2959 |
- $(use_enable gcrypt libgcrypt) |
2960 |
- $(use_enable jemalloc) |
2961 |
- $(use_enable kafka imkafka) |
2962 |
- $(use_enable kafka omkafka) |
2963 |
- $(use_enable kerberos gssapi-krb5) |
2964 |
- $(use_enable kubernetes mmkubernetes) |
2965 |
- $(use_enable normalize mmnormalize) |
2966 |
- $(use_enable mdblookup mmdblookup) |
2967 |
- $(use_enable omhttp) |
2968 |
- $(use_enable omhttpfs) |
2969 |
- $(use_enable omudpspoof) |
2970 |
- $(use_enable rabbitmq omrabbitmq) |
2971 |
- $(use_enable relp) |
2972 |
- $(use_enable rfc3195) |
2973 |
- $(use_enable rfc5424hmac mmrfc5424addhmac) |
2974 |
- $(use_enable snmp) |
2975 |
- $(use_enable snmp mmsnmptrapd) |
2976 |
- $(use_enable gnutls) |
2977 |
- $(use_enable openssl) |
2978 |
- $(use_enable systemd imjournal) |
2979 |
- $(use_enable systemd omjournal) |
2980 |
- $(use_enable usertools) |
2981 |
- $(use_enable uuid) |
2982 |
- $(use_enable zeromq imczmq) |
2983 |
- $(use_enable zeromq omczmq) |
2984 |
- --with-systemdsystemunitdir="$(systemd_get_systemunitdir)" |
2985 |
- ) |
2986 |
- |
2987 |
- econf "${myeconfargs[@]}" |
2988 |
-} |
2989 |
- |
2990 |
-src_compile() { |
2991 |
- default |
2992 |
- |
2993 |
- if use doc && [[ "${PV}" == "9999" ]]; then |
2994 |
- einfo "Building documentation ..." |
2995 |
- local doc_dir="${S}/docs" |
2996 |
- cd "${doc_dir}" || die "Cannot chdir into \"${doc_dir}\"!" |
2997 |
- sphinx-build -b html source build || die "Building documentation failed!" |
2998 |
- fi |
2999 |
-} |
3000 |
- |
3001 |
-src_test() { |
3002 |
- local _has_increased_ulimit= |
3003 |
- |
3004 |
- # Sometimes tests aren't executable (i.e. when added via patch) |
3005 |
- einfo "Adjusting permissions of test scripts ..." |
3006 |
- find "${S}"/tests -type f -name '*.sh' \! -perm -111 -exec chmod a+x '{}' \; || \ |
3007 |
- die "Failed to adjust test scripts permission" |
3008 |
- |
3009 |
- if ulimit -n 3072; then |
3010 |
- _has_increased_ulimit="true" |
3011 |
- fi |
3012 |
- |
3013 |
- if ! emake --jobs 1 check; then |
3014 |
- eerror "Test suite failed! :(" |
3015 |
- |
3016 |
- if [[ -z "${_has_increased_ulimit}" ]]; then |
3017 |
- eerror "Probably because open file limit couldn't be set to 3072." |
3018 |
- fi |
3019 |
- |
3020 |
- if has userpriv ${FEATURES}; then |
3021 |
- eerror "Please try to reproduce the test suite failure with FEATURES=-userpriv " \ |
3022 |
- "before you submit a bug report." |
3023 |
- fi |
3024 |
- |
3025 |
- fi |
3026 |
-} |
3027 |
- |
3028 |
-src_install() { |
3029 |
- local DOCS=( |
3030 |
- AUTHORS |
3031 |
- ChangeLog |
3032 |
- "${FILESDIR}"/README.gentoo |
3033 |
- ) |
3034 |
- |
3035 |
- use doc && local HTML_DOCS=( "${S}/docs/build/." ) |
3036 |
- |
3037 |
- default |
3038 |
- |
3039 |
- newconfd "${FILESDIR}/${PN}.confd-r1" ${PN} |
3040 |
- newinitd "${FILESDIR}/${PN}.initd-r1" ${PN} |
3041 |
- |
3042 |
- keepdir /var/empty/dev |
3043 |
- keepdir /var/spool/${PN} |
3044 |
- keepdir /etc/ssl/${PN} |
3045 |
- keepdir /etc/${PN}.d |
3046 |
- |
3047 |
- insinto /etc |
3048 |
- newins "${FILESDIR}/${PN}.conf" ${PN}.conf |
3049 |
- |
3050 |
- insinto /etc/rsyslog.d/ |
3051 |
- newins "${FILESDIR}/50-default-r1.conf" 50-default.conf |
3052 |
- |
3053 |
- insinto /etc/logrotate.d/ |
3054 |
- newins "${FILESDIR}/${PN}-r1.logrotate" ${PN} |
3055 |
- |
3056 |
- if use mysql; then |
3057 |
- insinto /usr/share/doc/${PF}/scripts/mysql |
3058 |
- doins plugins/ommysql/createDB.sql |
3059 |
- fi |
3060 |
- |
3061 |
- if use postgres; then |
3062 |
- insinto /usr/share/doc/${PF}/scripts/pgsql |
3063 |
- doins plugins/ompgsql/createDB.sql |
3064 |
- fi |
3065 |
- |
3066 |
- prune_libtool_files --modules |
3067 |
-} |
3068 |
- |
3069 |
-pkg_postinst() { |
3070 |
- local advertise_readme=0 |
3071 |
- |
3072 |
- if [[ -z "${REPLACING_VERSIONS}" ]]; then |
3073 |
- # This is a new installation |
3074 |
- |
3075 |
- advertise_readme=1 |
3076 |
- |
3077 |
- if use mysql || use postgres; then |
3078 |
- echo |
3079 |
- elog "Sample SQL scripts for MySQL & PostgreSQL have been installed to:" |
3080 |
- elog " /usr/share/doc/${PF}/scripts" |
3081 |
- fi |
3082 |
- |
3083 |
- if use ssl; then |
3084 |
- echo |
3085 |
- elog "To create a default CA and certificates for your server and clients, run:" |
3086 |
- elog " emerge --config =${PF}" |
3087 |
- elog "on your logging server. You can run it several times," |
3088 |
- elog "once for each logging client. The client certificates will be signed" |
3089 |
- elog "using the CA certificate generated during the first run." |
3090 |
- fi |
3091 |
- fi |
3092 |
- |
3093 |
- if [[ ${advertise_readme} -gt 0 ]]; then |
3094 |
- # We need to show the README file location |
3095 |
- |
3096 |
- echo "" |
3097 |
- elog "Please read" |
3098 |
- elog "" |
3099 |
- elog " ${EPREFIX}/usr/share/doc/${PF}/README.gentoo*" |
3100 |
- elog "" |
3101 |
- elog "for more details." |
3102 |
- fi |
3103 |
-} |
3104 |
- |
3105 |
-pkg_config() { |
3106 |
- if ! use ssl ; then |
3107 |
- einfo "There is nothing to configure for rsyslog unless you" |
3108 |
- einfo "used USE=ssl to build it." |
3109 |
- return 0 |
3110 |
- fi |
3111 |
- |
3112 |
- # Make sure the certificates directory exists |
3113 |
- local CERTDIR="${EROOT}/etc/ssl/${PN}" |
3114 |
- if [[ ! -d "${CERTDIR}" ]]; then |
3115 |
- mkdir "${CERTDIR}" || die |
3116 |
- fi |
3117 |
- einfo "Your certificates will be stored in ${CERTDIR}" |
3118 |
- |
3119 |
- # Create a default CA if needed |
3120 |
- if [[ ! -f "${CERTDIR}/${PN}_ca.cert.pem" ]]; then |
3121 |
- einfo "No CA key and certificate found in ${CERTDIR}, creating them for you..." |
3122 |
- certtool --generate-privkey \ |
3123 |
- --outfile "${CERTDIR}/${PN}_ca.privkey.pem" &>/dev/null |
3124 |
- chmod 400 "${CERTDIR}/${PN}_ca.privkey.pem" |
3125 |
- |
3126 |
- cat > "${T}/${PF}.$$" <<- _EOF |
3127 |
- cn = Portage automated CA |
3128 |
- ca |
3129 |
- cert_signing_key |
3130 |
- expiration_days = 3650 |
3131 |
- _EOF |
3132 |
- |
3133 |
- certtool --generate-self-signed \ |
3134 |
- --load-privkey "${CERTDIR}/${PN}_ca.privkey.pem" \ |
3135 |
- --outfile "${CERTDIR}/${PN}_ca.cert.pem" \ |
3136 |
- --template "${T}/${PF}.$$" &>/dev/null |
3137 |
- chmod 400 "${CERTDIR}/${PN}_ca.privkey.pem" |
3138 |
- |
3139 |
- # Create the server certificate |
3140 |
- echo |
3141 |
- einfon "Please type the Common Name of the SERVER you wish to create a certificate for: " |
3142 |
- read -r CN |
3143 |
- |
3144 |
- einfo "Creating private key and certificate for server ${CN}..." |
3145 |
- certtool --generate-privkey \ |
3146 |
- --outfile "${CERTDIR}/${PN}_${CN}.key.pem" &>/dev/null |
3147 |
- chmod 400 "${CERTDIR}/${PN}_${CN}.key.pem" |
3148 |
- |
3149 |
- cat > "${T}/${PF}.$$" <<- _EOF |
3150 |
- cn = ${CN} |
3151 |
- tls_www_server |
3152 |
- dns_name = ${CN} |
3153 |
- expiration_days = 3650 |
3154 |
- _EOF |
3155 |
- |
3156 |
- certtool --generate-certificate \ |
3157 |
- --outfile "${CERTDIR}/${PN}_${CN}.cert.pem" \ |
3158 |
- --load-privkey "${CERTDIR}/${PN}_${CN}.key.pem" \ |
3159 |
- --load-ca-certificate "${CERTDIR}/${PN}_ca.cert.pem" \ |
3160 |
- --load-ca-privkey "${CERTDIR}/${PN}_ca.privkey.pem" \ |
3161 |
- --template "${T}/${PF}.$$" &>/dev/null |
3162 |
- chmod 400 "${CERTDIR}/${PN}_${CN}.cert.pem" |
3163 |
- |
3164 |
- else |
3165 |
- einfo "Found existing ${CERTDIR}/${PN}_ca.cert.pem, skipping CA and SERVER creation." |
3166 |
- fi |
3167 |
- |
3168 |
- # Create a client certificate |
3169 |
- echo |
3170 |
- einfon "Please type the Common Name of the CLIENT you wish to create a certificate for: " |
3171 |
- read -r CN |
3172 |
- |
3173 |
- einfo "Creating private key and certificate for client ${CN}..." |
3174 |
- certtool --generate-privkey \ |
3175 |
- --outfile "${CERTDIR}/${PN}_${CN}.key.pem" &>/dev/null |
3176 |
- chmod 400 "${CERTDIR}/${PN}_${CN}.key.pem" |
3177 |
- |
3178 |
- cat > "${T}/${PF}.$$" <<- _EOF |
3179 |
- cn = ${CN} |
3180 |
- tls_www_client |
3181 |
- dns_name = ${CN} |
3182 |
- expiration_days = 3650 |
3183 |
- _EOF |
3184 |
- |
3185 |
- certtool --generate-certificate \ |
3186 |
- --outfile "${CERTDIR}/${PN}_${CN}.cert.pem" \ |
3187 |
- --load-privkey "${CERTDIR}/${PN}_${CN}.key.pem" \ |
3188 |
- --load-ca-certificate "${CERTDIR}/${PN}_ca.cert.pem" \ |
3189 |
- --load-ca-privkey "${CERTDIR}/${PN}_ca.privkey.pem" \ |
3190 |
- --template "${T}/${PF}.$$" &>/dev/null |
3191 |
- chmod 400 "${CERTDIR}/${PN}_${CN}.cert.pem" |
3192 |
- |
3193 |
- rm -f "${T}/${PF}.$$" |
3194 |
- |
3195 |
- echo |
3196 |
- einfo "Here is the documentation on how to encrypt your log traffic:" |
3197 |
- einfo " https://www.rsyslog.com/doc/rsyslog_tls.html" |
3198 |
-} |
3199 |
|
3200 |
diff --git a/app-admin/rsyslog/rsyslog-8.39.0-r1.ebuild b/app-admin/rsyslog/rsyslog-8.39.0-r1.ebuild |
3201 |
deleted file mode 100644 |
3202 |
index 822a2a4279c..00000000000 |
3203 |
--- a/app-admin/rsyslog/rsyslog-8.39.0-r1.ebuild |
3204 |
+++ /dev/null |
3205 |
@@ -1,459 +0,0 @@ |
3206 |
-# Copyright 1999-2018 Gentoo Authors |
3207 |
-# Distributed under the terms of the GNU General Public License v2 |
3208 |
- |
3209 |
-EAPI="6" |
3210 |
-PYTHON_COMPAT=( python{2_7,3_5,3_6,3_7} ) |
3211 |
- |
3212 |
-inherit autotools eutils linux-info python-any-r1 systemd |
3213 |
- |
3214 |
-DESCRIPTION="An enhanced multi-threaded syslogd with database support and more" |
3215 |
-HOMEPAGE="https://www.rsyslog.com/" |
3216 |
- |
3217 |
-if [[ ${PV} == "9999" ]]; then |
3218 |
- EGIT_REPO_URI="https://github.com/rsyslog/${PN}.git" |
3219 |
- |
3220 |
- DOC_REPO_URI="https://github.com/rsyslog/${PN}-doc.git" |
3221 |
- |
3222 |
- inherit git-r3 |
3223 |
-else |
3224 |
- KEYWORDS="~amd64 ~arm ~arm64 ~hppa ~x86" |
3225 |
- |
3226 |
- SRC_URI=" |
3227 |
- https://www.rsyslog.com/files/download/${PN}/${P}.tar.gz |
3228 |
- doc? ( https://www.rsyslog.com/files/download/${PN}/${PN}-doc-${PV}.tar.gz ) |
3229 |
- " |
3230 |
- |
3231 |
- PATCHES=( |
3232 |
- "${FILESDIR}"/${P}-fix-liblogging_stdlog-linking.patch |
3233 |
- "${FILESDIR}"/${PN}-8.40.0-fix-omusrmsg.patch |
3234 |
- ) |
3235 |
-fi |
3236 |
- |
3237 |
-LICENSE="GPL-3 LGPL-3 Apache-2.0" |
3238 |
-SLOT="0" |
3239 |
-IUSE="curl dbi debug doc elasticsearch +gcrypt gnutls jemalloc kafka kerberos kubernetes libressl mdblookup" |
3240 |
-IUSE+=" mongodb mysql normalize omhttp omhttpfs omudpspoof openssl postgres rabbitmq redis relp rfc3195 rfc5424hmac" |
3241 |
-IUSE+=" snmp ssl systemd test usertools +uuid xxhash zeromq" |
3242 |
-RESTRICT="!test? ( test )" |
3243 |
- |
3244 |
-RDEPEND=" |
3245 |
- >=dev-libs/libfastjson-0.99.8:= |
3246 |
- >=dev-libs/libestr-0.1.9 |
3247 |
- >=sys-libs/zlib-1.2.5 |
3248 |
- curl? ( >=net-misc/curl-7.35.0 ) |
3249 |
- dbi? ( >=dev-db/libdbi-0.8.3 ) |
3250 |
- elasticsearch? ( >=net-misc/curl-7.35.0 ) |
3251 |
- gcrypt? ( >=dev-libs/libgcrypt-1.5.3:= ) |
3252 |
- jemalloc? ( >=dev-libs/jemalloc-3.3.1:= ) |
3253 |
- kafka? ( >=dev-libs/librdkafka-0.9.0.99:= ) |
3254 |
- kerberos? ( virtual/krb5 ) |
3255 |
- kubernetes? ( >=net-misc/curl-7.35.0 ) |
3256 |
- mdblookup? ( dev-libs/libmaxminddb:= ) |
3257 |
- mongodb? ( >=dev-libs/mongo-c-driver-1.1.10:= ) |
3258 |
- mysql? ( virtual/libmysqlclient:= ) |
3259 |
- normalize? ( |
3260 |
- >=dev-libs/libee-0.4.0 |
3261 |
- >=dev-libs/liblognorm-2.0.3:= |
3262 |
- ) |
3263 |
- omhttpfs? ( >=net-misc/curl-7.35.0 ) |
3264 |
- omudpspoof? ( >=net-libs/libnet-1.1.6 ) |
3265 |
- postgres? ( >=dev-db/postgresql-8.4.20:= ) |
3266 |
- rabbitmq? ( >=net-libs/rabbitmq-c-0.3.0:= ) |
3267 |
- redis? ( >=dev-libs/hiredis-0.11.0:= ) |
3268 |
- relp? ( >=dev-libs/librelp-1.2.17:= ) |
3269 |
- rfc3195? ( >=dev-libs/liblogging-1.0.1:=[rfc3195] ) |
3270 |
- rfc5424hmac? ( |
3271 |
- !libressl? ( >=dev-libs/openssl-0.9.8y:0= ) |
3272 |
- libressl? ( dev-libs/libressl:= ) |
3273 |
- ) |
3274 |
- snmp? ( >=net-analyzer/net-snmp-5.7.2 ) |
3275 |
- ssl? ( |
3276 |
- gnutls? ( >=net-libs/gnutls-2.12.23:0= ) |
3277 |
- openssl? ( |
3278 |
- !libressl? ( dev-libs/openssl:0= ) |
3279 |
- libressl? ( dev-libs/libressl:0= ) |
3280 |
- ) |
3281 |
- ) |
3282 |
- systemd? ( >=sys-apps/systemd-234 ) |
3283 |
- uuid? ( sys-apps/util-linux:0= ) |
3284 |
- xxhash? ( dev-libs/xxhash:= ) |
3285 |
- zeromq? ( |
3286 |
- >=net-libs/czmq-3.0.2 |
3287 |
- )" |
3288 |
-DEPEND="${RDEPEND} |
3289 |
- >=sys-devel/autoconf-archive-2015.02.24 |
3290 |
- virtual/pkgconfig |
3291 |
- test? ( |
3292 |
- >=dev-libs/liblogging-1.0.1[stdlog] |
3293 |
- jemalloc? ( <sys-libs/libfaketime-0.9.7 ) |
3294 |
- !jemalloc? ( sys-libs/libfaketime ) |
3295 |
- ${PYTHON_DEPS} |
3296 |
- )" |
3297 |
- |
3298 |
-REQUIRED_USE=" |
3299 |
- kubernetes? ( normalize ) |
3300 |
- ssl? ( || ( gnutls openssl ) ) |
3301 |
-" |
3302 |
- |
3303 |
-if [[ ${PV} == "9999" ]]; then |
3304 |
- DEPEND+=" doc? ( >=dev-python/sphinx-1.1.3-r7 )" |
3305 |
- DEPEND+=" >=sys-devel/flex-2.5.39-r1" |
3306 |
- DEPEND+=" >=sys-devel/bison-2.4.3" |
3307 |
- DEPEND+=" >=dev-python/docutils-0.12" |
3308 |
-fi |
3309 |
- |
3310 |
-CONFIG_CHECK="~INOTIFY_USER" |
3311 |
-WARNING_INOTIFY_USER="CONFIG_INOTIFY_USER isn't set. Imfile module on this system will only support polling mode!" |
3312 |
- |
3313 |
-pkg_setup() { |
3314 |
- use test && python-any-r1_pkg_setup |
3315 |
-} |
3316 |
- |
3317 |
-src_unpack() { |
3318 |
- if [[ ${PV} == "9999" ]]; then |
3319 |
- git-r3_fetch |
3320 |
- git-r3_checkout |
3321 |
- else |
3322 |
- unpack ${P}.tar.gz |
3323 |
- fi |
3324 |
- |
3325 |
- if use doc; then |
3326 |
- if [[ ${PV} == "9999" ]]; then |
3327 |
- local _EGIT_BRANCH= |
3328 |
- if [[ -n "${EGIT_BRANCH}" ]]; then |
3329 |
- # Cannot use rsyslog commits/branches for documentation repository |
3330 |
- _EGIT_BRANCH=${EGIT_BRANCH} |
3331 |
- unset EGIT_BRANCH |
3332 |
- fi |
3333 |
- |
3334 |
- git-r3_fetch "${DOC_REPO_URI}" |
3335 |
- git-r3_checkout "${DOC_REPO_URI}" "${S}"/docs |
3336 |
- |
3337 |
- if [[ -n "${_EGIT_BRANCH}" ]]; then |
3338 |
- # Restore previous EGIT_BRANCH information |
3339 |
- EGIT_BRANCH=${_EGIT_BRANCH} |
3340 |
- fi |
3341 |
- else |
3342 |
- cd "${S}" || die "Cannot change dir into '${S}'" |
3343 |
- mkdir docs || die "Failed to create docs directory" |
3344 |
- cd docs || die "Failed to change dir into '${S}/docs'" |
3345 |
- unpack ${PN}-doc-${PV}.tar.gz |
3346 |
- fi |
3347 |
- fi |
3348 |
-} |
3349 |
- |
3350 |
-src_prepare() { |
3351 |
- default |
3352 |
- |
3353 |
- eautoreconf |
3354 |
-} |
3355 |
- |
3356 |
-src_configure() { |
3357 |
- # Maintainer notes: |
3358 |
- # * Guardtime support is missing because libgt isn't yet available |
3359 |
- # in portage. |
3360 |
- # * Hadoop's HDFS file system output module is currently not |
3361 |
- # supported in Gentoo because nobody is able to test it |
3362 |
- # (JAVA dependency). |
3363 |
- # * dev-libs/hiredis doesn't provide pkg-config (see #504614, |
3364 |
- # upstream PR 129 and 136) so we need to export HIREDIS_* |
3365 |
- # variables because rsyslog's build system depends on pkg-config. |
3366 |
- |
3367 |
- if use redis; then |
3368 |
- export HIREDIS_LIBS="-L${EPREFIX}/usr/$(get_libdir) -lhiredis" |
3369 |
- export HIREDIS_CFLAGS="-I${EPREFIX}/usr/include" |
3370 |
- fi |
3371 |
- |
3372 |
- local myeconfargs=( |
3373 |
- --disable-debug-symbols |
3374 |
- --disable-generate-man-pages |
3375 |
- --without-valgrind-testbench |
3376 |
- --disable-liblogging-stdlog |
3377 |
- $(use_enable test testbench) |
3378 |
- $(use_enable test libfaketime) |
3379 |
- $(use_enable test extended-tests) |
3380 |
- # Input Plugins without depedencies |
3381 |
- --enable-imdiag |
3382 |
- --enable-imfile |
3383 |
- --enable-impstats |
3384 |
- --enable-imptcp |
3385 |
- # Message Modificiation Plugins without depedencies |
3386 |
- --enable-mmanon |
3387 |
- --enable-mmaudit |
3388 |
- --enable-mmcount |
3389 |
- --enable-mmfields |
3390 |
- --enable-mmjsonparse |
3391 |
- --enable-mmpstrucdata |
3392 |
- --enable-mmrm1stspace |
3393 |
- --enable-mmsequence |
3394 |
- --enable-mmutf8fix |
3395 |
- # Output Modification Plugins without dependencies |
3396 |
- --enable-mail |
3397 |
- --enable-omprog |
3398 |
- --enable-omruleset |
3399 |
- --enable-omstdout |
3400 |
- --enable-omuxsock |
3401 |
- # Misc |
3402 |
- --enable-fmhash |
3403 |
- $(use_enable xxhash fmhash-xxhash) |
3404 |
- --enable-pmaixforwardedfrom |
3405 |
- --enable-pmciscoios |
3406 |
- --enable-pmcisconames |
3407 |
- --enable-pmlastmsg |
3408 |
- $(use_enable normalize pmnormalize) |
3409 |
- --enable-pmnull |
3410 |
- --enable-pmpanngfw |
3411 |
- --enable-pmsnare |
3412 |
- # DB |
3413 |
- $(use_enable dbi libdbi) |
3414 |
- $(use_enable mongodb ommongodb) |
3415 |
- $(use_enable mysql) |
3416 |
- $(use_enable postgres pgsql) |
3417 |
- $(use_enable redis omhiredis) |
3418 |
- # Debug |
3419 |
- $(use_enable debug) |
3420 |
- $(use_enable debug diagtools) |
3421 |
- $(use_enable debug valgrind) |
3422 |
- # Misc |
3423 |
- $(use_enable curl fmhttp) |
3424 |
- $(use_enable elasticsearch) |
3425 |
- $(use_enable gcrypt libgcrypt) |
3426 |
- $(use_enable jemalloc) |
3427 |
- $(use_enable kafka imkafka) |
3428 |
- $(use_enable kafka omkafka) |
3429 |
- $(use_enable kerberos gssapi-krb5) |
3430 |
- $(use_enable kubernetes mmkubernetes) |
3431 |
- $(use_enable normalize mmnormalize) |
3432 |
- $(use_enable mdblookup mmdblookup) |
3433 |
- $(use_enable omhttp) |
3434 |
- $(use_enable omhttpfs) |
3435 |
- $(use_enable omudpspoof) |
3436 |
- $(use_enable rabbitmq omrabbitmq) |
3437 |
- $(use_enable relp) |
3438 |
- $(use_enable rfc3195) |
3439 |
- $(use_enable rfc5424hmac mmrfc5424addhmac) |
3440 |
- $(use_enable snmp) |
3441 |
- $(use_enable snmp mmsnmptrapd) |
3442 |
- $(use_enable gnutls) |
3443 |
- $(use_enable openssl) |
3444 |
- $(use_enable systemd imjournal) |
3445 |
- $(use_enable systemd omjournal) |
3446 |
- $(use_enable usertools) |
3447 |
- $(use_enable uuid) |
3448 |
- $(use_enable zeromq imczmq) |
3449 |
- $(use_enable zeromq omczmq) |
3450 |
- --with-systemdsystemunitdir="$(systemd_get_systemunitdir)" |
3451 |
- ) |
3452 |
- |
3453 |
- econf "${myeconfargs[@]}" |
3454 |
-} |
3455 |
- |
3456 |
-src_compile() { |
3457 |
- default |
3458 |
- |
3459 |
- if use doc && [[ "${PV}" == "9999" ]]; then |
3460 |
- einfo "Building documentation ..." |
3461 |
- local doc_dir="${S}/docs" |
3462 |
- cd "${doc_dir}" || die "Cannot chdir into \"${doc_dir}\"!" |
3463 |
- sphinx-build -b html source build || die "Building documentation failed!" |
3464 |
- fi |
3465 |
-} |
3466 |
- |
3467 |
-src_test() { |
3468 |
- local _has_increased_ulimit= |
3469 |
- |
3470 |
- # Sometimes tests aren't executable (i.e. when added via patch) |
3471 |
- einfo "Adjusting permissions of test scripts ..." |
3472 |
- find "${S}"/tests -type f -name '*.sh' \! -perm -111 -exec chmod a+x '{}' \; || \ |
3473 |
- die "Failed to adjust test scripts permission" |
3474 |
- |
3475 |
- if ulimit -n 3072; then |
3476 |
- _has_increased_ulimit="true" |
3477 |
- fi |
3478 |
- |
3479 |
- if ! emake --jobs 1 check; then |
3480 |
- eerror "Test suite failed! :(" |
3481 |
- |
3482 |
- if [[ -z "${_has_increased_ulimit}" ]]; then |
3483 |
- eerror "Probably because open file limit couldn't be set to 3072." |
3484 |
- fi |
3485 |
- |
3486 |
- if has userpriv ${FEATURES}; then |
3487 |
- eerror "Please try to reproduce the test suite failure with FEATURES=-userpriv " \ |
3488 |
- "before you submit a bug report." |
3489 |
- fi |
3490 |
- |
3491 |
- fi |
3492 |
-} |
3493 |
- |
3494 |
-src_install() { |
3495 |
- local DOCS=( |
3496 |
- AUTHORS |
3497 |
- ChangeLog |
3498 |
- "${FILESDIR}"/README.gentoo |
3499 |
- ) |
3500 |
- |
3501 |
- use doc && local HTML_DOCS=( "${S}/docs/build/." ) |
3502 |
- |
3503 |
- default |
3504 |
- |
3505 |
- newconfd "${FILESDIR}/${PN}.confd-r1" ${PN} |
3506 |
- newinitd "${FILESDIR}/${PN}.initd-r1" ${PN} |
3507 |
- |
3508 |
- keepdir /var/empty/dev |
3509 |
- keepdir /var/spool/${PN} |
3510 |
- keepdir /etc/ssl/${PN} |
3511 |
- keepdir /etc/${PN}.d |
3512 |
- |
3513 |
- insinto /etc |
3514 |
- newins "${FILESDIR}/${PN}.conf" ${PN}.conf |
3515 |
- |
3516 |
- insinto /etc/rsyslog.d/ |
3517 |
- newins "${FILESDIR}/50-default-r1.conf" 50-default.conf |
3518 |
- |
3519 |
- insinto /etc/logrotate.d/ |
3520 |
- newins "${FILESDIR}/${PN}-r1.logrotate" ${PN} |
3521 |
- |
3522 |
- if use mysql; then |
3523 |
- insinto /usr/share/doc/${PF}/scripts/mysql |
3524 |
- doins plugins/ommysql/createDB.sql |
3525 |
- fi |
3526 |
- |
3527 |
- if use postgres; then |
3528 |
- insinto /usr/share/doc/${PF}/scripts/pgsql |
3529 |
- doins plugins/ompgsql/createDB.sql |
3530 |
- fi |
3531 |
- |
3532 |
- prune_libtool_files --modules |
3533 |
-} |
3534 |
- |
3535 |
-pkg_postinst() { |
3536 |
- local advertise_readme=0 |
3537 |
- |
3538 |
- if [[ -z "${REPLACING_VERSIONS}" ]]; then |
3539 |
- # This is a new installation |
3540 |
- |
3541 |
- advertise_readme=1 |
3542 |
- |
3543 |
- if use mysql || use postgres; then |
3544 |
- echo |
3545 |
- elog "Sample SQL scripts for MySQL & PostgreSQL have been installed to:" |
3546 |
- elog " /usr/share/doc/${PF}/scripts" |
3547 |
- fi |
3548 |
- |
3549 |
- if use ssl; then |
3550 |
- echo |
3551 |
- elog "To create a default CA and certificates for your server and clients, run:" |
3552 |
- elog " emerge --config =${PF}" |
3553 |
- elog "on your logging server. You can run it several times," |
3554 |
- elog "once for each logging client. The client certificates will be signed" |
3555 |
- elog "using the CA certificate generated during the first run." |
3556 |
- fi |
3557 |
- fi |
3558 |
- |
3559 |
- if [[ ${advertise_readme} -gt 0 ]]; then |
3560 |
- # We need to show the README file location |
3561 |
- |
3562 |
- echo "" |
3563 |
- elog "Please read" |
3564 |
- elog "" |
3565 |
- elog " ${EPREFIX}/usr/share/doc/${PF}/README.gentoo*" |
3566 |
- elog "" |
3567 |
- elog "for more details." |
3568 |
- fi |
3569 |
-} |
3570 |
- |
3571 |
-pkg_config() { |
3572 |
- if ! use ssl ; then |
3573 |
- einfo "There is nothing to configure for rsyslog unless you" |
3574 |
- einfo "used USE=ssl to build it." |
3575 |
- return 0 |
3576 |
- fi |
3577 |
- |
3578 |
- # Make sure the certificates directory exists |
3579 |
- local CERTDIR="${EROOT}/etc/ssl/${PN}" |
3580 |
- if [[ ! -d "${CERTDIR}" ]]; then |
3581 |
- mkdir "${CERTDIR}" || die |
3582 |
- fi |
3583 |
- einfo "Your certificates will be stored in ${CERTDIR}" |
3584 |
- |
3585 |
- # Create a default CA if needed |
3586 |
- if [[ ! -f "${CERTDIR}/${PN}_ca.cert.pem" ]]; then |
3587 |
- einfo "No CA key and certificate found in ${CERTDIR}, creating them for you..." |
3588 |
- certtool --generate-privkey \ |
3589 |
- --outfile "${CERTDIR}/${PN}_ca.privkey.pem" &>/dev/null |
3590 |
- chmod 400 "${CERTDIR}/${PN}_ca.privkey.pem" |
3591 |
- |
3592 |
- cat > "${T}/${PF}.$$" <<- _EOF |
3593 |
- cn = Portage automated CA |
3594 |
- ca |
3595 |
- cert_signing_key |
3596 |
- expiration_days = 3650 |
3597 |
- _EOF |
3598 |
- |
3599 |
- certtool --generate-self-signed \ |
3600 |
- --load-privkey "${CERTDIR}/${PN}_ca.privkey.pem" \ |
3601 |
- --outfile "${CERTDIR}/${PN}_ca.cert.pem" \ |
3602 |
- --template "${T}/${PF}.$$" &>/dev/null |
3603 |
- chmod 400 "${CERTDIR}/${PN}_ca.privkey.pem" |
3604 |
- |
3605 |
- # Create the server certificate |
3606 |
- echo |
3607 |
- einfon "Please type the Common Name of the SERVER you wish to create a certificate for: " |
3608 |
- read -r CN |
3609 |
- |
3610 |
- einfo "Creating private key and certificate for server ${CN}..." |
3611 |
- certtool --generate-privkey \ |
3612 |
- --outfile "${CERTDIR}/${PN}_${CN}.key.pem" &>/dev/null |
3613 |
- chmod 400 "${CERTDIR}/${PN}_${CN}.key.pem" |
3614 |
- |
3615 |
- cat > "${T}/${PF}.$$" <<- _EOF |
3616 |
- cn = ${CN} |
3617 |
- tls_www_server |
3618 |
- dns_name = ${CN} |
3619 |
- expiration_days = 3650 |
3620 |
- _EOF |
3621 |
- |
3622 |
- certtool --generate-certificate \ |
3623 |
- --outfile "${CERTDIR}/${PN}_${CN}.cert.pem" \ |
3624 |
- --load-privkey "${CERTDIR}/${PN}_${CN}.key.pem" \ |
3625 |
- --load-ca-certificate "${CERTDIR}/${PN}_ca.cert.pem" \ |
3626 |
- --load-ca-privkey "${CERTDIR}/${PN}_ca.privkey.pem" \ |
3627 |
- --template "${T}/${PF}.$$" &>/dev/null |
3628 |
- chmod 400 "${CERTDIR}/${PN}_${CN}.cert.pem" |
3629 |
- |
3630 |
- else |
3631 |
- einfo "Found existing ${CERTDIR}/${PN}_ca.cert.pem, skipping CA and SERVER creation." |
3632 |
- fi |
3633 |
- |
3634 |
- # Create a client certificate |
3635 |
- echo |
3636 |
- einfon "Please type the Common Name of the CLIENT you wish to create a certificate for: " |
3637 |
- read -r CN |
3638 |
- |
3639 |
- einfo "Creating private key and certificate for client ${CN}..." |
3640 |
- certtool --generate-privkey \ |
3641 |
- --outfile "${CERTDIR}/${PN}_${CN}.key.pem" &>/dev/null |
3642 |
- chmod 400 "${CERTDIR}/${PN}_${CN}.key.pem" |
3643 |
- |
3644 |
- cat > "${T}/${PF}.$$" <<- _EOF |
3645 |
- cn = ${CN} |
3646 |
- tls_www_client |
3647 |
- dns_name = ${CN} |
3648 |
- expiration_days = 3650 |
3649 |
- _EOF |
3650 |
- |
3651 |
- certtool --generate-certificate \ |
3652 |
- --outfile "${CERTDIR}/${PN}_${CN}.cert.pem" \ |
3653 |
- --load-privkey "${CERTDIR}/${PN}_${CN}.key.pem" \ |
3654 |
- --load-ca-certificate "${CERTDIR}/${PN}_ca.cert.pem" \ |
3655 |
- --load-ca-privkey "${CERTDIR}/${PN}_ca.privkey.pem" \ |
3656 |
- --template "${T}/${PF}.$$" &>/dev/null |
3657 |
- chmod 400 "${CERTDIR}/${PN}_${CN}.cert.pem" |
3658 |
- |
3659 |
- rm -f "${T}/${PF}.$$" |
3660 |
- |
3661 |
- echo |
3662 |
- einfo "Here is the documentation on how to encrypt your log traffic:" |
3663 |
- einfo " https://www.rsyslog.com/doc/rsyslog_tls.html" |
3664 |
-} |
3665 |
|
3666 |
diff --git a/app-admin/rsyslog/rsyslog-8.40.0-r1.ebuild b/app-admin/rsyslog/rsyslog-8.40.0-r1.ebuild |
3667 |
deleted file mode 100644 |
3668 |
index 1176e533e0f..00000000000 |
3669 |
--- a/app-admin/rsyslog/rsyslog-8.40.0-r1.ebuild |
3670 |
+++ /dev/null |
3671 |
@@ -1,457 +0,0 @@ |
3672 |
-# Copyright 1999-2019 Gentoo Authors |
3673 |
-# Distributed under the terms of the GNU General Public License v2 |
3674 |
- |
3675 |
-EAPI="6" |
3676 |
-PYTHON_COMPAT=( python{2_7,3_5,3_6,3_7} ) |
3677 |
- |
3678 |
-inherit autotools eutils linux-info python-any-r1 systemd |
3679 |
- |
3680 |
-DESCRIPTION="An enhanced multi-threaded syslogd with database support and more" |
3681 |
-HOMEPAGE="https://www.rsyslog.com/" |
3682 |
- |
3683 |
-if [[ ${PV} == "9999" ]]; then |
3684 |
- EGIT_REPO_URI="https://github.com/rsyslog/${PN}.git" |
3685 |
- |
3686 |
- DOC_REPO_URI="https://github.com/rsyslog/${PN}-doc.git" |
3687 |
- |
3688 |
- inherit git-r3 |
3689 |
-else |
3690 |
- KEYWORDS="amd64 arm ~arm64 ~hppa x86" |
3691 |
- |
3692 |
- SRC_URI=" |
3693 |
- https://www.rsyslog.com/files/download/${PN}/${P}.tar.gz |
3694 |
- doc? ( https://www.rsyslog.com/files/download/${PN}/${PN}-doc-${PV}.tar.gz ) |
3695 |
- " |
3696 |
- |
3697 |
- PATCHES=( "${FILESDIR}"/${PN}-8.40.0-fix-omusrmsg.patch ) |
3698 |
-fi |
3699 |
- |
3700 |
-LICENSE="GPL-3 LGPL-3 Apache-2.0" |
3701 |
-SLOT="0" |
3702 |
-IUSE="curl dbi debug doc elasticsearch +gcrypt gnutls jemalloc kafka kerberos kubernetes libressl mdblookup" |
3703 |
-IUSE+=" mongodb mysql normalize omhttp omhttpfs omudpspoof openssl postgres rabbitmq redis relp rfc3195 rfc5424hmac" |
3704 |
-IUSE+=" snmp ssl systemd test usertools +uuid xxhash zeromq" |
3705 |
-RESTRICT="!test? ( test )" |
3706 |
- |
3707 |
-RDEPEND=" |
3708 |
- >=dev-libs/libfastjson-0.99.8:= |
3709 |
- >=dev-libs/libestr-0.1.9 |
3710 |
- >=sys-libs/zlib-1.2.5 |
3711 |
- curl? ( >=net-misc/curl-7.35.0 ) |
3712 |
- dbi? ( >=dev-db/libdbi-0.8.3 ) |
3713 |
- elasticsearch? ( >=net-misc/curl-7.35.0 ) |
3714 |
- gcrypt? ( >=dev-libs/libgcrypt-1.5.3:= ) |
3715 |
- jemalloc? ( >=dev-libs/jemalloc-3.3.1:= ) |
3716 |
- kafka? ( >=dev-libs/librdkafka-0.9.0.99:= ) |
3717 |
- kerberos? ( virtual/krb5 ) |
3718 |
- kubernetes? ( >=net-misc/curl-7.35.0 ) |
3719 |
- mdblookup? ( dev-libs/libmaxminddb:= ) |
3720 |
- mongodb? ( >=dev-libs/mongo-c-driver-1.1.10:= ) |
3721 |
- mysql? ( virtual/libmysqlclient:= ) |
3722 |
- normalize? ( |
3723 |
- >=dev-libs/libee-0.4.0 |
3724 |
- >=dev-libs/liblognorm-2.0.3:= |
3725 |
- ) |
3726 |
- omhttpfs? ( >=net-misc/curl-7.35.0 ) |
3727 |
- omudpspoof? ( >=net-libs/libnet-1.1.6 ) |
3728 |
- postgres? ( >=dev-db/postgresql-8.4.20:= ) |
3729 |
- rabbitmq? ( >=net-libs/rabbitmq-c-0.3.0:= ) |
3730 |
- redis? ( >=dev-libs/hiredis-0.11.0:= ) |
3731 |
- relp? ( >=dev-libs/librelp-1.2.17:= ) |
3732 |
- rfc3195? ( >=dev-libs/liblogging-1.0.1:=[rfc3195] ) |
3733 |
- rfc5424hmac? ( |
3734 |
- !libressl? ( >=dev-libs/openssl-0.9.8y:0= ) |
3735 |
- libressl? ( dev-libs/libressl:= ) |
3736 |
- ) |
3737 |
- snmp? ( >=net-analyzer/net-snmp-5.7.2 ) |
3738 |
- ssl? ( |
3739 |
- gnutls? ( >=net-libs/gnutls-2.12.23:0= ) |
3740 |
- openssl? ( |
3741 |
- !libressl? ( dev-libs/openssl:0= ) |
3742 |
- libressl? ( dev-libs/libressl:0= ) |
3743 |
- ) |
3744 |
- ) |
3745 |
- systemd? ( >=sys-apps/systemd-234 ) |
3746 |
- uuid? ( sys-apps/util-linux:0= ) |
3747 |
- xxhash? ( dev-libs/xxhash:= ) |
3748 |
- zeromq? ( |
3749 |
- >=net-libs/czmq-3.0.2 |
3750 |
- )" |
3751 |
-DEPEND="${RDEPEND} |
3752 |
- >=sys-devel/autoconf-archive-2015.02.24 |
3753 |
- virtual/pkgconfig |
3754 |
- elibc_musl? ( sys-libs/queue-standalone ) |
3755 |
- test? ( |
3756 |
- >=dev-libs/liblogging-1.0.1[stdlog] |
3757 |
- jemalloc? ( <sys-libs/libfaketime-0.9.7 ) |
3758 |
- !jemalloc? ( sys-libs/libfaketime ) |
3759 |
- ${PYTHON_DEPS} |
3760 |
- )" |
3761 |
- |
3762 |
-REQUIRED_USE=" |
3763 |
- kubernetes? ( normalize ) |
3764 |
- ssl? ( || ( gnutls openssl ) ) |
3765 |
-" |
3766 |
- |
3767 |
-if [[ ${PV} == "9999" ]]; then |
3768 |
- DEPEND+=" doc? ( >=dev-python/sphinx-1.1.3-r7 )" |
3769 |
- DEPEND+=" >=sys-devel/flex-2.5.39-r1" |
3770 |
- DEPEND+=" >=sys-devel/bison-2.4.3" |
3771 |
- DEPEND+=" >=dev-python/docutils-0.12" |
3772 |
-fi |
3773 |
- |
3774 |
-CONFIG_CHECK="~INOTIFY_USER" |
3775 |
-WARNING_INOTIFY_USER="CONFIG_INOTIFY_USER isn't set. Imfile module on this system will only support polling mode!" |
3776 |
- |
3777 |
-pkg_setup() { |
3778 |
- use test && python-any-r1_pkg_setup |
3779 |
-} |
3780 |
- |
3781 |
-src_unpack() { |
3782 |
- if [[ ${PV} == "9999" ]]; then |
3783 |
- git-r3_fetch |
3784 |
- git-r3_checkout |
3785 |
- else |
3786 |
- unpack ${P}.tar.gz |
3787 |
- fi |
3788 |
- |
3789 |
- if use doc; then |
3790 |
- if [[ ${PV} == "9999" ]]; then |
3791 |
- local _EGIT_BRANCH= |
3792 |
- if [[ -n "${EGIT_BRANCH}" ]]; then |
3793 |
- # Cannot use rsyslog commits/branches for documentation repository |
3794 |
- _EGIT_BRANCH=${EGIT_BRANCH} |
3795 |
- unset EGIT_BRANCH |
3796 |
- fi |
3797 |
- |
3798 |
- git-r3_fetch "${DOC_REPO_URI}" |
3799 |
- git-r3_checkout "${DOC_REPO_URI}" "${S}"/docs |
3800 |
- |
3801 |
- if [[ -n "${_EGIT_BRANCH}" ]]; then |
3802 |
- # Restore previous EGIT_BRANCH information |
3803 |
- EGIT_BRANCH=${_EGIT_BRANCH} |
3804 |
- fi |
3805 |
- else |
3806 |
- cd "${S}" || die "Cannot change dir into '${S}'" |
3807 |
- mkdir docs || die "Failed to create docs directory" |
3808 |
- cd docs || die "Failed to change dir into '${S}/docs'" |
3809 |
- unpack ${PN}-doc-${PV}.tar.gz |
3810 |
- fi |
3811 |
- fi |
3812 |
-} |
3813 |
- |
3814 |
-src_prepare() { |
3815 |
- default |
3816 |
- |
3817 |
- eautoreconf |
3818 |
-} |
3819 |
- |
3820 |
-src_configure() { |
3821 |
- # Maintainer notes: |
3822 |
- # * Guardtime support is missing because libgt isn't yet available |
3823 |
- # in portage. |
3824 |
- # * Hadoop's HDFS file system output module is currently not |
3825 |
- # supported in Gentoo because nobody is able to test it |
3826 |
- # (JAVA dependency). |
3827 |
- # * dev-libs/hiredis doesn't provide pkg-config (see #504614, |
3828 |
- # upstream PR 129 and 136) so we need to export HIREDIS_* |
3829 |
- # variables because rsyslog's build system depends on pkg-config. |
3830 |
- |
3831 |
- if use redis; then |
3832 |
- export HIREDIS_LIBS="-L${EPREFIX}/usr/$(get_libdir) -lhiredis" |
3833 |
- export HIREDIS_CFLAGS="-I${EPREFIX}/usr/include" |
3834 |
- fi |
3835 |
- |
3836 |
- local myeconfargs=( |
3837 |
- --disable-debug-symbols |
3838 |
- --disable-generate-man-pages |
3839 |
- --without-valgrind-testbench |
3840 |
- --disable-liblogging-stdlog |
3841 |
- $(use_enable test testbench) |
3842 |
- $(use_enable test libfaketime) |
3843 |
- $(use_enable test extended-tests) |
3844 |
- # Input Plugins without depedencies |
3845 |
- --enable-imdiag |
3846 |
- --enable-imfile |
3847 |
- --enable-impstats |
3848 |
- --enable-imptcp |
3849 |
- # Message Modificiation Plugins without depedencies |
3850 |
- --enable-mmanon |
3851 |
- --enable-mmaudit |
3852 |
- --enable-mmcount |
3853 |
- --enable-mmfields |
3854 |
- --enable-mmjsonparse |
3855 |
- --enable-mmpstrucdata |
3856 |
- --enable-mmrm1stspace |
3857 |
- --enable-mmsequence |
3858 |
- --enable-mmutf8fix |
3859 |
- # Output Modification Plugins without dependencies |
3860 |
- --enable-mail |
3861 |
- --enable-omprog |
3862 |
- --enable-omruleset |
3863 |
- --enable-omstdout |
3864 |
- --enable-omuxsock |
3865 |
- # Misc |
3866 |
- --enable-fmhash |
3867 |
- $(use_enable xxhash fmhash-xxhash) |
3868 |
- --enable-pmaixforwardedfrom |
3869 |
- --enable-pmciscoios |
3870 |
- --enable-pmcisconames |
3871 |
- --enable-pmlastmsg |
3872 |
- $(use_enable normalize pmnormalize) |
3873 |
- --enable-pmnull |
3874 |
- --enable-pmpanngfw |
3875 |
- --enable-pmsnare |
3876 |
- # DB |
3877 |
- $(use_enable dbi libdbi) |
3878 |
- $(use_enable mongodb ommongodb) |
3879 |
- $(use_enable mysql) |
3880 |
- $(use_enable postgres pgsql) |
3881 |
- $(use_enable redis omhiredis) |
3882 |
- # Debug |
3883 |
- $(use_enable debug) |
3884 |
- $(use_enable debug diagtools) |
3885 |
- $(use_enable debug valgrind) |
3886 |
- # Misc |
3887 |
- $(use_enable curl fmhttp) |
3888 |
- $(use_enable elasticsearch) |
3889 |
- $(use_enable gcrypt libgcrypt) |
3890 |
- $(use_enable jemalloc) |
3891 |
- $(use_enable kafka imkafka) |
3892 |
- $(use_enable kafka omkafka) |
3893 |
- $(use_enable kerberos gssapi-krb5) |
3894 |
- $(use_enable kubernetes mmkubernetes) |
3895 |
- $(use_enable normalize mmnormalize) |
3896 |
- $(use_enable mdblookup mmdblookup) |
3897 |
- $(use_enable omhttp) |
3898 |
- $(use_enable omhttpfs) |
3899 |
- $(use_enable omudpspoof) |
3900 |
- $(use_enable rabbitmq omrabbitmq) |
3901 |
- $(use_enable relp) |
3902 |
- $(use_enable rfc3195) |
3903 |
- $(use_enable rfc5424hmac mmrfc5424addhmac) |
3904 |
- $(use_enable snmp) |
3905 |
- $(use_enable snmp mmsnmptrapd) |
3906 |
- $(use_enable gnutls) |
3907 |
- $(use_enable openssl) |
3908 |
- $(use_enable systemd imjournal) |
3909 |
- $(use_enable systemd omjournal) |
3910 |
- $(use_enable usertools) |
3911 |
- $(use_enable uuid) |
3912 |
- $(use_enable zeromq imczmq) |
3913 |
- $(use_enable zeromq omczmq) |
3914 |
- --with-systemdsystemunitdir="$(systemd_get_systemunitdir)" |
3915 |
- ) |
3916 |
- |
3917 |
- econf "${myeconfargs[@]}" |
3918 |
-} |
3919 |
- |
3920 |
-src_compile() { |
3921 |
- default |
3922 |
- |
3923 |
- if use doc && [[ "${PV}" == "9999" ]]; then |
3924 |
- einfo "Building documentation ..." |
3925 |
- local doc_dir="${S}/docs" |
3926 |
- cd "${doc_dir}" || die "Cannot chdir into \"${doc_dir}\"!" |
3927 |
- sphinx-build -b html source build || die "Building documentation failed!" |
3928 |
- fi |
3929 |
-} |
3930 |
- |
3931 |
-src_test() { |
3932 |
- local _has_increased_ulimit= |
3933 |
- |
3934 |
- # Sometimes tests aren't executable (i.e. when added via patch) |
3935 |
- einfo "Adjusting permissions of test scripts ..." |
3936 |
- find "${S}"/tests -type f -name '*.sh' \! -perm -111 -exec chmod a+x '{}' \; || \ |
3937 |
- die "Failed to adjust test scripts permission" |
3938 |
- |
3939 |
- if ulimit -n 3072; then |
3940 |
- _has_increased_ulimit="true" |
3941 |
- fi |
3942 |
- |
3943 |
- if ! emake --jobs 1 check; then |
3944 |
- eerror "Test suite failed! :(" |
3945 |
- |
3946 |
- if [[ -z "${_has_increased_ulimit}" ]]; then |
3947 |
- eerror "Probably because open file limit couldn't be set to 3072." |
3948 |
- fi |
3949 |
- |
3950 |
- if has userpriv ${FEATURES}; then |
3951 |
- eerror "Please try to reproduce the test suite failure with FEATURES=-userpriv " \ |
3952 |
- "before you submit a bug report." |
3953 |
- fi |
3954 |
- |
3955 |
- fi |
3956 |
-} |
3957 |
- |
3958 |
-src_install() { |
3959 |
- local DOCS=( |
3960 |
- AUTHORS |
3961 |
- ChangeLog |
3962 |
- "${FILESDIR}"/README.gentoo |
3963 |
- ) |
3964 |
- |
3965 |
- use doc && local HTML_DOCS=( "${S}/docs/build/." ) |
3966 |
- |
3967 |
- default |
3968 |
- |
3969 |
- newconfd "${FILESDIR}/${PN}.confd-r1" ${PN} |
3970 |
- newinitd "${FILESDIR}/${PN}.initd-r1" ${PN} |
3971 |
- |
3972 |
- keepdir /var/empty/dev |
3973 |
- keepdir /var/spool/${PN} |
3974 |
- keepdir /etc/ssl/${PN} |
3975 |
- keepdir /etc/${PN}.d |
3976 |
- |
3977 |
- insinto /etc |
3978 |
- newins "${FILESDIR}/${PN}.conf" ${PN}.conf |
3979 |
- |
3980 |
- insinto /etc/rsyslog.d/ |
3981 |
- newins "${FILESDIR}/50-default-r1.conf" 50-default.conf |
3982 |
- |
3983 |
- insinto /etc/logrotate.d/ |
3984 |
- newins "${FILESDIR}/${PN}-r1.logrotate" ${PN} |
3985 |
- |
3986 |
- if use mysql; then |
3987 |
- insinto /usr/share/doc/${PF}/scripts/mysql |
3988 |
- doins plugins/ommysql/createDB.sql |
3989 |
- fi |
3990 |
- |
3991 |
- if use postgres; then |
3992 |
- insinto /usr/share/doc/${PF}/scripts/pgsql |
3993 |
- doins plugins/ompgsql/createDB.sql |
3994 |
- fi |
3995 |
- |
3996 |
- prune_libtool_files --modules |
3997 |
-} |
3998 |
- |
3999 |
-pkg_postinst() { |
4000 |
- local advertise_readme=0 |
4001 |
- |
4002 |
- if [[ -z "${REPLACING_VERSIONS}" ]]; then |
4003 |
- # This is a new installation |
4004 |
- |
4005 |
- advertise_readme=1 |
4006 |
- |
4007 |
- if use mysql || use postgres; then |
4008 |
- echo |
4009 |
- elog "Sample SQL scripts for MySQL & PostgreSQL have been installed to:" |
4010 |
- elog " /usr/share/doc/${PF}/scripts" |
4011 |
- fi |
4012 |
- |
4013 |
- if use ssl; then |
4014 |
- echo |
4015 |
- elog "To create a default CA and certificates for your server and clients, run:" |
4016 |
- elog " emerge --config =${PF}" |
4017 |
- elog "on your logging server. You can run it several times," |
4018 |
- elog "once for each logging client. The client certificates will be signed" |
4019 |
- elog "using the CA certificate generated during the first run." |
4020 |
- fi |
4021 |
- fi |
4022 |
- |
4023 |
- if [[ ${advertise_readme} -gt 0 ]]; then |
4024 |
- # We need to show the README file location |
4025 |
- |
4026 |
- echo "" |
4027 |
- elog "Please read" |
4028 |
- elog "" |
4029 |
- elog " ${EPREFIX}/usr/share/doc/${PF}/README.gentoo*" |
4030 |
- elog "" |
4031 |
- elog "for more details." |
4032 |
- fi |
4033 |
-} |
4034 |
- |
4035 |
-pkg_config() { |
4036 |
- if ! use ssl ; then |
4037 |
- einfo "There is nothing to configure for rsyslog unless you" |
4038 |
- einfo "used USE=ssl to build it." |
4039 |
- return 0 |
4040 |
- fi |
4041 |
- |
4042 |
- # Make sure the certificates directory exists |
4043 |
- local CERTDIR="${EROOT}/etc/ssl/${PN}" |
4044 |
- if [[ ! -d "${CERTDIR}" ]]; then |
4045 |
- mkdir "${CERTDIR}" || die |
4046 |
- fi |
4047 |
- einfo "Your certificates will be stored in ${CERTDIR}" |
4048 |
- |
4049 |
- # Create a default CA if needed |
4050 |
- if [[ ! -f "${CERTDIR}/${PN}_ca.cert.pem" ]]; then |
4051 |
- einfo "No CA key and certificate found in ${CERTDIR}, creating them for you..." |
4052 |
- certtool --generate-privkey \ |
4053 |
- --outfile "${CERTDIR}/${PN}_ca.privkey.pem" &>/dev/null |
4054 |
- chmod 400 "${CERTDIR}/${PN}_ca.privkey.pem" |
4055 |
- |
4056 |
- cat > "${T}/${PF}.$$" <<- _EOF |
4057 |
- cn = Portage automated CA |
4058 |
- ca |
4059 |
- cert_signing_key |
4060 |
- expiration_days = 3650 |
4061 |
- _EOF |
4062 |
- |
4063 |
- certtool --generate-self-signed \ |
4064 |
- --load-privkey "${CERTDIR}/${PN}_ca.privkey.pem" \ |
4065 |
- --outfile "${CERTDIR}/${PN}_ca.cert.pem" \ |
4066 |
- --template "${T}/${PF}.$$" &>/dev/null |
4067 |
- chmod 400 "${CERTDIR}/${PN}_ca.privkey.pem" |
4068 |
- |
4069 |
- # Create the server certificate |
4070 |
- echo |
4071 |
- einfon "Please type the Common Name of the SERVER you wish to create a certificate for: " |
4072 |
- read -r CN |
4073 |
- |
4074 |
- einfo "Creating private key and certificate for server ${CN}..." |
4075 |
- certtool --generate-privkey \ |
4076 |
- --outfile "${CERTDIR}/${PN}_${CN}.key.pem" &>/dev/null |
4077 |
- chmod 400 "${CERTDIR}/${PN}_${CN}.key.pem" |
4078 |
- |
4079 |
- cat > "${T}/${PF}.$$" <<- _EOF |
4080 |
- cn = ${CN} |
4081 |
- tls_www_server |
4082 |
- dns_name = ${CN} |
4083 |
- expiration_days = 3650 |
4084 |
- _EOF |
4085 |
- |
4086 |
- certtool --generate-certificate \ |
4087 |
- --outfile "${CERTDIR}/${PN}_${CN}.cert.pem" \ |
4088 |
- --load-privkey "${CERTDIR}/${PN}_${CN}.key.pem" \ |
4089 |
- --load-ca-certificate "${CERTDIR}/${PN}_ca.cert.pem" \ |
4090 |
- --load-ca-privkey "${CERTDIR}/${PN}_ca.privkey.pem" \ |
4091 |
- --template "${T}/${PF}.$$" &>/dev/null |
4092 |
- chmod 400 "${CERTDIR}/${PN}_${CN}.cert.pem" |
4093 |
- |
4094 |
- else |
4095 |
- einfo "Found existing ${CERTDIR}/${PN}_ca.cert.pem, skipping CA and SERVER creation." |
4096 |
- fi |
4097 |
- |
4098 |
- # Create a client certificate |
4099 |
- echo |
4100 |
- einfon "Please type the Common Name of the CLIENT you wish to create a certificate for: " |
4101 |
- read -r CN |
4102 |
- |
4103 |
- einfo "Creating private key and certificate for client ${CN}..." |
4104 |
- certtool --generate-privkey \ |
4105 |
- --outfile "${CERTDIR}/${PN}_${CN}.key.pem" &>/dev/null |
4106 |
- chmod 400 "${CERTDIR}/${PN}_${CN}.key.pem" |
4107 |
- |
4108 |
- cat > "${T}/${PF}.$$" <<- _EOF |
4109 |
- cn = ${CN} |
4110 |
- tls_www_client |
4111 |
- dns_name = ${CN} |
4112 |
- expiration_days = 3650 |
4113 |
- _EOF |
4114 |
- |
4115 |
- certtool --generate-certificate \ |
4116 |
- --outfile "${CERTDIR}/${PN}_${CN}.cert.pem" \ |
4117 |
- --load-privkey "${CERTDIR}/${PN}_${CN}.key.pem" \ |
4118 |
- --load-ca-certificate "${CERTDIR}/${PN}_ca.cert.pem" \ |
4119 |
- --load-ca-privkey "${CERTDIR}/${PN}_ca.privkey.pem" \ |
4120 |
- --template "${T}/${PF}.$$" &>/dev/null |
4121 |
- chmod 400 "${CERTDIR}/${PN}_${CN}.cert.pem" |
4122 |
- |
4123 |
- rm -f "${T}/${PF}.$$" |
4124 |
- |
4125 |
- echo |
4126 |
- einfo "Here is the documentation on how to encrypt your log traffic:" |
4127 |
- einfo " https://www.rsyslog.com/doc/rsyslog_tls.html" |
4128 |
-} |