From a62fa4480adcc41d421fd1dc5a0471ce2469c1f7 Mon Sep 17 00:00:00 2001 From: Peter Simons Date: Tue, 7 Feb 2012 19:54:25 +0000 Subject: [PATCH] nbd: updated to version 2.9.25 svn path=/nixpkgs/trunk/; revision=32125 --- ...or-HAVE_FALLOC_PH-in-both-occurrence.patch | 25 +++++++++++++++++++ pkgs/tools/networking/nbd/default.nix | 8 +++--- 2 files changed, 30 insertions(+), 3 deletions(-) create mode 100644 pkgs/tools/networking/nbd/0001-properly-check-for-HAVE_FALLOC_PH-in-both-occurrence.patch diff --git a/pkgs/tools/networking/nbd/0001-properly-check-for-HAVE_FALLOC_PH-in-both-occurrence.patch b/pkgs/tools/networking/nbd/0001-properly-check-for-HAVE_FALLOC_PH-in-both-occurrence.patch new file mode 100644 index 000000000000..e4bb0db3abf8 --- /dev/null +++ b/pkgs/tools/networking/nbd/0001-properly-check-for-HAVE_FALLOC_PH-in-both-occurrence.patch @@ -0,0 +1,25 @@ +From 42d3c4e7e95ea0e0dda9b502b2de2c4ed9ed9467 Mon Sep 17 00:00:00 2001 +From: "T.M. Abraham" +Date: Fri, 6 Jan 2012 21:58:55 -0500 +Subject: [PATCH] properly check for HAVE_FALLOC_PH in both occurrences + +--- + nbd-server.c | 2 +- + 1 files changed, 1 insertions(+), 1 deletions(-) + +diff --git a/nbd-server.c b/nbd-server.c +index 0ecf0e8..2cd066d 100644 +--- a/nbd-server.c ++++ b/nbd-server.c +@@ -1461,7 +1461,7 @@ int expflush(CLIENT *client) { + * file to resparsify stuff that isn't needed anymore (see NBD_CMD_TRIM) + */ + int exptrim(struct nbd_request* req, CLIENT* client) { +-#ifdef HAVE_FALLOC_PH ++#if HAVE_FALLOC_PH + FILE_INFO prev = g_array_index(client->export, FILE_INFO, 0); + FILE_INFO cur = prev; + int i = 1; +-- +1.7.8 + diff --git a/pkgs/tools/networking/nbd/default.nix b/pkgs/tools/networking/nbd/default.nix index ef032eee390e..60eea0e2d9e0 100644 --- a/pkgs/tools/networking/nbd/default.nix +++ b/pkgs/tools/networking/nbd/default.nix @@ -1,19 +1,21 @@ { stdenv, fetchurl, pkgconfig, glib }: let - name = "nbd-2.9.24"; + name = "nbd-2.9.25"; in stdenv.mkDerivation { inherit name; src = fetchurl { url = "mirror://sourceforge/nbd/${name}.tar.bz2"; - sha256 = "025cqsx6cwbr62javdvm5vx675ai0b1absbx4if1v5pp9hzrpxmq"; + sha256 = "179548406aa2bcb0c6bff3aa0484dbb04136ec055aa385c84fefbe3c9ea96ba4"; }; - buildInputs = [pkgconfig glib]; + buildInputs = [ pkgconfig glib ] ++ stdenv.lib.optional stdenv.isLinux stdenv.glibc.kernelHeaders; postInstall = ''install -D -m 444 README "$out/share/doc/nbd/README"''; + patches = [ ./0001-properly-check-for-HAVE_FALLOC_PH-in-both-occurrence.patch ]; + # The test suite doesn't succeed on Hydra (NixOS), because it assumes # that certain global configuration files available. doCheck = false;