aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--app-admin/rsyslog/Manifest2
-rw-r--r--app-admin/rsyslog/files/50-default-r1.conf107
-rw-r--r--app-admin/rsyslog/files/README.gentoo36
-rw-r--r--app-admin/rsyslog/files/rsyslog-8.40.0-fix-omusrmsg.patch13
-rw-r--r--app-admin/rsyslog/files/rsyslog-r1.logrotate45
-rw-r--r--app-admin/rsyslog/files/rsyslog.conf61
-rw-r--r--app-admin/rsyslog/files/rsyslog.confd-r130
-rw-r--r--app-admin/rsyslog/files/rsyslog.initd-r172
-rw-r--r--app-admin/rsyslog/metadata.xml45
-rw-r--r--app-admin/rsyslog/rsyslog-8.40.0-r1.ebuild459
10 files changed, 0 insertions, 870 deletions
diff --git a/app-admin/rsyslog/Manifest b/app-admin/rsyslog/Manifest
deleted file mode 100644
index bd5a10ec..00000000
--- a/app-admin/rsyslog/Manifest
+++ /dev/null
@@ -1,2 +0,0 @@
-DIST rsyslog-8.40.0.tar.gz 2726022 BLAKE2B 33f7f2018200a20b01dbfabeeab592aa09d530edd313bb13f16c47cf3f67aebd9c465af3f1e468ca3d352cd83e4f4eee567c6fd54bbaee1723bee56f4631b440 SHA512 3d5d4f92e37ad9bf3767d5d7fc87fcb7956656f676a9495c78abd12fe9072ec8763b50543b198308a71d5d919721fb9b84b6725dd83a9d9b8a1639d81382c0dd
-DIST rsyslog-doc-8.40.0.tar.gz 7709769 BLAKE2B cda3bbd005120e7100bb36cf4c0f99d3a037525c5451ead5957f4dfe06eaceeba8fb2e266f53203bee6fae97898774ee17862a52ca1dae99aeb3534bbfadcd60 SHA512 2e2f37336948984a8cf0e098eb46e61fe4de6366d63a98204ecd558f4e21b7c1f222659f7bdecdd22e0a61d34c442b4734dbe72a72e8716c768a900b954d473f
diff --git a/app-admin/rsyslog/files/50-default-r1.conf b/app-admin/rsyslog/files/50-default-r1.conf
deleted file mode 100644
index 920c214f..00000000
--- a/app-admin/rsyslog/files/50-default-r1.conf
+++ /dev/null
@@ -1,107 +0,0 @@
-#######################
-### DEFAULT ACTIONS ###
-#######################
-
-auth,authpriv.* action(
- name="action_auth"
- type="omfile"
- File="/var/log/auth.log"
- FileCreateMode="0600"
- FileOwner="root"
- FileGroup="adm"
- Sync="off"
-)
-
-cron.* action(
- name="action_cron"
- type="omfile"
- File="/var/log/cron.log"
- FileOwner="root"
- FileGroup="adm"
-)
-
-daemon.* action(
- name="action_daemon"
- type="omfile"
- File="/var/log/daemon.log"
- FileOwner="root"
- FileGroup="adm"
-)
-
-kern.* action(
- name="action_kern"
- type="omfile"
- File="/var/log/kern.log"
- FileOwner="root"
- FileGroup="adm"
-)
-
-lpr.* action(
- name="action_lpr"
- type="omfile"
- File="/var/log/lpr.log"
- FileOwner="root"
- FileGroup="adm"
-)
-
-mail.* action(
- name="action_mail"
- type="omfile"
- File="/var/log/mail.log"
- FileOwner="root"
- FileGroup="adm"
-)
-
-news.* action(
- name="action_news"
- type="omfile"
- File="/var/log/news.log"
- FileOwner="root"
- FileGroup="adm"
-)
-
-user.* action(
- name="action_user"
- type="omfile"
- File="/var/log/user.log"
- FileOwner="root"
- FileGroup="adm"
-)
-
-*.=debug;auth,authpriv,news,mail.none action(
- name="action_debug"
- type="omfile"
- File="/var/log/debug.log"
- FileOwner="root"
- FileGroup="adm"
-)
-
-*.info;auth,authpriv,cron,daemon,lpr,mail,news.none action(
- name="action_messages"
- type="omfile"
- File="/var/log/messages"
- FileOwner="root"
- FileGroup="adm"
-)
-
-# Uncomment the following directive to re-enable the
-# deprecated "/var/log/syslog" log file (don't forget to re-enable log
-# rotation in "/etc/logrotate.d/rsyslog" if you do that!)
-#*.*;auth,authpriv.none action(
-# name="action_syslog"
-# type="omfile"
-# File="/var/log/syslog"
-# FileOwner="root"
-# FileGroup="adm"
-#)
-
-*.emerg action(
- name="action_emerge"
- type="omusrmsg"
- Users="*"
- action.execOnlyOnceEveryInterval="10"
-)
-
-# Create an additional socket for the default chroot location
-# (used by net-misc/openssh[hpn], see https://bugs.gentoo.org/490744)
-input(type="imuxsock" Socket="/var/empty/dev/log")
diff --git a/app-admin/rsyslog/files/README.gentoo b/app-admin/rsyslog/files/README.gentoo
deleted file mode 100644
index 9f0666c8..00000000
--- a/app-admin/rsyslog/files/README.gentoo
+++ /dev/null
@@ -1,36 +0,0 @@
-Introduction
-============
-
-Since rsyslog version 7.6 we are shipping a new default Gentoo
-configuration. See bug #501982 to learn more about what we were trying to
-achieve by rewriting the entire configuration.
-
-
-Important changes
-=================
-
-1. "/var/log/syslog" log file is now deprecated
-
- Beginning with rsyslog-7.6, the "/var/log/syslog" log file will no
- longer being written per default. We are considering this file as
- deprecated/obsolet for the typical user/system.
- The content from this log file is still availble through other
- (dedicated) log files, see
-
- - /var/log/cron.log
- - /var/log/daemon.log
- - /var/log/mail.log
- - /var/log/messages
-
- If you really need the old "/var/log/syslog" log file, all you have to
- do is uncommenting the corresponding configuration directive in
- "/etc/rsyslog.d/50-default.conf".
-
- If you do so, don't forget to re-enable log rotation in
- "/etc/logrotate.d/rsyslog", too.
-
-
-2. An additional input socket in "/var/empty/dev/log" (default chroot
- location) will be created per default
-
- See bug #490744 for further details.
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
deleted file mode 100644
index 9247d0b0..00000000
--- a/app-admin/rsyslog/files/rsyslog-8.40.0-fix-omusrmsg.patch
+++ /dev/null
@@ -1,13 +0,0 @@
-https://github.com/rsyslog/rsyslog/issues/3346
-
---- a/tools/omusrmsg.c
-+++ b/tools/omusrmsg.c
-@@ -261,7 +261,7 @@ static rsRetVal wallmsg(uchar* pMsg, instanceData *pData)
-
- /* compute the device name */
- strcpy(p, _PATH_DEV);
-- memcpy(p, ut.ut_line, UNAMESZ);
-+ strncat(p, ut.ut_line, UNAMESZ);
-
- /* we must be careful when writing to the terminal. A terminal may block
- * (for example, a user has pressed <ctl>-s). In that case, we can not
diff --git a/app-admin/rsyslog/files/rsyslog-r1.logrotate b/app-admin/rsyslog/files/rsyslog-r1.logrotate
deleted file mode 100644
index 3a92ba37..00000000
--- a/app-admin/rsyslog/files/rsyslog-r1.logrotate
+++ /dev/null
@@ -1,45 +0,0 @@
-# Uncomment the following directive if you have re-enabled
-# "/var/log/syslog" in "/etc/rsyslog.d/50-default.conf"
-#/var/log/syslog
-#{
-# rotate 7
-# daily
-# missingok
-# notifempty
-# delaycompress
-# compress
-# postrotate
-# if type -p systemctl 2>&1 1>/dev/null && systemctl is-system-running 2>&1 1>/dev/null ; then
-# systemctl kill -s HUP rsyslog.service
-# else
-# test -r /run/rsyslogd.pid && kill -HUP $(cat /run/rsyslogd.pid) 2>&1 1>/dev/null
-# fi
-# endscript
-#}
-
-/var/log/auth.log
-/var/log/cron.log
-/var/log/daemon.log
-/var/log/kern.log
-/var/log/lpr.log
-/var/log/mail.log
-/var/log/news.log
-/var/log/user.log
-/var/log/debug.log
-/var/log/messages
-{
- rotate 4
- weekly
- missingok
- notifempty
- compress
- delaycompress
- sharedscripts
- postrotate
- if type -p systemctl 2>&1 1>/dev/null && systemctl is-system-running 2>&1 1>/dev/null ; then
- systemctl kill -s HUP rsyslog.service
- else
- test -r /run/rsyslogd.pid && kill -HUP $(cat /run/rsyslogd.pid) 2>&1 1>/dev/null
- fi
- endscript
-}
diff --git a/app-admin/rsyslog/files/rsyslog.conf b/app-admin/rsyslog/files/rsyslog.conf
deleted file mode 100644
index da484598..00000000
--- a/app-admin/rsyslog/files/rsyslog.conf
+++ /dev/null
@@ -1,61 +0,0 @@
-# /etc/rsyslog.conf
-#
-# This configuration is based on RainerScript, the new recommended syntax
-# for RSYSLOG. See http://www.rsyslog.com/doc/rainerscript.html for further
-# details.
-#
-# But if you don't want to learn something new at moment, don't worry: The
-# legacy syntax is still supported.
-#
-# You may want to use the new RSYSLOG configuration builder to create your
-# own more advanced configuration: http://www.rsyslog.com/rsyslog-configuration-builder/
-
-# Check config syntax on startup and abort if unclean (default: off)
-#$AbortOnUncleanConfig on
-
-
-###############
-### MODULES ###
-###############
-
-# Read syslog messages from default Unix socket /dev/log (e.g. via logger command)
-module(load="imuxsock")
-
-# Read messages from the kernel log and submits them to the syslog engine
-module(load="imklog")
-
-# Inject "--MARK--" messages every $Interval (seconds)
-#module(load="immark" Interval="600")
-
-# Read syslog messages from UDP
-#module(load="imudp")
-#input(type="imudp" port="514")
-
-# Read syslog messages from TCP
-#module(load="imtcp")
-#input(type="imtcp" port="514")
-
-
-#########################
-### GLOBAL DIRECTIVES ###
-#########################
-
-# Where to place spool and state files
-$WorkDirectory /var/spool/rsyslog
-
-# Reduce repeating messages (default: off)
-#$RepeatedMsgReduction on
-
-# Set defaults for every output file
-$Umask 0022
-
-module(
- load="builtin:omfile"
- Template="RSYSLOG_TraditionalFileFormat"
- FileCreateMode="0644"
- DirCreateMode="0755"
-)
-
-
-# Include all conf files in /etc/rsyslog.d/
-$IncludeConfig /etc/rsyslog.d/*.conf
diff --git a/app-admin/rsyslog/files/rsyslog.confd-r1 b/app-admin/rsyslog/files/rsyslog.confd-r1
deleted file mode 100644
index da48c01c..00000000
--- a/app-admin/rsyslog/files/rsyslog.confd-r1
+++ /dev/null
@@ -1,30 +0,0 @@
-# /etc/conf.d/rsyslog
-
-# Configuration file
-#RSYSLOG_CONFIGFILE="/etc/rsyslog.conf"
-
-# PID file
-# If you should ever change this, remember to update
-# "/etc/logrotate.d/rsyslog", too.
-#RSYSLOG_PIDFILE="/run/rsyslogd.pid"
-
-# You can use this configuration option to pass additional options to the
-# start-stop-daemon, see start-stop-daemon(8) for more details.
-# Per default we wait 1000ms after we have started the service to ensure
-# that the daemon is really up and running.
-#RSYSLOG_SSDARGS="--wait 1000"
-
-# The termination timeout (start-stop-daemon parameter "retry") ensures
-# that the service will be terminated within a given time (60 + 5 seconds
-# per default) when you are stopping the service.
-# You need to increase the value when you are working with a large queue.
-# See http://www.rsyslog.com/doc/queues.html for further information.
-#RSYSLOG_TERMTIMEOUT="TERM/60/KILL/5"
-
-
-# Options to rsyslogd
-# See rsyslogd(8) for more details
-# Notes:
-# * Do not specify another PIDFILE but use the variable above to change the location
-# * Do not specify another CONFIGFILE but use the variable above to change the location
-#RSYSLOG_OPTS=""
diff --git a/app-admin/rsyslog/files/rsyslog.initd-r1 b/app-admin/rsyslog/files/rsyslog.initd-r1
deleted file mode 100644
index 8d2ff8e8..00000000
--- a/app-admin/rsyslog/files/rsyslog.initd-r1
+++ /dev/null
@@ -1,72 +0,0 @@
-#!/sbin/openrc-run
-# Copyright 1999-2018 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-RSYSLOG_CONFIGFILE=${RSYSLOG_CONFIGFILE:-"/etc/rsyslog.conf"}
-RSYSLOG_PIDFILE=${RSYSLOG_PIDFILE:-"/run/rsyslogd.pid"}
-RSYSLOG_SSDARGS=${RSYSLOG_SSDARGS:-"--wait 1000"}
-RSYSLOG_TERMTIMEOUT=${RSYSLOG_TERMTIMEOUT:-"TERM/60/KILL/5"}
-RSYSLOG_OPTS=${RSYSLOG_OPTS:-""}
-
-command="/usr/sbin/rsyslogd"
-command_args="${RSYSLOG_OPTS} -f \"${RSYSLOG_CONFIGFILE}\" -i \"${RSYSLOG_PIDFILE}\""
-start_stop_daemon_args="${RSYSLOG_SSDARGS}"
-pidfile="${RSYSLOG_PIDFILE}"
-retry="${RSYSLOG_TERMTIMEOUT}"
-
-required_files="${RSYSLOG_CONFIGFILE}"
-
-description="RSYSLOG is the rocket-fast system for log processing (syslog replacement)."
-
-extra_commands="configtest"
-extra_started_commands="rotate"
-
-description_configtest="Run rsyslogd's internal config check."
-
-description_rotate="Sends rsyslogd a signal to re-open its log files."
-
-depend() {
- need clock hostname localmount
- provide logger
-}
-
-start_pre() {
- if [ "${RC_CMD}" != "restart" ]; then
- configtest || return 1
- fi
-}
-
-stop_pre() {
- if [ "${RC_CMD}" = "restart" ]; then
- configtest || return 1
- fi
-}
-
-stop_post() {
- if [ -f "${RSYSLOG_PIDFILE}" ]; then
- vebegin "Removing stale PID file"
- rm --force "${RSYSLOG_PIDFILE}"
- veend $?
- fi
-}
-
-configtest() {
- local _command_args="-N 999 -f \"${RSYSLOG_CONFIGFILE}\""
- local _retval=0
-
- ebegin "Checking rsyslogd's configuration"
- eval ${command} ${_command_args} >/dev/null 2>&1
- _retval=$?
-
- if [ ${_retval} -ne 0 ]; then
- eval ${command} ${_command_args}
- fi
-
- eend ${_retval} "failed, please correct errors above"
-}
-
-rotate() {
- ebegin "Re-opening rsyslogd logs"
- start-stop-daemon --signal SIGHUP --pidfile "${RSYSLOG_PIDFILE}"
- eend $?
-}
diff --git a/app-admin/rsyslog/metadata.xml b/app-admin/rsyslog/metadata.xml
deleted file mode 100644
index ba4e59d2..00000000
--- a/app-admin/rsyslog/metadata.xml
+++ /dev/null
@@ -1,45 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
-<pkgmetadata>
- <maintainer type="person">
- <email>whissi@gentoo.org</email>
- <name>Thomas Deutschmann</name>
- </maintainer>
- <use>
- <flag name="curl">Enable http_request() function in RainerScript (requires <pkg>net-misc/curl</pkg>)</flag>
- <flag name="dbi">Build the general database output module (requires <pkg>dev-db/libdbi</pkg>)</flag>
- <flag name="elasticsearch">Build the Elasticsearch output module (requires <pkg>net-misc/curl</pkg>)</flag>
- <flag name="gcrypt">Add support for encrypted log files using <pkg>dev-libs/libgcrypt</pkg></flag>
- <flag name="gnutls">Build the GnuTLS network stream driver (requires <pkg>net-libs/gnutls</pkg>)</flag>
- <flag name="grok">Build the grok modify module (requires <pkg>dev-libs/grok</pkg>)</flag>
- <flag name="kafka">Build the Apache Kafka input/output module (requires <pkg>dev-libs/librdkafka</pkg>)</flag>
- <flag name="kerberos">Build the GSSAPI input and output module (requires <pkg>virtual/krb5</pkg>)</flag>
- <flag name="kubernetes">Build the kubernetes modify plugin (requires <pkg>net-misc/curl</pkg>)</flag>
- <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>
- <flag name="mdblookup">Build the MaxMind DB lookup message modify plugin using <pkg>dev-libs/libmaxminddb</pkg></flag>
- <flag name="mongodb">Build the MongoDB output module (requires <pkg>dev-libs/libmongo-client</pkg>)</flag>
- <flag name="mysql">Build the MySQL database output module (requires <pkg>virtual/mysql</pkg>)</flag>
- <flag name="normalize">Build the normalize modify module (requires <pkg>dev-libs/libee</pkg> and <pkg>dev-libs/liblognorm</pkg>)</flag>
- <flag name="omhttp">Build the http output module (requires <pkg>net-misc/curl</pkg>)</flag>
- <flag name="omhttpfs">Build the httpfs output module (requires <pkg>net-misc/curl</pkg>)</flag>
- <flag name="omudpspoof">Build the udpspoof output module (requires <pkg>net-libs/libnet</pkg>)</flag>
- <flag name="openssl">Build the OpenSSL network stream driver (requires <pkg>dev-libs/openssl</pkg>)</flag>
- <flag name="postgres">Build the PostgreSQL database output module (requires <pkg>dev-db/postgresql</pkg>)</flag>
- <flag name="rabbitmq">Build the RabbitMQ output module (requires <pkg>net-libs/rabbitmq-c</pkg>)</flag>
- <flag name="redis">Build the Redis output module using (requires <pkg>dev-libs/hiredis</pkg>)</flag>
- <flag name="relp">Build the Reliable Event Logging Protocol (RELP) output module (requires <pkg>dev-libs/librelp</pkg>)</flag>
- <flag name="rfc3195">Build the rfc3195 input module (requires <pkg>dev-libs/liblogging</pkg>)</flag>
- <flag name="rfc5424hmac">Build the rfc5424hmac modify module (requires <pkg>dev-libs/openssl</pkg> or <pkg>dev-libs/libressl</pkg>)</flag>
- <flag name="snmp">Build the snmp modify and output module (requires <pkg>net-analyzer/net-snmp</pkg>)</flag>
- <flag name="ssl">Add support for encrypted client/server communication (requires <pkg>net-libs/gnutls</pkg>)</flag>
- <flag name="systemd">Build the journal input and output module (requires <pkg>sys-apps/systemd</pkg>)</flag>
- <flag name="uuid">Include UUIDs in messages (requires <pkg>sys-apps/util-linux</pkg>)</flag>
- <flag name="usertools">Installs the user tools (rsgtutil, rscryutil...) corresponding to the set USE flags</flag>
- <flag name="xxhash">Enable xxHash support in fmhash module (requires <pkg>dev-libs/xxhash</pkg>)</flag>
- <flag name="zeromq">Build the ZeroMQ input and output modules (requires <pkg>net-libs/czmq</pkg>)</flag>
- </use>
- <upstream>
- <bugs-to>https://github.com/rsyslog/rsyslog/issues</bugs-to>
- <remote-id type="cpe">cpe:/a:rsyslog:rsyslog</remote-id>
- </upstream>
-</pkgmetadata>
diff --git a/app-admin/rsyslog/rsyslog-8.40.0-r1.ebuild b/app-admin/rsyslog/rsyslog-8.40.0-r1.ebuild
deleted file mode 100644
index 54da8487..00000000
--- a/app-admin/rsyslog/rsyslog-8.40.0-r1.ebuild
+++ /dev/null
@@ -1,459 +0,0 @@
-# Copyright 1999-2018 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI="6"
-PYTHON_COMPAT=( python{2_7,3_4,3_5,3_6,3_7} )
-
-inherit autotools eutils linux-info python-any-r1 systemd
-
-DESCRIPTION="An enhanced multi-threaded syslogd with database support and more"
-HOMEPAGE="https://www.rsyslog.com/"
-
-if [[ ${PV} == "9999" ]]; then
- EGIT_REPO_URI="https://github.com/rsyslog/${PN}.git"
-
- DOC_REPO_URI="https://github.com/rsyslog/${PN}-doc.git"
-
- inherit git-r3
-else
- KEYWORDS="amd64 ~arm x86"
-
- SRC_URI="
- https://www.rsyslog.com/files/download/${PN}/${P}.tar.gz
- doc? ( https://www.rsyslog.com/files/download/${PN}/${PN}-doc-${PV}.tar.gz )
- "
-
- PATCHES=( "${FILESDIR}"/${PN}-8.40.0-fix-omusrmsg.patch )
-fi
-
-LICENSE="GPL-3 LGPL-3 Apache-2.0"
-SLOT="0"
-IUSE="curl dbi debug doc elasticsearch +gcrypt grok gnutls jemalloc kafka kerberos kubernetes libressl mdblookup"
-IUSE+=" mongodb mysql normalize omhttp omhttpfs omudpspoof openssl postgres rabbitmq redis relp rfc3195 rfc5424hmac"
-IUSE+=" snmp ssl systemd test usertools +uuid xxhash zeromq"
-RESTRICT="!test? ( test )"
-
-RDEPEND="
- >=dev-libs/libfastjson-0.99.8:=
- >=dev-libs/libestr-0.1.9
- >=sys-libs/zlib-1.2.5
- curl? ( >=net-misc/curl-7.35.0 )
- dbi? ( >=dev-db/libdbi-0.8.3 )
- elasticsearch? ( >=net-misc/curl-7.35.0 )
- gcrypt? ( >=dev-libs/libgcrypt-1.5.3:= )
- grok? ( >=dev-libs/grok-0.9.2 )
- jemalloc? ( >=dev-libs/jemalloc-3.3.1:= )
- kafka? ( >=dev-libs/librdkafka-0.9.0.99:= )
- kerberos? ( virtual/krb5 )
- kubernetes? ( >=net-misc/curl-7.35.0 )
- mdblookup? ( dev-libs/libmaxminddb:= )
- mongodb? ( >=dev-libs/mongo-c-driver-1.1.10:= )
- mysql? ( virtual/libmysqlclient:= )
- normalize? (
- >=dev-libs/libee-0.4.0
- >=dev-libs/liblognorm-2.0.3:=
- )
- omhttpfs? ( >=net-misc/curl-7.35.0 )
- omudpspoof? ( >=net-libs/libnet-1.1.6 )
- postgres? ( >=dev-db/postgresql-8.4.20:= )
- rabbitmq? ( >=net-libs/rabbitmq-c-0.3.0:= )
- redis? ( >=dev-libs/hiredis-0.11.0:= )
- relp? ( >=dev-libs/librelp-1.2.17:= )
- rfc3195? ( >=dev-libs/liblogging-1.0.1:=[rfc3195] )
- rfc5424hmac? (
- !libressl? ( >=dev-libs/openssl-0.9.8y:0= )
- libressl? ( dev-libs/libressl:= )
- )
- snmp? ( >=net-analyzer/net-snmp-5.7.2 )
- ssl? (
- gnutls? ( >=net-libs/gnutls-2.12.23:0= )
- openssl? (
- !libressl? ( dev-libs/openssl:0= )
- libressl? ( dev-libs/libressl:0= )
- )
- )
- systemd? ( >=sys-apps/systemd-234 )
- uuid? ( sys-apps/util-linux:0= )
- xxhash? ( dev-libs/xxhash:= )
- zeromq? (
- >=net-libs/czmq-3.0.2
- )"
-DEPEND="${RDEPEND}
- >=sys-devel/autoconf-archive-2015.02.24
- virtual/pkgconfig
- elibc_musl? ( sys-libs/queue )
- test? (
- >=dev-libs/liblogging-1.0.1[stdlog]
- jemalloc? ( <sys-libs/libfaketime-0.9.7 )
- !jemalloc? ( sys-libs/libfaketime )
- ${PYTHON_DEPS}
- )"
-
-REQUIRED_USE="
- kubernetes? ( normalize )
- ssl? ( || ( gnutls openssl ) )
-"
-
-if [[ ${PV} == "9999" ]]; then
- DEPEND+=" doc? ( >=dev-python/sphinx-1.1.3-r7 )"
- DEPEND+=" >=sys-devel/flex-2.5.39-r1"
- DEPEND+=" >=sys-devel/bison-2.4.3"
- DEPEND+=" >=dev-python/docutils-0.12"
-fi
-
-CONFIG_CHECK="~INOTIFY_USER"
-WARNING_INOTIFY_USER="CONFIG_INOTIFY_USER isn't set. Imfile module on this system will only support polling mode!"
-
-pkg_setup() {
- use test && python-any-r1_pkg_setup
-}
-
-src_unpack() {
- if [[ ${PV} == "9999" ]]; then
- git-r3_fetch
- git-r3_checkout
- else
- unpack ${P}.tar.gz
- fi
-
- if use doc; then
- if [[ ${PV} == "9999" ]]; then
- local _EGIT_BRANCH=
- if [[ -n "${EGIT_BRANCH}" ]]; then
- # Cannot use rsyslog commits/branches for documentation repository
- _EGIT_BRANCH=${EGIT_BRANCH}
- unset EGIT_BRANCH
- fi
-
- git-r3_fetch "${DOC_REPO_URI}"
- git-r3_checkout "${DOC_REPO_URI}" "${S}"/docs
-
- if [[ -n "${_EGIT_BRANCH}" ]]; then
- # Restore previous EGIT_BRANCH information
- EGIT_BRANCH=${_EGIT_BRANCH}
- fi
- else
- cd "${S}" || die "Cannot change dir into '${S}'"
- mkdir docs || die "Failed to create docs directory"
- cd docs || die "Failed to change dir into '${S}/docs'"
- unpack ${PN}-doc-${PV}.tar.gz
- fi
- fi
-}
-
-src_prepare() {
- default
-
- eautoreconf
-}
-
-src_configure() {
- # Maintainer notes:
- # * Guardtime support is missing because libgt isn't yet available
- # in portage.
- # * Hadoop's HDFS file system output module is currently not
- # supported in Gentoo because nobody is able to test it
- # (JAVA dependency).
- # * dev-libs/hiredis doesn't provide pkg-config (see #504614,
- # upstream PR 129 and 136) so we need to export HIREDIS_*
- # variables because rsyslog's build system depends on pkg-config.
-
- if use redis; then
- export HIREDIS_LIBS="-L${EPREFIX}/usr/$(get_libdir) -lhiredis"
- export HIREDIS_CFLAGS="-I${EPREFIX}/usr/include"
- fi
-
- local myeconfargs=(
- --disable-debug-symbols
- --disable-generate-man-pages
- --without-valgrind-testbench
- --disable-liblogging-stdlog
- $(use_enable test testbench)
- $(use_enable test libfaketime)
- $(use_enable test extended-tests)
- # Input Plugins without depedencies
- --enable-imdiag
- --enable-imfile
- --enable-impstats
- --enable-imptcp
- # Message Modificiation Plugins without depedencies
- --enable-mmanon
- --enable-mmaudit
- --enable-mmcount
- --enable-mmfields
- --enable-mmjsonparse
- --enable-mmpstrucdata
- --enable-mmrm1stspace
- --enable-mmsequence
- --enable-mmutf8fix
- # Output Modification Plugins without dependencies
- --enable-mail
- --enable-omprog
- --enable-omruleset
- --enable-omstdout
- --enable-omuxsock
- # Misc
- --enable-fmhash
- $(use_enable xxhash fmhash-xxhash)
- --enable-pmaixforwardedfrom
- --enable-pmciscoios
- --enable-pmcisconames
- --enable-pmlastmsg
- $(use_enable normalize pmnormalize)
- --enable-pmnull
- --enable-pmpanngfw
- --enable-pmsnare
- # DB
- $(use_enable dbi libdbi)
- $(use_enable mongodb ommongodb)
- $(use_enable mysql)
- $(use_enable postgres pgsql)
- $(use_enable redis omhiredis)
- # Debug
- $(use_enable debug)
- $(use_enable debug diagtools)
- $(use_enable debug valgrind)
- # Misc
- $(use_enable curl fmhttp)
- $(use_enable elasticsearch)
- $(use_enable gcrypt libgcrypt)
- $(use_enable jemalloc)
- $(use_enable kafka imkafka)
- $(use_enable kafka omkafka)
- $(use_enable kerberos gssapi-krb5)
- $(use_enable kubernetes mmkubernetes)
- $(use_enable normalize mmnormalize)
- $(use_enable mdblookup mmdblookup)
- $(use_enable grok mmgrok)
- $(use_enable omhttp)
- $(use_enable omhttpfs)
- $(use_enable omudpspoof)
- $(use_enable rabbitmq omrabbitmq)
- $(use_enable relp)
- $(use_enable rfc3195)
- $(use_enable rfc5424hmac mmrfc5424addhmac)
- $(use_enable snmp)
- $(use_enable snmp mmsnmptrapd)
- $(use_enable gnutls)
- $(use_enable openssl)
- $(use_enable systemd imjournal)
- $(use_enable systemd omjournal)
- $(use_enable usertools)
- $(use_enable uuid)
- $(use_enable zeromq imczmq)
- $(use_enable zeromq omczmq)
- --with-systemdsystemunitdir="$(systemd_get_systemunitdir)"
- )
-
- econf "${myeconfargs[@]}"
-}
-
-src_compile() {
- default
-
- if use doc && [[ "${PV}" == "9999" ]]; then
- einfo "Building documentation ..."
- local doc_dir="${S}/docs"
- cd "${doc_dir}" || die "Cannot chdir into \"${doc_dir}\"!"
- sphinx-build -b html source build || die "Building documentation failed!"
- fi
-}
-
-src_test() {
- local _has_increased_ulimit=
-
- # Sometimes tests aren't executable (i.e. when added via patch)
- einfo "Adjusting permissions of test scripts ..."
- find "${S}"/tests -type f -name '*.sh' \! -perm -111 -exec chmod a+x '{}' \; || \
- die "Failed to adjust test scripts permission"
-
- if ulimit -n 3072; then
- _has_increased_ulimit="true"
- fi
-
- if ! emake --jobs 1 check; then
- eerror "Test suite failed! :("
-
- if [[ -z "${_has_increased_ulimit}" ]]; then
- eerror "Probably because open file limit couldn't be set to 3072."
- fi
-
- if has userpriv ${FEATURES}; then
- eerror "Please try to reproduce the test suite failure with FEATURES=-userpriv " \
- "before you submit a bug report."
- fi
-
- fi
-}
-
-src_install() {
- local DOCS=(
- AUTHORS
- ChangeLog
- "${FILESDIR}"/README.gentoo
- )
-
- use doc && local HTML_DOCS=( "${S}/docs/build/." )
-
- default
-
- newconfd "${FILESDIR}/${PN}.confd-r1" ${PN}
- newinitd "${FILESDIR}/${PN}.initd-r1" ${PN}
-
- keepdir /var/empty/dev
- keepdir /var/spool/${PN}
- keepdir /etc/ssl/${PN}
- keepdir /etc/${PN}.d
-
- insinto /etc
- newins "${FILESDIR}/${PN}.conf" ${PN}.conf
-
- insinto /etc/rsyslog.d/
- newins "${FILESDIR}/50-default-r1.conf" 50-default.conf
-
- insinto /etc/logrotate.d/
- newins "${FILESDIR}/${PN}-r1.logrotate" ${PN}
-
- if use mysql; then
- insinto /usr/share/doc/${PF}/scripts/mysql
- doins plugins/ommysql/createDB.sql
- fi
-
- if use postgres; then
- insinto /usr/share/doc/${PF}/scripts/pgsql
- doins plugins/ompgsql/createDB.sql
- fi
-
- prune_libtool_files --modules
-}
-
-pkg_postinst() {
- local advertise_readme=0
-
- if [[ -z "${REPLACING_VERSIONS}" ]]; then
- # This is a new installation
-
- advertise_readme=1
-
- if use mysql || use postgres; then
- echo
- elog "Sample SQL scripts for MySQL & PostgreSQL have been installed to:"
- elog " /usr/share/doc/${PF}/scripts"
- fi
-
- if use ssl; then
- echo
- elog "To create a default CA and certificates for your server and clients, run:"
- elog " emerge --config =${PF}"
- elog "on your logging server. You can run it several times,"
- elog "once for each logging client. The client certificates will be signed"
- elog "using the CA certificate generated during the first run."
- fi
- fi
-
- if [[ ${advertise_readme} -gt 0 ]]; then
- # We need to show the README file location
-
- echo ""
- elog "Please read"
- elog ""
- elog " ${EPREFIX}/usr/share/doc/${PF}/README.gentoo*"
- elog ""
- elog "for more details."
- fi
-}
-
-pkg_config() {
- if ! use ssl ; then
- einfo "There is nothing to configure for rsyslog unless you"
- einfo "used USE=ssl to build it."
- return 0
- fi
-
- # Make sure the certificates directory exists
- local CERTDIR="${EROOT}/etc/ssl/${PN}"
- if [[ ! -d "${CERTDIR}" ]]; then
- mkdir "${CERTDIR}" || die
- fi
- einfo "Your certificates will be stored in ${CERTDIR}"
-
- # Create a default CA if needed
- if [[ ! -f "${CERTDIR}/${PN}_ca.cert.pem" ]]; then
- einfo "No CA key and certificate found in ${CERTDIR}, creating them for you..."
- certtool --generate-privkey \
- --outfile "${CERTDIR}/${PN}_ca.privkey.pem" &>/dev/null
- chmod 400 "${CERTDIR}/${PN}_ca.privkey.pem"
-
- cat > "${T}/${PF}.$$" <<- _EOF
- cn = Portage automated CA
- ca
- cert_signing_key
- expiration_days = 3650
- _EOF
-
- certtool --generate-self-signed \
- --load-privkey "${CERTDIR}/${PN}_ca.privkey.pem" \
- --outfile "${CERTDIR}/${PN}_ca.cert.pem" \
- --template "${T}/${PF}.$$" &>/dev/null
- chmod 400 "${CERTDIR}/${PN}_ca.privkey.pem"
-
- # Create the server certificate
- echo
- einfon "Please type the Common Name of the SERVER you wish to create a certificate for: "
- read -r CN
-
- einfo "Creating private key and certificate for server ${CN}..."
- certtool --generate-privkey \
- --outfile "${CERTDIR}/${PN}_${CN}.key.pem" &>/dev/null
- chmod 400 "${CERTDIR}/${PN}_${CN}.key.pem"
-
- cat > "${T}/${PF}.$$" <<- _EOF
- cn = ${CN}
- tls_www_server
- dns_name = ${CN}
- expiration_days = 3650
- _EOF
-
- certtool --generate-certificate \
- --outfile "${CERTDIR}/${PN}_${CN}.cert.pem" \
- --load-privkey "${CERTDIR}/${PN}_${CN}.key.pem" \
- --load-ca-certificate "${CERTDIR}/${PN}_ca.cert.pem" \
- --load-ca-privkey "${CERTDIR}/${PN}_ca.privkey.pem" \
- --template "${T}/${PF}.$$" &>/dev/null
- chmod 400 "${CERTDIR}/${PN}_${CN}.cert.pem"
-
- else
- einfo "Found existing ${CERTDIR}/${PN}_ca.cert.pem, skipping CA and SERVER creation."
- fi
-
- # Create a client certificate
- echo
- einfon "Please type the Common Name of the CLIENT you wish to create a certificate for: "
- read -r CN
-
- einfo "Creating private key and certificate for client ${CN}..."
- certtool --generate-privkey \
- --outfile "${CERTDIR}/${PN}_${CN}.key.pem" &>/dev/null
- chmod 400 "${CERTDIR}/${PN}_${CN}.key.pem"
-
- cat > "${T}/${PF}.$$" <<- _EOF
- cn = ${CN}
- tls_www_client
- dns_name = ${CN}
- expiration_days = 3650
- _EOF
-
- certtool --generate-certificate \
- --outfile "${CERTDIR}/${PN}_${CN}.cert.pem" \
- --load-privkey "${CERTDIR}/${PN}_${CN}.key.pem" \
- --load-ca-certificate "${CERTDIR}/${PN}_ca.cert.pem" \
- --load-ca-privkey "${CERTDIR}/${PN}_ca.privkey.pem" \
- --template "${T}/${PF}.$$" &>/dev/null
- chmod 400 "${CERTDIR}/${PN}_${CN}.cert.pem"
-
- rm -f "${T}/${PF}.$$"
-
- echo
- einfo "Here is the documentation on how to encrypt your log traffic:"
- einfo " https://www.rsyslog.com/doc/rsyslog_tls.html"
-}