source: README.BLFS@ b4cf321

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

Making more prominent that only one target must be selected on each run.

  • Property mode set to 100644
File size: 10.4 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 WARNING:
108 Only one target (meta-package or individual package) must be
109 selected on each configuration run.
110 That is due that there is no way to solve dependencies properly
111 when more than one target are selected at the same time.
112
113 Run <make> to launch the configuration interface. The main menu contains
114 three block: meta-package selection, individual package selection, and
115 build options.
116
117 When a meta-package is selected is possible to unselect unwanted components.
118 That unselected components will be skipped if no other components depends
119 on them.
120
121 In the build options section the dependencies level and default packages
122 used to solve alternatives are set. Can be set also if the build will be
123 made as a normal user or as root. That settings are saved to be reused on
124 future configuration runs.
125
126 If, for example, your target selection is Xsoft-->Graphweb-->galeon a
127 directory named "galeon" will be created. Inside that directory you will
128 find a directory named "HTML" that contains a galeon-based HTML book with
129 its dependencies in build order, and a "scripts" directory with build
130 scripts for that packages.
131
132 There is also two other directories, "dependencies" and "xincludes", that
133 contains files generated while resolving dependencies trees.
134
135 3.5 EDITING BUILD SCRIPTS
136
137 Now is time to review the generated book and scripts, making in the
138 scripts any changes required to fix generation bugs or to fit your needs.
139
140 Scripts for additional packages (i.e., for non-BLFS packages) can be
141 inserted in an easy way due how the scripts are named. For example, if you
142 want to install the external dependency "bar" before "foo" package and the
143 "foo" script is named "064-z-foo", you need to create a "064-y-bar" build
144 script.
145
146 Remember that the packages tracking system isn't a packages management tool
147 and know nothing about packages not in the BLFS book.
148
149 Also, review and edit envars.conf. That file is used to set global envars
150 needed by the build scripts.
151
152 3.6 CREATING THE MAKEFILE
153
154 When the build scripts are ready to be run, the Makefile can be
155 created. Be sure that you cd into the "package" directory and run
156
157 ../gen_makefile.sh
158
159 Review the Makefile and if all looks sane, start the build.
160
1614. GENERATED BUILD SCRIPTS ISSUES::
162
163 In this section known issues with the generated build scripts are
164 discussed. They are due build procedures and/or BLFS layout particularities
165 than we can't handle. In several cases editing the build scripts is mandatory.
166 You may need also to insert some build script created by you to resolve
167 unhandled dependencies and/or to remove some script installing the affected
168 package by hand.
169
170 4.1 BLFS BOOTSCRIPTS
171
172 For now, bootscripts installation will fail. You will need to edit the
173 scripts for packages that install bootscripts and fix their installation
174 command. That could be fixed in the future, but not sure.
175
176 4.2 PACKAGES CONFIGURATION
177
178 For that packages that have a "Configuration" section, you should to
179 edit it build script to fit the configuration to your needs.
180
181 4.4 PDL and Perl modules.
182
183 The generated scripts for that packages are plainly broken and can't
184 be fixed. You must to replace it by your own ones or install that
185 packages by hand.
186
187 4.4 GCC, JDK, Sane, and KDE-multimedia
188
189 On the pages for that packages, the BLFS book actually have instructions
190 to install two packages. You must to edit the scripts to fix it. We will
191 try to fix some of them, but may not be possible.
192
193 4.5 XORG7
194
195 The generated scripts for Xorg7 pseudo-packages don't have support for
196 $SRC_ARCHIVE nor MD5 checking.
197
198 If you has downloaded previously the packages, you must to edit the scripts
199 to make it to use your local packages.
200
201 Also, you will need to edit the scripts to fix the commands that must
202 be applied only to a concrete individual sub-package. For example the "for"
203 loop to install xorg7-util packages may read like:
204
205for package in $(cat $WGET_LST) ; do
206 packagedir=$(echo $package | sed 's/.tar.bz2//')
207 tar -xf $package
208 cd $packagedir
209 sed -i "s@/usr/X11R6@$XORG_PREFIX@" X11.tmpl &&
210 ./configure $XORG_CONFIG --with-config-dir=$XORG_PREFIX/lib/X11/config
211 sudo sh -c "make install"
212 ./configure $XORG_CONFIG --with-config-dir=$XORG_PREFIX/lib/X11/config &&
213 make
214 sudo sh -c "make install"
215 ./configure $XORG_CONFIG &&
216 make
217 sudo sh -c "make install"
218 cd ..
219 rm -rf $packagedir
220done
221
222 After reading the HTML page to know what commands is for what package,
223 the loop can be changed to read something like:
224
225for package in $(cat $WGET_LST) ; do
226 packagedir=$(echo $package | sed 's/.tar.bz2//')
227 tar -xf $package
228 cd $packagedir
229 if [ ${packagedir} = "xorg-cf-files" ] ; then
230 sed -i "s@/usr/X11R6@$XORG_PREFIX@" X11.tmpl &&
231 ./configure $XORG_CONFIG --with-config-dir=$XORG_PREFIX/lib/X11/config
232 sudo sh -c "make install"
233 elif [ ${packagedir} = "Imake" ] ; then
234 ./configure $XORG_CONFIG --with-config-dir=$XORG_PREFIX/lib/X11/config &&
235 make
236 sudo sh -c "make install"
237 else
238 ./configure $XORG_CONFIG &&
239 make
240 sudo sh -c "make install"
241 fi
242 cd ..
243 rm -rf $packagedir
244done
245
246 4.6 PATCHES
247
248 By default all required patches will be downloaded from the NET.
249
250 If you has downloaded previously the patches, you must to edit the scripts
251 to make it to use your local patches.
252
253 Also, be sure that all scripts have the commands to download/apply the
254 required patches. Due book layout issues some patches may be missing.
255
256 4.7 ROOT COMMANDS
257
258 If building as a normal user (the default setting) be sure that all
259 commands that need root privileges are run using sudo.
260
261 Due book layout issues some sudo command may be missing.
262
263 4.8 OTHERS
264
265 May have other issues that we are not aware on them yet. If you find
266 someone, please report it to <alfs-discuss@linuxfromscratch.org>.
267
268
Note: See TracBrowser for help on using the repository browser.