Re: shells/bash port, add a knob which symlinks to /bin/bash ?

2014-09-14 Thread Alfred Perlstein
On 9/13/14, 11:39 AM, Nathan Whitehorn wrote: On 09/13/14 11:32, Craig Rodrigues wrote: 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

Re: shells/bash port, add a knob which symlinks to /bin/bash ?

2014-09-14 Thread Craig Rodrigues
On Sun, Sep 14, 2014 at 10:44 AM, Alfred Perlstein bri...@mu.org wrote: On 9/13/14, 11:39 AM, Nathan Whitehorn wrote: Should really be a standalone package. It's not exactly the same, but the lang/python2 port for example is a meta-port which creates symlinks such as /usr/local/bin/python2

Re: shells/bash port, add a knob which symlinks to /bin/bash ?

2014-09-14 Thread Alfred Perlstein
On 9/14/14, 3:22 PM, Craig Rodrigues wrote: On Sun, Sep 14, 2014 at 10:44 AM, Alfred Perlstein bri...@mu.org mailto:bri...@mu.org wrote: On 9/13/14, 11:39 AM, Nathan Whitehorn wrote: Should really be a standalone package. It's not exactly the same, but the lang/python2 port for

Re: shells/bash port, add a knob which symlinks to /bin/bash ?

2014-09-14 Thread Garrett Cooper
On Sep 12, 2014, at 14:38, Bryan Drewery bdrew...@freebsd.org wrote: No (as portmgr). Ports should not be touching the base system like this. Let's NOT go backwards and add a /bin/bash. In fact the /usr/bin/perl one will be removed soon as well. If we can actually eliminate ports

Re: shells/bash port, add a knob which symlinks to /bin/bash ?

2014-09-14 Thread Baptiste Daroussin
On Sat, Sep 13, 2014 at 08:39:17PM +0100, Dreamcat4 wrote: Right, well here is another one: The missing symlink for /etc/ssl/cert.pem There is no reason it should not be in ${prefix}/etc/ssl/cert.pem Except that the folder etc/ssl/ only exists in base. Without this symlink, then

Re: shells/bash port, add a knob which symlinks to /bin/bash ?

2014-09-13 Thread Matthias Andree
Am 12.09.2014 um 23:38 schrieb Bryan Drewery: The proper fix is to fix scripts to be portable and use #! /usr/bin/env bash rather than /bin/bash. Proper portability means scripting for a POSIX sh, and /bin/sh can handle those scripts. In the majority of cases replacing == by = in test or [

Re: shells/bash port, add a knob which symlinks to /bin/bash ?

2014-09-13 Thread Craig Rodrigues
On Fri, Sep 12, 2014 at 2:38 PM, Bryan Drewery bdrew...@freebsd.org 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

Re: shells/bash port, add a knob which symlinks to /bin/bash ?

2014-09-13 Thread Nathan Whitehorn
On 09/13/14 11:32, Craig Rodrigues wrote: On Fri, Sep 12, 2014 at 2:38 PM, Bryan Drewery bdrew...@freebsd.org 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

Re: shells/bash port, add a knob which symlinks to /bin/bash ?

2014-09-13 Thread Andreas Nilsson
On Sat, Sep 13, 2014 at 8:39 PM, Nathan Whitehorn nwhiteh...@freebsd.org wrote: On 09/13/14 11:32, Craig Rodrigues wrote: On Fri, Sep 12, 2014 at 2:38 PM, Bryan Drewery bdrew...@freebsd.org wrote: There's no reason for bash (and perl) to be exceptions to the 24000 other ports that install

Re: shells/bash port, add a knob which symlinks to /bin/bash ?

2014-09-13 Thread Slawa Olhovchenkov
On Fri, Sep 12, 2014 at 04:38:25PM -0500, Bryan Drewery wrote: No (as portmgr). Ports should not be touching the base system like this. Let's NOT go backwards and add a /bin/bash. In fact the /usr/bin/perl one will be removed soon as well. This is (for perl) may break many 3rd party

Re: shells/bash port, add a knob which symlinks to /bin/bash ?

2014-09-13 Thread Nathan Whitehorn
As a slight distraction from the topic, is this actually possible in general? I'm thinking in particular of ports that install kernel modules. Since LOCALBASE may be (and very often is) a different file system from /, such modules cannot be accessible to loader and so can't be loaded in early

Re: shells/bash port, add a knob which symlinks to /bin/bash ?

2014-09-13 Thread Dreamcat4
Right, well here is another one: The missing symlink for /etc/ssl/cert.pem There is no reason it should not be in ${prefix}/etc/ssl/cert.pem Except that the folder etc/ssl/ only exists in base. Without this symlink, then SSL certs aren't found by the 'fetch' command and many significant

