From a33d2f3adc3b63220aed240f29a03c685ef23cd4 Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Fri, 8 Aug 2008 19:07:07 +0000 Subject: [PATCH] * Use a klibc-based udev. Hopefully this fixes the problems encountered on x86-64 when udev is compiled against dietlibc. svn path=/nixos/trunk/; revision=12555 --- boot/boot-stage-1.nix | 16 ++++++++++++---- system/system.nix | 5 +++++ 2 files changed, 17 insertions(+), 4 deletions(-) diff --git a/boot/boot-stage-1.nix b/boot/boot-stage-1.nix index fd87e5246d3..b97de3c4e95 100644 --- a/boot/boot-stage-1.nix +++ b/boot/boot-stage-1.nix @@ -13,6 +13,11 @@ rec { bootStdenv = pkgs.useDietLibC pkgs.stdenv; }; + pkgsKlibc = import "${nixpkgsPath}/pkgs/top-level/all-packages.nix" { + system = pkgs.stdenv.system; + bootStdenv = pkgs.useKlibc pkgs.stdenv kernelPackages.klibc; + }; + pkgsStatic = import "${nixpkgsPath}/pkgs/top-level/all-packages.nix" { system = pkgs.stdenv.system; bootStdenv = pkgs.makeStaticBinaries pkgs.stdenv; @@ -40,10 +45,10 @@ rec { extraUtils = pkgs.runCommand "extra-utils" { buildInputs = [pkgs.nukeReferences]; inherit (pkgsStatic) utillinux; - inherit (pkgsDiet) udev; - e2fsprogs = pkgs.e2fsprogsDiet; - devicemapper = if config.boot.initrd.lvm then pkgs.devicemapperStatic else null; - lvm2 = if config.boot.initrd.lvm then pkgs.lvm2Static else null; + inherit (pkgsKlibc) udev; + e2fsprogs = pkgsDiet.e2fsprogs; + devicemapper = if config.boot.initrd.lvm then pkgsStatic.devicemapper else null; + lvm2 = if config.boot.initrd.lvm then pkgsStatic.lvm2 else null; allowedReferences = []; # prevent accidents like glibc being included in the initrd } '' @@ -92,6 +97,9 @@ rec { rootLabel = if config.boot.autoDetectRootDevice then config.boot.rootLabel else ""; path = [ + # `extraUtils' comes first because it overrides the `mount' + # command provided by klibc (which isn't capable of + # auto-detecting FS types). extraUtils kernelPackages.klibcShrunk ]; diff --git a/system/system.nix b/system/system.nix index 8a3f962b396..5f957b7634a 100644 --- a/system/system.nix +++ b/system/system.nix @@ -4,6 +4,7 @@ }: rec { + configComponents = [ configuration (import ./options.nix) @@ -118,6 +119,7 @@ rec { extraEtc = pkgs.lib.concatLists (map (job: job.extraEtc) upstartJobs.jobs); }; + # Font aggregation fontDir = import ./fontdir.nix { inherit config pkgs; @@ -125,6 +127,7 @@ rec { inherit (pkgs.xorg) mkfontdir mkfontscale fontalias; }; + # The wrapper setuid programs (since we can't have setuid programs # in the Nix store). wrapperDir = "/var/setuid-wrappers"; @@ -227,6 +230,7 @@ rec { # a reboot. ++ nssModules; + # We don't want to put all of `startPath' and `path' in $PATH, since # then we get an embarrassingly long $PATH. So use the user # environment builder to make a directory with symlinks to those @@ -358,4 +362,5 @@ rec { configurationName = config.boot.configurationName; }) config.environment.checkConfigurationOptions optionDeclarations config; + }