]> Untitled Git - hvlinux.git/commitdiff
Stage2 semble compléter ok
authorgobo72 <gobo72@364a67c3-989e-7be9-548d-dae8560ea662>
Tue, 9 Nov 2010 06:45:46 +0000 (06:45 +0000)
committergobo72 <gobo72@364a67c3-989e-7be9-548d-dae8560ea662>
Tue, 9 Nov 2010 06:45:46 +0000 (06:45 +0000)
39 files changed:
functions
packages-list
stage0/packages-update
stage1/create-config-files
stage1/create-directories
stage1/create-groups
stage1/create-logfiles
stage1/create-symlinks
stage1/create-users
stage1/install-1
stage1/install-2
stage1/install-bootscripts
stage1/packages-update
stage1/post-install
stage1/pre-install
stage2/compressdoc
stage2/create-config-files
stage2/install-1
stage2/install-2
stage2/install-bootscripts
stage2/install-hv-utilities
stage2/packages-update
stage2/pkg/e2fsprogs
stage2/pkg/inetutils
stage2/pkg/iproute2
stage2/pkg/module-init-tools
stage2/pkg/perl
stage2/pkg/readline
stage2/pkg/shadow
stage2/pkg/sysklogd
stage2/pkg/udev
stage2/post-install
stage2/toolchain-adjust
stage2/toolchain-test
stage3/packages-update
stage4/packages-update
stage5/packages-update
stage6/packages-update
sysinfos

index 2ccd9658354d4bc8a4cb3cc949003d1c335d7e83..ecd34f04cf8b44403614c79ee52a94bb937f6ee0 100644 (file)
--- a/functions
+++ b/functions
@@ -962,6 +962,29 @@ rscr()
     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
@@ -982,10 +1005,21 @@ rcmd()
 
     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
@@ -998,6 +1032,8 @@ rcmd()
     # Displaying build time after the package name
     print_status success
 
+    rcmd_trap_end
+
     return $EXIT_SUCCESS
 }
 
index 6db4ef01169c6eb229810f774368f698106026cb..72281f4729064c31be283d63934f82923c82f07a 100644 (file)
@@ -194,7 +194,7 @@ GNUPG="gnupg-1.4.9"
 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"
@@ -297,7 +297,7 @@ MAKE_PACKAGE="make-3.82"
 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"
index 2345293960c53e6c977f1b70d901feffed98d100..a719bb451baac2bdaf2602668b99e5ad22f88c26 100755 (executable)
@@ -1,6 +1,5 @@
 #!/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
index 0bc590c3d3e5135560902d3f07a419a999682cf1..2c782fa262bcf0b2455111b1b63baa2c57a4fd53 100755 (executable)
@@ -1,5 +1,4 @@
 #!/bin/bash
-set -o errexit
 
 # Reading system configuration informations, functions and package versions.
 source ../sysinfos
index f73edad4d98d1ce8ccfe74391c371bcbb77b5149..d2b719b3ff9cd9e8c89bec6d7c5d63d8363f08fa 100755 (executable)
@@ -1,5 +1,4 @@
 #!/bin/bash
-set -o errexit
 
 # Reading system configuration informations, functions and package versions.
 source ../sysinfos
index 981daefa6dd4538bf561e14ee4cd71a85bbf3379..881ae53c3a71982fabbc05b5d4781545ecbd152d 100755 (executable)
@@ -1,5 +1,4 @@
 #!/bin/bash
-set -o errexit
 
 # Reading system configuration informations, functions and package versions.
 source ../sysinfos
index c0fb885f30080053dbbab8c1d78a6a3ead671e73..990c054a3cfcc399465f1b2e5f06c2737af60143 100755 (executable)
@@ -1,5 +1,4 @@
 #!/bin/bash
-set -o errexit
 
 # Reading system configuration informations, functions and package versions.
 source ../sysinfos
