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/, app-admin/rsyslog/
Date: Tue, 11 Dec 2018 16:42:30
Message-Id: 1544545940.599c2cadead2280e522fa8dace3f7446f364e0bc.whissi@gentoo
1 commit: 599c2cadead2280e522fa8dace3f7446f364e0bc
2 Author: Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
3 AuthorDate: Tue Dec 11 16:20:58 2018 +0000
4 Commit: Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
5 CommitDate: Tue Dec 11 16:32:20 2018 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=599c2cad
7
8 app-admin/rsyslog: drop old
9
10 Package-Manager: Portage-2.3.52, Repoman-2.3.12
11 Signed-off-by: Thomas Deutschmann <whissi <AT> gentoo.org>
12
13 app-admin/rsyslog/Manifest | 2 -
14 .../files/rsyslog-8.35.0-fix-issue2719.patch | 241 -----------
15 .../files/rsyslog-8.35.0-fix-issue2726.patch | 41 --
16 app-admin/rsyslog/rsyslog-8.35.0-r1.ebuild | 440 ---------------------
17 4 files changed, 724 deletions(-)
18
19 diff --git a/app-admin/rsyslog/Manifest b/app-admin/rsyslog/Manifest
20 index e61c657990d..ee6db5b2743 100644
21 --- a/app-admin/rsyslog/Manifest
22 +++ b/app-admin/rsyslog/Manifest
23 @@ -1,8 +1,6 @@
24 -DIST rsyslog-8.35.0.tar.gz 2590108 BLAKE2B e201c1366b8ab96c070829d51de079212e82216a793eb7622aa91c66e2330981de8be547b1ee7f102ed7d8c8de054d58ba151e95238146a61fba8fe908c5f929 SHA512 3b8845fc057147c2dd740b3bb432e7fb101ad60be5c6bc86a2c2796bcd3f3526c617d45b9e8301388d51047a125ca18ba4ac54f8be2a13eabbbe8fb9361beecc
25 DIST rsyslog-8.38.0.tar.gz 2721798 BLAKE2B 578bc9eefce4893a9c1eb54ee7360cd9fa51b3c87ffe07a0fd5b122987f991835f603417243084de0b59286e993ad1c84237e61c44bc18457b3660668421101b SHA512 9dc3bdc4ef01c2af433478e182704694cb50849d811d476a03e4ce03b3c5aecfb506e7f1c1e51fadcd63da60b067d8011b92b8c9354a688fe66f7b6ffd8f9254
26 DIST rsyslog-8.39.0.tar.gz 2721560 BLAKE2B 0680cb31d0a07e5676a5c5626e46fa174b8df08ceec49b514624ff8ffeb750bbf199f73af1d89b9dfad121a292084d75b0a1218fb33138f1d7a149fd730cb3d9 SHA512 f46ead433f703df4af6ddc4bbb178ea145d7d2a35ee7749c32b9889f299ba20c83ed76c246530608198e84fef1f2bf10097344c31d5df38b9e0ae47cf4bee479
27 DIST rsyslog-8.40.0.tar.gz 2726022 BLAKE2B 33f7f2018200a20b01dbfabeeab592aa09d530edd313bb13f16c47cf3f67aebd9c465af3f1e468ca3d352cd83e4f4eee567c6fd54bbaee1723bee56f4631b440 SHA512 3d5d4f92e37ad9bf3767d5d7fc87fcb7956656f676a9495c78abd12fe9072ec8763b50543b198308a71d5d919721fb9b84b6725dd83a9d9b8a1639d81382c0dd
28 -DIST rsyslog-doc-8.35.0.tar.gz 7427270 BLAKE2B 5441080c07a8398cd5d513ba6abe0335f62762f105354105549f0440c0429c62a4f28a4cc84a71d049bc8134cd64bda2c2210a2f30fd5b94f53e0bc783e7c8d1 SHA512 f78d0451eef789d60f7c5ae1eed46c4a9f7a6ade73b829f65aa2373aa786b00e84e8957089532b1b652838bd9f62b41d92530276a0d27e21b8e94d5f0e4728a6
29 DIST rsyslog-doc-8.38.0.tar.gz 7662314 BLAKE2B 57a121950a3f6630e4736a1ff998e93b543389107d146ddb148ecd2702bb208d21a7f4d77f2fd958f2a56e092341fc6a24ed1cc80a910cb1adb54c65b5b2da04 SHA512 e28a09ae2fcddc711d2cfd31207c9862192598e49964a47b41fc8fa3ae5b1e08b7e2589fb5af859d58d4bf028574eb56cac6514401aa56cb482fa1166863e6a5
30 DIST rsyslog-doc-8.39.0.tar.gz 7674833 BLAKE2B 1526e0637c3ab9846f447dcea48efbfd17aa517c2fc875c46ac190428db6aa2a0f81f8aaed6e5b0b6991a5c13f45bc818be76c0fe4444c0eb45628ebf48b4956 SHA512 a6d09d384616a264fdf6e09fa0f61bd82a42340bac426d93119e11158f293dd58f894623aca30f2137e51bf701531f07938d014c9b8ec97d0a796447de3089de
31 DIST rsyslog-doc-8.40.0.tar.gz 7709769 BLAKE2B cda3bbd005120e7100bb36cf4c0f99d3a037525c5451ead5957f4dfe06eaceeba8fb2e266f53203bee6fae97898774ee17862a52ca1dae99aeb3534bbfadcd60 SHA512 2e2f37336948984a8cf0e098eb46e61fe4de6366d63a98204ecd558f4e21b7c1f222659f7bdecdd22e0a61d34c442b4734dbe72a72e8716c768a900b954d473f
32
33 diff --git a/app-admin/rsyslog/files/rsyslog-8.35.0-fix-issue2719.patch b/app-admin/rsyslog/files/rsyslog-8.35.0-fix-issue2719.patch
34 deleted file mode 100644
35 index 8996acd27e8..00000000000
36 --- a/app-admin/rsyslog/files/rsyslog-8.35.0-fix-issue2719.patch
37 +++ /dev/null
38 @@ -1,241 +0,0 @@
39 -Add missing files for mmkubernetes tests
40 -
41 -Upstream bug: https://github.com/rsyslog/rsyslog/pull/2719
42 -
43 ---- /dev/null
44 -+++ b/tests/mmkubernetes-basic.out.json
45 -@@ -0,0 +1,110 @@
46 -+[{
47 -+ "kubernetes": {
48 -+ "namespace_id": "namespace-name2-id",
49 -+ "namespace_labels": {
50 -+ "label_1_key": "label 1 value",
51 -+ "label_with_empty_value": "",
52 -+ "label_2_key": "label 2 value"
53 -+ },
54 -+ "creation_timestamp": "2018-04-09T21:56:39Z",
55 -+ "pod_id": "pod-name2-id",
56 -+ "labels": {
57 -+ "custom_label": "pod-name2-label-value",
58 -+ "deploymentconfig": "pod-name2-dc",
59 -+ "component": "pod-name2-component",
60 -+ "label_with_empty_value": "",
61 -+ "deployment": "pod-name2-deployment"
62 -+ },
63 -+ "pod_name": "pod-name2",
64 -+ "namespace_name": "namespace-name2",
65 -+ "container_name": "container-name2",
66 -+ "master_url": "http://localhost:18443"
67 -+ },
68 -+ "docker": {
69 -+ "container_id": "id2"
70 -+ }
71 -+},
72 -+{
73 -+ "message": "a message from container 4",
74 -+ "CONTAINER_NAME": "some-prefix_container-name4_pod-name4_namespace-name4_unused4_unused44",
75 -+ "CONTAINER_ID_FULL": "id4",
76 -+ "kubernetes": {
77 -+ "namespace_id": "namespace-name4-id",
78 -+ "namespace_labels": {
79 -+ "label_1_key": "label 1 value",
80 -+ "label_with_empty_value": "",
81 -+ "label_2_key": "label 2 value"
82 -+ },
83 -+ "creation_timestamp": "2018-04-09T21:56:39Z",
84 -+ "pod_id": "pod-name4-id",
85 -+ "labels": {
86 -+ "custom_label": "pod-name4-label-value",
87 -+ "deploymentconfig": "pod-name4-dc",
88 -+ "component": "pod-name4-component",
89 -+ "label_with_empty_value": "",
90 -+ "deployment": "pod-name4-deployment"
91 -+ },
92 -+ "pod_name": "pod-name4",
93 -+ "namespace_name": "namespace-name4",
94 -+ "container_name": "container-name4",
95 -+ "master_url": "http://localhost:18443"
96 -+ },
97 -+ "docker": {
98 -+ "container_id": "id4"
99 -+ }
100 -+},
101 -+{
102 -+ "kubernetes": {
103 -+ "namespace_id": "namespace-name1-id",
104 -+ "namespace_labels": {
105 -+ "label_1_key": "label 1 value",
106 -+ "label_with_empty_value": "",
107 -+ "label_2_key": "label 2 value"
108 -+ },
109 -+ "creation_timestamp": "2018-04-09T21:56:39Z",
110 -+ "pod_id": "pod-name1-id",
111 -+ "labels": {
112 -+ "custom_label": "pod-name1-label-value",
113 -+ "deploymentconfig": "pod-name1-dc",
114 -+ "component": "pod-name1-component",
115 -+ "label_with_empty_value": "",
116 -+ "deployment": "pod-name1-deployment"
117 -+ },
118 -+ "pod_name": "pod-name1",
119 -+ "namespace_name": "namespace-name1",
120 -+ "container_name": "container-name1",
121 -+ "master_url": "http://localhost:18443"
122 -+ },
123 -+ "docker": {
124 -+ "container_id": "id1"
125 -+ }
126 -+},
127 -+{
128 -+ "message": "a message from container 3",
129 -+ "CONTAINER_NAME": "some-prefix_container-name3.container-hash3_pod-name3_namespace-name3_unused3_unused33",
130 -+ "CONTAINER_ID_FULL": "id3",
131 -+ "kubernetes": {
132 -+ "namespace_id": "namespace-name3-id",
133 -+ "namespace_labels": {
134 -+ "label_1_key": "label 1 value",
135 -+ "label_with_empty_value": "",
136 -+ "label_2_key": "label 2 value"
137 -+ },
138 -+ "creation_timestamp": "2018-04-09T21:56:39Z",
139 -+ "pod_id": "pod-name3-id",
140 -+ "labels": {
141 -+ "custom_label": "pod-name3-label-value",
142 -+ "deploymentconfig": "pod-name3-dc",
143 -+ "component": "pod-name3-component",
144 -+ "label_with_empty_value": "",
145 -+ "deployment": "pod-name3-deployment"
146 -+ },
147 -+ "pod_name": "pod-name3",
148 -+ "namespace_name": "namespace-name3",
149 -+ "container_name": "container-name3",
150 -+ "master_url": "http://localhost:18443"
151 -+ },
152 -+ "docker": {
153 -+ "container_id": "id3"
154 -+ }
155 -+}]
156 ---- /dev/null
157 -+++ b/tests/mmkubernetes_test_server.py
158 -@@ -0,0 +1,121 @@
159 -+# Used by the mmkubernetes tests
160 -+# This is a simple http server which responds to kubernetes api requests
161 -+# and responds with kubernetes api server responses
162 -+# added 2018-04-06 by richm, released under ASL 2.0
163 -+import os
164 -+import json
165 -+import sys
166 -+
167 -+try:
168 -+ from http.server import HTTPServer, BaseHTTPRequestHandler
169 -+except ImportError:
170 -+ from BaseHTTPServer import HTTPServer, BaseHTTPRequestHandler
171 -+
172 -+ns_template = '''{{
173 -+ "kind": "Namespace",
174 -+ "apiVersion": "v1",
175 -+ "metadata": {{
176 -+ "name": "{namespace_name}",
177 -+ "selfLink": "/api/v1/namespaces/{namespace_name}",
178 -+ "uid": "{namespace_name}-id",
179 -+ "resourceVersion": "2988",
180 -+ "creationTimestamp": "2018-04-09T21:56:39Z",
181 -+ "labels": {{
182 -+ "label.1.key":"label 1 value",
183 -+ "label.2.key":"label 2 value",
184 -+ "label.with.empty.value":""
185 -+ }},
186 -+ "annotations": {{
187 -+ "k8s.io/description": "",
188 -+ "k8s.io/display-name": "",
189 -+ "k8s.io/node-selector": "",
190 -+ "k8s.io/sa.scc.mcs": "s0:c9,c4",
191 -+ "k8s.io/sa.scc.supplemental-groups": "1000080000/10000",
192 -+ "k8s.io/sa.scc.uid-range": "1000080000/10000",
193 -+ "quota.k8s.io/cluster-resource-override-enabled": "false"
194 -+ }}
195 -+ }},
196 -+ "spec": {{
197 -+ "finalizers": [
198 -+ "openshift.io/origin",
199 -+ "kubernetes"
200 -+ ]
201 -+ }},
202 -+ "status": {{
203 -+ "phase": "Active"
204 -+ }}
205 -+}}'''
206 -+
207 -+pod_template = '''{{
208 -+ "kind": "Pod",
209 -+ "apiVersion": "v1",
210 -+ "metadata": {{
211 -+ "name": "{pod_name}",
212 -+ "generateName": "{pod_name}-prefix",
213 -+ "namespace": "{namespace_name}",
214 -+ "selfLink": "/api/v1/namespaces/{namespace_name}/pods/{pod_name}",
215 -+ "uid": "{pod_name}-id",
216 -+ "resourceVersion": "3486",
217 -+ "creationTimestamp": "2018-04-09T21:56:39Z",
218 -+ "labels": {{
219 -+ "component": "{pod_name}-component",
220 -+ "deployment": "{pod_name}-deployment",
221 -+ "deploymentconfig": "{pod_name}-dc",
222 -+ "custom.label": "{pod_name}-label-value",
223 -+ "label.with.empty.value":""
224 -+ }},
225 -+ "annotations": {{
226 -+ "k8s.io/deployment-config.latest-version": "1",
227 -+ "k8s.io/deployment-config.name": "{pod_name}-dc",
228 -+ "k8s.io/deployment.name": "{pod_name}-deployment",
229 -+ "k8s.io/custom.name": "custom value",
230 -+ "annotation.with.empty.value":""
231 -+ }}
232 -+ }},
233 -+ "status": {{
234 -+ "phase": "Running",
235 -+ "hostIP": "172.18.4.32",
236 -+ "podIP": "10.128.0.14",
237 -+ "startTime": "2018-04-09T21:57:39Z"
238 -+ }}
239 -+}}'''
240 -+
241 -+class SimpleHTTPRequestHandler(BaseHTTPRequestHandler):
242 -+
243 -+ def do_GET(self):
244 -+ # "http://localhost:18443/api/v1/namespaces/namespace-name2"
245 -+ # parse url - either /api/v1/namespaces/$ns_name
246 -+ # or
247 -+ # /api/v1/namespaces/$ns_name/pods/$pod_name
248 -+ comps = self.path.split('/')
249 -+ status = 400
250 -+ if len(comps) >= 5 and comps[1] == 'api' and comps[2] == 'v1':
251 -+ if len(comps) == 5 and comps[3] == 'namespaces': # namespace
252 -+ resp = ns_template.format(namespace_name=comps[4])
253 -+ status = 200
254 -+ elif len(comps) == 7 and comps[3] == 'namespaces' and comps[5] == 'pods':
255 -+ resp = pod_template.format(namespace_name=comps[4], pod_name=comps[6])
256 -+ status = 200
257 -+ else:
258 -+ resp = '{{"error":"do not recognize {0}"}}'.format(self.path)
259 -+ else:
260 -+ resp = '{{"error":"do not recognize {0}"}}'.format(self.path)
261 -+ if not status == 200:
262 -+ self.log_error(resp)
263 -+ self.send_response(status)
264 -+ self.end_headers()
265 -+ self.wfile.write(json.dumps(json.loads(resp), separators=(',',':')))
266 -+
267 -+port = int(sys.argv[1])
268 -+
269 -+httpd = HTTPServer(('localhost', port), SimpleHTTPRequestHandler)
270 -+
271 -+# write "started" to file named in argv[3]
272 -+with open(sys.argv[3], "w") as ff:
273 -+ ff.write("started\n")
274 -+
275 -+# write pid to file named in argv[2]
276 -+with open(sys.argv[2], "w") as ff:
277 -+ ff.write('{0}\n'.format(os.getpid()))
278 -+
279 -+httpd.serve_forever()
280
281 diff --git a/app-admin/rsyslog/files/rsyslog-8.35.0-fix-issue2726.patch b/app-admin/rsyslog/files/rsyslog-8.35.0-fix-issue2726.patch
282 deleted file mode 100644
283 index eaec239c383..00000000000
284 --- a/app-admin/rsyslog/files/rsyslog-8.35.0-fix-issue2726.patch
285 +++ /dev/null
286 @@ -1,41 +0,0 @@
287 -From c1791ee90fdd8adf219ae3d2b849f5f041284b7c Mon Sep 17 00:00:00 2001
288 -From: Rich Megginson <rmeggins@××××××.com>
289 -Date: Thu, 17 May 2018 18:38:25 -0600
290 -Subject: [PATCH] mmkubernetes test python must encode response
291 -
292 -https://github.com/rsyslog/rsyslog/issues/2721
293 -Was not working on python3 - must use `encode()` to convert the
294 -string to a `bytes` object.
295 -Also run the server with python -u to make sure we get the log
296 -output from the kubernetes test server.
297 ----
298 - tests/mmkubernetes-basic.sh | 2 +-
299 - tests/mmkubernetes_test_server.py | 2 +-
300 - 2 files changed, 2 insertions(+), 2 deletions(-)
301 -
302 -diff --git a/tests/mmkubernetes-basic.sh b/tests/mmkubernetes-basic.sh
303 -index 0bbfd08ca..d320c343f 100755
304 ---- a/tests/mmkubernetes-basic.sh
305 -+++ b/tests/mmkubernetes-basic.sh
306 -@@ -4,7 +4,7 @@
307 - . $srcdir/diag.sh init
308 -
309 - testsrv=mmk8s-test-server
310 --python ./mmkubernetes_test_server.py 18443 rsyslog${testsrv}.pid rsyslogd${testsrv}.started > mmk8s_srv.log 2>&1 &
311 -+python -u ./mmkubernetes_test_server.py 18443 rsyslog${testsrv}.pid rsyslogd${testsrv}.started > mmk8s_srv.log 2>&1 &
312 - BGPROCESS=$!
313 - . $srcdir/diag.sh wait-startup $testsrv
314 - echo background mmkubernetes_test_server.py process id is $BGPROCESS
315 -diff --git a/tests/mmkubernetes_test_server.py b/tests/mmkubernetes_test_server.py
316 -index 0de215603..24f4e1b0e 100644
317 ---- a/tests/mmkubernetes_test_server.py
318 -+++ b/tests/mmkubernetes_test_server.py
319 -@@ -104,7 +104,7 @@ def do_GET(self):
320 - self.log_error(resp)
321 - self.send_response(status)
322 - self.end_headers()
323 -- self.wfile.write(json.dumps(json.loads(resp), separators=(',',':')))
324 -+ self.wfile.write(json.dumps(json.loads(resp), separators=(',',':')).encode())
325 -
326 - port = int(sys.argv[1])
327 -
328
329 diff --git a/app-admin/rsyslog/rsyslog-8.35.0-r1.ebuild b/app-admin/rsyslog/rsyslog-8.35.0-r1.ebuild
330 deleted file mode 100644
331 index 71ff1a67191..00000000000
332 --- a/app-admin/rsyslog/rsyslog-8.35.0-r1.ebuild
333 +++ /dev/null
334 @@ -1,440 +0,0 @@
335 -# Copyright 1999-2018 Gentoo Authors
336 -# Distributed under the terms of the GNU General Public License v2
337 -
338 -EAPI="6"
339 -PYTHON_COMPAT=( python{2_7,3_4,3_5,3_6,3_7} )
340 -
341 -inherit autotools eutils linux-info python-any-r1 systemd
342 -
343 -DESCRIPTION="An enhanced multi-threaded syslogd with database support and more"
344 -HOMEPAGE="https://www.rsyslog.com/"
345 -
346 -if [[ ${PV} == "9999" ]]; then
347 - EGIT_REPO_URI="https://github.com/rsyslog/${PN}.git"
348 -
349 - DOC_REPO_URI="https://github.com/rsyslog/${PN}-doc.git"
350 -
351 - inherit git-r3
352 -else
353 - KEYWORDS="amd64 arm ~arm64 hppa x86"
354 -
355 - SRC_URI="
356 - https://www.rsyslog.com/files/download/${PN}/${P}.tar.gz
357 - doc? ( https://www.rsyslog.com/files/download/${PN}/${PN}-doc-${PV}.tar.gz )
358 - "
359 -
360 - PATCHES=(
361 - "${FILESDIR}"/${PN}-8.35.0-fix-issue2719.patch
362 - "${FILESDIR}"/${PN}-8.35.0-fix-issue2726.patch
363 - )
364 -fi
365 -
366 -LICENSE="GPL-3 LGPL-3 Apache-2.0"
367 -SLOT="0"
368 -IUSE="curl dbi debug doc elasticsearch +gcrypt grok jemalloc kafka kerberos kubernetes libressl mdblookup mongodb mysql"
369 -IUSE+=" normalize omhttpfs omudpspoof postgres rabbitmq redis relp rfc3195 rfc5424hmac snmp ssl systemd test usertools +uuid zeromq"
370 -
371 -RDEPEND="
372 - >=dev-libs/libfastjson-0.99.8:=
373 - >=dev-libs/libestr-0.1.9
374 - >=dev-libs/liblogging-1.0.1:=[stdlog]
375 - >=sys-libs/zlib-1.2.5
376 - curl? ( >=net-misc/curl-7.35.0 )
377 - dbi? ( >=dev-db/libdbi-0.8.3 )
378 - elasticsearch? ( >=net-misc/curl-7.35.0 )
379 - gcrypt? ( >=dev-libs/libgcrypt-1.5.3:= )
380 - grok? ( >=dev-libs/grok-0.9.2 )
381 - jemalloc? ( >=dev-libs/jemalloc-3.3.1:= )
382 - kafka? ( >=dev-libs/librdkafka-0.9.0.99:= )
383 - kerberos? ( virtual/krb5 )
384 - kubernetes? ( >=net-misc/curl-7.35.0 )
385 - mdblookup? ( dev-libs/libmaxminddb:= )
386 - mongodb? ( >=dev-libs/mongo-c-driver-1.1.10:= )
387 - mysql? ( virtual/libmysqlclient:= )
388 - normalize? (
389 - >=dev-libs/libee-0.4.0
390 - >=dev-libs/liblognorm-2.0.3:=
391 - )
392 - omhttpfs? ( >=net-misc/curl-7.35.0 )
393 - omudpspoof? ( >=net-libs/libnet-1.1.6 )
394 - postgres? ( >=dev-db/postgresql-8.4.20:= )
395 - rabbitmq? ( >=net-libs/rabbitmq-c-0.3.0:= )
396 - redis? ( >=dev-libs/hiredis-0.11.0:= )
397 - relp? ( >=dev-libs/librelp-1.2.14:= )
398 - rfc3195? ( >=dev-libs/liblogging-1.0.1:=[rfc3195] )
399 - rfc5424hmac? (
400 - !libressl? ( >=dev-libs/openssl-0.9.8y:0= )
401 - libressl? ( dev-libs/libressl:= )
402 - )
403 - snmp? ( >=net-analyzer/net-snmp-5.7.2 )
404 - ssl? ( >=net-libs/gnutls-2.12.23:0= )
405 - systemd? ( >=sys-apps/systemd-234 )
406 - uuid? ( sys-apps/util-linux:0= )
407 - zeromq? (
408 - >=net-libs/czmq-3.0.2
409 - )"
410 -DEPEND="${RDEPEND}
411 - >=sys-devel/autoconf-archive-2015.02.24
412 - virtual/pkgconfig
413 - test? (
414 - jemalloc? ( <sys-libs/libfaketime-0.9.7 )
415 - !jemalloc? ( sys-libs/libfaketime )
416 - ${PYTHON_DEPS}
417 - )"
418 -
419 -REQUIRED_USE="kubernetes? ( normalize )"
420 -
421 -if [[ ${PV} == "9999" ]]; then
422 - DEPEND+=" doc? ( >=dev-python/sphinx-1.1.3-r7 )"
423 - DEPEND+=" >=sys-devel/flex-2.5.39-r1"
424 - DEPEND+=" >=sys-devel/bison-2.4.3"
425 - DEPEND+=" >=dev-python/docutils-0.12"
426 -fi
427 -
428 -CONFIG_CHECK="~INOTIFY_USER"
429 -WARNING_INOTIFY_USER="CONFIG_INOTIFY_USER isn't set. Imfile module on this system will only support polling mode!"
430 -
431 -pkg_setup() {
432 - use test && python-any-r1_pkg_setup
433 -}
434 -
435 -src_unpack() {
436 - if [[ ${PV} == "9999" ]]; then
437 - git-r3_fetch
438 - git-r3_checkout
439 - else
440 - unpack ${P}.tar.gz
441 - fi
442 -
443 - if use doc; then
444 - if [[ ${PV} == "9999" ]]; then
445 - local _EGIT_BRANCH=
446 - if [[ -n "${EGIT_BRANCH}" ]]; then
447 - # Cannot use rsyslog commits/branches for documentation repository
448 - _EGIT_BRANCH=${EGIT_BRANCH}
449 - unset EGIT_BRANCH
450 - fi
451 -
452 - git-r3_fetch "${DOC_REPO_URI}"
453 - git-r3_checkout "${DOC_REPO_URI}" "${S}"/docs
454 -
455 - if [[ -n "${_EGIT_BRANCH}" ]]; then
456 - # Restore previous EGIT_BRANCH information
457 - EGIT_BRANCH=${_EGIT_BRANCH}
458 - fi
459 - else
460 - cd "${S}" || die "Cannot change dir into '${S}'"
461 - mkdir docs || die "Failed to create docs directory"
462 - cd docs || die "Failed to change dir into '${S}/docs'"
463 - unpack ${PN}-doc-${PV}.tar.gz
464 - fi
465 - fi
466 -}
467 -
468 -src_prepare() {
469 - default
470 -
471 - eautoreconf
472 -}
473 -
474 -src_configure() {
475 - # Maintainer notes:
476 - # * Guardtime support is missing because libgt isn't yet available
477 - # in portage.
478 - # * Hadoop's HDFS file system output module is currently not
479 - # supported in Gentoo because nobody is able to test it
480 - # (JAVA dependency).
481 - # * dev-libs/hiredis doesn't provide pkg-config (see #504614,
482 - # upstream PR 129 and 136) so we need to export HIREDIS_*
483 - # variables because rsyslog's build system depends on pkg-config.
484 -
485 - if use redis; then
486 - export HIREDIS_LIBS="-L${EPREFIX}/usr/$(get_libdir) -lhiredis"
487 - export HIREDIS_CFLAGS="-I${EPREFIX}/usr/include"
488 - fi
489 -
490 - local myeconfargs=(
491 - --disable-debug-symbols
492 - --disable-generate-man-pages
493 - --without-valgrind-testbench
494 - $(use_enable test testbench)
495 - # Input Plugins without depedencies
496 - --enable-imdiag
497 - --enable-imfile
498 - --enable-impstats
499 - --enable-imptcp
500 - # Message Modificiation Plugins without depedencies
501 - --enable-mmanon
502 - --enable-mmaudit
503 - --enable-mmcount
504 - --enable-mmfields
505 - --enable-mmjsonparse
506 - --enable-mmpstrucdata
507 - --enable-mmrm1stspace
508 - --enable-mmsequence
509 - --enable-mmutf8fix
510 - # Output Modification Plugins without dependencies
511 - --enable-mail
512 - --enable-omprog
513 - --enable-omruleset
514 - --enable-omstdout
515 - --enable-omuxsock
516 - # Misc
517 - --enable-pmaixforwardedfrom
518 - --enable-pmciscoios
519 - --enable-pmcisconames
520 - --enable-pmlastmsg
521 - --enable-pmsnare
522 - # DB
523 - $(use_enable dbi libdbi)
524 - $(use_enable mongodb ommongodb)
525 - $(use_enable mysql)
526 - $(use_enable postgres pgsql)
527 - $(use_enable redis omhiredis)
528 - # Debug
529 - $(use_enable debug)
530 - $(use_enable debug diagtools)
531 - $(use_enable debug memcheck)
532 - $(use_enable debug valgrind)
533 - # Misc
534 - $(use_enable curl fmhttp)
535 - $(use_enable elasticsearch)
536 - $(use_enable gcrypt libgcrypt)
537 - $(use_enable jemalloc)
538 - $(use_enable kafka imkafka)
539 - $(use_enable kafka omkafka)
540 - $(use_enable kerberos gssapi-krb5)
541 - $(use_enable kubernetes mmkubernetes)
542 - $(use_enable normalize mmnormalize)
543 - $(use_enable mdblookup mmdblookup)
544 - $(use_enable grok mmgrok)
545 - $(use_enable omhttpfs)
546 - $(use_enable omudpspoof)
547 - $(use_enable rabbitmq omrabbitmq)
548 - $(use_enable relp)
549 - $(use_enable rfc3195)
550 - $(use_enable rfc5424hmac mmrfc5424addhmac)
551 - $(use_enable snmp)
552 - $(use_enable snmp mmsnmptrapd)
553 - $(use_enable ssl gnutls)
554 - $(use_enable systemd imjournal)
555 - $(use_enable systemd omjournal)
556 - $(use_enable usertools)
557 - $(use_enable uuid)
558 - $(use_enable zeromq imczmq)
559 - $(use_enable zeromq omczmq)
560 - --with-systemdsystemunitdir="$(systemd_get_systemunitdir)"
561 - )
562 -
563 - econf "${myeconfargs[@]}"
564 -}
565 -
566 -src_compile() {
567 - default
568 -
569 - if use doc && [[ "${PV}" == "9999" ]]; then
570 - einfo "Building documentation ..."
571 - local doc_dir="${S}/docs"
572 - cd "${doc_dir}" || die "Cannot chdir into \"${doc_dir}\"!"
573 - sphinx-build -b html source build || die "Building documentation failed!"
574 - fi
575 -}
576 -
577 -src_test() {
578 - local _has_increased_ulimit=
579 -
580 - # Sometimes tests aren't executable (i.e. when added via patch)
581 - einfo "Adjusting permissions of test scripts ..."
582 - find "${S}"/tests -type f -name '*.sh' \! -perm -111 -exec chmod a+x '{}' \; || \
583 - die "Failed to adjust test scripts permission"
584 -
585 - if ulimit -n 3072; then
586 - _has_increased_ulimit="true"
587 - fi
588 -
589 - if ! emake --jobs 1 check; then
590 - eerror "Test suite failed! :("
591 -
592 - if [[ -z "${_has_increased_ulimit}" ]]; then
593 - eerror "Probably because open file limit couldn't be set to 3072."
594 - fi
595 -
596 - if has userpriv ${FEATURES}; then
597 - eerror "Please try to reproduce the test suite failure with FEATURES=-userpriv " \
598 - "before you submit a bug report."
599 - fi
600 -
601 - fi
602 -}
603 -
604 -src_install() {
605 - local DOCS=(
606 - AUTHORS
607 - ChangeLog
608 - "${FILESDIR}"/README.gentoo
609 - )
610 -
611 - use doc && local HTML_DOCS=( "${S}/docs/build/." )
612 -
613 - default
614 -
615 - newconfd "${FILESDIR}/${PN}.confd-r1" ${PN}
616 - newinitd "${FILESDIR}/${PN}.initd-r1" ${PN}
617 -
618 - keepdir /var/empty/dev
619 - keepdir /var/spool/${PN}
620 - keepdir /etc/ssl/${PN}
621 - keepdir /etc/${PN}.d
622 -
623 - insinto /etc
624 - newins "${FILESDIR}/${PN}.conf" ${PN}.conf
625 -
626 - insinto /etc/rsyslog.d/
627 - newins "${FILESDIR}/50-default-r1.conf" 50-default.conf
628 -
629 - insinto /etc/logrotate.d/
630 - newins "${FILESDIR}/${PN}-r1.logrotate" ${PN}
631 -
632 - if use mysql; then
633 - insinto /usr/share/doc/${PF}/scripts/mysql
634 - doins plugins/ommysql/createDB.sql
635 - fi
636 -
637 - if use postgres; then
638 - insinto /usr/share/doc/${PF}/scripts/pgsql
639 - doins plugins/ompgsql/createDB.sql
640 - fi
641 -
642 - prune_libtool_files --modules
643 -}
644 -
645 -pkg_postinst() {
646 - local advertise_readme=0
647 -
648 - if [[ -z "${REPLACING_VERSIONS}" ]]; then
649 - # This is a new installation
650 -
651 - advertise_readme=1
652 -
653 - if use mysql || use postgres; then
654 - echo
655 - elog "Sample SQL scripts for MySQL & PostgreSQL have been installed to:"
656 - elog " /usr/share/doc/${PF}/scripts"
657 - fi
658 -
659 - if use ssl; then
660 - echo
661 - elog "To create a default CA and certificates for your server and clients, run:"
662 - elog " emerge --config =${PF}"
663 - elog "on your logging server. You can run it several times,"
664 - elog "once for each logging client. The client certificates will be signed"
665 - elog "using the CA certificate generated during the first run."
666 - fi
667 - fi
668 -
669 - if [[ ${advertise_readme} -gt 0 ]]; then
670 - # We need to show the README file location
671 -
672 - echo ""
673 - elog "Please read"
674 - elog ""
675 - elog " ${EPREFIX}/usr/share/doc/${PF}/README.gentoo*"
676 - elog ""
677 - elog "for more details."
678 - fi
679 -}
680 -
681 -pkg_config() {
682 - if ! use ssl ; then
683 - einfo "There is nothing to configure for rsyslog unless you"
684 - einfo "used USE=ssl to build it."
685 - return 0
686 - fi
687 -
688 - # Make sure the certificates directory exists
689 - local CERTDIR="${EROOT}/etc/ssl/${PN}"
690 - if [[ ! -d "${CERTDIR}" ]]; then
691 - mkdir "${CERTDIR}" || die
692 - fi
693 - einfo "Your certificates will be stored in ${CERTDIR}"
694 -
695 - # Create a default CA if needed
696 - if [[ ! -f "${CERTDIR}/${PN}_ca.cert.pem" ]]; then
697 - einfo "No CA key and certificate found in ${CERTDIR}, creating them for you..."
698 - certtool --generate-privkey \
699 - --outfile "${CERTDIR}/${PN}_ca.privkey.pem" &>/dev/null
700 - chmod 400 "${CERTDIR}/${PN}_ca.privkey.pem"
701 -
702 - cat > "${T}/${PF}.$$" <<- _EOF
703 - cn = Portage automated CA
704 - ca
705 - cert_signing_key
706 - expiration_days = 3650
707 - _EOF
708 -
709 - certtool --generate-self-signed \
710 - --load-privkey "${CERTDIR}/${PN}_ca.privkey.pem" \
711 - --outfile "${CERTDIR}/${PN}_ca.cert.pem" \
712 - --template "${T}/${PF}.$$" &>/dev/null
713 - chmod 400 "${CERTDIR}/${PN}_ca.privkey.pem"
714 -
715 - # Create the server certificate
716 - echo
717 - einfon "Please type the Common Name of the SERVER you wish to create a certificate for: "
718 - read -r CN
719 -
720 - einfo "Creating private key and certificate for server ${CN}..."
721 - certtool --generate-privkey \
722 - --outfile "${CERTDIR}/${PN}_${CN}.key.pem" &>/dev/null
723 - chmod 400 "${CERTDIR}/${PN}_${CN}.key.pem"
724 -
725 - cat > "${T}/${PF}.$$" <<- _EOF
726 - cn = ${CN}
727 - tls_www_server
728 - dns_name = ${CN}
729 - expiration_days = 3650
730 - _EOF
731 -
732 - certtool --generate-certificate \
733 - --outfile "${CERTDIR}/${PN}_${CN}.cert.pem" \
734 - --load-privkey "${CERTDIR}/${PN}_${CN}.key.pem" \
735 - --load-ca-certificate "${CERTDIR}/${PN}_ca.cert.pem" \
736 - --load-ca-privkey "${CERTDIR}/${PN}_ca.privkey.pem" \
737 - --template "${T}/${PF}.$$" &>/dev/null
738 - chmod 400 "${CERTDIR}/${PN}_${CN}.cert.pem"
739 -
740 - else
741 - einfo "Found existing ${CERTDIR}/${PN}_ca.cert.pem, skipping CA and SERVER creation."
742 - fi
743 -
744 - # Create a client certificate
745 - echo
746 - einfon "Please type the Common Name of the CLIENT you wish to create a certificate for: "
747 - read -r CN
748 -
749 - einfo "Creating private key and certificate for client ${CN}..."
750 - certtool --generate-privkey \
751 - --outfile "${CERTDIR}/${PN}_${CN}.key.pem" &>/dev/null
752 - chmod 400 "${CERTDIR}/${PN}_${CN}.key.pem"
753 -
754 - cat > "${T}/${PF}.$$" <<- _EOF
755 - cn = ${CN}
756 - tls_www_client
757 - dns_name = ${CN}
758 - expiration_days = 3650
759 - _EOF
760 -
761 - certtool --generate-certificate \
762 - --outfile "${CERTDIR}/${PN}_${CN}.cert.pem" \
763 - --load-privkey "${CERTDIR}/${PN}_${CN}.key.pem" \
764 - --load-ca-certificate "${CERTDIR}/${PN}_ca.cert.pem" \
765 - --load-ca-privkey "${CERTDIR}/${PN}_ca.privkey.pem" \
766 - --template "${T}/${PF}.$$" &>/dev/null
767 - chmod 400 "${CERTDIR}/${PN}_${CN}.cert.pem"
768 -
769 - rm -f "${T}/${PF}.$$"
770 -
771 - echo
772 - einfo "Here is the documentation on how to encrypt your log traffic:"
773 - einfo " https://www.rsyslog.com/doc/rsyslog_tls.html"
774 -}