summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexys Jacob <ultrabug@gentoo.org>2012-11-20 13:03:37 +0000
committerAlexys Jacob <ultrabug@gentoo.org>2012-11-20 13:03:37 +0000
commit7cdb38123f1615b34d73794627c91c844587eced (patch)
treed6b5ccdee1c1e80d03d39102298bac4643e79523 /app-admin/rsyslog
parentReplace with Pavel's ebuild. (diff)
downloadgentoo-2-7cdb38123f1615b34d73794627c91c844587eced.tar.gz
gentoo-2-7cdb38123f1615b34d73794627c91c844587eced.tar.bz2
gentoo-2-7cdb38123f1615b34d73794627c91c844587eced.zip
Version bump, new 7-stable branch, fix #433595
(Portage version: 2.1.11.31/cvs/Linux x86_64, signed Manifest commit with key B658FA13)
Diffstat (limited to 'app-admin/rsyslog')
-rw-r--r--app-admin/rsyslog/ChangeLog13
-rw-r--r--app-admin/rsyslog/files/6-stable/rsyslog-6.6.0-fix-runtime.patch21
-rw-r--r--app-admin/rsyslog/files/7-stable/rsyslog-gentoo.conf100
-rw-r--r--app-admin/rsyslog/files/7-stable/rsyslog.confd16
-rw-r--r--app-admin/rsyslog/files/7-stable/rsyslog.initd43
-rw-r--r--app-admin/rsyslog/files/7-stable/rsyslog.logrotate9
-rw-r--r--app-admin/rsyslog/rsyslog-5.10.1.ebuild254
-rw-r--r--app-admin/rsyslog/rsyslog-6.6.0.ebuild250
-rw-r--r--app-admin/rsyslog/rsyslog-7.2.2.ebuild252
9 files changed, 957 insertions, 1 deletions
diff --git a/app-admin/rsyslog/ChangeLog b/app-admin/rsyslog/ChangeLog
index 421a4059e3d0..959ee540e3d4 100644
--- a/app-admin/rsyslog/ChangeLog
+++ b/app-admin/rsyslog/ChangeLog
@@ -1,6 +1,17 @@
# 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.83 2012/10/29 16:12:57 dev-zero Exp $
+# $Header: /var/cvsroot/gentoo-x86/app-admin/rsyslog/ChangeLog,v 1.84 2012/11/20 13:03:37 ultrabug Exp $
+
+*rsyslog-7.2.2 (20 Nov 2012)
+*rsyslog-6.6.0 (20 Nov 2012)
+*rsyslog-5.10.1 (20 Nov 2012)
+
+ 20 Nov 2012; Ultrabug <ultrabug@gentoo.org>
+ +files/6-stable/rsyslog-6.6.0-fix-runtime.patch,
+ +files/7-stable/rsyslog.confd, +files/7-stable/rsyslog.initd,
+ +files/7-stable/rsyslog.logrotate, +files/7-stable/rsyslog-gentoo.conf,
+ +rsyslog-5.10.1.ebuild, +rsyslog-6.6.0.ebuild, +rsyslog-7.2.2.ebuild:
+ Version bump, new 7-stable branch, fix #433595
29 Oct 2012; Tiziano Müller <dev-zero@gentoo.org> metadata.xml:
Removed myself as co-maintainer.
diff --git a/app-admin/rsyslog/files/6-stable/rsyslog-6.6.0-fix-runtime.patch b/app-admin/rsyslog/files/6-stable/rsyslog-6.6.0-fix-runtime.patch
new file mode 100644
index 000000000000..c6f50cea2e77
--- /dev/null
+++ b/app-admin/rsyslog/files/6-stable/rsyslog-6.6.0-fix-runtime.patch
@@ -0,0 +1,21 @@
+diff --git a/runtime/Makefile.am b/runtime/Makefile.am
+index 67e235a..5287c0b 100644
+--- a/runtime/Makefile.am
++++ b/runtime/Makefile.am
+@@ -95,12 +95,13 @@ librsyslog_la_SOURCES = \
+ # runtime or will no longer be needed. -- rgerhards, 2008-06-13
+
+ if WITH_MODDIRS
+-librsyslog_la_CPPFLAGS = -DSD_EXPORT_SYMBOLS -D_PATH_MODDIR=\"$(pkglibdir)/:$(moddirs)\" $(PTHREADS_CFLAGS) $(LIBEE_CFLAGS) -I\$(top_srcdir)/tools
++librsyslog_la_CPPFLAGS = -DSD_EXPORT_SYMBOLS -D_PATH_MODDIR=\"$(pkglibdir)/:$(moddirs)\"
+ else
+-librsyslog_la_CPPFLAGS = -DSD_EXPORT_SYMBOLS -D_PATH_MODDIR=\"$(pkglibdir)/\" -I$(top_srcdir) $(PTHREADS_CFLAGS) $(LIBEE_CFLAGS) -I\$(top_srcdir)/tools -I\$(top_srcdir)/grammar
++librsyslog_la_CPPFLAGS = -DSD_EXPORT_SYMBOLS -D_PATH_MODDIR=\"$(pkglibdir)/\" -I\$(top_srcdir) -I\$(top_srcdir)/grammar
+ endif
+ #librsyslog_la_LDFLAGS = -module -avoid-version
+-librsyslog_la_LIBADD = $(DL_LIBS) $(RT_LIBS) $(LIBEE_LIBS)
++librsyslog_la_CPPFLAGS += $(PTHREADS_CFLAGS) $(LIBEE_CFLAGS) $(LIBUUID_CFLAGS) $(JSON_C_CFLAGS) -I\$(top_srcdir)/tools
++librsyslog_la_LIBADD = $(DL_LIBS) $(RT_LIBS) $(LIBEE_LIBS) $(LIBUUID_LIBS) $(JSON_C_LIBS)
+
+ #
+ # regular expression support \ No newline at end of file
diff --git a/app-admin/rsyslog/files/7-stable/rsyslog-gentoo.conf b/app-admin/rsyslog/files/7-stable/rsyslog-gentoo.conf
new file mode 100644
index 000000000000..5f3fa1f1603b
--- /dev/null
+++ b/app-admin/rsyslog/files/7-stable/rsyslog-gentoo.conf
@@ -0,0 +1,100 @@
+#################
+#### MODULES ####
+#################
+
+$ModLoad imuxsock # provides support for local system logging
+$ModLoad imklog # provides kernel logging support
+#$ModLoad immark # provides --MARK-- message capability
+
+# provides UDP syslog reception
+#$ModLoad imudp
+#$UDPServerRun 514
+
+# provides TCP syslog reception
+#$ModLoad imtcp
+#$InputTCPServerRun 514
+
+
+###########################
+#### GLOBAL DIRECTIVES ####
+###########################
+
+# Use traditional timestamp format.
+# To enable high precision timestamps, comment out the following line.
+$ActionFileDefaultTemplate RSYSLOG_TraditionalFileFormat
+
+# Set the default permissions for all log files.
+$FileOwner root
+$FileGroup adm
+$FileCreateMode 0640
+$DirCreateMode 0755
+$Umask 0022
+
+# Where to place spool and state files
+$WorkDirectory /var/spool/rsyslog
+
+# Check config syntax on startup and abort if unclean (default off)
+#$AbortOnUncleanConfig on
+
+# Reduce repeating messages (default off)
+#$RepeatedMsgReduction on
+
+# Include all config files in /etc/rsyslog.d/
+$IncludeConfig /etc/rsyslog.d/*.conf
+
+
+###############
+#### RULES ####
+###############
+
+# First some standard log files. Log by facility.
+auth,authpriv.* /var/log/auth.log
+*.*;auth,authpriv.none -/var/log/syslog
+#cron.* /var/log/cron.log
+daemon.* -/var/log/daemon.log
+kern.* -/var/log/kern.log
+lpr.* -/var/log/lpr.log
+mail.* -/var/log/mail.log
+user.* -/var/log/user.log
+
+# Logging for the mail system. Split it up so that
+# it is easy to write scripts to parse these files.
+mail.info -/var/log/mail.info
+mail.warn -/var/log/mail.warn
+mail.err /var/log/mail.err
+
+# Logging for INN news system.
+news.crit /var/log/news/news.crit
+news.err /var/log/news/news.err
+news.notice -/var/log/news/news.notice
+
+# Some "catch-all" log files.
+*.=debug;\
+ auth,authpriv.none;\
+ news.none;mail.none -/var/log/debug
+*.=info;*.=notice;*.=warn;\
+ auth,authpriv.none;\
+ cron,daemon.none;\
+ mail,news.none -/var/log/messages
+
+# Emergencies are sent to everybody logged in.
+*.emerg :omusrmsg:*
+
+# I like to have messages displayed on the console, but only on a virtual
+# console I usually leave idle.
+#daemon,mail.*;\
+# news.=crit;news.=err;news.=notice;\
+# *.=debug;*.=info;\
+# *.=notice;*.=warn /dev/tty8
+
+# The named pipe /dev/xconsole is for the `xconsole' utility. To use it,
+# you must invoke `xconsole' with the `-file' option:
+#
+# $ xconsole -file /dev/xconsole [...]
+#
+# NOTE: adjust the list below, or you'll go crazy if you have a reasonably
+# busy site..
+#daemon.*;mail.*;\
+# news.err;\
+# *.=debug;*.=info;\
+# *.=notice;*.=warn |/dev/xconsole
diff --git a/app-admin/rsyslog/files/7-stable/rsyslog.confd b/app-admin/rsyslog/files/7-stable/rsyslog.confd
new file mode 100644
index 000000000000..f5de7b58eacf
--- /dev/null
+++ b/app-admin/rsyslog/files/7-stable/rsyslog.confd
@@ -0,0 +1,16 @@
+# 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/7-stable/rsyslog.confd,v 1.1 2012/11/20 13:03:36 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
+RSYSLOG_OPTS=""
diff --git a/app-admin/rsyslog/files/7-stable/rsyslog.initd b/app-admin/rsyslog/files/7-stable/rsyslog.initd
new file mode 100644
index 000000000000..65ed11bb2c34
--- /dev/null
+++ b/app-admin/rsyslog/files/7-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/7-stable/rsyslog.initd,v 1.1 2012/11/20 13:03:36 ultrabug Exp $
+
+extra_started_commands="reload"
+
+depend() {
+ provide logger
+}
+
+start() {
+ ebegin "Starting rsyslogd"
+ start-stop-daemon \
+ --start --quiet --exec /usr/sbin/rsyslogd --pidfile "${PIDFILE}" \
+ -- ${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/7-stable/rsyslog.logrotate b/app-admin/rsyslog/files/7-stable/rsyslog.logrotate
new file mode 100644
index 000000000000..dce3fd1560f2
--- /dev/null
+++ b/app-admin/rsyslog/files/7-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/7-stable/rsyslog.logrotate,v 1.1 2012/11/20 13:03:36 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/rsyslog-5.10.1.ebuild b/app-admin/rsyslog/rsyslog-5.10.1.ebuild
new file mode 100644
index 000000000000..c134d7a4b7f2
--- /dev/null
+++ b/app-admin/rsyslog/rsyslog-5.10.1.ebuild
@@ -0,0 +1,254 @@
+# 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-5.10.1.ebuild,v 1.1 2012/11/20 13:03:37 ultrabug Exp $
+
+EAPI=4
+AUTOTOOLS_AUTORECONF=yes
+
+inherit autotools-utils eutils 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 ~arm ~hppa ~x86"
+SLOT="0"
+IUSE="dbi debug doc extras kerberos mysql oracle postgres relp snmp ssl static-libs zeromq zlib"
+
+RDEPEND="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="5-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() {
+ # Maintainer notes:
+ # ZeroMQ support, for now it is done by hand until upstream process bug.
+ # Bugzilla : http://bugzilla.adiscon.com/show_bug.cgi?id=277
+ if use zeromq; then
+ local ZEROPATH=${WORKDIR}/aggregateknowledge-rsyslog-zeromq-44b551a
+ epatch ${ZEROPATH}/rsyslog-zeromq.patch
+ cp -r ${ZEROPATH}/{i,o}mzeromq "${S}/plugins"
+ fi
+
+ # Don't force '-g' CFLAG
+ sed -i 's/CFLAGS="\(.*\) -g"/CFLAGS="\1"/g' configure.ac || die
+ autotools-utils_src_prepare
+}
+
+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.
+ local myeconfargs=(
+ --disable-gui
+ --disable-rfc3195
+ --enable-largefile
+ --enable-unlimited-select
+ --enable-imdiag
+ --enable-imfile
+ --enable-impstats
+ --enable-imtemplate
+ --enable-imptcp
+ --enable-mail
+ --enable-omprog
+ --enable-omstdout
+ --enable-omtemplate
+ --enable-omdbalerting
+ --enable-omuxsock
+ --enable-pmlastmsg
+ --enable-pmrfc3164sd
+ --enable-pmcisconames
+ --enable-pmaixforwardedfrom
+ --enable-pmsnare
+ $(use_enable extras omudpspoof)
+ $(use_enable zlib)
+ $(use_enable mysql)
+ $(use_enable dbi libdbi)
+ $(use_enable postgres pgsql)
+ $(use_enable oracle oracle)
+ $(use_enable ssl gnutls)
+ $(use_enable kerberos gssapi-krb5)
+ $(use_enable relp)
+ $(use_enable snmp)
+ $(use_enable snmp mmsnmptrapd)
+ $(use_enable debug)
+ $(use_enable debug rtinst)
+ $(use_enable debug diagtools)
+ $(use_enable debug memcheck)
+ $(use_enable debug valgrind)
+ )
+
+ 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"
+}
diff --git a/app-admin/rsyslog/rsyslog-6.6.0.ebuild b/app-admin/rsyslog/rsyslog-6.6.0.ebuild
new file mode 100644
index 000000000000..82baf4a07b60
--- /dev/null
+++ b/app-admin/rsyslog/rsyslog-6.6.0.ebuild
@@ -0,0 +1,250 @@
+# 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.6.0.ebuild,v 1.1 2012/11/20 13:03:37 ultrabug Exp $
+
+EAPI=4
+AUTOTOOLS_AUTORECONF=yes
+
+inherit autotools-utils eutils 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"
+
+LICENSE="GPL-3 LGPL-3 Apache-2.0"
+KEYWORDS="~amd64 ~arm ~hppa ~x86"
+SLOT="0"
+IUSE="dbi debug doc extras kerberos mysql oracle postgres relp snmp ssl static-libs zeromq zlib"
+
+RDEPEND="
+ dev-libs/json-c
+ 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/czmq )
+ 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() {
+ # Don't force '-g' CFLAG
+ sed -e 's/CFLAGS="\(.*\) -g"/CFLAGS="\1"/g' -i configure.ac || die
+
+ # Fix runtime UUID/JSON libs linking
+ epatch "${FILESDIR}/${BRANCH}/${P}-fix-runtime.patch"
+
+ autotools-utils_src_prepare
+}
+
+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 : doesnt work with mongo-c-driver ?
+ local myeconfargs=(
+ --disable-gui
+ --disable-rfc3195
+ --enable-imdiag
+ --enable-imfile
+ --enable-impstats
+ --enable-imptcp
+ --enable-largefile
+ --enable-mail
+ --enable-mmnormalize
+ --enable-mmjsonparse
+ --enable-mmaudit
+ --enable-omprog
+ --enable-omstdout
+ --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_enable zeromq imzmq3)
+ $(use_enable zeromq omzmq3)
+ )
+ 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"
+}
diff --git a/app-admin/rsyslog/rsyslog-7.2.2.ebuild b/app-admin/rsyslog/rsyslog-7.2.2.ebuild
new file mode 100644
index 000000000000..6dee69968742
--- /dev/null
+++ b/app-admin/rsyslog/rsyslog-7.2.2.ebuild
@@ -0,0 +1,252 @@
+# 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-7.2.2.ebuild,v 1.1 2012/11/20 13:03:37 ultrabug Exp $
+
+EAPI=4
+AUTOTOOLS_AUTORECONF=yes
+
+inherit autotools-utils eutils 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"
+
+LICENSE="GPL-3 LGPL-3 Apache-2.0"
+KEYWORDS="~amd64 ~arm ~hppa ~x86"
+SLOT="0"
+IUSE="dbi debug doc extras kerberos mysql oracle postgres relp snmp ssl static-libs zeromq zlib"
+
+RDEPEND="
+ dev-libs/json-c
+ 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/czmq )
+ zlib? ( sys-libs/zlib )"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig"
+
+BRANCH="7-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() {
+ # Don't force '-g' CFLAG
+ sed -e 's/CFLAGS="\(.*\) -g"/CFLAGS="\1"/g' -i configure.ac || die
+
+ # Fix runtime UUID/JSON libs linking
+ epatch "${FILESDIR}/6-stable/${PN}-6.6.0-fix-runtime.patch"
+
+ autotools-utils_src_prepare
+}
+
+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 : doesnt work with mongo-c-driver ?
+ local myeconfargs=(
+ --disable-gui
+ --disable-rfc3195
+ --enable-imdiag
+ --enable-imfile
+ --enable-impstats
+ --enable-imptcp
+ --enable-largefile
+ --enable-mail
+ --enable-mmnormalize
+ --enable-mmjsonparse
+ --enable-mmaudit
+ --enable-omprog
+ --enable-omstdout
+ --enable-omuxsock
+ --enable-pmlastmsg
+ --enable-pmrfc3164sd
+ --enable-pmcisconames
+ --enable-pmaixforwardedfrom
+ --enable-pmsnare
+ --enable-sm_cust_bindcdr
+ --enable-unlimited-select
+ --enable-uuid
+ $(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_enable zeromq imzmq3)
+ $(use_enable zeromq omzmq3)
+ )
+ 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
+ touch "${D}"/etc/${PN}.d/00_gentoo.conf
+
+ 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"
+}