summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLars Wendler <polynomial-c@gentoo.org>2016-02-05 16:11:30 +0100
committerLars Wendler <polynomial-c@gentoo.org>2016-02-05 16:24:32 +0100
commitbb3bc4375d2c3564bba80af8c5d95428ec6fddf9 (patch)
treec551220e0d23dfb5750c5fe4a3f9ab945303d418 /app-admin
parentapp-admin/rsyslog: Bump to version 8.16.0 (diff)
downloadgentoo-bb3bc4375d2c3564bba80af8c5d95428ec6fddf9.tar.gz
gentoo-bb3bc4375d2c3564bba80af8c5d95428ec6fddf9.tar.bz2
gentoo-bb3bc4375d2c3564bba80af8c5d95428ec6fddf9.zip
app-admin/rsyslog: Removed old.
Package-Manager: portage-2.2.27 Signed-off-by: Lars Wendler <polynomial-c@gentoo.org>
Diffstat (limited to 'app-admin')
-rw-r--r--app-admin/rsyslog/Manifest4
-rw-r--r--app-admin/rsyslog/files/8-stable/10-respect_CFLAGS-r1.patch15
-rw-r--r--app-admin/rsyslog/files/8-stable/40-rsyslog-fix-parallel-build-issue-479.patch25
-rw-r--r--app-admin/rsyslog/files/8-stable/50-rsyslog-add-option-to-disable-valgrind-usage-in-testbench.patch56
-rw-r--r--app-admin/rsyslog/files/8-stable/50-rsyslog-fix-size-based-legacy-config-statements.patch31
-rw-r--r--app-admin/rsyslog/files/8-stable/50-rsyslog-run-queue-persist-test-only-once.patch22
-rw-r--r--app-admin/rsyslog/files/8-stable/rsyslog.confd30
-rw-r--r--app-admin/rsyslog/files/8-stable/rsyslog.initd69
-rw-r--r--app-admin/rsyslog/rsyslog-8.12.0-r1.ebuild420
-rw-r--r--app-admin/rsyslog/rsyslog-8.7.0-r2.ebuild413
10 files changed, 0 insertions, 1085 deletions
diff --git a/app-admin/rsyslog/Manifest b/app-admin/rsyslog/Manifest
index 66ab9443dd85..bf5ce27ee437 100644
--- a/app-admin/rsyslog/Manifest
+++ b/app-admin/rsyslog/Manifest
@@ -1,8 +1,4 @@
-DIST rsyslog-8.12.0.tar.gz 2091620 SHA256 466bfeac8296e89de1eb9029880998ba7b5fc25694143197bb47167df6cb7e20 SHA512 7735f15f8a843ee41530d180d00ab3a6854ef28e9036db7ecfe0525549b3ab2b184149c2edc4553240dd4e3003ee12ebcdf47719669daa3cc6915d5a30888c72 WHIRLPOOL b96faab541fd8b53558738b7bd71d3b6acc7d66da4fb0552d781f0e214c00a11b4a74464f7b9c9a1d62bc359658f93d380a490ee78afc11d1702975a6edc6823
DIST rsyslog-8.13.0.tar.gz 2077267 SHA256 b182bd0a7686bef093be570bfb850417191292522fb58e0ad32f2c824f754a33 SHA512 a3245e5b10ae96e6df981291f55a43fa9a8258db213e33a36d7b5a620ea7daaac04a1f93a56304105c4fd10e546f92789831f5b2188b418b4b3b248a4e7795c9 WHIRLPOOL 8473e2c272182d84c629175aafd185cfa6fcafad8a028fd212de118f2e9abf458e062c6065dc5ebb1df27e81546a37387944ad1b3f0d16a38ee25a409b51b1c7
DIST rsyslog-8.16.0.tar.gz 2132012 SHA256 4fe4f97c10899086d98b9401d7e8d2bcff61c7c3f7cde8627891e36fc6ec1b76 SHA512 e45acc16078d83937edd7e22f916fe050b62aa057ca4dd980823850f2195213c12db36f759c528b5fe6f1b061a61e2117fca6086245bc248392cc4e61b2383dc WHIRLPOOL 809035873565645cea5896fb19882239a0d70776ea0b948739440f7a28baf6df4bf4e958de7506d289355eadc26e1fba7e9cd8df315339f18f89acaecc462eaa
-DIST rsyslog-8.7.0.tar.gz 2003365 SHA256 c77125b67a623569c9bdca8136b9aac013f1c6fd82fb8595e3ea267e61800f9c SHA512 53feac42c14134d76f5592ee491bb56fb2c4c33822a7a5609a5267b6911a5c5c4e73c5d66a913a666967d8826ee3077b91d8d2a1d1b60bcb3d425b35ec4677b0 WHIRLPOOL c74c401de68bb59310e307a0d9859d2f58bcbf8126d637d23d4f3979a0d6c69bce8ca850c2942b43f311ea83f47c9554f34e5dc10623d32324da1b18023d357d
-DIST rsyslog-doc-8.12.0.tar.gz 4212441 SHA256 f88517c1e5ae3a8ba129d531b5b4bb79e80f70898a8a5b72a0abd7a8a0feb8f0 SHA512 a1b3907e1a474076dd11e76b267eff35dadbd5abaf3ab802a187ce045eecc6028c854ed8e661650e10c74c79408c6ded341d16af94a05f10c529faaa8f606afb WHIRLPOOL aa21ea93536bab4c9761bdbe2e6c67f650bf181f64cb7c4a78c646d319a5472895be2a118c90d7c42548575b76f62e5dc6b0c4103cf373ab9e3704a6999c6c1b
DIST rsyslog-doc-8.13.0.tar.gz 4147364 SHA256 3da9a1446686d1cfa82c123a610f2c30f4dc1cbfa608f44ded2baf168e86b67b SHA512 6676533b1e4884f18e583be19c5a50b8f12017ecc2c6860d54dcc72d64e7eafe20a2af3a22817226df123a7a193c7090097502f287455488dd8806b7aac0a5cd WHIRLPOOL 1231580f2bf8af42a7dd34f0a88315ff56324eb64d1259a281a5266fdbe7a472f596d66a5b6d1f5cbf19fdb6f76a2083753e0de224a07653454178128de4fead
DIST rsyslog-doc-8.16.0.tar.gz 4174347 SHA256 03033d264b29fd791299d5d618bd061853c008ac8087f3b6c4870e1b8f6abc39 SHA512 746e4de102f15ea10085ca21eeed74dd8264742ba7029cb54caf87b72070ab6a73e79af46d97717323be1e68d9d1fa78807d5d4446d15524aa4c565650f7b0d0 WHIRLPOOL ff8dfcc3dd7e87a7316f94a3b8f199cd902cbf99772bb97147b9af37b8c6941f13341438450b3dbf3139d5518488e74df6b77c1eec3182e92a9476ccb951ec5b
-DIST rsyslog-doc-8.7.0.tar.gz 4105507 SHA256 f131bfb963eed4fe74d7336ee5261876b436004b78994d47523a82c0f7d666a8 SHA512 9b5b6f28a55b58c956ca614301fc9667243d02c321f8b4071264e4040dd8fe79ba7eb5a08912e2a229bdcf12f68eec24f1c65ba7b82ccd60c8e70d34267b8405 WHIRLPOOL 386ad5164768a5a4919ba5acda29f3ef670b78cc9d6845e3c8ee252b43d6622c19c7f8ec1edd7d0f1d111bf2c06d29fb5dbf9af6b46c426932ae6caa0e63c30c
diff --git a/app-admin/rsyslog/files/8-stable/10-respect_CFLAGS-r1.patch b/app-admin/rsyslog/files/8-stable/10-respect_CFLAGS-r1.patch
deleted file mode 100644
index de89e6708c1f..000000000000
--- a/app-admin/rsyslog/files/8-stable/10-respect_CFLAGS-r1.patch
+++ /dev/null
@@ -1,15 +0,0 @@
-diff --git a/configure.ac b/configure.ac
-index bebb399..5003f10 100644
---- a/configure.ac
-+++ b/configure.ac
-@@ -792,8 +792,8 @@ if test "x$enable_rsyslogrt" = "xyes"; then
- fi
- AM_CONDITIONAL(ENABLE_RSYSLOGRT, test x$enable_rsyslogrt = xyes)
- RSRT_CFLAGS="\$(RSRT_CFLAGS1) \$(LIBESTR_CFLAGS) \$(JSON_C_CFLAGS)"
--if test "$GCC" = "yes"
--then RSRT_CFLAGS="$RSRT_CFLAGS -W -Wall -Wformat-security -Wshadow -Wcast-align -Wpointer-arith -Wmissing-format-attribute -Werror=implicit-function-declaration -g"
-+if test "$GCC" = "yes"; then
-+ RSRT_CFLAGS="$RSRT_CFLAGS -W -Wall -Wformat-security -Wshadow -Wcast-align -Wpointer-arith -Wmissing-format-attribute -Werror=implicit-function-declaration"
- fi
- RSRT_LIBS="\$(RSRT_LIBS1) \$(LIBESTR_LIBS) \$(JSON_C_LIBS)"
- AC_SUBST(RSRT_CFLAGS1)
diff --git a/app-admin/rsyslog/files/8-stable/40-rsyslog-fix-parallel-build-issue-479.patch b/app-admin/rsyslog/files/8-stable/40-rsyslog-fix-parallel-build-issue-479.patch
deleted file mode 100644
index 831e9ed93e60..000000000000
--- a/app-admin/rsyslog/files/8-stable/40-rsyslog-fix-parallel-build-issue-479.patch
+++ /dev/null
@@ -1,25 +0,0 @@
-From ac3e7d316efee0b7a2b953aebdd3268f2b7c31c5 Mon Sep 17 00:00:00 2001
-From: Thomas D.
-Date: Thu, 13 Aug 2015 17:50:36 +0200
-Fix: Parallel build issue "cannot find ../runtime/.libs/librsyslog.a: No such file or directory" (Fixes #479)
-
-This issue was introduced with commit fb4fd2ddd2f08380ad65a8cafc5f124890b136ad.
----
- runtime/Makefile.am | 1 +
- 1 files changed, 1 insertions(+)
-
-diff --git a/runtime/Makefile.am b/runtime/Makefile.am
-index 1f3e350..d02ed4f 100644
---- a/runtime/Makefile.am
-+++ b/runtime/Makefile.am
-@@ -186,6 +186,7 @@ if ENABLE_LIBGCRYPT
- libgcry_la_SOURCES = libgcry.c libgcry_common.c libgcry.h
- libgcry_la_CPPFLAGS = $(RSRT_CFLAGS) $(LIBGCRYPT_CFLAGS)
- pkglib_LTLIBRARIES += lmcry_gcry.la
-+ lmcry_gcry_la_DEPENDENCIES = librsyslog.la
- lmcry_gcry_la_SOURCES = lmcry_gcry.c lmcry_gcry.h
- lmcry_gcry_la_CPPFLAGS = $(RSRT_CFLAGS) $(LIBGCRYPT_CFLAGS)
- lmcry_gcry_la_LDFLAGS = -module -avoid-version \
---
-2.5.0
-
diff --git a/app-admin/rsyslog/files/8-stable/50-rsyslog-add-option-to-disable-valgrind-usage-in-testbench.patch b/app-admin/rsyslog/files/8-stable/50-rsyslog-add-option-to-disable-valgrind-usage-in-testbench.patch
deleted file mode 100644
index 77d7919c6188..000000000000
--- a/app-admin/rsyslog/files/8-stable/50-rsyslog-add-option-to-disable-valgrind-usage-in-testbench.patch
+++ /dev/null
@@ -1,56 +0,0 @@
-From 2945539d12bbb79c44fd4402e87150b4ec58af25 Mon Sep 17 00:00:00 2001
-From: Thomas D.
-Date: Tue, 24 Mar 2015 02:03:13 +0100
-Subject: [PATCH] Add option to disable valgrind usage in testbench
-
-Temporary workaround for https://github.com/rsyslog/rsyslog/issues/263
-
----
- configure.ac | 27 +++++++++++++++++++++++----
- 1 file changed, 23 insertions(+), 4 deletions(-)
-
-diff --git a/configure.ac b/configure.ac
-index 0c72f80..cdfdd25 100644
---- a/configure.ac
-+++ b/configure.ac
-@@ -13,10 +13,6 @@ AC_CONFIG_HEADERS([config.h])
-
- AC_USE_SYSTEM_EXTENSIONS
-
--# check if valgrind is present
--AC_CHECK_PROG(have_valgrind, [valgrind], [yes])
--AM_CONDITIONAL(HAVE_VALGRIND, test x$have_valgrind = xyes)
--
- # Checks for programs.
- AC_PROG_LEX
- AC_PROG_YACC
-@@ -1125,6 +1121,29 @@ if test "x$enable_testbench" = "xyes"; then
- fi
-
-
-+# valgrind-testbench
-+AC_ARG_WITH([valgrind_testbench],
-+ [AS_HELP_STRING([--without-valgrind-testbench], [Don't use valgrind in testbench])]
-+)
-+
-+if test "x$with_valgrind_testbench" != "xno"; then
-+ AC_CHECK_PROG(VALGRIND, [valgrind], [valgrind], [no])
-+
-+ if test "x$enable_testbench" = "xyes" && test "x$VALGRIND" = "xno"; then
-+ if test "x$with_valgrind_testbench" = "xyes"; then
-+ AC_MSG_ERROR([valgrind is missing but forced with --with-valgrind-testbench. Either install valgrind or remove the option!])
-+ else
-+ AC_MSG_WARN([valgrind is missing -- testbench won't use valgrind!])
-+ fi
-+ else
-+ AC_MSG_NOTICE([testbench will use valgrind])
-+ fi
-+else
-+ AC_MSG_NOTICE([testbench won't use valgrind due to set --without-valgrind-testbench option])
-+fi
-+AM_CONDITIONAL([HAVE_VALGRIND], [test "x$with_valgrind_testbench" != "xno" && test "x$VALGRIND" != "xno"])
-+
-+
- # settings for the file input module
- AC_ARG_ENABLE(imfile,
- [AS_HELP_STRING([--enable-imfile],[file input module enabled @<:@default=no@:>@])],
diff --git a/app-admin/rsyslog/files/8-stable/50-rsyslog-fix-size-based-legacy-config-statements.patch b/app-admin/rsyslog/files/8-stable/50-rsyslog-fix-size-based-legacy-config-statements.patch
deleted file mode 100644
index 67a2f0616f32..000000000000
--- a/app-admin/rsyslog/files/8-stable/50-rsyslog-fix-size-based-legacy-config-statements.patch
+++ /dev/null
@@ -1,31 +0,0 @@
-From 3b7bd0b7a7f0f5f1bf7609bdf34e7d9a32608ea6 Mon Sep 17 00:00:00 2001
-From: Rainer Gerhards <rgerhards@adiscon.com>
-Date: Tue, 17 Mar 2015 11:50:06 +0100
-Subject: [PATCH] bugfix: size-based legacy config statements did not work
- properly
-
-on some platforms they misadressed memory, which could also lead
-to a segfault on startup. The problem is NOT experience on amd686
-in 64bit builds -- that's probably the reason this bug was uncovered
-very late. We assume, it's present in all v8 versions.
-
-Thanks to Michael Biebl for alerting us of it.
-
-closes https://github.com/rsyslog/rsyslog/issues/270
----
- runtime/cfsysline.c | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/runtime/cfsysline.c b/runtime/cfsysline.c
-index 36d4679..b441a48 100644
---- a/runtime/cfsysline.c
-+++ b/runtime/cfsysline.c
-@@ -161,7 +161,7 @@ static rsRetVal parseIntVal(uchar **pp, int64 *pVal)
- * param value must be int64!
- * rgerhards, 2008-01-09
- */
--static rsRetVal doGetSize(uchar **pp, rsRetVal (*pSetHdlr)(void*, uid_t), void *pVal)
-+static rsRetVal doGetSize(uchar **pp, rsRetVal (*pSetHdlr)(void*, int64), void *pVal)
- {
- DEFiRet;
- int64 i;
diff --git a/app-admin/rsyslog/files/8-stable/50-rsyslog-run-queue-persist-test-only-once.patch b/app-admin/rsyslog/files/8-stable/50-rsyslog-run-queue-persist-test-only-once.patch
deleted file mode 100644
index d2ded2228983..000000000000
--- a/app-admin/rsyslog/files/8-stable/50-rsyslog-run-queue-persist-test-only-once.patch
+++ /dev/null
@@ -1,22 +0,0 @@
-From 31a5edc9be63de42f68825ff8e4d683534664a68 Mon Sep 17 00:00:00 2001
-From: Thomas D.
-Date: Sun, 8 Mar 2015 21:05:03 +0100
-Subject: [PATCH] tests: Run queue-persist.sh only once
-
-queue-persist.sh was called twice in Makefile.
----
- tests/Makefile.am | 1 -
- 1 file changed, 1 deletion(-)
-
-diff --git a/tests/Makefile.am b/tests/Makefile.am
-index 7575b84..9824e7e 100644
---- a/tests/Makefile.am
-+++ b/tests/Makefile.am
-@@ -83,7 +83,6 @@ TESTS += \
- imuxsock_logger_root.sh \
- imuxsock_traillf_root.sh \
- imuxsock_ccmiddle_root.sh \
-- queue-persist.sh \
- discard-rptdmsg.sh \
- discard-allmark.sh \
- discard.sh \
diff --git a/app-admin/rsyslog/files/8-stable/rsyslog.confd b/app-admin/rsyslog/files/8-stable/rsyslog.confd
deleted file mode 100644
index d8cbe875960a..000000000000
--- a/app-admin/rsyslog/files/8-stable/rsyslog.confd
+++ /dev/null
@@ -1,30 +0,0 @@
-# /etc/conf.d/rsyslog
-
-# Configuration file
-RSYSLOG_CONFIGFILE="/etc/rsyslog.conf"
-
-# PID file
-# If you should ever change this, remember to update
-# "/etc/logrotate.d/rsyslog", too.
-RSYSLOG_PIDFILE="/run/rsyslogd.pid"
-
-# You can use this configuration option to pass additional options to the
-# start-stop-daemon, see start-stop-daemon(8) for more details.
-# Per default we wait 1000ms after we have started the service to ensure
-# that the daemon is really up and running.
-RSYSLOG_SSDARGS="--wait 1000"
-
-# The termination timeout (start-stop-daemon parameter "retry") ensures
-# that the service will be terminated within a given time (60 + 5 seconds
-# per default) when you are stopping the service.
-# You need to increase the value when you are working with a large queue.
-# See http://www.rsyslog.com/doc/queues.html for further information.
-RSYSLOG_TERMTIMEOUT="TERM/60/KILL/5"
-
-
-# Options to rsyslogd
-# See rsyslogd(8) for more details
-# Notes:
-# * Do not specify another PIDFILE but use the variable above to change the location
-# * Do not specify another CONFIGFILE but use the variable above to change the location
-RSYSLOG_OPTS=""
diff --git a/app-admin/rsyslog/files/8-stable/rsyslog.initd b/app-admin/rsyslog/files/8-stable/rsyslog.initd
deleted file mode 100644
index a74f218e6a32..000000000000
--- a/app-admin/rsyslog/files/8-stable/rsyslog.initd
+++ /dev/null
@@ -1,69 +0,0 @@
-#!/sbin/runscript
-# Copyright 1999-2014 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Id$
-
-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 --git a/app-admin/rsyslog/rsyslog-8.12.0-r1.ebuild b/app-admin/rsyslog/rsyslog-8.12.0-r1.ebuild
deleted file mode 100644
index ff39a400bd93..000000000000
--- a/app-admin/rsyslog/rsyslog-8.12.0-r1.ebuild
+++ /dev/null
@@ -1,420 +0,0 @@
-# Copyright 1999-2015 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Id$
-
-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/"
-
-BRANCH="8-stable"
-
-PATCHES=()
-
-if [[ ${PV} == "9999" ]]; then
- EGIT_REPO_URI="
- git://github.com/rsyslog/${PN}.git
- https://github.com/rsyslog/${PN}.git
- "
-
- DOC_REPO_URI="
- git://github.com/rsyslog/${PN}-doc.git
- https://github.com/rsyslog/${PN}-doc.git
- "
-
- inherit git-r3
-else
- 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 )
- "
- KEYWORDS="~amd64 ~arm ~hppa ~x86"
-
- PATCHES+=( "${FILESDIR}"/8-stable/40-rsyslog-fix-parallel-build-issue-479.patch )
-fi
-
-LICENSE="GPL-3 LGPL-3 Apache-2.0"
-SLOT="0"
-IUSE="dbi debug doc elasticsearch +gcrypt jemalloc kerberos libressl mongodb mysql normalize omudpspoof
-postgres rabbitmq redis relp rfc3195 rfc5424hmac snmp ssl systemd test 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.1.0:=
- <dev-libs/liblognorm-1.1.2:=
- ) )
- )
- omudpspoof? ( >=net-libs/libnet-1.1.6 )
- postgres? ( >=dev-db/postgresql-8.4.20:= )
- rabbitmq? ( >=net-libs/rabbitmq-c-0.3.0 )
- redis? ( >=dev-libs/hiredis-0.11.0 )
- relp? ( >=dev-libs/librelp-1.2.5 )
- rfc3195? ( >=dev-libs/liblogging-1.0.1:=[rfc3195] )
- rfc5424hmac? (
- !libressl? ( >=dev-libs/openssl-0.9.8y:0= )
- libressl? ( dev-libs/libressl:= )
- )
- snmp? ( >=net-analyzer/net-snmp-5.7.2 )
- ssl? ( >=net-libs/gnutls-2.12.23 )
- systemd? ( >=sys-apps/systemd-208 )
- zeromq? ( >=net-libs/czmq-1.2.0 )"
-DEPEND="${RDEPEND}
- virtual/pkgconfig"
-
-if [[ ${PV} == "9999" ]]; then
- DEPEND+=" doc? ( >=dev-python/sphinx-1.1.3-r7 )"
- DEPEND+=" >=sys-devel/flex-2.5.39-r1"
- DEPEND+=" >=sys-devel/bison-2.4.3"
- DEPEND+=" >=dev-python/docutils-0.12"
-fi
-
-# 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() {
- if [[ ${PV} == "9999" ]]; then
- git-r3_fetch
- git-r3_checkout
- else
- unpack ${P}.tar.gz
- fi
-
- if use doc; then
- if [[ ${PV} == "9999" ]]; then
- local _EGIT_BRANCH=
- if [ -n "${EGIT_BRANCH}" ]; then
- # Cannot use rsyslog commits/branches for documentation repository
- _EGIT_BRANCH=${EGIT_BRANCH}
- unset EGIT_BRANCH
- fi
-
- git-r3_fetch "${DOC_REPO_URI}"
- git-r3_checkout "${DOC_REPO_URI}" "${S}"/docs
-
- if [ -n "${_EGIT_BRANCH}" ]; then
- # Restore previous EGIT_BRANCH information
- EGIT_BRANCH=${_EGIT_BRANCH}
- fi
- else
- 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
- fi
-}
-
-src_configure() {
- # Maintainer notes:
- # * Guardtime support is missing because libgt isn't yet available
- # in portage.
- # * Hadoop's HDFS file system output module is currently not
- # supported in Gentoo because nobody is able to test it
- # (JAVA dependency).
- # * dev-libs/hiredis doesn't provide pkg-config (see #504614,
- # upstream PR 129 and 136) so we need to export HIREDIS_*
- # variables because rsyslog's build system depends on pkg-config.
-
- if use redis; then
- export HIREDIS_LIBS="-L${EPREFIX}/usr/$(get_libdir) -lhiredis"
- export HIREDIS_CFLAGS="-I${EPREFIX}/usr/include"
- fi
-
- local myeconfargs=(
- --disable-debug-symbols
- --disable-generate-man-pages
- --without-valgrind-testbench
- $(use_enable test testbench)
- # Input Plugins without depedencies
- --enable-imdiag
- --enable-imfile
- --enable-impstats
- --enable-imptcp
- # Message Modificiation Plugins without depedencies
- --enable-mmanon
- --enable-mmaudit
- --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-pmsnare
- # DB
- $(use_enable dbi libdbi)
- $(use_enable mongodb ommongodb)
- $(use_enable mysql)
- $(use_enable postgres pgsql)
- $(use_enable redis omhiredis)
- # Debug
- $(use_enable debug)
- $(use_enable debug diagtools)
- $(use_enable debug 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_compile() {
- autotools-utils_src_compile
-
- if use doc && [[ "${PV}" == "9999" ]]; then
- einfo "Building documentation ..."
- local doc_dir="${S}/docs"
- cd "${doc_dir}" || die "Cannot chdir into \"${doc_dir}\"!"
- sphinx-build -b html source build || die "Building documentation failed!"
- fi
-}
-
-src_test() {
- local _has_increased_ulimit=
-
- if ulimit -n 3072; then
- _has_increased_ulimit="true"
- fi
-
- if ! emake --jobs 1 check; then
- eerror "Test suite failed! :("
-
- if [ -z "${_has_increased_ulimit}" ]; then
- eerror "Probably because open file limit couldn't be set to 3072."
- fi
-
- if has userpriv $FEATURES; then
- eerror "Please try to reproduce the test suite failure with FEATURES=-userpriv " \
- "before you submit a bug report."
- fi
-
- fi
-}
-
-src_install() {
- 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
- 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"
-}
diff --git a/app-admin/rsyslog/rsyslog-8.7.0-r2.ebuild b/app-admin/rsyslog/rsyslog-8.7.0-r2.ebuild
deleted file mode 100644
index 1c72272b5208..000000000000
--- a/app-admin/rsyslog/rsyslog-8.7.0-r2.ebuild
+++ /dev/null
@@ -1,413 +0,0 @@
-# Copyright 1999-2015 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Id$
-
-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/"
-
-BRANCH="8-stable"
-
-PATCHES=(
- "${FILESDIR}"/${BRANCH}/10-respect_CFLAGS-r1.patch
-)
-
-if [[ ${PV} == "9999" ]]; then
- EGIT_REPO_URI="
- git://github.com/rsyslog/${PN}.git
- https://github.com/rsyslog/${PN}.git
- "
-
- DOC_REPO_URI="
- git://github.com/rsyslog/${PN}-doc.git
- https://github.com/rsyslog/${PN}-doc.git
- "
-
- inherit git-r3
-else
- 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 )
- "
- KEYWORDS="amd64 ~arm hppa x86"
-
- PATCHES+=( "${FILESDIR}"/${BRANCH}/50-rsyslog-run-queue-persist-test-only-once.patch )
- PATCHES+=( "${FILESDIR}"/${BRANCH}/50-rsyslog-fix-size-based-legacy-config-statements.patch )
- PATCHES+=( "${FILESDIR}"/${BRANCH}/50-rsyslog-add-option-to-disable-valgrind-usage-in-testbench.patch )
-fi
-
-LICENSE="GPL-3 LGPL-3 Apache-2.0"
-SLOT="0"
-IUSE="dbi debug doc elasticsearch +gcrypt jemalloc kerberos mongodb mysql normalize omudpspoof postgres rabbitmq redis relp rfc3195 rfc5424hmac snmp ssl systemd test 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.1.0:=
- )
- omudpspoof? ( >=net-libs/libnet-1.1.6 )
- postgres? ( >=dev-db/postgresql-8.4.20:= )
- rabbitmq? ( >=net-libs/rabbitmq-c-0.3.0 )
- redis? ( >=dev-libs/hiredis-0.11.0 )
- relp? ( >=dev-libs/librelp-1.2.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"
-
-if [[ ${PV} == "9999" ]]; then
- DEPEND+=" doc? ( >=dev-python/sphinx-1.1.3-r7 )"
-fi
-
-# 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() {
- if [[ ${PV} == "9999" ]]; then
- git-r3_fetch
- git-r3_checkout
- else
- unpack ${P}.tar.gz
- fi
-
- if use doc; then
- if [[ ${PV} == "9999" ]]; then
- local _EGIT_BRANCH=
- if [ -n "${EGIT_BRANCH}" ]; then
- # Cannot use rsyslog commits/branches for documentation repository
- _EGIT_BRANCH=${EGIT_BRANCH}
- unset EGIT_BRANCH
- fi
-
- git-r3_fetch "${DOC_REPO_URI}"
- git-r3_checkout "${DOC_REPO_URI}" "${S}"/docs
-
- if [ -n "${_EGIT_BRANCH}" ]; then
- # Restore previous EGIT_BRANCH information
- EGIT_BRANCH=${_EGIT_BRANCH}
- fi
- else
- 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
- fi
-}
-
-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
- --without-valgrind-testbench
- $(use_enable test testbench)
- # Input Plugins without depedencies
- --enable-imdiag
- --enable-imfile
- --enable-impstats
- --enable-imptcp
- # Message Modificiation Plugins without depedencies
- --enable-mmanon
- --enable-mmaudit
- --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-pmsnare
- # DB
- $(use_enable dbi libdbi)
- $(use_enable mongodb ommongodb)
- $(use_enable mysql)
- $(use_enable postgres pgsql)
- $(use_enable redis omhiredis)
- # Debug
- $(use_enable debug)
- $(use_enable debug diagtools)
- $(use_enable debug 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_compile() {
- autotools-utils_src_compile
-
- if use doc && [[ "${PV}" == "9999" ]]; then
- einfo "Building documentation ..."
- local doc_dir="${S}/docs"
- cd "${doc_dir}" || die "Cannot chdir into \"${doc_dir}\"!"
- sphinx-build -b html source build || die "Building documentation failed!"
- fi
-}
-
-src_test() {
- local _has_increased_ulimit=
-
- if ulimit -n 3072; then
- _has_increased_ulimit="true"
- fi
-
- if ! emake --jobs 1 check; then
- eerror "Test suite failed! :("
-
- if [ -z "${_has_increased_ulimit}" ]; then
- eerror "Probably because open file limit couldn't be set to 3072."
- fi
-
- if has userpriv $FEATURES; then
- eerror "Please try to reproduce the test suite failure with FEATURES=-userpriv " \
- "before you submit a bug report."
- fi
-
- fi
-}
-
-src_install() {
- 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
- 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"
-}