Openembedded Core Discussions
 help / color / mirror / Atom feed
* [PATCH 0/2] Fix unfs3 with musl and glibc without rpc
@ 2018-03-12  4:40 Khem Raj
  2018-03-12  4:40 ` [PATCH 1/2] unfs3: Fix build with musl Khem Raj
  2018-03-12  4:40 ` [PATCH 2/2] libtirpc: Extend to native and nativesdk recipes Khem Raj
  0 siblings, 2 replies; 3+ messages in thread
From: Khem Raj @ 2018-03-12  4:40 UTC (permalink / raw)
  To: openembedded-core

Distros are going to drop rpc support in glibc 2.27, therefore we
need to port unfs3 to work with libtirpc

Added bonus to fix the build with musl as well

The following changes since commit e4da78229f0bd67fd34928eafe48dbdc9e8da050:

  e2fsprogs: Add comment on why touch is needed (2018-03-09 11:09:39 -0800)

are available in the Git repository at:

  git://git.openembedded.org/openembedded-core-contrib kraj/unfs3
  http://cgit.openembedded.org/openembedded-core-contrib/log/?h=kraj/unfs3

Khem Raj (2):
  unfs3: Fix build with musl
  libtirpc: Extend to native and nativesdk recipes

 meta/conf/distro/include/world-broken.inc          |  4 ---
 .../0001-daemon.c-Libtirpc-porting-fixes.patch     | 37 ++++++++++++++++++++++
 meta/recipes-devtools/unfs3/unfs3_0.9.22.r497.bb   | 10 ++++--
 meta/recipes-extended/libtirpc/libtirpc_1.0.2.bb   |  2 ++
 4 files changed, 46 insertions(+), 7 deletions(-)
 create mode 100644 meta/recipes-devtools/unfs3/unfs3/0001-daemon.c-Libtirpc-porting-fixes.patch

-- 
2.16.2



^ permalink raw reply	[flat|nested] 3+ messages in thread

* [PATCH 1/2] unfs3: Fix build with musl
  2018-03-12  4:40 [PATCH 0/2] Fix unfs3 with musl and glibc without rpc Khem Raj
@ 2018-03-12  4:40 ` Khem Raj
  2018-03-12  4:40 ` [PATCH 2/2] libtirpc: Extend to native and nativesdk recipes Khem Raj
  1 sibling, 0 replies; 3+ messages in thread
From: Khem Raj @ 2018-03-12  4:40 UTC (permalink / raw)
  To: openembedded-core

Should also fix build on new build hosts where
with glibc 2.27 rpc support is dropped in favor
of libtirpc

Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
 meta/conf/distro/include/world-broken.inc          |  4 ---
 .../0001-daemon.c-Libtirpc-porting-fixes.patch     | 37 ++++++++++++++++++++++
 meta/recipes-devtools/unfs3/unfs3_0.9.22.r497.bb   | 10 ++++--
 3 files changed, 44 insertions(+), 7 deletions(-)
 create mode 100644 meta/recipes-devtools/unfs3/unfs3/0001-daemon.c-Libtirpc-porting-fixes.patch

diff --git a/meta/conf/distro/include/world-broken.inc b/meta/conf/distro/include/world-broken.inc
index 49e9516d53..42cacfdf2e 100644
--- a/meta/conf/distro/include/world-broken.inc
+++ b/meta/conf/distro/include/world-broken.inc
@@ -5,10 +5,6 @@
 # rt-tests needs PI mutex support in libc
 EXCLUDE_FROM_WORLD_pn-rt-tests_libc-musl = "1"
 
-# error: no member named 'sin_port' in 'struct sockaddr_in6'
-# this is due to libtirpc using ipv6 but portmap rpc expecting ipv4
-EXCLUDE_FROM_WORLD_pn-unfs3_libc-musl = "1"
-
 # error: use of undeclared identifier '_STAT_VER'
 EXCLUDE_FROM_WORLD_pn-pseudo_libc-musl = "1"
 
