source: chapter08/libcap.xml@ faab037

ml-11.0 multilib
Last change on this file since faab037 was faab037, checked in by Thomas Trepl (Moody) <thomas@…>, 12 months ago

Automatic merge of trunk into multilib

  • Property mode set to 100644
File size: 6.8 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-fin-sbu;</seg>
37 <seg>&libcap-fin-du;</seg>
38 </seglistitem>
39 </segmentedlist>
40
41 </sect2>
42
43 <sect2 role="installation">
44 <title>Installation of Libcap</title>
45
46 <para>First, fix an upstream oversight in the latest release:</para>
47
48<screen><userinput remap="pre">sed -i 's/ $(PROGS)/&amp; capsh/' progs/Makefile</userinput></screen>
49
50 <para>Prevent static libraries from being installed:</para>
51
52<screen><userinput remap="pre">sed -i '/install -m.*STA/d' libcap/Makefile</userinput></screen>
53
54 <para>Compile the package:</para>
55
56<screen><userinput remap="make">make prefix=/usr lib=lib</userinput></screen>
57
58 <variablelist>
59 <title>The meaning of the make option:</title>
60
61 <varlistentry>
62 <term><parameter>lib=lib</parameter></term>
63 <listitem>
64 <para>This parameter sets the library directory to
65 <filename>/usr/lib</filename> rather than
66 <filename>/usr/lib64</filename> on x86_64. It has no effect on
67 x86.</para>
68 </listitem>
69 </varlistentry>
70 </variablelist>
71
72 <para>To test the results, issue:</para>
73
74<screen><userinput remap="test">make test</userinput></screen>
75
76 <para>Install the package:</para>
77
78<screen><userinput remap="install">make prefix=/usr lib=lib install</userinput></screen>
79
80 <para>Adjust the permission of the shared libraries:</para>
81
82<screen><userinput remap="install">chmod -v 755 /usr/lib/lib{cap,psx}.so.&libcap-version;</userinput></screen>
83
84 </sect2>
85
86 <!-- - - - - - - - - - -->
87 <!-- Multilib - 32bit -->
88 <!-- - - - - - - - - - -->
89
90 <sect2 arch="ml_32,ml_all" role="installation">
91 <title>Installation of Libcap - 32bit</title>
92
93 <para>Clean previous build:</para>
94
95<screen><userinput remap="pre">make distclean</userinput></screen>
96
97 <para>Compile the package:</para>
98
99<screen><userinput remap="make">make CC="gcc -m32 -march=i686"</userinput></screen>
100
101 <para>Install the package:</para>
102
103<screen><userinput remap="install">make lib=lib32 prefix=$PWD/DESTDIR/usr -C libcap install
104cp -Rv DESTDIR/usr/lib32/* /usr/lib32
105sed -e "s|^libdir=.*|libdir=/usr/lib32|" -i /usr/lib32/pkgconfig/lib{cap,psx}.pc
106chmod -v 755 /usr/lib32/libcap.so.&libcap-version;
107rm -rf DESTDIR</userinput></screen>
108
109 </sect2><!-- m32 -->
110
111 <!-- - - - - - - - - - -->
112 <!-- Multilib - x32bit -->
113 <!-- - - - - - - - - - -->
114
115 <sect2 arch="ml_x32,ml_all" role="installation">
116 <title>Installation of Libcap - x32bit</title>
117
118 <para>Clean previous build:</para>
119
120<screen><userinput remap="pre">make distclean</userinput></screen>
121
122 <para>Compile the package:</para>
123
124<screen><userinput remap="make">make CC="gcc -mx32 -march=x86-64"</userinput></screen>
125
126 <para>Install the package:</para>
127
128<screen><userinput remap="install">make lib=libx32 prefix=$PWD/DESTDIR/usr -C libcap install
129cp -Rv DESTDIR/usr/libx32/* /usr/libx32
130sed -e "s|^libdir=.*|libdir=/usr/libx32|" -i /usr/libx32/pkgconfig/lib{cap,psx}.pc
131chmod -v 755 /usr/libx32/libcap.so.&libcap-version;
132rm -rf DESTDIR</userinput></screen>
133
134 </sect2><!-- mx32 -->
135
136 <sect2 id="contents-libcap" role="content">
137 <title>Contents of Libcap</title>
138
139 <segmentedlist>
140 <segtitle>Installed programs</segtitle>
141 <segtitle>Installed library</segtitle>
142
143 <seglistitem>
144 <seg>capsh, getcap, getpcaps, and setcap</seg>
145 <seg>libcap.so and libpsx.so</seg>
146 </seglistitem>
147 </segmentedlist>
148
149 <variablelist>
150 <bridgehead renderas="sect3">Short Descriptions</bridgehead>
151 <?dbfo list-presentation="list"?>
152 <?dbhtml list-presentation="table"?>
153
154 <varlistentry id="capsh">
155 <term><command>capsh</command></term>
156 <listitem>
157 <para>A shell wrapper to explore and constrain capability support</para>
158 <indexterm zone="ch-system-libcap capsh">
159 <primary sortas="b-capsh">capsh</primary>
160 </indexterm>
161 </listitem>
162 </varlistentry>
163
164 <varlistentry id="getcap">
165 <term><command>getcap</command></term>
166 <listitem>
167 <para>Examines file capabilities</para>
168 <indexterm zone="ch-system-libcap getcap">
169 <primary sortas="b-getcap">getcap</primary>
170 </indexterm>
171 </listitem>
172 </varlistentry>
173
174 <varlistentry id="getpcaps">
175 <term><command>getpcaps</command></term>
176 <listitem>
177 <para>Displays the capabilities on the queried process(es)</para>
178 <indexterm zone="ch-system-libcap getpcaps">
179 <primary sortas="b-getpcaps">getpcaps</primary>
180 </indexterm>
181 </listitem>
182 </varlistentry>
183
184 <varlistentry id="setcap">
185 <term><command>setcap</command></term>
186 <listitem>
187 <para>Sets file capabilities</para>
188 <indexterm zone="ch-system-libcap setcap">
189 <primary sortas="b-setcap">setcap</primary>
190 </indexterm>
191 </listitem>
192 </varlistentry>
193
194 <varlistentry id="libcap">
195 <term><filename class="libraryfile">libcap</filename></term>
196 <listitem>
197 <para>Contains the library functions for manipulating POSIX 1003.1e
198 capabilities</para>
199 <indexterm zone="ch-system-libcap libcap">
200 <primary sortas="c-libcap">libcap</primary>
201 </indexterm>
202 </listitem>
203 </varlistentry>
204
205 <varlistentry id="libpsx">
206 <term><filename class="libraryfile">libpsx</filename></term>
207 <listitem>
208 <para>Contains functions to support POSIX semantics for syscalls
209 associated with the pthread library</para>
210 <indexterm zone="ch-system-libcap libpsx">
211 <primary sortas="c-libpsx">libpsx</primary>
212 </indexterm>
213 </listitem>
214 </varlistentry>
215
216 </variablelist>
217
218 </sect2>
219
220</sect1>
Note: See TracBrowser for help on using the repository browser.