- Timestamp:
- 08/30/2006 02:01:04 AM (18 years ago)
- Branches:
- experimental
- Children:
- 08a4953
- Parents:
- 01b6d52
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
CLFS2/master.sh
r01b6d52 r50fb011 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 68 69 @touch \$@ && \\ 69 70 echo " "\$(BOLD)Target \$(BLUE)\$@ \$(BOLD)OK && \\ … … 123 124 EOF 124 125 ) >> $MKFILE.tmp 126 127 host_prep=" 023-creatingtoolsdir 025-addinguser 026-settingenvironment 027-create-directories 028-creating-sysfile" 125 128 } 126 129 … … 129 132 cross_tools_Makefiles() { # 130 133 #-----------------------------# 131 echo "${tab_}${GREEN}Processing... ${L_arrow}cross tools ${R_arrow}"134 echo "${tab_}${GREEN}Processing... ${L_arrow}cross tools ( LUSER ) ${R_arrow}" 132 135 133 136 for file in cross-tools/* ; do … … 176 179 # Drop in the name of the target on a new line, and the previous target 177 180 # as a dependency. Also call the echo_message function. 178 wrt_target "${this_script}" "$PREV"181 LUSER_wrt_target "${this_script}" "$PREV" 179 182 # 180 183 # If $pkg_tarball isn't empty, we've got a package... 181 184 if [ "$pkg_tarball" != "" ] ; then 182 wrt_unpack "$pkg_tarball"185 LUSER_wrt_unpack "$pkg_tarball" 183 186 # If using optimizations, write the instructions 184 187 [[ "$OPTIMIZE" != "0" ]] && wrt_optimize "$name" && wrt_makeflags "$name" 185 188 fi 186 189 # 187 wrt_RunAsUser "${this_script}""${file}"188 # 189 [[ "$pkg_tarball" != "" ]] && wrt_remove_build_dirs "${name}"190 LUSER_wrt_RunAsUser "${file}" 191 # 192 [[ "$pkg_tarball" != "" ]] && LUSER_RemoveBuildDirs "${name}" 190 193 # 191 194 # Include a touch of the target name so make can check if it's already been made. … … 207 210 final_system_Makefiles() { # 208 211 #-----------------------------# 209 echo "${tab_}${GREEN}Processing... ${L_arrow}final system ${R_arrow}"212 echo "${tab_}${GREEN}Processing... ${L_arrow}final system ( LUSER ) ${R_arrow}" 210 213 211 214 for file in final-system/* ; do … … 241 244 # Drop in the name of the target on a new line, and the previous target 242 245 # as a dependency. Also call the echo_message function. 243 wrt_target "${this_script}" "$PREV"246 LUSER_wrt_target "${this_script}" "$PREV" 244 247 # 245 248 # If $pkg_tarball isn't empty, we've got a package... 246 249 if [ "$pkg_tarball" != "" ] ; then 247 wrt_unpack "$pkg_tarball"250 LUSER_wrt_unpack "$pkg_tarball" 248 251 # If using optimizations, write the instructions 249 252 [[ "$OPTIMIZE" != "0" ]] && wrt_optimize "$name" && wrt_makeflags "$name" 250 253 fi 251 254 # 252 wrt_RunAsUser "${this_script}""${file}"253 # 254 [[ "$pkg_tarball" != "" ]] && wrt_remove_build_dirs "${name}"255 LUSER_wrt_RunAsUser "${file}" 256 # 257 [[ "$pkg_tarball" != "" ]] && LUSER_RemoveBuildDirs "${name}" 255 258 # 256 259 # Include a touch of the target name so make can check if it's already been made. … … 271 274 bootscripts_Makefiles() { # 272 275 #-----------------------------# 273 echo "${tab_}${GREEN}Processing... ${L_arrow}bootscripts${R_arrow}"276 echo "${tab_}${GREEN}Processing... ${L_arrow}bootscripts ( LUSER ) ${R_arrow}" 274 277 275 278 for file in bootscripts/* ; do … … 307 310 # Drop in the name of the target on a new line, and the previous target 308 311 # as a dependency. Also call the echo_message function. 309 wrt_target "${this_script}" "$PREV"312 LUSER_wrt_target "${this_script}" "$PREV" 310 313 # 311 314 # 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}"315 [[ "$pkg_tarball" != "" ]] && LUSER_wrt_unpack "$pkg_tarball" 316 # 317 LUSER_wrt_RunAsUser "${file}" 318 # 319 [[ "$pkg_tarball" != "" ]] && LUSER_RemoveBuildDirs "${name}" 317 320 # 318 321 # Include a touch of the target name so make can check if it's already been made. … … 334 337 bootable_Makefiles() { # 335 338 #-----------------------------# 336 echo "${tab_}${GREEN}Processing... ${L_arrow}make bootable ${R_arrow}"339 echo "${tab_}${GREEN}Processing... ${L_arrow}make bootable ( LUSER ) ${R_arrow}" 337 340 338 341 for file in bootable/* ; do … … 343 346 case $this_script in 344 347 *grub | *aboot | *colo | *silo | *arcload | *lilo | *reboot* ) continue ;; 348 *fstab) [[ ! -z ${FSTAB} ]] && cp ${FSTAB} $BUILDDIR/sources/fstab ;; 345 349 *kernel) # if there is no kernel config file do not build the kernel 346 350 [[ -z $CONFIG ]] && continue … … 352 356 # First append each name of the script files to a list (this will become 353 357 # the names of the targets in the Makefile 354 bootable="$bootable $this_script" 358 # NOTE: new makfile format forces the last script, *chowning, into a separate 359 # phase. 360 case ${this_script} in 361 *chowning) chowning=${this_script} ;; 362 *) bootable="$bootable $this_script" ;; 363 esac 355 364 # 356 365 # Grab the name of the target, strip id number and misc words. … … 369 378 # Drop in the name of the target on a new line, and the previous target 370 379 # as a dependency. Also call the echo_message function. 371 wrt_target "${this_script}" "$PREV"380 LUSER_wrt_target "${this_script}" "$PREV" 372 381 # 373 382 # If $pkg_tarball isn't empty, we've got a package... 374 [[ "$pkg_tarball" != "" ]] && wrt_unpack "$pkg_tarball"383 [[ "$pkg_tarball" != "" ]] && LUSER_wrt_unpack "$pkg_tarball" 375 384 # 376 385 # Select a script execution method 377 386 case $this_script in 378 387 *fstab*) if [[ -n "$FSTAB" ]]; then 379 wrt_copy_fstab "${this_script}"388 LUSER_wrt_CopyFstab 380 389 else 381 wrt_RunAsUser "${this_script}""${file}"390 LUSER_wrt_RunAsUser "${file}" 382 391 fi 383 392 ;; 384 393 *chowning) wrt_RunAsRoot "${this_script}" "${file}" 385 394 ;; 386 *) wrt_RunAsUser "${this_script}""${file}"395 *) LUSER_wrt_RunAsUser "${file}" 387 396 ;; 388 397 esac 389 398 # 390 399 # Housekeeping...remove any build directory(ies) except if the package build fails. 391 [[ "$pkg_tarball" != "" ]] && wrt_remove_build_dirs "${name}"400 [[ "$pkg_tarball" != "" ]] && LUSER_RemoveBuildDirs "${name}" 392 401 # 393 402 # Include a touch of the target name so make can check if it's already been made. … … 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: mk_SETUP mk_LUSER mk_ROOT 459 469 @\$(call echo_finished,$VERSION) 460 470 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 471 mk_SETUP: 472 @\$(call echo_SU_request) 473 @sudo make SETUP 474 @touch \$@ 475 476 mk_LUSER: mk_SETUP 477 @\$(call echo_SULUSER_request) 478 @( \$(SU_LUSER) "source .bashrc && cd \$(MOUNT_PT)/\$(SCRIPT_ROOT) && make LUSER" ) 479 @touch \$@ 480 481 mk_ROOT: 482 @sudo make ROOT 483 @touch \$@ 484 485 SETUP: $host_prep 486 487 LUSER: $cross_tools $basicsystem $bootscripttools $bootable 488 489 ROOT: $chowning 470 490 471 491 clean-all: clean
Note:
See TracChangeset
for help on using the changeset viewer.