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 updates /etc/shells?

--


I'd point out that the perl ports have exactly such an option already 
(putting links in /usr/bin, in this case). The CUPS port does too.

-Nathan


Should really be a standalone package.

-Alfred

___
freebsd-current@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to freebsd-current-unsubscr...@freebsd.org


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 - python2.7.

So the precedent of having a metaport which creates symlinks is there.
What folks  have been complaining about in this thread is having symlinks
in the base system directories such as /bin.

My personal feeling is that we should look at this on a case-by-case basis
and allow these types
of ports, such as for /bin/bash but I'm sure others will disagree.
--
Craig
___
freebsd-current@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to freebsd-current-unsubscr...@freebsd.org


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 example is a 
meta-port which creates

symlinks such as  /usr/local/bin/python2 - python2.7.

So the precedent of having a metaport which creates symlinks is there.
What folks  have been complaining about in this thread is having symlinks
in the base system directories such as /bin.

Why do you care what people are complaining about?  Just make the port. :)



My personal feeling is that we should look at this on a case-by-case 
basis and allow these types

of ports, such as for /bin/bash but I'm sure others will disagree.


We already allow such ports, for example a bunch of kmods install into 
/boot/kernel or /boot/modules.


There are always exceptions to rules and for good reasons!

find . -name pkg-plist | xargs grep -A 3 '^@cwd /$'









--
Craig


___
freebsd-current@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to freebsd-current-unsubscr...@freebsd.org


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 touching /usr and / (not including
 /usr/local and /var) then we gain a very large memory optimization for
 package building by being able to ro null-mount these to the build jails.
 
 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.
 
 We install all packages to PREFIX=/usr/local by default. Why should a
 bin symlink be an exception? There's no suggestion for symlinking
 includes or libraries which also hit users often.

Hi Bryan,
I understand portmgr’s reasoning for removing these knobs as it 
improves “portability” (builds and runtime won’t depend on broken code), but I 
see the merits of making a separate package for Linux “compatibility” for the 
various items that people have brought up (mostly the LDAP issue and the 
vendor/legacy script portability issue). Plus it makes the barrier for entry 
lower, and less of a reason for Linux users to complain about how FreeBSD is 
different from Linux. Adding these as options to the port(s) won’t work for 
various reasons, two of which came to mind are:
1. People should be able to install packages from FreeBSD.org instead 
of having to roll their own ports with custom options.
2. It’s best not to build other packages on unportable (/bin/bash) 
behavior.
Thanks!
-Garrett

PS I don’t agree with Fedora/FreeDesktop’s push to move everything to /usr (I 
think it’s a wee bit radical, to say the least, and seems like it’s optimizing 
the wrong thing), but it’s something to keep in mind as this non-portable 
decision may start working its way into upstream ports: 
https://fedoraproject.org/wiki/Features/UsrMove .


signature.asc
Description: Message signed with OpenPGP using GPGMail


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 SSL certs aren't found by the 'fetch'
 command and many significant websites these days can't work without
 SSL. For example github.com (there are others).
 
fetch has been fixed to read the one from localbase first.

regards,
bapt


