This repository has been archived on 2024-10-17. You can view files and clone it, but cannot push or open issues or pull requests.
MahiroOS-jhalfs/README.BLFS

269 lines
10 KiB
Text
Raw Normal View History

2006-08-13 20:21:55 +02:00
$Id$
1. INTRODUCTION::
2007-07-05 20:37:13 +02:00
To automate package builds from the BLFS book instructions is a huge
task. Some of the issues are: the BLFS book isn't linear; some package
pages use a custom layout; there are circular dependencies; several
packages can be installed on a non-default prefix; build commands can
change based on what dependencies will be used, etc.
2006-08-13 20:21:55 +02:00
2007-07-05 20:37:13 +02:00
That being said, the goal of the blfs-tool is to help you solve package
dependencies, create build scripts and a Makefile. Few of the auto-generated
build scripts and Makefile will work "as is", thus, as a general rule,
you will need to review and edit the scripts while reading the book.
2006-08-13 20:21:55 +02:00
2006-08-24 22:38:22 +02:00
2. PREREQUISITES::
2007-07-05 20:37:13 +02:00
To use this tool you MUST:
2006-08-24 22:38:22 +02:00
- have experience building BLFS packages
- know how to edit and write shell scripts
- know how a Makefile works
- be able to trace build failures and to find what is causing it
(user error, package bug, BLFS command bug, or jhalfs code bug)
2006-10-07 20:19:09 +02:00
If you do not have the above skills, please don't use this tool.
2006-08-24 22:38:22 +02:00
3. USAGE::
2006-08-13 20:21:55 +02:00
2007-07-05 20:37:13 +02:00
Due the complexity of the BLFS book, the scripts and Makefile generation
is done in several steps:
2006-08-13 20:21:55 +02:00
2006-10-07 20:19:09 +02:00
3.1 INSTALLED PACKAGES TRACKING SYSTEM
2007-07-05 20:37:13 +02:00
This tool includes a very simple tracking system to log which packages
have been installed using the tool. It is used to skip installed packages
from target selection menu and to test if an installed package has been
updated in the BLFS book. Do not rely on this feature as a package
management tool.
2006-10-07 20:19:09 +02:00
2007-07-05 20:37:13 +02:00
The directory where tracking files will be stored needs to be created
before installing blfs-tool. You can place this directory anywhere, taking
care that the user must have read and write privileges on that directory
and on all files it contains.
2006-10-07 20:19:09 +02:00
To use the default path set in the installation menu, run as root:
install -d -m1777 /var/lib/jhalfs/BLFS
3.2 BLFS_TOOL INSTALLATION::
2006-08-24 22:38:22 +02:00
Run "make" to launch the jhalfs menuconfig interface. Select the BLFS
2007-07-05 20:37:13 +02:00
book and version. Then set the installation directory (default
2006-10-07 20:19:09 +02:00
$HOME/blfs_root), the BLFS sources directory (default blfs-xml), and
the installed packages tracking directory (default /var/lib/jhalfs/BLFS).
2006-08-13 20:21:55 +02:00
All required files will be placed in the installation directory and
2007-07-05 20:37:13 +02:00
BLFS XML sources will be installed in the named sub-directory.
2006-08-13 20:21:55 +02:00
Installed files:
2006-08-24 22:38:22 +02:00
blfs-xml/* SVN tree of the selected BLFS book version
lib/* functions libraries, xsl stylesheets, and auto-generated
meta-packages dependencies tree files
menu/* lxdialog and menuconfig source code
2006-08-13 20:21:55 +02:00
README.BLFS this file
TODO developers notes
2006-08-24 22:38:22 +02:00
update_book.sh update the XML book sources and regenerates packages
database and meta-packages dependencies tree
gen_config.sh regenerates Config.in
2007-07-05 20:37:13 +02:00
gen_pkg_book.sh resolves dependencies and generates linear BLFS books
2006-08-24 22:38:22 +02:00
and build scripts
2007-07-05 20:37:13 +02:00
gen-makefile.sh generates the target Makefile
2006-08-24 22:38:22 +02:00
progress_bar.sh the target Makefile progress bar
Makefile run gen_config.sh to update Config.in,
then launch the menuconfig interface, and lastly run
gen_pkg_book.sh based on configuration settings
Config.in menuconfig interface input file
packages auto-generated packages database
envars.conf envars needed when running the target build scripts
2006-08-13 20:21:55 +02:00
From now on, all the work must be done from inside the installation
root directory.
2006-10-07 20:19:09 +02:00
When finished the installation, the configuration and target selection
menu is launch.
3.3 UPDATING BOOK SOURCES::
2006-08-24 22:38:22 +02:00
2007-07-05 20:37:13 +02:00
If you are using the development book version and you want to update
installed packages to the latest version found in that book, you need to
update the XML sources and packages database.
2006-08-24 22:38:22 +02:00
2006-10-07 20:19:09 +02:00
To do that run "./update_book.sh"
2006-08-24 22:38:22 +02:00
2006-10-07 20:19:09 +02:00
On the next configuration run, packages already installed but listed
2007-07-05 20:37:13 +02:00
with a new version in the book will be available for target selection
and used to solve dependencies.
2006-10-07 20:19:09 +02:00
3.4 CONFIGURING AND PARSING THE BOOK::
2006-08-13 20:21:55 +02:00
2007-07-05 20:37:13 +02:00
The next step is to create a book and build scripts in dependency
build order for a target package. A target can be a package or a
meta-package.
2006-08-13 20:21:55 +02:00
WARNING:
Only one target (meta-package or individual package) must be
selected on each configuration run.
2007-07-05 20:37:13 +02:00
There is no way to solve dependencies properly when more
than one target are selected.
2006-10-07 20:19:09 +02:00
Run <make> to launch the configuration interface. The main menu contains
2007-07-05 20:37:13 +02:00
three blocks: meta-package selection, individual package selection, and
2006-10-07 20:19:09 +02:00
build options.
2006-08-13 20:21:55 +02:00
2007-07-05 20:37:13 +02:00
When a meta-package is selected, it is possible to unselect unwanted
components. The unselected components will be skipped if no other components
depends on them.
2006-08-13 20:21:55 +02:00
2007-07-05 20:37:13 +02:00
In the build options section, the dependencies level and default packages
used to solve alternatives are set. You can also select whether the build will
be made as a normal user or as root. That settings are saved to be reused in
2006-10-07 20:19:09 +02:00
future configuration runs.
2006-08-13 20:21:55 +02:00
2007-07-05 20:37:13 +02:00
If, for example, your target selection is Xsoft-->Graphweb-->galeon, a
2006-10-07 20:19:09 +02:00
directory named "galeon" will be created. Inside that directory you will
find a directory named "HTML" that contains a galeon-based HTML book with
its dependencies in build order, and a "scripts" directory with build
scripts for that packages.
2006-08-13 20:21:55 +02:00
2007-07-05 20:37:13 +02:00
There are also two other directories ("dependencies" and "xincludes")
that contain files generated while resolving dependencies trees.
2006-08-24 22:38:22 +02:00
2006-10-07 20:19:09 +02:00
3.5 EDITING BUILD SCRIPTS
2006-08-24 22:38:22 +02:00
2007-07-05 20:37:13 +02:00
Now it is time to review the generated book and scripts, making any changes
to the scripts necessary to fix generation bugs or to suit your needs.
2006-08-13 20:21:55 +02:00
2006-08-24 22:38:22 +02:00
Scripts for additional packages (i.e., for non-BLFS packages) can be
2007-07-05 20:37:13 +02:00
easily inserted. For example, if you want to install the external dependency
"bar" before "foo" package and the "foo" script is named "064-z-foo", you
need to create a "064-y-bar" build script.
2006-08-13 20:21:55 +02:00
2007-07-05 20:37:13 +02:00
Remember, the package tracking system isn't a package management tool
and knows nothing about packages not in the BLFS book.
2006-08-24 22:38:22 +02:00
2007-07-05 20:37:13 +02:00
Also, review and edit envars.conf. This file is used to set global envars
2006-10-07 20:19:09 +02:00
needed by the build scripts.
3.6 CREATING THE MAKEFILE
When the build scripts are ready to be run, the Makefile can be
2006-08-14 19:12:22 +02:00
created. Be sure that you cd into the "package" directory and run
2007-07-05 20:37:13 +02:00
../gen-makefile.sh
2006-08-13 20:21:55 +02:00
2007-07-05 20:37:13 +02:00
Review the Makefile, and, if all looks sane, start the build.
2006-08-13 20:21:55 +02:00
2006-08-24 22:38:22 +02:00
4. GENERATED BUILD SCRIPTS ISSUES::
2007-07-05 20:37:13 +02:00
In this section, known issues with the generated build scripts are
discussed. They are due to build procedures and/or BLFS layout particularities
that we can't handle. In several cases, editing the build scripts is mandatory.
You may also need to insert some build scripts created by you to resolve
unhandled dependencies and/or to remove some script installing the affected
2006-08-24 22:38:22 +02:00
package by hand.
2006-08-24 22:38:22 +02:00
4.1 BLFS BOOTSCRIPTS
2007-07-05 20:37:13 +02:00
For now, bootscripts installation will fail. You will need to edit
the scripts for packages that install bootscripts and fix their
installation command. That could be fixed in the future.
2007-07-05 20:37:13 +02:00
4.2 PACKAGE CONFIGURATION
2007-07-05 20:37:13 +02:00
For those packages that have a "Configuration" section, you should
edit the build script to fit the needs of your system.
2006-08-24 22:38:22 +02:00
4.4 PDL and Perl modules.
2007-07-05 20:37:13 +02:00
The generated scripts for these packages are broken and can not
be fixed. You must replace them with your own scripts or install the
packages by hand.
2006-08-24 22:38:22 +02:00
4.4 GCC, JDK, Sane, and KDE-multimedia
2007-07-05 20:37:13 +02:00
On the pages for these packages, the BLFS book actually has instructions
to install two packages. You must edit the scripts to fix this.
We will try to fix some of them, but this may not be possible.
2006-08-24 22:38:22 +02:00
4.5 XORG7
The generated scripts for Xorg7 pseudo-packages don't have support for
$SRC_ARCHIVE nor MD5 checking.
2007-07-05 20:37:13 +02:00
If you have previously downloaded the packages, you must edit the
scripts to use your local packages.
2006-08-24 22:38:22 +02:00
Also, you will need to edit the scripts to fix the commands that must
2007-07-05 20:37:13 +02:00
be applied only to a concrete individual sub-package. For example, the
"for" loop to install xorg7-util packages may read like:
2006-08-24 22:38:22 +02:00
for package in $(cat $WGET_LST) ; do
packagedir=$(echo $package | sed 's/.tar.bz2//')
tar -xf $package
cd $packagedir
sed -i "s@/usr/X11R6@$XORG_PREFIX@" X11.tmpl &&
./configure $XORG_CONFIG --with-config-dir=$XORG_PREFIX/lib/X11/config
sudo sh -c "make install"
./configure $XORG_CONFIG --with-config-dir=$XORG_PREFIX/lib/X11/config &&
make
sudo sh -c "make install"
./configure $XORG_CONFIG &&
make
sudo sh -c "make install"
cd ..
rm -rf $packagedir
done
2007-07-05 20:37:13 +02:00
After reading the HTML page to find what command is for what package,
2006-08-24 22:38:22 +02:00
the loop can be changed to read something like:
for package in $(cat $WGET_LST) ; do
packagedir=$(echo $package | sed 's/.tar.bz2//')
tar -xf $package
cd $packagedir
if [ ${packagedir} = "xorg-cf-files" ] ; then
sed -i "s@/usr/X11R6@$XORG_PREFIX@" X11.tmpl &&
./configure $XORG_CONFIG --with-config-dir=$XORG_PREFIX/lib/X11/config
sudo sh -c "make install"
elif [ ${packagedir} = "Imake" ] ; then
./configure $XORG_CONFIG --with-config-dir=$XORG_PREFIX/lib/X11/config &&
make
sudo sh -c "make install"
else
./configure $XORG_CONFIG &&
make
sudo sh -c "make install"
fi
cd ..
rm -rf $packagedir
done
4.6 PATCHES
2007-07-05 20:37:13 +02:00
By default, all required patches will be downloaded from the NET.
2006-08-24 22:38:22 +02:00
2007-07-05 20:37:13 +02:00
If you have previously downloaded the patches, you must edit the
scripts to use your local patches.
2006-08-24 22:38:22 +02:00
Also, be sure that all scripts have the commands to download/apply the
2007-07-05 20:37:13 +02:00
required patches. Due to book layout issues, some patches may be missing.
2006-08-24 22:38:22 +02:00
4.7 ROOT COMMANDS
2007-07-05 20:37:13 +02:00
If building as a normal user (the default setting), be sure that all
commands that require root privileges are run using sudo.
2006-08-24 22:38:22 +02:00
2007-07-05 20:37:13 +02:00
Due to book layout issues, some sudo commands may be missing.
2006-08-24 22:38:22 +02:00
4.8 OTHERS
2007-07-05 20:37:13 +02:00
There may be other issues that we are not aware of. If you find
any, please report it to <alfs-discuss@linuxfromscratch.org>.