about summary refs log tree commit diff
diff options
context:
space:
mode:
authorOrivej Desh <orivej@gmx.fr>2017-11-12 18:09:34 +0000
committerGitHub <noreply@github.com>2017-11-12 18:09:34 +0000
commitf7bb8d2dfa6a1960f9a4b90e55ac7fce84fcc059 (patch)
tree5afc5ce29b932abf4f30a87a44c55ae1575c6c80
parentab1859e027ebdcdc6ff151fab188bfc3ed83739d (diff)
parenta84ce72fdc0ca45f7e8de93ad946091ad7f2afbc (diff)
downloadnixlib-f7bb8d2dfa6a1960f9a4b90e55ac7fce84fcc059.tar
nixlib-f7bb8d2dfa6a1960f9a4b90e55ac7fce84fcc059.tar.gz
nixlib-f7bb8d2dfa6a1960f9a4b90e55ac7fce84fcc059.tar.bz2
nixlib-f7bb8d2dfa6a1960f9a4b90e55ac7fce84fcc059.tar.lz
nixlib-f7bb8d2dfa6a1960f9a4b90e55ac7fce84fcc059.tar.xz
nixlib-f7bb8d2dfa6a1960f9a4b90e55ac7fce84fcc059.tar.zst
nixlib-f7bb8d2dfa6a1960f9a4b90e55ac7fce84fcc059.zip
Merge pull request #31537 from orivej/lkl
lkl: 2017-10-18 -> 2017-11-10, make-disk-image: do not fake time for cptofs 
-rw-r--r--nixos/lib/make-disk-image.nix23
-rw-r--r--pkgs/applications/virtualization/lkl/default.nix6
2 files changed, 11 insertions, 18 deletions
diff --git a/nixos/lib/make-disk-image.nix b/nixos/lib/make-disk-image.nix
index 865be297c066..9d1327d9c15a 100644
--- a/nixos/lib/make-disk-image.nix
+++ b/nixos/lib/make-disk-image.nix
@@ -33,7 +33,8 @@
 
 , name ? "nixos-disk-image"
 
-, format ? "raw"
+, # Disk image format, one of qcow2, vpc, raw.
+  format ? "raw"
 }:
 
 with lib;
@@ -45,7 +46,7 @@ let
     raw   = "img";
   };
 
-  nixpkgs = lib.cleanSource pkgs.path;
+  nixpkgs = cleanSource pkgs.path;
 
   channelSources = pkgs.runCommand "nixos-${config.system.nixosVersion}" {} ''
     mkdir -p $out
@@ -64,7 +65,7 @@ let
     ${channelSources}
   '';
 
-  prepareImageInputs = with pkgs; [ rsync utillinux parted e2fsprogs lkl fakeroot libfaketime config.system.build.nixos-prepare-root ] ++ stdenv.initialPath;
+  prepareImageInputs = with pkgs; [ rsync utillinux parted e2fsprogs lkl fakeroot config.system.build.nixos-prepare-root ] ++ stdenv.initialPath;
 
   # I'm preserving the line below because I'm going to search for it across nixpkgs to consolidate
   # image building logic. The comment right below this now appears in 4 different places in nixpkgs :)
@@ -73,7 +74,7 @@ let
   targets = map (x: x.target) contents;
 
   prepareImage = ''
-    export PATH=${pkgs.lib.makeSearchPathOutput "bin" "bin" prepareImageInputs}
+    export PATH=${makeSearchPathOutput "bin" "bin" prepareImageInputs}
 
     mkdir $out
     diskImage=nixos.raw
@@ -86,8 +87,8 @@ let
       offset=0
     ''}
 
-    faketime -f "1970-01-01 00:00:01" mkfs.${fsType} -F -L nixos -E offset=$offset $diskImage
-  
+    mkfs.${fsType} -F -L nixos -E offset=$offset $diskImage
+
     root="$PWD/root"
     mkdir -p $root
 
@@ -124,15 +125,7 @@ let
     fakeroot nixos-prepare-root $root ${channelSources} ${config.system.build.toplevel} closure
 
     echo "copying staging root to image..."
-    # If we don't faketime, we can end up with timestamps other than 1 on the nix store, which
-    # will confuse Nix in some situations (e.g., breaking image builds in the target image)
-    # N.B: I use 0 here, which results in timestamp = 1 in the image. It's weird but see
-    # https://github.com/lkl/linux/issues/393. Also, running under faketime makes `cptofs` super
-    # noisy and it prints out that it can't find a bunch of files, and then works anyway. We'll
-    # shut it up someday but trying to do a stderr filter through grep is running into some nasty
-    # bug in some eval nonsense we have in runInLinuxVM and I'm sick of trying to fix it.
-    faketime -f "1970-01-01 00:00:00" \
-      cptofs ${pkgs.lib.optionalString partitioned "-P 1"} -t ${fsType} -i $diskImage $root/* /
+    cptofs ${pkgs.lib.optionalString partitioned "-P 1"} -t ${fsType} -i $diskImage $root/* /
   '';
 in pkgs.vmTools.runInLinuxVM (
   pkgs.runCommand name
diff --git a/pkgs/applications/virtualization/lkl/default.nix b/pkgs/applications/virtualization/lkl/default.nix
index c62fa63ea594..9ca73747c459 100644
--- a/pkgs/applications/virtualization/lkl/default.nix
+++ b/pkgs/applications/virtualization/lkl/default.nix
@@ -1,8 +1,8 @@
 { stdenv, fetchFromGitHub, bc, python, fuse, libarchive }:
 
 stdenv.mkDerivation rec {
-  name = "lkl-2017-10-18";
-  rev  = "bfb315c4612c38427e3239d0a427a125d9ba0ede";
+  name = "lkl-2017-11-10";
+  rev  = "52a6a643c7d1dd3031c0cbec75e1ac7a999f3d57";
 
   outputs = [ "dev" "lib" "out" ];
 
@@ -14,7 +14,7 @@ stdenv.mkDerivation rec {
     inherit rev;
     owner  = "lkl";
     repo   = "linux";
-    sha256 = "172ccn2gsybnji7giiqq63bvp9nsw8kri88pjlvinwpwsv7x81aa";
+    sha256 = "1i5ywrfxqpykjjalwh9g4rwd4s186cqk3j806d327a67xb2ivxnp";
   };
 
   # Fix a /usr/bin/env reference in here that breaks sandboxed builds