Skip to content

Commit

Permalink
specfile: Add support for EL8
Browse files Browse the repository at this point in the history
List of changes:

* ganglia-devel is not available in el8 yet
* gpsd-devel is not available in el8 yet
* libmodbus-devel is not available in el8 yet
* liboping-devel is not available in el8 yet
* mosquitto-devel is not available in el8 yet
* fix python dep in el8
* disable liblvm
* dependency problem while configuring smart
* add check_uptime
* simplify python rhel version logic and force python3 for rhel8
* remove support for EL<6
* disable redfish
* disable slurm
* disable intel dcpmm
* disable capabilities
* disable dpdk_telemetry
* disable ipstats

TODO:

* buddyinfo
* logparser
* ubi
* write_influxdb

Change-Id: I0bc5a723e3682e4f60e6c09670f286d20df507d5
Changelog: update specfile for EL8

Change-Id: Ic8ee01c69128f7bc4ec90a1d16a67b016a342b11

Change-Id: I80865415f1b056042f5b0d0c0c661c2e500a115d
  • Loading branch information
Fᴀʙɪᴇɴ Wᴇʀɴʟɪ committed Mar 13, 2020
1 parent 1586782 commit 891d571
Showing 1 changed file with 95 additions and 34 deletions.
129 changes: 95 additions & 34 deletions contrib/redhat/collectd.spec
Expand Up @@ -52,6 +52,7 @@
%define with_bind 0%{!?_without_bind:1}
%define with_ceph 0%{!?_without_ceph:1}
%define with_cgroups 0%{!?_without_cgroups:1}
%define with_check_uptime 0%{!?_without_check_uptime:1}
%define with_chrony 0%{!?_without_chrony:1}
%define with_connectivity 0%{!?_without_connectivity:1}
%define with_conntrack 0%{!?_without_conntrack:1}
Expand All @@ -75,6 +76,7 @@
%define with_fhcount 0%{!?_without_fhcount:1}
%define with_filecount 0%{!?_without_filecount:1}
%define with_fscache 0%{!?_without_fscache:1}
%define with_ganglia 0%{!?_without_ganglia:1}
%define with_gmond 0%{!?_without_gmond:1}
%define with_gps 0%{!?_without_gps:1}
%define with_hddtemp 0%{!?_without_hddtemp:1}
Expand Down Expand Up @@ -184,6 +186,8 @@
%define with_dpdkevents 0%{!?_without_dpdkevents:0}
# plugin dpdkstat disabled, requires libdpdk
%define with_dpdkstat 0%{!?_without_dpdkstat:0}
# plugin dpdk_telemetry disabled, requires libdpdk
%define with_dpdk_telemetry 0%{!?_without_dpdk_telemetry:0}
# plugin grpc disabled, requires protobuf-compiler >= 3.0
%define with_grpc 0%{!?_without_grpc:0}
# plugin lpar disabled, requires AIX
Expand Down Expand Up @@ -224,26 +228,16 @@
%define with_gpu_nvidia 0%{!?_without_gpu_nvidia:0}
# not sure why this one's failing
%define with_write_stackdriver 0%{!?_without_write_stackdriver:0}

# Plugins not buildable on RHEL < 6
%if 0%{?rhel} && 0%{?rhel} < 6
%define with_ceph 0
%define with_curl_json 0
%define with_log_logstash 0
%define with_dns 0
%define with_ethstat 0
%define with_gmond 0
%define with_iptables 0
%define with_ipvs 0
%define with_modbus 0
%define with_netlink 0
%define with_redis 0
%define with_smart 0
%define with_turbostat 0
%define with_write_prometheus 0
%define with_write_redis 0
%define with_write_riemann 0
%endif
# not available in el or epel
%define with_slurm 0%{!?_without_slurm:0}
# not available in el or epel
%define with_redfish 0%{!?_without_redfish:0}
# not available in el or epel
%define with_dcpmm 0%{!?_without_dcpmm:0}
# not available in el or epel
%define with_capabilities 0%{!?_without_capabilities:0}
# not available in el or epel
%define with_ipstats 0%{!?_without_ipstats:0}

