Changeset 9c9775f for CLFS/master.sh
- Timestamp:
- 09/19/2007 04:50:48 PM (17 years ago)
- Branches:
- experimental
- Children:
- 3778352
- Parents:
- 0510381
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
CLFS/master.sh
-
Property mode
changed from
100755
to100644
r0510381 r9c9775f 1 #!/bin/ sh1 #!/bin/bash 2 2 # $Id$ 3 3 4 4 5 5 orphan_scripts="" # 2 scripts do not fit BOOT_Makefiles LUSER environment 6 7 ###################################8 ### FUNCTIONS ###9 ###################################10 11 #--------------------------------------#12 BOOT_wrt_target() { # "${this_script}" "$PREV"13 #--------------------------------------#14 local i=$115 local PREV=$216 case $i in17 iteration* ) local LOGFILE=$this_script.log ;;18 * ) local LOGFILE=$this_script ;;19 esac20 (21 cat << EOF22 23 $i: $PREV24 @\$(call echo_message, Building)25 @./progress_bar.sh \$@ \$\$PPID &26 @echo -e "\n\`date\`\n\nKB: \`du -skx --exclude=${SCRIPT_ROOT}\`\n" >logs/$LOGFILE27 EOF28 ) >> $MKFILE.tmp29 }30 31 #--------------------------------------#32 BOOT_wrt_Unpack() { # "$pkg_tarball"33 #--------------------------------------#34 local FILE=$135 local optSAVE_PREVIOUS=$236 37 if [ "${optSAVE_PREVIOUS}" != "1" ]; then38 (39 cat << EOF40 @\$(call remove_existing_dirs2,$FILE)41 EOF42 ) >> $MKFILE.tmp43 fi44 (45 cat << EOF46 @\$(call unpack3,$FILE)47 @\$(call get_pkg_root2)48 EOF49 ) >> $MKFILE.tmp50 }51 52 #----------------------------------#53 BOOT_wrt_RunAsRoot() { # "${this_script}" "${file}"54 #----------------------------------#55 local this_script=$156 local file=$257 (58 cat << EOF59 @( time { source envars && ${PROGNAME}-commands/`dirname $file`/\$@ >>logs/\$@ 2>&1 ; } ) 2>>logs/\$@ && \\60 echo -e "\nKB: \`du -skx --exclude=${SCRIPT_ROOT} \`\n" >>logs/\$@61 EOF62 ) >> $MKFILE.tmp63 }64 65 #--------------------------------------#66 BOOT_wrt_RemoveBuildDirs() { # "${name}"67 #--------------------------------------#68 local name=$169 (70 cat << EOF71 @\$(call remove_build_dirs2,$name)72 EOF73 ) >> $MKFILE.tmp74 }75 76 #----------------------------------#77 BOOT_wrt_test_log() { #78 #----------------------------------#79 local TESTLOGFILE=$180 (81 cat << EOF82 @echo "export TEST_LOG=/\$(SCRIPT_ROOT)/test-logs/$TESTLOGFILE" >> envars && \\83 echo -e "\n\`date\`\n" >test-logs/$TESTLOGFILE84 EOF85 ) >> $MKFILE.tmp86 }87 88 #----------------------------------#89 BOOT_wrt_CopyFstab() { #90 #----------------------------------#91 (92 cat << EOF93 @( time { cp -v /sources/fstab /etc/fstab >>logs/${this_script} 2>&1 ; } ) 2>>logs/${this_script}94 EOF95 ) >> $MKFILE.tmp96 }97 98 99 ########################################100 6 101 7 … … 116 22 rm -f /tools && \\ 117 23 ln -s \$(MOUNT_PT)/tools / 118 @if [ ! -d \$(MOUNT_PT)/sources ]; then \\ 119 mkdir \$(MOUNT_PT)/sources; \\ 120 fi; 121 @chmod a+wt \$(MOUNT_PT)/sources && \\ 122 touch \$@ && \\ 123 echo " "\$(BOLD)Target \$(BLUE)\$@ \$(BOLD)OK && \\ 124 echo --------------------------------------------------------------------------------\$(WHITE) 24 @\$(call housekeeping) 125 25 126 26 024-creatingcrossdir: 023-creatingtoolsdir 27 @\$(call echo_message, Building) 127 28 @mkdir -v \$(MOUNT_PT)/cross-tools && \\ 128 29 rm -f /cross-tools && \\ 129 30 ln -s \$(MOUNT_PT)/cross-tools / 130 @touch \$@ && \\ 131 echo " "\$(BOLD)Target \$(BLUE)\$@ \$(BOLD)OK && \\ 132 echo --------------------------------------------------------------------------------\$(WHITE) 31 @\$(call housekeeping) 133 32 134 33 025-addinguser: 024-creatingcrossdir 135 34 @\$(call echo_message, Building) 136 @if [ ! -d /home/\$(LUSER) ]; then \\35 @if [ ! -d \$(LUSER_HOME) ]; then \\ 137 36 groupadd \$(LGROUP); \\ 138 37 useradd -s /bin/bash -g \$(LGROUP) -m -k /dev/null \$(LUSER); \\ … … 140 39 touch luser-exist; \\ 141 40 fi; 142 @chown \$(LUSER) \$(MOUNT_PT) && \\ 143 chown \$(LUSER) \$(MOUNT_PT)/tools && \\ 41 @chown \$(LUSER) \$(MOUNT_PT)/tools && \\ 144 42 chown \$(LUSER) \$(MOUNT_PT)/cross-tools && \\ 145 chown \$(LUSER) \$(MOUNT_PT)/sources && \\ 146 touch \$@ && \\ 147 echo " "\$(BOLD)Target \$(BLUE)\$@ \$(BOLD)OK && \\ 148 echo --------------------------------------------------------------------------------\$(WHITE) 43 chmod -R a+wt \$(MOUNT_PT)/\$(SCRIPT_ROOT) && \\ 44 chmod a+wt \$(SRCSDIR) 45 @\$(call housekeeping) 149 46 150 47 026-settingenvironment: 025-addinguser 151 48 @\$(call echo_message, Building) 152 @if [ -f /home/\$(LUSER)/.bashrc -a ! -f /home/\$(LUSER)/.bashrc.XXX ]; then \\153 mv /home/\$(LUSER)/.bashrc /home/\$(LUSER)/.bashrc.XXX; \\49 @if [ -f \$(LUSER_HOME)/.bashrc -a ! -f \$(LUSER_HOME)/.bashrc.XXX ]; then \\ 50 mv \$(LUSER_HOME)/.bashrc \$(LUSER_HOME)/.bashrc.XXX; \\ 154 51 fi; 155 @if [ -f /home/\$(LUSER)/.bash_profile -a ! -f /home/\$(LUSER)/.bash_profile.XXX ]; then \\156 mv /home/\$(LUSER)/.bash_profile /home/\$(LUSER)/.bash_profile.XXX; \\52 @if [ -f \$(LUSER_HOME)/.bash_profile -a ! -f \$(LUSER_HOME)/.bash_profile.XXX ]; then \\ 53 mv \$(LUSER_HOME)/.bash_profile \$(LUSER_HOME)/.bash_profile.XXX; \\ 157 54 fi; 158 @echo "set +h" > /home/\$(LUSER)/.bashrc && \\159 echo "umask 022" >> /home/\$(LUSER)/.bashrc && \\160 echo "CLFS=\$(MOUNT_PT)" >> /home/\$(LUSER)/.bashrc && \\161 echo "LC_ALL=POSIX" >> /home/\$(LUSER)/.bashrc && \\162 echo "PATH=/cross-tools/bin:/bin:/usr/bin" >> /home/\$(LUSER)/.bashrc && \\163 echo "export CLFS LC_ALL PATH" >> /home/\$(LUSER)/.bashrc && \\164 echo "" >> /home/\$(LUSER)/.bashrc && \\165 echo "unset CFLAGS" >> /home/\$(LUSER)/.bashrc && \\166 echo "unset CXXFLAGS" >> /home/\$(LUSER)/.bashrc && \\167 echo "" >> /home/\$(LUSER)/.bashrc && \\168 echo "export CLFS_HOST=\"${CLFS_HOST}\"" >> /home/\$(LUSER)/.bashrc && \\169 echo "export CLFS_TARGET=\"${TARGET}\"" >> /home/\$(LUSER)/.bashrc && \\170 echo "export CLFS_TARGET32=\"${TARGET32}\"" >> /home/\$(LUSER)/.bashrc && \\171 echo "source $JHALFSDIR/envars" >> /home/\$(LUSER)/.bashrc172 @chown \$(LUSER):\$(LGROUP) /home/\$(LUSER)/.bashrc && \\55 @echo "set +h" > \$(LUSER_HOME)/.bashrc && \\ 56 echo "umask 022" >> \$(LUSER_HOME)/.bashrc && \\ 57 echo "CLFS=\$(MOUNT_PT)" >> \$(LUSER_HOME)/.bashrc && \\ 58 echo "LC_ALL=POSIX" >> \$(LUSER_HOME)/.bashrc && \\ 59 echo "PATH=/cross-tools/bin:/bin:/usr/bin" >> \$(LUSER_HOME)/.bashrc && \\ 60 echo "export CLFS LC_ALL PATH" >> \$(LUSER_HOME)/.bashrc && \\ 61 echo "" >> \$(LUSER_HOME)/.bashrc && \\ 62 echo "unset CFLAGS" >> \$(LUSER_HOME)/.bashrc && \\ 63 echo "unset CXXFLAGS" >> \$(LUSER_HOME)/.bashrc && \\ 64 echo "" >> \$(LUSER_HOME)/.bashrc && \\ 65 echo "export CLFS_HOST=\"${CLFS_HOST}\"" >> \$(LUSER_HOME)/.bashrc && \\ 66 echo "export CLFS_TARGET=\"${TARGET}\"" >> \$(LUSER_HOME)/.bashrc && \\ 67 echo "export CLFS_TARGET32=\"${TARGET32}\"" >> \$(LUSER_HOME)/.bashrc && \\ 68 echo "source $JHALFSDIR/envars" >> \$(LUSER_HOME)/.bashrc 69 @chown \$(LUSER):\$(LGROUP) \$(LUSER_HOME)/.bashrc && \\ 173 70 touch envars && \\ 174 71 chmod -R a+wt \$(MOUNT_PT) && \\ 175 chown -R \$(LUSER) \$(MOUNT_PT)/\$(SCRIPT_ROOT) && \\ 176 touch \$@ && \\ 177 echo " "\$(BOLD)Target \$(BLUE)\$@ \$(BOLD)OK && \\ 178 echo --------------------------------------------------------------------------------\$(WHITE) 72 chown -R \$(LUSER) \$(MOUNT_PT)/\$(SCRIPT_ROOT) 73 @\$(call housekeeping) 179 74 EOF 180 75 ) >> $MKFILE.tmp … … 211 106 -e 's@-static@@' \ 212 107 -e 's@-final@@' \ 213 108 -e 's@-64@@' \ 214 109 -e 's@-n32@@'` 215 110 pkg_tarball=$(get_package_tarball_name $name) … … 321 216 # the names of the targets in the Makefile 322 217 case "${this_script}" in 323 *util-linux) orphan_scripts="${orphan_scripts} ${this_script}" ;;324 218 *kernfs) orphan_scripts="${orphan_scripts} ${this_script}" ;; 325 219 *) chroottools="$chroottools $this_script" ;; … … 341 235 LUSER_RemoveBuildDirs "${name}" 342 236 wrt_touch 343 344 237 temptools="$temptools $this_script" 238 continue ;; 345 239 esac 346 240 … … 358 252 # 359 253 if [ "$pkg_tarball" != "" ] ; then 360 case $this_script in 361 *util-linux) ROOT_Unpack "$pkg_tarball" ;; 362 *) CHROOT_Unpack "$pkg_tarball" ;; 363 esac 254 CHROOT_Unpack "$pkg_tarball" 364 255 [[ "$OPTIMIZE" = "2" ]] && wrt_optimize "$name" && wrt_makeflags "$name" 365 256 fi … … 367 258 # Select a script execution method 368 259 case $this_script in 369 *kernfs) wrt_RunAsRoot "${this_script}" "${file}" ;; 370 *util-linux) ROOT_RunAsRoot "${file}" ;; 260 *kernfs) wrt_RunAsRoot "${file}" ;; 371 261 *) CHROOT_wrt_RunAsRoot "${file}" ;; 372 262 esac … … 404 294 # A little housekeeping on the scripts 405 295 case $this_script in 406 *grub | *aboot | *colo | *silo | *arcload | *lilo ) continue;;296 *grub | *aboot | *colo | *silo | *arcload | *lilo | *introduction ) continue ;; 407 297 *whatnext*) continue ;; 408 298 *fstab) [[ ! -z ${FSTAB} ]] && cp ${FSTAB} $BUILDDIR/sources/fstab ;; … … 457 347 # The following 2 scripts are defined in the /boot directory but need 458 348 # to be run as a root user. Set them up here but run them in another phase 459 *changingowner*) wrt_RunAsRoot "${ this_script}" "${file}" ;;460 *devices*) wrt_RunAsRoot "${ this_script}" "${file}" ;;349 *changingowner*) wrt_RunAsRoot "${file}" ;; 350 *devices*) wrt_RunAsRoot "${file}" ;; 461 351 *fstab*) if [[ -n "$FSTAB" ]]; then 462 352 LUSER_wrt_CopyFstab … … 486 376 487 377 #--------------------------------------# 488 chroot_testsuite_tools_Makefiles() { # 489 #--------------------------------------# 490 echo "${tab_}${GREEN}Processing... ${L_arrow}(chroot) testsuite tools ( CHROOT ) ${R_arrow}" 378 testsuite_tools_Makefiles() { # 379 #--------------------------------------# 380 381 if [[ "${METHOD}" = "chroot" ]]; then 382 echo "${tab_}${GREEN}Processing... ${L_arrow}(chroot) testsuite tools ( CHROOT ) ${R_arrow}" 383 else 384 echo "${tab_}${GREEN}Processing... ${L_arrow}(boot) testsuite tools ( ROOT ) ${R_arrow}" 385 PREV="" 386 fi 491 387 492 388 for file in testsuite-tools/* ; do … … 535 431 } 536 432 537 #--------------------------------------# 538 boot_testsuite_tools_Makefiles() { # 539 #--------------------------------------# 540 echo "${tab_}${GREEN}Processing... ${L_arrow}(boot) testsuite tools ( ROOT ) ${R_arrow}" 541 for file in testsuite-tools/* ; do 542 # Keep the script file name 543 this_script=`basename $file` 544 545 # First append each name of the script files to a list (this will become 546 # the names of the targets in the Makefile 547 PREV= 548 testsuitetools="$testsuitetools $this_script" 549 550 # Grab the name of the target, strip id number, XXX-script 551 name=`echo $this_script | sed -e 's@[0-9]\{3\}-@@'\ 552 -e 's@-64bit@@' \ 553 -e 's@-64@@' \ 554 -e 's@64@@' \ 555 -e 's@n32@@'` 556 557 pkg_tarball=$(get_package_tarball_name $name) 558 559 #--------------------------------------------------------------------# 560 # >>>>>>>> START BUILDING A Makefile ENTRY <<<<<<<< # 561 #--------------------------------------------------------------------# 562 # 563 # Drop in the name of the target on a new line, and the previous target 564 # as a dependency. Also call the echo_message function. 565 BOOT_wrt_target "${this_script}" "$PREV" 566 # 567 BOOT_wrt_Unpack "$pkg_tarball" 568 [[ "$OPTIMIZE" = "2" ]] && wrt_optimize "$name" && wrt_makeflags "$name" 569 # 570 BOOT_wrt_RunAsRoot "${this_script}" "${file}" 571 # 572 BOOT_wrt_RemoveBuildDirs "${name}" 573 # 574 # Include a touch of the target name so make can check if it's already been made. 575 wrt_touch 576 # 577 #--------------------------------------------------------------------# 578 # >>>>>>>> END OF Makefile ENTRY <<<<<<<< # 579 #--------------------------------------------------------------------# 580 # 581 # Keep the script file name for Makefile dependencies. 582 PREV=$this_script 583 584 done 585 586 } 587 588 589 #--------------------------------------# 590 chroot_final_system_Makefiles() { # 433 434 #--------------------------------------# 435 final_system_Makefiles() { # 591 436 #--------------------------------------# 592 437 # Set envars and scripts for iteration targets 593 LOGS="" # Start with an empty global LOGS envar594 438 if [[ -z "$1" ]] ; then 595 439 local N="" 440 # In boot method the makesys phase was initiated in testsuite_tools_makefile 441 [[ "${METHOD}" = "boot" ]] && [[ "$TEST" = 0 ]] && PREV="" 596 442 else 597 443 local N=-build_$1 … … 604 450 -e 's/mv -v/&f/g' \ 605 451 -e 's/mkdir -v/&p/g' -i ${script} 452 # Rename the scripts 453 mv ${script} ${script}$N 606 454 done 607 # Remove Bzip2 binaries before make install 608 sed -e 's@make install@rm -vf /usr/bin/bz*\n&@' -i final-system$N/*-bzip2 455 # Remove Bzip2 binaries before make install (CLFS-1.0 compatibility) 456 sed -e 's@make install@rm -vf /usr/bin/bz*\n&@' -i final-system$N/*-bzip2$N 609 457 # Delete *old Readline libraries just after make install 610 sed -e 's@make install@&\nrm -v /lib/lib{history,readline}*old@' -i final-system$N/*-readline 458 sed -e 's@make install@&\nrm -v /lib/lib{history,readline}*old@' -i final-system$N/*-readline$N 611 459 fi 612 460 613 echo "${tab_}${GREEN}Processing... ${L_arrow}(chroot) final system$N ( CHROOT ) ${R_arrow}" 461 if [[ "${METHOD}" = "chroot" ]]; then 462 echo "${tab_}${GREEN}Processing... ${L_arrow}(chroot) final system$N ( CHROOT ) ${R_arrow}" 463 else 464 echo "${tab_}${GREEN}Processing... ${L_arrow}(boot) final system$N ( ROOT ) ${R_arrow}" 465 fi 614 466 615 467 for file in final-system$N/* ; do … … 630 482 -e 's@-64@@' \ 631 483 -e 's@64@@' \ 632 -e 's@n32@@'` 484 -e 's@n32@@' \ 485 -e 's,'$N',,'` 633 486 634 487 # Find the version of the command files, if it corresponds with the building of … … 646 499 # Append each name of the script files to a list (this will become 647 500 # the names of the targets in the Makefile 648 basicsystem="$basicsystem ${this_script}${N}" 649 650 # Append each name of the script files to a list (this will become 651 # the names of the logs to be moved for each iteration) 652 LOGS="$LOGS ${this_script}" 501 basicsystem="$basicsystem ${this_script}" 653 502 654 503 #--------------------------------------------------------------------# … … 658 507 # Drop in the name of the target on a new line, and the previous target 659 508 # as a dependency. Also call the echo_message function. 660 CHROOT_wrt_target "${this_script} ${N}" "$PREV"509 CHROOT_wrt_target "${this_script}" "$PREV" 661 510 662 511 # If $pkg_tarball isn't empty, we've got a package... 663 512 if [ "$pkg_tarball" != "" ] ; then 513 # Touch timestamp file if installed files logs will be created. 514 # But only for the firt build when running iterative builds. 515 if [ "${INSTALL_LOG}" = "y" ] && [ "x${N}" = "x" ] ; then 516 CHROOT_wrt_TouchTimestamp 517 fi 664 518 CHROOT_Unpack "$pkg_tarball" 665 519 # If the testsuites must be run, initialize the log file … … 678 532 CHROOT_wrt_RunAsRoot "${file}" 679 533 # 680 [[ "$pkg_tarball" != "" ]] && CHROOT_wrt_RemoveBuildDirs "${name}" 681 # 682 # Include a touch of the target name so make can check if it's already been made. 534 # Write installed files log and remove the build directory(ies) 535 # except if the package build fails. 536 if [ "$pkg_tarball" != "" ] ; then 537 CHROOT_wrt_RemoveBuildDirs "$name" 538 if [ "${INSTALL_LOG}" = "y" ] && [ "x${N}" = "x" ] ; then 539 CHROOT_wrt_LogNewFiles "$name" 540 fi 541 fi 542 # 543 # Include a touch of the target name so make can check 544 # if it's already been made. 683 545 wrt_touch 684 546 # … … 688 550 # 689 551 # Keep the script file name for Makefile dependencies. 690 PREV=${this_script} ${N}552 PREV=${this_script} 691 553 # Set system_build envar for iteration targets 692 554 system_build=$basicsystem … … 695 557 696 558 #--------------------------------------# 697 boot_final_system_Makefiles() { # 698 #--------------------------------------# 699 # Set envars and scripts for iteration targets 700 LOGS="" # Start with an empty global LOGS envar 701 if [[ -z "$1" ]] ; then 702 local N="" 703 # The makesys phase was initiated in bm_testsuite_tools_makefile 704 [[ "$TEST" = 0 ]] && PREV="" 559 bootscripts_Makefiles() { # 560 #--------------------------------------# 561 562 if [[ "${METHOD}" = "chroot" ]]; then 563 echo "${tab_}${GREEN}Processing... ${L_arrow}(chroot) bootscripts ( CHROOT ) ${R_arrow}" 705 564 else 706 local N=-build_$1 707 local basicsystem="" 708 mkdir final-system$N 709 cp final-system/* final-system$N 710 for script in final-system$N/* ; do 711 # Overwrite existing symlinks, files, and dirs 712 sed -e 's/ln -sv/&f/g' \ 713 -e 's/mv -v/&f/g' \ 714 -e 's/mkdir -v/&p/g' -i ${script} 715 done 716 # Remove Bzip2 binaries before make install 717 sed -e 's@make install@rm -vf /usr/bin/bz*\n&@' -i final-system$N/*-bzip2 718 # Delete *old Readline libraries just after make install 719 sed -e 's@make install@&\nrm -v /lib/lib{history,readline}*old@' -i final-system$N/*-readline 565 echo "${tab_}${GREEN}Processing... ${L_arrow}(boot) bootscripts ( ROOT ) ${R_arrow}" 720 566 fi 721 722 echo "${tab_}${GREEN}Processing... ${L_arrow}(boot) final system$N ( ROOT ) ${R_arrow}"723 724 for file in final-system$N/* ; do725 # Keep the script file name726 this_script=`basename $file`727 728 # Test if the stripping phase must be skipped729 # Skip alsp temp-perl for iterative runs730 case $this_script in731 *stripping*) [[ "$STRIP" = "n" ]] && continue ;;732 *temp-perl*) [[ -n "$N" ]] && continue ;;733 esac734 735 # Grab the name of the target, strip id number, XXX-script736 name=`echo $this_script | sed -e 's@[0-9]\{3\}-@@' \737 -e 's@temp-@@' \738 -e 's@-64bit@@' \739 -e 's@-64@@' \740 -e 's@64@@' \741 -e 's@n32@@'`742 743 # Find the version of the command files, if it corresponds with the building of744 # a specific package. We need this here to can skip scripts not needed for745 # iterations rebuilds746 747 pkg_tarball=$(get_package_tarball_name $name)748 749 if [[ "$pkg_tarball" = "" ]] && [[ -n "$N" ]] ; then750 case "${this_script}" in751 *stripping*) ;;752 *) continue ;;753 esac754 fi755 756 # Append each name of the script files to a list (this will become757 # the names of the targets in the Makefile758 basicsystem="$basicsystem ${this_script}${N}"759 760 # Append each name of the script files to a list (this will become761 # the names of the logs to be moved for each iteration)762 LOGS="$LOGS ${this_script}"763 764 #--------------------------------------------------------------------#765 # >>>>>>>> START BUILDING A Makefile ENTRY <<<<<<<< #766 #--------------------------------------------------------------------#767 #768 # Drop in the name of the target on a new line, and the previous target769 # as a dependency. Also call the echo_message function.770 BOOT_wrt_target "${this_script}${N}" "$PREV"771 772 # If $pkg_tarball isn't empty, we've got a package...773 if [ "$pkg_tarball" != "" ] ; then774 FILE="$pkg_tarball"775 BOOT_wrt_Unpack "$FILE"776 # If the testsuites must be run, initialize the log file777 case $name in778 binutils | gcc | glibc )779 [[ "$TEST" != "0" ]] && BOOT_wrt_test_log "${this_script}"780 ;;781 * )782 [[ "$TEST" = "2" ]] || [[ "$TEST" = "3" ]] && BOOT_wrt_test_log "${this_script}"783 ;;784 esac785 # If using optimizations, write the instructions786 [[ "$OPTIMIZE" != "0" ]] && wrt_optimize "$name" && wrt_makeflags "$name"787 fi788 #789 BOOT_wrt_RunAsRoot "${this_script}" "${file}"790 #791 [[ "$pkg_tarball" != "" ]] && BOOT_wrt_RemoveBuildDirs "${name}"792 #793 # Include a touch of the target name so make can check if it's already been made.794 wrt_touch795 #796 #--------------------------------------------------------------------#797 # >>>>>>>> END OF Makefile ENTRY <<<<<<<< #798 #--------------------------------------------------------------------#799 #800 # Keep the script file name for Makefile dependencies.801 PREV=${this_script}${N}802 # Set system_build envar for iteration targets803 system_build=$basicsystem804 done # for file in final-system/* ...805 806 }807 808 #--------------------------------------#809 chroot_bootscripts_Makefiles() { #810 #--------------------------------------#811 echo "${tab_}${GREEN}Processing... ${L_arrow}(chroot) bootscripts ( CHROOT ) ${R_arrow}"812 567 813 568 for file in bootscripts/* ; do … … 848 603 # If $pkg_tarball isn't empty, we've got a package... 849 604 # 850 [[ "$pkg_tarball" != "" ]] && CHROOT_Unpack "$pkg_tarball" 605 if [ "$pkg_tarball" != "" ] ; then 606 if [ "${INSTALL_LOG}" = "y" ] ; then 607 CHROOT_wrt_LogNewFiles "$name" 608 fi 609 CHROOT_Unpack "$pkg_tarball" 610 fi 851 611 # 852 612 CHROOT_wrt_RunAsRoot "${file}" 853 613 # 854 [[ "$pkg_tarball" != "" ]] && CHROOT_wrt_RemoveBuildDirs "${name}" 614 # Write installed files log and remove the build directory(ies) 615 # except if the package build fails. 616 if [ "$pkg_tarball" != "" ] ; then 617 CHROOT_wrt_RemoveBuildDirs "$name" 618 if [ "${INSTALL_LOG}" = "y" ] ; then 619 CHROOT_wrt_LogNewFiles "$name" 620 fi 621 fi 855 622 # 856 623 # Include a touch of the target name so make can check if it's already been made. … … 868 635 869 636 #--------------------------------------# 870 boot_bootscripts_Makefiles() { # 871 #--------------------------------------# 872 echo "${tab_}${GREEN}Processing... ${L_arrow}(boot) bootscripts ( ROOT ) ${R_arrow}" 873 874 for file in bootscripts/* ; do 875 # Keep the script file name 876 this_script=`basename $file` 877 878 case $this_script in 879 *udev) continue ;; # This is not a script but a commentary 880 *console*) continue ;; # Use the files that came with the bootscripts 881 *) ;; 882 esac 883 884 # First append each name of the script files to a list (this will become 885 # the names of the targets in the Makefile 886 bootscripttools="$bootscripttools $this_script" 887 888 # Grab the name of the target, strip id number, XXX-script 889 name=`echo $this_script | sed -e 's@[0-9]\{3\}-@@'\ 890 -e 's@-64bit@@' \ 891 -e 's@-64@@' \ 892 -e 's@64@@' \ 893 -e 's@n32@@'` 894 case $name in 895 *bootscripts*) name=bootscripts-cross-lfs ;; 896 *udev-rules) name=udev-cross-lfs ;; 897 esac 898 899 pkg_tarball=$(get_package_tarball_name $name) 900 901 #--------------------------------------------------------------------# 902 # >>>>>>>> START BUILDING A Makefile ENTRY <<<<<<<< # 903 #--------------------------------------------------------------------# 904 # 905 # Drop in the name of the target on a new line, and the previous target 906 # as a dependency. Also call the echo_message function. 907 BOOT_wrt_target "${this_script}" "$PREV" 908 # 909 # If $pkg_tarball isn't empty, we've got a package... 910 # 911 [[ "$pkg_tarball" != "" ]] && BOOT_wrt_Unpack "$pkg_tarball" 912 # 913 BOOT_wrt_RunAsRoot "${this_script}" "${file}" 914 # 915 [[ "$pkg_tarball" != "" ]] && BOOT_wrt_RemoveBuildDirs "${name}" 916 # 917 # Include a touch of the target name so make can check if it's already been made. 918 wrt_touch 919 # 920 #--------------------------------------------------------------------# 921 # >>>>>>>> END OF Makefile ENTRY <<<<<<<< # 922 #--------------------------------------------------------------------# 923 # 924 # Keep the script file name for Makefile dependencies. 925 PREV=$this_script 926 927 done # for file in bootscripts/* ... 928 } 929 930 #--------------------------------------# 931 chroot_bootable_Makefiles() { # 932 #--------------------------------------# 933 echo "${tab_}${GREEN}Processing... ${L_arrow}(chroot) make bootable ( CHROOT ) ${R_arrow}" 934 935 for file in {bootable,the-end}/* ; do 637 bootable_Makefiles() { # 638 #--------------------------------------# 639 640 if [[ "${METHOD}" = "chroot" ]]; then 641 echo "${tab_}${GREEN}Processing... ${L_arrow}(chroot) make bootable ( CHROOT ) ${R_arrow}" 642 else 643 echo "${tab_}${GREEN}Processing... ${L_arrow}(boot) make bootable ( ROOT ) ${R_arrow}" 644 fi 645 646 647 for file in bootable/* ; do 936 648 # Keep the script file name 937 649 this_script=`basename $file` … … 972 684 # Insert instructions for unpacking the package and changing directories 973 685 # 974 [[ "$pkg_tarball" != "" ]] && CHROOT_Unpack "$pkg_tarball" 686 if [ "$pkg_tarball" != "" ] ; then 687 if [ "${INSTALL_LOG}" = "y" ] ; then 688 CHROOT_wrt_LogNewFiles "$name" 689 fi 690 CHROOT_Unpack "$pkg_tarball" 691 fi 975 692 # 976 693 # Select a script execution method … … 986 703 esac 987 704 # 988 # Housekeeping...remove any build directory(ies) except if the package build fails. 989 [[ "$pkg_tarball" != "" ]] && CHROOT_wrt_RemoveBuildDirs "${name}" 705 # Write installed files log and remove the build directory(ies) 706 # except if the package build fails. 707 if [ "$pkg_tarball" != "" ] ; then 708 CHROOT_wrt_RemoveBuildDirs "$name" 709 if [ "${INSTALL_LOG}" = "y" ] ; then 710 CHROOT_wrt_LogNewFiles "$name" 711 fi 712 fi 990 713 # 991 714 # Include a touch of the target name so make can check if it's already been made. … … 999 722 PREV=$this_script 1000 723 1001 done1002 1003 }1004 1005 #--------------------------------------#1006 boot_bootable_Makefiles() { #1007 #--------------------------------------#1008 echo "${tab_}${GREEN}Processing... ${L_arrow}(boot) make bootable ( ROOT ) ${R_arrow}"1009 1010 for file in {bootable,the-end}/* ; do1011 # Keep the script file name1012 this_script=`basename $file`1013 1014 # A little housekeeping on the scripts1015 case $this_script in1016 *grub | *aboot | *colo | *silo | *arcload | *lilo | *reboot* ) continue ;;1017 *kernel) # if there is no kernel config file do not build the kernel1018 [[ -z $CONFIG ]] && continue1019 # Copy the named config file to /sources with a standardized name1020 cp $CONFIG $BUILDDIR/sources/kernel-config1021 ;;1022 esac1023 #1024 # First append each name of the script files to a list (this will become1025 # the names of the targets in the Makefile1026 bootabletools="$bootabletools $this_script"1027 #1028 # Grab the name of the target, strip id number and misc words.1029 case $this_script in1030 *kernel) name=linux ;;1031 *) name=`echo $this_script | sed -e 's@[0-9]\{3\}-@@' -e 's@-build@@' ` ;;1032 esac1033 1034 pkg_tarball=$(get_package_tarball_name $name)1035 1036 #--------------------------------------------------------------------#1037 # >>>>>>>> START BUILDING A Makefile ENTRY <<<<<<<< #1038 #--------------------------------------------------------------------#1039 #1040 # Drop in the name of the target on a new line, and the previous target1041 # as a dependency. Also call the echo_message function.1042 BOOT_wrt_target "${this_script}" "$PREV"1043 #1044 # If $pkg_tarball isn't empty, we've got a package...1045 # Insert instructions for unpacking the package and changing directories1046 #1047 [[ "$pkg_tarball" != "" ]] && BOOT_wrt_Unpack "$pkg_tarball"1048 #1049 # Select a script execution method1050 case $this_script in1051 *fstab*) if [[ -n "$FSTAB" ]]; then1052 # Minimal boot mode has no access to original file, store in /sources1053 cp $FSTAB $BUILDDIR/sources/fstab1054 BOOT_wrt_CopyFstab "${this_script}"1055 else1056 BOOT_wrt_RunAsRoot "${this_script}" "${file}"1057 fi1058 ;;1059 *) BOOT_wrt_RunAsRoot "${this_script}" "${file}" ;;1060 esac1061 #1062 # Housekeeping...remove any build directory(ies) except if the package build fails.1063 [[ "$pkg_tarball" != "" ]] && BOOT_wrt_RemoveBuildDirs "${name}"1064 #1065 # Include a touch of the target name so make can check if it's already been made.1066 wrt_touch1067 #1068 #--------------------------------------------------------------------#1069 # >>>>>>>> END OF Makefile ENTRY <<<<<<<< #1070 #--------------------------------------------------------------------#1071 #1072 # Keep the script file name for Makefile dependencies.1073 PREV=$this_script1074 724 done 1075 725 … … 1085 735 set +e 1086 736 declare -f method_cmds 1087 declare -f testsuite_cmds1088 declare -f final_sys_cmds1089 declare -f bootscripts_cmds1090 declare -f bootable_cmds1091 737 set -e 1092 738 … … 1098 744 >$MKFILE.tmp 1099 745 1100 method_cmds=${METHOD}_Makefiles 1101 testsuite_cmds=${METHOD}_testsuite_tools_Makefiles 1102 final_sys_cmds=${METHOD}_final_system_Makefiles 1103 bootscripts_cmds=${METHOD}_bootscripts_Makefiles 1104 bootable_cmds=${METHOD}_bootable_Makefiles 746 method_cmds=${METHOD}_Makefiles 1105 747 1106 748 host_prep_Makefiles # mk_SETUP (SETUP) $host_prep … … 1109 751 $method_cmds # mk_SYSTOOLS (CHROOT) $chroottools/$boottools 1110 752 if [[ ! $TEST = "0" ]]; then 1111 $testsuite_cmds# mk_SYSTOOLS (CHROOT) $testsuitetools753 testsuite_tools_Makefiles # mk_SYSTOOLS (CHROOT) $testsuitetools 1112 754 fi 1113 $final_sys_cmds# mk_FINAL (CHROOT) $basicsystem755 final_system_Makefiles # mk_FINAL (CHROOT) $basicsystem 1114 756 # Add the iterations targets, if needed 1115 757 [[ "$COMPARE" = "y" ]] && wrt_compare_targets 1116 $bootscripts_cmds # mk_BOOTSCRIPT (CHROOT) $bootscripttools 1117 $bootable_cmds # mk_BOOTABLE (CHROOT) $bootabletools 1118 758 bootscripts_Makefiles # mk_BOOTSCRIPT (CHROOT) $bootscripttools 759 bootable_Makefiles # mk_BOOTABLE (CHROOT) $bootabletools 760 761 # Add the CUSTOM_TOOLS targets, if needed 762 [[ "$CUSTOM_TOOLS" = "y" ]] && wrt_CustomTools_target 1119 763 # Add the BLFS_TOOL targets, if needed 1120 764 [[ "$BLFS_TOOL" = "y" ]] && wrt_blfs_tool_targets … … 1122 766 # Add a header, some variables and include the function file 1123 767 # to the top of the real Makefile. 1124 ( 1125 cat << EOF 1126 $HEADER 1127 1128 SRC = /sources 1129 MOUNT_PT = $BUILDDIR 1130 PKG_LST = $PKG_LST 1131 LUSER = $LUSER 1132 LGROUP = $LGROUP 1133 SCRIPT_ROOT = $SCRIPT_ROOT 1134 ADD_BLFS_TOOLS = $BLFS_TOOL 1135 1136 BASEDIR = \$(MOUNT_PT) 1137 SRCSDIR = \$(BASEDIR)/sources 1138 CMDSDIR = \$(BASEDIR)/\$(SCRIPT_ROOT)/$PROGNAME-commands 1139 LOGDIR = \$(BASEDIR)/\$(SCRIPT_ROOT)/logs 1140 TESTLOGDIR = \$(BASEDIR)/\$(SCRIPT_ROOT)/test-logs 1141 1142 crSRCSDIR = /sources 1143 crCMDSDIR = /\$(SCRIPT_ROOT)/$PROGNAME-commands 1144 crLOGDIR = /\$(SCRIPT_ROOT)/logs 1145 crTESTLOGDIR = /\$(SCRIPT_ROOT)/test-logs 1146 1147 SU_LUSER = su - \$(LUSER) -c 1148 LUSER_HOME = /home/\$(LUSER) 1149 PRT_DU = echo -e "\nKB: \`du -skx --exclude=jhalfs \$(MOUNT_PT)\`\n" 1150 PRT_DU_CR = echo -e "\nKB: \`du -skx --exclude=\$(SCRIPT_ROOT) / \`\n" 1151 1152 export PATH := \${PATH}:/usr/sbin 1153 1154 include makefile-functions 1155 1156 EOF 1157 ) > $MKFILE 768 wrt_Makefile_header 1158 769 1159 770 # Add chroot commands … … 1162 773 chroot=`cat chroot/*chroot* | \ 1163 774 sed -e "s@chroot@$CHROOT_LOC@" \ 1164 -e '/#!\/ tools\/bin\/bash/d' \775 -e '/#!\/bin\/bash/d' \ 1165 776 -e '/^export/d' \ 1166 777 -e '/^logout/d' \ … … 1171 782 -e 's|exit||g' \ 1172 783 -e 's|$| -c|' \ 1173 -e 's|"$$CLFS"|$(MOUNT_PT)|'\ 1174 -e 's|set -e||'` 784 -e 's|"$${CLFS}"|$(MOUNT_PT)|'\ 785 -e 's|set -e||' \ 786 -e 's|set +h||'` 1175 787 echo -e "CHROOT1= $chroot\n" >> $MKFILE 1176 788 fi … … 1182 794 cat << EOF 1183 795 1184 all: ck_UID mk_SETUP mk_CROSS mk_SUDO mk_SYSTOOLS create-sbu_du-report mk_ BLFS_TOOL796 all: ck_UID mk_SETUP mk_CROSS mk_SUDO mk_SYSTOOLS create-sbu_du-report mk_CUSTOM_TOOLS mk_BLFS_TOOL 1185 797 @sudo make do-housekeeping 798 @echo "$VERSION - jhalfs build" > clfs-release && \\ 799 sudo mv clfs-release \$(MOUNT_PT)/etc 1186 800 @\$(call echo_finished,$VERSION) 1187 801 … … 1197 811 mk_SETUP: 1198 812 @\$(call echo_SU_request) 1199 @sudo make SETUP813 @sudo make BREAKPOINT=\$(BREAKPOINT) SETUP 1200 814 @touch \$@ 1201 815 … … 1203 817 mk_CROSS: mk_SETUP 1204 818 @\$(call echo_PHASE,Cross and Temporary Tools) 1205 @(sudo \$(SU_LUSER) "source .bashrc && cd \$(MOUNT_PT)/\$(SCRIPT_ROOT) && make AS_LUSER" )819 @(sudo \$(SU_LUSER) "source .bashrc && cd \$(MOUNT_PT)/\$(SCRIPT_ROOT) && make BREAKPOINT=\$(BREAKPOINT) AS_LUSER" ) 1206 820 @sudo make restore-luser-env 1207 821 @touch \$@ 1208 822 1209 823 mk_SUDO: mk_CROSS 1210 @sudo make SUDO 1211 @touch \$@ 1212 # 1213 # The convoluted piece of code below is necessary to provide 'make' with a valid shell in the 1214 # chroot environment. (Unless someone knows a different way) 1215 # Manually create the /bin directory and provide link to the /tools dir. 1216 # Also change the original symlink creation to include (f)orce to prevent failure due to 1217 # pre-existing links. 824 @sudo make BREAKPOINT=\$(BREAKPOINT) SUDO 825 @touch \$@ 1218 826 1219 827 #---------------CHROOT JAIL 1220 828 mk_SYSTOOLS: mk_SUDO 1221 @if [ ! -e \$(MOUNT_PT)/bin ]; then \\1222 mkdir \$(MOUNT_PT)/bin; \\1223 cd \$(MOUNT_PT)/bin && \\1224 ln -svf /tools/bin/bash bash; ln -sf bash sh; \\1225 sudo chown -R 0:0 \$(MOUNT_PT)/bin; \\1226 fi;1227 @sudo sed -e 's|^ln -sv |ln -svf |' -i \$(CMDSDIR)/chroot/082-createfiles1228 829 @\$(call echo_CHROOT_request) 1229 830 @\$(call echo_PHASE, CHROOT JAIL ) 1230 @( sudo \$(CHROOT1) "cd \$(SCRIPT_ROOT) && make CHROOT_JAIL") 1231 @touch \$@ 1232 1233 mk_BLFS_TOOL: mk_SYSTOOLS 1234 @\$(call echo_PHASE,Building BLFS-TOOLS); \\ 831 @( sudo \$(CHROOT1) "cd \$(SCRIPT_ROOT) && make BREAKPOINT=\$(BREAKPOINT) PREP_CHROOT_JAIL") 832 @( sudo \$(CHROOT1) "cd \$(SCRIPT_ROOT) && make BREAKPOINT=\$(BREAKPOINT) CHROOT_JAIL") 833 @touch \$@ 834 835 mk_CUSTOM_TOOLS: create-sbu_du-report 836 @if [ "\$(ADD_CUSTOM_TOOLS)" = "y" ]; then \\ 837 \$(call sh_echo_PHASE,Building CUSTOM_TOOLS); \\ 838 sudo mkdir -p ${BUILDDIR}${TRACKING_DIR}; \\ 839 (sudo \$(CHROOT1) "cd \$(SCRIPT_ROOT) && make BREAKPOINT=\$(BREAKPOINT) CUSTOM_TOOLS"); \\ 840 fi; 841 @touch \$@ 842 843 mk_BLFS_TOOL: mk_CUSTOM_TOOLS 1235 844 @if [ "\$(ADD_BLFS_TOOLS)" = "y" ]; then \\ 845 \$(call sh_echo_PHASE,Building BLFS_TOOL); \\ 1236 846 sudo mkdir -p $BUILDDIR$TRACKING_DIR; \\ 1237 sudo \$(CHROOT1) "cd \$(SCRIPT_ROOT) && make BLFS_TOOL"; \\ 1238 fi 1239 @touch \$@ 1240 1241 SETUP: $host_prep 1242 AS_LUSER: $cross_tools $temptools 1243 SUDO: $orphan_scripts 1244 CHROOT_JAIL: ${chroottools}${boottools} $testsuitetools $basicsystem $bootscripttools $bootabletools 1245 BLFS_TOOL: $blfs_tool 847 sudo \$(CHROOT1) "cd \$(SCRIPT_ROOT) && make BREAKPOINT=\$(BREAKPOINT) BLFS_TOOL"; \\ 848 fi; 849 @touch \$@ 850 851 SETUP: $host_prep 852 AS_LUSER: $cross_tools $temptools 853 SUDO: $orphan_scripts 854 PREP_CHROOT_JAIL: SHELL=/tools/bin/bash 855 PREP_CHROOT_JAIL: ${chroottools} 856 CHROOT_JAIL: SHELL=/tools/bin/bash 857 CHROOT_JAIL: $testsuitetools $basicsystem $bootscripttools $bootabletools 858 CUSTOM_TOOLS: $custom_list 859 BLFS_TOOL: $blfs_tool 860 861 862 create-sbu_du-report: mk_SYSTOOLS 863 @\$(call echo_message, Building) 864 @if [ "\$(ADD_REPORT)" = "y" ]; then \\ 865 ./create-sbu_du-report.sh logs $VERSION; \\ 866 \$(call echo_report,$VERSION-SBU_DU-$(date --iso-8601).report); \\ 867 fi; 868 @touch \$@ 1246 869 1247 870 do-housekeeping: … … 1254 877 @-if [ ! -f luser-exist ]; then \\ 1255 878 userdel \$(LUSER); \\ 1256 rm -rf /home/\$(LUSER); \\879 rm -rf \$(LUSER_HOME); \\ 1257 880 fi; 1258 881 1259 882 EOF 1260 883 ) >> $MKFILE 1261 1262 # Add SBU-disk_usage report target1263 echo "create-sbu_du-report:" >> $MKFILE1264 if [[ "$REPORT" = "y" ]] ; then1265 (1266 cat << EOF1267 @\$(call echo_message, Building)1268 @./create-sbu_du-report.sh logs $VERSION1269 @\$(call echo_report,$VERSION-SBU_DU-$(date --iso-8601).report)1270 @touch \$@1271 1272 EOF1273 ) >> $MKFILE1274 else echo -e "\t@true\n" >> $MKFILE; fi1275 1276 884 1277 885 fi … … 1288 896 @\$(call echo_boot_finished,$VERSION) 1289 897 1290 makesys: mk_FINAL mk_BLFS_TOOL 898 makesys: mk_FINAL mk_CUSTOM_TOOLS mk_BLFS_TOOL 899 @echo "$VERSION - jhalfs build" > /etc/clfs-release 1291 900 @\$(call echo_finished,$VERSION) 1292 901 … … 1308 917 mk_SETUP: 1309 918 @\$(call echo_SU_request) 1310 @sudo make SETUP919 @sudo make BREAKPOINT=\$(BREAKPOINT) SETUP 1311 920 @touch \$@ 1312 921 … … 1315 924 mk_CROSS: mk_SETUP 1316 925 @\$(call echo_PHASE,Cross Tool) 1317 @(sudo \$(SU_LUSER) "source .bashrc && cd \$(MOUNT_PT)/\$(SCRIPT_ROOT) && make AS_LUSER" )926 @(sudo \$(SU_LUSER) "source .bashrc && cd \$(MOUNT_PT)/\$(SCRIPT_ROOT) && make BREAKPOINT=\$(BREAKPOINT) AS_LUSER" ) 1318 927 @touch \$@ 1319 928 1320 929 mk_SUDO: mk_CROSS 1321 @sudo make SUDO930 @sudo make BREAKPOINT=\$(BREAKPOINT) SUDO 1322 931 @touch \$@ 1323 932 … … 1326 935 mk_FINAL: 1327 936 @\$(call echo_PHASE,Final System) 1328 @( make AS_ROOT ) 1329 @touch \$@ 1330 1331 mk_BLFS_TOOL: mk_FINAL 1332 @\$(call echo_PHASE,Building BLFS-TOOLS) 937 @( source /root/.bash_profile && make BREAKPOINT=\$(BREAKPOINT) AS_ROOT ) 938 @touch \$@ 939 940 mk_CUSTOM_TOOLS: mk_FINAL 941 @if [ "\$(ADD_CUSTOM_TOOLS)" = "y" ]; then \\ 942 \$(call sh_echo_PHASE,Building CUSTOM_TOOLS); \\ 943 mkdir -p ${TRACKING_DIR}; \\ 944 ( source /root/.bash_profile && make BREAKPOINT=\$(BREAKPOINT) CUSTOM_TOOLS ); \\ 945 fi; 946 @touch \$@ 947 948 mk_BLFS_TOOL: mk_CUSTOM_TOOLS 1333 949 @if [ "\$(ADD_BLFS_TOOLS)" = "y" ]; then \\ 950 \$(call sh_echo_PHASE,Building BLFS_TOOL); \\ 1334 951 mkdir -p $TRACKING_DIR; \\ 1335 make BLFS_TOOL; \\952 ( source /root/.bash_profile && make BREAKPOINT=\$(BREAKPOINT) BLFS_TOOL ); \\ 1336 953 fi 1337 954 @touch \$@ 1338 955 1339 SETUP: $host_prep 1340 AS_LUSER: $cross_tools $temptools ${chroottools}${boottools} 1341 SUDO: $orphan_scripts 1342 AS_ROOT: $testsuitetools $basicsystem $bootscripttools $bootabletools 1343 BLFS_TOOL: $blfs_tool 956 SETUP: $host_prep 957 AS_LUSER: $cross_tools $temptools ${boottools} 958 SUDO: $orphan_scripts 959 AS_ROOT: SHELL=/tools/bin/bash 960 AS_ROOT: $testsuitetools $basicsystem $bootscripttools $bootabletools 961 CUSTOM_TOOLS: $custom_list 962 BLFS_TOOL: $blfs_tool 1344 963 1345 964 do-housekeeping: … … 1347 966 @-if [ ! -f luser-exist ]; then \\ 1348 967 userdel \$(LUSER); \\ 1349 rm -rf /home/\$(LUSER); \\968 rm -rf \$(LUSER_HOME); \\ 1350 969 fi; 1351 970 … … 1359 978 restore-luser-env: 1360 979 @\$(call echo_message, Building) 1361 @if [ -f /home/\$(LUSER)/.bashrc.XXX ]; then \\1362 mv -f /home/\$(LUSER)/.bashrc.XXX /home/\$(LUSER)/.bashrc; \\980 @if [ -f \$(LUSER_HOME)/.bashrc.XXX ]; then \\ 981 mv -f \$(LUSER_HOME)/.bashrc.XXX \$(LUSER_HOME)/.bashrc; \\ 1363 982 fi; 1364 @if [ -f /home/\$(LUSER)/.bash_profile.XXX ]; then \\1365 mv /home/\$(LUSER)/.bash_profile.XXX /home/\$(LUSER)/.bash_profile; \\983 @if [ -f \$(LUSER_HOME)/.bash_profile.XXX ]; then \\ 984 mv \$(LUSER_HOME)/.bash_profile.XXX \$(LUSER_HOME)/.bash_profile; \\ 1366 985 fi; 1367 @chown \$(LUSER):\$(LGROUP) /home/\$(LUSER)/.bash* && \\986 @chown \$(LUSER):\$(LGROUP) \$(LUSER_HOME)/.bash* && \\ 1368 987 touch \$@ && \\ 1369 988 echo " "\$(BOLD)Target \$(BLUE)\$@ \$(BOLD)OK && \\ -
Property mode
changed from
Note:
See TracChangeset
for help on using the changeset viewer.