summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--meta/recipes-connectivity/nfs-ganesha/nfs-ganesha/module.patch26
-rw-r--r--meta/recipes-connectivity/nfs-ganesha/nfs-ganesha/uninit.patch32
-rw-r--r--meta/recipes-connectivity/nfs-ganesha/nfs-ganesha_2.7.0.bb34
3 files changed, 92 insertions, 0 deletions
diff --git a/meta/recipes-connectivity/nfs-ganesha/nfs-ganesha/module.patch b/meta/recipes-connectivity/nfs-ganesha/nfs-ganesha/module.patch
new file mode 100644
index 00000000000..9ccbafc5107
--- /dev/null
+++ b/meta/recipes-connectivity/nfs-ganesha/nfs-ganesha/module.patch
@@ -0,0 +1,26 @@
+Upstream-Status: Submitted [https://github.com/nfs-ganesha/nfs-ganesha/pull/354]
+Signed-off-by: Ross Burton <ross.burton@intel.com>
+
+From 5e2fafdb827b949c80a7d89f1aa5dc1d6bcdcc6d Mon Sep 17 00:00:00 2001
+From: Ross Burton <ross@burtonini.com>
+Date: Fri, 5 Oct 2018 15:12:46 +0100
+Subject: [PATCH] Install fsalmem as a module
+
+This isn't a shared library, it's a module.
+---
+ src/FSAL/FSAL_MEM/CMakeLists.txt | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/FSAL/FSAL_MEM/CMakeLists.txt b/src/FSAL/FSAL_MEM/CMakeLists.txt
+index 6701f0a5d..058bc5a5d 100644
+--- a/src/FSAL/FSAL_MEM/CMakeLists.txt
++++ b/src/FSAL/FSAL_MEM/CMakeLists.txt
+@@ -15,7 +15,7 @@ SET(fsalmem_LIB_SRCS
+ mem_up.c
+ )
+
+-add_library(fsalmem SHARED ${fsalmem_LIB_SRCS})
++add_library(fsalmem MODULE ${fsalmem_LIB_SRCS})
+ add_sanitizers(fsalmem)
+
+ target_link_libraries(fsalmem ${SYSTEM_LIBRARIES} ${LTTNG_LIBRARIES})
diff --git a/meta/recipes-connectivity/nfs-ganesha/nfs-ganesha/uninit.patch b/meta/recipes-connectivity/nfs-ganesha/nfs-ganesha/uninit.patch
new file mode 100644
index 00000000000..3cdc2379210
--- /dev/null
+++ b/meta/recipes-connectivity/nfs-ganesha/nfs-ganesha/uninit.patch
@@ -0,0 +1,32 @@
+Fix some uninitialized value errors.
+
+Upstream-Status: Submitted [https://github.com/nfs-ganesha/nfs-ganesha/issues/355]
+Signed-off-by: Ross Burton <ross.burton@intel.com>
+---
+ src/Protocols/NFS/nfs_proto_tools.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/Protocols/NFS/nfs_proto_tools.c b/src/Protocols/NFS/nfs_proto_tools.c
+index 4a4e0529d..3d9bb3f5e 100644
+--- a/src/Protocols/NFS/nfs_proto_tools.c
++++ b/src/Protocols/NFS/nfs_proto_tools.c
+@@ -514,7 +514,7 @@ static fattr_xdr_result encode_change(XDR *xdr, struct xdr_attrs_args *args)
+
+ static fattr_xdr_result decode_change(XDR *xdr, struct xdr_attrs_args *args)
+ {
+- uint64_t change;
++ uint64_t change = 0;
+
+ if (!xdr_u_int64_t(xdr, &change))
+ return FATTR_XDR_FAILED;
+--- a/src/FSAL/FSAL_PROXY/handle.c
++++ b/src/FSAL/FSAL_PROXY/handle.c
+@@ -1364,7 +1364,7 @@ static fsal_status_t pxy_lookup_impl(struct fsal_obj_handle *parent,
+ int rc;
+ uint32_t opcnt = 0;
+ GETATTR4resok *atok;
+- GETATTR4resok *atok_per_file_system_attr;
++ GETATTR4resok *atok_per_file_system_attr = NULL;
+ GETFH4resok *fhok;
+ sessionid4 sid;
+ /* SEQUENCE PUTROOTFH/PUTFH LOOKUP GETFH GETATTR (GETATTR) */
diff --git a/meta/recipes-connectivity/nfs-ganesha/nfs-ganesha_2.7.0.bb b/meta/recipes-connectivity/nfs-ganesha/nfs-ganesha_2.7.0.bb
new file mode 100644
index 00000000000..92063035a1e
--- /dev/null
+++ b/meta/recipes-connectivity/nfs-ganesha/nfs-ganesha_2.7.0.bb
@@ -0,0 +1,34 @@
+# TODO: review licenses
+LICENSE = "LGPLv3 & Unknown"
+LIC_FILES_CHKSUM = "file://src/LICENSE.txt;md5=e6a600fd5e1d9cbde2d983680233ad02 \
+ file://src/cidr/LICENSE;md5=ab952b9c4b37753b18d79f305e8d8593"
+
+SRC_URI = "https://download.nfs-ganesha.org/2.7/${PV}/${BPN}-${PV}.tar.gz \
+ file://module.patch \
+ file://uninit.patch"
+SRC_URI[md5sum] = "816af386ae38626a06c5ddb06a092fc8"
+SRC_URI[sha256sum] = "a458bd461049e4800bad24a2fd01335de6020f46ee495d5b2621eb3270097bca"
+
+DEPENDS = "flex-native bison-native ntirpc util-linux dbus"
+
+inherit cmake pkgconfig
+
+OECMAKE_SOURCEPATH = "${S}/src"
+
+EXTRA_OECMAKE += "-DUSE_SYSTEM_NTIRPC=ON"
+# TODO packageconfig
+EXTRA_OECMAKE += "-DUSE_GSS=OFF"
+
+# Sort out the brain-dead cmake file
+# (https://github.com/nfs-ganesha/ntirpc/issues/150)
+do_install_append() {
+ if [ "${prefix}/lib64" != "${libdir}" -a -d ${D}${prefix}/lib64 ]; then
+ mv ${D}${prefix}/lib64 ${D}${libdir}
+ fi
+
+ rm -rf ${D}/var/run
+}
+
+FILES_${PN} += "${libdir}/ganesha/*.so"
+
+BBCLASSEXTEND = "native nativesdk"