From d82b9352f09d4cd1b23121ba7e1c52115cf1dfa0 Mon Sep 17 00:00:00 2001 From: Manuel Canales Esparcia Date: Sun, 30 Jul 2006 16:36:54 +0000 Subject: [PATCH] Fixed the paco patch update. --- README.PACO | 25 ++- contrib/jhalfs-paco.patch | 384 ++++++++------------------------------ 2 files changed, 92 insertions(+), 317 deletions(-) diff --git a/README.PACO b/README.PACO index e515ddf..e537fa8 100644 --- a/README.PACO +++ b/README.PACO @@ -24,12 +24,7 @@ At the moment only the LFS and HLFS-glibc parts are supported. 3. Run the wanted script. (Only ./lfs or ./hlfs --model glibc if you want to use paco) -4. Download the paco source package to the $BUILDDIR/sources dir. - paco-1.10.10 or later is recommended. - If using a newer paco version, remember to update also the - PACO_VERSION variable. - -5. Run make. +4. Run make. ##### PREREQUISITES ##### @@ -42,6 +37,9 @@ http://www.linuxfromscratch.org/lfs and start from there. ##### NOTES ##### +Paco-1.10.10 is currently recommended. +Remember to update the common/config file is using a newer version. + Patch author: Tor Olav Stava (torstava@broadpark.no) Any comments directly regarding the patch should be directed to the author or the ALFS mailing list. The patch author is not a member of the ALFS team, @@ -67,3 +65,18 @@ http://www.linuxfromscratch.org/mail.html paco Mailing List: http://lists.sourceforge.net/lists/listinfo/paco-general + + +##### TODO ##### + +- Support for HLFS-uClibc +- Support for CLFS +- Support for BLFS (when it's ready) +- Spread the Word + + +##### HISTORY ##### + +2006-07-30 +- Automatical download of Paco source package +- Updated patch to support new HLFS layout diff --git a/contrib/jhalfs-paco.patch b/contrib/jhalfs-paco.patch index 9f72135..5c93eb4 100644 --- a/contrib/jhalfs-paco.patch +++ b/contrib/jhalfs-paco.patch @@ -1,6 +1,6 @@ Index: LFS/master.sh =================================================================== ---- LFS/master.sh (revision 2862) +--- LFS/master.sh (revision 2857) +++ LFS/master.sh (working copy) @@ -173,6 +173,11 @@ # Keep the script file name @@ -82,7 +82,7 @@ Index: LFS/master.sh Index: LFS/lfs.xsl =================================================================== ---- LFS/lfs.xsl (revision 2862) +--- LFS/lfs.xsl (revision 2857) +++ LFS/lfs.xsl (working copy) @@ -32,6 +32,9 @@ @@ -147,9 +147,9 @@ Index: common/paco-build-hlfs.sh +make logme Index: common/config =================================================================== ---- common/config (revision 2862) +--- common/config (revision 2857) +++ common/config (working copy) -@@ -86,6 +86,14 @@ +@@ -86,6 +86,23 @@ #--- Run farce testing 0(no)/1(yes) RUN_FARCE=0 @@ -159,12 +159,21 @@ Index: common/config +PACO_VERSION=1.10.10 + +#--- Name of the Paco source package -+PACO_FILE=paco-$PACO_VERSION.tar.* ++PACO_FILE=paco-$PACO_VERSION.tar.bz2 # (use .tar.gz if preferred) ++ ++#--- Sourceforge mirror to use for Paco source download ++# Europe: heanet, belnet, puzzle, surfnet, switch, kent ++# North America: superb-east, superb-west, umn, easynews ++# South America: ufpr ++# Asia: nchc, jaist ++# Australia: optusnet ++PACO_MIRROR1=heanet ++PACO_MIRROR2=kent + #==== INTERNAL VARIABLES ==== # Don't edit it unless you know what you are doing -@@ -103,3 +111,9 @@ +@@ -103,3 +120,9 @@ #--- farce report log directory FARCELOGDIR=$LOGDIR/farce @@ -176,7 +185,7 @@ Index: common/config +LD_PRELOAD=/usr/lib/libpaco-log.so Index: common/func_validate_configs.sh =================================================================== ---- common/func_validate_configs.sh (revision 2862) +--- common/func_validate_configs.sh (revision 2856) +++ common/func_validate_configs.sh (working copy) @@ -84,9 +84,9 @@ inline_doc @@ -203,7 +212,7 @@ Index: common/paco-functions =================================================================== --- common/paco-functions (revision 0) +++ common/paco-functions (revision 0) -@@ -0,0 +1,209 @@ +@@ -0,0 +1,251 @@ +#!/bin/bash + +#----------------------------# @@ -413,6 +422,48 @@ Index: common/paco-functions + *) LOG_PACKAGE=1 ;; +esac +} ++ ++#----------------------------------# ++get_paco_src() { # ++#----------------------------------# ++# Download the paco sources ++# We don't do any MD5SUM checking as of yet ++# http://jaist.dl.sourceforge.net/sourceforge/paco/paco-1.10.10.tar.bz2 ++ ++local PACO_URL1="http://$PACO_MIRROR1.dl.sourceforge.net/sourceforge/paco/$PACO_FILE" ++local PACO_URL2="http://$PACO_MIRROR2.dl.sourceforge.net/sourceforge/paco/$PACO_FILE" ++ ++# Test if paco is to be used ++[ ! "$USE_PACO" = "1" ] && return ++ ++# If the file exists in the archive copy it to the $BUILDDIR/sources dir. ++if [ ! -z ${SRC_ARCHIVE} ] && ++ [ -d ${SRC_ARCHIVE} ] && ++ [ -f ${SRC_ARCHIVE}/$PACO_FILE ]; then ++ cp ${SRC_ARCHIVE}/$PACO_FILE . ++ echo "$PACO_FILE: -- copied from $SRC_ARCHIVE" ++ fromARCHIVE=1 ++else ++ echo "${BOLD}${YELLOW}$PACO_FILE: not found in ${SRC_ARCHIVE}${OFF}" ++ fromARCHIVE=0 ++ # If the file does not exist yet in /sources download a fresh one ++ if [ ! -f $PACO_FILE ] ; then ++ if ! wget $PACO_URL1 && ! wget $PACO_URL2 ; then ++ gs_wrt_message "$PACO_FILE not found in the SRC_ARCHIVE or on any server..SKIPPING" ++ continue ++ fi ++ fi ++fi ++ ++# Copy the freshly downloaded file to the source archive. ++if [ ! -z ${SRC_ARCHIVE} ] && ++ [ -d ${SRC_ARCHIVE} ] && ++ [ -w ${SRC_ARCHIVE} ] && ++ [ "$fromARCHIVE" = "0" ] ; then ++ echo "Storing file:<$PACO_FILE> in the package archive" ++ cp -f $PACO_FILE ${SRC_ARCHIVE} ++fi ++} Index: common/paco-build-lfs.sh =================================================================== --- common/paco-build-lfs.sh (revision 0) @@ -430,7 +481,7 @@ Index: common/paco-build-lfs.sh +make logme Index: common/common-functions =================================================================== ---- common/common-functions (revision 2862) +--- common/common-functions (revision 2857) +++ common/common-functions (working copy) @@ -69,6 +69,9 @@ in the configuration file has the proper packages and patches for the @@ -458,9 +509,19 @@ Index: common/common-functions -o ./${PROGNAME}-commands/ $XSL $BOOK/index.xml >>$LOGDIR/$LOG 2>&1 ;; *) exit 1 ;; +@@ -810,6 +815,9 @@ + # Generate URLs file + create_urls + ++ # If Paco is to be used, then download the sources ++ get_paco_src ++ + IFS=$'\x0A' # Modify the 'internal field separator' to break on 'LF' only + for line in `cat urls.lst`; do + IFS=$saveIFS # Restore the system defaults Index: HLFS/hlfs.xsl =================================================================== ---- HLFS/hlfs.xsl (revision 2862) +--- HLFS/hlfs.xsl (revision 2861) +++ HLFS/hlfs.xsl (working copy) @@ -39,6 +39,9 @@ @@ -513,7 +574,7 @@ Index: HLFS/hlfs.xsl Index: HLFS/master.sh =================================================================== ---- HLFS/master.sh (revision 2862) +--- HLFS/master.sh (revision 2857) +++ HLFS/master.sh (working copy) @@ -76,7 +76,9 @@ @echo "export PKGDIR=\$(SRC)" > envars @@ -603,308 +664,9 @@ Index: HLFS/master.sh ;; esac -Index: contrib/jhalfs-paco.patch -=================================================================== ---- contrib/jhalfs-paco.patch (revision 2862) -+++ contrib/jhalfs-paco.patch (working copy) -@@ -1,8 +1,8 @@ - Index: LFS/master.sh - =================================================================== ----- LFS/master.sh (revision 2829) -+--- LFS/master.sh (revision 2861) - +++ LFS/master.sh (working copy) --@@ -176,6 +176,11 @@ -+@@ -173,6 +173,11 @@ - # Keep the script file name - this_script=`basename $file` - -@@ -14,7 +14,7 @@ - # We'll run the chroot commands differently than the others, so skip them in the - # dependencies and target creation. - case "${this_script}" in --@@ -183,6 +188,18 @@ -+@@ -180,6 +185,18 @@ - *stripping*) [[ "${STRIP}" = "0" ]] && continue ;; - esac - -@@ -33,7 +33,7 @@ - # Grab the name of the target - name=`echo ${this_script} | sed -e 's@[0-9]\{3\}-@@'` - --@@ -235,7 +252,9 @@ -+@@ -232,7 +249,9 @@ - # and not to use chroot. - case "${this_script}" in - *kernfs) wrt_run_as_root "${this_script}" "$file" ;; -@@ -44,7 +44,7 @@ - esac - - # Remove the build directory(ies) except if the package build fails. --@@ -255,6 +274,16 @@ -+@@ -252,6 +271,16 @@ - PREV=${this_script}${N} - # Set system_build envar for iteration targets - system_build=$chapter6 -@@ -61,7 +61,7 @@ - done # end for file in chapter06/* - } - --@@ -315,8 +344,18 @@ -+@@ -312,8 +341,18 @@ - else - wrt_run_as_chroot2 "$this_script" "$file" - fi -@@ -82,7 +82,7 @@ - - Index: LFS/lfs.xsl - =================================================================== ----- LFS/lfs.xsl (revision 2829) -+--- LFS/lfs.xsl (revision 2861) - +++ LFS/lfs.xsl (working copy) - @@ -32,6 +32,9 @@ - -@@ -94,7 +94,7 @@ - - - --@@ -200,6 +203,33 @@ -+@@ -206,6 +209,33 @@ - - || true - -@@ -147,7 +147,7 @@ - +make logme - Index: common/config - =================================================================== ----- common/config (revision 2829) -+--- common/config (revision 2861) - +++ common/config (working copy) - @@ -86,6 +86,14 @@ - #--- Run farce testing 0(no)/1(yes) -@@ -156,7 +156,7 @@ - +#==== PACO VARIABLES ==== - +#--- Use paco? 0(no)/1(yes) - +USE_PACO=1 --+PACO_VERSION=1.10.8 -++PACO_VERSION=1.10.10 - + - +#--- Name of the Paco source package - +PACO_FILE=paco-$PACO_VERSION.tar.* -@@ -176,22 +176,24 @@ - +LD_PRELOAD=/usr/lib/libpaco-log.so - Index: common/func_validate_configs.sh - =================================================================== ----- common/func_validate_configs.sh (revision 2829) -+--- common/func_validate_configs.sh (revision 2861) - +++ common/func_validate_configs.sh (working copy) --@@ -84,9 +84,9 @@ -+@@ -86,10 +86,10 @@ - inline_doc - - # First internal variables, then the ones that change the book's flavour, and lastly system configuration variables --- local -r hlfs_PARAM_LIST="BOOK BUILDDIR SRC_ARCHIVE GETPKG RUNMAKE MODEL GRSECURITY_HOST TEST OPTIMIZE REPORT COMPARE RUN_ICA RUN_FARCE ITERATIONS STRIP FSTAB CONFIG GETKERNEL KEYMAP PAGE TIMEZONE LANG LC_ALL" --- local -r clfs_PARAM_LIST="BOOK BUILDDIR SRC_ARCHIVE GETPKG RUNMAKE METHOD ARCH TARGET TEST OPTIMIZE REPORT COMPARE RUN_ICA RUN_FARCE ITERATIONS STRIP FSTAB BOOT_CONFIG CONFIG GETKERNEL KEYMAP VIMLANG PAGE TIMEZONE LANG" --- local -r lfs_PARAM_LIST="BOOK BUILDDIR SRC_ARCHIVE GETPKG RUNMAKE TEST OPTIMIZE REPORT COMPARE RUN_ICA RUN_FARCE ITERATIONS STRIP FSTAB CONFIG GETKERNEL VIMLANG PAGE TIMEZONE LANG" --+ local -r hlfs_PARAM_LIST="BOOK BUILDDIR SRC_ARCHIVE USE_PACO GETPKG RUNMAKE MODEL GRSECURITY_HOST TEST OPTIMIZE REPORT COMPARE RUN_ICA RUN_FARCE ITERATIONS STRIP FSTAB CONFIG GETKERNEL KEYMAP PAGE TIMEZONE LANG LC_ALL" --+ local -r clfs_PARAM_LIST="BOOK BUILDDIR SRC_ARCHIVE USE_PACO GETPKG RUNMAKE METHOD ARCH TARGET TEST OPTIMIZE REPORT COMPARE RUN_ICA RUN_FARCE ITERATIONS STRIP FSTAB BOOT_CONFIG CONFIG GETKERNEL KEYMAP VIMLANG PAGE TIMEZONE LANG" --+ local -r lfs_PARAM_LIST="BOOK BUILDDIR SRC_ARCHIVE USE_PACO GETPKG RUNMAKE TEST OPTIMIZE REPORT COMPARE RUN_ICA RUN_FARCE ITERATIONS STRIP FSTAB CONFIG GETKERNEL VIMLANG PAGE TIMEZONE LANG" -+- local -r hlfs_PARAM_LIST="BOOK BUILDDIR SRC_ARCHIVE GETPKG RUNMAKE MODEL GRSECURITY_HOST TEST OPTIMIZE REPORT COMPARE RUN_ICA RUN_FARCE ITERATIONS STRIP FSTAB CONFIG GETKERNEL KEYMAP PAGE TIMEZONE LANG LC_ALL" -+- local -r clfs_PARAM_LIST="BOOK BUILDDIR SRC_ARCHIVE GETPKG RUNMAKE METHOD ARCH TARGET TEST OPTIMIZE REPORT COMPARE RUN_ICA RUN_FARCE ITERATIONS STRIP FSTAB BOOT_CONFIG CONFIG GETKERNEL KEYMAP VIMLANG PAGE TIMEZONE LANG" -+- local -r clfs2_PARAM_LIST="BOOK BUILDDIR SRC_ARCHIVE GETPKG RUNMAKE ARCH TARGET OPTIMIZE REPORT COMPARE RUN_ICA RUN_FARCE ITERATIONS STRIP FSTAB CONFIG GETKERNEL KEYMAP VIMLANG PAGE TIMEZONE LANG" -+- local -r lfs_PARAM_LIST="BOOK BUILDDIR SRC_ARCHIVE GETPKG RUNMAKE TEST OPTIMIZE REPORT COMPARE RUN_ICA RUN_FARCE ITERATIONS STRIP FSTAB CONFIG GETKERNEL VIMLANG PAGE TIMEZONE LANG" -++ local -r hlfs_PARAM_LIST="BOOK BUILDDIR SRC_ARCHIVE USE_PACO GETPKG RUNMAKE MODEL GRSECURITY_HOST TEST OPTIMIZE REPORT COMPARE RUN_ICA RUN_FARCE ITERATIONS STRIP FSTAB CONFIG GETKERNEL KEYMAP PAGE TIMEZONE LANG LC_ALL" -++ local -r clfs_PARAM_LIST="BOOK BUILDDIR SRC_ARCHIVE USE_PACO GETPKG RUNMAKE METHOD ARCH TARGET TEST OPTIMIZE REPORT COMPARE RUN_ICA RUN_FARCE ITERATIONS STRIP FSTAB BOOT_CONFIG CONFIG GETKERNEL KEYMAP VIMLANG PAGE TIMEZONE LANG" -++ local -r clfs2_PARAM_LIST="BOOK BUILDDIR SRC_ARCHIVE USE_PACO GETPKG RUNMAKE ARCH TARGET OPTIMIZE REPORT COMPARE RUN_ICA RUN_FARCE ITERATIONS STRIP FSTAB CONFIG GETKERNEL KEYMAP VIMLANG PAGE TIMEZONE LANG" -++ local -r lfs_PARAM_LIST="BOOK BUILDDIR SRC_ARCHIVE USE_PACO GETPKG RUNMAKE TEST OPTIMIZE REPORT COMPARE RUN_ICA RUN_FARCE ITERATIONS STRIP FSTAB CONFIG GETKERNEL VIMLANG PAGE TIMEZONE LANG" - - local -r ERROR_MSG_pt1='The variable \"${L_arrow}${config_param}${R_arrow}\" value ${L_arrow}${BOLD}${!config_param}${R_arrow} is invalid,' - local -r ERROR_MSG_pt2=' check the config file ${BOLD}${GREEN}\<$(echo $PROGNAME | tr [a-z] [A-Z])/config\> or \${OFF}' --@@ -176,6 +176,7 @@ -+@@ -179,6 +179,7 @@ - [[ "$GETPKG" = "1" ]] && validate_against_str "x0x x1x" - fi ;; - RUNMAKE) validate_against_str "x0x x1x" ;; -@@ -430,7 +432,7 @@ - +make logme - Index: common/common-functions - =================================================================== ----- common/common-functions (revision 2829) -+--- common/common-functions (revision 2861) - +++ common/common-functions (working copy) - @@ -69,6 +69,9 @@ - in the configuration file has the proper packages and patches for the -@@ -442,7 +444,7 @@ - ${BOLD} -O, --optimize${OFF} - Optimize [0-2] - 0 = no optimization --@@ -733,6 +736,7 @@ -+@@ -759,6 +762,7 @@ - --stringparam lc_all $LC_ALL \ - --stringparam keymap $KEYMAP \ - --stringparam grsecurity_host $GRSECURITY_HOST \ -@@ -450,7 +452,7 @@ - -o ./${PROGNAME}-commands/ $XSL $BOOK/index.xml >>$LOGDIR/$LOG 2>&1 - ;; - lfs) --@@ -744,6 +748,7 @@ -+@@ -770,6 +774,7 @@ - --stringparam timezone $TIMEZONE \ - --stringparam page $PAGE \ - --stringparam lang $LANG \ -@@ -460,7 +462,7 @@ - *) exit 1 ;; - Index: HLFS/hlfs.xsl - =================================================================== ----- HLFS/hlfs.xsl (revision 2829) -+--- HLFS/hlfs.xsl (revision 2861) - +++ HLFS/hlfs.xsl (working copy) - @@ -39,6 +39,9 @@ - -@@ -472,7 +474,7 @@ - - - --@@ -191,6 +194,10 @@ -+@@ -177,6 +180,10 @@ - - -@@ -483,10 +485,11 @@ - make install - cd ../blfs-bootscripts-&blfs-bootscripts-version; - --@@ -257,6 +264,25 @@ -+@@ -237,6 +244,27 @@ - - || true - -++ - + - + - + - + export LD_PRELOAD=/usr/lib/libpaco-log.so --+ -++ - + - + - + - + - + export LD_PRELOAD=/usr/lib/libpaco-log.so --+ -++ - + - + - + -++ - - - - Index: HLFS/master.sh - =================================================================== ----- HLFS/master.sh (revision 2829) -+--- HLFS/master.sh (revision 2861) - +++ HLFS/master.sh (working copy) --@@ -250,6 +250,11 @@ -+@@ -76,7 +76,9 @@ -+ @echo "export PKGDIR=\$(SRC)" > envars -+ EOF -+ ) >> $MKFILE.tmp -++ wrt_paco_prep -+ wrt_run_as_chroot1 "$toolchain" "$this_script" -++ wrt_paco_log "`echo $toolchain | sed -e 's@[0-9]\{3\}-@@'`" -+ ;; -+ -+ *) -+@@ -310,6 +312,11 @@ - # Keep the script file name - this_script=`basename $file` - -@@ -525,7 +539,7 @@ - # Skip this script depending on jhalfs.conf flags set. - case $this_script in - # We'll run the chroot commands differently than the others, so skip them in the --@@ -259,6 +264,18 @@ -+@@ -319,6 +326,18 @@ - *-stripping* ) [[ "$STRIP" = "0" ]] && continue ;; - esac - -@@ -533,9 +547,9 @@ - + # linux-libc-headers, except in iterartive builds - + if [[ -z "$N" ]]; then - + case $this_script in --+ *linux-libc-headers) -++ *linux-headers) - + TMP_SCRIPT="$this_script" --+ this_script=`echo $this_script | sed -e 's/linux-libc-headers/a-paco/'` -++ this_script=`echo $this_script | sed -e 's/linux-headers/a-paco/'` - + wrt_paco_inst "$this_script" - + this_script="$TMP_SCRIPT" ;; - + esac -@@ -544,8 +558,8 @@ - # Grab the name of the target - name=`echo $this_script | sed -e 's@[0-9]\{3\}-@@'` - --@@ -334,7 +351,9 @@ -- wrt_run_as_root "${this_script}" "${file}" -+@@ -385,7 +404,9 @@ -+ wrt_RunAsRoot "hlfs" "${this_script}" "${file}" - ;; - *) # The rest of Chapter06 - + wrt_paco_prep -@@ -554,7 +568,7 @@ - ;; - esac - # --@@ -367,6 +386,16 @@ -+@@ -405,6 +426,16 @@ - PREV=${this_script}${N} - # Set system_build envar for iteration targets - system_build=$chapter6 -@@ -571,7 +585,7 @@ - done # end for file in chapter06/* - - } --@@ -426,9 +455,19 @@ -+@@ -463,9 +494,19 @@ - else # Initialize the log and run the script - wrt_run_as_chroot2 "${this_script}" "${file}" - fi -@@ -593,7 +607,7 @@ - - Index: master.sh - =================================================================== ----- master.sh (revision 2829) -+--- master.sh (revision 2861) - +++ master.sh (working copy) - @@ -149,6 +149,8 @@ - -@@ -604,7 +618,7 @@ - --optimize | -O ) - test $# = 1 && eval "$exit_missing_arg" - shift --@@ -440,6 +442,14 @@ -+@@ -444,6 +446,14 @@ - [[ $VERBOSITY > 0 ]] && echo "OK" - fi - # -@@ -619,7 +633,7 @@ - # optimize module - if [[ "$OPTIMIZE" != "0" ]]; then - [[ $VERBOSITY > 0 ]] && echo -n "Loading optimization module..." --@@ -486,6 +496,8 @@ -+@@ -490,6 +500,8 @@ - if [[ "$PWD" != "$JHALFSDIR" ]]; then - cp $COMMON_DIR/{makefile-functions,progress_bar.sh} $JHALFSDIR/ - # Index: master.sh =================================================================== ---- master.sh (revision 2862) +--- master.sh (revision 2856) +++ master.sh (working copy) @@ -149,6 +149,8 @@