1 | <!-- $Id$ -->
|
---|
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 | You can add several packages (see packageManager.xml.pacman)
|
---|
20 | Do not change anything, except the url and the md5 checksum. -->
|
---|
21 | <sect1 id="package">
|
---|
22 | <para>Download: <ulink url="http://your/package-manager/url"/></para>
|
---|
23 | <para>MD5 sum: <literal>package-md5-checksum</literal></para>
|
---|
24 | </sect1>
|
---|
25 |
|
---|
26 | <!-- If needed, uncomment and edit this:
|
---|
27 | <sect1 id="patches">
|
---|
28 | <para>Download: <ulink url="somepatch-url"/></para>
|
---|
29 | <para>MD5 sum: <literal>somepatch-md5</literal></para>
|
---|
30 | </sect1>
|
---|
31 | -->
|
---|
32 |
|
---|
33 | <!-- We have three groups of sections with installation instructions:
|
---|
34 | - the one with id ch-tools-xxx is for old book, where
|
---|
35 | the package manager (and its needed deps) is built as user
|
---|
36 | lfs in /tools
|
---|
37 | - the one with id ch-chroot-xxx is for new book, where the
|
---|
38 | package manager (and its needed deps) is built temporarily
|
---|
39 | in chroot
|
---|
40 | - the one with id ch-system-xxx is for both book, when the
|
---|
41 | package manager (and its deps) is rebuilt with instructions
|
---|
42 | to make a package of it.
|
---|
43 |
|
---|
44 | Do not change the next line, except the -pkgmngt part.
|
---|
45 | The name of the scriptlet will be taken from the dbhtml instruction:
|
---|
46 | it is the name of the file less .html, with xxx-x-added before
|
---|
47 | (x, digits). -->
|
---|
48 | <sect1 id="ch-tools-pkgmngt" role="wrap">
|
---|
49 | <?dbhtml filename="pkgmngt.html"?>
|
---|
50 | <!-- the next lines are now mandatory for unpacking the tarball at the
|
---|
51 | beginning of the scriptlet -->
|
---|
52 | <sect1info condition="script">
|
---|
53 | <productname>dpkg</productname>
|
---|
54 | <productnumber>x.y.z</productnumber><!-- version -->
|
---|
55 | <address>http://where/is/your/package</address><!-- url -->
|
---|
56 | </sect1info>
|
---|
57 | <!-- next line mandatory without change, but feel free to add any title,
|
---|
58 | other sect2 (with different role), sectinfo and so on -->
|
---|
59 | <sect2 role="installation">
|
---|
60 | <!-- You can use any number of remap="pre", "configure", "make", "test", "install"
|
---|
61 | <screen><userinput remap="something">Instructions</userinput></screen>.
|
---|
62 | They are executed in that order. "pre" can be used for patching for example.
|
---|
63 | In case testing is enabled, the instructions flagged test are logged to a different
|
---|
64 | file (test-log). If testing is not enabled, they are not executed at all. Do not
|
---|
65 | put line breaks before and after your instructions. <userinput> without
|
---|
66 | remap attribute are considered configuration instructions and executed last. You
|
---|
67 | can also use remap="adjust" for the same purpose. -->
|
---|
68 | <screen><userinput remap="configure">./configure --prefix=/tools \
|
---|
69 | --disable-nls --without-dselect \
|
---|
70 | --without-start-stop-daemon \
|
---|
71 | --without-update-alternatives \
|
---|
72 | --without-install-info \
|
---|
73 | --without-zlib --with-bz2=static --without-selinux</userinput></screen>
|
---|
74 |
|
---|
75 | <screen><userinput remap="make">(cd lib && make)
|
---|
76 | (cd src && make)
|
---|
77 | (cd dpkg-deb && make)
|
---|
78 | (cd dpkg-split && make)</userinput></screen>
|
---|
79 |
|
---|
80 | <screen><userinput remap="install">cp src/dpkg src/dpkg-* /tools/bin
|
---|
81 | cp dpkg-deb/dpkg-deb /tools/bin
|
---|
82 | cp dpkg-split/dpkg-split /tools/bin
|
---|
83 | mkdir -pv /tools/etc/dpkg/{,dpkg.cfg.d}
|
---|
84 | cp debian/dpkg.cfg /tools/etc/dpkg</userinput></screen>
|
---|
85 |
|
---|
86 | <screen><userinput>cat >> /tools/etc/dpkg/dpkg.cfg << EOF
|
---|
87 | # admindir on LFS system
|
---|
88 | admindir /var/lib/dpkg
|
---|
89 | EOF</userinput></screen>
|
---|
90 |
|
---|
91 | <screen><userinput>cat >> /tools/etc/dpkg/dpkg.cfg << EOF
|
---|
92 | # disable fatal error on path checking
|
---|
93 | force-bad-path
|
---|
94 | EOF</userinput></screen>
|
---|
95 |
|
---|
96 | </sect2>
|
---|
97 |
|
---|
98 | </sect1>
|
---|
99 |
|
---|
100 | <!-- for new book, at the end of chapter 7 -->
|
---|
101 | <sect1 id="ch-chroot-pkgmngt" role="wrap">
|
---|
102 | <?dbhtml filename="pkgmngt.html"?>
|
---|
103 | <!-- the next lines are now mandatory for unpacking the tarball at the
|
---|
104 | beginning of the scriptlet -->
|
---|
105 | <sect1info condition="script">
|
---|
106 | <productname>dpkg</productname>
|
---|
107 | <productnumber>x.y.z</productnumber><!-- version -->
|
---|
108 | <address>http://where/is/your/package</address><!-- url -->
|
---|
109 | </sect1info>
|
---|
110 | <!-- next line mandatory without change, but feel free to add any title,
|
---|
111 | other sect2 (with different role), sectinfo and so on -->
|
---|
112 | <sect2 role="installation">
|
---|
113 | <!-- You can use any number of remap="pre", "configure", "make", "test", "install"
|
---|
114 | <screen><userinput remap="something">Instructions</userinput></screen>.
|
---|
115 | They are executed in that order. "pre" can be used for patching for example.
|
---|
116 | In case testing is enabled, the instructions flagged test are logged to a different
|
---|
117 | file (test-log). If testing is not enabled, they are not executed at all. Do not
|
---|
118 | put line breaks before and after your instructions. <userinput> without
|
---|
119 | remap attribute are considered configuration instructions and executed last. You
|
---|
120 | can also use remap="adjust" for the same purpose. -->
|
---|
121 | <screen><userinput remap="configure">./configure --prefix=/tools \
|
---|
122 | --disable-nls --without-dselect \
|
---|
123 | --without-start-stop-daemon \
|
---|
124 | --without-update-alternatives \
|
---|
125 | --without-install-info \
|
---|
126 | --without-zlib --with-bz2=static --without-selinux</userinput></screen>
|
---|
127 |
|
---|
128 | <screen><userinput remap="make">(cd lib && make)
|
---|
129 | (cd src && make)
|
---|
130 | (cd dpkg-deb && make)
|
---|
131 | (cd dpkg-split && make)</userinput></screen>
|
---|
132 |
|
---|
133 | <screen><userinput remap="install">cp src/dpkg src/dpkg-* /tools/bin
|
---|
134 | cp dpkg-deb/dpkg-deb /tools/bin
|
---|
135 | cp dpkg-split/dpkg-split /tools/bin
|
---|
136 | mkdir -pv /tools/etc/dpkg/{,dpkg.cfg.d}
|
---|
137 | cp debian/dpkg.cfg /tools/etc/dpkg</userinput></screen>
|
---|
138 |
|
---|
139 | <screen><userinput>cat >> /tools/etc/dpkg/dpkg.cfg << EOF
|
---|
140 | # admindir on LFS system
|
---|
141 | admindir /var/lib/dpkg
|
---|
142 | EOF</userinput></screen>
|
---|
143 |
|
---|
144 | <screen><userinput>cat >> /tools/etc/dpkg/dpkg.cfg << EOF
|
---|
145 | # disable fatal error on path checking
|
---|
146 | force-bad-path
|
---|
147 | EOF</userinput></screen>
|
---|
148 |
|
---|
149 | </sect2>
|
---|
150 |
|
---|
151 | </sect1>
|
---|
152 |
|
---|
153 | <!-- Mandatory section for creating dirs. These instructions are added at the
|
---|
154 | end of the creating dirs instructions of the book. Do not change the
|
---|
155 | following line -->
|
---|
156 | <sect1 id="ch-pkgmngt-creatingdirs">
|
---|
157 |
|
---|
158 | <!-- Put the create dir intructions there. feel free to add
|
---|
159 | any explaining <title>Title</title> and <para>explanations</para> -->
|
---|
160 | <screen><userinput>mkdir -pv /var/{log,lib/dpkg/{info,updates}}
|
---|
161 | mkdir -pv /var/lib/packages</userinput></screen>
|
---|
162 |
|
---|
163 | </sect1>
|
---|
164 | <!-- Same for files. Do not change the following line.
|
---|
165 | Those instructions are not executed for the new book.
|
---|
166 | If needed create files at the end of the temp install. -->
|
---|
167 | <sect1 id="ch-pkgmngt-createfiles">
|
---|
168 |
|
---|
169 | <screen><userinput>touch /var/lib/dpkg/{available,status}
|
---|
170 | touch /var/log/dpkg.log</userinput></screen>
|
---|
171 |
|
---|
172 | </sect1>
|
---|
173 |
|
---|
174 | <!-- Last but not least : Final instructions for installing the
|
---|
175 | package manager at the end of chapter 6. Again, the scriptlet file name is
|
---|
176 | taken from the dbhtml instruction, with digits added before and .html cut.
|
---|
177 | There can be any number of sections for dependencies, all with id
|
---|
178 | ch-system-xxx (all the id's must be different).
|
---|
179 | -->
|
---|
180 | <sect1 id="ch-system-pkgmngt" role="wrap">
|
---|
181 | <?dbhtml filename="dpkg.html"?>
|
---|
182 |
|
---|
183 | <!-- the next lines are now mandatory for unpacking the tarball at the
|
---|
184 | beginning of the scriptlet -->
|
---|
185 | <sect1info condition="script">
|
---|
186 | <productname>dpkg</productname><!-- for example -->
|
---|
187 | <productnumber>x.y.z</productnumber><!-- version -->
|
---|
188 | <address>http://where/is/your/package</address><!-- url -->
|
---|
189 | </sect1info>
|
---|
190 |
|
---|
191 | <sect2 role="installation">
|
---|
192 |
|
---|
193 | <screen><userinput remap="configure">./configure --prefix=/usr \
|
---|
194 | --without-dselect \
|
---|
195 | --without-start-stop-daemon \
|
---|
196 | --without-update-alternatives \
|
---|
197 | --without-install-info \
|
---|
198 | --without-selinux</userinput></screen>
|
---|
199 |
|
---|
200 | <screen><userinput remap="make">make</userinput></screen>
|
---|
201 |
|
---|
202 | <!-- Those instructions are executed with PKG_DEST set. They are not processed
|
---|
203 | in any way to add $PKG_DEST at some place, and the PKG_DEST directory is not
|
---|
204 | populated before, so it is basically empty. You have thus to create any directory
|
---|
205 | needed in $PKG_DEST and not otherwise created by the make install command. -->
|
---|
206 | <screen><userinput remap="install">mkdir -pv $PKG_DEST
|
---|
207 | make DESTDIR=$PKG_DEST install
|
---|
208 | mkdir -pv $PKG_DEST/etc/dpkg/{,dpkg.cfg.d}
|
---|
209 | cp debian/dpkg.cfg $PKG_DEST/etc/dpkg</userinput></screen>
|
---|
210 |
|
---|
211 | <screen><userinput remap="install">cat >> $PKG_DEST/etc/dpkg/dpkg.cfg << EOF
|
---|
212 | # admindir on LFS system
|
---|
213 | admindir /var/lib/dpkg
|
---|
214 | EOF</userinput></screen>
|
---|
215 |
|
---|
216 | <screen><userinput>cat >> $PKG_DEST/etc/dpkg/dpkg.cfg << EOF
|
---|
217 | # disable fatal error on path checking
|
---|
218 | force-bad-path
|
---|
219 | EOF</userinput></screen>
|
---|
220 |
|
---|
221 | </sect2>
|
---|
222 |
|
---|
223 | </sect1>
|
---|
224 | </article>
|
---|