diff options
author | Alexys Jacob <ultrabug@gentoo.org> | 2012-06-01 12:54:18 +0000 |
---|---|---|
committer | Alexys Jacob <ultrabug@gentoo.org> | 2012-06-01 12:54:18 +0000 |
commit | 8845bb105fcf22b1b7daca26422593315204e3d9 (patch) | |
tree | b9213ba4ff8d32013ca91c0c78ca5be7d89d4fbc /app-admin | |
parent | x86 stable, see bug 418413 (diff) | |
download | gentoo-2-8845bb105fcf22b1b7daca26422593315204e3d9.tar.gz gentoo-2-8845bb105fcf22b1b7daca26422593315204e3d9.tar.bz2 gentoo-2-8845bb105fcf22b1b7daca26422593315204e3d9.zip |
New stable v6 branch bump, fix #398269.
(Portage version: 2.1.10.63/cvs/Linux x86_64)
Diffstat (limited to 'app-admin')
-rw-r--r-- | app-admin/rsyslog/ChangeLog | 10 | ||||
-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 |
7 files changed, 529 insertions, 1 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/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" +} |