Changeset e576789 for README.BLFS
- Timestamp:
- 10/29/2013 03:42:03 PM (11 years ago)
- Branches:
- 2.4, ablfs-more, legacy, new_features, trunk
- Children:
- 5795ad7
- Parents:
- 2e64c47
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
README.BLFS
r2e64c47 re576789 3 3 1. INTRODUCTION:: 4 4 5 If you want to add blfs-tool support into a xLFS base system build,5 If you want to add blfs-tool support into an xLFS base system build, 6 6 read the "BLFS_TOOL SUPPORT" section found in the README and be sure 7 7 to follow the after-booting installation intructions. … … 14 14 15 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 ofthe auto-generated16 dependencies, create build scripts and a Makefile. Not all the auto-generated 17 17 build scripts and Makefile will work "as is", thus, as a general rule, 18 18 you will need to review and edit the scripts while reading the book. … … 34 34 3. USAGE:: 35 35 36 Due t he complexity of the BLFS book, the scripts and Makefile generation37 is done in several steps:38 39 3.1 INSTALLED PACKAGES TRACKING SYSTEM 36 Due to the complexity of the BLFS book, the scripts and Makefile 37 generation is done in several steps: 38 39 3.1 INSTALLED PACKAGES TRACKING SYSTEM:: 40 40 41 41 This tool includes a very simple tracking system to log which packages … … 45 45 management tool. 46 46 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. 51 52 To use the default path set in the installation menu, run as root: 53 54 install -d -m1777 /var/lib/jhalfs/BLFS 47 The tracking system itself is an XML file: instpkg.xml. It is 48 initialized when <make> is first run in blfs_root. It resides in a 49 directory, which is created when needed during the process of building 50 custom tools or blfs dependencies, right after xLFS. You can specify 51 that directory location in the blfs-tools submenu of jhalfs. You may 52 need to update permissions and/or ownership of this directory before 53 using the blfs tool (see README in jhalfs). 54 55 The default location of the tracking directory is /var/lib/jhalfs/BLFS. 56 NB : after the initial build, that directory is only used to contain 57 instpkg.xml, unless custom tools have been built. In the latter case, 58 it also contains empty files whose name are $PKG-$VERSION for each 59 versionned package built. The information about those packages is 60 included into instpkg.xml the next time the tool is run. 55 61 56 62 3.2 BLFS_TOOL INSTALLATION:: 57 63 58 Run "make" to launch the jhalfs menuconfig interface. Select the BLFS 59 book and version. Then set the installation directory (default 60 $HOME/blfs_root), the BLFS sources directory (default blfs-xml), and 61 the installed packages tracking directory (default /var/lib/jhalfs/BLFS). 62 63 All required files will be placed in the installation directory and 64 BLFS XML sources will be installed in the named sub-directory. 65 66 Installed files: 67 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 72 README.BLFS this file 73 TODO developers notes 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 77 gen_pkg_book.sh resolves dependencies and generates linear BLFS books 78 and build scripts 79 gen-makefile.sh generates the target Makefile 80 progress_bar.sh the target Makefile progress bar 81 Makefile run gen_config.sh to update Config.in, 82 then launch the menuconfig interface, and lastly run 83 gen_pkg_book.sh based on configuration settings 84 Config.in menuconfig interface input file 85 packages auto-generated packages database 86 envars.conf envars needed when running the target build scripts 64 3.2.1 Normal install 65 The tools are installed just after the building of xLFS, if the 66 appropriate options have been selected in the building menu, as per 67 jhalfs README. If you forgot to select the options and xLFS has been 68 built, it is possible to go back to selecting the appropriate 69 BLFS tools options in the jhalfs menu, then tick `Run makefile' 70 and not `Rebuild files'. You obtain a /blfs_root directory in the 71 root directory of the new xLFS system, which contains the followings: 72 73 blfs-xml/* SVN tree of the selected BLFS book version 74 lib/constants.inc functions libraries 75 /func_dependencies for building the dependency tree 76 menu/* lxdialog and menuconfig source code 77 xsl/gen_pkg_list.xsl XSL stylesheet to generate the package database 78 /gen_config.xsl XSL stylesheet to generate the Config.in file 79 for use in the menuconfig system 80 /dependencies.xsl XSL stylesheet to generate the dependency list 81 of a package 82 /make_book.xsl XSL stylesheet to generate the linear book.xml 83 /scripts.xsl XSL stylesheet to generate the scriptlets from 84 book.xml 85 /bump.xsl XSL stylesheet to generate to update the tracking 86 file 87 README.BLFS this file 88 TODO developers notes (well, not updated often) 89 gen_pkg_book.sh resolves dependencies and generates linear BLFS 90 books and build scripts 91 gen-makefile.sh generates the target Makefile 92 progress_bar.sh the target Makefile progress bar 93 gen-special.sh Helper script for generating the package database 94 Makefile Used by make to update the package database from 95 the SVN tree, then launch the menuconfig interface, 96 and run gen_pkg_book.sh based on configuration 97 settings 98 packdesc.dtd a simple DTD describing the format of the package 99 database and the tracking file. 100 envars.conf envars needed when running the target build scripts 101 102 3.2.2 Install to an already running LFS/BLFS system 103 If you forgot to install the tools when building xLFS, or want to try 104 the tools, you can just run the install-blfs-tools.sh script. It will 105 create the above hierarchy in your home directory and intialize the 106 tracking file. You have first to make sure that the tracking dir exists 107 and is writable by the user. You may also populate it with (empty) files 108 whose names are of the form package-version, for installed packages, so 109 that they are included into the tracking file. 110 3.3.3 Working files 111 Several files are generated during the process: 112 113 packages.xml auto-generated packages database 114 Config.in input file for the menu driven choices 115 configuration file generated by the menuconfig process 116 dependencies/* files recording the dependency tree 117 book.xml the linearized book 118 book-html/* the linearized book rendered in html 119 scripts/* the scriptlets 87 120 88 121 From now on, all the work must be done from inside the installation 89 122 root directory. 90 123 91 When finished the installation, the configuration and target selection92 menu is launch.124 You may move that directory to the $HOME of a non root user, or build 125 as root from that directory. 93 126 94 127 3.3 UPDATING BOOK SOURCES:: … … 96 129 If you are using the development book version and you want to update 97 130 installed packages to the latest version found in that book, you need to 98 update the XML sources and packages database. 99 100 To do that run "./update_book.sh" 131 update the XML sources and packages database. This is not necessary if 132 you just built xLFS, and you can skip to step 3.4. 133 134 To do that, run "make update". It may happen that the subversion 135 version of your building host is older than the version you just 136 built. This may generate weird errors like "'.' omitted". The easiest 137 thing to do in that case, is to completely remove the blfs-xml directory 138 and run "make update". With recent versions of subversion, you can also 139 run "svn upgrade" from inside the blfs-xml directory. 101 140 102 141 On the next configuration run, packages already installed but listed … … 107 146 108 147 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. 111 112 WARNING: 113 Only one target (meta-package or individual package) must be 114 selected on each configuration run. 115 There is no way to solve dependencies properly when more 116 than one target are selected. 148 build order for one or several packages. 117 149 118 150 Run <make> to launch the configuration interface. The main menu contains 119 three blocks: meta-package selection, individual package selection, and 120 build options. 121 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. 151 two blocks: individual package selection, and build options. 125 152 126 153 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 129 future configuration runs. 130 131 If, for example, your target selection is Xsoft-->Graphweb-->galeon, a 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. 136 137 There are also two other directories ("dependencies" and "xincludes") 138 that contain files generated while resolving dependencies trees. 139 140 3.5 EDITING BUILD SCRIPTS 141 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. 154 used to solve alternatives are set (currently, only for the MTA). You can 155 also select whether the build will be made as a normal user or as root. 156 Those settings are saved to be reused in future configuration runs. 157 158 Note that you may select as many targets as you want, not just one 159 as in the previous version of this tool. But we suggest to not select 160 too many at a time to be able to sort issues! 161 162 When you are done with the menu, a few checks occur, and the book is 163 generated. When circular dependencies are found, a 3 line message is 164 printed: 165 A is a dependency of B 166 C is a dependency of A 167 A is a dependency of C 168 and a question: 169 Do you want to build A first? 170 This means that the system has found the dependency chain: B->A->C->A. 171 You have therefore to choose whether A is built before C, or 172 C before A: the system cannot make that choice (well, maybe in a few 173 year, with an AI system able to understand the book). If you answer no, 174 C is built first. If you answer yes, C is put in place of A as a dependency 175 of B, then the tree dependency restarts from there, that is with the 176 layout B->C->... You may then hit the case B->C->A->C, for which you 177 should answer no, unless you want to enter an infinite (human driven) 178 loop;-) 179 180 You end up with a book.xml file which contains the linearized book, 181 and a rendered HTML, in the directory book-html, which you can browse with 182 "lynx book-html/index.html" (or with any other browser). 183 184 Furthermore, there is a directory "scripts", which contains the generated 185 scriptlets. 186 187 There is also another directory, "dependencies" that contains files 188 generated while resolving dependencies. 189 190 3.5 EDITING BUILD SCRIPTS:: 191 192 Now it is time to review the generated book and scripts, making any 193 changes to the scripts necessary to fix generation bugs or to suit your 194 needs. 144 195 145 196 Scripts for additional packages (i.e., for non-BLFS packages) can be 146 197 easily inserted. For example, if you want to install the external dependency 147 198 "bar" before "foo" package and the "foo" script is named "064-z-foo", you 148 need to create a "064-y-bar" build script.199 just need to create a "064-y-bar" build script. 149 200 150 201 Remember, the package tracking system isn't a package management tool … … 154 205 needed by the build scripts. 155 206 156 3.6 CREATING THE MAKEFILE 207 3.6 CREATING THE MAKEFILE:: 157 208 158 209 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 160 ../gen-makefile.sh 161 162 Review the Makefile, and, if all looks sane, start the build. 210 created. Create an empty directory (for example "mkdir work") and cd 211 to that directory. Then run ../gen-makefile.sh 212 213 Review the Makefile, and, if all looks sane, start the build by running 214 "make". 163 215 164 216 4. GENERATED BUILD SCRIPTS ISSUES:: 165 217 166 218 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. 219 discussed. They are due to build procedures and/or BLFS layout 220 particularities that we can't handle. In several cases, editing the 221 build scripts is mandatory. 169 222 You may also need to insert some build scripts created by you to resolve 170 223 unhandled dependencies and/or to remove some script installing the affected 171 224 package by hand. 172 225 173 4.1 BLFS BOOTSCRIPTS 174 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. 183 184 4.4 PDL, Perl modules, and Glib-Bindings. 185 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. 189 190 You may need to create additional scripts for these sub-package 191 dependencies, if any. 192 193 4.4 GCC, JDK, Sane, and KDE-multimedia, freetype2, MesaLib and others 194 195 On the pages for these packages, the BLFS book actually has instructions 226 4.1 BLFS BOOTSCRIPTS:: 227 228 Normally, bootscript installation should work. On the other hand, the 229 book does not give instruction for running them, so you might have to 230 manually insert /etc/init.d/rc.d/<initscript> at some place during the build. 231 232 4.2 PACKAGE CONFIGURATION:: 233 234 For those packages that have a "Configuration" section, you should 235 edit the build script to fit the needs of your system. Sometimes, the 236 bash startup files are modified (see for example the instructions for 237 llvm). The shipped 'envars.conf' contains a line 'source /etc/profile', 238 which ensures that the proper environment variables are used. 239 240 4.3 GCC, JDK, Sane, and KDE-multimedia, freetype2, MesaLib and others 241 242 On the pages for those packages, the BLFS book actually has instructions 196 243 to download and install two or more packages. You must edit the scripts to 197 244 fix this. … … 199 246 We will try to fix some of them, but this may not be possible. 200 247 201 4. 5XORG7202 203 The generated scripts for Xorg7 p seudo-packages have $SRC_ARCHIVE248 4.4 XORG7 249 250 The generated scripts for Xorg7 packages have $SRC_ARCHIVE 204 251 support for individual packages, but not for patches nor *.wget and *.md5 205 252 files. … … 210 257 The *.wget and *.md5 files should be downladed always from inside 211 258 the scripts to be sure that the most current individual packages are 212 used. Thus don't reuse previou ly existing ones.259 used. Thus don't reuse previously existing ones. 213 260 214 261 In the script for xorg7-font, be sure to move the fonts directories 215 262 symlinks creation to after the "for ... done" loop. 216 263 217 4.6 PATCHES 218 219 By default, all required patches will be downloaded from the NET. 220 221 If you have previously downloaded the patches, you must edit the 222 scripts to use your local patches. 223 224 Also, be sure that all scripts have the commands to download/apply the 225 required patches. Due to book layout issues, some patches may be missing. 226 227 4.7 ROOT COMMANDS 264 265 4.5 PATCHES 266 267 Please, make sure that all scripts have the commands to download/apply 268 the required patches. Due to book layout issues, some patches may be 269 missing. 270 271 4.6 ROOT COMMANDS 228 272 229 273 If building as a normal user (the default setting), be sure that all 230 274 commands that require root privileges are run using sudo. Also make sure 231 necessary root privilege commands are visible in your PATH. 275 necessary root privilege commands are visible in your PATH. Or use 276 the `Defaults secure_path=' in /etc/sudoers. 277 For commands necessitating root privileges, the generated scripts wrap 278 them with the construct: 279 sudo -E sh << ROOT_EOF 280 <commands to be executed as root with `$', ``', and `\' escaped> 281 ROOT_EOF 282 The -E switch ensures the whole environment is passed to the 283 commands to be run with root privileges. It is effective only if the 284 /etc/sudoers file contains `Defaults setenv', or SETENV in the user 285 attributes. If you think it is a security issue, you may forbid this 286 flag in /etc/sudoers, but then, you have to un-escape `$' for variables 287 coming from the environment in the instructions. 288 Although this construct is rather strong, it can fail in some corner 289 cases, so carefully review those instructions. 232 290 233 291 Due to book layout issues, some sudo commands may be missing. 234 292 235 4. 8OTHERS293 4.7 OTHERS 236 294 237 295 There may be other issues that we are not aware of. If you find 238 296 any, please report it to <alfs-discuss@linuxfromscratch.org>. 239 297 240
Note:
See TracChangeset
for help on using the changeset viewer.