From d4dd00f58a502c9ca4b63e36ce6bc7a9945dc63c Mon Sep 17 00:00:00 2001 From: Federico Ceratto Date: Tue, 27 Mar 2018 22:28:21 +0100 Subject: New upstream version 1.10.0+dfsg --- contrib/Makefile.am | 1 + contrib/Makefile.in | 1 + contrib/rhel/build-netdata-rpm.sh | 46 +++++++++++++++++++++++++++++++++++++++ 3 files changed, 48 insertions(+) create mode 100755 contrib/rhel/build-netdata-rpm.sh (limited to 'contrib') diff --git a/contrib/Makefile.am b/contrib/Makefile.am index 15e9c0008..d9250179b 100644 --- a/contrib/Makefile.am +++ b/contrib/Makefile.am @@ -17,6 +17,7 @@ dist_noinst_DATA = \ debian/netdata.service \ debian/changelog \ debian/netdata.postrm \ + rhel/build-netdata-rpm.sh \ $(NULL) dist_noinst_SCRIPTS = \ diff --git a/contrib/Makefile.in b/contrib/Makefile.in index a10dfa972..094053096 100644 --- a/contrib/Makefile.in +++ b/contrib/Makefile.in @@ -282,6 +282,7 @@ dist_noinst_DATA = \ debian/netdata.service \ debian/changelog \ debian/netdata.postrm \ + rhel/build-netdata-rpm.sh \ $(NULL) dist_noinst_SCRIPTS = \ diff --git a/contrib/rhel/build-netdata-rpm.sh b/contrib/rhel/build-netdata-rpm.sh new file mode 100755 index 000000000..051969091 --- /dev/null +++ b/contrib/rhel/build-netdata-rpm.sh @@ -0,0 +1,46 @@ +#!/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 +source "installer/functions.sh" || exit 1 + +set -e + +run ./autogen.sh +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}" -o ! -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