@cryptotaxi247 / netdata-1 / commits / b2d1c7604

remove contrib/rhel (#16672)

Ilya Mashchenko committed Dec 27, 2023 at 17:16 UTC b2d1c7604aa54132d3bafb5ef9c75783b61fc988
1 file changed -56
contrib/rhel/build-netdata-rpm.sh deleted
-56
@@ -1,56 +0,0 @@
1 -#!/usr/bin/env bash
2 -
3 -# docker run -it --rm centos:6.9 /bin/sh
4 -# yum -y install rpm-build redhat-rpm-config yum-utils autoconf automake curl gcc git libmnl-devel libuuid-devel make pkgconfig zlib-devel
5 -
6 -cd "$(dirname "$0")/../../" || exit 1
7 -# shellcheck disable=SC1091
8 -source "packaging/installer/functions.sh" || exit 1
9 -
10 -set -e
11 -
12 -run autoreconf -ivf
13 -run ./configure --enable-maintainer-mode
14 -run make dist
15 -
16 -typeset version="$(grep PACKAGE_VERSION < config.h | cut -d '"' -f 2)"
17 -if [[ -z "${version}" ]]; then
18 - run_failed "Cannot find netdata version."
19 - exit 1
20 -fi
21 -
22 -if [[ "${version//-/}" != "$version" ]]; then
23 - # Remove all -* and _* suffixes to be as close as netdata release
24 - typeset versionfix="${version%%-*}"; versionfix="${versionfix%%_*}"
25 - # Append the current datetime fox a 'unique' build
26 - versionfix+="_$(date '+%m%d%H%M%S')"
27 - # And issue hints & details on why this failed, and how to fix it
28 - run_failed "Current version contains '-' which is forbidden by rpm. You must create a git annotated tag and rerun this script. Example:"
29 - run_failed " git tag -a $versionfix -m 'Release by $(id -nu) on $(uname -n)' && $0"
30 - exit 1
31 -fi
32 -
33 -
34 -typeset tgz="netdata-${version}.tar.gz"
35 -if [[ ! -f "${tgz}" ]]; then
36 - run_failed "Cannot find the generated tar.gz file '${tgz}'"
37 - exit 1
38 -fi
39 -
40 -typeset srpm="$(run rpmbuild -ts "${tgz}" | cut -d ' ' -f 2)"
41 -if [[ -z "${srpm}" ]] || ! [[ -f "${srpm}" ]]; then
42 - run_failed "Cannot find the generated SRPM file '${srpm}'"
43 - exit 1
44 -fi
45 -
46 -#if which yum-builddep 2>/dev/null
47 -#then
48 -# run yum-builddep "${srpm}"
49 -#elif which dnf 2>/dev/null
50 -#then
51 -# [ "${UID}" = 0 ] && run dnf builddep "${srpm}"
52 -#fi
53 -
54 -run rpmbuild --rebuild "${srpm}"
55 -
56 -run_ok "All done! Packages created in '$(rpm -E '%_rpmdir/%_arch')'"