@@ -16,6 +16,7 @@ libspdlog_dev_min_version=150
16
16
libzmq3_dev_min_version=432
17
17
18
18
sysdeb_install_list=" libssl-dev libfmt-dev"
19
+ sysrpm_install_list=" jsoncpp-devel libconfig-devel spdlog-devel cppzmq-devel openssl-devel"
19
20
20
21
# gRPC install parameters
21
22
readonly grpc_url=" https://github.com/grpc/grpc"
@@ -62,6 +63,7 @@ readonly err_missing_options=82
62
63
readonly err_unknown_options=83
63
64
readonly err_missing_options_arg=84
64
65
readonly err_unimplemented_options=85
66
+ readonly err_epel_failure=86
65
67
readonly script_name=" ${0##*/ } "
66
68
67
69
h_option_flag=0
@@ -162,7 +164,7 @@ os_release_detect() {
162
164
;;
163
165
flavor)
164
166
# Supported distro
165
- set -- debian ubuntu pop centos OpenBSD
167
+ set -- debian ubuntu pop centos rhel OpenBSD
166
168
local linux_distribution=" $( egrep ' ^ID=' /etc/os-release | awk -F " =" ' {print $2}' | tr -d " \" " ) "
167
169
local bsd_distribution=" none"
168
170
@@ -190,7 +192,7 @@ os_release_detect() {
190
192
case " ${_flavor} " in
191
193
debian)
192
194
# Supported debian releases
193
- set -- 11
195
+ set -- 11 12
194
196
195
197
for item in " $@ " ;
196
198
do
@@ -204,7 +206,7 @@ os_release_detect() {
204
206
;;
205
207
ubuntu|pop)
206
208
# Supported ubuntu/pop releases
207
- set -- 20.04 22.04 22.10
209
+ set -- 20.04 22.04 22.10 23.04
208
210
209
211
for item in " $@ " ;
210
212
do
@@ -216,9 +218,9 @@ os_release_detect() {
216
218
217
219
os_release_helper
218
220
;;
219
- centos|redhat )
221
+ centos|rhel )
220
222
# Supported centos releases
221
- set -- 8 9
223
+ set -- 8 9 9.1 9.2
222
224
223
225
for item in " $@ " ;
224
226
do
@@ -530,7 +532,7 @@ grpc_collector_bin_install_deb() {
530
532
grpc_collector_bin_install_rpm () {
531
533
# echo "grpc_collector_bin_install_rpm()"
532
534
local yum_install=1
533
- yum install -y jsoncpp-devel libconfig-devel spdlog-devel cppzmq-devel openssl-devel
535
+ yum install -y $( echo " ${sysrpm_install_list} " )
534
536
yum_install=" $? "
535
537
536
538
sed -i ' /SPDLOG_FMT_EXTERNAL/s/^\/\/ //g' /usr/include/spdlog/tweakme.h
@@ -648,7 +650,7 @@ grpc_collector_lib_install_rpm() {
648
650
fi
649
651
650
652
local yum_install=1
651
- yum install -y jsoncpp-devel libconfig-devel spdlog-devel cppzmq-devel openssl-devel
653
+ yum install -y $( echo " ${sysrpm_install_list} " )
652
654
yum_install=" $? "
653
655
654
656
sed -i ' /SPDLOG_FMT_EXTERNAL/s/^\/\/ //g' /usr/include/spdlog/tweakme.h
@@ -706,6 +708,7 @@ grpc_collector_deploy() {
706
708
command -v make > /dev/null 2>&1 || die " error - expected make command" " ${err_cmd_notfound} "
707
709
command -v cmake > /dev/null 2>&1 || die " error - expected cmake command" " ${err_cmd_notfound} "
708
710
command -v gcc > /dev/null 2>&1 || die " error - expected gcc command" " ${err_cmd_notfound} "
711
+ command -v g++ > /dev/null 2>&1 || die " error - expected g++ command" " ${err_cmd_notfound} "
709
712
command -v autoreconf > /dev/null 2>&1 || die " error - expected autoreconf (autoconf) command" " ${err_cmd_notfound} "
710
713
command -v libtoolize > /dev/null 2>&1 || die " error - expected libtoolize (libtool) command" " ${err_cmd_notfound} "
711
714
command -v cut > /dev/null 2>&1 || die " error - expected cut command" " ${err_cmd_notfound} "
@@ -715,10 +718,10 @@ grpc_collector_deploy() {
715
718
" Linux ubuntu 20.04" | \
716
719
" Linux ubuntu 22.04" | \
717
720
" Linux ubuntu 22.10" | \
721
+ " Linux ubuntu 23.04" | \
718
722
" Linux pop 22.04" )
719
723
# echo "grpc_collector_deploy_deb()"
720
724
command -v apt-get > /dev/null 2>&1 || die " error - expected apt command" " ${err_cmd_notfound} "
721
- command -v g++ > /dev/null 2>&1 || die " error - expected g++ command" " ${err_cmd_notfound} "
722
725
check_if_root
723
726
detect_sysdeb_lib " libjsoncpp-dev"
724
727
detect_sysdeb_lib " librdkafka-dev"
@@ -742,13 +745,25 @@ grpc_collector_deploy() {
742
745
;;
743
746
" Linux centos 8" | \
744
747
" Linux centos 9" | \
745
- " Linux redhat 8" | \
746
- " Linux redhat 9" )
748
+ " Linux rhel 8" | \
749
+ " Linux rhel 9" | \
750
+ " Linux rhel 9.1" | \
751
+ " Linux rhel 9.2" )
747
752
# echo "grpc_collector_deploy_rpm()"
748
- command -v yum > /dev/null 2>&1 || die " error - expected yum command" " ${err_cmd_notfound} "
753
+ if [ " ${_os_info} " = " Linux centos 8" ] || [ " ${_os_info} " = " Linux centos 9" ]; then
754
+ command -v yum > /dev/null 2>&1 || die " error - expected yum command" " ${err_cmd_notfound} "
755
+ else
756
+ command -v dnf > /dev/null 2>&1 || die " error - expected dnf command" " ${err_cmd_notfound} "
757
+ fi
758
+
749
759
check_if_root
750
- # Switch to a recent gcc version
751
- source /opt/rh/gcc-toolset-11/enable
760
+
761
+ yum install -y epel-release > /dev/null 2>&1 || die " error - epel-release install failure" " ${err_epel_failure} "
762
+
763
+ # Switch to a recent gcc version (old centos/rhel release)
764
+ if [ " ${_os_info} " = " Linux centos 8" ] || [ " ${_os_info} " = " Linux rhel 8" ]; then
765
+ source /opt/rh/gcc-toolset-11/enable
766
+ fi
752
767
detect_sysrpm_lib
753
768
if [ " ${grpc_dev} " -eq 0 ]; then
754
769
detect_installed_grpc
0 commit comments