2012-02-02 00:29:37 +01:00
|
|
|
<?xml version="1.0" encoding="UTF-8"?>
|
2012-02-19 11:54:17 +01:00
|
|
|
<!-- $Id$ -->
|
2012-02-02 00:29:37 +01:00
|
|
|
<!DOCTYPE article PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
|
|
|
|
"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
|
|
|
|
<!ENTITY buildtime "Approximate build time">
|
|
|
|
<!ENTITY diskspace "Required disk space">
|
|
|
|
<!ENTITY dependencies "Installation depends on">
|
|
|
|
<!ENTITY testsuites "Test suite depends on">
|
|
|
|
<!ENTITY before "Must be installed before">
|
|
|
|
<!ENTITY external "Optional dependencies">
|
|
|
|
<!ENTITY debian-pool "http://ftp2.fr.debian.org/debian/pool/main/">
|
2017-03-10 21:42:08 +01:00
|
|
|
<!ENTITY dpkg-version "1.18.23">
|
|
|
|
<!ENTITY dpkg-size "4,411 KB">
|
2014-12-13 12:10:32 +01:00
|
|
|
<!ENTITY dpkg-url "&debian-pool;d/dpkg/dpkg_&dpkg-version;.tar.xz">
|
2017-03-10 21:42:08 +01:00
|
|
|
<!ENTITY dpkg-md5 "2195338c1792b0678575309a099d2da8">
|
2012-02-02 00:29:37 +01:00
|
|
|
<!ENTITY dpkg-home "http://wiki.debian.org/Teams/Dpkg">
|
2015-11-30 22:29:12 +01:00
|
|
|
<!ENTITY dpkg-ch5-du "56 MB">
|
|
|
|
<!ENTITY dpkg-ch5-sbu "0.2 SBU">
|
|
|
|
<!ENTITY dpkg-ch6-du "66 MB">
|
|
|
|
<!ENTITY dpkg-ch6-sbu "0.3 SBU">
|
2012-02-02 00:29:37 +01:00
|
|
|
]>
|
|
|
|
<article>
|
|
|
|
|
|
|
|
<sect1 id="package">
|
|
|
|
<?dbhtml filename="packages.html"?>
|
|
|
|
|
|
|
|
<title>All Packages</title>
|
|
|
|
|
|
|
|
<para>Download or otherwise obtain the following packages:</para>
|
|
|
|
|
|
|
|
<variablelist role="materials">
|
|
|
|
|
|
|
|
<varlistentry>
|
|
|
|
<term>Dpkg (&dpkg-version;) - <token>&dpkg-size;</token>:</term>
|
|
|
|
<listitem>
|
|
|
|
<para>Home page: <ulink url="&dpkg-home;"/></para>
|
|
|
|
<para>Download: <ulink url="&dpkg-url;"/></para>
|
|
|
|
<para>MD5 sum: <literal>&dpkg-md5;</literal></para>
|
|
|
|
</listitem>
|
|
|
|
</varlistentry>
|
|
|
|
|
|
|
|
</variablelist>
|
|
|
|
|
|
|
|
</sect1>
|
|
|
|
<!-- If needed, uncomment and edit this:
|
|
|
|
<sect1 id="patches">
|
|
|
|
<?dbhtml filename="patches.html"?>
|
|
|
|
|
|
|
|
<title>Needed Patches</title>
|
|
|
|
|
|
|
|
<para>In addition to the package(s), zero or more patches are also required.
|
|
|
|
These patches correct any mistakes in the packages that should be
|
|
|
|
fixed by the maintainer. The patches also make small modifications to
|
|
|
|
make the packages easier to work with. The following patches will be
|
|
|
|
needed to build an LFS system:</para>
|
|
|
|
|
|
|
|
<variablelist role="materials">
|
|
|
|
|
|
|
|
<varlistentry>
|
|
|
|
<term>Dpkg Some Patch - <token>&dpkg-somepatche-size;</token>:</term>
|
|
|
|
<listitem>
|
|
|
|
<para>Download: <ulink url="&somepatch-url;"/></para>
|
|
|
|
<para>MD5 sum: <literal>&somepatch-md5;</literal></para>
|
|
|
|
</listitem>
|
|
|
|
</varlistentry>
|
|
|
|
|
|
|
|
</variablelist>
|
|
|
|
|
|
|
|
</sect1>
|
|
|
|
-->
|
|
|
|
|
|
|
|
<sect1 id="ch-tools-pkgmngt" role="wrap">
|
|
|
|
<?dbhtml filename="dpkg.html"?>
|
|
|
|
|
|
|
|
<sect1info condition="script">
|
|
|
|
<productname>dpkg</productname>
|
|
|
|
<productnumber>&dpkg-version;</productnumber>
|
|
|
|
<address>&dpkg-url;</address>
|
|
|
|
</sect1info>
|
|
|
|
|
|
|
|
<title>Dpkg-&dpkg-version;</title>
|
|
|
|
|
|
|
|
<sect2 role="package">
|
|
|
|
<title/>
|
|
|
|
|
|
|
|
<para>This is my choice of package manager. Dpkg is the basic package
|
|
|
|
manager of Debian. It can be complemented by deselect (in the same
|
|
|
|
package), apt or aptitude. We use it in a very crude way.</para>
|
2015-01-18 17:58:24 +01:00
|
|
|
|
2012-02-02 00:29:37 +01:00
|
|
|
<segmentedlist>
|
|
|
|
<segtitle>&buildtime;</segtitle>
|
|
|
|
<segtitle>&diskspace;</segtitle>
|
|
|
|
|
|
|
|
<seglistitem>
|
|
|
|
<seg>&dpkg-ch5-sbu;</seg>
|
|
|
|
<seg>&dpkg-ch5-du;</seg>
|
|
|
|
</seglistitem>
|
|
|
|
</segmentedlist>
|
|
|
|
|
|
|
|
</sect2>
|
|
|
|
|
|
|
|
<sect2 role="installation">
|
|
|
|
<title>Installation of Dpkg</title>
|
|
|
|
|
|
|
|
<para>Since Debian is shipping its own package, all patches have already
|
2015-11-30 22:29:12 +01:00
|
|
|
been applied.</para>
|
2012-02-02 00:29:37 +01:00
|
|
|
|
|
|
|
<para> Configure the package:</para>
|
|
|
|
|
|
|
|
<screen><userinput remap="configure">./configure --prefix=/tools \
|
2014-12-13 12:10:32 +01:00
|
|
|
--disable-nls --disable-dselect \
|
|
|
|
--disable-start-stop-daemon \
|
|
|
|
--disable-update-alternatives \
|
2017-03-10 21:42:08 +01:00
|
|
|
--without-zlib --with-liblzma=static --without-libselinux</userinput></screen>
|
2012-02-02 00:29:37 +01:00
|
|
|
|
|
|
|
<variablelist>
|
|
|
|
<title>The meaning of the configure options:</title>
|
|
|
|
|
|
|
|
<varlistentry>
|
2014-12-13 12:10:32 +01:00
|
|
|
<term><parameter>--disable-dselect</parameter></term>
|
2012-02-02 00:29:37 +01:00
|
|
|
<listitem>
|
|
|
|
<para>Avoids building <command>dselect</command>, an
|
|
|
|
awful thing!</para>
|
|
|
|
</listitem>
|
|
|
|
</varlistentry>
|
|
|
|
|
|
|
|
<varlistentry>
|
2014-12-13 12:10:32 +01:00
|
|
|
<term><parameter>--disable-start-stop-daemon</parameter></term>
|
2012-02-02 00:29:37 +01:00
|
|
|
<listitem>
|
|
|
|
<para>The utility <command>start-stop-daemon</command>
|
|
|
|
is not needed here.</para>
|
|
|
|
</listitem>
|
|
|
|
</varlistentry>
|
|
|
|
|
|
|
|
<varlistentry>
|
2014-12-13 12:10:32 +01:00
|
|
|
<term><parameter>--disable-update-alternatives</parameter></term>
|
2012-02-02 00:29:37 +01:00
|
|
|
<listitem>
|
|
|
|
<para>Same for <command>update-alternatives</command>.</para>
|
|
|
|
</listitem>
|
|
|
|
</varlistentry>
|
|
|
|
|
|
|
|
<varlistentry>
|
2014-12-13 12:10:32 +01:00
|
|
|
<term><parameter>--without-zlib</parameter></term>
|
2012-02-02 00:29:37 +01:00
|
|
|
<listitem>
|
2014-12-13 12:10:32 +01:00
|
|
|
<para>Use <command>gzip</command> for compression of binary
|
|
|
|
packages instead of the zlib library, which is not installed
|
|
|
|
in chapter 5.</para>
|
|
|
|
</listitem>
|
|
|
|
</varlistentry>
|
|
|
|
|
|
|
|
<varlistentry>
|
|
|
|
<term><parameter>--with-liblzma=static</parameter></term>
|
|
|
|
<listitem>
|
|
|
|
<para>Use statically linked <command>liblzma</command> for compression
|
|
|
|
of binary packages.</para>
|
|
|
|
</listitem>
|
|
|
|
</varlistentry>
|
|
|
|
|
|
|
|
<varlistentry>
|
2017-03-10 21:42:08 +01:00
|
|
|
<term><parameter>--without-libselinux</parameter></term>
|
2014-12-13 12:10:32 +01:00
|
|
|
<listitem>
|
|
|
|
<para>Disable building for <application>selinux</application>, which
|
2017-03-10 21:42:08 +01:00
|
|
|
is not used with LFS/BLFS.</para>
|
2012-02-02 00:29:37 +01:00
|
|
|
</listitem>
|
|
|
|
</varlistentry>
|
|
|
|
|
|
|
|
</variablelist>
|
|
|
|
|
|
|
|
<para>Compile the package:</para>
|
|
|
|
|
|
|
|
<screen><userinput remap="make">(cd lib && make)
|
|
|
|
(cd src && make)
|
|
|
|
(cd dpkg-deb && make)
|
|
|
|
(cd dpkg-split && make)</userinput></screen>
|
|
|
|
|
|
|
|
<para>This package does not come with a test suite.</para>
|
|
|
|
|
|
|
|
<para>Install only the needed files:</para>
|
|
|
|
|
|
|
|
<screen><userinput remap="install">cp src/dpkg src/dpkg-* /tools/bin
|
|
|
|
cp dpkg-deb/dpkg-deb /tools/bin
|
|
|
|
cp dpkg-split/dpkg-split /tools/bin
|
|
|
|
mkdir -pv /tools/etc/dpkg/{,dpkg.cfg.d}
|
|
|
|
cp debian/dpkg.cfg /tools/etc/dpkg</userinput></screen>
|
|
|
|
|
|
|
|
<para>Add a line in <filename>dpkg.cfg</filename> to
|
|
|
|
tell where to put administration files</para>
|
|
|
|
|
|
|
|
<screen><userinput>cat >> /tools/etc/dpkg/dpkg.cfg << EOF
|
|
|
|
# admindir on LFS system
|
|
|
|
admindir /var/lib/dpkg
|
|
|
|
EOF</userinput></screen>
|
|
|
|
|
|
|
|
<para>On a Debian system, <command>dpkg</command> relies on two other
|
|
|
|
files to be present. Since we do not install them, issue:</para>
|
|
|
|
|
|
|
|
<screen><userinput>cat >> /tools/etc/dpkg/dpkg.cfg << EOF
|
|
|
|
# disable fatal error on path checking
|
|
|
|
force-bad-path
|
|
|
|
EOF</userinput></screen>
|
|
|
|
|
|
|
|
</sect2>
|
|
|
|
|
|
|
|
</sect1>
|
|
|
|
|
2012-02-12 19:33:40 +01:00
|
|
|
<sect1 id="ch-pkgmngt-creatingdirs">
|
2012-02-02 00:29:37 +01:00
|
|
|
<?dbhtml filename="creatingdirs.html"?>
|
|
|
|
|
|
|
|
<title>Adding Directories for package management</title>
|
|
|
|
|
|
|
|
<para>Those directories should be added to the system.
|
|
|
|
<filename>/var/lib/dpkg</filename> and subdirectories are
|
|
|
|
adminitrative directories of <command>dpkg</command>.
|
|
|
|
<filename>/var/log</filename> is the log directory for
|
|
|
|
<command>dpkg</command>. <filename>/var/lib/packages</filename>
|
|
|
|
will be used to store our packages.deb files.</para>
|
|
|
|
|
|
|
|
<screen><userinput>mkdir -pv /var/{log,lib/dpkg/{info,updates}}
|
|
|
|
mkdir -pv /var/lib/packages</userinput></screen>
|
|
|
|
|
|
|
|
</sect1>
|
|
|
|
|
2012-02-12 19:33:40 +01:00
|
|
|
<sect1 id="ch-pkgmngt-createfiles">
|
2012-02-02 00:29:37 +01:00
|
|
|
<?dbhtml filename="createfiles.html"?>
|
|
|
|
|
|
|
|
<title>Adding administrative files for Dpkg</title>
|
|
|
|
<para><command>dpkg</command> needs that some files exist to run
|
|
|
|
for the first time. The log file must exist in order to be
|
|
|
|
used.</para>
|
|
|
|
|
|
|
|
<screen><userinput>touch /var/lib/dpkg/{available,status}
|
|
|
|
touch /var/log/dpkg.log</userinput></screen>
|
|
|
|
|
|
|
|
</sect1>
|
|
|
|
|
|
|
|
<sect1 id="ch-system-pkgmngt" role="wrap">
|
|
|
|
<?dbhtml filename="dpkg.html"?>
|
|
|
|
|
|
|
|
<sect1info condition="script">
|
|
|
|
<productname>dpkg</productname>
|
|
|
|
<productnumber>&dpkg-version;</productnumber>
|
|
|
|
<address>&dpkg-url;</address>
|
|
|
|
</sect1info>
|
|
|
|
|
|
|
|
<title>Dpkg-&dpkg-version;</title>
|
|
|
|
|
|
|
|
<sect2 role="package">
|
|
|
|
<title/>
|
|
|
|
|
|
|
|
<para>This is my choice of package manager. Dpkg is the basic package
|
|
|
|
manager of Debian. It can be complemented by deselect (in the same
|
|
|
|
package), apt or aptitude. We use it in a very crude way.</para>
|
2015-01-18 17:58:24 +01:00
|
|
|
|
2012-02-02 00:29:37 +01:00
|
|
|
<segmentedlist>
|
|
|
|
<segtitle>&buildtime;</segtitle>
|
|
|
|
<segtitle>&diskspace;</segtitle>
|
|
|
|
|
|
|
|
<seglistitem>
|
|
|
|
<seg>&dpkg-ch6-sbu;</seg>
|
|
|
|
<seg>&dpkg-ch6-du;</seg>
|
|
|
|
</seglistitem>
|
|
|
|
</segmentedlist>
|
|
|
|
|
|
|
|
</sect2>
|
|
|
|
|
|
|
|
<sect2 role="installation">
|
|
|
|
<title>Installation of Dpkg</title>
|
|
|
|
|
|
|
|
<para>Since Debian is shipping its own package, all patches have already
|
2014-12-13 12:10:32 +01:00
|
|
|
been applied. We do not need more in chapter 6. Configure it:</para>
|
2012-02-02 00:29:37 +01:00
|
|
|
|
|
|
|
<screen><userinput remap="configure">./configure --prefix=/usr \
|
|
|
|
--sysconfdir=/etc \
|
|
|
|
--localstatedir=/var \
|
2014-12-13 12:10:32 +01:00
|
|
|
--disable-dselect \
|
|
|
|
--disable-start-stop-daemon \
|
|
|
|
--disable-update-alternatives \
|
2017-03-10 21:42:08 +01:00
|
|
|
--without-libselinux</userinput></screen>
|
2012-02-02 00:29:37 +01:00
|
|
|
|
|
|
|
<variablelist>
|
|
|
|
<title>The meaning of the configure options:</title>
|
|
|
|
|
|
|
|
<varlistentry>
|
2014-12-13 12:10:32 +01:00
|
|
|
<term><parameter>--disable-dselect</parameter></term>
|
2012-02-02 00:29:37 +01:00
|
|
|
<listitem>
|
|
|
|
<para>Avoids building <command>dselect</command>, an
|
|
|
|
awful thing!</para>
|
|
|
|
</listitem>
|
|
|
|
</varlistentry>
|
|
|
|
|
|
|
|
<varlistentry>
|
2014-12-13 12:10:32 +01:00
|
|
|
<term><parameter>--disable-start-stop-daemon</parameter></term>
|
2012-02-02 00:29:37 +01:00
|
|
|
<listitem>
|
|
|
|
<para>The utility <command>start-stop-daemon</command>
|
|
|
|
is not needed here.</para>
|
|
|
|
</listitem>
|
|
|
|
</varlistentry>
|
|
|
|
|
|
|
|
<varlistentry>
|
2014-12-13 12:10:32 +01:00
|
|
|
<term><parameter>--disable-update-alternatives</parameter></term>
|
2012-02-02 00:29:37 +01:00
|
|
|
<listitem>
|
|
|
|
<para>Same for <command>update-alternatives</command>.</para>
|
|
|
|
</listitem>
|
|
|
|
</varlistentry>
|
|
|
|
|
|
|
|
<varlistentry>
|
2017-03-10 21:42:08 +01:00
|
|
|
<term><parameter>--without-libselinux</parameter></term>
|
2012-02-02 00:29:37 +01:00
|
|
|
<listitem>
|
2014-12-13 12:10:32 +01:00
|
|
|
<para>Selinux is not used in LFS.</para>
|
2012-02-02 00:29:37 +01:00
|
|
|
</listitem>
|
|
|
|
</varlistentry>
|
|
|
|
|
|
|
|
</variablelist>
|
|
|
|
|
|
|
|
<para>Compile the package:</para>
|
|
|
|
|
|
|
|
<screen><userinput remap="make">make</userinput></screen>
|
|
|
|
|
|
|
|
<para>This package does not come with a test suite.</para>
|
|
|
|
|
|
|
|
<para>Install the package:</para>
|
|
|
|
|
|
|
|
<screen><userinput remap="install">mkdir -pv $PKG_DEST
|
|
|
|
make DESTDIR=$PKG_DEST install
|
|
|
|
mkdir -pv $PKG_DEST/etc/dpkg/{,dpkg.cfg.d}
|
|
|
|
cp debian/dpkg.cfg $PKG_DEST/etc/dpkg</userinput></screen>
|
|
|
|
|
|
|
|
<para>Add a line in <filename>dpkg.cfg</filename> to
|
|
|
|
tell where to put administration files</para>
|
|
|
|
|
|
|
|
<screen><userinput remap="install">cat >> $PKG_DEST/etc/dpkg/dpkg.cfg << EOF
|
|
|
|
# admindir on LFS system
|
|
|
|
admindir /var/lib/dpkg
|
|
|
|
EOF</userinput></screen>
|
|
|
|
|
|
|
|
<!-- Is this needed in chapter 06 -->
|
|
|
|
<para>On a Debian system, <command>dpkg</command> relies on two other
|
|
|
|
files (<command>ldconfig</command> and maybe <command>update-rc.d</command>)
|
|
|
|
to be present. Since we do not install them, issue:</para>
|
|
|
|
|
|
|
|
<screen><userinput>cat >> /etc/dpkg/dpkg.cfg << EOF
|
|
|
|
# disable fatal error on path checking
|
|
|
|
force-bad-path
|
|
|
|
EOF</userinput></screen>
|
|
|
|
|
|
|
|
</sect2>
|
|
|
|
|
|
|
|
</sect1>
|
|
|
|
</article>
|