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