diff -Nru powerpc-utils-1.3.2/debian/changelog powerpc-utils-1.3.2/debian/changelog --- powerpc-utils-1.3.2/debian/changelog 2017-06-19 21:18:01.000000000 +0000 +++ powerpc-utils-1.3.2/debian/changelog 2017-08-24 16:48:27.000000000 +0000 @@ -1,3 +1,12 @@ +powerpc-utils (1.3.2-1ubuntu3) artful; urgency=medium + + * d/p/scripts-Command-substituion-warning.patch: fix bash warning + "command substitution: ignored null byte in input" in ls-veth, + ls-vscsi, lsdevinfo, and ofpathname; fix "cd: too many arguments" + in ofpathname. LP: #1692420. + + -- Tiago Stürmer Daitx Thu, 24 Aug 2017 09:48:27 -0700 + powerpc-utils (1.3.2-1ubuntu2) artful; urgency=medium * d/p/in-kernel-dlpar.patch: fix FTBFS. diff -Nru powerpc-utils-1.3.2/debian/patches/scripts-Command-substituion-warning.patch powerpc-utils-1.3.2/debian/patches/scripts-Command-substituion-warning.patch --- powerpc-utils-1.3.2/debian/patches/scripts-Command-substituion-warning.patch 1970-01-01 00:00:00.000000000 +0000 +++ powerpc-utils-1.3.2/debian/patches/scripts-Command-substituion-warning.patch 2017-08-24 16:48:25.000000000 +0000 @@ -0,0 +1,102 @@ +From 4fcc611a09caea70e6bca6a1275211c72ac4bb45 Mon Sep 17 00:00:00 2001 +From: Seeteena Thoufeek +Date: Wed, 11 Jan 2017 15:36:33 +0530 +Subject: [PATCH] warning: command substitution: ignored null byte in input + device + +Ubuntu 17.04: "command substitution: ignored null byte in input" warning message is displayed while running few RAS commands. + +The command execution of ls-veth, ls-vscsi, lsdevinfo, and ofpathname returns following output. + +lsdevinfo +/usr/sbin/lsdevinfo: line 233: warning: command substitution: ignored null byte in input +device: name="ibmveth2" +ls-vscsi +/usr/sbin/ls-vscsi: line 72: warning: command substitution: ignored null byte in input +host0 U8286.42A.1069B3T-V8-C17-T1 +ls-veth +/usr/sbin/ls-veth: line 74: warning: command substitution: ignored null byte in input +ibmveth2 U8286.42A.1069B3T-V8-C2-T1 +ofpathname sda +/usr/sbin/ofpathname: line 812: warning: command substitution: ignored null byte in input +/usr/sbin/ofpathname: line 865: cd: too many arguments +/vdevice/v-scsi@30000011/disk@8100000000000000 + +Newer versions of bash (Bash 4.4) warn about null bytes in command substitutions. This is fixed. + +Also fixed /usr/sbin/ofpathname: line 865: cd: too many arguments. + +Signed-off-by: Seeteena Thoufeek +Signed-off-by: Tyrel Datwyler +--- + scripts/ls-veth | 2 +- + scripts/ls-vscsi | 2 +- + scripts/lsdevinfo | 4 ++-- + scripts/ofpathname | 5 ++--- + 4 files changed, 6 insertions(+), 7 deletions(-) + mode change 100644 => 100755 scripts/ls-veth + mode change 100644 => 100755 scripts/ls-vscsi + +--- a/scripts/ls-veth ++++ b/scripts/ls-veth +@@ -71,7 +71,7 @@ for dev in $($LS -d /proc/device-tree/vd + name=$($OFPATHNAME -l $(echo $dev | $SED -e "s/\/proc\/device-tree//")) + + # get the physical location +- physloc=$($CAT $dev/ibm,loc-code) ++ physloc=$(tr -d '\0' < $dev/ibm,loc-code) + + echo "$name $physloc" + done +--- a/scripts/ls-vscsi ++++ b/scripts/ls-vscsi +@@ -69,7 +69,7 @@ done + # Look at every ibmvscsi (Virtual SCSI) device + for dev in $($LS -d /proc/device-tree/vdevice/v-scsi* 2> /dev/null) ; do + # pull the physical location +- physloc=$($CAT $dev/ibm,loc-code) ++ physloc=$(tr -d '\0' < $dev/ibm,loc-code) + + # find the slot so it can be used in sysfs + slot=$(echo $dev | $SED -e "s/\/proc\/device-tree\/vdevice\/v-scsi@//") +--- a/scripts/lsdevinfo ++++ b/scripts/lsdevinfo +@@ -230,7 +230,7 @@ for dev in $($LS -d /proc/device-tree/vd + parent="vio" + + # get the physical location +- physloc=$($CAT $dev/ibm,loc-code) ++ physloc=$(tr -d '\0' < $dev/ibm,loc-code) + uniquetype="adapter/vdevice/IBM,l-lan" + class="adapter" + subclass="vdevice" +@@ -272,7 +272,7 @@ done + # Look at every ibmvscsi (Virtual SCSI) device + for dev in $($LS -d /proc/device-tree/vdevice/v-scsi* 2> /dev/null) ; do + # pull the physical location +- physloc=$(cat $dev/ibm,loc-code) ++ physloc=$(tr -d '\0' < $dev/ibm,loc-code) + hostphysloc=$physloc + connection=$(echo $dev | $SED -e "s/\/proc\/device-tree\/vdevice\/v-scsi@//") + +--- a/scripts/ofpathname ++++ b/scripts/ofpathname +@@ -809,7 +809,7 @@ l2of_scsi() + fc=${fc##/*/} + + if [[ -e /proc/device-tree$OF_PATH/device_type ]]; then +- devtype=`$CAT /proc/device-tree$OF_PATH/device_type`; ++ devtype=`tr -d '\0' < /proc/device-tree$OF_PATH/device_type`; + if [[ $devtype = "fcp" || $devtype = "scsi-fcp" ]]; then + fc="fibre-channel"; + fi +@@ -861,8 +861,7 @@ l2of_scsi() + OF_PATH=$(printf "%s/disk@%s,%s" $OF_PATH $wwpn $vfc_lun) + else + local i vdiskno +- cd host* +- cd target* ++ goto_dir $device_path $device_dir + vdiskno=`get_vdisk_no $device_dir` + + OF_PATH=$OF_PATH/disk\@$vdiskno diff -Nru powerpc-utils-1.3.2/debian/patches/series powerpc-utils-1.3.2/debian/patches/series --- powerpc-utils-1.3.2/debian/patches/series 2017-06-19 20:13:58.000000000 +0000 +++ powerpc-utils-1.3.2/debian/patches/series 2017-08-24 16:48:25.000000000 +0000 @@ -5,3 +5,4 @@ drmgr-Stale-errno-usage-corrections.patch drmgr-Correct-errno-usage-use-in-validate_paltform.patch drmgr-Correct-errno-usage-in-init_cpu_info.patch +scripts-Command-substituion-warning.patch