From ff22487f28caedeb0694ff595a1afd14ce10f362 Mon Sep 17 00:00:00 2001 From: "Paul Emm. Katsoulakis" <34388743+paulkatsoulakis@users.noreply.github.com> Date: Mon, 16 Sep 2019 11:53:06 +0300 Subject: [PATCH] netdata/packaging: Split CUPS plugin to separate package (RPM) (#6700) * netdata/packaging: introduce cups subpackage on RPM named netdata-plugin-cups * netdata/packaging:[ci skip] use the dev branch to test * netdata/packaging: [ci skip] temporary workaround for build-id error during go.d plugin set up * netdata/packaging: re-arrange package dependencies * netdata/packaging: use a global version variable and make sure cups will depend on the specific version of netdata, we tightly pair them * netdata/packaging: not sure, i guess this is also needed during build [ci skip] * netdata/packaging: always use netdata packagecloud account and just switch to -devel when repo slug is paulkatsoulakis/netdata * Revert "netdata/packaging: not sure, i guess this is also needed during build [ci skip]" This reverts commit 474333e8c41daa759636afa3eda2a098fcee8463. * netdata/packaging: [ci skip] add cups package also * Revert "netdata/packaging: [ci skip] add cups package also" This reverts commit 3914d7000d28623daa93c4a799cee5bc17e624a1. * netdata/packaging: add changelog, dont run the install section for cups * netdata/packaging: explicitly exclude cups from main package * netdata/packaging: [ci skip] adjust perms, we used to have 0750 for cups * netdata/packaging: [ci skip] reinstate master branch in travis * netdata/packaging: another miss from the merge * netdata/packaging: correlate with the other branch [ci skip] * netdata/packaging: dont use personal account info --- netdata.spec.in | 27 ++++++++++++++++++++++++--- 1 file changed, 24 insertions(+), 3 deletions(-) diff --git a/netdata.spec.in b/netdata.spec.in index 217e79c354..4bad813d53 100644 --- a/netdata.spec.in +++ b/netdata.spec.in @@ -1,6 +1,6 @@ # SPDX-License-Identifier: GPL-3.0-or-later %global contentdir %{_datadir}/netdata - +%global version @PACKAGE_VERSION@ #TODO: Temporary fix for the build-id error during go.d plugin set up %global _missing_build_ids_terminate_build 0 @@ -83,7 +83,7 @@ fi \ Summary: Real-time performance monitoring, done right! Name: netdata -Version: @PACKAGE_VERSION@ +Version: %{version} Release: 1%{?dist} License: GPLv3+ Group: Applications/System @@ -193,7 +193,6 @@ Requires: freeipmi # CUPS plugin dependencies BuildRequires: cups-devel -Requires: cups # end - cups plugin dependencies # Prometheus remote write dependencies @@ -276,6 +275,11 @@ install -m 4750 -p apps.plugin "${RPM_BUILD_ROOT}%{_libexecdir}/%{name}/plugins. # Install perf.plugin install -m 4750 -p perf.plugin "${RPM_BUILD_ROOT}%{_libexecdir}/%{name}/plugins.d/perf.plugin" +# ########################################################### +# Install cups.plugin +install -m 0750 -p cups.plugin "${RPM_BUILD_ROOT}%{_libexecdir}/%{name}/plugins.d/cups.plugin" + + # ########################################################### # Install registry directory install -m 755 -d "${RPM_BUILD_ROOT}%{_localstatedir}/lib/%{name}/registry" @@ -483,8 +487,25 @@ rm -rf "${RPM_BUILD_ROOT}" %attr(0770,netdata,netdata) %dir %{_localstatedir}/lib/%{name} %attr(0770,netdata,netdata) %dir %{_localstatedir}/lib/%{name}/registry +# CUPS belongs to a different sub package +%exclude %{_libexecdir}/%{name}/plugins.d/cups.plugin + +%package plugin-cups +Summary: The Common Unix Printing System plugin for netdata +Group: Applications/System +Requires: cups +Requires: netdata = %{version} + +%description plugin-cups + This is the Common Unix Printing System plugin for the netdata daemon. +Use this plugin to enable metrics collection from cupsd, the daemon running when CUPS is enabled on the system + +%files plugin-cups +%attr(0750,root,netdata) %{_libexecdir}/%{name}/plugins.d/cups.plugin %changelog +* Tue Aug 20 2019 Pavlos Emm. Katsoulakis - 0.0.0-8 +- Split CUPS functionality on separate package * Fri Jun 28 2019 Pavlos Emm. Katsoulakis - 0.0.0-7 - Raise the path overrides to the spec file level, not just the configure. - Adjust tighter permissions on some folders, based on what we did on our installer