Changeset 50c8292


Ignore:
Timestamp:
08/05/2006 04:13:38 PM (18 years ago)
Author:
Manuel Canales Esparcia <manuel@…>
Branches:
1.0
Children:
9357c13
Parents:
05ccaa9
Message:

Updated paco patch on 1.0 branch.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • contrib/jhalfs-paco.patch

    r05ccaa9 r50c8292  
    11Index: LFS/master.sh
    22===================================================================
    3 --- LFS/master.sh       (revision 2857)
     3--- LFS/master.sh       (revision 2885)
    44+++ LFS/master.sh       (working copy)
    55@@ -173,6 +173,11 @@
     
    6262 }
    6363 
    64 @@ -312,8 +341,18 @@
     64@@ -312,8 +341,15 @@
    6565               else
    6666                 wrt_run_as_chroot2 "$this_script" "$file"
     
    6868+              wrt_paco_log "lfs-sysconf"
    6969         ;;
    70 +      *kernel)       wrt_paco_prep
    71 +                     wrt_run_as_chroot2 "$this_script" "$file"
    72 +                     wrt_paco_log "$pkg_tarball"
    73 +        ;;
    74 +      *bootscripts)  wrt_paco_prep
    75 +                     wrt_run_as_chroot2 "$this_script" "$file"
    76 +                     wrt_paco_log "$pkg_tarball"
     70+      *kernel | *bootscripts )
     71+              wrt_paco_prep
     72+              wrt_run_as_chroot2 "$this_script" "$file"
     73+              wrt_paco_log "$pkg_tarball"
    7774+        ;;
    7875       *)        wrt_run_as_chroot2 "$this_script" "$file"
     
    8380Index: LFS/lfs.xsl
    8481===================================================================
    85 --- LFS/lfs.xsl (revision 2857)
     82--- LFS/lfs.xsl (revision 2885)
    8683+++ LFS/lfs.xsl (working copy)
    87 @@ -32,6 +32,9 @@
     84@@ -39,6 +39,9 @@
    8885   <!-- Locale settings -->
    8986   <xsl:param name="lang" select="C"/>
     
    9592     <xsl:apply-templates select="//sect1"/>
    9693   </xsl:template>
    97 @@ -206,6 +209,33 @@
     94@@ -239,6 +242,33 @@
    9895         <xsl:apply-templates/>
    9996         <xsl:text> || true&#xA;</xsl:text>
     
    129126       <xsl:otherwise>
    130127         <xsl:apply-templates/>
     128Index: CLFS/master.sh
     129===================================================================
     130--- CLFS/master.sh      (revision 2885)
     131+++ CLFS/master.sh      (working copy)
     132@@ -495,6 +495,11 @@
     133     # Keep the script file name
     134     this_script=`basename $file`
     135 
     136+    # If $this_script corresponds to a paco script, then skip it
     137+    case "${this_script}" in
     138+      *paco)       continue ;;
     139+    esac
     140+
     141     # Test if the stripping phase must be skipped.
     142     # Skip alsp temp-perl for iterative runs
     143     case $this_script in
     144@@ -502,6 +507,18 @@
     145       *temp-perl*) [[ -n "$N" ]] && continue ;;
     146     esac
     147 
     148+    # Install paco as the first package in ch6, before installing
     149+    # linux-libc-headers, except in iterartive builds
     150+    if [[ -z "$N" ]]; then
     151+      case $this_script in
     152+        *linux-headers)
     153+          TMP_SCRIPT="$this_script"
     154+          this_script=`echo $this_script | sed -e 's/linux-headers/a-paco/'`
     155+          wrt_paco_inst "$this_script"
     156+          this_script="$TMP_SCRIPT" ;;
     157+      esac
     158+    fi
     159+
     160     # Grab the name of the target, strip id number, XXX-script
     161     name=`echo $this_script | sed -e 's@[0-9]\{3\}-@@' \
     162                                   -e 's@temp-@@' \
     163@@ -554,7 +571,9 @@
     164       [[ "$OPTIMIZE" != "0" ]] &&  wrt_optimize "$name" && wrt_makeflags "$name"
     165     fi
     166     #
     167+    wrt_paco_prep
     168     wrt_run_as_chroot1 "${this_script}" "${file}"
     169+    wrt_paco_log "$pkg_tarball"
     170     #
     171     [[ "$pkg_tarball" != "" ]] && wrt_remove_build_dirs "${name}"
     172     #
     173@@ -569,6 +588,16 @@
     174     PREV=${this_script}${N}
     175     # Set system_build envar for iteration targets
     176     system_build=$basicsystem
     177+
     178+    # Reinstalling paco after readsjusting the toolchain.
     179+    case "${this_script}" in
     180+      *adjusting)
     181+        TMP_SCRIPT="$this_script"
     182+        this_script=`echo ${this_script} | sed -e 's/adjusting/x-paco/'`
     183+        wrt_paco_inst "$this_script"
     184+        this_script="$TMP_SCRIPT" ;;
     185+    esac
     186+
     187   done  # for file in final-system/* ...
     188 }
     189 
     190@@ -605,6 +634,11 @@
     191     # Keep the script file name
     192     this_script=`basename $file`
     193 
     194+    # If $this_script corresponds to a paco script, then skip it
     195+    case "${this_script}" in
     196+      *paco)       continue ;;
     197+    esac
     198+
     199     # Test if the stripping phase must be skipped
     200     # Skip alsp temp-perl for iterative runs
     201     case $this_script in
     202@@ -612,6 +646,18 @@
     203       *temp-perl*) [[ -n "$N" ]] && continue ;;
     204     esac
     205 
     206+    # Install paco as the first package in ch6, before installing
     207+    # linux-libc-headers, except in iterartive builds
     208+    if [[ -z "$N" ]]; then
     209+      case $this_script in
     210+        *linux-headers)
     211+          TMP_SCRIPT="$this_script"
     212+          this_script=`echo $this_script | sed -e 's/linux-headers/a-paco/'`
     213+          wrt_paco_inst "$this_script"
     214+          this_script="$TMP_SCRIPT" ;;
     215+      esac
     216+    fi
     217+
     218     # Grab the name of the target, strip id number, XXX-script
     219     name=`echo $this_script | sed -e 's@[0-9]\{3\}-@@' \
     220                                   -e 's@temp-@@' \
     221@@ -666,7 +712,9 @@
     222       [[ "$OPTIMIZE" != "0" ]] &&  wrt_optimize "$name" && wrt_makeflags "$name"
     223     fi
     224     #
     225+    wrt_paco_prep
     226     wrt_run_as_root2 "${this_script}" "${file}"
     227+    wrt_paco_log "$pkg_tarball"
     228     #
     229     [[ "$pkg_tarball" != "" ]] && wrt_remove_build_dirs2 "${name}"
     230     #
     231@@ -681,6 +729,16 @@
     232     PREV=${this_script}${N}
     233     # Set system_build envar for iteration targets
     234     system_build=$basicsystem
     235+
     236+    # Reinstalling paco after readsjusting the toolchain.
     237+    case "${this_script}" in
     238+      *adjusting)
     239+        TMP_SCRIPT="$this_script"
     240+        this_script=`echo ${this_script} | sed -e 's/adjusting/x-paco/'`
     241+        wrt_paco_inst "$this_script"
     242+        this_script="$TMP_SCRIPT" ;;
     243+    esac
     244+
     245   done  # for file in final-system/* ...
     246 }
     247 
     248@@ -729,7 +787,17 @@
     249     #
     250     [[ "$pkg_tarball" != "" ]] && wrt_unpack2 "$pkg_tarball"
     251     #
     252+    case $this_script in
     253+      *bootscripts* | *udev-rules )
     254+        wrt_paco_prep ;;
     255+    esac
     256     wrt_run_as_chroot1 "${this_script}" "${file}"
     257+    case $this_script in
     258+      *bootscripts* | *udev-rules )
     259+        wrt_paco_log "$pkg_tarball" ;;
     260+      *)
     261+        wrt_paco_log "clfs-sysconf" ;;
     262+    esac
     263     #
     264     [[ "$pkg_tarball" != "" ]] && wrt_remove_build_dirs "${name}"
     265     #
     266@@ -791,7 +859,17 @@
     267     #
     268     [[ "$pkg_tarball" != "" ]] && wrt_unpack3 "$pkg_tarball"
     269     #
     270+    case $this_script in
     271+      *bootscripts* | *udev-rules )
     272+        wrt_paco_prep ;;
     273+    esac
     274     wrt_run_as_root2 "${this_script}" "${file}"
     275+    case $this_script in
     276+      *bootscripts* | *udev-rules )
     277+        wrt_paco_log "$pkg_tarball" ;;
     278+      *)
     279+        wrt_paco_log "clfs-sysconf" ;;
     280+    esac
     281     #
     282     [[ "$pkg_tarball" != "" ]] && wrt_remove_build_dirs2 "${name}"
     283     #
     284@@ -863,8 +941,13 @@
     285                 else
     286                   wrt_run_as_chroot1  "${this_script}" "${file}"
     287                 fi
     288+                wrt_paco_log "clfs-sysconf"
     289           ;;
     290-      *)  wrt_run_as_chroot1  "${this_script}" "${file}"   ;;
     291+      *kernel)  wrt_paco_prep
     292+                wrt_run_as_chroot1  "${this_script}" "${file}"
     293+                wrt_paco_log "$pkg_tarball" ;;
     294+      *)  wrt_run_as_chroot1  "${this_script}" "${file}"
     295+          wrt_paco_log "clfs-sysconf" ;;
     296     esac
     297     #
     298     # Housekeeping...remove any build directory(ies) except if the package build fails.
     299@@ -942,8 +1025,13 @@
     300                 else
     301                   wrt_run_as_root2  "${this_script}" "${file}"
     302                 fi
     303+                wrt_paco_log "clfs-sysconf"
     304           ;;
     305-      *)  wrt_run_as_root2  "${this_script}" "${file}"   ;;
     306+      *kernel)  wrt_paco_prep
     307+                wrt_run_as_root2  "${this_script}" "${file}"
     308+                wrt_paco_log "$pkg_tarball"   ;;
     309+      *)  wrt_run_as_root2  "${this_script}" "${file}"
     310+          wrt_paco_log "clfs-sysconf"   ;;
     311     esac
     312     #
     313     # Housekeeping...remove any build directory(ies) except if the package build fails.
     314Index: CLFS/clfs.xsl
     315===================================================================
     316--- CLFS/clfs.xsl       (revision 2885)
     317+++ CLFS/clfs.xsl       (working copy)
     318@@ -45,6 +45,9 @@
     319   <!-- Locale settings -->
     320   <xsl:param name="lang" select="C"/>
     321 
     322+  <!-- Use paco? -->
     323+  <xsl:param name="use_paco" select="1"/>
     324+
     325   <xsl:template match="/">
     326     <xsl:apply-templates select="//sect1"/>
     327   </xsl:template>
     328@@ -106,6 +109,25 @@
     329                 <xsl:text>tar -xvf ../vim-&vim-version;-lang.* --strip-components=1&#xA;</xsl:text>
     330               </xsl:if>
     331             </xsl:if>
     332+            <!-- paco begin -->
     333+            <!-- General rule -->
     334+            <xsl:if test="$use_paco != '0' and
     335+                    @id='ch-scripts-bootscripts' or
     336+                    @id='ch-scripts-udev-rules' or
     337+                    @id='ch-bootable-kernel' or
     338+                    (../@id='chapter-building-system' and
     339+                    @id!='ch-system-temp-perl' and
     340+                    contains(string(),'make') and
     341+                    contains(string(),'install'))">
     342+              <xsl:text>export LD_PRELOAD=/usr/lib/libpaco-log.so&#xA;</xsl:text>
     343+            </xsl:if>
     344+            <!-- Linux headers -->
     345+            <xsl:if test="$use_paco != '0' and
     346+                    @id='ch-system-linux-headers' and
     347+                    contains(string(),'install')">
     348+              <xsl:text>export LD_PRELOAD=/usr/lib/libpaco-log.so&#xA;</xsl:text>
     349+            </xsl:if>
     350+            <!-- paco end -->
     351             <xsl:apply-templates select=".//para/userinput | .//screen"/>
     352             <xsl:text>exit</xsl:text>
     353           </exsl:document>
    131354Index: common/paco-build-hlfs.sh
    132355===================================================================
     
    148371Index: common/config
    149372===================================================================
    150 --- common/config       (revision 2857)
     373--- common/config       (revision 2885)
    151374+++ common/config       (working copy)
    152 @@ -86,6 +86,23 @@
     375@@ -91,6 +91,23 @@
    153376 #--- Run farce testing 0(no)/1(yes)
    154377 RUN_FARCE=0
     
    174397 # Don't edit it unless you know what you are doing
    175398 
    176 @@ -103,3 +120,9 @@
     399@@ -108,3 +125,9 @@
    177400 
    178401 #--- farce report log directory
     
    186409Index: common/func_validate_configs.sh
    187410===================================================================
    188 --- common/func_validate_configs.sh     (revision 2856)
     411--- common/func_validate_configs.sh     (revision 2885)
    189412+++ common/func_validate_configs.sh     (working copy)
    190413@@ -84,9 +84,9 @@
     
    192415 
    193416   # First internal variables, then the ones that change the book's flavour, and lastly system configuration variables
    194 -  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"
    195 -  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"
    196 -  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"
    197 +  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"
    198 +  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"
    199 +  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"
     417-  local -r hlfs_PARAM_LIST="BOOK BUILDDIR SRC_ARCHIVE GETPKG RUNMAKE MODEL GRSECURITY_HOST TEST BOMB_TEST OPTIMIZE REPORT COMPARE RUN_ICA RUN_FARCE ITERATIONS STRIP FSTAB             CONFIG GETKERNEL KEYMAP         PAGE TIMEZONE LANG LC_ALL"
     418-  local -r clfs_PARAM_LIST="BOOK BUILDDIR SRC_ARCHIVE GETPKG RUNMAKE METHOD  ARCH  TARGET  TEST BOMB_TEST OPTIMIZE REPORT COMPARE RUN_ICA RUN_FARCE ITERATIONS STRIP FSTAB BOOT_CONFIG CONFIG GETKERNEL KEYMAP VIMLANG PAGE TIMEZONE LANG"
     419-  local -r  lfs_PARAM_LIST="BOOK BUILDDIR SRC_ARCHIVE GETPKG RUNMAKE                       TEST BOMB_TEST OPTIMIZE REPORT COMPARE RUN_ICA RUN_FARCE ITERATIONS STRIP FSTAB             CONFIG GETKERNEL        VIMLANG PAGE TIMEZONE LANG"
     420+  local -r hlfs_PARAM_LIST="BOOK BUILDDIR SRC_ARCHIVE USE_PACO GETPKG RUNMAKE MODEL GRSECURITY_HOST TEST BOMB_TEST OPTIMIZE REPORT COMPARE RUN_ICA RUN_FARCE ITERATIONS STRIP FSTAB             CONFIG GETKERNEL KEYMAP         PAGE TIMEZONE LANG LC_ALL"
     421+  local -r clfs_PARAM_LIST="BOOK BUILDDIR SRC_ARCHIVE USE_PACO GETPKG RUNMAKE METHOD  ARCH  TARGET  TEST BOMB_TEST OPTIMIZE REPORT COMPARE RUN_ICA RUN_FARCE ITERATIONS STRIP FSTAB BOOT_CONFIG CONFIG GETKERNEL KEYMAP VIMLANG PAGE TIMEZONE LANG"
     422+  local -r  lfs_PARAM_LIST="BOOK BUILDDIR SRC_ARCHIVE USE_PACO GETPKG RUNMAKE                       TEST BOMB_TEST OPTIMIZE REPORT COMPARE RUN_ICA RUN_FARCE ITERATIONS STRIP FSTAB             CONFIG GETKERNEL        VIMLANG PAGE TIMEZONE LANG"
    200423 
    201424   local -r ERROR_MSG_pt1='The variable \"${L_arrow}${config_param}${R_arrow}\" value ${L_arrow}${BOLD}${!config_param}${R_arrow} is invalid,'
     
    213436--- common/paco-functions       (revision 0)
    214437+++ common/paco-functions       (revision 0)
    215 @@ -0,0 +1,251 @@
     438@@ -0,0 +1,311 @@
    216439+#!/bin/bash
    217440+
     
    220443+#----------------------------#
    221444+
    222 +# Not using Paco with uClibc, even if requested
    223 +if [ $PROGNAME = "hlfs" ]; then
    224 +  if [ $MODEL = "uclibc" ]; then
    225 +    USE_PACO=0
    226 +  fi
    227 +fi
     445+local paco_script="$1"
     446+
     447+check_build_model
    228448+
    229449+if [ $USE_PACO != 0 ]; then
    230 +  paco_script="$1"
    231 +  paco_file="chapter06/$paco_script"
    232 +  chapter6="$chapter6 $paco_script"
     450+  case $PROGNAME in
     451+    clfs )
     452+      paco_file="final-system/$paco_script"
     453+      basicsystem="$basicsystem $paco_script" ;;
     454+    * )
     455+      paco_file="chapter06/$paco_script"
     456+      chapter6="$chapter6 $paco_script" ;;
     457+  esac
    233458+
    234459+  # Copy the paco build script to the correct directory and make it executable
     
    237462+
    238463+  # Write target, dependency and unpack
    239 +  wrt_target "$paco_script" "$PREV"
    240 +  wrt_unpack2 "$PACO_FILE"
    241 +
    242 +  # Run the script
    243 +  wrt_run_as_chroot1 "${paco_script}" "${paco_file}"
    244 +
    245 +  # Clean up
    246 +  wrt_remove_build_dirs "paco"
     464+  if [ $CLFS_BOOT = 1 ]; then
     465+    wrt_target_boot "$paco_script" "$PREV"
     466+    wrt_unpack3 "$PACO_FILE"
     467+    wrt_run_as_root2 "${paco_script}" "${paco_file}"
     468+    wrt_remove_build_dirs2 "paco"
     469+  else
     470+    wrt_target "$paco_script" "$PREV"
     471+    wrt_unpack2 "$PACO_FILE"
     472+    wrt_run_as_chroot1 "${paco_script}" "${paco_file}"
     473+    wrt_remove_build_dirs "paco"
     474+  fi
     475+
    247476+  wrt_touch
    248477+
     
    257486+#----------------------------------# and remove tmpfile
    258487+
    259 +# Not using Paco with uClibc, even if requested
    260 +if [ $PROGNAME = "hlfs" ]; then
    261 +  if [ $MODEL = "uclibc" ]; then
    262 +    USE_PACO=0
     488+local TMPFILEPATH
     489+
     490+check_build_model
     491+
     492+check_log_package
     493+
     494+if [ $USE_PACO != 0 ] && [ $LOG_PACKAGE != 0 ]; then
     495+  if [ $CLFS_BOOT = 1 ]; then
     496+    TMPFILEPATH="$PACO_TMPFILE"
     497+  else
     498+    TMPFILEPATH="\$(MOUNT_PT)$PACO_TMPFILE"
    263499+  fi
    264 +fi
    265 +
    266 +check_log_package
    267 +
    268 +if [ $USE_PACO != 0 ] && [ $LOG_PACKAGE != 0 ]; then
    269500+(
    270501+cat  << EOF
     
    272503+       echo "export PACO_EXCLUDE=\$(SRC):$PACO_EXCLUDE" >> envars && \\
    273504+       echo "export PACO_TMPFILE=$PACO_TMPFILE" >> envars && \\
    274 +       rm -f \$(MOUNT_PT)$PACO_TMPFILE
     505+       rm -f $TMPFILEPATH
    275506+EOF
    276507+) >> $MKFILE.tmp
     
    284515+local PACKAGE
    285516+
     517+# Extract package name and version from the tarball name
    286518+PACKAGE=`echo $1 | sed -e 's/.tar.*//'`
    287519+
    288 +# Not using Paco with uClibc, even if requested
    289 +if [ $PROGNAME = "hlfs" ]; then
    290 +  if [ $MODEL = "uclibc" ]; then
    291 +    USE_PACO=0
    292 +  fi
    293 +fi
    294 +
     520+check_build_model
     521+
     522+# Check if the package should be logged
    295523+check_log_package
     524+
    296525+
    297526+if [ $USE_PACO != 0 ]; then
    298527+  if [ $LOG_PACKAGE != 0 ]; then
     528+    # Only use this if doing CLFS boot build
     529+    if [ $CLFS_BOOT = 1 ]; then
     530+(
     531+cat << EOF
     532+       @if [ -e $PACO_TMPFILE ]; then \\
     533+               paco -lp+ $PACKAGE < $PACO_TMPFILE && \\
     534+               rm -f $PACO_TMPFILE; \\
     535+       fi;
     536+EOF
     537+) >> $MKFILE.tmp
     538+    # All else should use these commands
     539+    else
    299540+(
    300541+cat << EOF
     
    305546+EOF
    306547+) >> $MKFILE.tmp
     548+    fi
    307549+  fi
     550+  # Add missing files to the logs if needed
    308551+  wrt_paco_add_log
     552+fi
     553+}
     554+
     555+
     556+#----------------------------------#
     557+fnc_add_log() {                    #
     558+#----------------------------------#
     559+
     560+MISSING_FILE=$1
     561+
     562+if [ $CLFS_BOOT = 1 ]; then
     563+  echo -e "\t@$MISSING_FILE | paco -lp+ $PACKAGE" >> $MKFILE.tmp
     564+else
     565+  echo -e "\t@\$(CHROOT1) '$MISSING_FILE | paco -lp+ $PACKAGE'" >> $MKFILE.tmp
    309566+fi
    310567+}
     
    318575+# Most of these is not needed for HLFS, but they do no harm.
    319576+if [ $USE_PACO != 0 ]; then
    320 +  case $this_script in
     577+ case $this_script in
    321578+    *glibc)
    322 +      echo -e "\t@\$(CHROOT1) 'find /lib -type l | paco -lp+ $PACKAGE'" >> $MKFILE.tmp
    323 +      echo -e "\t@\$(CHROOT1) 'find /etc/{nsswitch.conf,ld.so.conf} | paco -lp+ $PACKAGE'" >> $MKFILE.tmp
     579+      fnc_add_log "find /lib -type l"
     580+      fnc_add_log "find /etc/{nsswitch.conf,ld.so.conf}"
    324581+    ;;
    325582+    *ncurses)
    326 +      LIBS="/usr/lib/{libcurses.so,libncurses.so,libform.so,libpanel.so,libmenu.so}"
    327 +      echo -e "\t@\$(CHROOT1) 'find $LIBS | paco -lp+ $PACKAGE'" >> $MKFILE.tmp
     583+      fnc_add_log "find /usr/lib/{libcurses.so,libncurses.so,libform.so,libpanel.so,libmenu.so}"
    328584+    ;;
    329585+    *bash)
    330 +      echo -e "\t@\$(CHROOT1) 'echo /bin/sh | paco -lp+ $PACKAGE'" >> $MKFILE.tmp
     586+      fnc_add_log "echo /bin/sh"
    331587+    ;;
    332588+    *flex)
    333 +      echo -e "\t@\$(CHROOT1) 'echo /usr/bin/lex | paco -lp+ $PACKAGE'" >> $MKFILE.tmp
     589+      fnc_add_log "echo /usr/bin/lex"
    334590+    ;;
    335591+    *shadow)
    336 +      echo -e "\t@\$(CHROOT1) 'echo /etc/login.defs | paco -lp+ $PACKAGE'" >> $MKFILE.tmp
     592+      fnc_add_log "echo /etc/login.defs"
    337593+    ;;
    338594+    *hotplug)
    339 +      echo -e "\t@\$(CHROOT1) 'echo /var/log/hotplug | paco -lp+ $PACKAGE'" >> $MKFILE.tmp
    340 +      echo -e "\t@\$(CHROOT1) 'echo /var/run/usb | paco -lp+ $PACKAGE'" >> $MKFILE.tmp
     595+      fnc_add_log "echo /var/log/hotplug"
     596+      fnc_add_log "echo /var/run/usb"
    341597+    ;;
    342598+    *sysklogd)
    343 +      echo -e "\t@\$(CHROOT1) 'echo /etc/syslog.conf | paco -lp+ $PACKAGE'" >> $MKFILE.tmp
     599+      fnc_add_log "echo /etc/syslog.conf"
    344600+    ;;
    345601+    *sysvinit)
    346 +      echo -e "\t@\$(CHROOT1) 'echo /etc/inittab | paco -lp+ $PACKAGE'" >> $MKFILE.tmp
     602+      fnc_add_log "echo /etc/inittab"
    347603+    ;;
    348604+    *udev)
    349 +      echo -e "\t@\$(CHROOT1) 'find /lib/udev/devices | paco -lp+ $PACKAGE'" >> $MKFILE.tmp
    350 +      echo -e "\t@\$(CHROOT1) 'echo /lib/firmware | paco -lp+ $PACKAGE'" >> $MKFILE.tmp
    351 +      echo -e "\t@\$(CHROOT1) 'find /etc/udev/rules.d -type f | paco -lp+ $PACKAGE'" >> $MKFILE.tmp
     605+      fnc_add_log "find /lib/udev/devices"
     606+      fnc_add_log "echo /lib/firmware"
     607+      fnc_add_log "find /etc/udev/rules.d -type f"
    352608+    ;;
    353609+    *util-linux)
    354 +      echo -e "\t@\$(CHROOT1) 'echo /var/lib/hwclock | paco -lp+ $PACKAGE'" >> $MKFILE.tmp
    355 +      echo -e "\t@\$(CHROOT1) 'echo /etc/nologin.txt | paco -lp+ $PACKAGE'" >> $MKFILE.tmp
     610+      fnc_add_log "echo /var/lib/hwclock"
     611+      fnc_add_log "echo /etc/nologin.txt"
    356612+    ;;
    357613+    *vim)
    358 +      echo -e "\t@\$(CHROOT1) 'echo /etc/vimrc | paco -lp+ $PACKAGE'" >> $MKFILE.tmp
    359 +    ;;
    360 +    # Rules below here will log configuration files created in LFS and HLFS
    361 +    # They will end up in a log named {h}lfs-sysconf
     614+      fnc_add_log "echo /etc/vimrc"
     615+    ;;
     616+    # Rules below here will log configuration files created in {C,H}LFS
     617+    # They will end up in a log named {c,h}lfs-sysconf
    362618+    *setclock)
    363 +      echo -e "\t@\$(CHROOT2) 'echo /etc/sysconfig/clock | paco -lp+ $PACKAGE'" >> $MKFILE.tmp
     619+      fnc_add_log "echo /etc/sysconfig/clock"
    364620+    ;;
    365621+    *inputrc)
    366 +      echo -e "\t@\$(CHROOT2) 'echo /etc/inputrc | paco -lp+ $PACKAGE'" >> $MKFILE.tmp
     622+      fnc_add_log "echo /etc/inputrc"
    367623+    ;;
    368624+    *profile)
    369 +      echo -e "\t@\$(CHROOT2) 'echo /etc/profile | paco -lp+ $PACKAGE'" >> $MKFILE.tmp
     625+      fnc_add_log "echo /etc/profile"
    370626+    ;;
    371627+    *hostname)
    372 +      echo -e "\t@\$(CHROOT2) 'echo /etc/sysconfig/network | paco -lp+ $PACKAGE'" >> $MKFILE.tmp
     628+      fnc_add_log "echo /etc/sysconfig/network"
    373629+    ;;
    374630+    *localnet)
    375 +      echo -e "\t@\$(CHROOT2) 'echo /etc/sysconfig/network | paco -lp+ $PACKAGE'" >> $MKFILE.tmp
     631+      fnc_add_log "echo /etc/sysconfig/network"
    376632+    ;;
    377633+    *hosts)
    378 +      echo -e "\t@\$(CHROOT2) 'echo /etc/hosts | paco -lp+ $PACKAGE'" >> $MKFILE.tmp
     634+      fnc_add_log "echo /etc/hosts"
    379635+    ;;
    380636+    *network)
    381 +      echo -e "\t@\$(CHROOT2) 'echo /etc/sysconfig/network-devices/ifconfig.eth0/ipv4 | paco -lp+ $PACKAGE'" >> $MKFILE.tmp
    382 +      echo -e "\t@\$(CHROOT2) 'echo /etc/resolv.conf | paco -lp+ $PACKAGE'" >> $MKFILE.tmp
     637+      fnc_add_log "echo /etc/sysconfig/network-devices/ifconfig.eth0/ipv4"
     638+      fnc_add_log "echo /etc/resolv.conf"
    383639+    ;;
    384640+    *fstab)
    385 +      echo -e "\t@\$(CHROOT2) 'echo /etc/fstab | paco -lp+ $PACKAGE'" >> $MKFILE.tmp
    386 +    ;;
    387 +    *theend) # LFS
    388 +      echo -e "\t@\$(CHROOT2) 'echo /etc/$PROGNAME-release | paco -lp+ $PACKAGE'" >> $MKFILE.tmp
     641+      fnc_add_log "echo /etc/fstab"
     642+    ;;
     643+    *theend) # LFS and CLFS
     644+      fnc_add_log "echo /etc/$PROGNAME-release"
    389645+    ;;
    390646+    *finished) # HLFS
    391 +      echo -e "\t@\$(CHROOT2) 'echo /etc/$PROGNAME-release | paco -lp+ $PACKAGE'" >> $MKFILE.tmp
     647+      fnc_add_log "echo /etc/$PROGNAME-release"
    392648+    ;;
    393649+  esac
     
    408664+  *pwdgroup)        LOG_PACKAGE=0 ;;
    409665+  *devices)         LOG_PACKAGE=0 ;;
     666+  *stripping)       LOG_PACKAGE=0 ;;
    410667+  *strippingagain)  LOG_PACKAGE=0 ;;
     668+  *adjusting)       LOG_PACKAGE=0 ;;
     669+  *temp-perl)       LOG_PACKAGE=0 ;;
    411670+  *readjusting)     LOG_PACKAGE=0 ;;
    412671+  *setclock)        LOG_PACKAGE=0 ;;
     
    435694+
    436695+# Test if paco is to be used
    437 +[ ! "$USE_PACO" = "1" ] && return
     696+[[ ! "$USE_PACO" = "1" ]] && return
    438697+
    439698+# If the file exists in the archive copy it to the $BUILDDIR/sources dir.
     
    465724+fi
    466725+}
     726+
     727+
     728+#----------------------------------#
     729+check_build_model() {              #
     730+#----------------------------------#
     731+# Check what script we're running, and set some switches accordingly
     732+
     733+CLFS_BOOT=0
     734+
     735+case $PROGNAME in
     736+  hlfs)
     737+    # Not using Paco with uClibc, even if requested
     738+    if [ "$MODEL" = "uclibc" ]; then
     739+      USE_PACO=0
     740+    fi
     741+  ;;
     742+  clfs)
     743+    # CLFS boot method require it's own commands
     744+    if [ "$METHOD" = "boot" ]; then
     745+      CLFS_BOOT=1
     746+    fi
     747+  ;;
     748+esac
     749+}
    467750Index: common/paco-build-lfs.sh
    468751===================================================================
    469752--- common/paco-build-lfs.sh    (revision 0)
    470753+++ common/paco-build-lfs.sh    (revision 0)
     754@@ -0,0 +1,10 @@
     755+#!/bin/sh
     756+set -e
     757+
     758+cd $PKGDIR
     759+./configure --sysconfdir=/etc \
     760+       --enable-scripts \
     761+       --disable-gpaco &&
     762+make &&
     763+make install &&
     764+make logme
     765Index: common/paco-build-clfs.sh
     766===================================================================
     767--- common/paco-build-clfs.sh   (revision 0)
     768+++ common/paco-build-clfs.sh   (revision 0)
    471769@@ -0,0 +1,10 @@
    472770+#!/bin/sh
     
    482780Index: common/common-functions
    483781===================================================================
    484 --- common/common-functions     (revision 2857)
     782--- common/common-functions     (revision 2885)
    485783+++ common/common-functions     (working copy)
    486784@@ -69,6 +69,9 @@
     
    494792         Optimize [0-2]
    495793           0 = no optimization
    496 @@ -733,6 +736,7 @@
     794@@ -720,6 +723,7 @@
     795                  --stringparam page $PAGE \
     796                  --stringparam lang $LANG \
     797                  --stringparam keymap $KEYMAP \
     798+                 --stringparam use_paco $USE_PACO \
     799                  -o ./${PROGNAME}-commands/ $XSL $BOOK/$ARCH-index.xml >>$LOGDIR/$LOG 2>&1
     800       ;;
     801     hlfs)
     802@@ -735,6 +739,7 @@
    497803                  --stringparam lc_all $LC_ALL \
    498804                  --stringparam keymap $KEYMAP \
     
    502808       ;;
    503809     lfs)
    504 @@ -744,6 +748,7 @@
     810@@ -747,6 +752,7 @@
    505811                  --stringparam timezone $TIMEZONE \
    506812                  --stringparam page $PAGE \
     
    510816       ;;
    511817     *) exit 1 ;;
    512 @@ -810,6 +815,9 @@
     818@@ -813,6 +819,9 @@
    513819     # Generate URLs file
    514820   create_urls
     
    522828Index: HLFS/hlfs.xsl
    523829===================================================================
    524 --- HLFS/hlfs.xsl       (revision 2861)
     830--- HLFS/hlfs.xsl       (revision 2885)
    525831+++ HLFS/hlfs.xsl       (working copy)
    526 @@ -39,6 +39,9 @@
     832@@ -46,6 +46,9 @@
    527833   <xsl:param name="lang" select="C"/>
    528834   <xsl:param name="lc_all" select="C"/>
     
    534840     <xsl:apply-templates select="//sect1"/>
    535841   </xsl:template>
    536 @@ -177,6 +180,10 @@
     842@@ -192,6 +195,10 @@
    537843       <!-- Fixing bootscripts installation -->
    538844       <xsl:when test="ancestor::sect1[@id='bootable-bootscripts'] and
     
    545851         <xsl:text>cd ../blfs-bootscripts-&blfs-bootscripts-version;&#xA;</xsl:text>
    546852       </xsl:when>
    547 @@ -237,6 +244,27 @@
     853@@ -280,6 +287,25 @@
    548854         <xsl:apply-templates/>
    549855         <xsl:text> || true&#xA;</xsl:text>
    550856       </xsl:when>
    551 +
    552857+      <!-- paco begin -->
    553858+      <!-- General rule -->
     
    569874+      </xsl:when>
    570875+      <!-- paco end -->
    571 +
    572876       <!-- The rest of commands -->
    573877       <xsl:otherwise>
     
    575879Index: HLFS/master.sh
    576880===================================================================
    577 --- HLFS/master.sh      (revision 2857)
     881--- HLFS/master.sh      (revision 2885)
    578882+++ HLFS/master.sh      (working copy)
    579 @@ -76,7 +76,9 @@
    580         @echo "export PKGDIR=\$(SRC)" > envars
     883@@ -92,7 +92,9 @@
    581884 EOF
    582885 ) >> $MKFILE.tmp
     886       [[ "$TEST" != "0" ]] && wrt_test_log2 "${this_script}"
    583887+      wrt_paco_prep
    584888       wrt_run_as_chroot1 "$toolchain" "$this_script"
     
    587891 
    588892     *)
    589 @@ -310,6 +312,11 @@
     893@@ -324,6 +326,11 @@
    590894     # Keep the script file name
    591895     this_script=`basename $file`
     
    599903     case $this_script in
    600904         # We'll run the chroot commands differently than the others, so skip them in the
    601 @@ -319,6 +326,18 @@
     905@@ -333,6 +340,18 @@
    602906       *-stripping* )  [[ "$STRIP" = "0" ]] && continue ;;
    603907     esac
     
    618922     name=`echo $this_script | sed -e 's@[0-9]\{3\}-@@'`
    619923 
    620 @@ -385,7 +404,9 @@
     924@@ -398,7 +417,9 @@
    621925         wrt_RunAsRoot "hlfs" "${this_script}" "${file}"
    622926         ;;
     
    628932     esac
    629933     #
    630 @@ -405,6 +426,16 @@
     934@@ -418,6 +439,16 @@
    631935     PREV=${this_script}${N}
    632936     # Set system_build envar for iteration targets
     
    645949 
    646950 }
    647 @@ -463,9 +494,19 @@
     951@@ -476,9 +507,19 @@
    648952         else  # Initialize the log and run the script
    649953           wrt_run_as_chroot2 "${this_script}" "${file}"
     
    667971Index: master.sh
    668972===================================================================
    669 --- master.sh   (revision 2856)
     973--- master.sh   (revision 2885)
    670974+++ master.sh   (working copy)
    671975@@ -149,6 +149,8 @@
Note: See TracChangeset for help on using the changeset viewer.