Date: Sun, 16 Apr 2000 07:52:00 -0700 From: Doug Barton <Doug@gorean.org> To: Warner Losh <imp@village.org> Cc: Cy Schubert - ITSD Open Systems Group <Cy.Schubert@uumail.gov.bc.ca>, freebsd-arch@freebsd.org Subject: Re: Shells Message-ID: <38F9D390.56CAF339@gorean.org> References: <200004152356.e3FNup102274@cwsys.cwsent.com> <200004160306.VAA30436@harmony.village.org>
next in thread | previous in thread | raw e-mail | index | archive | help
Warner Losh wrote: > > In message <200004152356.e3FNup102274@cwsys.cwsent.com> Cy Schubert - ITSD Open Systems Group writes: > : With commit of tcsh, I'd like to raise another question. Are there any > : plans to replace sh with bash. Granted they're not 100% compatible, > > What does this mean. If it means that sh scripts won't run on BASH, > then I'd say the odds are very low. tcsh runs all csh scripts as far > as I know. No examples were held up in the last batch of shell > jihads. IIRC, the last time replacing /bin/sh came up several people experimented with zsh in POSIX mode and found a few small, gratuitous differences in our sh that cropped up during a make world. Results with Bash should be similar. make seems to be the easiest way to find problems of this sort. I am 99% sure that system things like the rc* scripts would not present a difficulty, and if they did I'd be willing to help fix them. > : Another point to consider is that most people install who use a Bourne > : Shell the bash port, just like Csh users install the tcsh port. I > : think fewer people would be inconvenienced by the replacement of sh > : with bash than by not doing so. > : > : Anyone care to comment? > > My concerns would be compatibility with the existing system and size. > If it bloats the current /bin/sh to much larger than the 400k it has > become, then I'd be reluctant. I just compiled Bash 2.04 with the following: CFLAGS="-O -pipe" ./configure --enable-minimal-config --enable-static-link This gives me a shell of 420k unstripped, 361k stripped. On my -current system our /bin/sh is 430k. If we were to include it in the tree I'd advocate for the sh-style minimal config compiled static in /bin, and the full shell compiled dynamic in /usr/bin. The full shell compiled static and stripped is about 740k, which is too big for /bin IMO. Note, in order to compile Bash static on 4.0+ you have to comment out the definition of the "trace" function in error.c. It conflicts with the ncurses version of that same function. Fortunately the trace function in bash is just part of the debugging code, and isn't used in normal operation. All that said, and keeping in mind that I am a huge Bash fan, and have been using it for almost 7 years, I would be opposed to including it in the tree, simply because of the GPL. While I understand that there are things in the tree that are GPL'ed that we "can't live without," like gcc, I think that there are other suitable candidates in the Bourne shell world that provide the many attractive features that Bash does, without the encumberance of the GPL. In case anyone is tempted to ask, "Then why haven't you switched?" the answer is simply laziness on my part. I'm willing to make decisions for myself that I'm not willing to make for the project as a whole. The primary criterion that I suggest for selection of a suitable replacement are a strict adherence to POSIX standards (or at least a bash-like POSIX mode), and a totally unencumbered (and/or BSD) license. That pretty much leaves us with pdksh and zsh. I realize that the other BSD's have chosen pdksh, but the last time we went round this mulberry bush I thought the zsh advocates made a very persuasive case. The secondary criterion for a replacement shell should definitely be its feature set, and I've had "try zsh" on my list of things to do ever since that last round of shell debates, based on the arguments put forward by the zsh advocates. I'll have more in response to other topics on this thread, but I wanted to throw some facts into the mix at this point to help spur conversation. Doug -- Excess on occasion is exhilarating. It prevents moderation from acquiring the deadening effect of a habit. -- W. Somerset Maugham To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-arch" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?38F9D390.56CAF339>