Changeset 0495e57e
- Timestamp:
- 11/21/2021 06:23:11 PM (2 years ago)
- Branches:
- ablfs-more, legacy, trunk
- Children:
- 1870b56
- Parents:
- 267b19d
- git-author:
- Pierre Labastie <pierre.labastie@…> (11/09/2021 06:31:57 PM)
- git-committer:
- Pierre Labastie <pierre.labastie@…> (11/21/2021 06:23:11 PM)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
README.BLFS
r267b19d r0495e57e 12 12 you will need to review and edit the scripts while reading the book. 13 13 14 Since version 3.0 of jhalfs, the blfs tools allow also to update packages 15 from the LFS book. LFS packages which may be updated appear in the menu 16 interface. When selected, their scriptlet is generated in the same manner 17 as for BLFS packages. 14 The blfs tools allow also to update packages from the LFS book. LFS 15 packages which may be updated appear in the menu interface. When selected, 16 their scriptlet is generated in the same manner as for BLFS packages. 17 (TODO: presently, when an LFS package needs a patch, you'll have to 18 donwload it manually to your $SRC_ARCHIVE directory (usually /sources)). 18 19 19 20 2. PREREQUISITES:: … … 25 26 as a user) 26 27 - optional: lynx (allows to read the generated linearized book), GPM (to 27 cut and paste commands from the book), subversion(to update the book28 sources) , openssl (used by wget for all https:// sites)28 cut and paste commands from the book), git (to update the book 29 sources) 29 30 Note that the optional dependencies are recommended for ease of use of the 30 31 tool. … … 52 53 The tools are installed in $HOME$BLFS_ROOT (the default for $BLFS_ROOT 53 54 is /blfs_root). The BLFS book is downloaded or copied to its directory. 54 The tracking directory (see below) is initialized but not created: before 55 the installation, you should ensure the tracking directory (default location 56 /var/lib/jhalfs/BLFS) exists and is writable by the user. After the 57 intallation, you should perform the following additional steps: 58 59 - Configure sudo, adding the needed privileges for the user. For 60 newer sudo version, do not forget to add a line `Defaults secure_path=' 61 containing /sbin and /usr/sbin (in /etc/sudoers), otherwise some 62 executables are not found. 63 55 The tracking directory (see below) is created (if it does not already 56 exist) and initialized. Before running "make", you should ensure the 57 tracking directory (default location /var/lib/jhalfs/BLFS) can be: 58 - either created by the user running "make", if it does not exist 59 - or that it is writable by the user running "make", if it exists. 60 61 After the intallation, you should perform the following additional steps: 62 - Configure sudo, adding the needed privileges for the user. 64 63 - Although it is not strictly necessary, it is recommended to install 65 the bash shell startup files (as per `3. After LFS Configuration64 the bash shell startup files (as per `3. After LFS Configuration 66 65 Issues' of the BLFS book), as some instructions in BLFS rely on 67 66 their being present. 68 69 - In this case, the tool has no way to know which version of LFS packages 70 is installed, so that the menu interface will show all the LFS packages, 67 - At this point, the tool has no way to know which versions of LFS packages 68 are installed, so that the menu interface will show all the LFS packages, 71 69 as if they were not installed. If you have a released version of LFS, or 72 70 the date of your GIT version of LFS is known, you should run the … … 81 79 <package>-<installed-version> in the tracking directory, and run the tool. 82 80 83 3.2 INSTALLATION ON A JUST BUILT xLFS SYSTEM84 85 For books that support it (only LFS for jhalfs version 2.4),81 3.2 INSTALLATION ON A JUST BUILT LFS SYSTEM 82 83 For books that support it (only LFS), 86 84 there is an option to install the BLFS tools right after building 87 the xLFS system: just tick `BOOK Settings/Add blfs-tool support' in85 the LFS system: just tick `BOOK Settings/Add blfs-tool support' in 88 86 jhalfs configuration menu. The tools are installed in $BLFS_ROOT 89 (default /blfs_root) on the xLFS system, and the dependencies are built87 (default /blfs_root) on the LFS system, and the dependencies are built 90 88 at the end of the jhalfs run, before the custom tools. 91 89 92 (TODO: blfs-tools have not been tested with current (version 3.0) of CLFS, 93 and certainly need some adaptation to run) 94 95 After booting the new xLFS system some steps are needed to finish 90 After booting the new LFS system some steps are needed to finish 96 91 the installation of the automated tools: 97 92 … … 114 109 script. 115 110 116 We assume that the BLFS tools will be used on a booted xLFS system.111 We assume that the BLFS tools will be used on a booted LFS system. 117 112 Using them to build BLFS packages in a chroot jail is also possible, 118 113 but not supported. … … 120 115 3.3 DIRECTORY LAYOUT IN THE $BLFS_ROOT DIRECTORY 121 116 122 blfs-xml/* GIT tree of the selected BLFS book version 123 lfs-xml/* GIT tree of the selected LFS book version 124 lib/constants.inc functions libraries 125 /func_dependencies for building the dependency tree 126 menu/* lxdialog and menuconfig source code 127 xsl/gen_pkg_list.xsl XSL stylesheet to generate the package database 128 /gen_config.xsl XSL stylesheet to generate the Config.in file 129 for use in the menuconfig system 130 /dependencies.xsl XSL stylesheet to generate the dependency list 131 of a package 132 /make_book.xsl XSL stylesheet to generate the linear book.xml 133 /lfs_make_book.xsl XSL stylesheet to incoporate LFS pages into the 134 linear book.xml 135 /scripts.xsl XSL stylesheet to generate the scriptlets from 136 book.xml 137 /bump.xsl XSL stylesheet to update the tracking file 138 README.BLFS this file 139 TODO developers notes (well, not updated often) 140 gen_pkg_book.sh resolves dependencies and generates linear BLFS 141 books and build scripts 142 gen-makefile.sh generates the target Makefile 143 progress_bar.sh the target Makefile progress bar 144 gen-special.sh Helper script for generating the package database 145 Makefile Used by make to update the package database from 146 the GIT tree, then launch the menuconfig interface, 147 and run gen_pkg_book.sh based on configuration 148 settings 149 packdesc.dtd a simple DTD describing the format of the package 150 database and the tracking file. 151 envars.conf envars needed when running the target build scripts 152 153 Working files: several files are generated when first running the tool 154 155 packages.xml auto-generated packages database 117 blfs-xml/* GIT tree of the selected BLFS book version 118 lfs-xml/* GIT tree of the selected LFS book version 119 lib/constants.inc functions libraries 120 /func_dependencies for building the dependency tree 121 menu/* menuconfig source code 122 xsl/gen_pkg_list.xsl XSL stylesheet to generate the package database 123 /gen_config.xsl XSL stylesheet to generate the Config.in file 124 for use in the menuconfig system 125 /dependencies.xsl XSL stylesheet to generate the dependency list 126 of a package 127 /make_book.xsl XSL stylesheet to generate the linear book.xml 128 /lfs_make_book.xsl XSL stylesheet to incoporate LFS pages into the 129 linear book.xml 130 /scripts.xsl XSL stylesheet to generate the scriptlets from 131 book.xml 132 /bump.xsl XSL stylesheet to update the tracking file 133 /process-install.xsl XSL stylesheet included by scripts.xsl, for 134 outputting cleanly install instructions 135 /process-replaceable.xsl XSL stylesheet included by scripts.xsl, for 136 generating correct instructions when a 137 <replaceable> tag is encountered. 138 README.BLFS this file 139 TODO developers notes (well, not updated often) 140 gen_pkg_book.sh resolves dependencies, generates a linear BLFS 141 book, and finally generates build scripts 142 gen-makefile.sh generates the target Makefile 143 progress_bar.sh the target Makefile progress bar 144 gen-special.sh Helper script for generating the package 145 database 146 Makefile Used by make to update the package database 147 from the GIT tree, then launch the menuconfig 148 interface, and run gen_pkg_book.sh based on 149 configuration settings 150 packdesc.dtd a simple DTD describing the format of the 151 package database and the tracking file. 152 153 Working files: several files are generated when first running the tool: 154 155 packages.xml auto-generated package database 156 156 Config.in input file for the menu driven choices 157 157 configuration file generated by the menuconfig process … … 172 172 initialized when <make> is first run in blfs_root. It resides in a 173 173 directory, which is created when needed during the process of building 174 custom tools or blfs dependencies, right after xLFS. You can specify174 custom tools or blfs dependencies, right after LFS. You can specify 175 175 that directory location in the blfs-tools sub-menu of jhalfs. You may 176 176 need to update permissions and/or ownership of this directory before … … 189 189 root directory. 190 190 191 Due to the complexity of the BLFS book, the scripts and Makefile192 191 Due to the complexity of the BLFS book, the scripts and Makefile 192 generation is done in several steps: 193 193 194 194 4.1 UPDATING BOOK SOURCES:: … … 196 196 If you are using the development book version and you want to update 197 197 installed packages to the latest version found in that book, you need to 198 update the XML sources and packages database. T his is not necessary if199 you just built xLFS, and you can skip to step 3.4. To do that, run200 "make update".198 update the XML sources and packages database. To do that, run 199 "make update". This is not necessary if you just built LFS, and you 200 can skip to step 4.2. 201 201 202 202 On the next configuration run, packages already installed but listed … … 210 210 211 211 Run <make> to launch the configuration interface. The main menu contains 212 two blocks: individual package selection, and build options. 213 214 In the build options section, the dependencies level and default packages 215 used to solve alternatives are set (currently, only for the MTA). You can 216 also select whether the build will be made as a normal user or as root. 217 Those settings are saved to be reused in future configuration runs. 218 219 Note that you may select as many targets as you want, not just one 220 as in the previous version of this tool. But we suggest to not select 212 four blocks: individual package selection, Build settings, Build layout, 213 and Optimization. 214 215 In the package selection block, menus and submenus are organized 216 as the book's parts, chapters and sections. You can navigate those menus 217 and select as many targets as you want. But we suggest to not select 221 218 too many at a time to be able to sort issues! 219 220 In the "Build settings" submenu, the dependency level and default 221 packages used to solve alternatives are set (currently, only for the MTA). 222 You can also select whether the build will be made as a normal user or as 223 root, whether to use "porg style" package management, whether to remove 224 ".la" files, and wheter statistics for the package are generated (build 225 time, memory footprint and "DESTDIR" install). If you use package 226 management, you have to enter the path to the packInstall.sh script too. 227 228 In the "Build layout" submenu, you can select where the source tarballs 229 reside and are downloaded, where the packages are built, and whether to 230 keep the build tree after installation. 231 232 In the "Optimization" submenu, you can select the number of parallel 233 jobs, and set the usual CFLAGS, CXXFLAGS, and LDFLAGS. the special 234 keyword "EMPTY" can be used for those flags to ensure they are unset. 235 236 Note that there are help strings associated to those menus. Please 237 read them for details! 238 239 Those settings are saved to be reused in future configuration runs. 222 240 223 241 When you are done with the menu, a few checks occur, and the dependency … … 239 257 scriptlets. 240 258 241 There is alsoanother directory, "dependencies" that contains files259 There is yet another directory, "dependencies" that contains files 242 260 generated while resolving dependencies. 243 261 … … 256 274 and knows nothing about packages not in the BLFS book. 257 275 258 IMPORTANT: Review and edit envars.conf, at least after installing the259 tool. This file is used to set global envars needed by the build scripts.260 If you use package management, the variable JH_PACK_INSTALL should point to261 the directory where the packInstall.sh script resides.262 263 276 4.4 CREATING THE MAKEFILE:: 264 277 265 278 When the build scripts are ready to be run, the Makefile can be 266 created. Create an empty directory (for example "mkdir work") and cd 267 to that directory. Then run ../gen-makefile.sh 279 created. Create an empty subdirectory (for example "mkdir work") and cd 280 to that directory. Then run ../gen-makefile.sh. Note that the directory 281 is completely emptied before generating the Makefile, so to prevent 282 erasing useful data, the script ensures that the name of the current 283 working directory starts with "work". 268 284 269 285 Review the Makefile, and, if all looks sane, start the build by running … … 297 313 For those packages that have a "Configuration" section, you should 298 314 edit the build script to fit the needs of your system. Sometimes, the 299 bash startup files are modified. The shipped 'envars.conf' containsa315 bash startup files are modified. The generated scripts contain a 300 316 line 'source /etc/profile', which ensures that the proper environment 301 317 variables are used. … … 318 334 book. Also, the menu gives the choice to select each package individually. 319 335 320 To build the whole Xorg7 chapter, select twm. The (recommended)336 To build the whole Xorg7 chapter, select xinit. The (recommended) 321 337 dependency chain brings in the whole set of Xorg packages. 322 338 … … 331 347 If building as a normal user (the default setting), be sure that all 332 348 commands that require root privileges are run using sudo. Also make sure 333 necessary root privilege commands are visible in your PATH. Or use 334 the `Defaults secure_path=' in /etc/sudoers. 349 necessary root privilege commands are visible in your PATH. The scripts 350 ensure that /usr/sbin is appended to the user's PATH when running 351 privileged commands. 335 352 336 353 For commands necessitating root privileges, the generated scripts wrap 337 354 them with the construct: 338 sudo -E sh << ROOT_EOF355 sudo -E sh -e << ROOT_EOF 339 356 <commands to be executed as root with `$', ``', and `\' escaped> 340 357 ROOT_EOF 341 The -E switch ensures the whole environment is passed to the 342 commands to be run with root privileges. It is effective only if the 343 /etc/sudoers file contains `Defaults setenv', or SETENV in the user 344 attributes. If you think it is a security issue, you may forbid this 345 flag in /etc/sudoers, but then, you have to un-escape `$' for variables 346 coming from the environment in the instructions. 347 Although this construct is rather strong, it can fail in some corner 348 cases, so carefully review those instructions. 349 350 WARNING: One variable from the environment is not passed through the 351 -E switch, namely PATH. This is because "sudo" always reset the PATH to 352 the default "secure_path". If you need to have the same PATH as the user 353 "root" would have, you may want to add "source /etc/profile" at the 354 beginning of the commands to be executed as root. 358 The "-e" switch to sh ensures the command block exits with error if an 359 error occurs. The "-E" switch to sudo ensures the whole environment is 360 passed to the commands to be run with root privileges. It is effective 361 only if the /etc/sudoers file contains `Defaults setenv', or SETENV in 362 the user attributes (this is implicit if the command the user is allowed 363 to run is `ALL'). If you think it is a security issue, you may forbid 364 this flag in /etc/sudoers, but then, you have to un-escape `$' for 365 variables coming from the environment in the instructions. Although this 366 construct is rather strong, it can fail in some corner cases, so 367 carefully review those instructions. 355 368 356 369 Due to book layout issues, some sudo commands may be missing.
Note:
See TracChangeset
for help on using the changeset viewer.