Update patch

i8 changed/i8/eth-tools-11.5.0.0-173.el8.inferit
Arkady L. Shane 1 year ago
parent 27b0c7eb9d
commit 762b23577b
Signed by: tigro
GPG Key ID: 1EC08A25C9DB2503

@ -1,162 +1,86 @@
From 0db724a7da5dca0507eddd75124d2374c2b5244b Mon Sep 17 00:00:00 2001 From 5d431acad965384bec4cf0df1d07f59ddbd414ef Mon Sep 17 00:00:00 2001
From: Sergey Cherevko <s.cherevko@msvsphere.ru> From: tigro <tigro@msvsphere-os.ru>
Date: Wed, 17 May 2023 12:56:28 +0300 Date: Tue, 12 Dec 2023 16:25:36 +0300
Subject: [PATCH] eth fast fabric 11 msvsphere_support Subject: [PATCH] eth fast fabric 11 msvsphere_support
--- ---
CommonInstall/util_init.pl | 14 +++++++++++++- CommonInstall/util_init.pl | 2 ++
MakeTools/funcs-ext.sh | 10 ++++++++++ MakeTools/funcs-ext.sh | 1 +
OpenIb_Host/update_mpi_spec.sh | 2 +- OpenIb_Host/build_packages.sh | 2 +-
get_id_and_versionid.sh | 7 +++++++ OpenIb_Host/get_id_and_versionid.sh | 1 +
update_eth_spec.sh | 2 +- build_package.sh | 2 +-
5 files changed, 32 insertions(+), 3 deletions(-) 5 files changed, 6 insertions(+), 2 deletions(-)
diff --git a/CommonInstall/util_init.pl b/CommonInstall/util_init.pl diff --git a/CommonInstall/util_init.pl b/CommonInstall/util_init.pl
index 07220bd..8e85334 100755 index 452b93d..d3f5a4a 100755
--- a/CommonInstall/util_init.pl --- a/CommonInstall/util_init.pl
+++ b/CommonInstall/util_init.pl +++ b/CommonInstall/util_init.pl
@@ -213,7 +213,7 @@ sub os_vendor_version($) @@ -246,6 +246,7 @@ sub determine_os_version()
chop($rval); "centos" => "redhat",
$rval="ES".$rval; "rocky" => "redhat",
if ( -e "/etc/redhat-release" ) { "almalinux" => "redhat",
- if (!system("grep -qi centos /etc/redhat-release") || !system("grep -qi rocky /etc/redhat-release") || !system("grep -qi almalinux /etc/redhat-release") || !system("grep -qi circle /etc/redhat-release")) { + "msvsphere" => "redhat",
+ if (!system("grep -qi centos /etc/redhat-release") || !system("grep -qi rocky /etc/redhat-release") || !system("grep -qi almalinux /etc/redhat-release") || !system("grep -qi circle /etc/redhat-release")) || !system("grep -qi msvsphere /etc/redhat-release")) { "circle" => "redhat",
$rval = `cat /etc/redhat-release | cut -d' ' -f4`; "oracle" => "redhat",
$rval =~ m/(\d+).(\d+)/; "opencloudos" => "opencloudos",
if ($2 eq "0") { @@ -258,6 +259,7 @@ sub determine_os_version()
@@ -261,6 +261,12 @@ sub os_vendor_version($) "centos" => $NETWORK_CONF_DIR,
$rval = `cat /etc/redhat-release`; "rocky" => $NETWORK_CONF_DIR,
$rval =~ m/(\d+).(\d+)/; "almalinux" => $NETWORK_CONF_DIR,
$rval="ES".$1.$2; + "msvsphere" => $NETWORK_CONF_DIR,
+ } elsif (!system("grep -qi msvsphere /etc/redhat-release")) { "circle" => $NETWORK_CONF_DIR,
+ # Find a number of the form "#.#" and output the portion "oracle" => $NETWORK_CONF_DIR,
+ # to the left of the decimal point. "opencloudos" => $NETWORK_CONF_DIR,
+ $rval = `cat /etc/redhat-release`;
+ $rval =~ m/(\d+).(\d+)/;
+ $rval="ES".$1.$2;
} elsif (!system("grep -qi circle /etc/redhat-release")) {
# Find a number of the form "#.#" and output the portion
# to the left of the decimal point.
@@ -324,6 +330,8 @@ sub determine_os_version()
$CUR_DISTRO_VENDOR = "redhat";
} elsif ( -s "/etc/almalinux-release" ) {
$CUR_DISTRO_VENDOR = "redhat";
+ } elsif ( -s "/etc/sphere-release" ) {
+ $CUR_DISTRO_VENDOR = "redhat";
} elsif ( -s "/etc/circle-releas" ) {
$CUR_DISTRO_VENDOR = "redhat";
} elsif ( -s "/etc/UnitedLinux-release" ) {
@@ -345,6 +353,7 @@ sub determine_os_version()
"centos" => "redhat",
"rocky" => "redhat",
"almalinux" => "redhat",
+ "msvsphere" => "redhat",
"circle" => "redhat",
"sles" => "SuSE",
"sle_hpc" => "SuSE",
@@ -355,6 +364,7 @@ sub determine_os_version()
"centos" => $NETWORK_CONF_DIR,
"rocky" => $NETWORK_CONF_DIR,
"almalinux" => $NETWORK_CONF_DIR,
+ "msvsphere" => $NETWORK_CONF_DIR,
"circle" => $NETWORK_CONF_DIR,
"sles" => "/etc/sysconfig/network",
"sle_hpc" => "/etc/sysconfig/network",
@@ -390,6 +400,8 @@ sub determine_os_version()
$CUR_DISTRO_VENDOR = "redhat";
} elsif ($CUR_DISTRO_VENDOR eq "almalinux") {
$CUR_DISTRO_VENDOR = "redhat";
+ } elsif ($CUR_DISTRO_VENDOR eq "msvsphere") {
+ $CUR_DISTRO_VENDOR = "redhat";
} elsif ($CUR_DISTRO_VENDOR eq "circle") {
$CUR_DISTRO_VENDOR = "redhat";
}
diff --git a/MakeTools/funcs-ext.sh b/MakeTools/funcs-ext.sh diff --git a/MakeTools/funcs-ext.sh b/MakeTools/funcs-ext.sh
index a5ee8ab..26def32 100755 index c97531e..b51ceea 100755
--- a/MakeTools/funcs-ext.sh --- a/MakeTools/funcs-ext.sh
+++ b/MakeTools/funcs-ext.sh +++ b/MakeTools/funcs-ext.sh
@@ -731,6 +731,9 @@ function os_vendor() @@ -738,6 +738,7 @@ function os_vendor()
almalinux) [fedora]="redhat"
rval=redhat [rocky]="redhat"
;; [almalinux]="redhat"
+ msvsphere) + [msvsphere]="redhat"
+ rval=redhat [circle]="redhat"
+ ;; [ol]="redhat"
circle) [opencloudos]="opencloudos"
rval=redhat diff --git a/OpenIb_Host/build_packages.sh b/OpenIb_Host/build_packages.sh
;; index b8cd62c..7a11acd 100755
@@ -772,6 +775,9 @@ function os_vendor() --- a/OpenIb_Host/build_packages.sh
then +++ b/OpenIb_Host/build_packages.sh
rval=redhat @@ -42,7 +42,7 @@ echo "Packages version [$pkgversion] release [$pkgrelease], args [$BUILD_ARGS]"
elif [ $rval = 'almalinux' ] build_deb="no"
+ then spec_mpi="UNDEFINED"
+ rval=redhat spec_ff="UNDEFINED"
+ elif [ $rval = 'msvsphere' ] -if [ "$id" = "rhel" -o "$id" = "centos" -o "$id" = "rocky" -o "$id" = "almalinux" -o "$id" = "circle" -o "$id" = "ol" ]; then
then +if [ "$id" = "rhel" -o "$id" = "centos" -o "$id" = "rocky" -o "$id" = "almalinux" -o "$id" = "msvsphere" -o "$id" = "circle" -o "$id" = "ol" ]; then
rval=redhat
elif [ $rval = 'circle' ]
@@ -859,6 +865,10 @@ function os_vendor_version()
then
# AlmaLinux
rval="ES"`cat /etc/redhat-release | sed -r 's/^.+([[:digit:]])\.([[:digit:]]).+$/\1\2/'`
+ elif grep -qi msvsphere /etc/redhat-release
+ then
+ # MSVSphere
+ rval="ES"`cat /etc/redhat-release | sed -r 's/^.+([[:digit:]])\.([[:digit:]]).+$/\1\2/'`
elif grep -qi circle /etc/redhat-release
then
# Circle Linux
diff --git a/OpenIb_Host/update_mpi_spec.sh b/OpenIb_Host/update_mpi_spec.sh
index abf1f2d..a057439 100755
--- a/OpenIb_Host/update_mpi_spec.sh
+++ b/OpenIb_Host/update_mpi_spec.sh
@@ -33,7 +33,7 @@
id=$(./get_id_and_versionid.sh | cut -f1 -d' ')
versionid=$(./get_id_and_versionid.sh | cut -f2 -d' ')
-if [ "$id" = "rhel" -o "$id" = "centos" -o "$id" = "rocky" -o "$id" = "almalinux" -o "$id" = "circle" ]
+if [ "$id" = "rhel" -o "$id" = "centos" -o "$id" = "rocky" -o "$id" = "almalinux" -o "$id" = "msvsphere" -o "$id" = "circle" ]
then
GE_8_0=$(echo "$versionid >= 8.0" | bc) GE_8_0=$(echo "$versionid >= 8.0" | bc)
sed -i "s/__RPM_REQ/Requires: openblas-devel/" mpi-apps.spec if [ $GE_8_0 = 1 ]; then
diff --git a/get_id_and_versionid.sh b/get_id_and_versionid.sh spec_mpi="mpi-apps.spec.rh8+"
index deaeb43..d89ac76 100755 diff --git a/OpenIb_Host/get_id_and_versionid.sh b/OpenIb_Host/get_id_and_versionid.sh
--- a/get_id_and_versionid.sh index 36f5500..41b4ee9 100755
+++ b/get_id_and_versionid.sh --- a/OpenIb_Host/get_id_and_versionid.sh
@@ -33,6 +33,9 @@ else +++ b/OpenIb_Host/get_id_and_versionid.sh
then @@ -13,6 +13,7 @@ declare -A vendor_map=(
rval=redhat [centos]="rhel"
elif [ $rval = 'almalinux' ] [rocky]="rhel"
+ then [almalinux]="rhel"
+ rval=redhat + [msvsphere]="rhel"
+ elif [ $rval = 'msvsphere' ] [circle]="rhel"
then [ol]="ol"
rval=redhat [opencloudos]="ocs"
elif [ $rval = 'circle' ] diff --git a/build_package.sh b/build_package.sh
@@ -84,6 +87,10 @@ else index 58beffe..4bd6c18 100755
then --- a/build_package.sh
# AlmaLinux +++ b/build_package.sh
rval=`cat /etc/redhat-release | sed -r 's/^.+([[:digit:]])\.([[:digit:]]).+$/\1.\2/'` @@ -3,7 +3,7 @@
+ elif grep -qi msvsphere /etc/redhat-release read id versionid <<< $(OpenIb_Host/get_id_and_versionid.sh)
+ then
+ # MSVSphere
+ rval=`cat /etc/redhat-release | sed -r 's/^.+([[:digit:]])\.([[:digit:]]).+$/\1.\2/'`
elif grep -qi circle /etc/redhat-release
then
# Circle Linux
diff --git a/update_eth_spec.sh b/update_eth_spec.sh
index 83a44ad..3f47460 100755
--- a/update_eth_spec.sh
+++ b/update_eth_spec.sh
@@ -51,7 +51,7 @@ fi
source ./OpenIb_Host/ff_filegroups.sh
-if [ "$id" = "rhel" -o "$id" = "centos" -o "$id" = "rocky" -o "$id" = "almalinux" -o "$id" = "circle" ] case $id in
+if [ "$id" = "rhel" -o "$id" = "centos" -o "$id" = "rocky" -o "$id" = "almalinux" -o "$id" = "msvsphere" -o "$id" = "circle" ] - rhel|centos|rocky|almalinux|circle|ol)
then + rhel|centos|rocky|almalinux|msvsphere|circle|ol)
# __RPM_REQ_BASIC - spec_ff="OpenIb_Host/eth-tools.spec.rh" ;;
sed -i "s/__RPM_REQ_BASIC1/expect%{?_isa}, tcl%{?_isa}, libibverbs-utils%{?_isa}, librdmacm-utils%{?_isa}, net-snmp%{?_isa}, net-snmp-utils%{?_isa}/g" eth-tools.spec fedora)
spec_ff="OpenIb_Host/eth-tools.spec.fedora" ;;
-- --
2.39.2 2.43.0

Loading…
Cancel
Save