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