ntirpc: Add ntirpc recipe
PATCH v2 1/2 ntirpc: Add ntirpc recipe
ntirpc is an actively maintained rpc implementation. We cannot completely remove libtirpc due to arising circular dependencies where ntirpc depends on libnsl2, which in turn depends on an RPC implementation.
libtirpc and ntirpc are not mutually exclusive.
--- meta/recipes-extended/ntirpc/ntirpc_4.0.bb | 36 +++++++++++++++++++ meta/recipes-extended/quota/quota_4.06.bb | 2 +- .../recipes-extended/rpcbind/rpcbind_1.2.6.bb | 2 +- .../watchdog/watchdog_5.16.bb | 2 +- .../xorg-xserver/xserver-xorg.inc | 2 +- .../recipes-support/liburcu/liburcu_0.13.1.bb | 1 + 6 files changed, 41 insertions(+), 4 deletions(-) create mode 100644 meta/recipes-extended/ntirpc/ntirpc_4.0.bb
meta/recipes-extended/ntirpc/ntirpc_4.0.bb new file +36 -0
@@ -0,0 +1,36 @@ +SUMMARY = "Transport-Independent RPC library (nfs-ganesha fork)" +DESCRIPTION = "ntirpc is a port of Suns Transport-Independent RPC library to Linux" +SECTION = "libs/network" +HOMEPAGE = "https://github.com/nfs-ganesha/ntirpc" +BUGTRACKER = "https://github.com/nfs-ganesha/ntirpc/issues" +LICENSE = "BSD-3-Clause" +LIC_FILES_CHKSUM = "file://COPYING;md5=f835cce8852481e4b2bbbdd23b5e47f3 \ + file://src/netname.c;beginline=1;endline=27;md5=f8a8cd2cb25ac5aa16767364fb0e3c24" + +SRC_URI = "https://download.nfs-ganesha.org/4/${PV}/ntirpc-${PV}.tar.gz" +SRC_URI[md5sum] = "17b0baada54936dcde80eba27bb6d88d" +SRC_URI[sha256sum] = "6a7921cd48d02077b394a02be42bf4f9b4678d4ebfd86a7ae4385bbcdce55462" + +DEPENDS = "liburcu libnsl2" + +inherit cmake pkgconfig + +PACKAGECONFIG[gss] = "-DUSE_GSS=true,-DUSE_GSS=false,krb5" +PACKAGECONFIG[rdma] = "-DUSE_RPC_RDMA=true,-DUSE_RPC_RDMA=false,rdma-core" +PACKAGECONFIG[winbind] = "-D_MSPAC_SUPPORT=true,-D_MSPAC_SUPPORT=false,samba" +PACKAGECONFIG[profile] = "-DUSE_PROFILE=true,-DUSE_PROFILE=false,gperftools" +PACKAGECONFIG[lttng] = "-DUSE_LTTNG=true,-DUSE_LTTNG=false,lttng-ust lttng-tools" + +# 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 +} + +BBCLASSEXTEND = "native nativesdk" +EXTRA_OECMAKE:armv5 += '-DSYSTEM_LIBRARIES="-latomic"' +EXTRA_OECMAKE:riscv32 += '-DSYSTEM_LIBRARIES="-latomic"' +EXTRA_OECMAKE:riscv64 += '-DSYSTEM_LIBRARIES="-latomic"' +EXTRA_OECMAKE:powerpc += '-DSYSTEM_LIBRARIES="-latomic"'
meta/recipes-extended/quota/quota_4.06.bb +1 -1
@@ -30,6 +30,6 @@ PACKAGECONFIG ??= "tcp-wrappers rpc bsd" PACKAGECONFIG:libc-musl = "tcp-wrappers rpc" PACKAGECONFIG[tcp-wrappers] = "--enable-libwrap,--disable-libwrap,tcp-wrappers" -PACKAGECONFIG[rpc] = "--enable-rpc,--disable-rpc,libtirpc" +PACKAGECONFIG[rpc] = "--enable-rpc,--disable-rpc,ntirpc" PACKAGECONFIG[bsd] = "--enable-bsd_behaviour=yes,--enable-bsd_behaviour=no," PACKAGECONFIG[ldapmail] = "--enable-ldapmail,--disable-ldapmail,openldap"
meta/recipes-extended/rpcbind/rpcbind_1.2.6.bb +1 -1
@@ -4,7 +4,7 @@ DESCRIPTION = "The rpcbind utility is a server that converts RPC \ SECTION = "console/network" HOMEPAGE = "http://sourceforge.net/projects/rpcbind/" BUGTRACKER = "http://sourceforge.net/tracker/?group_id=201237&atid=976751" -DEPENDS = "libtirpc quota" +DEPENDS = "ntirpc quota" LICENSE = "BSD-3-Clause" LIC_FILES_CHKSUM = "file://COPYING;md5=b46486e4c4a416602693a711bb5bfa39 \
meta/recipes-extended/watchdog/watchdog_5.16.bb +1 -1
@@ -28,7 +28,7 @@ UPSTREAM_CHECK_REGEX = "/watchdog/(?P<pver>(\d+[\.\-_]*)+)/" inherit autotools update-rc.d systemd pkgconfig -DEPENDS += "libtirpc" +DEPENDS += "ntirpc" CFLAGS += "-I${STAGING_INCDIR}/tirpc" LDFLAGS += "-ltirpc"
meta/recipes-graphics/xorg-xserver/xserver-xorg.inc +1 -1
@@ -36,7 +36,7 @@ inherit meson pkgconfig inherit features_check REQUIRED_DISTRO_FEATURES = "x11" -LIB_DEPS = "pixman libxfont2 xtrans libxau libxext libxdmcp libdrm libxkbfile libpciaccess libxcvt libtirpc" +LIB_DEPS = "pixman libxfont2 xtrans libxau libxext libxdmcp libdrm libxkbfile libpciaccess libxcvt ntirpc" DEPENDS = "xorgproto ${LIB_DEPS} font-util" # Split out some modules and extensions from the main package
meta/recipes-support/liburcu/liburcu_0.13.1.bb +1 -0
@@ -22,3 +22,4 @@ CPPFLAGS:append:riscv64 = " -pthread -D_REENTRANT" do_install:append() { oe_multilib_header urcu/config.h } +BBCLASSEXTEND = "native nativesdk"
Signature · 1 line
2.25.1
PATCH v2 2/2 nfs-ganesha: Replace unfs3 with nfs-ganesha
nfs-ganesha is actively maintained in contrast with unfs3. glibc tests pass with nfs-ganesha.
--- meta/lib/oeqa/utils/nfs.py | 2 +- ...ix-possible-null-pointer-dereference.patch | 38 +++++ ...-Workaround-for-erroneous-gcc-Werror.patch | 33 ++++ ...ke-nfsv3_optype-guarded-by-_USE_NFS3.patch | 35 ++++ .../nfs-ganesha/nfs-ganesha/module.patch | 27 +++ .../nfs-ganesha/nfs-ganesha_4.0.bb | 41 +++++ ...1-Add-listen-action-for-a-tcp-socket.patch | 54 ------ .../0001-attr-fix-utime-for-symlink.patch | 85 ---------- ...0001-daemon.c-Libtirpc-porting-fixes.patch | 37 ---- .../unfs3/unfs3/alternate_rpc_ports.patch | 158 ------------------ .../unfs3/unfs3/fix_compile_warning.patch | 25 --- ...fix_pid_race_parent_writes_child_pid.patch | 61 ------- .../unfs3/unfs3/no-yywrap.patch | 14 -- .../unfs3/relative_max_socket_path_len.patch | 74 -------- .../unfs3/unfs3/rename_fh_cache.patch | 64 ------- .../unfs3/unfs3/tcp_no_delay.patch | 56 ------- .../unfs3/unfs3/unfs3_parallel_build.patch | 37 ---- meta/recipes-devtools/unfs3/unfs3_git.bb | 45 ----- 18 files changed, 175 insertions(+), 711 deletions(-) create mode 100644 meta/recipes-connectivity/nfs-ganesha/nfs-ganesha/0001-Fix-possible-null-pointer-dereference.patch create mode 100644 meta/recipes-connectivity/nfs-ganesha/nfs-ganesha/0002-Workaround-for-erroneous-gcc-Werror.patch create mode 100644 meta/recipes-connectivity/nfs-ganesha/nfs-ganesha/0003-Make-nfsv3_optype-guarded-by-_USE_NFS3.patch create mode 100644 meta/recipes-connectivity/nfs-ganesha/nfs-ganesha/module.patch create mode 100644 meta/recipes-connectivity/nfs-ganesha/nfs-ganesha_4.0.bb delete mode 100644 meta/recipes-devtools/unfs3/unfs3/0001-Add-listen-action-for-a-tcp-socket.patch delete mode 100644 meta/recipes-devtools/unfs3/unfs3/0001-attr-fix-utime-for-symlink.patch delete mode 100644 meta/recipes-devtools/unfs3/unfs3/0001-daemon.c-Libtirpc-porting-fixes.patch delete mode 100644 meta/recipes-devtools/unfs3/unfs3/alternate_rpc_ports.patch delete mode 100644 meta/recipes-devtools/unfs3/unfs3/fix_compile_warning.patch delete mode 100644 meta/recipes-devtools/unfs3/unfs3/fix_pid_race_parent_writes_child_pid.patch delete mode 100644 meta/recipes-devtools/unfs3/unfs3/no-yywrap.patch delete mode 100644 meta/recipes-devtools/unfs3/unfs3/relative_max_socket_path_len.patch delete mode 100644 meta/recipes-devtools/unfs3/unfs3/rename_fh_cache.patch delete mode 100644 meta/recipes-devtools/unfs3/unfs3/tcp_no_delay.patch delete mode 100644 meta/recipes-devtools/unfs3/unfs3/unfs3_parallel_build.patch delete mode 100644 meta/recipes-devtools/unfs3/unfs3_git.bb
meta/lib/oeqa/utils/nfs.py +1 -1
@@ -16,7 +16,7 @@ def unfs_server(directory, logger = None): unfs_sysroot = get_bb_var("RECIPE_SYSROOT_NATIVE", "unfs3-native") if not os.path.exists(os.path.join(unfs_sysroot, "usr", "bin", "unfsd")): # build native tool - bitbake("unfs3-native -c addto_recipe_sysroot") + bitbake("nfs-ganesha-native -c addto_recipe_sysroot") exports = None cmd = None
meta/recipes-connectivity/nfs-ganesha/nfs-ganesha/0001-Fix-possible-null-pointer-dereference.patch new file +38 -0
@@ -0,0 +1,38 @@ +From e70f112dc79263298baf7a1b92c19234b8f1e506 Mon Sep 17 00:00:00 2001 +From: Paulo Neves <[email protected]> +Date: Tue, 23 Aug 2022 14:56:44 +0200 +Subject: [PATCH] Fix possible null pointer dereference + +If logging is enabled on nfs3_lookup, name is NULL initialized +and used. Assign name to a valid location before it is used. + +Upstream-Status: Submitted [https://github.com/nfs-ganesha/nfs-ganesha/pull/846] + +Change-Id: Ia1a922a1d34268a7d0b5ba97293e647ef07f8b3a +Signed-off-by: Paulo Neves <[email protected]> + +--- + src/Protocols/NFS/nfs3_lookup.c | 3 +-- + 1 file changed, 1 insertion(+), 2 deletions(-) + +diff --git a/src/Protocols/NFS/nfs3_lookup.c b/src/Protocols/NFS/nfs3_lookup.c +index da65769..97c9603 100644 +--- a/src/Protocols/NFS/nfs3_lookup.c ++++ b/src/Protocols/NFS/nfs3_lookup.c +@@ -74,6 +74,7 @@ int nfs3_lookup(nfs_arg_t *arg, struct svc_req *req, nfs_res_t *res) + */ + fsal_prepare_attrs(&attrs, ATTRS_NFS3 | ATTR_RDATTR_ERR); + ++ name = arg->arg_lookup3.what.name; + LogNFS3_Operation(COMPONENT_NFSPROTO, req, &arg->arg_lookup3.what.dir, + " name: %s", name); + +@@ -89,8 +90,6 @@ int nfs3_lookup(nfs_arg_t *arg, struct svc_req *req, nfs_res_t *res) + goto out; + } + +- name = arg->arg_lookup3.what.name; +- + fsal_status = fsal_lookup(obj_dir, name, &obj_file, &attrs); + + if (FSAL_IS_ERROR(fsal_status)) {
meta/recipes-connectivity/nfs-ganesha/nfs-ganesha/0002-Workaround-for-erroneous-gcc-Werror.patch new file +33 -0
@@ -0,0 +1,33 @@ +From b8fa32c779b968fbbbe5d5dcaafa664b98cec81c Mon Sep 17 00:00:00 2001 +From: Paulo Neves <[email protected]> +Date: Tue, 23 Aug 2022 14:59:19 +0200 +Subject: [PATCH] Workaround for erroneous gcc Werror. + +gcc incorrectly decides that pos_len and pos_end are used +unninitialized. It is incorrect because the condition of their +use is the same as their early initialization. Apparently +gcc does not pick this fact and with Werror, emits an error + +Upstream-Status: Inappropriate [reason above] + +Change-Id: I30a345483b5a4bc4b5ceb46badaec3a9d27d1782 +Signed-off-by: Paulo Neves <[email protected]> + +--- + src/Protocols/NFS/nfs_proto_tools.c | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +diff --git a/src/Protocols/NFS/nfs_proto_tools.c b/src/Protocols/NFS/nfs_proto_tools.c +index d0f628d..a741482 100644 +--- a/src/Protocols/NFS/nfs_proto_tools.c ++++ b/src/Protocols/NFS/nfs_proto_tools.c +@@ -3688,7 +3688,8 @@ bool xdr_fattr4_encode(XDR *xdrs, struct xdr_attrs_args *args, + struct bitmap4 bitmap_encoded; + struct bitmap4 *bitmap; + /* Remember where we put the length of the attr data */ +- u_int pos_len, pos_end; ++ u_int pos_len = 0; ++ u_int pos_end = 0; + uint32_t attr_len = 0; + + bitmap = attr_bitmap != NULL ? attr_bitmap : &bitmap_encoded;
meta/recipes-connectivity/nfs-ganesha/nfs-ganesha/0003-Make-nfsv3_optype-guarded-by-_USE_NFS3.patch new file +35 -0
@@ -0,0 +1,35 @@ +From 48086cb311e37ea58de60352609e270be62ee7e8 Mon Sep 17 00:00:00 2001 +From: Paulo Neves <[email protected]> +Date: Tue, 23 Aug 2022 22:59:46 +0200 +Subject: [PATCH] Make nfsv3_optype guarded by _USE_NFS3 + +-Wunused-variable will trigger when NFS3 is not enabled. + +Upstream-Status: Submitted [https://github.com/nfs-ganesha/nfs-ganesha/pull/846] + +Change-Id: Ib1fab2e1a59b834cda8317b2a3450e3c19437975 +Signed-off-by: Paulo Neves <[email protected]> + +--- + src/support/server_stats.c | 3 +++ + 1 file changed, 3 insertions(+) + +diff --git a/src/support/server_stats.c b/src/support/server_stats.c +index 19a8cac..a92b035 100644 +--- a/src/support/server_stats.c ++++ b/src/support/server_stats.c +@@ -246,11 +246,14 @@ enum proto_op_type { + LAYOUT_OP + }; + ++#ifdef _USE_NFS3 + static const uint32_t nfsv3_optype[NFS_V3_NB_COMMAND] = { + [NFSPROC3_READ] = READ_OP, + [NFSPROC3_WRITE] = WRITE_OP, + }; + ++#endif ++ + static const uint32_t nfsv40_optype[NFS_V40_NB_OPERATION] = { + [NFS4_OP_READ] = READ_OP, + [NFS4_OP_WRITE] = WRITE_OP,
meta/recipes-connectivity/nfs-ganesha/nfs-ganesha/module.patch new file +27 -0
@@ -0,0 +1,27 @@ +From 4d8ec5e1b04455b3f6ca40743a298e16a57cfaa4 Mon Sep 17 00:00:00 2001 +From: Ross Burton <[email protected]> +Date: Fri, 5 Oct 2018 15:12:46 +0100 +Subject: [PATCH] Install fsalmem as a module + +Upstream-Status: Submitted [https://github.com/nfs-ganesha/nfs-ganesha/pull/354] +Signed-off-by: Ross Burton <[email protected]> + +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 0f30fff..a9191ae 100644 +--- a/src/FSAL/FSAL_MEM/CMakeLists.txt ++++ b/src/FSAL/FSAL_MEM/CMakeLists.txt +@@ -14,7 +14,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
meta/recipes-connectivity/nfs-ganesha/nfs-ganesha_4.0.bb new file +41 -0
41 lines not on this page · raw message
meta/recipes-devtools/unfs3/unfs3/0001-Add-listen-action-for-a-tcp-socket.patch deleted +0 -54
54 lines not on this page · raw message
meta/recipes-devtools/unfs3/unfs3/0001-attr-fix-utime-for-symlink.patch deleted +0 -85
85 lines not on this page · raw message
meta/recipes-devtools/unfs3/unfs3/0001-daemon.c-Libtirpc-porting-fixes.patch deleted +0 -37
@@ -1,37 +0,0 @@ -From c7a2a65d6c2a433312540c207860740d6e4e7629 Mon Sep 17 00:00:00 2001 -From: Khem Raj <[email protected]> -Date: Sun, 11 Mar 2018 17:32:54 -0700 -Subject: [PATCH] daemon.c: Libtirpc porting fixes - -Signed-off-by: Khem Raj <[email protected]> ---- -Upstream-Status: Pending - - daemon.c | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -diff --git a/daemon.c b/daemon.c -index 22f30f6..028a181 100644 ---- a/daemon.c -+++ b/daemon.c -@@ -117,7 +117,7 @@ void logmsg(int prio, const char *fmt, ...) - */ - struct in_addr get_remote(struct svc_req *rqstp) - { -- return (svc_getcaller(rqstp->rq_xprt))->sin_addr; -+ return ((struct sockaddr_in*)svc_getcaller(rqstp->rq_xprt))->sin_addr; - } - - /* -@@ -125,7 +125,7 @@ struct in_addr get_remote(struct svc_req *rqstp) - */ - short get_port(struct svc_req *rqstp) - { -- return (svc_getcaller(rqstp->rq_xprt))->sin_port; -+ return ((struct sockaddr_in*)svc_getcaller(rqstp->rq_xprt))->sin_port; - } - - /* --- -2.16.2 -
meta/recipes-devtools/unfs3/unfs3/alternate_rpc_ports.patch deleted +0 -158
158 lines not on this page · raw message
meta/recipes-devtools/unfs3/unfs3/fix_compile_warning.patch deleted +0 -25
@@ -1,25 +0,0 @@ -daemon.c: Check exit code of chdir() - -Stop the compile warning and fix the code to act on a chdir() failure. -If this one does fail something is very, very wrong. - -Signed-off-by: Jason Wessel <[email protected]> - -Upstream-Status: Submitted http://sourceforge.net/p/unfs3/bugs/5/ - ---- - daemon.c | 3 ++- - 1 file changed, 2 insertions(+), 1 deletion(-) - ---- a/daemon.c -+++ b/daemon.c -@@ -964,7 +964,8 @@ int main(int argc, char **argv) - sigaction(SIGALRM, &act, NULL); - - /* don't make directory we started in busy */ -- chdir("/"); -+ if(chdir("/") < 0) -+ daemon_exit(0); - - /* detach from terminal */ - if (opt_detach) {
meta/recipes-devtools/unfs3/unfs3/fix_pid_race_parent_writes_child_pid.patch deleted +0 -61
61 lines not on this page · raw message
meta/recipes-devtools/unfs3/unfs3/no-yywrap.patch deleted +0 -14
@@ -1,14 +0,0 @@ -Upstream-Status: Backport [https://github.com/unfs3/unfs3/commit/3fa0568e6ef96e045286afe18444bc28fe93962b] - -diff --git a/Config/exports.l b/Config/exports.l -index 662603c..7e7c4fc 100644 ---- a/Config/exports.l -+++ b/Config/exports.l -@@ -50,6 +50,7 @@ OLDNET {IP}"/"{IP} - - %option nounput - %option noinput -+%option noyywrap - - %% -
meta/recipes-devtools/unfs3/unfs3/relative_max_socket_path_len.patch deleted +0 -74
74 lines not on this page · raw message
meta/recipes-devtools/unfs3/unfs3/rename_fh_cache.patch deleted +0 -64
64 lines not on this page · raw message
meta/recipes-devtools/unfs3/unfs3/tcp_no_delay.patch deleted +0 -56
56 lines not on this page · raw message
meta/recipes-devtools/unfs3/unfs3/unfs3_parallel_build.patch deleted +0 -37
@@ -1,37 +0,0 @@ -Fix parallel build dependency issue - -If building with make -j2 the lib.a will not get built in time. - -Jason Wessel <[email protected]> - -Upstream-Status: Submitted http://sourceforge.net/p/unfs3/bugs/5/ - ---- - Config/Makefile.in | 3 +++ - Makefile.in | 3 ++- - 2 files changed, 5 insertions(+), 1 deletion(-) - ---- a/Makefile.in -+++ b/Makefile.in -@@ -29,7 +29,8 @@ DESTDIR = - - VPATH = $(srcdir) - --all: subdirs unfsd$(EXEEXT) -+all: subdirs -+ $(MAKE) unfsd$(EXEEXT) - - unfsd$(EXEEXT): $(OBJS) $(CONFOBJ) $(EXTRAOBJ) - $(CC) -o $@ $(OBJS) $(CONFOBJ) $(EXTRAOBJ) $(LDFLAGS) ---- a/Config/Makefile.in -+++ b/Config/Makefile.in -@@ -16,6 +16,9 @@ lib.a: $(OBJS) - $(AR) crs lib.a $(OBJS) - - y.tab.h y.tab.c: $(srcdir)/exports.y -+y.tab.h: y.tab.c -+ -+y.tab.c: $(srcdir)/exports.y - $(YACC) -d $(srcdir)/exports.y - - y.tab.o: y.tab.c $(srcdir)/exports.h $(top_srcdir)/nfs.h $(top_srcdir)/mount.h $(top_srcdir)/daemon.h
meta/recipes-devtools/unfs3/unfs3_git.bb deleted +0 -45
45 lines not on this page · raw message
Signature · 1 line
2.25.1