Changeset 401f81e
- Timestamp:
- 08/16/2006 05:42:54 PM (18 years ago)
- Branches:
- 2.3, 2.3.x, 2.4, ablfs, ablfs-more, legacy, new_features, trunk
- Children:
- fdb330a
- Parents:
- 5be3651
- Files:
-
- 20 edited
Legend:
- Unmodified
- Added
- Removed
-
CLFS/clfs.xsl
r5be3651 r401f81e 29 29 30 30 <!-- Bomb on test suites failures? 31 0= no, I want to build the full system and review the logs32 1= yes, bomb at the first test suite failure to can review the build dir31 n = no, I want to build the full system and review the logs 32 y = yes, bomb at the first test suite failure to can review the build dir 33 33 --> 34 <xsl:param name="bomb-testsuite" select=" 0"/>34 <xsl:param name="bomb-testsuite" select="n"/> 35 35 36 36 <!-- Install vim-lang package? --> 37 <xsl:param name="vim-lang" select=" 1"/>37 <xsl:param name="vim-lang" select="y"/> 38 38 39 39 <!-- Time zone --> … … 103 103 <xsl:if test="sect2[@role='installation']"> 104 104 <xsl:text>cd $PKGDIR
</xsl:text> 105 <xsl:if test="@id='ch-system-vim' and $vim-lang = ' 1'">105 <xsl:if test="@id='ch-system-vim' and $vim-lang = 'y'"> 106 106 <xsl:text>tar -xvf ../vim-&vim-version;-lang.* --strip-components=1
</xsl:text> 107 107 </xsl:if> … … 126 126 ($testsuite = '2' or $testsuite = '3')"> 127 127 <xsl:choose> 128 <xsl:when test="$bomb-testsuite = ' 0'">128 <xsl:when test="$bomb-testsuite = 'n'"> 129 129 <xsl:value-of select="substring-before(string(),'make')"/> 130 130 <xsl:text>make -k</xsl:text> … … 198 198 <xsl:if test="contains(string(),'check')"> 199 199 <xsl:choose> 200 <xsl:when test="$bomb-testsuite = ' 0'">200 <xsl:when test="$bomb-testsuite = 'n'"> 201 201 <xsl:value-of select="substring-before(string(),'check')"/> 202 202 <xsl:text>-k check</xsl:text> … … 223 223 <xsl:when test="$testsuite != '0'"> 224 224 <xsl:choose> 225 <xsl:when test="$bomb-testsuite = ' 0'">225 <xsl:when test="$bomb-testsuite = 'n'"> 226 226 <xsl:text>make -k check >> $TEST_LOG 2>&1 || true
</xsl:text> 227 227 </xsl:when> … … 243 243 <xsl:value-of select="substring-before(string(),'>g')"/> 244 244 <xsl:choose> 245 <xsl:when test="$bomb-testsuite = ' 0'">245 <xsl:when test="$bomb-testsuite = 'n'"> 246 246 <xsl:text>>> $TEST_LOG 2>&1 || true
</xsl:text> 247 247 </xsl:when> -
CLFS/config
r5be3651 r401f81e 55 55 56 56 # Get the kernel package and patches even if no configutation file 57 # has been supplied? 0(no)/1(yes)58 GETKERNEL= 057 # has been supplied? n(no)/y(yes) 58 GETKERNEL=n 59 59 60 60 #--- Book's sources directory -
CLFS/master.sh
r5be3651 r401f81e 5 5 ### FUNCTIONS ### 6 6 ################################### 7 8 7 9 8 … … 499 498 # Skip alsp temp-perl for iterative runs 500 499 case $this_script in 501 *stripping*) [[ "$STRIP" = " 0" ]] && continue ;;500 *stripping*) [[ "$STRIP" = "n" ]] && continue ;; 502 501 *temp-perl*) [[ -n "$N" ]] && continue ;; 503 502 esac … … 609 608 # Skip alsp temp-perl for iterative runs 610 609 case $this_script in 611 *stripping*) [[ "$STRIP" = " 0" ]] && continue ;;610 *stripping*) [[ "$STRIP" = "n" ]] && continue ;; 612 611 *temp-perl*) [[ -n "$N" ]] && continue ;; 613 612 esac … … 884 883 885 884 # Add SBU-disk_usage report target if required 886 if [[ "$REPORT" = " 1" ]] ; then wrt_report ; fi885 if [[ "$REPORT" = "y" ]] ; then wrt_report ; fi 887 886 888 887 } … … 963 962 964 963 # Add SBU-disk_usage report target if required 965 if [[ "$REPORT" = " 1" ]] ; then wrt_report ; fi964 if [[ "$REPORT" = "y" ]] ; then wrt_report ; fi 966 965 967 966 } … … 987 986 final_system_Makefiles # $basicsystem 988 987 # Add the iterations targets, if needed 989 [[ "$COMPARE" != "0" ]] && wrt_compare_targets988 [[ "$COMPARE" = "y" ]] && wrt_compare_targets 990 989 bootscripts_Makefiles # $bootscripttools 991 990 bootable_Makefiles # $bootabletools … … 997 996 bm_final_system_Makefiles # $basicsystem 998 997 # Add the iterations targets, if needed 999 [[ "$COMPARE" != "0" ]] && wrt_compare_targets998 [[ "$COMPARE" = "y" ]] && wrt_compare_targets 1000 999 bm_bootscripts_Makefiles # $bootscipttools 1001 1000 bm_bootable_Makefiles # $bootabletoosl … … 1010 1009 $HEADER 1011 1010 1012 SRC= /sources 1013 MOUNT_PT= $BUILDDIR 1014 PKG_LST= $PKG_LST 1015 LUSER= $LUSER 1016 LGROUP= $LGROUP 1011 SRC = /sources 1012 MOUNT_PT = $BUILDDIR 1013 PKG_LST = $PKG_LST 1014 LUSER = $LUSER 1015 LGROUP = $LGROUP 1016 SCRIPT_ROOT = $SCRIPT_ROOT 1017 1018 BASEDIR = \$(MOUNT_PT) 1019 SRCSDIR = \$(BASEDIR)/sources 1020 CMDSDIR = \$(BASEDIR)/\$(SCRIPT_ROOT)/$PROGNAME-commands 1021 LOGDIR = \$(BASEDIR)/\$(SCRIPT_ROOT)/logs 1022 TESTLOGDIR = \$(BASEDIR)/\$(SCRIPT_ROOT)/test-logs 1023 1024 crSRCSDIR = /sources 1025 crCMDSDIR = /\$(SCRIPT_ROOT)/$PROGNAME-commands 1026 crLOGDIR = /\$(SCRIPT_ROOT)/logs 1027 crTESTLOGDIR = /\$(SCRIPT_ROOT)/test-logs 1028 1029 SU_LUSER = su - \$(LUSER) -c 1030 LUSER_HOME = /home/\$(LUSER) 1031 PRT_DU = echo -e "\nKB: \`du -skx --exclude=jhalfs \$(MOUNT_PT)\`\n" 1032 PRT_DU_CR = echo -e "\nKB: \`du -skx --exclude=\$(SCRIPT_ROOT) \$(MOUNT_PT)\`\n" 1033 1017 1034 1018 1035 include makefile-functions -
CLFS2/clfs2.xsl
r5be3651 r401f81e 18 18 19 19 <!-- Install vim-lang package? --> 20 <xsl:param name="vim-lang" select=" 1"/>20 <xsl:param name="vim-lang" select="y"/> 21 21 22 22 <!-- Time zone --> … … 76 76 <xsl:if test="sect2[@role='installation']"> 77 77 <xsl:text>cd $PKGDIR
</xsl:text> 78 <xsl:if test="@id='ch-system-vim' and $vim-lang = ' 1'">78 <xsl:if test="@id='ch-system-vim' and $vim-lang = 'y'"> 79 79 <xsl:text>tar -xvf ../vim-&vim-version;-lang.* --strip-components=1
</xsl:text> 80 80 </xsl:if> -
CLFS2/config
r5be3651 r401f81e 34 34 35 35 # Get the kernel package and patches even if no configutation file 36 # has been supplied? 0(no)/1(yes)37 GETKERNEL= 036 # has been supplied? n(no)/y(yes) 37 GETKERNEL=n 38 38 39 39 #--- Book's sources directory -
CLFS2/master.sh
r5be3651 r401f81e 216 216 # Skip alsp temp-perl for iterative runs 217 217 case $this_script in 218 *stripping*) [[ "$STRIP" = " 0" ]] && continue ;;218 *stripping*) [[ "$STRIP" = "n" ]] && continue ;; 219 219 esac 220 220 … … 404 404 405 405 # Add SBU-disk_usage report target if required 406 if [[ "$REPORT" = " 1" ]] ; then wrt_report ; fi406 if [[ "$REPORT" = "y" ]] ; then wrt_report ; fi 407 407 408 408 } … … 430 430 $HEADER 431 431 432 SRC= /sources 433 MOUNT_PT= $BUILDDIR 434 PKG_LST= $PKG_LST 435 LUSER= $LUSER 436 LGROUP= $LGROUP 432 SRC = /sources 433 MOUNT_PT = $BUILDDIR 434 PKG_LST = $PKG_LST 435 LUSER = $LUSER 436 LGROUP = $LGROUP 437 SCRIPT_ROOT = $SCRIPT_ROOT 438 439 BASEDIR = \$(MOUNT_PT) 440 SRCSDIR = \$(BASEDIR)/sources 441 CMDSDIR = \$(BASEDIR)/\$(SCRIPT_ROOT)/$PROGNAME-commands 442 LOGDIR = \$(BASEDIR)/\$(SCRIPT_ROOT)/logs 443 TESTLOGDIR = \$(BASEDIR)/\$(SCRIPT_ROOT)/test-logs 444 445 SU_LUSER = su - \$(LUSER) -c 446 PRT_DU = echo -e "\nKB: \`du -skx --exclude=jhalfs \$(MOUNT_PT)\`\n" 447 LUSER_HOME = /home/\$(LUSER) 437 448 438 449 include makefile-functions -
Config.in
r5be3651 r401f81e 59 59 60 60 config BRANCH_ID 61 string "B ranch(mandatory)"61 string "Book Version (mandatory)" 62 62 default "**EDIT ME**" 63 63 depends BRANCH … … 251 251 252 252 #--- HLFS specific params 253 config CONFIG_GRSECURITY_HOST253 config GRSECURITY_HOST 254 254 bool "Building on grsecurity enabled host?" 255 255 default n … … 357 357 #-- The directory where the created system will be located. 358 358 359 config CONFIG_GETPKG359 config GETPKG 360 360 bool "Retrieve source files" 361 361 default n … … 369 369 string "Package Archive Directory" 370 370 default "$SRC_ARCHIVE" 371 depends CONFIG_GETPKG371 depends GETPKG 372 372 help 373 373 #-- A local archive for packages/file (not $BUILDDIR/sources) … … 376 376 # if the user has the right priviledges. 377 377 378 config CONFIG_GETKERNEL378 config GETKERNEL 379 379 bool "Always retrieve kernel package" 380 380 default n 381 depends CONFIG_GETPKG381 depends GETPKG 382 382 help 383 383 #-- Get the kernel package and patches even if no configuration 384 384 # file has been supplied. 385 385 386 config CONFIG_RUNMAKE386 config RUNMAKE 387 387 bool "Run the makefile" 388 388 default n … … 390 390 #-- Automatically run the makefile once it has been created 391 391 392 config C ONFIG_REBUILD392 config CLEAN 393 393 bool "Rebuild files" 394 394 default n … … 410 410 bool "Run testsuites" 411 411 depends !BOOK_CLFS2 412 default n412 default y 413 413 help 414 414 #-- Run test suites … … 455 455 prompt "Flavour ->" 456 456 depends CONFIG_TESTS 457 default NO_BOMB458 457 459 458 config NO_BOMB 460 459 bool "Don't stop on test suite failures" 460 default n 461 461 462 462 config BOMB 463 463 bool "Abort the build at the first test suite failure" 464 default n 464 465 endchoice 465 466 466 467 config BOMB_TEST 467 int468 default "0" if NO_BOMB469 default "1" if BOMB 468 bool 469 default BOMB 470 470 471 #--- End Test Suites 471 472 … … 516 517 #--- End Kernel 517 518 518 config CONFIG_STRIP519 config STRIP 519 520 bool "Strip Installed Binaries/Libraries" 520 521 default y 521 522 522 config CONFIG_VIMLANG523 config VIMLANG 523 524 bool "Install vim-lang package" 524 525 default y 525 526 help 526 #-- install the optional vim-lang package527 #-- Install the optional vim-lang package 527 528 528 529 config TIMEZONE … … 572 573 depends on !BOOK_BLFS 573 574 574 config CONFIG_REPORT575 config REPORT 575 576 bool "Create SBU and disk usage report" 576 577 default y 577 578 578 579 #--- ICA/farce 579 config CO NFIG_COMPARE580 config COMPARE 580 581 bool "Run comparison analysis on final stage" 581 582 depends !BOOK_CLFS2 … … 597 598 598 599 config ITERATIONS 599 int "Number of test runs (2,3,4,5)" 600 depends on CO NFIG_COMPARE600 int "Number of test runs (2,3,4,5)" if COMPARE 601 depends on COMPARE 601 602 range 2 5 602 603 default 3 603 604 604 config CONFIG_ICA605 config RUN_ICA 605 606 bool "ICA testing" 606 depends on CO NFIG_COMPARE607 depends on COMPARE 607 608 default y 608 609 help 609 610 #-- Run ICA testing 610 611 611 config CONFIG_FARCE612 config RUN_FARCE 612 613 bool "farce testing" 613 depends on CO NFIG_COMPARE614 depends on COMPARE 614 615 default n 615 616 help … … 668 669 # default "none" 669 670 # depends CONFIG_BLFS_CMDS 670 671 672 # convert CONFIG_XXXX n/y to XXXX 0/1673 674 config GRSECURITY_HOST675 int676 default 0 if !CONFIG_GRSECURITY_HOST677 default 1 if CONFIG_GRSECURITY_HOST678 679 config COMPARE680 int681 default 0 if !CONFIG_COMPARE682 default 1 if CONFIG_COMPARE683 684 config GETPKG685 int686 default 0 if !CONFIG_GETPKG687 default 1 if CONFIG_GETPKG688 689 config GETKERNEL690 int691 default 0 if !CONFIG_GETKERNEL692 default 1 if CONFIG_GETKERNEL693 694 config RUNMAKE695 int696 default 0 if !CONFIG_RUNMAKE697 default 1 if CONFIG_RUNMAKE698 699 config STRIP700 int701 default 0 if !CONFIG_STRIP702 default 1 if CONFIG_STRIP703 704 config REPORT705 int706 default 0 if !CONFIG_REPORT707 default 1 if CONFIG_REPORT708 709 config VIMLANG710 int711 default 0 if !CONFIG_VIMLANG712 default 1 if CONFIG_VIMLANG713 714 config RUN_ICA715 int716 default 0 if !CONFIG_ICA717 default 1 if CONFIG_ICA718 719 config RUN_FARCE720 int721 default 0 if !CONFIG_FARCE722 default 1 if CONFIG_FARCE723 724 config CLEAN725 int726 default 0 if !CONFIG_REBUILD727 default 1 if CONFIG_REBUILD -
HLFS/config
r5be3651 r401f81e 10 10 MODEL=glibc 11 11 12 #--- The host system has grsecurity options enabled? 0(no)/1(yes)13 GRSECURITY_HOST= 012 #--- The host system has grsecurity options enabled? n(no)/y(yes) 13 GRSECURITY_HOST=n 14 14 15 15 #--- Unprivileged user and group name … … 25 25 26 26 # Get the kernel package and patches even if no configutation file 27 # has been supplied? 0(no)/1(yes)28 GETKERNEL= 027 # has been supplied? n(no)/y(yes) 28 GETKERNEL=n 29 29 30 30 #--- Book's sources directory -
HLFS/hlfs.xsl
r5be3651 r401f81e 18 18 19 19 <!-- Is the host kernel using grsecurity? --> 20 <xsl:param name="grsecurity_host" select=" 0"/>20 <xsl:param name="grsecurity_host" select="n"/> 21 21 22 22 <!-- Compile the keymap into the kernel? --> … … 32 32 33 33 <!-- Bomb on test suites failures? 34 0= no, I want to build the full system and review the logs35 1= yes, bomb at the first test suite failure to can review the build dir34 n = no, I want to build the full system and review the logs 35 y = yes, bomb at the first test suite failure to can review the build dir 36 36 --> 37 <xsl:param name="bomb-testsuite" select=" 0"/>37 <xsl:param name="bomb-testsuite" select="n"/> 38 38 39 39 <!-- Time zone --> … … 144 144 ($testsuite = '2' or $testsuite = '3')"> 145 145 <xsl:choose> 146 <xsl:when test="$bomb-testsuite = ' 0'">146 <xsl:when test="$bomb-testsuite = 'n'"> 147 147 <xsl:value-of select="substring-before(string(),'make')"/> 148 148 <xsl:text>make -k</xsl:text> … … 181 181 <xsl:when test="ancestor::sect1[@id='ch-system-kernfs'] and 182 182 contains(string(),'sysctl') 183 and $grsecurity_host =' 0'"/>183 and $grsecurity_host ='n'"/> 184 184 <!-- Setting $LC_ALL and $LANG for /etc/profile --> 185 185 <xsl:when test="ancestor::sect1[@id='bootable-profile'] and … … 231 231 <xsl:if test="contains(string(),'check')"> 232 232 <xsl:choose> 233 <xsl:when test="$bomb-testsuite = ' 0'">233 <xsl:when test="$bomb-testsuite = 'n'"> 234 234 <xsl:value-of select="substring-before(string(),'check')"/> 235 235 <xsl:text>-k check</xsl:text> … … 256 256 <xsl:apply-templates/> 257 257 <xsl:choose> 258 <xsl:when test="$bomb-testsuite = ' 0'">258 <xsl:when test="$bomb-testsuite = 'n'"> 259 259 <xsl:text> >> $TEST_LOG 2>&1 || true
</xsl:text> 260 260 </xsl:when> … … 276 276 <xsl:value-of select="substring-before(string(),'> glibc-')"/> 277 277 <xsl:choose> 278 <xsl:when test="$bomb-testsuite = ' 0'">278 <xsl:when test="$bomb-testsuite = 'n'"> 279 279 <xsl:text> >> $TEST_LOG 2>&1 || true
</xsl:text> 280 280 </xsl:when> -
HLFS/master.sh
r5be3651 r401f81e 14 14 local this_script=$2 15 15 local tc_phase 16 16 local binutil_tarball 17 local gcc_core_tarball 18 17 19 echo "${tab_}${tab_}${GREEN}toolchain ${L_arrow}${toolchain}${R_arrow}" 18 20 19 21 # 20 22 # Safe method to remove existing toolchain dirs 21 pkg_tarball=$(get_package_tarball_name "binutils") 22 wrt_remove_existing_dirs "$pkg_tarball" 23 pkg_tarball=$(get_package_tarball_name "gcc-core") 24 wrt_remove_existing_dirs "$pkg_tarball" 23 binutil_tarball=$(get_package_tarball_name "binutils") 24 gcc_core_tarball=$(get_package_tarball_name "gcc-core") 25 ( 26 cat << EOF 27 @\$(call remove_existing_dirs,$binutil_tarball) 28 @\$(call remove_existing_dirs,$gcc_core_tarball) 29 EOF 30 ) >> $MKFILE.tmp 31 25 32 # 26 33 # Manually remove the toolchain directories.. … … 54 61 esac 55 62 # 56 # Safe method to remove packages unpacked while inside the toolchain script 57 pkg_tarball=$(get_package_tarball_name "binutils") 58 wrt_remove_existing_dirs "$pkg_tarball" 59 pkg_tarball=$(get_package_tarball_name "gcc-core") 60 wrt_remove_existing_dirs "$pkg_tarball" 63 ( 64 cat << EOF 65 @\$(call remove_existing_dirs,$binutil_tarball) 66 @\$(call remove_existing_dirs,$gcc_core_tarball) 67 EOF 68 ) >> $MKFILE.tmp 69 61 70 # 62 71 # Manually remove the toolchain directories.. … … 167 176 *introduction* ) continue ;; 168 177 # Test if the stripping phase must be skipped 169 *stripping* ) [[ "$STRIP" = " 0" ]] && continue ;;178 *stripping* ) [[ "$STRIP" = "n" ]] && continue ;; 170 179 *) ;; 171 180 esac … … 279 288 *chroot* ) continue ;; 280 289 # Test if the stripping phase must be skipped 281 *-stripping* ) [[ "$STRIP" = " 0" ]] && continue ;;290 *-stripping* ) [[ "$STRIP" = "n" ]] && continue ;; 282 291 esac 283 292 … … 457 466 458 467 # Add SBU-disk_usage report target if required 459 if [[ "$REPORT" = " 1" ]] ; then wrt_report ; fi468 if [[ "$REPORT" = "y" ]] ; then wrt_report ; fi 460 469 } 461 470 … … 474 483 chapter6_Makefiles 475 484 # Add the iterations targets, if needed 476 [[ "$COMPARE" != "0" ]] && wrt_compare_targets485 [[ "$COMPARE" = "y" ]] && wrt_compare_targets 477 486 chapter7_Makefiles 478 487 … … 483 492 $HEADER 484 493 485 SRC= /sources 486 MOUNT_PT= $BUILDDIR 487 PKG_LST= $PKG_LST 488 LUSER= $LUSER 489 LGROUP= $LGROUP 494 SRC = /sources 495 MOUNT_PT = $BUILDDIR 496 PKG_LST = $PKG_LST 497 LUSER = $LUSER 498 LGROUP = $LGROUP 499 SCRIPT_ROOT = $SCRIPT_ROOT 500 501 BASEDIR = \$(MOUNT_PT) 502 SRCSDIR = \$(BASEDIR)/sources 503 CMDSDIR = \$(BASEDIR)/\$(SCRIPT_ROOT)/$PROGNAME-commands 504 LOGDIR = \$(BASEDIR)/\$(SCRIPT_ROOT)/logs 505 TESTLOGDIR = \$(BASEDIR)/\$(SCRIPT_ROOT)/test-logs 506 507 crSRCSDIR = /sources 508 crCMDSDIR = /\$(SCRIPT_ROOT)/$PROGNAME-commands 509 crLOGDIR = /\$(SCRIPT_ROOT)/logs 510 crTESTLOGDIR = /\$(SCRIPT_ROOT)/test-logs 511 512 SU_LUSER = su - \$(LUSER) -c 513 LUSER_HOME = /home/\$(LUSER) 514 PRT_DU = echo -e "\nKB: \`du -skx --exclude=jhalfs \$(MOUNT_PT)\`\n" 515 PRT_DU_CR = echo -e "\nKB: \`du -skx --exclude=\$(SCRIPT_ROOT) \$(MOUNT_PT)\`\n" 490 516 491 517 include makefile-functions -
LFS/config
r5be3651 r401f81e 19 19 20 20 # Get the kernel package and patches even if no configuration file 21 # has been supplied? 0(no)/1(yes)22 GETKERNEL= 021 # has been supplied? n(no)/y(yes) 22 GETKERNEL=n 23 23 24 24 #--- Book's sources directory -
LFS/lfs.xsl
r5be3651 r401f81e 23 23 24 24 <!-- Bomb on test suites failures? 25 0= no, I want to build the full system and review the logs26 1= yes, bomb at the first test suite failure to can review the build dir25 n = no, I want to build the full system and review the logs 26 y = yes, bomb at the first test suite failure to can review the build dir 27 27 --> 28 <xsl:param name="bomb-testsuite" select=" 0"/>28 <xsl:param name="bomb-testsuite" select="n"/> 29 29 30 30 <!-- Install vim-lang package? --> 31 <xsl:param name="vim-lang" select=" 1"/>31 <xsl:param name="vim-lang" select="y"/> 32 32 33 33 <!-- Time zone --> … … 91 91 <xsl:if test="sect2[@role='installation']"> 92 92 <xsl:text>cd $PKGDIR
</xsl:text> 93 <xsl:if test="@id='ch-system-vim' and $vim-lang = ' 1'">93 <xsl:if test="@id='ch-system-vim' and $vim-lang = 'y'"> 94 94 <xsl:text>tar -xvf ../vim-&vim-version;-lang.* --strip-components=1
</xsl:text> 95 95 </xsl:if> … … 118 118 $testsuite = '3')"> 119 119 <xsl:choose> 120 <xsl:when test="$bomb-testsuite = ' 0'">120 <xsl:when test="$bomb-testsuite = 'n'"> 121 121 <xsl:value-of select="substring-before(string(),'make')"/> 122 122 <xsl:text>make -k</xsl:text> … … 186 186 <xsl:if test="contains(string(),'check')"> 187 187 <xsl:choose> 188 <xsl:when test="$bomb-testsuite = ' 0'">188 <xsl:when test="$bomb-testsuite = 'n'"> 189 189 <xsl:value-of select="substring-before(string(),'check')"/> 190 190 <xsl:text>-k check</xsl:text> … … 213 213 $testsuite = '3'"> 214 214 <xsl:choose> 215 <xsl:when test="$bomb-testsuite = ' 0'">215 <xsl:when test="$bomb-testsuite = 'n'"> 216 216 <xsl:text>make -k check >> $TEST_LOG 2>&1 || true
</xsl:text> 217 217 </xsl:when> -
LFS/master.sh
r5be3651 r401f81e 6 6 ### FUNCTIONS ### 7 7 ################################### 8 9 8 10 9 … … 81 80 *expect) [[ "${TEST}" = "0" ]] && continue ;; 82 81 *dejagnu) [[ "${TEST}" = "0" ]] && continue ;; 83 *stripping) [[ "${STRIP}" = " 0" ]] && continue ;;82 *stripping) [[ "${STRIP}" = "n" ]] && continue ;; 84 83 *glibc) [[ "${TEST}" = "3" ]] && \ 85 84 sed -i 's@/usr/lib/locale@/tools/lib/locale@' $file ;; … … 178 177 case "${this_script}" in 179 178 *chroot) continue ;; 180 *stripping*) [[ "${STRIP}" = " 0" ]] && continue ;;179 *stripping*) [[ "${STRIP}" = "n" ]] && continue ;; 181 180 esac 182 181 … … 336 335 337 336 # Add SBU-disk_usage report target if required 338 if [[ "$REPORT" = " 1" ]] ; then wrt_report ; fi337 if [[ "$REPORT" = "y" ]] ; then wrt_report ; fi 339 338 } 340 339 … … 353 352 chapter6_Makefiles 354 353 # Add the iterations targets, if needed 355 [[ "$COMPARE" != "0" ]] && wrt_compare_targets354 [[ "$COMPARE" = "y" ]] && wrt_compare_targets 356 355 chapter789_Makefiles 357 356 … … 363 362 $HEADER 364 363 365 SRC= /sources 366 MOUNT_PT= $BUILDDIR 367 PKG_LST= $PKG_LST 368 LUSER= $LUSER 369 LGROUP= $LGROUP 364 SRC = /sources 365 MOUNT_PT = $BUILDDIR 366 PKG_LST = $PKG_LST 367 LUSER = $LUSER 368 LGROUP = $LGROUP 369 SCRIPT_ROOT = $SCRIPT_ROOT 370 371 BASEDIR = \$(MOUNT_PT) 372 SRCSDIR = \$(BASEDIR)/sources 373 CMDSDIR = \$(BASEDIR)/\$(SCRIPT_ROOT)/$PROGNAME-commands 374 LOGDIR = \$(BASEDIR)/\$(SCRIPT_ROOT)/logs 375 TESTLOGDIR = \$(BASEDIR)/\$(SCRIPT_ROOT)/test-logs 376 377 crSRCSDIR = /sources 378 crCMDSDIR = /\$(SCRIPT_ROOT)/$PROGNAME-commands 379 crLOGDIR = /\$(SCRIPT_ROOT)/logs 380 crTESTLOGDIR = /\$(SCRIPT_ROOT)/test-logs 381 382 SU_LUSER = su - \$(LUSER) -c 383 LUSER_HOME = /home/\$(LUSER) 384 PRT_DU = echo -e "\nKB: \`du -skx --exclude=jhalfs \$(MOUNT_PT)\`\n" 385 PRT_DU_CR = echo -e "\nKB: \`du -skx --exclude=\$(SCRIPT_ROOT) \$(MOUNT_PT)\`\n" 386 370 387 371 388 include makefile-functions -
Makefile
r5be3651 r401f81e 8 8 9 9 all: menuconfig 10 @clear 10 11 @touch using_menuconfig 11 12 @`grep RUN_ME configuration | sed -e 's@RUN_ME=\"@@' -e 's@\"@@' ` || rm -f using_menuconfig -
common/common-functions
r5be3651 r401f81e 261 261 } 262 262 263 #----------------------------------#264 wrt_remove_existing_dirs() { #265 #----------------------------------#266 local PKG_NAME=$1267 (268 cat << EOF269 @PKG_PATH=\`ls -t \$(MOUNT_PT)\$(SRC)/${PKG_NAME} | head -n1\` && \\270 ROOT=\`tar -tf \$\$PKG_PATH | head -n1 | sed -e 's@^./@@;s@/.*@@'\` && \\271 [[ -n \$\$ROOT ]] && \\272 rm -rf \$(MOUNT_PT)\$(SRC)/\$\$ROOT && \\273 if [ -e \$(MOUNT_PT)\$(SRC)/${PKG_NAME%-*}-build ]; then \\274 rm -rf \$(MOUNT_PT)\$(SRC)/${PKG_NAME%-*}-build; \\275 fi;276 EOF277 ) >> $MKFILE.tmp278 }279 280 #----------------------------------#281 wrt_remove_existing_dirs2() { #282 #----------------------------------#283 local PKG_NAME=$1284 (285 cat << EOF286 @PKG_PATH=\`ls -t \$(SRC)/${PKG_NAME} | head -n1\` && \\287 ROOT=\`tar -tf \$\$PKG_PATH | head -n1 | sed -e 's@^./@@;s@/.*@@'\` && \\288 [[ -n \$\$ROOT ]] && \\289 rm -rf \$(SRC)/\$\$ROOT && \\290 if [ -e \$(SRC)/${PKG_NAME%-*}-build ]; then \\291 rm -rf \$(SRC)/${PKG_NAME%-*}-build; \\292 fi;293 EOF294 ) >> $MKFILE.tmp295 }296 297 298 299 #----------------------------------#300 wrt_unpack() { # Unpack and set 'ROOT' var301 #----------------------------------#302 local FILE=$1303 local optSAVE_PREVIOUS=$2304 305 if [ "${optSAVE_PREVIOUS}" != "1" ]; then306 wrt_remove_existing_dirs "$FILE"307 fi308 (309 cat << EOF310 @\$(call unpack,$FILE)311 @ROOT=\`head -n1 \$(MOUNT_PT)\$(SRC)/\$(PKG_LST) | sed 's@^./@@;s@/.*@@'\` && \\312 echo "export PKGDIR=\$(MOUNT_PT)\$(SRC)/\$\$ROOT" > envars && \\313 chown -R \$(LUSER) \$(MOUNT_PT)\$(SRC)/\$\$ROOT314 EOF315 ) >> $MKFILE.tmp316 }317 318 319 #----------------------------------#320 wrt_unpack2() { #321 #----------------------------------#322 local FILE=$1323 local optSAVE_PREVIOUS=$2324 325 if [ "${optSAVE_PREVIOUS}" != "1" ]; then326 wrt_remove_existing_dirs "$FILE"327 fi328 (329 cat << EOF330 @\$(call unpack2,$FILE)331 @ROOT=\`head -n1 \$(MOUNT_PT)\$(SRC)/\$(PKG_LST) | sed 's@^./@@;s@/.*@@'\` && \\332 echo "export PKGDIR=\$(SRC)/\$\$ROOT" > envars333 EOF334 ) >> $MKFILE.tmp335 }336 337 338 #----------------------------------#339 wrt_unpack3() { #340 #----------------------------------#341 local FILE=$1342 local optSAVE_PREVIOUS=$2343 344 if [ "${optSAVE_PREVIOUS}" != "1" ]; then345 wrt_remove_existing_dirs2 "$FILE"346 fi347 (348 cat << EOF349 @\$(call unpack3,$FILE)350 @ROOT=\`head -n1 \$(SRC)/\$(PKG_LST) | sed 's@^./@@;s@/.*@@'\` && \\351 echo "export PKGDIR=\$(SRC)/\$\$ROOT" > envars352 EOF353 ) >> $MKFILE.tmp354 }355 263 356 264 #----------------------------------# … … 392 300 393 301 #----------------------------------# 302 wrt_copy_fstab() { # 303 #----------------------------------# 304 local i=$1 305 ( 306 cat << EOF 307 @cp -v $FSTAB \$(MOUNT_PT)/etc/fstab >>logs/$i 2>&1 308 EOF 309 ) >> $MKFILE.tmp 310 } 311 312 313 #----------------------------------# 314 wrt_copy_fstab2() { # 315 #----------------------------------# 316 local i=$1 317 ( 318 cat << EOF 319 @cp -v /sources/fstab /etc/fstab >>logs/$i 2>&1 320 EOF 321 ) >> $MKFILE.tmp 322 } 323 324 325 #----------------------------------# 326 wrt_report() { # 327 #----------------------------------# 328 ( 329 cat << EOF 330 331 create-sbu_du-report: $PREV 332 @\$(call echo_message, Building) 333 @./create-sbu_du-report.sh logs $VERSION 334 @\$(call echo_report,$VERSION-SBU_DU-$(date --iso-8601).report) 335 @touch \$@ 336 EOF 337 ) >> $MKFILE.tmp 338 339 chapter789="$chapter789 create-sbu_du-report" 340 } 341 342 unset wrt_unpack 343 #----------------------------------# 344 wrt_unpack() { # Unpack and set 'ROOT' var 345 #----------------------------------# 346 local FILE=$1 347 local optSAVE_PREVIOUS=$2 348 349 if [[ "${optSAVE_PREVIOUS}" != "1" ]]; then 350 ( 351 cat << EOF 352 @\$(call remove_existing_dirs,$FILE) 353 EOF 354 ) >> $MKFILE.tmp 355 fi 356 357 ( 358 cat << EOF 359 @\$(call unpack,$FILE) 360 @\$(call get_pkg_root) 361 EOF 362 ) >> $MKFILE.tmp 363 364 } 365 366 unset wrt_unpack2 367 #----------------------------------# 368 wrt_unpack2() { # 369 #----------------------------------# 370 local FILE=$1 371 local optSAVE_PREVIOUS=$2 372 373 if [ "${optSAVE_PREVIOUS}" != "1" ]; then 374 ( 375 cat << EOF 376 @\$(call remove_existing_dirs,$FILE) 377 EOF 378 ) >> $MKFILE.tmp 379 fi 380 ( 381 cat << EOF 382 @\$(call unpack2,$FILE) 383 @\$(call get_pkg_root,nouser) 384 EOF 385 ) >> $MKFILE.tmp 386 } 387 388 #----------------------------------# 389 wrt_unpack3() { # 390 #----------------------------------# 391 local FILE=$1 392 local optSAVE_PREVIOUS=$2 393 394 if [ "${optSAVE_PREVIOUS}" != "1" ]; then 395 ( 396 cat << EOF 397 @\$(call remove_existing_dirs2,$FILE) 398 EOF 399 ) >> $MKFILE.tmp 400 fi 401 ( 402 cat << EOF 403 @\$(call unpack3,$FILE) 404 @\$(call get_pkg_root2) 405 EOF 406 ) >> $MKFILE.tmp 407 } 408 409 410 unset wrt_remove_build_dirs 411 #----------------------------------# 412 wrt_remove_build_dirs() { # 413 #----------------------------------# 414 local name=$1 415 ( 416 cat << EOF 417 @\$(call remove_build_dirs,$name) 418 EOF 419 ) >> $MKFILE.tmp 420 } 421 422 #----------------------------------# 423 wrt_remove_build_dirs2() { # 424 #----------------------------------# 425 local name=$1 426 ( 427 cat << EOF 428 @\$(call remove_build_dirs2,$name) 429 EOF 430 ) >> $MKFILE.tmp 431 } 432 433 434 435 unset wrt_touch 436 #----------------------------------# 437 wrt_touch() { # 438 #----------------------------------# 439 ( 440 cat << EOF 441 @\$(call housekeeping) 442 EOF 443 ) >> $MKFILE.tmp 444 } 445 446 unset wrt_RunAsUser 447 #----------------------------------# 394 448 wrt_RunAsUser() { # Execute script inside time { }, footer to log file 395 449 #----------------------------------# 396 450 local this_script=$1 397 451 local file=$2 398 ( 399 cat << EOF 400 @( time { su - \$(LUSER) -c "source /home/\$(LUSER)/.bashrc && $JHALFSDIR/${PROGNAME}-commands/$file" >>logs/$this_script 2>&1 ; } ) 2>>logs/$this_script && \\ 401 echo -e "\nKB: \`du -skx --exclude=${SCRIPT_ROOT} \$(MOUNT_PT)\`\n" >>logs/$this_script 452 453 ( 454 cat << EOF 455 @( time { \$(SU_LUSER) "source \$(LUSER_HOME)/.bashrc && \$(CMDSDIR)/`dirname $file`/\$@" >> logs/\$@ 2>&1; } ) 2>> logs/\$@ && \\ 456 \$(PRT_DU) >> logs/\$@ 402 457 EOF 403 458 ) >> $MKFILE.tmp … … 423 478 ( 424 479 cat << EOF 425 @( time { export ${MOUNT_ENV}=\$(MOUNT_PT) && ${PROGNAME}-commands/$file >>logs/$this_script 2>&1 ; } ) 2>>logs/$this_script && \\ 426 echo -e "\nKB: \`du -skx --exclude=${SCRIPT_ROOT} \$(MOUNT_PT)\`\n" >>logs/$this_script 427 EOF 428 ) >> $MKFILE.tmp 429 } 430 480 @( time { export ${MOUNT_ENV}=\$(MOUNT_PT) && ${PROGNAME}-commands/`dirname $file`/\$@ >>logs/\$@ 2>&1 ; } ) 2>>logs/\$@ && \\ 481 \$(PRT_DU_CR) >>logs/\$@ 482 EOF 483 ) >> $MKFILE.tmp 484 } 431 485 432 486 #----------------------------------# … … 437 491 ( 438 492 cat << EOF 439 @( time { source envars && ${PROGNAME}-commands/$file >>logs/$this_script 2>&1 ; } ) 2>>logs/$this_script && \\ 440 echo -e "\nKB: \`du -skx --exclude=${SCRIPT_ROOT} \`\n" >>logs/$this_script 441 EOF 442 ) >> $MKFILE.tmp 443 } 444 445 493 @( time { source envars && ${PROGNAME}-commands/`dirname $file`/\$@ >>logs/\$@ 2>&1 ; } ) 2>>logs/\$@ && \\ 494 echo -e "\nKB: \`du -skx --exclude=${SCRIPT_ROOT} \`\n" >>logs/\$@ 495 EOF 496 ) >> $MKFILE.tmp 497 } 498 499 500 unset wrt_run_as_chroot1 446 501 #----------------------------------# 447 502 wrt_run_as_chroot1() { # … … 450 505 local file=$2 451 506 ( 452 453 @( time { \$(CHROOT1) 'cd /${SCRIPT_ROOT} && source envars && /${SCRIPT_ROOT}/${PROGNAME}-commands/$file >>/${SCRIPT_ROOT}/logs/${this_script} 2>&1' ; } ) 2>>logs/$this_script&& \\454 echo -e "\nKB: \`du -skx --exclude=${SCRIPT_ROOT} \$(MOUNT_PT)\`\n" >>logs/${this_script}455 EOF 456 ) >> $MKFILE.tmp 457 } 458 459 507 cat << EOF 508 @( time { \$(CHROOT1) 'cd \$(SCRIPT_ROOT) && source envars && \$(crCMDSDIR)/`dirname $file`/\$@ >>logs/\$@ 2>&1' ; } ) 2>>logs/\$@ && \\ 509 \$(PRT_DU_CR) >> logs/\$@ 510 EOF 511 ) >> $MKFILE.tmp 512 } 513 514 unset wrt_run_as_chroot2 460 515 #----------------------------------# 461 516 wrt_run_as_chroot2() { # … … 465 520 ( 466 521 cat << EOF 467 @( time { \$(CHROOT2) 'cd /${SCRIPT_ROOT} && source envars && /${SCRIPT_ROOT}/${PROGNAME}-commands/$file >>/${SCRIPT_ROOT}/logs/${this_script} 2>&1' ; } ) 2>>logs/$this_script&& \\468 echo -e "\nKB: \`du -skx --exclude=${SCRIPT_ROOT} \$(MOUNT_PT)\`\n" >>logs/${this_script}469 EOF 470 ) >> $MKFILE.tmp 471 } 472 473 474 #----------------------------------# 475 wrt_ copy_fstab() { #522 @( time { \$(CHROOT2) 'cd \$(SCRIPT_ROOT) && source envars && \$(crCMDSDIR)/`dirname $file`/\$@ >>logs/\@ 2>&1' ; } ) 2>>logs/\@ && \\ 523 \$(PRT_DU_CR) >> logs/\$@ 524 EOF 525 ) >> $MKFILE.tmp 526 } 527 528 unset wrt_target 529 #----------------------------------# 530 wrt_target() { # Create target and initialize log file 476 531 #----------------------------------# 477 532 local i=$1 478 ( 479 cat << EOF 480 @cp -v $FSTAB \$(MOUNT_PT)/etc/fstab >>logs/$i 2>&1 481 EOF 482 ) >> $MKFILE.tmp 483 } 484 485 #----------------------------------# 486 wrt_copy_fstab2() { # 533 local PREV=$2 534 case $i in 535 iteration* ) local LOGFILE="\$@.log" ;; 536 * ) local LOGFILE="\$@" ;; 537 esac 538 ( 539 cat << EOF 540 541 $i: $PREV 542 @\$(call echo_message, Building) 543 @./progress_bar.sh \$@ & 544 @echo -e "\n\`date\`\n\nKB: \`du -skx --exclude=${SCRIPT_ROOT} \$(MOUNT_PT)\`\n" >logs/$LOGFILE 545 EOF 546 ) >> $MKFILE.tmp 547 } 548 549 #----------------------------------# 550 wrt_target_boot() { # Create target and initialize log file 487 551 #----------------------------------# 488 552 local i=$1 489 ( 490 cat << EOF 491 @cp -v /sources/fstab /etc/fstab >>logs/$i 2>&1 492 EOF 493 ) >> $MKFILE.tmp 494 } 495 496 497 #----------------------------------# 498 wrt_remove_build_dirs() { # 499 #----------------------------------# 500 local name=$1 501 ( 502 cat << EOF 503 @ROOT=\`head -n1 \$(MOUNT_PT)\$(SRC)/\$(PKG_LST) | sed 's@^./@@;s@/.*@@'\` && \\ 504 rm -rf \$(MOUNT_PT)\$(SRC)/\$\$ROOT && \\ 505 if [ -e \$(MOUNT_PT)\$(SRC)/$name-build ]; then \\ 506 rm -rf \$(MOUNT_PT)\$(SRC)/$name-build; \\ 507 fi; 508 EOF 509 ) >> $MKFILE.tmp 510 } 511 512 513 #----------------------------------# 514 wrt_remove_build_dirs2() { # 515 #----------------------------------# 516 local name=$1 517 ( 518 cat << EOF 519 @ROOT=\`head -n1 \$(SRC)/\$(PKG_LST) | sed 's@^./@@;s@/.*@@'\` && \\ 520 rm -rf \$(SRC)/\$\$ROOT && \\ 521 if [ -e \$(SRC)/$name-build ]; then \\ 522 rm -rf \$(SRC)/$name-build; \\ 523 fi; 524 EOF 525 ) >> $MKFILE.tmp 526 } 527 528 529 #----------------------------------# 530 wrt_touch() { # 531 #----------------------------------# 532 ( 533 cat << EOF 534 @touch \$@ && \\ 535 sleep .25 && \\ 536 echo -e "\n\n "\$(BOLD)Target \$(BLUE)\$@ \$(BOLD)OK && \\ 537 echo --------------------------------------------------------------------------------\$(WHITE) 538 EOF 539 ) >> $MKFILE.tmp 540 } 541 542 543 #----------------------------------# 544 wrt_report() { # 545 #----------------------------------# 546 ( 547 cat << EOF 548 549 create-sbu_du-report: $PREV 553 local PREV=$2 554 case $i in 555 iteration* ) local LOGFILE="\$@.log" ;; 556 * ) local LOGFILE="\$@" ;; 557 esac 558 ( 559 cat << EOF 560 561 $i: $PREV 550 562 @\$(call echo_message, Building) 551 @./create-sbu_du-report.sh logs $VERSION 552 @\$(call echo_report,$VERSION-SBU_DU-$(date --iso-8601).report) 553 @touch \$@ 554 EOF 555 ) >> $MKFILE.tmp 556 557 chapter789="$chapter789 create-sbu_du-report" 558 } 563 @./progress_bar.sh \$@ & 564 @echo -e "\n\`date\`\n\nKB: \`du -skx --exclude=${SCRIPT_ROOT}\`\n" >logs/$LOGFILE 565 EOF 566 ) >> $MKFILE.tmp 567 } 568 559 569 560 570 … … 563 573 #----------------------------# 564 574 # Test if make must be run. 565 if [ "$RUNMAKE" = " 1" ] ; then575 if [ "$RUNMAKE" = "y" ] ; then 566 576 # Test to make sure we're running the build as root 567 577 if [ "$UID" != "0" ] ; then … … 583 593 #----------------------------# 584 594 # Test if the clean must be done. 585 if [ "$ CLEAN" = "1" ]; then595 if [ "${CLEAN}" = "y" ]; then 586 596 # Test to make sure we're running the clean as root 587 597 if [ "$UID" != "0" ] ; then … … 696 706 --stringparam page $PAGE \ 697 707 --stringparam lang $LANG \ 698 --stringparam keymap $ {KEYMAP:-"none"}\708 --stringparam keymap $KEYMAP \ 699 709 -o ./${PROGNAME}-commands/ $XSL $BOOK/$ARCH-index.xml >>$LOGDIR/$LOG 2>&1 700 710 ;; … … 708 718 --stringparam page $PAGE \ 709 719 --stringparam lang $LANG \ 710 --stringparam keymap $ {KEYMAP:-"none"}\720 --stringparam keymap $KEYMAP \ 711 721 -o ./${PROGNAME}-commands/ $XSL $BOOK/$ARCH-index.xml >>$LOGDIR/$LOG 2>&1 712 722 ;; … … 722 732 --stringparam lang $LANG \ 723 733 --stringparam lc_all $LC_ALL \ 724 --stringparam keymap $ {KEYMAP:-"none"}\734 --stringparam keymap $KEYMAP \ 725 735 --stringparam grsecurity_host $GRSECURITY_HOST \ 726 736 -o ./${PROGNAME}-commands/ $XSL $BOOK/index.xml >>$LOGDIR/$LOG 2>&1 … … 786 796 787 797 # Test if the packages must be downloaded 788 [ ! "$GETPKG" = " 1" ] && return798 [ ! "$GETPKG" = "y" ] && return 789 799 790 800 gs_wrt_message(){ … … 816 826 *linux/linux-* ) 817 827 [[ -z "$CONFIG" ]] && [[ -z "$BOOT_CONFIG" ]] && \ 818 [[ "$GETKERNEL" = " 0" ]] && continue828 [[ "$GETKERNEL" = "n" ]] && continue 819 829 ;; 820 830 esac … … 898 908 # Do not allow the automatic execution of the Makefile. 899 909 echo "${tab_}${BOLD}${RED}*** ${YELLOW}Automatic execution of the generated makefile has been inhibited. ${RED}***${OFF}${nl_}" 900 RUNMAKE= 0910 RUNMAKE="n" 901 911 fi 902 912 } -
common/config
r5be3651 r401f81e 12 12 BUILDDIR=/mnt/build_dir 13 13 14 # Create SBU and disk usage report 0(no)/1(yes)14 # Create SBU and disk usage report n(no)/y(yes) 15 15 # NOTE: requires to have bc installed on the host 16 REPORT= 116 REPORT=y 17 17 18 18 #=== Getting packages === 19 19 # Files will be retrieved from the local archive SRC_ARCHIVE 20 20 # (if defined) or the 'net and will be stored in $BUILDDIR/sources 21 #--- Download the source packages 0(no)/1(yes)22 GETPKG= 021 #--- Download the source packages n(no)/y(yes) 22 GETPKG=n 23 23 24 24 #--- The local repository for packages/file 25 # Used only if GETPKG = 125 # Used only if GETPKG = y 26 26 # Any missing file will be downloaded and archived here, 27 27 # if the user has the right priviledges. … … 33 33 34 34 #=== Build options === 35 #--- Automatically run the makefile once it has been created 0(no)/1(yes)36 RUNMAKE= 035 #--- Automatically run the makefile once it has been created n(no)/y(yes) 36 RUNMAKE=n 37 37 38 38 #--- Optimize the build [0-2] … … 53 53 54 54 #--- Bomb on test suites failures? 55 # 0= no, I want to build the full system and review the logs56 # 1= yes, bomb at the first test suite failure to can review the build dir57 BOMB_TEST= 055 # n = no, I want to build the full system and review the logs 56 # y = yes, bomb at the first test suite failure to can review the build dir 57 BOMB_TEST=n 58 58 59 #--- Run the stripping phases 0(no)/1(yes)60 STRIP= 159 #--- Run the stripping phases n(no)/y(yes) 60 STRIP=y 61 61 62 62 #--- page definition for groff letter/A4 … … 66 66 TIMEZONE=${TZ:-GMT} 67 67 68 #--- install the optional vim-lang package 0(no)/1(yes)69 VIMLANG= 168 #--- install the optional vim-lang package n(no)/y(yes) 69 VIMLANG=y 70 70 71 71 #--- Language information in /etc/profile See <locale -a> for values … … 80 80 81 81 #=== Variables needed by iterative comparison analysis === 82 #--- Should some iterative comparison analysis by made? 0(no)/1(yes)83 COMPARE= 082 #--- Should some iterative comparison analysis by made? n(no)/y(yes) 83 COMPARE=n 84 84 85 85 #--- The number of final stage builds to create and compare, min. 2, max. 5 86 86 ITERATIONS=3 87 87 88 #--- Run ICA testing 0(no)/1(yes)89 RUN_ICA= 088 #--- Run ICA testing n(no)/y(yes) 89 RUN_ICA=n 90 90 91 #--- Run farce testing 0(no)/1(yes)92 RUN_FARCE= 091 #--- Run farce testing n(no)/y(yes) 92 RUN_FARCE=n 93 93 94 94 #==== INTERNAL VARIABLES ==== -
common/func_compare.sh
r5be3651 r401f81e 55 55 fi 56 56 57 if [[ "$RUN_ICA" = " 1" ]] ; then57 if [[ "$RUN_ICA" = "y" ]] ; then 58 58 local DEST_ICA=$DEST_TOPDIR/ICA && \ 59 59 ( … … 68 68 fi 69 69 70 if [[ "$RUN_FARCE" = " 1" ]] ; then70 if [[ "$RUN_FARCE" = "y" ]] ; then 71 71 local DEST_FARCE=$DEST_TOPDIR/farce && \ 72 72 ( -
common/func_validate_configs.sh
r5be3651 r401f81e 178 178 179 179 # Validate general parameters.. 180 GETPKG) validate_against_str "x 0x x1x" ;;180 GETPKG) validate_against_str "xnx xyx" ;; 181 181 GETKERNEL ) if [[ -z "$CONFIG" ]] && [[ -z "$BOOT_CONFIG" ]] ; then 182 [[ "$GETPKG" = " 1" ]] && validate_against_str "x0x x1x"182 [[ "$GETPKG" = "y" ]] && validate_against_str "xnx xyx" 183 183 fi ;; 184 RUNMAKE) validate_against_str "x 0x x1x" ;;185 REPORT) validate_against_str "x 0x x1x"186 if [[ "${!config_param}" = " 1" ]]; then184 RUNMAKE) validate_against_str "xnx xyx" ;; 185 REPORT) validate_against_str "xnx xyx" 186 if [[ "${!config_param}" = "y" ]]; then 187 187 if [[ `type -p bc` ]]; then 188 188 continue … … 190 190 echo -e " ${BOLD}The bc binary was not found${OFF}" 191 191 echo -e " The SBU and disk usage report creation will be skiped" 192 REPORT= 0192 REPORT=n 193 193 continue 194 194 fi 195 195 fi ;; 196 COMPARE) if [[ ! "$COMPARE" = " 1" ]]; then197 validate_against_str "x 0x x1x"196 COMPARE) if [[ ! "$COMPARE" = "y" ]]; then 197 validate_against_str "xnx xyx" 198 198 else 199 if [[ ! "${RUN_ICA}" = " 1" ]] && [[ ! "${RUN_FARCE}" = "1" ]]; then199 if [[ ! "${RUN_ICA}" = "y" ]] && [[ ! "${RUN_FARCE}" = "y" ]]; then 200 200 echo "${nl_}${DD_BORDER}" 201 201 echo "You have elected to analyse your build but have failed to select a tool." >&2 … … 205 205 fi 206 206 fi ;; 207 RUN_ICA) [[ "$COMPARE" = " 1" ]] && validate_against_str "x0x x1x" ;;208 RUN_FARCE) [[ "$COMPARE" = " 1" ]] && validate_against_str "x0x x1x" ;;209 ITERATIONS) [[ "$COMPARE" = " 1" ]] && validate_against_str "x2x x3x x4x x5x" ;;207 RUN_ICA) [[ "$COMPARE" = "y" ]] && validate_against_str "xnx xyx" ;; 208 RUN_FARCE) [[ "$COMPARE" = "y" ]] && validate_against_str "xnx xyx" ;; 209 ITERATIONS) [[ "$COMPARE" = "y" ]] && validate_against_str "x2x x3x x4x x5x" ;; 210 210 TEST) validate_against_str "x0x x1x x2x x3x" ;; 211 BOMB_TEST) [[ ! "$TEST" = "0" ]] && validate_against_str "x 0x x1x" ;;211 BOMB_TEST) [[ ! "$TEST" = "0" ]] && validate_against_str "xnx xyx" ;; 212 212 OPTIMIZE) validate_against_str "x0x x1x x2x" ;; 213 STRIP) validate_against_str "x 0x x1x" ;;214 VIMLANG) validate_against_str "x 0x x1x" ;;213 STRIP) validate_against_str "xnx xyx" ;; 214 VIMLANG) validate_against_str "xnx xyx" ;; 215 215 MODEL) validate_against_str "xglibcx xuclibcx" ;; 216 216 PAGE) validate_against_str "xletterx xA4x" ;; … … 224 224 [[ "${!config_param}" = "**EDIT ME**" ]] && write_error_and_die 225 225 ;; 226 GRSECURITY_HOST) validate_against_str "x 0x x1x" ;;226 GRSECURITY_HOST) validate_against_str "xnx xyx" ;; 227 227 228 228 # BOOK validation. Very ugly, need be fixed … … 236 236 # fatal -z -d -w, 237 237 # warning -z+ -w+ 238 SRC_ARCHIVE) [[ "$GETPKG" = " 1" ]] && validate_dir -z+ -d -w+ ;;238 SRC_ARCHIVE) [[ "$GETPKG" = "y" ]] && validate_dir -z+ -d -w+ ;; 239 239 BUILDDIR) # The build directory/partition MUST exist and be writable by the user 240 240 validate_dir -z -d -w -
common/makefile-functions
r5be3651 r401f81e 16 16 endef 17 17 18 define remove_existing_dirs 19 @PKG_PATH=`ls -t $(SRCSDIR)/$(1) | head -n1` && \ 20 ROOT=`tar -tf $$PKG_PATH | head -n1 | sed -e 's@^./@@;s@/.*@@'` && \ 21 rm -rf $(SRCSDIR)/$$ROOT && \ 22 rm -rf $(SRCSDIR)/$${ROOT%-*}-build 23 endef 24 25 define remove_existing_dirs2 26 @PKG_PATH=\`ls -t $(SRC)/$(1) | head -n1\` && \ 27 ROOT=`tar -tf $$PKG_PATH | head -n1 | sed -e 's@^./@@;s@/.*@@'` && \ 28 rm -rf $(SRC)/$$ROOT && \ 29 rm -rf $(SRC)/$${ROOT-*}-build 30 endef 31 32 define remove_build_dirs 33 @ROOT=`head -n1 $(SRCSDIR)/$(PKG_LST) | sed 's@^./@@;s@/.*@@'` && \ 34 rm -rf $(SRCSDIR)/$$ROOT && \ 35 rm -rf $(SRCSDIR)/$(1)-build 36 endef 37 38 define remove_build_dirs2 39 @ROOT=`head -n1 $(SRC)/$(PKG_LST) | sed 's@^./@@;s@/.*@@'` && \ 40 rm -rf $(SRC)/$$ROOT && \ 41 rm -rf $(SRC)/$(1)-build 42 endef 43 44 define housekeeping 45 @touch $@ && \ 46 sleep .25 && \ 47 echo -e "\n\n "$(BOLD)Target $(BLUE)$@ $(BOLD)OK && \ 48 echo --------------------------------------------------------------------------------$(WHITE) 49 50 endef 51 52 define get_pkg_root 53 @ROOT=`head -n1 $(SRCSDIR)/$(PKG_LST) | sed 's@^./@@;s@/.*@@'` && \ 54 if [ "$(1)" != "nouser" ]; then \ 55 echo "export PKGDIR=$(SRCSDIR)/$$ROOT" > envars; \ 56 chown -R $(LUSER) $(SRCSDIR)/$$ROOT; \ 57 else \ 58 echo "export PKGDIR=$(crSRCSDIR)/$$ROOT" > envars; \ 59 fi; 60 endef 61 62 define get_pkg_root2 63 @ROOT=`head -n1 $(SRC)/$(PKG_LST) | sed 's@^./@@;s@/.*@@'` && \ 64 echo "export PKGDIR=$(SRC)/$$ROOT" > envars 65 endef 66 18 67 define unpack 19 @cd $( MOUNT_PT)$(SRC) && \68 @cd $(SRCSDIR) && \ 20 69 tar -xvf `ls -t $(1) | head -n1` > $(PKG_LST) 21 70 endef 22 71 23 72 define unpack2 24 @cd $( MOUNT_PT)$(SRC) && \73 @cd $(SRCSDIR) && \ 25 74 /tools/bin/tar -xvf `ls -t $(1) | head -n1` > $(PKG_LST) 26 75 endef -
master.sh
r5be3651 r401f81e 47 47 VERBOSITY=0 48 48 49 [[ $VERBOSITY > 0 ]] && echo -n "Loading common-functions module..."50 source $COMMON_DIR/common-functions51 [[ $? > 0 ]] && echo " $COMMON_DIR/common-functions did not load.." && exit52 [[ $VERBOSITY > 0 ]] && echo "OK"53 #54 [[ $VERBOSITY > 0 ]] && echo -n "Loading masterscript conf..."55 source $COMMON_DIR/config56 [[ $? > 0 ]] && echo "$COMMON_DIR/conf did not load.." && exit57 [[ $VERBOSITY > 0 ]] && echo "OK"58 #59 [[ $VERBOSITY > 0 ]] && echo -n "Loading config module <$MODULE_CONFIG>..."60 source $MODULE_CONFIG61 [[ $? > 0 ]] && echo "$MODULE_CONFIG did not load.." && exit 162 [[ $VERBOSITY > 0 ]] && echo "OK"63 #64 [[ $VERBOSITY > 0 ]] && echo -n "Loading code module <$MODULE>..."65 source $MODULE66 [[ $? > 0 ]] && echo "$MODULE did not load.." && exit 267 [[ $VERBOSITY > 0 ]] && echo "OK"68 #69 [[ $VERBOSITY > 0 ]] && echo "${SD_BORDER}${nl_}"70 49 71 50 if [[ -e using_menuconfig ]]; then … … 85 64 #--- farce report log directory 86 65 FARCELOGDIR=$LOGDIR/farce 66 XSL=$PROGNAME.xsl 67 68 case $PROGNAME in 69 clfs2) LFSVRS=development; TREE=branches/clfs-2.0/BOOK ;; 70 *) LFSVRS=development; TREE=trunk/BOOK ;; 71 esac 87 72 88 73 if [[ ! -z ${BRANCH_ID} ]]; then … … 113 98 esac 114 99 fi 115 fi 100 # These are boolean vars generated from Config.in. 101 # ISSUE: If a boolean parameter is not set <true> that 102 # variable is not defined by the menu app. This can 103 # cause a headache if you are not careful. 104 # The following parameters MUST be created and have a 105 # default value. 106 RUNMAKE=${RUNMAKE:-n} 107 GETPKG=${GETPKG:-n} 108 GETKERNEL=${GETKERNEL:-n} 109 COMPARE=${COMPARE:-n} 110 RUN_FARCE=${RUN_FARCE:-n} 111 RUN_ICA=${RUN_ICA:-n} 112 BOMB_TEST=${BOMB_TEST:-n} 113 STRIP=${STRIP:=n} 114 REPORT=${REPORT:=n} 115 VIMLANG=${VIMLANG:-n} 116 KEYMAP=${KEYMAP:=none} 117 GRSECURITY_HOST=${GRSECURITY_HOST:-n} 118 119 else 120 # 121 [[ $VERBOSITY > 0 ]] && echo -n "Loading masterscript conf..." 122 source $COMMON_DIR/config 123 [[ $? > 0 ]] && echo "$COMMON_DIR/conf did not load.." && exit 124 [[ $VERBOSITY > 0 ]] && echo "OK" 125 # 126 [[ $VERBOSITY > 0 ]] && echo -n "Loading config module <$MODULE_CONFIG>..." 127 source $MODULE_CONFIG 128 [[ $? > 0 ]] && echo "$MODULE_CONFIG did not load.." && exit 1 129 [[ $VERBOSITY > 0 ]] && echo "OK" 130 # 131 fi 132 133 134 [[ $VERBOSITY > 0 ]] && echo -n "Loading common-functions module..." 135 source $COMMON_DIR/common-functions 136 [[ $? > 0 ]] && echo " $COMMON_DIR/common-functions did not load.." && exit 137 [[ $VERBOSITY > 0 ]] && echo "OK" 138 [[ $VERBOSITY > 0 ]] && echo -n "Loading code module <$MODULE>..." 139 source $MODULE 140 [[ $? > 0 ]] && echo "$MODULE did not load.." && exit 2 141 [[ $VERBOSITY > 0 ]] && echo "OK" 142 # 143 [[ $VERBOSITY > 0 ]] && echo "${SD_BORDER}${nl_}" 144 116 145 117 146 #=========================================================== … … 191 220 ;; 192 221 193 --get-packages | -G ) GETPKG= 1;;222 --get-packages | -G ) GETPKG=y ;; 194 223 195 224 --help | -h ) usage | more && exit ;; … … 268 297 shift 269 298 case $1 in 270 ICA) RUN_ICA=1 271 RUN_FARCE=0 272 COMPARE=1 273 ;; 274 farce) RUN_ICA=0 275 RUN_FARCE=1 276 COMPARE=1 277 ;; 278 both) RUN_ICA=1 279 RUN_FARCE=1 280 COMPARE=1 281 ;; 299 ICA) RUN_ICA=y; RUN_FARCE=n; COMPARE=y ;; 300 farce) RUN_ICA=n; RUN_FARCE=y; COMPARE=y ;; 301 both) RUN_ICA=y; RUN_FARCE=y; COMPARE=y ;; 282 302 *) 283 303 echo -e "\n$1 is an unknown analysis method." … … 309 329 ;; 310 330 311 --run-make | -M ) RUNMAKE= 1;;312 313 --rebuild | -R ) CLEAN= 1;;331 --run-make | -M ) RUNMAKE=y ;; 332 333 --rebuild | -R ) CLEAN=y ;; 314 334 315 335 # CLFS options … … 317 337 test $# = 1 && eval "$exit_missing_arg" 318 338 shift 319 case $1 in 320 arm ) 321 ARCH=arm 322 TARGET="arm-unknown-linux-gnu" 323 ;; 324 x86 ) 325 ARCH=x86 326 TARGET="i686-pc-linux-gnu" 327 ;; 328 i486 ) 329 ARCH=x86 330 TARGET="i486-pc-linux-gnu" 331 ;; 332 i586 ) 333 ARCH=x86 334 TARGET="i586-pc-linux-gnu" 335 ;; 336 ppc ) 337 ARCH=ppc 338 TARGET="powerpc-unknown-linux-gnu" 339 ;; 340 mips ) 341 ARCH=mips 342 TARGET="mips-unknown-linux-gnu" 343 ;; 344 mipsel ) 345 ARCH=mips 346 TARGET="mipsel-unknown-linux-gnu" 347 ;; 348 sparc ) 349 ARCH=sparc 350 TARGET="sparcv9-unknown-linux-gnu" 351 ;; 352 x86_64-64 ) 353 ARCH=x86_64-64 354 TARGET="x86_64-unknown-linux-gnu" 355 ;; 356 mips64-64 ) 357 ARCH=mips64-64 358 TARGET="mips-unknown-linux-gnu" 359 ;; 360 mipsel64-64 ) 361 ARCH=mips64-64 362 TARGET="mipsel-unknown-linux-gnu" 363 ;; 364 sparc64-64 ) 365 ARCH=sparc64-64 366 TARGET="sparc64-unknown-linux-gnu" 367 ;; 368 alpha ) 369 ARCH=alpha 370 TARGET="alpha-unknown-linux-gnu" 371 ;; 372 x86_64 ) 373 ARCH=x86_64 374 TARGET="x86_64-unknown-linux-gnu" 375 TARGET32="i686-pc-linux-gnu" 376 ;; 377 mips64 ) 378 ARCH=mips64 379 TARGET="mips-unknown-linux-gnu" 380 TARGET32="mips-unknown-linux-gnu" 381 ;; 382 mipsel64 ) 383 ARCH=mips64 384 TARGET="mipsel-unknown-linux-gnu" 385 TARGET32="mipsel-unknown-linux-gnu" 386 ;; 387 sparc64 ) 388 ARCH=sparc64 389 TARGET="sparc64-unknown-linux-gnu" 390 TARGET32="sparcv9-unknown-linux-gnu" 391 ;; 392 ppc64 ) 393 ARCH=ppc64 394 TARGET="powerpc64-unknown-linux-gnu" 395 TARGET32="powerpc-unknown-linux-gnu" 396 ;; 397 * ) 398 echo -e "\n$1 is an unknown or unsupported arch." 399 exit 1 400 ;; 339 case $PROGNAME in 340 CLFS2) 341 case $1 in 342 arm) ARCH=arm; TARGET="arm-unknown-linux-gnu" ;; 343 x86) ARCH=x86; TARGET="i686-pc-linux-gnu" ;; 344 *) echo -e "\n$1 is an unknown or unsupported arch."; exit 1 345 esac 346 ;; 347 CLFS) 348 case $1 in 349 arm ) ARCH=arm; TARGET="arm-unknown-linux-gnu" ;; 350 x86 ) ARCH=x86; TARGET="i686-pc-linux-gnu" ;; 351 i486 ) ARCH=x86; TARGET="i486-pc-linux-gnu" ;; 352 i586 ) ARCH=x86; TARGET="i586-pc-linux-gnu" ;; 353 ppc ) ARCH=ppc; TARGET="powerpc-unknown-linux-gnu" ;; 354 mips ) ARCH=mips; TARGET="mips-unknown-linux-gnu" ;; 355 mipsel ) ARCH=mips; TARGET="mipsel-unknown-linux-gnu" ;; 356 sparc ) ARCH=sparc; TARGET="sparcv9-unknown-linux-gnu" ;; 357 358 x86_64-64 ) ARCH=x86_64-64; TARGET="x86_64-unknown-linux-gnu" ;; 359 mips64-64 ) ARCH=mips64-64; TARGET="mips-unknown-linux-gnu" ;; 360 mipsel64-64 ) ARCH=mips64-64; TARGET="mipsel-unknown-linux-gnu" ;; 361 sparc64-64 ) ARCH=sparc64-64; TARGET="sparc64-unknown-linux-gnu" ;; 362 alpha ) ARCH=alpha; TARGET="alpha-unknown-linux-gnu" ;; 363 364 x86_64 ) ARCH=x86_64; TARGET="x86_64-unknown-linux-gnu"; TARGET32="i686-pc-linux-gnu" ;; 365 mips64 ) ARCH=mips64; TARGET="mips-unknown-linux-gnu"; TARGET32="mips-unknown-linux-gnu" ;; 366 mipsel64 ) ARCH=mips64; TARGET="mipsel-unknown-linux-gnu"; TARGET32="mipsel-unknown-linux-gnu" ;; 367 sparc64 ) ARCH=sparc64; TARGET="sparc64-unknown-linux-gnu"; TARGET32="sparcv9-unknown-linux-gnu" ;; 368 ppc64 ) ARCH=ppc64; TARGET="powerpc64-unknown-linux-gnu"; TARGET32="powerpc-unknown-linux-gnu" ;; 369 370 * ) echo -e "\n$1 is an unknown or unsupported arch."; exit 1 ;; 371 esac 372 ;; 401 373 esac 402 374 ;; … … 447 419 shift 448 420 done 421 449 422 450 423 #=================================================== … … 461 434 462 435 463 # Check for minimum gcc and kernel versions 464 #check_requirements 1 # 0/1 0-do not display values. 436 # Check for minimum bash,tar,gcc and kernel versions 465 437 echo 466 438 check_version "2.6.2" "`uname -r`" "KERNEL" … … 483 455 # Load additional modules or configuration files based on global settings 484 456 # compare module 485 if [[ "$COMPARE" = " 1" ]]; then457 if [[ "$COMPARE" = "y" ]]; then 486 458 [[ $VERBOSITY > 0 ]] && echo -n "Loading compare module..." 487 459 source $COMMON_DIR/func_compare.sh … … 538 510 [[ "$OPTIMIZE" != "0" ]] && cp optimize/opt_override $JHALFSDIR/ 539 511 # 540 if [[ "$COMPARE" != "0" ]]; then512 if [[ "$COMPARE" = "y" ]]; then 541 513 mkdir -p $JHALFSDIR/extras 542 514 cp extras/* $JHALFSDIR/extras … … 550 522 fi 551 523 # 552 if [[ "$REPORT" = " 1" ]]; then524 if [[ "$REPORT" = "y" ]]; then 553 525 cp $COMMON_DIR/create-sbu_du-report.sh $JHALFSDIR/ 554 526 # After being sure that all looks sane, dump the settings to a file … … 557 529 fi 558 530 # 559 [[ "$GETPKG" = " 1" ]] && cp $COMMON_DIR/urls.xsl $JHALFSDIR/531 [[ "$GETPKG" = "y" ]] && cp $COMMON_DIR/urls.xsl $JHALFSDIR/ 560 532 # 561 533 cp $COMMON_DIR/packages.xsl $JHALFSDIR/
Note:
See TracChangeset
for help on using the changeset viewer.