index bd44b95a190f4b85dbb11febf8f7ed1b285e9851..b61685ac6b578fc92ae3530e0b6784ed1c900753 100755 (executable)
@@ -1,5 +1,4 @@
 #!/bin/bash
-set -o errexit
 
 # Reading system configuration informations, functions and package versions.
 source ../sysinfos
index f4055749c73288ff14f610d36f2a970f89f65572..7529f45988703a705f81e4f357f027328ae447dc 100755 (executable)
@@ -1,5 +1,4 @@
 #!/bin/bash
-set -o errexit
 
 # Reading system configuration informations, functions and package versions.
 source ../sysinfos
index 50fbe554c23db7be911b7b026c2832e3d350a68a..a7bd5423b19184554e13d91d561924c852666149 100755 (executable)
@@ -1,5 +1,4 @@
 #!/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
index d2d11c7b91dff3c22e0cd98b083bd6416d0d65aa..a063fb42620b70ac5ecd8fd996af50483bee6e0c 100755 (executable)
@@ -1,5 +1,4 @@
 #!/bin/bash
-set -o errexit
 
 source ~/.bashrc
 
index 5c0def225f991f17132d96f74b92fa9a967213aa..8874b6332ec2fbde42eb4256e66b55ab0e260def 100755 (executable)
@@ -1,5 +1,4 @@
 #!/bin/bash
-set -o errexit
 
 # Reading system configuration informations, functions and package versions.
 source ../sysinfos
index 3fc5ac08fc63df8e407cf58b88d2c548212fdcee..7add36123121f11a6eef545da5eb88db6d84e4d7 100755 (executable)
@@ -1,6 +1,5 @@
 #!/bin/bash
 
-LFS_STAGE="stage1"
 USE_CLFS_PATCHES=1
 USE_HV_PATCHES=1
 
index 6f3fb4dada925485918d003a3d329ec1807d860d..72addc2d1a36edd798e711f75b89f18ae6c54f98 100755 (executable)
@@ -1,5 +1,4 @@
 #!/bin/bash
-set -o errexit
 
 # Reading system configuration informations, functions and package versions.
 source ../sysinfos
index 13815b4ea64d96310aa3a782bd6ec43c5ddb640e..b9e314ce57d981a0fc8a27fa056ea757351998d1 100755 (executable)
@@ -1,5 +1,4 @@
 #!/bin/bash
-set -o errexit
 
 # Reading system configuration informations, functions and package versions.
 source ../sysinfos
index 19ac7e54c8ae1cc541caa7acd5fceda2f095f0e2..c705f49049b6f8960f71383df43f272ff95c795b 100755 (executable)
@@ -1,5 +1,4 @@
 #!/bin/bash
-set -o errexit
 
 # First argument of this script is the package name.
 
index ab7428135ddef59b91db2a4fc6beac166fe149f0..686af786c55a7fc5adfa11bd03628cf77aca5919 100755 (executable)
@@ -1,5 +1,4 @@
 #!/bin/bash
-set -o errexit
 
 # Reading system configuration informations, functions and package versions.
 source ../sysinfos
index 61b542c618ef6d58c2be38c0ea0e48dc0cfbad82..dafcad6b60d8716de0f765d6fcc1192a11974be1 100755 (executable)
@@ -1,5 +1,4 @@
 #!/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
@@ -51,7 +50,7 @@ ipkg ${COREUTILS}
 ipkg -m noac ${IANA}
 ipkg ${MFOUR}
 ipkg ${BISON}
-ipkg ${PROCPS}
+ipkg -m noac ${PROCPS}
 ipkg ${LIBTOOL}
 ipkg ${FLEX}
 ipkg -m noac ${IPROUTE2}
index da231bb360d01a2382f0ccb3a87219b1b618d0c8..ec1c196206aeed962c114609c66f819b88c529c0 100755 (executable)
@@ -30,9 +30,9 @@ ipkg ${MAN_DB} "\
 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}
@@ -47,20 +47,13 @@ rscr once  "Installing bootscripts"  install-bootscripts
 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
