diff --git a/0001-ofpathname-Use-NVMe-controller-physical-nsid.patch b/0001-ofpathname-Use-NVMe-controller-physical-nsid.patch new file mode 100644 index 0000000..abbe273 --- /dev/null +++ b/0001-ofpathname-Use-NVMe-controller-physical-nsid.patch @@ -0,0 +1,78 @@ +From 21c860888425762468d339950518ab8b0940ecea Mon Sep 17 00:00:00 2001 +From: Tyrel Datwyler +Date: Mon, 5 Oct 2020 13:03:45 -0700 +Subject: [PATCH] ofpathname: Use NVMe controller physical nsid + +Linux creates logical block devices of the the form nvmeXnYpZ such that X = the +controller, Y = namepsace, and Z = partition. For example: + +/dev/nvme0n1p1 + +The Linux namespace numbering scheme for namespaces always starts at 1 and +increases monotonically regardless of the actual numbering scheme of the +namespaces as seen by the physical NVMe controller. Accordingly, the Open +firmware path binding utilizes the namespace id as seen by the controller and +not the necessarily the one given in the logical block device name. + +As such we need to use the "nsid" attribute in the sysfs entry for the logical +device to properly map back and forth from OP pathnames. + +Signed-off-by: Tyrel Datwyler +--- + scripts/ofpathname | 24 ++++++++++++++++-------- + 1 file changed, 16 insertions(+), 8 deletions(-) + +diff --git a/scripts/ofpathname b/scripts/ofpathname +index 2ceae25..41b8c5c 100755 +--- a/scripts/ofpathname ++++ b/scripts/ofpathname +@@ -659,6 +659,11 @@ l2of_nvme() + devspec=`$CAT $PWD/device/devspec | tr -d '\000'` + if [[ -n $devspec ]]; then + found=1 ++ if [[ -n $devnsid ]]; then ++ # Linux logical nsid might not match nvme controller nsid ++ goto_dir $dir "nsid" ++ devnsid=`$CAT $PWD/nsid | tr -d '\000'` ++ fi + break + fi + done +@@ -1609,16 +1614,9 @@ of2l_nvme() + local dir + local link + +- for dir in `$FIND /sys/block -name "nvme*n$nsid"`; do ++ for dir in `$FIND /sys/class/nvme -name "nvme[0-9]*"`; do + cd $dir + +- link=`get_link "device"` # points to nvme[0-9]+ (non-namespace) +- if [[ -n $link ]]; then +- cd $link +- else +- continue +- fi +- + link=`get_link "device"` # points to pci address dir + if [[ -n $link ]]; then + cd $link +@@ -1635,6 +1633,16 @@ of2l_nvme() + fi + done + ++ for dir in `$FIND /sys/block -name "${LOGICAL_DEVNAME}n[0-9]*"`; do ++ cd $dir ++ ++ local devnsid=`$CAT ./nsid 2>/dev/null` ++ if [[ $devnsid = $nsid ]]; then ++ LOGICAL_DEVNAME="${dir##*/}" ++ break ++ fi ++ done ++ + if [[ -n $LOGICAL_DEVNAME ]] \ + && [[ -n $part ]]; then + +-- +1.8.3.1 + diff --git a/0002-sys_ident--skip-length-field-from-search.patch b/0002-sys_ident--skip-length-field-from-search.patch new file mode 100644 index 0000000..e8e6ec8 --- /dev/null +++ b/0002-sys_ident--skip-length-field-from-search.patch @@ -0,0 +1,13 @@ +diff -up powerpc-utils-1.3.8/src/sys_ident.c.me powerpc-utils-1.3.8/src/sys_ident.c +--- powerpc-utils-1.3.8/src/sys_ident.c.me 2020-10-06 15:35:56.620350621 +0200 ++++ powerpc-utils-1.3.8/src/sys_ident.c 2020-10-06 15:36:31.468849936 +0200 +@@ -267,7 +267,8 @@ print_proc_sn_value(void) + "parameter from RTAS\n"); + return 2; + } +- pos = strstr(buf, "uid="); ++ /* Ignore length field (first 2 bytes) */ ++ pos = strstr(buf +2, "uid="); + if (pos == NULL) { + fprintf(stderr, "Parameter from RTAS does " + "not contain uid\n"); diff --git a/powerpc-utils-1.3.8-4b2d10942e2d964ecc1fe58c9460c34993ff10be.patch b/powerpc-utils-1.3.8-4b2d10942e2d964ecc1fe58c9460c34993ff10be.patch new file mode 100644 index 0000000..a3a828f --- /dev/null +++ b/powerpc-utils-1.3.8-4b2d10942e2d964ecc1fe58c9460c34993ff10be.patch @@ -0,0 +1,162 @@ +commit 4b2d10942e2d964ecc1fe58c9460c34993ff10be +Author: Mingming Cao +Date: Thu Nov 19 21:38:24 2020 -0800 + + Disable vnic as backup vdevice for migratable SR_IOV + + In version 1.0 we only allow configure ibmveth as + migritable SR_IOV backup vdevice. When ibmvnic become + more stablized we will enable vnic as backup. + + Signed-off-by: Mingming Cao + Signed-off-by: Tyrel Datwyler + +diff --git a/scripts/hcnmgr b/scripts/hcnmgr +index 1135a85..0c09d8c 100644 +--- a/scripts/hcnmgr ++++ b/scripts/hcnmgr +@@ -37,6 +37,8 @@ DRC_INDEX=0 + DEVNAME="" + MODE="" + PHYSLOC="" ++VIO_TYPE="" ++VNIC_SPT="" + + # Usage statements + usage() { +@@ -80,6 +82,7 @@ E_EPERM=1 # Platform not supported + E_BUSY=16 # Device busy + E_ENODEV=19 # Failed get device name + E_NOMODULE=5 # Failed to load bonding module ++E_INVAL_DEV=6 # Vdevice not supported + E_ENETUNREACH=101 # No network management command nmcli + + # +@@ -93,19 +96,22 @@ err() { + + case $eno in + "$E_INVAL") +- e_mesg="$HCNCMD:error code $eno, hybrid network ID HCNID does not exist" ++ e_mesg="$HCNCMD:error code $eno, Hybrid network ID HCNID does not exist" ++ ;; ++ "$E_INVAL_DEV") ++ e_mesg="$HCNCMD:error code $eno, Backing vdevice not supported" + ;; + "$E_EPERM") +- e_mesg="$HCNCMD:error code $eno, platform is not supported" ++ e_mesg="$HCNCMD:error code $eno, Platform is not supported" + ;; + "$E_BUSY") +- e_mesg="$HCNCMD:error code $eno, network device busy, no backup device" ++ e_mesg="$HCNCMD:error code $eno, Network device busy, no backup device" + ;; + "$E_ENODEV") +- e_mesg="$HCNCMD:error code $eno, failed to find device or get device name" ++ e_mesg="$HCNCMD:error code $eno, Failed to find device or get device name" + ;; + "$E_NOMODULE") +- e_mesg="$HCNCMD:error code $eno, failed to load bonding module" ++ e_mesg="$HCNCMD:error code $eno, Failed to load bonding module" + ;; + "$E_ENETUNREACH") + e_mesg="$HCNCMD:error code $eno, nmcli command not installed" +@@ -147,6 +153,7 @@ hcnlog() { + esac + + } ++ + # function search_dev: + # Given DRX_INDEX, Search for device-tree, looking for migratable SR_IOV + # backend vnic or ibmveth device to configure hybrid network +@@ -171,6 +178,7 @@ search_dev() { + if [ -e "$dev"/ibm,hcn-id ] && get_dev_hcn "$dev"; then + hcnlog DEBUG "search_dev: found device " + hcnlog DEBUG "search_dev: exit" ++ VIO_TYPE="SRIOV" + return $E_SUCCESS + fi + done +@@ -184,6 +192,7 @@ search_dev() { + if [[ $index == "$1" ]]; then + hcnlog DEBUG "found matching drc_index $index in $dev" + if [ -e "$dev"/ibm,hcn-id ] && get_dev_hcn "$dev"; then ++ VIO_TYPE="VNIC" + hcnlog DEBUG "search_dev: found device " + hcnlog DEBUG "search_dev: exit" + return $E_SUCCESS +@@ -201,6 +210,7 @@ search_dev() { + if [ -e "$dev"/ibm,hcn-id ] && get_dev_hcn "$dev"; then + hcnlog DEBUG "search_dev: found device " + hcnlog DEBUG "search_dev: exit" ++ VIO_TYPE="L_LAN" + return $E_SUCCESS + fi + fi +@@ -340,6 +350,10 @@ do_config_vdevice() { + cfghcn() { + hcnlog DEBUG "cfghcn: enter $1" + search_dev "$1" ++ if [[ $VIO_TYPE == "VNIC" && $VNIC_SPT == "OFF" ]]; then ++ hcnlog WARN "Backing device $VIO_TYPE for Migratable VF is not supported in hcnmgr version $VERSION" ++ err $E_INVAL_DEV ++ fi + do_config_vdevice + return $E_SUCCESS + } +@@ -512,23 +526,10 @@ scanhcn() { + done + done + +- hcnlog DEBUG "search vnic device with ibm,hcn-id propterty......" ++ hcnlog DEBUG "search ibmveth device with ibm,hcn-id propterty......" + # Look at every vNIC device with ibm,hcn-id propterty + # join or create bond for this hcnid if not exist, add vnic device as + # slave for this bond accosiated with hcnid, if not already to +- for dev in "$DT_PATH"/vdevice/vnic*; do +- [ -d "$dev" ] || continue +- if [ -e "$dev"/ibm,hcn-id ] && get_dev_hcn "$dev"; then +- hcnlog DEBUG "scanhcn found vnic device with hcnid " +- hcnlog INFO "scanhcn configure HCN and vnic device" +- do_config_vdevice +- fi +- done +- +- # Look at every veth device with ibm,hcn-id propterty +- # join or create bond for this hcnid if not exist, add ibmveth device as +- # slave for this bond accosiated with hcnid, if not already to +- hcnlog DEBUG "search ibmveth device with ibm,hcn-id propterty......" + for dev in "$DT_PATH"/vdevice/l-lan*; do + [ -d "$dev" ] || continue + if [ -e "$dev"/ibm,hcn-id ] && get_dev_hcn "$dev"; then +@@ -538,6 +539,21 @@ scanhcn() { + fi + done + ++ if [[ $VNIC_SPT != "OFF" ]]; then ++ hcnlog DEBUG "search vnic device with ibm,hcn-id propterty......" ++ # Look at every vNIC device with ibm,hcn-id propterty ++ # join or create bond for this hcnid if not exist, add vnic device as ++ # slave for this bond accosiated with hcnid, if not already to ++ for dev in "$DT_PATH"/vdevice/vnic*; do ++ [ -d "$dev" ] || continue ++ if [ -e "$dev"/ibm,hcn-id ] && get_dev_hcn "$dev"; then ++ hcnlog DEBUG "scanhcn found vnic device with hcnid " ++ hcnlog INFO "scanhcn configure HCN and vnic device" ++ do_config_vdevice ++ fi ++ done ++ fi ++ + # Next clean up dead connections left from orgitinal LPAR after inactive miration + + # list of all HCN ids +@@ -583,6 +599,9 @@ fi + if ! nmcli --version >/dev/null 2>&1; then + err $E_ENETUNREACH + fi ++if [[ $VERSION == "1.0" ]]; then ++ VNIC_SPT="OFF" ++fi + + #Validate bonding module is loaded + if ! lsmod | grep -q bonding; then diff --git a/powerpc-utils-1.3.8-e51995667279164a6c8ce4c3ba0217fffda22d6d.patch b/powerpc-utils-1.3.8-e51995667279164a6c8ce4c3ba0217fffda22d6d.patch new file mode 100644 index 0000000..e70a880 --- /dev/null +++ b/powerpc-utils-1.3.8-e51995667279164a6c8ce4c3ba0217fffda22d6d.patch @@ -0,0 +1,86 @@ +commit e51995667279164a6c8ce4c3ba0217fffda22d6d +Author: Mingming Cao +Date: Thu Nov 19 21:41:31 2020 -0800 + + Clean up dead network config interface after inactive migration + + With inactive parition migration, we found there are + dead network interface asscoiated with the SR_IOV from + source LPAR that still exist. + + We need to cleanup the old network interface + related to this devname from source LPAR. Normally + in the active parition migration case, this was done + when HMC issue commands to OS remove the + VF from hybrid network. Because of the inactive + migration, the OS was not notified before migration + that the VF was removed, thus leaves the dead network + interface belongs on the original MVF on source lpar + not cleaned up. This cause the confusion of the network + manager to bring up the bondings with new MVFs at destination + LPAR. + + After inactive parition migration the same devname + could possiblily used at the destination LPAR. + It can be assigned to a different hybrid + network (different hcnid). At the OS boot time, + the same devname but with different hcnid will + be configured. However the old network work interface + associated with the same devname from the source LPAR + has not been cleaned up yet. + + This patch fix this by during the boot time scan and + if found an VFs has more than two bonding interfaces, + or has old VF ifcfg, removed the expired one. + + Signed-off-by: Mingming Cao + Signed-off-by: Tyrel Datwyler + +diff --git a/scripts/hcnmgr b/scripts/hcnmgr +index 0c09d8c..a76505e 100644 +--- a/scripts/hcnmgr ++++ b/scripts/hcnmgr +@@ -518,6 +518,27 @@ scanhcn() { + [ -d "$dev" ] || continue + if [ -e "$dev"/ibm,hcn-id ] && get_dev_hcn "$dev"; then + hcnlog DEBUG "scanhcn found sr-iov device with hcnid " ++ ++ # After online from inactive migration, destination ++ # LPAR may have same mvf devname but associated with different ++ # bonding than from source LPAR ++ # clean up expired bonding SR_IOV connections ++ ++ for cfg in $(ls $IFCONFIG_PATH | grep "$DEVNAME" | grep "bond"); do ++ hid=$(echo "$cfg" | sed -e 's/ifcfg-//' | cut -d '-' -f 1 | sed -e 's/bond//') ++ if [ -e "$IFCONFIG_PATH/ifcfg-$DEVNAME" ]; then ++ rm "$IFCONFIG_PATH/ifcfg-$DEVNAME" ++ fi ++ if [[ $hid != "" && $hid != "$HCNID" ]] ; then ++ hcnlog INFO "Delete dead bonding slave ifcfg file $IFCONFIG_PATH/$cfg" ++ rm $IFCONFIG_PATH/"$cfg" ++ if nmcli -f NAME con show | grep -q "bond$hid-$DEVNAME\s"; then ++ hcnlog INFO "Delete dead bonding connection $connection" ++ nmcli con delete "bond$hid-$DEVNAME" ++ fi ++ fi ++ done ++ + hcnlog INFO "scanhcn configure HCN and sr-iov device" + do_config_vdevice + # Save found HCN ids in array HcnIds +@@ -558,13 +579,12 @@ scanhcn() { + + # list of all HCN ids + ids="${HcnIds[*]}" +- + # After inactive migration, LPAR may have old bonding connections + # with network device on original LPAR +- # clean up dead bonding connections ++ # clean up dead bonding connections + for connection in $(nmcli -f NAME con show | grep "${ids// /\\|}"); do + dev=$(echo "$connection" | cut -d '-' -f 2) +- if [ ! -e /sys/class/net/"$dev" ]; then ++ if [[ $dev != "NAME" && ! -e /sys/class/net/"$dev" ]]; then + hcnlog INFO "Delete dead bonding connection $connection" + nmcli con delete "$connection" + fi diff --git a/powerpc-utils-1.3.8-f1ec5f04fdac3e87c3c85c2d85f79339d916e864.patch b/powerpc-utils-1.3.8-f1ec5f04fdac3e87c3c85c2d85f79339d916e864.patch new file mode 100644 index 0000000..483be5d --- /dev/null +++ b/powerpc-utils-1.3.8-f1ec5f04fdac3e87c3c85c2d85f79339d916e864.patch @@ -0,0 +1,94 @@ +commit f1ec5f04fdac3e87c3c85c2d85f79339d916e864 +Author: Mingming Cao +Date: Thu Nov 19 21:30:40 2020 -0800 + + HNV fixes for qrydev and remove lsdevinfo + + This patch fixes a few issues found during testing: + + 1) Fix qrydev checking for active interface error + + 2) Skip collecting lsdevinfo right before migration + When the LPARs has large number of devices, this can + take quite a long time and flood the log message. + + 3) Wait for OS ready to lookup device name for configure + HNV device. We need give OS longer time to prepare pci + device after DLPAR to show up for ofpathname(). We have + run into several issues HNV issues the hcncfgdrc command + to configure the vdevices before ofpathname able + to find the device name yet. + + 4) Currently the hybrid network virtualization is only + supported on PowerVM LPAR. We should allow exit the hcnmgr + gracefully on other power platform instead of return error. + + Signed-off-by: Mingming Cao + Signed-off-by: Tyrel Datwyler + +diff --git a/scripts/hcnmgr b/scripts/hcnmgr +index e699c6a..1135a85 100644 +--- a/scripts/hcnmgr ++++ b/scripts/hcnmgr +@@ -218,7 +218,7 @@ search_dev() { + # $1 path to device-tree device + # + get_dev_hcn() { +- local wait=30 ++ local wait=12 + local dev=$1 + + hcnlog DEBUG "get_dev_hcn: enter $1" +@@ -235,7 +235,7 @@ get_dev_hcn() { + fi + + hcnlog DEBUG "ofpathname return $?, devname is $DEVNAME rety counter $wait" +- sleep 1 ++ sleep 15 + + ((wait--)) + if [[ $wait == 0 ]]; then +@@ -393,7 +393,7 @@ qrydev() { + BOND_PATH=$BOND_BASEPATH/$BONDNAME/bonding + + hcnlog DEBUG "check if the network interface for this SR_IOV is not up, return success" +- if ! nmcli -f DEVICE con show --active | grep -q "$BONDNAME-$DEVNAME"; then ++ if ! nmcli -f DEVICE con show --active | grep -q "$DEVNAME"; then + hcnlog DEBUG "network connection $BONDNAME-$DEVNAME is inactive or nonexist" + hcnlog DEBUG "HCNID $HCNID devname $DEVNAME mode $MODE physloc $PHYSLOC" + hcnlog DEBUG "qryhcn: exit" +@@ -435,7 +435,6 @@ show_hcnstatus() { + nmcli connection show >>$LOG_FILE + nmcli device status >>$LOG_FILE + ip addr show >>$LOG_FILE +- lsdevinfo >>$LOG_FILE + } + + # +@@ -569,10 +568,15 @@ exec &> >(tee -a $LOG_FILE) + NOW=$(date +"%m-%d-%Y %T") + echo "=======================$NOW============================" + ++HCNCMD=$(basename "$0") ++hcnlog DEBUG "$HCNCMD enter" ++ + #Validate this tool is running on powerpc platform + . "$PSERIES_PLATFORM" + if [ "$platform" != "$PLATFORM_PSERIES_LPAR" ]; then +- err $E_EPERM ++ hcnlog INFO "HNV is only supported on PowerVM LPAR" ++ hcnlog INFO "$HCNCMD exit" ++ exit 0 + fi + + #Validate NMCLI packages is install to manage networking +@@ -588,9 +592,6 @@ if ! lsmod | grep -q bonding; then + fi + fi + +-HCNCMD=$(basename "$0") +-hcnlog DEBUG "$HCNCMD enter" +- + #getops for help and version + while getopts "sVhd:" arg; do + case "$arg" in diff --git a/powerpc-utils-1.3.8-hcnmgr.patch b/powerpc-utils-1.3.8-hcnmgr.patch index dee3058..912bd43 100644 --- a/powerpc-utils-1.3.8-hcnmgr.patch +++ b/powerpc-utils-1.3.8-hcnmgr.patch @@ -37,85 +37,6 @@ diff -up powerpc-utils-1.3.8/man/hcnmgr.8.me powerpc-utils-1.3.8/man/hcnmgr.8 +.B +\fB-h\fP +Display this help information and exit -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 2020-10-01 13:03:10.839439027 +0200 -+++ powerpc-utils-1.3.8/scripts/hcnmgr 2020-10-01 13:06:18.479509944 +0200 -@@ -1,4 +1,4 @@ --#! /bin/bash -+#!/usr/bin/bash - - # Copyright (c) 2020 International Business Machines - # -@@ -562,34 +562,7 @@ scanhcn() { - # Main - # - --#All echo messages goes into $LOG_FILE --exec &> >(tee -a $LOG_FILE) -- --#Start debug log $LOG_FILE with date and time --NOW=$(date +"%m-%d-%Y %T") --echo "=======================$NOW============================" -- --#Validate this tool is running on powerpc platform --. "$PSERIES_PLATFORM" --if [ "$platform" != "$PLATFORM_PSERIES_LPAR" ]; then -- err $E_EPERM --fi -- --#Validate NMCLI packages is install to manage networking --if ! nmcli --version >/dev/null 2>&1; then -- err $E_ENETUNREACH --fi -- --#Validate bonding module is loaded --if ! lsmod | grep -q bonding; then -- hcnlog DEBUG "HCNMGR: Bonding module not loaded, load module ..." -- if ! modprobe bonding; then -- err $E_NOMODULE -- fi --fi -- - HCNCMD=$(basename "$0") --hcnlog DEBUG "$HCNCMD enter" - - #getops for help and version - while getopts "sVhd:" arg; do -@@ -616,6 +589,34 @@ while getopts "sVhd:" arg; do - esac - done - -+#All echo messages goes into $LOG_FILE -+exec &> >(tee -a $LOG_FILE) -+ -+hcnlog DEBUG "$HCNCMD enter" -+ -+#Start debug log $LOG_FILE with date and time -+NOW=$(date +"%m-%d-%Y %T") -+echo "=======================$NOW============================" -+ -+#Validate this tool is running on powerpc platform -+. "$PSERIES_PLATFORM" -+if [ "$platform" != "$PLATFORM_PSERIES_LPAR" ]; then -+ err $E_EPERM -+fi -+ -+#Validate NMCLI packages is install to manage networking -+if ! nmcli --version >/dev/null 2>&1; then -+ err $E_ENETUNREACH -+fi -+ -+#Validate bonding module is loaded -+if ! lsmod | grep -q bonding; then -+ hcnlog DEBUG "HCNMGR: Bonding module not loaded, load module ..." -+ if ! modprobe bonding; then -+ err $E_NOMODULE -+ fi -+fi -+ - #Log this scripts command line to syslog - hcnlog INFO "$HCNCMD $*" - diff -up powerpc-utils-1.3.8/Makefile.am.me powerpc-utils-1.3.8/Makefile.am --- powerpc-utils-1.3.8/Makefile.am.me 2020-10-01 13:33:29.444024403 +0200 +++ powerpc-utils-1.3.8/Makefile.am 2020-10-01 13:34:08.284854506 +0200 @@ -129,4 +50,3 @@ diff -up powerpc-utils-1.3.8/Makefile.am.me powerpc-utils-1.3.8/Makefile.am EXTRA_DIST += $(bin_SCRIPTS) $(sbin_SCRIPTS) $(man_MANS) -diff -up powerpc-utils-1.3.8/Makefile.in.me powerpc-utils-1.3.8/Makefile.in diff --git a/powerpc-utils.spec b/powerpc-utils.spec index 346b3d5..1e4368d 100644 --- a/powerpc-utils.spec +++ b/powerpc-utils.spec @@ -1,7 +1,7 @@ Name: powerpc-utils Version: 1.3.8 -Release: 3%{?dist} -Summary: Utilities for PowerPC platforms +Release: 4%{?dist} +Summary: PERL-based scripts for maintaining and servicing PowerPC systems License: GPLv2 URL: https://github.com/ibm-power-utilities/powerpc-utils @@ -20,16 +20,9 @@ BuildRequires: libservicelog-devel >= 1.0.1-2 BuildRequires: perl-generators BuildRequires: systemd -Requires: which # rtas_dump explicit dependency Requires: perl(Data::Dumper) Requires: %{name}-core = %{version}-%{release} -Requires: systemd -Requires: kmod -Requires: which -Requires(post): systemd -Requires(preun): systemd -Requires(postun): systemd Patch1: powerpc-utils-1.3.8-man.patch Patch2: powerpc-utils-1.3.8-makefile.patch @@ -38,14 +31,23 @@ Patch4: powerpc-utils-1.3.5-update_flash_nv.patch Patch5: powerpc-utils-1.3.8-install-man.patch Patch6: powerpc-utils-manpage-lparstat.patch Patch7: powerpc-utils-1.3.8-hcnmgr.patch +Patch8: 0001-ofpathname-Use-NVMe-controller-physical-nsid.patch +Patch9: 0002-sys_ident--skip-length-field-from-search.patch +Patch10: powerpc-utils-1.3.8-f1ec5f04fdac3e87c3c85c2d85f79339d916e864.patch +Patch11: powerpc-utils-1.3.8-4b2d10942e2d964ecc1fe58c9460c34993ff10be.patch +Patch12: powerpc-utils-1.3.8-e51995667279164a6c8ce4c3ba0217fffda22d6d.patch %description -Utilities for PowerPC platforms. +PERL-based scripts for maintaining and servicing PowerPC systems. %package core -Summary: Core utilities for PowerPC platforms - +Summary: Core utilities for maintaining and servicing PowerPC systems +Requires(post): systemd +Requires(preun): systemd +Requires(postun): systemd +Requires: kmod +Requires: which Requires: /usr/bin/awk Requires: /usr/bin/basename Requires: /usr/bin/bc @@ -62,7 +64,7 @@ Requires: /usr/bin/udevadm %description core -Utilities needed when installing Fedora on PowerPC systems. +Core utilities for maintaining and servicing PowerPC systems. %prep @@ -100,7 +102,7 @@ ln -s serv_config.8 %{buildroot}%{_mandir}/man8/uspchrp.8 # deprecated, use sosreport instead rm -f $RPM_BUILD_ROOT%{_sbindir}/snap $RPM_BUILD_ROOT%{_mandir}/man8/snap.8* -%post +%post core systemctl daemon-reload >/dev/null 2>&1 || : systemctl start hcn-init.service >/dev/null 2>&1 || : systemctl enable hcn-init.service >/dev/null 2>&1 || : @@ -108,7 +110,7 @@ systemctl enable hcn-init.service >/dev/null 2>&1 || : /usr/sbin/smtstate --save >/dev/null 2>&1 || : -%preun +%preun core svc=$(systemctl list-units -la | grep -Fq smtstate.service; echo $?) if [ "$svc" = "0" ]; then systemctl stop smtstate.service >/dev/null 2>&1 || : @@ -119,22 +121,28 @@ if systemctl is-enabled hcn-init.service |grep -q "enabled"; then systemctl disable hcn-init.service >/dev/null 2>&1 || : fi -%postun +%postun core systemctl daemon-reload >/dev/null 2>&1 || : %files +# PERL-based scripts for maintaining and servicing PowerPC systems %doc README Changelog +%{_sbindir}/hvcsadmin +%{_sbindir}/rtas_dump +%{_mandir}/man8/hvcsadmin.8* +%{_mandir}/man8/rtas_dump.8* + +%files core +%license COPYING %dir /var/lib/powerpc-utils /var/lib/powerpc-utils/smt.state %{_unitdir}/smtstate.service %{_unitdir}/smt_off.service %{_unitdir}/hcn-init.service - %{_bindir}/amsstat %{_sbindir}/activate_firmware %{_sbindir}/bootlist %{_sbindir}/errinjct -%{_sbindir}/hvcsadmin %{_sbindir}/lparstat %{_sbindir}/lsdevinfo %{_sbindir}/lsprop @@ -145,7 +153,6 @@ systemctl daemon-reload >/dev/null 2>&1 || : %{_sbindir}/nvsetenv %{_sbindir}/ppc64_cpu %{_sbindir}/rtas_dbg -%{_sbindir}/rtas_dump %{_sbindir}/rtas_event_decode %{_sbindir}/rtas_ibm_get_vpd %{_sbindir}/serv_config @@ -163,13 +170,15 @@ systemctl daemon-reload >/dev/null 2>&1 || : %{_sbindir}/hcnversion %{_sbindir}/vcpustat %{_sbindir}/smtstate - +%{_sbindir}/nvram +%{_sbindir}/ofpathname +%{_sbindir}/pseries_platform +%{_sbindir}/drmgr %{_mandir}/man1/amsstat.1* %{_mandir}/man5/lparcfg.5* %{_mandir}/man8/activate_firmware.8* %{_mandir}/man8/bootlist.8* %{_mandir}/man8/errinjct.8* -%{_mandir}/man8/hvcsadmin.8* %{_mandir}/man8/lparstat.8* %{_mandir}/man8/lsdevinfo.8* %{_mandir}/man8/lsprop.8* @@ -180,7 +189,6 @@ systemctl daemon-reload >/dev/null 2>&1 || : %{_mandir}/man8/nvsetenv.8* %{_mandir}/man8/ppc64_cpu.8* %{_mandir}/man8/rtas_dbg.8* -%{_mandir}/man8/rtas_dump.8* %{_mandir}/man8/rtas_event_decode.8* %{_mandir}/man8/rtas_ibm_get_vpd.8* %{_mandir}/man8/serv_config.8* @@ -194,21 +202,19 @@ systemctl daemon-reload >/dev/null 2>&1 || : %{_mandir}/man8/vcpustat.8.gz %{_mandir}/man8/smtstate.8.gz %{_mandir}/man8/hcnmgr.8* - -%files core -%license COPYING - -%{_sbindir}/nvram -%{_sbindir}/ofpathname -%{_sbindir}/pseries_platform -%{_sbindir}/drmgr - %{_mandir}/man8/nvram.8* %{_mandir}/man8/ofpathname.8* %{_mandir}/man8/drmgr.8* %changelog +* Tue Dec 22 2020 Than Ngo - 1.3.8-4 +- additional patches to support Linux Hybrid Network Virtualization +- move commands that dont depend on perl to core subpackage +- update hcnmgr patch +- sys_ident: Skip length field from search +- ofpathname: Use NVMe controller physical nsid + * Thu Oct 01 2020 Than Ngo - 1.3.8-3 - add hcnmgr man page