diff options
Diffstat (limited to 'app-admin/rsyslog')
-rw-r--r-- | app-admin/rsyslog/ChangeLog | 10 | ||||
-rw-r--r-- | app-admin/rsyslog/Manifest | 15 | ||||
-rw-r--r-- | app-admin/rsyslog/files/6-stable/rsyslog-gentoo.conf | 90 | ||||
-rw-r--r-- | app-admin/rsyslog/files/6-stable/rsyslog.confd | 17 | ||||
-rw-r--r-- | app-admin/rsyslog/files/6-stable/rsyslog.initd | 43 | ||||
-rw-r--r-- | app-admin/rsyslog/files/6-stable/rsyslog.logrotate | 9 | ||||
-rw-r--r-- | app-admin/rsyslog/files/6-stable/rsyslog6-zeromq.patch | 96 | ||||
-rw-r--r-- | app-admin/rsyslog/rsyslog-6.2.1.ebuild | 265 |
8 files changed, 540 insertions, 5 deletions
diff --git a/app-admin/rsyslog/ChangeLog b/app-admin/rsyslog/ChangeLog index 392c457e1526..6793a388689a 100644 --- a/app-admin/rsyslog/ChangeLog +++ b/app-admin/rsyslog/ChangeLog @@ -1,6 +1,14 @@ # ChangeLog for app-admin/rsyslog # Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/app-admin/rsyslog/ChangeLog,v 1.70 2012/05/31 16:50:42 ultrabug Exp $ +# $Header: /var/cvsroot/gentoo-x86/app-admin/rsyslog/ChangeLog,v 1.71 2012/06/01 12:54:18 ultrabug Exp $ + +*rsyslog-6.2.1 (01 Jun 2012) + + 01 Jun 2012; Ultrabug <ultrabug@gentoo.org> +files/6-stable/rsyslog.confd, + +files/6-stable/rsyslog.initd, +files/6-stable/rsyslog.logrotate, + +files/6-stable/rsyslog-gentoo.conf, +files/6-stable/rsyslog6-zeromq.patch, + +rsyslog-6.2.1.ebuild: + New stable v6 branch bump, fix #398269. 31 May 2012; Ultrabug <ultrabug@gentoo.org> rsyslog-5.8.11.ebuild, rsyslog-5.8.5.ebuild, rsyslog-5.8.8.ebuild: diff --git a/app-admin/rsyslog/Manifest b/app-admin/rsyslog/Manifest index 0617f4a6d223..ae5813b9bbe9 100644 --- a/app-admin/rsyslog/Manifest +++ b/app-admin/rsyslog/Manifest @@ -5,19 +5,26 @@ AUX 5-stable/rsyslog-gentoo.conf 3998 RMD160 db8979c4cfe4aa43c6ae5583972a21037dd AUX 5-stable/rsyslog.confd 654 RMD160 ca340f748c84404df86bfdaf9ca9d47d0ff38121 SHA1 e56695ebc21a30f60f1b070f8f26236677ef5d81 SHA256 c476c2180fcceaf581d26d2da6201fbe7a2b9fc89c58456fdb3bdaf18a4cbb56 AUX 5-stable/rsyslog.initd 963 RMD160 2ab8e434338e4790db280ec05405c5ac4e333bc0 SHA1 95cb0a18517789954e2c0461b231587371f9d7e4 SHA256 cbaf49c80a8fd3ea74dbe82c85b2371aa749b3c431a76d99154616514f92f127 AUX 5-stable/rsyslog.logrotate 440 RMD160 b2599c94c718af02a641e762960b9796952411bb SHA1 228dba04c683d778bccd86f6bcd80650b9c774b4 SHA256 f0effc19bd1f1bfa367d65d6516c73509cb34545157b9e91cf6e437685dd3fe5 +AUX 6-stable/rsyslog-gentoo.conf 4008 RMD160 c87db14d530e39d44a2d050baed632ae663fe8df SHA1 4d97c144c2186c41ca5d5057742681e3a104c683 SHA256 d42b77980c46deaa3a1e6037682297150d0830b95168dbea3e3d7ad2736ea57e +AUX 6-stable/rsyslog.confd 654 RMD160 5d020a951a1603a54043b5990a22cf40781f32aa SHA1 41bd53b0fe70e9a4d32ec3c14539bad304b67094 SHA256 dbf4eab207f2b2974a5c9858a98a23ac37b5e8a98c3a837679145ed197226c6f +AUX 6-stable/rsyslog.initd 962 RMD160 389d7ad9707cab4bc70fb8b870478996ab84b737 SHA1 2e1d625e7e411ac8821910520a46845aaf43ce74 SHA256 39810239217e6475d8e08948e8ece62472b3a443f615ea179bb678526ea39ec4 +AUX 6-stable/rsyslog.logrotate 440 RMD160 47e359d6787fe71ba30ca61e118f75bc677614c2 SHA1 f6f57dfb09f40edabe7e8ad916339774e9f9a93e SHA256 60ad6683550a9bb1600f3f9ad622c5a6897483e4457a4c9f1557e109a7873e72 +AUX 6-stable/rsyslog6-zeromq.patch 3383 RMD160 3ae10477416b539a2fbe881565a71950bde7d962 SHA1 8292bdf874894177cd9902de89ae89404db57129 SHA256 0cdff584364764a2ee494e3263b679b74eee00da6cd1f9a97a4e683eac08291b DIST rsyslog-5.8.11.tar.gz 2393222 RMD160 be13514e02f121ae7b78e0177063ce8cd8a9d859 SHA1 eabba672b9cace696207028da703cf073956d505 SHA256 f75b39cf22506f7a28d986d0a446a09a0806f253dba661f125a241a1b47d6285 DIST rsyslog-5.8.5.tar.gz 2364874 RMD160 46b20433e0e5feb807b4777bb8141221fe5dd65b SHA1 a5dc735714b573f577db2892f596dcb0ef35c747 SHA256 a519704c06de1026847f69d99f31a2a32783e9547f5249dddefe805bfbc3ea50 DIST rsyslog-5.8.8.tar.gz 2387606 RMD160 db043264814e4146189d9bfb44aa45614a9e8a94 SHA1 d25bfadb08f68f8b261cf4b0db9d4951db37f673 SHA256 3e9c8db459e4e363b2289381923d54d84f2ede29c2f9c542cf21672b163aa570 +DIST rsyslog-6.2.1.tar.gz 2432332 RMD160 5039057a792d3f7e709ab2970fa5eb04f79396e9 SHA1 b49296d73f139c58b7ec56b164b8578b78b43b40 SHA256 5b21922f3466acb9511c6f58bbddd8ee269d180a5557dc23892d3b7999f66413 DIST rsyslog-zeromq.tar.gz 22223 RMD160 632a1888d3972da4ce623c8f6973c72b026b035c SHA1 e6f02c25af19022d0cc9d4782f58db3fc27a9f0f SHA256 3cca6ce8722ec5035744a9b88e65b89b35f6b2e6bbdbc9c9bba89d22addd2753 EBUILD rsyslog-5.8.11.ebuild 7383 RMD160 3b2afbe847460fb33149f1c2afe12b7873a06239 SHA1 188054432f19b7b64a66118444a300559d407fae SHA256 1e2c8405f5373f9e068752102d504474845bc1f60046020dbb47acc24c0a180a EBUILD rsyslog-5.8.5.ebuild 7369 RMD160 1627c814adede5792fedfe98beb445c43b7af81f SHA1 5e1eec230cc38fa930ec466bba66a332be4f8f97 SHA256 f80eb12500d7973667b7e41010f8d5294f132068feff885876e42997a908e004 EBUILD rsyslog-5.8.8.ebuild 7382 RMD160 d2df231d99fe02c1f4c7381cfbc91d1429644f50 SHA1 a876a86c1ea07b4a9c77eda5e61af103d7630dc4 SHA256 adcb1da5b31ea6db78a823886c054923f949de5d7fd60cd03733a7534a43c6ff -MISC ChangeLog 13504 RMD160 fbf20463ef48ffa19ff7e78330fc4bd2af3ef025 SHA1 91465b812d6b03d4192306a6337d1685f670c819 SHA256 c580f0f3fe597474d205618045019fb2114edee4dbce17696959730cd1bcc344 +EBUILD rsyslog-6.2.1.ebuild 7563 RMD160 c90e18330cf0b6ff216debd5e931717df3e78a74 SHA1 e61c2d3ba363b24f22535a8d0fa71f656e061463 SHA256 346b8306c74a68bde4c355a2aa5087109e40b28451e33ba156122679351cb6d6 +MISC ChangeLog 13825 RMD160 c12dc5f7cae347d7d912ad59add69e1d782b54e7 SHA1 3cec9fb9946a8536be8a76930149a3be9a99c3b5 SHA256 cf1d7fac540af5bdece126792e8c258b909c5b00f5dc1fe81a9e190e925d9d17 MISC metadata.xml 769 RMD160 76e1953b0841e1020088079af549451ea6d16723 SHA1 8f9ed914369c0229f6d4aaec7340d9dcf6fb5030 SHA256 70468ddaa9ff15f4cb3059fcf8834ca7f2e8f55a6f3ac57e1487202e5f3f1730 -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.19 (GNU/Linux) -iF4EAREIAAYFAk/HoW0ACgkQKiQSS7ZY+hMzDQD9GyFwgqvv7c1l4BwQzETAvZX9 -ChJddv5Bbj89hXOJbToBALfsg8D3E/43ngM2nOXDeD+/71Z1YuquuIYfbfvH+4Se -=oWSP +iF4EAREIAAYFAk/Iu4MACgkQKiQSS7ZY+hMB8gD8CzHBG4tVmuh2U3BfzeqHoCKU +iYIMmzMpwnhfGtd0ll8A/iMHJHNtCRNT6QsZ/Q1x7li9dUAvlOqdgvd18RJBznQ9 +=/kSp -----END PGP SIGNATURE----- diff --git a/app-admin/rsyslog/files/6-stable/rsyslog-gentoo.conf b/app-admin/rsyslog/files/6-stable/rsyslog-gentoo.conf new file mode 100644 index 000000000000..f679f39632da --- /dev/null +++ b/app-admin/rsyslog/files/6-stable/rsyslog-gentoo.conf @@ -0,0 +1,90 @@ +# rsyslog v5: load input modules +# If you do not load inputs, nothing happens! +# You may need to set the module load path if modules are not found. + +$ModLoad immark.so # provides --MARK-- message capability +$ModLoad imuxsock.so # provides support for local system logging (e.g. via logger command) +$ModLoad imklog.so # kernel logging (formerly provided by rklogd) + +# Include configuration files from directory +$IncludeConfig /etc/rsyslog.d/* + +# Check config syntax on startup and abort if unclean (default off) +#$AbortOnUncleanConfig on + +# Reduce repeating messages (default off) +#$RepeatedMsgReduction on + +# Log all kernel messages to the console. +# Logging much else clutters up the screen. +#kern.* /dev/console + +# Log anything (except mail) of level info or higher. +# Don't log private authentication messages! +*.info;mail.none;authpriv.none;cron.none -/var/log/messages + +# The authpriv file has restricted access. +authpriv.* /var/log/secure + +# Log all the mail messages in one place. +mail.* -/var/log/maillog + +# Log cron stuff +cron.* -/var/log/cron + +# Everybody gets emergency messages +*.emerg :omusrmsg:* + +# Save news errors of level crit and higher in a special file. +uucp,news.crit -/var/log/spooler + +# Save boot messages also to boot.log +local7.* /var/log/boot.log + +# More configuration examples: +# +# Remote Logging (we use TCP for reliable delivery) +# An on-disk queue is created for this action. If the remote host is +# down, messages are spooled to disk and sent when it is up again. +#$WorkDirectory /var/spool/rsyslog # where to place spool files +#$ActionQueueFileName uniqName # unique name prefix for spool files +#$ActionQueueMaxDiskSpace 1g # 1gb space limit (use as much as possible) +#$ActionQueueSaveOnShutdown on # save messages to disk on shutdown +#$ActionQueueType LinkedList # run asynchronously +#$ActionResumeRetryCount -1 # infinety retries if host is down +#$ActionResumeInterval 30 # retry interval +# remote host is: name/ip:port, e.g. 192.168.0.1:514, port optional +#*.* @@remote-host + +# Remote Logging with TCP + SSL/TLS +#$DefaultNetstreamDriver gtls +#$DefaultNetstreamDriverCAFile /etc/ssl/rsyslog/rsyslog_ca.cert.pem +#$DefaultNetstreamDriverCertFile /etc/ssl/rsyslog/rsyslog_CLIENT.cert.pem +#$DefaultNetstreamDriverKeyFile /etc/ssl/rsyslog/rsyslog_CLIENT.key.pem +#$ActionSendStreamDriverAuthMode x509/name # enable peer authentication +#$ActionSendStreamDriverPermittedPeer foo # authorize to send encrypted data to server foo +#$ActionSendStreamDriverMode 1 # run driver in TLS-only mode + +# ######### Receiving Messages from Remote Hosts ########## +# TCP Syslog Server: +#$ModLoad imtcp # provides TCP syslog reception +#$TCPServerRun 10514 # start a TCP syslog server at port 10514 + +# TCP + SSL/TLS Syslog Server: +#$ModLoad imtcp # provides TCP syslog reception +#$DefaultNetstreamDriver gtls # use gnuTLS for data encryption +#$DefaultNetstreamDriverCAFile /etc/ssl/rsyslog/rsyslog_ca.cert.pem +#$DefaultNetstreamDriverCertFile /etc/ssl/rsyslog/rsyslog_SERVER.cert.pem +#$DefaultNetstreamDriverKeyFile /etc/ssl/rsyslog/rsyslog_SERVER.key.pem +#$InputTCPServerStreamDriverMode 1 # run driver in TLS-only mode +#$InputTCPServerStreamDriverAuthMode x509/name # enable peer authentication +#$InputTCPServerStreamDriverPermittedPeer bar # authorize client named bar (one line per client) +#$TCPServerRun 10514 # start a TCP syslog server at port 10514 + +# UDP Syslog Server: +#$ModLoad imudp.so # provides UDP syslog reception +#$UDPServerRun 514 # start a UDP syslog server at standard port 514 + +# RELP Syslog Server: +#$ModLoad imrelp # provides RELP syslog reception +#$InputRELPServerRun 10515 # start a RELP syslog server at port 10515 diff --git a/app-admin/rsyslog/files/6-stable/rsyslog.confd b/app-admin/rsyslog/files/6-stable/rsyslog.confd new file mode 100644 index 000000000000..8d174fccb881 --- /dev/null +++ b/app-admin/rsyslog/files/6-stable/rsyslog.confd @@ -0,0 +1,17 @@ +# Copyright 1999-2012 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/app-admin/rsyslog/files/6-stable/rsyslog.confd,v 1.1 2012/06/01 12:54:17 ultrabug Exp $ + +# Configuration file +CONFIGFILE="/etc/rsyslog.conf" + +# PID file +PIDFILE="/var/run/rsyslogd.pid" + +# 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 +# * "-c5" tells rsyslog to _not_ run in sysklogd compatibility mode +RSYSLOG_OPTS="-c5" diff --git a/app-admin/rsyslog/files/6-stable/rsyslog.initd b/app-admin/rsyslog/files/6-stable/rsyslog.initd new file mode 100644 index 000000000000..36f775b9c3bc --- /dev/null +++ b/app-admin/rsyslog/files/6-stable/rsyslog.initd @@ -0,0 +1,43 @@ +#!/sbin/runscript +# Copyright 1999-2012 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/app-admin/rsyslog/files/6-stable/rsyslog.initd,v 1.1 2012/06/01 12:54:17 ultrabug Exp $ + +extra_started_commands="reload" + +depend() { + provide logger +} + +start() { + ebegin "Starting rsyslogd" + start-stop-daemon \ + --start --quiet --exec /usr/sbin/rsyslogd \ + -- ${RSYSLOG_OPTS} -i "${PIDFILE}" -f "${CONFIGFILE}" + eend $? +} + +stop() { + ebegin "Stopping rsyslogd" + start-stop-daemon \ + --stop --quiet \ + --pidfile "${PIDFILE}" + eend $? +} + +reload() { + if [ ! -f "${PIDFILE}" ]; then + eerror "rsyslogd not running" + return 1 + fi + + # Baselayout-1 users still use --stop and --oknodo + local USEROPT="--name rsyslogd" + if [ ! -f /etc/init.d/sysfs ]; then + USEROPT="--stop --oknodo" + fi + + ebegin "Re-opening rsyslogd log files" + start-stop-daemon --signal HUP --pidfile "${PIDFILE}" ${USEROPT} + eend $? +} diff --git a/app-admin/rsyslog/files/6-stable/rsyslog.logrotate b/app-admin/rsyslog/files/6-stable/rsyslog.logrotate new file mode 100644 index 000000000000..1718453b19b8 --- /dev/null +++ b/app-admin/rsyslog/files/6-stable/rsyslog.logrotate @@ -0,0 +1,9 @@ +# Copyright 1999-2012 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/app-admin/rsyslog/files/6-stable/rsyslog.logrotate,v 1.1 2012/06/01 12:54:17 ultrabug Exp $ +/var/log/messages /var/log/secure /var/log/maillog /var/log/cron /var/log/spooler /var/log/boot.log { + sharedscripts + postrotate + /etc/init.d/rsyslog reload &>/dev/null || true + endscript +} diff --git a/app-admin/rsyslog/files/6-stable/rsyslog6-zeromq.patch b/app-admin/rsyslog/files/6-stable/rsyslog6-zeromq.patch new file mode 100644 index 000000000000..2adefc0f229f --- /dev/null +++ b/app-admin/rsyslog/files/6-stable/rsyslog6-zeromq.patch @@ -0,0 +1,96 @@ +--- a/Makefile.am 2012-06-01 12:54:30.118114106 +0200 ++++ b/Makefile.am 2012-06-01 12:56:30.949078827 +0200 +@@ -198,6 +198,14 @@ + SUBDIRS += plugins/omprog + endif + ++if ENABLE_IMZEROMQ ++SUBDIRS += plugins/imzeromq ++endif ++ ++if ENABLE_OMZEROMQ ++SUBDIRS += plugins/omzeromq ++endif ++ + if ENABLE_RFC3195 + SUBDIRS += plugins/im3195 + endif +@@ -242,6 +250,8 @@ + --enable-pmlastmsg \ + --enable-omruleset \ + --enable-omprog \ ++ --enable-imzeromq \ ++ --enable-omzeromq \ + --enable-imdiag \ + --enable-imptcp \ + --enable-imttcp \ +--- a/configure.ac 2012-06-01 12:54:30.118114106 +0200 ++++ b/configure.ac 2012-06-01 12:59:14.250380620 +0200 +@@ -884,6 +884,17 @@ + ) + AM_CONDITIONAL(ENABLE_IMFILE, test x$enable_imfile = xyes) + ++# settings for the ZeroMQ input module ++AC_ARG_ENABLE(imzeromq, ++ [AS_HELP_STRING([--enable-imzeromq],[file input module enabled @<:@default=no@:>@])], ++ [case "${enableval}" in ++ yes) enable_imzeromq="yes" ;; ++ no) enable_imzeromq="no" ;; ++ *) AC_MSG_ERROR(bad value ${enableval} for --enable-imzeromq) ;; ++ esac], ++ [enable_imzeromq=no] ++) ++AM_CONDITIONAL(ENABLE_IMZEROMQ, test x$enable_imzeromq = xyes) + + # settings for the door input module (under solaris, thus default off) + AC_ARG_ENABLE(imsolaris, +@@ -948,6 +959,17 @@ + ) + AM_CONDITIONAL(ENABLE_OMPROG, test x$enable_omprog = xyes) + ++# settings for the omzeromq output module ++AC_ARG_ENABLE(omzeromq, ++ [AS_HELP_STRING([--enable-omzeromq],[Compiles omzeromq module @<:@default=no@:>@])], ++ [case "${enableval}" in ++ yes) enable_omzeromq="yes" ;; ++ no) enable_omzeromq="no" ;; ++ *) AC_MSG_ERROR(bad value ${enableval} for --enable-omzeromq) ;; ++ esac], ++ [enable_omzeromq=no] ++) ++AM_CONDITIONAL(ENABLE_OMZEROMQ, test x$enable_omzeromq = xyes) + + # settings for omudpspoof + AC_ARG_ENABLE(omudpspoof, +@@ -1251,6 +1273,7 @@ + plugins/omtemplate/Makefile \ + plugins/omhdfs/Makefile \ + plugins/omprog/Makefile \ ++ plugins/omzeromq/Makefile \ + plugins/omstdout/Makefile \ + plugins/pmrfc3164sd/Makefile \ + plugins/pmlastmsg/Makefile \ +@@ -1261,6 +1284,7 @@ + plugins/omdbalerting/Makefile \ + plugins/omuxsock/Makefile \ + plugins/imfile/Makefile \ ++ plugins/imzeromq/Makefile \ + plugins/imsolaris/Makefile \ + plugins/imptcp/Makefile \ + plugins/imttcp/Makefile \ +@@ -1304,6 +1328,7 @@ + echo " threaded plain tcp input module enabled: $enable_imttcp" + echo " imdiag enabled: $enable_imdiag" + echo " file input module enabled: $enable_imfile" ++echo " ZeroMQ input module enabled: $enable_imzeromq" + echo " Solaris input module enabled: $enable_imsolaris" + echo " periodic statistics module enabled: $enable_impstats" + echo " input template module will be compiled: $enable_imtemplate" +@@ -1311,6 +1336,7 @@ + echo "---{ output plugins }---" + echo " Mail support enabled: $enable_mail" + echo " omprog module will be compiled: $enable_omprog" ++echo " omzeromq module will be compiled: $enable_omzeromq" + echo " output mongodb module will be compiled: $enable_ommongodb" + echo " omstdout module will be compiled: $enable_omstdout" + echo " omhdfs module will be compiled: $enable_omhdfs" diff --git a/app-admin/rsyslog/rsyslog-6.2.1.ebuild b/app-admin/rsyslog/rsyslog-6.2.1.ebuild new file mode 100644 index 000000000000..f8751360a0b5 --- /dev/null +++ b/app-admin/rsyslog/rsyslog-6.2.1.ebuild @@ -0,0 +1,265 @@ +# Copyright 1999-2012 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/app-admin/rsyslog/rsyslog-6.2.1.ebuild,v 1.1 2012/06/01 12:54:18 ultrabug Exp $ + +EAPI=4 +AUTOTOOLS_AUTORECONF=yes + +inherit autotools-utils systemd + +DESCRIPTION="An enhanced multi-threaded syslogd with database support and more." +HOMEPAGE="http://www.rsyslog.com/" +SRC_URI="http://www.rsyslog.com/files/download/${PN}/${P}.tar.gz + zeromq? ( https://github.com/aggregateknowledge/rsyslog-zeromq/tarball/44b551abc29dd5b541884bd51b45b413855a93d8 -> ${PN}-zeromq.tar.gz )" + +LICENSE="GPL-3 LGPL-3 Apache-2.0" +KEYWORDS="~amd64 ~x86" +SLOT="0" +IUSE="dbi debug doc extras kerberos mysql oracle postgres relp snmp ssl static-libs zeromq zlib" + +RDEPEND=" + dev-libs/libee + dev-libs/libestr + dev-libs/liblognorm + dbi? ( dev-db/libdbi ) + extras? ( net-libs/libnet ) + kerberos? ( virtual/krb5 ) + mysql? ( virtual/mysql ) + postgres? ( dev-db/postgresql-base ) + oracle? ( dev-db/oracle-instantclient-basic ) + relp? ( >=dev-libs/librelp-0.1.3 ) + snmp? ( net-analyzer/net-snmp ) + ssl? ( net-libs/gnutls dev-libs/libgcrypt ) + zeromq? ( net-libs/zeromq ) + zlib? ( sys-libs/zlib )" +DEPEND="${RDEPEND} + virtual/pkgconfig" + +BRANCH="6-stable" + +# need access to certain device nodes +RESTRICT="test" + +# Maitainer note : open a bug to upstream +# showing that building in a separate dir fails +AUTOTOOLS_IN_SOURCE_BUILD=1 + +DOCS=(AUTHORS ChangeLog doc/rsyslog-example.conf) + +src_prepare() { + autotools-utils_src_prepare + + # Maintainer notes: + # ZeroMQ support,upstream bug #277 + if use zeromq; then + local ZEROPATH=${WORKDIR}/aggregateknowledge-rsyslog-zeromq-44b551a + epatch "${FILESDIR}/${BRANCH}/rsyslog6-zeromq.patch" + cp -r ${ZEROPATH}/{i,o}mzeromq "${S}/plugins" + fi + + # Don't force '-g' CFLAG + # Correct the sm_cust_bindcdr plugin detection (bug #330 upstream) + sed -e 's/CFLAGS="\(.*\) -g"/CFLAGS="\1"/g' \ + -e 's/smcustbindcdr/sm_cust_bindcdr/g' \ + -i configure.ac || die + eautoreconf +} + +src_configure() { + # Maintainer notes: + # * rfc3195 needs a library and development of that library + # is suspended, so we disable it + # * About the java GUI: + # The maintainer says there is no real installation support + # for the java GUI, so we disable it for now. + # * mongodb : no plugin in the sources, we'll wait for bug #330 upstream + local myeconfargs=( + --disable-gui + --disable-rfc3195 + --enable-imdiag + --enable-imfile + --enable-impstats + --enable-imtemplate + --enable-imptcp + --enable-largefile + --enable-mail + --enable-mmnormalize + --enable-omprog + --enable-omstdout + --enable-omtemplate + --disable-omdbalerting + --enable-omuxsock + --enable-pmlastmsg + --enable-pmrfc3164sd + --enable-pmcisconames + --enable-pmaixforwardedfrom + --enable-pmsnare + --enable-sm_cust_bindcdr + --enable-unlimited-select + $(use_enable dbi libdbi) + $(use_enable debug) + $(use_enable debug rtinst) + $(use_enable debug diagtools) + $(use_enable debug memcheck) + $(use_enable debug valgrind) + $(use_enable extras omudpspoof) + $(use_enable kerberos gssapi-krb5) + $(use_enable mysql) + $(use_enable oracle) + $(use_enable postgres pgsql) + $(use_enable relp) + $(use_enable snmp) + $(use_enable snmp mmsnmptrapd) + $(use_enable ssl gnutls) + $(use_enable zlib) + ) + + use zeromq && myeconfargs=( + ${myeconfargs[@]-} + $(use_enable zeromq imzeromq) + $(use_enable zeromq omzeromq) + ) + + systemd_to_myeconfargs + autotools-utils_src_configure +} + +src_install() { + use doc && HTML_DOCS=(doc/) + autotools-utils_src_install + + insinto /etc + newins "${FILESDIR}/${BRANCH}/${PN}-gentoo.conf" ${PN}.conf + newconfd "${FILESDIR}/${BRANCH}/${PN}.confd" ${PN} + newinitd "${FILESDIR}/${BRANCH}/${PN}.initd" ${PN} + keepdir /var/spool/${PN} + keepdir /etc/ssl/${PN} + keepdir /etc/${PN}.d + + use static-libs || find "${D}" -name '*.la' -delete || die + + if use mysql; then + insinto /usr/share/doc/${PF}/scripts/mysql + doins plugins/ommysql/{createDB.sql,contrib/delete_mysql} + fi + + if use postgres; then + insinto /usr/share/doc/${PF}/scripts/pgsql + doins plugins/ompgsql/createDB.sql + fi + + insinto /etc/logrotate.d/ + newins "${FILESDIR}/${BRANCH}/${PN}.logrotate" ${PN} +} + +pkg_postinst() { + 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 +} + +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 + CERTDIR="${ROOT}/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 " http://www.rsyslog.com/doc/rsyslog_tls.html" +} |