source:
contrib/jhalfs-paco.patch@
b1607e2
Last change on this file since b1607e2 was d51e891, checked in by , 18 years ago | |
---|---|
|
|
File size: 33.6 KB |
-
LFS/master.sh
172 172 # Keep the script file name 173 173 this_script=`basename $file` 174 174 175 # If $this_script corresponds to a paco script, then skip it 176 case "${this_script}" in 177 *paco) continue ;; 178 esac 179 175 180 # We'll run the chroot commands differently than the others, so skip them in the 176 181 # dependencies and target creation. 177 182 case "${this_script}" in … … 179 184 *stripping*) [[ "${STRIP}" = "n" ]] && continue ;; 180 185 esac 181 186 187 # Install paco as the first package in ch6, before installing 188 # linux-libc-headers, except in iterartive builds 189 if [[ -z "$N" ]]; then 190 case $this_script in 191 *linux-libc-headers) 192 TMP_SCRIPT="$this_script" 193 this_script=`echo $this_script | sed -e 's/linux-libc-headers/a-paco/'` 194 wrt_paco_inst "$this_script" 195 this_script="$TMP_SCRIPT" ;; 196 esac 197 fi 198 182 199 # Grab the name of the target 183 200 name=`echo ${this_script} | sed -e 's@[0-9]\{3\}-@@'` 184 201 … … 231 248 # and not to use chroot. 232 249 case "${this_script}" in 233 250 *kernfs) wrt_RunAsRoot "${this_script}" "$file" ;; 234 *) wrt_run_as_chroot1 "${this_script}" "$file" ;; 251 *) wrt_paco_prep 252 wrt_run_as_chroot1 "${this_script}" "$file" 253 wrt_paco_log "$pkg_tarball" ;; 235 254 esac 236 255 237 256 # Remove the build directory(ies) except if the package build fails. … … 251 270 PREV=${this_script}${N} 252 271 # Set system_build envar for iteration targets 253 272 system_build=$chapter6 273 274 # Reinstalling paco after readsjusting the toolchain. 275 case "${this_script}" in 276 *readjusting) 277 TMP_SCRIPT="$this_script" 278 this_script=`echo ${this_script} | sed -e 's/readjusting/x-paco/'` 279 wrt_paco_inst "$this_script" 280 this_script="$TMP_SCRIPT" ;; 281 esac 282 254 283 done # end for file in chapter06/* 255 284 } 256 285 … … 311 340 else 312 341 wrt_run_as_chroot2 "$this_script" "$file" 313 342 fi 343 wrt_paco_log "lfs-sysconf" 314 344 ;; 345 *kernel | *bootscripts ) 346 wrt_paco_prep 347 wrt_run_as_chroot2 "$this_script" "$file" 348 wrt_paco_log "$pkg_tarball" 349 ;; 315 350 *) wrt_run_as_chroot2 "$this_script" "$file" 351 wrt_paco_log "lfs-sysconf" 316 352 ;; 317 353 esac 318 354 -
LFS/lfs.xsl
39 39 <!-- Locale settings --> 40 40 <xsl:param name="lang" select="C"/> 41 41 42 <!-- Use paco? --> 43 <xsl:param name="use_paco" select="y"/> 44 42 45 <xsl:template match="/"> 43 46 <xsl:apply-templates select="//sect1"/> 44 47 </xsl:template> … … 251 254 <xsl:apply-templates/> 252 255 <xsl:text> || true
</xsl:text> 253 256 </xsl:when> 257 <!-- paco begin --> 258 <!-- General rule --> 259 <xsl:when test="$use_paco != 'n' and 260 ancestor::chapter[@id != 'chapter-temporary-tools'] and 261 contains(string(),'make') and 262 contains(string(),'install')"> 263 <xsl:text>export LD_PRELOAD=/usr/lib/libpaco-log.so
</xsl:text> 264 <xsl:apply-templates/> 265 <xsl:text>
</xsl:text> 266 </xsl:when> 267 <!-- Linux-libc-headers --> 268 <xsl:when test="$use_paco != 'n' and 269 ancestor::sect1[@id='ch-system-linux-libc-headers'] and 270 contains(string(),'install ')"> 271 <xsl:text>export LD_PRELOAD=/usr/lib/libpaco-log.so
</xsl:text> 272 <xsl:apply-templates/> 273 <xsl:text>
</xsl:text> 274 </xsl:when> 275 <!-- Unset LD_PRELOAD before second make in Zlib --> 276 <xsl:when test="$use_paco != 'n' and 277 ancestor::sect1[@id='ch-system-zlib'] and 278 contains(string(),'make clean')"> 279 <xsl:text>unset LD_PRELOAD
</xsl:text> 280 <xsl:apply-templates/> 281 <xsl:text>
</xsl:text> 282 </xsl:when> 283 <!-- paco end --> 254 284 <!-- The rest of commands --> 255 285 <xsl:otherwise> 256 286 <xsl:apply-templates/> -
CLFS/master.sh
494 494 # Keep the script file name 495 495 this_script=`basename $file` 496 496 497 # If $this_script corresponds to a paco script, then skip it 498 case "${this_script}" in 499 *paco) continue ;; 500 esac 501 497 502 # Test if the stripping phase must be skipped. 498 503 # Skip alsp temp-perl for iterative runs 499 504 case $this_script in … … 501 506 *temp-perl*) [[ -n "$N" ]] && continue ;; 502 507 esac 503 508 509 # Install paco as the first package in ch6, before installing 510 # linux-libc-headers, except in iterartive builds 511 if [[ -z "$N" ]]; then 512 case $this_script in 513 *linux-headers) 514 TMP_SCRIPT="$this_script" 515 this_script=`echo $this_script | sed -e 's/linux-headers/a-paco/'` 516 wrt_paco_inst "$this_script" 517 this_script="$TMP_SCRIPT" ;; 518 esac 519 fi 520 504 521 # Grab the name of the target, strip id number, XXX-script 505 522 name=`echo $this_script | sed -e 's@[0-9]\{3\}-@@' \ 506 523 -e 's@temp-@@' \ … … 553 570 [[ "$OPTIMIZE" != "0" ]] && wrt_optimize "$name" && wrt_makeflags "$name" 554 571 fi 555 572 # 573 wrt_paco_prep 556 574 wrt_run_as_chroot1 "${this_script}" "${file}" 575 wrt_paco_log "$pkg_tarball" 557 576 # 558 577 [[ "$pkg_tarball" != "" ]] && wrt_remove_build_dirs "${name}" 559 578 # … … 568 587 PREV=${this_script}${N} 569 588 # Set system_build envar for iteration targets 570 589 system_build=$basicsystem 590 591 # Reinstalling paco after readsjusting the toolchain. 592 case "${this_script}" in 593 *adjusting) 594 TMP_SCRIPT="$this_script" 595 this_script=`echo ${this_script} | sed -e 's/adjusting/x-paco/'` 596 wrt_paco_inst "$this_script" 597 this_script="$TMP_SCRIPT" ;; 598 esac 599 571 600 done # for file in final-system/* ... 572 601 } 573 602 … … 604 633 # Keep the script file name 605 634 this_script=`basename $file` 606 635 636 # If $this_script corresponds to a paco script, then skip it 637 case "${this_script}" in 638 *paco) continue ;; 639 esac 640 607 641 # Test if the stripping phase must be skipped 608 642 # Skip alsp temp-perl for iterative runs 609 643 case $this_script in … … 611 645 *temp-perl*) [[ -n "$N" ]] && continue ;; 612 646 esac 613 647 648 # Install paco as the first package in ch6, before installing 649 # linux-libc-headers, except in iterartive builds 650 if [[ -z "$N" ]]; then 651 case $this_script in 652 *linux-headers) 653 TMP_SCRIPT="$this_script" 654 this_script=`echo $this_script | sed -e 's/linux-headers/a-paco/'` 655 wrt_paco_inst "$this_script" 656 this_script="$TMP_SCRIPT" ;; 657 esac 658 fi 659 614 660 # Grab the name of the target, strip id number, XXX-script 615 661 name=`echo $this_script | sed -e 's@[0-9]\{3\}-@@' \ 616 662 -e 's@temp-@@' \ … … 665 711 [[ "$OPTIMIZE" != "0" ]] && wrt_optimize "$name" && wrt_makeflags "$name" 666 712 fi 667 713 # 714 wrt_paco_prep 668 715 wrt_run_as_root2 "${this_script}" "${file}" 716 wrt_paco_log "$pkg_tarball" 669 717 # 670 718 [[ "$pkg_tarball" != "" ]] && wrt_remove_build_dirs2 "${name}" 671 719 # … … 680 728 PREV=${this_script}${N} 681 729 # Set system_build envar for iteration targets 682 730 system_build=$basicsystem 731 732 # Reinstalling paco after readsjusting the toolchain. 733 case "${this_script}" in 734 *adjusting) 735 TMP_SCRIPT="$this_script" 736 this_script=`echo ${this_script} | sed -e 's/adjusting/x-paco/'` 737 wrt_paco_inst "$this_script" 738 this_script="$TMP_SCRIPT" ;; 739 esac 740 683 741 done # for file in final-system/* ... 684 742 } 685 743 … … 728 786 # 729 787 [[ "$pkg_tarball" != "" ]] && wrt_unpack2 "$pkg_tarball" 730 788 # 789 case $this_script in 790 *bootscripts* | *udev-rules ) 791 wrt_paco_prep ;; 792 esac 731 793 wrt_run_as_chroot1 "${this_script}" "${file}" 794 case $this_script in 795 *bootscripts* | *udev-rules ) 796 wrt_paco_log "$pkg_tarball" ;; 797 *) 798 wrt_paco_log "clfs-sysconf" ;; 799 esac 732 800 # 733 801 [[ "$pkg_tarball" != "" ]] && wrt_remove_build_dirs "${name}" 734 802 # … … 790 858 # 791 859 [[ "$pkg_tarball" != "" ]] && wrt_unpack3 "$pkg_tarball" 792 860 # 861 case $this_script in 862 *bootscripts* | *udev-rules ) 863 wrt_paco_prep ;; 864 esac 793 865 wrt_run_as_root2 "${this_script}" "${file}" 866 case $this_script in 867 *bootscripts* | *udev-rules ) 868 wrt_paco_log "$pkg_tarball" ;; 869 *) 870 wrt_paco_log "clfs-sysconf" ;; 871 esac 794 872 # 795 873 [[ "$pkg_tarball" != "" ]] && wrt_remove_build_dirs2 "${name}" 796 874 # … … 862 940 else 863 941 wrt_run_as_chroot1 "${this_script}" "${file}" 864 942 fi 943 wrt_paco_log "clfs-sysconf" 865 944 ;; 866 *) wrt_run_as_chroot1 "${this_script}" "${file}" ;; 945 *kernel) wrt_paco_prep 946 wrt_run_as_chroot1 "${this_script}" "${file}" 947 wrt_paco_log "$pkg_tarball" ;; 948 *) wrt_run_as_chroot1 "${this_script}" "${file}" 949 wrt_paco_log "clfs-sysconf" ;; 867 950 esac 868 951 # 869 952 # Housekeeping...remove any build directory(ies) except if the package build fails. … … 941 1024 else 942 1025 wrt_run_as_root2 "${this_script}" "${file}" 943 1026 fi 1027 wrt_paco_log "clfs-sysconf" 944 1028 ;; 945 *) wrt_run_as_root2 "${this_script}" "${file}" ;; 1029 *kernel) wrt_paco_prep 1030 wrt_run_as_root2 "${this_script}" "${file}" 1031 wrt_paco_log "$pkg_tarball" ;; 1032 *) wrt_run_as_root2 "${this_script}" "${file}" 1033 wrt_paco_log "clfs-sysconf" ;; 946 1034 esac 947 1035 # 948 1036 # Housekeeping...remove any build directory(ies) except if the package build fails. -
CLFS/clfs.xsl
42 42 <!-- Locale settings --> 43 43 <xsl:param name="lang" select="C"/> 44 44 45 <!-- Use paco? --> 46 <xsl:param name="use_paco" select="y"/> 47 45 48 <xsl:template match="/"> 46 49 <xsl:apply-templates select="//sect1"/> 47 50 </xsl:template> … … 103 106 <xsl:text>tar -xvf ../vim-&vim-version;-lang.* --strip-components=1
</xsl:text> 104 107 </xsl:if> 105 108 </xsl:if> 109 <!-- paco begin --> 110 <!-- General rule --> 111 <xsl:if test="$use_paco != 'n' and 112 @id='ch-scripts-bootscripts' or 113 @id='ch-scripts-udev-rules' or 114 @id='ch-bootable-kernel' or 115 (../@id='chapter-building-system' and 116 @id!='ch-system-temp-perl' and 117 contains(string(),'make') and 118 contains(string(),'install'))"> 119 <xsl:text>export LD_PRELOAD=/usr/lib/libpaco-log.so
</xsl:text> 120 </xsl:if> 121 <!-- Linux headers --> 122 <xsl:if test="$use_paco != 'n' and 123 @id='ch-system-linux-headers' and 124 contains(string(),'install')"> 125 <xsl:text>export LD_PRELOAD=/usr/lib/libpaco-log.so
</xsl:text> 126 </xsl:if> 127 <!-- paco end --> 106 128 <xsl:apply-templates select=".//para/userinput | .//screen"/> 107 129 <xsl:text>exit</xsl:text> 108 130 </exsl:document> -
common/paco-build-hlfs.sh
1 #!/bin/sh 2 set -e 3 4 cd $PKGDIR 5 ./configure --sysconfdir=/etc \ 6 --enable-scripts \ 7 --disable-gpaco \ 8 --disable-static \ 9 --with-pic && 10 make && 11 make install && 12 make logme -
common/func_validate_configs.sh
20 20 inline_doc 21 21 22 22 # First internal variables, then the ones that change the book's flavour, and lastly system configuration variables 23 local -r hlfs_PARAM_LIST="BOOK BUILDDIR SRC_ARCHIVE GETPKG RUNMAKE MODEL GRSECURITY_HOST TEST BOMB_TEST OPTIMIZE REPORT COMPARE RUN_ICA RUN_FARCE ITERATIONS STRIP FSTAB CONFIG GETKERNEL PAGE TIMEZONE LANG LC_ALL LUSER LGROUP BLFS_TOOL"24 local -r clfs_PARAM_LIST="BOOK BUILDDIR SRC_ARCHIVE GETPKG RUNMAKE METHOD ARCH TARGET TARGET32 TEST BOMB_TEST OPTIMIZE REPORT COMPARE RUN_ICA RUN_FARCE ITERATIONS STRIP FSTAB BOOT_CONFIG CONFIG GETKERNEL VIMLANG PAGE TIMEZONE LANG LUSER LGROUP BLFS_TOOL"25 local -r clfs2_PARAM_LIST="BOOK BUILDDIR SRC_ARCHIVE GETPKG RUNMAKE ARCH TARGET OPTIMIZE REPORT STRIP FSTAB CONFIG GETKERNEL VIMLANG PAGE TIMEZONE LANG LUSER LGROUP BLFS_TOOL"26 local -r lfs_PARAM_LIST="BOOK BUILDDIR SRC_ARCHIVE GETPKG RUNMAKE TEST BOMB_TEST OPTIMIZE REPORT COMPARE RUN_ICA RUN_FARCE ITERATIONS STRIP FSTAB CONFIG GETKERNEL VIMLANG PAGE TIMEZONE LANG LUSER LGROUP BLFS_TOOL"23 local -r hlfs_PARAM_LIST="BOOK BUILDDIR SRC_ARCHIVE USE_PACO GETPKG RUNMAKE MODEL GRSECURITY_HOST TEST BOMB_TEST OPTIMIZE REPORT COMPARE RUN_ICA RUN_FARCE ITERATIONS STRIP FSTAB CONFIG GETKERNEL PAGE TIMEZONE LANG LC_ALL LUSER LGROUP BLFS_TOOL" 24 local -r clfs_PARAM_LIST="BOOK BUILDDIR SRC_ARCHIVE USE_PACO GETPKG RUNMAKE METHOD ARCH TARGET TARGET32 TEST BOMB_TEST OPTIMIZE REPORT COMPARE RUN_ICA RUN_FARCE ITERATIONS STRIP FSTAB BOOT_CONFIG CONFIG GETKERNEL VIMLANG PAGE TIMEZONE LANG LUSER LGROUP BLFS_TOOL" 25 local -r clfs2_PARAM_LIST="BOOK BUILDDIR SRC_ARCHIVE GETPKG RUNMAKE ARCH TARGET OPTIMIZE REPORT STRIP FSTAB CONFIG GETKERNEL VIMLANG PAGE TIMEZONE LANG LUSER LGROUP BLFS_TOOL" 26 local -r lfs_PARAM_LIST="BOOK BUILDDIR SRC_ARCHIVE USE_PACO GETPKG RUNMAKE TEST BOMB_TEST OPTIMIZE REPORT COMPARE RUN_ICA RUN_FARCE ITERATIONS STRIP FSTAB CONFIG GETKERNEL VIMLANG PAGE TIMEZONE LANG LUSER LGROUP BLFS_TOOL" 27 27 local -r blfs_PARAM_LIST="BRANCH_ID BLFS_ROOT BLFS_XML TRACKING_DIR" 28 28 29 29 local -r blfs_tool_PARAM_LIST="BLFS_BRANCH_ID BLFS_ROOT BLFS_XML TRACKING_DIR DEP_LIBXML DEP_LIBXSLT DEP_DBXSL DEP_LINKS DEP_SUDO DEP_WGET DEP_SVN DEP_GPM" … … 99 99 case $config_param in 100 100 # Allways display this, if found in ${PROGNAME}_PARAM_LIST 101 101 GETPKG | \ 102 USE_PACO | \ 102 103 RUNMAKE | \ 103 104 TEST | \ 104 105 OPTIMIZE | \ -
common/paco-functions
1 #!/bin/bash 2 3 #----------------------------# 4 wrt_paco_inst() { # 5 #----------------------------# 6 7 local paco_script="$1" 8 9 check_build_model 10 11 if [ $USE_PACO = "y" ]; then 12 case $PROGNAME in 13 clfs ) 14 paco_file="final-system/$paco_script" 15 basicsystem="$basicsystem $paco_script" ;; 16 * ) 17 paco_file="chapter06/$paco_script" 18 chapter6="$chapter6 $paco_script" ;; 19 esac 20 21 # Copy the paco build script to the correct directory and make it executable 22 cp $JHALFSDIR/paco-build-$PROGNAME.sh $JHALFSDIR/${PROGNAME}-commands/$paco_file && 23 chmod +x $JHALFSDIR/${PROGNAME}-commands/$paco_file 24 25 # Write target, dependency and unpack 26 if [ $CLFS_BOOT = 1 ]; then 27 wrt_target_boot "$paco_script" "$PREV" 28 wrt_unpack3 "$PACO_FILE" 29 wrt_run_as_root2 "${paco_script}" "${paco_file}" 30 wrt_remove_build_dirs2 "paco" 31 else 32 wrt_target "$paco_script" "$PREV" 33 wrt_unpack2 "$PACO_FILE" 34 wrt_run_as_chroot1 "${paco_script}" "${paco_file}" 35 wrt_remove_build_dirs "paco" 36 fi 37 38 wrt_touch 39 40 # Override the PREV variable 41 PREV="$paco_script" 42 fi 43 } 44 45 46 #----------------------------------# 47 wrt_paco_prep() { # Export Paco variables 48 #----------------------------------# and remove tmpfile 49 50 local TMPFILEPATH 51 52 check_build_model 53 54 check_log_package 55 56 if [ $USE_PACO = "y" ] && [ $LOG_PACKAGE != 0 ]; then 57 if [ $CLFS_BOOT = 1 ]; then 58 TMPFILEPATH="$PACO_TMPFILE" 59 else 60 TMPFILEPATH="\$(MOUNT_PT)$PACO_TMPFILE" 61 fi 62 ( 63 cat << EOF 64 @echo "export PACO_INCLUDE=$PACO_INCLUDE" >> envars && \\ 65 echo "export PACO_EXCLUDE=\$(SRC):$PACO_EXCLUDE" >> envars && \\ 66 echo "export PACO_TMPFILE=$PACO_TMPFILE" >> envars && \\ 67 rm -f $TMPFILEPATH 68 EOF 69 ) >> $MKFILE.tmp 70 fi 71 } 72 73 74 #----------------------------------# 75 wrt_paco_log() { # If the tmpfile exist, then log the current package 76 #----------------------------------# and remove tempfile 77 local PACKAGE 78 79 # Extract package name and version from the tarball name 80 PACKAGE=`echo $1 | sed -e 's/.tar.*//'` 81 82 check_build_model 83 84 # Check if the package should be logged 85 check_log_package 86 87 88 if [ $USE_PACO = "y" ]; then 89 if [ $LOG_PACKAGE != 0 ]; then 90 # Only use this if doing CLFS boot build 91 if [ $CLFS_BOOT = 1 ]; then 92 ( 93 cat << EOF 94 @if [ -e $PACO_TMPFILE ]; then \\ 95 paco -lp+ $PACKAGE < $PACO_TMPFILE && \\ 96 rm -f $PACO_TMPFILE; \\ 97 fi; 98 EOF 99 ) >> $MKFILE.tmp 100 # All else should use these commands 101 else 102 ( 103 cat << EOF 104 @if [ -e \$(MOUNT_PT)$PACO_TMPFILE ]; then \\ 105 \$(CHROOT1) 'paco -lp+ $PACKAGE < $PACO_TMPFILE' && \\ 106 rm -f \$(MOUNT_PT)$PACO_TMPFILE; \\ 107 fi; 108 EOF 109 ) >> $MKFILE.tmp 110 fi 111 fi 112 # Add missing files to the logs if needed 113 wrt_paco_add_log 114 fi 115 } 116 117 118 #----------------------------------# 119 fnc_add_log() { # 120 #----------------------------------# 121 122 MISSING_FILE=$1 123 124 if [ $CLFS_BOOT = 1 ]; then 125 echo -e "\t@$MISSING_FILE | paco -lp+ $PACKAGE" >> $MKFILE.tmp 126 else 127 echo -e "\t@\$(CHROOT1) '$MISSING_FILE | paco -lp+ $PACKAGE'" >> $MKFILE.tmp 128 fi 129 } 130 131 132 #----------------------------------# 133 wrt_paco_add_log() { # 134 #----------------------------------# 135 # Some packages create files using bash redirection, which the LD_PRELOAD lib don't notice 136 # These rules will add the missing files to the proper logs. 137 # Most of these is not needed for HLFS, but they do no harm. 138 if [ $USE_PACO = "y" ]; then 139 case $this_script in 140 *e2fsprogs) 141 fnc_add_log "echo /etc/mke2fs.conf" 142 ;; 143 *bootscripts) 144 fnc_add_log "echo /etc/sysconfig/rc" 145 fnc_add_log "echo /etc/sysconfig/createfiles" 146 ;; 147 *glibc) 148 fnc_add_log "find /lib -type l" 149 fnc_add_log "echo /etc/{nsswitch.conf,ld.so.conf}" 150 ;; 151 *ncurses) 152 fnc_add_log "echo /usr/lib/{libcurses.so,libncurses.so{,.5},libform.so,libpanel.so,libmenu.so}" 153 ;; 154 *bash) 155 fnc_add_log "echo /bin/sh" 156 ;; 157 *flex) 158 fnc_add_log "echo /usr/bin/lex" 159 ;; 160 *shadow) 161 fnc_add_log "echo /etc/login.defs" 162 fnc_add_log "echo /etc/group" 163 ;; 164 *hotplug) 165 fnc_add_log "echo /var/log/hotplug" 166 fnc_add_log "echo /var/run/usb" 167 ;; 168 *sysklogd) 169 fnc_add_log "echo /etc/syslog.conf" 170 ;; 171 *sysvinit) 172 fnc_add_log "echo /etc/inittab" 173 fnc_add_log "echo /usr/bin/lastb" 174 ;; 175 *texinfo) 176 fnc_add_log "echo /usr/share/info/dir" 177 ;; 178 *udev) 179 fnc_add_log "find /lib/udev/devices" 180 fnc_add_log "echo /lib/firmware" 181 fnc_add_log "find /etc/udev/rules.d -type f" 182 fnc_add_log "echo /etc/udev/udev.conf" 183 ;; 184 *udev-rules) 185 fnc_add_log "echo /lib/udev/devices/{null,console}" 186 ;; 187 *util-linux) 188 fnc_add_log "echo /var/lib/hwclock" 189 fnc_add_log "echo /etc/nologin.txt" 190 ;; 191 *vim) 192 fnc_add_log "echo /etc/vimrc" 193 ;; 194 # Rules below here will log configuration files created in {C,H}LFS 195 # They will end up in a log named {c,h}lfs-sysconf 196 *setclock) 197 fnc_add_log "echo /etc/sysconfig/clock" 198 ;; 199 *inputrc) 200 fnc_add_log "echo /etc/inputrc" 201 ;; 202 *profile) 203 fnc_add_log "echo /etc/profile" 204 ;; 205 *hostname) 206 fnc_add_log "echo /etc/sysconfig/network" 207 ;; 208 *localnet) 209 fnc_add_log "echo /etc/sysconfig/network" 210 ;; 211 *hosts) 212 fnc_add_log "echo /etc/hosts" 213 ;; 214 *network) 215 fnc_add_log "echo /etc/sysconfig/network-devices/ifconfig.eth0/ipv4" 216 fnc_add_log "echo /etc/resolv.conf" 217 ;; 218 *fstab) 219 fnc_add_log "echo /etc/fstab" 220 ;; 221 *theend | *finished) 222 fnc_add_log "echo /etc/$PROGNAME-release" 223 fnc_add_log "echo /var/run/utmp" 224 fnc_add_log "echo /var/log/btmp" 225 fnc_add_log "echo /var/log/wtmp" 226 fnc_add_log "echo /var/log/lastlog" 227 ;; 228 esac 229 fi 230 } 231 232 233 #----------------------------------# 234 check_log_package() { # 235 #----------------------------------# 236 # Maybe don't need this function, but it will avoid writing some 237 # unnecessary paco commands in the Makefile. 238 239 case $this_script in 240 *changingowner) LOG_PACKAGE=0 ;; 241 *creatingdirs) LOG_PACKAGE=0 ;; 242 *createfiles) LOG_PACKAGE=0 ;; 243 *pwdgroup) LOG_PACKAGE=0 ;; 244 *devices) LOG_PACKAGE=0 ;; 245 *stripping) LOG_PACKAGE=0 ;; 246 *strippingagain) LOG_PACKAGE=0 ;; 247 *adjusting) LOG_PACKAGE=0 ;; 248 *temp-perl) LOG_PACKAGE=0 ;; 249 *readjusting) LOG_PACKAGE=0 ;; 250 *setclock) LOG_PACKAGE=0 ;; 251 *inputrc) LOG_PACKAGE=0 ;; 252 *profile) LOG_PACKAGE=0 ;; 253 *hostname) LOG_PACKAGE=0 ;; 254 *localnet) LOG_PACKAGE=0 ;; 255 *hosts) LOG_PACKAGE=0 ;; 256 *network) LOG_PACKAGE=0 ;; 257 *fstab) LOG_PACKAGE=0 ;; 258 *theend) LOG_PACKAGE=0 ;; 259 *finished) LOG_PACKAGE=0 ;; 260 *) LOG_PACKAGE=1 ;; 261 esac 262 } 263 264 #----------------------------------# 265 get_paco_src() { # 266 #----------------------------------# 267 # Download the paco sources 268 # We don't do any MD5SUM checking as of yet 269 # http://jaist.dl.sourceforge.net/sourceforge/paco/paco-1.10.10.tar.bz2 270 271 local PACO_URL1="http://$PACO_MIRROR1.dl.sourceforge.net/sourceforge/paco/$PACO_FILE" 272 local PACO_URL2="http://$PACO_MIRROR2.dl.sourceforge.net/sourceforge/paco/$PACO_FILE" 273 274 # Test if paco is to be used 275 [[ ! "$USE_PACO" = "y" ]] && return 276 277 # If the file exists in the archive copy it to the $BUILDDIR/sources dir. 278 if [ ! -z ${SRC_ARCHIVE} ] && 279 [ -d ${SRC_ARCHIVE} ] && 280 [ -f ${SRC_ARCHIVE}/$PACO_FILE ]; then 281 cp ${SRC_ARCHIVE}/$PACO_FILE . 282 echo "$PACO_FILE: -- copied from $SRC_ARCHIVE" 283 fromARCHIVE=1 284 else 285 echo "${BOLD}${YELLOW}$PACO_FILE: not found in ${SRC_ARCHIVE}${OFF}" 286 fromARCHIVE=0 287 # If the file does not exist yet in /sources download a fresh one 288 if [ ! -f $PACO_FILE ] ; then 289 if ! wget $PACO_URL1 && ! wget $PACO_URL2 ; then 290 gs_wrt_message "$PACO_FILE not found in the SRC_ARCHIVE or on any server..SKIPPING" 291 continue 292 fi 293 fi 294 fi 295 296 # Copy the freshly downloaded file to the source archive. 297 if [ ! -z ${SRC_ARCHIVE} ] && 298 [ -d ${SRC_ARCHIVE} ] && 299 [ -w ${SRC_ARCHIVE} ] && 300 [ "$fromARCHIVE" = "0" ] ; then 301 echo "Storing file:<$PACO_FILE> in the package archive" 302 cp -f $PACO_FILE ${SRC_ARCHIVE} 303 fi 304 } 305 306 307 #----------------------------------# 308 check_build_model() { # 309 #----------------------------------# 310 # Check what script we're running, and set some switches accordingly 311 312 CLFS_BOOT=0 313 314 case $PROGNAME in 315 hlfs) 316 # Not using Paco with uClibc, even if requested 317 if [ "$MODEL" = "uclibc" ]; then 318 USE_PACO=n 319 fi 320 ;; 321 clfs) 322 # CLFS boot method require it's own commands 323 if [ "$METHOD" = "boot" ]; then 324 CLFS_BOOT=1 325 fi 326 ;; 327 esac 328 } -
common/paco-build-lfs.sh
1 #!/bin/sh 2 set -e 3 4 cd $PKGDIR 5 ./configure --sysconfdir=/etc \ 6 --enable-scripts \ 7 --disable-gpaco && 8 make && 9 make install && 10 make logme -
common/paco-build-clfs.sh
1 #!/bin/sh 2 set -e 3 4 cd $PKGDIR 5 ./configure --sysconfdir=/etc \ 6 --enable-scripts \ 7 --disable-gpaco && 8 make && 9 make install && 10 make logme -
common/common-functions
532 532 --stringparam timezone $TIMEZONE \ 533 533 --stringparam page $PAGE \ 534 534 --stringparam lang $LANG \ 535 --stringparam use_paco $USE_PACO \ 535 536 -o ./${PROGNAME}-commands/ $XSL $BOOK/$ARCH-index.xml >>$LOGDIR/$LOG 2>&1 536 537 ;; 537 538 … … 557 558 --stringparam lang $LANG \ 558 559 --stringparam lc_all $LC_ALL \ 559 560 --stringparam grsecurity_host $GRSECURITY_HOST \ 561 --stringparam use_paco $USE_PACO \ 560 562 -o ./${PROGNAME}-commands/ $XSL $BOOK/index.xml >>$LOGDIR/$LOG 2>&1 561 563 ;; 562 564 lfs) … … 569 571 --stringparam timezone $TIMEZONE \ 570 572 --stringparam page $PAGE \ 571 573 --stringparam lang $LANG \ 574 --stringparam use_paco $USE_PACO \ 572 575 -o ./${PROGNAME}-commands/ $XSL $BOOK/index.xml >>$LOGDIR/$LOG 2>&1 573 576 ;; 574 577 *) exit 1 ;; … … 653 656 # Generate URLs file 654 657 create_urls 655 658 659 # If Paco is to be used, then download the sources 660 get_paco_src 661 656 662 IFS=$'\x0A' # Modify the 'internal field separator' to break on 'LF' only 657 663 for line in `cat urls.lst`; do 658 664 IFS=$saveIFS # Restore the system defaults -
HLFS/hlfs.xsl
43 43 <xsl:param name="lang" select="C"/> 44 44 <xsl:param name="lc_all" select="C"/> 45 45 46 <!-- Use paco? --> 47 <xsl:param name="use_paco" select="y"/> 48 46 49 <xsl:template match="/"> 47 50 <xsl:apply-templates select="//sect1"/> 48 51 </xsl:template> … … 193 196 <!-- Fixing bootscripts installation --> 194 197 <xsl:when test="ancestor::sect1[@id='bootable-bootscripts'] and 195 198 string() = 'make install'"> 199 <!-- inserting LD_PRELOAD before installing bootscripts --> 200 <xsl:if test="$use_paco != 'n' and $model != 'uclibc'"> 201 <xsl:text>export LD_PRELOAD=/usr/lib/libpaco-log.so
</xsl:text> 202 </xsl:if> 196 203 <xsl:text>make install
</xsl:text> 197 204 <xsl:text>cd ../blfs-bootscripts-&blfs-bootscripts-version;
</xsl:text> 198 205 </xsl:when> … … 292 299 <xsl:apply-templates/> 293 300 <xsl:text> || true
</xsl:text> 294 301 </xsl:when> 302 <!-- paco begin --> 303 <!-- General rule --> 304 <xsl:when test="$use_paco != 'n' and $model != 'uclibc' and 305 ancestor::chapter[@id != 'chapter-temporary-tools'] and 306 contains(string(),'make') and 307 contains(string(),'install')"> 308 <xsl:text>export LD_PRELOAD=/usr/lib/libpaco-log.so
</xsl:text> 309 <xsl:apply-templates/> 310 <xsl:text>
</xsl:text> 311 </xsl:when> 312 <!-- Linux-libc-headers --> 313 <xsl:when test="$use_paco != 'n' and $model != 'uclibc' and 314 ancestor::sect1[@id='ch-system-linux-headers'] and 315 contains(string(),'install ')"> 316 <xsl:text>export LD_PRELOAD=/usr/lib/libpaco-log.so
</xsl:text> 317 <xsl:apply-templates/> 318 <xsl:text>
</xsl:text> 319 </xsl:when> 320 <!-- paco end --> 295 321 <!-- The rest of commands --> 296 322 <xsl:otherwise> 297 323 <xsl:apply-templates/> -
HLFS/master.sh
47 47 EOF 48 48 ) >> $MKFILE.tmp 49 49 [[ "$TEST" != "0" ]] && wrt_test_log2 "${this_script}" 50 wrt_paco_prep 50 51 wrt_run_as_chroot1 "$toolchain" "$this_script" 52 wrt_paco_log "`echo $toolchain | sed -e 's@[0-9]\{3\}-@@'`" 51 53 ;; 52 54 53 55 *) … … 281 283 # Keep the script file name 282 284 this_script=`basename $file` 283 285 286 # If this script is *-paco, then skip it 287 case $this_script in 288 *paco ) continue ;; 289 esac 290 284 291 # Skip this script depending on jhalfs.conf flags set. 285 292 case $this_script in 286 293 # We'll run the chroot commands differently than the others, so skip them in the … … 290 297 *-stripping* ) [[ "$STRIP" = "n" ]] && continue ;; 291 298 esac 292 299 300 # Install paco as the first package in ch6, before installing 301 # linux-libc-headers, except in iterartive builds 302 if [[ -z "$N" ]]; then 303 case $this_script in 304 *linux-headers) 305 TMP_SCRIPT="$this_script" 306 this_script=`echo $this_script | sed -e 's/linux-headers/a-paco/'` 307 wrt_paco_inst "$this_script" 308 this_script="$TMP_SCRIPT" ;; 309 esac 310 fi 311 293 312 # Grab the name of the target 294 313 name=`echo $this_script | sed -e 's@[0-9]\{3\}-@@'` 295 314 … … 355 374 wrt_RunAsRoot "${this_script}" "${file}" 356 375 ;; 357 376 *) # The rest of Chapter06 377 wrt_paco_prep 358 378 wrt_run_as_chroot1 "${this_script}" "${file}" 379 wrt_paco_log "$pkg_tarball" 359 380 ;; 360 381 esac 361 382 # … … 375 396 PREV=${this_script}${N} 376 397 # Set system_build envar for iteration targets 377 398 system_build=$chapter6 399 400 # Reinstall paco after the toolchain has been readjusted. 401 case "${this_script}" in 402 *readjusting) 403 TMP_SCRIPT="$this_script" 404 this_script=`echo $this_script | sed -e 's/readjusting/x-paco/'` 405 wrt_paco_inst "$this_script" 406 this_script="$TMP_SCRIPT" ;; 407 esac 408 378 409 done # end for file in chapter06/* 379 410 380 411 } … … 433 464 else # Initialize the log and run the script 434 465 wrt_run_as_chroot2 "${this_script}" "${file}" 435 466 fi 467 wrt_paco_log "hlfs-sysconf" 436 468 ;; 469 *kernel) wrt_paco_prep 470 wrt_run_as_chroot2 "$this_script" "$file" 471 wrt_paco_log "$(get_package_tarball_name "linux")" 472 ;; 473 *bootscripts) wrt_paco_prep 474 wrt_run_as_chroot2 "$this_script" "$file" 475 wrt_paco_log "$(get_package_tarball_name "lfs-bootscripts")" 476 ;; 437 477 *) # All other scripts 438 478 wrt_run_as_chroot2 "${this_script}" "${file}" 479 wrt_paco_log "hlfs-sysconf" 439 480 ;; 440 481 esac 441 482 -
jhalfs
111 111 REPORT=${REPORT:=n} 112 112 VIMLANG=${VIMLANG:-n} 113 113 GRSECURITY_HOST=${GRSECURITY_HOST:-n} 114 USE_PACO=${USE_PACO:-n} 114 115 115 116 # Book surces envars 116 117 BRANCH_ID=${BRANCH_ID:=development} … … 269 270 [[ $VERBOSITY > 0 ]] && echo "OK" 270 271 fi 271 272 # 273 # paco module 274 if [[ "$USE_PACO" = "y" ]]; then 275 [[ $VERBOSITY > 0 ]] && echo -n "Loading paco module..." 276 source $COMMON_DIR/paco-functions 277 [[ $? > 0 ]] && echo "$COMMON_DIR/paco-functions did not load.." && exit 2 278 [[ $VERBOSITY > 0 ]] && echo "OK" 279 fi 280 # 272 281 # optimize module 273 282 if [[ "$OPTIMIZE" != "0" ]]; then 274 283 [[ $VERBOSITY > 0 ]] && echo -n "Loading optimization module..." … … 314 323 # 315 324 cp $COMMON_DIR/{makefile-functions,progress_bar.sh} $JHALFSDIR/ 316 325 # 326 [[ $USE_PACO != "n" ]] && cp $COMMON_DIR/paco-build-$PROGNAME.sh $JHALFSDIR/ 327 # 317 328 [[ "$OPTIMIZE" != "0" ]] && cp optimize/opt_override $JHALFSDIR/ 318 329 # 319 330 if [[ "$COMPARE" = "y" ]]; then -
Config.in
786 786 787 787 #--- End Advanced Features 788 788 endmenu 789 790 #--- PACO 791 config USE_PACO 792 bool "Use PACO" 793 default n 794 depends on !BOOK_BLFS && !BOOK_CLFS2 && !LIB_UCLIBC 795 796 config PACO_VERSION 797 string "PACO package version" 798 default "1.10.10" 799 depends USE_PACO 800 801 config PACO_FILE 802 string "PACO package full name" 803 default "paco-$PACO_VERSION.tar.bz2" 804 depends USE_PACO 805 help 806 #-- You can use .tar.gz if preferred 807 808 config PACO_MIRROR1 809 string "Sourceforge mirror 1" 810 default "heanet" 811 depends USE_PACO 812 help 813 #-- Sourceforge mirror to use for Paco source download 814 # 815 # Europe: heanet, belnet, puzzle, surfnet, switch, kent 816 # North America: superb-east, superb-west, umn, easynews 817 # South America: ufpr 818 # Asia: nchc, jaist 819 # Australia: optusnet 820 821 config PACO_MIRROR2 822 string "Sourceforge mirror 2" 823 default "kent" 824 depends USE_PACO 825 help 826 #-- Sourceforge mirror to use for Paco source download 827 # 828 # Europe: heanet, belnet, puzzle, surfnet, switch, kent 829 # North America: superb-east, superb-west, umn, easynews 830 # South America: ufpr 831 # Asia: nchc, jaist 832 # Australia: optusnet 833 834 #-- Internal Settings 835 menu "--- Internal Settings (WARNING: for paco developers only)" 836 depends USE_PACO 837 838 config PACO_INCLUDE 839 string "Include dirs" 840 default "/" 841 842 config PACO_EXCLUDE 843 string "Exclude dirs" 844 default "/${SCRIPT_ROOT}" 845 846 config PACO_TMPFILE 847 string "Temp file" 848 default "/tmp/paco.tmp" 849 850 config LD_PRELOAD 851 string "LD_PRELOAD" 852 default "/usr/lib/libpaco-log.so" 853 854 #--- End Internal Settings 855 endmenu 856 #--- End PACO 857
Note:
See TracBrowser
for help on using the repository browser.