source: pkgmngt/packageManager.xml@ 532ede6

2.4 ablfs-more legacy new_features trunk
Last change on this file since 532ede6 was 4c6f54f, checked in by Pierre Labastie <pierre@…>, 13 years ago

Fix svn properties on some files

  • Property mode set to 100644
File size: 10.5 KB
Line 
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.16.1.2">
13<!ENTITY dpkg-size "5,236 KB">
14<!ENTITY dpkg-url "&debian-pool;d/dpkg/dpkg_&dpkg-version;.tar.bz2">
15<!ENTITY dpkg-md5 "068ae5e650e54968230de19d6c4e2241">
16<!ENTITY dpkg-home "http://wiki.debian.org/Teams/Dpkg">
17<!ENTITY dpkg-ch5-du "5 MB">
18<!ENTITY dpkg-ch5-sbu "0.4 SBU">
19<!ENTITY dpkg-ch6-du "5 MB">
20<!ENTITY dpkg-ch6-sbu "0.4 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. However, the <command>configure</command> script calls
107 <command>dpkg</command> itself, which is found only on Debian hosts. The
108 following <command>sed</command> command prevents that call:</para>
109
110 <screen><userinput remap="pre">sed '/\$v[{]DEB_BUILD/d' \
111 -i scripts/dpkg-architecture.pl</userinput></screen>
112
113 <para> Configure the package:</para>
114
115 <screen><userinput remap="configure">./configure --prefix=/tools \
116 --disable-nls --without-dselect \
117 --without-start-stop-daemon \
118 --without-update-alternatives \
119 --without-install-info \
120 --without-zlib --with-bz2=static --without-selinux</userinput></screen>
121
122 <variablelist>
123 <title>The meaning of the configure options:</title>
124
125 <varlistentry>
126 <term><parameter>--without-dselect</parameter></term>
127 <listitem>
128 <para>Avoids building <command>dselect</command>, an
129 awful thing!</para>
130 </listitem>
131 </varlistentry>
132
133 <varlistentry>
134 <term><parameter>--without-start-stop-daemon</parameter></term>
135 <listitem>
136 <para>The utility <command>start-stop-daemon</command>
137 is not needed here.</para>
138 </listitem>
139 </varlistentry>
140
141 <varlistentry>
142 <term><parameter>--without-update-alternatives</parameter></term>
143 <listitem>
144 <para>Same for <command>update-alternatives</command>.</para>
145 </listitem>
146 </varlistentry>
147
148 <varlistentry>
149 <term><parameter>--without-install-info</parameter></term>
150 <listitem>
151 <para>Debian <command>install-info</command> is a wrapper to
152 <command>install-info</command> installed by Texinfo. Not
153 needed either.</para>
154 </listitem>
155 </varlistentry>
156
157 </variablelist>
158
159 <para>Compile the package:</para>
160
161 <screen><userinput remap="make">(cd lib &amp;&amp; make)
162(cd src &amp;&amp; make)
163(cd dpkg-deb &amp;&amp; make)
164(cd dpkg-split &amp;&amp; make)</userinput></screen>
165
166 <para>This package does not come with a test suite.</para>
167
168 <para>Install only the needed files:</para>
169
170 <screen><userinput remap="install">cp src/dpkg src/dpkg-* /tools/bin
171cp dpkg-deb/dpkg-deb /tools/bin
172cp dpkg-split/dpkg-split /tools/bin
173mkdir -pv /tools/etc/dpkg/{,dpkg.cfg.d}
174cp debian/dpkg.cfg /tools/etc/dpkg</userinput></screen>
175
176 <para>Add a line in <filename>dpkg.cfg</filename> to
177 tell where to put administration files</para>
178
179 <screen><userinput>cat &gt;&gt; /tools/etc/dpkg/dpkg.cfg &lt;&lt; EOF
180# admindir on LFS system
181admindir /var/lib/dpkg
182EOF</userinput></screen>
183
184 <para>On a Debian system, <command>dpkg</command> relies on two other
185 files to be present. Since we do not install them, issue:</para>
186
187 <screen><userinput>cat &gt;&gt; /tools/etc/dpkg/dpkg.cfg &lt;&lt; EOF
188# disable fatal error on path checking
189force-bad-path
190EOF</userinput></screen>
191
192 </sect2>
193
194</sect1>
195
196<sect1 id="ch-pkgmngt-creatingdirs">
197 <?dbhtml filename="creatingdirs.html"?>
198
199 <title>Adding Directories for package management</title>
200
201 <para>Those directories should be added to the system.
202 <filename>/var/lib/dpkg</filename> and subdirectories are
203 adminitrative directories of <command>dpkg</command>.
204 <filename>/var/log</filename> is the log directory for
205 <command>dpkg</command>. <filename>/var/lib/packages</filename>
206 will be used to store our packages.deb files.</para>
207
208 <screen><userinput>mkdir -pv /var/{log,lib/dpkg/{info,updates}}
209mkdir -pv /var/lib/packages</userinput></screen>
210
211</sect1>
212
213<sect1 id="ch-pkgmngt-createfiles">
214 <?dbhtml filename="createfiles.html"?>
215
216 <title>Adding administrative files for Dpkg</title>
217 <para><command>dpkg</command> needs that some files exist to run
218 for the first time. The log file must exist in order to be
219 used.</para>
220
221 <screen><userinput>touch /var/lib/dpkg/{available,status}
222touch /var/log/dpkg.log</userinput></screen>
223
224</sect1>
225
226<sect1 id="ch-system-pkgmngt" role="wrap">
227 <?dbhtml filename="dpkg.html"?>
228
229 <sect1info condition="script">
230 <productname>dpkg</productname>
231 <productnumber>&dpkg-version;</productnumber>
232 <address>&dpkg-url;</address>
233 </sect1info>
234
235 <title>Dpkg-&dpkg-version;</title>
236
237 <sect2 role="package">
238 <title/>
239
240 <para>This is my choice of package manager. Dpkg is the basic package
241 manager of Debian. It can be complemented by deselect (in the same
242 package), apt or aptitude. We use it in a very crude way.</para>
243
244 <segmentedlist>
245 <segtitle>&buildtime;</segtitle>
246 <segtitle>&diskspace;</segtitle>
247
248 <seglistitem>
249 <seg>&dpkg-ch6-sbu;</seg>
250 <seg>&dpkg-ch6-du;</seg>
251 </seglistitem>
252 </segmentedlist>
253
254 </sect2>
255
256 <sect2 role="installation">
257 <title>Installation of Dpkg</title>
258
259 <para>Since Debian is shipping its own package, all patches have already
260 been applied. We can go directly to configuring it:</para>
261
262 <screen><userinput remap="configure">./configure --prefix=/usr \
263 --sysconfdir=/etc \
264 --localstatedir=/var \
265 --without-dselect \
266 --without-start-stop-daemon \
267 --without-update-alternatives \
268 --without-install-info \
269 --without-selinux</userinput></screen>
270
271 <variablelist>
272 <title>The meaning of the configure options:</title>
273
274 <varlistentry>
275 <term><parameter>--without-dselect</parameter></term>
276 <listitem>
277 <para>Avoids building <command>dselect</command>, an
278 awful thing!</para>
279 </listitem>
280 </varlistentry>
281
282 <varlistentry>
283 <term><parameter>--without-start-stop-daemon</parameter></term>
284 <listitem>
285 <para>The utility <command>start-stop-daemon</command>
286 is not needed here.</para>
287 </listitem>
288 </varlistentry>
289
290 <varlistentry>
291 <term><parameter>--without-update-alternatives</parameter></term>
292 <listitem>
293 <para>Same for <command>update-alternatives</command>.</para>
294 </listitem>
295 </varlistentry>
296
297 <varlistentry>
298 <term><parameter>--without-install-info</parameter></term>
299 <listitem>
300 <para>Debian <command>install-info</command> is a wrapper to
301 <command>install-info</command> installed by Texinfo. Not
302 needed either.</para>
303 </listitem>
304 </varlistentry>
305
306 </variablelist>
307
308 <para>Compile the package:</para>
309
310<screen><userinput remap="make">make</userinput></screen>
311
312 <para>This package does not come with a test suite.</para>
313
314 <para>Install the package:</para>
315
316<screen><userinput remap="install">mkdir -pv $PKG_DEST
317make DESTDIR=$PKG_DEST install
318mkdir -pv $PKG_DEST/etc/dpkg/{,dpkg.cfg.d}
319cp debian/dpkg.cfg $PKG_DEST/etc/dpkg</userinput></screen>
320
321 <para>Add a line in <filename>dpkg.cfg</filename> to
322 tell where to put administration files</para>
323
324<screen><userinput remap="install">cat &gt;&gt; $PKG_DEST/etc/dpkg/dpkg.cfg &lt;&lt; EOF
325# admindir on LFS system
326admindir /var/lib/dpkg
327EOF</userinput></screen>
328
329<!-- Is this needed in chapter 06 -->
330 <para>On a Debian system, <command>dpkg</command> relies on two other
331 files (<command>ldconfig</command> and maybe <command>update-rc.d</command>)
332 to be present. Since we do not install them, issue:</para>
333
334<screen><userinput>cat &gt;&gt; /etc/dpkg/dpkg.cfg &lt;&lt; EOF
335# disable fatal error on path checking
336force-bad-path
337EOF</userinput></screen>
338
339 </sect2>
340
341</sect1>
342</article>
Note: See TracBrowser for help on using the repository browser.