On Wed, Mar 14, at 02:46 Dan Nicholson wrote: > On 3/14/07, Ag. Hatzimanikas <[EMAIL PROTECTED]> wrote: > > > > I keep bash around because I want the shell scripts to be portable, and sh > > emulation in zsh > > still is not perfect. > > If that's the only reason, then why not install a shell who's only > intention is to be POSIX compliant like dash or posh. They're much > smaller (nearly 5x, not stripped). Plus, you could help me identify > rogue bashisms in POSIX scripts :) >
I saw your message last night, but it was a little bit late for me so I promised to myself to be the first thing to do today. So here it is, a little more than you expected. :) For the rest. We are talking about dash, which is a standard POSIX shell, quite useful for debugging and very light/small shell that can be used in small systems. >From what I've read Dash (Debian's Ash) is maintained by Herbert Xu from Debian, who was also the Ash maintainer. So since Ash is not longer under development, I am proposing to drop Ash for Dash. As a first step, I created a patch to include Dash into the Book - I didn't commented out the Ash page. Dan, I didn't applied the debian patch since from what I've saw it's debian specific stuff (correct me if I am wrong). I also placed the dash binary into /bin, which seems a natural choice, plus debian do the same. I also make use of the --mandir, since the default location is $PREFIX/man. This is only for FHS compliance. I didn't create any symbolic link to /bin/sh either. I also found that if I was running 'LANG=C make', I had the same problem with yours [1], so I changed to 'LC_ALL=C make' and now it seems to works properly. So, ff there is no objection I would like to see it in the Book. Dan or anyone else, feel free to make your adjustments to the patch, I will be grateful to correct any mistakes. 1. http://linuxfromscratch.org/pipermail/alfs-discuss/2007-February/009135.html P.S Randy, If you want I can create a ticket for it, although for some easy stuff like this I prefer the flexibility of the mailing list.
Index: postlfs/shells/shells.xml =================================================================== --- postlfs/shells/shells.xml (revision 6666) +++ postlfs/shells/shells.xml (working copy) @@ -23,5 +23,6 @@ <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="ash.xml"/> <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="tcsh.xml"/> <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="zsh.xml"/> + <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="dash.xml"/> </chapter> Index: postlfs/shells/dash.xml =================================================================== --- postlfs/shells/dash.xml (revision 0) +++ postlfs/shells/dash.xml (revision 0) @@ -0,0 +1,160 @@ +<?xml version="1.0" encoding="ISO-8859-1"?> +<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN" + "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd" [ + <!ENTITY % general-entities SYSTEM "../../general.ent"> + %general-entities; + + <!ENTITY dash-download-http "http://ftp.debian.org/debian/pool/main/d/dash/dash_0.5.3.orig.tar.gz"> + <!ENTITY dash-download-ftp ""> + <!ENTITY dash-md5sum "1a3cd6669459be4344ec55ec9d4914f8"> + <!ENTITY dash-size "200 KB"> + <!ENTITY dash-buildsize "1.8 MB"> + <!ENTITY dash-time "0.1 SBU"> + +]> + +<sect1 id="dash" xreflabel="Dash-&dash-version;"> + <?dbhtml filename="dash.html"?> + + <sect1info> + <othername>$LastChangedBy: randy $</othername> + <date>$Date: 2007-01-30 22:24:11 +0200 (Τρι, 30 Ιαν 2007) $</date> + </sect1info> + + <title>Dash-&dash-version;</title> + + <indexterm zone="dash"> + <primary sortas="a-Dash">Dash</primary> + </indexterm> + + <sect2 role="package"> + <title>Introduction to Dash</title> + + <para><application>Dash</application> is a POSIX compliant shell. + It can be usefully installed as /bin/sh, or as the default shell either + of root or of a second user with a userid of 0 (because it depends on fewer libraries, + and is therefore less likely to be affected by an upgrade problem or a disk failure). + It is also useful for checking that a script uses only POSIX syntax. + </para> + + + <bridgehead renderas="sect3">Package Information</bridgehead> + <itemizedlist spacing="compact"> + <listitem> + <para>Download (HTTP): <ulink url="&dash-download-http;"/></para> + </listitem> + <listitem> + <para>Download (FTP): <ulink url="&dash-download-ftp;"/></para> + </listitem> + <listitem> + <para>Download MD5 sum: &dash-md5sum;</para> + </listitem> + <listitem> + <para>Download size: &dash-size;</para> + </listitem> + <listitem> + <para>Estimated disk space required: &dash-buildsize;</para> + </listitem> + <listitem> + <para>Estimated build time: &dash-time;</para> + </listitem> + </itemizedlist> + + <para condition="html" role="usernotes">User Notes: + <ulink url="&blfs-wiki;/dash"/></para> + + </sect2> + + <sect2 role="installation"> + <title>Installation of Dash</title> + + <para>Install <application>Dash</application> by running the following + commands:</para> + +<screen><userinput>./configure --bindir=/bin --mandir=/usr/share/man && +LC_ALL=C make</userinput></screen> + + <para>Now, as the <systemitem class="username">root</systemitem> user:</para> + +<screen role="root"><userinput>make install</userinput></screen> + + </sect2> + + <sect2 role="commands"> + <title>Command Explanations</title> + + <para><parameter>--bindir=/bin</parameter>: This parameter place the dash binary + into the root filesystem. + </para> + </sect2> + + <sect2 role="configuration"> + <title>Configuring Dash</title> + + <sect3 id="dash-config"> + <title>Config Files</title> + + <para><application>Dash</application> sources + <filename>/etc/profile</filename> and + <filename>$HOME/.profile</filename></para> + + <indexterm zone="dash dash-config"> + <primary sortas="e-etc-profile">/etc/profile</primary> + </indexterm> + + <indexterm zone="dash dash-config"> + <primary sortas="e-AHOME-.profile">$HOME/.profile</primary> + </indexterm> + + </sect3> + + <sect3> + <title>Configuration Information</title> + + <para>Update <filename>/etc/shells</filename> to include the + <application>Dash</application> shell. Run as the + <systemitem class="username">root</systemitem> user:</para> + +<screen role="root"><userinput>cat >> /etc/shells << "EOF" +<literal>/bin/dash</literal> +EOF</userinput></screen> + + </sect3> + + </sect2> + + <sect2 role="content"> + <title>Contents</title> + + <segmentedlist> + <segtitle>Installed Programs</segtitle> + <segtitle>Installed Libraries</segtitle> + <segtitle>Installed Directories</segtitle> + + <seglistitem> + <seg>dash</seg> + <seg>None</seg> + <seg>None</seg> + </seglistitem> + </segmentedlist> + + <variablelist> + <bridgehead renderas="sect3">Short Description</bridgehead> + <?dbfo list-presentation="list"?> + <?dbhtml list-presentation="table"?> + + <varlistentry id="Dash-prog"> + <term><command>Dash</command></term> + <listitem> + <para>is a POSIX compliant shell.</para> + <indexterm zone="dash Dash-prog"> + <primary sortas="b-dash">dash</primary> + </indexterm> + </listitem> + </varlistentry> + + </variablelist> + + </sect2> + +</sect1> Index: general.ent =================================================================== --- general.ent (revision 6666) +++ general.ent (working copy) @@ -89,6 +89,7 @@ <!ENTITY ash-version "0.4.0"> <!ENTITY tcsh-version "6.14.00"> <!ENTITY zsh-version "4.2.6"> +<!ENTITY dash-version "0.5.3"> <!-- Part III --> <!-- Chapter 8 -->
-- http://linuxfromscratch.org/mailman/listinfo/blfs-dev FAQ: http://www.linuxfromscratch.org/blfs/faq.html Unsubscribe: See the above information page