Re: shells/bash port, add a knob which symlinks to /bin/bash ?

2014-09-13 Thread Julian Elischer
On 9/14/14, 2:32 AM, Craig Rodrigues wrote: 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

Re: shells/bash port, add a knob which symlinks to /bin/bash ?

2014-09-13 Thread Julian Elischer
On 9/14/14, 11:40 AM, Julian Elischer wrote: On 9/14/14, 2:32 AM, Craig Rodrigues wrote: 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

Re: shells/bash port, add a knob which symlinks to /bin/bash ?

2014-09-12 Thread Bryan Drewery
No (as portmgr). Ports should not be touching the base system like this. Let's NOT go backwards and add a /bin/bash. In fact the /usr/bin/perl one will be removed soon as well. If we can actually eliminate ports touching /usr and / (not including /usr/local and /var) then we gain a very large

Re: shells/bash port, add a knob which symlinks to /bin/bash ?

2014-09-12 Thread Baptiste Daroussin
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

RE: shells/bash port, add a knob which symlinks to /bin/bash ?

2014-09-12 Thread Rang, Anton
If you want interoperability just use /usr/bin/env bash as a shebang. That doesn't work for this use case -- the user shell coming from LDAP -- but I agree that the port shouldn't be modifying /usr/bin. It's easy enough to add the symlink manually after installing the port if you're in this

RE: shells/bash port, add a knob which symlinks to /bin/bash ?

2014-09-12 Thread Benjamin Kaduk
On Fri, 12 Sep 2014, Rang, Anton wrote: If you want interoperability just use /usr/bin/env bash as a shebang. That doesn't work for this use case -- the user shell coming from LDAP -- but I agree that the port shouldn't be modifying /usr/bin. Here at MIT, where our Athena environment has a

Re: shells/bash port, add a knob which symlinks to /bin/bash ?

2014-09-12 Thread Alfred Perlstein
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

Re: shells/bash port, add a knob which symlinks to /bin/bash ?

2014-09-12 Thread Garrett Cooper
On Sep 12, 2014, at 14:53, Benjamin Kaduk ka...@mit.edu wrote: On Fri, 12 Sep 2014, Rang, Anton wrote: If you want interoperability just use /usr/bin/env bash as a shebang. That doesn't work for this use case -- the user shell coming from LDAP -- but I agree that the port shouldn't be

RE: shells/bash port, add a knob which symlinks to /bin/bash ?

2014-09-12 Thread Daniel Eischen
On Fri, 12 Sep 2014, Rang, Anton wrote: If you want interoperability just use /usr/bin/env bash as a shebang. That doesn't work for this use case -- the user shell coming from LDAP -- but I agree that the port shouldn't be modifying /usr/bin. It's easy enough to add the symlink manually

Re: shells/bash port, add a knob which symlinks to /bin/bash ?

2014-09-12 Thread Lyndon Nerenberg
On Sep 12, 2014, at 2:40 PM, Baptiste Daroussin b...@freebsd.org wrote: 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

Re: shells/bash port, add a knob which symlinks to /bin/bash ?

2014-09-12 Thread Craig Rodrigues
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

Re: shells/bash port, add a knob which symlinks to /bin/bash ?

2014-09-12 Thread Subbsd
On Sat, Sep 13, 2014 at 2:23 AM, Craig Rodrigues rodr...@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

Re: shells/bash port, add a knob which symlinks to /bin/bash ?

2014-09-12 Thread Brooks Davis
On Sat, Sep 13, 2014 at 02:33:58AM +0400, Subbsd wrote: On Sat, Sep 13, 2014 at 2:23 AM, Craig Rodrigues rodr...@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. This is the

Re: shells/bash port, add a knob which symlinks to /bin/bash ?

2014-09-12 Thread Lyndon Nerenberg
On Sep 12, 2014, at 3:23 PM, Craig Rodrigues rodr...@freebsd.org wrote: 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

Re: shells/bash port, add a knob which symlinks to /bin/bash ?

2014-09-12 Thread Bryan Drewery
On 9/12/2014 5:45 PM, Lyndon Nerenberg wrote: On Sep 12, 2014, at 3:23 PM, Craig Rodrigues rodr...@freebsd.org wrote: 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

Re: shells/bash port, add a knob which symlinks to /bin/bash ?

2014-09-12 Thread Lyndon Nerenberg
On Sep 12, 2014, at 3:55 PM, Bryan Drewery bdrew...@freebsd.org wrote: There already is one and ports requires using it! Doh! signature.asc Description: Message signed with OpenPGP using GPGMail

Re: shells/bash port, add a knob which symlinks to /bin/bash ?

2014-09-12 Thread Alfred Perlstein
On 9/12/14 3:23 PM, 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