Changeset 8b7357b


Ignore:
Timestamp:
08/03/2006 09:25:04 PM (18 years ago)
Author:
Manuel Canales Esparcia <manuel@…>
Branches:
2.3, 2.3.x, 2.4, ablfs, ablfs-more, legacy, new_features, trunk
Children:
33c7b13
Parents:
e0b032b
Message:

Updated paco patch from upstream.

Files:
2 edited

Legend:

Unmodified
Added
Removed
  • README.PACO

    re0b032b r8b7357b  
    1313At the moment only the LFS and HLFS-glibc parts are supported.
    1414
     15NEWS:
     16  Preliminary support for CLFS is ready. It's not fully tested, so if you
     17discover any bugs please notify the patch author. Also, Paco may or may not work
     18on your specific architecture. Check the Paco homepage for details.
    1519
    1620##### QUICK START #####
     
    2024
    21252. Edit the configuration files to your preferences.
    22    (common/config and LFS/config or HLFS/config)
     26   (common/config and LFS/config or HLFS/config or CLFS/config)
    2327
    24283. Run the wanted script.
    25    (Only ./lfs or ./hlfs --model glibc if you want to use paco)
     29   (Only ./lfs or ./clfs or ./hlfs --model glibc if you want to use paco)
    2630
    27314. Run make.
     
    7074##### TODO #####
    7175
     76- Bughunting/testing CLFS part
    7277- Support for HLFS-uClibc
    73 - Support for CLFS
    7478- Support for BLFS (when it's ready)
    7579- Spread the Word
     
    7882##### HISTORY #####
    7983
     842006-08-02
     85- Preliminary support for CLFS done
     86- Some code cleanup
     87
    80882006-07-30
    81 - Automatical download of Paco source package
     89- Automatical download of Paco source package done
    8290- Updated patch to support new HLFS layout
  • contrib/jhalfs-paco.patch

    re0b032b r8b7357b  
    11Index: LFS/master.sh
    22===================================================================
    3 --- LFS/master.sh       (revision 2864)
     3--- LFS/master.sh       (revision 2873)
    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 2864)
     82--- LFS/lfs.xsl (revision 2873)
    8683+++ LFS/lfs.xsl (working copy)
    8784@@ -32,6 +32,9 @@
     
    129126       <xsl:otherwise>
    130127         <xsl:apply-templates/>
     128Index: CLFS/master.sh
     129===================================================================
     130--- CLFS/master.sh      (revision 2873)
     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 2873)
     317+++ CLFS/clfs.xsl       (working copy)
     318@@ -38,6 +38,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@@ -99,6 +102,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 2864)
     373--- common/config       (revision 2873)
    151374+++ common/config       (working copy)
    152375@@ -86,6 +86,23 @@
     
    186409Index: common/func_validate_configs.sh
    187410===================================================================
    188 --- common/func_validate_configs.sh     (revision 2864)
     411--- common/func_validate_configs.sh     (revision 2873)
    189412+++ common/func_validate_configs.sh     (working copy)
    190413@@ -86,10 +86,10 @@
     
    215438--- common/paco-functions       (revision 0)
    216439+++ common/paco-functions       (revision 0)
    217 @@ -0,0 +1,251 @@
     440@@ -0,0 +1,311 @@
    218441+#!/bin/bash
    219442+
     
    222445+#----------------------------#
    223446+
    224 +# Not using Paco with uClibc, even if requested
    225 +if [ $PROGNAME = "hlfs" ]; then
    226 +  if [ $MODEL = "uclibc" ]; then
    227 +    USE_PACO=0
    228 +  fi
    229 +fi
     447+local paco_script="$1"
     448+
     449+check_build_model
    230450+
    231451+if [ $USE_PACO != 0 ]; then
    232 +  paco_script="$1"
    233 +  paco_file="chapter06/$paco_script"
    234 +  chapter6="$chapter6 $paco_script"
     452+  case $PROGNAME in
     453+    clfs )
     454+      paco_file="final-system/$paco_script"
     455+      basicsystem="$basicsystem $paco_script" ;;
     456+    * )
     457+      paco_file="chapter06/$paco_script"
     458+      chapter6="$chapter6 $paco_script" ;;
     459+  esac
    235460+
    236461+  # Copy the paco build script to the correct directory and make it executable
     
    239464+
    240465+  # Write target, dependency and unpack
    241 +  wrt_target "$paco_script" "$PREV"
    242 +  wrt_unpack2 "$PACO_FILE"
    243 +
    244 +  # Run the script
    245 +  wrt_run_as_chroot1 "${paco_script}" "${paco_file}"
    246 +
    247 +  # Clean up
    248 +  wrt_remove_build_dirs "paco"
     466+  if [ $CLFS_BOOT = 1 ]; then
     467+    wrt_target_boot "$paco_script" "$PREV"
     468+    wrt_unpack3 "$PACO_FILE"
     469+    wrt_run_as_root2 "${paco_script}" "${paco_file}"
     470+    wrt_remove_build_dirs2 "paco"
     471+  else
     472+    wrt_target "$paco_script" "$PREV"
     473+    wrt_unpack2 "$PACO_FILE"
     474+    wrt_run_as_chroot1 "${paco_script}" "${paco_file}"
     475+    wrt_remove_build_dirs "paco"
     476+  fi
     477+
    249478+  wrt_touch
    250479+
     
    259488+#----------------------------------# and remove tmpfile
    260489+
    261 +# Not using Paco with uClibc, even if requested
    262 +if [ $PROGNAME = "hlfs" ]; then
    263 +  if [ $MODEL = "uclibc" ]; then
    264 +    USE_PACO=0
     490+local TMPFILEPATH
     491+
     492+check_build_model
     493+
     494+check_log_package
     495+
     496+if [ $USE_PACO != 0 ] && [ $LOG_PACKAGE != 0 ]; then
     497+  if [ $CLFS_BOOT = 1 ]; then
     498+    TMPFILEPATH="$PACO_TMPFILE"
     499+  else
     500+    TMPFILEPATH="\$(MOUNT_PT)$PACO_TMPFILE"
    265501+  fi
    266 +fi
    267 +
    268 +check_log_package
    269 +
    270 +if [ $USE_PACO != 0 ] && [ $LOG_PACKAGE != 0 ]; then
    271502+(
    272503+cat  << EOF
     
    274505+       echo "export PACO_EXCLUDE=\$(SRC):$PACO_EXCLUDE" >> envars && \\
    275506+       echo "export PACO_TMPFILE=$PACO_TMPFILE" >> envars && \\
    276 +       rm -f \$(MOUNT_PT)$PACO_TMPFILE
     507+       rm -f $TMPFILEPATH
    277508+EOF
    278509+) >> $MKFILE.tmp
     
    286517+local PACKAGE
    287518+
     519+# Extract package name and version from the tarball name
    288520+PACKAGE=`echo $1 | sed -e 's/.tar.*//'`
    289521+
    290 +# Not using Paco with uClibc, even if requested
    291 +if [ $PROGNAME = "hlfs" ]; then
    292 +  if [ $MODEL = "uclibc" ]; then
    293 +    USE_PACO=0
    294 +  fi
    295 +fi
    296 +
     522+check_build_model
     523+
     524+# Check if the package should be logged
    297525+check_log_package
     526+
    298527+
    299528+if [ $USE_PACO != 0 ]; then
    300529+  if [ $LOG_PACKAGE != 0 ]; then
     530+    # Only use this if doing CLFS boot build
     531+    if [ $CLFS_BOOT = 1 ]; then
     532+(
     533+cat << EOF
     534+       @if [ -e $PACO_TMPFILE ]; then \\
     535+               paco -lp+ $PACKAGE < $PACO_TMPFILE && \\
     536+               rm -f $PACO_TMPFILE; \\
     537+       fi;
     538+EOF
     539+) >> $MKFILE.tmp
     540+    # All else should use these commands
     541+    else
    301542+(
    302543+cat << EOF
     
    307548+EOF
    308549+) >> $MKFILE.tmp
     550+    fi
    309551+  fi
     552+  # Add missing files to the logs if needed
    310553+  wrt_paco_add_log
     554+fi
     555+}
     556+
     557+
     558+#----------------------------------#
     559+fnc_add_log() {                    #
     560+#----------------------------------#
     561+
     562+MISSING_FILE=$1
     563+
     564+if [ $CLFS_BOOT = 1 ]; then
     565+  echo -e "\t@$MISSING_FILE | paco -lp+ $PACKAGE" >> $MKFILE.tmp
     566+else
     567+  echo -e "\t@\$(CHROOT1) '$MISSING_FILE | paco -lp+ $PACKAGE'" >> $MKFILE.tmp
    311568+fi
    312569+}
     
    320577+# Most of these is not needed for HLFS, but they do no harm.
    321578+if [ $USE_PACO != 0 ]; then
    322 +  case $this_script in
     579+ case $this_script in
    323580+    *glibc)
    324 +      echo -e "\t@\$(CHROOT1) 'find /lib -type l | paco -lp+ $PACKAGE'" >> $MKFILE.tmp
    325 +      echo -e "\t@\$(CHROOT1) 'find /etc/{nsswitch.conf,ld.so.conf} | paco -lp+ $PACKAGE'" >> $MKFILE.tmp
     581+      fnc_add_log "find /lib -type l"
     582+      fnc_add_log "find /etc/{nsswitch.conf,ld.so.conf}"
    326583+    ;;
    327584+    *ncurses)
    328 +      LIBS="/usr/lib/{libcurses.so,libncurses.so,libform.so,libpanel.so,libmenu.so}"
    329 +      echo -e "\t@\$(CHROOT1) 'find $LIBS | paco -lp+ $PACKAGE'" >> $MKFILE.tmp
     585+      fnc_add_log "find /usr/lib/{libcurses.so,libncurses.so,libform.so,libpanel.so,libmenu.so}"
    330586+    ;;
    331587+    *bash)
    332 +      echo -e "\t@\$(CHROOT1) 'echo /bin/sh | paco -lp+ $PACKAGE'" >> $MKFILE.tmp
     588+      fnc_add_log "echo /bin/sh"
    333589+    ;;
    334590+    *flex)
    335 +      echo -e "\t@\$(CHROOT1) 'echo /usr/bin/lex | paco -lp+ $PACKAGE'" >> $MKFILE.tmp
     591+      fnc_add_log "echo /usr/bin/lex"
    336592+    ;;
    337593+    *shadow)
    338 +      echo -e "\t@\$(CHROOT1) 'echo /etc/login.defs | paco -lp+ $PACKAGE'" >> $MKFILE.tmp
     594+      fnc_add_log "echo /etc/login.defs"
    339595+    ;;
    340596+    *hotplug)
    341 +      echo -e "\t@\$(CHROOT1) 'echo /var/log/hotplug | paco -lp+ $PACKAGE'" >> $MKFILE.tmp
    342 +      echo -e "\t@\$(CHROOT1) 'echo /var/run/usb | paco -lp+ $PACKAGE'" >> $MKFILE.tmp
     597+      fnc_add_log "echo /var/log/hotplug"
     598+      fnc_add_log "echo /var/run/usb"
    343599+    ;;
    344600+    *sysklogd)
    345 +      echo -e "\t@\$(CHROOT1) 'echo /etc/syslog.conf | paco -lp+ $PACKAGE'" >> $MKFILE.tmp
     601+      fnc_add_log "echo /etc/syslog.conf"
    346602+    ;;
    347603+    *sysvinit)
    348 +      echo -e "\t@\$(CHROOT1) 'echo /etc/inittab | paco -lp+ $PACKAGE'" >> $MKFILE.tmp
     604+      fnc_add_log "echo /etc/inittab"
    349605+    ;;
    350606+    *udev)
    351 +      echo -e "\t@\$(CHROOT1) 'find /lib/udev/devices | paco -lp+ $PACKAGE'" >> $MKFILE.tmp
    352 +      echo -e "\t@\$(CHROOT1) 'echo /lib/firmware | paco -lp+ $PACKAGE'" >> $MKFILE.tmp
    353 +      echo -e "\t@\$(CHROOT1) 'find /etc/udev/rules.d -type f | paco -lp+ $PACKAGE'" >> $MKFILE.tmp
     607+      fnc_add_log "find /lib/udev/devices"
     608+      fnc_add_log "echo /lib/firmware"
     609+      fnc_add_log "find /etc/udev/rules.d -type f"
    354610+    ;;
    355611+    *util-linux)
    356 +      echo -e "\t@\$(CHROOT1) 'echo /var/lib/hwclock | paco -lp+ $PACKAGE'" >> $MKFILE.tmp
    357 +      echo -e "\t@\$(CHROOT1) 'echo /etc/nologin.txt | paco -lp+ $PACKAGE'" >> $MKFILE.tmp
     612+      fnc_add_log "echo /var/lib/hwclock"
     613+      fnc_add_log "echo /etc/nologin.txt"
    358614+    ;;
    359615+    *vim)
    360 +      echo -e "\t@\$(CHROOT1) 'echo /etc/vimrc | paco -lp+ $PACKAGE'" >> $MKFILE.tmp
    361 +    ;;
    362 +    # Rules below here will log configuration files created in LFS and HLFS
    363 +    # They will end up in a log named {h}lfs-sysconf
     616+      fnc_add_log "echo /etc/vimrc"
     617+    ;;
     618+    # Rules below here will log configuration files created in {C,H}LFS
     619+    # They will end up in a log named {c,h}lfs-sysconf
    364620+    *setclock)
    365 +      echo -e "\t@\$(CHROOT2) 'echo /etc/sysconfig/clock | paco -lp+ $PACKAGE'" >> $MKFILE.tmp
     621+      fnc_add_log "echo /etc/sysconfig/clock"
    366622+    ;;
    367623+    *inputrc)
    368 +      echo -e "\t@\$(CHROOT2) 'echo /etc/inputrc | paco -lp+ $PACKAGE'" >> $MKFILE.tmp
     624+      fnc_add_log "echo /etc/inputrc"
    369625+    ;;
    370626+    *profile)
    371 +      echo -e "\t@\$(CHROOT2) 'echo /etc/profile | paco -lp+ $PACKAGE'" >> $MKFILE.tmp
     627+      fnc_add_log "echo /etc/profile"
    372628+    ;;
    373629+    *hostname)
    374 +      echo -e "\t@\$(CHROOT2) 'echo /etc/sysconfig/network | paco -lp+ $PACKAGE'" >> $MKFILE.tmp
     630+      fnc_add_log "echo /etc/sysconfig/network"
    375631+    ;;
    376632+    *localnet)
    377 +      echo -e "\t@\$(CHROOT2) 'echo /etc/sysconfig/network | paco -lp+ $PACKAGE'" >> $MKFILE.tmp
     633+      fnc_add_log "echo /etc/sysconfig/network"
    378634+    ;;
    379635+    *hosts)
    380 +      echo -e "\t@\$(CHROOT2) 'echo /etc/hosts | paco -lp+ $PACKAGE'" >> $MKFILE.tmp
     636+      fnc_add_log "echo /etc/hosts"
    381637+    ;;
    382638+    *network)
    383 +      echo -e "\t@\$(CHROOT2) 'echo /etc/sysconfig/network-devices/ifconfig.eth0/ipv4 | paco -lp+ $PACKAGE'" >> $MKFILE.tmp
    384 +      echo -e "\t@\$(CHROOT2) 'echo /etc/resolv.conf | paco -lp+ $PACKAGE'" >> $MKFILE.tmp
     639+      fnc_add_log "echo /etc/sysconfig/network-devices/ifconfig.eth0/ipv4"
     640+      fnc_add_log "echo /etc/resolv.conf"
    385641+    ;;
    386642+    *fstab)
    387 +      echo -e "\t@\$(CHROOT2) 'echo /etc/fstab | paco -lp+ $PACKAGE'" >> $MKFILE.tmp
    388 +    ;;
    389 +    *theend) # LFS
    390 +      echo -e "\t@\$(CHROOT2) 'echo /etc/$PROGNAME-release | paco -lp+ $PACKAGE'" >> $MKFILE.tmp
     643+      fnc_add_log "echo /etc/fstab"
     644+    ;;
     645+    *theend) # LFS and CLFS
     646+      fnc_add_log "echo /etc/$PROGNAME-release"
    391647+    ;;
    392648+    *finished) # HLFS
    393 +      echo -e "\t@\$(CHROOT2) 'echo /etc/$PROGNAME-release | paco -lp+ $PACKAGE'" >> $MKFILE.tmp
     649+      fnc_add_log "echo /etc/$PROGNAME-release"
    394650+    ;;
    395651+  esac
     
    410666+  *pwdgroup)        LOG_PACKAGE=0 ;;
    411667+  *devices)         LOG_PACKAGE=0 ;;
     668+  *stripping)       LOG_PACKAGE=0 ;;
    412669+  *strippingagain)  LOG_PACKAGE=0 ;;
     670+  *adjusting)       LOG_PACKAGE=0 ;;
     671+  *temp-perl)       LOG_PACKAGE=0 ;;
    413672+  *readjusting)     LOG_PACKAGE=0 ;;
    414673+  *setclock)        LOG_PACKAGE=0 ;;
     
    437696+
    438697+# Test if paco is to be used
    439 +[ ! "$USE_PACO" = "1" ] && return
     698+[[ ! "$USE_PACO" = "1" ]] && return
    440699+
    441700+# If the file exists in the archive copy it to the $BUILDDIR/sources dir.
     
    467726+fi
    468727+}
     728+
     729+
     730+#----------------------------------#
     731+check_build_model() {              #
     732+#----------------------------------#
     733+# Check what script we're running, and set some switches accordingly
     734+
     735+CLFS_BOOT=0
     736+
     737+case $PROGNAME in
     738+  hlfs)
     739+    # Not using Paco with uClibc, even if requested
     740+    if [ "$MODEL" = "uclibc" ]; then
     741+      USE_PACO=0
     742+    fi
     743+  ;;
     744+  clfs)
     745+    # CLFS boot method require it's own commands
     746+    if [ "$METHOD" = "boot" ]; then
     747+      CLFS_BOOT=1
     748+    fi
     749+  ;;
     750+esac
     751+}
    469752Index: common/paco-build-lfs.sh
    470753===================================================================
    471754--- common/paco-build-lfs.sh    (revision 0)
    472755+++ common/paco-build-lfs.sh    (revision 0)
     756@@ -0,0 +1,10 @@
     757+#!/bin/sh
     758+set -e
     759+
     760+cd $PKGDIR
     761+./configure --sysconfdir=/etc \
     762+       --enable-scripts \
     763+       --disable-gpaco &&
     764+make &&
     765+make install &&
     766+make logme
     767Index: common/paco-build-clfs.sh
     768===================================================================
     769--- common/paco-build-clfs.sh   (revision 0)
     770+++ common/paco-build-clfs.sh   (revision 0)
    473771@@ -0,0 +1,10 @@
    474772+#!/bin/sh
     
    484782Index: common/common-functions
    485783===================================================================
    486 --- common/common-functions     (revision 2864)
     784--- common/common-functions     (revision 2873)
    487785+++ common/common-functions     (working copy)
    488786@@ -69,6 +69,9 @@
     
    496794         Optimize [0-2]
    497795           0 = no optimization
    498 @@ -759,6 +762,7 @@
     796@@ -732,6 +735,7 @@
     797                  --stringparam page $PAGE \
     798                  --stringparam lang $LANG \
     799                  --stringparam keymap $KEYMAP \
     800+                 --stringparam use_paco $USE_PACO \
     801                  -o ./${PROGNAME}-commands/ $XSL $BOOK/$ARCH-index.xml >>$LOGDIR/$LOG 2>&1
     802       ;;
     803 
     804@@ -759,6 +763,7 @@
    499805                  --stringparam lc_all $LC_ALL \
    500806                  --stringparam keymap $KEYMAP \
     
    504810       ;;
    505811     lfs)
    506 @@ -770,6 +774,7 @@
     812@@ -770,6 +775,7 @@
    507813                  --stringparam timezone $TIMEZONE \
    508814                  --stringparam page $PAGE \
     
    512818       ;;
    513819     *) exit 1 ;;
    514 @@ -836,6 +841,9 @@
     820@@ -836,6 +842,9 @@
    515821     # Generate URLs file
    516822   create_urls
     
    524830Index: HLFS/hlfs.xsl
    525831===================================================================
    526 --- HLFS/hlfs.xsl       (revision 2864)
     832--- HLFS/hlfs.xsl       (revision 2873)
    527833+++ HLFS/hlfs.xsl       (working copy)
    528834@@ -39,6 +39,9 @@
     
    547853         <xsl:text>cd ../blfs-bootscripts-&blfs-bootscripts-version;&#xA;</xsl:text>
    548854       </xsl:when>
    549 @@ -237,6 +244,27 @@
     855@@ -237,6 +244,25 @@
    550856         <xsl:apply-templates/>
    551857         <xsl:text> || true&#xA;</xsl:text>
    552858       </xsl:when>
    553 +
    554859+      <!-- paco begin -->
    555860+      <!-- General rule -->
     
    571876+      </xsl:when>
    572877+      <!-- paco end -->
    573 +
    574878       <!-- The rest of commands -->
    575879       <xsl:otherwise>
     
    577881Index: HLFS/master.sh
    578882===================================================================
    579 --- HLFS/master.sh      (revision 2864)
     883--- HLFS/master.sh      (revision 2873)
    580884+++ HLFS/master.sh      (working copy)
    581885@@ -76,7 +76,9 @@
     
    589893 
    590894     *)
    591 @@ -310,6 +312,11 @@
     895@@ -308,6 +310,11 @@
    592896     # Keep the script file name
    593897     this_script=`basename $file`
     
    601905     case $this_script in
    602906         # We'll run the chroot commands differently than the others, so skip them in the
    603 @@ -319,6 +326,18 @@
     907@@ -317,6 +324,18 @@
    604908       *-stripping* )  [[ "$STRIP" = "0" ]] && continue ;;
    605909     esac
     
    620924     name=`echo $this_script | sed -e 's@[0-9]\{3\}-@@'`
    621925 
    622 @@ -385,7 +404,9 @@
     926@@ -382,7 +401,9 @@
    623927         wrt_RunAsRoot "hlfs" "${this_script}" "${file}"
    624928         ;;
     
    630934     esac
    631935     #
    632 @@ -405,6 +426,16 @@
     936@@ -402,6 +423,16 @@
    633937     PREV=${this_script}${N}
    634938     # Set system_build envar for iteration targets
     
    647951 
    648952 }
    649 @@ -463,9 +494,19 @@
     953@@ -460,9 +491,19 @@
    650954         else  # Initialize the log and run the script
    651955           wrt_run_as_chroot2 "${this_script}" "${file}"
     
    669973Index: master.sh
    670974===================================================================
    671 --- master.sh   (revision 2864)
     975--- master.sh   (revision 2873)
    672976+++ master.sh   (working copy)
    673977@@ -149,6 +149,8 @@
Note: See TracChangeset for help on using the changeset viewer.