Gentoo Archives: gentoo-commits

From: "Anthony G. Basile" <blueness@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] proj/musl:master commit in: app-admin/rsyslog/files/, app-admin/rsyslog/
Date: Sat, 29 Dec 2018 15:56:46
Message-Id: 1546098993.ff102aeaf88f0ced1aad9b8957b3193b4d79d350.blueness@gentoo
1 commit: ff102aeaf88f0ced1aad9b8957b3193b4d79d350
2 Author: Anthony G. Basile <blueness <AT> gentoo <DOT> org>
3 AuthorDate: Sat Dec 29 15:56:33 2018 +0000
4 Commit: Anthony G. Basile <blueness <AT> gentoo <DOT> org>
5 CommitDate: Sat Dec 29 15:56:33 2018 +0000
6 URL: https://gitweb.gentoo.org/proj/musl.git/commit/?id=ff102aea
7
8 app-admin/rsyslog: moved to the tree
9
10 Signed-off-by: Anthony G. Basile <blueness <AT> gentoo.org>
11
12 app-admin/rsyslog/Manifest | 2 -
13 app-admin/rsyslog/files/50-default-r1.conf | 107 -----
14 app-admin/rsyslog/files/README.gentoo | 36 --
15 .../files/rsyslog-8.40.0-fix-omusrmsg.patch | 13 -
16 app-admin/rsyslog/files/rsyslog-r1.logrotate | 45 --
17 app-admin/rsyslog/files/rsyslog.conf | 61 ---
18 app-admin/rsyslog/files/rsyslog.confd-r1 | 30 --
19 app-admin/rsyslog/files/rsyslog.initd-r1 | 72 ----
20 app-admin/rsyslog/metadata.xml | 45 --
21 app-admin/rsyslog/rsyslog-8.40.0-r1.ebuild | 459 ---------------------
22 10 files changed, 870 deletions(-)
23
24 diff --git a/app-admin/rsyslog/Manifest b/app-admin/rsyslog/Manifest
25 deleted file mode 100644
26 index bd5a10e..0000000
27 --- a/app-admin/rsyslog/Manifest
28 +++ /dev/null
29 @@ -1,2 +0,0 @@
30 -DIST rsyslog-8.40.0.tar.gz 2726022 BLAKE2B 33f7f2018200a20b01dbfabeeab592aa09d530edd313bb13f16c47cf3f67aebd9c465af3f1e468ca3d352cd83e4f4eee567c6fd54bbaee1723bee56f4631b440 SHA512 3d5d4f92e37ad9bf3767d5d7fc87fcb7956656f676a9495c78abd12fe9072ec8763b50543b198308a71d5d919721fb9b84b6725dd83a9d9b8a1639d81382c0dd
31 -DIST rsyslog-doc-8.40.0.tar.gz 7709769 BLAKE2B cda3bbd005120e7100bb36cf4c0f99d3a037525c5451ead5957f4dfe06eaceeba8fb2e266f53203bee6fae97898774ee17862a52ca1dae99aeb3534bbfadcd60 SHA512 2e2f37336948984a8cf0e098eb46e61fe4de6366d63a98204ecd558f4e21b7c1f222659f7bdecdd22e0a61d34c442b4734dbe72a72e8716c768a900b954d473f
32
33 diff --git a/app-admin/rsyslog/files/50-default-r1.conf b/app-admin/rsyslog/files/50-default-r1.conf
34 deleted file mode 100644
35 index 920c214..0000000
36 --- a/app-admin/rsyslog/files/50-default-r1.conf
37 +++ /dev/null
38 @@ -1,107 +0,0 @@
39 -#######################
40 -### DEFAULT ACTIONS ###
41 -#######################
42 -
43 -auth,authpriv.* action(
44 - name="action_auth"
45 - type="omfile"
46 - File="/var/log/auth.log"
47 - FileCreateMode="0600"
48 - FileOwner="root"
49 - FileGroup="adm"
50 - Sync="off"
51 -)
52 -
53 -cron.* action(
54 - name="action_cron"
55 - type="omfile"
56 - File="/var/log/cron.log"
57 - FileOwner="root"
58 - FileGroup="adm"
59 -)
60 -
61 -daemon.* action(
62 - name="action_daemon"
63 - type="omfile"
64 - File="/var/log/daemon.log"
65 - FileOwner="root"
66 - FileGroup="adm"
67 -)
68 -
69 -kern.* action(
70 - name="action_kern"
71 - type="omfile"
72 - File="/var/log/kern.log"
73 - FileOwner="root"
74 - FileGroup="adm"
75 -)
76 -
77 -lpr.* action(
78 - name="action_lpr"
79 - type="omfile"
80 - File="/var/log/lpr.log"
81 - FileOwner="root"
82 - FileGroup="adm"
83 -)
84 -
85 -mail.* action(
86 - name="action_mail"
87 - type="omfile"
88 - File="/var/log/mail.log"
89 - FileOwner="root"
90 - FileGroup="adm"
91 -)
92 -
93 -news.* action(
94 - name="action_news"
95 - type="omfile"
96 - File="/var/log/news.log"
97 - FileOwner="root"
98 - FileGroup="adm"
99 -)
100 -
101 -user.* action(
102 - name="action_user"
103 - type="omfile"
104 - File="/var/log/user.log"
105 - FileOwner="root"
106 - FileGroup="adm"
107 -)
108 -
109 -*.=debug;auth,authpriv,news,mail.none action(
110 - name="action_debug"
111 - type="omfile"
112 - File="/var/log/debug.log"
113 - FileOwner="root"
114 - FileGroup="adm"
115 -)
116 -
117 -*.info;auth,authpriv,cron,daemon,lpr,mail,news.none action(
118 - name="action_messages"
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 -# name="action_syslog"
130 -# type="omfile"
131 -# File="/var/log/syslog"
132 -# FileOwner="root"
133 -# FileGroup="adm"
134 -#)
135 -
136 -*.emerg action(
137 - name="action_emerge"
138 - type="omusrmsg"
139 - Users="*"
140 - action.execOnlyOnceEveryInterval="10"
141 -)
142 -
143 -# Create an additional socket for the default chroot location
144 -# (used by net-misc/openssh[hpn], see https://bugs.gentoo.org/490744)
145 -input(type="imuxsock" Socket="/var/empty/dev/log")
146
147 diff --git a/app-admin/rsyslog/files/README.gentoo b/app-admin/rsyslog/files/README.gentoo
148 deleted file mode 100644
149 index 9f0666c..0000000
150 --- a/app-admin/rsyslog/files/README.gentoo
151 +++ /dev/null
152 @@ -1,36 +0,0 @@
153 -Introduction
154 -============
155 -
156 -Since rsyslog version 7.6 we are shipping a new default Gentoo
157 -configuration. See bug #501982 to learn more about what we were trying to
158 -achieve by rewriting the entire configuration.
159 -
160 -
161 -Important changes
162 -=================
163 -
164 -1. "/var/log/syslog" log file is now deprecated
165 -
166 - Beginning with rsyslog-7.6, the "/var/log/syslog" log file will no
167 - longer being written per default. We are considering this file as
168 - deprecated/obsolet for the typical user/system.
169 - The content from this log file is still availble through other
170 - (dedicated) log files, see
171 -
172 - - /var/log/cron.log
173 - - /var/log/daemon.log
174 - - /var/log/mail.log
175 - - /var/log/messages
176 -
177 - If you really need the old "/var/log/syslog" log file, all you have to
178 - do is uncommenting the corresponding configuration directive in
179 - "/etc/rsyslog.d/50-default.conf".
180 -
181 - If you do so, don't forget to re-enable log rotation in
182 - "/etc/logrotate.d/rsyslog", too.
183 -
184 -
185 -2. An additional input socket in "/var/empty/dev/log" (default chroot
186 - location) will be created per default
187 -
188 - See bug #490744 for further details.
189
190 diff --git a/app-admin/rsyslog/files/rsyslog-8.40.0-fix-omusrmsg.patch b/app-admin/rsyslog/files/rsyslog-8.40.0-fix-omusrmsg.patch
191 deleted file mode 100644
192 index 9247d0b..0000000
193 --- a/app-admin/rsyslog/files/rsyslog-8.40.0-fix-omusrmsg.patch
194 +++ /dev/null
195 @@ -1,13 +0,0 @@
196 -https://github.com/rsyslog/rsyslog/issues/3346
197 -
198 ---- a/tools/omusrmsg.c
199 -+++ b/tools/omusrmsg.c
200 -@@ -261,7 +261,7 @@ static rsRetVal wallmsg(uchar* pMsg, instanceData *pData)
201 -
202 - /* compute the device name */
203 - strcpy(p, _PATH_DEV);
204 -- memcpy(p, ut.ut_line, UNAMESZ);
205 -+ strncat(p, ut.ut_line, UNAMESZ);
206 -
207 - /* we must be careful when writing to the terminal. A terminal may block
208 - * (for example, a user has pressed <ctl>-s). In that case, we can not
209
210 diff --git a/app-admin/rsyslog/files/rsyslog-r1.logrotate b/app-admin/rsyslog/files/rsyslog-r1.logrotate
211 deleted file mode 100644
212 index 3a92ba3..0000000
213 --- a/app-admin/rsyslog/files/rsyslog-r1.logrotate
214 +++ /dev/null
215 @@ -1,45 +0,0 @@
216 -# Uncomment the following directive if you have re-enabled
217 -# "/var/log/syslog" in "/etc/rsyslog.d/50-default.conf"
218 -#/var/log/syslog
219 -#{
220 -# rotate 7
221 -# daily
222 -# missingok
223 -# notifempty
224 -# delaycompress
225 -# compress
226 -# postrotate
227 -# if type -p systemctl 2>&1 1>/dev/null && systemctl is-system-running 2>&1 1>/dev/null ; then
228 -# systemctl kill -s HUP rsyslog.service
229 -# else
230 -# test -r /run/rsyslogd.pid && kill -HUP $(cat /run/rsyslogd.pid) 2>&1 1>/dev/null
231 -# fi
232 -# endscript
233 -#}
234 -
235 -/var/log/auth.log
236 -/var/log/cron.log
237 -/var/log/daemon.log
238 -/var/log/kern.log
239 -/var/log/lpr.log
240 -/var/log/mail.log
241 -/var/log/news.log
242 -/var/log/user.log
243 -/var/log/debug.log
244 -/var/log/messages
245 -{
246 - rotate 4
247 - weekly
248 - missingok
249 - notifempty
250 - compress
251 - delaycompress
252 - sharedscripts
253 - postrotate
254 - if type -p systemctl 2>&1 1>/dev/null && systemctl is-system-running 2>&1 1>/dev/null ; then
255 - systemctl kill -s HUP rsyslog.service
256 - else
257 - test -r /run/rsyslogd.pid && kill -HUP $(cat /run/rsyslogd.pid) 2>&1 1>/dev/null
258 - fi
259 - endscript
260 -}
261
262 diff --git a/app-admin/rsyslog/files/rsyslog.conf b/app-admin/rsyslog/files/rsyslog.conf
263 deleted file mode 100644
264 index da48459..0000000
265 --- a/app-admin/rsyslog/files/rsyslog.conf
266 +++ /dev/null
267 @@ -1,61 +0,0 @@
268 -# /etc/rsyslog.conf
269 -#
270 -# This configuration is based on RainerScript, the new recommended syntax
271 -# for RSYSLOG. See http://www.rsyslog.com/doc/rainerscript.html for further
272 -# details.
273 -#
274 -# But if you don't want to learn something new at moment, don't worry: The
275 -# legacy syntax is still supported.
276 -#
277 -# You may want to use the new RSYSLOG configuration builder to create your
278 -# own more advanced configuration: http://www.rsyslog.com/rsyslog-configuration-builder/
279 -
280 -# Check config syntax on startup and abort if unclean (default: off)
281 -#$AbortOnUncleanConfig on
282 -
283 -
284 -###############
285 -### MODULES ###
286 -###############
287 -
288 -# Read syslog messages from default Unix socket /dev/log (e.g. via logger command)
289 -module(load="imuxsock")
290 -
291 -# Read messages from the kernel log and submits them to the syslog engine
292 -module(load="imklog")
293 -
294 -# Inject "--MARK--" messages every $Interval (seconds)
295 -#module(load="immark" Interval="600")
296 -
297 -# Read syslog messages from UDP
298 -#module(load="imudp")
299 -#input(type="imudp" port="514")
300 -
301 -# Read syslog messages from TCP
302 -#module(load="imtcp")
303 -#input(type="imtcp" port="514")
304 -
305 -
306 -#########################
307 -### GLOBAL DIRECTIVES ###
308 -#########################
309 -
310 -# Where to place spool and state files
311 -$WorkDirectory /var/spool/rsyslog
312 -
313 -# Reduce repeating messages (default: off)
314 -#$RepeatedMsgReduction on
315 -
316 -# Set defaults for every output file
317 -$Umask 0022
318 -
319 -module(
320 - load="builtin:omfile"
321 - Template="RSYSLOG_TraditionalFileFormat"
322 - FileCreateMode="0644"
323 - DirCreateMode="0755"
324 -)
325 -
326 -
327 -# Include all conf files in /etc/rsyslog.d/
328 -$IncludeConfig /etc/rsyslog.d/*.conf
329
330 diff --git a/app-admin/rsyslog/files/rsyslog.confd-r1 b/app-admin/rsyslog/files/rsyslog.confd-r1
331 deleted file mode 100644
332 index da48c01..0000000
333 --- a/app-admin/rsyslog/files/rsyslog.confd-r1
334 +++ /dev/null
335 @@ -1,30 +0,0 @@
336 -# /etc/conf.d/rsyslog
337 -
338 -# Configuration file
339 -#RSYSLOG_CONFIGFILE="/etc/rsyslog.conf"
340 -
341 -# PID file
342 -# If you should ever change this, remember to update
343 -# "/etc/logrotate.d/rsyslog", too.
344 -#RSYSLOG_PIDFILE="/run/rsyslogd.pid"
345 -
346 -# You can use this configuration option to pass additional options to the
347 -# start-stop-daemon, see start-stop-daemon(8) for more details.
348 -# Per default we wait 1000ms after we have started the service to ensure
349 -# that the daemon is really up and running.
350 -#RSYSLOG_SSDARGS="--wait 1000"
351 -
352 -# The termination timeout (start-stop-daemon parameter "retry") ensures
353 -# that the service will be terminated within a given time (60 + 5 seconds
354 -# per default) when you are stopping the service.
355 -# You need to increase the value when you are working with a large queue.
356 -# See http://www.rsyslog.com/doc/queues.html for further information.
357 -#RSYSLOG_TERMTIMEOUT="TERM/60/KILL/5"
358 -
359 -
360 -# Options to rsyslogd
361 -# See rsyslogd(8) for more details
362 -# Notes:
363 -# * Do not specify another PIDFILE but use the variable above to change the location
364 -# * Do not specify another CONFIGFILE but use the variable above to change the location
365 -#RSYSLOG_OPTS=""
366
367 diff --git a/app-admin/rsyslog/files/rsyslog.initd-r1 b/app-admin/rsyslog/files/rsyslog.initd-r1
368 deleted file mode 100644
369 index 8d2ff8e..0000000
370 --- a/app-admin/rsyslog/files/rsyslog.initd-r1
371 +++ /dev/null
372 @@ -1,72 +0,0 @@
373 -#!/sbin/openrc-run
374 -# Copyright 1999-2018 Gentoo Authors
375 -# Distributed under the terms of the GNU General Public License v2
376 -
377 -RSYSLOG_CONFIGFILE=${RSYSLOG_CONFIGFILE:-"/etc/rsyslog.conf"}
378 -RSYSLOG_PIDFILE=${RSYSLOG_PIDFILE:-"/run/rsyslogd.pid"}
379 -RSYSLOG_SSDARGS=${RSYSLOG_SSDARGS:-"--wait 1000"}
380 -RSYSLOG_TERMTIMEOUT=${RSYSLOG_TERMTIMEOUT:-"TERM/60/KILL/5"}
381 -RSYSLOG_OPTS=${RSYSLOG_OPTS:-""}
382 -
383 -command="/usr/sbin/rsyslogd"
384 -command_args="${RSYSLOG_OPTS} -f \"${RSYSLOG_CONFIGFILE}\" -i \"${RSYSLOG_PIDFILE}\""
385 -start_stop_daemon_args="${RSYSLOG_SSDARGS}"
386 -pidfile="${RSYSLOG_PIDFILE}"
387 -retry="${RSYSLOG_TERMTIMEOUT}"
388 -
389 -required_files="${RSYSLOG_CONFIGFILE}"
390 -
391 -description="RSYSLOG is the rocket-fast system for log processing (syslog replacement)."
392 -
393 -extra_commands="configtest"
394 -extra_started_commands="rotate"
395 -
396 -description_configtest="Run rsyslogd's internal config check."
397 -
398 -description_rotate="Sends rsyslogd a signal to re-open its log files."
399 -
400 -depend() {
401 - need clock hostname localmount
402 - provide logger
403 -}
404 -
405 -start_pre() {
406 - if [ "${RC_CMD}" != "restart" ]; then
407 - configtest || return 1
408 - fi
409 -}
410 -
411 -stop_pre() {
412 - if [ "${RC_CMD}" = "restart" ]; then
413 - configtest || return 1
414 - fi
415 -}
416 -
417 -stop_post() {
418 - if [ -f "${RSYSLOG_PIDFILE}" ]; then
419 - vebegin "Removing stale PID file"
420 - rm --force "${RSYSLOG_PIDFILE}"
421 - veend $?
422 - fi
423 -}
424 -
425 -configtest() {
426 - local _command_args="-N 999 -f \"${RSYSLOG_CONFIGFILE}\""
427 - local _retval=0
428 -
429 - ebegin "Checking rsyslogd's configuration"
430 - eval ${command} ${_command_args} >/dev/null 2>&1
431 - _retval=$?
432 -
433 - if [ ${_retval} -ne 0 ]; then
434 - eval ${command} ${_command_args}
435 - fi
436 -
437 - eend ${_retval} "failed, please correct errors above"
438 -}
439 -
440 -rotate() {
441 - ebegin "Re-opening rsyslogd logs"
442 - start-stop-daemon --signal SIGHUP --pidfile "${RSYSLOG_PIDFILE}"
443 - eend $?
444 -}
445
446 diff --git a/app-admin/rsyslog/metadata.xml b/app-admin/rsyslog/metadata.xml
447 deleted file mode 100644
448 index ba4e59d..0000000
449 --- a/app-admin/rsyslog/metadata.xml
450 +++ /dev/null
451 @@ -1,45 +0,0 @@
452 -<?xml version="1.0" encoding="UTF-8"?>
453 -<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
454 -<pkgmetadata>
455 - <maintainer type="person">
456 - <email>whissi@g.o</email>
457 - <name>Thomas Deutschmann</name>
458 - </maintainer>
459 - <use>
460 - <flag name="curl">Enable http_request() function in RainerScript (requires <pkg>net-misc/curl</pkg>)</flag>
461 - <flag name="dbi">Build the general database output module (requires <pkg>dev-db/libdbi</pkg>)</flag>
462 - <flag name="elasticsearch">Build the Elasticsearch output module (requires <pkg>net-misc/curl</pkg>)</flag>
463 - <flag name="gcrypt">Add support for encrypted log files using <pkg>dev-libs/libgcrypt</pkg></flag>
464 - <flag name="gnutls">Build the GnuTLS network stream driver (requires <pkg>net-libs/gnutls</pkg>)</flag>
465 - <flag name="grok">Build the grok modify module (requires <pkg>dev-libs/grok</pkg>)</flag>
466 - <flag name="kafka">Build the Apache Kafka input/output module (requires <pkg>dev-libs/librdkafka</pkg>)</flag>
467 - <flag name="kerberos">Build the GSSAPI input and output module (requires <pkg>virtual/krb5</pkg>)</flag>
468 - <flag name="kubernetes">Build the kubernetes modify plugin (requires <pkg>net-misc/curl</pkg>)</flag>
469 - <flag name="libressl">Use <pkg>dev-libs/libressl</pkg> instead of <pkg>dev-libs/openssl</pkg> (you still need to enable functionality which requires OpenSSL)</flag>
470 - <flag name="mdblookup">Build the MaxMind DB lookup message modify plugin using <pkg>dev-libs/libmaxminddb</pkg></flag>
471 - <flag name="mongodb">Build the MongoDB output module (requires <pkg>dev-libs/libmongo-client</pkg>)</flag>
472 - <flag name="mysql">Build the MySQL database output module (requires <pkg>virtual/mysql</pkg>)</flag>
473 - <flag name="normalize">Build the normalize modify module (requires <pkg>dev-libs/libee</pkg> and <pkg>dev-libs/liblognorm</pkg>)</flag>
474 - <flag name="omhttp">Build the http output module (requires <pkg>net-misc/curl</pkg>)</flag>
475 - <flag name="omhttpfs">Build the httpfs output module (requires <pkg>net-misc/curl</pkg>)</flag>
476 - <flag name="omudpspoof">Build the udpspoof output module (requires <pkg>net-libs/libnet</pkg>)</flag>
477 - <flag name="openssl">Build the OpenSSL network stream driver (requires <pkg>dev-libs/openssl</pkg>)</flag>
478 - <flag name="postgres">Build the PostgreSQL database output module (requires <pkg>dev-db/postgresql</pkg>)</flag>
479 - <flag name="rabbitmq">Build the RabbitMQ output module (requires <pkg>net-libs/rabbitmq-c</pkg>)</flag>
480 - <flag name="redis">Build the Redis output module using (requires <pkg>dev-libs/hiredis</pkg>)</flag>
481 - <flag name="relp">Build the Reliable Event Logging Protocol (RELP) output module (requires <pkg>dev-libs/librelp</pkg>)</flag>
482 - <flag name="rfc3195">Build the rfc3195 input module (requires <pkg>dev-libs/liblogging</pkg>)</flag>
483 - <flag name="rfc5424hmac">Build the rfc5424hmac modify module (requires <pkg>dev-libs/openssl</pkg> or <pkg>dev-libs/libressl</pkg>)</flag>
484 - <flag name="snmp">Build the snmp modify and output module (requires <pkg>net-analyzer/net-snmp</pkg>)</flag>
485 - <flag name="ssl">Add support for encrypted client/server communication (requires <pkg>net-libs/gnutls</pkg>)</flag>
486 - <flag name="systemd">Build the journal input and output module (requires <pkg>sys-apps/systemd</pkg>)</flag>
487 - <flag name="uuid">Include UUIDs in messages (requires <pkg>sys-apps/util-linux</pkg>)</flag>
488 - <flag name="usertools">Installs the user tools (rsgtutil, rscryutil...) corresponding to the set USE flags</flag>
489 - <flag name="xxhash">Enable xxHash support in fmhash module (requires <pkg>dev-libs/xxhash</pkg>)</flag>
490 - <flag name="zeromq">Build the ZeroMQ input and output modules (requires <pkg>net-libs/czmq</pkg>)</flag>
491 - </use>
492 - <upstream>
493 - <bugs-to>https://github.com/rsyslog/rsyslog/issues</bugs-to>
494 - <remote-id type="cpe">cpe:/a:rsyslog:rsyslog</remote-id>
495 - </upstream>
496 -</pkgmetadata>
497
498 diff --git a/app-admin/rsyslog/rsyslog-8.40.0-r1.ebuild b/app-admin/rsyslog/rsyslog-8.40.0-r1.ebuild
499 deleted file mode 100644
500 index 54da848..0000000
501 --- a/app-admin/rsyslog/rsyslog-8.40.0-r1.ebuild
502 +++ /dev/null
503 @@ -1,459 +0,0 @@
504 -# Copyright 1999-2018 Gentoo Authors
505 -# Distributed under the terms of the GNU General Public License v2
506 -
507 -EAPI="6"
508 -PYTHON_COMPAT=( python{2_7,3_4,3_5,3_6,3_7} )
509 -
510 -inherit autotools eutils linux-info python-any-r1 systemd
511 -
512 -DESCRIPTION="An enhanced multi-threaded syslogd with database support and more"
513 -HOMEPAGE="https://www.rsyslog.com/"
514 -
515 -if [[ ${PV} == "9999" ]]; then
516 - EGIT_REPO_URI="https://github.com/rsyslog/${PN}.git"
517 -
518 - DOC_REPO_URI="https://github.com/rsyslog/${PN}-doc.git"
519 -
520 - inherit git-r3
521 -else
522 - KEYWORDS="amd64 ~arm x86"
523 -
524 - SRC_URI="
525 - https://www.rsyslog.com/files/download/${PN}/${P}.tar.gz
526 - doc? ( https://www.rsyslog.com/files/download/${PN}/${PN}-doc-${PV}.tar.gz )
527 - "
528 -
529 - PATCHES=( "${FILESDIR}"/${PN}-8.40.0-fix-omusrmsg.patch )
530 -fi
531 -
532 -LICENSE="GPL-3 LGPL-3 Apache-2.0"
533 -SLOT="0"
534 -IUSE="curl dbi debug doc elasticsearch +gcrypt grok gnutls jemalloc kafka kerberos kubernetes libressl mdblookup"
535 -IUSE+=" mongodb mysql normalize omhttp omhttpfs omudpspoof openssl postgres rabbitmq redis relp rfc3195 rfc5424hmac"
536 -IUSE+=" snmp ssl systemd test usertools +uuid xxhash zeromq"
537 -RESTRICT="!test? ( test )"
538 -
539 -RDEPEND="
540 - >=dev-libs/libfastjson-0.99.8:=
541 - >=dev-libs/libestr-0.1.9
542 - >=sys-libs/zlib-1.2.5
543 - curl? ( >=net-misc/curl-7.35.0 )
544 - dbi? ( >=dev-db/libdbi-0.8.3 )
545 - elasticsearch? ( >=net-misc/curl-7.35.0 )
546 - gcrypt? ( >=dev-libs/libgcrypt-1.5.3:= )
547 - grok? ( >=dev-libs/grok-0.9.2 )
548 - jemalloc? ( >=dev-libs/jemalloc-3.3.1:= )
549 - kafka? ( >=dev-libs/librdkafka-0.9.0.99:= )
550 - kerberos? ( virtual/krb5 )
551 - kubernetes? ( >=net-misc/curl-7.35.0 )
552 - mdblookup? ( dev-libs/libmaxminddb:= )
553 - mongodb? ( >=dev-libs/mongo-c-driver-1.1.10:= )
554 - mysql? ( virtual/libmysqlclient:= )
555 - normalize? (
556 - >=dev-libs/libee-0.4.0
557 - >=dev-libs/liblognorm-2.0.3:=
558 - )
559 - omhttpfs? ( >=net-misc/curl-7.35.0 )
560 - omudpspoof? ( >=net-libs/libnet-1.1.6 )
561 - postgres? ( >=dev-db/postgresql-8.4.20:= )
562 - rabbitmq? ( >=net-libs/rabbitmq-c-0.3.0:= )
563 - redis? ( >=dev-libs/hiredis-0.11.0:= )
564 - relp? ( >=dev-libs/librelp-1.2.17:= )
565 - rfc3195? ( >=dev-libs/liblogging-1.0.1:=[rfc3195] )
566 - rfc5424hmac? (
567 - !libressl? ( >=dev-libs/openssl-0.9.8y:0= )
568 - libressl? ( dev-libs/libressl:= )
569 - )
570 - snmp? ( >=net-analyzer/net-snmp-5.7.2 )
571 - ssl? (
572 - gnutls? ( >=net-libs/gnutls-2.12.23:0= )
573 - openssl? (
574 - !libressl? ( dev-libs/openssl:0= )
575 - libressl? ( dev-libs/libressl:0= )
576 - )
577 - )
578 - systemd? ( >=sys-apps/systemd-234 )
579 - uuid? ( sys-apps/util-linux:0= )
580 - xxhash? ( dev-libs/xxhash:= )
581 - zeromq? (
582 - >=net-libs/czmq-3.0.2
583 - )"
584 -DEPEND="${RDEPEND}
585 - >=sys-devel/autoconf-archive-2015.02.24
586 - virtual/pkgconfig
587 - elibc_musl? ( sys-libs/queue )
588 - test? (
589 - >=dev-libs/liblogging-1.0.1[stdlog]
590 - jemalloc? ( <sys-libs/libfaketime-0.9.7 )
591 - !jemalloc? ( sys-libs/libfaketime )
592 - ${PYTHON_DEPS}
593 - )"
594 -
595 -REQUIRED_USE="
596 - kubernetes? ( normalize )
597 - ssl? ( || ( gnutls openssl ) )
598 -"
599 -
600 -if [[ ${PV} == "9999" ]]; then
601 - DEPEND+=" doc? ( >=dev-python/sphinx-1.1.3-r7 )"
602 - DEPEND+=" >=sys-devel/flex-2.5.39-r1"
603 - DEPEND+=" >=sys-devel/bison-2.4.3"
604 - DEPEND+=" >=dev-python/docutils-0.12"
605 -fi
606 -
607 -CONFIG_CHECK="~INOTIFY_USER"
608 -WARNING_INOTIFY_USER="CONFIG_INOTIFY_USER isn't set. Imfile module on this system will only support polling mode!"
609 -
610 -pkg_setup() {
611 - use test && python-any-r1_pkg_setup
612 -}
613 -
614 -src_unpack() {
615 - if [[ ${PV} == "9999" ]]; then
616 - git-r3_fetch
617 - git-r3_checkout
618 - else
619 - unpack ${P}.tar.gz
620 - fi
621 -
622 - if use doc; then
623 - if [[ ${PV} == "9999" ]]; then
624 - local _EGIT_BRANCH=
625 - if [[ -n "${EGIT_BRANCH}" ]]; then
626 - # Cannot use rsyslog commits/branches for documentation repository
627 - _EGIT_BRANCH=${EGIT_BRANCH}
628 - unset EGIT_BRANCH
629 - fi
630 -
631 - git-r3_fetch "${DOC_REPO_URI}"
632 - git-r3_checkout "${DOC_REPO_URI}" "${S}"/docs
633 -
634 - if [[ -n "${_EGIT_BRANCH}" ]]; then
635 - # Restore previous EGIT_BRANCH information
636 - EGIT_BRANCH=${_EGIT_BRANCH}
637 - fi
638 - else
639 - cd "${S}" || die "Cannot change dir into '${S}'"
640 - mkdir docs || die "Failed to create docs directory"
641 - cd docs || die "Failed to change dir into '${S}/docs'"
642 - unpack ${PN}-doc-${PV}.tar.gz
643 - fi
644 - fi
645 -}
646 -
647 -src_prepare() {
648 - default
649 -
650 - eautoreconf
651 -}
652 -
653 -src_configure() {
654 - # Maintainer notes:
655 - # * Guardtime support is missing because libgt isn't yet available
656 - # in portage.
657 - # * Hadoop's HDFS file system output module is currently not
658 - # supported in Gentoo because nobody is able to test it
659 - # (JAVA dependency).
660 - # * dev-libs/hiredis doesn't provide pkg-config (see #504614,
661 - # upstream PR 129 and 136) so we need to export HIREDIS_*
662 - # variables because rsyslog's build system depends on pkg-config.
663 -
664 - if use redis; then
665 - export HIREDIS_LIBS="-L${EPREFIX}/usr/$(get_libdir) -lhiredis"
666 - export HIREDIS_CFLAGS="-I${EPREFIX}/usr/include"
667 - fi
668 -
669 - local myeconfargs=(
670 - --disable-debug-symbols
671 - --disable-generate-man-pages
672 - --without-valgrind-testbench
673 - --disable-liblogging-stdlog
674 - $(use_enable test testbench)
675 - $(use_enable test libfaketime)
676 - $(use_enable test extended-tests)
677 - # Input Plugins without depedencies
678 - --enable-imdiag
679 - --enable-imfile
680 - --enable-impstats
681 - --enable-imptcp
682 - # Message Modificiation Plugins without depedencies
683 - --enable-mmanon
684 - --enable-mmaudit
685 - --enable-mmcount
686 - --enable-mmfields
687 - --enable-mmjsonparse
688 - --enable-mmpstrucdata
689 - --enable-mmrm1stspace
690 - --enable-mmsequence
691 - --enable-mmutf8fix
692 - # Output Modification Plugins without dependencies
693 - --enable-mail
694 - --enable-omprog
695 - --enable-omruleset
696 - --enable-omstdout
697 - --enable-omuxsock
698 - # Misc
699 - --enable-fmhash
700 - $(use_enable xxhash fmhash-xxhash)
701 - --enable-pmaixforwardedfrom
702 - --enable-pmciscoios
703 - --enable-pmcisconames
704 - --enable-pmlastmsg
705 - $(use_enable normalize pmnormalize)
706 - --enable-pmnull
707 - --enable-pmpanngfw
708 - --enable-pmsnare
709 - # DB
710 - $(use_enable dbi libdbi)
711 - $(use_enable mongodb ommongodb)
712 - $(use_enable mysql)
713 - $(use_enable postgres pgsql)
714 - $(use_enable redis omhiredis)
715 - # Debug
716 - $(use_enable debug)
717 - $(use_enable debug diagtools)
718 - $(use_enable debug valgrind)
719 - # Misc
720 - $(use_enable curl fmhttp)
721 - $(use_enable elasticsearch)
722 - $(use_enable gcrypt libgcrypt)
723 - $(use_enable jemalloc)
724 - $(use_enable kafka imkafka)
725 - $(use_enable kafka omkafka)
726 - $(use_enable kerberos gssapi-krb5)
727 - $(use_enable kubernetes mmkubernetes)
728 - $(use_enable normalize mmnormalize)
729 - $(use_enable mdblookup mmdblookup)
730 - $(use_enable grok mmgrok)
731 - $(use_enable omhttp)
732 - $(use_enable omhttpfs)
733 - $(use_enable omudpspoof)
734 - $(use_enable rabbitmq omrabbitmq)
735 - $(use_enable relp)
736 - $(use_enable rfc3195)
737 - $(use_enable rfc5424hmac mmrfc5424addhmac)
738 - $(use_enable snmp)
739 - $(use_enable snmp mmsnmptrapd)
740 - $(use_enable gnutls)
741 - $(use_enable openssl)
742 - $(use_enable systemd imjournal)
743 - $(use_enable systemd omjournal)
744 - $(use_enable usertools)
745 - $(use_enable uuid)
746 - $(use_enable zeromq imczmq)
747 - $(use_enable zeromq omczmq)
748 - --with-systemdsystemunitdir="$(systemd_get_systemunitdir)"
749 - )
750 -
751 - econf "${myeconfargs[@]}"
752 -}
753 -
754 -src_compile() {
755 - default
756 -
757 - if use doc && [[ "${PV}" == "9999" ]]; then
758 - einfo "Building documentation ..."
759 - local doc_dir="${S}/docs"
760 - cd "${doc_dir}" || die "Cannot chdir into \"${doc_dir}\"!"
761 - sphinx-build -b html source build || die "Building documentation failed!"
762 - fi
763 -}
764 -
765 -src_test() {
766 - local _has_increased_ulimit=
767 -
768 - # Sometimes tests aren't executable (i.e. when added via patch)
769 - einfo "Adjusting permissions of test scripts ..."
770 - find "${S}"/tests -type f -name '*.sh' \! -perm -111 -exec chmod a+x '{}' \; || \
771 - die "Failed to adjust test scripts permission"
772 -
773 - if ulimit -n 3072; then
774 - _has_increased_ulimit="true"
775 - fi
776 -
777 - if ! emake --jobs 1 check; then
778 - eerror "Test suite failed! :("
779 -
780 - if [[ -z "${_has_increased_ulimit}" ]]; then
781 - eerror "Probably because open file limit couldn't be set to 3072."
782 - fi
783 -
784 - if has userpriv ${FEATURES}; then
785 - eerror "Please try to reproduce the test suite failure with FEATURES=-userpriv " \
786 - "before you submit a bug report."
787 - fi
788 -
789 - fi
790 -}
791 -
792 -src_install() {
793 - local DOCS=(
794 - AUTHORS
795 - ChangeLog
796 - "${FILESDIR}"/README.gentoo
797 - )
798 -
799 - use doc && local HTML_DOCS=( "${S}/docs/build/." )
800 -
801 - default
802 -
803 - newconfd "${FILESDIR}/${PN}.confd-r1" ${PN}
804 - newinitd "${FILESDIR}/${PN}.initd-r1" ${PN}
805 -
806 - keepdir /var/empty/dev
807 - keepdir /var/spool/${PN}
808 - keepdir /etc/ssl/${PN}
809 - keepdir /etc/${PN}.d
810 -
811 - insinto /etc
812 - newins "${FILESDIR}/${PN}.conf" ${PN}.conf
813 -
814 - insinto /etc/rsyslog.d/
815 - newins "${FILESDIR}/50-default-r1.conf" 50-default.conf
816 -
817 - insinto /etc/logrotate.d/
818 - newins "${FILESDIR}/${PN}-r1.logrotate" ${PN}
819 -
820 - if use mysql; then
821 - insinto /usr/share/doc/${PF}/scripts/mysql
822 - doins plugins/ommysql/createDB.sql
823 - fi
824 -
825 - if use postgres; then
826 - insinto /usr/share/doc/${PF}/scripts/pgsql
827 - doins plugins/ompgsql/createDB.sql
828 - fi
829 -
830 - prune_libtool_files --modules
831 -}
832 -
833 -pkg_postinst() {
834 - local advertise_readme=0
835 -
836 - if [[ -z "${REPLACING_VERSIONS}" ]]; then
837 - # This is a new installation
838 -
839 - advertise_readme=1
840 -
841 - if use mysql || use postgres; then
842 - echo
843 - elog "Sample SQL scripts for MySQL & PostgreSQL have been installed to:"
844 - elog " /usr/share/doc/${PF}/scripts"
845 - fi
846 -
847 - if use ssl; then
848 - echo
849 - elog "To create a default CA and certificates for your server and clients, run:"
850 - elog " emerge --config =${PF}"
851 - elog "on your logging server. You can run it several times,"
852 - elog "once for each logging client. The client certificates will be signed"
853 - elog "using the CA certificate generated during the first run."
854 - fi
855 - fi
856 -
857 - if [[ ${advertise_readme} -gt 0 ]]; then
858 - # We need to show the README file location
859 -
860 - echo ""
861 - elog "Please read"
862 - elog ""
863 - elog " ${EPREFIX}/usr/share/doc/${PF}/README.gentoo*"
864 - elog ""
865 - elog "for more details."
866 - fi
867 -}
868 -
869 -pkg_config() {
870 - if ! use ssl ; then
871 - einfo "There is nothing to configure for rsyslog unless you"
872 - einfo "used USE=ssl to build it."
873 - return 0
874 - fi
875 -
876 - # Make sure the certificates directory exists
877 - local CERTDIR="${EROOT}/etc/ssl/${PN}"
878 - if [[ ! -d "${CERTDIR}" ]]; then
879 - mkdir "${CERTDIR}" || die
880 - fi
881 - einfo "Your certificates will be stored in ${CERTDIR}"
882 -
883 - # Create a default CA if needed
884 - if [[ ! -f "${CERTDIR}/${PN}_ca.cert.pem" ]]; then
885 - einfo "No CA key and certificate found in ${CERTDIR}, creating them for you..."
886 - certtool --generate-privkey \
887 - --outfile "${CERTDIR}/${PN}_ca.privkey.pem" &>/dev/null
888 - chmod 400 "${CERTDIR}/${PN}_ca.privkey.pem"
889 -
890 - cat > "${T}/${PF}.$$" <<- _EOF
891 - cn = Portage automated CA
892 - ca
893 - cert_signing_key
894 - expiration_days = 3650
895 - _EOF
896 -
897 - certtool --generate-self-signed \
898 - --load-privkey "${CERTDIR}/${PN}_ca.privkey.pem" \
899 - --outfile "${CERTDIR}/${PN}_ca.cert.pem" \
900 - --template "${T}/${PF}.$$" &>/dev/null
901 - chmod 400 "${CERTDIR}/${PN}_ca.privkey.pem"
902 -
903 - # Create the server certificate
904 - echo
905 - einfon "Please type the Common Name of the SERVER you wish to create a certificate for: "
906 - read -r CN
907 -
908 - einfo "Creating private key and certificate for server ${CN}..."
909 - certtool --generate-privkey \
910 - --outfile "${CERTDIR}/${PN}_${CN}.key.pem" &>/dev/null
911 - chmod 400 "${CERTDIR}/${PN}_${CN}.key.pem"
912 -
913 - cat > "${T}/${PF}.$$" <<- _EOF
914 - cn = ${CN}
915 - tls_www_server
916 - dns_name = ${CN}
917 - expiration_days = 3650
918 - _EOF
919 -
920 - certtool --generate-certificate \
921 - --outfile "${CERTDIR}/${PN}_${CN}.cert.pem" \
922 - --load-privkey "${CERTDIR}/${PN}_${CN}.key.pem" \
923 - --load-ca-certificate "${CERTDIR}/${PN}_ca.cert.pem" \
924 - --load-ca-privkey "${CERTDIR}/${PN}_ca.privkey.pem" \
925 - --template "${T}/${PF}.$$" &>/dev/null
926 - chmod 400 "${CERTDIR}/${PN}_${CN}.cert.pem"
927 -
928 - else
929 - einfo "Found existing ${CERTDIR}/${PN}_ca.cert.pem, skipping CA and SERVER creation."
930 - fi
931 -
932 - # Create a client certificate
933 - echo
934 - einfon "Please type the Common Name of the CLIENT you wish to create a certificate for: "
935 - read -r CN
936 -
937 - einfo "Creating private key and certificate for client ${CN}..."
938 - certtool --generate-privkey \
939 - --outfile "${CERTDIR}/${PN}_${CN}.key.pem" &>/dev/null
940 - chmod 400 "${CERTDIR}/${PN}_${CN}.key.pem"
941 -
942 - cat > "${T}/${PF}.$$" <<- _EOF
943 - cn = ${CN}
944 - tls_www_client
945 - dns_name = ${CN}
946 - expiration_days = 3650
947 - _EOF
948 -
949 - certtool --generate-certificate \
950 - --outfile "${CERTDIR}/${PN}_${CN}.cert.pem" \
951 - --load-privkey "${CERTDIR}/${PN}_${CN}.key.pem" \
952 - --load-ca-certificate "${CERTDIR}/${PN}_ca.cert.pem" \
953 - --load-ca-privkey "${CERTDIR}/${PN}_ca.privkey.pem" \
954 - --template "${T}/${PF}.$$" &>/dev/null
955 - chmod 400 "${CERTDIR}/${PN}_${CN}.cert.pem"
956 -
957 - rm -f "${T}/${PF}.$$"
958 -
959 - echo
960 - einfo "Here is the documentation on how to encrypt your log traffic:"
961 - einfo " https://www.rsyslog.com/doc/rsyslog_tls.html"
962 -}