source:
contrib/jhalfs-paco.patch@
c7c5a53
Last change on this file since c7c5a53 was 165b9e8, checked in by , 19 years ago | |
---|---|
|
|
File size: 17.5 KB |
-
LFS/master.sh
157 157 *stripping*) [[ "${STRIP}" = "0" ]] && continue ;; 158 158 esac 159 159 160 # Install paco as the first package in ch6, before installing linux-libc-headers. 161 case "${this_script}" in 162 *linux-libc-headers) 163 PACO_NUM=`echo ${this_script} | sed -e 's/linux-libc-headers/a-paco/'` 164 wrt_paco_inst "$PACO_NUM" 165 esac 166 160 167 # First append each name of the script files to a list (this will become 161 168 # the names of the targets in the Makefile 162 169 chapter6="$chapter6 ${this_script}" … … 187 194 # and not to use chroot. 188 195 case "${this_script}" in 189 196 *kernfs) wrt_run_as_root "${this_script}" "$file" ;; 190 *) wrt_run_as_chroot1 "${this_script}" "$file" ;; 197 *) wrt_paco_prep 198 wrt_run_as_chroot1 "${this_script}" "$file" 199 wrt_paco_log "$name" "$vrs" ;; 191 200 esac 192 201 193 202 # Remove the build directory(ies) except if the package build fails. … … 205 214 206 215 # Keep the script file name for Makefile dependencies. 207 216 PREV=${this_script} 217 218 # Reinstalling paco after readsjusting the toolchain. 219 case "${this_script}" in 220 *readjusting) 221 PACO_NUM=`echo ${this_script} | sed -e 's/readjusting/x-paco/'` 222 wrt_paco_inst "$PACO_NUM" ;; 223 esac 224 208 225 done # end for file in chapter06/* 209 226 } 210 227 … … 266 283 wrt_run_as_chroot2 "$this_script" "$file" 267 284 fi 268 285 ;; 286 *kernel) wrt_paco_prep 287 wrt_run_as_chroot2 "$this_script" "$file" 288 wrt_paco_log "linux-kernel" "$vrs" 289 ;; 290 *bootscripts) wrt_paco_prep 291 wrt_run_as_chroot2 "$this_script" "$file" 292 wrt_paco_log "lfs-bootscripts" "$vrs" 293 ;; 269 294 *) wrt_run_as_chroot2 "$this_script" "$file" 270 295 ;; 271 296 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
62 62 # Not used in LFS 63 63 KEYMAP=none 64 64 65 66 #==== PACO VARIABLES ==== 67 #--- Use paco? 0/1 0(no)/1(yes) 68 USE_PACO=1 69 PACO_VERSION=1.10.4 70 71 #--- Name of the Paco source package 72 PACO_FILE=paco-$PACO_VERSION.tar.* 73 74 #--- Variables needed 75 # Don't change unless you know what you're doing 76 PACO_INCLUDE=/ 77 PACO_EXCLUDE=/sys:/dev:/proc:/tmp:/usr/src:/usr/share/info/dir 78 PACO_TMPFILE=/tmp/paco.tmp 79 LD_PRELOAD=/usr/lib/libpaco-log.so 80 81 65 82 #=== Variables needed by ICA (Not implemented yet :-/)=== 66 83 #--- Run ICA testing 0/1 0(no)/1(yes) 67 84 RUN_ICA=0 -
common/func_validate_configs.sh
83 83 inline_doc 84 84 85 85 # First internal variables, then the ones that change the book's flavour, and lastly system configuration variables 86 local -r blfs_PARAM_LIST="BOOK BUILDDIR SRC_ARCHIVE HPKG DEPENDTEST"87 local -r hlfs_PARAM_LIST="BOOK BUILDDIR SRC_ARCHIVE HPKG RUNMAKE MODEL GRSECURITY_HOST TEST REPORT STRIP FSTAB CONFIG KEYMAP PAGE TIMEZONE LANG LC_ALL"88 local -r clfs_PARAM_LIST="BOOK BUILDDIR SRC_ARCHIVE HPKG RUNMAKE METHOD ARCH TARGET TEST REPORT STRIP FSTAB BOOT_CONFIG CONFIG KEYMAP VIMLANG PAGE TIMEZONE LANG"89 local -r lfs_PARAM_LIST="BOOK BUILDDIR SRC_ARCHIVE HPKG RUNMAKE TEST REPORT STRIP FSTAB CONFIG VIMLANG PAGE TIMEZONE LANG"86 local -r blfs_PARAM_LIST="BOOK BUILDDIR SRC_ARCHIVE USE_PACO HPKG DEPEND TEST" 87 local -r hlfs_PARAM_LIST="BOOK BUILDDIR SRC_ARCHIVE USE_PACO HPKG RUNMAKE MODEL GRSECURITY_HOST TEST REPORT STRIP FSTAB CONFIG KEYMAP PAGE TIMEZONE LANG LC_ALL" 88 local -r clfs_PARAM_LIST="BOOK BUILDDIR SRC_ARCHIVE USE_PACO HPKG RUNMAKE METHOD ARCH TARGET TEST REPORT STRIP FSTAB BOOT_CONFIG CONFIG KEYMAP VIMLANG PAGE TIMEZONE LANG" 89 local -r lfs_PARAM_LIST="BOOK BUILDDIR SRC_ARCHIVE USE_PACO HPKG RUNMAKE TEST REPORT STRIP FSTAB CONFIG VIMLANG PAGE TIMEZONE LANG" 90 90 91 91 local -r ERROR_MSG_pt1='The variable \"${L_arrow}${config_param}${R_arrow}\" value ${L_arrow}${BOLD}${!config_param}${R_arrow} is invalid,' 92 92 local -r ERROR_MSG_pt2=' check the config file ${BOLD}${GREEN}\<$(echo $PROGNAME | tr [a-z] [A-Z])/config\> or \<common/config\>${OFF}' … … 128 128 continue ;; 129 129 TIMEZONE) continue;; 130 130 MKFILE) continue;; 131 USE_PACO) validation_str="x0x x1x"; validate_str; continue ;; 131 132 HPKG) validation_str="x0x x1x"; validate_str; continue ;; 132 133 RUNMAKE) validation_str="x0x x1x"; validate_str; continue ;; 133 134 TEST) validation_str="x0x x1x x2x x3x"; validate_str; continue ;; -
common/paco-functions
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 paco_script="$1" 17 paco_file="chapter06/$paco_script" 18 chapter6="$chapter6 $paco_script" 19 20 # Copy the paco build script to the correct directory and make it executable 21 cp $JHALFSDIR/paco-build.sh $JHALFSDIR/${PROGNAME}-commands/$paco_file && 22 chmod +x $JHALFSDIR/${PROGNAME}-commands/$paco_file 23 24 # Write target, dependency and unpack 25 wrt_target "$paco_script" "$PREV" 26 wrt_unpack2 "$PACO_FILE" 27 28 # Run the script 29 wrt_run_as_chroot1 "${paco_script}" "${paco_file}" 30 31 # Clean up 32 wrt_remove_build_dirs "paco" 33 echo -e '\t@touch $@' >> $MKFILE.tmp 34 35 # Override the PREV variable 36 PREV="$paco_script" 37 fi 38 } 39 40 41 #----------------------------------# 42 wrt_paco_prep() { # Export Paco variables 43 #----------------------------------# and remove tmpfile 44 45 # Not using Paco with uClibc, even if requested 46 if [ $PROGNAME = "hlfs" ]; then 47 if [ $MODEL = "uclibc" ]; then 48 USE_PACO=0 49 fi 50 fi 51 52 if [ $USE_PACO != 0 ] && [ "$vrs" != "" ]; then 53 ( 54 cat << EOF 55 @echo "export PACO_INCLUDE=$PACO_INCLUDE" >> envars && \\ 56 echo "export PACO_EXCLUDE=\$(SRC):$JHALFSDIR:$PACO_EXCLUDE" >> envars && \\ 57 echo "export PACO_TMPFILE=$PACO_TMPFILE" >> envars && \\ 58 rm -f \$(MOUNT_PT)$PACO_TMPFILE 59 EOF 60 ) >> $MKFILE.tmp 61 fi 62 } 63 64 65 #----------------------------------# 66 wrt_paco_log() { # If the tmpfile exist, then log the current package 67 #----------------------------------# and remove tempfile 68 local PACKAGE 69 70 # Allow packages to be logged without version 71 if [[ $2 != "" ]] ; then 72 PACKAGE="$1-$2"; 73 else 74 PACKAGE="$1" 75 fi 76 77 # Not using Paco with uClibc, even if requested 78 if [ $PROGNAME = "hlfs" ]; then 79 if [ $MODEL = "uclibc" ]; then 80 USE_PACO=0 81 fi 82 fi 83 84 if [ $USE_PACO != 0 ] && [ "$vrs" != "" ]; then 85 ( 86 cat << EOF 87 @if [ -e \$(MOUNT_PT)$PACO_TMPFILE ]; then \\ 88 \$(CHROOT1) 'paco -lp $PACKAGE < $PACO_TMPFILE' && \\ 89 rm -f \$(MOUNT_PT)$PACO_TMPFILE; \\ 90 fi; 91 EOF 92 ) >> $MKFILE.tmp 93 fi 94 } 95 96 97 #----------------------------------# 98 wrt_paco_log_blfs() { # If the tmpfile exist, then log the current package 99 #----------------------------------# and remove tempfile 100 if [ $USE_PACO != 0 ] ; then 101 ( 102 cat << EOF 103 @PACKAGE=\`head -n1 /tmp/unpacked | sed 's@^./@@;s@/.*@@'\` && \\ 104 if [ -e $PACO_TMPFILE ]; then \\ 105 paco -lp \$\$PACKAGE < $PACO_TMPFILE && \\ 106 rm -f $PACO_TMPFILE; \\ 107 fi; 108 EOF 109 ) >> $MKFILE 110 fi 111 } 112 -
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/common-functions
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 … … 622 625 --stringparam lc_all $LC_ALL \ 623 626 --stringparam keymap $KEYMAP \ 624 627 --stringparam grsecurity_host $GRSECURITY_HOST \ 628 --stringparam use_paco $USE_PACO \ 625 629 -o ./${PROGNAME}-commands/ $XSL $BOOK/index.xml >>$LOGDIR/$LOG 2>&1 626 630 ;; 627 631 lfs) … … 633 637 --stringparam timezone $TIMEZONE \ 634 638 --stringparam page $PAGE \ 635 639 --stringparam lang $LANG \ 640 --stringparam use_paco $USE_PACO \ 636 641 -o ./${PROGNAME}-commands/ $XSL $BOOK/index.xml >>$LOGDIR/$LOG 2>&1 637 642 ;; 638 643 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
320 320 *) ;; 321 321 esac 322 322 323 # Install paco as the first package in ch6, befire installing linux-libc-headers 324 case $this_script in 325 *linux-libc-headers) 326 PACO_NUM=`echo $this_script | sed -e 's/linux-libc-headers/a-paco/'` 327 wrt_paco_inst "$PACO_NUM" 328 esac 329 323 330 # First append each name of the script files to a list (this will become 324 331 # the names of the targets in the Makefile 325 332 chapter6="$chapter6 $this_script" … … 378 385 wrt_run_as_root "${this_script}" "${file}" 379 386 ;; 380 387 *) # The rest of Chapter06 388 wrt_paco_prep 381 389 wrt_run_as_chroot1 "${this_script}" "${file}" 390 wrt_paco_log "$name" "$vrs" 382 391 ;; 383 392 esac 384 393 # … … 409 418 410 419 # Keep the script file name for Makefile dependencies. 411 420 PREV=$this_script 421 422 # Reinstall paco after the toolchain has been readjusted. 423 case "${this_script}" in 424 *readjusting) 425 PACO_NUM=`echo $this_script | sed -e 's/readjusting/x-paco/'` 426 wrt_paco_inst "$PACO_NUM" ;; 427 esac 428 412 429 done # end for file in chapter06/* 413 430 414 431 } … … 471 488 wrt_run_as_chroot2 "${this_script}" "${file}" 472 489 fi 473 490 ;; 491 *kernel) wrt_paco_prep 492 wrt_run_as_chroot2 "$this_script" "$file" 493 version=`grep "^linux-version" $JHALFSDIR/packages | sed -e 's/.* //' -e 's/"//g'` 494 wrt_paco_log "linux-kernel" "$version" 495 ;; 496 *bootscripts) wrt_paco_prep 497 wrt_run_as_chroot2 "$this_script" "$file" 498 wrt_paco_log "hlfs-bootscripts" 499 ;; 474 500 *) # All other scripts 475 501 wrt_run_as_chroot2 "${this_script}" "${file}" 476 502 ;; -
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 … … 149 154 150 155 --help | -h ) usage | more && exit ;; 151 156 157 --no-paco ) USE_PACO=0 ;; 158 152 159 --testsuites | -T ) 153 160 test $# = 1 && eval "$exit_missing_arg" 154 161 shift … … 454 461 455 462 if [[ "$PWD" != "$JHALFSDIR" ]]; then 456 463 cp $COMMON_DIR/makefile-functions $JHALFSDIR/ 464 if [[ $USE_PACO != "0" ]] ; then 465 if [[ $PROGNAME != "blfs" ]]; then 466 cp $COMMON_DIR/paco-build.sh $JHALFSDIR/ 467 else 468 echo -e "export PACO_INCLUDE=$PACO_INCLUDE" > $JHALFSDIR/pacovars 469 echo -e "export PACO_EXCLUDE=~/sources:$JHALFSDIR:$PACO_EXCLUDE" >> $JHALFSDIR/pacovars 470 echo -e "export PACO_TMPFILE=$PACO_TMPFILE" >> $JHALFSDIR/pacovars 471 fi 472 fi 457 473 if [[ -n "$FILES" ]]; then 458 474 # pushd/popd necessary to deal with mulitiple files 459 475 pushd $PACKAGE_DIR 1> /dev/null
Note:
See TracBrowser
for help on using the repository browser.