Changeset 50c8292
- Timestamp:
- 08/05/2006 04:13:38 PM (18 years ago)
- Branches:
- 1.0
- Children:
- 9357c13
- Parents:
- 05ccaa9
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
contrib/jhalfs-paco.patch
r05ccaa9 r50c8292 1 1 Index: LFS/master.sh 2 2 =================================================================== 3 --- LFS/master.sh (revision 28 57)3 --- LFS/master.sh (revision 2885) 4 4 +++ LFS/master.sh (working copy) 5 5 @@ -173,6 +173,11 @@ … … 62 62 } 63 63 64 @@ -312,8 +341,1 8@@64 @@ -312,8 +341,15 @@ 65 65 else 66 66 wrt_run_as_chroot2 "$this_script" "$file" … … 68 68 + wrt_paco_log "lfs-sysconf" 69 69 ;; 70 + *kernel) wrt_paco_prep 71 + wrt_run_as_chroot2 "$this_script" "$file" 72 + wrt_paco_log "$pkg_tarball" 73 + ;; 74 + *bootscripts) wrt_paco_prep 75 + wrt_run_as_chroot2 "$this_script" "$file" 76 + wrt_paco_log "$pkg_tarball" 70 + *kernel | *bootscripts ) 71 + wrt_paco_prep 72 + wrt_run_as_chroot2 "$this_script" "$file" 73 + wrt_paco_log "$pkg_tarball" 77 74 + ;; 78 75 *) wrt_run_as_chroot2 "$this_script" "$file" … … 83 80 Index: LFS/lfs.xsl 84 81 =================================================================== 85 --- LFS/lfs.xsl (revision 28 57)82 --- LFS/lfs.xsl (revision 2885) 86 83 +++ LFS/lfs.xsl (working copy) 87 @@ -3 2,6 +32,9 @@84 @@ -39,6 +39,9 @@ 88 85 <!-- Locale settings --> 89 86 <xsl:param name="lang" select="C"/> … … 95 92 <xsl:apply-templates select="//sect1"/> 96 93 </xsl:template> 97 @@ -2 06,6 +209,33 @@94 @@ -239,6 +242,33 @@ 98 95 <xsl:apply-templates/> 99 96 <xsl:text> || true
</xsl:text> … … 129 126 <xsl:otherwise> 130 127 <xsl:apply-templates/> 128 Index: CLFS/master.sh 129 =================================================================== 130 --- CLFS/master.sh (revision 2885) 131 +++ CLFS/master.sh (working copy) 132 @@ -495,6 +495,11 @@ 133 # Keep the script file name 134 this_script=`basename $file` 135 136 + # If $this_script corresponds to a paco script, then skip it 137 + case "${this_script}" in 138 + *paco) continue ;; 139 + esac 140 + 141 # Test if the stripping phase must be skipped. 142 # Skip alsp temp-perl for iterative runs 143 case $this_script in 144 @@ -502,6 +507,18 @@ 145 *temp-perl*) [[ -n "$N" ]] && continue ;; 146 esac 147 148 + # Install paco as the first package in ch6, before installing 149 + # linux-libc-headers, except in iterartive builds 150 + if [[ -z "$N" ]]; then 151 + case $this_script in 152 + *linux-headers) 153 + TMP_SCRIPT="$this_script" 154 + this_script=`echo $this_script | sed -e 's/linux-headers/a-paco/'` 155 + wrt_paco_inst "$this_script" 156 + this_script="$TMP_SCRIPT" ;; 157 + esac 158 + fi 159 + 160 # Grab the name of the target, strip id number, XXX-script 161 name=`echo $this_script | sed -e 's@[0-9]\{3\}-@@' \ 162 -e 's@temp-@@' \ 163 @@ -554,7 +571,9 @@ 164 [[ "$OPTIMIZE" != "0" ]] && wrt_optimize "$name" && wrt_makeflags "$name" 165 fi 166 # 167 + wrt_paco_prep 168 wrt_run_as_chroot1 "${this_script}" "${file}" 169 + wrt_paco_log "$pkg_tarball" 170 # 171 [[ "$pkg_tarball" != "" ]] && wrt_remove_build_dirs "${name}" 172 # 173 @@ -569,6 +588,16 @@ 174 PREV=${this_script}${N} 175 # Set system_build envar for iteration targets 176 system_build=$basicsystem 177 + 178 + # Reinstalling paco after readsjusting the toolchain. 179 + case "${this_script}" in 180 + *adjusting) 181 + TMP_SCRIPT="$this_script" 182 + this_script=`echo ${this_script} | sed -e 's/adjusting/x-paco/'` 183 + wrt_paco_inst "$this_script" 184 + this_script="$TMP_SCRIPT" ;; 185 + esac 186 + 187 done # for file in final-system/* ... 188 } 189 190 @@ -605,6 +634,11 @@ 191 # Keep the script file name 192 this_script=`basename $file` 193 194 + # If $this_script corresponds to a paco script, then skip it 195 + case "${this_script}" in 196 + *paco) continue ;; 197 + esac 198 + 199 # Test if the stripping phase must be skipped 200 # Skip alsp temp-perl for iterative runs 201 case $this_script in 202 @@ -612,6 +646,18 @@ 203 *temp-perl*) [[ -n "$N" ]] && continue ;; 204 esac 205 206 + # Install paco as the first package in ch6, before installing 207 + # linux-libc-headers, except in iterartive builds 208 + if [[ -z "$N" ]]; then 209 + case $this_script in 210 + *linux-headers) 211 + TMP_SCRIPT="$this_script" 212 + this_script=`echo $this_script | sed -e 's/linux-headers/a-paco/'` 213 + wrt_paco_inst "$this_script" 214 + this_script="$TMP_SCRIPT" ;; 215 + esac 216 + fi 217 + 218 # Grab the name of the target, strip id number, XXX-script 219 name=`echo $this_script | sed -e 's@[0-9]\{3\}-@@' \ 220 -e 's@temp-@@' \ 221 @@ -666,7 +712,9 @@ 222 [[ "$OPTIMIZE" != "0" ]] && wrt_optimize "$name" && wrt_makeflags "$name" 223 fi 224 # 225 + wrt_paco_prep 226 wrt_run_as_root2 "${this_script}" "${file}" 227 + wrt_paco_log "$pkg_tarball" 228 # 229 [[ "$pkg_tarball" != "" ]] && wrt_remove_build_dirs2 "${name}" 230 # 231 @@ -681,6 +729,16 @@ 232 PREV=${this_script}${N} 233 # Set system_build envar for iteration targets 234 system_build=$basicsystem 235 + 236 + # Reinstalling paco after readsjusting the toolchain. 237 + case "${this_script}" in 238 + *adjusting) 239 + TMP_SCRIPT="$this_script" 240 + this_script=`echo ${this_script} | sed -e 's/adjusting/x-paco/'` 241 + wrt_paco_inst "$this_script" 242 + this_script="$TMP_SCRIPT" ;; 243 + esac 244 + 245 done # for file in final-system/* ... 246 } 247 248 @@ -729,7 +787,17 @@ 249 # 250 [[ "$pkg_tarball" != "" ]] && wrt_unpack2 "$pkg_tarball" 251 # 252 + case $this_script in 253 + *bootscripts* | *udev-rules ) 254 + wrt_paco_prep ;; 255 + esac 256 wrt_run_as_chroot1 "${this_script}" "${file}" 257 + case $this_script in 258 + *bootscripts* | *udev-rules ) 259 + wrt_paco_log "$pkg_tarball" ;; 260 + *) 261 + wrt_paco_log "clfs-sysconf" ;; 262 + esac 263 # 264 [[ "$pkg_tarball" != "" ]] && wrt_remove_build_dirs "${name}" 265 # 266 @@ -791,7 +859,17 @@ 267 # 268 [[ "$pkg_tarball" != "" ]] && wrt_unpack3 "$pkg_tarball" 269 # 270 + case $this_script in 271 + *bootscripts* | *udev-rules ) 272 + wrt_paco_prep ;; 273 + esac 274 wrt_run_as_root2 "${this_script}" "${file}" 275 + case $this_script in 276 + *bootscripts* | *udev-rules ) 277 + wrt_paco_log "$pkg_tarball" ;; 278 + *) 279 + wrt_paco_log "clfs-sysconf" ;; 280 + esac 281 # 282 [[ "$pkg_tarball" != "" ]] && wrt_remove_build_dirs2 "${name}" 283 # 284 @@ -863,8 +941,13 @@ 285 else 286 wrt_run_as_chroot1 "${this_script}" "${file}" 287 fi 288 + wrt_paco_log "clfs-sysconf" 289 ;; 290 - *) wrt_run_as_chroot1 "${this_script}" "${file}" ;; 291 + *kernel) wrt_paco_prep 292 + wrt_run_as_chroot1 "${this_script}" "${file}" 293 + wrt_paco_log "$pkg_tarball" ;; 294 + *) wrt_run_as_chroot1 "${this_script}" "${file}" 295 + wrt_paco_log "clfs-sysconf" ;; 296 esac 297 # 298 # Housekeeping...remove any build directory(ies) except if the package build fails. 299 @@ -942,8 +1025,13 @@ 300 else 301 wrt_run_as_root2 "${this_script}" "${file}" 302 fi 303 + wrt_paco_log "clfs-sysconf" 304 ;; 305 - *) wrt_run_as_root2 "${this_script}" "${file}" ;; 306 + *kernel) wrt_paco_prep 307 + wrt_run_as_root2 "${this_script}" "${file}" 308 + wrt_paco_log "$pkg_tarball" ;; 309 + *) wrt_run_as_root2 "${this_script}" "${file}" 310 + wrt_paco_log "clfs-sysconf" ;; 311 esac 312 # 313 # Housekeeping...remove any build directory(ies) except if the package build fails. 314 Index: CLFS/clfs.xsl 315 =================================================================== 316 --- CLFS/clfs.xsl (revision 2885) 317 +++ CLFS/clfs.xsl (working copy) 318 @@ -45,6 +45,9 @@ 319 <!-- Locale settings --> 320 <xsl:param name="lang" select="C"/> 321 322 + <!-- Use paco? --> 323 + <xsl:param name="use_paco" select="1"/> 324 + 325 <xsl:template match="/"> 326 <xsl:apply-templates select="//sect1"/> 327 </xsl:template> 328 @@ -106,6 +109,25 @@ 329 <xsl:text>tar -xvf ../vim-&vim-version;-lang.* --strip-components=1
</xsl:text> 330 </xsl:if> 331 </xsl:if> 332 + <!-- paco begin --> 333 + <!-- General rule --> 334 + <xsl:if test="$use_paco != '0' and 335 + @id='ch-scripts-bootscripts' or 336 + @id='ch-scripts-udev-rules' or 337 + @id='ch-bootable-kernel' or 338 + (../@id='chapter-building-system' and 339 + @id!='ch-system-temp-perl' and 340 + contains(string(),'make') and 341 + contains(string(),'install'))"> 342 + <xsl:text>export LD_PRELOAD=/usr/lib/libpaco-log.so
</xsl:text> 343 + </xsl:if> 344 + <!-- Linux headers --> 345 + <xsl:if test="$use_paco != '0' and 346 + @id='ch-system-linux-headers' and 347 + contains(string(),'install')"> 348 + <xsl:text>export LD_PRELOAD=/usr/lib/libpaco-log.so
</xsl:text> 349 + </xsl:if> 350 + <!-- paco end --> 351 <xsl:apply-templates select=".//para/userinput | .//screen"/> 352 <xsl:text>exit</xsl:text> 353 </exsl:document> 131 354 Index: common/paco-build-hlfs.sh 132 355 =================================================================== … … 148 371 Index: common/config 149 372 =================================================================== 150 --- common/config (revision 28 57)373 --- common/config (revision 2885) 151 374 +++ common/config (working copy) 152 @@ - 86,6 +86,23 @@375 @@ -91,6 +91,23 @@ 153 376 #--- Run farce testing 0(no)/1(yes) 154 377 RUN_FARCE=0 … … 174 397 # Don't edit it unless you know what you are doing 175 398 176 @@ -10 3,3 +120,9 @@399 @@ -108,3 +125,9 @@ 177 400 178 401 #--- farce report log directory … … 186 409 Index: common/func_validate_configs.sh 187 410 =================================================================== 188 --- common/func_validate_configs.sh (revision 28 56)411 --- common/func_validate_configs.sh (revision 2885) 189 412 +++ common/func_validate_configs.sh (working copy) 190 413 @@ -84,9 +84,9 @@ … … 192 415 193 416 # First internal variables, then the ones that change the book's flavour, and lastly system configuration variables 194 - 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"195 - 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"196 - 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"197 + 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"198 + 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"199 + 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"417 - 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 KEYMAP PAGE TIMEZONE LANG LC_ALL" 418 - local -r clfs_PARAM_LIST="BOOK BUILDDIR SRC_ARCHIVE GETPKG RUNMAKE METHOD ARCH TARGET TEST BOMB_TEST OPTIMIZE REPORT COMPARE RUN_ICA RUN_FARCE ITERATIONS STRIP FSTAB BOOT_CONFIG CONFIG GETKERNEL KEYMAP VIMLANG PAGE TIMEZONE LANG" 419 - 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" 420 + 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 KEYMAP PAGE TIMEZONE LANG LC_ALL" 421 + local -r clfs_PARAM_LIST="BOOK BUILDDIR SRC_ARCHIVE USE_PACO GETPKG RUNMAKE METHOD ARCH TARGET TEST BOMB_TEST OPTIMIZE REPORT COMPARE RUN_ICA RUN_FARCE ITERATIONS STRIP FSTAB BOOT_CONFIG CONFIG GETKERNEL KEYMAP VIMLANG PAGE TIMEZONE LANG" 422 + 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" 200 423 201 424 local -r ERROR_MSG_pt1='The variable \"${L_arrow}${config_param}${R_arrow}\" value ${L_arrow}${BOLD}${!config_param}${R_arrow} is invalid,' … … 213 436 --- common/paco-functions (revision 0) 214 437 +++ common/paco-functions (revision 0) 215 @@ -0,0 +1, 251 @@438 @@ -0,0 +1,311 @@ 216 439 +#!/bin/bash 217 440 + … … 220 443 +#----------------------------# 221 444 + 222 +# Not using Paco with uClibc, even if requested 223 +if [ $PROGNAME = "hlfs" ]; then 224 + if [ $MODEL = "uclibc" ]; then 225 + USE_PACO=0 226 + fi 227 +fi 445 +local paco_script="$1" 446 + 447 +check_build_model 228 448 + 229 449 +if [ $USE_PACO != 0 ]; then 230 + paco_script="$1" 231 + paco_file="chapter06/$paco_script" 232 + chapter6="$chapter6 $paco_script" 450 + case $PROGNAME in 451 + clfs ) 452 + paco_file="final-system/$paco_script" 453 + basicsystem="$basicsystem $paco_script" ;; 454 + * ) 455 + paco_file="chapter06/$paco_script" 456 + chapter6="$chapter6 $paco_script" ;; 457 + esac 233 458 + 234 459 + # Copy the paco build script to the correct directory and make it executable … … 237 462 + 238 463 + # Write target, dependency and unpack 239 + wrt_target "$paco_script" "$PREV" 240 + wrt_unpack2 "$PACO_FILE" 241 + 242 + # Run the script 243 + wrt_run_as_chroot1 "${paco_script}" "${paco_file}" 244 + 245 + # Clean up 246 + wrt_remove_build_dirs "paco" 464 + if [ $CLFS_BOOT = 1 ]; then 465 + wrt_target_boot "$paco_script" "$PREV" 466 + wrt_unpack3 "$PACO_FILE" 467 + wrt_run_as_root2 "${paco_script}" "${paco_file}" 468 + wrt_remove_build_dirs2 "paco" 469 + else 470 + wrt_target "$paco_script" "$PREV" 471 + wrt_unpack2 "$PACO_FILE" 472 + wrt_run_as_chroot1 "${paco_script}" "${paco_file}" 473 + wrt_remove_build_dirs "paco" 474 + fi 475 + 247 476 + wrt_touch 248 477 + … … 257 486 +#----------------------------------# and remove tmpfile 258 487 + 259 +# Not using Paco with uClibc, even if requested 260 +if [ $PROGNAME = "hlfs" ]; then 261 + if [ $MODEL = "uclibc" ]; then 262 + USE_PACO=0 488 +local TMPFILEPATH 489 + 490 +check_build_model 491 + 492 +check_log_package 493 + 494 +if [ $USE_PACO != 0 ] && [ $LOG_PACKAGE != 0 ]; then 495 + if [ $CLFS_BOOT = 1 ]; then 496 + TMPFILEPATH="$PACO_TMPFILE" 497 + else 498 + TMPFILEPATH="\$(MOUNT_PT)$PACO_TMPFILE" 263 499 + fi 264 +fi265 +266 +check_log_package267 +268 +if [ $USE_PACO != 0 ] && [ $LOG_PACKAGE != 0 ]; then269 500 +( 270 501 +cat << EOF … … 272 503 + echo "export PACO_EXCLUDE=\$(SRC):$PACO_EXCLUDE" >> envars && \\ 273 504 + echo "export PACO_TMPFILE=$PACO_TMPFILE" >> envars && \\ 274 + rm -f \$(MOUNT_PT)$PACO_TMPFILE505 + rm -f $TMPFILEPATH 275 506 +EOF 276 507 +) >> $MKFILE.tmp … … 284 515 +local PACKAGE 285 516 + 517 +# Extract package name and version from the tarball name 286 518 +PACKAGE=`echo $1 | sed -e 's/.tar.*//'` 287 519 + 288 +# Not using Paco with uClibc, even if requested 289 +if [ $PROGNAME = "hlfs" ]; then 290 + if [ $MODEL = "uclibc" ]; then 291 + USE_PACO=0 292 + fi 293 +fi 294 + 520 +check_build_model 521 + 522 +# Check if the package should be logged 295 523 +check_log_package 524 + 296 525 + 297 526 +if [ $USE_PACO != 0 ]; then 298 527 + if [ $LOG_PACKAGE != 0 ]; then 528 + # Only use this if doing CLFS boot build 529 + if [ $CLFS_BOOT = 1 ]; then 530 +( 531 +cat << EOF 532 + @if [ -e $PACO_TMPFILE ]; then \\ 533 + paco -lp+ $PACKAGE < $PACO_TMPFILE && \\ 534 + rm -f $PACO_TMPFILE; \\ 535 + fi; 536 +EOF 537 +) >> $MKFILE.tmp 538 + # All else should use these commands 539 + else 299 540 +( 300 541 +cat << EOF … … 305 546 +EOF 306 547 +) >> $MKFILE.tmp 548 + fi 307 549 + fi 550 + # Add missing files to the logs if needed 308 551 + wrt_paco_add_log 552 +fi 553 +} 554 + 555 + 556 +#----------------------------------# 557 +fnc_add_log() { # 558 +#----------------------------------# 559 + 560 +MISSING_FILE=$1 561 + 562 +if [ $CLFS_BOOT = 1 ]; then 563 + echo -e "\t@$MISSING_FILE | paco -lp+ $PACKAGE" >> $MKFILE.tmp 564 +else 565 + echo -e "\t@\$(CHROOT1) '$MISSING_FILE | paco -lp+ $PACKAGE'" >> $MKFILE.tmp 309 566 +fi 310 567 +} … … 318 575 +# Most of these is not needed for HLFS, but they do no harm. 319 576 +if [ $USE_PACO != 0 ]; then 320 + 577 + case $this_script in 321 578 + *glibc) 322 + echo -e "\t@\$(CHROOT1) 'find /lib -type l | paco -lp+ $PACKAGE'" >> $MKFILE.tmp323 + echo -e "\t@\$(CHROOT1) 'find /etc/{nsswitch.conf,ld.so.conf} | paco -lp+ $PACKAGE'" >> $MKFILE.tmp579 + fnc_add_log "find /lib -type l" 580 + fnc_add_log "find /etc/{nsswitch.conf,ld.so.conf}" 324 581 + ;; 325 582 + *ncurses) 326 + LIBS="/usr/lib/{libcurses.so,libncurses.so,libform.so,libpanel.so,libmenu.so}" 327 + echo -e "\t@\$(CHROOT1) 'find $LIBS | paco -lp+ $PACKAGE'" >> $MKFILE.tmp 583 + fnc_add_log "find /usr/lib/{libcurses.so,libncurses.so,libform.so,libpanel.so,libmenu.so}" 328 584 + ;; 329 585 + *bash) 330 + echo -e "\t@\$(CHROOT1) 'echo /bin/sh | paco -lp+ $PACKAGE'" >> $MKFILE.tmp586 + fnc_add_log "echo /bin/sh" 331 587 + ;; 332 588 + *flex) 333 + echo -e "\t@\$(CHROOT1) 'echo /usr/bin/lex | paco -lp+ $PACKAGE'" >> $MKFILE.tmp589 + fnc_add_log "echo /usr/bin/lex" 334 590 + ;; 335 591 + *shadow) 336 + echo -e "\t@\$(CHROOT1) 'echo /etc/login.defs | paco -lp+ $PACKAGE'" >> $MKFILE.tmp592 + fnc_add_log "echo /etc/login.defs" 337 593 + ;; 338 594 + *hotplug) 339 + echo -e "\t@\$(CHROOT1) 'echo /var/log/hotplug | paco -lp+ $PACKAGE'" >> $MKFILE.tmp340 + echo -e "\t@\$(CHROOT1) 'echo /var/run/usb | paco -lp+ $PACKAGE'" >> $MKFILE.tmp595 + fnc_add_log "echo /var/log/hotplug" 596 + fnc_add_log "echo /var/run/usb" 341 597 + ;; 342 598 + *sysklogd) 343 + echo -e "\t@\$(CHROOT1) 'echo /etc/syslog.conf | paco -lp+ $PACKAGE'" >> $MKFILE.tmp599 + fnc_add_log "echo /etc/syslog.conf" 344 600 + ;; 345 601 + *sysvinit) 346 + echo -e "\t@\$(CHROOT1) 'echo /etc/inittab | paco -lp+ $PACKAGE'" >> $MKFILE.tmp602 + fnc_add_log "echo /etc/inittab" 347 603 + ;; 348 604 + *udev) 349 + echo -e "\t@\$(CHROOT1) 'find /lib/udev/devices | paco -lp+ $PACKAGE'" >> $MKFILE.tmp350 + echo -e "\t@\$(CHROOT1) 'echo /lib/firmware | paco -lp+ $PACKAGE'" >> $MKFILE.tmp351 + echo -e "\t@\$(CHROOT1) 'find /etc/udev/rules.d -type f | paco -lp+ $PACKAGE'" >> $MKFILE.tmp605 + fnc_add_log "find /lib/udev/devices" 606 + fnc_add_log "echo /lib/firmware" 607 + fnc_add_log "find /etc/udev/rules.d -type f" 352 608 + ;; 353 609 + *util-linux) 354 + echo -e "\t@\$(CHROOT1) 'echo /var/lib/hwclock | paco -lp+ $PACKAGE'" >> $MKFILE.tmp355 + echo -e "\t@\$(CHROOT1) 'echo /etc/nologin.txt | paco -lp+ $PACKAGE'" >> $MKFILE.tmp610 + fnc_add_log "echo /var/lib/hwclock" 611 + fnc_add_log "echo /etc/nologin.txt" 356 612 + ;; 357 613 + *vim) 358 + echo -e "\t@\$(CHROOT1) 'echo /etc/vimrc | paco -lp+ $PACKAGE'" >> $MKFILE.tmp359 + ;; 360 + # Rules below here will log configuration files created in LFS and HLFS361 + # They will end up in a log named { h}lfs-sysconf614 + fnc_add_log "echo /etc/vimrc" 615 + ;; 616 + # Rules below here will log configuration files created in {C,H}LFS 617 + # They will end up in a log named {c,h}lfs-sysconf 362 618 + *setclock) 363 + echo -e "\t@\$(CHROOT2) 'echo /etc/sysconfig/clock | paco -lp+ $PACKAGE'" >> $MKFILE.tmp619 + fnc_add_log "echo /etc/sysconfig/clock" 364 620 + ;; 365 621 + *inputrc) 366 + echo -e "\t@\$(CHROOT2) 'echo /etc/inputrc | paco -lp+ $PACKAGE'" >> $MKFILE.tmp622 + fnc_add_log "echo /etc/inputrc" 367 623 + ;; 368 624 + *profile) 369 + echo -e "\t@\$(CHROOT2) 'echo /etc/profile | paco -lp+ $PACKAGE'" >> $MKFILE.tmp625 + fnc_add_log "echo /etc/profile" 370 626 + ;; 371 627 + *hostname) 372 + echo -e "\t@\$(CHROOT2) 'echo /etc/sysconfig/network | paco -lp+ $PACKAGE'" >> $MKFILE.tmp628 + fnc_add_log "echo /etc/sysconfig/network" 373 629 + ;; 374 630 + *localnet) 375 + echo -e "\t@\$(CHROOT2) 'echo /etc/sysconfig/network | paco -lp+ $PACKAGE'" >> $MKFILE.tmp631 + fnc_add_log "echo /etc/sysconfig/network" 376 632 + ;; 377 633 + *hosts) 378 + echo -e "\t@\$(CHROOT2) 'echo /etc/hosts | paco -lp+ $PACKAGE'" >> $MKFILE.tmp634 + fnc_add_log "echo /etc/hosts" 379 635 + ;; 380 636 + *network) 381 + echo -e "\t@\$(CHROOT2) 'echo /etc/sysconfig/network-devices/ifconfig.eth0/ipv4 | paco -lp+ $PACKAGE'" >> $MKFILE.tmp382 + echo -e "\t@\$(CHROOT2) 'echo /etc/resolv.conf | paco -lp+ $PACKAGE'" >> $MKFILE.tmp637 + fnc_add_log "echo /etc/sysconfig/network-devices/ifconfig.eth0/ipv4" 638 + fnc_add_log "echo /etc/resolv.conf" 383 639 + ;; 384 640 + *fstab) 385 + echo -e "\t@\$(CHROOT2) 'echo /etc/fstab | paco -lp+ $PACKAGE'" >> $MKFILE.tmp386 + ;; 387 + *theend) # LFS 388 + echo -e "\t@\$(CHROOT2) 'echo /etc/$PROGNAME-release | paco -lp+ $PACKAGE'" >> $MKFILE.tmp641 + fnc_add_log "echo /etc/fstab" 642 + ;; 643 + *theend) # LFS and CLFS 644 + fnc_add_log "echo /etc/$PROGNAME-release" 389 645 + ;; 390 646 + *finished) # HLFS 391 + echo -e "\t@\$(CHROOT2) 'echo /etc/$PROGNAME-release | paco -lp+ $PACKAGE'" >> $MKFILE.tmp647 + fnc_add_log "echo /etc/$PROGNAME-release" 392 648 + ;; 393 649 + esac … … 408 664 + *pwdgroup) LOG_PACKAGE=0 ;; 409 665 + *devices) LOG_PACKAGE=0 ;; 666 + *stripping) LOG_PACKAGE=0 ;; 410 667 + *strippingagain) LOG_PACKAGE=0 ;; 668 + *adjusting) LOG_PACKAGE=0 ;; 669 + *temp-perl) LOG_PACKAGE=0 ;; 411 670 + *readjusting) LOG_PACKAGE=0 ;; 412 671 + *setclock) LOG_PACKAGE=0 ;; … … 435 694 + 436 695 +# Test if paco is to be used 437 +[ ! "$USE_PACO" = "1"] && return696 +[[ ! "$USE_PACO" = "1" ]] && return 438 697 + 439 698 +# If the file exists in the archive copy it to the $BUILDDIR/sources dir. … … 465 724 +fi 466 725 +} 726 + 727 + 728 +#----------------------------------# 729 +check_build_model() { # 730 +#----------------------------------# 731 +# Check what script we're running, and set some switches accordingly 732 + 733 +CLFS_BOOT=0 734 + 735 +case $PROGNAME in 736 + hlfs) 737 + # Not using Paco with uClibc, even if requested 738 + if [ "$MODEL" = "uclibc" ]; then 739 + USE_PACO=0 740 + fi 741 + ;; 742 + clfs) 743 + # CLFS boot method require it's own commands 744 + if [ "$METHOD" = "boot" ]; then 745 + CLFS_BOOT=1 746 + fi 747 + ;; 748 +esac 749 +} 467 750 Index: common/paco-build-lfs.sh 468 751 =================================================================== 469 752 --- common/paco-build-lfs.sh (revision 0) 470 753 +++ common/paco-build-lfs.sh (revision 0) 754 @@ -0,0 +1,10 @@ 755 +#!/bin/sh 756 +set -e 757 + 758 +cd $PKGDIR 759 +./configure --sysconfdir=/etc \ 760 + --enable-scripts \ 761 + --disable-gpaco && 762 +make && 763 +make install && 764 +make logme 765 Index: common/paco-build-clfs.sh 766 =================================================================== 767 --- common/paco-build-clfs.sh (revision 0) 768 +++ common/paco-build-clfs.sh (revision 0) 471 769 @@ -0,0 +1,10 @@ 472 770 +#!/bin/sh … … 482 780 Index: common/common-functions 483 781 =================================================================== 484 --- common/common-functions (revision 28 57)782 --- common/common-functions (revision 2885) 485 783 +++ common/common-functions (working copy) 486 784 @@ -69,6 +69,9 @@ … … 494 792 Optimize [0-2] 495 793 0 = no optimization 496 @@ -733,6 +736,7 @@ 794 @@ -720,6 +723,7 @@ 795 --stringparam page $PAGE \ 796 --stringparam lang $LANG \ 797 --stringparam keymap $KEYMAP \ 798 + --stringparam use_paco $USE_PACO \ 799 -o ./${PROGNAME}-commands/ $XSL $BOOK/$ARCH-index.xml >>$LOGDIR/$LOG 2>&1 800 ;; 801 hlfs) 802 @@ -735,6 +739,7 @@ 497 803 --stringparam lc_all $LC_ALL \ 498 804 --stringparam keymap $KEYMAP \ … … 502 808 ;; 503 809 lfs) 504 @@ -74 4,6 +748,7 @@810 @@ -747,6 +752,7 @@ 505 811 --stringparam timezone $TIMEZONE \ 506 812 --stringparam page $PAGE \ … … 510 816 ;; 511 817 *) exit 1 ;; 512 @@ -81 0,6 +815,9 @@818 @@ -813,6 +819,9 @@ 513 819 # Generate URLs file 514 820 create_urls … … 522 828 Index: HLFS/hlfs.xsl 523 829 =================================================================== 524 --- HLFS/hlfs.xsl (revision 28 61)830 --- HLFS/hlfs.xsl (revision 2885) 525 831 +++ HLFS/hlfs.xsl (working copy) 526 @@ - 39,6 +39,9 @@832 @@ -46,6 +46,9 @@ 527 833 <xsl:param name="lang" select="C"/> 528 834 <xsl:param name="lc_all" select="C"/> … … 534 840 <xsl:apply-templates select="//sect1"/> 535 841 </xsl:template> 536 @@ -1 77,6 +180,10 @@842 @@ -192,6 +195,10 @@ 537 843 <!-- Fixing bootscripts installation --> 538 844 <xsl:when test="ancestor::sect1[@id='bootable-bootscripts'] and … … 545 851 <xsl:text>cd ../blfs-bootscripts-&blfs-bootscripts-version;
</xsl:text> 546 852 </xsl:when> 547 @@ -2 37,6 +244,27@@853 @@ -280,6 +287,25 @@ 548 854 <xsl:apply-templates/> 549 855 <xsl:text> || true
</xsl:text> 550 856 </xsl:when> 551 +552 857 + <!-- paco begin --> 553 858 + <!-- General rule --> … … 569 874 + </xsl:when> 570 875 + <!-- paco end --> 571 +572 876 <!-- The rest of commands --> 573 877 <xsl:otherwise> … … 575 879 Index: HLFS/master.sh 576 880 =================================================================== 577 --- HLFS/master.sh (revision 28 57)881 --- HLFS/master.sh (revision 2885) 578 882 +++ HLFS/master.sh (working copy) 579 @@ -76,7 +76,9 @@ 580 @echo "export PKGDIR=\$(SRC)" > envars 883 @@ -92,7 +92,9 @@ 581 884 EOF 582 885 ) >> $MKFILE.tmp 886 [[ "$TEST" != "0" ]] && wrt_test_log2 "${this_script}" 583 887 + wrt_paco_prep 584 888 wrt_run_as_chroot1 "$toolchain" "$this_script" … … 587 891 588 892 *) 589 @@ -3 10,6 +312,11 @@893 @@ -324,6 +326,11 @@ 590 894 # Keep the script file name 591 895 this_script=`basename $file` … … 599 903 case $this_script in 600 904 # We'll run the chroot commands differently than the others, so skip them in the 601 @@ -3 19,6 +326,18 @@905 @@ -333,6 +340,18 @@ 602 906 *-stripping* ) [[ "$STRIP" = "0" ]] && continue ;; 603 907 esac … … 618 922 name=`echo $this_script | sed -e 's@[0-9]\{3\}-@@'` 619 923 620 @@ -3 85,7 +404,9 @@924 @@ -398,7 +417,9 @@ 621 925 wrt_RunAsRoot "hlfs" "${this_script}" "${file}" 622 926 ;; … … 628 932 esac 629 933 # 630 @@ -4 05,6 +426,16 @@934 @@ -418,6 +439,16 @@ 631 935 PREV=${this_script}${N} 632 936 # Set system_build envar for iteration targets … … 645 949 646 950 } 647 @@ -4 63,9 +494,19 @@951 @@ -476,9 +507,19 @@ 648 952 else # Initialize the log and run the script 649 953 wrt_run_as_chroot2 "${this_script}" "${file}" … … 667 971 Index: master.sh 668 972 =================================================================== 669 --- master.sh (revision 28 56)973 --- master.sh (revision 2885) 670 974 +++ master.sh (working copy) 671 975 @@ -149,6 +149,8 @@
Note:
See TracChangeset
for help on using the changeset viewer.