1 |
commit: 7cf52c674ca56d22b039982de815439c0d102bf2 |
2 |
Author: Mike Gilbert <floppym <AT> gentoo <DOT> org> |
3 |
AuthorDate: Fri Nov 17 19:13:26 2017 +0000 |
4 |
Commit: Andreas Hüttel <dilfridge <AT> gentoo <DOT> org> |
5 |
CommitDate: Fri Nov 17 23:20:43 2017 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=7cf52c67 |
7 |
|
8 |
sys-auth/libnss-nis: new package |
9 |
|
10 |
(Note added- I've made it install into /usr for the moment. dilfridge) |
11 |
|
12 |
Bug: https://bugs.gentoo.org/637946 |
13 |
Closes: https://github.com/gentoo/gentoo/pull/6214 |
14 |
Package-Manager: Portage-2.3.14_p5, Repoman-2.3.6 |
15 |
|
16 |
sys-auth/libnss-nis/Manifest | 1 + |
17 |
sys-auth/libnss-nis/files/map_v4v6_address.patch | 112 +++++++++++++++++++++++ |
18 |
sys-auth/libnss-nis/libnss-nis-1.3.ebuild | 49 ++++++++++ |
19 |
sys-auth/libnss-nis/metadata.xml | 7 ++ |
20 |
4 files changed, 169 insertions(+) |
21 |
|
22 |
diff --git a/sys-auth/libnss-nis/Manifest b/sys-auth/libnss-nis/Manifest |
23 |
new file mode 100644 |
24 |
index 00000000000..49a50549026 |
25 |
--- /dev/null |
26 |
+++ b/sys-auth/libnss-nis/Manifest |
27 |
@@ -0,0 +1 @@ |
28 |
+DIST libnss-nis-1.3.tar.gz 208580 SHA256 ddf49c60b2eb944929d5b7ffe74d6c95f9df0843e68d450cf5ba0f35b59c906d SHA512 d5af3223da2202f2f3168f127980bb6b3f3c5939e2efe4d68fe3d13b6068898be7a64494f2c80a31afa77fb411c8d360519e5d26709d6aebca2bfb2d0c09cd26 WHIRLPOOL a181277f93183fa33abb07c838a03b3e1373d8471577f85083d0e07cb7a9865c383a073df9d5f9700d56d483c1409cb5b4dfaa2194a8d0db3f7fc78620b348ea |
29 |
|
30 |
diff --git a/sys-auth/libnss-nis/files/map_v4v6_address.patch b/sys-auth/libnss-nis/files/map_v4v6_address.patch |
31 |
new file mode 100644 |
32 |
index 00000000000..85a69d71c5b |
33 |
--- /dev/null |
34 |
+++ b/sys-auth/libnss-nis/files/map_v4v6_address.patch |
35 |
@@ -0,0 +1,112 @@ |
36 |
+From df903b621d4010c94129455a3f8d91d66f0fcd1f Mon Sep 17 00:00:00 2001 |
37 |
+From: Mike Gilbert <floppym@g.o> |
38 |
+Date: Fri, 17 Nov 2017 13:44:10 -0500 |
39 |
+Subject: [PATCH] Copy the map_v4v6_address function from glibc |
40 |
+ |
41 |
+Fixes: https://github.com/thkukuk/libnss_nis/issues/1 |
42 |
+--- |
43 |
+ src/Makefile.am | 3 ++- |
44 |
+ src/map_v4v6_address.h | 68 ++++++++++++++++++++++++++++++++++++++++++++++++++ |
45 |
+ src/nis-hosts.c | 3 +-- |
46 |
+ 3 files changed, 71 insertions(+), 3 deletions(-) |
47 |
+ create mode 100644 src/map_v4v6_address.h |
48 |
+ |
49 |
+diff --git a/src/Makefile.am b/src/Makefile.am |
50 |
+index 9eb3d35..56108aa 100644 |
51 |
+--- a/src/Makefile.am |
52 |
++++ b/src/Makefile.am |
53 |
+@@ -27,4 +27,5 @@ libnss_nis_la_LIBADD = @LIBNSL_LIBS@ |
54 |
+ libnss_nis_la_SOURCES = nis-alias.c nis-ethers.c nis-grp.c nis-hosts.c \ |
55 |
+ nis-initgroups.c nis-netgrp.c nis-network.c \ |
56 |
+ nis-proto.c nis-publickey.c nis-pwd.c nis-rpc.c \ |
57 |
+- nis-service.c nis-spwd.c nss-nis.c nss-default.c |
58 |
++ nis-service.c nis-spwd.c nss-nis.c nss-default.c \ |
59 |
++ map_v4v6_address.h |
60 |
+diff --git a/src/map_v4v6_address.h b/src/map_v4v6_address.h |
61 |
+new file mode 100644 |
62 |
+index 0000000..d9a46c9 |
63 |
+--- /dev/null |
64 |
++++ b/src/map_v4v6_address.h |
65 |
+@@ -0,0 +1,68 @@ |
66 |
++/* |
67 |
++ * ++Copyright++ 1985, 1988, 1993 |
68 |
++ * - |
69 |
++ * Copyright (c) 1985, 1988, 1993 |
70 |
++ * The Regents of the University of California. All rights reserved. |
71 |
++ * |
72 |
++ * Redistribution and use in source and binary forms, with or without |
73 |
++ * modification, are permitted provided that the following conditions |
74 |
++ * are met: |
75 |
++ * 1. Redistributions of source code must retain the above copyright |
76 |
++ * notice, this list of conditions and the following disclaimer. |
77 |
++ * 2. Redistributions in binary form must reproduce the above copyright |
78 |
++ * notice, this list of conditions and the following disclaimer in the |
79 |
++ * documentation and/or other materials provided with the distribution. |
80 |
++ * 4. Neither the name of the University nor the names of its contributors |
81 |
++ * may be used to endorse or promote products derived from this software |
82 |
++ * without specific prior written permission. |
83 |
++ * |
84 |
++ * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND |
85 |
++ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE |
86 |
++ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE |
87 |
++ * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE |
88 |
++ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL |
89 |
++ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS |
90 |
++ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) |
91 |
++ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT |
92 |
++ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY |
93 |
++ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF |
94 |
++ * SUCH DAMAGE. |
95 |
++ * - |
96 |
++ * Portions Copyright (c) 1993 by Digital Equipment Corporation. |
97 |
++ * |
98 |
++ * Permission to use, copy, modify, and distribute this software for any |
99 |
++ * purpose with or without fee is hereby granted, provided that the above |
100 |
++ * copyright notice and this permission notice appear in all copies, and that |
101 |
++ * the name of Digital Equipment Corporation not be used in advertising or |
102 |
++ * publicity pertaining to distribution of the document or software without |
103 |
++ * specific, written prior permission. |
104 |
++ * |
105 |
++ * THE SOFTWARE IS PROVIDED "AS IS" AND DIGITAL EQUIPMENT CORP. DISCLAIMS ALL |
106 |
++ * WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES |
107 |
++ * OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL DIGITAL EQUIPMENT |
108 |
++ * CORPORATION BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL |
109 |
++ * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR |
110 |
++ * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS |
111 |
++ * ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS |
112 |
++ * SOFTWARE. |
113 |
++ * - |
114 |
++ * --Copyright-- |
115 |
++ */ |
116 |
++ |
117 |
++static void |
118 |
++map_v4v6_address (const char *src, char *dst) |
119 |
++{ |
120 |
++ u_char *p = (u_char *)dst; |
121 |
++ char tmp[INADDRSZ]; |
122 |
++ int i; |
123 |
++ |
124 |
++ /* Stash a temporary copy so our caller can update in place. */ |
125 |
++ memcpy(tmp, src, INADDRSZ); |
126 |
++ /* Mark this ipv6 addr as a mapped ipv4. */ |
127 |
++ for (i = 0; i < 10; i++) |
128 |
++ *p++ = 0x00; |
129 |
++ *p++ = 0xff; |
130 |
++ *p++ = 0xff; |
131 |
++ /* Retrieve the saved copy and we're done. */ |
132 |
++ memcpy((void*)p, tmp, INADDRSZ); |
133 |
++} |
134 |
+diff --git a/src/nis-hosts.c b/src/nis-hosts.c |
135 |
+index ef6bb47..53ab965 100644 |
136 |
+--- a/src/nis-hosts.c |
137 |
++++ b/src/nis-hosts.c |
138 |
+@@ -35,8 +35,7 @@ |
139 |
+ #include "libc-lock.h" |
140 |
+ #include "nss-nis.h" |
141 |
+ |
142 |
+-/* Get implementation for some internal functions. */ |
143 |
+-#include <resolv/mapv4v6addr.h> |
144 |
++#include "map_v4v6_address.h" |
145 |
+ |
146 |
+ #define ENTNAME hostent |
147 |
+ #define DATABASE "hosts" |
148 |
|
149 |
diff --git a/sys-auth/libnss-nis/libnss-nis-1.3.ebuild b/sys-auth/libnss-nis/libnss-nis-1.3.ebuild |
150 |
new file mode 100644 |
151 |
index 00000000000..77a404b8bca |
152 |
--- /dev/null |
153 |
+++ b/sys-auth/libnss-nis/libnss-nis-1.3.ebuild |
154 |
@@ -0,0 +1,49 @@ |
155 |
+# Copyright 1999-2017 Gentoo Foundation |
156 |
+# Distributed under the terms of the GNU General Public License v2 |
157 |
+ |
158 |
+EAPI=6 |
159 |
+ |
160 |
+inherit autotools multilib-minimal |
161 |
+ |
162 |
+DESCRIPTION="NSS module to provide NIS support" |
163 |
+HOMEPAGE="https://github.com/thkukuk/libnss_nis" |
164 |
+SRC_URI="https://github.com/thkukuk/libnss_nis/archive/libnss_nis-${PV}.tar.gz -> ${P}.tar.gz" |
165 |
+ |
166 |
+LICENSE="LGPL-2.1+ BSD ISC" |
167 |
+SLOT="0" |
168 |
+KEYWORDS="~amd64" |
169 |
+IUSE="" |
170 |
+ |
171 |
+RDEPEND=" |
172 |
+ net-libs/libnsl:0=[${MULTILIB_USEDEP}] |
173 |
+ net-libs/libtirpc:0=[${MULTILIB_USEDEP}] |
174 |
+ !<sys-libs/glibc-2.26 |
175 |
+" |
176 |
+DEPEND="${RDEPEND} |
177 |
+ virtual/pkgconfig |
178 |
+" |
179 |
+ |
180 |
+S=${WORKDIR}/libnss_nis-libnss_nis-${PV} |
181 |
+ |
182 |
+PATCHES=( |
183 |
+ "${FILESDIR}/map_v4v6_address.patch" |
184 |
+) |
185 |
+ |
186 |
+src_prepare() { |
187 |
+ default |
188 |
+ eautoreconf |
189 |
+} |
190 |
+ |
191 |
+multilib_src_configure() { |
192 |
+ local myconf=( |
193 |
+ --enable-shared |
194 |
+ --disable-static |
195 |
+ ) |
196 |
+ ECONF_SOURCE=${S} econf "${myconf[@]}" |
197 |
+} |
198 |
+ |
199 |
+multilib_src_install_all() { |
200 |
+ einstalldocs |
201 |
+ find "${ED}" -name '*.la' -delete || die |
202 |
+} |
203 |
+ |
204 |
|
205 |
diff --git a/sys-auth/libnss-nis/metadata.xml b/sys-auth/libnss-nis/metadata.xml |
206 |
new file mode 100644 |
207 |
index 00000000000..fa331094dd3 |
208 |
--- /dev/null |
209 |
+++ b/sys-auth/libnss-nis/metadata.xml |
210 |
@@ -0,0 +1,7 @@ |
211 |
+<?xml version="1.0" encoding="UTF-8"?> |
212 |
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> |
213 |
+<pkgmetadata> |
214 |
+ <maintainer type="project"> |
215 |
+ <email>toolchain@g.o</email> |
216 |
+ </maintainer> |
217 |
+</pkgmetadata> |