1 | <?xml version="1.0" encoding="UTF-8"?>
|
---|
2 | <!-- $Id$ -->
|
---|
3 | <!DOCTYPE article PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
|
---|
4 | "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
|
---|
5 | <!ENTITY buildtime "Approximate build time">
|
---|
6 | <!ENTITY diskspace "Required disk space">
|
---|
7 | <!ENTITY dependencies "Installation depends on">
|
---|
8 | <!ENTITY testsuites "Test suite depends on">
|
---|
9 | <!ENTITY before "Must be installed before">
|
---|
10 | <!ENTITY external "Optional dependencies">
|
---|
11 | <!ENTITY debian-pool "http://ftp2.fr.debian.org/debian/pool/main/">
|
---|
12 | <!ENTITY dpkg-version "1.17.22">
|
---|
13 | <!ENTITY dpkg-size "4,259 KB">
|
---|
14 | <!ENTITY dpkg-url "&debian-pool;d/dpkg/dpkg_&dpkg-version;.tar.xz">
|
---|
15 | <!ENTITY dpkg-md5 "c9c46c5318c98c9162fbd03d24f2f95b">
|
---|
16 | <!ENTITY dpkg-home "http://wiki.debian.org/Teams/Dpkg">
|
---|
17 | <!ENTITY dpkg-ch5-du "54 MB">
|
---|
18 | <!ENTITY dpkg-ch5-sbu "0.3 SBU">
|
---|
19 | <!ENTITY dpkg-ch6-du "63 MB">
|
---|
20 | <!ENTITY dpkg-ch6-sbu "0.5 SBU">
|
---|
21 | ]>
|
---|
22 | <article>
|
---|
23 |
|
---|
24 | <sect1 id="package">
|
---|
25 | <?dbhtml filename="packages.html"?>
|
---|
26 |
|
---|
27 | <title>All Packages</title>
|
---|
28 |
|
---|
29 | <para>Download or otherwise obtain the following packages:</para>
|
---|
30 |
|
---|
31 | <variablelist role="materials">
|
---|
32 |
|
---|
33 | <varlistentry>
|
---|
34 | <term>Dpkg (&dpkg-version;) - <token>&dpkg-size;</token>:</term>
|
---|
35 | <listitem>
|
---|
36 | <para>Home page: <ulink url="&dpkg-home;"/></para>
|
---|
37 | <para>Download: <ulink url="&dpkg-url;"/></para>
|
---|
38 | <para>MD5 sum: <literal>&dpkg-md5;</literal></para>
|
---|
39 | </listitem>
|
---|
40 | </varlistentry>
|
---|
41 |
|
---|
42 | </variablelist>
|
---|
43 |
|
---|
44 | </sect1>
|
---|
45 | <!-- If needed, uncomment and edit this:
|
---|
46 | <sect1 id="patches">
|
---|
47 | <?dbhtml filename="patches.html"?>
|
---|
48 |
|
---|
49 | <title>Needed Patches</title>
|
---|
50 |
|
---|
51 | <para>In addition to the package(s), zero or more patches are also required.
|
---|
52 | These patches correct any mistakes in the packages that should be
|
---|
53 | fixed by the maintainer. The patches also make small modifications to
|
---|
54 | make the packages easier to work with. The following patches will be
|
---|
55 | needed to build an LFS system:</para>
|
---|
56 |
|
---|
57 | <variablelist role="materials">
|
---|
58 |
|
---|
59 | <varlistentry>
|
---|
60 | <term>Dpkg Some Patch - <token>&dpkg-somepatche-size;</token>:</term>
|
---|
61 | <listitem>
|
---|
62 | <para>Download: <ulink url="&somepatch-url;"/></para>
|
---|
63 | <para>MD5 sum: <literal>&somepatch-md5;</literal></para>
|
---|
64 | </listitem>
|
---|
65 | </varlistentry>
|
---|
66 |
|
---|
67 | </variablelist>
|
---|
68 |
|
---|
69 | </sect1>
|
---|
70 | -->
|
---|
71 |
|
---|
72 | <sect1 id="ch-tools-pkgmngt" role="wrap">
|
---|
73 | <?dbhtml filename="dpkg.html"?>
|
---|
74 |
|
---|
75 | <sect1info condition="script">
|
---|
76 | <productname>dpkg</productname>
|
---|
77 | <productnumber>&dpkg-version;</productnumber>
|
---|
78 | <address>&dpkg-url;</address>
|
---|
79 | </sect1info>
|
---|
80 |
|
---|
81 | <title>Dpkg-&dpkg-version;</title>
|
---|
82 |
|
---|
83 | <sect2 role="package">
|
---|
84 | <title/>
|
---|
85 |
|
---|
86 | <para>This is my choice of package manager. Dpkg is the basic package
|
---|
87 | manager of Debian. It can be complemented by deselect (in the same
|
---|
88 | package), apt or aptitude. We use it in a very crude way.</para>
|
---|
89 |
|
---|
90 | <segmentedlist>
|
---|
91 | <segtitle>&buildtime;</segtitle>
|
---|
92 | <segtitle>&diskspace;</segtitle>
|
---|
93 |
|
---|
94 | <seglistitem>
|
---|
95 | <seg>&dpkg-ch5-sbu;</seg>
|
---|
96 | <seg>&dpkg-ch5-du;</seg>
|
---|
97 | </seglistitem>
|
---|
98 | </segmentedlist>
|
---|
99 |
|
---|
100 | </sect2>
|
---|
101 |
|
---|
102 | <sect2 role="installation">
|
---|
103 | <title>Installation of Dpkg</title>
|
---|
104 |
|
---|
105 | <para>Since Debian is shipping its own package, all patches have already
|
---|
106 | been applied. Nevertheless there is either a bug or something
|
---|
107 | I do not understand... Apply this:</para>
|
---|
108 |
|
---|
109 | <screen><userinput remap="pre">sed -i '/compress_filter(s/,/va_start/s/^$/compressor_fixup_params(params);\n/' lib/dpkg/compress.c</userinput></screen>
|
---|
110 |
|
---|
111 | <para> Configure the package:</para>
|
---|
112 |
|
---|
113 | <screen><userinput remap="configure">./configure --prefix=/tools \
|
---|
114 | --disable-nls --disable-dselect \
|
---|
115 | --disable-start-stop-daemon \
|
---|
116 | --disable-update-alternatives \
|
---|
117 | --without-zlib --with-liblzma=static --without-selinux</userinput></screen>
|
---|
118 |
|
---|
119 | <variablelist>
|
---|
120 | <title>The meaning of the configure options:</title>
|
---|
121 |
|
---|
122 | <varlistentry>
|
---|
123 | <term><parameter>--disable-dselect</parameter></term>
|
---|
124 | <listitem>
|
---|
125 | <para>Avoids building <command>dselect</command>, an
|
---|
126 | awful thing!</para>
|
---|
127 | </listitem>
|
---|
128 | </varlistentry>
|
---|
129 |
|
---|
130 | <varlistentry>
|
---|
131 | <term><parameter>--disable-start-stop-daemon</parameter></term>
|
---|
132 | <listitem>
|
---|
133 | <para>The utility <command>start-stop-daemon</command>
|
---|
134 | is not needed here.</para>
|
---|
135 | </listitem>
|
---|
136 | </varlistentry>
|
---|
137 |
|
---|
138 | <varlistentry>
|
---|
139 | <term><parameter>--disable-update-alternatives</parameter></term>
|
---|
140 | <listitem>
|
---|
141 | <para>Same for <command>update-alternatives</command>.</para>
|
---|
142 | </listitem>
|
---|
143 | </varlistentry>
|
---|
144 |
|
---|
145 | <varlistentry>
|
---|
146 | <term><parameter>--without-zlib</parameter></term>
|
---|
147 | <listitem>
|
---|
148 | <para>Use <command>gzip</command> for compression of binary
|
---|
149 | packages instead of the zlib library, which is not installed
|
---|
150 | in chapter 5.</para>
|
---|
151 | </listitem>
|
---|
152 | </varlistentry>
|
---|
153 |
|
---|
154 | <varlistentry>
|
---|
155 | <term><parameter>--with-liblzma=static</parameter></term>
|
---|
156 | <listitem>
|
---|
157 | <para>Use statically linked <command>liblzma</command> for compression
|
---|
158 | of binary packages.</para>
|
---|
159 | </listitem>
|
---|
160 | </varlistentry>
|
---|
161 |
|
---|
162 | <varlistentry>
|
---|
163 | <term><parameter>--without-selinux</parameter></term>
|
---|
164 | <listitem>
|
---|
165 | <para>Disable building for <application>selinux</application>, which
|
---|
166 | is not used woth LFS/BLFS.</para>
|
---|
167 | </listitem>
|
---|
168 | </varlistentry>
|
---|
169 |
|
---|
170 | </variablelist>
|
---|
171 |
|
---|
172 | <para>Compile the package:</para>
|
---|
173 |
|
---|
174 | <screen><userinput remap="make">(cd lib && make)
|
---|
175 | (cd src && make)
|
---|
176 | (cd dpkg-deb && make)
|
---|
177 | (cd dpkg-split && make)</userinput></screen>
|
---|
178 |
|
---|
179 | <para>This package does not come with a test suite.</para>
|
---|
180 |
|
---|
181 | <para>Install only the needed files:</para>
|
---|
182 |
|
---|
183 | <screen><userinput remap="install">cp src/dpkg src/dpkg-* /tools/bin
|
---|
184 | cp dpkg-deb/dpkg-deb /tools/bin
|
---|
185 | cp dpkg-split/dpkg-split /tools/bin
|
---|
186 | mkdir -pv /tools/etc/dpkg/{,dpkg.cfg.d}
|
---|
187 | cp debian/dpkg.cfg /tools/etc/dpkg</userinput></screen>
|
---|
188 |
|
---|
189 | <para>Add a line in <filename>dpkg.cfg</filename> to
|
---|
190 | tell where to put administration files</para>
|
---|
191 |
|
---|
192 | <screen><userinput>cat >> /tools/etc/dpkg/dpkg.cfg << EOF
|
---|
193 | # admindir on LFS system
|
---|
194 | admindir /var/lib/dpkg
|
---|
195 | EOF</userinput></screen>
|
---|
196 |
|
---|
197 | <para>On a Debian system, <command>dpkg</command> relies on two other
|
---|
198 | files to be present. Since we do not install them, issue:</para>
|
---|
199 |
|
---|
200 | <screen><userinput>cat >> /tools/etc/dpkg/dpkg.cfg << EOF
|
---|
201 | # disable fatal error on path checking
|
---|
202 | force-bad-path
|
---|
203 | EOF</userinput></screen>
|
---|
204 |
|
---|
205 | </sect2>
|
---|
206 |
|
---|
207 | </sect1>
|
---|
208 |
|
---|
209 | <sect1 id="ch-pkgmngt-creatingdirs">
|
---|
210 | <?dbhtml filename="creatingdirs.html"?>
|
---|
211 |
|
---|
212 | <title>Adding Directories for package management</title>
|
---|
213 |
|
---|
214 | <para>Those directories should be added to the system.
|
---|
215 | <filename>/var/lib/dpkg</filename> and subdirectories are
|
---|
216 | adminitrative directories of <command>dpkg</command>.
|
---|
217 | <filename>/var/log</filename> is the log directory for
|
---|
218 | <command>dpkg</command>. <filename>/var/lib/packages</filename>
|
---|
219 | will be used to store our packages.deb files.</para>
|
---|
220 |
|
---|
221 | <screen><userinput>mkdir -pv /var/{log,lib/dpkg/{info,updates}}
|
---|
222 | mkdir -pv /var/lib/packages</userinput></screen>
|
---|
223 |
|
---|
224 | </sect1>
|
---|
225 |
|
---|
226 | <sect1 id="ch-pkgmngt-createfiles">
|
---|
227 | <?dbhtml filename="createfiles.html"?>
|
---|
228 |
|
---|
229 | <title>Adding administrative files for Dpkg</title>
|
---|
230 | <para><command>dpkg</command> needs that some files exist to run
|
---|
231 | for the first time. The log file must exist in order to be
|
---|
232 | used.</para>
|
---|
233 |
|
---|
234 | <screen><userinput>touch /var/lib/dpkg/{available,status}
|
---|
235 | touch /var/log/dpkg.log</userinput></screen>
|
---|
236 |
|
---|
237 | </sect1>
|
---|
238 |
|
---|
239 | <sect1 id="ch-system-pkgmngt" role="wrap">
|
---|
240 | <?dbhtml filename="dpkg.html"?>
|
---|
241 |
|
---|
242 | <sect1info condition="script">
|
---|
243 | <productname>dpkg</productname>
|
---|
244 | <productnumber>&dpkg-version;</productnumber>
|
---|
245 | <address>&dpkg-url;</address>
|
---|
246 | </sect1info>
|
---|
247 |
|
---|
248 | <title>Dpkg-&dpkg-version;</title>
|
---|
249 |
|
---|
250 | <sect2 role="package">
|
---|
251 | <title/>
|
---|
252 |
|
---|
253 | <para>This is my choice of package manager. Dpkg is the basic package
|
---|
254 | manager of Debian. It can be complemented by deselect (in the same
|
---|
255 | package), apt or aptitude. We use it in a very crude way.</para>
|
---|
256 |
|
---|
257 | <segmentedlist>
|
---|
258 | <segtitle>&buildtime;</segtitle>
|
---|
259 | <segtitle>&diskspace;</segtitle>
|
---|
260 |
|
---|
261 | <seglistitem>
|
---|
262 | <seg>&dpkg-ch6-sbu;</seg>
|
---|
263 | <seg>&dpkg-ch6-du;</seg>
|
---|
264 | </seglistitem>
|
---|
265 | </segmentedlist>
|
---|
266 |
|
---|
267 | </sect2>
|
---|
268 |
|
---|
269 | <sect2 role="installation">
|
---|
270 | <title>Installation of Dpkg</title>
|
---|
271 |
|
---|
272 | <para>Since Debian is shipping its own package, all patches have already
|
---|
273 | been applied. We do not need more in chapter 6. Configure it:</para>
|
---|
274 |
|
---|
275 | <screen><userinput remap="configure">./configure --prefix=/usr \
|
---|
276 | --sysconfdir=/etc \
|
---|
277 | --localstatedir=/var \
|
---|
278 | --disable-dselect \
|
---|
279 | --disable-start-stop-daemon \
|
---|
280 | --disable-update-alternatives \
|
---|
281 | --without-selinux</userinput></screen>
|
---|
282 |
|
---|
283 | <variablelist>
|
---|
284 | <title>The meaning of the configure options:</title>
|
---|
285 |
|
---|
286 | <varlistentry>
|
---|
287 | <term><parameter>--disable-dselect</parameter></term>
|
---|
288 | <listitem>
|
---|
289 | <para>Avoids building <command>dselect</command>, an
|
---|
290 | awful thing!</para>
|
---|
291 | </listitem>
|
---|
292 | </varlistentry>
|
---|
293 |
|
---|
294 | <varlistentry>
|
---|
295 | <term><parameter>--disable-start-stop-daemon</parameter></term>
|
---|
296 | <listitem>
|
---|
297 | <para>The utility <command>start-stop-daemon</command>
|
---|
298 | is not needed here.</para>
|
---|
299 | </listitem>
|
---|
300 | </varlistentry>
|
---|
301 |
|
---|
302 | <varlistentry>
|
---|
303 | <term><parameter>--disable-update-alternatives</parameter></term>
|
---|
304 | <listitem>
|
---|
305 | <para>Same for <command>update-alternatives</command>.</para>
|
---|
306 | </listitem>
|
---|
307 | </varlistentry>
|
---|
308 |
|
---|
309 | <varlistentry>
|
---|
310 | <term><parameter>--without-selinux</parameter></term>
|
---|
311 | <listitem>
|
---|
312 | <para>Selinux is not used in LFS.</para>
|
---|
313 | </listitem>
|
---|
314 | </varlistentry>
|
---|
315 |
|
---|
316 | </variablelist>
|
---|
317 |
|
---|
318 | <para>Compile the package:</para>
|
---|
319 |
|
---|
320 | <screen><userinput remap="make">make</userinput></screen>
|
---|
321 |
|
---|
322 | <para>This package does not come with a test suite.</para>
|
---|
323 |
|
---|
324 | <para>Install the package:</para>
|
---|
325 |
|
---|
326 | <screen><userinput remap="install">mkdir -pv $PKG_DEST
|
---|
327 | make DESTDIR=$PKG_DEST install
|
---|
328 | mkdir -pv $PKG_DEST/etc/dpkg/{,dpkg.cfg.d}
|
---|
329 | cp debian/dpkg.cfg $PKG_DEST/etc/dpkg</userinput></screen>
|
---|
330 |
|
---|
331 | <para>Add a line in <filename>dpkg.cfg</filename> to
|
---|
332 | tell where to put administration files</para>
|
---|
333 |
|
---|
334 | <screen><userinput remap="install">cat >> $PKG_DEST/etc/dpkg/dpkg.cfg << EOF
|
---|
335 | # admindir on LFS system
|
---|
336 | admindir /var/lib/dpkg
|
---|
337 | EOF</userinput></screen>
|
---|
338 |
|
---|
339 | <!-- Is this needed in chapter 06 -->
|
---|
340 | <para>On a Debian system, <command>dpkg</command> relies on two other
|
---|
341 | files (<command>ldconfig</command> and maybe <command>update-rc.d</command>)
|
---|
342 | to be present. Since we do not install them, issue:</para>
|
---|
343 |
|
---|
344 | <screen><userinput>cat >> /etc/dpkg/dpkg.cfg << EOF
|
---|
345 | # disable fatal error on path checking
|
---|
346 | force-bad-path
|
---|
347 | EOF</userinput></screen>
|
---|
348 |
|
---|
349 | </sect2>
|
---|
350 |
|
---|
351 | </sect1>
|
---|
352 | </article>
|
---|