source: README.BLFS@ 0208570

experimental
Last change on this file since 0208570 was 855296f, checked in by Manuel Canales Esparcia <manuel@…>, 18 years ago

More README.BLFS updates.

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