From c2994416b30ad7eaef7e592c4c07e8cf8426b4b7 Mon Sep 17 00:00:00 2001 From: hugo Date: Mon, 1 Mar 2010 06:29:12 +0000 Subject: [PATCH] Regle la pluspart des problemes avec fpkg et wget --- functions-update | 8 +++++++- stage1/bootscripts/cleanfs | 6 ++++++ stage4/packages-update | 4 ++-- stage4/stage4-install | 37 ++++++++++++++++++++++++------------- 4 files changed, 39 insertions(+), 16 deletions(-) diff --git a/functions-update b/functions-update index 2f2359f..90ba606 100644 --- a/functions-update +++ b/functions-update @@ -227,6 +227,7 @@ static_getpkg() rm -f ${LFS_PKG_DIR}/${PACK}.${arch_ext} ${WGETCMD} ${URL}/${PACK}.${arch_ext} + wget_status=$? # Failure: if it was a connection timeout, don't try for other file extensions. if grep "failed: Connection timed out" ${WGET_LOG_FILE} 1> /dev/null 2>&1; then @@ -239,7 +240,12 @@ static_getpkg() continue; fi - # If we arrive here, it means we were able to download the file. + if [ ${wget_status} -ne 0 ]; then + echo "Error fetching package ${PACK}.${arch_ext}" + return 1 + fi + + # If we arrive here, it means we were able to successfully download the file. if [ "x${arch_ext}" = "xtar.gz" -o "x${arch_ext}" = "xtgz" -o "x${arch_ext}" = "xtar.Z" ]; then gztobz2 ${LFS_PKG_DIR}/${PACK}.${arch_ext} fi diff --git a/stage1/bootscripts/cleanfs b/stage1/bootscripts/cleanfs index 4be2a54..33168da 100755 --- a/stage1/bootscripts/cleanfs +++ b/stage1/bootscripts/cleanfs @@ -20,6 +20,12 @@ clean_files() cd /var/run && find . ! -type d ! -name utmp ! -newer /proc -exec rm -f {} \; || failed=1 + + if [ -d /home/named ]; then + cd /home/named/var/run && + find . ! -type d ! -name utmp ! -newer /proc -exec rm -f {} \; || failed=1 + fi + > /var/run/utmp if grep -q '^utmp:' /etc/group ; then chmod 664 /var/run/utmp diff --git a/stage4/packages-update b/stage4/packages-update index adb5fa5..8d0baec 100755 --- a/stage4/packages-update +++ b/stage4/packages-update @@ -86,9 +86,9 @@ fpkg ${HAL} "http://hal.freedesktop.org/releases" fpkg ${HAL_INFO} "http://hal.freedesktop.org/releases" fpkg_xorg ${XORG_SERVER} xserver -fpkg ${XDM} app +fpkg_xorg ${XDM} app -fpkg -e tgz ${XTERM} "ftp://invisible-island.net/xterm" +fpkg -e tgz ${XTERM} "http://ftp.osuosl.org/pub/blfs/svn/x/" fpkg ${T1LIB} "http://www.ibiblio.org/pub/Linux/libs/graphics" diff --git a/stage4/stage4-install b/stage4/stage4-install index b91aa61..fee1687 100755 --- a/stage4/stage4-install +++ b/stage4/stage4-install @@ -30,6 +30,21 @@ export XORG_CONFIG="\ LFS_PKG_DIR_ORIG=${LFS_PKG_DIR} +# Arg #1: module name and version +# Arg #2: subdirectory +# Arg #3: optional configure arguments +ipkg_xorg() +{ + local MODULE=${1} + local SUBDIR=${2} + shift 2 + local CONFIGURE_OPTS=${*} + + LFS_PKG_DIR=${LFS_PKG_DIR_ORIG}/${SUBDIR} + ipkg_ac ${MODULE} ${XORG_CONFIG} ${CONFIGURE_OPTS} + LFS_PKG_DIR=${LFS_PKG_DIR_ORIG} +} + # Install all submodules in a module # # Arg #1: module name and version @@ -44,8 +59,7 @@ install_xorg_modules() local MY_XORG_CONFIG - for package in $(grep -v '^#' ${LFS_PKG_DIR}/${MODULE}.wget); do - LFS_PKG_DIR=${LFS_PKG_DIR_ORIG}/${MODULE_NAME} + for package in $(grep -v '^#' ${LFS_PKG_DIR}/${MODULE_NAME}/${MODULE}.wget); do SUBMOD="$(echo ${package} | sed 's!\.tar\.bz2$!!')" # Special configure options for specific packages @@ -63,16 +77,14 @@ install_xorg_modules() #;; esac - ipkg_ac ${SUBMOD} ${XORG_CONFIG} ${MY_XORG_CONFIG} ${CONFIGURE_OPTS} + ipkg_xorg ${SUBMOD} ${MODULE_NAME} ${MY_XORG_CONFIG} ${CONFIGURE_OPTS} done - - LFS_PKG_DIR=${LFS_PKG_DIR_ORIG} } install_xorg_modules ${XORG_PROTO} install_xorg_modules ${XORG_UTIL} -ipkg_ac ${LIBXAU} ${XORG_CONFIG} -ipkg_ac ${LIBXDMCP} ${XORG_CONFIG} +ipkg_xorg ${LIBXAU} "lib" +ipkg_xorg ${LIBXDMCP} "lib" install_xorg_modules ${XORG_LIB} ipkg_cust ${LESSTIF} cis-lesstif \ --sysconfdir=/etc/X11 \ @@ -82,18 +94,17 @@ ipkg_cust ${LESSTIF} cis-lesstif \ --with-xdnd \ --x-includes=$XORG_PREFIX/include \ --x-libraries=$XORG_PREFIX/lib -ipkg_ac ${XBITMAPS} ${XORG_CONFIG} +ipkg_xorg ${XBITMAPS} "data" ipkg_ac ${LIBPTHREAD_STUBS} ipkg_ac ${LIBDRM} --enable-udev ipkg_cust ${MESALIB} cis-mesalib --enable-motif install_xorg_modules ${XORG_APP} -ipkg_ac ${XCURSOR_THEMES} ${XORG_CONFIG} +ipkg_xorg ${XCURSOR_THEMES} "data" install_xorg_modules ${XORG_FONT} rscr once "Configuring fonts" configure-fonts ipkg_ac ${XKEYBOARD_CONFIG} ${XORG_CONFIG} --with-xkb-rules-symlink=xorg -ipkg_ac ${LUIT} ${XORG_CONFIG} +ipkg_xorg ${LUIT} "app" ipkg_ac ${PIXMAN} - ipkg_ac ${LIBFFI} ipkg_cust ${DBUS} cis-dbus ipkg_cust ${GLIB} cis-glib --with-pcre=system @@ -112,7 +123,7 @@ ipkg_cust ${POLICYKIT} cis-policykit ipkg_cust ${HAL} cis-hal ipkg_ac ${HAL_INFO} -ipkg_ac ${XORG_SERVER} ${XORG_CONFIG} "\ +ipkg_xorg ${XORG_SERVER} "xserver" "\ --with-module-dir=${XORG_PREFIX}/lib/X11/modules \ --with-xkb-output=/var/lib/xkb \ --enable-install-setuid" @@ -121,7 +132,7 @@ ipkg_ac ${XORG_SERVER} ${XORG_CONFIG} "\ # To fix this problrem, comment out these drivers in both driver-7.5-2.md5 and driver-7.5-2.wget. install_xorg_modules ${XORG_DRIVER} --with-xorg-module-dir=${XORG_PREFIX}/lib/X11/modules -ipkg_ac ${XDM} ${XORG_CONFIG} +ipkg_xorg ${XDM} "app" rscr once "Configuring X.org" configure-xorg -- 2.20.1