aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xci/install_dependencies.sh33
-rw-r--r--ci/utility/collectd.spec.patch95
-rwxr-xr-xci/utility/collectd_build_rpm.sh10
-rwxr-xr-xci/utility/package-list.sh2
4 files changed, 114 insertions, 26 deletions
diff --git a/ci/install_dependencies.sh b/ci/install_dependencies.sh
index d131429f..40437804 100755
--- a/ci/install_dependencies.sh
+++ b/ci/install_dependencies.sh
@@ -1,5 +1,5 @@
#!/bin/bash
-# Copyright 2017 Intel Corporation
+# Copyright 2017-21 Anuket, Intel Corporation and others
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
@@ -16,25 +16,18 @@
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
source $DIR/utility/package-list.sh
-# For collectd
-sudo yum install -y yum-utils
-sudo yum install -y epel-release
-sudo yum-builddep -y collectd
-
-sudo yum -y install autoconf automake flex bison libtool pkg-config
-
-sudo yum -y install git
-
-sudo yum -y install rpm-build \
- libcap-devel xfsprogs-devel iptables-devel \
- libmemcached-devel gtk2-devel libvirt-devel \
- ganglia-devel mysql-devel qpid-proton-c-devel
-
-# For DMA component
-sudo yum -y install hiredis-devel
-
-# For intel-cmt-cat
-sudo yum -y install wget
+# Reuse build_base_machine.sh for this distro, to install the required packages
+# Detect OS name and version from systemd based os-release file
+. /etc/os-release
+distro_dir="$DIR/../systems/$ID/$VERSION_ID"
+
+# build base system using OS specific scripts
+if [ -d "$distro_dir" ] && [ -e "$distro_dir/build_base_machine.sh" ]; then
+ sudo $distro_dir/build_base_machine.sh || ( echo "$distro_dir/build_base_machine.sh failed" && exit 1 )
+else
+ "$distro_dir is not supported"
+ exit 1
+fi
# For RPM build
mkdir -p $RPM_WORKDIR/{BUILD,RPMS,SOURCES,SPECS,SRPMS}
diff --git a/ci/utility/collectd.spec.patch b/ci/utility/collectd.spec.patch
new file mode 100644
index 00000000..026e96ff
--- /dev/null
+++ b/ci/utility/collectd.spec.patch
@@ -0,0 +1,95 @@
+diff --git a/contrib/redhat/collectd.spec b/contrib/redhat/collectd.spec
+index 4721d47f..ca9929db 100644
+--- a/contrib/redhat/collectd.spec
++++ b/contrib/redhat/collectd.spec
+@@ -96,6 +96,7 @@
+ %define with_mbmon 0%{!?_without_mbmon:1}
+ %define with_mcelog 0%{!?_without_mcelog:1}
+ %define with_md 0%{!?_without_md:1}
++%define with_mdevents 0%{!?_without_mdevents:1}
+ %define with_memcachec 0%{!?_without_memcachec:1}
+ %define with_memcached 0%{!?_without_memcached:1}
+ %define with_memory 0%{!?_without_memory:1}
+@@ -112,7 +113,7 @@
+ %define with_notify_nagios 0%{!?_without_notify_nagios:1}
+ %define with_ntpd 0%{!?_without_ntpd:1}
+ %define with_numa 0%{!?_without_numa:1}
+-%define with_nut 0%{!?_without_nut:1}
++%define with_nut 0%{!?_without_nut:0}
+ %define with_olsrd 0%{!?_without_olsrd:1}
+ %define with_openldap 0%{!?_without_openldap:1}
+ %define with_openvpn 0%{!?_without_openvpn:1}
+@@ -154,7 +155,7 @@
+ %define with_uptime 0%{!?_without_uptime:1}
+ %define with_users 0%{!?_without_users:1}
+ %define with_uuid 0%{!?_without_uuid:1}
+-%define with_varnish 0%{!?_without_varnish:1}
++%define with_varnish 0%{!?_without_varnish:0}
+ %define with_virt 0%{!?_without_virt:1}
+ %define with_vmem 0%{!?_without_vmem:1}
+ %define with_vserver 0%{!?_without_vserver:1}
+@@ -195,7 +196,7 @@
+ # plugin intel_pmu disabled, requires libjevents
+ %define with_intel_pmu 0%{!?_without_intel_pmu:0}
+ # plugin intel_rdt disabled, requires intel-cmt-cat
+-%define with_intel_rdt 0%{!?_without_intel_rdt:0}
++%define with_intel_rdt 0%{!?_without_intel_rdt:1}
+ # plugin mic disabled, requires Mic
+ %define with_mic 0%{!?_without_mic:0}
+ # plugin netapp disabled, requires libnetapp
+@@ -643,7 +644,7 @@ The modbus plugin collects values from Modbus/TCP enabled devices
+ Summary: MySQL plugin for collectd
+ Group: System Environment/Daemons
+ Requires: %{name}%{?_isa} = %{version}-%{release}
+-BuildRequires: mysql-devel
++BuildRequires: mariadb-connector-c-devel
+ %description mysql
+ MySQL querying plugin. This plugin provides data of issued commands, called
+ handlers and database traffic.
+@@ -1503,6 +1504,12 @@ Collectd utilities
+ %define _with_md --disable-md
+ %endif
+
++%if %{with_mdevents}
++%define _with_mdevents --enable-mdevents
++%else
++%define _with_mdevents --disable-mdevents
++%endif
++
+ %if %{with_memcachec}
+ %define _with_memcachec --enable-memcachec
+ %else
+@@ -2117,6 +2124,7 @@ Collectd utilities
+ %{?_with_grpc} \
+ %{?_with_hddtemp} \
+ %{?_with_hugepages} \
++ --disable-infiniband \
+ %{?_with_intel_pmu} \
+ %{?_with_intel_rdt} \
+ %{?_with_interface} \
+@@ -2137,6 +2145,7 @@ Collectd utilities
+ %{?_with_mbmon} \
+ %{?_with_mcelog} \
+ %{?_with_md} \
++ %{?_with_mdevents} \
+ %{?_with_memcachec} \
+ %{?_with_memcached} \
+ %{?_with_memory} \
+@@ -2146,6 +2155,7 @@ Collectd utilities
+ %{?_with_multimeter} \
+ %{?_with_mysql} \
+ %{?_with_netapp} \
++ --disable-netstat_udp \
+ %{?_with_netlink} \
+ %{?_with_network} \
+ %{?_with_nfs} \
+@@ -2453,6 +2463,9 @@ fi
+ %if %{with_md}
+ %{_libdir}/%{name}/md.so
+ %endif
++%if %{with_mdevents}
++%{_libdir}/%{name}/mdevents.so
++%endif
+ %if %{with_memcached}
+ %{_libdir}/%{name}/memcached.so
+ %endif
diff --git a/ci/utility/collectd_build_rpm.sh b/ci/utility/collectd_build_rpm.sh
index db797869..a261c292 100755
--- a/ci/utility/collectd_build_rpm.sh
+++ b/ci/utility/collectd_build_rpm.sh
@@ -32,14 +32,14 @@ make dist
cp $COLLECTD_DIR/collectd-$VERSION.tar.bz2 $RPM_WORKDIR/SOURCES/
+git apply $DIR/collectd.spec.patch
+
sed --regexp-extended \
--in-place=".bak" \
- --expression="s/Version:\s+\S+$/Version: $VERSION/g" \
+ --expression="s/Version:\s+\S+$/Version: $VERSION/g" \
$COLLECTD_DIR/contrib/redhat/collectd.spec
-sed --regexp-extended \
- --in-place \
- --expression="s/without_intel_rdt:[0-9]/without_intel_rdt:1/g" \
- $COLLECTD_DIR/contrib/redhat/collectd.spec
+dnf builddep -y $COLLECTD_DIR/contrib/redhat/collectd.spec
rpmbuild --define "_topdir $RPM_WORKDIR" -bb $COLLECTD_DIR/contrib/redhat/collectd.spec
+
diff --git a/ci/utility/package-list.sh b/ci/utility/package-list.sh
index 30b73852..019893d3 100755
--- a/ci/utility/package-list.sh
+++ b/ci/utility/package-list.sh
@@ -25,4 +25,4 @@ CMTCAT_BRANCH=8b27ad757e86a01bc51eafcb9e600605ff1beca4
CMTCAT_VERSION="v1.1.0"
COLLECTD_REPO=https://github.com/collectd/collectd.git
-COLLECTD_BRANCH=collectd-5.11
+COLLECTD_BRANCH=collectd-5.12