Changeset cc8dba9 for README.BLFS


Ignore:
Timestamp:
03/27/2017 07:49:04 PM (7 years ago)
Author:
Pierre Labastie <pierre@…>
Branches:
2.4, ablfs-more, legacy, trunk
Children:
6bba83f
Parents:
5e59386
Message:

Refactor two README files

File:
1 edited

Legend:

Unmodified
Added
Removed
  • README.BLFS

    r5e59386 rcc8dba9  
    22
    331. 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 sure
    7   to follow the after-booting installation instructions.
    84
    95     To automate package builds from the BLFS book instructions is a huge
     
    21172. PREREQUISITES::
    2218
    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
     423. 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
    72101
    73102    blfs-xml/*              SVN tree of the selected BLFS book version
     
    99128    envars.conf             envars needed when running the target build scripts
    100129
    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
    112131
    113132    packages.xml            auto-generated packages database
     
    119138    scripts/*               the scriptlets
    120139
     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
     1634. USAGE::
     164
    121165       From now on, all the work must be done from inside the installation
    122166    root directory.
    123167
    124        You may move that directory to the $HOME of a non root user, or build
    125     as root from that directory.
    126 
    127   3.3  UPDATING 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::
    128172
    129173       If you are using the development book version and you want to update
     
    143187    and used to solve dependencies.
    144188
    145   3.4  CONFIGURING AND PARSING THE BOOK::
     189  4.2  CONFIGURING AND PARSING THE BOOK::
    146190
    147191       The next step is to create a book and build scripts in dependency
     
    181225    generated while resolving dependencies.
    182226
    183   3.5  EDITING BUILD SCRIPTS::
     227  4.3  EDITING BUILD SCRIPTS::
    184228
    185229       Now it is time to review the generated book and scripts, making any
     
    198242    needed by the build scripts.
    199243
    200   3.6  CREATING THE MAKEFILE::
     244  4.4  CREATING THE MAKEFILE::
    201245
    202246       When the build scripts are ready to be run, the Makefile can be
     
    207251    "make".
    208252
    209 4. GENERATED BUILD SCRIPTS ISSUES::
     2535. GENERATED BUILD SCRIPTS ISSUES::
    210254
    211255      In this section, known issues with the generated build scripts are
     
    223267   fields of each involved script.
    224268
    225    4.1  BLFS BOOTSCRIPTS::
     269   5.1  BLFS BOOTSCRIPTS::
    226270
    227271        Normally, bootscript installation should work. On the other hand, the
     
    230274     the build.
    231275
    232    4.2  PACKAGE CONFIGURATION::
     276   5.2  PACKAGE CONFIGURATION::
    233277
    234278        For those packages that have a "Configuration" section, you should
     
    238282     variables are used.
    239283
    240    4.3  PAGES WITH TWO OR MORE PACKAGES::
     284   5.3  PAGES WITH TWO OR MORE PACKAGES::
    241285
    242286        For example: sane, poppler, audacious, freetts, which, etc.
     
    249293     instructions may need to be repeated for each tarball in turn.
    250294
    251    4.4  XORG7
     295   5.4  XORG7
    252296
    253297        The book has special page layouts for the Xorg7 packages. The tool
     
    258302     dependency chain brings in the whole set of Xorg packages.
    259303
    260    4.5  PATCHES
     304   5.5  PATCHES
    261305
    262306        Please, make sure that all scripts have the commands to download/apply
     
    264308     missing (as of BLFS 8.0, all the patches seem to be downloaded).
    265309
    266    4.6  ROOT COMMANDS
     310   5.6  ROOT COMMANDS
    267311
    268312        If building as a normal user (the default setting), be sure that all
     
    293337        Due to book layout issues, some sudo commands may be missing.
    294338
    295    4.7  OTHERS
     339   5.7  OTHERS
    296340
    297341        There may be other issues that we are not aware of. If you find
Note: See TracChangeset for help on using the changeset viewer.