New Makefile: some comments

George Boudreau georgeb at linuxfromscratch.org
Tue Sep 12 13:19:46 PDT 2006


M.Canales.es wrote:
> Note: no build done using the new Makefile due lack of time and no having sudo 
> installed yet. This comments are based on the code and may contains wrong 
> assumptions.
> 
> In run_make() function we have a check to be sure that the build Makefile is 
> run as root, meaning that the configuration make must be run also as root to 
> can use that function.
> 
> With the new Makefile sudo is a required dependency even if running as root, 
> thus we could to reverse the test and force to run make (both the 
> configuration one and the build one) as a normal user.  IMHO that is more 
> professional and secure than being root to run such complicated build 
> Makefile.
> 
> For that to work the UUID test should be done in the Makefile (both 
> configuration and build ones) if possible.
> 
   agreed, the method exposes the host system to less risk. I will look 
at writing code this evenings..

> Also a test to be sure that sudo is available should be added.
> 
   also this evening..

> But that will create another issues that need be solved:
> 
> - In the LUSER phase a password will be asked, but no password is assigned to 
> the LUSER user if he is created by the 021-addinguser target. Maybe something 
> like this could work? (using the Makefile for LFS for the examples)
> 
> mk_LUSER: mk_SETUP
>  @$(call echo_SU_request)
>  @( sudo  $(SU_LUSER) "source .bashrc && cd $(MOUNT_PT)/$(SCRIPT_ROOT) && make 
> LUSER" )
>  @touch $@
> 
> - The restore-luser-env and do_housekeeping targets will need to be run in a 
> different way, maybe like this:
> 
> all: mk_SETUP mk_LUSER mk_CHROOT mk_BOOT
>         @sudo do_housekeeping
>  @$(call echo_finished,SVN-20060909)
> 
> mk_LUSER: mk_SETUP
>  @$(call echo_SU_request)
>  @(sudo $(SU_LUSER) "source .bashrc && cd $(MOUNT_PT)/$(SCRIPT_ROOT) && make 
> LUSER" )
>         @sudo restore-luser-env
>  @touch $@
> 
> Sound all the above reasonable?
> 
   I will make those changes (or something similar) this evening and do 
a build or two. ( I would love a Conroe 6700 processor/motherboard for 
faster builds but the missus would make me a castrato if I tried 2 
upgrades in 12 months)






More information about the alfs-discuss mailing list