aboutsummaryrefslogtreecommitdiffstats
path: root/main/libtirpc
diff options
context:
space:
mode:
authorNatanael Copa <ncopa@alpinelinux.org>2015-09-18 10:13:45 +0200
committerNatanael Copa <ncopa@alpinelinux.org>2015-09-18 10:58:18 +0200
commit44e8828165d3ea92a6e786ce4308b7da462a1c4c (patch)
tree67e7ee13f8dce89853e706cde9cae6493a67dc7a /main/libtirpc
parentb3821f7c9c8cf0a092f53cafbde531d1f8427af9 (diff)
downloadaports-44e8828165d3ea92a6e786ce4308b7da462a1c4c.tar.bz2
aports-44e8828165d3ea92a6e786ce4308b7da462a1c4c.tar.xz
main/libtirpc: upgrade to 0.3.2
Diffstat (limited to 'main/libtirpc')
-rw-r--r--main/libtirpc/APKBUILD22
-rw-r--r--main/libtirpc/musl-fixes.patch172
2 files changed, 185 insertions, 9 deletions
diff --git a/main/libtirpc/APKBUILD b/main/libtirpc/APKBUILD
index 4b2bd590ed..4ffe4c41dd 100644
--- a/main/libtirpc/APKBUILD
+++ b/main/libtirpc/APKBUILD
@@ -1,7 +1,7 @@
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=libtirpc
-pkgver=0.3.1
-pkgrel=1
+pkgver=0.3.2
+pkgrel=0
pkgdesc="Transport Independent RPC library (SunRPC replacement)"
url="http://libtirpc.sourceforge.net/"
arch="all"
@@ -12,6 +12,7 @@ makedepends="$depends_dev autoconf automake libtool linux-headers"
subpackages="$pkgname-dev $pkgname-doc $pkgname-dbg"
source="http://downloads.sourceforge.net/sourceforge/$pkgname/$pkgname-$pkgver.tar.bz2
nis.h
+ musl-fixes.patch
"
prepare() {
@@ -29,6 +30,7 @@ prepare() {
;;
esac
done
+ autoreconf -vif || return 1
}
build() {
@@ -38,7 +40,6 @@ build() {
--host=$CHOST \
--prefix=/usr \
--sysconf=/etc \
- --disable-authdes \
|| return 1
make || return 1
}
@@ -48,9 +49,12 @@ package() {
make DESTDIR="$pkgdir" install || return 1
}
-md5sums="bf1905c13cdfc232ee0cf117c74d4a5b libtirpc-0.3.1.tar.bz2
-821394d42c2a666d9b69452b4cc444b5 nis.h"
-sha256sums="a8838fe180deb8a6f6e491ee665325a28dee4100ec6b1f0b86d611dbfe3a2bb8 libtirpc-0.3.1.tar.bz2
-82657302b530628afd5866b76fc338956ca011d11e995cf6dea5d8b0493278eb nis.h"
-sha512sums="31b0a00a5390e418ab909e02fb67cbe31bef3326ee0105b2d9dc3ed93270a86e30d4cd618335af01be6b4da4bea215c111b9bead0d8d3e225c2e1d1b2f1e76a3 libtirpc-0.3.1.tar.bz2
-83be3277aa7539d454273d7579827ff09e6b927e21de0af8a9290733b4bdfdcebfef26c9faffffd005a7631eae8beb4db9f60787f08db92fdd140686fe160c47 nis.h"
+md5sums="373d5ad46b1d19759ec763a9f0afcf4d libtirpc-0.3.2.tar.bz2
+821394d42c2a666d9b69452b4cc444b5 nis.h
+80b104bc7c7ec96825120aaf38c44693 musl-fixes.patch"
+sha256sums="2008a379f37f2c5d5a87a568b06707422cc3e4f5da305f7fb71f3f4c6d473ffc libtirpc-0.3.2.tar.bz2
+82657302b530628afd5866b76fc338956ca011d11e995cf6dea5d8b0493278eb nis.h
+c9790cfd760fb6ee96e18cc224055a96c2533ef22c1175ad9e019e7e8289b607 musl-fixes.patch"
+sha512sums="f7a58826f0d873e3d67238ff723d6edcdcc00d64daee26c7ec1c967b237e555b0c73aa5baedab9573c0c0799ac4b652956f2bbe4aad247dfbeb7e3da0942a030 libtirpc-0.3.2.tar.bz2
+83be3277aa7539d454273d7579827ff09e6b927e21de0af8a9290733b4bdfdcebfef26c9faffffd005a7631eae8beb4db9f60787f08db92fdd140686fe160c47 nis.h
+8f9c434a7ed5cf08616ea9133bbb812d58be6964e616e3f4ee0e0794df9b04bb42399e55d17a81fe696d3d39738afccab2060a32128a92bbee8356b5e8a4ad12 musl-fixes.patch"
diff --git a/main/libtirpc/musl-fixes.patch b/main/libtirpc/musl-fixes.patch
new file mode 100644
index 0000000000..421ccb0db3
--- /dev/null
+++ b/main/libtirpc/musl-fixes.patch
@@ -0,0 +1,172 @@
+diff --git a/configure.ac b/configure.ac
+index 99a0d33..efe3f3a 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -45,7 +45,7 @@ AC_HEADER_DIRENT
+ AC_PREFIX_DEFAULT(/usr)
+ AC_CHECK_HEADERS([arpa/inet.h fcntl.h libintl.h limits.h locale.h netdb.h netinet/in.h stddef.h stdint.h stdlib.h string.h sys/ioctl.h sys/param.h sys/socket.h sys/time.h syslog.h unistd.h features.h gssapi/gssapi_ext.h])
+ AC_CHECK_LIB([pthread], [pthread_create])
+-AC_CHECK_FUNCS([getrpcbyname getrpcbynumber setrpcent endrpcent getrpcent])
++AC_CHECK_FUNCS([getrpcbyname getrpcbynumber setrpcent endrpcent getrpcent cbc_crypt ecb_crypt])
+
+ AC_CONFIG_FILES([Makefile src/Makefile man/Makefile doc/Makefile])
+ AC_OUTPUT(libtirpc.pc)
+diff --git a/src/Makefile.am b/src/Makefile.am
+index 6cc567a..4ed1a55 100644
+--- a/src/Makefile.am
++++ b/src/Makefile.am
+@@ -51,7 +51,7 @@ libtirpc_la_SOURCES = auth_none.c auth_unix.c authunix_prot.c bindresvport.c cln
+ rpc_callmsg.c rpc_generic.c rpc_soc.c rpcb_clnt.c rpcb_prot.c \
+ rpcb_st_xdr.c svc.c svc_auth.c svc_dg.c svc_auth_unix.c svc_auth_none.c \
+ svc_generic.c svc_raw.c svc_run.c svc_simple.c svc_vc.c getpeereid.c \
+- auth_time.c auth_des.c authdes_prot.c debug.c
++ auth_time.c auth_des.c authdes_prot.c debug.c des_crypt.c
+
+ ## XDR
+ libtirpc_la_SOURCES += xdr.c xdr_rec.c xdr_array.c xdr_float.c xdr_mem.c xdr_reference.c xdr_stdio.c
+@@ -69,7 +69,7 @@ if GSS
+ endif
+
+ libtirpc_la_SOURCES += key_call.c key_prot_xdr.c getpublickey.c
+-libtirpc_la_SOURCES += netname.c netnamer.c rtime.c
++libtirpc_la_SOURCES += netname.c netnamer.c rtime.c rpcdname.c
+
+ CLEANFILES = cscope.* *~
+ DISTCLEANFILES = Makefile.in
+diff --git a/src/des_crypt.c b/src/des_crypt.c
+index 1d1badd..0aff4d5 100644
+--- a/src/des_crypt.c
++++ b/src/des_crypt.c
+@@ -67,6 +67,7 @@ static int common_crypt( char *, char *, unsigned, unsigned, struct desparams *
+ /*
+ * CBC mode encryption
+ */
++#ifndef HAVE_CBC_CRYPT
+ int
+ cbc_crypt(key, buf, len, mode, ivec)
+ char *key;
+@@ -89,11 +90,13 @@ cbc_crypt(key, buf, len, mode, ivec)
+ COPY8(dp.des_ivec, ivec);
+ return(err);
+ }
++#endif
+
+
+ /*
+ * ECB mode encryption
+ */
++#ifndef HAVE_ECB_CRYPT
+ int
+ ecb_crypt(key, buf, len, mode)
+ char *key;
+@@ -111,12 +114,14 @@ ecb_crypt(key, buf, len, mode)
+ #endif
+ return(common_crypt(key, buf, len, mode, &dp));
+ }
++#endif
+
+
+
+ /*
+ * Common code to cbc_crypt() & ecb_crypt()
+ */
++#if !defined(HAVE_CBC_CRYPT) || !defined(HAVE_ECB_CRYPT)
+ static int
+ common_crypt(key, buf, len, mode, desp)
+ char *key;
+@@ -144,3 +149,4 @@ common_crypt(key, buf, len, mode, desp)
+
+ return(desdev == DES_SW ? DESERR_NONE : DESERR_NOHWDEVICE);
+ }
++#endif
+diff --git a/src/getpublickey.c b/src/getpublickey.c
+index 764a5f9..a09acb7 100644
+--- a/src/getpublickey.c
++++ b/src/getpublickey.c
+@@ -38,8 +38,6 @@
+ #include <pwd.h>
+ #include <rpc/rpc.h>
+ #include <rpc/key_prot.h>
+-#include <rpcsvc/yp_prot.h>
+-#include <rpcsvc/ypclnt.h>
+ #include <string.h>
+ #include <stdlib.h>
+
+diff --git a/src/rpcdname.c b/src/rpcdname.c
+new file mode 100644
+index 0000000..3e6a988
+--- /dev/null
++++ b/src/rpcdname.c
+@@ -0,0 +1,72 @@
++/*
++ * Copyright (c) 2009, Sun Microsystems, Inc.
++ * All rights reserved.
++ *
++ * Redistribution and use in source and binary forms, with or without
++ * modification, are permitted provided that the following conditions are met:
++ * - Redistributions of source code must retain the above copyright notice,
++ * this list of conditions and the following disclaimer.
++ * - Redistributions in binary form must reproduce the above copyright notice,
++ * this list of conditions and the following disclaimer in the documentation
++ * and/or other materials provided with the distribution.
++ * - Neither the name of Sun Microsystems, Inc. nor the names of its
++ * contributors may be used to endorse or promote products derived
++ * from this software without specific prior written permission.
++ *
++ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
++ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
++ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
++ * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
++ * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
++ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
++ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
++ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
++ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
++ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
++ * POSSIBILITY OF SUCH DAMAGE.
++ */
++
++/*
++ * rpcdname.c
++ * Gets the default domain name
++ */
++
++#include <stdlib.h>
++#include <unistd.h>
++#include <string.h>
++
++static char *default_domain = 0;
++
++static char *
++get_default_domain()
++{
++ char temp[256];
++
++ if (default_domain)
++ return (default_domain);
++ if (getdomainname(temp, sizeof(temp)) < 0)
++ return (0);
++ if ((int) strlen(temp) > 0) {
++ default_domain = (char *)malloc((strlen(temp)+(unsigned)1));
++ if (default_domain == 0)
++ return (0);
++ (void) strcpy(default_domain, temp);
++ return (default_domain);
++ }
++ return (0);
++}
++
++/*
++ * This is a wrapper for the system call getdomainname which returns a
++ * ypclnt.h error code in the failure case. It also checks to see that
++ * the domain name is non-null, knowing that the null string is going to
++ * get rejected elsewhere in the NIS client package.
++ */
++int
++__rpc_get_default_domain(domain)
++ char **domain;
++{
++ if ((*domain = get_default_domain()) != 0)
++ return (0);
++ return (-1);
++}