[824b6e4] | 1 | $Id$
|
---|
| 2 |
|
---|
| 3 | 1. INTRODUCTION::
|
---|
| 4 |
|
---|
[d262d17] | 5 | If you want to add blfs-tool support into a xLFS base system build,
|
---|
[83ace0a] | 6 | read the "BLFS_TOOL SUPPORT" section found in the README and be sure
|
---|
| 7 | to follow the after-booting installation intructions.
|
---|
[d262d17] | 8 |
|
---|
[392bd25] | 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.
|
---|
[824b6e4] | 14 |
|
---|
[392bd25] | 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.
|
---|
[824b6e4] | 19 |
|
---|
| 20 |
|
---|
[f4ed135] | 21 | 2. PREREQUISITES::
|
---|
| 22 |
|
---|
[392bd25] | 23 | To use this tool you MUST:
|
---|
[f4ed135] | 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 |
|
---|
[a54e1f1] | 31 | If you do not have the above skills, please don't use this tool.
|
---|
[f4ed135] | 32 |
|
---|
| 33 |
|
---|
| 34 | 3. USAGE::
|
---|
[824b6e4] | 35 |
|
---|
[392bd25] | 36 | Due the complexity of the BLFS book, the scripts and Makefile generation
|
---|
| 37 | is done in several steps:
|
---|
[824b6e4] | 38 |
|
---|
[a54e1f1] | 39 | 3.1 INSTALLED PACKAGES TRACKING SYSTEM
|
---|
| 40 |
|
---|
[392bd25] | 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.
|
---|
[a54e1f1] | 46 |
|
---|
[392bd25] | 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.
|
---|
[a54e1f1] | 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::
|
---|
[f4ed135] | 57 |
|
---|
| 58 | Run "make" to launch the jhalfs menuconfig interface. Select the BLFS
|
---|
[392bd25] | 59 | book and version. Then set the installation directory (default
|
---|
[a54e1f1] | 60 | $HOME/blfs_root), the BLFS sources directory (default blfs-xml), and
|
---|
| 61 | the installed packages tracking directory (default /var/lib/jhalfs/BLFS).
|
---|
[824b6e4] | 62 |
|
---|
| 63 | All required files will be placed in the installation directory and
|
---|
[392bd25] | 64 | BLFS XML sources will be installed in the named sub-directory.
|
---|
[824b6e4] | 65 |
|
---|
| 66 | Installed files:
|
---|
| 67 |
|
---|
[f4ed135] | 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
|
---|
[824b6e4] | 72 | README.BLFS this file
|
---|
| 73 | TODO developers notes
|
---|
[f4ed135] | 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
|
---|
[392bd25] | 77 | gen_pkg_book.sh resolves dependencies and generates linear BLFS books
|
---|
[f4ed135] | 78 | and build scripts
|
---|
[392bd25] | 79 | gen-makefile.sh generates the target Makefile
|
---|
[f4ed135] | 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
|
---|
[824b6e4] | 87 |
|
---|
| 88 | From now on, all the work must be done from inside the installation
|
---|
| 89 | root directory.
|
---|
| 90 |
|
---|
[a54e1f1] | 91 | When finished the installation, the configuration and target selection
|
---|
| 92 | menu is launch.
|
---|
| 93 |
|
---|
| 94 | 3.3 UPDATING BOOK SOURCES::
|
---|
[f4ed135] | 95 |
|
---|
[392bd25] | 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.
|
---|
[f4ed135] | 99 |
|
---|
[a54e1f1] | 100 | To do that run "./update_book.sh"
|
---|
[f4ed135] | 101 |
|
---|
[a54e1f1] | 102 | On the next configuration run, packages already installed but listed
|
---|
[392bd25] | 103 | with a new version in the book will be available for target selection
|
---|
| 104 | and used to solve dependencies.
|
---|
[a54e1f1] | 105 |
|
---|
| 106 | 3.4 CONFIGURING AND PARSING THE BOOK::
|
---|
[824b6e4] | 107 |
|
---|
[392bd25] | 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.
|
---|
[824b6e4] | 111 |
|
---|
[ab412b4] | 112 | WARNING:
|
---|
| 113 | Only one target (meta-package or individual package) must be
|
---|
| 114 | selected on each configuration run.
|
---|
[392bd25] | 115 | There is no way to solve dependencies properly when more
|
---|
| 116 | than one target are selected.
|
---|
[ab412b4] | 117 |
|
---|
[a54e1f1] | 118 | Run <make> to launch the configuration interface. The main menu contains
|
---|
[392bd25] | 119 | three blocks: meta-package selection, individual package selection, and
|
---|
[a54e1f1] | 120 | build options.
|
---|
[824b6e4] | 121 |
|
---|
[392bd25] | 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.
|
---|
[824b6e4] | 125 |
|
---|
[392bd25] | 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
|
---|
[a54e1f1] | 129 | future configuration runs.
|
---|
[824b6e4] | 130 |
|
---|
[392bd25] | 131 | If, for example, your target selection is Xsoft-->Graphweb-->galeon, a
|
---|
[a54e1f1] | 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.
|
---|
[824b6e4] | 136 |
|
---|
[392bd25] | 137 | There are also two other directories ("dependencies" and "xincludes")
|
---|
| 138 | that contain files generated while resolving dependencies trees.
|
---|
[f4ed135] | 139 |
|
---|
[a54e1f1] | 140 | 3.5 EDITING BUILD SCRIPTS
|
---|
[f4ed135] | 141 |
|
---|
[392bd25] | 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.
|
---|
[824b6e4] | 144 |
|
---|
[f4ed135] | 145 | Scripts for additional packages (i.e., for non-BLFS packages) can be
|
---|
[392bd25] | 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.
|
---|
[824b6e4] | 149 |
|
---|
[392bd25] | 150 | Remember, the package tracking system isn't a package management tool
|
---|
| 151 | and knows nothing about packages not in the BLFS book.
|
---|
[f4ed135] | 152 |
|
---|
[392bd25] | 153 | Also, review and edit envars.conf. This file is used to set global envars
|
---|
[a54e1f1] | 154 | needed by the build scripts.
|
---|
| 155 |
|
---|
| 156 | 3.6 CREATING THE MAKEFILE
|
---|
| 157 |
|
---|
[4c5274d] | 158 | When the build scripts are ready to be run, the Makefile can be
|
---|
[a1fcc9dd] | 159 | created. Be sure that you cd into the "package" directory and run
|
---|
[392bd25] | 160 | ../gen-makefile.sh
|
---|
[824b6e4] | 161 |
|
---|
[392bd25] | 162 | Review the Makefile, and, if all looks sane, start the build.
|
---|
[824b6e4] | 163 |
|
---|
[f4ed135] | 164 | 4. GENERATED BUILD SCRIPTS ISSUES::
|
---|
[1891ac46] | 165 |
|
---|
[392bd25] | 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
|
---|
| 170 | unhandled dependencies and/or to remove some script installing the affected
|
---|
[f4ed135] | 171 | package by hand.
|
---|
[1891ac46] | 172 |
|
---|
[f4ed135] | 173 | 4.1 BLFS BOOTSCRIPTS
|
---|
[1891ac46] | 174 |
|
---|
[392bd25] | 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.
|
---|
[1891ac46] | 178 |
|
---|
[392bd25] | 179 | 4.2 PACKAGE CONFIGURATION
|
---|
[1891ac46] | 180 |
|
---|
[392bd25] | 181 | For those packages that have a "Configuration" section, you should
|
---|
| 182 | edit the build script to fit the needs of your system.
|
---|
[1891ac46] | 183 |
|
---|
[0efb837] | 184 | 4.4 PDL, Perl modules, and Glib-Bindings.
|
---|
[1891ac46] | 185 |
|
---|
[392bd25] | 186 | The generated scripts for these packages are broken and can not
|
---|
[9d9a810] | 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.
|
---|
[1891ac46] | 189 |
|
---|
[9d9a810] | 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
|
---|
[1891ac46] | 194 |
|
---|
[392bd25] | 195 | On the pages for these packages, the BLFS book actually has instructions
|
---|
[9d9a810] | 196 | to download and install two or more packages. You must edit the scripts to
|
---|
| 197 | fix this.
|
---|
[392bd25] | 198 |
|
---|
| 199 | We will try to fix some of them, but this may not be possible.
|
---|
[1891ac46] | 200 |
|
---|
[f4ed135] | 201 | 4.5 XORG7
|
---|
| 202 |
|
---|
[a70c289] | 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
|
---|
[0efb837] | 208 | the scripts to use your local packages.
|
---|
[f4ed135] | 209 |
|
---|
[a70c289] | 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 |
|
---|
[9d9a810] | 214 | In the script for xorg7-font, be sure to move the fonts directories
|
---|
| 215 | symlinks creation to after the "for ... done" loop.
|
---|
| 216 |
|
---|
[f4ed135] | 217 | 4.6 PATCHES
|
---|
| 218 |
|
---|
[392bd25] | 219 | By default, all required patches will be downloaded from the NET.
|
---|
[f4ed135] | 220 |
|
---|
[392bd25] | 221 | If you have previously downloaded the patches, you must edit the
|
---|
| 222 | scripts to use your local patches.
|
---|
[f4ed135] | 223 |
|
---|
| 224 | Also, be sure that all scripts have the commands to download/apply the
|
---|
[392bd25] | 225 | required patches. Due to book layout issues, some patches may be missing.
|
---|
[f4ed135] | 226 |
|
---|
| 227 | 4.7 ROOT COMMANDS
|
---|
| 228 |
|
---|
[392bd25] | 229 | If building as a normal user (the default setting), be sure that all
|
---|
[615ba88] | 230 | commands that require root privileges are run using sudo. Also make sure
|
---|
[0efb837] | 231 | necessary root privilege commands are visible in your PATH.
|
---|
[f4ed135] | 232 |
|
---|
[392bd25] | 233 | Due to book layout issues, some sudo commands may be missing.
|
---|
[f4ed135] | 234 |
|
---|
| 235 | 4.8 OTHERS
|
---|
[1891ac46] | 236 |
|
---|
[392bd25] | 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>.
|
---|
[1891ac46] | 239 |
|
---|
| 240 |
|
---|