* [PATCH] base-files/profile: change EDITOR to not be busybox specific
@ 2015-01-21 18:25 Paul Gortmaker
2015-01-21 19:29 ` Dan McGregor
2015-02-11 0:55 ` Paul Gortmaker
0 siblings, 2 replies; 5+ messages in thread
From: Paul Gortmaker @ 2015-01-21 18:25 UTC (permalink / raw)
To: openembedded-core
Setting "EDITOR=/bin/vi" breaks on non-busybox systems, as
vim will populate /usr/bin/vi instead, and you get stuff like:
op3:~/poky/meta-builder$ git commit -s
error: cannot run /bin/vi: No such file or directory
error: unable to start editor '/bin/vi'
Please supply the message using either -m or -F option.
op3:~/poky/meta-builder$ which vi
/usr/bin/vi
op3:~/poky/meta-builder$
Since we've already specified a proper path above in the profile,
we've no need to call out where in the path vi lives, and hence
this will work with busybox and a full vim install w/o busybox.
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
---
meta/recipes-core/base-files/base-files/profile | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/meta/recipes-core/base-files/base-files/profile b/meta/recipes-core/base-files/base-files/profile
index 88ab8d877b0d..53c2680409dd 100644
--- a/meta/recipes-core/base-files/base-files/profile
+++ b/meta/recipes-core/base-files/base-files/profile
@@ -2,7 +2,7 @@
# and Bourne compatible shells (bash(1), ksh(1), ash(1), ...).
PATH="/usr/local/bin:/usr/bin:/bin"
-EDITOR="/bin/vi" # needed for packages like cron
+EDITOR="vi" # needed for packages like cron, git-commit
test -z "$TERM" && TERM="vt100" # Basic terminal capab. For screen etc.
if [ ! -e /etc/localtime -a ! -e /etc/TZ ]; then
--
2.2.1
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH] base-files/profile: change EDITOR to not be busybox specific
2015-01-21 18:25 [PATCH] base-files/profile: change EDITOR to not be busybox specific Paul Gortmaker
@ 2015-01-21 19:29 ` Dan McGregor
2015-01-22 14:08 ` Mike Looijmans
2015-02-16 0:30 ` Bernhard Reutner-Fischer
2015-02-11 0:55 ` Paul Gortmaker
1 sibling, 2 replies; 5+ messages in thread
From: Dan McGregor @ 2015-01-21 19:29 UTC (permalink / raw)
To: Paul Gortmaker; +Cc: Patches and discussions about the oe-core layer
On 21 January 2015 at 12:25, Paul Gortmaker
<paul.gortmaker@windriver.com> wrote:
> Setting "EDITOR=/bin/vi" breaks on non-busybox systems, as
> vim will populate /usr/bin/vi instead, and you get stuff like:
>
> op3:~/poky/meta-builder$ git commit -s
> error: cannot run /bin/vi: No such file or directory
> error: unable to start editor '/bin/vi'
> Please supply the message using either -m or -F option.
> op3:~/poky/meta-builder$ which vi
> /usr/bin/vi
> op3:~/poky/meta-builder$
>
> Since we've already specified a proper path above in the profile,
> we've no need to call out where in the path vi lives, and hence
> this will work with busybox and a full vim install w/o busybox.
>
> Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
> ---
> meta/recipes-core/base-files/base-files/profile | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/meta/recipes-core/base-files/base-files/profile b/meta/recipes-core/base-files/base-files/profile
> index 88ab8d877b0d..53c2680409dd 100644
> --- a/meta/recipes-core/base-files/base-files/profile
> +++ b/meta/recipes-core/base-files/base-files/profile
> @@ -2,7 +2,7 @@
> # and Bourne compatible shells (bash(1), ksh(1), ash(1), ...).
>
> PATH="/usr/local/bin:/usr/bin:/bin"
> -EDITOR="/bin/vi" # needed for packages like cron
> +EDITOR="vi" # needed for packages like cron, git-commit
> test -z "$TERM" && TERM="vt100" # Basic terminal capab. For screen etc.
>
> if [ ! -e /etc/localtime -a ! -e /etc/TZ ]; then
While I agree with this change, arguably busybox should also be
changed. Everywhere I look "vi" lives in /usr/bin. FreeBSD, NetBSD,
Ubuntu, and Slackware all seem to put vi in /usr/bin.
The same is true of getopt.
What are other people's thoughs?
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] base-files/profile: change EDITOR to not be busybox specific
2015-01-21 19:29 ` Dan McGregor
@ 2015-01-22 14:08 ` Mike Looijmans
2015-02-16 0:30 ` Bernhard Reutner-Fischer
1 sibling, 0 replies; 5+ messages in thread
From: Mike Looijmans @ 2015-01-22 14:08 UTC (permalink / raw)
To: openembedded-core
On 21-01-15 20:29, Dan McGregor wrote:
> On 21 January 2015 at 12:25, Paul Gortmaker
> <paul.gortmaker@windriver.com> wrote:
>> Setting "EDITOR=/bin/vi" breaks on non-busybox systems, as
>> vim will populate /usr/bin/vi instead, and you get stuff like:
>>
>> op3:~/poky/meta-builder$ git commit -s
>> error: cannot run /bin/vi: No such file or directory
>> error: unable to start editor '/bin/vi'
>> Please supply the message using either -m or -F option.
>> op3:~/poky/meta-builder$ which vi
>> /usr/bin/vi
>> op3:~/poky/meta-builder$
>>
>> Since we've already specified a proper path above in the profile,
>> we've no need to call out where in the path vi lives, and hence
>> this will work with busybox and a full vim install w/o busybox.
>>
>> Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
>> ---
>> meta/recipes-core/base-files/base-files/profile | 2 +-
>> 1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/meta/recipes-core/base-files/base-files/profile b/meta/recipes-core/base-files/base-files/profile
>> index 88ab8d877b0d..53c2680409dd 100644
>> --- a/meta/recipes-core/base-files/base-files/profile
>> +++ b/meta/recipes-core/base-files/base-files/profile
>> @@ -2,7 +2,7 @@
>> # and Bourne compatible shells (bash(1), ksh(1), ash(1), ...).
>>
>> PATH="/usr/local/bin:/usr/bin:/bin"
>> -EDITOR="/bin/vi" # needed for packages like cron
>> +EDITOR="vi" # needed for packages like cron, git-commit
>> test -z "$TERM" && TERM="vt100" # Basic terminal capab. For screen etc.
>>
>> if [ ! -e /etc/localtime -a ! -e /etc/TZ ]; then
>
> While I agree with this change, arguably busybox should also be
> changed. Everywhere I look "vi" lives in /usr/bin. FreeBSD, NetBSD,
> Ubuntu, and Slackware all seem to put vi in /usr/bin.
>
> The same is true of getopt.
>
> What are other people's thoughs?
>
If I remember my history lessons correctly, the distinction between /bin and
/usr/bin was that /bin will reside in the root mount, while /usr may mount
something else. Busybox seems to consider "vi" and "getopt" things that need
to be available at all times. Which is not a strange thought, it would be
frustrating to know that all you need to fix the system is to edit a file, but
you're stuck without editor when /usr can't be mounted for whatever reason.
On the other hand, if you have a busybox system, you can always run vi using
"/bin/busybox vi" and /bin/vi is just a symbolic link for that. If all other
systems use /usr/bin/vi, I think busybox should be changed to follow suit.
In the end, my vote would be on a busybox modification. I can't think of a
convincing reason why it should reside in /bin/, while there are plenty
reasons to move it to /usr/bin.
Met vriendelijke groet / kind regards,
Mike Looijmans
System Expert
TOPIC Embedded Systems
Eindhovenseweg 32-C, NL-5683 KH Best
Postbus 440, NL-5680 AK Best
Telefoon: (+31) (0) 499 33 69 79
Telefax: (+31) (0) 499 33 69 70
E-mail: mike.looijmans@topic.nl
Website: www.topic.nl
Please consider the environment before printing this e-mail
Visit us at Embedded World 2015 Nuernberg, 24.02.2015 till 26.02.2015, Hall 1, stand number 136.
https://www.embedded-world.de/de/ausstellerprodukte/?focus=edb3exhibitor&focus2=14017667&focus3=embwld15&highlight=topic
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] base-files/profile: change EDITOR to not be busybox specific
2015-01-21 18:25 [PATCH] base-files/profile: change EDITOR to not be busybox specific Paul Gortmaker
2015-01-21 19:29 ` Dan McGregor
@ 2015-02-11 0:55 ` Paul Gortmaker
1 sibling, 0 replies; 5+ messages in thread
From: Paul Gortmaker @ 2015-02-11 0:55 UTC (permalink / raw)
To: openembedded-core
[[PATCH] base-files/profile: change EDITOR to not be busybox specific] On 21/01/2015 (Wed 13:25) Paul Gortmaker wrote:
> Setting "EDITOR=/bin/vi" breaks on non-busybox systems, as
> vim will populate /usr/bin/vi instead, and you get stuff like:
>
> op3:~/poky/meta-builder$ git commit -s
> error: cannot run /bin/vi: No such file or directory
> error: unable to start editor '/bin/vi'
Ping - this seems like the right thing to do, even if we decide to make
busybox LSB compliant at a later date; there is no need to do a full
pathspec for vi.
P.
--
> Please supply the message using either -m or -F option.
> op3:~/poky/meta-builder$ which vi
> /usr/bin/vi
> op3:~/poky/meta-builder$
>
> Since we've already specified a proper path above in the profile,
> we've no need to call out where in the path vi lives, and hence
> this will work with busybox and a full vim install w/o busybox.
>
> Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
> ---
> meta/recipes-core/base-files/base-files/profile | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/meta/recipes-core/base-files/base-files/profile b/meta/recipes-core/base-files/base-files/profile
> index 88ab8d877b0d..53c2680409dd 100644
> --- a/meta/recipes-core/base-files/base-files/profile
> +++ b/meta/recipes-core/base-files/base-files/profile
> @@ -2,7 +2,7 @@
> # and Bourne compatible shells (bash(1), ksh(1), ash(1), ...).
>
> PATH="/usr/local/bin:/usr/bin:/bin"
> -EDITOR="/bin/vi" # needed for packages like cron
> +EDITOR="vi" # needed for packages like cron, git-commit
> test -z "$TERM" && TERM="vt100" # Basic terminal capab. For screen etc.
>
> if [ ! -e /etc/localtime -a ! -e /etc/TZ ]; then
> --
> 2.2.1
>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] base-files/profile: change EDITOR to not be busybox specific
2015-01-21 19:29 ` Dan McGregor
2015-01-22 14:08 ` Mike Looijmans
@ 2015-02-16 0:30 ` Bernhard Reutner-Fischer
1 sibling, 0 replies; 5+ messages in thread
From: Bernhard Reutner-Fischer @ 2015-02-16 0:30 UTC (permalink / raw)
To: Dan McGregor, Paul Gortmaker
Cc: Patches and discussions about the oe-core layer
On January 21, 2015 8:29:23 PM GMT+01:00, Dan McGregor <danismostlikely@gmail.com> wrote:
>On 21 January 2015 at 12:25, Paul Gortmaker
><paul.gortmaker@windriver.com> wrote:
>> Setting "EDITOR=/bin/vi" breaks on non-busybox systems, as
>> vim will populate /usr/bin/vi instead, and you get stuff like:
>>
>> op3:~/poky/meta-builder$ git commit -s
>> error: cannot run /bin/vi: No such file or directory
>> error: unable to start editor '/bin/vi'
>> Please supply the message using either -m or -F option.
>> op3:~/poky/meta-builder$ which vi
>> /usr/bin/vi
>> op3:~/poky/meta-builder$
>>
>> Since we've already specified a proper path above in the profile,
>> we've no need to call out where in the path vi lives, and hence
>> this will work with busybox and a full vim install w/o busybox.
>>
>> Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
>> ---
>> meta/recipes-core/base-files/base-files/profile | 2 +-
>> 1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/meta/recipes-core/base-files/base-files/profile
>b/meta/recipes-core/base-files/base-files/profile
>> index 88ab8d877b0d..53c2680409dd 100644
>> --- a/meta/recipes-core/base-files/base-files/profile
>> +++ b/meta/recipes-core/base-files/base-files/profile
>> @@ -2,7 +2,7 @@
>> # and Bourne compatible shells (bash(1), ksh(1), ash(1), ...).
>>
>> PATH="/usr/local/bin:/usr/bin:/bin"
>> -EDITOR="/bin/vi" # needed for packages like
>cron
>> +EDITOR="vi" # needed for packages like cron,
>git-commit
>> test -z "$TERM" && TERM="vt100" # Basic terminal capab. For
>screen etc.
>>
>> if [ ! -e /etc/localtime -a ! -e /etc/TZ ]; then
>
>While I agree with this change, arguably busybox should also be
>changed. Everywhere I look "vi" lives in /usr/bin. FreeBSD, NetBSD,
>Ubuntu, and Slackware all seem to put vi in /usr/bin.
>
>The same is true of getopt.
Yea.
http://lists.busybox.net/pipermail/busybox/2012-June/078020.html
And we should run that again nowadays, obviously.
Perhaps fedora fixed their layout in the meantime?
Can anyone check on a current fedora, please?
Thanks,
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2015-02-16 0:30 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-01-21 18:25 [PATCH] base-files/profile: change EDITOR to not be busybox specific Paul Gortmaker
2015-01-21 19:29 ` Dan McGregor
2015-01-22 14:08 ` Mike Looijmans
2015-02-16 0:30 ` Bernhard Reutner-Fischer
2015-02-11 0:55 ` Paul Gortmaker
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.