2006-08-13 20:24:16 +02:00
|
|
|
$Id$
|
|
|
|
|
|
|
|
1. INTRODUCTION::
|
|
|
|
|
|
|
|
To automatize packages build from the BLFS book instructions is a huge
|
|
|
|
task. The BLFS book isn't linear, some package pages need to use a non
|
2006-08-16 22:16:01 +02:00
|
|
|
default layout, there are circular dependencies, several packages can be
|
|
|
|
installed on a non default prefix, build commands can change based on what
|
2006-08-13 20:24:16 +02:00
|
|
|
dependencies will be used, etc.
|
|
|
|
|
|
|
|
Said that, the goal of jhalfs is try to help you solving packages
|
|
|
|
dependencies and creating your own build scripts/Makefile. Some of the
|
|
|
|
auto-generated build scripts and Makefile could work "as is", but as a
|
|
|
|
general rule you will need to review and edit the scripts while reading
|
|
|
|
the book.
|
|
|
|
|
2006-08-14 22:59:05 +02:00
|
|
|
NOTE:: The code is still under development and may contains several bugs
|
2006-08-13 20:24:16 +02:00
|
|
|
|
|
|
|
|
|
|
|
2. USAGE::
|
|
|
|
|
2006-08-16 22:16:01 +02:00
|
|
|
Due the complexity of the BLFS book, the scripts/Makefile generation is
|
2006-08-13 20:24:16 +02:00
|
|
|
done in several steps:
|
|
|
|
|
|
|
|
2.1 INSTALLATION::
|
2006-08-20 12:49:45 +02:00
|
|
|
|
|
|
|
Run "make" to launch the jhalfs menuconfig interface. Select the BLFS
|
|
|
|
book and it version. Then set the installation directory (default
|
2006-08-13 20:24:16 +02:00
|
|
|
$HOME/blfs_root) and the BLFS sources directory (default blfs-xml).
|
|
|
|
|
|
|
|
All required files will be placed in the installation directory and
|
|
|
|
BLFS XML sources will be checkout to the named sub-directory.
|
|
|
|
|
|
|
|
Installed files:
|
|
|
|
|
2006-08-20 12:49:45 +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:24:16 +02:00
|
|
|
README.BLFS this file
|
|
|
|
TODO developers notes
|
2006-08-20 12:49:45 +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
|
|
|
|
blfs-parser.sh solve dependencies and generates linear BLFS books
|
|
|
|
and build scripts
|
|
|
|
gen-makefile.sh generates target Makefile
|
|
|
|
progress_bar.sh the target Makefile progress bar
|
|
|
|
Makefile (not created yet) run gen_config.sh to update Config.in,
|
|
|
|
then launch the menuconfig interface, and lastly run
|
|
|
|
blfs-parser.sh based on configuration settings
|
2006-08-20 13:30:19 +02:00
|
|
|
Config.in menuconfig interface input file
|
2006-08-20 12:49:45 +02:00
|
|
|
packages auto-generated packages database
|
|
|
|
alternatives.conf (to be removed) configuration file for alternative packages
|
|
|
|
envars.conf envars needed when running the target build scripts
|
2006-08-13 20:24:16 +02:00
|
|
|
|
|
|
|
From now on, all the work must be done from inside the installation
|
|
|
|
root directory.
|
|
|
|
|
|
|
|
2.2 UPDATING BOOK SOURCES::
|
|
|
|
|
2006-08-20 12:49:45 +02:00
|
|
|
If using the development book version, and if you want to update already
|
|
|
|
installed packages to the new version found in that book, you need to update
|
|
|
|
the XML sources and packages database.
|
|
|
|
|
|
|
|
To do that run "./update_book.sh"
|
|
|
|
|
|
|
|
2.3 CONFIGURING AND PARSING THE BOOK:: (to be rewritten when ready menuconfig)
|
|
|
|
|
2006-08-13 20:24:16 +02:00
|
|
|
Next step is to create a book and build scripts in dependencies build order
|
|
|
|
for a target package. A target package can be any of the ones listed in the
|
2006-08-14 22:59:05 +02:00
|
|
|
packages file. That is done using the blfs-parser.sh script, but we are trying
|
2006-08-13 20:24:16 +02:00
|
|
|
to make a menuconfig based system.
|
|
|
|
|
|
|
|
The script need three arguments:
|
|
|
|
|
|
|
|
package name as listed in packages file
|
2006-08-14 22:59:05 +02:00
|
|
|
dependencies level 1 for required,
|
|
|
|
2 for required an recommended
|
2006-08-13 20:24:16 +02:00
|
|
|
3 for required, recommended, and optional
|
2006-08-14 22:59:05 +02:00
|
|
|
sudo usage y if sudo will be used (you want build as a normal user)
|
|
|
|
n if sudo isn't needed (you want build as root)
|
2006-08-13 20:24:16 +02:00
|
|
|
|
|
|
|
For example:
|
|
|
|
|
|
|
|
./blfs-parser galeon 3 y
|
|
|
|
|
|
|
|
will create a directory named "galeon". Inside that directory you find a
|
|
|
|
directory named "HTML" that contains a galeon-based HTML book with all
|
|
|
|
dependencies in build order and a "scripts" directory with build scripts
|
2006-08-16 22:16:01 +02:00
|
|
|
that uses sudo for commands that need root privileges.
|
2006-08-13 20:24:16 +02:00
|
|
|
|
2006-08-20 12:49:45 +02:00
|
|
|
There is also two other directories, dependencies and xincludes, that
|
|
|
|
contains files generated while resolving dependencies trees.
|
|
|
|
|
|
|
|
2.4 EDITING BUILD SCRIPTS
|
|
|
|
|
|
|
|
Now is the time to review the generated book and scripts, making in the
|
|
|
|
scripts any changes required to fix generation bugs or to fit your needs.
|
|
|
|
|
|
|
|
Scripts for additional packages (i.e., for non-BLFS packages) can be
|
|
|
|
inserted in an easy way due how the scripts are named. 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:24:16 +02:00
|
|
|
|
2006-08-20 13:30:19 +02:00
|
|
|
Note that the packages tracking system isn't a packages management tool
|
2006-08-20 12:49:45 +02:00
|
|
|
and know nothing about packages not in the BLFS book.
|
2006-08-13 20:24:16 +02:00
|
|
|
|
2006-08-20 12:49:45 +02:00
|
|
|
2.5 CREATING THE MAKEFILE
|
2006-08-14 22:59:05 +02:00
|
|
|
When the build scripts are ready to be run, the Makefile can be
|
|
|
|
created. Be sure that you cd into the "package" directory and run
|
2006-08-13 20:24:16 +02:00
|
|
|
|
2006-08-14 22:59:05 +02:00
|
|
|
../gen_makefile.sh
|
2006-08-13 20:24:16 +02:00
|
|
|
|
2006-08-14 22:59:05 +02:00
|
|
|
Review the Makefile and if all look sane, start the build.
|
2006-08-13 20:24:16 +02:00
|
|
|
|
|
|
|
|
2006-08-20 12:49:45 +02:00
|
|
|
(Text is needed about meta-packages, the installed packages tracking system
|
|
|
|
and like)
|
2006-08-13 20:24:16 +02:00
|
|
|
|
2006-08-16 22:16:01 +02:00
|
|
|
3. GENERATED BUILD SCRIPTS ISSUES::
|
|
|
|
|
|
|
|
In this section known issues with the generated build scripts are
|
2006-08-20 12:49:45 +02:00
|
|
|
discussed. They are due build procedures and/or BLFS layout particularities
|
|
|
|
than we can't handle. In several cases editing the build scripts is mandatory.
|
2006-08-16 22:16:01 +02:00
|
|
|
You may need also to insert some build script created by you to resolve
|
2006-08-20 12:49:45 +02:00
|
|
|
unhandled dependencies and/or to remove some script installing the affected
|
|
|
|
package by hand.
|
2006-08-16 22:16:01 +02:00
|
|
|
|
|
|
|
3.1 BLFS BOOTSCRIPTS
|
|
|
|
|
|
|
|
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, but not sure.
|
|
|
|
|
|
|
|
3.2 PACKAGES CONFIGURATION
|
|
|
|
|
|
|
|
For that packages that have a "Configuration" section, you should to
|
|
|
|
edit it build script to fit the configuration to your needs.
|
|
|
|
|
|
|
|
3.4 PDL and Perl modules.
|
|
|
|
|
|
|
|
The generated scripts for that packages are plainly broken and can't
|
|
|
|
be fixed. You must to replace it by your own ones or install that
|
|
|
|
packages by hand.
|
|
|
|
|
|
|
|
3.4 GCC, JDK, Sane, and KDE-multimedia
|
|
|
|
|
|
|
|
On the pages for that packages, the BLFS book actually have instructions
|
|
|
|
to install two packages. You must to edit the scripts to fix it. We will
|
|
|
|
try to fix some of them, but may not be possible.
|
|
|
|
|
2006-08-20 13:30:19 +02:00
|
|
|
3.5 XORG7
|
|
|
|
|
2006-08-20 13:50:54 +02:00
|
|
|
The generated scripts for Xorg7 pseudo-packages don't have support for
|
2006-08-20 13:30:19 +02:00
|
|
|
$SRC_ARCHIVE nor MD5 checking.
|
|
|
|
|
|
|
|
If you has downloaded previously the packages, you must to edit the scripts
|
|
|
|
to make it to use your local packages.
|
|
|
|
|
2006-08-20 13:50:54 +02:00
|
|
|
Also, you will need to edit the scripts to fix the commands that must
|
|
|
|
be applied only to a concret individual sub-package. For example the "for"
|
|
|
|
loop to install xotg7-util packages may read like:
|
|
|
|
|
|
|
|
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
|
|
|
|
|
|
|
|
After reading the HTML page to know what commands is for what package,
|
|
|
|
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
|
|
|
|
|
2006-08-20 13:30:19 +02:00
|
|
|
3.6 PATCHES
|
|
|
|
|
|
|
|
By default all required patches will be downloaded from the NET.
|
|
|
|
|
|
|
|
If you has downloaded previously the patches, you must to edit the scripts
|
|
|
|
to make it to use your local patches.
|
|
|
|
|
|
|
|
Also, be sure that all scripts have the commands to download/apply the
|
|
|
|
required patches. Due book layout issues some patches may be missing.
|
|
|
|
|
|
|
|
3.7 ROOT COMMANDS
|
|
|
|
|
|
|
|
If building as a normal user (the default setting) be sure that all
|
|
|
|
commands that need root privileges are run using sudo.
|
|
|
|
|
|
|
|
Due book layout issues some sudo command may be missing.
|
|
|
|
|
|
|
|
3.8 OTHERS
|
2006-08-16 22:16:01 +02:00
|
|
|
|
|
|
|
May have other issues that we are not aware on them yet. If you find
|
|
|
|
someone, please report it to <alfs-discuss@linuxfromscratch.org>.
|
|
|
|
|
|
|
|
|