source: contrib/jhalfs-paco.patch@ dd29d02

1.0 2.3 2.3.x 2.4 ablfs ablfs-more legacy new_features trunk
Last change on this file since dd29d02 was 235f7e9, checked in by Manuel Canales Esparcia <manuel@…>, 18 years ago

Rediified paco patch.

  • Property mode set to 100644
File size: 21.9 KB
  • LFS/master.sh

     
    182182    # Keep the script file name
    183183    this_script=`basename $file`
    184184
     185    # If $this_script corresponds to a paco script, then skip it
     186    case "${this_script}" in
     187      *paco)       continue ;;
     188    esac
     189
    185190    # We'll run the chroot commands differently than the others, so skip them in the
    186191    # dependencies and target creation.
    187192    case "${this_script}" in
     
    189194      *stripping*) [[ "${STRIP}" = "0" ]] && continue ;;
    190195    esac
    191196
     197    # Install paco as the first package in ch6, before installing
     198    # linux-libc-headers, except in iterartive builds
     199    if [[ -z "$N" ]]; then
     200      case $this_script in
     201        *linux-libc-headers)
     202          TMP_SCRIPT="$this_script"
     203          this_script=`echo $this_script | sed -e 's/linux-libc-headers/a-paco/'`
     204          wrt_paco_inst "$this_script"
     205          this_script="$TMP_SCRIPT" ;;
     206      esac
     207    fi
     208
    192209    # Grab the name of the target
    193210    name=`echo ${this_script} | sed -e 's@[0-9]\{3\}-@@'`
    194211
     
    242259    # and not to use chroot.
    243260    case "${this_script}" in
    244261      *kernfs)  wrt_run_as_root    "${this_script}" "$file" ;;
    245       *)        wrt_run_as_chroot1 "${this_script}" "$file" ;;
     262      *)        wrt_paco_prep
     263                wrt_run_as_chroot1 "${this_script}" "$file"
     264                wrt_paco_log "$name" "$vrs" ;;
    246265    esac
    247266
    248267    # Remove the build directory(ies) except if the package build fails.
     
    262281    PREV=${this_script}${N}
    263282    # Set system_build envar for iteration targets
    264283    system_build=$chapter6
     284
     285    # Reinstalling paco after readsjusting the toolchain.
     286    case "${this_script}" in
     287      *readjusting)
     288        TMP_SCRIPT="$this_script"
     289        this_script=`echo ${this_script} | sed -e 's/readjusting/x-paco/'`
     290        wrt_paco_inst "$this_script"
     291        this_script="$TMP_SCRIPT" ;;
     292    esac
     293
    265294  done # end for file in chapter06/*
    266295}
    267296
     
    322351              else
    323352                wrt_run_as_chroot2 "$this_script" "$file"
    324353              fi
     354              wrt_paco_log "lfs-sysconf"
    325355        ;;
     356      *kernel)       wrt_paco_prep
     357                     wrt_run_as_chroot2 "$this_script" "$file"
     358                     wrt_paco_log "linux-kernel" "$vrs"
     359        ;;
     360      *bootscripts)  wrt_paco_prep
     361                     wrt_run_as_chroot2 "$this_script" "$file"
     362                     wrt_paco_log "lfs-bootscripts" "$vrs"
     363        ;;
    326364      *)        wrt_run_as_chroot2 "$this_script" "$file"
     365                wrt_paco_log "lfs-sysconf"
    327366        ;;
    328367    esac
    329368
  • LFS/lfs.xsl

     
    3232  <!-- Locale settings -->
    3333  <xsl:param name="lang" select="C"/>
    3434
     35  <!-- Use paco? -->
     36  <xsl:param name="use_paco" select="1"/>
     37
    3538  <xsl:template match="/">
    3639    <xsl:apply-templates select="//sect1"/>
    3740  </xsl:template>
     
    200203        <xsl:apply-templates/>
    201204        <xsl:text> || true&#xA;</xsl:text>
    202205      </xsl:when>
     206      <!-- paco begin -->
     207      <!-- General rule -->
     208      <xsl:when test="$use_paco != '0' and
     209                ancestor::chapter[@id != 'chapter-temporary-tools'] and
     210                contains(string(),'make') and
     211                contains(string(),'install')">
     212        <xsl:text>export LD_PRELOAD=/usr/lib/libpaco-log.so&#xA;</xsl:text>
     213        <xsl:apply-templates/>
     214        <xsl:text>&#xA;</xsl:text>
     215      </xsl:when>
     216      <!-- Linux-libc-headers -->
     217      <xsl:when test="$use_paco != '0' and
     218                ancestor::sect1[@id='ch-system-linux-libc-headers'] and
     219                contains(string(),'install ')">
     220        <xsl:text>export LD_PRELOAD=/usr/lib/libpaco-log.so&#xA;</xsl:text>
     221        <xsl:apply-templates/>
     222        <xsl:text>&#xA;</xsl:text>
     223      </xsl:when>
     224      <!-- Unset LD_PRELOAD before second make in Zlib -->
     225      <xsl:when test="$use_paco != '0' and
     226                ancestor::sect1[@id='ch-system-zlib'] and
     227                contains(string(),'make clean')">
     228        <xsl:text>unset LD_PRELOAD&#xA;</xsl:text>
     229        <xsl:apply-templates/>
     230        <xsl:text>&#xA;</xsl:text>
     231      </xsl:when>
     232      <!-- paco end -->
    203233      <!-- The rest of commands -->
    204234      <xsl:otherwise>
    205235        <xsl:apply-templates/>
  • common/paco-build-hlfs.sh

     
     1#!/bin/sh
     2set -e
     3
     4cd $PKGDIR
     5./configure --sysconfdir=/etc \
     6        --enable-scripts \
     7        --disable-gpaco \
     8        --disable-static \
     9        --with-pic &&
     10make &&
     11make install &&
     12make logme
  • common/config

     
    8484#--- Run farce testing 0(no)/1(yes)
    8585RUN_FARCE=0
    8686
     87#==== PACO VARIABLES ====
     88#--- Use paco? 0(no)/1(yes)
     89USE_PACO=1
     90PACO_VERSION=1.10.8
     91
     92#--- Name of the Paco source package
     93PACO_FILE=paco-$PACO_VERSION.tar.*
     94
    8795#==== INTERNAL VARIABLES ====
    8896# Don't edit it unless you know what you are doing
    8997
     
    101109
    102110#--- farce report log directory
    103111FARCELOGDIR=$LOGDIR/farce
     112
     113#--- Variables needed by paco
     114PACO_INCLUDE=/
     115PACO_EXCLUDE=/${SCRIPT_ROOT}
     116PACO_TMPFILE=/tmp/paco.tmp
     117LD_PRELOAD=/usr/lib/libpaco-log.so
  • common/func_validate_configs.sh

     
    8484inline_doc
    8585
    8686  # First internal variables, then the ones that change the book's flavour, and lastly system configuration variables
    87   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"
    88   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"
    89   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"
     87  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"
     88  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"
     89  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"
    9090
    9191  local -r ERROR_MSG_pt1='The variable \"${L_arrow}${config_param}${R_arrow}\" value ${L_arrow}${BOLD}${!config_param}${R_arrow} is invalid,'
    9292  local -r ERROR_MSG_pt2=' check the config file ${BOLD}${GREEN}\<$(echo $PROGNAME | tr [a-z] [A-Z])/config\> or \<common/config\>${OFF}'
     
    176176                    [[ "$GETPKG" = "1" ]] && validate_against_str "x0x x1x"
    177177                  fi ;;
    178178      RUNMAKE)    validate_against_str "x0x x1x" ;;
     179      USE_PACO)   validate_against_str "x0x x1x" ;;
    179180      REPORT)     validate_against_str "x0x x1x"
    180181                  if [[ "${!config_param}" = "1" ]]; then
    181182                    if [[ `type -p bc` ]]; then
  • common/paco-functions

     
     1#!/bin/bash
     2
     3#----------------------------#
     4wrt_paco_inst() {            #
     5#----------------------------#
     6
     7# Not using Paco with uClibc, even if requested
     8if [ $PROGNAME = "hlfs" ]; then
     9  if [ $MODEL = "uclibc" ]; then
     10    USE_PACO=0
     11  fi
     12fi
     13
     14if [ $USE_PACO != 0 ]; then
     15  paco_script="$1"
     16  paco_file="chapter06/$paco_script"
     17  chapter6="$chapter6 $paco_script"
     18
     19  # Copy the paco build script to the correct directory and make it executable
     20  cp $JHALFSDIR/paco-build-$PROGNAME.sh $JHALFSDIR/${PROGNAME}-commands/$paco_file &&
     21  chmod +x $JHALFSDIR/${PROGNAME}-commands/$paco_file
     22
     23  # Write target, dependency and unpack
     24  wrt_target "$paco_script" "$PREV"
     25  wrt_unpack2 "$PACO_FILE"
     26
     27  # Run the script
     28  wrt_run_as_chroot1 "${paco_script}" "${paco_file}"
     29
     30  # Clean up
     31  wrt_remove_build_dirs "paco"
     32  echo -e '\t@touch $@' >> $MKFILE.tmp
     33
     34  # Override the PREV variable
     35  PREV="$paco_script"
     36fi
     37}
     38
     39
     40#----------------------------------#
     41wrt_paco_prep() {                  # Export Paco variables
     42#----------------------------------# and remove tmpfile
     43
     44# Not using Paco with uClibc, even if requested
     45if [ $PROGNAME = "hlfs" ]; then
     46  if [ $MODEL = "uclibc" ]; then
     47    USE_PACO=0
     48  fi
     49fi
     50
     51check_log_package
     52
     53if [ $USE_PACO != 0 ] && [ $LOG_PACKAGE != 0 ]; then
     54(
     55cat  << EOF
     56        @echo "export PACO_INCLUDE=$PACO_INCLUDE" >> envars && \\
     57        echo "export PACO_EXCLUDE=\$(SRC):$PACO_EXCLUDE" >> envars && \\
     58        echo "export PACO_TMPFILE=$PACO_TMPFILE" >> envars && \\
     59        rm -f \$(MOUNT_PT)$PACO_TMPFILE
     60EOF
     61) >> $MKFILE.tmp
     62fi
     63}
     64
     65
     66#----------------------------------#
     67wrt_paco_log() {                   # If the tmpfile exist, then log the current package
     68#----------------------------------# and remove tempfile
     69local PACKAGE
     70
     71# Allow packages to be logged without version
     72if [[ $2 != "" ]] ; then
     73  PACKAGE="$1-$2";
     74else
     75  PACKAGE="$1"
     76fi
     77
     78# Not using Paco with uClibc, even if requested
     79if [ $PROGNAME = "hlfs" ]; then
     80  if [ $MODEL = "uclibc" ]; then
     81    USE_PACO=0
     82  fi
     83fi
     84
     85check_log_package
     86
     87if [ $USE_PACO != 0 ]; then
     88  if [ $LOG_PACKAGE != 0 ]; then
     89(
     90cat << EOF
     91        @if [ -e \$(MOUNT_PT)$PACO_TMPFILE ]; then \\
     92                \$(CHROOT1) 'paco -lp+ $PACKAGE < $PACO_TMPFILE' && \\
     93                rm -f \$(MOUNT_PT)$PACO_TMPFILE; \\
     94        fi;
     95EOF
     96) >> $MKFILE.tmp
     97  fi
     98  wrt_paco_add_log
     99fi
     100}
     101
     102
     103#----------------------------------#
     104wrt_paco_add_log() {               #
     105#----------------------------------#
     106# Some packages create files using bash redirection, which the LD_PRELOAD lib don't notice
     107# These rules will add the missing files to the proper logs.
     108# Most of these is not needed for HLFS, but they do no harm.
     109if [ $USE_PACO != 0 ]; then
     110  case $this_script in
     111    *glibc)
     112      echo -e "\t@\$(CHROOT1) 'find /lib -type l | paco -lp+ $PACKAGE'" >> $MKFILE.tmp
     113      echo -e "\t@\$(CHROOT1) 'find /etc/{nsswitch.conf,ld.so.conf} | paco -lp+ $PACKAGE'" >> $MKFILE.tmp
     114    ;;
     115    *ncurses)
     116      LIBS="/usr/lib/{libcurses.so,libncurses.so,libform.so,libpanel.so,libmenu.so}"
     117      echo -e "\t@\$(CHROOT1) 'find $LIBS | paco -lp+ $PACKAGE'" >> $MKFILE.tmp
     118    ;;
     119    *bash)
     120      echo -e "\t@\$(CHROOT1) 'echo /bin/sh | paco -lp+ $PACKAGE'" >> $MKFILE.tmp
     121    ;;
     122    *flex)
     123      echo -e "\t@\$(CHROOT1) 'echo /usr/bin/lex | paco -lp+ $PACKAGE'" >> $MKFILE.tmp
     124    ;;
     125    *shadow)
     126      echo -e "\t@\$(CHROOT1) 'echo /etc/login.defs | paco -lp+ $PACKAGE'" >> $MKFILE.tmp
     127    ;;
     128    *hotplug)
     129      echo -e "\t@\$(CHROOT1) 'echo /var/log/hotplug | paco -lp+ $PACKAGE'" >> $MKFILE.tmp
     130      echo -e "\t@\$(CHROOT1) 'echo /var/run/usb | paco -lp+ $PACKAGE'" >> $MKFILE.tmp
     131    ;;
     132    *sysklogd)
     133      echo -e "\t@\$(CHROOT1) 'echo /etc/syslog.conf | paco -lp+ $PACKAGE'" >> $MKFILE.tmp
     134    ;;
     135    *sysvinit)
     136      echo -e "\t@\$(CHROOT1) 'echo /etc/inittab | paco -lp+ $PACKAGE'" >> $MKFILE.tmp
     137    ;;
     138    *udev)
     139      echo -e "\t@\$(CHROOT1) 'find /lib/udev/devices | paco -lp+ $PACKAGE'" >> $MKFILE.tmp
     140      echo -e "\t@\$(CHROOT1) 'echo /lib/firmware | paco -lp+ $PACKAGE'" >> $MKFILE.tmp
     141      echo -e "\t@\$(CHROOT1) 'find /etc/udev/rules.d -type f | paco -lp+ $PACKAGE'" >> $MKFILE.tmp
     142    ;;
     143    *util-linux)
     144      echo -e "\t@\$(CHROOT1) 'echo /var/lib/hwclock | paco -lp+ $PACKAGE'" >> $MKFILE.tmp
     145      echo -e "\t@\$(CHROOT1) 'echo /etc/nologin.txt | paco -lp+ $PACKAGE'" >> $MKFILE.tmp
     146    ;;
     147    *vim)
     148      echo -e "\t@\$(CHROOT1) 'echo /etc/vimrc | paco -lp+ $PACKAGE'" >> $MKFILE.tmp
     149    ;;
     150    # Rules below here will log configuration files created in LFS and HLFS
     151    # They will end up in a log named {h}lfs-sysconf
     152    *setclock)
     153      echo -e "\t@\$(CHROOT2) 'echo /etc/sysconfig/clock | paco -lp+ $PACKAGE'" >> $MKFILE.tmp
     154    ;;
     155    *inputrc)
     156      echo -e "\t@\$(CHROOT2) 'echo /etc/inputrc | paco -lp+ $PACKAGE'" >> $MKFILE.tmp
     157    ;;
     158    *profile)
     159      echo -e "\t@\$(CHROOT2) 'echo /etc/profile | paco -lp+ $PACKAGE'" >> $MKFILE.tmp
     160    ;;
     161    *hostname)
     162      echo -e "\t@\$(CHROOT2) 'echo /etc/sysconfig/network | paco -lp+ $PACKAGE'" >> $MKFILE.tmp
     163    ;;
     164    *localnet)
     165      echo -e "\t@\$(CHROOT2) 'echo /etc/sysconfig/network | paco -lp+ $PACKAGE'" >> $MKFILE.tmp
     166    ;;
     167    *hosts)
     168      echo -e "\t@\$(CHROOT2) 'echo /etc/hosts | paco -lp+ $PACKAGE'" >> $MKFILE.tmp
     169    ;;
     170    *network)
     171      echo -e "\t@\$(CHROOT2) 'echo /etc/sysconfig/network-devices/ifconfig.eth0/ipv4 | paco -lp+ $PACKAGE'" >> $MKFILE.tmp
     172      echo -e "\t@\$(CHROOT2) 'echo /etc/resolv.conf | paco -lp+ $PACKAGE'" >> $MKFILE.tmp
     173    ;;
     174    *fstab)
     175      echo -e "\t@\$(CHROOT2) 'echo /etc/fstab | paco -lp+ $PACKAGE'" >> $MKFILE.tmp
     176    ;;
     177    *theend) # LFS
     178      echo -e "\t@\$(CHROOT2) 'echo /etc/$PROGNAME-release | paco -lp+ $PACKAGE'" >> $MKFILE.tmp
     179    ;;
     180    *finished) # HLFS
     181      echo -e "\t@\$(CHROOT2) 'echo /etc/$PROGNAME-release | paco -lp+ $PACKAGE'" >> $MKFILE.tmp
     182    ;;
     183  esac
     184fi
     185}
     186
     187
     188#----------------------------------#
     189check_log_package() {              #
     190#----------------------------------#
     191# Maybe don't need this function, but it will avoid writing some
     192# unnecessary paco commands in the Makefile.
     193
     194case $this_script in
     195  *creatingdirs)    LOG_PACKAGE=0 ;;
     196  *createfiles)     LOG_PACKAGE=0 ;;
     197  *strippingagain)  LOG_PACKAGE=0 ;;
     198  *readjusting)     LOG_PACKAGE=0 ;;
     199  *setclock)        LOG_PACKAGE=0 ;;
     200  *inputrc)         LOG_PACKAGE=0 ;;
     201  *profile)         LOG_PACKAGE=0 ;;
     202  *hostname)        LOG_PACKAGE=0 ;;
     203  *localnet)        LOG_PACKAGE=0 ;;
     204  *hosts)           LOG_PACKAGE=0 ;;
     205  *network)         LOG_PACKAGE=0 ;;
     206  *fstab)           LOG_PACKAGE=0 ;;
     207  *theend)          LOG_PACKAGE=0 ;;
     208  *finished)        LOG_PACKAGE=0 ;;
     209  *)                LOG_PACKAGE=1 ;;
     210esac
     211}
  • common/paco-build-lfs.sh

     
     1#!/bin/sh
     2set -e
     3
     4cd $PKGDIR
     5./configure --sysconfdir=/etc \
     6        --enable-scripts \
     7        --disable-gpaco &&
     8make &&
     9make install &&
     10make logme
  • common/common-functions

     
    6565        in the configuration file has the proper packages and patches for the
    6666        book version being processed.
    6767
     68${BOLD}  --no-paco${OFF}
     69        dissables paco logging feature.
     70
    6871${BOLD}  -O, --optimize${OFF}
    6972        Optimize [0-2]
    7073          0 = no optimization
     
    645648                 --stringparam lc_all $LC_ALL \
    646649                 --stringparam keymap $KEYMAP \
    647650                 --stringparam grsecurity_host $GRSECURITY_HOST \
     651                 --stringparam use_paco $USE_PACO \
    648652                 -o ./${PROGNAME}-commands/ $XSL $BOOK/index.xml >>$LOGDIR/$LOG 2>&1
    649653      ;;
    650654    lfs)
     
    656660                 --stringparam timezone $TIMEZONE \
    657661                 --stringparam page $PAGE \
    658662                 --stringparam lang $LANG \
     663                 --stringparam use_paco $USE_PACO \
    659664                 -o ./${PROGNAME}-commands/ $XSL $BOOK/index.xml >>$LOGDIR/$LOG 2>&1
    660665      ;;
    661666    *) exit 1 ;;
  • HLFS/hlfs.xsl

     
    3939  <xsl:param name="lang" select="C"/>
    4040  <xsl:param name="lc_all" select="C"/>
    4141
     42  <!-- Use paco? -->
     43  <xsl:param name="use_paco" select="1"/>
     44
    4245  <xsl:template match="/">
    4346    <xsl:apply-templates select="//sect1"/>
    4447  </xsl:template>
     
    191194      <!-- Fixing bootscripts installation -->
    192195      <xsl:when test="ancestor::sect1[@id='bootable-bootscripts'] and
    193196                string() = 'make install'">
     197        <!-- inserting LD_PRELOAD before installing bootscripts -->
     198        <xsl:if test="$use_paco != '0' and $model != 'uclibc'">
     199          <xsl:text>export LD_PRELOAD=/usr/lib/libpaco-log.so&#xA;</xsl:text>
     200        </xsl:if>
    194201        <xsl:text>make install&#xA;</xsl:text>
    195202        <xsl:text>cd ../blfs-bootscripts-&blfs-bootscripts-version;&#xA;</xsl:text>
    196203      </xsl:when>
     
    257264        <xsl:apply-templates/>
    258265        <xsl:text> || true&#xA;</xsl:text>
    259266      </xsl:when>
     267      <!-- paco begin -->
     268      <!-- General rule -->
     269      <xsl:when test="$use_paco != '0' and $model != 'uclibc' and
     270                ancestor::chapter[@id != 'chapter-temporary-tools'] and
     271                contains(string(),'make') and
     272                contains(string(),'install')">
     273        <xsl:text>export LD_PRELOAD=/usr/lib/libpaco-log.so&#xA;</xsl:text>
     274        <xsl:apply-templates/>
     275        <xsl:text>&#xA;</xsl:text>
     276      </xsl:when>
     277      <!-- Linux-libc-headers -->
     278      <xsl:when test="$use_paco != '0' and $model != 'uclibc' and
     279                ancestor::sect1[@id='ch-system-linux-libc-headers'] and
     280                contains(string(),'install ')">
     281        <xsl:text>export LD_PRELOAD=/usr/lib/libpaco-log.so&#xA;</xsl:text>
     282        <xsl:apply-templates/>
     283        <xsl:text>&#xA;</xsl:text>
     284      </xsl:when>
     285      <!-- paco end -->
    260286      <!-- The rest of commands -->
    261287      <xsl:otherwise>
    262288        <xsl:apply-templates/>
  • HLFS/master.sh

     
    259259    # Keep the script file name
    260260    this_script=`basename $file`
    261261
     262    # If this script is *-paco, then skip it
     263    case $this_script in
     264      *paco )     continue ;;
     265    esac
     266
    262267    # Skip this script depending on jhalfs.conf flags set.
    263268    case $this_script in
    264269        # We'll run the chroot commands differently than the others, so skip them in the
     
    268273      *-stripping* )  [[ "$STRIP" = "0" ]] && continue ;;
    269274    esac
    270275
     276    # Install paco as the first package in ch6, before installing
     277    # linux-libc-headers, except in iterartive builds
     278    if [[ -z "$N" ]]; then
     279      case $this_script in
     280        *linux-libc-headers)
     281          TMP_SCRIPT="$this_script"
     282          this_script=`echo $this_script | sed -e 's/linux-libc-headers/a-paco/'`
     283          wrt_paco_inst "$this_script"
     284          this_script="$TMP_SCRIPT" ;;
     285      esac
     286    fi
     287
    271288    # Grab the name of the target
    272289    name=`echo $this_script | sed -e 's@[0-9]\{3\}-@@'`
    273290
     
    348365        wrt_run_as_root "${this_script}" "${file}"
    349366        ;;
    350367      *)   # The rest of Chapter06
     368        wrt_paco_prep
    351369        wrt_run_as_chroot1 "${this_script}" "${file}"
     370        wrt_paco_log "$name" "$vrs"
    352371       ;;
    353372    esac
    354373    #
     
    381400    PREV=${this_script}${N}
    382401    # Set system_build envar for iteration targets
    383402    system_build=$chapter6
     403
     404    # Reinstall paco after the toolchain has been readjusted.
     405    case "${this_script}" in
     406      *readjusting)
     407        TMP_SCRIPT="$this_script"
     408        this_script=`echo $this_script | sed -e 's/readjusting/x-paco/'`
     409        wrt_paco_inst "$this_script"
     410        this_script="$TMP_SCRIPT" ;;
     411    esac
     412
    384413  done # end for file in chapter06/*
    385414
    386415}
     
    442471        else  # Initialize the log and run the script
    443472          wrt_run_as_chroot2 "${this_script}" "${file}"
    444473        fi
     474        wrt_paco_log "hlfs-sysconf"
    445475        ;;
     476      *kernel)       wrt_paco_prep
     477                     wrt_run_as_chroot2 "$this_script" "$file"
     478                     version=`grep "^linux-version" $JHALFSDIR/packages | sed -e 's/.* //' -e 's/"//g'`
     479                     wrt_paco_log "linux-kernel" "$version"
     480        ;;
     481      *bootscripts)  wrt_paco_prep
     482                     wrt_run_as_chroot2 "$this_script" "$file"
     483                     wrt_paco_log "hlfs-bootscripts"
     484        ;;
    446485      *)  # All other scripts
    447486        wrt_run_as_chroot2 "${this_script}" "${file}"
     487        wrt_paco_log "hlfs-sysconf"
    448488        ;;
    449489    esac
    450490
  • master.sh

     
    148148
    149149    --help | -h )  usage | more && exit  ;;
    150150
     151    --no-paco )            USE_PACO=0    ;;
     152
    151153    --optimize | -O )
    152154      test $# = 1 && eval "$exit_missing_arg"
    153155      shift
     
    439441  [[ $VERBOSITY > 0 ]] && echo "OK"
    440442fi
    441443#
     444# paco module
     445if [[ "$USE_PACO" = "1" ]]; then
     446  [[ $VERBOSITY > 0 ]] && echo -n "Loading paco module..."
     447  source $COMMON_DIR/paco-functions
     448  [[ $? > 0 ]] && echo "$COMMON_DIR/paco-functions did not load.." && exit 2
     449  [[ $VERBOSITY > 0 ]] && echo "OK"
     450fi
     451#
    442452# optimize module
    443453if [[ "$OPTIMIZE" != "0" ]]; then
    444454  [[ $VERBOSITY > 0 ]] && echo -n "Loading optimization module..."
     
    485495if [[ "$PWD" != "$JHALFSDIR" ]]; then
    486496  cp $COMMON_DIR/{makefile-functions,progress_bar.sh} $JHALFSDIR/
    487497  #
     498  [[ $USE_PACO != "0" ]] && cp $COMMON_DIR/paco-build-$PROGNAME.sh $JHALFSDIR/
     499  #
    488500  [[ "$OPTIMIZE" != "0" ]] && cp optimize/opt_override $JHALFSDIR/
    489501  #
    490502  if [[ "$COMPARE" != "0" ]] ; then
Note: See TracBrowser for help on using the repository browser.