nixpkgs/pkgs/build-support/vm
aszlig caccc40ad0
vmTools: Fix BusyBox runtime error in initrd
With the recent update of BusyBox to version 1.29.0 in
d6aa506e3b there is now a new dependency
on libresolv.

This now throws a runtime error when executing ash, eg. whenever we do
something like this:

nix-build -E 'with import ./. {}; vmTools.runInLinuxVM hello'

The resulting error will be:

  .../ash: error while loading shared libraries: libresolv.so.2: cannot
           open shared object file: No such file or directory

I tried to override BusyBox with enableStatic, but that still requires
parts of glibc:

  Static linking against glibc, can't use --gc-sections
  Trying libraries: crypt m resolv
   Library crypt is not needed, excluding it
   Library m is needed, can't exclude it (yet)
   Library resolv is needed, can't exclude it (yet)
   Library m is needed, can't exclude it (yet)
   Library resolv is needed, can't exclude it (yet)
  Final link with: m resolv

In the long term maybe switching to a more minimal C library such as
musl would make more sense, but for now I just added libresolv.so to the
initrd which fixes the runtime error.

Signed-off-by: aszlig <aszlig@nix.build>
Cc: @edolstra, @rbvermaa
Signed-off-by: aszlig <aszlig@nix.build>
2018-07-18 03:02:55 +02:00
..
deb Add Debian 7.0 2013-05-07 11:19:46 +02:00
rpm vm/rpm/rpm-closure.pl: make it deterministic 2016-03-01 11:02:42 +01:00
windows lib, openssl: Get rid of openssl.system 2018-01-26 21:22:00 -05:00
default.nix vmTools: Fix BusyBox runtime error in initrd 2018-07-18 03:02:55 +02:00
test.nix Remove runInGenericVM 2013-07-05 00:17:04 +02:00