source: pkgmngt/packageManager.xml@ b339c94

2.4 ablfs ablfs-more legacy new_features trunk
Last change on this file since b339c94 was 7072e1f, checked in by Thomas Pegg <thomasp@…>, 13 years ago

Commit Pierre Labastie's patch for including package management support in jhalfs. NOTE: Package management is by default disabled.

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