source: chapter06/libcap.xml@ ee1a413

multilib-10.1 multilib-before-cross
Last change on this file since ee1a413 was ee1a413, checked in by Thomas Trepl <thomas@…>, 3 years ago

Change profiling attribute to enable selection of m32 and/or mx32. Fixes #4452.

git-svn-id: http://svn.linuxfromscratch.org/LFS/branches/multilib@11571 4aa44e1e-78dd-0310-a6d2-fbcd4c07a689

  • Property mode set to 100644
File size: 6.3 KB
Line 
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]>
7
8<sect1 id="ch-system-libcap" role="wrap">
9 <?dbhtml filename="libcap.html"?>
10
11 <sect1info condition="script">
12 <productname>libcap</productname>
13 <productnumber>&libcap-version;</productnumber>
14 <address>&libcap-url;</address>
15 </sect1info>
16
17 <title>Libcap-&libcap-version;</title>
18
19 <indexterm zone="ch-system-libcap">
20 <primary sortas="a-Libcap">Libcap</primary>
21 </indexterm>
22
23 <sect2 role="package">
24 <title/>
25
26 <para>The Libcap package implements the user-space interfaces to the POSIX
27 1003.1e capabilities available in Linux kernels. These capabilities are a
28 partitioning of the all powerful root privilege into a set of distinct
29 privileges.</para>
30
31 <segmentedlist>
32 <segtitle>&buildtime;</segtitle>
33 <segtitle>&diskspace;</segtitle>
34
35 <seglistitem>
36 <seg>&libcap-ch6-sbu;</seg>
37 <seg>&libcap-ch6-du;</seg>
38 </seglistitem>
39 </segmentedlist>
40
41 </sect2>
42
43 <sect2 role="installation">
44 <title>Installation of Libcap</title>
45
46 <para>Prevent a static library from being installed:</para>
47
48<screen><userinput remap="pre">sed -i '/install.*STALIBNAME/d' libcap/Makefile</userinput></screen>
49
50 <para>Compile the package:</para>
51
52<screen><userinput remap="make">make</userinput></screen>
53
54 <para>This package does not come with a test suite.</para>
55
56 <para>Install the package:</para>
57
58<screen><userinput remap="install">make RAISE_SETFCAP=no lib=lib prefix=/usr install
59chmod -v 755 /usr/lib/libcap.so.&libcap-version;</userinput></screen>
60
61 <variablelist>
62 <title>The meaning of the make option:</title>
63
64 <varlistentry>
65 <term><parameter>RAISE_SETFCAP=no</parameter></term>
66 <listitem>
67 <para>This parameter skips trying to use <command>setcap</command>
68 on itself. This avoids an installation error if the kernel or file
69 system does not support extended capabilities.</para>
70 </listitem>
71 </varlistentry>
72
73 <varlistentry>
74 <term><parameter>lib=lib</parameter></term>
75 <listitem>
76 <para>This parameter installs the library in
77 <filename>$prefix/lib</filename> rather than
78 <filename>$prefix/lib64</filename> on x86_64. It has no effect on
79 x86.</para>
80 </listitem>
81 </varlistentry>
82
83 </variablelist>
84
85 <para>The shared library needs to be moved to
86 <filename class="directory">/lib</filename>, and as a result the
87 <filename class="extension">.so</filename> file in
88 <filename class="directory">/usr/lib</filename> will need to be recreated:</para>
89
90<screen><userinput remap="install">mv -v /usr/lib/libcap.so.* /lib
91ln -sfv ../../lib/$(readlink /usr/lib/libcap.so) /usr/lib/libcap.so</userinput></screen>
92
93 </sect2>
94
95 <sect2 arch="ml_32,ml_all" role="installation">
96 <title>Installation of Libcap - 32-bit</title>
97
98 <para>Clean previous build:</para>
99
100<screen><userinput remap="pre">make distclean</userinput></screen>
101
102 <para>Compile the package:</para>
103
104<screen><userinput remap="make">make CC="gcc -m32 -march=i686"</userinput></screen>
105
106 <para>Install the package:</para>
107
108<screen><userinput remap="install">make lib=lib32 prefix=$PWD/DESTDIR/usr -C libcap install
109cp -Rv DESTDIR/usr/lib32/* /usr/lib32
110rm -rf DESTDIR</userinput></screen>
111
112 </sect2>
113
114 <sect2 arch="ml_x32,ml_all" role="installation">
115 <title>Installation of Libcap - x32-bit</title>
116
117 <para>Clean previous build:</para>
118
119<screen><userinput remap="pre">make distclean</userinput></screen>
120
121 <para>Compile the package:</para>
122
123<screen><userinput remap="make">make CC="gcc -mx32"</userinput></screen>
124
125 <para>Install the package:</para>
126
127<screen><userinput remap="install">make lib=libx32 prefix=$PWD/DESTDIR/usr -C libcap install
128cp -Rv DESTDIR/usr/libx32/* /usr/libx32
129rm -rf DESTDIR</userinput></screen>
130
131 </sect2>
132
133 <sect2 id="contents-libcap" role="content">
134 <title>Contents of Libcap</title>
135
136 <segmentedlist>
137 <segtitle>Installed programs</segtitle>
138 <segtitle>Installed library</segtitle>
139
140 <seglistitem>
141 <seg>capsh, getcap, getpcaps, and setcap</seg>
142 <seg>libcap.so</seg>
143 </seglistitem>
144 </segmentedlist>
145
146 <variablelist>
147 <bridgehead renderas="sect3">Short Descriptions</bridgehead>
148 <?dbfo list-presentation="list"?>
149 <?dbhtml list-presentation="table"?>
150
151 <varlistentry id="capsh">
152 <term><command>capsh</command></term>
153 <listitem>
154 <para>A shell wrapper to explore and constrain capability support</para>
155 <indexterm zone="ch-system-libcap capsh">
156 <primary sortas="b-capsh">capsh</primary>
157 </indexterm>
158 </listitem>
159 </varlistentry>
160
161 <varlistentry id="getcap">
162 <term><command>getcap</command></term>
163 <listitem>
164 <para>Examines file capabilities</para>
165 <indexterm zone="ch-system-libcap getcap">
166 <primary sortas="b-getcap">getcap</primary>
167 </indexterm>
168 </listitem>
169 </varlistentry>
170
171 <varlistentry id="getpcaps">
172 <term><command>getpcaps</command></term>
173 <listitem>
174 <para>Displays the capabilities on the queried process(es)</para>
175 <indexterm zone="ch-system-libcap getpcaps">
176 <primary sortas="b-getpcaps">getpcaps</primary>
177 </indexterm>
178 </listitem>
179 </varlistentry>
180
181 <varlistentry id="setcap">
182 <term><command>setcap</command></term>
183 <listitem>
184 <para>Sets file capabilities</para>
185 <indexterm zone="ch-system-libcap setcap">
186 <primary sortas="b-setcap">setcap</primary>
187 </indexterm>
188 </listitem>
189 </varlistentry>
190
191 <varlistentry id="libcap">
192 <term><filename class="libraryfile">libcap</filename></term>
193 <listitem>
194 <para>Contains the library functions for manipulating POSIX 1003.1e
195 capabilities</para>
196 <indexterm zone="ch-system-libcap libcap">
197 <primary sortas="c-libcap">libcap</primary>
198 </indexterm>
199 </listitem>
200 </varlistentry>
201
202 </variablelist>
203
204 </sect2>
205
206</sect1>
Note: See TracBrowser for help on using the repository browser.