index 50717e61c4ca12d3faee6f45710694c3d504ec3c..c1b60fbd52f09abd2d64b90fa68b2e9058443634 100755 (executable)
@@ -1,5 +1,4 @@
 #!/bin/bash
-set -o errexit
 
 # Reading system configuration informations, functions and package versions.
 source ../sysinfos
index 7fa350c6993d10d9c7000dcb03dae977a24c96a8..da17a9b9109db2fb704f53efda9f9f8de67b42a7 100755 (executable)
@@ -1,5 +1,4 @@
 #!/bin/bash
-set -o errexit
 
 # First argument of this script is the package name
 
index 5c1f58892a2bc0a06f17df33d1549757a03c21c5..fd191a2f20498010841009bacec556bd264aa6af 100755 (executable)
@@ -1,6 +1,5 @@
 #!/bin/bash
 
-LFS_STAGE="stage2"
 USE_LFS_PATCHES=1
 USE_BLFS_PATCHES=1
 USE_CLFS_PATCHES=1
index 4e6bc370557838cfa62b433d16c8d216943da495..1098c95e3afbb3149c990f47e2e912da3f1b2124 100644 (file)
@@ -6,7 +6,7 @@ hvconfig_pre()
 
     CONFIGURE_OPTS="\
         ${CONFIGURE_OPTS} \
-        --with-root-prefix="" \
+        --with-root-prefix=\"\" \
         --enable-elf-shlibs \
         --disable-libblkid \
         --disable-libuuid \
@@ -19,10 +19,17 @@ hvconfig_post()
     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
index 5d9b3f2d32e16a013bd3bbcb73ea1de7aba1d79d..82d277f450b54eeaf1b19c66275e81bb49f71a17 100644 (file)
@@ -3,6 +3,7 @@
 hvconfig_pre()
 {
     CONFIGURE_OPTS="\
+        ${CONFIGURE_OPTS} \
         --libexecdir=/usr/sbin \
         --localstatedir=/var \
         --disable-ifconfig \
index 990869c3891507ed0dde86b6cfd8798aebc42cce..461289b02fef42b1027f65a011bf20fa80c5dffc 100644 (file)
@@ -1,15 +1,27 @@
 #!/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
 }