# Plugins not buildable on RHEL < 7
%if 0%{?rhel} && 0%{?rhel} < 7
Expand All @@ -262,6 +256,17 @@
%define with_xmms 0
%endif

# Plugins not buildable on RHEL 8
%if 0%{?rhel} && 0%{?rhel} >= 8
%define with_smart 0
%define with_ganglia 0
%define with_gmond 0
%define with_gps 0
%define with_modbus 0
%define with_ping 0
%define with_mqtt 0
%endif

Summary: Statistics collection and monitoring daemon
Name: collectd
Version: 5.9.2
Expand Down Expand Up @@ -742,11 +747,7 @@ Summary: Perl plugin for collectd
Group: System Environment/Daemons
Requires: %{name}%{?_isa} = %{version}-%{release}
Requires: perl(:MODULE_COMPAT_%(eval "`%{__perl} -V:version`"; echo $version))
%if 0%{?rhel} && 0%{?rhel} < 6
BuildRequires: perl
%else
BuildRequires: perl-ExtUtils-Embed
%endif
%description perl
The Perl plugin embeds a Perl interpreter into collectd and exposes the
application programming interface (API) to Perl-scripts.
Expand Down Expand Up @@ -810,11 +811,11 @@ Monitors process starts/stops via netlink library.
Summary: Python plugin for collectd
Group: System Environment/Daemons
Requires: %{name}%{?_isa} = %{version}-%{release}
%if 0%{?rhel} && 0%{?rhel} < 6
BuildRequires: python26-devel
%else
BuildRequires: python-devel
%endif
%if 0%{?rhel} && 0%{?rhel} >= 8
BuildRequires: python3-devel
%else
BuildRequires: python2-devel
%endif
%description python
The Python plugin embeds a Python interpreter into collectd and exposes the
application programming interface (API) to Python-scripts.
Expand Down Expand Up @@ -1157,12 +1158,24 @@ Collectd utilities
%define _with_bind --disable-bind
%endif

%if %{with_capabilities}
%define _with_capabilities --enable-capabilities
%else
%define _with_capabilities --disable-capabilities
%endif

%if %{with_cgroups}
%define _with_cgroups --enable-cgroups
%else
%define _with_cgroups --disable-cgroups
%endif

%if %{with_check_uptime}
%define _with_check_uptime --enable-check_uptime
%else
%define _with_check_uptime --disable-check_uptime
%endif

%if %{with_chrony}
%define _with_chrony --enable-chrony
%else
Expand Down Expand Up @@ -1241,6 +1254,12 @@ Collectd utilities
%define _with_dbi --disable-dbi
%endif

%if %{with_dcpmm}
%define _with_dcpmm --enable-dcpmm
%else
%define _with_dcpmm --disable-dcpmm
%endif

%if %{with_df}
%define _with_df --enable-df
%else
Expand Down Expand Up @@ -1277,6 +1296,12 @@ Collectd utilities
%define _with_dpdkstat --disable-dpdkstat
%endif

%if %{with_dpdk_telemetry}
%define _with_dpdk_telemetry --enable-dpdk_telemetry
%else
%define _with_dpdk_telemetry --disable-dpdk_telemetry
%endif

%if %{with_email}
%define _with_email --enable-email
%else
Expand Down Expand Up @@ -1319,6 +1344,12 @@ Collectd utilities
%define _with_fscache --disable-fscache
%endif

%if %{with_ganglia}
%define _with_ganglia --enable-ganglia
%else
%define _with_ganglia --disable-ganglia
%endif

%if %{with_gmond}
%define _with_gmond --enable-gmond
%else
Expand Down Expand Up @@ -1379,6 +1410,12 @@ Collectd utilities
%define _with_ipmi --disable-ipmi
%endif

%if %{with_ipstats}
%define _with_ipstats --enable-ipstats
%else
%define _with_ipstats --disable-ipstats
%endif

