public inbox for openembedded-core@lists.openembedded.org
 help / color / mirror / Atom feed
From: Khem Raj <raj.khem@gmail.com>
To: openembedded-core@lists.openembedded.org
Cc: Khem Raj <raj.khem@gmail.com>
Subject: [PATCH] bash: build with bash_cv_getcwd_malloc=yes on musl too
Date: Fri, 13 May 2022 18:07:50 -0700	[thread overview]
Message-ID: <20220514010750.4005247-1-raj.khem@gmail.com> (raw)

This fixes bash using its own broken getcwd() during cross compiling
The configure script assumes that your getcwd() function is broken.
Which then makes bash use it's own getcwd() implementation, which
doesn't work if the path to the current directory
contains bind mounts in its paths. This shows up as:

Fixes errors on musl images like
shell-init: error retrieving current directory: getcwd: cannot access parent directories: Bad file descriptor

Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
 meta/site/common-musl | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/meta/site/common-musl b/meta/site/common-musl
index d990c4e0720..86aed4a38cd 100644
--- a/meta/site/common-musl
+++ b/meta/site/common-musl
@@ -28,6 +28,9 @@ glib_cv_have_qsort_r=${glib_cv_have_qsort_r=yes}
 #dbus-glib
 ac_cv_have_abstract_sockets=${ac_cv_have_abstract_sockets=yes}
 
+# bash
+bash_cv_getcwd_malloc=${bash_cv_getcwd_malloc=yes}
+
 # coreutils
 fu_cv_sys_stat_statfs2_bsize=${fu_cv_sys_stat_statfs2_bsize=yes}
 gl_cv_func_getcwd_abort_bug=${gl_cv_func_getcwd_abort_bug=no}
-- 
2.36.1



                 reply	other threads:[~2022-05-14  1:07 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220514010750.4005247-1-raj.khem@gmail.com \
    --to=raj.khem@gmail.com \
    --cc=openembedded-core@lists.openembedded.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox