source: README.BLFS@ e2dfa2c

experimental
Last change on this file since e2dfa2c was 9c9775f, checked in by Manuel Canales Esparcia <manuel@…>, 17 years ago

Updated experimental branch to current trunk code.

  • Property mode set to 100644
File size: 9.8 KB
RevLine 
[00f4966]1$Id$
2
31. INTRODUCTION::
4
[9c9775f]5 If you want to add blfs-tool support into a xLFS base system build,
6 read the "BLFS_TOOL SUPPORT" section found in the README and be sure
7 to follow the after-booting installation intructions.
[00f4966]8
[9c9775f]9 To automate package builds from the BLFS book instructions is a huge
10 task. Some of the issues are: the BLFS book isn't linear; some package
11 pages use a custom layout; there are circular dependencies; several
12 packages can be installed on a non-default prefix; build commands can
13 change based on what dependencies will be used, etc.
14
15 That being said, the goal of the blfs-tool is to help you solve package
16 dependencies, create build scripts and a Makefile. Few of the auto-generated
17 build scripts and Makefile will work "as is", thus, as a general rule,
18 you will need to review and edit the scripts while reading the book.
[00f4966]19
20
[855296f]212. PREREQUISITES::
22
[9c9775f]23 To use this tool you MUST:
[855296f]24
25 - have experience building BLFS packages
26 - know how to edit and write shell scripts
27 - know how a Makefile works
28 - be able to trace build failures and to find what is causing it
29 (user error, package bug, BLFS command bug, or jhalfs code bug)
30
[2ee1d11]31 If you do not have the above skills, please don't use this tool.
[855296f]32
33
[26e1214]343. USAGE::
[00f4966]35
[9c9775f]36 Due the complexity of the BLFS book, the scripts and Makefile generation
37 is done in several steps:
[00f4966]38
[2ee1d11]39 3.1 INSTALLED PACKAGES TRACKING SYSTEM
40
[9c9775f]41 This tool includes a very simple tracking system to log which packages
42 have been installed using the tool. It is used to skip installed packages
43 from target selection menu and to test if an installed package has been
44 updated in the BLFS book. Do not rely on this feature as a package
45 management tool.
[2ee1d11]46
[9c9775f]47 The directory where tracking files will be stored needs to be created
48 before installing blfs-tool. You can place this directory anywhere, taking
49 care that the user must have read and write privileges on that directory
50 and on all files it contains.
[2ee1d11]51
52 To use the default path set in the installation menu, run as root:
53
54 install -d -m1777 /var/lib/jhalfs/BLFS
55
56 3.2 BLFS_TOOL INSTALLATION::
[e557f50]57
58 Run "make" to launch the jhalfs menuconfig interface. Select the BLFS
[9c9775f]59 book and version. Then set the installation directory (default
[2ee1d11]60 $HOME/blfs_root), the BLFS sources directory (default blfs-xml), and
61 the installed packages tracking directory (default /var/lib/jhalfs/BLFS).
[00f4966]62
63 All required files will be placed in the installation directory and
[9c9775f]64 BLFS XML sources will be installed in the named sub-directory.
[00f4966]65
66 Installed files:
67
[e557f50]68 blfs-xml/* SVN tree of the selected BLFS book version
69 lib/* functions libraries, xsl stylesheets, and auto-generated
70 meta-packages dependencies tree files
71 menu/* lxdialog and menuconfig source code
[00f4966]72 README.BLFS this file
73 TODO developers notes
[e557f50]74 update_book.sh update the XML book sources and regenerates packages
75 database and meta-packages dependencies tree
76 gen_config.sh regenerates Config.in
[9c9775f]77 gen_pkg_book.sh resolves dependencies and generates linear BLFS books
[e557f50]78 and build scripts
[9c9775f]79 gen-makefile.sh generates the target Makefile
[e557f50]80 progress_bar.sh the target Makefile progress bar
[4875ed3]81 Makefile run gen_config.sh to update Config.in,
[e557f50]82 then launch the menuconfig interface, and lastly run
[4875ed3]83 gen_pkg_book.sh based on configuration settings
[78ac273]84 Config.in menuconfig interface input file
[e557f50]85 packages auto-generated packages database
86 envars.conf envars needed when running the target build scripts
[00f4966]87
88 From now on, all the work must be done from inside the installation
89 root directory.
90
[2ee1d11]91 When finished the installation, the configuration and target selection
92 menu is launch.
93
94 3.3 UPDATING BOOK SOURCES::
[00f4966]95
[9c9775f]96 If you are using the development book version and you want to update
97 installed packages to the latest version found in that book, you need to
98 update the XML sources and packages database.
[e557f50]99
[2ee1d11]100 To do that run "./update_book.sh"
[e557f50]101
[2ee1d11]102 On the next configuration run, packages already installed but listed
[9c9775f]103 with a new version in the book will be available for target selection
104 and used to solve dependencies.
[2ee1d11]105
106 3.4 CONFIGURING AND PARSING THE BOOK::
[e557f50]107
[9c9775f]108 The next step is to create a book and build scripts in dependency
109 build order for a target package. A target can be a package or a
110 meta-package.
[00f4966]111
[0510381]112 WARNING:
113 Only one target (meta-package or individual package) must be
114 selected on each configuration run.
[9c9775f]115 There is no way to solve dependencies properly when more
116 than one target are selected.
[0510381]117
[2ee1d11]118 Run <make> to launch the configuration interface. The main menu contains
[9c9775f]119 three blocks: meta-package selection, individual package selection, and
[2ee1d11]120 build options.
[00f4966]121
[9c9775f]122 When a meta-package is selected, it is possible to unselect unwanted
123 components. The unselected components will be skipped if no other components
124 depends on them.
[00f4966]125
[9c9775f]126 In the build options section, the dependencies level and default packages
127 used to solve alternatives are set. You can also select whether the build will
128 be made as a normal user or as root. That settings are saved to be reused in
[2ee1d11]129 future configuration runs.
[00f4966]130
[9c9775f]131 If, for example, your target selection is Xsoft-->Graphweb-->galeon, a
[2ee1d11]132 directory named "galeon" will be created. Inside that directory you will
133 find a directory named "HTML" that contains a galeon-based HTML book with
134 its dependencies in build order, and a "scripts" directory with build
135 scripts for that packages.
[00f4966]136
[9c9775f]137 There are also two other directories ("dependencies" and "xincludes")
138 that contain files generated while resolving dependencies trees.
[e557f50]139
[2ee1d11]140 3.5 EDITING BUILD SCRIPTS
[e557f50]141
[9c9775f]142 Now it is time to review the generated book and scripts, making any changes
143 to the scripts necessary to fix generation bugs or to suit your needs.
[e557f50]144
145 Scripts for additional packages (i.e., for non-BLFS packages) can be
[9c9775f]146 easily inserted. For example, if you want to install the external dependency
147 "bar" before "foo" package and the "foo" script is named "064-z-foo", you
148 need to create a "064-y-bar" build script.
[00f4966]149
[9c9775f]150 Remember, the package tracking system isn't a package management tool
151 and knows nothing about packages not in the BLFS book.
[00f4966]152
[9c9775f]153 Also, review and edit envars.conf. This file is used to set global envars
[2ee1d11]154 needed by the build scripts.
155
156 3.6 CREATING THE MAKEFILE
157
[2fedf49]158 When the build scripts are ready to be run, the Makefile can be
159 created. Be sure that you cd into the "package" directory and run
[9c9775f]160 ../gen-makefile.sh
[00f4966]161
[9c9775f]162 Review the Makefile, and, if all looks sane, start the build.
[855296f]163
[26e1214]1644. GENERATED BUILD SCRIPTS ISSUES::
[9e627f6]165
[9c9775f]166 In this section, known issues with the generated build scripts are
167 discussed. They are due to build procedures and/or BLFS layout particularities
168 that we can't handle. In several cases, editing the build scripts is mandatory.
169 You may also need to insert some build scripts created by you to resolve
[e557f50]170 unhandled dependencies and/or to remove some script installing the affected
171 package by hand.
[9e627f6]172
[26e1214]173 4.1 BLFS BOOTSCRIPTS
[9e627f6]174
[9c9775f]175 For now, bootscripts installation will fail. You will need to edit
176 the scripts for packages that install bootscripts and fix their
177 installation command. That could be fixed in the future.
178
179 4.2 PACKAGE CONFIGURATION
180
181 For those packages that have a "Configuration" section, you should
182 edit the build script to fit the needs of your system.
[9e627f6]183
[9c9775f]184 4.4 PDL, Perl modules, and Glib-Bindings.
[9e627f6]185
[9c9775f]186 The generated scripts for these packages are broken and can not
187 be fixed. You must rename it as the sub-package to be installed and
188 edit it to use the proper commads for that sub-package.
[9e627f6]189
[9c9775f]190 You may need to create additional scripts for these sub-package
191 dependencies, if any.
[9e627f6]192
[9c9775f]193 4.4 GCC, JDK, Sane, and KDE-multimedia, freetype2, MesaLib and others
[9e627f6]194
[9c9775f]195 On the pages for these packages, the BLFS book actually has instructions
196 to download and install two or more packages. You must edit the scripts to
197 fix this.
[9e627f6]198
[9c9775f]199 We will try to fix some of them, but this may not be possible.
[9e627f6]200
[26e1214]201 4.5 XORG7
[78ac273]202
[9c9775f]203 The generated scripts for Xorg7 pseudo-packages have $SRC_ARCHIVE
204 support for individual packages, but not for patches nor *.wget and *.md5
205 files.
206
207 If you have previously downloaded the patches, you must edit
208 the scripts to use your local packages.
209
210 The *.wget and *.md5 files should be downladed always from inside
211 the scripts to be sure that the most current individual packages are
212 used. Thus don't reuse previouly existing ones.
213
214 In the script for xorg7-font, be sure to move the fonts directories
215 symlinks creation to after the "for ... done" loop.
[f633610]216
[26e1214]217 4.6 PATCHES
[78ac273]218
[9c9775f]219 By default, all required patches will be downloaded from the NET.
[78ac273]220
[9c9775f]221 If you have previously downloaded the patches, you must edit the
222 scripts to use your local patches.
[78ac273]223
224 Also, be sure that all scripts have the commands to download/apply the
[9c9775f]225 required patches. Due to book layout issues, some patches may be missing.
[78ac273]226
[26e1214]227 4.7 ROOT COMMANDS
[78ac273]228
[9c9775f]229 If building as a normal user (the default setting), be sure that all
230 commands that require root privileges are run using sudo. Also make sure
231 necessary root privilege commands are visible in your PATH.
[78ac273]232
[9c9775f]233 Due to book layout issues, some sudo commands may be missing.
[78ac273]234
[26e1214]235 4.8 OTHERS
[9e627f6]236
[9c9775f]237 There may be other issues that we are not aware of. If you find
238 any, please report it to <alfs-discuss@linuxfromscratch.org>.
[9e627f6]239
240
Note: See TracBrowser for help on using the repository browser.