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.
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)
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?
--
Manuel Canales Esparcia
Usuario de LFS nÂș2886: http://www.linuxfromscratch.org
LFS en castellano: http://www.escomposlinux.org/lfs-es http://www.lfs-es.info
TLDP-ES: http://es.tldp.org
--
http://linuxfromscratch.org/mailman/listinfo/alfs-discuss
FAQ: http://www.linuxfromscratch.org/faq/
Unsubscribe: See the above information page