List Info

Thread: Paco-patch update svn-2624




Paco-patch update svn-2624
user name
2006-05-03 06:57:43
Fixed an unclosed if statement in BLFS/master.sh


Tor Olav
Index: LFS/master.sh
============================================================
=======
--- LFS/master.sh	(revision 2624)
+++ LFS/master.sh	(working copy)
 -179,6
+179,18 
       *stripping*) [[ "$" =
"0" ]] && continue ;;
     esac
 
+    # Install paco as the first package in ch6, before
installing
+    # linux-libc-headers, except in iterartive builds
+    if [[ -z "$N" ]]; then
+      case $this_script in
+        *linux-libc-headers)
+          TMP_SCRIPT="$this_script"
+          this_script=`echo $this_script | sed -e
's/linux-libc-headers/a-paco/'`
+          wrt_paco_inst "$this_script"
+          this_script="$TMP_SCRIPT" ;;
+      esac
+    fi
+
     # Grab the name of the target
     name=`echo $ | sed -e 's[0-9]\{3\}-'`
 
 -221,7
+233,9 
     # and not to use chroot.
     case "$" in
       *kernfs)  wrt_run_as_root   
"$" "$file" ;;
-      *)        wrt_run_as_chroot1
"$" "$file" ;;
+      *)        wrt_paco_prep
+                wrt_run_as_chroot1
"$" "$file"
+                wrt_paco_log "$name"
"$vrs" ;;
     esac
 
     # Remove the build directory(ies) except if the package
build fails.
 -241,6
+255,16 
     PREV=$$
     # Set system_build envar for iteration targets
     system_build=$chapter6
+
+    # Reinstalling paco after readsjusting the toolchain.
+    case "$" in
+      *readjusting)
+        TMP_SCRIPT="$this_script"
+        this_script=`echo $ | sed -e
's/readjusting/x-paco/'`
+        wrt_paco_inst "$this_script"
+        this_script="$TMP_SCRIPT" ;;
+    esac
+
   done # end for file in chapter06/*
 }
 
 -302,6
+326,14 
                 wrt_run_as_chroot2
"$this_script" "$file"
               fi
         ;;
+      *kernel)       wrt_paco_prep
+                     wrt_run_as_chroot2
"$this_script" "$file"
+                     wrt_paco_log
"linux-kernel" "$vrs"
+        ;;
+      *bootscripts)  wrt_paco_prep
+                     wrt_run_as_chroot2
"$this_script" "$file"
+                     wrt_paco_log
"lfs-bootscripts" "$vrs"
+        ;;
       *)        wrt_run_as_chroot2
"$this_script" "$file"
         ;;
     esac
Index: LFS/lfs.xsl
============================================================
=======
--- LFS/lfs.xsl	(revision 2624)
+++ LFS/lfs.xsl	(working copy)
 -32,6
+32,9 
   <!-- Locale settings -->
   <xsl:param name="lang"
select="en_CA"/>
 
+  <!-- Use paco? -->
+  <xsl:param name="use_paco"
select="1"/>
+
   <xsl:template match="/">
     <xsl:apply-templates
select="//sect1"/>
   </xsl:template>
 -190,6
+193,33 
         <xsl:apply-templates/>
         <xsl:text> || true&#xA;</xsl:text>
       </xsl:when>
+      <!-- paco begin -->
+      <!-- General rule -->
+      <xsl:when test="$use_paco != '0' and
+                ancestor::chapter[id !=
'chapter-temporary-tools'] and
+                contains(string(),'make') and
+                contains(string(),'install')">
+        <xsl:text>export
LD_PRELOAD=/usr/lib/libpaco-log.so&#xA;</xsl:text>
+        <xsl:apply-templates/>
+        <xsl:text>&#xA;</xsl:text>
+      </xsl:when>
+      <!-- Linux-libc-headers -->
+      <xsl:when test="$use_paco != '0' and
+                ancestor::sect1[id='ch-system-linux-libc-headers'] and
+                contains(string(),'install ')">
+        <xsl:text>export
LD_PRELOAD=/usr/lib/libpaco-log.so&#xA;</xsl:text>
+        <xsl:apply-templates/>
+        <xsl:text>&#xA;</xsl:text>
+      </xsl:when>
+      <!-- Unset LD_PRELOAD before second make in Zlib
-->
+      <xsl:when test="$use_paco != '0' and
+                ancestor::sect1[id='ch-system-zlib'] and
+                contains(string(),'make
clean')">
+        <xsl:text>unset
LD_PRELOAD&#xA;</xsl:text>
+        <xsl:apply-templates/>
+        <xsl:text>&#xA;</xsl:text>
+      </xsl:when>
+      <!-- paco end -->
       <!-- The rest of commands -->
       <xsl:otherwise>
         <xsl:apply-templates/>
Index: BLFS/master.sh
============================================================
=======
--- BLFS/master.sh	(revision 2624)
+++ BLFS/master.sh	(working copy)
 -79,6
+79,19 
 EOF
 ) >> $MKFILE
 
