diff --git a/BLFS/gen_pkg_book.sh b/BLFS/gen_pkg_book.sh
index f0165d9..f5c8109 100755
--- a/BLFS/gen_pkg_book.sh
+++ b/BLFS/gen_pkg_book.sh
@@ -26,6 +26,7 @@ declare BLFS_XML="${TOPDIR}/blfs-xml"
declare -a TARGET
declare DEP_LEVEL
declare SUDO
+declare WRAP_INSTALL
#--------------------------#
parse_configuration() { #
@@ -44,6 +45,7 @@ parse_configuration() { #
# Create global variables for these parameters.
optDependency=* | \
MAIL_SERVER=* | \
+ WRAP_INSTALL=* | \
SUDO=* ) eval ${REPLY} # Define/set a global variable..
continue ;;
esac
@@ -62,13 +64,14 @@ parse_configuration() { #
TARGET=(${optTARGET[*]})
DEP_LEVEL=$optDependency
SUDO=${SUDO:-n}
+ WRAP_INSTALL=${WRAP_INSTALL:-n}
}
#--------------------------#
validate_configuration() { #
#--------------------------#
local -r dotSTR=".................."
- local -r PARAM_LIST="DEP_LEVEL SUDO MAIL_SERVER"
+ local -r PARAM_LIST="DEP_LEVEL SUDO MAIL_SERVER WRAP_INSTALL"
local -r PARAM_VALS='${config_param}${dotSTR:${#config_param}} ${L_arrow}${BOLD}${!config_param}${OFF}${R_arrow}'
local config_param
local -i index
@@ -179,6 +182,7 @@ echo -en "\n\tGenerating the build scripts ...\n"
rm -rf scripts
xsltproc --xinclude --nonet \
--stringparam sudo $SUDO \
+ --stringparam wrap-install $WRAP_INSTALL \
-o ./scripts/ ${MakeScripts} \
${BookXml}
# Make the scripts executable.
diff --git a/BLFS/xsl/gen_config.xsl b/BLFS/xsl/gen_config.xsl
index 009c80f..9a4f2a0 100644
--- a/BLFS/xsl/gen_config.xsl
+++ b/BLFS/xsl/gen_config.xsl
@@ -58,6 +58,16 @@ config SUDO
help
Select if sudo will be used (you build as a normal user)
otherwise sudo is not needed (you build as root)
+
+
+config WRAP_INSTALL
+ bool "Use `porg style' package management"
+ default n
+ help
+ Select if you want the installation commands to be wrapped
+ between "wrapInstall '" and "' ; packInstall" functions,
+ where wrapInstall is used to set up a LD_PRELOAD library (for
+ example using porg), and packInstall makes the package tarball
diff --git a/BLFS/xsl/scripts.xsl b/BLFS/xsl/scripts.xsl
index 609b107..ef170f7 100644
--- a/BLFS/xsl/scripts.xsl
+++ b/BLFS/xsl/scripts.xsl
@@ -21,6 +21,10 @@
+
+
+
@@ -69,8 +73,10 @@
-
- PKG_DIR=
+
+ export PKG_DIR=
SRC_DIR=${SRC_ARCHIVE}${SRC_SUBDIRS:+/${PKG_DIR}}
@@ -149,6 +155,7 @@ case $PACKAGE in
cp $(find . -mindepth 1 -maxdepth 1 -type l) $UNPACKDIR
;;
esac
+export UNPACKDIR
cd $UNPACKDIR
@@ -407,12 +414,30 @@ fi
-
- sudo -E sh << ROOT_EOF
+
+
+ sudo -E sh << ROOT_EOF
+
+
+ if [ -r "$PACK_INSTALL" ]; then
+ source $PACK_INSTALL
+ export -f wrapInstall
+ export -f packInstall
+fi
+wrapInstall '
+
+
-
-
ROOT_EOF
+
+
+ '
packInstall
+
+
+
ROOT_EOF
+
@@ -514,6 +539,8 @@ popd
+ '
+
@@ -561,6 +588,19 @@ popd
select="substring-after($out-string,'\')"/>
+
+
+
+
+ '\''
+
+
+
+
diff --git a/Config.in b/Config.in
index 931bfc9..bdcf238 100644
--- a/Config.in
+++ b/Config.in
@@ -757,13 +757,12 @@ depends !BOOK_BLFS
#
# You will have to select between:
#
- # - Only final system Glibc, GCC and Binutils testsuites
+ # - Only critical final system testsuites
# - All final system testsuites
# - Both temporary tools and final system testsuites
#
# HLFS and CLFS have no testsuites available in the
# temporary tools phase
-
# You will be prompted also about the "flavour" of the
# testsuites run:
#
@@ -771,19 +770,38 @@ depends !BOOK_BLFS
# - Abort the build at the first test suite failure
#
+ menu "Test settings"
+ depends CONFIG_TESTS
choice
prompt "Tests level"
- depends CONFIG_TESTS
default TST_1
config TST_1
- bool "Only final critical testsuites" if !BOOK_CLFS2 && !BOOK_CLFS3
+ bool "Only final system critical testsuites"
+ help
+ #-- Critical tests:
+ # Only Glibc, Binutils, GMP, MPFR, MPC and GCC
+ # testsuites for final system
config TST_2
bool "All final system testsuites"
config TST_3
- bool "Both temporary tools and final system testsuites" if !BOOK_HLFS && !BOOK_CLFS
+ bool "All testsuites" if !BOOK_HLFS && !BOOK_CLFS
+ help
+ #-- All tests:
+ # Runs all the testsuites for both temporary tools
+ # and final system
+ endchoice
+
+ choice
+ prompt "Flavour"
+
+ config NO_BOMB
+ bool "Don't stop on test failures"
+
+ config BOMB
+ bool "Abort the build on the first test failure"
endchoice
config TEST
@@ -793,23 +811,13 @@ depends !BOOK_BLFS
default "2" if TST_2
default "3" if TST_3
- choice
- prompt "Flavour"
- depends CONFIG_TESTS
-
- config NO_BOMB
- bool "Don't stop on testsuite failures"
-
- config BOMB
- bool "Abort the build on the first testsuite failure"
- endchoice
-
config BOMB_TEST
bool
default n if NO_BOMB
default y if BOMB
#--- End Test Suites
+ endmenu # test settings
#--- Package Management
config PKGMNGT
@@ -819,10 +827,18 @@ depends !BOOK_BLFS
help
#-- Use package management
#
- # If set, the packages in the final phase are built
- # in a separate directory, PKG_DEST.
- # You should provide a bash function for packing
- # and installing the package.
+ # If set, you'll have to choose between
+ # two package management styles:
+ # - Build and install:
+ # the packages in the final phase are built
+ # in a separate directory, PKG_DEST.
+ # You should provide a bash function for
+ # packaing and installing the package.
+ # - Preload a library before install:
+ # Run the install instructions inside a
+ # wrapper command, which monitors the
+ # installed files.
+ #
# Also, you have to provide the instructions
# to build the package manager during the
# temporary tools phase, in the form of a
@@ -830,7 +846,22 @@ depends !BOOK_BLFS
# sect1. See README.PACKAGE_MANAGEMENT
#
# For now, this only works with LFS
+ choice
+ depends PKGMNGT
+ prompt "Package management style"
+ default PKG_PACK
+ config PKG_PACK
+ bool "Build and pack (pacman or dpkg style)"
+
+ config LIB_LOAD
+ bool "Preload a library before installing (porg style)"
+ endchoice
+
+ config WRAP_INSTALL
+ bool
+ default y if LIB_LOAD
+ default n if PKG_PACK
#--- End package management
#--- Installed files logs
@@ -843,13 +874,31 @@ depends !BOOK_BLFS
#--- End Installed files logs
+ config STRIP
+ bool "Strip Installed Binaries/Libraries"
+ default n
+ depends on !BOOK_CLFS3
+
+ config NO_PROGRESS_BAR
+ bool "DO NOT use/display progress_bar "
+ default n
+ help
+ #-- Do not use the progress bar routine. On slower machines
+ # this function consumes precious CPU cycles.
+
+#--- End Build Settings
+endmenu
+
+menu "System configuration
+ depends !BOOK_BLFS
+
#--- FSTAB
config HAVE_FSTAB
bool "Use a custom fstab file"
default n
help
#-- Select this if you have an fstab file with entries
- # for the target system
+ # for the target system
config FSTAB
string "Fstab file (optional)"
@@ -880,11 +929,6 @@ depends !BOOK_BLFS
# and renamed 'kernel-config'
#--- End Kernel
- config STRIP
- bool "Strip Installed Binaries/Libraries"
- default n
- depends on !BOOK_CLFS3
-
config VIMLANG
bool "Install vim-lang package"
default n
@@ -894,13 +938,6 @@ depends !BOOK_BLFS
# NOTE: This option is obsolete with the 7.3 release of Vim
# which is included in all recent releases of LFS.
- config NO_PROGRESS_BAR
- bool "DO NOT use/display progress_bar "
- default n
- help
- #-- Do not use the progress bar routine. On slower machines
- # this function consumes precious CPU cycles.
-
config TIMEZONE
string "TimeZone"
default "GMT"
@@ -946,8 +983,53 @@ depends !BOOK_BLFS
default "A4" if PAGE_A4
#--- End Groff page
-#--- End Build Settings
-endmenu
+ config HOSTNAME
+ string "Hostname"
+ default "**EDITME**"
+
+ menu "Network configuration"
+ config INTERFACE
+ string "netword card name"
+ default "eth0"
+ config IP_ADDR
+ string "Static IP address"
+ default "10.0.2.9"
+ config GATEWAY
+ string "Gateway"
+ default "10.0.2.2"
+ config PREFIX
+ string "Subnet prefix"
+ default "24"
+ config BROADCAST
+ string "Broadcast address"
+ default "10.0.2.255"
+ config DOMAIN
+ string "Domain name"
+ default "lfs.org"
+ config DNS1
+ string "Primary Name server"
+ default "10.0.2.3"
+ config DNS2
+ string "Secondary Name server"
+ default "8.8.8.8"
+ endmenu # Network configuration
+
+ menu "Console configuration"
+ config FONT
+ string "Console font"
+ default "lat0-16"
+ config FONTMAP
+ string "Font map (-m option to setfont)"
+ default "8859-1"
+ config UNICODE
+ bool "Unicode mode"
+ default y
+ config KEYMAP
+ string "Keymap name"
+ default "us"
+ endmenu # Console configuration
+
+endmenu #--- System configuration
menu "Advanced Features"
depends !BOOK_BLFS
diff --git a/LFS/lfs.xsl b/LFS/lfs.xsl
index 771dc85..a2405d4 100644
--- a/LFS/lfs.xsl
+++ b/LFS/lfs.xsl
@@ -8,6 +8,8 @@
extension-element-prefixes="exsl"
version="1.0">
+
+
@@ -16,11 +18,18 @@
n = no, original behavior
y = yes, add PKG_DEST to scripts in install commands of chapter06-08
-->
-
+
+
+
+
@@ -30,23 +39,39 @@
n = no, I want to build the full system and review the logs
y = yes, bomb at the first test suite failure to can review the build dir
-->
-
+
-
+
-
+
-
+
-
+
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -176,7 +201,13 @@
descendant::screen[not(@role) or
@role != 'nodump']/userinput[
@remap='install']">
- mkdir -pv $PKG_DEST/{boot,etc,lib,bin,sbin}
+
+
+ wrapInstall '
+
+
+
+ mkdir -pv $PKG_DEST/{boot,etc,lib,bin,sbin}
mkdir -pv $PKG_DEST/usr/{lib,bin,sbin,include}
mkdir -pv $PKG_DEST/usr/share/{doc,info,man}
mkdir -pv $PKG_DEST/usr/share/man/man{1..8}
@@ -185,10 +216,13 @@ case $(uname -m) in
x86_64) ln -sv lib $PKG_DEST/lib64 && ln -sv lib $PKG_DEST/usr/lib64 ;;
esac
+
+
+ $pkgmngt = 'y' and
+ $wrap-install = 'n'">
mkdir -pv $PKG_DEST/usr/include/{rpc,rpcsvc}
@@ -202,27 +236,54 @@ esac
descendant::screen[not(@role) or
@role != 'nodump']/userinput[
@remap='install']">
-
+
+
+
- rm -fv $PKG_DEST/usr/share/man/{man3/getspnam.3,man5/passwd.5}
+ rm -fv /usr/share/man/{man3/getspnam.3,man5/passwd.5}
-
+
-
- rm -fv $PKG_DEST/usr/share/man/man2/*
+
+ rm -fv /usr/share/man/man2/*
+rm -fv /usr/share/man/man5/*
+
+
+
+
+ rm -fv /usr/share/man/man8/nologin.8
+rm -fv /sbin/nologin
+
+
+ '
+packInstall
+
+
+
+
+
+ rm -fv $PKG_DEST/usr/share/man/{man3/getspnam.3,man5/passwd.5}
+
+
+
+
+ rm -fv $PKG_DEST/usr/share/man/man2/*
rm -fv $PKG_DEST/usr/share/man/man5/*
-
+
-
- rm -fv $PKG_DEST/usr/share/man/man8/nologin.8
+
+ rm -fv $PKG_DEST/usr/share/man/man8/nologin.8
rm -fv $PKG_DEST/sbin/nologin
-
- rm -fv $PKG_DEST/{,usr/}lib64
+
+ rm -fv $PKG_DEST/{,usr/}lib64
rm -fv $PKG_DEST/usr/{man,doc,info}
for dir in $PKG_DEST/usr/share/man/man{1..8}; do
[[ -z $(ls $dir) ]] && rmdir -v $dir
@@ -239,6 +300,8 @@ done
packInstall
rm -rf $PKG_DEST
+
+
packInstall
-rm -rf $PKG_DEST
+rm -rf "$PKG_DEST"
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -476,7 +558,7 @@ exit
tzdata. -->
-OLD_PKG_DEST=$PKG_DEST
+OLD_PKG_DEST="$PKG_DEST"
OLD_PKGDIR=$PKGDIR
PKG_DEST=$(dirname $OLD_PKG_DEST)/001-tzdata
PKGDIR=$(dirname $PKGDIR)/tzdata-
@@ -485,12 +567,28 @@ PKGDIR=$(dirname $PKGDIR)/tzdata-
'.tar')"/>
-
- ZONEINFO=$PKG_DEST
-
-
+
+
+
+ ZONEINFO=$PKG_DEST
+
+
packInstall
rm -rf $PKG_DEST
+
+
+
+
+
+wrapInstall '
+ZONEINFO=
+
+ '
+packInstall
+
+
+
+
PKG_DEST=$OLD_PKG_DEST
unset OLD_PKG_DEST
PKGDIR=$OLD_PKGDIR
@@ -517,6 +615,34 @@ unset OLD_PKGDIR
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ .
+
+
+
+
+
+
**EDITME
@@ -525,6 +651,185 @@ unset OLD_PKGDIR
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+DNS=
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -623,4 +928,26 @@ unset OLD_PKGDIR
+
+ '
+
+
+
+
+
+
+
+ '\''
+
+
+
+
+
+
+
+
+
+
diff --git a/README.PACKAGE_MANAGEMENT b/README.PACKAGE_MANAGEMENT
index 4d67c1f..f356596 100644
--- a/README.PACKAGE_MANAGEMENT
+++ b/README.PACKAGE_MANAGEMENT
@@ -6,32 +6,49 @@ $Id$
There are several hints discussing package management for LFS, but
nothing under jhalfs. There used to be a patch for PACO that I cannot
- find now. This is a modification ("DESTDIR install" automation), which
- allows to use a package manager inside jhalfs. I hope it is flexible enough
- to support several package managers, at least among those who use DESTDIR
- install. My initial implementation used dpkg, from Debian, in a very
- crude way (Debian has a sophisticated package management system, which
- I have not tried to use here). There is also a port to Pacman from
- Arch Linux (http://www.archlinux.org). I am sorry to say I have (almost)
- no experience with rpm, so I cannot tell whether it would fit.
+ find now. So there was a need for such a tool, and an infrastructure,
+ which allows using a package manager inside jhalfs, has been developped.
+ I hope it is flexible enough to support several package managers, at least
+ among those who use DESTDIR install and/or LD_PRELOAD during install.
+ It has been tested with dpkg from Debian, pacman from Arch Linux,
+ and porg. Sample configuration files are given for those three packages.
+ I am sorry to say I have (almost) no experience with rpm, so I cannot
+ tell whether it would fit.
2. OVERVIEW OF THE SYSTEM:
- Presently, package management is only available for LFS. I plan to
- upgrade BLFS tools, but nothing usable right now. I have not attempted
- to adapt this tool for the other flavours of LFS.
+ For now, package management is only available for LFS. The `porg style'
+ (see below) package management has been ported to BLFS, but not the distro
+ style one (the book layout makes it rather difficult). I have not attempted
+ to adapt this tool for the other flavours of LFS (TODO).
- To use package management, you need to create the required files in
- the pkgmngt directory (see below), and to select "package management" in
- the build settings. Note that this is incompatible with creating an SBU
- and usage report.
+ This tool comes in two flavours:
+ - for distros package managers (e.g dpkg or pacman), it basically performs
+ a "DESTDIR install" for all pages in chapter 6, 7 and 8 of the book. The
+ name of the DESTDIR directory is the same as the one of the executed
+ script. The path to this directory is available to the scriplets through
+ the PKG_DEST variable. The details of the DESTDIR part are given below.
+ After the package is installed in $PKG_DEST, a function "packInstall" is
+ called, which is supposed to create a binary package (e.g. make a .deb
+ file), store it to a repository and install it to the system.
+ - for porg style package manager, the install instructions are wrapped
+ between pairs of single quotes ('). This allows passing those instructions
+ to a function ("wrapInstall"), which may itself call porg or another
+ (e.g. fakeroot, not tested) instruction wrapper. Note that if the
+ instructions contain single quote charaters, they are changed to '\'',
+ which pass them literally. At the end of the installation, a function
+ "packInstall" is called, with a slighly different aim compared to the
+ DESTDIR one: it is used to make a tarball of the installed files (e.g.
+ using "porgball") and store them into some repository. But there is no
+ need to install them to the system, since this has already been done.
-3. DETAILS OF OPERATION:
+ Note that with carefully crafted "packInstall" and "wrapInstall"
+ functions, a combination of the two methods could be used, for example for
+ DESTDIR installs using fakeroot. This is work in progress and not fully
+ implemented yet.
+
+3. DETAILS:
- This system performs basically a "DESTDIR install" for all pages
- in chapter 6, 7 and 8 of the book. The name of the DESTDIR directory is the
- same as the one of the executed script. The path to this directory is
- made available to the scriplets through the PKG_DEST variable.
The XSL stylesheet used for generating the scriptlets, automatically
adds DESTDIR install instructions when "package management" is selected.
Also all the paths beginning with " /" or ">/" (absolute paths) are prepended
@@ -43,6 +60,7 @@ $Id$
creates a reasonable subset of the FHS hierarchy into the destination
directory. Empty directories are then removed before packing the
binary package.
+
In order to use the package manager, it has to be installed at the end of
chapter 5 (temporary installation in /tools) and chapter 6 (final install).
Furthermore, the administrative files and directories have to be created
@@ -51,20 +69,21 @@ $Id$
the necessary instructions and enough information to download the tarball.
This file should reside in the `pkgmngt' directory and be named
`packageManager.xml'. A template named `packageManager.xml.template' is
- provided in the `pkgmngt' subdirectory. There are also two XML files for
- dpkg and pacman, respectively `packageManager.xml.dpkg' and
- `packageManager.xml.pacman', that you can copy to `packageManager.xml'.
+ provided in the `pkgmngt' subdirectory. There are also three XML files for
+ dpkg, pacman, and porg, respectively `packageManager.xml.dpkg',
+ `packageManager.xml.pacman', and `packageManager.xml.porg', that you can
+ copy to `packageManager.xml' and modify to suit your needs.
They are not updated often, so the versions used can be rather old.
- The last thing to do is to tell how to use the package manager. When
- the binary package is ready, the scriptlets call a shell function named
- `packInstall', which should pack the binary package and install it on the
- system. Note that nothing has been done to manage configuration files,
+
+ The last thing to do is to tell how to use the package manager. The user
+ has to provide two functions, "wrapInstall" and "packInstall", as described
+ above. Please note that nothing has been done to manage configuration files,
which are ususally treated specially by package managers: depending on
the book layout, it is sometimes possible to create those files afterwards,
and sometimes not, which means that you have to check them after each
- upgrade. The user has to write his own `packInstall' function. The shell
- function should be defined in a file named `packInstall.sh', residing in
- the `pkgmngt' directory. A template is provided, as well as two example
- scripts for dpkg and pacman. Note that, due to the way pacman checks the
- available space on disk, the root directory in chroot must be a mount point,
- otherwise the installation of packages fails.
+ upgrade. Both functions should be defined in a file named `packInstall.sh',
+ residing in the `pkgmngt' directory. A template is provided (actually a copy
+ of the file for dpkg), as well as three example scripts for dpkg, pacman,
+ and porg. Pacman Note: due to the way pacman checks the available space on
+ disk, the root directory in chroot must be a mount point, otherwise the
+ installation of packages fails.
diff --git a/common/libs/func_book_parser b/common/libs/func_book_parser
index e0cbc32..e51621c 100644
--- a/common/libs/func_book_parser
+++ b/common/libs/func_book_parser
@@ -164,19 +164,29 @@ extract_commands() { #
fi
popd > /dev/null
- xsltproc --nonet \
- --xinclude \
- --stringparam revision $INITSYS \
- --stringparam testsuite $TEST \
- --stringparam bomb-testsuite $BOMB_TEST \
- --stringparam vim-lang $VIMLANG \
- --stringparam full-locale $FULL_LOCALE \
- --stringparam timezone $TIMEZONE \
- --stringparam page $PAGE \
- --stringparam lang $LANG \
- --stringparam pkgmngt $PKGMNGT \
- --output ./${PROGNAME}-commands/ \
- $XSL \
+ xsltproc --nonet \
+ --xinclude \
+ --stringparam revision $INITSYS \
+ --stringparam testsuite $TEST \
+ --stringparam bomb-testsuite $BOMB_TEST \
+ --stringparam vim-lang $VIMLANG \
+ --stringparam full-locale $FULL_LOCALE \
+ --stringparam timezone $TIMEZONE \
+ --stringparam page $PAGE \
+ --stringparam lang $LANG \
+ --stringparam pkgmngt $PKGMNGT \
+ --stringparam wrap-install $WRAP_INSTALL \
+ --stringparam hostname $HOSTNAME \
+ --stringparam interface $INTERFACE \
+ --stringparam ip $IP_ADDR \
+ --stringparam gateway $GATEWAY \
+ --stringparam prefix $PREFIX \
+ --stringparam broadcast $BROADCAST \
+ --stringparam domain $DOMAIN \
+ --stringparam nameserver1 $DNS1 \
+ --stringparam nameserver2 $DNS2 \
+ --output ./${PROGNAME}-commands/ \
+ $XSL \
$BOOK/index.xml >> $LOGDIR/$LOG 2>&1
;;
*) echo -n " ${L_arrow}${PROGNAME}${R_arrow} book invalid, terminate build... "
diff --git a/common/libs/func_install_blfs b/common/libs/func_install_blfs
index 13f2de2..caeeef1 100644
--- a/common/libs/func_install_blfs
+++ b/common/libs/func_install_blfs
@@ -12,6 +12,11 @@ cp -r BLFS/* ${BUILDDIR}${BLFS_ROOT}
cp -r menu ${BUILDDIR}${BLFS_ROOT}
cp $COMMON_DIR/progress_bar.sh ${BUILDDIR}${BLFS_ROOT}
cp README.BLFS ${BUILDDIR}${BLFS_ROOT}
+if [ "$WRAP_INSTALL" = y ]; then
+ sed -e 's/PKGDIR/UNPACKDIR/' \
+ -e 's/PKG_DEST/PKG_DIR/' \
+ $PKGMNGTDIR/packInstall.sh > ${BUILDDIR}${BLFS_ROOT}/packInstall.sh
+fi
# Clean-up
make -C ${BUILDDIR}${BLFS_ROOT}/menu clean
@@ -115,6 +120,7 @@ $LINE_SUDO
MAIL_SERVER=sendmail
optDependency=2
SUDO=n
+WRAP_INSTALL=$WRAP_INSTALL
EOF
# Generates the scripts for the blfs tools dependencies (in ./scripts)
diff --git a/common/libs/func_validate_configs.sh b/common/libs/func_validate_configs.sh
index ddb8b15..819758e 100644
--- a/common/libs/func_validate_configs.sh
+++ b/common/libs/func_validate_configs.sh
@@ -41,14 +41,17 @@ inline_doc
local -r CLFS3_book="$BOOK_common $BOOK_clfsX PLATFORM MIPS_LEVEL"
# Build Settings by book
- local -r LFS_build="$BUILD_chroot VIMLANG $BUILD_common PKGMNGT FULL_LOCALE"
+ local -r LFS_build="$BUILD_chroot VIMLANG $BUILD_common PKGMNGT FULL_LOCALE WRAP_INSTALL"
local -r HLFS_build="$BUILD_chroot $BUILD_common"
local -r CLFS_build="$BUILD_chroot VIMLANG $BUILD_common"
local -r CLFS2_build="STRIP VIMLANG $BUILD_common"
local -r CLFS3_build=" $BUILD_common"
+ # System Settings by book (only LFS for now)
+ local -r LFS_system="HOSTNAME INTERFACE IP_ADDR GATEWAY PREFIX BROADCAST DOMAIN DNS1 DNS2 FONT CONSOLE_MAP UNICODE KEYMAP"
+
# Full list of books settings
- local -r lfs_PARAM_LIST="$LFS_book $GENERAL_common $LFS_build $ADVANCED_chroot $ADVANCED_common"
+ local -r lfs_PARAM_LIST="$LFS_book $GENERAL_common $LFS_build $LFS_system $ADVANCED_chroot $ADVANCED_common"
local -r hlfs_PARAM_LIST="$HLFS_book $GENERAL_common $HLFS_build $ADVANCED_chroot $ADVANCED_common"
local -r clfs_PARAM_LIST="$CLFS_book $GENERAL_common $CLFS_build $ADVANCED_chroot $ADVANCED_common"
local -r clfs2_PARAM_LIST="$CLFS2_book $GENERAL_common $CLFS2_build $ADVANCED_common"
@@ -193,6 +196,11 @@ inline_doc
echo
;;
+ # Treatment of HOSTNAME
+ HOSTNAME) echo -e "`eval echo $PARAM_VALS`"
+ [[ "${!config_param}" = "**EDIT ME**" ]] && write_error_and_die
+ ;;
+
# Case of PKGMNGT: two files, packageManager.xml and packInstall.sh
# must exist in $PKGMNGTDIR if PKGMNGT='y':
PKGMNGT) echo -e "`eval echo $PARAM_VALS`"
diff --git a/common/makefile-functions b/common/makefile-functions
index f489b40..9e34161 100644
--- a/common/makefile-functions
+++ b/common/makefile-functions
@@ -115,6 +115,7 @@ define get_pkg_root2
echo "export PKG_DEST=$(SRC)/$@" >> envars; \
echo "source packInstall.sh" >> envars; \
echo "export -f packInstall" >> envars; \
+ echo "export -f wrapInstall" >> envars; \
fi;
endef
diff --git a/jhalfs b/jhalfs
index a50e842..4e0eaa0 100755
--- a/jhalfs
+++ b/jhalfs
@@ -124,6 +124,7 @@ COMPARE=${COMPARE:-n}
RUN_FARCE=${RUN_FARCE:-n}
RUN_ICA=${RUN_ICA:-n}
PKGMNGT=${PKGMNGT:-n}
+WRAP_INSTALL=${WRAP_INSTALL:-n}
BOMB_TEST=${BOMB_TEST:-n}
STRIP=${STRIP:=n}
REPORT=${REPORT:=n}
@@ -141,6 +142,7 @@ SET_HARDENED_TMP=${SET_HARDENED_TMP:=n}
SET_WARNINGS=${SET_WARNINGS:=n}
SET_MISC=${SET_MISC:=n}
SET_BLOWFISH=${SET_BLOWFISH:=n}
+UNICODE=${UNICODE:=n}
if [[ "${NO_PROGRESS_BAR}" = "y" ]] ; then
NO_PROGRESS="#"
diff --git a/pkgmngt/packInstall.sh.porg b/pkgmngt/packInstall.sh.porg
new file mode 100644
index 0000000..c77f99f
--- /dev/null
+++ b/pkgmngt/packInstall.sh.porg
@@ -0,0 +1,104 @@
+# $Id:$
+# functions for recording installation of a package and make a tarball,
+# or using fakeroot type commands for install, then packing and installing
+# the package.
+# We only have access to variables PKGDIR and PKG_DEST. Other variables could
+# be set in the environment
+
+extract_version() {
+local VERSION
+
+case $1 in
+ expect*|tcl*|tk*|mozjs*)
+ VERSION=$(echo $1 | sed 's/^[^0-9]*//')
+ ;;
+ vim*|unzip*|zip*)
+ VERSION=$(echo $1 | sed 's/^[^0-9]*\([0-9]\)\([0-9]\)/\1.\2/')
+ ;;
+ wireless_tools*|LVM2*)
+ VERSION=$(echo $1 | sed 's/^[^.]*\.//')
+ ;;
+ x264*)
+ VERSION=$(echo $1 | sed 's/.*shot-//')
+ ;;
+ icu*) # No version in PCKGVRS! Use version directly from xml book.
+ # PACK_INSTALL contains the path to this script, which is in the
+ # parent dir of the book.
+ local PACKENT=$(dirname $PACK_INSTALL)/blfs-xml/packages.ent
+ local VERSION1=$(sed -n 's/.*icu-major[^0-9]*\([^"]*\).*/\1/p' $PACKENT)
+ local VERSION2=$(sed -n 's/.*icu-minor[^0-9]*\([^"]*\).*/\1/p' $PACKENT)
+ VERSION=$VERSION1.$VERSION2
+ ;;
+ soundtouch*)
+ local PACKENT=$(dirname $PACK_INSTALL)/blfs-xml/packages.ent
+ VERSION=$(sed -n 's/.*soundtouch[^0-9]*\([^"]*\).*/\1/p' $PACKENT)
+ ;;
+ xf86-video-intel)
+ local PACKENT=$(dirname $PACK_INSTALL)/blfs-xml/x/installing/x7driver-intel.xml
+ VERSION=$(sed -n '/