<?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;

  <!ENTITY attr-download-http "http://download.savannah.gnu.org/releases/attr/attr-&attr-version;.src.tar.gz">
  <!ENTITY attr-download-ftp  " ">
  <!ENTITY attr-md5sum        "84f58dec00b60f2dc8fd1c9709291cc7">
  <!ENTITY attr-size          "336 KB">
  <!ENTITY attr-buildsize     "3.5 MB">
  <!ENTITY attr-time          "0.1 SBU">
]>

<sect1 id="attr" xreflabel="attr-&attr-version;">
  <?dbhtml filename="attr.html"?>

  <sect1info>
    <othername>$LastChangedBy: bdubbs $</othername>
    <date>$Date: 2014-04-28 17:13:36 -0400 (Mon, 28 Apr 2014) $</date>
  </sect1info>

  <title>attr-&attr-version;</title>

  <indexterm zone="attr">
    <primary sortas="a-attr">attr</primary>
  </indexterm>

  <sect2 role="package">
    <title>Introduction to attr</title>

    <para>The <application>attr</application> package contains utilities to
    administer the extended attributes on filesystem objects.</para>

    &lfs75_checked;

    <bridgehead renderas="sect3">Package Information</bridgehead>
    <itemizedlist spacing="compact">
      <listitem>
        <para>Download (HTTP): <ulink url="&attr-download-http;"/></para>
      </listitem>
      <listitem>
        <para>Download (FTP): <ulink url="&attr-download-ftp;"/></para>
      </listitem>
      <listitem>
        <para>Download MD5 sum: &attr-md5sum;</para>
      </listitem>
      <listitem>
        <para>Download size: &attr-size;</para>
      </listitem>
      <listitem>
        <para>Estimated disk space required: &attr-buildsize;</para>
      </listitem>
      <listitem>
        <para>Estimated build time: &attr-time;</para>
      </listitem>
    </itemizedlist>

    <para condition="html" role="usernotes">User Notes:
    <ulink url="&blfs-wiki;/attr"/></para>

  </sect2>

  <sect2 role="installation">
    <title>Installation of attr</title>

    <para>Install <application>attr</application> by running the following
    commands:</para>

<screen><userinput>sed -i -e 's|/@pkg_name@|&amp;-@pkg_version@|' include/builddefs.in &amp;&amp;

INSTALL_USER=root  \
INSTALL_GROUP=root \
./configure --prefix=/usr --disable-static &amp;&amp;
make</userinput></screen>

    <para>There are three sets of tests that come with this package. Issue the
    following to execute all three:
    <command>make tests root-tests ext-tests</command>.  For meaningful results,
    the tests need to be carried out on a file system that supports extended
    attributes.</para>

    <para>Now, as the <systemitem class="username">root</systemitem> user:</para>

<!-- Package uses DIST_ROOT instead of DESTDIR -->
<screen role="root"><userinput>make install install-dev install-lib &amp;&amp;
chmod -v 755 /usr/lib/libattr.so &amp;&amp;
mv -v /usr/lib/libattr.so.* /lib &amp;&amp;
ln -sfv ../../lib/libattr.so.1 /usr/lib/libattr.so</userinput></screen>

  </sect2>

  <sect2 role="commands">
    <title>Command Explanations</title>

    <para><command>sed ... include/builddefs.in</command>: This command
    modifies the documentation directory so that it is a versioned
    directory.</para>

    <xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
      href="../../xincludes/static-libraries.xml"/>

  </sect2>

  <sect2 role="configuration">
    <title>Configuring attr</title>
    <sect3><title>Configuration Information</title>

      <para>There is no configuration to <application>attr</application> itself,
      but to get any use out of <application>attr</application>, a filesystem
      needs to support extended attributes.</para>

      <para>One way to achieve this is to add the user_xattr option to an ext3
      filesystem in the <filename>/etc/fstab</filename> file as shown
      below:</para>

<screen># file system  mount-point  type   options                 dump  fsck
#                                                                order

/dev/sda1      /            ext3   defaults,acl,user_xattr 0     2</screen>

    </sect3>

  </sect2>

  <sect2 role="content">
    <title>Contents</title>

    <segmentedlist>
      <segtitle>Installed Programs</segtitle>
      <segtitle>Installed Library</segtitle>
      <segtitle>Installed Directories</segtitle>

      <seglistitem>
        <seg>attr, getfattr, and setfattr</seg>
        <seg>libattr.so</seg>
        <seg>/usr/{include/attr,share/doc/attr-&attr-version;}</seg>
      </seglistitem>
    </segmentedlist>

    <variablelist>
      <bridgehead renderas="sect3">Short Descriptions</bridgehead>
      <?dbfo list-presentation="list"?>
      <?dbhtml list-presentation="table"?>

      <varlistentry id="attr-prog">
        <term><command>attr</command></term>
        <listitem>
          <para>extends attributes on filesystem objects.</para>
          <indexterm zone="attr attr">
            <primary sortas="b-attr">attr</primary>
          </indexterm>
        </listitem>
      </varlistentry>

      <varlistentry id="getfattr">
        <term><command>getfattr</command></term>
        <listitem>
          <para>gets the extended attributes of filesystem objects.</para>
          <indexterm zone="attr getfattr">
            <primary sortas="b-getfattr">getfattr</primary>
          </indexterm>
        </listitem>
      </varlistentry>

      <varlistentry id="setfattr">
        <term><command>setfattr</command></term>
        <listitem>
          <para>sets the extended attributes of filesystem objects.</para>
          <indexterm zone="attr setfattr">
            <primary sortas="b-setfattr">setfattr</primary>
          </indexterm>
        </listitem>
      </varlistentry>

      <varlistentry id="libattr">
        <term><filename class='libraryfile'>libattr.so</filename></term>
        <listitem>
          <para>contains the <application>attr</application> API functions.</para>
          <indexterm zone="attr libattr">
            <primary sortas="c-libattr">libattr.so</primary>
          </indexterm>
        </listitem>
      </varlistentry>

    </variablelist>

  </sect2>

</sect1>