+    if [[ $USE_PACO != 0 ]]; then
+(
+    cat << EOF
+	echo -e "\n\`date\`\n\nKB: \`du -sk
--exclude=logs/* /\`\n" >logs/$this_script
&& \\
+	source $JHALFSDIR/pacovars && \\
+	rm -f $PACO_TMPFILE && \\
+	$JHALFSDIR/$-commands/$file
>>logs/$this_script 2>&1 && \\
+	echo -e "\n\`date\`\n\nKB: \`du -sk
--exclude=logs/* /\`\n" >>logs/$this_script
+EOF
+) >> $MKFILE
+    wrt_paco_log_blfs
+
+    else
     # Insert date and disk usage at the top of the log
file, the script run
     # and date and disk usage again at the bottom of the
log file.
 (
 -88,6
+101,7 
 	echo -e "\n\`date\`\n\nKB: \`du -sk
--exclude=logs/* /\`\n" >>logs/$this_script
 EOF
 ) >> $MKFILE
+    fi
 
     # Include a touch of the target name so make can check
     # if it's already been made.
Index: BLFS/blfs.xsl
============================================================
=======
--- BLFS/blfs.xsl	(revision 2624)
+++ BLFS/blfs.xsl	(working copy)
 -159,7
+159,7 
         <xsl:when test="role =
'nodump'"/>
         <xsl:otherwise>
           <xsl:if test="role = 'root'">
-            <xsl:text>sudo </xsl:text>
+            <xsl:text>export
LD_PRELOAD=/usr/lib/libpaco-log.so&#xA;</xsl:text>
           </xsl:if>
           <xsl:apply-templates
select="userinput"
mode="screen"/>
         </xsl:otherwise>
Index: common/config
============================================================
=======
--- common/config	(revision 2624)
+++ common/config	(working copy)
 -80,6
+80,14 
 #--- Run farce testing 0(no)/1(yes)
 RUN_FARCE=0
 
+#==== PACO VARIABLES ====
+#--- Use paco? 0(no)/1(yes)
+USE_PACO=1
+PACO_VERSION=1.10.7
+
+#--- Name of the Paco source package
+PACO_FILE=paco-$PACO_VERSION.tar.*
+
 #==== INTERNAL VARIABLES ====
 # Don't edit it unless you know what you are doing
 
 -92,3
+100,9 
 
 #--- farce report log directory
 FARCELOGDIR=$LOGDIR/farce
+
+#--- Variables needed by paco
+PACO_INCLUDE=/
+PACO_EXCLUDE=/sys:/dev:/proc:/tmp:/usr/src:/usr/share/info/
dir:/jhalfs
+PACO_TMPFILE=/tmp/paco.tmp
+LD_PRELOAD=/usr/lib/libpaco-log.so
Index: common/func_validate_configs.sh
============================================================
=======
--- common/func_validate_configs.sh	(revision 2624)
+++ common/func_validate_configs.sh	(working copy)
 -84,10
+84,10 
 inline_doc
 
   # First internal variables, then the ones that change the
book's flavour, and lastly system configuration variables
-  local -r blfs_PARAM_LIST="BOOK BUILDDIR SRC_ARCHIVE
GETPKG         DEPEND                TEST"
-  local -r hlfs_PARAM_LIST="BOOK BUILDDIR SRC_ARCHIVE
GETPKG RUNMAKE MODEL GRSECURITY_HOST TEST REPORT COMPARE
RUN_ICA RUN_FARCE ITERATIONS STRIP FSTAB             CONFIG
KEYMAP         PAGE TIMEZONE LANG LC_ALL"
-  local -r clfs_PARAM_LIST="BOOK BUILDDIR SRC_ARCHIVE
GETPKG RUNMAKE METHOD  ARCH  TARGET  TEST REPORT COMPARE
RUN_ICA RUN_FARCE ITERATIONS STRIP FSTAB BOOT_CONFIG CONFIG
KEYMAP VIMLANG PAGE TIMEZONE LANG"
-  local -r  lfs_PARAM_LIST="BOOK BUILDDIR SRC_ARCHIVE
GETPKG RUNMAKE                       TEST REPORT COMPARE
RUN_ICA RUN_FARCE ITERATIONS STRIP FSTAB             CONFIG 
      VIMLANG PAGE TIMEZONE LANG"
+  local -r blfs_PARAM_LIST="BOOK BUILDDIR SRC_ARCHIVE
USE_PACO GETPKG         DEPEND                TEST"
+  local -r hlfs_PARAM_LIST="BOOK BUILDDIR SRC_ARCHIVE
USE_PACO GETPKG RUNMAKE MODEL GRSECURITY_HOST TEST REPORT
COMPARE RUN_ICA RUN_FARCE ITERATIONS STRIP FSTAB            
CONFIG KEYMAP         PAGE TIMEZONE LANG LC_ALL"
+  local -r clfs_PARAM_LIST="BOOK BUILDDIR SRC_ARCHIVE
USE_PACO GETPKG RUNMAKE METHOD  ARCH  TARGET  TEST REPORT
COMPARE RUN_ICA RUN_FARCE ITERATIONS STRIP FSTAB BOOT_CONFIG
CONFIG KEYMAP VIMLANG PAGE TIMEZONE LANG"
+  local -r  lfs_PARAM_LIST="BOOK BUILDDIR SRC_ARCHIVE
USE_PACO GETPKG RUNMAKE                       TEST REPORT
COMPARE RUN_ICA RUN_FARCE ITERATIONS STRIP FSTAB            
CONFIG        VIMLANG PAGE TIMEZONE LANG"
 
   local -r ERROR_MSG_pt1='The variable
\"$$$\" value
$$${!config_param}$ is invalid,'
   local -r ERROR_MSG_pt2=' check the config file
$$\<$(echo $PROGNAME | tr [a-z]
[A-Z])/config\> or \<common/config\>$'
 -179,6
+179,7 
       # Validate general parameters..
       GETPKG)     validate_against_str "x0x
x1x" ;;
       RUNMAKE)    validate_against_str "x0x
x1x" ;;
+      USE_PACO)   validate_against_str "x0x
x1x" ;;
       REPORT)     validate_against_str "x0x
x1x"
                   if [[ "${!config_param}" =
"1" ]]; then
                     if [[ `type -p bc` ]]; then
Index: common/common-functions
============================================================
=======
--- common/common-functions	(revision 2624)
+++ common/common-functions	(working copy)
 -60,6
+60,9 
         in the configuration file has the proper packages
and patches for the
         book version being processed.
 
+$  --no-paco$
+        dissables paco logging feature.
+
 $  -T, --testsuites N $
         Run test suites  [0-3]
           0 = none
 -567,6
+570,7 
                  --stringparam lc_all $LC_ALL \
                  --stringparam keymap $KEYMAP \
                  --stringparam grsecurity_host
$GRSECURITY_HOST \
+                 --stringparam use_paco $USE_PACO \
                  -o ./$-commands/ $XSL
$BOOK/index.xml >>$LOGDIR/$LOG 2>&1
       ;;
     lfs)
 -578,6
+582,7 
                  --stringparam timezone $TIMEZONE \
                  --stringparam page $PAGE \
                  --stringparam lang $LANG \
+                 --stringparam use_paco $USE_PACO \
                  -o ./$-commands/ $XSL
$BOOK/index.xml >>$LOGDIR/$LOG 2>&1
       ;;
     blfs)
Index: HLFS/hlfs.xsl
============================================================
=======
--- HLFS/hlfs.xsl	(revision 2624)
+++ HLFS/hlfs.xsl	(working copy)
 -39,6
+39,9 
   <xsl:param name="lang"
select="en_CA"/>
   <xsl:param name="lc_all"
select="en_CA"/>
 
+  <!-- Use paco? -->
+  <xsl:param name="use_paco"
select="1"/>
+
   <xsl:template match="/">
     <xsl:apply-templates
select="//sect1"/>
   </xsl:template>
 -191,6
+194,10 
       <!-- Fixing bootscripts installation -->
       <xsl:when test="ancestor::sect1[id='bootable-bootscripts'] and
                 string() = 'make install'">
+        <!-- inserting LD_PRELOAD before installing
bootscripts -->
+        <xsl:if test="$use_paco != '0' and
$model != 'uclibc'">
+          <xsl:text>export
LD_PRELOAD=/usr/lib/libpaco-log.so&#xA;</xsl:text>
+        </xsl:if>
         <xsl:text>make
install&#xA;</xsl:text>
         <xsl:text>cd
../blfs-bootscripts-&blfs-bootscripts-version;&#xA;&
lt;/xsl:text>
       </xsl:when>
 -248,6
+255,25 
         <xsl:apply-templates/>
         <xsl:text> || true&#xA;</xsl:text>
       </xsl:when>
+      <!-- paco begin -->
+      <!-- General rule -->
+      <xsl:when test="$use_paco != '0' and
$model != 'uclibc' and
+                ancestor::chapter[id !=
'chapter-temporary-tools'] and
+                contains(string(),'make') and
+                contains(string(),'install')">
+        <xsl:text>export
LD_PRELOAD=/usr/lib/libpaco-log.so&#xA;</xsl:text>
+        <xsl:apply-templates/>
+        <xsl:text>&#xA;</xsl:text>
+      </xsl:when>
+      <!-- Linux-libc-headers -->
+      <xsl:when test="$use_paco != '0' and
$model != 'uclibc' and
+                ancestor::sect1[id='ch-system-linux-libc-headers'] and
+                contains(string(),'install ')">
+        <xsl:text>export
LD_PRELOAD=/usr/lib/libpaco-log.so&#xA;</xsl:text>
+        <xsl:apply-templates/>
+        <xsl:text>&#xA;</xsl:text>
+      </xsl:when>
+      <!-- paco end -->
       <!-- The rest of commands -->
       <xsl:otherwise>
         <xsl:apply-templates/>
Index: HLFS/master.sh
============================================================
=======
--- HLFS/master.sh	(revision 2624)
+++ HLFS/master.sh	(working copy)
 -253,6
+253,18 
       *-stripping* )  [[ "$STRIP" =
"0" ]] && continue ;;
     esac
 
+    # Install paco as the first package in ch6, before
installing
+    # linux-libc-headers, except in iterartive builds
+    if [[ -z "$N" ]]; then
+      case $this_script in
+        *linux-libc-headers)
+          TMP_SCRIPT="$this_script"
+          this_script=`echo $this_script | sed -e
's/linux-libc-headers/a-paco/'`
+          wrt_paco_inst "$this_script"
+          this_script="$TMP_SCRIPT" ;;
+      esac
+    fi
+
     # Grab the name of the target
     name=`echo $this_script | sed -e 's[0-9]\{3\}-'`
 
 -322,7
+334,9 
         wrt_run_as_root "$"
"$"
         ;;
       *)   # The rest of Chapter06
+        wrt_paco_prep
         wrt_run_as_chroot1 "$"
"$"
+        wrt_paco_log "$name" "$vrs"
        ;;
     esac
     #
 -355,6
+369,16 
     PREV=$$
     # Set system_build envar for iteration targets
     system_build=$chapter6
+
+    # Reinstall paco after the toolchain has been
readjusted.
+    case "$" in
+      *readjusting)
+        TMP_SCRIPT="$this_script"
+        this_script=`echo $this_script | sed -e
's/readjusting/x-paco/'`
+        wrt_paco_inst "$this_script"
+        this_script="$TMP_SCRIPT" ;;
+    esac
+
   done # end for file in chapter06/*
 
 }
 -417,6
+441,15 
           wrt_run_as_chroot2 "$"
"$"
         fi
         ;;
+      *kernel)       wrt_paco_prep
+                     wrt_run_as_chroot2
"$this_script" "$file"
+                     version=`grep
"^linux-version" $JHALFSDIR/packages | sed -e
's/.* //' -e 's/"//g'`
+                     wrt_paco_log
"linux-kernel" "$version"
+        ;;
+      *bootscripts)  wrt_paco_prep
+                     wrt_run_as_chroot2
"$this_script" "$file"
+                     wrt_paco_log
"hlfs-bootscripts"
+        ;;
       *)  # All other scripts
         wrt_run_as_chroot2 "$"
"$"
         ;;
Index: master.sh
============================================================
=======
--- master.sh	(revision 2624)
+++ master.sh	(working copy)
 -70,6
+70,11 
 source $MODULE
 [[ $? > 0 ]] && echo "$MODULE did not
load.." && exit 2
 [[ $VERBOSITY > 0 ]] && echo "OK"
+# Load paco-functions
+[[ $VERBOSITY > 0 ]] && echo -n "Loading
paco module..."
+source $COMMON_DIR/paco-functions
+[[ $? > 0 ]] && echo
"$COMMON_DIR/paco-functions did not load.."
&& exit 2
+[[ $VERBOSITY > 0 ]] && echo "OK"
 #
 [[ $VERBOSITY > 0 ]] && echo
"$$"
 
 -152,6
+157,8 
 
     --help | -h )  usage | more && exit  ;;
 
+    --no-paco )            USE_PACO=0    ;;
+
     --testsuites | -T )
       test $# = 1 && eval
"$exit_missing_arg"
       shift
 -468,6
+475,15 
 
 if [[ "$PWD" != "$JHALFSDIR" ]];
then
   cp $COMMON_DIR/makefile-functions $JHALFSDIR/
+  if [[ $USE_PACO != "0" ]] ; then
+    if [[ $PROGNAME != "blfs" ]]; then
+      cp $COMMON_DIR/paco-build-$PROGNAME.sh $JHALFSDIR/
+    else
+      echo -e "export
PACO_INCLUDE=$PACO_INCLUDE" > $JHALFSDIR/pacovars
+      echo -e "export
PACO_EXCLUDE=~/sources:$JHALFSDIR:$PACO_EXCLUDE"
>> $JHALFSDIR/pacovars
+      echo -e "export
PACO_TMPFILE=$PACO_TMPFILE" >>
$JHALFSDIR/pacovars
+    fi
+  fi
   if [[ "$COMPARE" != "0" ]] ; then
     mkdir -p $JHALFSDIR/extras
     cp extras/* $JHALFSDIR/extras
-- 
http://linuxfromscratch.org/mailman/listinfo/alfs-discu
ss
FAQ: http://www.linux
fromscratch.org/faq/
Unsubscribe: See the above information page
Paco-patch update svn-2624
user name
2006-05-03 16:44:14
El Miércoles, 3 de Mayo de 2006 08:57, Tor Olav Stava
escribió:
> Fixed an unclosed if statement in BLFS/master.sh
>

Thanks. Updating it in few minutes.

-- 
Manuel Canales Esparcia
Usuario de LFS nº2886:       http://www.linuxfroms
cratch.org
LFS en castellano: http://www.escomp
oslinux.org/lfs-es http://www.lfs-es.com
TLDP-ES:                           http://es.tldp.org
-- 
http://linuxfromscratch.org/mailman/listinfo/alfs-discu
ss
FAQ: http://www.linux
fromscratch.org/faq/
Unsubscribe: See the above information page
Paco-patch update svn-2624
user name
2006-05-03 17:25:22
El Miércoles, 3 de Mayo de 2006 08:57, Tor Olav Stava
escribió:
> Fixed an unclosed if statement in BLFS/master.sh

In that patch common/paco-build-hlfs.sh, 
common/paco-functions, and
common/paco-build-lfs.sh are missing.

I added it from the previous patch and committed a new one.

-- 
Manuel Canales Esparcia
Usuario de LFS nº2886:       http://www.linuxfroms
cratch.org
LFS en castellano: http://www.escomp
oslinux.org/lfs-es http://www.lfs-es.com
TLDP-ES:                           http://es.tldp.org
-- 
http://linuxfromscratch.org/mailman/listinfo/alfs-discu
ss
FAQ: http://www.linux
fromscratch.org/faq/
Unsubscribe: See the above information page
Paco-patch update svn-2624
user name
2006-05-03 17:37:09
M.Canales.es wrote:
> El Miércoles, 3 de Mayo de 2006 08:57, Tor Olav Stava
escribió:
>   
>> Fixed an unclosed if statement in BLFS/master.sh
>>     
>
> In that patch common/paco-build-hlfs.sh, 
common/paco-functions, and
> common/paco-build-lfs.sh are missing.
>
> I added it from the previous patch and committed a new
one.
>
>   
Ooops.. That's even worse than an missing 'fi' ;) I'm
not used to the 
'svn diff' and forgot to 'svn add' the missing files..
I'll try to do a 
better job next time.

Good thing you checked the patch first 

Thanks


Tor Olav


-- 
http://linuxfromscratch.org/mailman/listinfo/alfs-discu
ss
FAQ: http://www.linux
fromscratch.org/faq/
Unsubscribe: See the above information page
[1-4]

about | contact  Other archives ( Real Estate discussion Medical topics )