diff --git a/powerpc-utils-1.3.8-using-od.patch b/powerpc-utils-1.3.8-using-od.patch new file mode 100644 index 0000000..ddf429f --- /dev/null +++ b/powerpc-utils-1.3.8-using-od.patch @@ -0,0 +1,39 @@ +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-04-29 11:52:12.557488115 +0200 ++++ powerpc-utils-1.3.8/scripts/hcnmgr 2021-04-29 16:31:07.936124101 +0200 +@@ -167,7 +167,7 @@ search_dev() { + # Look at pci ethernet devices + for pci_dev in "$DT_PATH"/pci*; do + [ -d "$pci_dev" ] || continue +- index=$(xxd -l 4 -p "$pci_dev"/ibm,my-drc-index) ++ index=$(od -tx -An --endian=big -N 4 "$pci_dev"/ibm,my-drc-index | tr -d ' ') + if [[ $index != "$1" ]]; then + continue + fi +@@ -188,7 +188,7 @@ search_dev() { + hcnlog DEBUG "search vnic device with drc_index $1" + for dev in "$DT_PATH"/vdevice/vnic*; do + [ -d "$dev" ] || continue +- index=$(xxd -l 4 -p "$dev"/ibm,my-drc-index) ++ index=$(od -tx -An --endian=big -N 4 "$dev"/ibm,my-drc-index | tr -d ' ') + if [[ $index == "$1" ]]; then + hcnlog DEBUG "found matching drc_index $index in $dev" + if [ -e "$dev"/ibm,hcn-id ] && get_dev_hcn "$dev"; then +@@ -204,7 +204,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=$(xxd -l 4 -p "$dev"/ibm,my-drc-index) ++ index=$(od -tx -An --endian=big -N 4 "$dev"/ibm,my-drc-index | tr -d ' ') + if [[ $index == "$1" ]]; then + hcnlog DEBUG "found matching drc_index $index in $dev" + if [ -e "$dev"/ibm,hcn-id ] && get_dev_hcn "$dev"; then +@@ -232,7 +232,7 @@ get_dev_hcn() { + local dev=$1 + + hcnlog DEBUG "get_dev_hcn: enter $1" +- HCNID=$(xxd -l 4 -p "$dev"/ibm,hcn-id) ++ HCNID=$(od -tx -An --endian=big -N 4 "$dev"/ibm,hcn-id | tr -d ' ') + MODE=$(tr -d '\0' <"$dev"/ibm,hcn-mode) + PHYSLOC=$(tr -d '\0' <"$dev"/ibm,loc-code) + diff --git a/powerpc-utils.spec b/powerpc-utils.spec index 341f9ca..7d2ffc0 100644 --- a/powerpc-utils.spec +++ b/powerpc-utils.spec @@ -1,6 +1,6 @@ Name: powerpc-utils Version: 1.3.8 -Release: 7%{?dist} +Release: 8%{?dist} Summary: PERL-based scripts for maintaining and servicing PowerPC systems License: GPLv2 @@ -37,6 +37,7 @@ Patch10: powerpc-utils-1.3.8-f1ec5f04fdac3e87c3c85c2d85f79339d916e864.pat Patch11: powerpc-utils-1.3.8-4b2d10942e2d964ecc1fe58c9460c34993ff10be.patch Patch12: powerpc-utils-1.3.8-e51995667279164a6c8ce4c3ba0217fffda22d6d.patch Patch13: powerpc-utils-1.3.8-fix_boot-time_bonding_interface_cleanup_and_avoid_use_ifcfg.patch +Patch14: powerpc-utils-1.3.8-using-od.patch %description PERL-based scripts for maintaining and servicing PowerPC systems. @@ -49,19 +50,13 @@ Requires(preun): systemd Requires(postun): systemd Requires: kmod Requires: which -Requires: /usr/bin/awk -Requires: /usr/bin/basename -Requires: /usr/bin/bc -Requires: /usr/bin/cat -Requires: /usr/bin/cut -Requires: /usr/bin/echo -Requires: /usr/bin/find -Requires: /bin/grep -Requires: /usr/bin/head -Requires: /usr/bin/ls -Requires: /usr/bin/sed -Requires: /usr/bin/tr -Requires: /usr/bin/udevadm +Requires: gawk +Requires: bc +Requires: findutils +Requires: grep +Requires: sed +Requires: systemd-udev +Requires: coreutils %description core @@ -210,6 +205,9 @@ systemctl daemon-reload >/dev/null 2>&1 || : %changelog +* Mon May 03 2021 Than Ngo - 1.3.8-8 +- Use od instead xxd + * Mon Feb 08 2021 Than Ngo - 1.3.8-7 - updated hcnmgr manpage