From 8d4f58e49b9dc7d3545651023a36729de773ad86 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Mon, 6 May 2024 03:22:31 +0200 Subject: Adding upstream version 1.12.0. Signed-off-by: Daniel Baumann --- contrib/rhel/build-netdata-rpm.sh | 47 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 47 insertions(+) create mode 100755 contrib/rhel/build-netdata-rpm.sh (limited to 'contrib/rhel') diff --git a/contrib/rhel/build-netdata-rpm.sh b/contrib/rhel/build-netdata-rpm.sh new file mode 100755 index 0000000..df33d80 --- /dev/null +++ b/contrib/rhel/build-netdata-rpm.sh @@ -0,0 +1,47 @@ +#!/usr/bin/env bash + +# docker run -it --rm centos:6.9 /bin/sh +# yum -y install rpm-build redhat-rpm-config yum-utils autoconf automake curl gcc git libmnl-devel libuuid-devel make pkgconfig zlib-devel + +cd "$(dirname "$0")/../../" || exit 1 +# shellcheck disable=SC1091 +source "packaging/installer/functions.sh" || exit 1 + +set -e + +run autoreconf -ivf +run ./configure --enable-maintainer-mode +run make dist + +version=$(grep PACKAGE_VERSION < config.h | cut -d '"' -f 2) +if [ -z "${version}" ] +then + echo >&2 "Cannot find netdata version." + exit 1 +fi + +tgz="netdata-${version}.tar.gz" +if [ ! -f "${tgz}" ] +then + echo >&2 "Cannot find the generated tar.gz file '${tgz}'" + exit 1 +fi + +srpm=$(run rpmbuild -ts "${tgz}" | cut -d ' ' -f 2) +if [ -z "${srpm}" ] || [ ! -f "${srpm}" ] +then + echo >&2 "Cannot find the generated SRPM file '${srpm}'" + exit 1 +fi + +#if which yum-builddep 2>/dev/null +#then +# run yum-builddep "${srpm}" +#elif which dnf 2>/dev/null +#then +# [ "${UID}" = 0 ] && run dnf builddep "${srpm}" +#fi + +run rpmbuild --rebuild "${srpm}" + +echo >&2 "All done!" -- cgit v1.2.3