source:
contrib/jhalfs-paco.patch@
71dd5a5
Last change on this file since 71dd5a5 was d748b31, checked in by , 19 years ago | |
---|---|
|
|
File size: 16.7 KB |
-
LFS/master.sh
188 188 # and not to use chroot. 189 189 case "${this_script}" in 190 190 *kernfs) wrt_run_as_root "${this_script}" "$file" ;; 191 *) wrt_run_as_chroot1 "${this_script}" "$file" ;; 191 *) wrt_paco_prep 192 wrt_run_as_chroot1 "${this_script}" "$file" 193 wrt_paco_log "$name" "$vrs" ;; 192 194 esac 193 195 194 196 # Remove the build directory(ies) except if the package build fails. … … 206 208 207 209 # Keep the script file name for Makefile dependencies. 208 210 PREV=${this_script} 211 212 # Inserting paco build commands 213 case "${this_script}" in 214 *devices) wrt_paco_inst "065.5" ;; 215 *readjusting) wrt_paco_inst "069.5" ;; 216 esac 217 209 218 done # end for file in chapter06/* 210 219 } 211 220 … … 267 276 wrt_run_as_chroot2 "$this_script" "$file" 268 277 fi 269 278 ;; 279 *kernel) wrt_paco_prep 280 wrt_run_as_chroot2 "$this_script" "$file" 281 wrt_paco_log "linux-kernel" "$vrs" 282 ;; 283 *bootscripts) wrt_paco_prep 284 wrt_run_as_chroot2 "$this_script" "$file" 285 wrt_paco_log "lfs-bootscripts" "$vrs" 286 ;; 270 287 *) wrt_run_as_chroot2 "$this_script" "$file" 271 288 ;; 272 289 esac -
LFS/lfs.xsl
32 32 <!-- Locale settings --> 33 33 <xsl:param name="lang" select="en_CA"/> 34 34 35 <!-- Use paco? --> 36 <xsl:param name="use_paco" select="1"/> 37 35 38 <xsl:template match="/"> 36 39 <xsl:apply-templates select="//sect1"/> 37 40 </xsl:template> … … 190 193 <xsl:apply-templates/> 191 194 <xsl:text> || true
</xsl:text> 192 195 </xsl:when> 196 <!-- paco begin --> 197 <!-- General rule --> 198 <xsl:when test="$use_paco != '0' and 199 ancestor::chapter[@id != 'chapter-temporary-tools'] and 200 contains(string(),'make') and 201 contains(string(),'install')"> 202 <xsl:text>export LD_PRELOAD=/usr/lib/libpaco-log.so
</xsl:text> 203 <xsl:apply-templates/> 204 <xsl:text>
</xsl:text> 205 </xsl:when> 206 <!-- Linux-libc-headers --> 207 <xsl:when test="$use_paco != '0' and 208 ancestor::sect1[@id='ch-system-linux-libc-headers'] and 209 contains(string(),'install ')"> 210 <xsl:text>export LD_PRELOAD=/usr/lib/libpaco-log.so
</xsl:text> 211 <xsl:apply-templates/> 212 <xsl:text>
</xsl:text> 213 </xsl:when> 214 <!-- Unset LD_PRELOAD before second make in Zlib --> 215 <xsl:when test="$use_paco != '0' and 216 ancestor::sect1[@id='ch-system-zlib'] and 217 contains(string(),'make clean')"> 218 <xsl:text>unset LD_PRELOAD
</xsl:text> 219 <xsl:apply-templates/> 220 <xsl:text>
</xsl:text> 221 </xsl:when> 222 <!-- paco end --> 193 223 <!-- The rest of commands --> 194 224 <xsl:otherwise> 195 225 <xsl:apply-templates/> -
BLFS/master.sh
79 79 EOF 80 80 ) >> $MKFILE 81 81 82 if [[ $USE_PACO != 0 ]]; then 83 ( 84 cat << EOF 85 @echo -e "\n\`date\`\n\nKB: \`du -sk --exclude=logs/* /\`\n" >logs/$this_script && \\ 86 source $JHALFSDIR/pacovars && \\ 87 rm -f $PACO_TMPFILE && \\ 88 $JHALFSDIR/${PROGNAME}-commands/$file >>logs/$this_script 2>&1 && \\ 89 echo -e "\n\`date\`\n\nKB: \`du -sk --exclude=logs/* /\`\n" >>logs/$this_script 90 EOF 91 ) >> $MKFILE 92 wrt_paco_log_blfs 93 94 else 82 95 # Insert date and disk usage at the top of the log file, the script run 83 96 # and date and disk usage again at the bottom of the log file. 84 97 ( -
BLFS/blfs.xsl
159 159 <xsl:when test="@role = 'nodump'"/> 160 160 <xsl:otherwise> 161 161 <xsl:if test="@role = 'root'"> 162 <xsl:text> sudo</xsl:text>162 <xsl:text>export LD_PRELOAD=/usr/lib/libpaco-log.so
</xsl:text> 163 163 </xsl:if> 164 164 <xsl:apply-templates select="userinput" mode="screen"/> 165 165 </xsl:otherwise> -
common/config
58 58 # Not used in LFS 59 59 KEYMAP=none 60 60 61 62 #==== PACO VARIABLES ==== 63 #--- Use paco? 0/1 0(no)/1(yes) 64 USE_PACO=1 65 PACO_VERSION=1.10.4 66 67 #--- Name of the Paco source package 68 PACO_FILE=paco-$PACO_VERSION.tar.* 69 70 #--- Variables needed 71 # Don't change unless you know what you're doing 72 PACO_INCLUDE=/ 73 PACO_EXCLUDE=/sys:/dev:/proc:/tmp:/usr/src:/usr/share/info/dir 74 PACO_TMPFILE=/tmp/paco.tmp 75 LD_PRELOAD=/usr/lib/libpaco-log.so 76 77 61 78 #=== Variables needed by ICA (Not implemented yet :-/)=== 62 79 #--- Run ICA testing 0/1 0(no)/1(yes) 63 80 RUN_ICA=0 -
common/func_validate_configs.sh
85 85 inline_doc 86 86 87 87 # First internal variables, then the ones that change the book's flavour, and lastly system configuration variables 88 local -r blfs_PARAM_LIST="BOOK BUILDDIR SRC_ARCHIVE HPKG DEPEND TEST"89 local -r hlfs_PARAM_LIST="BOOK BUILDDIR SRC_ARCHIVE HPKG RUNMAKE MODEL GRSECURITY_HOST TEST STRIP FSTAB CONFIG KEYMAP PAGE TIMEZONE LANG LC_ALL"90 local -r clfs_PARAM_LIST="BOOK BUILDDIR SRC_ARCHIVE HPKG RUNMAKE METHOD ARCH TARGET TEST STRIP FSTAB BOOT_CONFIG CONFIG KEYMAP VIMLANG PAGE TIMEZONE LANG"91 local -r lfs_PARAM_LIST="BOOK BUILDDIR SRC_ARCHIVE HPKG RUNMAKE TEST STRIP FSTAB CONFIG VIMLANG PAGE TIMEZONE LANG"88 local -r blfs_PARAM_LIST="BOOK BUILDDIR SRC_ARCHIVE USE_PACO HPKG DEPEND TEST" 89 local -r hlfs_PARAM_LIST="BOOK BUILDDIR SRC_ARCHIVE USE_PACO HPKG RUNMAKE MODEL GRSECURITY_HOST TEST STRIP FSTAB CONFIG KEYMAP PAGE TIMEZONE LANG LC_ALL" 90 local -r clfs_PARAM_LIST="BOOK BUILDDIR SRC_ARCHIVE USE_PACO HPKG RUNMAKE METHOD ARCH TARGET TEST STRIP FSTAB BOOT_CONFIG CONFIG KEYMAP VIMLANG PAGE TIMEZONE LANG" 91 local -r lfs_PARAM_LIST="BOOK BUILDDIR SRC_ARCHIVE USE_PACO HPKG RUNMAKE TEST STRIP FSTAB CONFIG VIMLANG PAGE TIMEZONE LANG" 92 92 93 93 local -r ERROR_MSG_pt1='The variable \"${L_arrow}${config_param}${R_arrow}\" value ${L_arrow}${BOLD}${!config_param}${R_arrow} is invalid,' 94 94 local -r ERROR_MSG_pt2=' check the config file ${BOLD}${GREEN}\<$(echo $PROGNAME | tr [a-z] [A-Z])/config\> or \<common/config\>${OFF}' … … 130 130 continue ;; 131 131 TIMEZONE) continue;; 132 132 MKFILE) continue;; 133 USE_PACO) validation_str="x0x x1x"; validate_str; continue ;; 133 134 HPKG) validation_str="x0x x1x"; validate_str; continue ;; 134 135 RUNMAKE) validation_str="x0x x1x"; validate_str; continue ;; 135 136 TEST) validation_str="x0x x1x x2x x3x"; validate_str; continue ;; -
common/paco-build.sh
1 #!/bin/sh 2 set -e 3 4 cd $PKGDIR 5 ./configure --disable-gpaco \ 6 --sysconfdir=/etc && 7 make && 8 make install && 9 make logme -
common/paco-functions
Property changes on: common/paco-build.sh ___________________________________________________________________ Name: svn:keywords + Author Date Revision Id
1 #!/bin/bash 2 3 4 #----------------------------# 5 wrt_paco_inst() { # 6 #----------------------------# 7 8 # Not using Paco with uClibc, even if requested 9 if [ $PROGNAME = "hlfs" ]; then 10 if [ $MODEL = "uclibc" ]; then 11 $USE_PACO = 0 12 fi 13 fi 14 15 if [ $USE_PACO != 0 ]; then 16 name="paco" 17 this_script="$1-$name" 18 file="chapter06/$this_script" 19 chapter6="$chapter6 $this_script" 20 21 # Write target, dependency and unpack 22 wrt_target "$this_script" "$PREV" 23 wrt_unpack2 "$PACO_FILE" 24 25 # Copy the paco build script to the correct directory and make it executable 26 echo -e "\t@cp $JHALFSDIR/paco-build.sh $JHALFSDIR/${PROGNAME}-commands/$file && \\" >> $MKFILE.tmp 27 echo -e "\tchmod +x $JHALFSDIR/${PROGNAME}-commands/$file" >> $MKFILE.tmp 28 29 # Run the script 30 wrt_run_as_chroot1 "${this_script}" "${file}" 31 32 # Clean up 33 wrt_remove_build_dirs "$name" 34 echo -e '\t@touch $@' >> $MKFILE.tmp 35 36 # Override the PREV variable 37 PREV="$this_script" 38 fi 39 } 40 41 42 #----------------------------------# 43 wrt_paco_prep() { # Export Paco variables 44 #----------------------------------# and remove tmpfile 45 46 # Not using Paco with uClibc, even if requested 47 if [ $PROGNAME = "hlfs" ]; then 48 if [ $MODEL = "uclibc" ]; then 49 $USE_PACO = 0 50 fi 51 fi 52 53 if [ $USE_PACO != 0 ] && [ "$vrs" != "" ]; then 54 ( 55 cat << EOF 56 @echo "export PACO_INCLUDE=$PACO_INCLUDE" >> envars && \\ 57 echo "export PACO_EXCLUDE=\$(SRC):$JHALFSDIR:$PACO_EXCLUDE" >> envars && \\ 58 echo "export PACO_TMPFILE=$PACO_TMPFILE" >> envars && \\ 59 rm -f \$(MOUNT_PT)$PACO_TMPFILE 60 EOF 61 ) >> $MKFILE.tmp 62 fi 63 } 64 65 66 #----------------------------------# 67 wrt_paco_log() { # If the tmpfile exist, then log the current package 68 #----------------------------------# and remove tempfile 69 local PACKAGE 70 71 # Allow packages to be logged without version 72 if [[ $2 != "" ]] ; then 73 PACKAGE="$1-$2"; 74 else 75 PACKAGE="$1" 76 fi 77 78 # Not using Paco with uClibc, even if requested 79 if [ $PROGNAME = "hlfs" ]; then 80 if [ $MODEL = "uclibc" ]; then 81 $USE_PACO = 0 82 fi 83 fi 84 85 if [ $USE_PACO != 0 ] && [ "$vrs" != "" ]; then 86 ( 87 cat << EOF 88 @if [ -e \$(MOUNT_PT)$PACO_TMPFILE ]; then \\ 89 \$(CHROOT1) 'paco -lp $PACKAGE < $PACO_TMPFILE' && \\ 90 rm -f \$(MOUNT_PT)$PACO_TMPFILE; \\ 91 fi; 92 EOF 93 ) >> $MKFILE.tmp 94 fi 95 } 96 97 98 #----------------------------------# 99 wrt_paco_log_blfs() { # If the tmpfile exist, then log the current package 100 #----------------------------------# and remove tempfile 101 if [ $USE_PACO != 0 ] ; then 102 ( 103 cat << EOF 104 @PACKAGE=\`head -n1 /tmp/unpacked | sed 's@^./@@;s@/.*@@'\` && \\ 105 if [ -e $PACO_TMPFILE ]; then \\ 106 paco -lp \$\$PACKAGE < $PACO_TMPFILE && \\ 107 rm -f $PACO_TMPFILE; \\ 108 fi; 109 EOF 110 ) >> $MKFILE 111 fi 112 } 113 -
common/common-functions
Property changes on: common/paco-functions ___________________________________________________________________ Name: svn:keywords + Author Date Revision Id
60 60 in the configuration file has the proper packages and patches for the 61 61 book version being processed. 62 62 63 ${BOLD} --no-paco${OFF} 64 dissables paco logging feature. 65 63 66 ${BOLD} -T, --testsuites N ${OFF} 64 67 Run test suites [0-3] 65 68 0 = none … … 623 626 --stringparam lc_all $LC_ALL \ 624 627 --stringparam keymap $KEYMAP \ 625 628 --stringparam grsecurity_host $GRSECURITY_HOST \ 629 --stringparam use_paco $USE_PACO \ 626 630 -o ./${PROGNAME}-commands/ $XSL $BOOK/index.xml >>$LOGDIR/$LOG 2>&1 627 631 ;; 628 632 lfs) … … 634 638 --stringparam timezone $TIMEZONE \ 635 639 --stringparam page $PAGE \ 636 640 --stringparam lang $LANG \ 641 --stringparam use_paco $USE_PACO \ 637 642 -o ./${PROGNAME}-commands/ $XSL $BOOK/index.xml >>$LOGDIR/$LOG 2>&1 638 643 ;; 639 644 blfs) -
HLFS/hlfs.xsl
39 39 <xsl:param name="lang" select="en_CA"/> 40 40 <xsl:param name="lc_all" select="en_CA"/> 41 41 42 <!-- Use paco? --> 43 <xsl:param name="use_paco" select="1"/> 44 42 45 <xsl:template match="/"> 43 46 <xsl:apply-templates select="//sect1"/> 44 47 </xsl:template> … … 191 194 <!-- Fixing bootscripts installation --> 192 195 <xsl:when test="ancestor::sect1[@id='bootable-bootscripts'] and 193 196 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
</xsl:text> 200 </xsl:if> 194 201 <xsl:text>make install
</xsl:text> 195 202 <xsl:text>cd ../blfs-bootscripts-&blfs-bootscripts-version;
</xsl:text> 196 203 </xsl:when> … … 248 255 <xsl:apply-templates/> 249 256 <xsl:text> || true
</xsl:text> 250 257 </xsl:when> 258 <!-- paco begin --> 259 <!-- General rule --> 260 <xsl:when test="$use_paco != '0' and $model != 'uclibc' and 261 ancestor::chapter[@id != 'chapter-temporary-tools'] and 262 contains(string(),'make') and 263 contains(string(),'install')"> 264 <xsl:text>export LD_PRELOAD=/usr/lib/libpaco-log.so
</xsl:text> 265 <xsl:apply-templates/> 266 <xsl:text>
</xsl:text> 267 </xsl:when> 268 <!-- Linux-libc-headers --> 269 <xsl:when test="$use_paco != '0' and $model != 'uclibc' and 270 ancestor::sect1[@id='ch-system-linux-libc-headers'] and 271 contains(string(),'install ')"> 272 <xsl:text>export LD_PRELOAD=/usr/lib/libpaco-log.so
</xsl:text> 273 <xsl:apply-templates/> 274 <xsl:text>
</xsl:text> 275 </xsl:when> 276 <!-- paco end --> 251 277 <!-- The rest of commands --> 252 278 <xsl:otherwise> 253 279 <xsl:apply-templates/> -
HLFS/master.sh
376 376 wrt_run_as_root "${this_script}" "${file}" 377 377 ;; 378 378 *) # The rest of Chapter06 379 wrt_paco_prep 379 380 wrt_run_as_chroot1 "${this_script}" "${file}" 381 wrt_paco_log "$name" "$vrs" 380 382 ;; 381 383 esac 382 384 # … … 407 409 408 410 # Keep the script file name for Makefile dependencies. 409 411 PREV=$this_script 412 413 # Inserting paco build commands 414 case "${this_script}" in 415 *devices) wrt_paco_inst "068.5" ;; 416 *readjusting) wrt_paco_inst "073.5" ;; 417 esac 418 410 419 done # end for file in chapter06/* 411 420 412 421 } … … 469 478 wrt_run_as_chroot2 "${this_script}" "${file}" 470 479 fi 471 480 ;; 481 *kernel) wrt_paco_prep 482 wrt_run_as_chroot2 "$this_script" "$file" 483 version=`grep "^linux-version" $JHALFSDIR/packages | sed -e 's/.* //' -e 's/"//g'` 484 wrt_paco_log "linux-kernel" "$version" 485 ;; 486 *bootscripts) wrt_paco_prep 487 wrt_run_as_chroot2 "$this_script" "$file" 488 wrt_paco_log "hlfs-bootscripts" 489 ;; 472 490 *) # All other scripts 473 491 wrt_run_as_chroot2 "${this_script}" "${file}" 474 492 ;; -
master.sh
66 66 source $MODULE 67 67 [[ $? > 0 ]] && echo "$MODULE did not load.." && exit 2 68 68 [[ $VERBOSITY > 0 ]] && echo "OK" 69 # Load paco-functions 70 [[ $VERBOSITY > 0 ]] && echo -n "Loading paco module..." 71 source $COMMON_DIR/paco-functions 72 [[ $? > 0 ]] && echo "$COMMON_DIR/paco-functions did not load.." && exit 2 73 [[ $VERBOSITY > 0 ]] && echo "OK" 69 74 # 70 75 [[ $VERBOSITY > 0 ]] && echo "---------------${nl_}" 71 76 … … 146 151 147 152 --help | -h ) usage | more && exit ;; 148 153 154 --no-paco ) USE_PACO=0 ;; 155 149 156 --testsuites | -T ) 150 157 test $# = 1 && eval "$exit_missing_arg" 151 158 shift … … 455 462 456 463 if [[ "$PWD" != "$JHALFSDIR" ]]; then 457 464 cp $COMMON_DIR/makefile-functions $JHALFSDIR/ 465 if [[ $USE_PACO != "0" ]] ; then 466 if [[ $PROGNAME != "blfs" ]]; then 467 cp $COMMON_DIR/paco-build.sh $JHALFSDIR/ 468 else 469 echo -e "export PACO_INCLUDE=$PACO_INCLUDE" > $JHALFSDIR/pacovars 470 echo -e "export PACO_EXCLUDE=~/sources:$JHALFSDIR:$PACO_EXCLUDE" >> $JHALFSDIR/pacovars 471 echo -e "export PACO_TMPFILE=$PACO_TMPFILE" >> $JHALFSDIR/pacovars 472 fi 473 fi 458 474 if [[ -n "$FILES" ]]; then 459 475 # pushd/popd necessary to deal with mulitiple files 460 476 pushd $PACKAGE_DIR 1> /dev/null
Note:
See TracBrowser
for help on using the repository browser.