summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorOliver Giles2018-05-25 13:52:53 +0300
committerOliver Giles2018-05-25 13:52:53 +0300
commitdaacb3c8d70b5e20d4df5d41085534f5ae681ea3 (patch)
tree93bcbf409725dff2cd2039c5a7080d030ba0a29f
parent2d2badcb84f54abf9177cb18b2c98b2cf31dc7a7 (diff)
downloadaur-daacb3c8d70b5e20d4df5d41085534f5ae681ea3.tar.gz
Port to libtirpc
-rw-r--r--.SRCINFO8
-rw-r--r--0001-Compile-fix-for-libtirpc-under-Arch-Linux.patch70
-rw-r--r--PKGBUILD26
3 files changed, 96 insertions, 8 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 885f6199b0f7..db08b2cb8947 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,18 +1,24 @@
+# Generated by mksrcinfo v8
+# Fri May 25 10:52:21 UTC 2018
pkgbase = unfs3
pkgdesc = A user-space implementation of the NFSv3 server specification
pkgver = 0.9.22
- pkgrel = 3
+ pkgrel = 5
url = http://unfs3.sourceforge.net/
arch = i686
arch = x86_64
license = BSD
makedepends = flex
depends = rpcbind
+ depends = flex
+ depends = libtirpc
source = http://downloads.sourceforge.net/project/unfs3/unfs3/0.9.22/unfs3-0.9.22.tar.gz
+ source = 0001-Compile-fix-for-libtirpc-under-Arch-Linux.patch
source = unfsd.conf
source = unfsd
source = unfsd.service
md5sums = ddf679a5d4d80096a59f3affc64f16e5
+ md5sums = b85ec02e508895d490d295a3dd7828c0
md5sums = 7c28cd320ac4868cc6f0ca089fbf2e75
md5sums = e1010b2da0d5fb962112eed243b2b5ed
md5sums = 4dfcdd618b7b2229d9b6082401a52880
diff --git a/0001-Compile-fix-for-libtirpc-under-Arch-Linux.patch b/0001-Compile-fix-for-libtirpc-under-Arch-Linux.patch
new file mode 100644
index 000000000000..7d60b318329d
--- /dev/null
+++ b/0001-Compile-fix-for-libtirpc-under-Arch-Linux.patch
@@ -0,0 +1,70 @@
+From c03355a0056bcdc33f2d47d78b3f8d4caa577625 Mon Sep 17 00:00:00 2001
+From: Oliver Giles <ohw.giles@gmail.com>
+Date: Fri, 25 May 2018 11:13:57 +0300
+Subject: [PATCH] Compile fix for libtirpc under Arch Linux
+
+Arch Linux no longer ships nsl. tirpc provides a backwards-compatible
+implementation. A questionable check for Solaris had to be removed,
+and a call to listen() added which used to be done by glibc.
+---
+ configure.ac | 3 +--
+ daemon.c | 8 ++++++--
+ 2 files changed, 7 insertions(+), 4 deletions(-)
+
+diff --git a/configure.ac b/configure.ac
+index aeec598..5730183 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -10,7 +10,7 @@ AS_IF([test "x$LEX" == "x:"], [
+ AC_PROG_YACC
+ AC_HEADER_STDC
+ AC_SYS_LARGEFILE
+-AC_SEARCH_LIBS(xdr_int, nsl)
++AC_SEARCH_LIBS(xdr_int, tirpc)
+ AC_SEARCH_LIBS(socket, socket)
+ AC_SEARCH_LIBS(inet_aton, resolv)
+ AC_CHECK_HEADERS(mntent.h,,,[#include <stdio.h>])
+@@ -37,7 +37,6 @@ AC_CHECK_FUNCS(setresuid setresgid)
+ AC_CHECK_FUNCS(vsyslog)
+ AC_CHECK_FUNCS(lchown)
+ AC_CHECK_FUNCS(setgroups)
+-UNFS3_SOLARIS_RPC
+ UNFS3_PORTMAP_DEFINE
+ UNFS3_COMPILE_WARNINGS
+
+diff --git a/daemon.c b/daemon.c
+index 87c32d1..4f368b3 100644
+--- a/daemon.c
++++ b/daemon.c
+@@ -113,7 +113,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;
+ }
+
+ /*
+@@ -121,7 +121,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;
+ }
+
+ /*
+@@ -789,6 +789,10 @@ static SVCXPRT *create_tcp_transport(unsigned int port)
+ fprintf(stderr, "Couldn't bind to tcp port %d\n", port);
+ exit(1);
+ }
++ if (listen(sock, SOMAXCONN) != 0) {
++ perror("listen");
++ exit(1);
++ }
+ }
+
+ transp = svctcp_create(sock, 0, 0);
+--
+2.17.0
+
diff --git a/PKGBUILD b/PKGBUILD
index 55e6e1811242..d100ca16bc3c 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,18 +1,32 @@
pkgname=unfs3
pkgver=0.9.22
-pkgrel=4
+pkgrel=5
pkgdesc="A user-space implementation of the NFSv3 server specification"
arch=('i686' 'x86_64')
url="http://unfs3.sourceforge.net/"
license=("BSD")
makedepends=("flex")
-depends=('rpcbind' 'flex')
-source=("http://downloads.sourceforge.net/project/$pkgname/$pkgname/$pkgver/$pkgname-$pkgver.tar.gz" "unfsd.conf" "unfsd" "unfsd.service")
-md5sums=('ddf679a5d4d80096a59f3affc64f16e5' '7c28cd320ac4868cc6f0ca089fbf2e75' 'e1010b2da0d5fb962112eed243b2b5ed' '4dfcdd618b7b2229d9b6082401a52880')
+depends=('rpcbind' 'flex' 'libtirpc')
+source=("http://downloads.sourceforge.net/project/$pkgname/$pkgname/$pkgver/$pkgname-$pkgver.tar.gz"
+ "0001-Compile-fix-for-libtirpc-under-Arch-Linux.patch"
+ "unfsd.conf"
+ "unfsd"
+ "unfsd.service")
+md5sums=('ddf679a5d4d80096a59f3affc64f16e5'
+ 'b85ec02e508895d490d295a3dd7828c0'
+ '7c28cd320ac4868cc6f0ca089fbf2e75'
+ 'e1010b2da0d5fb962112eed243b2b5ed'
+ '4dfcdd618b7b2229d9b6082401a52880')
+
+prepare() {
+ cd "${srcdir}/${pkgname}-${pkgver}"
+ patch -p1 < "../0001-Compile-fix-for-libtirpc-under-Arch-Linux.patch"
+}
build() {
cd "${srcdir}/${pkgname}-${pkgver}"
- ./configure --prefix=/usr --sbindir=/usr/bin
+ ./bootstrap
+ ./configure CFLAGS="$CFLAGS -I/usr/include/tirpc" --prefix=/usr --sbindir=/usr/bin
make
}
@@ -26,5 +40,3 @@ package() {
install -Dm644 unfsd.conf "$pkgdir/etc/conf.d/unfsd.conf"
install -Dm644 unfsd.service "$pkgdir/usr/lib/systemd/system/unfsd.service"
}
-
-