All of lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] Add [user@host dir] back to skeleton /etc/profile
@ 2015-10-06 22:59 David Van Arnem
  2015-10-07  5:08 ` Baruch Siach
  2015-10-07  8:22 ` Luca Ceresoli
  0 siblings, 2 replies; 7+ messages in thread
From: David Van Arnem @ 2015-10-06 22:59 UTC (permalink / raw)
  To: buildroot

Hi all,

I noticed there was a commit pushed Saturday (f93c692c) which removed 
some bash-specific stuff from the skeleton shell profile in 
/etc/profile.  The default behavior for the shell prompt now is to only 
display "$" or "#", without the [user at host dir] prefix.  I just 
subscribed to the list today so I missed out on any discussion on this; 
was there a reason the [user at host dir] prefix was not left in the 
changes ("export PS1="[\u@\h \W]\\$ "")?  I have not encountered a Linux 
distribution that does not display this or a similar prompt, and I think 
it would be beneficial to add it back in.  I agree that the aliases, 
colors, etc should stay removed.

Thanks,
David

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [Buildroot] Add [user@host dir] back to skeleton /etc/profile
  2015-10-06 22:59 [Buildroot] Add [user@host dir] back to skeleton /etc/profile David Van Arnem
@ 2015-10-07  5:08 ` Baruch Siach
  2015-10-07  8:22 ` Luca Ceresoli
  1 sibling, 0 replies; 7+ messages in thread
From: Baruch Siach @ 2015-10-07  5:08 UTC (permalink / raw)
  To: buildroot

Hi David,

On Tue, Oct 06, 2015 at 04:59:06PM -0600, David Van Arnem wrote:
> I noticed there was a commit pushed Saturday (f93c692c) which removed some
> bash-specific stuff from the skeleton shell profile in /etc/profile.  The
> default behavior for the shell prompt now is to only display "$" or "#",
> without the [user at host dir] prefix.  I just subscribed to the list today so
> I missed out on any discussion on this; was there a reason the [user at host
> dir] prefix was not left in the changes ("export PS1="[\u@\h \W]\\$ "")?  I
> have not encountered a Linux distribution that does not display this or a
> similar prompt, and I think it would be beneficial to add it back in.  I
> agree that the aliases, colors, etc should stay removed.

Buildroot generally provides by default only a minimum working configuration. 
The default shell (Busybox ash) does not display this command prompt prefix 
either, unless configured. Citing the good advice in commit f93c692c log 
message:

    If the user has a specific needs, it needs to be added in
    /etc/profile.d/ by a post-build script.

baruch

-- 
     http://baruch.siach.name/blog/                  ~. .~   Tk Open Systems
