From owner-freebsd-ports@FreeBSD.ORG Sat Sep 13 18:32:54 2014 Return-Path: Delivered-To: freebsd-ports@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id AFF138C4; Sat, 13 Sep 2014 18:32:54 +0000 (UTC) Received: from mail-lb0-x229.google.com (mail-lb0-x229.google.com [IPv6:2a00:1450:4010:c04::229]) (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 91BC1A1D; Sat, 13 Sep 2014 18:32:53 +0000 (UTC) Received: by mail-lb0-f169.google.com with SMTP id p9so2577200lbv.0 for ; Sat, 13 Sep 2014 11:32:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date:message-id:subject :from:to:cc:content-type; bh=wsOJsUtR1/GmlRQ0Q0WJ4Z9A6MKMkh1GQAXtyiq+Yi0=; b=EEf0QKklupV8umqATZ31XWJ/dgHcG4XNf7bPrXxizMhVxHC6Umpy0V5MmeMSfiDh26 6WzO6Ra18i3HID3XCn7WWuodEIdFvKWn6iFjvTZ8H5wcdQsLRY8yjquMhtZoWeTwzxw3 /pcCJ6l+Kb4JCFNKiQSwIvqYvIkMbVFBRI6lmGgVLMUIgPQ8YUMpxMqwB/kpBShVe6km ovVQaijJEPMZmXpVoKN9sCH9S8GtXHqO0n6aienV45wqVdJYBWFKpeasZoj4kn13+ESE JjuUX8FprojrD72ckO2ROnBdI1XtoLG3k+tyaVFGPM5DgAwh/PVOKINVH9eRJFmKP63k R7+A== MIME-Version: 1.0 X-Received: by 10.152.36.73 with SMTP id o9mr4341534laj.88.1410633171386; Sat, 13 Sep 2014 11:32:51 -0700 (PDT) Sender: crodr001@gmail.com Received: by 10.112.22.72 with HTTP; Sat, 13 Sep 2014 11:32:51 -0700 (PDT) In-Reply-To: <541367D1.8090002@FreeBSD.org> References: <541367D1.8090002@FreeBSD.org> Date: Sat, 13 Sep 2014 11:32:51 -0700 X-Google-Sender-Auth: KkU98ryf733qcsczIyo02e2Tgkg Message-ID: Subject: Re: shells/bash port, add a knob which symlinks to /bin/bash ? From: Craig Rodrigues To: Bryan Drewery Content-Type: text/plain; charset=ISO-8859-1 X-Content-Filtered-By: Mailman/MimeDel 2.1.18-1 Cc: freebsd-current Current , Emanuel Haupt , ports X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 13 Sep 2014 18:32:54 -0000 On Fri, Sep 12, 2014 at 2:38 PM, Bryan Drewery wrote: > > There's no reason for bash (and perl) to be exceptions to the 24000 > other ports that install to /usr/local/bin. I can think of dozens of > other ports that will fall into the same arguments being made here, but > it does not mean it is the right thing for FreeBSD. > > If you want to install the symlink on your system feel free to do it. I > install a static bash to /bin/bash on mine and only because I prefer > bash shell and want it in / for single-user mode. That's my personal > choice though. > > The proper fix is to fix scripts to be portable and use #! /usr/bin/env > bash rather than /bin/bash. > Technically, I agree with you that people should write portable shell scripts, and use #!/usr/bin/env bash rather than #!/bin/bash. Pushing that behavior upstream is not always practical these days, where FreeBSD is in the minority, while Linux and MacOS X are in the vast majority of where people are doing development and learning how to write shell scripts these days. The /bin/bash thing is relatively minor, but I brought it up, because I see it so much. I've seen it in the jobs that I've worked at. I've also seen it when dealing with Google Summer of Code students. I've seen it in blogs mentioned when Linux users evaluate FreeBSD. I've seen it when people design appliances based on FreeBSD, but want the device to be "familiar" enough for Linux-y devops people to interact with it. If there are minor things that we can do in FreeBSD to improve the out-of-box experience of FreeBSD to new users who may be used to Linux or MacOS X, that would be great. Telling people to change their shell scripts, or manually create symlinks to /bin/bash is doable, but why not have something in the system do this automatically, so that the average end-user does not even have to think about it? If adding an optional knob to the bash port which is OFF by default to do this is a no-go, would having an optional port like what Brooks Davis mentioned be allowed which creates the symlink and updates /etc/shells? -- Craig