* [Buildroot] [PATCH] kconfig: support read-only Buildroot source directories
@ 2015-08-13 22:22 Hollis Blanchard
2015-08-13 22:40 ` Yann E. MORIN
2015-08-17 20:53 ` Thomas Petazzoni
0 siblings, 2 replies; 6+ messages in thread
From: Hollis Blanchard @ 2015-08-13 22:22 UTC (permalink / raw)
To: buildroot
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
--
2.3.2
^ permalink raw reply related [flat|nested] 6+ messages in thread* [Buildroot] [PATCH] kconfig: support read-only Buildroot source directories
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
1 sibling, 1 reply; 6+ messages in thread
From: Yann E. MORIN @ 2015-08-13 22:40 UTC (permalink / raw)
To: buildroot
Hollis, All,
On 2015-08-13 15:22 -0700, Hollis Blanchard spake thusly:
> 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>
Acked-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Regards,
Yann E. MORIN.
> ---
> 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
> --
> 2.3.2
>
> _______________________________________________
> buildroot mailing list
> buildroot at busybox.net
> http://lists.busybox.net/mailman/listinfo/buildroot
--
.-----------------.--------------------.------------------.--------------------.
| Yann E. MORIN | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software Designer | \ / CAMPAIGN | ___ |
| +33 223 225 172 `------------.-------: X AGAINST | \e/ There is no |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL | v conspiracy. |
'------------------------------^-------^------------------^--------------------'
^ permalink raw reply [flat|nested] 6+ messages in thread* [Buildroot] [PATCH] kconfig: support read-only Buildroot source directories
2015-08-13 22:40 ` Yann E. MORIN
@ 2015-08-14 5:25 ` Erico Nunes
0 siblings, 0 replies; 6+ messages in thread
From: Erico Nunes @ 2015-08-14 5:25 UTC (permalink / raw)
To: buildroot
Hello Hollis,
On Thu, Aug 13, 2015 at 7:40 PM, Yann E. MORIN <yann.morin.1998@free.fr> wrote:
> Hollis, All,
>
> On 2015-08-13 15:22 -0700, Hollis Blanchard spake thusly:
>> 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>
>
> Acked-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
>
> Regards,
> Yann E. MORIN.
>
I mentioned on IRC the other day that I had reproduced the problem; I
have tested this patch and it works for me, so:
Tested-by: Erico Nunes <nunes.erico@gmail.com>
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Buildroot] [PATCH] kconfig: support read-only Buildroot source directories
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-17 20:53 ` Thomas Petazzoni
2015-08-28 19:35 ` Erico Nunes
1 sibling, 1 reply; 6+ messages in thread
From: Thomas Petazzoni @ 2015-08-17 20:53 UTC (permalink / raw)
To: buildroot
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
^ permalink raw reply [flat|nested] 6+ messages in thread* [Buildroot] [PATCH] kconfig: support read-only Buildroot source directories
2015-08-17 20:53 ` Thomas Petazzoni
@ 2015-08-28 19:35 ` Erico Nunes
2015-08-28 20:54 ` Hollis Blanchard
0 siblings, 1 reply; 6+ messages in thread
From: Erico Nunes @ 2015-08-28 19:35 UTC (permalink / raw)
To: buildroot
Hello all,
This bug seems to be somewhat major to remain in the 2015.08 release,
as it prevents users from using a read-only buildroot source with
out-of-tree builds.
On Mon, Aug 17, 2015 at 5:53 PM, Thomas Petazzoni
<thomas.petazzoni@free-electrons.com> wrote:
> 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 ?
>
Hollis, did you manage to evolve this issue with the kernel developers?
Or, will you have time to work this patch before the release according
to Thomas' review?
I believe it would be a very important fix, and I could pick it in
case you are unable right now.
Thanks,
Erico
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Buildroot] [PATCH] kconfig: support read-only Buildroot source directories
2015-08-28 19:35 ` Erico Nunes
@ 2015-08-28 20:54 ` Hollis Blanchard
0 siblings, 0 replies; 6+ messages in thread
From: Hollis Blanchard @ 2015-08-28 20:54 UTC (permalink / raw)
To: buildroot
It's on my list, but I don't expect to be able to get back to this for
quite a while. Sorry!
Hollis Blanchard
Mentor Graphics Emulation Division
On 08/28/2015 12:35 PM, Erico Nunes wrote:
> Hello all,
>
> This bug seems to be somewhat major to remain in the 2015.08 release,
> as it prevents users from using a read-only buildroot source with
> out-of-tree builds.
>
> On Mon, Aug 17, 2015 at 5:53 PM, Thomas Petazzoni
> <thomas.petazzoni@free-electrons.com> wrote:
>> 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 ?
>>
> Hollis, did you manage to evolve this issue with the kernel developers?
> Or, will you have time to work this patch before the release according
> to Thomas' review?
> I believe it would be a very important fix, and I could pick it in
> case you are unable right now.
>
> Thanks,
>
> Erico
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2015-08-28 20:54 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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
2015-08-28 19:35 ` Erico Nunes
2015-08-28 20:54 ` Hollis Blanchard
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox