summaryrefslogtreecommitdiff
path: root/app-admin/rsyslog/files
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2018-07-14 21:03:06 +0100
committerV3n3RiX <venerix@redcorelinux.org>2018-07-14 21:03:06 +0100
commit8376ef56580626e9c0f796d5b85b53a0a1c7d5f5 (patch)
tree7681bbd4e8b05407772df40a4bf04cbbc8afc3fa /app-admin/rsyslog/files
parent30a9caf154332f12ca60756e1b75d2f0e3e1822d (diff)
gentoo resync : 14.07.2018
Diffstat (limited to 'app-admin/rsyslog/files')
-rw-r--r--app-admin/rsyslog/files/8-stable/50-default-r1.conf107
-rw-r--r--app-admin/rsyslog/files/8-stable/50-default.conf95
-rw-r--r--app-admin/rsyslog/files/8-stable/README.gentoo36
-rw-r--r--app-admin/rsyslog/files/8-stable/rsyslog-8.27.0-fix-mmnormalize-tests.patch23
-rw-r--r--app-admin/rsyslog/files/8-stable/rsyslog-8.32.0-fix-building-without-curl-r3.patch137
-rw-r--r--app-admin/rsyslog/files/8-stable/rsyslog-8.34.0-fix-issue2612.patch13
-rw-r--r--app-admin/rsyslog/files/8-stable/rsyslog-8.35.0-fix-issue2719.patch241
-rw-r--r--app-admin/rsyslog/files/8-stable/rsyslog-8.35.0-fix-issue2726.patch41
-rw-r--r--app-admin/rsyslog/files/8-stable/rsyslog-r1.logrotate45
-rw-r--r--app-admin/rsyslog/files/8-stable/rsyslog.conf61
-rw-r--r--app-admin/rsyslog/files/8-stable/rsyslog.confd-r130
-rw-r--r--app-admin/rsyslog/files/8-stable/rsyslog.initd-r172
-rw-r--r--app-admin/rsyslog/files/8-stable/rsyslog.logrotate37
13 files changed, 938 insertions, 0 deletions
diff --git a/app-admin/rsyslog/files/8-stable/50-default-r1.conf b/app-admin/rsyslog/files/8-stable/50-default-r1.conf
new file mode 100644
index 000000000000..920c214ff6ca
--- /dev/null
+++ b/app-admin/rsyslog/files/8-stable/50-default-r1.conf
@@ -0,0 +1,107 @@
+#######################
+### DEFAULT ACTIONS ###
+#######################
+
+auth,authpriv.* action(
+ name="action_auth"
+ type="omfile"
+ File="/var/log/auth.log"
+ FileCreateMode="0600"
+ FileOwner="root"
+ FileGroup="adm"
+ Sync="off"
+)
+
+cron.* action(
+ name="action_cron"
+ type="omfile"
+ File="/var/log/cron.log"
+ FileOwner="root"
+ FileGroup="adm"
+)
+
+daemon.* action(
+ name="action_daemon"
+ type="omfile"
+ File="/var/log/daemon.log"
+ FileOwner="root"
+ FileGroup="adm"
+)
+
+kern.* action(
+ name="action_kern"
+ type="omfile"
+ File="/var/log/kern.log"
+ FileOwner="root"
+ FileGroup="adm"
+)
+
+lpr.* action(
+ name="action_lpr"
+ type="omfile"
+ File="/var/log/lpr.log"
+ FileOwner="root"
+ FileGroup="adm"
+)
+
+mail.* action(
+ name="action_mail"
+ type="omfile"
+ File="/var/log/mail.log"
+ FileOwner="root"
+ FileGroup="adm"
+)
+
+news.* action(
+ name="action_news"
+ type="omfile"
+ File="/var/log/news.log"
+ FileOwner="root"
+ FileGroup="adm"
+)
+
+user.* action(
+ name="action_user"
+ type="omfile"
+ File="/var/log/user.log"
+ FileOwner="root"
+ FileGroup="adm"
+)
+
+*.=debug;auth,authpriv,news,mail.none action(
+ name="action_debug"
+ type="omfile"
+ File="/var/log/debug.log"
+ FileOwner="root"
+ FileGroup="adm"
+)
+
+*.info;auth,authpriv,cron,daemon,lpr,mail,news.none action(
+ name="action_messages"
+ type="omfile"
+ File="/var/log/messages"
+ FileOwner="root"
+ FileGroup="adm"
+)
+
+# Uncomment the following directive to re-enable the
+# deprecated "/var/log/syslog" log file (don't forget to re-enable log
+# rotation in "/etc/logrotate.d/rsyslog" if you do that!)
+#*.*;auth,authpriv.none action(
+# name="action_syslog"
+# type="omfile"
+# File="/var/log/syslog"
+# FileOwner="root"
+# FileGroup="adm"
+#)
+
+*.emerg action(
+ name="action_emerge"
+ type="omusrmsg"
+ Users="*"
+ action.execOnlyOnceEveryInterval="10"
+)
+
+# Create an additional socket for the default chroot location
+# (used by net-misc/openssh[hpn], see https://bugs.gentoo.org/490744)
+input(type="imuxsock" Socket="/var/empty/dev/log")
diff --git a/app-admin/rsyslog/files/8-stable/50-default.conf b/app-admin/rsyslog/files/8-stable/50-default.conf
new file mode 100644
index 000000000000..9ae8578215bb
--- /dev/null
+++ b/app-admin/rsyslog/files/8-stable/50-default.conf
@@ -0,0 +1,95 @@
+#######################
+### DEFAULT ACTIONS ###
+#######################
+
+auth,authpriv.* action(
+ type="omfile"
+ File="/var/log/auth.log"
+ FileCreateMode="0600"
+ FileOwner="root"
+ FileGroup="adm"
+ Sync="off"
+)
+
+cron.* action(
+ type="omfile"
+ File="/var/log/cron.log"
+ FileOwner="root"
+ FileGroup="adm"
+)
+
+daemon.* action(
+ type="omfile"
+ File="/var/log/daemon.log"
+ FileOwner="root"
+ FileGroup="adm"
+)
+
+kern.* action(
+ type="omfile"
+ File="/var/log/kern.log"
+ FileOwner="root"
+ FileGroup="adm"
+)
+
+lpr.* action(
+ type="omfile"
+ File="/var/log/lpr.log"
+ FileOwner="root"
+ FileGroup="adm"
+)
+
+mail.* action(
+ type="omfile"
+ File="/var/log/mail.log"
+ FileOwner="root"
+ FileGroup="adm"
+)
+
+news.* action(
+ type="omfile"
+ File="/var/log/news.log"
+ FileOwner="root"
+ FileGroup="adm"
+)
+
+user.* action(
+ type="omfile"
+ File="/var/log/user.log"
+ FileOwner="root"
+ FileGroup="adm"
+)
+
+*.=debug;auth,authpriv,news,mail.none action(
+ type="omfile"
+ File="/var/log/debug.log"
+ FileOwner="root"
+ FileGroup="adm"
+)
+
+*.info;auth,authpriv,cron,daemon,lpr,mail,news.none action(
+ type="omfile"
+ File="/var/log/messages"
+ FileOwner="root"
+ FileGroup="adm"
+)
+
+# Uncomment the following directive to re-enable the
+# deprecated "/var/log/syslog" log file (don't forget to re-enable log
+# rotation in "/etc/logrotate.d/rsyslog" if you do that!)
+#*.*;auth,authpriv.none action(
+# type="omfile"
+# File="/var/log/syslog"
+# FileOwner="root"
+# FileGroup="adm"
+#)
+
+*.emerg action(
+ type="omusrmsg"
+ Users="*"
+ action.execOnlyOnceEveryInterval="10"
+)
+
+# Create an additional socket for the default chroot location
+# (used by net-misc/openssh[hpn], see https://bugs.gentoo.org/490744)
+input(type="imuxsock" Socket="/var/empty/dev/log")
diff --git a/app-admin/rsyslog/files/8-stable/README.gentoo b/app-admin/rsyslog/files/8-stable/README.gentoo
new file mode 100644
index 000000000000..9f0666c86b0a
--- /dev/null
+++ b/app-admin/rsyslog/files/8-stable/README.gentoo
@@ -0,0 +1,36 @@
+Introduction
+============
+
+Since rsyslog version 7.6 we are shipping a new default Gentoo
+configuration. See bug #501982 to learn more about what we were trying to
+achieve by rewriting the entire configuration.
+
+
+Important changes
+=================
+
+1. "/var/log/syslog" log file is now deprecated
+
+ Beginning with rsyslog-7.6, the "/var/log/syslog" log file will no
+ longer being written per default. We are considering this file as
+ deprecated/obsolet for the typical user/system.
+ The content from this log file is still availble through other
+ (dedicated) log files, see
+
+ - /var/log/cron.log
+ - /var/log/daemon.log
+ - /var/log/mail.log
+ - /var/log/messages
+
+ If you really need the old "/var/log/syslog" log file, all you have to
+ do is uncommenting the corresponding configuration directive in
+ "/etc/rsyslog.d/50-default.conf".
+
+ If you do so, don't forget to re-enable log rotation in
+ "/etc/logrotate.d/rsyslog", too.
+
+
+2. An additional input socket in "/var/empty/dev/log" (default chroot
+ location) will be created per default
+
+ See bug #490744 for further details.
diff --git a/app-admin/rsyslog/files/8-stable/rsyslog-8.27.0-fix-mmnormalize-tests.patch b/app-admin/rsyslog/files/8-stable/rsyslog-8.27.0-fix-mmnormalize-tests.patch
new file mode 100644
index 000000000000..6ef7e6426287
--- /dev/null
+++ b/app-admin/rsyslog/files/8-stable/rsyslog-8.27.0-fix-mmnormalize-tests.patch
@@ -0,0 +1,23 @@
+https://github.com/rsyslog/rsyslog/pull/1791
+---
+ tests/Makefile.am | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/tests/Makefile.am
++++ b/tests/Makefile.am
+@@ -498,7 +498,6 @@ TESTS += msgvar-concurrency-array.sh \
+ mmnormalize_processing_test2.sh \
+ mmnormalize_processing_test3.sh \
+ mmnormalize_processing_test4.sh
+-endif
+
+ if ENABLE_IMPTCP
+ TESTS += \
+@@ -512,6 +511,7 @@ if LOGNORM_REGEX_SUPPORTED
+ TESTS += \
+ mmnormalize_regex.sh
+ endif
++endif
+
+ if ENABLE_MMJSONPARSE
+ TESTS += \
diff --git a/app-admin/rsyslog/files/8-stable/rsyslog-8.32.0-fix-building-without-curl-r3.patch b/app-admin/rsyslog/files/8-stable/rsyslog-8.32.0-fix-building-without-curl-r3.patch
new file mode 100644
index 000000000000..534183a8ca29
--- /dev/null
+++ b/app-admin/rsyslog/files/8-stable/rsyslog-8.32.0-fix-building-without-curl-r3.patch
@@ -0,0 +1,137 @@
+https://github.com/rsyslog/rsyslog/commit/d9475f133e3c79875a7c4ccd92038b7123c1f155
+https://github.com/rsyslog/rsyslog/commit/468eeb79b8da91fb71dfef6bfb25476b2a37f446
+https://github.com/rsyslog/rsyslog/commit/50205ced0fc22e74f26f2a07b557b69c5d30e168
+
+--- a/grammar/rainerscript.c
++++ b/grammar/rainerscript.c
+@@ -1935,6 +1935,7 @@ num2ipv4(struct svar *__restrict__ const sourceVal) {
+ return(estr);
+ }
+
++#ifdef HAVE_LIBCURL
+ /* curl callback for doFunc_http_request */
+ static size_t
+ curlResult(void *ptr, size_t size, size_t nmemb, void *userdata)
+@@ -2010,6 +2011,7 @@ doFunc_http_request(struct cnffunc *__restrict__ const func,
+ }
+ RETiRet;
+ }
++#endif
+
+ static int ATTR_NONNULL(1,3,4)
+ doFunc_is_time(const char *__restrict__ const str,
+@@ -2513,11 +2515,16 @@ doFuncCall(struct cnffunc *__restrict__ const func, struct svar *__restrict__ co
+ if(bMustFree2) free(str2);
+ break;
+ case CNFFUNC_HTTP_REQUEST:
++#ifdef HAVE_LIBCURL
+ cnfexprEval(func->expr[0], &r[0], usrptr, pWti);
+ str = (char*) var2CString(&r[0], &bMustFree);
+ doFunc_http_request(func, ret, str);
+ if(bMustFree) free(str);
+ varFreeMembers(&r[0]);
++#else
++ LogError(0, RS_RET_INTERNAL_ERROR,
++ "rainerscript: internal error: HTTP_Fetch not supported, not built with libcurl support");
++#endif
+ break;
+ default:
+ if(Debug) {
+
+--- a/configure.ac
++++ b/configure.ac
+@@ -454,6 +454,8 @@ if test "$enable_libcurl" = "yes"; then
+ )
+ fi
+
++AM_CONDITIONAL(ENABLE_LIBCURL, test "x${enable_libcurl}" = "xyes")
++
+ # klog
+ AC_ARG_ENABLE(klog,
+ [AS_HELP_STRING([--enable-klog],[Integrated klog functionality @<:@default=yes@:>@])],
+
+--- a/tests/Makefile.am
++++ b/tests/Makefile.am
+@@ -226,7 +226,6 @@ TESTS += \
+ rscript_contains.sh \
+ rscript_bare_var_root.sh \
+ rscript_bare_var_root-empty.sh \
+- rscript_http_request.sh \
+ rscript_ipv42num.sh \
+ rscript_field.sh \
+ rscript_stop.sh \
+@@ -305,7 +304,11 @@ TESTS += \
+ lookup_table_rscript_reload.sh \
+ lookup_table_rscript_reload_without_stub.sh \
+ multiple_lookup_tables.sh
+-endif
++if ENABLE_LIBCURL
++TESTS += \
++ rscript_http_request.sh
++endif # ENABLE_LIBCURL
++endif # ENABLE_TESTBENCH2
+
+ if HAVE_VALGRIND
+ TESTS += \
+@@ -313,7 +316,6 @@ TESTS += \
+ mmexternal-InvldProg-vg.sh \
+ internal-errmsg-memleak-vg.sh \
+ rscript_set_memleak-vg.sh \
+- rscript_http_request-vg.sh \
+ no-parser-vg.sh \
+ discard-rptdmsg-vg.sh \
+ discard-allmark-vg.sh \
+@@ -338,6 +340,10 @@ TESTS += \
+ multiple_lookup_tables-vg.sh \
+ fac_local0-vg.sh \
+ rscript_trim-vg.sh
++if ENABLE_LIBCURL
++TESTS += \
++ rscript_http_request-vg.sh
++endif # ENABLE_LIBCURL
+ endif # HAVE_VALGRIND
+
+ if ENABLE_ROOT_TESTS
+
+--- a/grammar/Makefile.am
++++ b/grammar/Makefile.am
+@@ -12,8 +12,11 @@ libgrammar_la_SOURCES = \
+ parserif.h \
+ grammar.h
+ libgrammar_la_CPPFLAGS = $(RSRT_CFLAGS) $(LIBLOGGING_STDLOG_CFLAGS)
+-#libgrammar_la_LIBADD = $(CURL_LIBS) $(RSRT_LIBS) $(SOL_LIBS)
+-libgrammar_la_LIBADD = $(CURL_LIBS)
++libgrammar_la_LIBADD =
++if ENABLE_LIBCURL
++libgrammar_la_CPPFLAGS += $(CURL_CFLAGS)
++libgrammar_la_LIBADD += $(CURL_LIBS)
++endif
+
+ #testdriver_SOURCES = testdriver.c libgrammar.la
+ #testdriver_CPPFLAGS = $(RSRT_CFLAGS)
+
+--- a/plugins/omelasticsearch/Makefile.am
++++ b/plugins/omelasticsearch/Makefile.am
+@@ -1,7 +1,7 @@
+ pkglib_LTLIBRARIES = omelasticsearch.la
+
+ omelasticsearch_la_SOURCES = omelasticsearch.c
+-omelasticsearch_la_CPPFLAGS = $(RSRT_CFLAGS) $(PTHREADS_CFLAGS)
++omelasticsearch_la_CPPFLAGS = $(RSRT_CFLAGS) $(PTHREADS_CFLAGS) $(CURL_CFLAGS)
+ omelasticsearch_la_LDFLAGS = -module -avoid-version
+ omelasticsearch_la_LIBADD = $(CURL_LIBS) $(LIBM)
+
+--- a/grammar/rainerscript.c
++++ b/grammar/rainerscript.c
+@@ -36,7 +36,11 @@
+ #include <sys/types.h>
+ #include <libestr.h>
+ #include <time.h>
++
++#ifdef HAVE_LIBCURL
+ #include <curl/curl.h>
++#endif
++
+ #include "rsyslog.h"
+ #include "rainerscript.h"
+ #include "conf.h"
diff --git a/app-admin/rsyslog/files/8-stable/rsyslog-8.34.0-fix-issue2612.patch b/app-admin/rsyslog/files/8-stable/rsyslog-8.34.0-fix-issue2612.patch
new file mode 100644
index 000000000000..4e9e566e84c7
--- /dev/null
+++ b/app-admin/rsyslog/files/8-stable/rsyslog-8.34.0-fix-issue2612.patch
@@ -0,0 +1,13 @@
+https://github.com/rsyslog/rsyslog/issues/2612
+
+--- a/configure.ac
++++ b/configure.ac
+@@ -254,7 +254,7 @@ AC_LINK_IFELSE([AC_LANG_PROGRAM(, return __builtin_expect(main != 0, 1))],
+ # speeds up processig.
+ # note that when automic operations are enabled but not available, they
+ # will silently NOT be used!
+-AC_ARG_ENABLE(regexp,
++AC_ARG_ENABLE(atomic_operations,
+ [AS_HELP_STRING([--enable-atomic-operations],[Enable atomic operation support @<:@default=yes@:>@])],
+ [case "${enableval}" in
+ yes) enable_atomic_operations="yes" ;;
diff --git a/app-admin/rsyslog/files/8-stable/rsyslog-8.35.0-fix-issue2719.patch b/app-admin/rsyslog/files/8-stable/rsyslog-8.35.0-fix-issue2719.patch
new file mode 100644
index 000000000000..8996acd27e88
--- /dev/null
+++ b/app-admin/rsyslog/files/8-stable/rsyslog-8.35.0-fix-issue2719.patch
@@ -0,0 +1,241 @@
+Add missing files for mmkubernetes tests
+
+Upstream bug: https://github.com/rsyslog/rsyslog/pull/2719
+
+--- /dev/null
++++ b/tests/mmkubernetes-basic.out.json
+@@ -0,0 +1,110 @@
++[{
++ "kubernetes": {
++ "namespace_id": "namespace-name2-id",
++ "namespace_labels": {
++ "label_1_key": "label 1 value",
++ "label_with_empty_value": "",
++ "label_2_key": "label 2 value"
++ },
++ "creation_timestamp": "2018-04-09T21:56:39Z",
++ "pod_id": "pod-name2-id",
++ "labels": {
++ "custom_label": "pod-name2-label-value",
++ "deploymentconfig": "pod-name2-dc",
++ "component": "pod-name2-component",
++ "label_with_empty_value": "",
++ "deployment": "pod-name2-deployment"
++ },
++ "pod_name": "pod-name2",
++ "namespace_name": "namespace-name2",
++ "container_name": "container-name2",
++ "master_url": "http://localhost:18443"
++ },
++ "docker": {
++ "container_id": "id2"
++ }
++},
++{
++ "message": "a message from container 4",
++ "CONTAINER_NAME": "some-prefix_container-name4_pod-name4_namespace-name4_unused4_unused44",
++ "CONTAINER_ID_FULL": "id4",
++ "kubernetes": {
++ "namespace_id": "namespace-name4-id",
++ "namespace_labels": {
++ "label_1_key": "label 1 value",
++ "label_with_empty_value": "",
++ "label_2_key": "label 2 value"
++ },
++ "creation_timestamp": "2018-04-09T21:56:39Z",
++ "pod_id": "pod-name4-id",
++ "labels": {
++ "custom_label": "pod-name4-label-value",
++ "deploymentconfig": "pod-name4-dc",
++ "component": "pod-name4-component",
++ "label_with_empty_value": "",
++ "deployment": "pod-name4-deployment"
++ },
++ "pod_name": "pod-name4",
++ "namespace_name": "namespace-name4",
++ "container_name": "container-name4",
++ "master_url": "http://localhost:18443"
++ },
++ "docker": {
++ "container_id": "id4"
++ }
++},
++{
++ "kubernetes": {
++ "namespace_id": "namespace-name1-id",
++ "namespace_labels": {
++ "label_1_key": "label 1 value",
++ "label_with_empty_value": "",
++ "label_2_key": "label 2 value"
++ },
++ "creation_timestamp": "2018-04-09T21:56:39Z",
++ "pod_id": "pod-name1-id",
++ "labels": {
++ "custom_label": "pod-name1-label-value",
++ "deploymentconfig": "pod-name1-dc",
++ "component": "pod-name1-component",
++ "label_with_empty_value": "",
++ "deployment": "pod-name1-deployment"
++ },
++ "pod_name": "pod-name1",
++ "namespace_name": "namespace-name1",
++ "container_name": "container-name1",
++ "master_url": "http://localhost:18443"
++ },
++ "docker": {
++ "container_id": "id1"
++ }
++},
++{
++ "message": "a message from container 3",
++ "CONTAINER_NAME": "some-prefix_container-name3.container-hash3_pod-name3_namespace-name3_unused3_unused33",
++ "CONTAINER_ID_FULL": "id3",
++ "kubernetes": {
++ "namespace_id": "namespace-name3-id",
++ "namespace_labels": {
++ "label_1_key": "label 1 value",
++ "label_with_empty_value": "",
++ "label_2_key": "label 2 value"
++ },
++ "creation_timestamp": "2018-04-09T21:56:39Z",
++ "pod_id": "pod-name3-id",
++ "labels": {
++ "custom_label": "pod-name3-label-value",
++ "deploymentconfig": "pod-name3-dc",
++ "component": "pod-name3-component",
++ "label_with_empty_value": "",
++ "deployment": "pod-name3-deployment"
++ },
++ "pod_name": "pod-name3",
++ "namespace_name": "namespace-name3",
++ "container_name": "container-name3",
++ "master_url": "http://localhost:18443"
++ },
++ "docker": {
++ "container_id": "id3"
++ }
++}]
+--- /dev/null
++++ b/tests/mmkubernetes_test_server.py
+@@ -0,0 +1,121 @@
++# Used by the mmkubernetes tests
++# This is a simple http server which responds to kubernetes api requests
++# and responds with kubernetes api server responses
++# added 2018-04-06 by richm, released under ASL 2.0
++import os
++import json
++import sys
++
++try:
++ from http.server import HTTPServer, BaseHTTPRequestHandler
++except ImportError:
++ from BaseHTTPServer import HTTPServer, BaseHTTPRequestHandler
++
++ns_template = '''{{
++ "kind": "Namespace",
++ "apiVersion": "v1",
++ "metadata": {{
++ "name": "{namespace_name}",
++ "selfLink": "/api/v1/namespaces/{namespace_name}",
++ "uid": "{namespace_name}-id",
++ "resourceVersion": "2988",
++ "creationTimestamp": "2018-04-09T21:56:39Z",
++ "labels": {{
++ "label.1.key":"label 1 value",
++ "label.2.key":"label 2 value",
++ "label.with.empty.value":""
++ }},
++ "annotations": {{
++ "k8s.io/description": "",
++ "k8s.io/display-name": "",
++ "k8s.io/node-selector": "",
++ "k8s.io/sa.scc.mcs": "s0:c9,c4",
++ "k8s.io/sa.scc.supplemental-groups": "1000080000/10000",
++ "k8s.io/sa.scc.uid-range": "1000080000/10000",
++ "quota.k8s.io/cluster-resource-override-enabled": "false"
++ }}
++ }},
++ "spec": {{
++ "finalizers": [
++ "openshift.io/origin",
++ "kubernetes"
++ ]
++ }},
++ "status": {{
++ "phase": "Active"
++ }}
++}}'''
++
++pod_template = '''{{
++ "kind": "Pod",
++ "apiVersion": "v1",
++ "metadata": {{
++ "name": "{pod_name}",
++ "generateName": "{pod_name}-prefix",
++ "namespace": "{namespace_name}",
++ "selfLink": "/api/v1/namespaces/{namespace_name}/pods/{pod_name}",
++ "uid": "{pod_name}-id",
++ "resourceVersion": "3486",
++ "creationTimestamp": "2018-04-09T21:56:39Z",
++ "labels": {{
++ "component": "{pod_name}-component",
++ "deployment": "{pod_name}-deployment",
++ "deploymentconfig": "{pod_name}-dc",
++ "custom.label": "{pod_name}-label-value",
++ "label.with.empty.value":""
++ }},
++ "annotations": {{
++ "k8s.io/deployment-config.latest-version": "1",
++ "k8s.io/deployment-config.name": "{pod_name}-dc",
++ "k8s.io/deployment.name": "{pod_name}-deployment",
++ "k8s.io/custom.name": "custom value",
++ "annotation.with.empty.value":""
++ }}
++ }},
++ "status": {{
++ "phase": "Running",
++ "hostIP": "172.18.4.32",
++ "podIP": "10.128.0.14",
++ "startTime": "2018-04-09T21:57:39Z"
++ }}
++}}'''
++
++class SimpleHTTPRequestHandler(BaseHTTPRequestHandler):
++
++ def do_GET(self):
++ # "http://localhost:18443/api/v1/namespaces/namespace-name2"
++ # parse url - either /api/v1/namespaces/$ns_name
++ # or
++ # /api/v1/namespaces/$ns_name/pods/$pod_name
++ comps = self.path.split('/')
++ status = 400
++ if len(comps) >= 5 and comps[1] == 'api' and comps[2] == 'v1':
++ if len(comps) == 5 and comps[3] == 'namespaces': # namespace
++ resp = ns_template.format(namespace_name=comps[4])
++ status = 200
++ elif len(comps) == 7 and comps[3] == 'namespaces' and comps[5] == 'pods':
++ resp = pod_template.format(namespace_name=comps[4], pod_name=comps[6])
++ status = 200
++ else:
++ resp = '{{"error":"do not recognize {0}"}}'.format(self.path)
++ else:
++ resp = '{{"error":"do not recognize {0}"}}'.format(self.path)
++ if not status == 200:
++ self.log_error(resp)
++ self.send_response(status)
++ self.end_headers()
++ self.wfile.write(json.dumps(json.loads(resp), separators=(',',':')))
++
++port = int(sys.argv[1])
++
++httpd = HTTPServer(('localhost', port), SimpleHTTPRequestHandler)
++
++# write "started" to file named in argv[3]
++with open(sys.argv[3], "w") as ff:
++ ff.write("started\n")
++
++# write pid to file named in argv[2]
++with open(sys.argv[2], "w") as ff:
++ ff.write('{0}\n'.format(os.getpid()))
++
++httpd.serve_forever()
diff --git a/app-admin/rsyslog/files/8-stable/rsyslog-8.35.0-fix-issue2726.patch b/app-admin/rsyslog/files/8-stable/rsyslog-8.35.0-fix-issue2726.patch
new file mode 100644
index 000000000000..eaec239c3839
--- /dev/null
+++ b/app-admin/rsyslog/files/8-stable/rsyslog-8.35.0-fix-issue2726.patch
@@ -0,0 +1,41 @@
+From c1791ee90fdd8adf219ae3d2b849f5f041284b7c Mon Sep 17 00:00:00 2001
+From: Rich Megginson <rmeggins@redhat.com>
+Date: Thu, 17 May 2018 18:38:25 -0600
+Subject: [PATCH] mmkubernetes test python must encode response
+
+https://github.com/rsyslog/rsyslog/issues/2721
+Was not working on python3 - must use `encode()` to convert the
+string to a `bytes` object.
+Also run the server with python -u to make sure we get the log
+output from the kubernetes test server.
+---
+ tests/mmkubernetes-basic.sh | 2 +-
+ tests/mmkubernetes_test_server.py | 2 +-
+ 2 files changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/tests/mmkubernetes-basic.sh b/tests/mmkubernetes-basic.sh
+index 0bbfd08ca..d320c343f 100755
+--- a/tests/mmkubernetes-basic.sh
++++ b/tests/mmkubernetes-basic.sh
+@@ -4,7 +4,7 @@
+ . $srcdir/diag.sh init
+
+ testsrv=mmk8s-test-server
+-python ./mmkubernetes_test_server.py 18443 rsyslog${testsrv}.pid rsyslogd${testsrv}.started > mmk8s_srv.log 2>&1 &
++python -u ./mmkubernetes_test_server.py 18443 rsyslog${testsrv}.pid rsyslogd${testsrv}.started > mmk8s_srv.log 2>&1 &
+ BGPROCESS=$!
+ . $srcdir/diag.sh wait-startup $testsrv
+ echo background mmkubernetes_test_server.py process id is $BGPROCESS
+diff --git a/tests/mmkubernetes_test_server.py b/tests/mmkubernetes_test_server.py
+index 0de215603..24f4e1b0e 100644
+--- a/tests/mmkubernetes_test_server.py
++++ b/tests/mmkubernetes_test_server.py
+@@ -104,7 +104,7 @@ def do_GET(self):
+ self.log_error(resp)
+ self.send_response(status)
+ self.end_headers()
+- self.wfile.write(json.dumps(json.loads(resp), separators=(',',':')))
++ self.wfile.write(json.dumps(json.loads(resp), separators=(',',':')).encode())
+
+ port = int(sys.argv[1])
+
diff --git a/app-admin/rsyslog/files/8-stable/rsyslog-r1.logrotate b/app-admin/rsyslog/files/8-stable/rsyslog-r1.logrotate
new file mode 100644
index 000000000000..3a92ba37bdec
--- /dev/null
+++ b/app-admin/rsyslog/files/8-stable/rsyslog-r1.logrotate
@@ -0,0 +1,45 @@
+# Uncomment the following directive if you have re-enabled
+# "/var/log/syslog" in "/etc/rsyslog.d/50-default.conf"
+#/var/log/syslog
+#{
+# rotate 7
+# daily
+# missingok
+# notifempty
+# delaycompress
+# compress
+# postrotate
+# if type -p systemctl 2>&1 1>/dev/null && systemctl is-system-running 2>&1 1>/dev/null ; then
+# systemctl kill -s HUP rsyslog.service
+# else
+# test -r /run/rsyslogd.pid && kill -HUP $(cat /run/rsyslogd.pid) 2>&1 1>/dev/null
+# fi
+# endscript
+#}
+
+/var/log/auth.log
+/var/log/cron.log
+/var/log/daemon.log
+/var/log/kern.log
+/var/log/lpr.log
+/var/log/mail.log
+/var/log/news.log
+/var/log/user.log
+/var/log/debug.log
+/var/log/messages
+{
+ rotate 4
+ weekly
+ missingok
+ notifempty
+ compress
+ delaycompress
+ sharedscripts
+ postrotate
+ if type -p systemctl 2>&1 1>/dev/null && systemctl is-system-running 2>&1 1>/dev/null ; then
+ systemctl kill -s HUP rsyslog.service
+ else
+ test -r /run/rsyslogd.pid && kill -HUP $(cat /run/rsyslogd.pid) 2>&1 1>/dev/null
+ fi
+ endscript
+}
diff --git a/app-admin/rsyslog/files/8-stable/rsyslog.conf b/app-admin/rsyslog/files/8-stable/rsyslog.conf
new file mode 100644
index 000000000000..da484598a652
--- /dev/null
+++ b/app-admin/rsyslog/files/8-stable/rsyslog.conf
@@ -0,0 +1,61 @@
+# /etc/rsyslog.conf
+#
+# This configuration is based on RainerScript, the new recommended syntax
+# for RSYSLOG. See http://www.rsyslog.com/doc/rainerscript.html for further
+# details.
+#
+# But if you don't want to learn something new at moment, don't worry: The
+# legacy syntax is still supported.
+#
+# You may want to use the new RSYSLOG configuration builder to create your
+# own more advanced configuration: http://www.rsyslog.com/rsyslog-configuration-builder/
+
+# Check config syntax on startup and abort if unclean (default: off)
+#$AbortOnUncleanConfig on
+
+
+###############
+### MODULES ###
+###############
+
+# Read syslog messages from default Unix socket /dev/log (e.g. via logger command)
+module(load="imuxsock")
+
+# Read messages from the kernel log and submits them to the syslog engine
+module(load="imklog")
+
+# Inject "--MARK--" messages every $Interval (seconds)
+#module(load="immark" Interval="600")
+
+# Read syslog messages from UDP
+#module(load="imudp")
+#input(type="imudp" port="514")
+
+# Read syslog messages from TCP
+#module(load="imtcp")
+#input(type="imtcp" port="514")
+
+
+#########################
+### GLOBAL DIRECTIVES ###
+#########################
+
+# Where to place spool and state files
+$WorkDirectory /var/spool/rsyslog
+
+# Reduce repeating messages (default: off)
+#$RepeatedMsgReduction on
+
+# Set defaults for every output file
+$Umask 0022
+
+module(
+ load="builtin:omfile"
+ Template="RSYSLOG_TraditionalFileFormat"
+ FileCreateMode="0644"
+ DirCreateMode="0755"
+)
+
+
+# Include all conf files in /etc/rsyslog.d/
+$IncludeConfig /etc/rsyslog.d/*.conf
diff --git a/app-admin/rsyslog/files/8-stable/rsyslog.confd-r1 b/app-admin/rsyslog/files/8-stable/rsyslog.confd-r1
new file mode 100644
index 000000000000..da48c01cd407
--- /dev/null
+++ b/app-admin/rsyslog/files/8-stable/rsyslog.confd-r1
@@ -0,0 +1,30 @@
+# /etc/conf.d/rsyslog
+
+# Configuration file
+#RSYSLOG_CONFIGFILE="/etc/rsyslog.conf"
+
+# PID file
+# If you should ever change this, remember to update
+# "/etc/logrotate.d/rsyslog", too.
+#RSYSLOG_PIDFILE="/run/rsyslogd.pid"
+
+# You can use this configuration option to pass additional options to the
+# start-stop-daemon, see start-stop-daemon(8) for more details.
+# Per default we wait 1000ms after we have started the service to ensure
+# that the daemon is really up and running.
+#RSYSLOG_SSDARGS="--wait 1000"
+
+# The termination timeout (start-stop-daemon parameter "retry") ensures
+# that the service will be terminated within a given time (60 + 5 seconds
+# per default) when you are stopping the service.
+# You need to increase the value when you are working with a large queue.
+# See http://www.rsyslog.com/doc/queues.html for further information.
+#RSYSLOG_TERMTIMEOUT="TERM/60/KILL/5"
+
+
+# Options to rsyslogd
+# See rsyslogd(8) for more details
+# Notes:
+# * Do not specify another PIDFILE but use the variable above to change the location
+# * Do not specify another CONFIGFILE but use the variable above to change the location
+#RSYSLOG_OPTS=""
diff --git a/app-admin/rsyslog/files/8-stable/rsyslog.initd-r1 b/app-admin/rsyslog/files/8-stable/rsyslog.initd-r1
new file mode 100644
index 000000000000..7d7aa4bc9313
--- /dev/null
+++ b/app-admin/rsyslog/files/8-stable/rsyslog.initd-r1
@@ -0,0 +1,72 @@
+#!/sbin/openrc-run
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+RSYSLOG_CONFIGFILE=${RSYSLOG_CONFIGFILE:-"/etc/rsyslog.conf"}
+RSYSLOG_PIDFILE=${RSYSLOG_PIDFILE:-"/run/rsyslogd.pid"}
+RSYSLOG_SSDARGS=${RSYSLOG_SSDARGS:-"--wait 1000"}
+RSYSLOG_TERMTIMEOUT=${RSYSLOG_TERMTIMEOUT:-"TERM/60/KILL/5"}
+RSYSLOG_OPTS=${RSYSLOG_OPTS:-""}
+
+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() {
+ if [ -f "${RSYSLOG_PIDFILE}" ]; then
+ vebegin "Removing stale PID file"
+ rm --force "${RSYSLOG_PIDFILE}"
+ veend $?
+ fi
+}
+
+configtest() {
+ local _command_args="-N 999 -f \"${RSYSLOG_CONFIGFILE}\""
+ local _retval=0
+
+ ebegin "Checking rsyslogd's configuration"
+ eval ${command} ${_command_args} >/dev/null 2>&1
+ _retval=$?
+
+ if [ ${_retval} -ne 0 ]; then
+ eval ${command} ${_command_args}
+ 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/files/8-stable/rsyslog.logrotate b/app-admin/rsyslog/files/8-stable/rsyslog.logrotate
new file mode 100644
index 000000000000..1eae30e0d741
--- /dev/null
+++ b/app-admin/rsyslog/files/8-stable/rsyslog.logrotate
@@ -0,0 +1,37 @@
+# Uncomment the following directive if you have re-enabled
+# "/var/log/syslog" in "/etc/rsyslog.d/50-default.conf"
+#/var/log/syslog
+#{
+# rotate 7
+# daily
+# missingok
+# notifempty
+# delaycompress
+# compress
+# postrotate
+# test -r /run/rsyslogd.pid && kill -HUP $(cat /run/rsyslogd.pid) &>/dev/null
+# endscript
+#}
+
+/var/log/auth.log
+/var/log/cron.log
+/var/log/daemon.log
+/var/log/kern.log
+/var/log/lpr.log
+/var/log/mail.log
+/var/log/news.log
+/var/log/user.log
+/var/log/debug.log
+/var/log/messages
+{
+ rotate 4
+ weekly
+ missingok
+ notifempty
+ compress
+ delaycompress
+ sharedscripts
+ postrotate
+ test -r /run/rsyslogd.pid && kill -HUP $(cat /run/rsyslogd.pid) &>/dev/null
+ endscript
+}