Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 13 Sep 2014 02:33:58 +0400
From:      Subbsd <subbsd@gmail.com>
To:        Craig Rodrigues <rodrigc@freebsd.org>
Cc:        Alfred Perlstein <bright@mu.org>, freebsd-current Current <freebsd-current@freebsd.org>
Subject:   Re: shells/bash port, add a knob which symlinks to /bin/bash ?
Message-ID:  <CAFt_eMpAWM6X20Y-qbK9LR0UTuXpFEfROSnP=JQ4n9smQGn=WA@mail.gmail.com>
In-Reply-To: <CAG=rPVeCwWQ5RP=EkkUMojzYprV3Se%2BjP9g31p0-eUmSPBUWRQ@mail.gmail.com>
References:  <CAG=rPVf5z4c6aheCngKy1g-iH8HexAWGQfHoSbtU9D1UC0Pbpg@mail.gmail.com> <20140912214004.GT6096@ivaldir.etoilebsd.net> <54136D5D.3090905@mu.org> <CAG=rPVeCwWQ5RP=EkkUMojzYprV3Se%2BjP9g31p0-eUmSPBUWRQ@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Sat, Sep 13, 2014 at 2:23 AM, Craig Rodrigues <rodrigc@freebsd.org> wrote:
> Hi,
>
> I could live with this solution of additional port outside of the main
> bash port, which creates the symlink and updates /etc/shells.
>
> One other thing I am seeing is that many, many shell scripts are written
> assuming "#!/bin/bash".
> Forcing all upstream script writers to switch to "#!/usr/bin/env bash", or
> to convert their scripts to "#!/bin/sh" and remove all bash-specific
> behaviors, is getting harder and harder,
> since many people are exposed to MacOS X and Linux on desktops.
>
> --
> Craig
>
>
>
> On Fri, Sep 12, 2014 at 3:02 PM, Alfred Perlstein <bright@mu.org> wrote:
>
>> The correct thing is to make a port/pkg that installs the symlink and
>> /etc/shells this for the user.
>>
>> There is no need for changes to 'base' nor do we need a change to the
>> system port.
>>
>> -Alfred
>>
>>
>> On 9/12/14 2:40 PM, Baptiste Daroussin wrote:
>>
>>> On Fri, Sep 12, 2014 at 02:12:45PM -0700, Craig Rodrigues wrote:
>>>
>>>> Hi,
>>>>
>>>> In the last 3 jobs that I have worked at, there have been
>>>> a mix of Linux machines and FreeBSD machines.
>>>> When using an NIS or LDAP environment where
>>>> there is a single login across multiple machines, it is useful to
>>>> have a single shell setting.
>>>>
>>>> Since Linux and MacOS X have "/bin/bash" as the shell,
>>>> in order to get the FreeBSD boxes to play in this environment,
>>>> I have seen admins do the following on FreeBSD setups:
>>>>     ln -s /usr/local/bin/bash /bin/bash
>>>>
>>>> or
>>>>
>>>>     ln /usr/local/bin/bash /bin/bash
>>>>
>>>> and then make sure that /etc/shells as:
>>>> /usr/local/bin/bash
>>>> /bin/bash
>>>>
>>>> Can we add an optional knob (turned off by default) which creates this
>>>> symlink
>>>> and updates /etc/shells?
>>>>
>>>> This would help with interoperability of FreeBSD hosts in environments
>>>> mixed
>>>> with Linux and MacOS X.
>>>>
>>>>  Please no, no and no!
>>>
>>> We are fighting for a very long time to prevent the ports to pollute base.
>>>
>>> We have added the shebangfix USES to be able to catch with up with
>>> cleanup this
>>> properly as well as a qa test to discover it automatically.
>>>
>>> no interpreters at all have a symlink in base but perl and this one is
>>> going to
>>> be removed.
>>>
>>> If you want interoperability just use /usr/bin/env bash as a shebang. Btw
>>> you
>>> cannot get interoprability with OS-X in there because the bash they do
>>> provide
>>> is the last GPL-2 recent bash have many incompatiblities with this old
>>> version.
>>>
>>> regards,
>>> Bapt
>>>
>>

Looks like variant symlink is may be useful for solving this problem
and it is not cluttered base

https://wiki.freebsd.org/200808DevSummit?action=AttachFile&do=get&target=variant-symlinks-for-freebsd.pdf



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAFt_eMpAWM6X20Y-qbK9LR0UTuXpFEfROSnP=JQ4n9smQGn=WA>