From 97ba90b0bbd7fcf6703c412fe8cdcc0f837b9328 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sat, 29 Dec 2018 15:29:48 +0100 Subject: Splitting some patches and grouping them thematically together. Signed-off-by: Daniel Baumann --- .../patches/0001-debian-use-system-packaging.patch | 35 ++ .../0001-python-libraries-removed-from-make.patch | 177 ------- debian/patches/0002-debian-use-system-python.patch | 131 +++++ ...move-file-serve-restrictions-for-symlinks.patch | 15 - debian/patches/0003-debian-use-system-exim4.patch | 12 + .../patches/0003-hide-social-media-buttons.patch | 15 - debian/patches/0003-hide-update-button.patch | 16 - debian/patches/0004-debian-use-python3.patch | 14 + .../0004-debianize-path-to-exim4-binary.patch | 12 - .../patches/0005-debian-remove-infographic.patch | 14 + ...ve-infographic-for-privacy-breach-reasons.patch | 14 - .../patches/0006-debian-remove-contrib-files.patch | 49 ++ debian/patches/0006-force-usage-of-python3.patch | 17 - ...07-skip-debian-files-in-upstream-makefile.patch | 35 -- debian/patches/0008-compile-on-kfreebsd.patch | 527 --------------------- debian/patches/0011-netdata-support-symlinks.patch | 15 + debian/patches/0012-netdata-support-kfreebsd.patch | 527 +++++++++++++++++++++ debian/patches/0021-gui-remove-update-button.patch | 16 + .../0022-gui-remove-social-media-buttons.patch | 18 + debian/patches/series | 19 +- 20 files changed, 841 insertions(+), 837 deletions(-) create mode 100644 debian/patches/0001-debian-use-system-packaging.patch delete mode 100644 debian/patches/0001-python-libraries-removed-from-make.patch create mode 100644 debian/patches/0002-debian-use-system-python.patch delete mode 100644 debian/patches/0002-remove-file-serve-restrictions-for-symlinks.patch create mode 100644 debian/patches/0003-debian-use-system-exim4.patch delete mode 100644 debian/patches/0003-hide-social-media-buttons.patch delete mode 100644 debian/patches/0003-hide-update-button.patch create mode 100644 debian/patches/0004-debian-use-python3.patch delete mode 100644 debian/patches/0004-debianize-path-to-exim4-binary.patch create mode 100644 debian/patches/0005-debian-remove-infographic.patch delete mode 100644 debian/patches/0005-remove-infographic-for-privacy-breach-reasons.patch create mode 100644 debian/patches/0006-debian-remove-contrib-files.patch delete mode 100644 debian/patches/0006-force-usage-of-python3.patch delete mode 100644 debian/patches/0007-skip-debian-files-in-upstream-makefile.patch delete mode 100644 debian/patches/0008-compile-on-kfreebsd.patch create mode 100644 debian/patches/0011-netdata-support-symlinks.patch create mode 100644 debian/patches/0012-netdata-support-kfreebsd.patch create mode 100644 debian/patches/0021-gui-remove-update-button.patch create mode 100644 debian/patches/0022-gui-remove-social-media-buttons.patch diff --git a/debian/patches/0001-debian-use-system-packaging.patch b/debian/patches/0001-debian-use-system-packaging.patch new file mode 100644 index 000000000..f07e92825 --- /dev/null +++ b/debian/patches/0001-debian-use-system-packaging.patch @@ -0,0 +1,35 @@ +Author: Daniel Baumann +Description: Ignore upstream debian packaging. + +diff -Naurp netdata.orig/contrib/Makefile.am netdata/contrib/Makefile.am +--- netdata.orig/contrib/Makefile.am ++++ netdata/contrib/Makefile.am +@@ -4,28 +4,9 @@ MAINTAINERCLEANFILES = $(srcdir)/Makefil + + dist_noinst_DATA = \ + README.md \ +- debian/copyright \ +- debian/netdata.conf \ +- debian/source/format \ +- debian/control.wheezy \ +- debian/compat \ +- debian/netdata.install \ +- debian/netdata.lintian-overrides \ +- debian/rules \ +- debian/netdata.docs \ +- debian/netdata.default \ +- debian/control \ +- debian/netdata.postinst.in \ +- debian/netdata.service \ +- debian/changelog \ +- debian/netdata.postrm \ + rhel/build-netdata-rpm.sh \ + $(NULL) + +-dist_noinst_SCRIPTS = \ +- debian/netdata.init \ +- $(NULL) +- + debian/changelog: + echo "netdata ($(PACKAGE_VERSION)) UNRELEASED; urgency=medium" | \ + tr '_' '~' > $@ diff --git a/debian/patches/0001-python-libraries-removed-from-make.patch b/debian/patches/0001-python-libraries-removed-from-make.patch deleted file mode 100644 index 1389414d4..000000000 --- a/debian/patches/0001-python-libraries-removed-from-make.patch +++ /dev/null @@ -1,177 +0,0 @@ -Author: Lennart Weller -Description: python libraries removed from make. remove unused contrib files - -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 -@@ -139,109 +139,3 @@ dist_third_party_DATA = \ - python_modules/third_party/boinc_client.py \ - python_modules/third_party/monotonic.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 -@@ -11,9 +11,9 @@ PY_VERSION = version_info[:2] - - try: - if PY_VERSION > (3, 1): -- from pyyaml3 import SafeLoader as YamlSafeLoader -+ from yaml 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 -Naurp netdata.orig/web/gui/Makefile.am netdata/web/gui/Makefile.am ---- netdata.orig/web/gui/Makefile.am -+++ netdata/web/gui/Makefile.am -@@ -46,10 +46,6 @@ dist_noinst_DATA = \ - $(NULL) - - dist_web_DATA = \ -- demo.html \ -- demo2.html \ -- demosites.html \ -- demosites2.html \ - dashboard.html \ - dashboard.js \ - dashboard_info.js \ -@@ -107,15 +103,6 @@ dist_webcss_DATA = \ - css/c3-0.4.18.min.css \ - $(NULL) - --webfontsdir=$(webdir)/fonts --dist_webfonts_DATA = \ -- fonts/glyphicons-halflings-regular.eot \ -- fonts/glyphicons-halflings-regular.svg \ -- fonts/glyphicons-halflings-regular.ttf \ -- fonts/glyphicons-halflings-regular.woff \ -- fonts/glyphicons-halflings-regular.woff2 \ -- $(NULL) -- - webimagesdir=$(webdir)/images - dist_webimages_DATA = \ - images/alert-128-orange.png \ -@@ -159,15 +146,6 @@ dashboard.js: $(DASHBOARD_JS_FILES) - if test -f $@; then rm -f $@; fi - cat $(DASHBOARD_JS_FILES) > $@.tmp && mv $@.tmp $@ - --webwellknowndir=$(webdir)/.well-known --dist_webwellknown_DATA = \ -- $(NULL) -- --webdntdir=$(webdir)/.well-known/dnt --dist_webdnt_DATA = \ -- .well-known/dnt/cookies \ -- $(NULL) -- - version.txt: - if test -d "$(top_srcdir)/.git"; then \ - git --git-dir="$(top_srcdir)/.git" log -n 1 --format=%H; \ diff --git a/debian/patches/0002-debian-use-system-python.patch b/debian/patches/0002-debian-use-system-python.patch new file mode 100644 index 000000000..4e329bb7b --- /dev/null +++ b/debian/patches/0002-debian-use-system-python.patch @@ -0,0 +1,131 @@ +Author: Lennart Weller +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 +@@ -139,109 +139,3 @@ dist_third_party_DATA = \ + python_modules/third_party/boinc_client.py \ + python_modules/third_party/monotonic.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 +@@ -11,9 +11,9 @@ PY_VERSION = version_info[:2] + + try: + if PY_VERSION > (3, 1): +- from pyyaml3 import SafeLoader as YamlSafeLoader ++ from yaml 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/0002-remove-file-serve-restrictions-for-symlinks.patch b/debian/patches/0002-remove-file-serve-restrictions-for-symlinks.patch deleted file mode 100644 index b0b7d7433..000000000 --- a/debian/patches/0002-remove-file-serve-restrictions-for-symlinks.patch +++ /dev/null @@ -1,15 +0,0 @@ -Author: Lennart Weller -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 -@@ -372,7 +372,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/0003-debian-use-system-exim4.patch b/debian/patches/0003-debian-use-system-exim4.patch new file mode 100644 index 000000000..bcb0a1b7a --- /dev/null +++ b/debian/patches/0003-debian-use-system-exim4.patch @@ -0,0 +1,12 @@ +Author: Sven Hartge +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 +@@ -90,4 +90,4 @@ update_every: 10 + # AUTO-DETECTION JOBS + + local: +- command: 'exim -bpc' ++ command: '/usr/sbin/exim -bpc' diff --git a/debian/patches/0003-hide-social-media-buttons.patch b/debian/patches/0003-hide-social-media-buttons.patch deleted file mode 100644 index 33fca6246..000000000 --- a/debian/patches/0003-hide-social-media-buttons.patch +++ /dev/null @@ -1,15 +0,0 @@ -diff -Naurp netdata.orig/web/gui/index.html netdata/web/gui/index.html ---- netdata.orig/web/gui/index.html -+++ netdata/web/gui/index.html -@@ -98,9 +98,11 @@ - -+ -
  •  
  • -
  •  
  • -
  •  
  • diff --git a/debian/patches/0003-hide-update-button.patch b/debian/patches/0003-hide-update-button.patch deleted file mode 100644 index bbb4c0273..000000000 --- a/debian/patches/0003-hide-update-button.patch +++ /dev/null @@ -1,16 +0,0 @@ -Author: Federico Ceratto -Description: hide update button - -diff -Naurp netdata.orig/web/gui/index.html netdata/web/gui/index.html ---- netdata.orig/web/gui/index.html -+++ netdata/web/gui/index.html -@@ -95,7 +95,9 @@ -