return $EXIT_SUCCESS
}
+rcmd_trap_setup()
+{
+ exec 6>&1 # Save current "value" of stdout.
+ trap rcmd_trap_handler INT TERM EXIT ERR
+}
+
+rcmd_trap_end()
+{
+ trap - INT TERM EXIT ERR
+
+ # Restore global trap
+ #####hvtrap_setup
+}
+
+rcmd_trap_handler()
+{
+ exec 1>&6 6>&- # Restore stdout and close file descriptor #6.
+ print_status failure
+
+ ###rcmd_trap_end
+ ###exit 1
+}
+
# Run command, no log
# First argument: Message to display during script
# Second argument: command + arguments
display_checkbox_msg ${MSGSTRING}
+ rcmd_trap_setup
+
echo ${CMD_WITH_ARGS} 1>> ${LFS_LOG_FILE}
+ if [ -n "${RCMD_NO_EXIT}" ]; then
+ set +e
+ fi
+
# Executing command
${CMD_WITH_ARGS} 1>> ${LFS_LOG_FILE} 2>&1
+
+ if [ -n "${RCMD_NO_EXIT}" ]; then
+ set -e
+ fi
+
if [ $? -ne 0 ]; then
print_status failure
if [ -n "${RCMD_NO_EXIT}" ]; then
# Displaying build time after the package name
print_status success
+ rcmd_trap_end
+
return $EXIT_SUCCESS
}
GREP="grep-2.6.3"
GRIP="grip-3.3.1"
GROFF="groff-1.20.1"
-GRUB="grub-0.97"
+GRUB="grub-1.98"
GSL="gsl-1.13"
GSTREAMER="gstreamer-0.10.20"
GST_PLUGINS_BASE="gst-plugins-base-0.10.20"
MAN_DB="man-db-2.5.6"
MANPAGES="man-pages-3.30"
METACITY="metacity-2.18.5"
-MFOUR="m4-1.4.14"
+MFOUR="m4-1.4.15"
MILTER_GREYLIST="milter-greylist-4.0"
MILTER_SPF="smf-spf-2.0.1"
MODULE_INIT_TOOLS="module-init-tools-3.12"
#!/bin/bash
-LFS_STAGE="stage0"
# We don't use LFS or BLFS patches because we want to carefully
# select which patch get applied
USE_CLFS_PATCHES=1
#!/bin/bash
-set -o errexit
# Reading system configuration informations, functions and package versions.
source ../sysinfos
#!/bin/bash
-set -o errexit
# Reading system configuration informations, functions and package versions.
source ../sysinfos
#!/bin/bash
-set -o errexit
# Reading system configuration informations, functions and package versions.
source ../sysinfos
#!/bin/bash
-set -o errexit
# Reading system configuration informations, functions and package versions.
source ../sysinfos
#!/bin/bash
-set -o errexit
# Reading system configuration informations, functions and package versions.
source ../sysinfos
#!/bin/bash
-set -o errexit
# Reading system configuration informations, functions and package versions.
source ../sysinfos
#!/bin/bash
-set -o errtrace # Let shell functions inherit ERR trap. Same as `set -E'.
# Reading system configuration informations, functions and package versions.
source ../sysinfos
#!/bin/bash
-set -o errexit
source ~/.bashrc
#!/bin/bash
-set -o errexit
# Reading system configuration informations, functions and package versions.
source ../sysinfos
#!/bin/bash
-LFS_STAGE="stage1"
USE_CLFS_PATCHES=1
USE_HV_PATCHES=1
#!/bin/bash
-set -o errexit
# Reading system configuration informations, functions and package versions.
source ../sysinfos
#!/bin/bash
-set -o errexit
# Reading system configuration informations, functions and package versions.
source ../sysinfos
#!/bin/bash
-set -o errexit
# First argument of this script is the package name.
#!/bin/bash
-set -o errexit
# Reading system configuration informations, functions and package versions.
source ../sysinfos
#!/bin/bash
-set -o errtrace # Let shell functions inherit ERR trap. Same as `set -E'.
# Reading system configuration informations, functions and package versions.
source ../sysinfos
ipkg -m noac ${IANA}
ipkg ${MFOUR}
ipkg ${BISON}
-ipkg ${PROCPS}
+ipkg -m noac ${PROCPS}
ipkg ${LIBTOOL}
ipkg ${FLEX}
ipkg -m noac ${IPROUTE2}
ipkg ${MODULE_INIT_TOOLS}
ipkg ${PATCH_PACKAGE}
ipkg ${PSMISC}
-ipkg -m noac ${SHADOW}
-ipkg ${SYSKLOGD}
-ipkg ${SYSVINIT}
+ipkg ${SHADOW}
+ipkg -m noac ${SYSKLOGD}
+ipkg -m noac ${SYSVINIT}
ipkg ${TAR_PACKAGE} "--bindir=/bin --libexecdir=/usr/sbin"
ipkg ${TEXINFO}
ipkg ${UDEV}
echo "Total build time: $(get_total_build_time ${LFS_LOG_FILE})h"
# Creating root password
-passwd root || exit 1
+passwd root
rscr mult "Performing post-install" post-install
ldconfig
-lasterror=$?
-
-if [ ${lasterror} -eq 0 ]; then
- echo "Stage2 successfully completed."
- echo "You must now compile a new kernel (go to /usr/src/linux)."
- echo "After that, you can reboot and try your new system."
-else
- echo "Error in script 'install-2'"
- exit ${lasterror}
-fi
+echo "Stage2 successfully completed."
+echo "You must now compile a new kernel (go to /usr/src/linux)."
+echo "After that, you can reboot and try your new system."
exec /bin/bash --login
#!/bin/bash
-set -o errexit
# Reading system configuration informations, functions and package versions.
source ../sysinfos
#!/bin/bash
-set -o errexit
# First argument of this script is the package name
#!/bin/bash
-LFS_STAGE="stage2"
USE_LFS_PATCHES=1
USE_BLFS_PATCHES=1
USE_CLFS_PATCHES=1
CONFIGURE_OPTS="\
${CONFIGURE_OPTS} \
- --with-root-prefix="" \
+ --with-root-prefix=\"\" \
--enable-elf-shlibs \
--disable-libblkid \
--disable-libuuid \
unset PKG_CONFIG
}
+hvbuild()
+{
+ ${HVMAKE} LIBUUID="-luuid" STATIC_LIBUUID="-luuid" \
+ LIBBLKID="-lblkid" STATIC_LIBBLKID="-lblkid"
+ ${HVMAKE} install
+}
+
hvbuild_post()
{
# Install the static libraries and headers:
- make install-libs
+ ${HVMAKE} install-libs
# Make the installed static libraries writable so debugging symbols can be removed later:
chmod -v u+w /usr/lib/{libcom_err,libe2p,libext2fs,libss}.a
hvconfig_pre()
{
CONFIGURE_OPTS="\
+ ${CONFIGURE_OPTS} \
--libexecdir=/usr/sbin \
--localstatedir=/var \
--disable-ifconfig \
#!/bin/bash
-hvbuild()
+hvconfig_pre()
{
# The arpd binary included in this package is dependent on Berkeley DB.
# Because arpd is not a very common requirement on a base Linux system,
# remove the dependency on Berkeley DB by applying the sed command below
sed -i '/^TARGETS/s@arpd@@g' ${LFS_TMP}/${PACKAGE}/misc/Makefile
+}
- make DESTDIR= DOCDIR=/usr/share/doc/iproute2 \
- MANDIR=/usr/share/man
+hvbuild()
+{
+ cd ${LFS_TMP}/${PACKAGE}
+
+ make DESTDIR=
+ make DESTDIR= SBINDIR=/sbin DOCDIR=/usr/share/doc/iproute2 MANDIR=/usr/share/man install
+}
+
+hvbuild_post()
+{
+ unset DESTDIR
+ unset SBINDIR
+ unset DOCDIR
+ unset MANDIR
- make DESTDIR= DOCDIR=/usr/share/doc/iproute2 \
- MANDIR=/usr/share/man install
+ cd bozo
}
hvbuild()
{
- make -j ${MAKEJOBS}
+ make -j ${MAKEJOBS} DOCBOOKTOMAN=""
# INSTALL=install
# Normally, make install will not install the binaries if they already
{
if [ "x${HVLABEL}" = "x${PERL}-pass1" ]; then
# Change a hardcoded path from /usr/include to /tools/include:
- sed -i 's@/usr/include@/tools/include@g' \
- ${LFS_TMP}/${PACKAGE}/ext/Errno/Errno_pm.PL
+ sed 's@/usr/include@/tools/include@g' \
+ -i ${LFS_TMP}/${PACKAGE}/ext/Errno/Errno_pm.PL
CONFIGURE_OPTS="\
--prefix=/tools \
# By default, Perl's Compress::Raw::Zlib module builds and links against
# its own internal copy of Zlib. The following command will tell it to
# use the system-installed Zlib:
- sed -i -e '/^BUILD_ZLIB/s/True/False/' \
+ sed -e '/^BUILD_ZLIB/s/True/False/' \
-e '/^INCLUDE/s,\./zlib-src,/usr/include,' \
-e '/^LIB/s,\./zlib-src,/usr/lib,' \
- ${LFS_TMP}/${PACKAGE}/cpan/Compress-Raw-Zlib/config.in
+ -i ${LFS_TMP}/${PACKAGE}/cpan/Compress-Raw-Zlib/config.in
CONFIGURE_OPTS="\
--prefix=/usr \
-Dvendorprefix=/usr \
-Dman1dir=/usr/share/man/man1 \
-Dman3dir=/usr/share/man/man3 \
- -Dpager=\"/bin/less -isR\" \
- -Dusethreads -Duseshrplib"
+ -Dpager='/bin/less -isR' \
+ -Dusethreads \
+ -Duseshrplib"
fi
}
hvconfig_pre()
{
CONFIGURE_OPTS="\
- ${CONFIGURE_OPTS} \
+ ${CONFIGURE_OPTS} \
--libdir=/lib"
cd ${LFS_TMP}/${PACKAGE}
hvconfig_pre()
{
CONFIGURE_OPTS="\
- ${CONFIGURE_OPTS} \
+ ${CONFIGURE_OPTS} \
--without-selinux"
cd ${LFS_TMP}/${PACKAGE}
# cannot format them properly:
sed -i -e 's/ ko//' -e 's/ zh_CN zh_TW//' man/Makefile.in
- # Instead of using the default crypt method, use the more secure MD5 method
+ # Instead of using the default crypt method, use the more secure MD5 method
# of password encryption, which also allows passwords longer than 8 characters.
# It is also necessary to change the obsolete /var/spool/mail location for user
# mailboxes that Shadow uses by default to the /var/mail location used currently:
#!/bin/bash
+hvbuild()
+{
+ cd ${LFS_TMP}/${PACKAGE}
+
+ make
+ make BINDIR=/sbin install
+}
+
hvbuild_post()
{
cat > /etc/syslog.conf << "EOF"
#!/bin/bash
-CONFIGURE_OPTS="\
- --sbindir=/sbin \
- --with-rootlibdir=/lib \
- --libexecdir=/lib/udev \
- --docdir=/usr/share/doc/${PACKAGE} \
- --disable-extras \
- --disable-introspection \
- ${CONFIGURE_OPTS}"
+hvconfig_pre()
+{
+ CONFIGURE_OPTS="\
+ ${CONFIGURE_OPTS} \
+ --sbindir=/sbin \
+ --with-rootlibdir=/lib \
+ --libexecdir=/lib/udev \
+ --docdir=/usr/share/doc/${PACKAGE} \
+ --disable-extras \
+ --disable-introspection"
+}
hvbuild_post()
{
- # Udev has to be configured in order to work properly, as its default
- # configuration does not cover all devices. First install two extra
- # rules files from Udev to help support device-mapper and RAID setups:
- install -m644 -v rules/packages/64-*.rules \
- /lib/udev/rules.d/
-
- # Now install a file to create symlinks for certain hand-held devices:
- install -m644 -v rules/packages/40-pilot-links.rules \
- /lib/udev/rules.d/
-
- # Now install a file to handle ISDN devices:
- install -m644 -v rules/packages/40-isdn.rules \
- /lib/udev/rules.d/
+ cd ${LFS_TMP}/${PACKAGE}
install -m755 ${SCRDIR}/misc/udev-create-persistent-net.sh /usr/local/bin
}
#!/bin/bash
-set -o errexit
# Reading system configuration informations, functions and package versions.
source ../sysinfos
chown -v root:root /var
chown -v root:root /var/log
+ldconfig
+
exit $?
#!/bin/bash
-set -o errexit
# Reading system configuration informations, functions and package versions.
source ../sysinfos
#!/bin/bash
-set -o errexit
# Reading system configuration informations, functions and package versions.
source ../sysinfos
#!/bin/bash
-LFS_STAGE="stage3"
USE_LFS_PATCHES=1
USE_BLFS_PATCHES=1
USE_HV_PATCHES=1
#!/bin/bash
-LFS_STAGE="stage4"
USE_LFS_PATCHES=1
USE_BLFS_PATCHES=1
USE_HV_PATCHES=1
-#!/bin/sh
+#!/bin/bash
-LFS_STAGE="stage5"
USE_LFS_PATCHES=1
USE_BLFS_PATCHES=1
USE_HV_PATCHES=1
-#!/bin/sh
-
-# Must be defined before sourcing other files.
-LFS_STAGE="stage4"
+#!/bin/bash
# Reading system configuration informations, functions and package versions.
+source ../sysinfos
source ../functions
source ../functions-update
source ../packages-list
update_packages_init
-# Begin
-
# Gnome 2 core packages
fpkg_gnome ${ORBIT2}
fpkg_gnome ${LIBBONOBO}
fpkg_gnome ${EVOLUTION_EXCHANGE}
fpkg_gnome ${EVOLUTION}
-# Return last error
exit $?
# Destination path where to install new Linux-HV system. This is usually where
# you have mounted your new LFS partition, but it can also be any directory.
+# This is relevant only for stage 0 and 1.
LFS="/mnt/hvlinux"
# Destination partition where to install new Linux-HV system