diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-11-25 16:07:49 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-11-25 17:34:11 +0000 |
commit | 33c31130813fcab3f4eaa6bff46ded10a6aaf22b (patch) | |
tree | da988b3cc79f1b6e382c0089b87501863931002d | |
parent | Adding patch to use system pyaml3 directly rather than first trying embedded ... (diff) | |
download | netdata-33c31130813fcab3f4eaa6bff46ded10a6aaf22b.tar.xz netdata-33c31130813fcab3f4eaa6bff46ded10a6aaf22b.zip |
Addin patch to use system python modules rather than first trying embedded copies (that are removed in Debian).
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
-rw-r--r-- | debian/control | 1 | ||||
-rw-r--r-- | debian/patches/debian/0007-use-python-modules.patch | 49 | ||||
-rw-r--r-- | debian/patches/series | 1 |
3 files changed, 51 insertions, 0 deletions
diff --git a/debian/control b/debian/control index cf7c35cad..b23919d7a 100644 --- a/debian/control +++ b/debian/control @@ -150,6 +150,7 @@ Multi-Arch: foreign Depends: netdata-core (>= ${source:Version}), python3, + python3-monotonic, python3-urllib3 (>= 1.22), python3-yaml, ${misc:Depends}, diff --git a/debian/patches/debian/0007-use-python-modules.patch b/debian/patches/debian/0007-use-python-modules.patch new file mode 100644 index 000000000..4bf746d1a --- /dev/null +++ b/debian/patches/debian/0007-use-python-modules.patch @@ -0,0 +1,49 @@ +Author: Daniel Baumann <daniel@debian.org> +Description: Use system python modules rather than first trying embedded copies (that are removed in Debian). + +diff -Naurp netdata.orig/src/collectors/python.d.plugin/python.d.plugin.in netdata/src/collectors/python.d.plugin/python.d.plugin.in +--- netdata.orig/src/collectors/python.d.plugin/python.d.plugin.in ++++ netdata/src/collectors/python.d.plugin/python.d.plugin.in +@@ -69,12 +69,9 @@ add_pythond_packages() + from bases.collection import safe_print + from bases.loggers import PythonDLogger + from bases.loaders import load_config +-from third_party import filelock ++import FileLock as filelock + +-try: +- from collections import OrderedDict +-except ImportError: +- from third_party.ordereddict import OrderedDict ++from collections import OrderedDict + + + def dirs(): +diff -Naurp netdata.orig/src/collectors/python.d.plugin/python_modules/bases/FrameworkServices/SimpleService.py netdata/src/collectors/python.d.plugin/python_modules/bases/FrameworkServices/SimpleService.py +--- netdata.orig/src/collectors/python.d.plugin/python_modules/bases/FrameworkServices/SimpleService.py ++++ netdata/src/collectors/python.d.plugin/python_modules/bases/FrameworkServices/SimpleService.py +@@ -9,7 +9,7 @@ import os + from bases.charts import Charts, ChartError, create_runtime_chart + from bases.collection import safe_print + from bases.loggers import PythonDLogger +-from third_party.monotonic import monotonic ++import monotonic + from time import sleep, time + + RUNTIME_CHART_UPDATE = 'BEGIN netdata.runtime_{job_name} {since_last}\n' \ +diff -Naurp netdata.orig/src/collectors/python.d.plugin/python_modules/bases/loaders.py netdata/src/collectors/python.d.plugin/python_modules/bases/loaders.py +--- netdata.orig/src/collectors/python.d.plugin/python_modules/bases/loaders.py ++++ netdata/src/collectors/python.d.plugin/python_modules/bases/loaders.py +@@ -4,11 +4,7 @@ + # SPDX-License-Identifier: GPL-3.0-or-later + + from yaml import SafeLoader as YamlSafeLoader +- +-try: +- from collections import OrderedDict +-except ImportError: +- from third_party.ordereddict import OrderedDict ++from collections import OrderedDict + + DEFAULT_MAPPING_TAG = 'tag:yaml.org,2002:map' + diff --git a/debian/patches/series b/debian/patches/series index af71112fc..b423565d3 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -2,3 +2,4 @@ debian/0003-use-python3.patch debian/0004-use-bash.patch debian/0005-send-email.patch debian/0006-use-pyaml3.patch +debian/0007-use-python-modules.patch |