Package: powerpc-ibm-utils
Version: 1.1.0-1
Severity: normal
Tags: patch
User: ubuntu-de...@lists.ubuntu.com
Usertags: origin-ubuntu ubuntu-patch natty

'debuild -S' fails on powerpc-ibm-utils when /bin/sh is bash, with a
slew of errors like this:

[ ! -f Makefile ] || /usr/bin/make clean
/bin/sh: [[: not found
grep: /powerpc-utils.spec: No such file or directory
/bin/sh: [[: not found
grep: /powerpc-utils.spec: No such file or directory
/bin/sh: [[: not found
grep: /powerpc-utils.spec: No such file or directory
/bin/sh: [[: not found

The following patch fixes this.  (There are other bashisms in the
package, but they're in shell scripts that are #! /bin/bash, so that's
OK.)

  * Fix source package build when /bin/sh is bash.

=== added file 'debian/patches/bashisms.diff'
--- debian/patches/bashisms.diff        1970-01-01 00:00:00 +0000
+++ debian/patches/bashisms.diff        2011-02-09 00:44:55 +0000
@@ -0,0 +1,34 @@
+Index: b/rules.mk
+===================================================================
+--- a/rules.mk
++++ b/rules.mk
+@@ -13,9 +13,9 @@
+ # resolves the root directory at which this build is occuring
+ ROOT_DIR =                                              \
+         $(shell                                         \
+-        while [[ `pwd` != "/" ]];                       \
++        while [ `pwd` != "/" ];                         \
+         do                                              \
+-                if [[ -f `pwd`/$(SPECFILENAME) ]];      \
++                if [ -f `pwd`/$(SPECFILENAME) ];        \
+                 then                                    \
+                         echo `pwd`;                     \
+                         break;                          \
+@@ -29,13 +29,13 @@
+ # Find the correct command to build RPM's
+ RPM =                                                 \
+       $(shell                                         \
+-      if [[ -a /bin/rpmbuild ]]; then                 \
++      if [ -a /bin/rpmbuild ]; then                   \
+               echo "/bin/rpmbuild";                   \
+-      elif [[ -a /usr/bin/rpmbuild ]]; then           \
++      elif [ -a /usr/bin/rpmbuild ]; then             \
+               echo "/usr/bin/rpmbuild";               \
+-      elif [[ -a /bin/rpm ]]; then                    \
++      elif [ -a /bin/rpm ]; then                      \
+               echo "/bin/rpm";                        \
+-      elif [[ -a /usr/bin/rpm ]]; then                \
++      elif [ -a /usr/bin/rpm ]; then                  \
+               echo "/usr/bin/rpm";                    \
+       else                                            \
+               echo "rpm seems to be non-existant";    \

=== modified file 'debian/patches/series'
--- debian/patches/series       2008-02-05 15:40:05 +0000
+++ debian/patches/series       2011-02-09 00:45:43 +0000
@@ -1 +1,2 @@
 debian_build_process.diff
+bashisms.diff

Thanks,

-- 
Colin Watson                                       [cjwat...@ubuntu.com]



-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org

Reply via email to