nfs-utils: musl support via Alpine.

This commit is contained in:
Juan RP 2016-01-09 07:23:43 +01:00
parent d8492234e2
commit fa4bb9c635
3 changed files with 59 additions and 6 deletions

View file

@ -0,0 +1,39 @@
From 0b4df13026eb371b68abc4b8cec4ca8d90c3b0a3 Mon Sep 17 00:00:00 2001
From: Natanael Copa <ncopa@alpinelinux.org>
Date: Mon, 2 Jun 2014 14:42:10 +0200
Subject: [PATCH] exportfs: only do glibc specific hackery on glibc
We should not depend on the libc do free(3) on ai_canonname as that is
completely up to implementation and known o break things on uclibc and
musl libc.
Signed-off-by: Natanael Copa <ncopa@alpinelinux.org>
---
support/export/hostname.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/support/export/hostname.c b/support/export/hostname.c
index d9153e1..30584b4 100644
--- support/export/hostname.c
+++ support/export/hostname.c
@@ -382,6 +382,7 @@ host_numeric_addrinfo(const struct sockaddr *sap)
ai = host_pton(buf);
+#if !definded(__UCLIBC__) && defined(__GLIBC__)
/*
* getaddrinfo(AI_NUMERICHOST) never fills in ai_canonname
*/
@@ -392,7 +393,9 @@ host_numeric_addrinfo(const struct sockaddr *sap)
ai = NULL;
}
}
+#endif
return ai;
}
+
#endif /* !HAVE_GETNAMEINFO */
--
2.0.4

View file

@ -0,0 +1,16 @@
Musl will always return something with getservbyport so we cannot skip
ports that returns non-null.
--- utils/statd/rmtcall.c
+++ utils/statd/rmtcall.c
@@ -90,8 +90,10 @@ statd_get_socket(void)
__func__);
break;
}
+#if defined(__GLIBC__)
se = getservbyport(sin.sin_port, "udp");
if (se == NULL)
+#endif
break;
/* rather not use that port, try again */

View file

@ -1,7 +1,7 @@
# Template file for 'nfs-utils'
pkgname=nfs-utils
version=1.3.3
revision=1
revision=2
short_desc="Network File System utilities"
maintainer="Juan RP <xtraeme@voidlinux.eu>"
license="GPL-2"
@ -11,12 +11,10 @@ checksum=700d689c5622c87953c34102e5befafc4d3c811e676852238f0dd79c9c0c084d
hostmakedepends="pkg-config"
makedepends="libblkid-devel libmount-devel libtirpc-devel
librpcsecgss-devel libnfsidmap-devel keyutils-devel
libevent-devel device-mapper-devel libcap-devel mit-krb5-devel
libblkid-devel sqlite-devel"
libnfsidmap-devel keyutils-devel libevent-devel mit-krb5-devel
libevent-devel device-mapper-devel libcap-devel sqlite-devel"
depends="rpcbind"
conf_files="/etc/exports /etc/idmapd.conf"
replaces="nfs-utils-server>=0"
make_dirs="
/var/lib/nfs/rpc_pipefs 0755 root root
/var/lib/nfs/sm 0750 root root
@ -27,7 +25,7 @@ make_dirs="
do_configure() {
configure_args+=" --with-statduser=nobody --enable-gss --enable-nfsv4
--with-statedir=/var/lib/nfs --enable-libmount-mount
--with-gssglue --without-tcp-wrappers --enable-ipv6
--without-tcp-wrappers --enable-gss --enable-uuid --enable-ipv6
--sbindir=/usr/bin "
./configure ${configure_args} \