pgpbciUiZWTKp.pgp
Description: PGP signature


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 [ commands suffices.

 We install all packages to PREFIX=/usr/local by default. Why should a
 bin symlink be an exception? There's no suggestion for symlinking
 includes or libraries which also hit users often.

We'd need something for fsck and thereabouts though...  if /usr is on,
for instance, an ext2 file system (which is part of the kernel after
all), we need the tools early in the boot process, before /usr is there.
___
freebsd-current@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to freebsd-current-unsubscr...@freebsd.org


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 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
___
freebsd-current@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to freebsd-current-unsubscr...@freebsd.org


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 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
___
freebsd-current@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to freebsd-current-unsubscr...@freebsd.org



I'd point out that the perl ports have exactly such an option already 
(putting links in /usr/bin, in this case). The CUPS port does too.

-Nathan
___
freebsd-current@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to freebsd-current-unsubscr...@freebsd.org


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 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
 ___
 freebsd-current@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/freebsd-current
 To unsubscribe, send any mail to freebsd-current-unsubscr...@freebsd.org
 


 I'd point out that the perl ports have exactly such an option already
 (putting links in /usr/bin, in this case). The CUPS port does too.
 -Nathan

 Sorry Nathan, reply all is sometimes harder than it should be.

Just for the uncomfortable stuff: How about systems where env is not in
/usr/bin ?
I had that fun episode on an opensolaris-system...

Best regards
Andreas Nilsson
___
freebsd-current@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to freebsd-current-unsubscr...@freebsd.org


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 scripts.

___
freebsd-current@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to freebsd-current-unsubscr...@freebsd.org


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 boot. This is potentially a problem for wireless 
driver firmware modules, for example.

-Nathan

On 09/12/14 14:38, 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.

If we can actually eliminate ports touching /usr and / (not including
/usr/local and /var) then we gain a very large memory optimization for
package building by being able to ro null-mount these to the build jails.

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.

We install all packages to PREFIX=/usr/local by default. Why should a
bin symlink be an exception? There's no suggestion for symlinking
includes or libraries which also hit users often.

On 9/12/2014 4:12 PM, 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.

--
Craig
___
freebsd-po...@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-ports
To unsubscribe, send any mail to freebsd-ports-unsubscr...@freebsd.org





___
freebsd-current@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to freebsd-current-unsubscr...@freebsd.org


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 websites these days can't work without
SSL. For example github.com (there are others).




On Sat, Sep 13, 2014 at 7:32 PM, Craig Rodrigues rodr...@freebsd.org 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 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
 ___
 freebsd-po...@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/freebsd-ports
 To unsubscribe, send any mail to freebsd-ports-unsubscr...@freebsd.org
___
freebsd-current@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to freebsd-current-unsubscr...@freebsd.org


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 MacOS X are in the vast
majority of where
people are doing development and learning how to write shell scripts these
days.



I agree with Craig here.
we can keep our code pure but the standard shell these days for 
everyone except us is /bin/bash.
There is nothing wrong with FreeSBD deciding that an industry standard 
should be adopted..


While I don't like it when people code stuff at work in bash instead 
of sh, I have to admit it has a lot of
advantages, and I can't really stop them..  It's getting more and more 
common so to some extent we should
probably hide our pride a bit and look at bash (and maybe vim) and 
giving them better standard support.


mailing the symlink is a really small thing.


___
freebsd-current@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to freebsd-current-unsubscr...@freebsd.org


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

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.



I agree with Craig here.
we can keep our code pure but the standard shell these days for 
everyone except us is /bin/bash.
There is nothing wrong with FreeSBD deciding that an industry 
standard should be adopted..


While I don't like it when people code stuff at work in bash instead 
of sh, I have to admit it has a lot of
advantages, and I can't really stop them..  It's getting more and 
more common so to some extent we should
probably hide our pride a bit and look at bash (and maybe vim) and 
giving them better standard support.


mailing the symlink is a really small thing.


err.. making

also I would like to RE-propose some suggestions that I've been making 
now for nearly 15 years.


That we probably should have (at least) two classes of ports.
in the current system we have base and ports
I think we need more granularity than that.

at a minimum we should have  Base, Base ports, and extended ports.
where base ports Must work, and a failure would be enough to hold up 
a release.

base might contain extra hooks for base ports stuff.

Stuff in base-ports would include sendmail, bind,  Xorg, maybe 
appache, openldap, sasl,

possibly even the compilers.

Base ports get special priviledges, and responsibilities.


___
freebsd-current@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to 
freebsd-current-unsubscr...@freebsd.org





___
freebsd-current@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to freebsd-current-unsubscr...@freebsd.org


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 memory optimization for
package building by being able to ro null-mount these to the build jails.

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.

We install all packages to PREFIX=/usr/local by default. Why should a
bin symlink be an exception? There's no suggestion for symlinking
includes or libraries which also hit users often.

On 9/12/2014 4:12 PM, 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.
 
 --
 Craig
 ___
 freebsd-po...@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/freebsd-ports
 To unsubscribe, send any mail to freebsd-ports-unsubscr...@freebsd.org
 


-- 
Regards,
Bryan Drewery



signature.asc
Description: OpenPGP digital signature


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 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


pgpQHo4ikWIyu.pgp
Description: PGP signature


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 situation, or there may be a way to configure the LDAP module to 
map /bin/bash to /usr/local/bin/bash (I haven't looked to see what is supported 
here).

Anton

___
freebsd-current@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to freebsd-current-unsubscr...@freebsd.org


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 long history of providing
a consistent experience across many different platforms, we ended up
limiting the login shells a user could select, to a whitelist we provide
(/bin/sh, /usr/athena/bin/bash, and /usr/athena/bin/tcsh).  (The latter
two are now symlinks to the normal system shells, but they used to be
custom binaries.)

Some people did not like being so restricted, and set their login shell to
/bin/sh, with logic in their dotfiles to re-exec a different shell
depending on the current runtime environment.

-Ben
___
freebsd-current@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to freebsd-current-unsubscr...@freebsd.org


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 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


___
freebsd-current@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to freebsd-current-unsubscr...@freebsd.org


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 modifying /usr/bin.
 
 Here at MIT, where our Athena environment has a long history of providing
 a consistent experience across many different platforms, we ended up
 limiting the login shells a user could select, to a whitelist we provide
 (/bin/sh, /usr/athena/bin/bash, and /usr/athena/bin/tcsh).  (The latter
 two are now symlinks to the normal system shells, but they used to be
 custom binaries.)
 
 Some people did not like being so restricted, and set their login shell to
 /bin/sh, with logic in their dotfiles to re-exec a different shell
 depending on the current runtime environment.

+1 user rc files (not that it would fix this particular case...):

- 
https://github.com/yaneurabeya/scratch/blob/master/bayonetta/home/ngie/dot.bashrc
- 
https://github.com/yaneurabeya/scratch/blob/master/bayonetta/home/ngie/dot.shrc-local

Cheers,
-Garrett


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 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 after installing the port 
if you're in this situation, or there may be a way to configure the 
LDAP module to map /bin/bash to /usr/local/bin/bash (I haven't looked 
to see what is supported here).


We have used LDAP on Solaris for years, and have mixed environments
of Solaris, Linux, and FreeBSD.  We use /usr/local/bin/bash in LDAP
for shells, then either link that to the system /bin/bash or install
more up-to-date bash in /usr/local/bin.  This way you can always
install a more up-to-date shell in /usr/local/bin without changing
the base OS - you don't want base OS shell scripts to break by
updating to a newer shell.

--
DE
___
freebsd-current@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to freebsd-current-unsubscr...@freebsd.org


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 this old 
 version.

The concern is not with shell scripts, it's with the contents of the pw_shell 
field in 'struct passwd'.

I run into this all the time, too, but with ksh.  In my case I just cp a 
static-linked version of whatever ksh variant I happened to build into /bin/ksh 
and call it a day.  It's not like the shell source code is changing every other 
week, even for bash.

--lyndon



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 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 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 bri...@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


 ___
 freebsd-current@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/freebsd-current
 To unsubscribe, send any mail to freebsd-current-unsubscr...@freebsd.org

___
freebsd-current@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to freebsd-current-unsubscr...@freebsd.org


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
 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 bri...@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=AttachFiledo=gettarget=variant-symlinks-for-freebsd.pdf
___
freebsd-current@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to freebsd-current-unsubscr...@freebsd.org


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 approach I took at my previous employer.  It's simple,
works with packages, and people who hate adding things to /bin can avoid
doing so.

 Looks like variant symlink is may be useful for solving this problem
 and it is not cluttered base
 
 https://wiki.freebsd.org/200808DevSummit?action=AttachFiledo=gettarget=variant-symlinks-for-freebsd.pdf

As the person who ported variant symlinks to FreeBSD I can't image how
they could be useful here.  If you need a /bin/bash you need to put a
file system object there (or I supposed hack namei).  Variant symlinks
only allow files to point to different things in different contexts.

-- Brooks


pgpwRGL3Gwnqy.pgp
Description: PGP signature


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 X and Linux on desktops.

Given the rigid nature of shebangs to begin with, it's really not that hard to 
write a sed command that will capture all instances of '#!.../bash[ foo]' and 
wire in an appropriate value of '...'.

In fact, this case is a ripe candidate for a bsd.port.mk command macro.

--lyndon



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 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 harder,
 since many people are exposed to MacOS X and Linux on desktops.
 
 Given the rigid nature of shebangs to begin with, it's really not that hard 
 to write a sed command that will capture all instances of '#!.../bash[ foo]' 
 and wire in an appropriate value of '...'.
 
 In fact, this case is a ripe candidate for a bsd.port.mk command macro.
 
 --lyndon
 

There already is one and ports requires using it!

-- 
Regards,
Bryan Drewery



signature.asc
Description: OpenPGP digital signature


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 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.



Lol, or we could hack the image activator.  :)

-Alfred

___
freebsd-current@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to freebsd-current-unsubscr...@freebsd.org