diff options
author | Thomas D <whissi@whissi.de> | 2016-04-25 17:55:05 +0200 |
---|---|---|
committer | Ian Delaney <idella4@gentoo.org> | 2016-04-26 16:49:42 +0800 |
commit | c6e82bf2f832748f45ce6e2b9a35219465d36db5 (patch) | |
tree | 5f666f32d1ce8b926fd2a855a4e7e00f3fb6d00b /app-admin | |
parent | media-gfx/imv: new ebuild (diff) | |
download | gentoo-c6e82bf2f832748f45ce6e2b9a35219465d36db5.tar.gz gentoo-c6e82bf2f832748f45ce6e2b9a35219465d36db5.tar.bz2 gentoo-c6e82bf2f832748f45ce6e2b9a35219465d36db5.zip |
app-admin/rsyslog: Bump to v8.18.0
Keyword for hppa dropped because of unkeyworded deps
Use flag grok p-use masked under:
- profiles/arch/arm/package.use.mask
- profiles/default/linux/uclibc/arm/package.use.mask
Gentoo-bug: #577508, #577008, #577510, #581180
Signed-off-by: Ian Delaney <idella4@gentoo.org>
Package-Manager: portage-2.2.28
Closes: https://github.com/gentoo/gentoo/pull/1348
Signed-off-by: Ian Delaney <idella4@gentoo.org>
Diffstat (limited to 'app-admin')
-rw-r--r-- | app-admin/rsyslog/Manifest | 2 | ||||
-rw-r--r-- | app-admin/rsyslog/files/8-stable/50-rsyslog-8.18.0-issue963.patch | 482 | ||||
-rw-r--r-- | app-admin/rsyslog/files/8-stable/50-rsyslog-8.18.0-issue964.patch | 46 | ||||
-rw-r--r-- | app-admin/rsyslog/metadata.xml | 5 | ||||
-rw-r--r-- | app-admin/rsyslog/rsyslog-8.18.0.ebuild | 465 |
5 files changed, 999 insertions, 1 deletions
diff --git a/app-admin/rsyslog/Manifest b/app-admin/rsyslog/Manifest index bf5ce27ee437..27c7948c0761 100644 --- a/app-admin/rsyslog/Manifest +++ b/app-admin/rsyslog/Manifest @@ -1,4 +1,6 @@ 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.18.0.tar.gz 2261731 SHA256 94346237ecfa22c9f78cebc3f18d59056f5d9846eb906c75beaa7e486f02c695 SHA512 6b159ba23100b4675576f5b247d2bf482bab0beaa071c26c692c99e50f202b0b272b7a64ba2b7c726390d663677b7a6d68666b06f73825e35605b13ae0930fc7 WHIRLPOOL 8efa5d7639b2c5978bdbbcf9837ca87d91a1ccf37dfa5b66e5aa05221d4a31ff57093eb5d604d036f3fd7cafb394f25eaf9302cf2143402d2a9255f4fc53b196 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-docs-8.18.0.tar.gz 4269339 SHA256 8de82dece85a9a83d9c1feaf7fdfb883c2bfe5a82d84b846161bec0b9dba22c6 SHA512 c560f6a8c05f951d245b8bf96e3c58f9023761edf0e5e25b4a01dab934c1db8ad74baf7e90bd1139d3c6b5af396fca525a7818e87fcbf161317c21e005aae0b2 WHIRLPOOL 2d133a86d3a2abf5f4e3c57e0b65015ed3ad4770b4dfcd34420395fc11ab7d5752811afcb83a776bc51d665b75729bd76a0d94793d508e28aebeb815884dceff diff --git a/app-admin/rsyslog/files/8-stable/50-rsyslog-8.18.0-issue963.patch b/app-admin/rsyslog/files/8-stable/50-rsyslog-8.18.0-issue963.patch new file mode 100644 index 000000000000..e1f6a3234d06 --- /dev/null +++ b/app-admin/rsyslog/files/8-stable/50-rsyslog-8.18.0-issue963.patch @@ -0,0 +1,482 @@ +From b81d6dd36545f79c46e0a3488a9b26d0db75646a Mon Sep 17 00:00:00 2001 +From: Thomas D. +Date: Tue, 19 Apr 2016 02:09:18 +0200 +Subject: [PATCH 2/2] testbench: Use LD_PRELOAD=libfaketime.so instead of + faketime binary + +Fixes: https://github.com/rsyslog/rsyslog/issues/963 +--- + tests/faketime_common.sh | 20 +++++++------------- + tests/now-utc-casecmp.sh | 2 +- + tests/now-utc-ymd.sh | 2 +- + tests/now-utc.sh | 2 +- + tests/now_family_utc.sh | 2 +- + tests/timegenerated-dateordinal-invld.sh | 8 ++++---- + tests/timegenerated-dateordinal.sh | 28 ++++++++++++++-------------- + tests/timegenerated-utc-legacy.sh | 2 +- + tests/timegenerated-utc.sh | 2 +- + tests/timegenerated-uxtimestamp-invld.sh | 8 ++++---- + tests/timegenerated-uxtimestamp.sh | 26 ++++++++++++-------------- + tests/timegenerated-ymd.sh | 2 +- + 12 files changed, 48 insertions(+), 56 deletions(-) + +diff --git a/tests/faketime_common.sh b/tests/faketime_common.sh +index 10e0128..432ade6 100644 +--- a/tests/faketime_common.sh ++++ b/tests/faketime_common.sh +@@ -4,26 +4,20 @@ + # faketime is missing or the system isn't year-2038 complaint. + # This script can be sourced to prevent duplicated code. + +-if ! hash faketime 2>/dev/null ; then +- echo "faketime command missing, skipping test" ++faketime_testtime=$(LD_PRELOAD=libfaketime.so FAKETIME="1991-08-25 20:57:08" TZ=GMT date +%s 2>/dev/null) ++if [ ${faketime_testtime} -ne 683153828 ] ; then ++ echo "libfaketime.so missing, skipping test" + exit 77 + fi + +-export TZ=UTC+01:00 +- +-faketime -f '2016-03-11 16:00:00' date 1>/dev/null 2>&1 +-if [ $? -ne 0 ]; then +- # Safe-guard -- should never happen! +- echo "faketime command not working as expected. Check faketime binary in path!" +- exit 1 +-fi +- +-faketime '2040-01-01 16:00:00' date 1>/dev/null 2>&1 +-if [ $? -ne 0 ]; then ++# GMT-1 (POSIX TIME) is GMT+1 in "Human Time" ++faketime_testtime=$(LD_PRELOAD=libfaketime.so FAKETIME="2040-01-01 16:00:00" TZ=GMT-1 date +%s 2>/dev/null) ++if [ ${faketime_testtime} -eq -1 ]; then + # System isn't year-2038 compatible + RSYSLOG_TESTBENCH_Y2K38_INCOMPATIBLE="yes" + fi + ++export LD_PRELOAD=libfaketime.so + + rsyslog_testbench_require_y2k38_support() { + if [ -n "${RSYSLOG_TESTBENCH_Y2K38_INCOMPATIBLE}" ]; then +diff --git a/tests/now-utc-casecmp.sh b/tests/now-utc-casecmp.sh +index 8f8d6a0..26bb7ee 100755 +--- a/tests/now-utc-casecmp.sh ++++ b/tests/now-utc-casecmp.sh +@@ -19,7 +19,7 @@ template(name="outfmt" type="string" + :msg, contains, "msgnum:" action(type="omfile" template="outfmt" + file="rsyslog.out.log") + ' +-faketime '2016-01-01 01:00:00' $srcdir/diag.sh startup ++FAKETIME='2016-01-01 01:00:00' $srcdir/diag.sh startup + # what we send actually is irrelevant, as we just use system properties. + # but we need to send one message in order to gain output! + . $srcdir/diag.sh tcpflood -m1 +diff --git a/tests/now-utc-ymd.sh b/tests/now-utc-ymd.sh +index c327983..6e2d183 100755 +--- a/tests/now-utc-ymd.sh ++++ b/tests/now-utc-ymd.sh +@@ -19,7 +19,7 @@ template(name="outfmt" type="string" + :msg, contains, "msgnum:" action(type="omfile" template="outfmt" + file="rsyslog.out.log") + ' +-faketime '2016-01-01 01:00:00' $srcdir/diag.sh startup ++FAKETIME='2016-01-01 01:00:00' $srcdir/diag.sh startup + # what we send actually is irrelevant, as we just use system properties. + # but we need to send one message in order to gain output! + . $srcdir/diag.sh tcpflood -m1 +diff --git a/tests/now-utc.sh b/tests/now-utc.sh +index ed83948..69fd4fd 100755 +--- a/tests/now-utc.sh ++++ b/tests/now-utc.sh +@@ -9,7 +9,7 @@ echo \[now-utc\]: test \$NOW-UTC + export TZ=TEST-02:00 + + . $srcdir/diag.sh init +-faketime '2016-01-01 01:00:00' $srcdir/diag.sh startup now-utc.conf ++FAKETIME='2016-01-01 01:00:00' $srcdir/diag.sh startup now-utc.conf + # what we send actually is irrelevant, as we just use system properties. + # but we need to send one message in order to gain output! + . $srcdir/diag.sh tcpflood -m1 +diff --git a/tests/now_family_utc.sh b/tests/now_family_utc.sh +index caba0f9..e791cbf 100755 +--- a/tests/now_family_utc.sh ++++ b/tests/now_family_utc.sh +@@ -9,7 +9,7 @@ echo \[now_family_utc\]: test \$NOW family of system properties + export TZ=TEST+06:30 + + . $srcdir/diag.sh init +-faketime '2016-01-01 01:00:00' $srcdir/diag.sh startup now_family_utc.conf ++FAKETIME='2016-01-01 01:00:00' $srcdir/diag.sh startup now_family_utc.conf + # what we send actually is irrelevant, as we just use system properties. + # but we need to send one message in order to gain output! + . $srcdir/diag.sh tcpflood -m1 +diff --git a/tests/timegenerated-dateordinal-invld.sh b/tests/timegenerated-dateordinal-invld.sh +index bac5d4e..dc5e14c 100755 +--- a/tests/timegenerated-dateordinal-invld.sh ++++ b/tests/timegenerated-dateordinal-invld.sh +@@ -25,7 +25,7 @@ template(name="outfmt" type="string" + + echo "***SUBTEST: check 1800-01-01" + rm -f rsyslog.out.log # do cleanup of previous subtest +-faketime -f '1800-01-01 00:00:00' $srcdir/diag.sh startup ++FAKETIME='1800-01-01 00:00:00' $srcdir/diag.sh startup + . $srcdir/diag.sh tcpflood -m1 + . $srcdir/diag.sh shutdown-when-empty + . $srcdir/diag.sh wait-shutdown +@@ -40,7 +40,7 @@ fi; + + echo "***SUBTEST: check 1960-01-01" + rm -f rsyslog.out.log # do cleanup of previous subtest +-faketime -f '1960-01-01 00:00:00' $srcdir/diag.sh startup ++FAKETIME='1960-01-01 00:00:00' $srcdir/diag.sh startup + . $srcdir/diag.sh tcpflood -m1 + . $srcdir/diag.sh shutdown-when-empty + . $srcdir/diag.sh wait-shutdown +@@ -55,7 +55,7 @@ fi; + + echo "***SUBTEST: check 2101-01-01" + rm -f rsyslog.out.log # do cleanup of previous subtest +-faketime -f '2101-01-01 00:00:00' $srcdir/diag.sh startup ++FAKETIME='2101-01-01 00:00:00' $srcdir/diag.sh startup + . $srcdir/diag.sh tcpflood -m1 + . $srcdir/diag.sh shutdown-when-empty + . $srcdir/diag.sh wait-shutdown +@@ -70,7 +70,7 @@ fi; + + echo "***SUBTEST: check 2500-01-01" + rm -f rsyslog.out.log # do cleanup of previous subtest +-faketime -f '2500-01-01 00:00:00' $srcdir/diag.sh startup ++FAKETIME='2500-01-01 00:00:00' $srcdir/diag.sh startup + . $srcdir/diag.sh tcpflood -m1 + . $srcdir/diag.sh shutdown-when-empty + . $srcdir/diag.sh wait-shutdown +diff --git a/tests/timegenerated-dateordinal.sh b/tests/timegenerated-dateordinal.sh +index ace1c16..1164e53 100755 +--- a/tests/timegenerated-dateordinal.sh ++++ b/tests/timegenerated-dateordinal.sh +@@ -25,7 +25,7 @@ template(name="outfmt" type="string" + + echo "***SUBTEST: check 1970-01-01" + rm -f rsyslog.out.log # do cleanup of previous subtest +-faketime -f '1970-01-01 00:00:00' $srcdir/diag.sh startup ++FAKETIME='1970-01-01 00:00:00' $srcdir/diag.sh startup + . $srcdir/diag.sh tcpflood -m1 + . $srcdir/diag.sh shutdown-when-empty + . $srcdir/diag.sh wait-shutdown +@@ -39,7 +39,7 @@ fi; + + echo "***SUBTEST: check 2000-03-01" + rm -f rsyslog.out.log # do cleanup of previous subtest +-faketime -f '2000-03-01 12:00:00' $srcdir/diag.sh startup ++FAKETIME='2000-03-01 12:00:00' $srcdir/diag.sh startup + . $srcdir/diag.sh tcpflood -m1 + . $srcdir/diag.sh shutdown-when-empty + . $srcdir/diag.sh wait-shutdown +@@ -53,7 +53,7 @@ fi; + + echo "***SUBTEST: check 2016-01-01" + rm -f rsyslog.out.log # do cleanup of previous subtest +-faketime -f '2016-01-01 12:00:00' $srcdir/diag.sh startup ++FAKETIME='2016-01-01 12:00:00' $srcdir/diag.sh startup + . $srcdir/diag.sh tcpflood -m1 + . $srcdir/diag.sh shutdown-when-empty + . $srcdir/diag.sh wait-shutdown +@@ -67,7 +67,7 @@ fi; + + echo "***SUBTEST: check 2016-02-29" + rm -f rsyslog.out.log # do cleanup of previous subtest +-faketime -f '2016-02-29 12:00:00' $srcdir/diag.sh startup ++FAKETIME='2016-02-29 12:00:00' $srcdir/diag.sh startup + . $srcdir/diag.sh tcpflood -m1 + . $srcdir/diag.sh shutdown-when-empty + . $srcdir/diag.sh wait-shutdown +@@ -81,7 +81,7 @@ fi; + + echo "***SUBTEST: check 2016-03-01" + rm -f rsyslog.out.log # do cleanup of previous subtest +-faketime -f '2016-03-01 12:00:00' $srcdir/diag.sh startup ++FAKETIME='2016-03-01 12:00:00' $srcdir/diag.sh startup + . $srcdir/diag.sh tcpflood -m1 + . $srcdir/diag.sh shutdown-when-empty + . $srcdir/diag.sh wait-shutdown +@@ -95,7 +95,7 @@ fi; + + echo "***SUBTEST: check 2016-03-03" + rm -f rsyslog.out.log # do cleanup of previous subtest +-faketime -f '2016-03-03 12:00:00' $srcdir/diag.sh startup ++FAKETIME='2016-03-03 12:00:00' $srcdir/diag.sh startup + . $srcdir/diag.sh tcpflood -m1 + . $srcdir/diag.sh shutdown-when-empty + . $srcdir/diag.sh wait-shutdown +@@ -109,7 +109,7 @@ fi; + + echo "***SUBTEST: check 2016-12-31" + rm -f rsyslog.out.log # do cleanup of previous subtest +-faketime -f '2016-12-31 12:00:00' $srcdir/diag.sh startup ++FAKETIME='2016-12-31 12:00:00' $srcdir/diag.sh startup + . $srcdir/diag.sh tcpflood -m1 + . $srcdir/diag.sh shutdown-when-empty + . $srcdir/diag.sh wait-shutdown +@@ -123,7 +123,7 @@ fi; + + echo "***SUBTEST: check 2017-01-01" + rm -f rsyslog.out.log # do cleanup of previous subtest +-faketime -f '2017-01-01 12:00:00' $srcdir/diag.sh startup ++FAKETIME='2017-01-01 12:00:00' $srcdir/diag.sh startup + . $srcdir/diag.sh tcpflood -m1 + . $srcdir/diag.sh shutdown-when-empty + . $srcdir/diag.sh wait-shutdown +@@ -137,7 +137,7 @@ fi; + + echo "***SUBTEST: check 2020-03-01" + rm -f rsyslog.out.log # do cleanup of previous subtest +-faketime -f '2020-03-01 12:00:00' $srcdir/diag.sh startup ++FAKETIME='2020-03-01 12:00:00' $srcdir/diag.sh startup + . $srcdir/diag.sh tcpflood -m1 + . $srcdir/diag.sh shutdown-when-empty + . $srcdir/diag.sh wait-shutdown +@@ -151,7 +151,7 @@ fi; + + echo "***SUBTEST: check 2038-01-01" + rm -f rsyslog.out.log # do cleanup of previous subtest +-faketime -f '2038-01-01 12:00:00' $srcdir/diag.sh startup ++FAKETIME='2038-01-01 12:00:00' $srcdir/diag.sh startup + . $srcdir/diag.sh tcpflood -m1 + . $srcdir/diag.sh shutdown-when-empty + . $srcdir/diag.sh wait-shutdown +@@ -168,7 +168,7 @@ rsyslog_testbench_require_y2k38_support + + echo "***SUBTEST: check 2038-12-31" + rm -f rsyslog.out.log # do cleanup of previous subtest +-faketime -f '2038-12-31 12:00:00' $srcdir/diag.sh startup ++FAKETIME='2038-12-31 12:00:00' $srcdir/diag.sh startup + . $srcdir/diag.sh tcpflood -m1 + . $srcdir/diag.sh shutdown-when-empty + . $srcdir/diag.sh wait-shutdown +@@ -182,7 +182,7 @@ fi; + + echo "***SUBTEST: check 2040-01-01" + rm -f rsyslog.out.log # do cleanup of previous subtest +-faketime -f '2040-01-01 12:00:00' $srcdir/diag.sh startup ++FAKETIME='2040-01-01 12:00:00' $srcdir/diag.sh startup + . $srcdir/diag.sh tcpflood -m1 + . $srcdir/diag.sh shutdown-when-empty + . $srcdir/diag.sh wait-shutdown +@@ -196,7 +196,7 @@ fi; + + echo "***SUBTEST: check 2040-12-31" + rm -f rsyslog.out.log # do cleanup of previous subtest +-faketime -f '2040-12-31 12:00:00' $srcdir/diag.sh startup ++FAKETIME='2040-12-31 12:00:00' $srcdir/diag.sh startup + . $srcdir/diag.sh tcpflood -m1 + . $srcdir/diag.sh shutdown-when-empty + . $srcdir/diag.sh wait-shutdown +@@ -210,7 +210,7 @@ fi; + + echo "***SUBTEST: check 2100-01-01" + rm -f rsyslog.out.log # do cleanup of previous subtest +-faketime -f '2100-01-01 12:00:00' $srcdir/diag.sh startup ++FAKETIME='2100-01-01 12:00:00' $srcdir/diag.sh startup + . $srcdir/diag.sh tcpflood -m1 + . $srcdir/diag.sh shutdown-when-empty + . $srcdir/diag.sh wait-shutdown +diff --git a/tests/timegenerated-utc-legacy.sh b/tests/timegenerated-utc-legacy.sh +index f893377..60296d3 100755 +--- a/tests/timegenerated-utc-legacy.sh ++++ b/tests/timegenerated-utc-legacy.sh +@@ -26,7 +26,7 @@ template(name="outfmt" type="string" + + echo "***SUBTEST: check 2016-03-01" + rm -f rsyslog.out.log # do cleanup of previous subtest +-faketime -f '2016-03-01 12:00:00' $srcdir/diag.sh startup ++FAKETIME='2016-03-01 12:00:00' $srcdir/diag.sh startup + . $srcdir/diag.sh tcpflood -m1 + . $srcdir/diag.sh shutdown-when-empty + . $srcdir/diag.sh wait-shutdown +diff --git a/tests/timegenerated-utc.sh b/tests/timegenerated-utc.sh +index 651408c..5d32e36 100755 +--- a/tests/timegenerated-utc.sh ++++ b/tests/timegenerated-utc.sh +@@ -28,7 +28,7 @@ template(name="outfmt" type="list") { + + echo "***SUBTEST: check 2016-03-01" + rm -f rsyslog.out.log # do cleanup of previous subtest +-faketime -f '2016-03-01 12:00:00' $srcdir/diag.sh startup ++FAKETIME='2016-03-01 12:00:00' $srcdir/diag.sh startup + . $srcdir/diag.sh tcpflood -m1 + . $srcdir/diag.sh shutdown-when-empty + . $srcdir/diag.sh wait-shutdown +diff --git a/tests/timegenerated-uxtimestamp-invld.sh b/tests/timegenerated-uxtimestamp-invld.sh +index 90bcf74..76a353c 100755 +--- a/tests/timegenerated-uxtimestamp-invld.sh ++++ b/tests/timegenerated-uxtimestamp-invld.sh +@@ -25,7 +25,7 @@ template(name="outfmt" type="string" + + echo "***SUBTEST: check 1800-01-01" + rm -f rsyslog.out.log # do cleanup of previous subtest +-faketime -f '1800-01-01 00:00:00' $srcdir/diag.sh startup ++FAKETIME='1800-01-01 00:00:00' $srcdir/diag.sh startup + . $srcdir/diag.sh tcpflood -m1 + . $srcdir/diag.sh shutdown-when-empty + . $srcdir/diag.sh wait-shutdown +@@ -40,7 +40,7 @@ fi; + + echo "***SUBTEST: check 1960-01-01" + rm -f rsyslog.out.log # do cleanup of previous subtest +-faketime -f '1960-01-01 00:00:00' $srcdir/diag.sh startup ++FAKETIME='1960-01-01 00:00:00' $srcdir/diag.sh startup + . $srcdir/diag.sh tcpflood -m1 + . $srcdir/diag.sh shutdown-when-empty + . $srcdir/diag.sh wait-shutdown +@@ -55,7 +55,7 @@ fi; + + echo "***SUBTEST: check 2101-01-01" + rm -f rsyslog.out.log # do cleanup of previous subtest +-faketime -f '2101-01-01 00:00:00' $srcdir/diag.sh startup ++FAKETIME='2101-01-01 00:00:00' $srcdir/diag.sh startup + . $srcdir/diag.sh tcpflood -m1 + . $srcdir/diag.sh shutdown-when-empty + . $srcdir/diag.sh wait-shutdown +@@ -70,7 +70,7 @@ fi; + + echo "***SUBTEST: check 2500-01-01" + rm -f rsyslog.out.log # do cleanup of previous subtest +-faketime -f '2500-01-01 00:00:00' $srcdir/diag.sh startup ++FAKETIME='2500-01-01 00:00:00' $srcdir/diag.sh startup + . $srcdir/diag.sh tcpflood -m1 + . $srcdir/diag.sh shutdown-when-empty + . $srcdir/diag.sh wait-shutdown +diff --git a/tests/timegenerated-uxtimestamp.sh b/tests/timegenerated-uxtimestamp.sh +index b24f9c7..0eb2812 100755 +--- a/tests/timegenerated-uxtimestamp.sh ++++ b/tests/timegenerated-uxtimestamp.sh +@@ -25,7 +25,7 @@ template(name="outfmt" type="string" + + echo "***SUBTEST: check 1970-01-01" + rm -f rsyslog.out.log # do cleanup of previous subtest +-faketime -f '1970-01-01 00:00:00' $srcdir/diag.sh startup ++FAKETIME='1970-01-01 00:00:00' $srcdir/diag.sh startup + . $srcdir/diag.sh tcpflood -m1 + . $srcdir/diag.sh shutdown-when-empty + . $srcdir/diag.sh wait-shutdown +@@ -40,7 +40,7 @@ fi; + + echo "***SUBTEST: check 2000-03-01" + rm -f rsyslog.out.log # do cleanup of previous subtest +-faketime -f '2000-03-01 12:00:00' $srcdir/diag.sh startup ++FAKETIME='2000-03-01 12:00:00' $srcdir/diag.sh startup + . $srcdir/diag.sh tcpflood -m1 + . $srcdir/diag.sh shutdown-when-empty + . $srcdir/diag.sh wait-shutdown +@@ -55,7 +55,7 @@ fi; + + echo "***SUBTEST: check 2016-01-01" + rm -f rsyslog.out.log # do cleanup of previous subtest +-faketime -f '2016-01-01 12:00:00' $srcdir/diag.sh startup ++FAKETIME='2016-01-01 12:00:00' $srcdir/diag.sh startup + . $srcdir/diag.sh tcpflood -m1 + . $srcdir/diag.sh shutdown-when-empty + . $srcdir/diag.sh wait-shutdown +@@ -70,7 +70,7 @@ fi; + + echo "***SUBTEST: check 2016-02-29" + rm -f rsyslog.out.log # do cleanup of previous subtest +-faketime -f '2016-02-29 12:00:00' $srcdir/diag.sh startup ++FAKETIME='2016-02-29 12:00:00' $srcdir/diag.sh startup + . $srcdir/diag.sh tcpflood -m1 + . $srcdir/diag.sh shutdown-when-empty + . $srcdir/diag.sh wait-shutdown +@@ -85,7 +85,7 @@ fi; + + echo "***SUBTEST: check 2016-03-01" + rm -f rsyslog.out.log # do cleanup of previous subtest +-faketime -f '2016-03-01 12:00:00' $srcdir/diag.sh startup ++FAKETIME='2016-03-01 12:00:00' $srcdir/diag.sh startup + . $srcdir/diag.sh tcpflood -m1 + . $srcdir/diag.sh shutdown-when-empty + . $srcdir/diag.sh wait-shutdown +@@ -100,7 +100,7 @@ fi; + + echo "***SUBTEST: check 2016-03-03" + rm -f rsyslog.out.log # do cleanup of previous subtest +-faketime -f '2016-03-03 12:00:00' $srcdir/diag.sh startup ++FAKETIME='2016-03-03 12:00:00' $srcdir/diag.sh startup + . $srcdir/diag.sh tcpflood -m1 + . $srcdir/diag.sh shutdown-when-empty + . $srcdir/diag.sh wait-shutdown +@@ -115,7 +115,7 @@ fi; + + echo "***SUBTEST: check 2016-12-31" + rm -f rsyslog.out.log # do cleanup of previous subtest +-faketime -f '2016-12-31 12:00:00' $srcdir/diag.sh startup ++FAKETIME='2016-12-31 12:00:00' $srcdir/diag.sh startup + . $srcdir/diag.sh tcpflood -m1 + . $srcdir/diag.sh shutdown-when-empty + . $srcdir/diag.sh wait-shutdown +@@ -130,7 +130,7 @@ fi; + + echo "***SUBTEST: check 2017-01-01" + rm -f rsyslog.out.log # do cleanup of previous subtest +-faketime -f '2017-01-01 12:00:00' $srcdir/diag.sh startup ++FAKETIME='2017-01-01 12:00:00' $srcdir/diag.sh startup + . $srcdir/diag.sh tcpflood -m1 + . $srcdir/diag.sh shutdown-when-empty + . $srcdir/diag.sh wait-shutdown +@@ -145,7 +145,7 @@ fi; + + echo "***SUBTEST: check 2020-03-01" + rm -f rsyslog.out.log # do cleanup of previous subtest +-faketime -f '2020-03-01 12:00:00' $srcdir/diag.sh startup ++FAKETIME='2020-03-01 12:00:00' $srcdir/diag.sh startup + . $srcdir/diag.sh tcpflood -m1 + . $srcdir/diag.sh shutdown-when-empty + . $srcdir/diag.sh wait-shutdown +@@ -160,7 +160,7 @@ fi; + + echo "***SUBTEST: check 2038-01-01" + rm -f rsyslog.out.log # do cleanup of previous subtest +-faketime -f '2038-01-01 12:00:00' $srcdir/diag.sh startup ++FAKETIME='2038-01-01 12:00:00' $srcdir/diag.sh startup + . $srcdir/diag.sh tcpflood -m1 + . $srcdir/diag.sh shutdown-when-empty + . $srcdir/diag.sh wait-shutdown +@@ -172,13 +172,11 @@ if [ ! $? -eq 0 ]; then + exit 1 + fi; + +- + rsyslog_testbench_require_y2k38_support + +- + echo "***SUBTEST: check 2040-01-01" + rm -f rsyslog.out.log # do cleanup of previous subtest +-faketime -f '2040-01-01 12:00:00' $srcdir/diag.sh startup ++FAKETIME='2040-01-01 12:00:00' $srcdir/diag.sh startup + . $srcdir/diag.sh tcpflood -m1 + . $srcdir/diag.sh shutdown-when-empty + . $srcdir/diag.sh wait-shutdown +@@ -193,7 +191,7 @@ fi; + + echo "***SUBTEST: check 2100-01-01" + rm -f rsyslog.out.log # do cleanup of previous subtest +-faketime -f '2100-01-01 12:00:00' $srcdir/diag.sh startup ++FAKETIME='2100-01-01 12:00:00' $srcdir/diag.sh startup + . $srcdir/diag.sh tcpflood -m1 + . $srcdir/diag.sh shutdown-when-empty + . $srcdir/diag.sh wait-shutdown +diff --git a/tests/timegenerated-ymd.sh b/tests/timegenerated-ymd.sh +index 66b364b..f5f9213 100755 +--- a/tests/timegenerated-ymd.sh ++++ b/tests/timegenerated-ymd.sh +@@ -19,7 +19,7 @@ template(name="outfmt" type="string" + :msg, contains, "msgnum:" action(type="omfile" template="outfmt" + file="rsyslog.out.log") + ' +-faketime '2016-01-01 01:00:00' $srcdir/diag.sh startup ++FAKETIME='2016-01-01 01:00:00' $srcdir/diag.sh startup + # what we send actually is irrelevant, as we just use system properties. + # but we need to send one message in order to gain output! + . $srcdir/diag.sh tcpflood -m1 +-- +2.8.1 + diff --git a/app-admin/rsyslog/files/8-stable/50-rsyslog-8.18.0-issue964.patch b/app-admin/rsyslog/files/8-stable/50-rsyslog-8.18.0-issue964.patch new file mode 100644 index 000000000000..1148c04e9ce8 --- /dev/null +++ b/app-admin/rsyslog/files/8-stable/50-rsyslog-8.18.0-issue964.patch @@ -0,0 +1,46 @@ +From 35b838b13e838cfe81bf565163bc892dd4347f68 Mon Sep 17 00:00:00 2001 +From: Thomas D. +Date: Tue, 19 Apr 2016 00:00:00 +0200 +Subject: [PATCH 1/2] testbench: Add missing exit calls to + {faketime,privdrop}_common.sh + +"diag.sh exit" just cleans up so we still have to end the tests when skipping +with a real exit on our own. +--- + tests/faketime_common.sh | 9 +++++---- + tests/privdrop_common.sh | 1 + + 2 files changed, 6 insertions(+), 4 deletions(-) + +diff --git a/tests/faketime_common.sh b/tests/faketime_common.sh +index 5e868bc..10e0128 100644 +--- a/tests/faketime_common.sh ++++ b/tests/faketime_common.sh +@@ -26,8 +26,9 @@ fi + + + rsyslog_testbench_require_y2k38_support() { +- if [ -n "${RSYSLOG_TESTBENCH_Y2K38_INCOMPATIBLE}" ]; then +- echo "Skipping further tests because system doesn't support year 2038 ..." +- . $srcdir/diag.sh exit +- fi ++ if [ -n "${RSYSLOG_TESTBENCH_Y2K38_INCOMPATIBLE}" ]; then ++ echo "Skipping further tests because system doesn't support year 2038 ..." ++ . $srcdir/diag.sh exit ++ exit 0 ++ fi + } +diff --git a/tests/privdrop_common.sh b/tests/privdrop_common.sh +index a0994ec..203a23b 100755 +--- a/tests/privdrop_common.sh ++++ b/tests/privdrop_common.sh +@@ -52,6 +52,7 @@ rsyslog_testbench_setup_testuser() { + if [ -z "${testgroupname}" ]; then + echo "Skipping ... please set RSYSLOG_TESTUSER or make sure the user running the testbench has a primary group!" + . $srcdir/diag.sh exit ++ exit 0 + else + has_testuser="${EUID}" + fi +-- +2.8.1 + diff --git a/app-admin/rsyslog/metadata.xml b/app-admin/rsyslog/metadata.xml index 5556aa10e5a2..bb8a01939b57 100644 --- a/app-admin/rsyslog/metadata.xml +++ b/app-admin/rsyslog/metadata.xml @@ -15,12 +15,15 @@ <flag name="dbi">Build the general database output module (requires <pkg>dev-db/libdbi</pkg>)</flag> <flag name="elasticsearch">Build the Elasticsearch output module (requires <pkg>net-misc/curl</pkg>)</flag> <flag name="gcrypt">Add support for encrypted log files using <pkg>dev-libs/libgcrypt</pkg></flag> + <flag name="grok">Build the grok modify module (requires <pkg>dev-libs/grok</pkg>)</flag> <flag name="jemalloc">Use <pkg>dev-libs/jemalloc</pkg> for allocations.</flag> + <flag name="kafka">Build the Apache Kafka output module (requires <pkg>dev-libs/librdkafka</pkg>)</flag> <flag name="kerberos">Build the GSSAPI input and output module (requires <pkg>virtual/krb5</pkg>)</flag> <flag name="libressl">Use <pkg>dev-libs/libressl</pkg> for building the rfc5424hmac modify module (requires rfc5424hmac USE flag)</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> <flag name="normalize">Build the normalize modify module (requires <pkg>dev-libs/libee</pkg> and <pkg>dev-libs/liblognorm</pkg>)</flag> + <flag name="omhttpfs">Build the httpfs output module (requires <pkg>net-misc/curl</pkg>)</flag> <flag name="omudpspoof">Build the udpspoof output module (requires <pkg>net-libs/libnet</pkg>)</flag> <flag name="postgres">Build the PostgreSQL database output module (requires <pkg>dev-db/postgresql</pkg>)</flag> <flag name="rabbitmq">Build the RabbitMQ output module (requires <pkg>net-libs/rabbitmq-c</pkg>)</flag> @@ -32,7 +35,7 @@ <flag name="ssl">Add support for encrypted client/server communication (requires <pkg>net-libs/gnutls</pkg>)</flag> <flag name="systemd">Build the journal input and output module (requires <pkg>sys-apps/systemd</pkg>)</flag> <flag name="usertools">Installs the user tools (rsgtutil, rscryutil...) corresponding to the set USE flags</flag> - <flag name="zeromq">Build the ZeroMQ input and output modules (requires <pkg>net-libs/zeromq</pkg>)</flag> + <flag name="zeromq">Build the ZeroMQ input and output modules (requires <pkg>net-libs/czmq</pkg>)</flag> </use> <upstream> <bugs-to>https://github.com/rsyslog/rsyslog/issues</bugs-to> diff --git a/app-admin/rsyslog/rsyslog-8.18.0.ebuild b/app-admin/rsyslog/rsyslog-8.18.0.ebuild new file mode 100644 index 000000000000..b893b8ff7f8e --- /dev/null +++ b/app-admin/rsyslog/rsyslog-8.18.0.ebuild @@ -0,0 +1,465 @@ +# Copyright 1999-2016 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=6 + +inherit autotools linux-info systemd + +DESCRIPTION="An enhanced multi-threaded syslogd with database support and more" +HOMEPAGE="http://www.rsyslog.com/" + +BRANCH="8-stable" + +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 + MY_PV=${PV%_rc*} + MY_FILENAME="${PN}-${PV}.tar.gz" + MY_FILENAME_DOCS="${PN}-docs-${PV}.tar.gz" + S="${WORKDIR}/${PN}-${MY_PV}" + + # Upstream URL schema: + # RC: http://www.rsyslog.com/files/download/rsyslog/rc/rsyslog-8.18.0.tar.gz + # http://www.rsyslog.com/files/download/rsyslog/rc2/rsyslog-8.18.0.tar.gz + # Release: http://www.rsyslog.com/files/download/rsyslog/rsyslog-8.18.0.tar.gz + + MY_URL_PREFIX= + if [[ ${PV} = *_rc* ]]; then + _tmp_last_index=$(($(get_last_version_component_index ${PV})+1)) + _tmp_suffix=$(get_version_component_range ${_tmp_last_index} ${PV}) + if [[ ${_tmp_suffix} = *rc* ]]; then + MY_URL_PREFIX="${_tmp_suffix}/" + fi + + # Cleaning up temporary variables + unset _tmp_last_index + unset _tmp_suffix + else + KEYWORDS="~arm ~amd64 ~x86" + fi + + SRC_URI=" + http://www.rsyslog.com/files/download/${PN}/${MY_URL_PREFIX}${PN}-${MY_PV}.tar.gz -> ${MY_FILENAME} + doc? ( http://www.rsyslog.com/files/download/${PN}/${MY_URL_PREFIX}${PN}-doc-${MY_PV}.tar.gz -> ${MY_FILENAME_DOCS} ) + " +fi + +LICENSE="GPL-3 LGPL-3 Apache-2.0" +SLOT="0" +IUSE="dbi debug doc elasticsearch +gcrypt grok jemalloc kafka kerberos libressl mongodb mysql normalize omhttpfs" +IUSE+=" omudpspoof postgres rabbitmq redis relp rfc3195 rfc5424hmac snmp ssl systemd test usertools zeromq" + +RDEPEND=" + >=dev-libs/libfastjson-0.99.2:= + >=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:= ) + grok? ( >=dev-libs/grok-0.9.2 ) + jemalloc? ( >=dev-libs/jemalloc-3.3.1:= ) + kafka? ( >=dev-libs/librdkafka-0.9.0.99:= ) + 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.2:= + ) + omhttpfs? ( >=net-misc/curl-7.35.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? ( + !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:0= ) + systemd? ( >=sys-apps/systemd-208 ) + zeromq? ( + >=net-libs/zeromq-4.1.1:= + >=net-libs/czmq-3.0.0 + )" +DEPEND="${RDEPEND} + virtual/pkgconfig + test? ( sys-libs/libfaketime )" + +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 + +CONFIG_CHECK="~INOTIFY_USER" +WARNING_INOTIFY_USER="CONFIG_INOTIFY_USER isn't set. Imfile module on this system will only support polling mode!" + +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_prepare() { + if [[ ! ${PV} == "9999" ]]; then + eapply -p1 "${FILESDIR}"/8-stable/50-rsyslog-8.18.0-issue964.patch + eapply -p1 "${FILESDIR}"/8-stable/50-rsyslog-8.18.0-issue963.patch + fi + + default + + eautoreconf +} + +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-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-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 kafka omkafka) + $(use_enable kerberos gssapi-krb5) + $(use_enable normalize mmnormalize) + $(use_enable grok mmgrok) + $(use_enable omhttpfs) + $(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 imczmq) + $(use_enable zeromq imzmq3) + $(use_enable zeromq omczmq) + $(use_enable zeromq omzmq3) + --with-systemdsystemunitdir="$(systemd_get_systemunitdir)" + ) + + econf "${myeconfargs[@]}" +} + +src_compile() { + default + + 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= + + # Sometimes tests aren't executable (i.e. when added via patch) + einfo "Adjusting permissions of test scripts ..." + find "${S}"/tests -type f -name '*.sh' \! -perm -111 -exec chmod a+x '{}' \; || \ + die "Failed to adjust test scripts permission" + + 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() { + local DOCS=( + AUTHORS + ChangeLog + "${FILESDIR}"/${BRANCH}/README.gentoo + ) + + use doc && local HTML_DOCS=( "${S}/docs/build/" ) + + default + + newconfd "${FILESDIR}/${BRANCH}/${PN}.confd-r1" ${PN} + newinitd "${FILESDIR}/${BRANCH}/${PN}.initd-r1" ${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 + + find "${ED}"usr/lib* -name '*.la' -delete || die +} + +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 + local 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" +} |