summaryrefslogtreecommitdiffstats
path: root/netdata.spec.in
diff options
context:
space:
mode:
Diffstat (limited to 'netdata.spec.in')
-rw-r--r--netdata.spec.in15
1 files changed, 12 insertions, 3 deletions
diff --git a/netdata.spec.in b/netdata.spec.in
index d686906f4..7563acc72 100644
--- a/netdata.spec.in
+++ b/netdata.spec.in
@@ -1,6 +1,10 @@
# SPDX-License-Identifier: GPL-3.0-or-later
%global contentdir %{_datadir}/netdata
+
+#TODO: Temporary fix for the build-id error during go.d plugin set up
+%global _missing_build_ids_terminate_build 0
+
# This is temporary and should eventually be resolved. This bypasses
# the default rhel __os_install_post which throws a python compile
# error.
@@ -11,6 +15,7 @@
%define _sysconfdir /etc
%define _localstatedir /var
%define _libexecdir /usr/libexec
+%define _libdir /usr/lib
#
# Conditional build:
@@ -235,6 +240,7 @@ autoreconf -ivf
--sysconfdir="%{_sysconfdir}" \
--localstatedir="%{_localstatedir}" \
--libexecdir="%{_libexecdir}" \
+ --libdir="%{_libdir}" \
--with-zlib \
--with-math \
--with-user=netdata \
@@ -322,7 +328,7 @@ download_go() {
install_go() {
# When updating this value, ensure correct checksums in packaging/go.d.checksums
- GO_PACKAGE_VERSION="v0.7.0"
+ GO_PACKAGE_VERSION="$(cat packaging/go.d.version)"
ARCH_MAP=(
'i386::386'
'i686::386'
@@ -348,7 +354,7 @@ install_go() {
fi
done
tmp=$(mktemp -d /tmp/netdata-go-XXXXXX)
- GO_PACKAGE_BASENAME="go.d.plugin-${GO_PACKAGE_VERSION}.${OS}-${ARCH}"
+ GO_PACKAGE_BASENAME="go.d.plugin-${GO_PACKAGE_VERSION}.${OS}-${ARCH}.tar.gz"
download_go "https://github.com/netdata/go.d.plugin/releases/download/${GO_PACKAGE_VERSION}/${GO_PACKAGE_BASENAME}" "${tmp}/${GO_PACKAGE_BASENAME}"
download_go "https://github.com/netdata/go.d.plugin/releases/download/${GO_PACKAGE_VERSION}/config.tar.gz" "${tmp}/config.tar.gz"
@@ -374,11 +380,14 @@ install_go() {
# Install files
tar -xf "${tmp}/config.tar.gz" -C "${RPM_BUILD_ROOT}%{_libdir}/%{name}/conf.d/"
- mv "${tmp}/$GO_PACKAGE_BASENAME" "${RPM_BUILD_ROOT}%{_libexecdir}/%{name}/plugins.d/go.d.plugin"
+ tar xf "${tmp}/${GO_PACKAGE_BASENAME}"
+ mv "${GO_PACKAGE_BASENAME/\.tar\.gz/}" "go.d.plugin"
+ rm -rf "${tmp}"
fi
return 0
}
install_go
+install -m 0750 -p go.d.plugin "${RPM_BUILD_ROOT}%{_libexecdir}/%{name}/plugins.d/go.d.plugin"
%pre