aboutsummaryrefslogtreecommitdiffstats
path: root/packages/nbd
diff options
context:
space:
mode:
authorHolger Freyther <zecke@selfish.org>2006-05-25 20:20:55 +0000
committerOpenEmbedded Project <openembedded-devel@lists.openembedded.org>2006-05-25 20:20:55 +0000
commite012f96a0454b7efc53b4063c8473d3cd625a986 (patch)
tree49d0fea59b73a5a5de81de05438d037d51e59c63 /packages/nbd
parent50076d5bd9edd61236ce44e5ce13dd269f2f7a52 (diff)
downloadopenembedded-e012f96a0454b7efc53b4063c8473d3cd625a986.tar.gz
packages/nbd/: Add Network Block Device Client and Server version 2.8.4
Add client and server of the Network Block Device. This is version 2.8.4, it does not have the security issue a unpatched 2.8.3 has. We package nbd-client and nbd-server separately and for the nbd-client we currently do not have a start script. So on each start the nbd-client needs to be started separately.
Diffstat (limited to 'packages/nbd')
-rw-r--r--packages/nbd/.mtn2git_empty0
-rw-r--r--packages/nbd/files/.mtn2git_empty0
-rw-r--r--packages/nbd/files/cross-compile.patch61
-rw-r--r--packages/nbd/nbd_2.8.4.bb20
4 files changed, 81 insertions, 0 deletions
diff --git a/packages/nbd/.mtn2git_empty b/packages/nbd/.mtn2git_empty
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/packages/nbd/.mtn2git_empty
diff --git a/packages/nbd/files/.mtn2git_empty b/packages/nbd/files/.mtn2git_empty
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/packages/nbd/files/.mtn2git_empty
diff --git a/packages/nbd/files/cross-compile.patch b/packages/nbd/files/cross-compile.patch
new file mode 100644
index 0000000000..654a3d7a48
--- /dev/null
+++ b/packages/nbd/files/cross-compile.patch
@@ -0,0 +1,61 @@
+Cross Compile fixes:
+ The sanitized kernel headers use __u32 and __u64
+ let us define those.
+
+
+Index: nbd-2.8.4/configure.ac
+===================================================================
+--- nbd-2.8.4.orig/configure.ac 2006-02-26 15:52:03.000000000 +0100
++++ nbd-2.8.4/configure.ac 2006-05-25 21:35:26.000000000 +0200
+@@ -68,7 +68,8 @@
+ man8_MANS=nbd-client.8
+ AC_MSG_RESULT(yes)
+ ;;
+- *) AC_MSG_RESULT(no) ;;
++ dnl uname is a pretty stupid idea... we could be on freeBSD,OS X...
++ *) AC_MSG_RESULT(yes) ;;
+ esac
+ AC_MSG_CHECKING(where to find a working nbd.h)
+ dnl We need to check for NBD_CMD_DISC, but that's part of an enum, it is not
+@@ -82,8 +83,8 @@
+ [int foo=NBD_CMD_DISC],
+ [AC_DEFINE(NBD_H_LOCAL, 1, Set to 1 if a (kernel 2.6) nbd.h can be found in the current directory)
+ NBD_H='"nbd.h"'],
+- AC_TRY_COMPILE([#define u32 int
+-#define u64 int
++ AC_TRY_COMPILE([#define __u32 int
++#define __u64 int
+ #include <linux/nbd.h>
+ ],
+ [int foo=NBD_CMD_DISC],
+Index: nbd-2.8.4/cliserv.h
+===================================================================
+--- nbd-2.8.4.orig/cliserv.h 2006-01-06 18:02:03.000000000 +0100
++++ nbd-2.8.4/cliserv.h 2006-05-25 21:41:25.000000000 +0200
+@@ -17,20 +17,26 @@
+
+ #if SIZEOF_UNSIGNED_SHORT_INT==4
+ typedef unsigned short u32;
++typedef unsigned short __u32;
+ #elif SIZEOF_UNSIGNED_INT==4
+ typedef unsigned int u32;
++typedef unsigned int __u32;
+ #elif SIZEOF_UNSIGNED_LONG_INT==4
+ typedef unsigned long u32;
++typedef unsigned long __u32;
+ #else
+ #error I need at least some 32-bit type
+ #endif
+
+ #if SIZEOF_UNSIGNED_INT==8
+ typedef unsigned int u64;
++typedef unsigned int __u64;
+ #elif SIZEOF_UNSIGNED_LONG_INT==8
+ typedef unsigned long u64;
++typedef unsigned long __u64;
+ #elif SIZEOF_UNSIGNED_LONG_LONG_INT==8
+ typedef unsigned long long u64;
++typedef unsigned long long __u64;
+ #else
+ #error I need at least some 64-bit type
+ #endif
diff --git a/packages/nbd/nbd_2.8.4.bb b/packages/nbd/nbd_2.8.4.bb
new file mode 100644
index 0000000000..49eda970b0
--- /dev/null
+++ b/packages/nbd/nbd_2.8.4.bb
@@ -0,0 +1,20 @@
+DESCRIPTION = "Network Block Device"
+LICENSE = "GPLv2"
+HOMEPAGE = "http://nbd.sourceforge.net"
+MAINTAINER = "Holger Freyther <freyther@handhelds.org>"
+
+DEPENDS = "glib-2.0"
+
+SRC_URI = "${SOURCEFORGE_MIRROR}/${PN}/${PN}-${PV}.tar.bz2;md5sum=1b5a0866d025b98d1c24fe19a4f628c3 \
+ file://cross-compile.patch;patch=1 "
+
+inherit autotools
+
+
+PACKAGES = "nbd-client nbd-server"
+PACKAGES += "nbd-client-doc nbd-server-doc"
+
+FILES_nbd-client = "/usr/sbin/nbd-client"
+FILES_nbd-server = "/usr/bin/nbd-server"
+FILES_nbd-client-doc = "/usr/share/man/man8/*"
+FILES_nbd-server-doc = "/usr/share/man/man1/*"