Re: bash-static on OpenBSD 3.9

2006-07-08 Thread Tobias Ulmer
On Fri, Jul 07, 2006 at 10:18:00PM -0500, Daniel A. Ramaley wrote:
 If anyone has been lamenting the loss of the bash-static package, this 
 evening i took the time to figure out how to create something that 
 works just as well. I peeked in the Makefile for bash on an older 
 version of OpenBSD to see how the static version differs. The 
 difference is when compiling bash the CONFIGURE_ENV variable needs to 
 be set. The full steps i used to build a bash-static package were:
 
 First install the ports tarball from the install CD. You will also need 
 to have the compilers install set installed (it is by default). Then:
 # cd /usr/ports/shells/bash
 # make print-build-depends
 This will print a list of dependencies. Install them from packages. You 
 could also compile them from ports, but why when other people have 
 already done the excellent work of providing the packages?
 # export CONFIGURE_ENV=LDFLAGS=-static
 # make package
 That's it! The new bash package will be in /usr/ports/packages/i386/all 
 (of course, i386 will be different for other platforms). It won't 
 have -static in the name, but you can always rename the file before 
 installing on other systems if you really want.
 -- 
 
 Dan RamaleyDial Center 118, Drake University
 Network Programmer/Analyst 2407 Carpenter Ave
 +1 515 271-4540Des Moines IA 50311 USA
 


... makes no sense to me. bash is installed in /usr, the same place where
all shared libraries are. If /usr does not come up for some reason, you
can't log in with ssh any more.

bash needs gettext, c and termcap. The later two are in the base system
and gettext is needed in nearly any program as dependency. So, it
doesn't even save space (like you could pkg_delete gettext after compiling
bash-static)

shells are static for system maintenance, that is, small file system
with /bin, /sbin etc., but not /usr, /var, /tmp, ...

If you really want bash-static to make sense, modify PLIST and install it
to /bin.

Tobias



Re: bash-static on OpenBSD 3.9

2006-07-08 Thread Joachim Schipper
On Sat, Jul 08, 2006 at 05:42:39PM +0200, Tobias Ulmer wrote:
 On Fri, Jul 07, 2006 at 10:18:00PM -0500, Daniel A. Ramaley wrote:
  If anyone has been lamenting the loss of the bash-static package, this 
  evening i took the time to figure out how to create something that 
  works just as well. I peeked in the Makefile for bash on an older 
  version of OpenBSD to see how the static version differs. The 
  difference is when compiling bash the CONFIGURE_ENV variable needs to 
  be set. The full steps i used to build a bash-static package were:

  # export CONFIGURE_ENV=LDFLAGS=-static

 ... makes no sense to me. bash is installed in /usr, the same place where
 all shared libraries are. If /usr does not come up for some reason, you
 can't log in with ssh any more.
 
 bash needs gettext, c and termcap. The later two are in the base system
 and gettext is needed in nearly any program as dependency. So, it
 doesn't even save space (like you could pkg_delete gettext after compiling
 bash-static)
 
 shells are static for system maintenance, that is, small file system
 with /bin, /sbin etc., but not /usr, /var, /tmp, ...
 
 If you really want bash-static to make sense, modify PLIST and install it
 to /bin.

Additionally, it's not like it's difficult to hack the ksh login script
to exec bash instead, provided /usr/local/bin/bash is available. This
provides for a 'convenient' root shell without this sort of strangeness
(also: what happens if you do pkg_add -u?).

Joachim



bash-static on OpenBSD 3.9

2006-07-07 Thread Daniel A. Ramaley
If anyone has been lamenting the loss of the bash-static package, this 
evening i took the time to figure out how to create something that 
works just as well. I peeked in the Makefile for bash on an older 
version of OpenBSD to see how the static version differs. The 
difference is when compiling bash the CONFIGURE_ENV variable needs to 
be set. The full steps i used to build a bash-static package were:

First install the ports tarball from the install CD. You will also need 
to have the compilers install set installed (it is by default). Then:
# cd /usr/ports/shells/bash
# make print-build-depends
This will print a list of dependencies. Install them from packages. You 
could also compile them from ports, but why when other people have 
already done the excellent work of providing the packages?
# export CONFIGURE_ENV=LDFLAGS=-static
# make package
That's it! The new bash package will be in /usr/ports/packages/i386/all 
(of course, i386 will be different for other platforms). It won't 
have -static in the name, but you can always rename the file before 
installing on other systems if you really want.
-- 

Dan RamaleyDial Center 118, Drake University
Network Programmer/Analyst 2407 Carpenter Ave
+1 515 271-4540Des Moines IA 50311 USA