diff options
author | Eelco Dolstra <eelco.dolstra@logicblox.com> | 2009-01-16 10:59:27 +0000 |
---|---|---|
committer | Eelco Dolstra <eelco.dolstra@logicblox.com> | 2009-01-16 10:59:27 +0000 |
commit | c1579d2e78f76e7ad3b30cc2961fafe7b8a24a74 (patch) | |
tree | 904516c8b572724b240f93e7901d324caf12daa3 /pkgs/os-specific/linux/kvm | |
parent | 821de7706a4a44d919c95f0e990ac01840788c94 (diff) | |
parent | 4eedf7dae894a40f6c70cc80735f1500ded9bff3 (diff) | |
download | nixpkgs-c1579d2e78f76e7ad3b30cc2961fafe7b8a24a74.tar nixpkgs-c1579d2e78f76e7ad3b30cc2961fafe7b8a24a74.tar.gz nixpkgs-c1579d2e78f76e7ad3b30cc2961fafe7b8a24a74.tar.bz2 nixpkgs-c1579d2e78f76e7ad3b30cc2961fafe7b8a24a74.tar.lz nixpkgs-c1579d2e78f76e7ad3b30cc2961fafe7b8a24a74.tar.xz nixpkgs-c1579d2e78f76e7ad3b30cc2961fafe7b8a24a74.tar.zst nixpkgs-c1579d2e78f76e7ad3b30cc2961fafe7b8a24a74.zip |
* stdenv branch: synced with the trunk.
svn path=/nixpkgs/branches/stdenv-updates/; revision=13785
Diffstat (limited to 'pkgs/os-specific/linux/kvm')
-rw-r--r-- | pkgs/os-specific/linux/kvm/82.nix | 38 | ||||
-rw-r--r-- | pkgs/os-specific/linux/kvm/readonly-kernel-r3.patch | 14 | ||||
-rw-r--r-- | pkgs/os-specific/linux/kvm/smbd-path-r2.patch | 50 |
3 files changed, 102 insertions, 0 deletions
diff --git a/pkgs/os-specific/linux/kvm/82.nix b/pkgs/os-specific/linux/kvm/82.nix new file mode 100644 index 00000000000..eb5db5c5424 --- /dev/null +++ b/pkgs/os-specific/linux/kvm/82.nix @@ -0,0 +1,38 @@ +{stdenv, fetchurl, kernelHeaders, zlib, e2fsprogs, SDL, alsaLib, pkgconfig, rsync}: + +assert stdenv.isLinux; + +stdenv.mkDerivation { + name = "kvm-82"; + + src = fetchurl { + url = mirror://sourceforge/kvm/kvm-82.tar.gz; + sha256 = "1fk58g8z9v7z42vy76zq0sq28slqf8zszzmh73vyxm07vfbc96zs"; + }; + + 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/readonly-kernel-r3.patch b/pkgs/os-specific/linux/kvm/readonly-kernel-r3.patch new file mode 100644 index 00000000000..016ed12dc24 --- /dev/null +++ b/pkgs/os-specific/linux/kvm/readonly-kernel-r3.patch @@ -0,0 +1,14 @@ +diff -rc kvm-78-orig/kernel/Makefile kvm-78/kernel/Makefile +*** kvm-78-orig/kernel/Makefile 2008-10-30 11:58:12.000000000 +0100 +--- kvm-78/kernel/Makefile 2008-11-07 15:59:34.000000000 +0100 +*************** +*** 66,71 **** +--- 66,72 ---- + "$(LINUX)"/./include/linux/kvm*.h \ + $(if $(wildcard $(headers-old)), $(headers-old)) \ + $T/ ++ chmod -R u+w $T + $(if $(wildcard $(headers-new)), \ + rsync -R \ + $(headers-new) \ +Only in kvm-78/kernel: Makefile~ diff --git a/pkgs/os-specific/linux/kvm/smbd-path-r2.patch b/pkgs/os-specific/linux/kvm/smbd-path-r2.patch new file mode 100644 index 00000000000..191d4566569 --- /dev/null +++ b/pkgs/os-specific/linux/kvm/smbd-path-r2.patch @@ -0,0 +1,50 @@ +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 +*************** +*** 560,570 **** + slirp_init(); + } + +! /* XXX: better tmp dir construction */ +! snprintf(smb_dir, sizeof(smb_dir), "/tmp/qemu-smb.%d", 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(); + } + +! while (1) { +! snprintf(smb_dir, sizeof(smb_dir), "/tmp/qemu-smb.%d.%d", 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); +! exit(1); +! } + } + 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 +*************** +*** 99,105 **** + #ifdef __sun__ + #define SMBD_COMMAND "/usr/sfw/sbin/smbd" + #else +! #define SMBD_COMMAND "/usr/sbin/smbd" + #endif + + #endif +--- 99,105 ---- + #ifdef __sun__ + #define SMBD_COMMAND "/usr/sfw/sbin/smbd" + #else +! #define SMBD_COMMAND "smbd" + #endif + + #endif |