* [PATCH 1/2] nfs-utils: Upgrade to 2.3.2
@ 2018-12-01 1:08 Khem Raj
2018-12-01 1:08 ` [PATCH 2/2] nfs-utils: Fix exportfs segfault on musl Khem Raj
2018-12-01 11:16 ` [PATCH 1/2] nfs-utils: Upgrade to 2.3.2 Richard Purdie
0 siblings, 2 replies; 3+ messages in thread
From: Khem Raj @ 2018-12-01 1:08 UTC (permalink / raw)
To: openembedded-core
enhance the musl-only patch to degrade certain Werros into Warnings
which helps in compiling on musl, since its checking for __GLIBC__
defines which are undefined on musl.
Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
.../nfs-utils-musl-res_querydomain.patch | 43 +++++++++++++++++--
...{nfs-utils_2.3.1.bb => nfs-utils_2.3.2.bb} | 4 +-
2 files changed, 41 insertions(+), 6 deletions(-)
rename meta/recipes-connectivity/nfs-utils/{nfs-utils_2.3.1.bb => nfs-utils_2.3.2.bb} (97%)
diff --git a/meta/recipes-connectivity/nfs-utils/nfs-utils/nfs-utils-musl-res_querydomain.patch b/meta/recipes-connectivity/nfs-utils/nfs-utils/nfs-utils-musl-res_querydomain.patch
index a169e6a222..22002fadca 100644
--- a/meta/recipes-connectivity/nfs-utils/nfs-utils/nfs-utils-musl-res_querydomain.patch
+++ b/meta/recipes-connectivity/nfs-utils/nfs-utils/nfs-utils-musl-res_querydomain.patch
@@ -1,17 +1,24 @@
+From caa19231196d73541445728e6813c8fa70345acb Mon Sep 17 00:00:00 2001
+From: Robert Yang <liezhi.yang@windriver.com>
+Date: Tue, 26 Jun 2018 15:59:00 +0800
+Subject: [PATCH] nfs-utils: 2.1.1 -> 2.3.1
+
Fixed:
configure: error: res_querydomain needed
-Upstream-Status: Pending [https://git.alpinelinux.org/cgit/aports/tree/main/nfs-utils/musl-res_querydomain.patch?id=f6734a77d3caee73325f8cc1f77d1b5117a75096]
+Upstream-Status: Pending [https://github.com/alpinelinux/aports/blob/master/main/nfs-utils/musl-configure_ac.patch]
Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
+
---
- configure.ac | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
+ configure.ac | 13 ++++++-------
+ 1 file changed, 6 insertions(+), 7 deletions(-)
diff --git a/configure.ac b/configure.ac
+index 276dec3..760238b 100644
--- a/configure.ac
+++ b/configure.ac
-@@ -401,7 +401,7 @@ if test "$enable_gss" = yes; then
+@@ -408,7 +408,7 @@ if test "$enable_gss" = yes; then
fi
dnl libdnsidmap specific checks
@@ -20,3 +27,31 @@ diff --git a/configure.ac b/configure.ac
AC_ARG_ENABLE([ldap],
[AS_HELP_STRING([--disable-ldap],[Disable support for LDAP @<:default=detect@:>@])])
+@@ -547,11 +547,11 @@ my_am_cflags="\
+ -pipe \
+ -Wall \
+ -Wextra \
+- -Werror=strict-prototypes \
+- -Werror=missing-prototypes \
+- -Werror=missing-declarations \
++ -Wstrict-prototypes \
++ -Wmissing-prototypes \
++ -Wmissing-declarations \
+ -Werror=format=2 \
+- -Werror=undef \
++ -Wundef \
+ -Werror=missing-include-dirs \
+ -Werror=strict-aliasing=2 \
+ -Werror=init-self \
+@@ -579,10 +579,9 @@ AC_DEFUN([CHECK_CCSUPPORT], [
+
+ CHECK_CCSUPPORT([-Werror=format-overflow=2], [flg1])
+ CHECK_CCSUPPORT([-Werror=int-conversion], [flg2])
+-CHECK_CCSUPPORT([-Werror=incompatible-pointer-types], [flg3])
+ CHECK_CCSUPPORT([-Werror=misleading-indentation], [flg4])
+
+-AC_SUBST([AM_CFLAGS], ["$my_am_cflags $flg1 $flg2 $flg3 $flg4"])
++AC_SUBST([AM_CFLAGS], ["$my_am_cflags $flg1 $flg2 $flg4"])
+
+ # Make sure that $ACLOCAL_FLAGS are used during a rebuild
+ AC_SUBST([ACLOCAL_AMFLAGS], ["-I $ac_macro_dir \$(ACLOCAL_FLAGS)"])
diff --git a/meta/recipes-connectivity/nfs-utils/nfs-utils_2.3.1.bb b/meta/recipes-connectivity/nfs-utils/nfs-utils_2.3.2.bb
similarity index 97%
rename from meta/recipes-connectivity/nfs-utils/nfs-utils_2.3.1.bb
rename to meta/recipes-connectivity/nfs-utils/nfs-utils_2.3.2.bb
index 6d450c7510..5c0586fa75 100644
--- a/meta/recipes-connectivity/nfs-utils/nfs-utils_2.3.1.bb
+++ b/meta/recipes-connectivity/nfs-utils/nfs-utils_2.3.2.bb
@@ -34,8 +34,8 @@ SRC_URI = "${KERNELORG_MIRROR}/linux/utils/nfs-utils/${PV}/nfs-utils-${PV}.tar.x
SRC_URI_append_libc-musl = " file://nfs-utils-musl-res_querydomain.patch"
-SRC_URI[md5sum] = "d77b182a9ee396aa6221ac2401ad7046"
-SRC_URI[sha256sum] = "96d06b5a86b185815760d8f04c34fdface8fa8b9949ff256ac05c3ebc08335a5"
+SRC_URI[md5sum] = "01f5e6cd187aecf72b489c9c86cce865"
+SRC_URI[sha256sum] = "3cfe50805c4c9f57bec845eaa28dfbe5a8acb90a8d21d8d56d2840e424335b19"
# Only kernel-module-nfsd is required here (but can be built-in) - the nfsd module will
# pull in the remainder of the dependencies.
--
2.19.2
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [PATCH 2/2] nfs-utils: Fix exportfs segfault on musl
2018-12-01 1:08 [PATCH 1/2] nfs-utils: Upgrade to 2.3.2 Khem Raj
@ 2018-12-01 1:08 ` Khem Raj
2018-12-01 11:16 ` [PATCH 1/2] nfs-utils: Upgrade to 2.3.2 Richard Purdie
1 sibling, 0 replies; 3+ messages in thread
From: Khem Raj @ 2018-12-01 1:08 UTC (permalink / raw)
To: openembedded-core
Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
...ot-pass-null-pointer-to-freeaddrinfo.patch | 32 +++++++++++++++++++
.../nfs-utils/nfs-utils_2.3.2.bb | 1 +
2 files changed, 33 insertions(+)
create mode 100644 meta/recipes-connectivity/nfs-utils/nfs-utils/0001-Do-not-pass-null-pointer-to-freeaddrinfo.patch
diff --git a/meta/recipes-connectivity/nfs-utils/nfs-utils/0001-Do-not-pass-null-pointer-to-freeaddrinfo.patch b/meta/recipes-connectivity/nfs-utils/nfs-utils/0001-Do-not-pass-null-pointer-to-freeaddrinfo.patch
new file mode 100644
index 0000000000..a44d1bf2fe
--- /dev/null
+++ b/meta/recipes-connectivity/nfs-utils/nfs-utils/0001-Do-not-pass-null-pointer-to-freeaddrinfo.patch
@@ -0,0 +1,32 @@
+From 4f115fc314646500f7b4178d7248a02654c7cd10 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Fri, 30 Nov 2018 16:47:57 -0800
+Subject: [PATCH] Do not pass null pointer to freeaddrinfo()
+
+Passing null pointer as input parameter to freeaddrinfo() is undefined
+behaviour, some libcs e.g. glibc might just call free() which does
+accept null pointer but other libcs e.g. musl might not and instead
+cause the program to segfault. Therefore do not rely on undefined
+behaviour instead make it deterministic
+
+Upstream-Status: Pending
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ support/export/client.c | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+Index: nfs-utils-2.3.2/support/export/client.c
+===================================================================
+--- nfs-utils-2.3.2.orig/support/export/client.c
++++ nfs-utils-2.3.2/support/export/client.c
+@@ -309,7 +309,8 @@ client_lookup(char *hname, int canonical
+ init_addrlist(clp, ai);
+
+ out:
+- freeaddrinfo(ai);
++ if (ai)
++ freeaddrinfo(ai);
+ return clp;
+ }
+
diff --git a/meta/recipes-connectivity/nfs-utils/nfs-utils_2.3.2.bb b/meta/recipes-connectivity/nfs-utils/nfs-utils_2.3.2.bb
index 5c0586fa75..9b3f36d343 100644
--- a/meta/recipes-connectivity/nfs-utils/nfs-utils_2.3.2.bb
+++ b/meta/recipes-connectivity/nfs-utils/nfs-utils_2.3.2.bb
@@ -30,6 +30,7 @@ SRC_URI = "${KERNELORG_MIRROR}/linux/utils/nfs-utils/${PV}/nfs-utils-${PV}.tar.x
file://nfs-utils-debianize-start-statd.patch \
file://bugfix-adjust-statd-service-name.patch \
file://nfs-utils-musl-limits.patch \
+ file://0001-Do-not-pass-null-pointer-to-freeaddrinfo.patch \
"
SRC_URI_append_libc-musl = " file://nfs-utils-musl-res_querydomain.patch"
--
2.19.2
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH 1/2] nfs-utils: Upgrade to 2.3.2
2018-12-01 1:08 [PATCH 1/2] nfs-utils: Upgrade to 2.3.2 Khem Raj
2018-12-01 1:08 ` [PATCH 2/2] nfs-utils: Fix exportfs segfault on musl Khem Raj
@ 2018-12-01 11:16 ` Richard Purdie
1 sibling, 0 replies; 3+ messages in thread
From: Richard Purdie @ 2018-12-01 11:16 UTC (permalink / raw)
To: Khem Raj, openembedded-core
On Fri, 2018-11-30 at 17:08 -0800, Khem Raj wrote:
> enhance the musl-only patch to degrade certain Werros into Warnings
> which helps in compiling on musl, since its checking for __GLIBC__
> defines which are undefined on musl.
>
> Signed-off-by: Khem Raj <raj.khem@gmail.com>
> ---
> .../nfs-utils-musl-res_querydomain.patch | 43
> +++++++++++++++++--
> ...{nfs-utils_2.3.1.bb => nfs-utils_2.3.2.bb} | 4 +-
> 2 files changed, 41 insertions(+), 6 deletions(-)
> rename meta/recipes-connectivity/nfs-utils/{nfs-utils_2.3.1.bb =>
> nfs-utils_2.3.2.bb} (97%)
Doesn't build on x32 unfortunately:
https://autobuilder.yoctoproject.org/typhoon/#/builders/57/builds/43/steps/7/logs/step1b
Cheers,
Richard
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2018-12-01 11:16 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-12-01 1:08 [PATCH 1/2] nfs-utils: Upgrade to 2.3.2 Khem Raj
2018-12-01 1:08 ` [PATCH 2/2] nfs-utils: Fix exportfs segfault on musl Khem Raj
2018-12-01 11:16 ` [PATCH 1/2] nfs-utils: Upgrade to 2.3.2 Richard Purdie
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox