[4c6f54f] | 1 | <!-- $Id$ -->
|
---|
[7072e1f] | 2 | <!-- Mandatory header for xml files change encoding to the one
|
---|
| 3 | you use on your computer -->
|
---|
| 4 | <?xml version="1.0" encoding="UTF-8"?>
|
---|
| 5 | <!-- Mandatory DOCTYPE declaration. Fill free to add entities,
|
---|
| 6 | but no external entities in local files, since they would not
|
---|
| 7 | be accessible from JHALFSDIR. Change the document type `article' to
|
---|
| 8 | book if you prefer. That slightly changes the aspect if you render
|
---|
| 9 | it in html -->
|
---|
| 10 | <!DOCTYPE article PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
|
---|
| 11 | "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" >
|
---|
| 12 |
|
---|
| 13 | <!-- The first markup should be the one defined in the DOCTYPE DECLARATION -->
|
---|
| 14 | <article>
|
---|
| 15 |
|
---|
| 16 | <!-- First section for the tarball download address.
|
---|
| 17 | Only the next four lines are mandatory, but you can add anything
|
---|
| 18 | to make the text look more like the LFS book.
|
---|
| 19 | Do not change anything, except the url and the md5 checksum. -->
|
---|
| 20 | <sect1 id="package">
|
---|
| 21 | <para>Download: <ulink url="http://your/package-manager/url"/></para>
|
---|
| 22 | <para>MD5 sum: <literal>package-md5-checksum</literal></para>
|
---|
| 23 | </sect1>
|
---|
| 24 |
|
---|
| 25 | <!-- If needed, uncomment and edit this:
|
---|
| 26 | <sect1 id="patches">
|
---|
| 27 | <para>Download: <ulink url="somepatch-url"/></para>
|
---|
| 28 | <para>MD5 sum: <literal>somepatch-md5</literal></para>
|
---|
| 29 | </sect1>
|
---|
| 30 | -->
|
---|
| 31 |
|
---|
| 32 | <!-- Do not change the next line. The name of the scriptlet will be taken
|
---|
| 33 | from the dbhtml instruction: it is the name of the file less .html, with
|
---|
| 34 | xxx-x-added before (x, digits). Furthermore, the tarball name must be in the form
|
---|
| 35 | name_x.y.z(.extension) or name-x.y.z(.extension) if the dbhtml
|
---|
| 36 | instruction contains file="name.html" -->
|
---|
| 37 | <sect1 id="ch-tools-pkgmngt" role="wrap">
|
---|
| 38 | <?dbhtml filename="dpkg.html"?>
|
---|
| 39 | <!-- next line mandatory without change, but feel free to add any title,
|
---|
| 40 | other sect2 (with different role), sectinfo and so on -->
|
---|
| 41 | <sect2 role="installation">
|
---|
| 42 | <!-- You can use any number of remap="pre", "configure", "make", "test", "install"
|
---|
| 43 | <screen><userinput remap="something">Instructions</userinput></screen>.
|
---|
| 44 | They are executed in that order. "pre" can be used for patching for example.
|
---|
| 45 | In case testing is enabled, the instructions flagged test are logged to a different
|
---|
| 46 | file (test-log). If testing is not enabled, they are not executed at all. Do not
|
---|
| 47 | put line breaks before and after your instructions. <userinput> without
|
---|
| 48 | remap attribute are considered configuration instructions and executed last. You
|
---|
| 49 | can also use remap="adjust" for the same purpose. -->
|
---|
| 50 | <screen><userinput remap="configure">./configure --prefix=/tools \
|
---|
| 51 | --disable-nls --without-dselect \
|
---|
| 52 | --without-start-stop-daemon \
|
---|
| 53 | --without-update-alternatives \
|
---|
| 54 | --without-install-info \
|
---|
| 55 | --without-zlib --with-bz2=static --without-selinux</userinput></screen>
|
---|
| 56 |
|
---|
| 57 | <screen><userinput remap="make">(cd lib && make)
|
---|
| 58 | (cd src && make)
|
---|
| 59 | (cd dpkg-deb && make)
|
---|
| 60 | (cd dpkg-split && make)</userinput></screen>
|
---|
| 61 |
|
---|
| 62 | <screen><userinput remap="install">cp src/dpkg src/dpkg-* /tools/bin
|
---|
| 63 | cp dpkg-deb/dpkg-deb /tools/bin
|
---|
| 64 | cp dpkg-split/dpkg-split /tools/bin
|
---|
| 65 | mkdir -pv /tools/etc/dpkg/{,dpkg.cfg.d}
|
---|
| 66 | cp debian/dpkg.cfg /tools/etc/dpkg</userinput></screen>
|
---|
| 67 |
|
---|
| 68 | <screen><userinput>cat >> /tools/etc/dpkg/dpkg.cfg << EOF
|
---|
| 69 | # admindir on LFS system
|
---|
| 70 | admindir /var/lib/dpkg
|
---|
| 71 | EOF</userinput></screen>
|
---|
| 72 |
|
---|
| 73 | <screen><userinput>cat >> /tools/etc/dpkg/dpkg.cfg << EOF
|
---|
| 74 | # disable fatal error on path checking
|
---|
| 75 | force-bad-path
|
---|
| 76 | EOF</userinput></screen>
|
---|
| 77 |
|
---|
| 78 | </sect2>
|
---|
| 79 |
|
---|
| 80 | </sect1>
|
---|
| 81 |
|
---|
| 82 | <!-- Mandatory section for creating dirs. These instructions are added at the
|
---|
| 83 | end of the creating dirs instructions of the book. Do not change the
|
---|
| 84 | following line -->
|
---|
[575bcf3] | 85 | <sect1 id="ch-pkgmngt-creatingdirs">
|
---|
[7072e1f] | 86 |
|
---|
[575bcf3] | 87 | <!-- Put the create dir intructions there. feel free to add
|
---|
[7072e1f] | 88 | any explaining <title>Title</title> and <para>explanations</para> -->
|
---|
| 89 | <screen><userinput>mkdir -pv /var/{log,lib/dpkg/{info,updates}}
|
---|
| 90 | mkdir -pv /var/lib/packages</userinput></screen>
|
---|
| 91 |
|
---|
| 92 | </sect1>
|
---|
| 93 | <!-- Same for files. Do not change the following line -->
|
---|
[575bcf3] | 94 | <sect1 id="ch-pkgmngt-createfiles">
|
---|
[7072e1f] | 95 |
|
---|
| 96 | <screen><userinput>touch /var/lib/dpkg/{available,status}
|
---|
| 97 | touch /var/log/dpkg.log</userinput></screen>
|
---|
| 98 |
|
---|
| 99 | </sect1>
|
---|
| 100 |
|
---|
| 101 | <!-- Last but not least : Final instructions for installing the
|
---|
| 102 | package manager at the end of chapter 6. Again, the scriptlet file name is
|
---|
| 103 | taken from the dbhtml instruction, with digits added before and .html cut
|
---|
| 104 | and the tarball name is formed from this name + version. So the file
|
---|
| 105 | here _must_ be the same as in chapter 5. If rendering in html, both
|
---|
| 106 | sets of instructions end up in the same file, which is usually not a problem.
|
---|
| 107 | -->
|
---|
| 108 | <sect1 id="ch-system-pkgmngt" role="wrap">
|
---|
| 109 | <?dbhtml filename="dpkg.html"?>
|
---|
| 110 |
|
---|
| 111 | <sect2 role="installation">
|
---|
| 112 |
|
---|
| 113 | <screen><userinput remap="configure">./configure --prefix=/usr \
|
---|
| 114 | --without-dselect \
|
---|
| 115 | --without-start-stop-daemon \
|
---|
| 116 | --without-update-alternatives \
|
---|
| 117 | --without-install-info \
|
---|
| 118 | --without-selinux</userinput></screen>
|
---|
| 119 |
|
---|
| 120 | <screen><userinput remap="make">make</userinput></screen>
|
---|
| 121 |
|
---|
| 122 | <!-- Those instructions are executed with PKG_DEST set. They are not processed
|
---|
| 123 | in any way to add $PKG_DEST at some place, and the PKG_DEST directory is not
|
---|
| 124 | populated before, so it is basically empty. You have thus to create any directory
|
---|
| 125 | needed in $PKG_DEST and not otherwise created by the make install command. -->
|
---|
| 126 | <screen><userinput remap="install">mkdir -pv $PKG_DEST
|
---|
| 127 | make DESTDIR=$PKG_DEST install
|
---|
| 128 | mkdir -pv $PKG_DEST/etc/dpkg/{,dpkg.cfg.d}
|
---|
| 129 | cp debian/dpkg.cfg $PKG_DEST/etc/dpkg</userinput></screen>
|
---|
| 130 |
|
---|
| 131 | <screen><userinput remap="install">cat >> $PKG_DEST/etc/dpkg/dpkg.cfg << EOF
|
---|
| 132 | # admindir on LFS system
|
---|
| 133 | admindir /var/lib/dpkg
|
---|
| 134 | EOF</userinput></screen>
|
---|
| 135 |
|
---|
| 136 | <screen><userinput>cat >> $PKG_DEST/etc/dpkg/dpkg.cfg << EOF
|
---|
| 137 | # disable fatal error on path checking
|
---|
| 138 | force-bad-path
|
---|
| 139 | EOF</userinput></screen>
|
---|
| 140 |
|
---|
| 141 | </sect2>
|
---|
| 142 |
|
---|
| 143 | </sect1>
|
---|
| 144 | </article>
|
---|