From 2a8e532e0a1aa15d523872f8828fe0ef0d7d8f13 Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Tue, 25 Sep 2012 17:30:43 -0400 Subject: [PATCH] qemu-kvm: Update to 1.2.0 This time it will work for sure! --- pkgs/os-specific/linux/qemu-kvm/default.nix | 8 ++--- .../qemu-kvm/qemu-img-fix-corrupt-vdi.patch | 27 --------------- .../linux/qemu-kvm/smb-tmpdir.patch | 33 ------------------- 3 files changed, 3 insertions(+), 65 deletions(-) delete mode 100644 pkgs/os-specific/linux/qemu-kvm/qemu-img-fix-corrupt-vdi.patch delete mode 100644 pkgs/os-specific/linux/qemu-kvm/smb-tmpdir.patch diff --git a/pkgs/os-specific/linux/qemu-kvm/default.nix b/pkgs/os-specific/linux/qemu-kvm/default.nix index 032a35ece263..9223b7af917c 100644 --- a/pkgs/os-specific/linux/qemu-kvm/default.nix +++ b/pkgs/os-specific/linux/qemu-kvm/default.nix @@ -4,20 +4,18 @@ assert stdenv.isLinux; -let version = "1.0.1"; in +let version = "1.2.0"; in stdenv.mkDerivation rec { name = "qemu-kvm-${version}"; src = fetchurl { url = "mirror://sourceforge/kvm/qemu-kvm/${version}/${name}.tar.gz"; - sha256 = "0kxzwaw8h71mqcm46angpyx8gd58ascrxnr861k068xg89ix5g2p"; + sha256 = "018vb5nmk2fsm143bs2bl2wirhasd4b10d7jchl32zik4inbk2p9"; }; - patches = [ ./smb-tmpdir.patch ./qemu-img-fix-corrupt-vdi.patch ]; - postPatch = - '' for i in $(find kvm -type f) + '' for i in $(find . -type f) do sed -i "$i" \ -e 's|/bin/bash|/bin/sh|g ; diff --git a/pkgs/os-specific/linux/qemu-kvm/qemu-img-fix-corrupt-vdi.patch b/pkgs/os-specific/linux/qemu-kvm/qemu-img-fix-corrupt-vdi.patch deleted file mode 100644 index 446a69a146b0..000000000000 --- a/pkgs/os-specific/linux/qemu-kvm/qemu-img-fix-corrupt-vdi.patch +++ /dev/null @@ -1,27 +0,0 @@ -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); diff --git a/pkgs/os-specific/linux/qemu-kvm/smb-tmpdir.patch b/pkgs/os-specific/linux/qemu-kvm/smb-tmpdir.patch deleted file mode 100644 index 6d6c7831d15e..000000000000 --- a/pkgs/os-specific/linux/qemu-kvm/smb-tmpdir.patch +++ /dev/null @@ -1,33 +0,0 @@ -Honour $TMPDIR for the qemu-smb temporary directory. - -diff -rc -x '*~' qemu-kvm-0.12.2-orig/net/slirp.c qemu-kvm-0.12.2/net/slirp.c -*** qemu-kvm-0.12.2-orig/net/slirp.c 2010-02-01 19:05:24.000000000 +0100 ---- qemu-kvm-0.12.2/net/slirp.c 2010-02-01 19:05:54.000000000 +0100 -*************** -*** 476,486 **** - struct in_addr vserver_addr) - { - static int instance; -! char smb_conf[128]; -! char smb_cmdline[128]; - FILE *f; - -! snprintf(s->smb_dir, sizeof(s->smb_dir), "/tmp/qemu-smb.%ld-%d", - (long)getpid(), instance++); - if (mkdir(s->smb_dir, 0700) < 0) { - qemu_error("could not create samba server dir '%s'\n", s->smb_dir); ---- 476,489 ---- - struct in_addr vserver_addr) - { - static int instance; -! char smb_conf[1024]; -! char smb_cmdline[1024]; - FILE *f; - -! char *tmpdir = getenv("TMPDIR"); -! -! snprintf(s->smb_dir, sizeof(s->smb_dir), "%s/qemu-smb.%ld-%d", -! tmpdir ? tmpdir : "/tmp", - (long)getpid(), instance++); - if (mkdir(s->smb_dir, 0700) < 0) { - qemu_error("could not create samba server dir '%s'\n", s->smb_dir);