Author: robert
Date: 2011-07-23 23:36:31 -0600 (Sat, 23 Jul 2011)
New Revision: 1629

Added:
   trunk/BOOK/chapter06/attr.xml
Log:
Added Attr to chapter 6. Thanks entirely to BLFS for their Attr page.

Added: trunk/BOOK/chapter06/attr.xml
===================================================================
--- trunk/BOOK/chapter06/attr.xml                               (rev 0)
+++ trunk/BOOK/chapter06/attr.xml       2011-07-24 05:36:31 UTC (rev 1629)
@@ -0,0 +1,134 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
+  "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd"; [
+  <!ENTITY % general-entities SYSTEM "../general.ent">
+  %general-entities;
+]>
+
+<sect1 id="ch-system-attr" role="wrap">
+  <?dbhtml filename="attr.html"?>
+
+  <sect1info condition="script">
+    <productname>attr</productname>
+    <productnumber>&attr-version;</productnumber>
+    <address>&attr-url;</address>
+  </sect1info>
+
+  <title>Attr-&attr-version;</title>
+
+  <indexterm zone="ch-system-attr">
+    <primary sortas="a-Attr">Attr</primary>
+  </indexterm>
+
+  <sect2 role="package">
+    <title/>
+
+    <para>The Attr package contains utilities and libraries for managing
+    filesystem extended attributes.</para>
+
+    <segmentedlist>
+      <segtitle>&buildtime;</segtitle>
+      <segtitle>&diskspace;</segtitle>
+
+      <seglistitem>
+        <seg>&attr-ch6-sbu;</seg>
+        <seg>&attr-ch6-du;</seg>
+      </seglistitem>
+    </segmentedlist>
+
+  </sect2>
+
+  <sect2 role="installation">
+    <title>Installation of Attr</title>
+
+    <para>Add a missing test script:</para>
+
+<screen><userinput remap="pre">cat &gt; test/sort-getfattr-output &lt;&lt; 
"EOF"
+#! /usr/bin/perl -w
+
+undef $/;
+print join("\n\n", sort split(/\n\n/, &gt;&lt;)), "\n\n";
+EOF
+chmod 755 test/sort-getfattr-output</userinput></screen>
+
+    <para>Modify the documentation directory so that it is a versioned
+    directory and also adds support for a DESTDIR installation:</para>
+
+<screen><userinput remap="pre">sed -i -e 's|/@pkg_name@|&amp;-@pkg_version@|' \
+       -e 's|@prefix|$(DESTDIR)&amp;|'         \
+       -e 's|@libexec|$(DESTDIR)&amp;|'        \
+    include/builddefs.in</userinput></screen>
+
+    <para>Modify the <filename>configure</filename> script to use
+    <command>file</command> from <filename 
class="directory">/tools</filename>:</para>
+
+<screen><userinput remap="pre">sed -i 's@/usr/bin/file@/tools/bin/file@g' 
configure</userinput></screen>
+
+    <para>Prepare Attr for compilation:</para>
+<!-- FIXME: msgmerge and xgettext may not be needed to build ATTR, and as such
+            the Gettext package in chapter 5 may be reverted to only installing
+           msgfmt. The diffs of the installed files needs to be compared
+           whether we use /tools/bin/msgmerge or /tools/bin/true. Also check
+           the ACL package the same way. -->
+<screen><userinput remap="configure">MAKE=/tools/bin/make 
MSGFMT=/tools/bin/msgfmt \
+MSGMERGE=/tools/bin/msgmerge XGETTEXT=/tools/bin/xgettext \
+./configure --prefix=/usr --libexecdir=/usr/lib</userinput></screen>
+
+    <para>Compile the package:</para>
+
+<screen><userinput remap="make">make</userinput></screen>
+
+    <para>To test the results, issue:</para>
+<!-- FIXME: Find out what is wrong with the test suite. -->
+<screen><userinput remap="test">make tests root-tests 
ext-tests</userinput></screen>
+
+    <para>Install the package:</para>
+
+<screen><userinput remap="install">make install
+chmod -v 755 /usr/lib/libattr.{la,so.1.1.0}
+rm -v /usr/lib/libattr.so
+mv -v /usr/lib/libattr.so* /lib
+ln -sfv ../../lib/libattr.so.1.1.0 /usr/lib/libattr.so</userinput></screen>
+
+  </sect2>
+
+
+  <sect2 id="contents-attr" role="content">
+    <title>Contents of Attr</title>
+
+    <segmentedlist>
+      <segtitle>Installed program</segtitle>
+
+      <seglistitem>
+        <seg>attr</seg>
+      </seglistitem>
+    </segmentedlist>
+
+    <variablelist>
+      <bridgehead renderas="sect3">Short Descriptions</bridgehead>
+      <?dbfo list-presentation="list"?>
+      <?dbhtml list-presentation="table"?>
+
+      <varlistentry id="attr">
+         <!-- Don't remove the extra space, it prevet a FOP warning. -->
+        <term><command>attr </command></term>
+        <listitem>
+          <para>copies the given files while expanding the macros that they
+          contain. These macros are either built-in or user-defined and can
+          take any number of arguments. Besides performing macro expansion,
+          <command>attr</command> has built-in functions for including named
+          files, running Unix commands, performing integer arithmetic,
+          manipulating text, recursion, etc. The <command>attr</command> 
program
+          can be used either as a front-end to a compiler or as a macro 
processor
+          in its own right.</para>
+          <indexterm zone="ch-system-attr attr">
+            <primary sortas="b-attr">attr</primary>
+          </indexterm>
+        </listitem>
+      </varlistentry>
+
+    </variablelist>
+
+  </sect2>
+
+</sect1>

-- 
http://linuxfromscratch.org/mailman/listinfo/hlfs-book
FAQ: http://www.linuxfromscratch.org/faq/
Unsubscribe: See the above information page

Reply via email to