Gentoo Archives: gentoo-commits

From: Thomas Deutschmann <whissi@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: app-admin/rsyslog/files/8-stable/, app-admin/rsyslog/
Date: Fri, 03 Aug 2018 01:20:01
Message-Id: 1533259176.8831b442e3d08fdc39011c1906edfa071a9af219.whissi@gentoo
1 commit: 8831b442e3d08fdc39011c1906edfa071a9af219
2 Author: Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
3 AuthorDate: Fri Aug 3 00:44:02 2018 +0000
4 Commit: Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
5 CommitDate: Fri Aug 3 01:19:36 2018 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=8831b442
7
8 app-admin/rsyslog: drop old
9
10 Bug: https://bugs.gentoo.org/627912
11 Package-Manager: Portage-2.3.44, Repoman-2.3.10
12
13 app-admin/rsyslog/Manifest | 8 -
14 app-admin/rsyslog/files/8-stable/50-default.conf | 95 -----
15 .../rsyslog-8.27.0-fix-mmnormalize-tests.patch | 23 -
16 ...yslog-8.32.0-fix-building-without-curl-r3.patch | 137 ------
17 .../8-stable/rsyslog-8.34.0-fix-issue2612.patch | 13 -
18 app-admin/rsyslog/files/8-stable/rsyslog.logrotate | 37 --
19 app-admin/rsyslog/rsyslog-8.28.0-r1.ebuild | 451 --------------------
20 app-admin/rsyslog/rsyslog-8.32.0-r4.ebuild | 459 --------------------
21 app-admin/rsyslog/rsyslog-8.33.1-r1.ebuild | 457 --------------------
22 app-admin/rsyslog/rsyslog-8.34.0.ebuild | 464 ---------------------
23 10 files changed, 2144 deletions(-)
24
25 diff --git a/app-admin/rsyslog/Manifest b/app-admin/rsyslog/Manifest
26 index 47c54f0481e..a24a8ca250e 100644
27 --- a/app-admin/rsyslog/Manifest
28 +++ b/app-admin/rsyslog/Manifest
29 @@ -1,12 +1,4 @@
30 -DIST rsyslog-8.28.0.tar.gz 2471122 BLAKE2B 48ed55cbf02eca22591c3d1d59db8f956e4d852cbabb4ae8837767a2c843209a53becbe2a9f595290b44d79c8813414c20954ce1ccaa08bf0786423df79344e3 SHA512 e27ba0ff22e945393536abc5bc6e234d8849db291a5056429b59b47abe15fb060fc5c26efedcfe347b386d438b3f8a029ae4577a1d803666701431677f628cb1
31 -DIST rsyslog-8.32.0.tar.gz 2478990 BLAKE2B 21bfc93b55da107bec2eddb89cb42d76990ced2675caeb6e73183a109f9bc8293bde43f202bb56007f9ea4e49de385b004c158059cb13e8d3d376bf050ca445a SHA512 eea85d77bf3624fbad6f0838fa2a4af7c14d853c8f120f14cf697cdfda7f7e0692dab684d2ddd07fe44a0bcd50cf91baf69af1bb63dc9d60e19146f1150155ac
32 -DIST rsyslog-8.33.1.tar.gz 2494338 BLAKE2B 680ad2c062386e4e3e6c6e1a83cf0001d63da305edae9df527d1079a2fa13b8715e3cbfa211ca908e0005f1762becfd88369a7cd1488134564980137f0e98d86 SHA512 c4b426409e89463a8e8f7f9d0267f2fa1df1a84e947ce7bf91255db88b4cad5b7e607c476ba2db0543af069c44cdbb35330e0839696bf83668200e8ac009c6a0
33 -DIST rsyslog-8.34.0.tar.gz 2545544 BLAKE2B 66caf277a814563027183ecf267d76067c384adf8d6d7b8543203df9a7c37242722dd35445e4446aacf1e680f5f3957cea40ece8a284ef2a393b4a71e3a2b49c SHA512 69eaececa2f8b98799deac8e6cb2cf635a5117da7a21cbb0b880b7df1d83c6ccf16133dab099a6e5fb865f34c2dad164a1bf1952d16ca116af3b1dd35d15065e
34 DIST rsyslog-8.35.0.tar.gz 2590108 BLAKE2B e201c1366b8ab96c070829d51de079212e82216a793eb7622aa91c66e2330981de8be547b1ee7f102ed7d8c8de054d58ba151e95238146a61fba8fe908c5f929 SHA512 3b8845fc057147c2dd740b3bb432e7fb101ad60be5c6bc86a2c2796bcd3f3526c617d45b9e8301388d51047a125ca18ba4ac54f8be2a13eabbbe8fb9361beecc
35 DIST rsyslog-8.36.0.tar.gz 2639477 BLAKE2B 9c7343d853f79e2955a8999e2871a2a9b008cb3ef75b94e2381a3a0ff3e49445593d852d7de3819851dc0d4c17a91d966ca2fbfd52e8215ebdbaf6b7ccd68bdf SHA512 b0c8689374b5b0fb5ad9675ad8983ce67bd04d34ad07d39cf8f91498fd2fd21a173f1077e5fa1b66a89a9d93ab011fc6345ac1a3be9961f4794fc9e152c32a50
36 -DIST rsyslog-docs-8.28.0.tar.gz 4424901 BLAKE2B 9753b1a48b9d3bb045f2d088de5df0bbe5bc9045a82a5cab98b27c2df7648ac312929a173ec34c81ced46cb0eba336d708204b73b57413686769afa882dceaa5 SHA512 c085e09149cfc27ce0cd22edf9ad3f81b111f491fbea79afbc3172882065bd8324e366e3b5d09c885c1a3aa63fe8fbbe154d66488319d4ffc0867f938e1ab07d
37 -DIST rsyslog-docs-8.32.0.tar.gz 5368254 BLAKE2B 6d1efb191698bb1cfb03660167e5dcf9eea8f2fd2e459c350cd55aa24afcc5fb44d2bc0ef5590c6951326fbd0215aecbd59a6122e88ff449f566b37d1ee00d56 SHA512 e64eba3c40eab35e266826fb7e183418f38eb008f2a21ddf2c523d1e42aacaa20f882a561e5df67a979463048b58232fa82759645a21dc6962f6836ac8f57bce
38 -DIST rsyslog-docs-8.33.1.tar.gz 6770438 BLAKE2B e076688d7559c16986241149c00f6df603e2c90771222f4f91dc944fbdeace3dbc6e47fc82602f852a7407e064fe31df0a1c2940d521ae6ae21f5663518bfeb7 SHA512 fcc8ffee372c0b0dc2ab1b76dcf68a66ce820996cf2d46a2b5c6fd40e6fad5ef3c33da97a2e88956751597c20cf0c4a9b6537c22db0b3b46d1a734a9d9f95df5
39 -DIST rsyslog-docs-8.34.0.tar.gz 7419160 BLAKE2B 928e6a4044d6d2161483f934e6c2cd5e489a3ec95b823419d7d57b98a7dd6c73f4d28d17c238471592fe1c692b626b57c7bf647e926c1c38ff5a774e5d2defd5 SHA512 edf9aa63c777624c3dc27dfd64b38893b9b4c9b56941df1d7a8c6bc3cb4cbbfb83e8c356cbefeab7c688ecb6017b66ed99931cb71b69b7c927b4743548dd40d4
40 DIST rsyslog-docs-8.35.0.tar.gz 7427270 BLAKE2B 5441080c07a8398cd5d513ba6abe0335f62762f105354105549f0440c0429c62a4f28a4cc84a71d049bc8134cd64bda2c2210a2f30fd5b94f53e0bc783e7c8d1 SHA512 f78d0451eef789d60f7c5ae1eed46c4a9f7a6ade73b829f65aa2373aa786b00e84e8957089532b1b652838bd9f62b41d92530276a0d27e21b8e94d5f0e4728a6
41 DIST rsyslog-docs-8.36.0.tar.gz 7570338 BLAKE2B 031f94b88fb97e6c8b01d224279138c371a5f54ecc5d7a9298b4ec6351c5d380065877888ab1969386b76b9e715937b7335bee59c3d5b8ddd4910392a58d08cb SHA512 a93f56c9c9464a9ca87f61169c6fcfaa94608f31210eaac77e882e64bf5f514c887765db6bb57e4defafeb2a6e552506f0274c1ed275306efc1656f5520b5efa
42
43 diff --git a/app-admin/rsyslog/files/8-stable/50-default.conf b/app-admin/rsyslog/files/8-stable/50-default.conf
44 deleted file mode 100644
45 index 9ae8578215b..00000000000
46 --- a/app-admin/rsyslog/files/8-stable/50-default.conf
47 +++ /dev/null
48 @@ -1,95 +0,0 @@
49 -#######################
50 -### DEFAULT ACTIONS ###
51 -#######################
52 -
53 -auth,authpriv.* action(
54 - type="omfile"
55 - File="/var/log/auth.log"
56 - FileCreateMode="0600"
57 - FileOwner="root"
58 - FileGroup="adm"
59 - Sync="off"
60 -)
61 -
62 -cron.* action(
63 - type="omfile"
64 - File="/var/log/cron.log"
65 - FileOwner="root"
66 - FileGroup="adm"
67 -)
68 -
69 -daemon.* action(
70 - type="omfile"
71 - File="/var/log/daemon.log"
72 - FileOwner="root"
73 - FileGroup="adm"
74 -)
75 -
76 -kern.* action(
77 - type="omfile"
78 - File="/var/log/kern.log"
79 - FileOwner="root"
80 - FileGroup="adm"
81 -)
82 -
83 -lpr.* action(
84 - type="omfile"
85 - File="/var/log/lpr.log"
86 - FileOwner="root"
87 - FileGroup="adm"
88 -)
89 -
90 -mail.* action(
91 - type="omfile"
92 - File="/var/log/mail.log"
93 - FileOwner="root"
94 - FileGroup="adm"
95 -)
96 -
97 -news.* action(
98 - type="omfile"
99 - File="/var/log/news.log"
100 - FileOwner="root"
101 - FileGroup="adm"
102 -)
103 -
104 -user.* action(
105 - type="omfile"
106 - File="/var/log/user.log"
107 - FileOwner="root"
108 - FileGroup="adm"
109 -)
110 -
111 -*.=debug;auth,authpriv,news,mail.none action(
112 - type="omfile"
113 - File="/var/log/debug.log"
114 - FileOwner="root"
115 - FileGroup="adm"
116 -)
117 -
118 -*.info;auth,authpriv,cron,daemon,lpr,mail,news.none action(
119 - type="omfile"
120 - File="/var/log/messages"
121 - FileOwner="root"
122 - FileGroup="adm"
123 -)
124 -
125 -# Uncomment the following directive to re-enable the
126 -# deprecated "/var/log/syslog" log file (don't forget to re-enable log
127 -# rotation in "/etc/logrotate.d/rsyslog" if you do that!)
128 -#*.*;auth,authpriv.none action(
129 -# type="omfile"
130 -# File="/var/log/syslog"
131 -# FileOwner="root"
132 -# FileGroup="adm"
133 -#)
134 -
135 -*.emerg action(
136 - type="omusrmsg"
137 - Users="*"
138 - action.execOnlyOnceEveryInterval="10"
139 -)
140 -
141 -# Create an additional socket for the default chroot location
142 -# (used by net-misc/openssh[hpn], see https://bugs.gentoo.org/490744)
143 -input(type="imuxsock" Socket="/var/empty/dev/log")
144
145 diff --git a/app-admin/rsyslog/files/8-stable/rsyslog-8.27.0-fix-mmnormalize-tests.patch b/app-admin/rsyslog/files/8-stable/rsyslog-8.27.0-fix-mmnormalize-tests.patch
146 deleted file mode 100644
147 index 6ef7e642628..00000000000
148 --- a/app-admin/rsyslog/files/8-stable/rsyslog-8.27.0-fix-mmnormalize-tests.patch
149 +++ /dev/null
150 @@ -1,23 +0,0 @@
151 -https://github.com/rsyslog/rsyslog/pull/1791
152 ----
153 - tests/Makefile.am | 2 +-
154 - 1 file changed, 1 insertion(+), 1 deletion(-)
155 -
156 ---- a/tests/Makefile.am
157 -+++ b/tests/Makefile.am
158 -@@ -498,7 +498,6 @@ TESTS += msgvar-concurrency-array.sh \
159 - mmnormalize_processing_test2.sh \
160 - mmnormalize_processing_test3.sh \
161 - mmnormalize_processing_test4.sh
162 --endif
163 -
164 - if ENABLE_IMPTCP
165 - TESTS += \
166 -@@ -512,6 +511,7 @@ if LOGNORM_REGEX_SUPPORTED
167 - TESTS += \
168 - mmnormalize_regex.sh
169 - endif
170 -+endif
171 -
172 - if ENABLE_MMJSONPARSE
173 - TESTS += \
174
175 diff --git a/app-admin/rsyslog/files/8-stable/rsyslog-8.32.0-fix-building-without-curl-r3.patch b/app-admin/rsyslog/files/8-stable/rsyslog-8.32.0-fix-building-without-curl-r3.patch
176 deleted file mode 100644
177 index 534183a8ca2..00000000000
178 --- a/app-admin/rsyslog/files/8-stable/rsyslog-8.32.0-fix-building-without-curl-r3.patch
179 +++ /dev/null
180 @@ -1,137 +0,0 @@
181 -https://github.com/rsyslog/rsyslog/commit/d9475f133e3c79875a7c4ccd92038b7123c1f155
182 -https://github.com/rsyslog/rsyslog/commit/468eeb79b8da91fb71dfef6bfb25476b2a37f446
183 -https://github.com/rsyslog/rsyslog/commit/50205ced0fc22e74f26f2a07b557b69c5d30e168
184 -
185 ---- a/grammar/rainerscript.c
186 -+++ b/grammar/rainerscript.c
187 -@@ -1935,6 +1935,7 @@ num2ipv4(struct svar *__restrict__ const sourceVal) {
188 - return(estr);
189 - }
190 -
191 -+#ifdef HAVE_LIBCURL
192 - /* curl callback for doFunc_http_request */
193 - static size_t
194 - curlResult(void *ptr, size_t size, size_t nmemb, void *userdata)
195 -@@ -2010,6 +2011,7 @@ doFunc_http_request(struct cnffunc *__restrict__ const func,
196 - }
197 - RETiRet;
198 - }
199 -+#endif
200 -
201 - static int ATTR_NONNULL(1,3,4)
202 - doFunc_is_time(const char *__restrict__ const str,
203 -@@ -2513,11 +2515,16 @@ doFuncCall(struct cnffunc *__restrict__ const func, struct svar *__restrict__ co
204 - if(bMustFree2) free(str2);
205 - break;
206 - case CNFFUNC_HTTP_REQUEST:
207 -+#ifdef HAVE_LIBCURL
208 - cnfexprEval(func->expr[0], &r[0], usrptr, pWti);
209 - str = (char*) var2CString(&r[0], &bMustFree);
210 - doFunc_http_request(func, ret, str);
211 - if(bMustFree) free(str);
212 - varFreeMembers(&r[0]);
213 -+#else
214 -+ LogError(0, RS_RET_INTERNAL_ERROR,
215 -+ "rainerscript: internal error: HTTP_Fetch not supported, not built with libcurl support");
216 -+#endif
217 - break;
218 - default:
219 - if(Debug) {
220 -
221 ---- a/configure.ac
222 -+++ b/configure.ac
223 -@@ -454,6 +454,8 @@ if test "$enable_libcurl" = "yes"; then
224 - )
225 - fi
226 -
227 -+AM_CONDITIONAL(ENABLE_LIBCURL, test "x${enable_libcurl}" = "xyes")
228 -+
229 - # klog
230 - AC_ARG_ENABLE(klog,
231 - [AS_HELP_STRING([--enable-klog],[Integrated klog functionality @<:@default=yes@:>@])],
232 -
233 ---- a/tests/Makefile.am
234 -+++ b/tests/Makefile.am
235 -@@ -226,7 +226,6 @@ TESTS += \
236 - rscript_contains.sh \
237 - rscript_bare_var_root.sh \
238 - rscript_bare_var_root-empty.sh \
239 -- rscript_http_request.sh \
240 - rscript_ipv42num.sh \
241 - rscript_field.sh \
242 - rscript_stop.sh \
243 -@@ -305,7 +304,11 @@ TESTS += \
244 - lookup_table_rscript_reload.sh \
245 - lookup_table_rscript_reload_without_stub.sh \
246 - multiple_lookup_tables.sh
247 --endif
248 -+if ENABLE_LIBCURL
249 -+TESTS += \
250 -+ rscript_http_request.sh
251 -+endif # ENABLE_LIBCURL
252 -+endif # ENABLE_TESTBENCH2
253 -
254 - if HAVE_VALGRIND
255 - TESTS += \
256 -@@ -313,7 +316,6 @@ TESTS += \
257 - mmexternal-InvldProg-vg.sh \
258 - internal-errmsg-memleak-vg.sh \
259 - rscript_set_memleak-vg.sh \
260 -- rscript_http_request-vg.sh \
261 - no-parser-vg.sh \
262 - discard-rptdmsg-vg.sh \
263 - discard-allmark-vg.sh \
264 -@@ -338,6 +340,10 @@ TESTS += \
265 - multiple_lookup_tables-vg.sh \
266 - fac_local0-vg.sh \
267 - rscript_trim-vg.sh
268 -+if ENABLE_LIBCURL
269 -+TESTS += \
270 -+ rscript_http_request-vg.sh
271 -+endif # ENABLE_LIBCURL
272 - endif # HAVE_VALGRIND
273 -
274 - if ENABLE_ROOT_TESTS
275 -
276 ---- a/grammar/Makefile.am
277 -+++ b/grammar/Makefile.am
278 -@@ -12,8 +12,11 @@ libgrammar_la_SOURCES = \
279 - parserif.h \
280 - grammar.h
281 - libgrammar_la_CPPFLAGS = $(RSRT_CFLAGS) $(LIBLOGGING_STDLOG_CFLAGS)
282 --#libgrammar_la_LIBADD = $(CURL_LIBS) $(RSRT_LIBS) $(SOL_LIBS)
283 --libgrammar_la_LIBADD = $(CURL_LIBS)
284 -+libgrammar_la_LIBADD =
285 -+if ENABLE_LIBCURL
286 -+libgrammar_la_CPPFLAGS += $(CURL_CFLAGS)
287 -+libgrammar_la_LIBADD += $(CURL_LIBS)
288 -+endif
289 -
290 - #testdriver_SOURCES = testdriver.c libgrammar.la
291 - #testdriver_CPPFLAGS = $(RSRT_CFLAGS)
292 -
293 ---- a/plugins/omelasticsearch/Makefile.am
294 -+++ b/plugins/omelasticsearch/Makefile.am
295 -@@ -1,7 +1,7 @@
296 - pkglib_LTLIBRARIES = omelasticsearch.la
297 -
298 - omelasticsearch_la_SOURCES = omelasticsearch.c
299 --omelasticsearch_la_CPPFLAGS = $(RSRT_CFLAGS) $(PTHREADS_CFLAGS)
300 -+omelasticsearch_la_CPPFLAGS = $(RSRT_CFLAGS) $(PTHREADS_CFLAGS) $(CURL_CFLAGS)
301 - omelasticsearch_la_LDFLAGS = -module -avoid-version
302 - omelasticsearch_la_LIBADD = $(CURL_LIBS) $(LIBM)
303 -
304 ---- a/grammar/rainerscript.c
305 -+++ b/grammar/rainerscript.c
306 -@@ -36,7 +36,11 @@
307 - #include <sys/types.h>
308 - #include <libestr.h>
309 - #include <time.h>
310 -+
311 -+#ifdef HAVE_LIBCURL
312 - #include <curl/curl.h>
313 -+#endif
314 -+
315 - #include "rsyslog.h"
316 - #include "rainerscript.h"
317 - #include "conf.h"
318
319 diff --git a/app-admin/rsyslog/files/8-stable/rsyslog-8.34.0-fix-issue2612.patch b/app-admin/rsyslog/files/8-stable/rsyslog-8.34.0-fix-issue2612.patch
320 deleted file mode 100644
321 index 4e9e566e84c..00000000000
322 --- a/app-admin/rsyslog/files/8-stable/rsyslog-8.34.0-fix-issue2612.patch
323 +++ /dev/null
324 @@ -1,13 +0,0 @@
325 -https://github.com/rsyslog/rsyslog/issues/2612
326 -
327 ---- a/configure.ac
328 -+++ b/configure.ac
329 -@@ -254,7 +254,7 @@ AC_LINK_IFELSE([AC_LANG_PROGRAM(, return __builtin_expect(main != 0, 1))],
330 - # speeds up processig.
331 - # note that when automic operations are enabled but not available, they
332 - # will silently NOT be used!
333 --AC_ARG_ENABLE(regexp,
334 -+AC_ARG_ENABLE(atomic_operations,
335 - [AS_HELP_STRING([--enable-atomic-operations],[Enable atomic operation support @<:@default=yes@:>@])],
336 - [case "${enableval}" in
337 - yes) enable_atomic_operations="yes" ;;
338
339 diff --git a/app-admin/rsyslog/files/8-stable/rsyslog.logrotate b/app-admin/rsyslog/files/8-stable/rsyslog.logrotate
340 deleted file mode 100644
341 index 1eae30e0d74..00000000000
342 --- a/app-admin/rsyslog/files/8-stable/rsyslog.logrotate
343 +++ /dev/null
344 @@ -1,37 +0,0 @@
345 -# Uncomment the following directive if you have re-enabled
346 -# "/var/log/syslog" in "/etc/rsyslog.d/50-default.conf"
347 -#/var/log/syslog
348 -#{
349 -# rotate 7
350 -# daily
351 -# missingok
352 -# notifempty
353 -# delaycompress
354 -# compress
355 -# postrotate
356 -# test -r /run/rsyslogd.pid && kill -HUP $(cat /run/rsyslogd.pid) &>/dev/null
357 -# endscript
358 -#}
359 -
360 -/var/log/auth.log
361 -/var/log/cron.log
362 -/var/log/daemon.log
363 -/var/log/kern.log
364 -/var/log/lpr.log
365 -/var/log/mail.log
366 -/var/log/news.log
367 -/var/log/user.log
368 -/var/log/debug.log
369 -/var/log/messages
370 -{
371 - rotate 4
372 - weekly
373 - missingok
374 - notifempty
375 - compress
376 - delaycompress
377 - sharedscripts
378 - postrotate
379 - test -r /run/rsyslogd.pid && kill -HUP $(cat /run/rsyslogd.pid) &>/dev/null
380 - endscript
381 -}
382
383 diff --git a/app-admin/rsyslog/rsyslog-8.28.0-r1.ebuild b/app-admin/rsyslog/rsyslog-8.28.0-r1.ebuild
384 deleted file mode 100644
385 index 7a47099a780..00000000000
386 --- a/app-admin/rsyslog/rsyslog-8.28.0-r1.ebuild
387 +++ /dev/null
388 @@ -1,451 +0,0 @@
389 -# Copyright 1999-2018 Gentoo Foundation
390 -# Distributed under the terms of the GNU General Public License v2
391 -
392 -EAPI="6"
393 -
394 -inherit autotools eutils linux-info systemd
395 -
396 -DESCRIPTION="An enhanced multi-threaded syslogd with database support and more"
397 -HOMEPAGE="https://www.rsyslog.com/"
398 -
399 -BRANCH="8-stable"
400 -
401 -if [[ ${PV} == "9999" ]]; then
402 - EGIT_REPO_URI="https://github.com/rsyslog/${PN}.git"
403 -
404 - DOC_REPO_URI="https://github.com/rsyslog/${PN}-doc.git"
405 -
406 - inherit git-r3
407 -else
408 - MY_PV=${PV%_rc*}
409 - MY_FILENAME="${PN}-${PV}.tar.gz"
410 - MY_FILENAME_DOCS="${PN}-docs-${PV}.tar.gz"
411 - S="${WORKDIR}/${PN}-${MY_PV}"
412 -
413 - # Upstream URL schema:
414 - # RC: http://www.rsyslog.com/files/download/rsyslog/rc/rsyslog-8.18.0.tar.gz
415 - # http://www.rsyslog.com/files/download/rsyslog/rc2/rsyslog-8.18.0.tar.gz
416 - # Release: http://www.rsyslog.com/files/download/rsyslog/rsyslog-8.18.0.tar.gz
417 -
418 - MY_URL_PREFIX=
419 - if [[ ${PV} = *_rc* ]]; then
420 - _tmp_last_index=$(($(get_last_version_component_index ${PV})+1))
421 - _tmp_suffix=$(get_version_component_range ${_tmp_last_index} ${PV})
422 - if [[ ${_tmp_suffix} = *rc* ]]; then
423 - MY_URL_PREFIX="${_tmp_suffix}/"
424 - fi
425 -
426 - # Cleaning up temporary variables
427 - unset _tmp_last_index
428 - unset _tmp_suffix
429 - else
430 - KEYWORDS="hppa"
431 - fi
432 -
433 - SRC_URI="
434 - https://www.rsyslog.com/files/download/${PN}/${MY_URL_PREFIX}${PN}-${MY_PV}.tar.gz -> ${MY_FILENAME}
435 - doc? ( https://www.rsyslog.com/files/download/${PN}/${MY_URL_PREFIX}${PN}-doc-${MY_PV}.tar.gz -> ${MY_FILENAME_DOCS} )
436 - "
437 -
438 - PATCHES=( "${FILESDIR}"/8-stable/${PN}-8.27.0-fix-mmnormalize-tests.patch )
439 -fi
440 -
441 -LICENSE="GPL-3 LGPL-3 Apache-2.0"
442 -SLOT="0"
443 -IUSE="dbi debug doc elasticsearch +gcrypt grok jemalloc kafka kerberos libressl mdblookup mongodb mysql normalize omhttpfs"
444 -IUSE+=" omudpspoof postgres rabbitmq redis relp rfc3195 rfc5424hmac snmp ssl systemd test usertools +uuid zeromq"
445 -
446 -RDEPEND="
447 - >=dev-libs/libfastjson-0.99.3:=
448 - >=dev-libs/libestr-0.1.9
449 - >=dev-libs/liblogging-1.0.1:=[stdlog]
450 - >=sys-libs/zlib-1.2.5
451 - dbi? ( >=dev-db/libdbi-0.8.3 )
452 - elasticsearch? ( >=net-misc/curl-7.35.0 )
453 - gcrypt? ( >=dev-libs/libgcrypt-1.5.3:= )
454 - grok? ( >=dev-libs/grok-0.9.2 )
455 - jemalloc? ( >=dev-libs/jemalloc-3.3.1:= )
456 - kafka? ( >=dev-libs/librdkafka-0.9.0.99:= )
457 - kerberos? ( virtual/krb5 )
458 - mdblookup? ( dev-libs/libmaxminddb:= )
459 - mongodb? ( >=dev-libs/libmongo-client-0.1.4 )
460 - mysql? ( virtual/libmysqlclient:= )
461 - normalize? (
462 - >=dev-libs/libee-0.4.0
463 - >=dev-libs/liblognorm-2.0.3:=
464 - )
465 - omhttpfs? ( >=net-misc/curl-7.35.0 )
466 - omudpspoof? ( >=net-libs/libnet-1.1.6 )
467 - postgres? ( >=dev-db/postgresql-8.4.20:= )
468 - rabbitmq? ( >=net-libs/rabbitmq-c-0.3.0:= )
469 - redis? ( >=dev-libs/hiredis-0.11.0:= )
470 - relp? ( >=dev-libs/librelp-1.2.14:= )
471 - rfc3195? ( >=dev-libs/liblogging-1.0.1:=[rfc3195] )
472 - rfc5424hmac? (
473 - !libressl? ( >=dev-libs/openssl-0.9.8y:0= )
474 - libressl? ( dev-libs/libressl:= )
475 - )
476 - snmp? ( >=net-analyzer/net-snmp-5.7.2 )
477 - ssl? ( >=net-libs/gnutls-2.12.23:0= )
478 - systemd? ( >=sys-apps/systemd-208 )
479 - uuid? ( sys-apps/util-linux:0= )
480 - zeromq? (
481 - >=net-libs/zeromq-4.1.1:=
482 - >=net-libs/czmq-3.0.0
483 - )"
484 -DEPEND="${RDEPEND}
485 - >=sys-devel/autoconf-archive-2015.02.24
486 - virtual/pkgconfig
487 - test? ( sys-libs/libfaketime )"
488 -
489 -if [[ ${PV} == "9999" ]]; then
490 - DEPEND+=" doc? ( >=dev-python/sphinx-1.1.3-r7 )"
491 - DEPEND+=" >=sys-devel/flex-2.5.39-r1"
492 - DEPEND+=" >=sys-devel/bison-2.4.3"
493 - DEPEND+=" >=dev-python/docutils-0.12"
494 -fi
495 -
496 -CONFIG_CHECK="~INOTIFY_USER"
497 -WARNING_INOTIFY_USER="CONFIG_INOTIFY_USER isn't set. Imfile module on this system will only support polling mode!"
498 -
499 -src_unpack() {
500 - if [[ ${PV} == "9999" ]]; then
501 - git-r3_fetch
502 - git-r3_checkout
503 - else
504 - unpack ${P}.tar.gz
505 - fi
506 -
507 - if use doc; then
508 - if [[ ${PV} == "9999" ]]; then
509 - local _EGIT_BRANCH=
510 - if [[ -n "${EGIT_BRANCH}" ]]; then
511 - # Cannot use rsyslog commits/branches for documentation repository
512 - _EGIT_BRANCH=${EGIT_BRANCH}
513 - unset EGIT_BRANCH
514 - fi
515 -
516 - git-r3_fetch "${DOC_REPO_URI}"
517 - git-r3_checkout "${DOC_REPO_URI}" "${S}"/docs
518 -
519 - if [[ -n "${_EGIT_BRANCH}" ]]; then
520 - # Restore previous EGIT_BRANCH information
521 - EGIT_BRANCH=${_EGIT_BRANCH}
522 - fi
523 - else
524 - cd "${S}" || die "Cannot change dir into '${S}'"
525 - mkdir docs || die "Failed to create docs directory"
526 - cd docs || die "Failed to change dir into '${S}/docs'"
527 - unpack ${MY_FILENAME_DOCS}
528 - fi
529 - fi
530 -}
531 -
532 -src_prepare() {
533 - default
534 -
535 - eautoreconf
536 -}
537 -
538 -src_configure() {
539 - # Maintainer notes:
540 - # * Guardtime support is missing because libgt isn't yet available
541 - # in portage.
542 - # * Hadoop's HDFS file system output module is currently not
543 - # supported in Gentoo because nobody is able to test it
544 - # (JAVA dependency).
545 - # * dev-libs/hiredis doesn't provide pkg-config (see #504614,
546 - # upstream PR 129 and 136) so we need to export HIREDIS_*
547 - # variables because rsyslog's build system depends on pkg-config.
548 -
549 - if use redis; then
550 - export HIREDIS_LIBS="-L${EPREFIX}/usr/$(get_libdir) -lhiredis"
551 - export HIREDIS_CFLAGS="-I${EPREFIX}/usr/include"
552 - fi
553 -
554 - local myeconfargs=(
555 - --disable-debug-symbols
556 - --disable-generate-man-pages
557 - --without-valgrind-testbench
558 - $(use_enable test testbench)
559 - # Input Plugins without depedencies
560 - --enable-imdiag
561 - --enable-imfile
562 - --enable-impstats
563 - --enable-imptcp
564 - # Message Modificiation Plugins without depedencies
565 - --enable-mmanon
566 - --enable-mmaudit
567 - --enable-mmcount
568 - --enable-mmfields
569 - --enable-mmjsonparse
570 - --enable-mmpstrucdata
571 - --enable-mmrm1stspace
572 - --enable-mmsequence
573 - --enable-mmutf8fix
574 - # Output Modification Plugins without dependencies
575 - --enable-mail
576 - --enable-omprog
577 - --enable-omruleset
578 - --enable-omstdout
579 - --enable-omuxsock
580 - # Misc
581 - --enable-pmaixforwardedfrom
582 - --enable-pmciscoios
583 - --enable-pmcisconames
584 - --enable-pmlastmsg
585 - --enable-pmsnare
586 - # DB
587 - $(use_enable dbi libdbi)
588 - $(use_enable mongodb ommongodb)
589 - $(use_enable mysql)
590 - $(use_enable postgres pgsql)
591 - $(use_enable redis omhiredis)
592 - # Debug
593 - $(use_enable debug)
594 - $(use_enable debug diagtools)
595 - $(use_enable debug memcheck)
596 - $(use_enable debug rtinst)
597 - $(use_enable debug valgrind)
598 - # Misc
599 - $(use_enable elasticsearch)
600 - $(use_enable gcrypt libgcrypt)
601 - $(use_enable jemalloc)
602 - $(use_enable kafka imkafka)
603 - $(use_enable kafka omkafka)
604 - $(use_enable kerberos gssapi-krb5)
605 - $(use_enable normalize mmnormalize)
606 - $(use_enable mdblookup mmdblookup)
607 - $(use_enable grok mmgrok)
608 - $(use_enable omhttpfs)
609 - $(use_enable omudpspoof)
610 - $(use_enable rabbitmq omrabbitmq)
611 - $(use_enable relp)
612 - $(use_enable rfc3195)
613 - $(use_enable rfc5424hmac mmrfc5424addhmac)
614 - $(use_enable snmp)
615 - $(use_enable snmp mmsnmptrapd)
616 - $(use_enable ssl gnutls)
617 - $(use_enable systemd imjournal)
618 - $(use_enable systemd omjournal)
619 - $(use_enable usertools)
620 - $(use_enable uuid)
621 - $(use_enable zeromq imczmq)
622 - $(use_enable zeromq imzmq3)
623 - $(use_enable zeromq omczmq)
624 - $(use_enable zeromq omzmq3)
625 - --with-systemdsystemunitdir="$(systemd_get_systemunitdir)"
626 - )
627 -
628 - econf "${myeconfargs[@]}"
629 -}
630 -
631 -src_compile() {
632 - default
633 -
634 - if use doc && [[ "${PV}" == "9999" ]]; then
635 - einfo "Building documentation ..."
636 - local doc_dir="${S}/docs"
637 - cd "${doc_dir}" || die "Cannot chdir into \"${doc_dir}\"!"
638 - sphinx-build -b html source build || die "Building documentation failed!"
639 - fi
640 -}
641 -
642 -src_test() {
643 - local _has_increased_ulimit=
644 -
645 - # Sometimes tests aren't executable (i.e. when added via patch)
646 - einfo "Adjusting permissions of test scripts ..."
647 - find "${S}"/tests -type f -name '*.sh' \! -perm -111 -exec chmod a+x '{}' \; || \
648 - die "Failed to adjust test scripts permission"
649 -
650 - if ulimit -n 3072; then
651 - _has_increased_ulimit="true"
652 - fi
653 -
654 - if ! emake --jobs 1 check; then
655 - eerror "Test suite failed! :("
656 -
657 - if [[ -z "${_has_increased_ulimit}" ]]; then
658 - eerror "Probably because open file limit couldn't be set to 3072."
659 - fi
660 -
661 - if has userpriv ${FEATURES}; then
662 - eerror "Please try to reproduce the test suite failure with FEATURES=-userpriv " \
663 - "before you submit a bug report."
664 - fi
665 -
666 - fi
667 -}
668 -
669 -src_install() {
670 - local DOCS=(
671 - AUTHORS
672 - ChangeLog
673 - "${FILESDIR}"/${BRANCH}/README.gentoo
674 - )
675 -
676 - use doc && local HTML_DOCS=( "${S}/docs/build/." )
677 -
678 - default
679 -
680 - newconfd "${FILESDIR}/${BRANCH}/${PN}.confd-r1" ${PN}
681 - newinitd "${FILESDIR}/${BRANCH}/${PN}.initd-r1" ${PN}
682 -
683 - keepdir /var/empty/dev
684 - keepdir /var/spool/${PN}
685 - keepdir /etc/ssl/${PN}
686 - keepdir /etc/${PN}.d
687 -
688 - insinto /etc
689 - newins "${FILESDIR}/${BRANCH}/${PN}.conf" ${PN}.conf
690 -
691 - insinto /etc/rsyslog.d/
692 - doins "${FILESDIR}/${BRANCH}/50-default.conf"
693 -
694 - insinto /etc/logrotate.d/
695 - newins "${FILESDIR}/${BRANCH}/${PN}.logrotate" ${PN}
696 -
697 - if use mysql; then
698 - insinto /usr/share/doc/${PF}/scripts/mysql
699 - doins plugins/ommysql/createDB.sql
700 - fi
701 -
702 - if use postgres; then
703 - insinto /usr/share/doc/${PF}/scripts/pgsql
704 - doins plugins/ompgsql/createDB.sql
705 - fi
706 -
707 - prune_libtool_files --modules
708 -}
709 -
710 -pkg_postinst() {
711 - local advertise_readme=0
712 -
713 - if [[ -z "${REPLACING_VERSIONS}" ]]; then
714 - # This is a new installation
715 -
716 - advertise_readme=1
717 -
718 - if use mysql || use postgres; then
719 - echo
720 - elog "Sample SQL scripts for MySQL & PostgreSQL have been installed to:"
721 - elog " /usr/share/doc/${PF}/scripts"
722 - fi
723 -
724 - if use ssl; then
725 - echo
726 - elog "To create a default CA and certificates for your server and clients, run:"
727 - elog " emerge --config =${PF}"
728 - elog "on your logging server. You can run it several times,"
729 - elog "once for each logging client. The client certificates will be signed"
730 - elog "using the CA certificate generated during the first run."
731 - fi
732 - fi
733 -
734 - if [[ ${advertise_readme} -gt 0 ]]; then
735 - # We need to show the README file location
736 -
737 - echo ""
738 - elog "Please read"
739 - elog ""
740 - elog " ${EPREFIX}/usr/share/doc/${PF}/README.gentoo*"
741 - elog ""
742 - elog "for more details."
743 - fi
744 -}
745 -
746 -pkg_config() {
747 - if ! use ssl ; then
748 - einfo "There is nothing to configure for rsyslog unless you"
749 - einfo "used USE=ssl to build it."
750 - return 0
751 - fi
752 -
753 - # Make sure the certificates directory exists
754 - local CERTDIR="${EROOT}/etc/ssl/${PN}"
755 - if [[ ! -d "${CERTDIR}" ]]; then
756 - mkdir "${CERTDIR}" || die
757 - fi
758 - einfo "Your certificates will be stored in ${CERTDIR}"
759 -
760 - # Create a default CA if needed
761 - if [[ ! -f "${CERTDIR}/${PN}_ca.cert.pem" ]]; then
762 - einfo "No CA key and certificate found in ${CERTDIR}, creating them for you..."
763 - certtool --generate-privkey \
764 - --outfile "${CERTDIR}/${PN}_ca.privkey.pem" &>/dev/null
765 - chmod 400 "${CERTDIR}/${PN}_ca.privkey.pem"
766 -
767 - cat > "${T}/${PF}.$$" <<- _EOF
768 - cn = Portage automated CA
769 - ca
770 - cert_signing_key
771 - expiration_days = 3650
772 - _EOF
773 -
774 - certtool --generate-self-signed \
775 - --load-privkey "${CERTDIR}/${PN}_ca.privkey.pem" \
776 - --outfile "${CERTDIR}/${PN}_ca.cert.pem" \
777 - --template "${T}/${PF}.$$" &>/dev/null
778 - chmod 400 "${CERTDIR}/${PN}_ca.privkey.pem"
779 -
780 - # Create the server certificate
781 - echo
782 - einfon "Please type the Common Name of the SERVER you wish to create a certificate for: "
783 - read -r CN
784 -
785 - einfo "Creating private key and certificate for server ${CN}..."
786 - certtool --generate-privkey \
787 - --outfile "${CERTDIR}/${PN}_${CN}.key.pem" &>/dev/null
788 - chmod 400 "${CERTDIR}/${PN}_${CN}.key.pem"
789 -
790 - cat > "${T}/${PF}.$$" <<- _EOF
791 - cn = ${CN}
792 - tls_www_server
793 - dns_name = ${CN}
794 - expiration_days = 3650
795 - _EOF
796 -
797 - certtool --generate-certificate \
798 - --outfile "${CERTDIR}/${PN}_${CN}.cert.pem" \
799 - --load-privkey "${CERTDIR}/${PN}_${CN}.key.pem" \
800 - --load-ca-certificate "${CERTDIR}/${PN}_ca.cert.pem" \
801 - --load-ca-privkey "${CERTDIR}/${PN}_ca.privkey.pem" \
802 - --template "${T}/${PF}.$$" &>/dev/null
803 - chmod 400 "${CERTDIR}/${PN}_${CN}.cert.pem"
804 -
805 - else
806 - einfo "Found existing ${CERTDIR}/${PN}_ca.cert.pem, skipping CA and SERVER creation."
807 - fi
808 -
809 - # Create a client certificate
810 - echo
811 - einfon "Please type the Common Name of the CLIENT you wish to create a certificate for: "
812 - read -r CN
813 -
814 - einfo "Creating private key and certificate for client ${CN}..."
815 - certtool --generate-privkey \
816 - --outfile "${CERTDIR}/${PN}_${CN}.key.pem" &>/dev/null
817 - chmod 400 "${CERTDIR}/${PN}_${CN}.key.pem"
818 -
819 - cat > "${T}/${PF}.$$" <<- _EOF
820 - cn = ${CN}
821 - tls_www_client
822 - dns_name = ${CN}
823 - expiration_days = 3650
824 - _EOF
825 -
826 - certtool --generate-certificate \
827 - --outfile "${CERTDIR}/${PN}_${CN}.cert.pem" \
828 - --load-privkey "${CERTDIR}/${PN}_${CN}.key.pem" \
829 - --load-ca-certificate "${CERTDIR}/${PN}_ca.cert.pem" \
830 - --load-ca-privkey "${CERTDIR}/${PN}_ca.privkey.pem" \
831 - --template "${T}/${PF}.$$" &>/dev/null
832 - chmod 400 "${CERTDIR}/${PN}_${CN}.cert.pem"
833 -
834 - rm -f "${T}/${PF}.$$"
835 -
836 - echo
837 - einfo "Here is the documentation on how to encrypt your log traffic:"
838 - einfo " http://www.rsyslog.com/doc/rsyslog_tls.html"
839 -}
840
841 diff --git a/app-admin/rsyslog/rsyslog-8.32.0-r4.ebuild b/app-admin/rsyslog/rsyslog-8.32.0-r4.ebuild
842 deleted file mode 100644
843 index 8174b04b23e..00000000000
844 --- a/app-admin/rsyslog/rsyslog-8.32.0-r4.ebuild
845 +++ /dev/null
846 @@ -1,459 +0,0 @@
847 -# Copyright 1999-2018 Gentoo Foundation
848 -# Distributed under the terms of the GNU General Public License v2
849 -
850 -EAPI="6"
851 -PYTHON_COMPAT=( python{2_7,3_4,3_5,3_6} )
852 -
853 -inherit autotools eutils linux-info python-any-r1 systemd
854 -
855 -DESCRIPTION="An enhanced multi-threaded syslogd with database support and more"
856 -HOMEPAGE="https://www.rsyslog.com/"
857 -
858 -BRANCH="8-stable"
859 -
860 -if [[ ${PV} == "9999" ]]; then
861 - EGIT_REPO_URI="https://github.com/rsyslog/${PN}.git"
862 -
863 - DOC_REPO_URI="https://github.com/rsyslog/${PN}-doc.git"
864 -
865 - inherit git-r3
866 -else
867 - MY_PV=${PV%_rc*}
868 - MY_FILENAME="${PN}-${PV}.tar.gz"
869 - MY_FILENAME_DOCS="${PN}-docs-${PV}.tar.gz"
870 - S="${WORKDIR}/${PN}-${MY_PV}"
871 -
872 - # Upstream URL schema:
873 - # RC: http://www.rsyslog.com/files/download/rsyslog/rc/rsyslog-8.18.0.tar.gz
874 - # http://www.rsyslog.com/files/download/rsyslog/rc2/rsyslog-8.18.0.tar.gz
875 - # Release: http://www.rsyslog.com/files/download/rsyslog/rsyslog-8.18.0.tar.gz
876 -
877 - MY_URL_PREFIX=
878 - if [[ ${PV} = *_rc* ]]; then
879 - _tmp_last_index=$(($(get_last_version_component_index ${PV})+1))
880 - _tmp_suffix=$(get_version_component_range ${_tmp_last_index} ${PV})
881 - if [[ ${_tmp_suffix} = *rc* ]]; then
882 - MY_URL_PREFIX="${_tmp_suffix}/"
883 - fi
884 -
885 - # Cleaning up temporary variables
886 - unset _tmp_last_index
887 - unset _tmp_suffix
888 - else
889 - KEYWORDS="amd64 arm ~arm64 ~hppa x86"
890 - fi
891 -
892 - SRC_URI="
893 - https://www.rsyslog.com/files/download/${PN}/${MY_URL_PREFIX}${PN}-${MY_PV}.tar.gz -> ${MY_FILENAME}
894 - doc? ( https://www.rsyslog.com/files/download/${PN}/${MY_URL_PREFIX}${PN}-doc-${MY_PV}.tar.gz -> ${MY_FILENAME_DOCS} )
895 - "
896 -
897 - PATCHES=( "${FILESDIR}"/8-stable/${PN}-8.32.0-fix-building-without-curl-r3.patch )
898 -fi
899 -
900 -LICENSE="GPL-3 LGPL-3 Apache-2.0"
901 -SLOT="0"
902 -IUSE="curl dbi debug doc elasticsearch +gcrypt grok jemalloc kafka kerberos libressl mdblookup mongodb mysql normalize omhttpfs"
903 -IUSE+=" omudpspoof postgres rabbitmq redis relp rfc3195 rfc5424hmac snmp ssl systemd test usertools +uuid zeromq"
904 -
905 -RDEPEND="
906 - >=dev-libs/libfastjson-0.99.8:=
907 - >=dev-libs/libestr-0.1.9
908 - >=dev-libs/liblogging-1.0.1:=[stdlog]
909 - >=sys-libs/zlib-1.2.5
910 - curl? ( >=net-misc/curl-7.35.0 )
911 - dbi? ( >=dev-db/libdbi-0.8.3 )
912 - elasticsearch? ( >=net-misc/curl-7.35.0 )
913 - gcrypt? ( >=dev-libs/libgcrypt-1.5.3:= )
914 - grok? ( >=dev-libs/grok-0.9.2 )
915 - jemalloc? ( >=dev-libs/jemalloc-3.3.1:= )
916 - kafka? ( >=dev-libs/librdkafka-0.9.0.99:= )
917 - kerberos? ( virtual/krb5 )
918 - mdblookup? ( dev-libs/libmaxminddb:= )
919 - mongodb? ( >=dev-libs/mongo-c-driver-1.1.10:= )
920 - mysql? ( virtual/libmysqlclient:= )
921 - normalize? (
922 - >=dev-libs/libee-0.4.0
923 - >=dev-libs/liblognorm-2.0.3:=
924 - )
925 - omhttpfs? ( >=net-misc/curl-7.35.0 )
926 - omudpspoof? ( >=net-libs/libnet-1.1.6 )
927 - postgres? ( >=dev-db/postgresql-8.4.20:= )
928 - rabbitmq? ( >=net-libs/rabbitmq-c-0.3.0:= )
929 - redis? ( >=dev-libs/hiredis-0.11.0:= )
930 - relp? ( >=dev-libs/librelp-1.2.14:= )
931 - rfc3195? ( >=dev-libs/liblogging-1.0.1:=[rfc3195] )
932 - rfc5424hmac? (
933 - !libressl? ( >=dev-libs/openssl-0.9.8y:0= )
934 - libressl? ( dev-libs/libressl:= )
935 - )
936 - snmp? ( >=net-analyzer/net-snmp-5.7.2 )
937 - ssl? ( >=net-libs/gnutls-2.12.23:0= )
938 - systemd? ( >=sys-apps/systemd-234 )
939 - uuid? ( sys-apps/util-linux:0= )
940 - zeromq? (
941 - >=net-libs/czmq-3.0.2
942 - )"
943 -DEPEND="${RDEPEND}
944 - >=sys-devel/autoconf-archive-2015.02.24
945 - virtual/pkgconfig
946 - test? (
947 - jemalloc? ( <sys-libs/libfaketime-0.9.7 )
948 - !jemalloc? ( sys-libs/libfaketime )
949 - ${PYTHON_DEPS}
950 - )"
951 -
952 -if [[ ${PV} == "9999" ]]; then
953 - DEPEND+=" doc? ( >=dev-python/sphinx-1.1.3-r7 )"
954 - DEPEND+=" >=sys-devel/flex-2.5.39-r1"
955 - DEPEND+=" >=sys-devel/bison-2.4.3"
956 - DEPEND+=" >=dev-python/docutils-0.12"
957 -fi
958 -
959 -CONFIG_CHECK="~INOTIFY_USER"
960 -WARNING_INOTIFY_USER="CONFIG_INOTIFY_USER isn't set. Imfile module on this system will only support polling mode!"
961 -
962 -pkg_setup() {
963 - use test && python-any-r1_pkg_setup
964 -}
965 -
966 -src_unpack() {
967 - if [[ ${PV} == "9999" ]]; then
968 - git-r3_fetch
969 - git-r3_checkout
970 - else
971 - unpack ${P}.tar.gz
972 - fi
973 -
974 - if use doc; then
975 - if [[ ${PV} == "9999" ]]; then
976 - local _EGIT_BRANCH=
977 - if [[ -n "${EGIT_BRANCH}" ]]; then
978 - # Cannot use rsyslog commits/branches for documentation repository
979 - _EGIT_BRANCH=${EGIT_BRANCH}
980 - unset EGIT_BRANCH
981 - fi
982 -
983 - git-r3_fetch "${DOC_REPO_URI}"
984 - git-r3_checkout "${DOC_REPO_URI}" "${S}"/docs
985 -
986 - if [[ -n "${_EGIT_BRANCH}" ]]; then
987 - # Restore previous EGIT_BRANCH information
988 - EGIT_BRANCH=${_EGIT_BRANCH}
989 - fi
990 - else
991 - cd "${S}" || die "Cannot change dir into '${S}'"
992 - mkdir docs || die "Failed to create docs directory"
993 - cd docs || die "Failed to change dir into '${S}/docs'"
994 - unpack ${MY_FILENAME_DOCS}
995 - fi
996 - fi
997 -}
998 -
999 -src_prepare() {
1000 - default
1001 -
1002 - eautoreconf
1003 -}
1004 -
1005 -src_configure() {
1006 - # Maintainer notes:
1007 - # * Guardtime support is missing because libgt isn't yet available
1008 - # in portage.
1009 - # * Hadoop's HDFS file system output module is currently not
1010 - # supported in Gentoo because nobody is able to test it
1011 - # (JAVA dependency).
1012 - # * dev-libs/hiredis doesn't provide pkg-config (see #504614,
1013 - # upstream PR 129 and 136) so we need to export HIREDIS_*
1014 - # variables because rsyslog's build system depends on pkg-config.
1015 -
1016 - if use redis; then
1017 - export HIREDIS_LIBS="-L${EPREFIX}/usr/$(get_libdir) -lhiredis"
1018 - export HIREDIS_CFLAGS="-I${EPREFIX}/usr/include"
1019 - fi
1020 -
1021 - local myeconfargs=(
1022 - --disable-debug-symbols
1023 - --disable-generate-man-pages
1024 - --without-valgrind-testbench
1025 - $(use_enable test testbench)
1026 - $(use_enable curl libcurl)
1027 - # Input Plugins without depedencies
1028 - --enable-imdiag
1029 - --enable-imfile
1030 - --enable-impstats
1031 - --enable-imptcp
1032 - # Message Modificiation Plugins without depedencies
1033 - --enable-mmanon
1034 - --enable-mmaudit
1035 - --enable-mmcount
1036 - --enable-mmfields
1037 - --enable-mmjsonparse
1038 - --enable-mmpstrucdata
1039 - --enable-mmrm1stspace
1040 - --enable-mmsequence
1041 - --enable-mmutf8fix
1042 - # Output Modification Plugins without dependencies
1043 - --enable-mail
1044 - --enable-omprog
1045 - --enable-omruleset
1046 - --enable-omstdout
1047 - --enable-omuxsock
1048 - # Misc
1049 - --enable-pmaixforwardedfrom
1050 - --enable-pmciscoios
1051 - --enable-pmcisconames
1052 - --enable-pmlastmsg
1053 - --enable-pmsnare
1054 - # DB
1055 - $(use_enable dbi libdbi)
1056 - $(use_enable mongodb ommongodb)
1057 - $(use_enable mysql)
1058 - $(use_enable postgres pgsql)
1059 - $(use_enable redis omhiredis)
1060 - # Debug
1061 - $(use_enable debug)
1062 - $(use_enable debug diagtools)
1063 - $(use_enable debug memcheck)
1064 - $(use_enable debug rtinst)
1065 - $(use_enable debug valgrind)
1066 - # Misc
1067 - $(use_enable elasticsearch)
1068 - $(use_enable gcrypt libgcrypt)
1069 - $(use_enable jemalloc)
1070 - $(use_enable kafka imkafka)
1071 - $(use_enable kafka omkafka)
1072 - $(use_enable kerberos gssapi-krb5)
1073 - $(use_enable normalize mmnormalize)
1074 - $(use_enable mdblookup mmdblookup)
1075 - $(use_enable grok mmgrok)
1076 - $(use_enable omhttpfs)
1077 - $(use_enable omudpspoof)
1078 - $(use_enable rabbitmq omrabbitmq)
1079 - $(use_enable relp)
1080 - $(use_enable rfc3195)
1081 - $(use_enable rfc5424hmac mmrfc5424addhmac)
1082 - $(use_enable snmp)
1083 - $(use_enable snmp mmsnmptrapd)
1084 - $(use_enable ssl gnutls)
1085 - $(use_enable systemd imjournal)
1086 - $(use_enable systemd omjournal)
1087 - $(use_enable usertools)
1088 - $(use_enable uuid)
1089 - $(use_enable zeromq imczmq)
1090 - $(use_enable zeromq omczmq)
1091 - --with-systemdsystemunitdir="$(systemd_get_systemunitdir)"
1092 - )
1093 -
1094 - econf "${myeconfargs[@]}"
1095 -}
1096 -
1097 -src_compile() {
1098 - default
1099 -
1100 - if use doc && [[ "${PV}" == "9999" ]]; then
1101 - einfo "Building documentation ..."
1102 - local doc_dir="${S}/docs"
1103 - cd "${doc_dir}" || die "Cannot chdir into \"${doc_dir}\"!"
1104 - sphinx-build -b html source build || die "Building documentation failed!"
1105 - fi
1106 -}
1107 -
1108 -src_test() {
1109 - local _has_increased_ulimit=
1110 -
1111 - # Sometimes tests aren't executable (i.e. when added via patch)
1112 - einfo "Adjusting permissions of test scripts ..."
1113 - find "${S}"/tests -type f -name '*.sh' \! -perm -111 -exec chmod a+x '{}' \; || \
1114 - die "Failed to adjust test scripts permission"
1115 -
1116 - if ulimit -n 3072; then
1117 - _has_increased_ulimit="true"
1118 - fi
1119 -
1120 - if ! emake --jobs 1 check; then
1121 - eerror "Test suite failed! :("
1122 -
1123 - if [[ -z "${_has_increased_ulimit}" ]]; then
1124 - eerror "Probably because open file limit couldn't be set to 3072."
1125 - fi
1126 -
1127 - if has userpriv ${FEATURES}; then
1128 - eerror "Please try to reproduce the test suite failure with FEATURES=-userpriv " \
1129 - "before you submit a bug report."
1130 - fi
1131 -
1132 - fi
1133 -}
1134 -
1135 -src_install() {
1136 - local DOCS=(
1137 - AUTHORS
1138 - ChangeLog
1139 - "${FILESDIR}"/${BRANCH}/README.gentoo
1140 - )
1141 -
1142 - use doc && local HTML_DOCS=( "${S}/docs/build/." )
1143 -
1144 - default
1145 -
1146 - newconfd "${FILESDIR}/${BRANCH}/${PN}.confd-r1" ${PN}
1147 - newinitd "${FILESDIR}/${BRANCH}/${PN}.initd-r1" ${PN}
1148 -
1149 - keepdir /var/empty/dev
1150 - keepdir /var/spool/${PN}
1151 - keepdir /etc/ssl/${PN}
1152 - keepdir /etc/${PN}.d
1153 -
1154 - insinto /etc
1155 - newins "${FILESDIR}/${BRANCH}/${PN}.conf" ${PN}.conf
1156 -
1157 - insinto /etc/rsyslog.d/
1158 - newins "${FILESDIR}/${BRANCH}/50-default-r1.conf" 50-default.conf
1159 -
1160 - insinto /etc/logrotate.d/
1161 - newins "${FILESDIR}/${BRANCH}/${PN}.logrotate" ${PN}
1162 -
1163 - if use mysql; then
1164 - insinto /usr/share/doc/${PF}/scripts/mysql
1165 - doins plugins/ommysql/createDB.sql
1166 - fi
1167 -
1168 - if use postgres; then
1169 - insinto /usr/share/doc/${PF}/scripts/pgsql
1170 - doins plugins/ompgsql/createDB.sql
1171 - fi
1172 -
1173 - prune_libtool_files --modules
1174 -}
1175 -
1176 -pkg_postinst() {
1177 - local advertise_readme=0
1178 -
1179 - if [[ -z "${REPLACING_VERSIONS}" ]]; then
1180 - # This is a new installation
1181 -
1182 - advertise_readme=1
1183 -
1184 - if use mysql || use postgres; then
1185 - echo
1186 - elog "Sample SQL scripts for MySQL & PostgreSQL have been installed to:"
1187 - elog " /usr/share/doc/${PF}/scripts"
1188 - fi
1189 -
1190 - if use ssl; then
1191 - echo
1192 - elog "To create a default CA and certificates for your server and clients, run:"
1193 - elog " emerge --config =${PF}"
1194 - elog "on your logging server. You can run it several times,"
1195 - elog "once for each logging client. The client certificates will be signed"
1196 - elog "using the CA certificate generated during the first run."
1197 - fi
1198 - fi
1199 -
1200 - if [[ ${advertise_readme} -gt 0 ]]; then
1201 - # We need to show the README file location
1202 -
1203 - echo ""
1204 - elog "Please read"
1205 - elog ""
1206 - elog " ${EPREFIX}/usr/share/doc/${PF}/README.gentoo*"
1207 - elog ""
1208 - elog "for more details."
1209 - fi
1210 -}
1211 -
1212 -pkg_config() {
1213 - if ! use ssl ; then
1214 - einfo "There is nothing to configure for rsyslog unless you"
1215 - einfo "used USE=ssl to build it."
1216 - return 0
1217 - fi
1218 -
1219 - # Make sure the certificates directory exists
1220 - local CERTDIR="${EROOT}/etc/ssl/${PN}"
1221 - if [[ ! -d "${CERTDIR}" ]]; then
1222 - mkdir "${CERTDIR}" || die
1223 - fi
1224 - einfo "Your certificates will be stored in ${CERTDIR}"
1225 -
1226 - # Create a default CA if needed
1227 - if [[ ! -f "${CERTDIR}/${PN}_ca.cert.pem" ]]; then
1228 - einfo "No CA key and certificate found in ${CERTDIR}, creating them for you..."
1229 - certtool --generate-privkey \
1230 - --outfile "${CERTDIR}/${PN}_ca.privkey.pem" &>/dev/null
1231 - chmod 400 "${CERTDIR}/${PN}_ca.privkey.pem"
1232 -
1233 - cat > "${T}/${PF}.$$" <<- _EOF
1234 - cn = Portage automated CA
1235 - ca
1236 - cert_signing_key
1237 - expiration_days = 3650
1238 - _EOF
1239 -
1240 - certtool --generate-self-signed \
1241 - --load-privkey "${CERTDIR}/${PN}_ca.privkey.pem" \
1242 - --outfile "${CERTDIR}/${PN}_ca.cert.pem" \
1243 - --template "${T}/${PF}.$$" &>/dev/null
1244 - chmod 400 "${CERTDIR}/${PN}_ca.privkey.pem"
1245 -
1246 - # Create the server certificate
1247 - echo
1248 - einfon "Please type the Common Name of the SERVER you wish to create a certificate for: "
1249 - read -r CN
1250 -
1251 - einfo "Creating private key and certificate for server ${CN}..."
1252 - certtool --generate-privkey \
1253 - --outfile "${CERTDIR}/${PN}_${CN}.key.pem" &>/dev/null
1254 - chmod 400 "${CERTDIR}/${PN}_${CN}.key.pem"
1255 -
1256 - cat > "${T}/${PF}.$$" <<- _EOF
1257 - cn = ${CN}
1258 - tls_www_server
1259 - dns_name = ${CN}
1260 - expiration_days = 3650
1261 - _EOF
1262 -
1263 - certtool --generate-certificate \
1264 - --outfile "${CERTDIR}/${PN}_${CN}.cert.pem" \
1265 - --load-privkey "${CERTDIR}/${PN}_${CN}.key.pem" \
1266 - --load-ca-certificate "${CERTDIR}/${PN}_ca.cert.pem" \
1267 - --load-ca-privkey "${CERTDIR}/${PN}_ca.privkey.pem" \
1268 - --template "${T}/${PF}.$$" &>/dev/null
1269 - chmod 400 "${CERTDIR}/${PN}_${CN}.cert.pem"
1270 -
1271 - else
1272 - einfo "Found existing ${CERTDIR}/${PN}_ca.cert.pem, skipping CA and SERVER creation."
1273 - fi
1274 -
1275 - # Create a client certificate
1276 - echo
1277 - einfon "Please type the Common Name of the CLIENT you wish to create a certificate for: "
1278 - read -r CN
1279 -
1280 - einfo "Creating private key and certificate for client ${CN}..."
1281 - certtool --generate-privkey \
1282 - --outfile "${CERTDIR}/${PN}_${CN}.key.pem" &>/dev/null
1283 - chmod 400 "${CERTDIR}/${PN}_${CN}.key.pem"
1284 -
1285 - cat > "${T}/${PF}.$$" <<- _EOF
1286 - cn = ${CN}
1287 - tls_www_client
1288 - dns_name = ${CN}
1289 - expiration_days = 3650
1290 - _EOF
1291 -
1292 - certtool --generate-certificate \
1293 - --outfile "${CERTDIR}/${PN}_${CN}.cert.pem" \
1294 - --load-privkey "${CERTDIR}/${PN}_${CN}.key.pem" \
1295 - --load-ca-certificate "${CERTDIR}/${PN}_ca.cert.pem" \
1296 - --load-ca-privkey "${CERTDIR}/${PN}_ca.privkey.pem" \
1297 - --template "${T}/${PF}.$$" &>/dev/null
1298 - chmod 400 "${CERTDIR}/${PN}_${CN}.cert.pem"
1299 -
1300 - rm -f "${T}/${PF}.$$"
1301 -
1302 - echo
1303 - einfo "Here is the documentation on how to encrypt your log traffic:"
1304 - einfo " http://www.rsyslog.com/doc/rsyslog_tls.html"
1305 -}
1306
1307 diff --git a/app-admin/rsyslog/rsyslog-8.33.1-r1.ebuild b/app-admin/rsyslog/rsyslog-8.33.1-r1.ebuild
1308 deleted file mode 100644
1309 index c9aecb5b071..00000000000
1310 --- a/app-admin/rsyslog/rsyslog-8.33.1-r1.ebuild
1311 +++ /dev/null
1312 @@ -1,457 +0,0 @@
1313 -# Copyright 1999-2018 Gentoo Foundation
1314 -# Distributed under the terms of the GNU General Public License v2
1315 -
1316 -EAPI="6"
1317 -PYTHON_COMPAT=( python{2_7,3_4,3_5,3_6} )
1318 -
1319 -inherit autotools eutils linux-info python-any-r1 systemd
1320 -
1321 -DESCRIPTION="An enhanced multi-threaded syslogd with database support and more"
1322 -HOMEPAGE="https://www.rsyslog.com/"
1323 -
1324 -BRANCH="8-stable"
1325 -
1326 -if [[ ${PV} == "9999" ]]; then
1327 - EGIT_REPO_URI="https://github.com/rsyslog/${PN}.git"
1328 -
1329 - DOC_REPO_URI="https://github.com/rsyslog/${PN}-doc.git"
1330 -
1331 - inherit git-r3
1332 -else
1333 - MY_PV=${PV%_rc*}
1334 - MY_FILENAME="${PN}-${PV}.tar.gz"
1335 - MY_FILENAME_DOCS="${PN}-docs-${PV}.tar.gz"
1336 - S="${WORKDIR}/${PN}-${MY_PV}"
1337 -
1338 - # Upstream URL schema:
1339 - # RC: http://www.rsyslog.com/files/download/rsyslog/rc/rsyslog-8.18.0.tar.gz
1340 - # http://www.rsyslog.com/files/download/rsyslog/rc2/rsyslog-8.18.0.tar.gz
1341 - # Release: http://www.rsyslog.com/files/download/rsyslog/rsyslog-8.18.0.tar.gz
1342 -
1343 - MY_URL_PREFIX=
1344 - if [[ ${PV} = *_rc* ]]; then
1345 - _tmp_last_index=$(($(get_last_version_component_index ${PV})+1))
1346 - _tmp_suffix=$(get_version_component_range ${_tmp_last_index} ${PV})
1347 - if [[ ${_tmp_suffix} = *rc* ]]; then
1348 - MY_URL_PREFIX="${_tmp_suffix}/"
1349 - fi
1350 -
1351 - # Cleaning up temporary variables
1352 - unset _tmp_last_index
1353 - unset _tmp_suffix
1354 - else
1355 - KEYWORDS="~amd64 ~arm ~arm64 ~hppa ~x86"
1356 - fi
1357 -
1358 - SRC_URI="
1359 - https://www.rsyslog.com/files/download/${PN}/${MY_URL_PREFIX}${PN}-${MY_PV}.tar.gz -> ${MY_FILENAME}
1360 - doc? ( https://www.rsyslog.com/files/download/${PN}/${MY_URL_PREFIX}${PN}-doc-${MY_PV}.tar.gz -> ${MY_FILENAME_DOCS} )
1361 - "
1362 -fi
1363 -
1364 -LICENSE="GPL-3 LGPL-3 Apache-2.0"
1365 -SLOT="0"
1366 -IUSE="curl dbi debug doc elasticsearch +gcrypt grok jemalloc kafka kerberos libressl mdblookup mongodb mysql normalize omhttpfs"
1367 -IUSE+=" omudpspoof postgres rabbitmq redis relp rfc3195 rfc5424hmac snmp ssl systemd test usertools +uuid zeromq"
1368 -
1369 -RDEPEND="
1370 - >=dev-libs/libfastjson-0.99.8:=
1371 - >=dev-libs/libestr-0.1.9
1372 - >=dev-libs/liblogging-1.0.1:=[stdlog]
1373 - >=sys-libs/zlib-1.2.5
1374 - curl? ( >=net-misc/curl-7.35.0 )
1375 - dbi? ( >=dev-db/libdbi-0.8.3 )
1376 - elasticsearch? ( >=net-misc/curl-7.35.0 )
1377 - gcrypt? ( >=dev-libs/libgcrypt-1.5.3:= )
1378 - grok? ( >=dev-libs/grok-0.9.2 )
1379 - jemalloc? ( >=dev-libs/jemalloc-3.3.1:= )
1380 - kafka? ( >=dev-libs/librdkafka-0.9.0.99:= )
1381 - kerberos? ( virtual/krb5 )
1382 - mdblookup? ( dev-libs/libmaxminddb:= )
1383 - mongodb? ( >=dev-libs/mongo-c-driver-1.1.10:= )
1384 - mysql? ( virtual/libmysqlclient:= )
1385 - normalize? (
1386 - >=dev-libs/libee-0.4.0
1387 - >=dev-libs/liblognorm-2.0.3:=
1388 - )
1389 - omhttpfs? ( >=net-misc/curl-7.35.0 )
1390 - omudpspoof? ( >=net-libs/libnet-1.1.6 )
1391 - postgres? ( >=dev-db/postgresql-8.4.20:= )
1392 - rabbitmq? ( >=net-libs/rabbitmq-c-0.3.0:= )
1393 - redis? ( >=dev-libs/hiredis-0.11.0:= )
1394 - relp? ( >=dev-libs/librelp-1.2.14:= )
1395 - rfc3195? ( >=dev-libs/liblogging-1.0.1:=[rfc3195] )
1396 - rfc5424hmac? (
1397 - !libressl? ( >=dev-libs/openssl-0.9.8y:0= )
1398 - libressl? ( dev-libs/libressl:= )
1399 - )
1400 - snmp? ( >=net-analyzer/net-snmp-5.7.2 )
1401 - ssl? ( >=net-libs/gnutls-2.12.23:0= )
1402 - systemd? ( >=sys-apps/systemd-234 )
1403 - uuid? ( sys-apps/util-linux:0= )
1404 - zeromq? (
1405 - >=net-libs/czmq-3.0.2
1406 - )"
1407 -DEPEND="${RDEPEND}
1408 - >=sys-devel/autoconf-archive-2015.02.24
1409 - virtual/pkgconfig
1410 - test? (
1411 - jemalloc? ( <sys-libs/libfaketime-0.9.7 )
1412 - !jemalloc? ( sys-libs/libfaketime )
1413 - ${PYTHON_DEPS}
1414 - )"
1415 -
1416 -if [[ ${PV} == "9999" ]]; then
1417 - DEPEND+=" doc? ( >=dev-python/sphinx-1.1.3-r7 )"
1418 - DEPEND+=" >=sys-devel/flex-2.5.39-r1"
1419 - DEPEND+=" >=sys-devel/bison-2.4.3"
1420 - DEPEND+=" >=dev-python/docutils-0.12"
1421 -fi
1422 -
1423 -CONFIG_CHECK="~INOTIFY_USER"
1424 -WARNING_INOTIFY_USER="CONFIG_INOTIFY_USER isn't set. Imfile module on this system will only support polling mode!"
1425 -
1426 -pkg_setup() {
1427 - use test && python-any-r1_pkg_setup
1428 -}
1429 -
1430 -src_unpack() {
1431 - if [[ ${PV} == "9999" ]]; then
1432 - git-r3_fetch
1433 - git-r3_checkout
1434 - else
1435 - unpack ${P}.tar.gz
1436 - fi
1437 -
1438 - if use doc; then
1439 - if [[ ${PV} == "9999" ]]; then
1440 - local _EGIT_BRANCH=
1441 - if [[ -n "${EGIT_BRANCH}" ]]; then
1442 - # Cannot use rsyslog commits/branches for documentation repository
1443 - _EGIT_BRANCH=${EGIT_BRANCH}
1444 - unset EGIT_BRANCH
1445 - fi
1446 -
1447 - git-r3_fetch "${DOC_REPO_URI}"
1448 - git-r3_checkout "${DOC_REPO_URI}" "${S}"/docs
1449 -
1450 - if [[ -n "${_EGIT_BRANCH}" ]]; then
1451 - # Restore previous EGIT_BRANCH information
1452 - EGIT_BRANCH=${_EGIT_BRANCH}
1453 - fi
1454 - else
1455 - cd "${S}" || die "Cannot change dir into '${S}'"
1456 - mkdir docs || die "Failed to create docs directory"
1457 - cd docs || die "Failed to change dir into '${S}/docs'"
1458 - unpack ${MY_FILENAME_DOCS}
1459 - fi
1460 - fi
1461 -}
1462 -
1463 -src_prepare() {
1464 - default
1465 -
1466 - eautoreconf
1467 -}
1468 -
1469 -src_configure() {
1470 - # Maintainer notes:
1471 - # * Guardtime support is missing because libgt isn't yet available
1472 - # in portage.
1473 - # * Hadoop's HDFS file system output module is currently not
1474 - # supported in Gentoo because nobody is able to test it
1475 - # (JAVA dependency).
1476 - # * dev-libs/hiredis doesn't provide pkg-config (see #504614,
1477 - # upstream PR 129 and 136) so we need to export HIREDIS_*
1478 - # variables because rsyslog's build system depends on pkg-config.
1479 -
1480 - if use redis; then
1481 - export HIREDIS_LIBS="-L${EPREFIX}/usr/$(get_libdir) -lhiredis"
1482 - export HIREDIS_CFLAGS="-I${EPREFIX}/usr/include"
1483 - fi
1484 -
1485 - local myeconfargs=(
1486 - --disable-debug-symbols
1487 - --disable-generate-man-pages
1488 - --without-valgrind-testbench
1489 - $(use_enable test testbench)
1490 - $(use_enable curl libcurl)
1491 - # Input Plugins without depedencies
1492 - --enable-imdiag
1493 - --enable-imfile
1494 - --enable-impstats
1495 - --enable-imptcp
1496 - # Message Modificiation Plugins without depedencies
1497 - --enable-mmanon
1498 - --enable-mmaudit
1499 - --enable-mmcount
1500 - --enable-mmfields
1501 - --enable-mmjsonparse
1502 - --enable-mmpstrucdata
1503 - --enable-mmrm1stspace
1504 - --enable-mmsequence
1505 - --enable-mmutf8fix
1506 - # Output Modification Plugins without dependencies
1507 - --enable-mail
1508 - --enable-omprog
1509 - --enable-omruleset
1510 - --enable-omstdout
1511 - --enable-omuxsock
1512 - # Misc
1513 - --enable-pmaixforwardedfrom
1514 - --enable-pmciscoios
1515 - --enable-pmcisconames
1516 - --enable-pmlastmsg
1517 - --enable-pmsnare
1518 - # DB
1519 - $(use_enable dbi libdbi)
1520 - $(use_enable mongodb ommongodb)
1521 - $(use_enable mysql)
1522 - $(use_enable postgres pgsql)
1523 - $(use_enable redis omhiredis)
1524 - # Debug
1525 - $(use_enable debug)
1526 - $(use_enable debug diagtools)
1527 - $(use_enable debug memcheck)
1528 - $(use_enable debug rtinst)
1529 - $(use_enable debug valgrind)
1530 - # Misc
1531 - $(use_enable elasticsearch)
1532 - $(use_enable gcrypt libgcrypt)
1533 - $(use_enable jemalloc)
1534 - $(use_enable kafka imkafka)
1535 - $(use_enable kafka omkafka)
1536 - $(use_enable kerberos gssapi-krb5)
1537 - $(use_enable normalize mmnormalize)
1538 - $(use_enable mdblookup mmdblookup)
1539 - $(use_enable grok mmgrok)
1540 - $(use_enable omhttpfs)
1541 - $(use_enable omudpspoof)
1542 - $(use_enable rabbitmq omrabbitmq)
1543 - $(use_enable relp)
1544 - $(use_enable rfc3195)
1545 - $(use_enable rfc5424hmac mmrfc5424addhmac)
1546 - $(use_enable snmp)
1547 - $(use_enable snmp mmsnmptrapd)
1548 - $(use_enable ssl gnutls)
1549 - $(use_enable systemd imjournal)
1550 - $(use_enable systemd omjournal)
1551 - $(use_enable usertools)
1552 - $(use_enable uuid)
1553 - $(use_enable zeromq imczmq)
1554 - $(use_enable zeromq omczmq)
1555 - --with-systemdsystemunitdir="$(systemd_get_systemunitdir)"
1556 - )
1557 -
1558 - econf "${myeconfargs[@]}"
1559 -}
1560 -
1561 -src_compile() {
1562 - default
1563 -
1564 - if use doc && [[ "${PV}" == "9999" ]]; then
1565 - einfo "Building documentation ..."
1566 - local doc_dir="${S}/docs"
1567 - cd "${doc_dir}" || die "Cannot chdir into \"${doc_dir}\"!"
1568 - sphinx-build -b html source build || die "Building documentation failed!"
1569 - fi
1570 -}
1571 -
1572 -src_test() {
1573 - local _has_increased_ulimit=
1574 -
1575 - # Sometimes tests aren't executable (i.e. when added via patch)
1576 - einfo "Adjusting permissions of test scripts ..."
1577 - find "${S}"/tests -type f -name '*.sh' \! -perm -111 -exec chmod a+x '{}' \; || \
1578 - die "Failed to adjust test scripts permission"
1579 -
1580 - if ulimit -n 3072; then
1581 - _has_increased_ulimit="true"
1582 - fi
1583 -
1584 - if ! emake --jobs 1 check; then
1585 - eerror "Test suite failed! :("
1586 -
1587 - if [[ -z "${_has_increased_ulimit}" ]]; then
1588 - eerror "Probably because open file limit couldn't be set to 3072."
1589 - fi
1590 -
1591 - if has userpriv ${FEATURES}; then
1592 - eerror "Please try to reproduce the test suite failure with FEATURES=-userpriv " \
1593 - "before you submit a bug report."
1594 - fi
1595 -
1596 - fi
1597 -}
1598 -
1599 -src_install() {
1600 - local DOCS=(
1601 - AUTHORS
1602 - ChangeLog
1603 - "${FILESDIR}"/${BRANCH}/README.gentoo
1604 - )
1605 -
1606 - use doc && local HTML_DOCS=( "${S}/docs/build/." )
1607 -
1608 - default
1609 -
1610 - newconfd "${FILESDIR}/${BRANCH}/${PN}.confd-r1" ${PN}
1611 - newinitd "${FILESDIR}/${BRANCH}/${PN}.initd-r1" ${PN}
1612 -
1613 - keepdir /var/empty/dev
1614 - keepdir /var/spool/${PN}
1615 - keepdir /etc/ssl/${PN}
1616 - keepdir /etc/${PN}.d
1617 -
1618 - insinto /etc
1619 - newins "${FILESDIR}/${BRANCH}/${PN}.conf" ${PN}.conf
1620 -
1621 - insinto /etc/rsyslog.d/
1622 - newins "${FILESDIR}/${BRANCH}/50-default-r1.conf" 50-default.conf
1623 -
1624 - insinto /etc/logrotate.d/
1625 - newins "${FILESDIR}/${BRANCH}/${PN}.logrotate" ${PN}
1626 -
1627 - if use mysql; then
1628 - insinto /usr/share/doc/${PF}/scripts/mysql
1629 - doins plugins/ommysql/createDB.sql
1630 - fi
1631 -
1632 - if use postgres; then
1633 - insinto /usr/share/doc/${PF}/scripts/pgsql
1634 - doins plugins/ompgsql/createDB.sql
1635 - fi
1636 -
1637 - prune_libtool_files --modules
1638 -}
1639 -
1640 -pkg_postinst() {
1641 - local advertise_readme=0
1642 -
1643 - if [[ -z "${REPLACING_VERSIONS}" ]]; then
1644 - # This is a new installation
1645 -
1646 - advertise_readme=1
1647 -
1648 - if use mysql || use postgres; then
1649 - echo
1650 - elog "Sample SQL scripts for MySQL & PostgreSQL have been installed to:"
1651 - elog " /usr/share/doc/${PF}/scripts"
1652 - fi
1653 -
1654 - if use ssl; then
1655 - echo
1656 - elog "To create a default CA and certificates for your server and clients, run:"
1657 - elog " emerge --config =${PF}"
1658 - elog "on your logging server. You can run it several times,"
1659 - elog "once for each logging client. The client certificates will be signed"
1660 - elog "using the CA certificate generated during the first run."
1661 - fi
1662 - fi
1663 -
1664 - if [[ ${advertise_readme} -gt 0 ]]; then
1665 - # We need to show the README file location
1666 -
1667 - echo ""
1668 - elog "Please read"
1669 - elog ""
1670 - elog " ${EPREFIX}/usr/share/doc/${PF}/README.gentoo*"
1671 - elog ""
1672 - elog "for more details."
1673 - fi
1674 -}
1675 -
1676 -pkg_config() {
1677 - if ! use ssl ; then
1678 - einfo "There is nothing to configure for rsyslog unless you"
1679 - einfo "used USE=ssl to build it."
1680 - return 0
1681 - fi
1682 -
1683 - # Make sure the certificates directory exists
1684 - local CERTDIR="${EROOT}/etc/ssl/${PN}"
1685 - if [[ ! -d "${CERTDIR}" ]]; then
1686 - mkdir "${CERTDIR}" || die
1687 - fi
1688 - einfo "Your certificates will be stored in ${CERTDIR}"
1689 -
1690 - # Create a default CA if needed
1691 - if [[ ! -f "${CERTDIR}/${PN}_ca.cert.pem" ]]; then
1692 - einfo "No CA key and certificate found in ${CERTDIR}, creating them for you..."
1693 - certtool --generate-privkey \
1694 - --outfile "${CERTDIR}/${PN}_ca.privkey.pem" &>/dev/null
1695 - chmod 400 "${CERTDIR}/${PN}_ca.privkey.pem"
1696 -
1697 - cat > "${T}/${PF}.$$" <<- _EOF
1698 - cn = Portage automated CA
1699 - ca
1700 - cert_signing_key
1701 - expiration_days = 3650
1702 - _EOF
1703 -
1704 - certtool --generate-self-signed \
1705 - --load-privkey "${CERTDIR}/${PN}_ca.privkey.pem" \
1706 - --outfile "${CERTDIR}/${PN}_ca.cert.pem" \
1707 - --template "${T}/${PF}.$$" &>/dev/null
1708 - chmod 400 "${CERTDIR}/${PN}_ca.privkey.pem"
1709 -
1710 - # Create the server certificate
1711 - echo
1712 - einfon "Please type the Common Name of the SERVER you wish to create a certificate for: "
1713 - read -r CN
1714 -
1715 - einfo "Creating private key and certificate for server ${CN}..."
1716 - certtool --generate-privkey \
1717 - --outfile "${CERTDIR}/${PN}_${CN}.key.pem" &>/dev/null
1718 - chmod 400 "${CERTDIR}/${PN}_${CN}.key.pem"
1719 -
1720 - cat > "${T}/${PF}.$$" <<- _EOF
1721 - cn = ${CN}
1722 - tls_www_server
1723 - dns_name = ${CN}
1724 - expiration_days = 3650
1725 - _EOF
1726 -
1727 - certtool --generate-certificate \
1728 - --outfile "${CERTDIR}/${PN}_${CN}.cert.pem" \
1729 - --load-privkey "${CERTDIR}/${PN}_${CN}.key.pem" \
1730 - --load-ca-certificate "${CERTDIR}/${PN}_ca.cert.pem" \
1731 - --load-ca-privkey "${CERTDIR}/${PN}_ca.privkey.pem" \
1732 - --template "${T}/${PF}.$$" &>/dev/null
1733 - chmod 400 "${CERTDIR}/${PN}_${CN}.cert.pem"
1734 -
1735 - else
1736 - einfo "Found existing ${CERTDIR}/${PN}_ca.cert.pem, skipping CA and SERVER creation."
1737 - fi
1738 -
1739 - # Create a client certificate
1740 - echo
1741 - einfon "Please type the Common Name of the CLIENT you wish to create a certificate for: "
1742 - read -r CN
1743 -
1744 - einfo "Creating private key and certificate for client ${CN}..."
1745 - certtool --generate-privkey \
1746 - --outfile "${CERTDIR}/${PN}_${CN}.key.pem" &>/dev/null
1747 - chmod 400 "${CERTDIR}/${PN}_${CN}.key.pem"
1748 -
1749 - cat > "${T}/${PF}.$$" <<- _EOF
1750 - cn = ${CN}
1751 - tls_www_client
1752 - dns_name = ${CN}
1753 - expiration_days = 3650
1754 - _EOF
1755 -
1756 - certtool --generate-certificate \
1757 - --outfile "${CERTDIR}/${PN}_${CN}.cert.pem" \
1758 - --load-privkey "${CERTDIR}/${PN}_${CN}.key.pem" \
1759 - --load-ca-certificate "${CERTDIR}/${PN}_ca.cert.pem" \
1760 - --load-ca-privkey "${CERTDIR}/${PN}_ca.privkey.pem" \
1761 - --template "${T}/${PF}.$$" &>/dev/null
1762 - chmod 400 "${CERTDIR}/${PN}_${CN}.cert.pem"
1763 -
1764 - rm -f "${T}/${PF}.$$"
1765 -
1766 - echo
1767 - einfo "Here is the documentation on how to encrypt your log traffic:"
1768 - einfo " http://www.rsyslog.com/doc/rsyslog_tls.html"
1769 -}
1770
1771 diff --git a/app-admin/rsyslog/rsyslog-8.34.0.ebuild b/app-admin/rsyslog/rsyslog-8.34.0.ebuild
1772 deleted file mode 100644
1773 index e1326796951..00000000000
1774 --- a/app-admin/rsyslog/rsyslog-8.34.0.ebuild
1775 +++ /dev/null
1776 @@ -1,464 +0,0 @@
1777 -# Copyright 1999-2018 Gentoo Foundation
1778 -# Distributed under the terms of the GNU General Public License v2
1779 -
1780 -EAPI="6"
1781 -PYTHON_COMPAT=( python{2_7,3_4,3_5,3_6} )
1782 -
1783 -inherit autotools eutils linux-info python-any-r1 systemd
1784 -
1785 -DESCRIPTION="An enhanced multi-threaded syslogd with database support and more"
1786 -HOMEPAGE="https://www.rsyslog.com/"
1787 -
1788 -BRANCH="8-stable"
1789 -
1790 -if [[ ${PV} == "9999" ]]; then
1791 - EGIT_REPO_URI="https://github.com/rsyslog/${PN}.git"
1792 -
1793 - DOC_REPO_URI="https://github.com/rsyslog/${PN}-doc.git"
1794 -
1795 - inherit git-r3
1796 -else
1797 - MY_PV=${PV%_rc*}
1798 - MY_FILENAME="${PN}-${PV}.tar.gz"
1799 - MY_FILENAME_DOCS="${PN}-docs-${PV}.tar.gz"
1800 - S="${WORKDIR}/${PN}-${MY_PV}"
1801 -
1802 - # Upstream URL schema:
1803 - # RC: https://www.rsyslog.com/files/download/rsyslog/rc/rsyslog-8.18.0.tar.gz
1804 - # https://www.rsyslog.com/files/download/rsyslog/rc2/rsyslog-8.18.0.tar.gz
1805 - # Release: https://www.rsyslog.com/files/download/rsyslog/rsyslog-8.18.0.tar.gz
1806 -
1807 - MY_URL_PREFIX=
1808 - if [[ ${PV} = *_rc* ]]; then
1809 - _tmp_last_index=$(($(get_last_version_component_index ${PV})+1))
1810 - _tmp_suffix=$(get_version_component_range ${_tmp_last_index} ${PV})
1811 - if [[ ${_tmp_suffix} = *rc* ]]; then
1812 - MY_URL_PREFIX="${_tmp_suffix}/"
1813 - fi
1814 -
1815 - # Cleaning up temporary variables
1816 - unset _tmp_last_index
1817 - unset _tmp_suffix
1818 - else
1819 - KEYWORDS="amd64 arm ~arm64 ~hppa x86"
1820 - fi
1821 -
1822 - SRC_URI="
1823 - https://www.rsyslog.com/files/download/${PN}/${MY_URL_PREFIX}${PN}-${MY_PV}.tar.gz -> ${MY_FILENAME}
1824 - doc? ( https://www.rsyslog.com/files/download/${PN}/${MY_URL_PREFIX}${PN}-doc-${MY_PV}.tar.gz -> ${MY_FILENAME_DOCS} )
1825 - "
1826 -
1827 - PATCHES=( "${FILESDIR}"/${BRANCH}/${PN}-8.34.0-fix-issue2612.patch )
1828 -fi
1829 -
1830 -LICENSE="GPL-3 LGPL-3 Apache-2.0"
1831 -SLOT="0"
1832 -IUSE="curl dbi debug doc elasticsearch +gcrypt grok jemalloc kafka kerberos kubernetes libressl mdblookup mongodb mysql"
1833 -IUSE+=" normalize omhttpfs omudpspoof postgres rabbitmq redis relp rfc3195 rfc5424hmac snmp ssl systemd test usertools +uuid zeromq"
1834 -
1835 -RDEPEND="
1836 - >=dev-libs/libfastjson-0.99.8:=
1837 - >=dev-libs/libestr-0.1.9
1838 - >=dev-libs/liblogging-1.0.1:=[stdlog]
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 - grok? ( >=dev-libs/grok-0.9.2 )
1845 - jemalloc? ( >=dev-libs/jemalloc-3.3.1:= )
1846 - kafka? ( >=dev-libs/librdkafka-0.9.0.99:= )
1847 - kerberos? ( virtual/krb5 )
1848 - kubernetes? ( >=net-misc/curl-7.35.0 )
1849 - mdblookup? ( dev-libs/libmaxminddb:= )
1850 - mongodb? ( >=dev-libs/mongo-c-driver-1.1.10:= )
1851 - mysql? ( virtual/libmysqlclient:= )
1852 - normalize? (
1853 - >=dev-libs/libee-0.4.0
1854 - >=dev-libs/liblognorm-2.0.3:=
1855 - )
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.14:= )
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? ( >=net-libs/gnutls-2.12.23:0= )
1869 - systemd? ( >=sys-apps/systemd-234 )
1870 - uuid? ( sys-apps/util-linux:0= )
1871 - zeromq? (
1872 - >=net-libs/czmq-3.0.2
1873 - )"
1874 -DEPEND="${RDEPEND}
1875 - >=sys-devel/autoconf-archive-2015.02.24
1876 - virtual/pkgconfig
1877 - test? (
1878 - jemalloc? ( <sys-libs/libfaketime-0.9.7 )
1879 - !jemalloc? ( sys-libs/libfaketime )
1880 - ${PYTHON_DEPS}
1881 - )"
1882 -
1883 -REQUIRED_USE="kubernetes? ( normalize )"
1884 -
1885 -if [[ ${PV} == "9999" ]]; then
1886 - DEPEND+=" doc? ( >=dev-python/sphinx-1.1.3-r7 )"
1887 - DEPEND+=" >=sys-devel/flex-2.5.39-r1"
1888 - DEPEND+=" >=sys-devel/bison-2.4.3"
1889 - DEPEND+=" >=dev-python/docutils-0.12"
1890 -fi
1891 -
1892 -CONFIG_CHECK="~INOTIFY_USER"
1893 -WARNING_INOTIFY_USER="CONFIG_INOTIFY_USER isn't set. Imfile module on this system will only support polling mode!"
1894 -
1895 -pkg_setup() {
1896 - use test && python-any-r1_pkg_setup
1897 -}
1898 -
1899 -src_unpack() {
1900 - if [[ ${PV} == "9999" ]]; then
1901 - git-r3_fetch
1902 - git-r3_checkout
1903 - else
1904 - unpack ${P}.tar.gz
1905 - fi
1906 -
1907 - if use doc; then
1908 - if [[ ${PV} == "9999" ]]; then
1909 - local _EGIT_BRANCH=
1910 - if [[ -n "${EGIT_BRANCH}" ]]; then
1911 - # Cannot use rsyslog commits/branches for documentation repository
1912 - _EGIT_BRANCH=${EGIT_BRANCH}
1913 - unset EGIT_BRANCH
1914 - fi
1915 -
1916 - git-r3_fetch "${DOC_REPO_URI}"
1917 - git-r3_checkout "${DOC_REPO_URI}" "${S}"/docs
1918 -
1919 - if [[ -n "${_EGIT_BRANCH}" ]]; then
1920 - # Restore previous EGIT_BRANCH information
1921 - EGIT_BRANCH=${_EGIT_BRANCH}
1922 - fi
1923 - else
1924 - cd "${S}" || die "Cannot change dir into '${S}'"
1925 - mkdir docs || die "Failed to create docs directory"
1926 - cd docs || die "Failed to change dir into '${S}/docs'"
1927 - unpack ${MY_FILENAME_DOCS}
1928 - fi
1929 - fi
1930 -}
1931 -
1932 -src_prepare() {
1933 - default
1934 -
1935 - eautoreconf
1936 -}
1937 -
1938 -src_configure() {
1939 - # Maintainer notes:
1940 - # * Guardtime support is missing because libgt isn't yet available
1941 - # in portage.
1942 - # * Hadoop's HDFS file system output module is currently not
1943 - # supported in Gentoo because nobody is able to test it
1944 - # (JAVA dependency).
1945 - # * dev-libs/hiredis doesn't provide pkg-config (see #504614,
1946 - # upstream PR 129 and 136) so we need to export HIREDIS_*
1947 - # variables because rsyslog's build system depends on pkg-config.
1948 -
1949 - if use redis; then
1950 - export HIREDIS_LIBS="-L${EPREFIX}/usr/$(get_libdir) -lhiredis"
1951 - export HIREDIS_CFLAGS="-I${EPREFIX}/usr/include"
1952 - fi
1953 -
1954 - local myeconfargs=(
1955 - --disable-debug-symbols
1956 - --disable-generate-man-pages
1957 - --without-valgrind-testbench
1958 - $(use_enable test testbench)
1959 - $(use_enable curl libcurl)
1960 - # Input Plugins without depedencies
1961 - --enable-imdiag
1962 - --enable-imfile
1963 - --enable-impstats
1964 - --enable-imptcp
1965 - # Message Modificiation Plugins without depedencies
1966 - --enable-mmanon
1967 - --enable-mmaudit
1968 - --enable-mmcount
1969 - --enable-mmfields
1970 - --enable-mmjsonparse
1971 - --enable-mmpstrucdata
1972 - --enable-mmrm1stspace
1973 - --enable-mmsequence
1974 - --enable-mmutf8fix
1975 - # Output Modification Plugins without dependencies
1976 - --enable-mail
1977 - --enable-omprog
1978 - --enable-omruleset
1979 - --enable-omstdout
1980 - --enable-omuxsock
1981 - # Misc
1982 - --enable-pmaixforwardedfrom
1983 - --enable-pmciscoios
1984 - --enable-pmcisconames
1985 - --enable-pmlastmsg
1986 - --enable-pmsnare
1987 - # DB
1988 - $(use_enable dbi libdbi)
1989 - $(use_enable mongodb ommongodb)
1990 - $(use_enable mysql)
1991 - $(use_enable postgres pgsql)
1992 - $(use_enable redis omhiredis)
1993 - # Debug
1994 - $(use_enable debug)
1995 - $(use_enable debug diagtools)
1996 - $(use_enable debug memcheck)
1997 - $(use_enable debug rtinst)
1998 - $(use_enable debug valgrind)
1999 - # Misc
2000 - $(use_enable curl fmhttp)
2001 - $(use_enable elasticsearch)
2002 - $(use_enable gcrypt libgcrypt)
2003 - $(use_enable jemalloc)
2004 - $(use_enable kafka imkafka)
2005 - $(use_enable kafka omkafka)
2006 - $(use_enable kerberos gssapi-krb5)
2007 - $(use_enable kubernetes mmkubernetes)
2008 - $(use_enable normalize mmnormalize)
2009 - $(use_enable mdblookup mmdblookup)
2010 - $(use_enable grok mmgrok)
2011 - $(use_enable omhttpfs)
2012 - $(use_enable omudpspoof)
2013 - $(use_enable rabbitmq omrabbitmq)
2014 - $(use_enable relp)
2015 - $(use_enable rfc3195)
2016 - $(use_enable rfc5424hmac mmrfc5424addhmac)
2017 - $(use_enable snmp)
2018 - $(use_enable snmp mmsnmptrapd)
2019 - $(use_enable ssl gnutls)
2020 - $(use_enable systemd imjournal)
2021 - $(use_enable systemd omjournal)
2022 - $(use_enable usertools)
2023 - $(use_enable uuid)
2024 - $(use_enable zeromq imczmq)
2025 - $(use_enable zeromq omczmq)
2026 - --with-systemdsystemunitdir="$(systemd_get_systemunitdir)"
2027 - )
2028 -
2029 - econf "${myeconfargs[@]}"
2030 -}
2031 -
2032 -src_compile() {
2033 - default
2034 -
2035 - if use doc && [[ "${PV}" == "9999" ]]; then
2036 - einfo "Building documentation ..."
2037 - local doc_dir="${S}/docs"
2038 - cd "${doc_dir}" || die "Cannot chdir into \"${doc_dir}\"!"
2039 - sphinx-build -b html source build || die "Building documentation failed!"
2040 - fi
2041 -}
2042 -
2043 -src_test() {
2044 - local _has_increased_ulimit=
2045 -
2046 - # Sometimes tests aren't executable (i.e. when added via patch)
2047 - einfo "Adjusting permissions of test scripts ..."
2048 - find "${S}"/tests -type f -name '*.sh' \! -perm -111 -exec chmod a+x '{}' \; || \
2049 - die "Failed to adjust test scripts permission"
2050 -
2051 - if ulimit -n 3072; then
2052 - _has_increased_ulimit="true"
2053 - fi
2054 -
2055 - if ! emake --jobs 1 check; then
2056 - eerror "Test suite failed! :("
2057 -
2058 - if [[ -z "${_has_increased_ulimit}" ]]; then
2059 - eerror "Probably because open file limit couldn't be set to 3072."
2060 - fi
2061 -
2062 - if has userpriv ${FEATURES}; then
2063 - eerror "Please try to reproduce the test suite failure with FEATURES=-userpriv " \
2064 - "before you submit a bug report."
2065 - fi
2066 -
2067 - fi
2068 -}
2069 -
2070 -src_install() {
2071 - local DOCS=(
2072 - AUTHORS
2073 - ChangeLog
2074 - "${FILESDIR}"/${BRANCH}/README.gentoo
2075 - )
2076 -
2077 - use doc && local HTML_DOCS=( "${S}/docs/build/." )
2078 -
2079 - default
2080 -
2081 - newconfd "${FILESDIR}/${BRANCH}/${PN}.confd-r1" ${PN}
2082 - newinitd "${FILESDIR}/${BRANCH}/${PN}.initd-r1" ${PN}
2083 -
2084 - keepdir /var/empty/dev
2085 - keepdir /var/spool/${PN}
2086 - keepdir /etc/ssl/${PN}
2087 - keepdir /etc/${PN}.d
2088 -
2089 - insinto /etc
2090 - newins "${FILESDIR}/${BRANCH}/${PN}.conf" ${PN}.conf
2091 -
2092 - insinto /etc/rsyslog.d/
2093 - newins "${FILESDIR}/${BRANCH}/50-default-r1.conf" 50-default.conf
2094 -
2095 - insinto /etc/logrotate.d/
2096 - newins "${FILESDIR}/${BRANCH}/${PN}.logrotate" ${PN}
2097 -
2098 - if use mysql; then
2099 - insinto /usr/share/doc/${PF}/scripts/mysql
2100 - doins plugins/ommysql/createDB.sql
2101 - fi
2102 -
2103 - if use postgres; then
2104 - insinto /usr/share/doc/${PF}/scripts/pgsql
2105 - doins plugins/ompgsql/createDB.sql
2106 - fi
2107 -
2108 - prune_libtool_files --modules
2109 -}
2110 -
2111 -pkg_postinst() {
2112 - local advertise_readme=0
2113 -
2114 - if [[ -z "${REPLACING_VERSIONS}" ]]; then
2115 - # This is a new installation
2116 -
2117 - advertise_readme=1
2118 -
2119 - if use mysql || use postgres; then
2120 - echo
2121 - elog "Sample SQL scripts for MySQL & PostgreSQL have been installed to:"
2122 - elog " /usr/share/doc/${PF}/scripts"
2123 - fi
2124 -
2125 - if use ssl; then
2126 - echo
2127 - elog "To create a default CA and certificates for your server and clients, run:"
2128 - elog " emerge --config =${PF}"
2129 - elog "on your logging server. You can run it several times,"
2130 - elog "once for each logging client. The client certificates will be signed"
2131 - elog "using the CA certificate generated during the first run."
2132 - fi
2133 - fi
2134 -
2135 - if [[ ${advertise_readme} -gt 0 ]]; then
2136 - # We need to show the README file location
2137 -
2138 - echo ""
2139 - elog "Please read"
2140 - elog ""
2141 - elog " ${EPREFIX}/usr/share/doc/${PF}/README.gentoo*"
2142 - elog ""
2143 - elog "for more details."
2144 - fi
2145 -}
2146 -
2147 -pkg_config() {
2148 - if ! use ssl ; then
2149 - einfo "There is nothing to configure for rsyslog unless you"
2150 - einfo "used USE=ssl to build it."
2151 - return 0
2152 - fi
2153 -
2154 - # Make sure the certificates directory exists
2155 - local CERTDIR="${EROOT}/etc/ssl/${PN}"
2156 - if [[ ! -d "${CERTDIR}" ]]; then
2157 - mkdir "${CERTDIR}" || die
2158 - fi
2159 - einfo "Your certificates will be stored in ${CERTDIR}"
2160 -
2161 - # Create a default CA if needed
2162 - if [[ ! -f "${CERTDIR}/${PN}_ca.cert.pem" ]]; then
2163 - einfo "No CA key and certificate found in ${CERTDIR}, creating them for you..."
2164 - certtool --generate-privkey \
2165 - --outfile "${CERTDIR}/${PN}_ca.privkey.pem" &>/dev/null
2166 - chmod 400 "${CERTDIR}/${PN}_ca.privkey.pem"
2167 -
2168 - cat > "${T}/${PF}.$$" <<- _EOF
2169 - cn = Portage automated CA
2170 - ca
2171 - cert_signing_key
2172 - expiration_days = 3650
2173 - _EOF
2174 -
2175 - certtool --generate-self-signed \
2176 - --load-privkey "${CERTDIR}/${PN}_ca.privkey.pem" \
2177 - --outfile "${CERTDIR}/${PN}_ca.cert.pem" \
2178 - --template "${T}/${PF}.$$" &>/dev/null
2179 - chmod 400 "${CERTDIR}/${PN}_ca.privkey.pem"
2180 -
2181 - # Create the server certificate
2182 - echo
2183 - einfon "Please type the Common Name of the SERVER you wish to create a certificate for: "
2184 - read -r CN
2185 -
2186 - einfo "Creating private key and certificate for server ${CN}..."
2187 - certtool --generate-privkey \
2188 - --outfile "${CERTDIR}/${PN}_${CN}.key.pem" &>/dev/null
2189 - chmod 400 "${CERTDIR}/${PN}_${CN}.key.pem"
2190 -
2191 - cat > "${T}/${PF}.$$" <<- _EOF
2192 - cn = ${CN}
2193 - tls_www_server
2194 - dns_name = ${CN}
2195 - expiration_days = 3650
2196 - _EOF
2197 -
2198 - certtool --generate-certificate \
2199 - --outfile "${CERTDIR}/${PN}_${CN}.cert.pem" \
2200 - --load-privkey "${CERTDIR}/${PN}_${CN}.key.pem" \
2201 - --load-ca-certificate "${CERTDIR}/${PN}_ca.cert.pem" \
2202 - --load-ca-privkey "${CERTDIR}/${PN}_ca.privkey.pem" \
2203 - --template "${T}/${PF}.$$" &>/dev/null
2204 - chmod 400 "${CERTDIR}/${PN}_${CN}.cert.pem"
2205 -
2206 - else
2207 - einfo "Found existing ${CERTDIR}/${PN}_ca.cert.pem, skipping CA and SERVER creation."
2208 - fi
2209 -
2210 - # Create a client certificate
2211 - echo
2212 - einfon "Please type the Common Name of the CLIENT you wish to create a certificate for: "
2213 - read -r CN
2214 -
2215 - einfo "Creating private key and certificate for client ${CN}..."
2216 - certtool --generate-privkey \
2217 - --outfile "${CERTDIR}/${PN}_${CN}.key.pem" &>/dev/null
2218 - chmod 400 "${CERTDIR}/${PN}_${CN}.key.pem"
2219 -
2220 - cat > "${T}/${PF}.$$" <<- _EOF
2221 - cn = ${CN}
2222 - tls_www_client
2223 - dns_name = ${CN}
2224 - expiration_days = 3650
2225 - _EOF
2226 -
2227 - certtool --generate-certificate \
2228 - --outfile "${CERTDIR}/${PN}_${CN}.cert.pem" \
2229 - --load-privkey "${CERTDIR}/${PN}_${CN}.key.pem" \
2230 - --load-ca-certificate "${CERTDIR}/${PN}_ca.cert.pem" \
2231 - --load-ca-privkey "${CERTDIR}/${PN}_ca.privkey.pem" \
2232 - --template "${T}/${PF}.$$" &>/dev/null
2233 - chmod 400 "${CERTDIR}/${PN}_${CN}.cert.pem"
2234 -
2235 - rm -f "${T}/${PF}.$$"
2236 -
2237 - echo
2238 - einfo "Here is the documentation on how to encrypt your log traffic:"
2239 - einfo " https://www.rsyslog.com/doc/rsyslog_tls.html"
2240 -}