%if %{with_iptables}
%define _with_iptables --enable-iptables
%else
Expand Down Expand Up @@ -1680,16 +1717,17 @@ Collectd utilities
%endif

%if %{with_python}
%if 0%{?rhel} && 0%{?rhel} < 6
%define _with_python --enable-python --with-python=%{_bindir}/python2.6
%define _python_config PYTHON_CONFIG="%{_bindir}/python2.6-config"
%else
%define _with_python --enable-python
%endif
%else
%define _with_python --disable-python
%endif

%if %{with_redfish}
%define _with_redfish --enable-redfish
%else
%define _with_redfish --disable-redfish
%endif

%if %{with_redis}
%define _with_redis --enable-redis
%else
Expand Down Expand Up @@ -1732,6 +1770,12 @@ Collectd utilities
%define _with_sigrok --disable-sigrok
%endif

%if %{with_slurm}
%define _with_slurm --enable-slurm
%else
%define _with_slurm --disable-slurm
%endif

%if %{with_smart}
%define _with_smart --enable-smart
%else
Expand Down Expand Up @@ -2034,8 +2078,10 @@ Collectd utilities
%{?_with_barometer} \
%{?_with_battery} \
%{?_with_bind} \
%{?_with_capabilities} \
%{?_with_ceph} \
%{?_with_cgroups} \
%{?_with_check_uptime} \
%{?_with_chrony} \
%{?_with_connectivity} \
%{?_with_conntrack} \
Expand All @@ -2048,12 +2094,14 @@ Collectd utilities
%{?_with_curl_xml} \
%{?_with_curl} \
%{?_with_dbi} \
%{?_with_dcpmm} \
%{?_with_df} \
%{?_with_disk} \
%{?_with_dns} \
%{?_with_drbd} \
%{?_with_dpdkevents} \
%{?_with_dpdkstat} \
%{?_with_dpdk_telemetry} \
%{?_with_email} \
%{?_with_entropy} \
%{?_with_ethstat} \
Expand All @@ -2071,6 +2119,7 @@ Collectd utilities
%{?_with_interface} \
%{?_with_ipc} \
%{?_with_ipmi} \
%{?_with_ipstats} \
%{?_with_iptables} \
%{?_with_ipvs} \
%{?_with_irq} \
Expand All @@ -2080,6 +2129,7 @@ Collectd utilities
%{?_with_logfile} \
%{?_with_lpar} \
%{?_with_lua} \
--disable-lvm \
%{?_with_madwifi} \
%{?_with_mbmon} \
%{?_with_mcelog} \
Expand Down Expand Up @@ -2121,13 +2171,15 @@ Collectd utilities
%{?_with_procevent} \
%{?_with_protocols} \
%{?_with_python} \
%{?_with_redfish} \
%{?_with_redis} \
%{?_with_routeros} \
%{?_with_rrdcached} \
%{?_with_rrdtool} \
%{?_with_sensors} \
%{?_with_serial} \
%{?_with_sigrok} \
%{?_with_slurm} \
%{?_with_smart} \
%{?_with_snmp} \
%{?_with_snmp_agent} \
Expand Down Expand Up @@ -2320,6 +2372,9 @@ fi
%if %{with_cgroups}
%{_libdir}/%{name}/cgroups.so
%endif
%if %{with_check_uptime}
%{_libdir}/%{name}/check_uptime.so
%endif
%if %{with_conntrack}
%{_libdir}/%{name}/conntrack.so
%endif
Expand Down Expand Up @@ -2518,6 +2573,12 @@ fi
%if %{with_zookeeper}
%{_libdir}/%{name}/zookeeper.so
%endif
#TODO put those in separate packages
%{_libdir}/%{name}/buddyinfo.so
%{_libdir}/%{name}/logparser.so
%{_libdir}/%{name}/ubi.so
%{_libdir}/%{name}/write_influxdb.so


%files -n libcollectdclient-devel
%{_includedir}/collectd/client.h
Expand Down

0 comments on commit 891d571

Please sign in to comment.