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
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 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
17 NOTE:: The code is still under development and may contains several bugs
18
19
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
333. USAGE::
34
35 Due the complexity of the BLFS book, the scripts/Makefile generation is
36 done in several steps:
37
38 3.1 INSTALLATION::
39
40 Run "make" to launch the jhalfs menuconfig interface. Select the BLFS
41 book and it version. Then set the installation directory (default
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
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
53 README.BLFS this file
54 TODO developers notes
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 gen_pkg_book.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 run gen_config.sh to update Config.in,
63 then launch the menuconfig interface, and lastly run
64 gen_pkg_book.sh based on configuration settings
65 Config.in menuconfig interface input file
66 packages auto-generated packages database
67 envars.conf envars needed when running the target build scripts
68
69 From now on, all the work must be done from inside the installation
70 root directory.
71
72 3.2 UPDATING BOOK SOURCES::
73
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
80 3.3 CONFIGURING AND PARSING THE BOOK:: (obsolete, to be rewritten)
81
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
84 packages file. That is done using the blfs-parser.sh script, but we are trying
85 to make a menuconfig based system.
86
87 The script need three arguments:
88
89 package name as listed in packages file
90 dependencies level 1 for required,
91 2 for required an recommended
92 3 for required, recommended, and optional
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)
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
103 that uses sudo for commands that need root privileges.
104
105 There is also two other directories, dependencies and xincludes, that
106 contains files generated while resolving dependencies trees.
107
108 3.4 EDITING BUILD SCRIPTS
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.
118
119 Note that the packages tracking system isn't a packages management tool
120 and know nothing about packages not in the BLFS book.
121
122 3.5 CREATING THE MAKEFILE
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
125
126 ../gen_makefile.sh
127
128 Review the Makefile and if all look sane, start the build.
129
130
131(Text is needed about meta-packages, the installed packages tracking system
132and like)
133
134(The TRACKING_DIR directory must be created before using this tool running as root
135
136install -d -m1777 /var/lib/jhalfs/BLFS )
137
1384. GENERATED BUILD SCRIPTS ISSUES::
139
140 In this section known issues with the generated build scripts are
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.
143 You may need also to insert some build script created by you to resolve
144 unhandled dependencies and/or to remove some script installing the affected
145 package by hand.
146
147 4.1 BLFS BOOTSCRIPTS
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
153 4.2 PACKAGES CONFIGURATION
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
158 4.4 PDL and Perl modules.
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
164 4.4 GCC, JDK, Sane, and KDE-multimedia
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
170 4.5 XORG7
171
172 The generated scripts for Xorg7 pseudo-packages don't have support for
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
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
223 4.6 PATCHES
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
233 4.7 ROOT COMMANDS
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
240 4.8 OTHERS
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.