Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH] kconfig: support read-only Buildroot source directories
Date: Mon, 17 Aug 2015 22:53:29 +0200	[thread overview]
Message-ID: <20150817225329.6b4e8453@free-electrons.com> (raw)
In-Reply-To: <1439504572-20085-1-git-send-email-hollis_blanchard@mentor.com>

Hollis,

On Thu, 13 Aug 2015 15:22:52 -0700, Hollis Blanchard wrote:
> merge_config.sh currently tries to create a .tmp file in the top-level
> Buildroot source tree. This fails when that directory is read-only, leading
> to unexpected .config file contents (affecting the configuration of Buildroot
> itself, Linux, and Busybox).
> 
> Fix it by using mktemp --tmpdir to create the .tmp file in $TMPDIR or /tmp.
> 
> Signed-off-by: Hollis Blanchard <hollis_blanchard@mentor.com>
> ---
>  support/kconfig/merge_config.sh | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/support/kconfig/merge_config.sh b/support/kconfig/merge_config.sh
> index 81b0c61..19d968b 100755
> --- a/support/kconfig/merge_config.sh
> +++ b/support/kconfig/merge_config.sh
> @@ -82,7 +82,7 @@ shift;
>  
>  MERGE_LIST=$*
>  SED_CONFIG_EXP="s/^\(# \)\{0,1\}\(CONFIG_[a-zA-Z0-9_]*\)[= ].*/\2/p"
> -TMP_FILE=$(mktemp ./.tmp.config.XXXXXXXXXX)
> +TMP_FILE=$(mktemp --tmpdir .tmp.config.XXXXXXXXXX)
>  
>  echo "Using $INITFILE as base"
>  cat $INITFILE > $TMP_FILE

Thanks for this patch! It looks good in principle, but is not done
correctly. support/kconfig/ is directly inherited from the kernel
source code, and we keep a series of patches in
support/kconfig/patches/ to clearly identify the changes we made
compared to the original kernel version. See
support/kconfig/README.buildroot for details.

Could you rework your patch to also add a patch to
support/kconfig/patches/ ? Can you check whether the problem also
exists in the kernel kconfig code, and if so, report the problem to the
kernel developers ?

Thanks!

Thomas
-- 
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com

  parent reply	other threads:[~2015-08-17 20:53 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-08-13 22:22 [Buildroot] [PATCH] kconfig: support read-only Buildroot source directories Hollis Blanchard
2015-08-13 22:40 ` Yann E. MORIN
2015-08-14  5:25   ` Erico Nunes
2015-08-17 20:53 ` Thomas Petazzoni [this message]
2015-08-28 19:35   ` Erico Nunes
2015-08-28 20:54     ` Hollis Blanchard

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=20150817225329.6b4e8453@free-electrons.com \
    --to=thomas.petazzoni@free-electrons.com \
    --cc=buildroot@busybox.net \
    /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