From d3b2e11d9baefdbce2d67d1a915a1be14aeb4c8c Mon Sep 17 00:00:00 2001 From: Christopher Brannon Date: Mon, 10 Oct 2016 08:05:36 -0700 Subject: [PATCH] New package: 9mount-1.3 --- srcpkgs/9mount/INSTALL | 5 +++++ srcpkgs/9mount/patches/no-ipv6-lookup.patch | 25 +++++++++++++++++++++ srcpkgs/9mount/template | 20 +++++++++++++++++ 3 files changed, 50 insertions(+) create mode 100644 srcpkgs/9mount/INSTALL create mode 100644 srcpkgs/9mount/patches/no-ipv6-lookup.patch create mode 100644 srcpkgs/9mount/template diff --git a/srcpkgs/9mount/INSTALL b/srcpkgs/9mount/INSTALL new file mode 100644 index 00000000000..65578373af0 --- /dev/null +++ b/srcpkgs/9mount/INSTALL @@ -0,0 +1,5 @@ +case "${ACTION}" in +post) + chown root:users usr/bin/9bind usr/bin/9mount usr/bin/9umount + chmod 4755 usr/bin/9bind usr/bin/9mount usr/bin/9umount +esac diff --git a/srcpkgs/9mount/patches/no-ipv6-lookup.patch b/srcpkgs/9mount/patches/no-ipv6-lookup.patch new file mode 100644 index 00000000000..7872b2c8bd2 --- /dev/null +++ b/srcpkgs/9mount/patches/no-ipv6-lookup.patch @@ -0,0 +1,25 @@ +# HG changeset patch +# User Michael Gehring +# Date 1397130207 -28800 +# Thu Apr 10 19:43:27 2014 +0800 +# Node ID c6da9cac8d01ae89f50abb9f1a3dbc87ffa1ad38 +# Parent 97da3749d79840828c473fe6498c3e9bd4680ceb +Avoid ipv6 addresses since v9fs only supports ipv4. + +diff -r 97da3749d798 -r c6da9cac8d01 9mount.c +--- 9mount.c Mon Nov 17 17:06:17 2008 +0900 ++++ 9mount.c Thu Apr 10 19:43:27 2014 +0800 +@@ -253,8 +253,12 @@ + + if (strcmp(proto, "tcp") == 0) { + struct addrinfo *ai; ++ struct addrinfo aihints; + int r; +- if ((r=getaddrinfo(addr, NULL, NULL, &ai))) { ++ memset(&aihints, 0, sizeof(aihints)); ++ aihints.ai_family = AF_INET; ++ aihints.ai_socktype = SOCK_STREAM; ++ if ((r=getaddrinfo(addr, NULL, &aihints, &ai))) { + errx(1, "getaddrinfo: %s", gai_strerror(r)); + } + if ((r=getnameinfo(ai->ai_addr, ai->ai_addrlen, buf, diff --git a/srcpkgs/9mount/template b/srcpkgs/9mount/template new file mode 100644 index 00000000000..51422efaf7c --- /dev/null +++ b/srcpkgs/9mount/template @@ -0,0 +1,20 @@ +# Template file for '9mount' +pkgname=9mount +version=1.3 +revision=1 +build_style=gnu-makefile +make_install_args="prefix=\${DESTDIR}/usr" +short_desc="A set of SUID tools for mounting 9p filesystems via v9fs" +maintainer="Christopher Brannon " +license="ISC" +homepage="http://sqweek.net/code/9mount/" +distfiles="http://sqweek.net/9p/$pkgname-$version.tar.gz" +checksum=820d80b9b478d05ecb022ad658477b37cfc2414a8669c3af17d192a522064c17 + +pre_build() { + sed -i '/chown/d' Makefile +} + +post_install() { + vlicense COPYING +}