diff --git a/pkgs/os-specific/linux/kvm/84.nix b/pkgs/os-specific/linux/kvm/84.nix deleted file mode 100644 index a1830e4c203a..000000000000 --- a/pkgs/os-specific/linux/kvm/84.nix +++ /dev/null @@ -1,38 +0,0 @@ -{stdenv, fetchurl, kernelHeaders, zlib, e2fsprogs, SDL, alsaLib, pkgconfig, rsync}: - -assert stdenv.isLinux; - -stdenv.mkDerivation rec { - name = "kvm-84"; - - src = fetchurl { - url = "mirror://sourceforge/kvm/${name}.tar.gz"; - sha256 = "13lqhy4lpxqby7qj3l1cdbj73c7jmvkq73bc5wchwn0l0dkjsjlk"; - }; - - patches = [ - # Allow setting the path to Samba through $QEMU_SMBD_COMMAND. - ./smbd-path-r2.patch - # The makefile copies stuff from the kernel directory and then - # tries to modify the copy, but it must be made writable first. - ./readonly-kernel-r3.patch - ]; - - configureFlags = "--with-patched-kernel --kerneldir=${kernelHeaders}"; - - # e2fsprogs is needed for libuuid. - # rsync is a weird dependency used for copying kernel header files. - buildInputs = [zlib e2fsprogs SDL alsaLib pkgconfig rsync]; - - preConfigure = '' - for i in configure user/configure; do - substituteInPlace $i --replace /bin/bash $shell - done - substituteInPlace libkvm/Makefile --replace kvm_para.h kvm.h # !!! quick hack - ''; - - meta = { - homepage = http://kvm.qumranet.com/; - description = "A full virtualization solution for Linux on x86 hardware containing virtualization extensions"; - }; -} diff --git a/pkgs/os-specific/linux/kvm/86.nix b/pkgs/os-specific/linux/kvm/86.nix new file mode 100644 index 000000000000..46069a409413 --- /dev/null +++ b/pkgs/os-specific/linux/kvm/86.nix @@ -0,0 +1,39 @@ +{stdenv, fetchurl, kernelHeaders, zlib, SDL, alsaLib, pkgconfig, pciutils}: + +assert stdenv.isLinux; + +stdenv.mkDerivation rec { + name = "kvm-86"; + + src = fetchurl { + url = "mirror://sourceforge/kvm/${name}.tar.gz"; + sha256 = "17fq2dyd0qla0yiddyiqvb8kz3sfy6dhy9fi9y7xcbhs26s0wxax"; + }; + + patches = [ + # Allow setting the path to Samba through $QEMU_SMBD_COMMAND. + ./smbd-path-r3.patch + ]; + + configureFlags = "--enable-io-thread"; + + # e2fsprogs is needed for libuuid. + # rsync is a weird dependency used for copying kernel header files. + buildInputs = [zlib SDL alsaLib pkgconfig pciutils]; + + preConfigure = '' + for i in configure kvm/configure kvm/user/configure; do + substituteInPlace $i --replace /bin/bash $shell + done + + substituteInPlace kvm/libkvm/Makefile --replace kvm_para.h kvm.h # !!! quick hack + + # This prevents the kernel module from being built. + rm kvm/kernel/configure + ''; + + meta = { + homepage = http://kvm.qumranet.com/; + description = "A full virtualization solution for Linux on x86 hardware containing virtualization extensions"; + }; +} diff --git a/pkgs/os-specific/linux/kvm/readonly-kernel.patch b/pkgs/os-specific/linux/kvm/readonly-kernel.patch deleted file mode 100644 index 54e9225d101e..000000000000 --- a/pkgs/os-specific/linux/kvm/readonly-kernel.patch +++ /dev/null @@ -1,14 +0,0 @@ -diff -rc kvm-69-orig/kernel/Makefile kvm-69/kernel/Makefile -*** kvm-69-orig/kernel/Makefile 2008-05-12 13:30:43.000000000 +0200 ---- kvm-69/kernel/Makefile 2008-06-04 17:23:34.000000000 +0200 -*************** -*** 48,53 **** ---- 48,54 ---- - "$(LINUX)"/./include/linux/kvm*.h \ - "$(LINUX)"/./include/asm-*/kvm*.h \ - $T/ -+ chmod -R u+w $T - - set -e && for i in $(find $T -name '*.h'); do \ - $(call unifdef,$$i); done -Only in kvm-69/kernel: Makefile~ diff --git a/pkgs/os-specific/linux/kvm/smbd-path-r2.patch b/pkgs/os-specific/linux/kvm/smbd-path-r3.patch similarity index 58% rename from pkgs/os-specific/linux/kvm/smbd-path-r2.patch rename to pkgs/os-specific/linux/kvm/smbd-path-r3.patch index 191d45665699..32099ad69307 100644 --- a/pkgs/os-specific/linux/kvm/smbd-path-r2.patch +++ b/pkgs/os-specific/linux/kvm/smbd-path-r3.patch @@ -1,25 +1,25 @@ -diff -rc kvm-82-orig/qemu/net.c kvm-82/qemu/net.c -*** kvm-82-orig/qemu/net.c 2008-12-24 15:24:58.000000000 +0100 ---- kvm-82/qemu/net.c 2009-01-13 12:59:15.000000000 +0100 +diff -rc kvm-86/net.c kvm-86-new/net.c +*** kvm-86/net.c 2009-05-19 18:29:02.000000000 +0200 +--- kvm-86-new/net.c 2009-06-02 17:41:15.000000000 +0200 *************** -*** 560,570 **** - slirp_init(); +*** 684,694 **** + slirp_init(slirp_restrict, slirp_ip); } ! /* XXX: better tmp dir construction */ -! snprintf(smb_dir, sizeof(smb_dir), "/tmp/qemu-smb.%d", getpid()); +! snprintf(smb_dir, sizeof(smb_dir), "/tmp/qemu-smb.%ld", (long)getpid()); ! if (mkdir(smb_dir, 0700) < 0) { ! fprintf(stderr, "qemu: could not create samba server dir '%s'\n", smb_dir); ! exit(1); } snprintf(smb_conf, sizeof(smb_conf), "%s/%s", smb_dir, "smb.conf"); ---- 560,572 ---- - slirp_init(); +--- 684,696 ---- + slirp_init(slirp_restrict, slirp_ip); } ! while (1) { -! snprintf(smb_dir, sizeof(smb_dir), "/tmp/qemu-smb.%d.%d", getpid(), random()); +! snprintf(smb_dir, sizeof(smb_dir), "/tmp/qemu-smb.%ld.%d", (long) getpid(), random()); ! if (mkdir(smb_dir, 0700) == 0) break; ! if (errno != EEXIST) { ! fprintf(stderr, "qemu: could not create samba server dir '%s'\n", smb_dir); @@ -28,11 +28,11 @@ diff -rc kvm-82-orig/qemu/net.c kvm-82/qemu/net.c } snprintf(smb_conf, sizeof(smb_conf), "%s/%s", smb_dir, "smb.conf"); -diff -rc kvm-82-orig/qemu/net.h kvm-82/qemu/net.h -*** kvm-82-orig/qemu/net.h 2008-12-24 15:24:58.000000000 +0100 ---- kvm-82/qemu/net.h 2009-01-13 12:58:28.000000000 +0100 +diff -rc kvm-86/net.h kvm-86-new/net.h +*** kvm-86/net.h 2009-05-19 18:29:02.000000000 +0200 +--- kvm-86-new/net.h 2009-06-02 17:39:17.000000000 +0200 *************** -*** 99,105 **** +*** 129,135 **** #ifdef __sun__ #define SMBD_COMMAND "/usr/sfw/sbin/smbd" #else @@ -40,7 +40,7 @@ diff -rc kvm-82-orig/qemu/net.h kvm-82/qemu/net.h #endif #endif ---- 99,105 ---- +--- 129,135 ---- #ifdef __sun__ #define SMBD_COMMAND "/usr/sfw/sbin/smbd" #else diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 72c136ff40db..00ac6c7febd0 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -5192,8 +5192,8 @@ let inherit (glibc) kernelHeaders; }; - kvm84 = import ../os-specific/linux/kvm/84.nix { - inherit fetchurl stdenv zlib e2fsprogs SDL alsaLib pkgconfig rsync; + kvm86 = import ../os-specific/linux/kvm/86.nix { + inherit fetchurl stdenv zlib SDL alsaLib pkgconfig pciutils; inherit (glibc) kernelHeaders; };