Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package powerpc-utils for openSUSE:Factory checked in at 2021-10-31 22:55:28 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/powerpc-utils (Old) and /work/SRC/openSUSE:Factory/.powerpc-utils.new.1890 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "powerpc-utils" Sun Oct 31 22:55:28 2021 rev:119 rq:928088 version:1.3.9 Changes: -------- --- /work/SRC/openSUSE:Factory/powerpc-utils/powerpc-utils.changes 2021-09-07 21:13:53.232756578 +0200 +++ /work/SRC/openSUSE:Factory/.powerpc-utils.new.1890/powerpc-utils.changes 2021-10-31 22:56:08.307721134 +0100 @@ -1,0 +2,6 @@ +Fri Oct 29 07:38:02 UTC 2021 - Michal Suchanek <[email protected]> + +- Avoid error with HCN IDs containing same consecutive bytes (bsc#1192095 ltc#194963). + + hcnmgr-Avoid-hexdum-squeezing-consecutive-identical-.patch + +------------------------------------------------------------------- New: ---- hcnmgr-Avoid-hexdum-squeezing-consecutive-identical-.patch ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ powerpc-utils.spec ++++++ --- /var/tmp/diff_new_pack.IQOe3q/_old 2021-10-31 22:56:08.807721519 +0100 +++ /var/tmp/diff_new_pack.IQOe3q/_new 2021-10-31 22:56:08.811721521 +0100 @@ -29,6 +29,7 @@ Patch2: ofpathname_powernv.patch Patch4: libvirt-service-dep.patch Patch5: lsdevinfo-optimize-criteria-filtering.patch +Patch6: hcnmgr-Avoid-hexdum-squeezing-consecutive-identical-.patch Patch14: fix_kexec_service_name_for_suse.patch BuildRequires: autoconf BuildRequires: automake ++++++ hcnmgr-Avoid-hexdum-squeezing-consecutive-identical-.patch ++++++ >From 979dcc8946b2504488a88f784853960fb9acdcf2 Mon Sep 17 00:00:00 2001 From: Michal Suchanek <[email protected]> Date: Thu, 28 Oct 2021 11:11:27 +0200 Subject: [PATCH] hcnmgr: Avoid hexdum squeezing consecutive identical bytes. References: bsc#1192095 ltc#194963 https://github.com/ibm-power-utilities/powerpc-utils/pull/72 When the file contrains multiple consecutive bytes containing the same value hexdump squeezes them replacing all but first with * Use the -v argument to avoid this problem. Also put the hexdump invocation into a function. Signed-off-by: Michal Suchanek <[email protected]> --- scripts/hcnmgr | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/scripts/hcnmgr b/scripts/hcnmgr index 6c3c6ab25ed1..4386084e6566 100644 --- a/scripts/hcnmgr +++ b/scripts/hcnmgr @@ -155,6 +155,12 @@ hcnlog() { } +# function xdump4: +# Print first 4 bytes of specified file in hexadecimal +xdump4() { + hexdump -n 4 -ve '/1 "%02x"' "$1" +} + # function search_dev: # Given DRX_INDEX, Search for device-tree, looking for migratable SR_IOV # backend vnic or ibmveth device to configure hybrid network @@ -168,7 +174,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=$(xdump4 "$pci_dev"/ibm,my-drc-index) if [[ $index != "$1" ]]; then continue fi @@ -189,7 +195,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=$(xdump4 "$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 +211,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=$(xdump4 "$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 +239,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=$(xdump4 "$dev"/ibm,hcn-id) MODE=$(tr -d '\0' <"$dev"/ibm,hcn-mode) PHYSLOC=$(tr -d '\0' <"$dev"/ibm,loc-code) DEVPATH=$1 -- 2.31.1