diff --git a/meta/recipes-devtools/unfs3/unfs3/0001-daemon.c-Libtirpc-porting-fixes.patch b/meta/recipes-devtools/unfs3/unfs3/0001-daemon.c-Libtirpc-porting-fixes.patch
new file mode 100644
index 0000000000..6eee6748f9
--- /dev/null
+++ b/meta/recipes-devtools/unfs3/unfs3/0001-daemon.c-Libtirpc-porting-fixes.patch
@@ -0,0 +1,37 @@
+From c7a2a65d6c2a433312540c207860740d6e4e7629 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Sun, 11 Mar 2018 17:32:54 -0700
+Subject: [PATCH] daemon.c: Libtirpc porting fixes
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+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
+
diff --git a/meta/recipes-devtools/unfs3/unfs3_0.9.22.r497.bb b/meta/recipes-devtools/unfs3/unfs3_0.9.22.r497.bb
index cebc8660d0..46ac3692b1 100644
--- a/meta/recipes-devtools/unfs3/unfs3_0.9.22.r497.bb
+++ b/meta/recipes-devtools/unfs3/unfs3_0.9.22.r497.bb
@@ -9,9 +9,11 @@ RECIPE_UPSTREAM_DATE = "Oct 08, 2015"
 CHECK_DATE = "Dec 10, 2015"
 
 DEPENDS = "flex-native bison-native flex"
-DEPENDS_append_libc-musl = " libtirpc"
+DEPENDS += "libtirpc"
 DEPENDS_append_class-nativesdk = " flex-nativesdk"
 
+ASNEEDED = ""
+
 MOD_PV = "497"
 S = "${WORKDIR}/trunk"
 # Only subversion url left in OE-Core, use a mirror tarball instead since
@@ -26,7 +28,8 @@ SRC_URI = "http://downloads.yoctoproject.org/mirror/sources/unfs3-0.9.22.r497.ta
            file://rename_fh_cache.patch \
            file://relative_max_socket_path_len.patch \
            file://tcp_no_delay.patch \
-          "
+           file://0001-daemon.c-Libtirpc-porting-fixes.patch \
+           "
 SRC_URI[md5sum] = "2e43e471c77ade0331901c40b8f8e9a3"
 SRC_URI[sha256sum] = "21009468a9ba07b72ea93780d025a63ab4e55bf8fc3127803c296f0900fe1bac"
 
@@ -34,7 +37,8 @@ BBCLASSEXTEND = "native nativesdk"
 
 inherit autotools
 EXTRA_OECONF_append_class-native = " --sbindir=${bindir}"
-CFLAGS_append_libc-musl = " -I${STAGING_INCDIR}/tirpc"
+CFLAGS += " -I${STAGING_INCDIR}/tirpc"
+LDFLAGS += " -ltirpc"
 
 # Turn off these header detects else the inode search
 # will walk entire file systems and this is a real problem
-- 
2.16.2



^ permalink raw reply related	[flat|nested] 3+ messages in thread

* [PATCH 2/2] libtirpc: Extend to native and nativesdk recipes
  2018-03-12  4:40 [PATCH 0/2] Fix unfs3 with musl and glibc without rpc Khem Raj
  2018-03-12  4:40 ` [PATCH 1/2] unfs3: Fix build with musl Khem Raj
@ 2018-03-12  4:40 ` Khem Raj
  1 sibling, 0 replies; 3+ messages in thread
From: Khem Raj @ 2018-03-12  4:40 UTC (permalink / raw)
  To: openembedded-core

Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
 meta/recipes-extended/libtirpc/libtirpc_1.0.2.bb | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/meta/recipes-extended/libtirpc/libtirpc_1.0.2.bb b/meta/recipes-extended/libtirpc/libtirpc_1.0.2.bb
index 1a73de9db0..99212600e0 100644
--- a/meta/recipes-extended/libtirpc/libtirpc_1.0.2.bb
+++ b/meta/recipes-extended/libtirpc/libtirpc_1.0.2.bb
@@ -29,3 +29,5 @@ EXTRA_OECONF = "--disable-gssapi"
 do_install_append() {
         chown root:root ${D}${sysconfdir}/netconfig
 }
+
+BBCLASSEXTEND = "native nativesdk"
-- 
2.16.2



^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2018-03-12  4:41 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-03-12  4:40 [PATCH 0/2] Fix unfs3 with musl and glibc without rpc Khem Raj
2018-03-12  4:40 ` [PATCH 1/2] unfs3: Fix build with musl Khem Raj
2018-03-12  4:40 ` [PATCH 2/2] libtirpc: Extend to native and nativesdk recipes Khem Raj

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox