]>
All Packages Download or otherwise obtain the following packages: Dpkg (&dpkg-version;) - &dpkg-size;: Home page: Download: MD5 sum: &dpkg-md5; dpkg &dpkg-version;
&dpkg-url;
Dpkg-&dpkg-version; <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> <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 Since Debian is shipping its own package, all patches have already been applied. However, the configure script calls dpkg itself, which is found only on Debian hosts. The following sed command prevents that call: sed '/\$v[{]DEB_BUILD/d' \ -i scripts/dpkg-architecture.pl Configure the package: ./configure --prefix=/tools \ --disable-nls --without-dselect \ --without-start-stop-daemon \ --without-update-alternatives \ --without-install-info \ --without-zlib --with-bz2=static --without-selinux The meaning of the configure options: --without-dselect Avoids building dselect, an awful thing! --without-start-stop-daemon The utility start-stop-daemon is not needed here. --without-update-alternatives Same for update-alternatives. --without-install-info Debian install-info is a wrapper to install-info installed by Texinfo. Not needed either. Compile the package: (cd lib && make) (cd src && make) (cd dpkg-deb && make) (cd dpkg-split && make) This package does not come with a test suite. Install only the needed files: 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 Add a line in dpkg.cfg to tell where to put administration files cat >> /tools/etc/dpkg/dpkg.cfg << EOF # admindir on LFS system admindir /var/lib/dpkg EOF On a Debian system, dpkg relies on two other files to be present. Since we do not install them, issue: cat >> /tools/etc/dpkg/dpkg.cfg << EOF # disable fatal error on path checking force-bad-path EOF
Adding Directories for package management Those directories should be added to the system. /var/lib/dpkg and subdirectories are adminitrative directories of dpkg. /var/log is the log directory for dpkg. /var/lib/packages will be used to store our packages.deb files. mkdir -pv /var/{log,lib/dpkg/{info,updates}} mkdir -pv /var/lib/packages Adding administrative files for Dpkg dpkg needs that some files exist to run for the first time. The log file must exist in order to be used. touch /var/lib/dpkg/{available,status} touch /var/log/dpkg.log dpkg &dpkg-version;
&dpkg-url;
Dpkg-&dpkg-version; <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> <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 Since Debian is shipping its own package, all patches have already been applied. We can go directly to configuring it: ./configure --prefix=/usr \ --sysconfdir=/etc \ --localstatedir=/var \ --without-dselect \ --without-start-stop-daemon \ --without-update-alternatives \ --without-install-info \ --without-selinux The meaning of the configure options: --without-dselect Avoids building dselect, an awful thing! --without-start-stop-daemon The utility start-stop-daemon is not needed here. --without-update-alternatives Same for update-alternatives. --without-install-info Debian install-info is a wrapper to install-info installed by Texinfo. Not needed either. Compile the package: make This package does not come with a test suite. Install the package: 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 Add a line in dpkg.cfg to tell where to put administration files cat >> $PKG_DEST/etc/dpkg/dpkg.cfg << EOF # admindir on LFS system admindir /var/lib/dpkg EOF On a Debian system, dpkg relies on two other files (ldconfig and maybe update-rc.d) to be present. Since we do not install them, issue: cat >> /etc/dpkg/dpkg.cfg << EOF # disable fatal error on path checking force-bad-path EOF