Package: powerpc-utils
Version: 1.3.1-2
Severity: normal
Tags: patch
User: ubuntu-de...@lists.ubuntu.com
Usertags: origin-ubuntu yakkety ubuntu-patch

Hi Adam,

A bug report has been submitted against powerpc-utils in Ubuntu, that
update_flash_nv contains a bashism, causing wrong behavior when /bin/sh is
dash.

Attached is a straightforward patch for this issue.

Thanks,
-- 
Steve Langasek                   Give me a lever long enough and a Free OS
Debian Developer                   to set it on, and I can move the world.
Ubuntu Developer                                    http://www.debian.org/
slanga...@ubuntu.com                                     vor...@debian.org
diff -Nru powerpc-utils-1.3.1/debian/patches/bashisms.patch powerpc-utils-1.3.1/debian/patches/bashisms.patch
--- powerpc-utils-1.3.1/debian/patches/bashisms.patch	1969-12-31 16:00:00.000000000 -0800
+++ powerpc-utils-1.3.1/debian/patches/bashisms.patch	2016-07-05 15:51:53.000000000 -0700
@@ -0,0 +1,18 @@
+Author: Steve Langasek <steve.langa...@ubuntu.com>
+Description: Fix bashism in update_flash_nv
+ update_flash_nv uses a == operator, which is a bashism.  Replace with =.
+Bug-Ubuntu: https://bugs.launchpad.net/bugs/1599191
+
+Index: powerpc-utils-1.3.1/scripts/update_flash_nv
+===================================================================
+--- powerpc-utils-1.3.1.orig/scripts/update_flash_nv
++++ powerpc-utils-1.3.1/scripts/update_flash_nv
+@@ -592,7 +592,7 @@
+ 
+ 	echo
+ 	id=`ipmitool -I usb fru 2>/dev/null |grep "System Firmware" | cut -d " " -f8 | cut -d ")" -f1`
+-	if [ "x$id" == "x" ]; then
++	if [ "x$id" = "x" ]; then
+ 		error $E_IPMI "Failed to get firmware version."
+ 	fi
+ 
diff -Nru powerpc-utils-1.3.1/debian/patches/series powerpc-utils-1.3.1/debian/patches/series
--- powerpc-utils-1.3.1/debian/patches/series	2016-04-10 23:22:12.000000000 -0700
+++ powerpc-utils-1.3.1/debian/patches/series	2016-07-05 15:50:34.000000000 -0700
@@ -1,2 +1,3 @@
 01_ipmitool_check.patch
 02_systool_check.patch
+bashisms.patch

Reply via email to