In order to have a familiar (fast) environment in a situation where I can't mount all my partitions, I want bash at /bin/bash, statically built. I also wan't portupgrade to upgrade bash safely without locking me out of accounts which specify their shell as /bin/bash. This should be no problem. There's an option for building a static binary, and I can set the PREFIX variable. Unfortunately, Compilation fails if I try to set PREFIX="", and if I set PREFIX=/, everything builds and installs OK, except that /etc/shells gets a line with '//bin/bash' instead of '/bin/bash', which means I can get locked out. Sure, most people don't install this way, but the consequences are serious. Fix: The following changes seem to do the trick. ------------------------------------------------------------------- Andrew McNaughton http://www.scoop.co.nz/ andrew@scoop.co.nz Mobile: +61 422 753 792 pgp keyid: 1C7A8CFD -- "Those who can make you believe absurdities can make you commit atrocities." -- Voltaire--6dpXZW52iBhVe1X5PiTnrnACsN5NEwuT0suVuoXcJwRvXVUu Content-Type: text/plain; name="file.diff" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="file.diff" --- bash.orig/pkg-deinstall Fri Oct 15 02:24:20 2004 +++ bash/pkg-deinstall Sun Apr 9 13:24:51 2006 @@ -3,7 +3,12 @@ # $FreeBSD: ports/shells/bash/pkg-deinstall,v 1.2 2004/10/14 13:24:20 eik Exp $ # -BASH="${PKG_PREFIX-/usr/local}/bin/bash" +if [ x"$PKG_PREFIX" = x"/" ]; then + BASH="/bin/bash" +else + BASH="${PKG_PREFIX-/usr/local}/bin/bash" +fi + SHELLS="${PKG_DESTDIR-}/etc/shells" case $2 in diff -urN bash.orig/pkg-install bash/pkg-install --- bash.orig/pkg-install Fri Oct 15 02:24:20 2004 +++ bash/pkg-install Sun Apr 9 13:24:39 2006 @@ -3,7 +3,12 @@ # $FreeBSD: ports/shells/bash/pkg-install,v 1.2 2004/10/14 13:24:20 eik Exp $ # -BASH="${PKG_PREFIX-/usr/local}/bin/bash" +if [ x"$PKG_PREFIX" = x"/" ]; then + BASH="/bin/bash" +else + BASH="${PKG_PREFIX-/usr/local}/bin/bash" +fi + SHELLS="${PKG_DESTDIR-}/etc/shells" case $2 in How-To-Repeat: cd /usr/ports/shells/bash make install clean PREFIX=/ WITH_STATIC_BASH grep '//bin/bash' /etc/shells
Responsible Changed From-To: freebsd-ports-bugs->obrien Over to maintainer.
obrien 2007-06-28 23:33:44 UTC FreeBSD ports repository Modified files: shells/bash pkg-deinstall pkg-install Log: Support PREFIX=/ PR: 95566 Submitted by: Andrew McNaughton <andrew@scoop.co.nz> Revision Changes Path 1.4 +3 -3 ports/shells/bash/pkg-deinstall 1.4 +3 -3 ports/shells/bash/pkg-install _______________________________________________ cvs-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/cvs-all To unsubscribe, send any mail to "cvs-all-unsubscribe@freebsd.org"
State Changed From-To: open->closed Please see if the latest commit to shells/bash meets your needs. thanks!