Changeset cc8dba9 for README.BLFS
- Timestamp:
- 03/27/2017 07:49:04 PM (7 years ago)
- Branches:
- 2.4, ablfs-more, legacy, trunk
- Children:
- 6bba83f
- Parents:
- 5e59386
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
README.BLFS
r5e59386 rcc8dba9 2 2 3 3 1. INTRODUCTION:: 4 5 If you want to add blfs-tool support into an xLFS base system build,6 read the "BLFS_TOOL SUPPORT" section found in the README and be sure7 to follow the after-booting installation instructions.8 4 9 5 To automate package builds from the BLFS book instructions is a huge … … 21 17 2. PREREQUISITES:: 22 18 23 To use this tool you MUST: 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 31 If you do not have the above skills, please don't use this tool. 32 33 34 3. USAGE:: 35 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 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. 46 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 sub-menu 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. 61 62 3.2 BLFS_TOOL INSTALLATION:: 63 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: 19 In addition to a full LFS system, the following packages and their 20 dependencies are needed by this tool: 21 - required: libxml2, libxslt, DocBook XML DTD 22 - recommended: wget (to download the package tarballs) and sudo (to build 23 as a user) 24 - optional: lynx (allows to read the generated linearized book), GPM (to 25 cut and paste commands from the book), subversion (to update the book 26 sources), openssl (used by wget for all https:// sites) 27 Note that the optional dependencies are recommended for ease of use of the 28 tool. 29 30 You should also have the following personal skills: 31 - Ability to write and debug shell scripts: as said in the introduction, 32 not all the generated scripts can be used directly. They need to be 33 edited to produce an error free build. 34 - Ability to debug build failures, like missing dependencies or 35 installation directories not known to the system (when you install in 36 /opt for example). 37 - Ability to choose the tools you need to configure and administrate 38 your system: in the BLFS book, nothing is mandatory, nothing is 39 useless. You are on your own in choosing what to build, but wrong 40 decisions may lead to a non functional system... 41 42 3. INSTALL:: 43 44 There are two ways to install the BLFS tools on an LFS system, described 45 in paragraphs 3.1 and 3.2, respectively: 46 47 3.1 INSTALLATION ON A RUNNING SYSTEM 48 49 Select "Use Book --> Beyond Linux From Scratch" in the jhalfs menu: 50 The tools are installed in $HOME$BLFS_ROOT (the default for $BLFS_ROOT 51 is /blfs_root). The BLFS book is downloaded or copied to its directory. 52 The tracking directory (see below) is initialized but not created: before 53 the installation, you should ensure the tracking directory (default location 54 /var/lib/jhalfs/BLFS) exists and is writable by the user. After the 55 intallation, you should perform the following additional steps: 56 57 - Configure sudo, adding the needed privileges for the user. For 58 newer sudo version, do not forget to add a line `Defaults secure_path=' 59 containing /sbin and /usr/sbin (in /etc/sudoers), otherwise some 60 executables are not found. 61 62 - Although it is not strictly necessary, it is recommended to install 63 the bash shell startup files (as per `3.After LFS Configuration 64 Issues' of the BLFS book), as some instructions in BLFS rely on 65 their being present. 66 67 3.2 INSTALLATION ON A JUST BUILT xLFS SYSTEM 68 69 For books that support it (only LFS for jhalfs version 2.4), 70 there is an option to install the BLFS tools right after building 71 the xLFS system: just tick `BOOK Settings/Add blfs-tool support' in 72 jhalfs configuration menu. The tools are installed in $BLFS_ROOT 73 (default /blfs_root) on the xLFS system, and the dependencies are built 74 at the end of the jhalfs run, before the custom tools. 75 76 (TODO: blfs-tools have not been tested with current (version 3.0) of CLFS, 77 and certainly need some adaptation to run) 78 79 After booting the new xLFS system some steps are needed to finish 80 the installation of the automated tools: 81 82 - A user account must be created. You must be logged on that user 83 account to use blfs-tool. This is not strictly necessary, 84 since the packages can be built as root, too, but it is 85 never a good idea to build packages as root. 86 87 - Move /blfs-root to that user's home and change ownership of the 88 directory and files to the user. 89 90 - Give the user read and write privileges over the $TRACKING_DIR 91 directory and the files that it contains. 92 93 - Configure sudo and add the bash shell startup files, as described 94 above 95 96 We assume that the BLFS tools will be used on a booted xLFS system. 97 Using them to build BLFS packages in a chroot jail is also possible, 98 but not supported. 99 100 3.3 DIRECTORY LAYOUT IN THE $BLFS_ROOT DIRECTORY 72 101 73 102 blfs-xml/* SVN tree of the selected BLFS book version … … 99 128 envars.conf envars needed when running the target build scripts 100 129 101 3.2.2 Install to an already running LFS/BLFS system 102 If you forgot to install the tools when building xLFS, or want to try 103 the tools, you can select the BLFS book from the jhalfs menu. It will 104 run a script, which creates the above hierarchy in your home directory and 105 initialize the tracking file. You have first to make sure that the tracking 106 dir exists and is writable by the user. You may also populate it with 107 (empty) files whose names are of the form package-version, for installed 108 packages, so that they are included into the tracking file. 109 110 3.3.3 Working files 111 Several files are generated during the process: 130 Working files: several files are generated when first running the tool 112 131 113 132 packages.xml auto-generated packages database … … 119 138 scripts/* the scriptlets 120 139 140 3.4 INSTALLED PACKAGES TRACKING SYSTEM: 141 142 This tool includes a very simple tracking system to log which packages 143 have been installed using the tool. It is used to skip installed packages 144 from target selection menu and to test if an installed package has been 145 updated in the BLFS book. Do not rely on this feature as a package 146 management tool. 147 148 The tracking system itself is an XML file: instpkg.xml. It is 149 initialized when <make> is first run in blfs_root. It resides in a 150 directory, which is created when needed during the process of building 151 custom tools or blfs dependencies, right after xLFS. You can specify 152 that directory location in the blfs-tools sub-menu of jhalfs. You may 153 need to update permissions and/or ownership of this directory before 154 using the blfs tool (see README in jhalfs). 155 156 The default location of the tracking directory is /var/lib/jhalfs/BLFS. 157 NB : after the initial build, that directory is only used to contain 158 instpkg.xml, unless custom tools have been built. In the latter case, 159 it also contains empty files whose name are "$PKG-$VERSION" for each 160 versionned package built. The information about those packages is 161 included into instpkg.xml the next time the tool is run. 162 163 4. USAGE:: 164 121 165 From now on, all the work must be done from inside the installation 122 166 root directory. 123 167 124 You may move that directory to the $HOME of a non root user, or build125 as root from that directory.126 127 3.3UPDATING BOOK SOURCES::168 Due to the complexity of the BLFS book, the scripts and Makefile 169 generation is done in several steps: 170 171 4.1 UPDATING BOOK SOURCES:: 128 172 129 173 If you are using the development book version and you want to update … … 143 187 and used to solve dependencies. 144 188 145 3.4CONFIGURING AND PARSING THE BOOK::189 4.2 CONFIGURING AND PARSING THE BOOK:: 146 190 147 191 The next step is to create a book and build scripts in dependency … … 181 225 generated while resolving dependencies. 182 226 183 3.5EDITING BUILD SCRIPTS::227 4.3 EDITING BUILD SCRIPTS:: 184 228 185 229 Now it is time to review the generated book and scripts, making any … … 198 242 needed by the build scripts. 199 243 200 3.6CREATING THE MAKEFILE::244 4.4 CREATING THE MAKEFILE:: 201 245 202 246 When the build scripts are ready to be run, the Makefile can be … … 207 251 "make". 208 252 209 4. GENERATED BUILD SCRIPTS ISSUES::253 5. GENERATED BUILD SCRIPTS ISSUES:: 210 254 211 255 In this section, known issues with the generated build scripts are … … 223 267 fields of each involved script. 224 268 225 4.1 BLFS BOOTSCRIPTS::269 5.1 BLFS BOOTSCRIPTS:: 226 270 227 271 Normally, bootscript installation should work. On the other hand, the … … 230 274 the build. 231 275 232 4.2 PACKAGE CONFIGURATION::276 5.2 PACKAGE CONFIGURATION:: 233 277 234 278 For those packages that have a "Configuration" section, you should … … 238 282 variables are used. 239 283 240 4.3 PAGES WITH TWO OR MORE PACKAGES::284 5.3 PAGES WITH TWO OR MORE PACKAGES:: 241 285 242 286 For example: sane, poppler, audacious, freetts, which, etc. … … 249 293 instructions may need to be repeated for each tarball in turn. 250 294 251 4.4 XORG7295 5.4 XORG7 252 296 253 297 The book has special page layouts for the Xorg7 packages. The tool … … 258 302 dependency chain brings in the whole set of Xorg packages. 259 303 260 4.5 PATCHES304 5.5 PATCHES 261 305 262 306 Please, make sure that all scripts have the commands to download/apply … … 264 308 missing (as of BLFS 8.0, all the patches seem to be downloaded). 265 309 266 4.6 ROOT COMMANDS310 5.6 ROOT COMMANDS 267 311 268 312 If building as a normal user (the default setting), be sure that all … … 293 337 Due to book layout issues, some sudo commands may be missing. 294 338 295 4.7 OTHERS339 5.7 OTHERS 296 340 297 341 There may be other issues that we are not aware of. If you find
Note:
See TracChangeset
for help on using the changeset viewer.