Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 383202 Details for
Bug 520328
app-admin/rsyslog-8.4.0 version bump
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch to add v8.4.0 to portage
rsyslog-8.4.0.patch (text/plain), 22.80 KB, created by
Thomas Deutschmann (RETIRED)
on 2014-08-20 15:10:32 UTC
(
hide
)
Description:
Patch to add v8.4.0 to portage
Filename:
MIME Type:
Creator:
Thomas Deutschmann (RETIRED)
Created:
2014-08-20 15:10:32 UTC
Size:
22.80 KB
patch
obsolete
>diff -rupN old/app-admin/rsyslog/files/8-stable/20-rsyslog-json_tokener_errors.patch new/app-admin/rsyslog/files/8-stable/20-rsyslog-json_tokener_errors.patch >--- old/app-admin/rsyslog/files/8-stable/20-rsyslog-json_tokener_errors.patch 1970-01-01 01:00:00.000000000 +0100 >+++ new/app-admin/rsyslog/files/8-stable/20-rsyslog-json_tokener_errors.patch 2014-08-19 12:00:42.076935177 +0200 >@@ -0,0 +1,49 @@ >+From 6b47dd542d07ed557f02af9970d1004eb262e1c1 Mon Sep 17 00:00:00 2001 >+From: Rainer Gerhards <rgerhards@adiscon.com> >+Date: Tue, 19 Aug 2014 11:33:41 +0200 >+Subject: [PATCH] bugfix: build failure on systems which don't have >+ json_tokener_errors >+ >+Older versions of json-c need to use a different API (which don't exists >+on newer versions, unfortunately...) >+Thanks to Thomas D. for reporting this problem. >+--- >+ ChangeLog | 6 ++++++ >+ runtime/msg.c | 6 +++++- >+ 2 files changed, 11 insertions(+), 1 deletion(-) >+ >+diff --git a/ChangeLog b/ChangeLog >+index 177387d..cb09b6c 100644 >+--- a/ChangeLog >++++ b/ChangeLog >+@@ -1,4 +1,10 @@ >+ --------------------------------------------------------------------------- >++Version 8.4.1 [v8-stable] 2014-08-?? >++- bugfix: build failure on systems which don't have json_tokener_errors >++ Older versions of json-c need to use a different API (which don't exists >++ on newer versions, unfortunately...) >++ Thanks to Thomas D. for reporting this problem. >++--------------------------------------------------------------------------- >+ Version 8.4.0 [v8-stable] 2014-08-18 >+ - this is the new stable branch, which incorporates all enhancements of >+ rsyslog 8.3. >+diff --git a/runtime/msg.c b/runtime/msg.c >+index 66c3b7b..81b13f9 100644 >+--- a/runtime/msg.c >++++ b/runtime/msg.c >+@@ -4074,7 +4074,11 @@ MsgSetPropsViaJSON(msg_t *__restrict__ const pMsg, const uchar *__restrict__ con >+ >+ err = tokener->err; >+ if(err != json_tokener_continue) >+- errMsg = json_tokener_errors[err]; >++# if HAVE_JSON_TOKENER_ERROR_DESC >++ errMsg = json_tokener_error_desc(err); >++# else >++ errMsg = json_tokener_errors[err]; >++# endif >+ else >+ errMsg = "Unterminated input"; >+ } else if(!json_object_is_type(json, json_type_object)) >+-- >+2.0.3 >+ >diff -rupN old/app-admin/rsyslog/files/8-stable/50-default.conf new/app-admin/rsyslog/files/8-stable/50-default.conf >--- old/app-admin/rsyslog/files/8-stable/50-default.conf 1970-01-01 01:00:00.000000000 +0100 >+++ new/app-admin/rsyslog/files/8-stable/50-default.conf 2014-05-22 13:15:49.000000000 +0200 >@@ -0,0 +1,95 @@ >+####################### >+### DEFAULT ACTIONS ### >+####################### >+ >+auth,authpriv.* action( >+ type="omfile" >+ File="/var/log/auth.log" >+ FileCreateMode="0600" >+ FileOwner="root" >+ FileGroup="adm" >+ Sync="off" >+) >+ >+cron.* action( >+ type="omfile" >+ File="/var/log/cron.log" >+ FileOwner="root" >+ FileGroup="adm" >+) >+ >+daemon.* action( >+ type="omfile" >+ File="/var/log/daemon.log" >+ FileOwner="root" >+ FileGroup="adm" >+) >+ >+kern.* action( >+ type="omfile" >+ File="/var/log/kern.log" >+ FileOwner="root" >+ FileGroup="adm" >+) >+ >+lpr.* action( >+ type="omfile" >+ File="/var/log/lpr.log" >+ FileOwner="root" >+ FileGroup="adm" >+) >+ >+mail.* action( >+ type="omfile" >+ File="/var/log/mail.log" >+ FileOwner="root" >+ FileGroup="adm" >+) >+ >+news.* action( >+ type="omfile" >+ File="/var/log/news.log" >+ FileOwner="root" >+ FileGroup="adm" >+) >+ >+user.* action( >+ type="omfile" >+ File="/var/log/user.log" >+ FileOwner="root" >+ FileGroup="adm" >+) >+ >+*.=debug;auth,authpriv,news,mail.none action( >+ type="omfile" >+ File="/var/log/debug.log" >+ FileOwner="root" >+ FileGroup="adm" >+) >+ >+*.info;auth,authpriv,cron,daemon,lpr,mail,news.none action( >+ 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( >+# type="omfile" >+# File="/var/log/syslog" >+# FileOwner="root" >+# FileGroup="adm" >+#) >+ >+*.emerg action( >+ 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 -rupN old/app-admin/rsyslog/files/8-stable/README.gentoo new/app-admin/rsyslog/files/8-stable/README.gentoo >--- old/app-admin/rsyslog/files/8-stable/README.gentoo 1970-01-01 01:00:00.000000000 +0100 >+++ new/app-admin/rsyslog/files/8-stable/README.gentoo 2014-05-22 13:15:49.000000000 +0200 >@@ -0,0 +1,36 @@ >+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 -rupN old/app-admin/rsyslog/files/8-stable/rsyslog.conf new/app-admin/rsyslog/files/8-stable/rsyslog.conf >--- old/app-admin/rsyslog/files/8-stable/rsyslog.conf 1970-01-01 01:00:00.000000000 +0100 >+++ new/app-admin/rsyslog/files/8-stable/rsyslog.conf 2014-05-22 13:15:49.000000000 +0200 >@@ -0,0 +1,61 @@ >+# /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 -rupN old/app-admin/rsyslog/files/8-stable/rsyslog.confd new/app-admin/rsyslog/files/8-stable/rsyslog.confd >--- old/app-admin/rsyslog/files/8-stable/rsyslog.confd 1970-01-01 01:00:00.000000000 +0100 >+++ new/app-admin/rsyslog/files/8-stable/rsyslog.confd 2014-05-22 13:15:49.000000000 +0200 >@@ -0,0 +1,30 @@ >+# /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 -rupN old/app-admin/rsyslog/files/8-stable/rsyslog.initd new/app-admin/rsyslog/files/8-stable/rsyslog.initd >--- old/app-admin/rsyslog/files/8-stable/rsyslog.initd 1970-01-01 01:00:00.000000000 +0100 >+++ new/app-admin/rsyslog/files/8-stable/rsyslog.initd 2014-08-20 16:36:34.155661508 +0200 >@@ -0,0 +1,69 @@ >+#!/sbin/runscript >+# Copyright 1999-2014 Gentoo Foundation >+# Distributed under the terms of the GNU General Public License v2 >+# $Header: $ >+ >+RSYSLOG_CONFIGFILE=${RSYSLOG_CONFIGFILE:-"/etc/rsyslog.conf"} >+RSYSLOG_PIDFILE=${RSYSLOG_PIDFILE:-"/run/rsyslogd.pid"} >+ >+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() { >+ rm -f ${RSYSLOG_PIDFILE} >+} >+ >+configtest() { >+ # This will currently only detect fatal errors >+ # See https://github.com/rsyslog/rsyslog/issues/79 >+ >+ local _test_command="${command} -N 999 -f ${RSYSLOG_CONFIGFILE}" >+ local _retval=0 >+ >+ ebegin "Checking rsyslogd's configuration" >+ ${_test_command} >/dev/null 2>&1 >+ _retval=$? >+ >+ if [ ${_retval} -ne 0 ]; then >+ ${_test_command} >+ fi >+ >+ eend ${_retval} "failed, please correct errors above" >+} >+ >+rotate() { >+ ebegin "Re-opening rsyslogd logs" >+ start-stop-daemon --signal SIGHUP --pidfile "${RSYSLOG_PIDFILE}" >+ eend $? >+} >diff -rupN old/app-admin/rsyslog/files/8-stable/rsyslog.logrotate new/app-admin/rsyslog/files/8-stable/rsyslog.logrotate >--- old/app-admin/rsyslog/files/8-stable/rsyslog.logrotate 1970-01-01 01:00:00.000000000 +0100 >+++ new/app-admin/rsyslog/files/8-stable/rsyslog.logrotate 2014-05-22 13:15:49.000000000 +0200 >@@ -0,0 +1,37 @@ >+# 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 >+# test -r /run/rsyslogd.pid && kill -HUP $(cat /run/rsyslogd.pid) &>/dev/null >+# 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 >+ test -r /run/rsyslogd.pid && kill -HUP $(cat /run/rsyslogd.pid) &>/dev/null >+ endscript >+} >diff -rupN old/app-admin/rsyslog/metadata.xml new/app-admin/rsyslog/metadata.xml >--- old/app-admin/rsyslog/metadata.xml 2014-05-22 13:31:02.000000000 +0200 >+++ new/app-admin/rsyslog/metadata.xml 2014-06-16 02:16:12.227887421 +0200 >@@ -16,6 +16,7 @@ > <flag name="elasticsearch">Build the Elasticsearch output module (requires <pkg>net-misc/curl</pkg>)</flag> > <flag name="extras">Add support for the UDP spoofing module (omudpspoof) using <pkg>net-libs/libnet</pkg></flag> > <flag name="gcrypt">Add support for encrypted log files using <pkg>dev-libs/libgcrypt</pkg></flag> >+ <flag name="jemalloc">Use <pkg>dev-libs/jemalloc</pkg> for allocations.</flag> > <flag name="kerberos">Build the GSSAPI input and output module (requires <pkg>virtual/krb5</pkg>)</flag> > <flag name="mongodb">Build the MongoDB output module (requires <pkg>dev-libs/libmongo-client</pkg>)</flag> > <flag name="mysql">Build the MySQL databse output module (requires <pkg>virtual/mysql</pkg>)</flag> >diff -rupN old/app-admin/rsyslog/rsyslog-8.4.0.ebuild new/app-admin/rsyslog/rsyslog-8.4.0.ebuild >--- old/app-admin/rsyslog/rsyslog-8.4.0.ebuild 1970-01-01 01:00:00.000000000 +0100 >+++ new/app-admin/rsyslog/rsyslog-8.4.0.ebuild 2014-08-19 12:32:07.980899587 +0200 >@@ -0,0 +1,341 @@ >+# Copyright 1999-2014 Gentoo Foundation >+# Distributed under the terms of the GNU General Public License v2 >+# $Header: $ >+ >+EAPI=5 >+AUTOTOOLS_AUTORECONF=1 >+ >+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 >+ doc? ( http://www.rsyslog.com/files/download/${PN}/${PN}-doc-${PV}.tar.gz ) >+" >+ >+LICENSE="GPL-3 LGPL-3 Apache-2.0" >+KEYWORDS="~amd64 ~arm ~hppa ~x86" >+SLOT="0" >+IUSE="dbi debug doc elasticsearch +gcrypt jemalloc kerberos mongodb mysql normalize omudpspoof oracle postgres rabbitmq redis relp rfc3195 rfc5424hmac snmp ssl systemd usertools zeromq" >+ >+RDEPEND=" >+ >=dev-libs/json-c-0.11:= >+ >=dev-libs/libestr-0.1.9 >+ >=dev-libs/liblogging-1.0.1:=[stdlog] >+ >=sys-libs/zlib-1.2.5 >+ dbi? ( >=dev-db/libdbi-0.8.3 ) >+ elasticsearch? ( >=net-misc/curl-7.35.0 ) >+ gcrypt? ( >=dev-libs/libgcrypt-1.5.3:= ) >+ jemalloc? ( >=dev-libs/jemalloc-3.3.1 ) >+ kerberos? ( virtual/krb5 ) >+ mongodb? ( >=dev-libs/libmongo-client-0.1.4 ) >+ mysql? ( virtual/mysql ) >+ normalize? ( >+ >=dev-libs/libee-0.4.0 >+ >=dev-libs/liblognorm-1.0.0:= >+ ) >+ omudpspoof? ( >=net-libs/libnet-1.1.6 ) >+ oracle? ( >=dev-db/oracle-instantclient-basic-10.2 ) >+ postgres? ( >=dev-db/postgresql-base-8.4.20 ) >+ rabbitmq? ( >=net-libs/rabbitmq-c-0.3.0 ) >+ redis? ( >=dev-libs/hiredis-0.11.0 ) >+ relp? ( >=dev-libs/librelp-1.2.5 ) >+ rfc3195? ( >=dev-libs/liblogging-1.0.1:=[rfc3195] ) >+ rfc5424hmac? ( >=dev-libs/openssl-0.9.8y ) >+ snmp? ( >=net-analyzer/net-snmp-5.7.2 ) >+ ssl? ( >=net-libs/gnutls-2.12.23 ) >+ systemd? ( >=sys-apps/systemd-208 ) >+ zeromq? ( >=net-libs/czmq-1.2.0 )" >+DEPEND="${RDEPEND} >+ virtual/pkgconfig" >+ >+BRANCH="8-stable" >+ >+# Test suite requires a special setup or will always fail >+RESTRICT="test" >+ >+# Maitainer note : open a bug to upstream >+# showing that building in a separate dir fails >+AUTOTOOLS_IN_SOURCE_BUILD=1 >+ >+AUTOTOOLS_PRUNE_LIBTOOL_FILES="modules" >+ >+DOCS=( >+ AUTHORS >+ ChangeLog >+ "${FILESDIR}"/${BRANCH}/README.gentoo >+) >+ >+src_unpack() { >+ unpack ${P}.tar.gz >+ >+ if use doc; then >+ local doc_tarball="${PN}-doc-${PV}.tar.gz" >+ >+ 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 ${doc_tarball} >+ fi >+} >+ >+src_prepare() { >+ epatch "${FILESDIR}"/${BRANCH}/20-rsyslog-json_tokener_errors.patch >+} >+ >+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-generate-man-pages >+ # Input Plugins without depedencies >+ --enable-imfile >+ --enable-impstats >+ --enable-imptcp >+ --enable-imttcp >+ # Message Modificiation Plugins without depedencies >+ --enable-mmanon >+ --enable-mmaudit >+ --enable-mmcount >+ --enable-mmfields >+ --enable-mmjsonparse >+ --enable-mmpstrucdata >+ --enable-mmsequence >+ --enable-mmutf8fix >+ # Output Modification Plugins without dependencies >+ --enable-mail >+ --enable-omprog >+ --enable-omruleset >+ --enable-omstdout >+ --enable-omuxsock >+ # Misc >+ --enable-pmaixforwardedfrom >+ --enable-pmciscoios >+ --enable-pmcisconames >+ --enable-pmlastmsg >+ --enable-pmrfc3164sd >+ --enable-pmsnare >+ # DB >+ $(use_enable dbi libdbi) >+ $(use_enable mongodb ommongodb) >+ $(use_enable mysql) >+ $(use_enable oracle) >+ $(use_enable postgres pgsql) >+ $(use_enable redis omhiredis) >+ # Debug >+ $(use_enable debug) >+ $(use_enable debug diagtools) >+ $(use_enable debug imdiag) >+ $(use_enable debug memcheck) >+ $(use_enable debug rtinst) >+ $(use_enable debug valgrind) >+ # Misc >+ $(use_enable elasticsearch) >+ $(use_enable gcrypt libgcrypt) >+ $(use_enable jemalloc) >+ $(use_enable kerberos gssapi-krb5) >+ $(use_enable normalize mmnormalize) >+ $(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 ssl gnutls) >+ $(use_enable systemd imjournal) >+ $(use_enable systemd omjournal) >+ $(use_enable usertools) >+ $(use_enable zeromq imzmq3) >+ $(use_enable zeromq omzmq3) >+ "$(systemd_with_unitdir)" >+ ) >+ >+ autotools-utils_src_configure >+} >+ >+src_install() { >+ use doc && HTML_DOCS=( "${S}/docs/build/" ) >+ autotools-utils_src_install >+ >+ newconfd "${FILESDIR}/${BRANCH}/${PN}.confd" ${PN} >+ newinitd "${FILESDIR}/${BRANCH}/${PN}.initd" ${PN} >+ >+ keepdir /var/empty/dev >+ keepdir /var/spool/${PN} >+ keepdir /etc/ssl/${PN} >+ keepdir /etc/${PN}.d >+ >+ insinto /etc >+ newins "${FILESDIR}/${BRANCH}/${PN}.conf" ${PN}.conf >+ >+ insinto /etc/rsyslog.d/ >+ doins "${FILESDIR}/${BRANCH}/50-default.conf" >+ >+ insinto /etc/logrotate.d/ >+ newins "${FILESDIR}/${BRANCH}/${PN}.logrotate" ${PN} >+ >+ 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 >+} >+ >+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 [[ -z "${REPLACING_VERSIONS}" ]] || [[ ${REPLACING_VERSIONS} < 8.0 ]]; then >+ # Show this message until rsyslog-8.x >+ echo >+ elog "Since ${PN}-7.6.3 we no longer use the catch-all log target" >+ elog "\"/var/log/syslog\" due to its redundancy to the other log targets." >+ >+ advertise_readme=1 >+ 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 >+ 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 " http://www.rsyslog.com/doc/rsyslog_tls.html" >+}
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 520328
:
383202
|
383264