summaryrefslogtreecommitdiff
path: root/app-admin/rsyslog/files
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2018-12-24 14:11:38 +0000
committerV3n3RiX <venerix@redcorelinux.org>2018-12-24 14:11:38 +0000
commitde49812990871e1705b64051c35161d5e6400269 (patch)
tree5e1e8fcb0ff4579dbd22a1bfee28a6b97dc8aaeb /app-admin/rsyslog/files
parent536c3711867ec947c1738f2c4b96f22e4863322d (diff)
gentoo resync : 24.12.2018
Diffstat (limited to 'app-admin/rsyslog/files')
-rw-r--r--app-admin/rsyslog/files/rsyslog-8.35.0-fix-issue2719.patch241
-rw-r--r--app-admin/rsyslog/files/rsyslog-8.35.0-fix-issue2726.patch41
-rw-r--r--app-admin/rsyslog/files/rsyslog-8.40.0-fix-omusrmsg.patch13
3 files changed, 13 insertions, 282 deletions
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
deleted file mode 100644
index 8996acd27e88..000000000000
--- a/app-admin/rsyslog/files/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/rsyslog-8.35.0-fix-issue2726.patch b/app-admin/rsyslog/files/rsyslog-8.35.0-fix-issue2726.patch
deleted file mode 100644
index eaec239c3839..000000000000
--- a/app-admin/rsyslog/files/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 <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/rsyslog-8.40.0-fix-omusrmsg.patch b/app-admin/rsyslog/files/rsyslog-8.40.0-fix-omusrmsg.patch
new file mode 100644
index 000000000000..9247d0b067f4
--- /dev/null
+++ b/app-admin/rsyslog/files/rsyslog-8.40.0-fix-omusrmsg.patch
@@ -0,0 +1,13 @@
+https://github.com/rsyslog/rsyslog/issues/3346
+
+--- a/tools/omusrmsg.c
++++ b/tools/omusrmsg.c
+@@ -261,7 +261,7 @@ static rsRetVal wallmsg(uchar* pMsg, instanceData *pData)
+
+ /* compute the device name */
+ strcpy(p, _PATH_DEV);
+- memcpy(p, ut.ut_line, UNAMESZ);
++ strncat(p, ut.ut_line, UNAMESZ);
+
+ /* we must be careful when writing to the terminal. A terminal may block
+ * (for example, a user has pressed <ctl>-s). In that case, we can not