diff --git a/SOURCES/powerpc-utils-1.3.9-fix-hexdump-format.patch b/SOURCES/powerpc-utils-1.3.9-fix-hexdump-format.patch new file mode 100644 index 0000000..9b7b2bb --- /dev/null +++ b/SOURCES/powerpc-utils-1.3.9-fix-hexdump-format.patch @@ -0,0 +1,39 @@ +diff -up powerpc-utils-1.3.9/scripts/hcnmgr.me powerpc-utils-1.3.9/scripts/hcnmgr +--- powerpc-utils-1.3.9/scripts/hcnmgr.me 2021-11-11 11:38:33.293898966 +0100 ++++ powerpc-utils-1.3.9/scripts/hcnmgr 2021-11-11 11:39:19.302587637 +0100 +@@ -168,7 +168,7 @@ search_dev() { + # Look at pci ethernet devices + for pci_dev in "$DT_PATH"/pci*; do + [ -d "$pci_dev" ] || continue +- index=$(hexdump -n 4 -e '/1 "%02x"' "$pci_dev"/ibm,my-drc-index) ++ index=$(hexdump -n 4 -ve '/1 "%02x"' "$pci_dev"/ibm,my-drc-index) + if [[ $index != "$1" ]]; then + continue + fi +@@ -189,7 +189,7 @@ search_dev() { + hcnlog DEBUG "search vnic device with drc_index $1" + for dev in "$DT_PATH"/vdevice/vnic*; do + [ -d "$dev" ] || continue +- index=$(hexdump -n 4 -e '/1 "%02x"' "$dev"/ibm,my-drc-index) ++ index=$(hexdump -n 4 -ve '/1 "%02x"' "$dev"/ibm,my-drc-index) + if [[ $index == "$1" ]]; then + hcnlog DEBUG "found matching drc_index $index in $dev" + if [ -e "$dev"/ibm,hcn-id ] && get_dev_hcn "$dev"; then +@@ -205,7 +205,7 @@ search_dev() { + hcnlog DEBUG "search ibmveth device with drc_index $1" + for dev in "$DT_PATH"/vdevice/l-lan*; do + [ -d "$dev" ] || continue +- index=$(hexdump -n 4 -e '/1 "%02x"' "$dev"/ibm,my-drc-index) ++ index=$(hexdump -n 4 -ve '/1 "%02x"' "$dev"/ibm,my-drc-index) + if [[ $index == "$1" ]]; then + hcnlog DEBUG "found matching drc_index $index in $dev" + if [ -e "$dev"/ibm,hcn-id ] && get_dev_hcn "$dev"; then +@@ -233,7 +233,7 @@ get_dev_hcn() { + local dev=$1 + + hcnlog DEBUG "get_dev_hcn: enter $1" +- HCNID=$(hexdump -n 4 -e '/1 "%02x"' "$dev"/ibm,hcn-id) ++ HCNID=$(hexdump -n 4 -ve '/1 "%02x"' "$dev"/ibm,hcn-id) + MODE=$(tr -d '\0' <"$dev"/ibm,hcn-mode) + PHYSLOC=$(tr -d '\0' <"$dev"/ibm,loc-code) + DEVPATH=$1 diff --git a/SOURCES/powerpc-utils-support-vnic-as-backup-device-for-HNV.patch b/SOURCES/powerpc-utils-support-vnic-as-backup-device-for-HNV.patch new file mode 100644 index 0000000..f93d611 --- /dev/null +++ b/SOURCES/powerpc-utils-support-vnic-as-backup-device-for-HNV.patch @@ -0,0 +1,22 @@ +diff -up powerpc-utils-1.3.8/scripts/hcnmgr.me powerpc-utils-1.3.8/scripts/hcnmgr +--- powerpc-utils-1.3.8/scripts/hcnmgr.me 2021-11-11 11:10:37.800910318 +0100 ++++ powerpc-utils-1.3.8/scripts/hcnmgr 2021-11-11 11:12:10.597104063 +0100 +@@ -21,7 +21,7 @@ + # support live partition migration with SR_IOV + # + +-VERSION="1.0" ++VERSION="1.1" + PATH=$PATH:/bin:/usr/bin:/sbin:/usr/sbin + BOND_BASEPATH="/sys/class/net" + BONDOPTIONS="mode=1,miimon=100,fail_over_mac=2" +@@ -630,6 +630,9 @@ fi + if ! nmcli --version >/dev/null 2>&1; then + err $E_ENETUNREACH + fi ++# HNV can support VNIC or Veth as backup device. ++# In the first HNV version 1.0, the vNIC as backup support was turned off ++# HNV VERSION greater than 1.0 starts to support vNIC as the backup device + if [[ $VERSION == "1.0" ]]; then + VNIC_SPT="OFF" + fi diff --git a/SPECS/powerpc-utils.spec b/SPECS/powerpc-utils.spec index 341a872..4fdcc02 100644 --- a/SPECS/powerpc-utils.spec +++ b/SPECS/powerpc-utils.spec @@ -1,6 +1,6 @@ Name: powerpc-utils Version: 1.3.9 -Release: 2%{?dist} +Release: 4%{?dist} Summary: PERL-based scripts for maintaining and servicing PowerPC systems License: GPLv2 @@ -31,7 +31,10 @@ Patch3: powerpc-utils-1.3.5-pseries_platform-man.patch Patch4: powerpc-utils-1.3.5-update_flash_nv.patch Patch5: powerpc-utils-1.3.8-install-man.patch Patch7: powerpc-utils-1.3.8-hcnmgr.patch - +# enable support for vnic as backup device +Patch8: powerpc-utils-support-vnic-as-backup-device-for-HNV.patch +# fixed hexdump format +Patch9: powerpc-utils-1.3.9-fix-hexdump-format.patch %description PERL-based scripts for maintaining and servicing PowerPC systems. @@ -132,7 +135,7 @@ systemctl daemon-reload >/dev/null 2>&1 || : %files core %license COPYING %dir /var/lib/powerpc-utils -/var/lib/powerpc-utils/smt.state +%ghost %config(missingok,noreplace) /var/lib/powerpc-utils/smt.state %{_unitdir}/smtstate.service %{_unitdir}/smt_off.service %{_unitdir}/hcn-init.service @@ -207,6 +210,14 @@ systemctl daemon-reload >/dev/null 2>&1 || : %changelog +* Thu Nov 11 2021 Than Ngo - 1.3.9-4 +- enable support vnic as backend for HNV interface +- fixed hexdump format + Resolves: #2022235 + +* Wed Oct 20 2021 Than Ngo - 1.3.9-3 +- Resolves: #2014916, marked smt.state as %%ghost + * Tue Aug 10 2021 Mohan Boddu - 1.3.9-2 - Rebuilt for IMA sigs, glibc 2.34, aarch64 flags Related: rhbz#1991688