source: README.BLFS@ aecb378

2.3 2.3.x 2.4 ablfs ablfs-more legacy new_features trunk
Last change on this file since aecb378 was 6271c55, checked in by Manuel Canales Esparcia <manuel@…>, 18 years ago

Typos

  • Property mode set to 100644
File size: 10.3 KB
Line 
1$Id$
2
31. INTRODUCTION::
4
5 To automatize packages build from the BLFS book instructions is a huge
6 task. The BLFS book isn't linear, some package pages need to use a non
7 default layout, there are circular dependencies, several packages can be
8 installed on a non default prefix, build commands can change based on what
9 dependencies will be used, etc.
10
11 Said that, the goal of blfs-tool is try to help you solving packages
12 dependencies and creating your own build scripts and Makefile. Few of the
13 auto-generated build scripts and Makefile could work "as is", thus as a
14 general rule you will need to review and edit the scripts while reading
15 the book.
16
17
182. PREREQUISITES::
19
20 To use this tool you MUST to:
21
22 - have experience building BLFS packages
23 - know how to edit and write shell scripts
24 - know how a Makefile works
25 - be able to trace build failures and to find what is causing it
26 (user error, package bug, BLFS command bug, or jhalfs code bug)
27
28 If you do not have the above skills, please don't use this tool.
29
30
313. USAGE::
32
33 Due the complexity of the BLFS book, the scripts and Makefile generation is
34 done in several steps:
35
36 3.1 INSTALLED PACKAGES TRACKING SYSTEM
37
38 This tool includes a very simple tracking system to know what packages
39 has been installed using the tool. It is used to skip installed packages
40 from target selection menu and to know if an installed package has been updated
41 on the BLFS book. Don't rely on this feature as a packages management tool.
42
43 The directory where tracking files will be stored need be created
44 before installing blfs-tool. You can place that directory anywhere, taking
45 care that the builder user must have read and write privileges on that
46 directory and on all files it contains.
47
48 To use the default path set in the installation menu, run as root:
49
50 install -d -m1777 /var/lib/jhalfs/BLFS
51
52 3.2 BLFS_TOOL INSTALLATION::
53
54 Run "make" to launch the jhalfs menuconfig interface. Select the BLFS
55 book and it version. Then set the installation directory (default
56 $HOME/blfs_root), the BLFS sources directory (default blfs-xml), and
57 the installed packages tracking directory (default /var/lib/jhalfs/BLFS).
58
59 All required files will be placed in the installation directory and
60 BLFS XML sources will be checkout to the named sub-directory.
61
62 Installed files:
63
64 blfs-xml/* SVN tree of the selected BLFS book version
65 lib/* functions libraries, xsl stylesheets, and auto-generated
66 meta-packages dependencies tree files
67 menu/* lxdialog and menuconfig source code
68 README.BLFS this file
69 TODO developers notes
70 update_book.sh update the XML book sources and regenerates packages
71 database and meta-packages dependencies tree
72 gen_config.sh regenerates Config.in
73 gen_pkg_book.sh solve dependencies and generates linear BLFS books
74 and build scripts
75 gen-makefile.sh generates target Makefile
76 progress_bar.sh the target Makefile progress bar
77 Makefile run gen_config.sh to update Config.in,
78 then launch the menuconfig interface, and lastly run
79 gen_pkg_book.sh based on configuration settings
80 Config.in menuconfig interface input file
81 packages auto-generated packages database
82 envars.conf envars needed when running the target build scripts
83
84 From now on, all the work must be done from inside the installation
85 root directory.
86
87 When finished the installation, the configuration and target selection
88 menu is launch.
89
90 3.3 UPDATING BOOK SOURCES::
91
92 If using the development book version, and if you want to update already
93 installed packages to the new version found in that book, you need to update
94 the XML sources and packages database.
95
96 To do that run "./update_book.sh"
97
98 On the next configuration run, packages already installed but listed
99 with a new version in the book will be available for target selection and
100 used to solve dependencies.
101
102 3.4 CONFIGURING AND PARSING THE BOOK::
103
104 Next step is to create a book and build scripts in dependencies build order
105 for a target package. A target can be a package or a meta-package.
106
107 Run <make> to launch the configuration interface. The main menu contains
108 three block: meta-package selection, individual package selection, and
109 build options.
110
111 Only one meta-package or individual package must be selected on each run.
112 That is due that there is no way to solve dependencies properly when
113 more than one target are selected at the same time.
114
115 When a meta-package is selected is possible to unselect unwanted components.
116 That unselected components will be skipped if no other components depends
117 on them.
118
119 In the build options section the dependencies level and default packages
120 used to solve alternatives are set. Can be set also if the build will be
121 made as a normal user or as root. That settings are saved to be reused on
122 future configuration runs.
123
124 If, for example, your target selection is Xsoft-->Graphweb-->galeon a
125 directory named "galeon" will be created. Inside that directory you will
126 find a directory named "HTML" that contains a galeon-based HTML book with
127 its dependencies in build order, and a "scripts" directory with build
128 scripts for that packages.
129
130 There is also two other directories, "dependencies" and "xincludes", that
131 contains files generated while resolving dependencies trees.
132
133 3.5 EDITING BUILD SCRIPTS
134
135 Now is time to review the generated book and scripts, making in the
136 scripts any changes required to fix generation bugs or to fit your needs.
137
138 Scripts for additional packages (i.e., for non-BLFS packages) can be
139 inserted in an easy way due how the scripts are named. For example, if you
140 want to install the external dependency "bar" before "foo" package and the
141 "foo" script is named "064-z-foo", you need to create a "064-y-bar" build
142 script.
143
144 Remember that the packages tracking system isn't a packages management tool
145 and know nothing about packages not in the BLFS book.
146
147 Also, review and edit envars.conf. That file is used to set global envars
148 needed by the build scripts.
149
150 3.6 CREATING THE MAKEFILE
151
152 When the build scripts are ready to be run, the Makefile can be
153 created. Be sure that you cd into the "package" directory and run
154
155 ../gen_makefile.sh
156
157 Review the Makefile and if all looks sane, start the build.
158
1594. GENERATED BUILD SCRIPTS ISSUES::
160
161 In this section known issues with the generated build scripts are
162 discussed. They are due build procedures and/or BLFS layout particularities
163 than we can't handle. In several cases editing the build scripts is mandatory.
164 You may need also to insert some build script created by you to resolve
165 unhandled dependencies and/or to remove some script installing the affected
166 package by hand.
167
168 4.1 BLFS BOOTSCRIPTS
169
170 For now, bootscripts installation will fail. You will need to edit the
171 scripts for packages that install bootscripts and fix their installation
172 command. That could be fixed in the future, but not sure.
173
174 4.2 PACKAGES CONFIGURATION
175
176 For that packages that have a "Configuration" section, you should to
177 edit it build script to fit the configuration to your needs.
178
179 4.4 PDL and Perl modules.
180
181 The generated scripts for that packages are plainly broken and can't
182 be fixed. You must to replace it by your own ones or install that
183 packages by hand.
184
185 4.4 GCC, JDK, Sane, and KDE-multimedia
186
187 On the pages for that packages, the BLFS book actually have instructions
188 to install two packages. You must to edit the scripts to fix it. We will
189 try to fix some of them, but may not be possible.
190
191 4.5 XORG7
192
193 The generated scripts for Xorg7 pseudo-packages don't have support for
194 $SRC_ARCHIVE nor MD5 checking.
195
196 If you has downloaded previously the packages, you must to edit the scripts
197 to make it to use your local packages.
198
199 Also, you will need to edit the scripts to fix the commands that must
200 be applied only to a concrete individual sub-package. For example the "for"
201 loop to install xorg7-util packages may read like:
202
203for package in $(cat $WGET_LST) ; do
204 packagedir=$(echo $package | sed 's/.tar.bz2//')
205 tar -xf $package
206 cd $packagedir
207 sed -i "s@/usr/X11R6@$XORG_PREFIX@" X11.tmpl &&
208 ./configure $XORG_CONFIG --with-config-dir=$XORG_PREFIX/lib/X11/config
209 sudo sh -c "make install"
210 ./configure $XORG_CONFIG --with-config-dir=$XORG_PREFIX/lib/X11/config &&
211 make
212 sudo sh -c "make install"
213 ./configure $XORG_CONFIG &&
214 make
215 sudo sh -c "make install"
216 cd ..
217 rm -rf $packagedir
218done
219
220 After reading the HTML page to know what commands is for what package,
221 the loop can be changed to read something like:
222
223for package in $(cat $WGET_LST) ; do
224 packagedir=$(echo $package | sed 's/.tar.bz2//')
225 tar -xf $package
226 cd $packagedir
227 if [ ${packagedir} = "xorg-cf-files" ] ; then
228 sed -i "s@/usr/X11R6@$XORG_PREFIX@" X11.tmpl &&
229 ./configure $XORG_CONFIG --with-config-dir=$XORG_PREFIX/lib/X11/config
230 sudo sh -c "make install"
231 elif [ ${packagedir} = "Imake" ] ; then
232 ./configure $XORG_CONFIG --with-config-dir=$XORG_PREFIX/lib/X11/config &&
233 make
234 sudo sh -c "make install"
235 else
236 ./configure $XORG_CONFIG &&
237 make
238 sudo sh -c "make install"
239 fi
240 cd ..
241 rm -rf $packagedir
242done
243
244 4.6 PATCHES
245
246 By default all required patches will be downloaded from the NET.
247
248 If you has downloaded previously the patches, you must to edit the scripts
249 to make it to use your local patches.
250
251 Also, be sure that all scripts have the commands to download/apply the
252 required patches. Due book layout issues some patches may be missing.
253
254 4.7 ROOT COMMANDS
255
256 If building as a normal user (the default setting) be sure that all
257 commands that need root privileges are run using sudo.
258
259 Due book layout issues some sudo command may be missing.
260
261 4.8 OTHERS
262
263 May have other issues that we are not aware on them yet. If you find
264 someone, please report it to <alfs-discuss@linuxfromscratch.org>.
265
266
Note: See TracBrowser for help on using the repository browser.