- Timestamp:
- 10/02/2006 07:32:06 PM (18 years ago)
- Branches:
- 2.3, 2.3.x, 2.4, ablfs, ablfs-more, legacy, new_features, trunk
- Children:
- f5fc83d
- Parents:
- 6f75d64
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
CLFS2/master.sh
r6f75d64 r045b2dc 12 12 local CLFS_HOST 13 13 14 echo "${tab_}${GREEN}Processing... ${L_arrow}host prep files ${R_arrow}"14 echo "${tab_}${GREEN}Processing... ${L_arrow}host prep files ( SETUP ) ${R_arrow}" 15 15 16 16 # defined here, only for ease of reading … … 36 36 touch luser-exist; \\ 37 37 fi; 38 @chown \$(LUSER) \$(MOUNT_PT) && \\38 @chown -R \$(LUSER) \$(MOUNT_PT) && \\ 39 39 chown \$(LUSER) \$(MOUNT_PT)/sources 40 40 @touch \$@ && \\ … … 65 65 echo "source $JHALFSDIR/envars" >> /home/\$(LUSER)/.bashrc 66 66 @chown \$(LUSER):\$(LGROUP) /home/\$(LUSER)/.bashrc && \\ 67 touch envars 67 touch envars && \\ 68 chown \$(LUSER):\$(LGROUP) envars && \\ 69 chmod -R a+wt \$(MOUNT_PT) 68 70 @touch \$@ && \\ 69 71 echo " "\$(BOLD)Target \$(BLUE)\$@ \$(BOLD)OK && \\ … … 123 125 EOF 124 126 ) >> $MKFILE.tmp 127 128 host_prep=" 023-creatingtoolsdir 025-addinguser 026-settingenvironment 027-create-directories 028-creating-sysfile" 125 129 } 126 130 … … 129 133 cross_tools_Makefiles() { # 130 134 #-----------------------------# 131 echo "${tab_}${GREEN}Processing... ${L_arrow}cross tools ${R_arrow}"135 echo "${tab_}${GREEN}Processing... ${L_arrow}cross tools ( LUSER ) ${R_arrow}" 132 136 133 137 for file in cross-tools/* ; do … … 176 180 # Drop in the name of the target on a new line, and the previous target 177 181 # as a dependency. Also call the echo_message function. 178 wrt_target "${this_script}" "$PREV"182 LUSER_wrt_target "${this_script}" "$PREV" 179 183 # 180 184 # If $pkg_tarball isn't empty, we've got a package... 181 185 if [ "$pkg_tarball" != "" ] ; then 182 wrt_unpack "$pkg_tarball"186 LUSER_wrt_unpack "$pkg_tarball" 183 187 # If using optimizations, write the instructions 184 188 [[ "$OPTIMIZE" != "0" ]] && wrt_optimize "$name" && wrt_makeflags "$name" 185 189 fi 186 190 # 187 wrt_RunAsUser "${this_script}""${file}"188 # 189 [[ "$pkg_tarball" != "" ]] && wrt_remove_build_dirs "${name}"191 LUSER_wrt_RunAsUser "${file}" 192 # 193 [[ "$pkg_tarball" != "" ]] && LUSER_RemoveBuildDirs "${name}" 190 194 # 191 195 # Include a touch of the target name so make can check if it's already been made. … … 207 211 final_system_Makefiles() { # 208 212 #-----------------------------# 209 echo "${tab_}${GREEN}Processing... ${L_arrow}final system ${R_arrow}"213 echo "${tab_}${GREEN}Processing... ${L_arrow}final system ( LUSER ) ${R_arrow}" 210 214 211 215 for file in final-system/* ; do … … 241 245 # Drop in the name of the target on a new line, and the previous target 242 246 # as a dependency. Also call the echo_message function. 243 wrt_target "${this_script}" "$PREV"247 LUSER_wrt_target "${this_script}" "$PREV" 244 248 # 245 249 # If $pkg_tarball isn't empty, we've got a package... 246 250 if [ "$pkg_tarball" != "" ] ; then 247 wrt_unpack "$pkg_tarball"251 LUSER_wrt_unpack "$pkg_tarball" 248 252 # If using optimizations, write the instructions 249 253 [[ "$OPTIMIZE" != "0" ]] && wrt_optimize "$name" && wrt_makeflags "$name" 250 254 fi 251 255 # 252 wrt_RunAsUser "${this_script}""${file}"253 # 254 [[ "$pkg_tarball" != "" ]] && wrt_remove_build_dirs "${name}"256 LUSER_wrt_RunAsUser "${file}" 257 # 258 [[ "$pkg_tarball" != "" ]] && LUSER_RemoveBuildDirs "${name}" 255 259 # 256 260 # Include a touch of the target name so make can check if it's already been made. … … 271 275 bootscripts_Makefiles() { # 272 276 #-----------------------------# 273 echo "${tab_}${GREEN}Processing... ${L_arrow}bootscripts${R_arrow}"277 echo "${tab_}${GREEN}Processing... ${L_arrow}bootscripts ( LUSER ) ${R_arrow}" 274 278 275 279 for file in bootscripts/* ; do … … 307 311 # Drop in the name of the target on a new line, and the previous target 308 312 # as a dependency. Also call the echo_message function. 309 wrt_target "${this_script}" "$PREV"313 LUSER_wrt_target "${this_script}" "$PREV" 310 314 # 311 315 # If $pkg_tarball isn't empty, we've got a package... 312 [[ "$pkg_tarball" != "" ]] && wrt_unpack "$pkg_tarball"313 # 314 wrt_RunAsUser "${this_script}""${file}"315 # 316 [[ "$pkg_tarball" != "" ]] && wrt_remove_build_dirs "${name}"316 [[ "$pkg_tarball" != "" ]] && LUSER_wrt_unpack "$pkg_tarball" 317 # 318 LUSER_wrt_RunAsUser "${file}" 319 # 320 [[ "$pkg_tarball" != "" ]] && LUSER_RemoveBuildDirs "${name}" 317 321 # 318 322 # Include a touch of the target name so make can check if it's already been made. … … 334 338 bootable_Makefiles() { # 335 339 #-----------------------------# 336 echo "${tab_}${GREEN}Processing... ${L_arrow}make bootable ${R_arrow}"340 echo "${tab_}${GREEN}Processing... ${L_arrow}make bootable ( LUSER ) ${R_arrow}" 337 341 338 342 for file in bootable/* ; do … … 343 347 case $this_script in 344 348 *grub | *aboot | *colo | *silo | *arcload | *lilo | *reboot* ) continue ;; 349 *fstab) [[ ! -z ${FSTAB} ]] && cp ${FSTAB} $BUILDDIR/sources/fstab ;; 345 350 *kernel) # if there is no kernel config file do not build the kernel 346 351 [[ -z $CONFIG ]] && continue … … 352 357 # First append each name of the script files to a list (this will become 353 358 # the names of the targets in the Makefile 354 bootable="$bootable $this_script" 359 # NOTE: new makfile format forces the last script, *chowning, into a separate 360 # phase. 361 case ${this_script} in 362 *chowning) chowning=${this_script} ;; 363 *) bootable="$bootable $this_script" ;; 364 esac 355 365 # 356 366 # Grab the name of the target, strip id number and misc words. … … 369 379 # Drop in the name of the target on a new line, and the previous target 370 380 # as a dependency. Also call the echo_message function. 371 wrt_target "${this_script}" "$PREV"381 LUSER_wrt_target "${this_script}" "$PREV" 372 382 # 373 383 # If $pkg_tarball isn't empty, we've got a package... 374 [[ "$pkg_tarball" != "" ]] && wrt_unpack "$pkg_tarball"384 [[ "$pkg_tarball" != "" ]] && LUSER_wrt_unpack "$pkg_tarball" 375 385 # 376 386 # Select a script execution method 377 387 case $this_script in 378 388 *fstab*) if [[ -n "$FSTAB" ]]; then 379 wrt_copy_fstab "${this_script}"389 LUSER_wrt_CopyFstab 380 390 else 381 wrt_RunAsUser "${this_script}""${file}"391 LUSER_wrt_RunAsUser "${file}" 382 392 fi 383 393 ;; 384 394 *chowning) wrt_RunAsRoot "${this_script}" "${file}" 385 395 ;; 386 *) wrt_RunAsUser "${this_script}""${file}"396 *) LUSER_wrt_RunAsUser "${file}" 387 397 ;; 388 398 esac 389 399 # 390 400 # Housekeeping...remove any build directory(ies) except if the package build fails. 391 [[ "$pkg_tarball" != "" ]] && wrt_remove_build_dirs "${name}"401 [[ "$pkg_tarball" != "" ]] && LUSER_RemoveBuildDirs "${name}" 392 402 # 393 403 # Include a touch of the target name so make can check if it's already been made. … … 402 412 403 413 done 404 405 # Add SBU-disk_usage report target if required406 if [[ "$REPORT" = "y" ]] ; then wrt_report ; fi407 414 408 415 } … … 447 454 LUSER_HOME = /home/\$(LUSER) 448 455 456 export PATH := \${PATH}:/usr/sbin 457 449 458 include makefile-functions 450 459 … … 455 464 # as a dependency. 456 465 ( 457 cat << EOF 458 all: chapter2 chapter3 chapter4 chapter5 chapter6 restore-luser-env do-housekeeping 466 cat << EOF 467 468 all: ck_UID mk_SETUP mk_LUSER mk_ROOT create-sbu_du-report 469 @sudo make do-housekeeping 459 470 @\$(call echo_finished,$VERSION) 460 471 461 chapter2: 023-creatingtoolsdir 025-addinguser 026-settingenvironment 027-create-directories 028-creating-sysfile 462 463 chapter3: chapter2 $cross_tools 464 465 chapter4: chapter3 $basicsystem 466 467 chapter5: chapter4 $bootscripttools 468 469 chapter6: chapter5 $bootable 470 471 clean-all: clean 472 rm -rf ./{clfs2-commands,logs,Makefile,*.xsl,makefile-functions,packages,patches} 473 474 clean: 472 ck_UID: 473 @if [ \`id -u\` = "0" ]; then \\ 474 echo "--------------------------------------------------"; \\ 475 echo "You cannot run this makefile from the root account"; \\ 476 echo "--------------------------------------------------"; \\ 477 exit 1; \\ 478 fi 479 480 mk_SETUP: 481 @\$(call echo_SU_request) 482 @sudo make SETUP 483 @touch \$@ 484 485 mk_LUSER: mk_SETUP 486 @\$(call echo_SULUSER_request) 487 @(sudo \$(SU_LUSER) "source .bashrc && cd \$(MOUNT_PT)/\$(SCRIPT_ROOT) && make LUSER" ) 488 @sudo make restore-luser-env 489 @touch \$@ 490 491 mk_ROOT: 492 @sudo make ROOT 493 @touch \$@ 494 495 SETUP: $host_prep 496 497 LUSER: $cross_tools $basicsystem $bootscripttools $bootable 498 499 ROOT: $chowning 500 475 501 476 502 restart: 477 @echo "This feature does not exist for the CLFS makefile. (yet)"503 @echo "This feature does not exist for the CLFS-2 makefile. (yet)" 478 504 479 505 restore-luser-env: … … 499 525 ) >> $MKFILE 500 526 527 # Add SBU-disk_usage report target 528 echo "create-sbu_du-report:" >> $MKFILE 529 if [[ "$REPORT" = "y" ]] ; then 530 ( 531 cat << EOF 532 @\$(call echo_message, Building) 533 @./create-sbu_du-report.sh logs $VERSION 534 @\$(call echo_report,$VERSION-SBU_DU-$(date --iso-8601).report) 535 @touch \$@ 536 537 538 EOF 539 ) >> $MKFILE 540 else echo -e "\t@true\n\n" >> $MKFILE; fi 541 501 542 # Bring over the items from the Makefile.tmp 502 543 cat $MKFILE.tmp >> $MKFILE
Note:
See TracChangeset
for help on using the changeset viewer.