Prologue fixes
[linux_from_scratch.git] / chapter06 / attr.xml
blob65d509f9a23ce8676c896bab1ab3cc25a5782ba2
1 <?xml version="1.0" encoding="ISO-8859-1"?>
2 <!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
3   "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
4   <!ENTITY % general-entities SYSTEM "../general.ent">
5   %general-entities;
6 ]>
8 <sect1 id="ch-system-attr" role="wrap">
9   <?dbhtml filename="attr.html"?>
11   <sect1info condition="script">
12     <productname>attr</productname>
13     <productnumber>&attr-version;</productnumber>
14     <address>&attr-url;</address>
15   </sect1info>
17   <title>Attr-&attr-version;</title>
19   <indexterm zone="ch-system-attr">
20     <primary sortas="a-Attr">Attr</primary>
21   </indexterm>
23   <sect2 role="package">
24     <title/>
26     <para>The attr package contains utilities to administer the extended
27     attributes on filesystem objects.</para>
29     <segmentedlist>
30       <segtitle>&buildtime;</segtitle>
31       <segtitle>&diskspace;</segtitle>
33       <seglistitem>
34         <seg>&attr-ch6-sbu;</seg>
35         <seg>&attr-ch6-du;</seg>
36       </seglistitem>
37     </segmentedlist>
39   </sect2>
41   <sect2 role="installation">
42     <title>Installation of Attr</title>
44     <para>Modify the documentation directory so that it is a versioned
45     directory:</para>
47 <screen><userinput remap="pre">sed -i -e 's|/@pkg_name@|&amp;-@pkg_version@|' include/builddefs.in</userinput></screen>
49     <para>Prevent installation of manual pages that were already installed by
50     the <xref linkend="man-pages"/> package:</para>
52 <screen><userinput remap="pre">sed -i -e "/SUBDIRS/s|man[25]||g" man/Makefile</userinput></screen>
54     <para>Prepare Attr for compilation:</para>
56 <screen revision="sysv"><userinput remap="configure">./configure --prefix=/usr \
57             --bindir=/bin \
58             --disable-static</userinput></screen>
60 <screen revision="systemd"><userinput remap="configure">./configure --prefix=/usr \
61             --disable-static</userinput></screen>
63     <para>Compile the package:</para>
65 <screen><userinput remap="make">make</userinput></screen>
67     <para>The tests need to be run on a filesystem that supports extended
68     attributes such as the ext2, ext3, or ext4 filesystems. The tests are also
69     known to fail if running multiple simultaneous tests (-j option greater than
70     1).  To test the results, issue:</para>
72 <screen><userinput remap="test">make -j1 tests root-tests</userinput></screen>
74     <para>Install the package:</para>
76 <screen><userinput remap="install">make install install-dev install-lib
77 chmod -v 755 /usr/lib/libattr.so</userinput></screen>
79     <para>The shared library needs to be moved to
80     <filename class="directory">/lib</filename>, and as a result the
81     <filename class="extension">.so</filename> file in
82     <filename class="directory">/usr/lib</filename> will need to be recreated:</para>
84 <screen><userinput remap="install">mv -v /usr/lib/libattr.so.* /lib
85 ln -sfv ../../lib/$(readlink /usr/lib/libattr.so) /usr/lib/libattr.so</userinput></screen>
87   </sect2>
89   <sect2 id="contents-attr" role="content">
90     <title>Contents of Attr</title>
92     <segmentedlist>
93       <segtitle>Installed programs</segtitle>
94       <segtitle>Installed library</segtitle>
95       <segtitle>Installed directories</segtitle>
97       <seglistitem>
98         <seg>attr, getfattr, and setattr</seg>
99         <seg>libattr.so</seg>
100         <seg>/usr/include/attr and /usr/share/doc/attr-&attr-version;</seg>
101       </seglistitem>
102     </segmentedlist>
104     <variablelist>
105       <bridgehead renderas="sect3">Short Descriptions</bridgehead>
106       <?dbfo list-presentation="list"?>
107       <?dbhtml list-presentation="table"?>
109       <varlistentry id="attr">
110         <term><command>attr</command></term>
111         <listitem>
112           <para>Extends attributes on filesystem objects</para>
113           <indexterm zone="ch-system-attr attr">
114             <primary sortas="b-attr">attr</primary>
115           </indexterm>
116         </listitem>
117       </varlistentry>
119       <varlistentry id="getfattr">
120         <term><command>getfattr</command></term>
121         <listitem>
122           <para>Gets the extended attributes of filesystem objects</para>
123           <indexterm zone="ch-system-attr getfattr">
124             <primary sortas="b-getfattr">getfattr</primary>
125           </indexterm>
126         </listitem>
127       </varlistentry>
129       <varlistentry id="setattr">
130         <term><command>setattr</command></term>
131         <listitem>
132           <para>Sets the extended attributes of filesystem objects</para>
133           <indexterm zone="ch-system-attr setattr">
134             <primary sortas="b-setattr">setattr</primary>
135           </indexterm>
136         </listitem>
137       </varlistentry>
139       <varlistentry id="libattr">
140         <term><filename class="libraryfile">libattr</filename></term>
141         <listitem>
142           <para>Contains the libbrary functions for manipulating extended attributes</para>
143           <indexterm zone="ch-system-attr libattr">
144             <primary sortas="c-libattr">libattr</primary>
145           </indexterm>
146         </listitem>
147       </varlistentry>
149     </variablelist>
151   </sect2>
153 </sect1>