diff options
Diffstat (limited to 'debian/patches')
-rw-r--r-- | debian/patches/debian/0001-use-system-python.patch | 131 | ||||
-rw-r--r-- | debian/patches/debian/0002-use-system-exim4.patch | 12 | ||||
-rw-r--r-- | debian/patches/debian/0003-use-python3.patch | 29 | ||||
-rw-r--r-- | debian/patches/debian/0005-use-bash.patch | 13 | ||||
-rw-r--r-- | debian/patches/progress-linux/0001-send-email.patch | 15 | ||||
-rw-r--r-- | debian/patches/series | 7 | ||||
-rw-r--r-- | debian/patches/upstream/0001-allow-symlinks.patch | 15 | ||||
-rw-r--r-- | debian/patches/upstream/0002-fix-FTCBFS.patch | 17 |
8 files changed, 239 insertions, 0 deletions
diff --git a/debian/patches/debian/0001-use-system-python.patch b/debian/patches/debian/0001-use-system-python.patch new file mode 100644 index 0000000..5a14159 --- /dev/null +++ b/debian/patches/debian/0001-use-system-python.patch @@ -0,0 +1,131 @@ +Author: Lennart Weller <lhw@ring0.de> +Description: Ignore embedded python modules. + +diff -Naurp netdata.orig/collectors/python.d.plugin/Makefile.am netdata/collectors/python.d.plugin/Makefile.am +--- netdata.orig/collectors/python.d.plugin/Makefile.am ++++ netdata/collectors/python.d.plugin/Makefile.am +@@ -145,109 +145,3 @@ dist_third_party_DATA = \ + python_modules/third_party/monotonic.py \ + python_modules/third_party/filelock.py \ + $(NULL) +- +-pythonyaml2dir=$(pythonmodulesdir)/pyyaml2 +-dist_pythonyaml2_DATA = \ +- python_modules/pyyaml2/__init__.py \ +- python_modules/pyyaml2/composer.py \ +- python_modules/pyyaml2/constructor.py \ +- python_modules/pyyaml2/cyaml.py \ +- python_modules/pyyaml2/dumper.py \ +- python_modules/pyyaml2/emitter.py \ +- python_modules/pyyaml2/error.py \ +- python_modules/pyyaml2/events.py \ +- python_modules/pyyaml2/loader.py \ +- python_modules/pyyaml2/nodes.py \ +- python_modules/pyyaml2/parser.py \ +- python_modules/pyyaml2/reader.py \ +- python_modules/pyyaml2/representer.py \ +- python_modules/pyyaml2/resolver.py \ +- python_modules/pyyaml2/scanner.py \ +- python_modules/pyyaml2/serializer.py \ +- python_modules/pyyaml2/tokens.py \ +- $(NULL) +- +-pythonyaml3dir=$(pythonmodulesdir)/pyyaml3 +-dist_pythonyaml3_DATA = \ +- python_modules/pyyaml3/__init__.py \ +- python_modules/pyyaml3/composer.py \ +- python_modules/pyyaml3/constructor.py \ +- python_modules/pyyaml3/cyaml.py \ +- python_modules/pyyaml3/dumper.py \ +- python_modules/pyyaml3/emitter.py \ +- python_modules/pyyaml3/error.py \ +- python_modules/pyyaml3/events.py \ +- python_modules/pyyaml3/loader.py \ +- python_modules/pyyaml3/nodes.py \ +- python_modules/pyyaml3/parser.py \ +- python_modules/pyyaml3/reader.py \ +- python_modules/pyyaml3/representer.py \ +- python_modules/pyyaml3/resolver.py \ +- python_modules/pyyaml3/scanner.py \ +- python_modules/pyyaml3/serializer.py \ +- python_modules/pyyaml3/tokens.py \ +- $(NULL) +- +-python_urllib3dir=$(pythonmodulesdir)/urllib3 +-dist_python_urllib3_DATA = \ +- python_modules/urllib3/__init__.py \ +- python_modules/urllib3/_collections.py \ +- python_modules/urllib3/connection.py \ +- python_modules/urllib3/connectionpool.py \ +- python_modules/urllib3/exceptions.py \ +- python_modules/urllib3/fields.py \ +- python_modules/urllib3/filepost.py \ +- python_modules/urllib3/response.py \ +- python_modules/urllib3/poolmanager.py \ +- python_modules/urllib3/request.py \ +- $(NULL) +- +-python_urllib3_utildir=$(python_urllib3dir)/util +-dist_python_urllib3_util_DATA = \ +- python_modules/urllib3/util/__init__.py \ +- python_modules/urllib3/util/connection.py \ +- python_modules/urllib3/util/request.py \ +- python_modules/urllib3/util/response.py \ +- python_modules/urllib3/util/retry.py \ +- python_modules/urllib3/util/selectors.py \ +- python_modules/urllib3/util/ssl_.py \ +- python_modules/urllib3/util/timeout.py \ +- python_modules/urllib3/util/url.py \ +- python_modules/urllib3/util/wait.py \ +- $(NULL) +- +-python_urllib3_packagesdir=$(python_urllib3dir)/packages +-dist_python_urllib3_packages_DATA = \ +- python_modules/urllib3/packages/__init__.py \ +- python_modules/urllib3/packages/ordered_dict.py \ +- python_modules/urllib3/packages/six.py \ +- $(NULL) +- +-python_urllib3_backportsdir=$(python_urllib3_packagesdir)/backports +-dist_python_urllib3_backports_DATA = \ +- python_modules/urllib3/packages/backports/__init__.py \ +- python_modules/urllib3/packages/backports/makefile.py \ +- $(NULL) +- +-python_urllib3_ssl_match_hostnamedir=$(python_urllib3_packagesdir)/ssl_match_hostname +-dist_python_urllib3_ssl_match_hostname_DATA = \ +- python_modules/urllib3/packages/ssl_match_hostname/__init__.py \ +- python_modules/urllib3/packages/ssl_match_hostname/_implementation.py \ +- $(NULL) +- +-python_urllib3_contribdir=$(python_urllib3dir)/contrib +-dist_python_urllib3_contrib_DATA = \ +- python_modules/urllib3/contrib/__init__.py \ +- python_modules/urllib3/contrib/appengine.py \ +- python_modules/urllib3/contrib/ntlmpool.py \ +- python_modules/urllib3/contrib/pyopenssl.py \ +- python_modules/urllib3/contrib/securetransport.py \ +- python_modules/urllib3/contrib/socks.py \ +- $(NULL) +- +-python_urllib3_securetransportdir=$(python_urllib3_contribdir)/_securetransport +-dist_python_urllib3_securetransport_DATA = \ +- python_modules/urllib3/contrib/_securetransport/__init__.py \ +- python_modules/urllib3/contrib/_securetransport/bindings.py \ +- python_modules/urllib3/contrib/_securetransport/low_level.py \ +- $(NULL) +diff -Naurp netdata.orig/collectors/python.d.plugin/python_modules/bases/loaders.py netdata/collectors/python.d.plugin/python_modules/bases/loaders.py +--- netdata.orig/collectors/python.d.plugin/python_modules/bases/loaders.py ++++ netdata/collectors/python.d.plugin/python_modules/bases/loaders.py +@@ -9,10 +9,7 @@ from sys import version_info + PY_VERSION = version_info[:2] + + try: +- if PY_VERSION > (3, 1): +- from pyyaml3 import SafeLoader as YamlSafeLoader +- else: +- from pyyaml2 import SafeLoader as YamlSafeLoader ++ from yaml import SafeLoader as YamlSafeLoader + except ImportError: + from yaml import SafeLoader as YamlSafeLoader + diff --git a/debian/patches/debian/0002-use-system-exim4.patch b/debian/patches/debian/0002-use-system-exim4.patch new file mode 100644 index 0000000..0e23618 --- /dev/null +++ b/debian/patches/debian/0002-use-system-exim4.patch @@ -0,0 +1,12 @@ +Author: Sven Hartge <sven@svenhartge.de> +Description: Debian has exim in /usr/sbin which is not in the default path. + +diff -Naurp netdata.orig/collectors/python.d.plugin/exim/exim.conf netdata/collectors/python.d.plugin/exim/exim.conf +--- netdata.orig/collectors/python.d.plugin/exim/exim.conf ++++ netdata/collectors/python.d.plugin/exim/exim.conf +@@ -88,4 +88,4 @@ update_every: 10 + # AUTO-DETECTION JOBS + + local: +- command: 'exim -bpc' ++ command: '/usr/sbin/exim -bpc' diff --git a/debian/patches/debian/0003-use-python3.patch b/debian/patches/debian/0003-use-python3.patch new file mode 100644 index 0000000..95f4e7a --- /dev/null +++ b/debian/patches/debian/0003-use-python3.patch @@ -0,0 +1,29 @@ +Author: Sander Klein <debian-bugs@roedie.nl> +Description: Debian uses by default python 2 instead of python3. + +diff -Naurp netdata.orig/collectors/python.d.plugin/python.d.plugin.in netdata/collectors/python.d.plugin/python.d.plugin.in +--- netdata.orig/collectors/python.d.plugin/python.d.plugin.in ++++ netdata/collectors/python.d.plugin/python.d.plugin.in +@@ -1,21 +1,4 @@ +-#!/usr/bin/env bash +-'''':; +-pybinary=$(which python3 || which python || which python2) +-filtered=() +-for arg in "$@" +-do +- case $arg in +- -p*) pybinary=${arg:2} +- shift 1 ;; +- *) filtered+=("$arg") ;; +- esac +-done +-if [ "$pybinary" = "" ] +-then +- echo "ERROR python IS NOT AVAILABLE IN THIS SYSTEM" +- exit 1 +-fi +-exec "$pybinary" "$0" "${filtered[@]}" # ''' ++#!/usr/bin/python3 + + # -*- coding: utf-8 -*- + # Description: diff --git a/debian/patches/debian/0005-use-bash.patch b/debian/patches/debian/0005-use-bash.patch new file mode 100644 index 0000000..53b7fc5 --- /dev/null +++ b/debian/patches/debian/0005-use-bash.patch @@ -0,0 +1,13 @@ +Author: Daniel Baumann <daniel.baumann@progress-linux.org> +Description: Using bash instead of sh for edit-config. + It reads /etc/profile which often contains bash specific configuration. + +diff -Naurp netdata.orig/system/edit-config.in netdata/system/edit-config.in +--- netdata.orig/system/edit-config.in ++++ netdata/system/edit-config.in +@@ -1,4 +1,4 @@ +-#!/usr/bin/env sh ++#!/bin/bash + + [ -f /etc/profile ] && . /etc/profile + diff --git a/debian/patches/progress-linux/0001-send-email.patch b/debian/patches/progress-linux/0001-send-email.patch new file mode 100644 index 0000000..1614c46 --- /dev/null +++ b/debian/patches/progress-linux/0001-send-email.patch @@ -0,0 +1,15 @@ +Author: Daniel Baumann <daniel.baumann@progress-linux.org> +Description: Disabling to send emails by default. + +diff -Naurp netdata.orig/health/notifications/health_alarm_notify.conf netdata/health/notifications/health_alarm_notify.conf +--- netdata.orig/health/notifications/health_alarm_notify.conf ++++ netdata/health/notifications/health_alarm_notify.conf +@@ -199,7 +199,7 @@ sendsms="" + EMAIL_SENDER="" + + # enable/disable sending emails +-SEND_EMAIL="YES" ++SEND_EMAIL="NO" + + # if a role recipient is not configured, an email will be send to: + DEFAULT_RECIPIENT_EMAIL="root" diff --git a/debian/patches/series b/debian/patches/series new file mode 100644 index 0000000..2f1a8df --- /dev/null +++ b/debian/patches/series @@ -0,0 +1,7 @@ +debian/0001-use-system-python.patch +debian/0002-use-system-exim4.patch +debian/0003-use-python3.patch +debian/0005-use-bash.patch +upstream/0001-allow-symlinks.patch +upstream/0002-fix-FTCBFS.patch +progress-linux/0001-send-email.patch diff --git a/debian/patches/upstream/0001-allow-symlinks.patch b/debian/patches/upstream/0001-allow-symlinks.patch new file mode 100644 index 0000000..7df915f --- /dev/null +++ b/debian/patches/upstream/0001-allow-symlinks.patch @@ -0,0 +1,15 @@ +Author: Lennart Weller <lhw@ring0.de> +Description: Remove file serve restrictions for symlinks. + +diff -Naurp netdata.orig/web/server/web_client.c netdata/web/server/web_client.c +--- netdata.orig/web/server/web_client.c ++++ netdata/web/server/web_client.c +@@ -381,7 +381,7 @@ int mysendfile(struct web_client *w, cha + int done = 0; + while(!done) { + // check if the file exists +- if (lstat(webfilename, &statbuf) != 0) { ++ if (stat(webfilename, &statbuf) != 0) { + debug(D_WEB_CLIENT_ACCESS, "%llu: File '%s' is not found.", w->id, webfilename); + w->response.data->contenttype = CT_TEXT_HTML; + buffer_strcat(w->response.data, "File does not exist, or is not accessible: "); diff --git a/debian/patches/upstream/0002-fix-FTCBFS.patch b/debian/patches/upstream/0002-fix-FTCBFS.patch new file mode 100644 index 0000000..10cf18f --- /dev/null +++ b/debian/patches/upstream/0002-fix-FTCBFS.patch @@ -0,0 +1,17 @@ +Author: Helmut Grohne <helmut@subdivi.de> +Description: Fixes FTCBFS by not abusing AC_CHECK_FILE (Closes: #982523). + +diff -Naurp netdata.orig/configure.ac netdata/configure.ac +--- netdata.orig/configure.ac ++++ netdata/configure.ac +@@ -1025,8 +1025,8 @@ if test "${build_target}" = "linux" -a " + [#include <linux/bpf.h>] + ) + +- AC_CHECK_FILE( +- externaldeps/libbpf/libbpf.a, ++ AS_IF( ++ [test -e externaldeps/libbpf/libbpf.a], + [have_libbpf=yes], + [have_libbpf=no] + ) |