1 |
commit: 43f2e7c459fc2ff7c3bc41728898c48532203005 |
2 |
Author: Lars Wendler <polynomial-c <AT> gentoo <DOT> org> |
3 |
AuthorDate: Wed Mar 21 08:15:28 2018 +0000 |
4 |
Commit: Lars Wendler <polynomial-c <AT> gentoo <DOT> org> |
5 |
CommitDate: Wed Mar 21 08:15:28 2018 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=43f2e7c4 |
7 |
|
8 |
net-libs/libnfsidmap: Bump to version 0.27 |
9 |
|
10 |
Package-Manager: Portage-2.3.24, Repoman-2.3.6 |
11 |
|
12 |
net-libs/libnfsidmap/Manifest | 1 + |
13 |
.../files/libnfsidmap-0.27-getgrouplist.patch | 115 +++++++++++++++++++++ |
14 |
net-libs/libnfsidmap/libnfsidmap-0.27.ebuild | 57 ++++++++++ |
15 |
3 files changed, 173 insertions(+) |
16 |
|
17 |
diff --git a/net-libs/libnfsidmap/Manifest b/net-libs/libnfsidmap/Manifest |
18 |
index f8bd1fdf50c..5ebc397e543 100644 |
19 |
--- a/net-libs/libnfsidmap/Manifest |
20 |
+++ b/net-libs/libnfsidmap/Manifest |
21 |
@@ -1,2 +1,3 @@ |
22 |
DIST libnfsidmap-0.24.tar.gz 328720 BLAKE2B 4b33a589b9d4b47530d2044a0912481dfda770de86f7aa90e80771f2df4b555857535a7f162a485b68c9b1d48be563d246e128fa3ca1e3c79d9bf0af69b8401d SHA512 1283a4af1bcf3c6f941ab294acc0b2b4bd9ca947f2d3c2e866717478ba2e7a2190a5467b71d7e9136c5c83de564c4892f9e3304323ae17e3988af2e40c43982b |
23 |
DIST libnfsidmap-0.25.tar.gz 346587 BLAKE2B dbf31779371ba29737ed7a5901cf46f17e4a1b2ac444c2959d3ae76f41815e9a15a2ee892e417c5b7f97cf5f8396024071430fed028a8cd583aeed1a95e350df SHA512 8acf30790cdd19341c75cb8a4f7ee4dbc9f688c8514258046e55c8f4245df213709ccb7d5327a11b146b0e3b7266d3d4da018699c6be47fbedcc4cd384b54557 |
24 |
+DIST libnfsidmap-0.27.tar.bz2 303900 BLAKE2B c6cb8d81042426552fd3cde9dfd26f805d3c92281a65c3ca2d12671477eb697f3cd51a6d8313a658eb70232136e5615e0cb9ad090a92e747e245f49e60cfcf8a SHA512 0698079abb4bb9ebeaccbcabca725b022c1daaa3d287944d9c4c2a2134489b649b44fcbcd9916e91dd6d91cdc67d267adf5741c5404150c66cc8243b9f15970d |
25 |
|
26 |
diff --git a/net-libs/libnfsidmap/files/libnfsidmap-0.27-getgrouplist.patch b/net-libs/libnfsidmap/files/libnfsidmap-0.27-getgrouplist.patch |
27 |
new file mode 100644 |
28 |
index 00000000000..9a8f0a487ae |
29 |
--- /dev/null |
30 |
+++ b/net-libs/libnfsidmap/files/libnfsidmap-0.27-getgrouplist.patch |
31 |
@@ -0,0 +1,115 @@ |
32 |
+http://bugs.gentoo.org/169909 |
33 |
+ |
34 |
+--- libnfsidmap-0.27/configure.ac |
35 |
++++ libnfsidmap-0.27/configure.ac |
36 |
+@@ -63,7 +63,7 @@ |
37 |
+ |
38 |
+ # Checks for library functions. |
39 |
+ AC_FUNC_MALLOC |
40 |
+-AC_CHECK_FUNCS([strchr strdup]) |
41 |
++AC_CHECK_FUNCS([strchr strdup getgrouplist]) |
42 |
+ |
43 |
+ AC_CONFIG_FILES([Makefile]) |
44 |
+ AC_CONFIG_FILES([libnfsidmap.pc]) |
45 |
+--- libnfsidmap-0.27/getgrouplist.c |
46 |
++++ libnfsidmap-0.27/getgrouplist.c |
47 |
+@@ -0,0 +1,88 @@ |
48 |
++/* |
49 |
++ * getgrouplist.c |
50 |
++ * |
51 |
++ * if system does not provide the non-standard getgrouplist, we will emulate |
52 |
++ * it via POSIX standard functions |
53 |
++ * |
54 |
++ * Copyright (c) 1991, 1993 |
55 |
++ * The Regents of the University of California. All rights reserved. |
56 |
++ * |
57 |
++ * Redistribution and use in source and binary forms, with or without |
58 |
++ * modification, are permitted provided that the following conditions |
59 |
++ * are met: |
60 |
++ * 1. Redistributions of source code must retain the above copyright |
61 |
++ * notice, this list of conditions and the following disclaimer. |
62 |
++ * 2. Redistributions in binary form must reproduce the above copyright |
63 |
++ * notice, this list of conditions and the following disclaimer in the |
64 |
++ * documentation and/or other materials provided with the distribution. |
65 |
++ * 4. Neither the name of the University nor the names of its contributors |
66 |
++ * may be used to endorse or promote products derived from this software |
67 |
++ * without specific prior written permission. |
68 |
++ * |
69 |
++ * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND |
70 |
++ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE |
71 |
++ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE |
72 |
++ * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE |
73 |
++ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL |
74 |
++ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS |
75 |
++ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) |
76 |
++ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT |
77 |
++ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY |
78 |
++ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF |
79 |
++ * SUCH DAMAGE. |
80 |
++ */ |
81 |
++ |
82 |
++#ifdef HAVE_CONFIG_H |
83 |
++#include "config.h" |
84 |
++#endif |
85 |
++#include <sys/types.h> |
86 |
++#include <grp.h> |
87 |
++#include <string.h> |
88 |
++#include <unistd.h> |
89 |
++ |
90 |
++#ifndef HAVE_GETGROUPLIST |
91 |
++static |
92 |
++int |
93 |
++getgrouplist(const char *uname, gid_t agroup, gid_t *groups, int *grpcnt) |
94 |
++{ |
95 |
++ const struct group *grp; |
96 |
++ int i, maxgroups, ngroups, ret; |
97 |
++ |
98 |
++ ret = 0; |
99 |
++ ngroups = 0; |
100 |
++ maxgroups = *grpcnt; |
101 |
++ /* |
102 |
++ * When installing primary group, duplicate it; |
103 |
++ * the first element of groups is the effective gid |
104 |
++ * and will be overwritten when a setgid file is executed. |
105 |
++ */ |
106 |
++ groups[ngroups++] = agroup; |
107 |
++ if (maxgroups > 1) |
108 |
++ groups[ngroups++] = agroup; |
109 |
++ /* |
110 |
++ * Scan the group file to find additional groups. |
111 |
++ */ |
112 |
++ setgrent(); |
113 |
++ while ((grp = getgrent()) != NULL) { |
114 |
++ for (i = 0; i < ngroups; i++) { |
115 |
++ if (grp->gr_gid == groups[i]) |
116 |
++ goto skip; |
117 |
++ } |
118 |
++ for (i = 0; grp->gr_mem[i]; i++) { |
119 |
++ if (!strcmp(grp->gr_mem[i], uname)) { |
120 |
++ if (ngroups >= maxgroups) { |
121 |
++ ret = -1; |
122 |
++ break; |
123 |
++ } |
124 |
++ groups[ngroups++] = grp->gr_gid; |
125 |
++ break; |
126 |
++ } |
127 |
++ } |
128 |
++skip: |
129 |
++ ; |
130 |
++ } |
131 |
++ endgrent(); |
132 |
++ *grpcnt = ngroups; |
133 |
++ return (ret); |
134 |
++} |
135 |
++#endif |
136 |
+--- libnfsidmap-0.27/nss.c |
137 |
++++ libnfsidmap-0.27/nss.c |
138 |
+@@ -51,6 +51,8 @@ |
139 |
+ #include "cfg.h" |
140 |
+ #include <syslog.h> |
141 |
+ |
142 |
++#include "getgrouplist.c" |
143 |
++ |
144 |
+ /* |
145 |
+ * NSS Translation Methods |
146 |
+ * |
147 |
|
148 |
diff --git a/net-libs/libnfsidmap/libnfsidmap-0.27.ebuild b/net-libs/libnfsidmap/libnfsidmap-0.27.ebuild |
149 |
new file mode 100644 |
150 |
index 00000000000..1cfe1e97001 |
151 |
--- /dev/null |
152 |
+++ b/net-libs/libnfsidmap/libnfsidmap-0.27.ebuild |
153 |
@@ -0,0 +1,57 @@ |
154 |
+# Copyright 1999-2018 Gentoo Foundation |
155 |
+# Distributed under the terms of the GNU General Public License v2 |
156 |
+ |
157 |
+EAPI=6 |
158 |
+ |
159 |
+inherit autotools multilib |
160 |
+ |
161 |
+DESCRIPTION="NFSv4 ID <-> name mapping library" |
162 |
+HOMEPAGE="http://www.citi.umich.edu/projects/nfsv4/linux/" |
163 |
+#SRC_URI="http://www.citi.umich.edu/projects/nfsv4/linux/libnfsidmap/${P}.tar.gz" |
164 |
+SRC_URI="https://fedorapeople.org/~steved/${PN}/${PV}/${P}.tar.bz2" |
165 |
+ |
166 |
+LICENSE="BSD" |
167 |
+SLOT="0" |
168 |
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86" |
169 |
+IUSE="ldap static-libs" |
170 |
+ |
171 |
+DEPEND="ldap? ( net-nds/openldap )" |
172 |
+RDEPEND=" |
173 |
+ ${DEPEND} |
174 |
+ !<net-fs/nfs-utils-1.2.2 |
175 |
+ !net-fs/idmapd |
176 |
+" |
177 |
+ |
178 |
+PATCHES=( |
179 |
+ "${FILESDIR}"/${PN}-0.27-getgrouplist.patch #169909 |
180 |
+ "${FILESDIR}"/${PN}-0.21-headers.patch |
181 |
+) |
182 |
+ |
183 |
+src_prepare() { |
184 |
+ default |
185 |
+ # Ideally the build would use -DLIBDIR=$(libdir) at build time. |
186 |
+ sed -i \ |
187 |
+ -e "/PATH_PLUGINS/s:/usr/lib/libnfsidmap:${EPREFIX}/usr/$(get_libdir)/libnfsidmap:" \ |
188 |
+ libnfsidmap.c || die #504666 |
189 |
+ eautoreconf |
190 |
+} |
191 |
+ |
192 |
+src_configure() { |
193 |
+ local myeconfargs=( |
194 |
+ --disable-dependency-tracking |
195 |
+ $(use_enable static-libs static) |
196 |
+ $(use_enable ldap) |
197 |
+ ) |
198 |
+ econf "${myeconfargs[@]}" |
199 |
+} |
200 |
+ |
201 |
+src_install() { |
202 |
+ default |
203 |
+ |
204 |
+ insinto /etc |
205 |
+ doins idmapd.conf |
206 |
+ |
207 |
+ # remove useless files |
208 |
+ rm -f "${ED%/}"/usr/$(get_libdir)/libnfsidmap/*.{a,la} |
209 |
+ use static-libs || find "${ED%/}"/usr -name '*.la' -delete || die |
210 |
+} |