From 8850a1ff90facedd3d077eaf8ac5c32b39fba760 Mon Sep 17 00:00:00 2001 From: Thomas Deutschmann Date: Fri, 3 Aug 2018 02:57:46 +0200 Subject: app-admin/rsyslog: restructure FILESDIR "8-stable" sub directory is not needed anymore since upstream has changed release/version schema long time ago (in 2014). Package-Manager: Portage-2.3.44, Repoman-2.3.10 --- app-admin/rsyslog/files/50-default-r1.conf | 107 +++++++++ .../rsyslog/files/8-stable/50-default-r1.conf | 107 --------- app-admin/rsyslog/files/8-stable/README.gentoo | 36 --- .../8-stable/rsyslog-8.35.0-fix-issue2719.patch | 241 --------------------- .../8-stable/rsyslog-8.35.0-fix-issue2726.patch | 41 ---- .../rsyslog/files/8-stable/rsyslog-r1.logrotate | 45 ---- app-admin/rsyslog/files/8-stable/rsyslog.conf | 61 ------ app-admin/rsyslog/files/8-stable/rsyslog.confd-r1 | 30 --- app-admin/rsyslog/files/8-stable/rsyslog.initd-r1 | 72 ------ app-admin/rsyslog/files/README.gentoo | 36 +++ .../files/rsyslog-8.35.0-fix-issue2719.patch | 241 +++++++++++++++++++++ .../files/rsyslog-8.35.0-fix-issue2726.patch | 41 ++++ app-admin/rsyslog/files/rsyslog-r1.logrotate | 45 ++++ app-admin/rsyslog/files/rsyslog.conf | 61 ++++++ app-admin/rsyslog/files/rsyslog.confd-r1 | 30 +++ app-admin/rsyslog/files/rsyslog.initd-r1 | 72 ++++++ app-admin/rsyslog/rsyslog-8.35.0-r1.ebuild | 20 +- app-admin/rsyslog/rsyslog-8.36.0-r1.ebuild | 14 +- 18 files changed, 647 insertions(+), 653 deletions(-) create mode 100644 app-admin/rsyslog/files/50-default-r1.conf delete mode 100644 app-admin/rsyslog/files/8-stable/50-default-r1.conf delete mode 100644 app-admin/rsyslog/files/8-stable/README.gentoo delete mode 100644 app-admin/rsyslog/files/8-stable/rsyslog-8.35.0-fix-issue2719.patch delete mode 100644 app-admin/rsyslog/files/8-stable/rsyslog-8.35.0-fix-issue2726.patch delete mode 100644 app-admin/rsyslog/files/8-stable/rsyslog-r1.logrotate delete mode 100644 app-admin/rsyslog/files/8-stable/rsyslog.conf delete mode 100644 app-admin/rsyslog/files/8-stable/rsyslog.confd-r1 delete mode 100644 app-admin/rsyslog/files/8-stable/rsyslog.initd-r1 create mode 100644 app-admin/rsyslog/files/README.gentoo create mode 100644 app-admin/rsyslog/files/rsyslog-8.35.0-fix-issue2719.patch create mode 100644 app-admin/rsyslog/files/rsyslog-8.35.0-fix-issue2726.patch create mode 100644 app-admin/rsyslog/files/rsyslog-r1.logrotate create mode 100644 app-admin/rsyslog/files/rsyslog.conf create mode 100644 app-admin/rsyslog/files/rsyslog.confd-r1 create mode 100644 app-admin/rsyslog/files/rsyslog.initd-r1 (limited to 'app-admin') diff --git a/app-admin/rsyslog/files/50-default-r1.conf b/app-admin/rsyslog/files/50-default-r1.conf new file mode 100644 index 000000000000..920c214ff6ca --- /dev/null +++ b/app-admin/rsyslog/files/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-r1.conf b/app-admin/rsyslog/files/8-stable/50-default-r1.conf deleted file mode 100644 index 920c214ff6ca..000000000000 --- a/app-admin/rsyslog/files/8-stable/50-default-r1.conf +++ /dev/null @@ -1,107 +0,0 @@ -####################### -### 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/README.gentoo b/app-admin/rsyslog/files/8-stable/README.gentoo deleted file mode 100644 index 9f0666c86b0a..000000000000 --- a/app-admin/rsyslog/files/8-stable/README.gentoo +++ /dev/null @@ -1,36 +0,0 @@ -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.35.0-fix-issue2719.patch b/app-admin/rsyslog/files/8-stable/rsyslog-8.35.0-fix-issue2719.patch deleted file mode 100644 index 8996acd27e88..000000000000 --- a/app-admin/rsyslog/files/8-stable/rsyslog-8.35.0-fix-issue2719.patch +++ /dev/null @@ -1,241 +0,0 @@ -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 deleted file mode 100644 index eaec239c3839..000000000000 --- a/app-admin/rsyslog/files/8-stable/rsyslog-8.35.0-fix-issue2726.patch +++ /dev/null @@ -1,41 +0,0 @@ -From c1791ee90fdd8adf219ae3d2b849f5f041284b7c Mon Sep 17 00:00:00 2001 -From: Rich Megginson -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 deleted file mode 100644 index 3a92ba37bdec..000000000000 --- a/app-admin/rsyslog/files/8-stable/rsyslog-r1.logrotate +++ /dev/null @@ -1,45 +0,0 @@ -# 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 deleted file mode 100644 index da484598a652..000000000000 --- a/app-admin/rsyslog/files/8-stable/rsyslog.conf +++ /dev/null @@ -1,61 +0,0 @@ -# /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 deleted file mode 100644 index da48c01cd407..000000000000 --- a/app-admin/rsyslog/files/8-stable/rsyslog.confd-r1 +++ /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-r1 b/app-admin/rsyslog/files/8-stable/rsyslog.initd-r1 deleted file mode 100644 index 7d7aa4bc9313..000000000000 --- a/app-admin/rsyslog/files/8-stable/rsyslog.initd-r1 +++ /dev/null @@ -1,72 +0,0 @@ -#!/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/README.gentoo b/app-admin/rsyslog/files/README.gentoo new file mode 100644 index 000000000000..9f0666c86b0a --- /dev/null +++ b/app-admin/rsyslog/files/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/rsyslog-8.35.0-fix-issue2719.patch b/app-admin/rsyslog/files/rsyslog-8.35.0-fix-issue2719.patch new file mode 100644 index 000000000000..8996acd27e88 --- /dev/null +++ b/app-admin/rsyslog/files/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/rsyslog-8.35.0-fix-issue2726.patch b/app-admin/rsyslog/files/rsyslog-8.35.0-fix-issue2726.patch new file mode 100644 index 000000000000..eaec239c3839 --- /dev/null +++ b/app-admin/rsyslog/files/rsyslog-8.35.0-fix-issue2726.patch @@ -0,0 +1,41 @@ +From c1791ee90fdd8adf219ae3d2b849f5f041284b7c Mon Sep 17 00:00:00 2001 +From: Rich Megginson +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/rsyslog-r1.logrotate b/app-admin/rsyslog/files/rsyslog-r1.logrotate new file mode 100644 index 000000000000..3a92ba37bdec --- /dev/null +++ b/app-admin/rsyslog/files/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/rsyslog.conf b/app-admin/rsyslog/files/rsyslog.conf new file mode 100644 index 000000000000..da484598a652 --- /dev/null +++ b/app-admin/rsyslog/files/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/rsyslog.confd-r1 b/app-admin/rsyslog/files/rsyslog.confd-r1 new file mode 100644 index 000000000000..da48c01cd407 --- /dev/null +++ b/app-admin/rsyslog/files/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/rsyslog.initd-r1 b/app-admin/rsyslog/files/rsyslog.initd-r1 new file mode 100644 index 000000000000..f34bacb7511b --- /dev/null +++ b/app-admin/rsyslog/files/rsyslog.initd-r1 @@ -0,0 +1,72 @@ +#!/sbin/openrc-run +# Copyright 1999-2018 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/rsyslog-8.35.0-r1.ebuild b/app-admin/rsyslog/rsyslog-8.35.0-r1.ebuild index 3ff1c28e0acd..55f6815d83a2 100644 --- a/app-admin/rsyslog/rsyslog-8.35.0-r1.ebuild +++ b/app-admin/rsyslog/rsyslog-8.35.0-r1.ebuild @@ -9,8 +9,6 @@ inherit autotools eutils linux-info python-any-r1 systemd DESCRIPTION="An enhanced multi-threaded syslogd with database support and more" HOMEPAGE="https://www.rsyslog.com/" -BRANCH="8-stable" - if [[ ${PV} == "9999" ]]; then EGIT_REPO_URI="https://github.com/rsyslog/${PN}.git" @@ -49,8 +47,8 @@ else " PATCHES=( - "${FILESDIR}"/${BRANCH}/${PN}-8.35.0-fix-issue2719.patch - "${FILESDIR}"/${BRANCH}/${PN}-8.35.0-fix-issue2726.patch + "${FILESDIR}"/${PN}-8.35.0-fix-issue2719.patch + "${FILESDIR}"/${PN}-8.35.0-fix-issue2726.patch ) fi @@ -183,7 +181,6 @@ src_configure() { --disable-generate-man-pages --without-valgrind-testbench $(use_enable test testbench) - $(use_enable curl libcurl) # Input Plugins without depedencies --enable-imdiag --enable-imfile @@ -221,7 +218,6 @@ src_configure() { $(use_enable debug) $(use_enable debug diagtools) $(use_enable debug memcheck) - $(use_enable debug rtinst) $(use_enable debug valgrind) # Misc $(use_enable curl fmhttp) @@ -298,15 +294,15 @@ src_install() { local DOCS=( AUTHORS ChangeLog - "${FILESDIR}"/${BRANCH}/README.gentoo + "${FILESDIR}"/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} + newconfd "${FILESDIR}/${PN}.confd-r1" ${PN} + newinitd "${FILESDIR}/${PN}.initd-r1" ${PN} keepdir /var/empty/dev keepdir /var/spool/${PN} @@ -314,13 +310,13 @@ src_install() { keepdir /etc/${PN}.d insinto /etc - newins "${FILESDIR}/${BRANCH}/${PN}.conf" ${PN}.conf + newins "${FILESDIR}/${PN}.conf" ${PN}.conf insinto /etc/rsyslog.d/ - newins "${FILESDIR}/${BRANCH}/50-default-r1.conf" 50-default.conf + newins "${FILESDIR}/50-default-r1.conf" 50-default.conf insinto /etc/logrotate.d/ - newins "${FILESDIR}/${BRANCH}/${PN}-r1.logrotate" ${PN} + newins "${FILESDIR}/${PN}-r1.logrotate" ${PN} if use mysql; then insinto /usr/share/doc/${PF}/scripts/mysql diff --git a/app-admin/rsyslog/rsyslog-8.36.0-r1.ebuild b/app-admin/rsyslog/rsyslog-8.36.0-r1.ebuild index 27d2078ef8fd..7e8144dac25a 100644 --- a/app-admin/rsyslog/rsyslog-8.36.0-r1.ebuild +++ b/app-admin/rsyslog/rsyslog-8.36.0-r1.ebuild @@ -9,8 +9,6 @@ inherit autotools eutils linux-info python-any-r1 systemd DESCRIPTION="An enhanced multi-threaded syslogd with database support and more" HOMEPAGE="https://www.rsyslog.com/" -BRANCH="8-stable" - if [[ ${PV} == "9999" ]]; then EGIT_REPO_URI="https://github.com/rsyslog/${PN}.git" @@ -307,15 +305,15 @@ src_install() { local DOCS=( AUTHORS ChangeLog - "${FILESDIR}"/${BRANCH}/README.gentoo + "${FILESDIR}"/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} + newconfd "${FILESDIR}/${PN}.confd-r1" ${PN} + newinitd "${FILESDIR}/${PN}.initd-r1" ${PN} keepdir /var/empty/dev keepdir /var/spool/${PN} @@ -323,13 +321,13 @@ src_install() { keepdir /etc/${PN}.d insinto /etc - newins "${FILESDIR}/${BRANCH}/${PN}.conf" ${PN}.conf + newins "${FILESDIR}/${PN}.conf" ${PN}.conf insinto /etc/rsyslog.d/ - newins "${FILESDIR}/${BRANCH}/50-default-r1.conf" 50-default.conf + newins "${FILESDIR}/50-default-r1.conf" 50-default.conf insinto /etc/logrotate.d/ - newins "${FILESDIR}/${BRANCH}/${PN}-r1.logrotate" ${PN} + newins "${FILESDIR}/${PN}-r1.logrotate" ${PN} if use mysql; then insinto /usr/share/doc/${PF}/scripts/mysql -- cgit v1.2.3-65-gdbad