From owner-freebsd-current@FreeBSD.ORG Fri Sep 12 22:33:59 2014 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id F08E3895; Fri, 12 Sep 2014 22:33:58 +0000 (UTC) Received: from mail-pa0-x235.google.com (mail-pa0-x235.google.com [IPv6:2607:f8b0:400e:c03::235]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id C2D3535F; Fri, 12 Sep 2014 22:33:58 +0000 (UTC) Received: by mail-pa0-f53.google.com with SMTP id rd3so2175151pab.26 for ; Fri, 12 Sep 2014 15:33:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=3j/ExDiEZlAlQS1DPQjSKqHm5XSm0kaOUVpA2ovzMeU=; b=gpdL4taI7uIPkJzSMsom9bIMC7bSxdcYJqdv7UntSFv87oAQ4pGA73ttqwJ9S9PZsZ gPKiMl3TcMxhLVU6IH8LI5yS7LDgUjQAHa2zfrsLmwLjwgrdnhPQeORFtMvp4zsX8im3 9tqItWWwT4/FGPuaYgnoTuefqRHOd0rLECp6GK8z0OcOC4q0v7P1mjdhV0lEKwkxDDZ1 0TGycQoXsV5HA9+awXKU26PHTuai229TEXuf8FB999Gmvcz5r0lkF3O8VAi/2JSJF/nQ mOC7zAm+pfDjDNP++sV7Gb9KzdDvcfBdhPF2Baih5FXtdwYj0wAtLi0brdO/7VERr50N iw+A== MIME-Version: 1.0 X-Received: by 10.68.197.65 with SMTP id is1mr16501630pbc.125.1410561238138; Fri, 12 Sep 2014 15:33:58 -0700 (PDT) Received: by 10.70.88.7 with HTTP; Fri, 12 Sep 2014 15:33:58 -0700 (PDT) In-Reply-To: References: <20140912214004.GT6096@ivaldir.etoilebsd.net> <54136D5D.3090905@mu.org> Date: Sat, 13 Sep 2014 02:33:58 +0400 Message-ID: Subject: Re: shells/bash port, add a knob which symlinks to /bin/bash ? From: Subbsd To: Craig Rodrigues Content-Type: text/plain; charset=UTF-8 Cc: Alfred Perlstein , freebsd-current Current X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 12 Sep 2014 22:33:59 -0000 On Sat, Sep 13, 2014 at 2:23 AM, Craig Rodrigues 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 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