source: README.BLFS@ e0a6b8a

experimental
Last change on this file since e0a6b8a was 4875ed3, checked in by Manuel Canales Esparcia <manuel@…>, 18 years ago

Fixed the list of installed files.

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