summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Gilbert <floppym@gentoo.org>2017-11-17 14:13:26 -0500
committerAndreas K. Hüttel <dilfridge@gentoo.org>2017-11-18 00:20:43 +0100
commit7cf52c674ca56d22b039982de815439c0d102bf2 (patch)
tree1a68a3ba0e8329119f625841a1c046610ea60df6 /sys-auth/libnss-nis
parentapp-arch/afio: Update HOMEPAGE (diff)
downloadgentoo-7cf52c674ca56d22b039982de815439c0d102bf2.tar.gz
gentoo-7cf52c674ca56d22b039982de815439c0d102bf2.tar.bz2
gentoo-7cf52c674ca56d22b039982de815439c0d102bf2.zip
sys-auth/libnss-nis: new package
(Note added- I've made it install into /usr for the moment. dilfridge) Bug: https://bugs.gentoo.org/637946 Closes: https://github.com/gentoo/gentoo/pull/6214 Package-Manager: Portage-2.3.14_p5, Repoman-2.3.6
Diffstat (limited to 'sys-auth/libnss-nis')
-rw-r--r--sys-auth/libnss-nis/Manifest1
-rw-r--r--sys-auth/libnss-nis/files/map_v4v6_address.patch112
-rw-r--r--sys-auth/libnss-nis/libnss-nis-1.3.ebuild49
-rw-r--r--sys-auth/libnss-nis/metadata.xml7
4 files changed, 169 insertions, 0 deletions
diff --git a/sys-auth/libnss-nis/Manifest b/sys-auth/libnss-nis/Manifest
new file mode 100644
index 000000000000..49a505490266
--- /dev/null
+++ b/sys-auth/libnss-nis/Manifest
@@ -0,0 +1 @@
+DIST libnss-nis-1.3.tar.gz 208580 SHA256 ddf49c60b2eb944929d5b7ffe74d6c95f9df0843e68d450cf5ba0f35b59c906d SHA512 d5af3223da2202f2f3168f127980bb6b3f3c5939e2efe4d68fe3d13b6068898be7a64494f2c80a31afa77fb411c8d360519e5d26709d6aebca2bfb2d0c09cd26 WHIRLPOOL a181277f93183fa33abb07c838a03b3e1373d8471577f85083d0e07cb7a9865c383a073df9d5f9700d56d483c1409cb5b4dfaa2194a8d0db3f7fc78620b348ea
diff --git a/sys-auth/libnss-nis/files/map_v4v6_address.patch b/sys-auth/libnss-nis/files/map_v4v6_address.patch
new file mode 100644
index 000000000000..85a69d71c5bc
--- /dev/null
+++ b/sys-auth/libnss-nis/files/map_v4v6_address.patch
@@ -0,0 +1,112 @@
+From df903b621d4010c94129455a3f8d91d66f0fcd1f Mon Sep 17 00:00:00 2001
+From: Mike Gilbert <floppym@gentoo.org>
+Date: Fri, 17 Nov 2017 13:44:10 -0500
+Subject: [PATCH] Copy the map_v4v6_address function from glibc
+
+Fixes: https://github.com/thkukuk/libnss_nis/issues/1
+---
+ src/Makefile.am | 3 ++-
+ src/map_v4v6_address.h | 68 ++++++++++++++++++++++++++++++++++++++++++++++++++
+ src/nis-hosts.c | 3 +--
+ 3 files changed, 71 insertions(+), 3 deletions(-)
+ create mode 100644 src/map_v4v6_address.h
+
+diff --git a/src/Makefile.am b/src/Makefile.am
+index 9eb3d35..56108aa 100644
+--- a/src/Makefile.am
++++ b/src/Makefile.am
+@@ -27,4 +27,5 @@ libnss_nis_la_LIBADD = @LIBNSL_LIBS@
+ libnss_nis_la_SOURCES = nis-alias.c nis-ethers.c nis-grp.c nis-hosts.c \
+ nis-initgroups.c nis-netgrp.c nis-network.c \
+ nis-proto.c nis-publickey.c nis-pwd.c nis-rpc.c \
+- nis-service.c nis-spwd.c nss-nis.c nss-default.c
++ nis-service.c nis-spwd.c nss-nis.c nss-default.c \
++ map_v4v6_address.h
+diff --git a/src/map_v4v6_address.h b/src/map_v4v6_address.h
+new file mode 100644
+index 0000000..d9a46c9
+--- /dev/null
++++ b/src/map_v4v6_address.h
+@@ -0,0 +1,68 @@
++/*
++ * ++Copyright++ 1985, 1988, 1993
++ * -
++ * Copyright (c) 1985, 1988, 1993
++ * The Regents of the University of California. All rights reserved.
++ *
++ * Redistribution and use in source and binary forms, with or without
++ * modification, are permitted provided that the following conditions
++ * are met:
++ * 1. Redistributions of source code must retain the above copyright
++ * notice, this list of conditions and the following disclaimer.
++ * 2. 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.
++ * 4. Neither the name of the University 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 REGENTS 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 REGENTS 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.
++ * -
++ * Portions Copyright (c) 1993 by Digital Equipment Corporation.
++ *
++ * Permission to use, copy, modify, and distribute this software for any
++ * purpose with or without fee is hereby granted, provided that the above
++ * copyright notice and this permission notice appear in all copies, and that
++ * the name of Digital Equipment Corporation not be used in advertising or
++ * publicity pertaining to distribution of the document or software without
++ * specific, written prior permission.
++ *
++ * THE SOFTWARE IS PROVIDED "AS IS" AND DIGITAL EQUIPMENT CORP. DISCLAIMS ALL
++ * WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES
++ * OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL DIGITAL EQUIPMENT
++ * CORPORATION BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
++ * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
++ * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
++ * ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
++ * SOFTWARE.
++ * -
++ * --Copyright--
++ */
++
++static void
++map_v4v6_address (const char *src, char *dst)
++{
++ u_char *p = (u_char *)dst;
++ char tmp[INADDRSZ];
++ int i;
++
++ /* Stash a temporary copy so our caller can update in place. */
++ memcpy(tmp, src, INADDRSZ);
++ /* Mark this ipv6 addr as a mapped ipv4. */
++ for (i = 0; i < 10; i++)
++ *p++ = 0x00;
++ *p++ = 0xff;
++ *p++ = 0xff;
++ /* Retrieve the saved copy and we're done. */
++ memcpy((void*)p, tmp, INADDRSZ);
++}
+diff --git a/src/nis-hosts.c b/src/nis-hosts.c
+index ef6bb47..53ab965 100644
+--- a/src/nis-hosts.c
++++ b/src/nis-hosts.c
+@@ -35,8 +35,7 @@
+ #include "libc-lock.h"
+ #include "nss-nis.h"
+
+-/* Get implementation for some internal functions. */
+-#include <resolv/mapv4v6addr.h>
++#include "map_v4v6_address.h"
+
+ #define ENTNAME hostent
+ #define DATABASE "hosts"
diff --git a/sys-auth/libnss-nis/libnss-nis-1.3.ebuild b/sys-auth/libnss-nis/libnss-nis-1.3.ebuild
new file mode 100644
index 000000000000..77a404b8bca1
--- /dev/null
+++ b/sys-auth/libnss-nis/libnss-nis-1.3.ebuild
@@ -0,0 +1,49 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit autotools multilib-minimal
+
+DESCRIPTION="NSS module to provide NIS support"
+HOMEPAGE="https://github.com/thkukuk/libnss_nis"
+SRC_URI="https://github.com/thkukuk/libnss_nis/archive/libnss_nis-${PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="LGPL-2.1+ BSD ISC"
+SLOT="0"
+KEYWORDS="~amd64"
+IUSE=""
+
+RDEPEND="
+ net-libs/libnsl:0=[${MULTILIB_USEDEP}]
+ net-libs/libtirpc:0=[${MULTILIB_USEDEP}]
+ !<sys-libs/glibc-2.26
+"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig
+"
+
+S=${WORKDIR}/libnss_nis-libnss_nis-${PV}
+
+PATCHES=(
+ "${FILESDIR}/map_v4v6_address.patch"
+)
+
+src_prepare() {
+ default
+ eautoreconf
+}
+
+multilib_src_configure() {
+ local myconf=(
+ --enable-shared
+ --disable-static
+ )
+ ECONF_SOURCE=${S} econf "${myconf[@]}"
+}
+
+multilib_src_install_all() {
+ einstalldocs
+ find "${ED}" -name '*.la' -delete || die
+}
+
diff --git a/sys-auth/libnss-nis/metadata.xml b/sys-auth/libnss-nis/metadata.xml
new file mode 100644
index 000000000000..fa331094dd33
--- /dev/null
+++ b/sys-auth/libnss-nis/metadata.xml
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="project">
+ <email>toolchain@gentoo.org</email>
+ </maintainer>
+</pkgmetadata>