=}------------------------------------------------ooO--U--Ooo------------{=
   - baruch at tkos.co.il - tel: +972.2.679.5364, http://www.tkos.co.il -

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [Buildroot] Add [user@host dir] back to skeleton /etc/profile
  2015-10-06 22:59 [Buildroot] Add [user@host dir] back to skeleton /etc/profile David Van Arnem
  2015-10-07  5:08 ` Baruch Siach
@ 2015-10-07  8:22 ` Luca Ceresoli
  2015-10-07 16:56   ` David Van Arnem
  1 sibling, 1 reply; 7+ messages in thread
From: Luca Ceresoli @ 2015-10-07  8:22 UTC (permalink / raw)
  To: buildroot

Dear David,

thanks for your report.

[Cc-ing the author and the other reviewer of the mentioned commit]

David Van Arnem wrote:
> Hi all,
>
> I noticed there was a commit pushed Saturday (f93c692c) which removed
> some bash-specific stuff from the skeleton shell profile in
> /etc/profile.  The default behavior for the shell prompt now is to only
> display "$" or "#", without the [user at host dir] prefix.  I just
> subscribed to the list today so I missed out on any discussion on this;
> was there a reason the [user at host dir] prefix was not left in the
> changes ("export PS1="[\u@\h \W]\\$ "")?  I have not encountered a Linux
> distribution that does not display this or a similar prompt, and I think
> it would be beneficial to add it back in.  I agree that the aliases,
> colors, etc should stay removed.

This is because bash is rather unusual on embedded Linux systems. At
least on small devices, bash has a farily targe foot print, so in most
cases a simpler shell is used. For example, the default in Buildroot is
to use the 'ash' shell implemented by Busybox.

Comparing with a desktop distribution, if that's what you did, is
misleading. Desktops distributions run on machines with large of disks
and RAMs, and

However it is perfectly fine if you want to use bash on your embedded
system, and that's why Buildroot has a 'bash' package.

Mmh, I realize now it's probably wise if we add back the bash-specific
lines, but in package/bash/bash_profile, and of course install that
file. This would give back bash features to bash users, out of the box,
and without cluttering the rootfs for other users.

Why don't you try to do it yourself, and make your first code
contribution to Buildroot?

Regards,
-- 
Luca

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [Buildroot] Add [user@host dir] back to skeleton /etc/profile
  2015-10-07  8:22 ` Luca Ceresoli
@ 2015-10-07 16:56   ` David Van Arnem
  2015-10-07 18:13     ` David Van Arnem
  0 siblings, 1 reply; 7+ messages in thread
From: David Van Arnem @ 2015-10-07 16:56 UTC (permalink / raw)
  To: buildroot

On 10/07/2015 02:22 AM, Luca Ceresoli wrote:
> Dear David,
>
> thanks for your report.
>
> [Cc-ing the author and the other reviewer of the mentioned commit]
>
> David Van Arnem wrote:
>> Hi all,
>>
>> I noticed there was a commit pushed Saturday (f93c692c) which removed
>> some bash-specific stuff from the skeleton shell profile in
>> /etc/profile.  The default behavior for the shell prompt now is to only
>> display "$" or "#", without the [user at host dir] prefix.  I just
>> subscribed to the list today so I missed out on any discussion on this;
>> was there a reason the [user at host dir] prefix was not left in the
>> changes ("export PS1="[\u@\h \W]\\$ "")?  I have not encountered a Linux
>> distribution that does not display this or a similar prompt, and I think
>> it would be beneficial to add it back in.  I agree that the aliases,
>> colors, etc should stay removed.
>
> This is because bash is rather unusual on embedded Linux systems. At
> least on small devices, bash has a farily targe foot print, so in most
> cases a simpler shell is used. For example, the default in Buildroot is
> to use the 'ash' shell implemented by Busybox.
>
> Comparing with a desktop distribution, if that's what you did, is
> misleading. Desktops distributions run on machines with large of disks
> and RAMs, and
>
> However it is perfectly fine if you want to use bash on your embedded
> system, and that's why Buildroot has a 'bash' package.
>
> Mmh, I realize now it's probably wise if we add back the bash-specific
> lines, but in package/bash/bash_profile, and of course install that
> file. This would give back bash features to bash users, out of the box,
> and without cluttering the rootfs for other users.
>
> Why don't you try to do it yourself, and make your first code
> contribution to Buildroot?
>
> Regards,

Hi Luca, all,

I'd be happy to work on putting the changes back in 
package/bash/bash_profile.  I've only used default 
packages/configurations in Buildroot so I'm not very familiar with 
modifying them, and I could use some guidance.  Should I place 
bash_profile in package/bash and then have the bash package Makefile 
copy it to system/skeleton/etc/profile?  Or is there another way I 
should install it?

David

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [Buildroot] Add [user@host dir] back to skeleton /etc/profile
  2015-10-07 16:56   ` David Van Arnem
@ 2015-10-07 18:13     ` David Van Arnem
  2015-10-07 20:58       ` Arnout Vandecappelle
  0 siblings, 1 reply; 7+ messages in thread
From: David Van Arnem @ 2015-10-07 18:13 UTC (permalink / raw)
  To: buildroot

On 10/07/2015 10:56 AM, David Van Arnem wrote:
> On 10/07/2015 02:22 AM, Luca Ceresoli wrote:
>> Dear David,
>>
>> thanks for your report.
>>
>> [Cc-ing the author and the other reviewer of the mentioned commit]
>>
>> David Van Arnem wrote:
>>> Hi all,
>>>
>>> I noticed there was a commit pushed Saturday (f93c692c) which removed
>>> some bash-specific stuff from the skeleton shell profile in
>>> /etc/profile.  The default behavior for the shell prompt now is to only
>>> display "$" or "#", without the [user at host dir] prefix.  I just
>>> subscribed to the list today so I missed out on any discussion on this;
>>> was there a reason the [user at host dir] prefix was not left in the
>>> changes ("export PS1="[\u@\h \W]\\$ "")?  I have not encountered a Linux
>>> distribution that does not display this or a similar prompt, and I think
>>> it would be beneficial to add it back in.  I agree that the aliases,
>>> colors, etc should stay removed.
>>
>> This is because bash is rather unusual on embedded Linux systems. At
>> least on small devices, bash has a farily targe foot print, so in most
>> cases a simpler shell is used. For example, the default in Buildroot is
>> to use the 'ash' shell implemented by Busybox.
>>
>> Comparing with a desktop distribution, if that's what you did, is
>> misleading. Desktops distributions run on machines with large of disks
>> and RAMs, and
>>
>> However it is perfectly fine if you want to use bash on your embedded
>> system, and that's why Buildroot has a 'bash' package.
>>
>> Mmh, I realize now it's probably wise if we add back the bash-specific
>> lines, but in package/bash/bash_profile, and of course install that
>> file. This would give back bash features to bash users, out of the box,
>> and without cluttering the rootfs for other users.
>>
>> Why don't you try to do it yourself, and make your first code
>> contribution to Buildroot?
>>
>> Regards,
>
> Hi Luca, all,
>
> I'd be happy to work on putting the changes back in
> package/bash/bash_profile.  I've only used default
> packages/configurations in Buildroot so I'm not very familiar with
> modifying them, and I could use some guidance.  Should I place
> bash_profile in package/bash and then have the bash package Makefile
> copy it to system/skeleton/etc/profile?  Or is there another way I
> should install it?
>
> David
>
>
> _______________________________________________
> buildroot mailing list
> buildroot at busybox.net
> http://lists.busybox.net/mailman/listinfo/buildroot

Upon more investigation, I have a (hopefully) better idea for how to 
accomplish this. Sticking with the suggestion in the commit message ("If 
the user has a specific needs, it needs to be added in /etc/profile.d/ 
by a post-build script."), I'm thinking I should create 
package/bash/bash_profile.sh, and in bash.mk set up a section to use 
$(INSTALL) to install it to $(TARGET_DIR)/etc/profile.d/bash_profile.sh. 
The skeleton /etc/profile sources any *.sh files in /etc/profile.d, so 
it should hopefully pick it up. Does this sound like a viable (and 
correct wrt best buildroot practices) approach?

Or, I'll just try it and see if it works :)
-- 
Thanks,
David

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [Buildroot] Add [user@host dir] back to skeleton /etc/profile
  2015-10-07 18:13     ` David Van Arnem
@ 2015-10-07 20:58       ` Arnout Vandecappelle
  2015-10-08  7:51         ` Maxime Hadjinlian
  0 siblings, 1 reply; 7+ messages in thread
From: Arnout Vandecappelle @ 2015-10-07 20:58 UTC (permalink / raw)
  To: buildroot

On 07-10-15 19:13, David Van Arnem wrote:
> On 10/07/2015 10:56 AM, David Van Arnem wrote:
[snip]
>> I'd be happy to work on putting the changes back in
>> package/bash/bash_profile.  I've only used default
>> packages/configurations in Buildroot so I'm not very familiar with
>> modifying them, and I could use some guidance.  Should I place
>> bash_profile in package/bash and then have the bash package Makefile
>> copy it to system/skeleton/etc/profile?  Or is there another way I
>> should install it?
>>
>> David
>>
>>
>> _______________________________________________
>> buildroot mailing list
>> buildroot at busybox.net
>> http://lists.busybox.net/mailman/listinfo/buildroot
> 
> Upon more investigation, I have a (hopefully) better idea for how to accomplish
> this. Sticking with the suggestion in the commit message ("If the user has a
> specific needs, it needs to be added in /etc/profile.d/ by a post-build
> script."), I'm thinking I should create package/bash/bash_profile.sh, and in
> bash.mk set up a section to use $(INSTALL) to install it to
> $(TARGET_DIR)/etc/profile.d/bash_profile.sh. The skeleton /etc/profile sources
> any *.sh files in /etc/profile.d, so it should hopefully pick it up. Does this
> sound like a viable (and correct wrt best buildroot practices) approach?

 Sounds like a good idea to me!

 Regards,
 Arnout

> 
> Or, I'll just try it and see if it works :)


-- 
Arnout Vandecappelle                          arnout at mind be
Senior Embedded Software Architect            +32-16-286500
Essensium/Mind                                http://www.mind.be
G.Geenslaan 9, 3001 Leuven, Belgium           BE 872 984 063 RPR Leuven
LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle
GPG fingerprint:  7493 020B C7E3 8618 8DEC 222C 82EB F404 F9AC 0DDF

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [Buildroot] Add [user@host dir] back to skeleton /etc/profile
  2015-10-07 20:58       ` Arnout Vandecappelle
@ 2015-10-08  7:51         ` Maxime Hadjinlian
  0 siblings, 0 replies; 7+ messages in thread
From: Maxime Hadjinlian @ 2015-10-08  7:51 UTC (permalink / raw)
  To: buildroot

On Wed, Oct 7, 2015 at 10:58 PM, Arnout Vandecappelle <arnout@mind.be>
wrote:

> On 07-10-15 19:13, David Van Arnem wrote:
> > On 10/07/2015 10:56 AM, David Van Arnem wrote:
> [snip]
> >> I'd be happy to work on putting the changes back in
> >> package/bash/bash_profile.  I've only used default
> >> packages/configurations in Buildroot so I'm not very familiar with
> >> modifying them, and I could use some guidance.  Should I place
> >> bash_profile in package/bash and then have the bash package Makefile
> >> copy it to system/skeleton/etc/profile?  Or is there another way I
> >> should install it?
> >>
> >> David
> >>
> >>
> >> _______________________________________________
> >> buildroot mailing list
> >> buildroot at busybox.net
> >> http://lists.busybox.net/mailman/listinfo/buildroot
> >
> > Upon more investigation, I have a (hopefully) better idea for how to
> accomplish
> > this. Sticking with the suggestion in the commit message ("If the user
> has a
> > specific needs, it needs to be added in /etc/profile.d/ by a post-build
> > script."), I'm thinking I should create package/bash/bash_profile.sh,
> and in
> > bash.mk set up a section to use $(INSTALL) to install it to
> > $(TARGET_DIR)/etc/profile.d/bash_profile.sh. The skeleton /etc/profile
> sources
> > any *.sh files in /etc/profile.d, so it should hopefully pick it up.
> Does this
> > sound like a viable (and correct wrt best buildroot practices) approach?
>
>  Sounds like a good idea to me!
>
Indeed, that's what this was intented for, go for it.

>
>  Regards,
>  Arnout
>
> >
> > Or, I'll just try it and see if it works :)
>
>
> --
> Arnout Vandecappelle                          arnout at mind be
> Senior Embedded Software Architect            +32-16-286500
> Essensium/Mind                                http://www.mind.be
> G.Geenslaan 9, 3001 Leuven, Belgium           BE 872 984 063 RPR Leuven
> LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle
> GPG fingerprint:  7493 020B C7E3 8618 8DEC 222C 82EB F404 F9AC 0DDF
> _______________________________________________
> buildroot mailing list
> buildroot at busybox.net
> http://lists.busybox.net/mailman/listinfo/buildroot
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20151008/cbe2affb/attachment.html>

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2015-10-08  7:51 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-10-06 22:59 [Buildroot] Add [user@host dir] back to skeleton /etc/profile David Van Arnem
2015-10-07  5:08 ` Baruch Siach
2015-10-07  8:22 ` Luca Ceresoli
2015-10-07 16:56   ` David Van Arnem
2015-10-07 18:13     ` David Van Arnem
2015-10-07 20:58       ` Arnout Vandecappelle
2015-10-08  7:51         ` Maxime Hadjinlian

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.