diff options
Diffstat (limited to 'meta/recipes-extended/libtirpc')
-rw-r--r-- | meta/recipes-extended/libtirpc/libtirpc/ipv6.patch | 52 | ||||
-rw-r--r-- | meta/recipes-extended/libtirpc/libtirpc/libtirpc-1.0.4-rc1.patch | 103 | ||||
-rw-r--r-- | meta/recipes-extended/libtirpc/libtirpc/musl.patch | 18 | ||||
-rw-r--r-- | meta/recipes-extended/libtirpc/libtirpc_1.3.4.bb (renamed from meta/recipes-extended/libtirpc/libtirpc_1.0.3.bb) | 22 |
4 files changed, 65 insertions, 130 deletions
diff --git a/meta/recipes-extended/libtirpc/libtirpc/ipv6.patch b/meta/recipes-extended/libtirpc/libtirpc/ipv6.patch new file mode 100644 index 0000000000..f746f986f4 --- /dev/null +++ b/meta/recipes-extended/libtirpc/libtirpc/ipv6.patch @@ -0,0 +1,52 @@ +From 077bbd32e8b7474dc5f153997732e1e6aec7fad6 Mon Sep 17 00:00:00 2001 +Message-Id: <077bbd32e8b7474dc5f153997732e1e6aec7fad6.1697120796.git.joerg.sommer@navimatix.de> +From: =?UTF-8?q?J=C3=B6rg=20Sommer?= <joerg.sommer@navimatix.de> +Date: Thu, 12 Oct 2023 16:22:59 +0200 +Subject: [PATCH] netconfig: remove tcp6, udp6 on --disable-ipv6 +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +If the configuration for IPv6 is disabled, the netconfig should not contain +settings for tcp6 and udp6. + +The test for the configure option didn't work, because it check the wrong +variable. + +Signed-off-by: Jörg Sommer <joerg.sommer@navimatix.de> +Upstream-Status: Submitted [libtirpc-devel@lists.sourceforge.net] +Upstream-Status: Submitted [linux-nfs@vger.kernel.org] +--- + configure.ac | 2 +- + doc/Makefile.am | 5 +++++ + 2 files changed, 6 insertions(+), 1 deletion(-) + +diff --git a/configure.ac b/configure.ac +index fe6c517..b687f8d 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -64,7 +64,7 @@ fi + AC_ARG_ENABLE(ipv6, + [AC_HELP_STRING([--disable-ipv6], [Disable IPv6 support @<:@default=no@:>@])], + [],[enable_ipv6=yes]) +-AM_CONDITIONAL(INET6, test "x$disable_ipv6" != xno) ++AM_CONDITIONAL(INET6, test "x$enable_ipv6" != xno) + if test "x$enable_ipv6" != xno; then + AC_DEFINE(INET6, 1, [Define to 1 if IPv6 is available]) + fi +diff --git a/doc/Makefile.am b/doc/Makefile.am +index d42ab90..b9678f6 100644 +--- a/doc/Makefile.am ++++ b/doc/Makefile.am +@@ -2,3 +2,8 @@ dist_sysconf_DATA = netconfig bindresvport.blacklist + + CLEANFILES = cscope.* *~ + DISTCLEANFILES = Makefile.in ++ ++if ! INET6 ++install-exec-hook: ++ $(SED) -i '/^tcp6\|^udp6/d' "$(DESTDIR)$(sysconfdir)"/netconfig ++endif +-- +2.34.1 + diff --git a/meta/recipes-extended/libtirpc/libtirpc/libtirpc-1.0.4-rc1.patch b/meta/recipes-extended/libtirpc/libtirpc/libtirpc-1.0.4-rc1.patch deleted file mode 100644 index 6d40d3cce8..0000000000 --- a/meta/recipes-extended/libtirpc/libtirpc/libtirpc-1.0.4-rc1.patch +++ /dev/null @@ -1,103 +0,0 @@ -Patch from Fedora https://src.fedoraproject.org/rpms/libtirpc/raw/master/f/libtirpc-1.0.4-rc1.patch - -Upstream-Status: Backport -Signed-off-by: Khem Raj <raj.khem@gmail.com> - -diff --git a/src/clnt_generic.c b/src/clnt_generic.c -index e5a314f..3f3dabf 100644 ---- a/src/clnt_generic.c -+++ b/src/clnt_generic.c -@@ -47,7 +47,6 @@ - - extern bool_t __rpc_is_local_host(const char *); - int __rpc_raise_fd(int); --extern int __binddynport(int fd); - - #ifndef NETIDLEN - #define NETIDLEN 32 -@@ -341,8 +340,7 @@ clnt_tli_create(int fd, const struct netconfig *nconf, - servtype = nconf->nc_semantics; - if (!__rpc_fd2sockinfo(fd, &si)) - goto err; -- if (__binddynport(fd) == -1) -- goto err; -+ bindresvport(fd, NULL); - } else { - if (!__rpc_fd2sockinfo(fd, &si)) - goto err; -diff --git a/src/rpc_soc.c b/src/rpc_soc.c -index af6c482..5a6eeb7 100644 ---- a/src/rpc_soc.c -+++ b/src/rpc_soc.c -@@ -67,8 +67,6 @@ - - extern mutex_t rpcsoc_lock; - --extern int __binddynport(int fd); -- - static CLIENT *clnt_com_create(struct sockaddr_in *, rpcprog_t, rpcvers_t, - int *, u_int, u_int, char *, int); - static SVCXPRT *svc_com_create(int, u_int, u_int, char *); -@@ -147,8 +145,7 @@ clnt_com_create(raddr, prog, vers, sockp, sendsz, recvsz, tp, flags) - bindaddr.maxlen = bindaddr.len = sizeof (struct sockaddr_in); - bindaddr.buf = raddr; - -- if (__binddynport(fd) == -1) -- goto err; -+ bindresvport(fd, NULL); - cl = clnt_tli_create(fd, nconf, &bindaddr, prog, vers, - sendsz, recvsz); - if (cl) { -diff --git a/src/rpcb_clnt.c b/src/rpcb_clnt.c -index a94fc73..4b44364 100644 ---- a/src/rpcb_clnt.c -+++ b/src/rpcb_clnt.c -@@ -752,7 +752,7 @@ __try_protocol_version_2(program, version, nconf, host, tp) - - client = getpmaphandle(nconf, host, &parms.r_addr); - if (client == NULL) -- return (NULL); -+ goto error; - - /* - * Set retry timeout. -@@ -771,11 +771,11 @@ __try_protocol_version_2(program, version, nconf, host, tp) - if (clnt_st != RPC_SUCCESS) { - rpc_createerr.cf_stat = RPC_PMAPFAILURE; - clnt_geterr(client, &rpc_createerr.cf_error); -- return (NULL); -+ goto error; - } else if (port == 0) { - pmapaddress = NULL; - rpc_createerr.cf_stat = RPC_PROGNOTREGISTERED; -- return (NULL); -+ goto error; - } - port = htons(port); - CLNT_CONTROL(client, CLGET_SVC_ADDR, (char *)&remote); -@@ -789,14 +789,24 @@ __try_protocol_version_2(program, version, nconf, host, tp) - free(pmapaddress); - pmapaddress = NULL; - } -- return (NULL); -+ goto error; - } - memcpy(pmapaddress->buf, remote.buf, remote.len); - memcpy(&((char *)pmapaddress->buf)[sizeof (short)], - (char *)(void *)&port, sizeof (short)); - pmapaddress->len = pmapaddress->maxlen = remote.len; - -+ CLNT_DESTROY(client); - return pmapaddress; -+ -+error: -+ if (client) { -+ CLNT_DESTROY(client); -+ client = NULL; -+ -+ } -+ return (NULL); -+ - } - #endif - diff --git a/meta/recipes-extended/libtirpc/libtirpc/musl.patch b/meta/recipes-extended/libtirpc/libtirpc/musl.patch deleted file mode 100644 index 0c3ce603ea..0000000000 --- a/meta/recipes-extended/libtirpc/libtirpc/musl.patch +++ /dev/null @@ -1,18 +0,0 @@ -Consider musl provided built-in defines - -Helps compile libtirpc with musl - -Upstream-Status: Pending -Signed-off-by: Khem Raj <raj.khem@gmail.com> - ---- ./tirpc/rpc/types.h.orig 2018-03-17 10:23:10.022055255 +0100 -+++ ./tirpc/rpc/types.h 2018-03-17 10:23:30.877751656 +0100 -@@ -66,7 +66,7 @@ - #define mem_free(ptr, bsize) free(ptr) - - --#if defined __APPLE_CC__ || defined __FreeBSD__ -+#if defined __APPLE_CC__ || defined __FreeBSD__ || !defined(__GLIBC__) - # define __u_char_defined - # define __daddr_t_defined - #endif diff --git a/meta/recipes-extended/libtirpc/libtirpc_1.0.3.bb b/meta/recipes-extended/libtirpc/libtirpc_1.3.4.bb index f978c8c8ab..aa526e9e1c 100644 --- a/meta/recipes-extended/libtirpc/libtirpc_1.0.3.bb +++ b/meta/recipes-extended/libtirpc/libtirpc_1.3.4.bb @@ -3,27 +3,31 @@ DESCRIPTION = "Libtirpc is a port of Suns Transport-Independent RPC library to L SECTION = "libs/network" HOMEPAGE = "http://sourceforge.net/projects/libtirpc/" BUGTRACKER = "http://sourceforge.net/tracker/?group_id=183075&atid=903784" -LICENSE = "BSD" +LICENSE = "BSD-3-Clause" LIC_FILES_CHKSUM = "file://COPYING;md5=f835cce8852481e4b2bbbdd23b5e47f3 \ file://src/netname.c;beginline=1;endline=27;md5=f8a8cd2cb25ac5aa16767364fb0e3c24" PROVIDES = "virtual/librpc" SRC_URI = "${SOURCEFORGE_MIRROR}/${BPN}/${BP}.tar.bz2 \ - file://libtirpc-1.0.4-rc1.patch \ - file://musl.patch \ - " + file://ipv6.patch \ +" UPSTREAM_CHECK_URI = "https://sourceforge.net/projects/libtirpc/files/libtirpc/" UPSTREAM_CHECK_REGEX = "(?P<pver>\d+(\.\d+)+)/" -SRC_URI[md5sum] = "f8403a10695348854e71d525c4db5931" -SRC_URI[sha256sum] = "86c3a78fc1bddefa96111dd233124c703b22a78884203c55c3e06b3be6a0fd5e" +SRC_URI[sha256sum] = "1e0b0c7231c5fa122e06c0609a76723664d068b0dba3b8219b63e6340b347860" + +CVE_STATUS[CVE-2021-46828] = "fixed-version: fixed in 1.3.3rc1 so not present in 1.3.3" inherit autotools pkgconfig -EXTRA_OECONF = "--disable-gssapi" +PACKAGECONFIG ??= "\ + ${@bb.utils.filter('DISTRO_FEATURES', 'ipv6', d)} \ +" +PACKAGECONFIG[ipv6] = "--enable-ipv6,--disable-ipv6" +PACKAGECONFIG[gssapi] = "--enable-gssapi,--disable-gssapi,krb5" -do_install_append() { - chown root:root ${D}${sysconfdir}/netconfig +do_install:append() { + test -e ${D}${sysconfdir}/netconfig && chown root:root ${D}${sysconfdir}/netconfig } BBCLASSEXTEND = "native nativesdk" |