[Nix-dev] /bin in chroot builds

Michael Raskin 7c6f434c at mail.ru
Sun Nov 6 09:34:28 CET 2011


		Hello.
	I noticed that our dependence on /bin/sh is more for scripts 
that user writes than for builds. As /bin/sh is technically a small
impurity (and a small hassle when doing multiple-nix-store juggling), it
would be nice if it could be finally avoided. 
	I see two sources of dependency on /bin/sh that have to be 
removed before trying chroot builds without /bin mounted:
	
1) ./configure has /bin/sh as interpreter
2) glibc uses /bin/sh for system()

The second problem needs a patch for glibc, and it can break subtly; I
guess it will be better done after the stdenv merge. But because 
/configure can work _only_ if its interpreter is /bin/sh (nothing else
exists in /bin and /usr/bin, and upstream shouldn't be able to guess our
store paths), replacing default command with 
"sh ./configure $configureFlags" can be an easy step. 

	Does anyone have any ideas about 
a) what this could break,
b) why it shouldn't be done before stdenv-updates merge,
c) why it shouldn't be done at all?

Thanks,
	Raskin Michael





More information about the nix-dev mailing list