From owner-freebsd-questions@FreeBSD.ORG Sun Nov 16 10:41:05 2008 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 216CA106568F for ; Sun, 16 Nov 2008 10:41:05 +0000 (UTC) (envelope-from jdc@koitsu.dyndns.org) Received: from QMTA09.emeryville.ca.mail.comcast.net (qmta09.emeryville.ca.mail.comcast.net [76.96.30.96]) by mx1.freebsd.org (Postfix) with ESMTP id F20438FC16 for ; Sun, 16 Nov 2008 10:41:04 +0000 (UTC) (envelope-from jdc@koitsu.dyndns.org) Received: from OMTA04.emeryville.ca.mail.comcast.net ([76.96.30.35]) by QMTA09.emeryville.ca.mail.comcast.net with comcast id fmf81a00A0lTkoCA9mh4h6; Sun, 16 Nov 2008 10:41:04 +0000 Received: from koitsu.dyndns.org ([69.181.141.110]) by OMTA04.emeryville.ca.mail.comcast.net with comcast id fmh31a0042P6wsM8Qmh39t; Sun, 16 Nov 2008 10:41:04 +0000 X-Authority-Analysis: v=1.0 c=1 a=6I5d2MoRAAAA:8 a=QycZ5dHgAAAA:8 a=c_L9A21Py11DJUw956AA:9 a=zVYwxMwTxxNQFRFOG5YA:7 a=BqueFV88KIRNclOdX0ksQJRoAs0A:4 a=EoioJ0NPDVgA:10 a=LY0hPdMaydYA:10 Received: by icarus.home.lan (Postfix, from userid 1000) id 6CAEB33C36; Sun, 16 Nov 2008 02:41:03 -0800 (PST) Date: Sun, 16 Nov 2008 02:41:03 -0800 From: Jeremy Chadwick To: perryh@pluto.rain.com Message-ID: <20081116104103.GA98266@icarus.home.lan> References: <20081110203643.GH27646@obspm.fr> <200811102235.46971.fbsd.questions@rachie.is-a-geek.net> <4ad871310811101530p7b2baa0fk7f7b5118e314c11d@mail.gmail.com> <4918CE42.3050504@ccstores.com> <20081115061957.GA10998@ourbrains.org> <20081116023239.GA89267@icarus.home.lan> <20081116033624.GA13618@ourbrains.org> <20081116050107.GA91940@icarus.home.lan> <491fd833.zbV+im4fHqUJ5RRJ%perryh@pluto.rain.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <491fd833.zbV+im4fHqUJ5RRJ%perryh@pluto.rain.com> User-Agent: Mutt/1.5.18 (2008-05-17) Cc: freebsd-questions@freebsd.org Subject: Re: root /etc/csh X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 16 Nov 2008 10:41:05 -0000 On Sun, Nov 16, 2008 at 12:22:11AM -0800, perryh@pluto.rain.com wrote: > > 3) You can build bash statically; make WITH_STATIC_BASH=true. I do > > not know the true reason why the port is not built statically by > > default, but I can give you a damn good reason why it shouldn't be: > > complete and total wasted memory. > > > > Take into consideration environments where there are hundreds (or at > > my place of work, thousands) of users logged into a machine at once. > > Many of those are going to have /usr/local/bin/bash as their shell. > > A statically-linked version of bash would waste significant amounts > > of memory, while a dynamically-linked/shared version would ease that > > pain. The same applies for any static vs. dynamic program. > > How so? Wouldn't a single in-memory instance of the bash text > segment be shared among all bash processes, across all users? http://lists.freebsd.org/pipermail/freebsd-stable/2007-August/thread.html#36647 > A better reason is that security updates to shared libs often > update only the .so files, expecting the binaries that use them > to automatically pick up the new versions. Any static executable > should be rebuilt any time there is a security update to a shared > lib that it would be using were it linked dynamically. Yup, that's another reason. > That said, perhaps it would be reasonable for shell ports to > build both a dynamically-linked instance to be installed in > /usr/local/bin, and a statically-linked instance to be installed > in, say, /usr/local/static. Those who want to use bash as the > root shell could copy it from there to /bin or /sbin. This part of the thread should be moved to freebsd-ports, or obrien@ pulled in here. -- | Jeremy Chadwick jdc at parodius.com | | Parodius Networking http://www.parodius.com/ | | UNIX Systems Administrator Mountain View, CA, USA | | Making life hard for others since 1977. PGP: 4BD6C0CB |