index 08d6a2559553745ed3262637245c66d34dd52efd..a7d9c13978542e996af4dcb171561286e3b1c896 100644 (file)
@@ -11,7 +11,7 @@ hvconfig_pre()
 
 hvbuild()
 {
-    make -j ${MAKEJOBS}
+    make -j ${MAKEJOBS} DOCBOOKTOMAN=""
 
     # INSTALL=install
     # Normally, make install will not install the binaries if they already
index 79c19a85ee342a6563b1deaffc2df25fcafab560..69cf77725a7c52f895447cecbcd06d7772a82795 100644 (file)
@@ -4,8 +4,8 @@ hvconfig_pre()
 {
     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 \
@@ -14,18 +14,19 @@ hvconfig_pre()
         # 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
 }
 
index 03a69d0645b9ecc37e3d22c07527272aa6193a40..f3bd31723ec9590275e0928e59181e95a356d4e0 100644 (file)
@@ -3,7 +3,7 @@
 hvconfig_pre()
 {
     CONFIGURE_OPTS="\
-        ${CONFIGURE_OPTS} \    
+        ${CONFIGURE_OPTS} \
         --libdir=/lib"
     
     cd ${LFS_TMP}/${PACKAGE}
index 723f5e7cf518e51e75a5f83883f5a333bd3e196b..ec70165ed1d90373befffdf2ec17fb1cf1ca2a5f 100644 (file)
@@ -3,7 +3,7 @@
 hvconfig_pre()
 {
     CONFIGURE_OPTS="\
-        ${CONFIGURE_OPTS} \    
+        ${CONFIGURE_OPTS} \
         --without-selinux"
     
     cd ${LFS_TMP}/${PACKAGE}
@@ -17,7 +17,7 @@ hvconfig_pre()
     # 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:
index 2e8488161effd216c863691c76fd3ad2b03b4248..dcd22d9aa72b4332bb1a94ceb3fa0afb9dcba5ee 100644 (file)
@@ -1,5 +1,13 @@
 #!/bin/bash
 
+hvbuild()
+{
+    cd ${LFS_TMP}/${PACKAGE}
+
+    make
+    make BINDIR=/sbin install
+}
+
 hvbuild_post()
 {
     cat > /etc/syslog.conf << "EOF"
index ba93614af99d63e4285d1d2762565c8ba2799e55..92d6e672f7f6359ae35babc7c075b55fcac97d58 100644 (file)
@@ -1,29 +1,20 @@
 #!/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
 }
index 3e65624d7c02fe49d5702e4d11905c31c0445bfe..cee7e86cab8acf5023574070e37afb9710971df6 100755 (executable)
@@ -1,5 +1,4 @@
 #!/bin/bash
-set -o errexit
 
 # Reading system configuration informations, functions and package versions.
 source ../sysinfos
@@ -32,4 +31,6 @@ chown -v root:root /tmp
 chown -v root:root /var
 chown -v root:root /var/log
 
+ldconfig
+
 exit $?
index af99d6b49a71fb97ea5d28234f193b40ddde58e2..4b11cfcb025fcd2cf44315f8afcdc07ed9714832 100755 (executable)
@@ -1,5 +1,4 @@
 #!/bin/bash
-set -o errexit
 
 # Reading system configuration informations, functions and package versions.
 source ../sysinfos
index e169c69955f1e136fe28a5398a6518bbc63b2d8e..9881dc1af7c698ef7b2bfe6e51c4ab4d62510ab0 100755 (executable)
@@ -1,5 +1,4 @@
 #!/bin/bash
-set -o errexit
 
 # Reading system configuration informations, functions and package versions.
 source ../sysinfos
index b2c6ba37631b9fd15c46ce26cd75017ce0a89be1..1f1f272d3bbe635eb54bfee52fae35fb548d0338 100755 (executable)
@@ -1,6 +1,5 @@
 #!/bin/bash
 
-LFS_STAGE="stage3"
 USE_LFS_PATCHES=1
 USE_BLFS_PATCHES=1
 USE_HV_PATCHES=1
index 475957f3d7b8877225d092384434baa2a874036a..5d0f82afde570ff2fd65b22ac78bccd54527e4f4 100755 (executable)
@@ -1,6 +1,5 @@
 #!/bin/bash
 
-LFS_STAGE="stage4"
 USE_LFS_PATCHES=1
 USE_BLFS_PATCHES=1
 USE_HV_PATCHES=1
index b6199d534840d327db14d34b5ed22eeb76f50e7c..247ef963034101e74a3bce914b1dfe407990ee06 100755 (executable)
@@ -1,6 +1,5 @@
-#!/bin/sh
+#!/bin/bash
 
-LFS_STAGE="stage5"
 USE_LFS_PATCHES=1
 USE_BLFS_PATCHES=1
 USE_HV_PATCHES=1
index ed159125eadb5ee268796adfd941c4ccc61cb4a9..3213409fe7cfa8a53d84e182722c41485435de8a 100644 (file)
@@ -1,17 +1,13 @@
-#!/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}
@@ -98,5 +94,4 @@ fpkg       ${ABIWORD} "http://www.abisource.com/downloads/abiword/$(get_pkg_ver
 fpkg_gnome ${EVOLUTION_EXCHANGE}
 fpkg_gnome ${EVOLUTION}
 
-# Return last error
 exit $?
index 7cd21be90b41d57e0bc95ae4176069f4f337ed0b..1b6c06a60e4103c03b2b3b8cc72a16041315bcb4 100644 (file)
--- a/sysinfos
+++ b/sysinfos
@@ -16,6 +16,7 @@ REGUSER="hugo"
 
 # 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