summaryrefslogtreecommitdiff
path: root/sys-auth/libnss-nis
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2017-11-18 18:38:22 +0000
committerV3n3RiX <venerix@redcorelinux.org>2017-11-18 18:38:22 +0000
commita5956e0a0daddcad648e0d8d8e5cb3e49e09bda7 (patch)
tree3d2e0a61f348a5299e73ca7c2b236156a8cc79b5 /sys-auth/libnss-nis
parent38f60b3ec9ff175535d9a056a76ae42931e61e21 (diff)
gentoo resync : 18.11.2017
Diffstat (limited to 'sys-auth/libnss-nis')
-rw-r--r--sys-auth/libnss-nis/Manifest4
-rw-r--r--sys-auth/libnss-nis/files/map_v4v6_address.patch112
-rw-r--r--sys-auth/libnss-nis/libnss-nis-1.3.ebuild48
-rw-r--r--sys-auth/libnss-nis/metadata.xml7
4 files changed, 171 insertions, 0 deletions
diff --git a/sys-auth/libnss-nis/Manifest b/sys-auth/libnss-nis/Manifest
new file mode 100644
index 000000000000..fca0d008ec0f
--- /dev/null
+++ b/sys-auth/libnss-nis/Manifest
@@ -0,0 +1,4 @@
+AUX map_v4v6_address.patch 4715 SHA256 034ffcd174338a0aa1b6dcdb31d66315caa2e6eed0435437b293b70bb348f402 SHA512 c562e8e7145cb53ede19eed092fa8c547577c8c49bab52ca749a869a49a5d4c010b48b8dcbe09d8184ce8cb8276c6dfcba0ca2969719f9115d367574046b1540 WHIRLPOOL 81c45ad9bdad5966213168a5e36ce1f5534c7a94899659d4d1977cce340ee9a47d88e7028cf3afd56f4a27a89ceb3758e27ec582fc999b0ea1d01963b1b88b1c
+DIST libnss-nis-1.3.tar.gz 208580 SHA256 ddf49c60b2eb944929d5b7ffe74d6c95f9df0843e68d450cf5ba0f35b59c906d SHA512 d5af3223da2202f2f3168f127980bb6b3f3c5939e2efe4d68fe3d13b6068898be7a64494f2c80a31afa77fb411c8d360519e5d26709d6aebca2bfb2d0c09cd26 WHIRLPOOL a181277f93183fa33abb07c838a03b3e1373d8471577f85083d0e07cb7a9865c383a073df9d5f9700d56d483c1409cb5b4dfaa2194a8d0db3f7fc78620b348ea
+EBUILD libnss-nis-1.3.ebuild 914 SHA256 24b39d75cf612564ee2d0488845c4c219b7af84a13d1fa7a1f5dd2bb87fe8d9e SHA512 f35fb504684920fbdc93b01689b51605cd5e132d77d85334a384783e2bd5b5761144e66ea09d650d421a441b68642e813361912b43b26d04a8068feb04d3bfe8 WHIRLPOOL 37ede184f3d6382e17e5b6a4298c50b7f630da2442371eaeff431bf6de1a825b67cb467c07917e175754b1e84920811f0e4ffa9fb17b7aee8c98fda03e91589f
+MISC metadata.xml 221 SHA256 5f1067fecbad0f03b8f0bda76aa6aeb2334bd0194f44f741df6eb94065fcc34a SHA512 edb14bd2dae6ad57f77c07fc601cf2782589165c7e48e1e123eff7e47044febfdb1e19d18cd0b240fd2ca494e3401b5aa1f1243480769e0faf5dbfa377d20a3b WHIRLPOOL 8d9477151de9fa0453a07cbba0f7e48d800a6a59c62ceb663d89869d0e94c8e92fe8148425d3fe4281fd12a5de40355f2e33ec357efdc4daf282664907370846
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..a11029475e38
--- /dev/null
+++ b/sys-auth/libnss-nis/libnss-nis-1.3.ebuild
@@ -0,0 +1,48 @@
+# 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>