source: chapter08/libcap.xml@ 164d38e

10.1 10.1-rc1 11.0 11.0-rc1 11.0-rc2 11.0-rc3 11.1 11.1-rc1 11.2 11.2-rc1 11.3 11.3-rc1 12.0 12.0-rc1 12.1 12.1-rc1 arm bdubbs/gcc13 ml-11.0 multilib renodr/libudev-from-systemd s6-init trunk xry111/arm64 xry111/arm64-12.0 xry111/clfs-ng xry111/lfs-next xry111/loongarch xry111/loongarch-12.0 xry111/loongarch-12.1 xry111/mips64el xry111/pip3 xry111/rust-wip-20221008 xry111/update-glibc
Last change on this file since 164d38e was 4622193e, checked in by Xi Ruoyao <xry111@…>, 3 years ago

libcap: make the installation like other packages

git-svn-id: http://svn.linuxfromscratch.org/LFS/trunk/BOOK@12102 4aa44e1e-78dd-0310-a6d2-fbcd4c07a689

  • Property mode set to 100644
File size: 5.1 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>Prevent static libraries from being installed:</para>
47
48<screen><userinput remap="pre">sed -i '/install -m.*STA/d' libcap/Makefile</userinput></screen>
49
50 <para>Compile the package:</para>
51
52<screen><userinput remap="make">make prefix=/usr lib=lib</userinput></screen>
53
54 <variablelist>
55 <title>The meaning of the make option:</title>
56
57 <varlistentry>
58 <term><parameter>lib=lib</parameter></term>
59 <listitem>
60 <para>This parameter sets the library directory to
61 <filename>/usr/lib</filename> rather than
62 <filename>/usr/lib64</filename> on x86_64. It has no effect on
63 x86.</para>
64 </listitem>
65 </varlistentry>
66 </variablelist>
67
68 <para>To test the results, issue:</para>
69
70<screen><userinput remap="test">make test</userinput></screen>
71
72 <para>Install the package and make sure the essential libraries are in
73 the correct directory:</para>
74
75<screen><userinput remap="install">make prefix=/usr lib=lib install
76for libname in cap psx; do
77 mv -v /usr/lib/lib${libname}.so.* /lib
78 ln -sfv ../../lib/lib${libname}.so.2 /usr/lib/lib${libname}.so
79 chmod -v 755 /lib/lib${libname}.so.&libcap-version;
80done</userinput></screen>
81
82 </sect2>
83
84 <sect2 id="contents-libcap" role="content">
85 <title>Contents of Libcap</title>
86
87 <segmentedlist>
88 <segtitle>Installed programs</segtitle>
89 <segtitle>Installed library</segtitle>
90
91 <seglistitem>
92 <seg>capsh, getcap, getpcaps, and setcap</seg>
93 <seg>libcap.so and libpsx.so</seg>
94 </seglistitem>
95 </segmentedlist>
96
97 <variablelist>
98 <bridgehead renderas="sect3">Short Descriptions</bridgehead>
99 <?dbfo list-presentation="list"?>
100 <?dbhtml list-presentation="table"?>
101
102 <varlistentry id="capsh">
103 <term><command>capsh</command></term>
104 <listitem>
105 <para>A shell wrapper to explore and constrain capability support</para>
106 <indexterm zone="ch-system-libcap capsh">
107 <primary sortas="b-capsh">capsh</primary>
108 </indexterm>
109 </listitem>
110 </varlistentry>
111
112 <varlistentry id="getcap">
113 <term><command>getcap</command></term>
114 <listitem>
115 <para>Examines file capabilities</para>
116 <indexterm zone="ch-system-libcap getcap">
117 <primary sortas="b-getcap">getcap</primary>
118 </indexterm>
119 </listitem>
120 </varlistentry>
121
122 <varlistentry id="getpcaps">
123 <term><command>getpcaps</command></term>
124 <listitem>
125 <para>Displays the capabilities on the queried process(es)</para>
126 <indexterm zone="ch-system-libcap getpcaps">
127 <primary sortas="b-getpcaps">getpcaps</primary>
128 </indexterm>
129 </listitem>
130 </varlistentry>
131
132 <varlistentry id="setcap">
133 <term><command>setcap</command></term>
134 <listitem>
135 <para>Sets file capabilities</para>
136 <indexterm zone="ch-system-libcap setcap">
137 <primary sortas="b-setcap">setcap</primary>
138 </indexterm>
139 </listitem>
140 </varlistentry>
141
142 <varlistentry id="libcap">
143 <term><filename class="libraryfile">libcap</filename></term>
144 <listitem>
145 <para>Contains the library functions for manipulating POSIX 1003.1e
146 capabilities</para>
147 <indexterm zone="ch-system-libcap libcap">
148 <primary sortas="c-libcap">libcap</primary>
149 </indexterm>
150 </listitem>
151 </varlistentry>
152
153 <varlistentry id="libpsx">
154 <term><filename class="libraryfile">libpsx</filename></term>
155 <listitem>
156 <para>Contains functions to support POSIX semantics for syscalls
157 associated with the pthread library</para>
158 <indexterm zone="ch-system-libcap libpsx">
159 <primary sortas="c-libpsx">libpsx</primary>
160 </indexterm>
161 </listitem>
162 </varlistentry>
163
164 </variablelist>
165
166 </sect2>
167
168</sect1>
Note: See TracBrowser for help on using the repository browser.