diff options
author | Richard Purdie <richard.purdie@linuxfoundation.org> | 2011-11-08 21:33:53 +0000 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2011-11-10 11:51:18 +0000 |
commit | 5d3860f4a8abb8e95442b04f8b84a333af362fcd (patch) | |
tree | 16e4b98abf972410eef0175aa09ef2dd918e0016 | |
parent | d9740cdcd7d4b19eccae27665d9ce92632d6349a (diff) | |
download | poky-5d3860f4a8abb8e95442b04f8b84a333af362fcd.tar.gz |
Allow use of dash as /bin/sh
We've had the check for dash as /bin/sh for a long time. Dash has been
around long enough now that most major issues have been identified and
fixed from build perspective.
This patch fixes a bashism in the openjade-native recipe. It also
adjusts libtool so that the header at the script is used and not the
value of $SHELL. This is because many Makefiles change $SHELL so dash
can get used to execute what is otherwise configured as a bash shell
script. Since we don't need to execute scripts this way on any system I'm
aware of us building upon, the simplest fix is just to remove $SHELL.
With these two changes the dash check can be removed and we can allow
builds with dash as /bin/sh
(From OE-Core rev: 07ded02ffd37b4fe60a6210dbf56490ea306f0b6)
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
[Note: I know I need to add the description of the libtool change above
into the prefix.patch]
-rw-r--r-- | meta/classes/sanity.bbclass | 3 | ||||
-rw-r--r-- | meta/recipes-devtools/libtool/libtool/prefix.patch | 11 | ||||
-rw-r--r-- | meta/recipes-devtools/openjade/openjade-native_1.3.2.bb | 4 |
3 files changed, 13 insertions, 5 deletions
diff --git a/meta/classes/sanity.bbclass b/meta/classes/sanity.bbclass index 3f42b4f7cd..838448f33c 100644 --- a/meta/classes/sanity.bbclass +++ b/meta/classes/sanity.bbclass | |||
@@ -331,9 +331,6 @@ def check_sanity(e): | |||
331 | if not data.getVar( 'DISPLAY', e.data, True ) and data.getVar( 'IMAGETEST', e.data, True ) == 'qemu': | 331 | if not data.getVar( 'DISPLAY', e.data, True ) and data.getVar( 'IMAGETEST', e.data, True ) == 'qemu': |
332 | messages = messages + 'qemuimagetest needs a X desktop to start qemu, please set DISPLAY correctly (e.g. DISPLAY=:1.0)\n' | 332 | messages = messages + 'qemuimagetest needs a X desktop to start qemu, please set DISPLAY correctly (e.g. DISPLAY=:1.0)\n' |
333 | 333 | ||
334 | if os.path.basename(os.readlink('/bin/sh')) == 'dash': | ||
335 | messages = messages + "Using dash as /bin/sh causes various subtle build problems, please use bash instead (e.g. 'dpkg-reconfigure dash' on an Ubuntu system.\n" | ||
336 | |||
337 | omask = os.umask(022) | 334 | omask = os.umask(022) |
338 | if omask & 0755: | 335 | if omask & 0755: |
339 | messages = messages + "Please use a umask which allows a+rx and u+rwx\n" | 336 | messages = messages + "Please use a umask which allows a+rx and u+rwx\n" |
diff --git a/meta/recipes-devtools/libtool/libtool/prefix.patch b/meta/recipes-devtools/libtool/libtool/prefix.patch index 1b20324715..e6eca1fe02 100644 --- a/meta/recipes-devtools/libtool/libtool/prefix.patch +++ b/meta/recipes-devtools/libtool/libtool/prefix.patch | |||
@@ -8,6 +8,15 @@ Originally by: RP | |||
8 | Updated: Date: 2010/06/28 | 8 | Updated: Date: 2010/06/28 |
9 | Nitin A Kamble <nitin.a.kamble@intel.com> | 9 | Nitin A Kamble <nitin.a.kamble@intel.com> |
10 | 10 | ||
11 | It also adjusts libtool so that the header at the script is used for | ||
12 | script execution and not thevalue of $SHELL. This is because many | ||
13 | Makefiles change $SHELL so dash can get used to execute what is | ||
14 | otherwise configured as a bash shell script. Since we don't need to | ||
15 | execute scipts this way on any system I'm aware of us building upon, | ||
16 | the simplest fix is just to remove $SHELL. | ||
17 | |||
18 | Updated: Date: 2011/11/09 | ||
19 | RP | ||
11 | 20 | ||
12 | Index: libtool-2.4/libltdl/m4/libtool.m4 | 21 | Index: libtool-2.4/libltdl/m4/libtool.m4 |
13 | =================================================================== | 22 | =================================================================== |
@@ -18,7 +27,7 @@ Index: libtool-2.4/libltdl/m4/libtool.m4 | |||
18 | 27 | ||
19 | # Always use our own libtool. | 28 | # Always use our own libtool. |
20 | -LIBTOOL='$(SHELL) $(top_builddir)/libtool' | 29 | -LIBTOOL='$(SHELL) $(top_builddir)/libtool' |
21 | +LIBTOOL='$(SHELL) $(top_builddir)' | 30 | +LIBTOOL='$(top_builddir)' |
22 | +LIBTOOL="$LIBTOOL/${host_alias}-libtool" | 31 | +LIBTOOL="$LIBTOOL/${host_alias}-libtool" |
23 | AC_SUBST(LIBTOOL)dnl | 32 | AC_SUBST(LIBTOOL)dnl |
24 | 33 | ||
diff --git a/meta/recipes-devtools/openjade/openjade-native_1.3.2.bb b/meta/recipes-devtools/openjade/openjade-native_1.3.2.bb index 6cc6bb5d2b..0cce46eca2 100644 --- a/meta/recipes-devtools/openjade/openjade-native_1.3.2.bb +++ b/meta/recipes-devtools/openjade/openjade-native_1.3.2.bb | |||
@@ -53,7 +53,9 @@ do_install() { | |||
53 | 53 | ||
54 | install -d ${D}${datadir}/sgml/openjade-${PV} | 54 | install -d ${D}${datadir}/sgml/openjade-${PV} |
55 | install -m 644 dsssl/catalog ${D}${datadir}/sgml/openjade-${PV} | 55 | install -m 644 dsssl/catalog ${D}${datadir}/sgml/openjade-${PV} |
56 | install -m 644 dsssl/*.{dtd,dsl,sgm} ${D}${datadir}/sgml/openjade-${PV} | 56 | install -m 644 dsssl/*.dtd ${D}${datadir}/sgml/openjade-${PV} |
57 | install -m 644 dsssl/*.dsl ${D}${datadir}/sgml/openjade-${PV} | ||
58 | install -m 644 dsssl/*.sgm ${D}${datadir}/sgml/openjade-${PV} | ||
57 | 59 | ||
58 | install -d ${datadir}/sgml/openjade-${PV} | 60 | install -d ${datadir}/sgml/openjade-${PV} |
59 | install -m 644 dsssl/catalog ${datadir}/sgml/openjade-${PV}/catalog | 61 | install -m 644 dsssl/catalog ${datadir}/sgml/openjade-${PV}/catalog |