source: pkgmngt/packageManager.xml.dpkg@ e3ccc27

ablfs-more legacy trunk
Last change on this file since e3ccc27 was abc276c, checked in by Pierre Labastie <pierre@…>, 8 years ago

Update to latest dpkg

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