Early fault running jhalfs-2.0 on clfs-svn

Dan Nicholson dbn.lists at gmail.com
Tue Nov 7 07:00:44 PST 2006


On 11/7/06, George Boudreau <georgeb at linuxfromscratch.org> wrote:

>    OK, I pinched of a new partition and installed Ubuntu. I am no expert
> what should and shouldn't be installed on a system but 6.10 has /bin/sh
> -> dash.  A quit search tells me 'dash' is a minimalist sh intended for
> a floppy install. (On a desktop? https://wiki.ubuntu.com/DashAsBinSh )

Do you know where dash comes from? I've never heard of it before.

>    The root cause of our headache is the command _time_. In bash it is a
> builtin which can time a command pipeline. ie time { cmd; cmd; } Dash
> does not have a built in time and uses the executable version, a
> different beast all together.
>
>    Solutions (add more if you know of any)
>
>     remove timing of builds for everyone
> 1.       or
>     find a different timing method

If you guys are just calling time in bash with no formatters, it looks
like you can change it to "time -p" in both the builtin and the
standalone case.

> 2. temporarily reassign /bin/sh to /bin/bash during the running of the
> Makefile. This has potential problems if the Makefile crashes and cannot
> do housekeeping and generally it is not nice to play with the host.

Don't do it. That also has the potential that any host scripts that
don't expect bash will get screwed up.

> 3. Modify the Makefile to explicitly call /bin/bash when recursively
> called using sudo.

Just have make use bash. The whole rest of jhalfs is using bash. Why
try to deal with a random sh thrown into there on top of it?

>    In the Makefile
>
> #---------------AS ROOT
> mk_SETUP:
>    @$(call echo_SU_request)
>    @sudo make SHELL=/bin/bash SETUP   <<-- define SHELL
>    @touch $@
>
> #---------------AS LUSER
> mk_CROSS: mk_SETUP
>    @$(call echo_PHASE,Cross and Temporary Tools)
>    @(sudo $(SU_LUSER) "source .bashrc && cd $(MOUNT_PT)/$(SCRIPT_ROOT)
> && make SHELL=/bin/bash AS_LUSER" )    <<-- define SHELL
>
> @mk_SUDO: mk_CROSS
>         @sudo make SHELL=/bin/bash SUDO  <<-- define SHELL
>         @touch $@sudo make restore-luser-env
>    @touch $@

What happens if you just put "SHELL = /bin/bash" unconditionally in
the Makefile? I don't see how this can possibly hurt since you expect
bash everywhere else. Unless it doesn't work.

--
Dan



More information about the alfs-discuss mailing list