Revert "qemu-kvm: update to 1.1.0"
This reverts commit df645c22cc
.
KVM 1.1.0 breaks several VM builds. The NixOS installer tests hang:
http://hydra.nixos.org/build/2763935
but worse, some builds give random failures indicating corruption:
http://hydra.nixos.org/build/2776221
http://hydra.nixos.org/build/2776180
http://hydra.nixos.org/build/2769347
http://hydra.nixos.org/build/2769337
This commit is contained in:
parent
ac1081fb48
commit
9abd2194ce
|
@ -3,20 +3,20 @@
|
||||||
|
|
||||||
assert stdenv.isLinux;
|
assert stdenv.isLinux;
|
||||||
|
|
||||||
let version = "1.1.0"; in
|
let version = "1.0.1"; in
|
||||||
|
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation rec {
|
||||||
name = "qemu-kvm-${version}";
|
name = "qemu-kvm-${version}";
|
||||||
|
|
||||||
src = fetchurl {
|
src = fetchurl {
|
||||||
url = "mirror://sourceforge/kvm/qemu-kvm/${version}/${name}.tar.gz";
|
url = "mirror://sourceforge/kvm/qemu-kvm/${version}/${name}.tar.gz";
|
||||||
sha256 = "1gzch3yshq7yirc5k3cn0m3ibd6qbl2hvl1lbh7lychfc7s4a963";
|
sha256 = "0kxzwaw8h71mqcm46angpyx8gd58ascrxnr861k068xg89ix5g2p";
|
||||||
};
|
};
|
||||||
|
|
||||||
patches = [ ./smb-tmpdir.patch ];
|
patches = [ ./smb-tmpdir.patch ./qemu-img-fix-corrupt-vdi.patch ];
|
||||||
|
|
||||||
postPatch =
|
postPatch =
|
||||||
'' for i in $(find . -type f)
|
'' for i in $(find kvm -type f)
|
||||||
do
|
do
|
||||||
sed -i "$i" \
|
sed -i "$i" \
|
||||||
-e 's|/bin/bash|/bin/sh|g ;
|
-e 's|/bin/bash|/bin/sh|g ;
|
||||||
|
|
|
@ -0,0 +1,27 @@
|
||||||
|
From http://patchwork.ozlabs.org/patch/137186/
|
||||||
|
|
||||||
|
diff -ru qemu-kvm-0.15.1-orig/block/vdi.c qemu-kvm-0.15.1/block/vdi.c
|
||||||
|
--- qemu-kvm-0.15.1-orig/block/vdi.c 2011-10-19 15:54:48.000000000 +0200
|
||||||
|
+++ qemu-kvm-0.15.1/block/vdi.c 2012-02-25 18:15:36.114574574 +0100
|
||||||
|
@@ -1,7 +1,7 @@
|
||||||
|
/*
|
||||||
|
* Block driver for the Virtual Disk Image (VDI) format
|
||||||
|
*
|
||||||
|
- * Copyright (c) 2009 Stefan Weil
|
||||||
|
+ * Copyright (c) 2009, 2012 Stefan Weil
|
||||||
|
*
|
||||||
|
* This program is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
@@ -767,8 +767,12 @@
|
||||||
|
acb->header_modified = 1;
|
||||||
|
}
|
||||||
|
acb->bmap_last = block_index;
|
||||||
|
+ /* Copy data to be written to new block and zero unused parts. */
|
||||||
|
+ memset(block, 0, sector_in_block * SECTOR_SIZE);
|
||||||
|
memcpy(block + sector_in_block * SECTOR_SIZE,
|
||||||
|
acb->buf, n_sectors * SECTOR_SIZE);
|
||||||
|
+ memset(block + (sector_in_block + n_sectors) * SECTOR_SIZE, 0,
|
||||||
|
+ (s->block_sectors - n_sectors - sector_in_block) * SECTOR_SIZE);
|
||||||
|
acb->hd_iov.iov_base = (void *)block;
|
||||||
|
acb->hd_iov.iov_len = s->block_size;
|
||||||
|
qemu_iovec_init_external(&acb->hd_qiov, &acb->hd_iov, 1);
|
Loading…
Reference in New Issue