[oe-commits] Chen Qi : bash: explicitly define NON_INTERACTIVE_LOGIN_SHELLS in CFLAGS

git at git.openembedded.org git at git.openembedded.org
Tue Apr 21 11:48:24 UTC 2015


Module: openembedded-core.git
Branch: master-next
Commit: 5bdc2b0bb18b4281d4a164739dd0c2fd88070a15
URL:    http://git.openembedded.org/?p=openembedded-core.git&a=commit;h=5bdc2b0bb18b4281d4a164739dd0c2fd88070a15

Author: Chen Qi <Qi.Chen at windriver.com>
Date:   Tue Apr 21 17:30:47 2015 +0800

bash: explicitly define NON_INTERACTIVE_LOGIN_SHELLS in CFLAGS

If NON_INTERACTIVE_LOGIN_SHELLS is defined, all login shells read the
startup files, even if they are not interactive.

This is the behaviour of other major distros like Ubuntu and Fedora.
We also need to set it so that when executing `su -l xxx -c env' command,
/etc/profile is parsed.

[YOCTO #5359]
[YOCTO #7137]

Signed-off-by: Chen Qi <Qi.Chen at windriver.com>
Signed-off-by: Richard Purdie <richard.purdie at linuxfoundation.org>

---

 meta/recipes-extended/bash/bash.inc | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/meta/recipes-extended/bash/bash.inc b/meta/recipes-extended/bash/bash.inc
index d7b28cf..c06f157 100644
--- a/meta/recipes-extended/bash/bash.inc
+++ b/meta/recipes-extended/bash/bash.inc
@@ -9,6 +9,11 @@ inherit autotools gettext texinfo update-alternatives ptest
 EXTRA_AUTORECONF += "--exclude=autoheader"
 EXTRA_OECONF = "--enable-job-control"
 
+# If NON_INTERACTIVE_LOGIN_SHELLS is defined, all login shells read the
+# startup files, even if they are not interactive.
+# This is what other major distros do. And this is what we wanted. See bug#5359 and bug#7137.
+CFLAGS += "-DNON_INTERACTIVE_LOGIN_SHELLS"
+
 ALTERNATIVE_${PN} = "sh"
 ALTERNATIVE_LINK_NAME[sh] = "${base_bindir}/sh"
 ALTERNATIVE_TARGET[sh] = "${base_bindir}/bash"



More information about the Openembedded-commits mailing list