source: README.BLFS@ d262d17

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

README.BLFS fix.

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