New Makefile: some comments manuel at
Tue Sep 12 12:22:04 PDT 2006

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 

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 

For that to work the UUID test should be done in the Makefile (both 
configuration and build ones) if possible.

Also a test to be sure that sudo is available should be added.

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)

 @$(call echo_SU_request)
 @( sudo  $(SU_LUSER) "source .bashrc && cd $(MOUNT_PT)/$(SCRIPT_ROOT) && make 
 @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)

 @$(call echo_SU_request)
 @(sudo $(SU_LUSER) "source .bashrc && cd $(MOUNT_PT)/$(SCRIPT_ROOT) && make 
        @sudo restore-luser-env
 @touch $@

Sound all the above reasonable?

Manuel Canales Esparcia
Usuario de LFS nº2886:
LFS en castellano:

More information about the alfs-discuss mailing list