Gentoo Archives: gentoo-commits

From: Andreas Sturmlechner <asturm@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: sys-libs/pwdb/, sys-libs/pwdb/files/
Date: Sun, 16 May 2021 14:44:36
Message-Id: 1621176228.1f6e782d7a55190109ea0e3829812d668dee07b0.asturm@gentoo
1 commit: 1f6e782d7a55190109ea0e3829812d668dee07b0
2 Author: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
3 AuthorDate: Sun May 16 11:56:49 2021 +0000
4 Commit: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
5 CommitDate: Sun May 16 14:43:48 2021 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=1f6e782d
7
8 sys-libs/pwdb: EAPI-7 bump
9
10 Package-Manager: Portage-3.0.18, Repoman-3.0.3
11 Signed-off-by: Andreas Sturmlechner <asturm <AT> gentoo.org>
12
13 sys-libs/pwdb/files/pwdb-0.62-build.patch | 28 ++++++-------
14 sys-libs/pwdb/files/pwdb-0.62-selinux.patch | 24 +++++------
15 sys-libs/pwdb/pwdb-0.62-r2.ebuild | 64 +++++++++++++++++++++++++++++
16 3 files changed, 90 insertions(+), 26 deletions(-)
17
18 diff --git a/sys-libs/pwdb/files/pwdb-0.62-build.patch b/sys-libs/pwdb/files/pwdb-0.62-build.patch
19 index ecef517b1ca..92c77c28d10 100644
20 --- a/sys-libs/pwdb/files/pwdb-0.62-build.patch
21 +++ b/sys-libs/pwdb/files/pwdb-0.62-build.patch
22 @@ -11,8 +11,8 @@ http://bugs.gentoo.org/126695
23 http://bugs.gentoo.org/137134
24 - don't show traditional warnings
25
26 ---- Makefile
27 -+++ Makefile
28 +--- a/Makefile
29 ++++ b/Makefile
30 @@ -71,7 +71,7 @@
31
32 WARNINGS += -ansi -D_POSIX_SOURCE -Wall -Wwrite-strings \
33 @@ -22,8 +22,8 @@ http://bugs.gentoo.org/137134
34 -Wnested-externs -Winline -Wshadow
35 INCLUDEDIR=-I$(CRTDIR)/include
36
37 ---- libpwdb/Makefile
38 -+++ libpwdb/Makefile
39 +--- a/libpwdb/Makefile
40 ++++ b/libpwdb/Makefile
41 @@ -50,7 +50,7 @@
42
43
44 @@ -42,8 +42,8 @@ http://bugs.gentoo.org/137134
45 ln -sf $(LIBFILENAME) $(LIBDIR)/$(LIBDYNAME)
46 $(INSTALL) -m 644 $(LIBSTATIC) $(LIBDIR)
47
48 ---- libpwdb/posix/pwd.c
49 -+++ libpwdb/posix/pwd.c
50 +--- a/libpwdb/posix/pwd.c
51 ++++ b/libpwdb/posix/pwd.c
52 @@ -7,6 +7,7 @@
53 */
54
55 @@ -52,8 +52,8 @@ http://bugs.gentoo.org/137134
56
57 #define PWDB_HARD_CORE 1
58 #include <pwdb/pwdb_public.h>
59 ---- libpwdb/posix/undefined.c
60 -+++ libpwdb/posix/undefined.c
61 +--- a/libpwdb/posix/undefined.c
62 ++++ b/libpwdb/posix/undefined.c
63 @@ -5,6 +5,7 @@
64 */
65
66 @@ -62,8 +62,8 @@ http://bugs.gentoo.org/137134
67
68 #define PWDB_HARD_CORE 1
69 #include <pwdb/pwdb_public.h>
70 ---- libpwdb/pwdb/pwdb_helper.c
71 -+++ libpwdb/pwdb/pwdb_helper.c
72 +--- a/libpwdb/pwdb/pwdb_helper.c
73 ++++ b/libpwdb/pwdb/pwdb_helper.c
74 @@ -18,6 +18,7 @@
75 *
76 */
77 @@ -72,8 +72,8 @@ http://bugs.gentoo.org/137134
78 #include "pwdb_public.h"
79 #include "pwdb_module.h"
80
81 ---- libpwdb/pwdb/interface/shadow/group.c
82 -+++ libpwdb/pwdb/interface/shadow/group.c
83 +--- a/libpwdb/pwdb/interface/shadow/group.c
84 ++++ b/libpwdb/pwdb/interface/shadow/group.c
85 @@ -533,7 +533,7 @@
86
87 static const char *supp_entry[] = {
88 @@ -83,8 +83,8 @@ http://bugs.gentoo.org/137134
89 "groups", /* these are serviced by requests */
90 NULL
91 };
92 ---- libpwdb/radius/radius.c
93 -+++ libpwdb/radius/radius.c
94 +--- a/libpwdb/radius/radius.c
95 ++++ b/libpwdb/radius/radius.c
96 @@ -145,7 +145,7 @@
97 const char* password,
98 RADIUS_RESULT *rad_result)
99
100 diff --git a/sys-libs/pwdb/files/pwdb-0.62-selinux.patch b/sys-libs/pwdb/files/pwdb-0.62-selinux.patch
101 index 106be564517..02ba3c50c38 100644
102 --- a/sys-libs/pwdb/files/pwdb-0.62-selinux.patch
103 +++ b/sys-libs/pwdb/files/pwdb-0.62-selinux.patch
104 @@ -1,5 +1,5 @@
105 ---- pwdb-0.62/examples/Makefile.pwdbselinux 1998-10-06 19:57:04.000000000 -0400
106 -+++ pwdb-0.62/examples/Makefile 2003-07-09 14:45:54.702663000 -0400
107 +--- a/examples/Makefile
108 ++++ b/examples/Makefile
109 @@ -4,6 +4,8 @@ PROGS = posix gentest tpwdb radtest grou
110 SRCS = $(addsuffix .c,$(PROGS))
111 OBJS = $(addsuffix .o,$(PROGS))
112 @@ -36,8 +36,8 @@
113
114 clean:
115 rm -f ${PROGS} *.o *~
116 ---- pwdb-0.62/libpwdb/shadow/shadowio.c.pwdbselinux 1998-10-06 16:58:43.000000000 -0400
117 -+++ pwdb-0.62/libpwdb/shadow/shadowio.c 2003-07-09 14:45:54.705662544 -0400
118 +--- a/libpwdb/shadow/shadowio.c
119 ++++ b/libpwdb/shadow/shadowio.c
120 @@ -16,6 +16,12 @@
121
122 #include "../_pwdb_internal.h"
123 @@ -133,8 +133,8 @@
124 }
125
126 int __pwdb_spw_update (const struct __pwdb_spwd *spwd)
127 ---- pwdb-0.62/libpwdb/shadow/sgroupio.c.pwdbselinux 1998-10-06 16:58:43.000000000 -0400
128 -+++ pwdb-0.62/libpwdb/shadow/sgroupio.c 2003-07-09 14:45:54.704662696 -0400
129 +--- a/libpwdb/shadow/sgroupio.c
130 ++++ b/libpwdb/shadow/sgroupio.c
131 @@ -16,6 +16,12 @@
132
133 #include "../_pwdb_internal.h"
134 @@ -230,8 +230,8 @@
135 }
136
137 int __pwdb_sgr_update (const struct __pwdb_sgrp *sgrent)
138 ---- pwdb-0.62/libpwdb/unix/pwio.c.pwdbselinux 1998-10-06 16:58:43.000000000 -0400
139 -+++ pwdb-0.62/libpwdb/unix/pwio.c 2003-07-09 14:45:54.707662240 -0400
140 +--- a/libpwdb/unix/pwio.c
141 ++++ b/libpwdb/unix/pwio.c
142 @@ -16,6 +16,11 @@
143
144 #include "../_pwdb_internal.h"
145 @@ -326,8 +326,8 @@
146 }
147
148 /*
149 ---- pwdb-0.62/libpwdb/unix/groupio.c.pwdbselinux 1998-10-06 16:58:43.000000000 -0400
150 -+++ pwdb-0.62/libpwdb/unix/groupio.c 2003-07-09 14:45:54.708662088 -0400
151 +--- a/libpwdb/unix/groupio.c
152 ++++ b/libpwdb/unix/groupio.c
153 @@ -11,6 +11,12 @@
154 #include "../_pwdb_internal.h"
155
156 @@ -422,8 +422,8 @@
157 }
158
159 /* update an entry */
160 ---- pwdb-0.62/libpwdb/Makefile.pwdbselinux 1999-04-10 05:31:20.000000000 -0400
161 -+++ pwdb-0.62/libpwdb/Makefile 2003-07-09 14:45:54.709661936 -0400
162 +--- a/libpwdb/Makefile
163 ++++ b/libpwdb/Makefile
164 @@ -22,7 +22,7 @@ HEADERS = pwdb/pwdb_public.h pwdb/pwdb_c
165
166 # needed for generic interface compilation
167
168 diff --git a/sys-libs/pwdb/pwdb-0.62-r2.ebuild b/sys-libs/pwdb/pwdb-0.62-r2.ebuild
169 new file mode 100644
170 index 00000000000..3ef2906710f
171 --- /dev/null
172 +++ b/sys-libs/pwdb/pwdb-0.62-r2.ebuild
173 @@ -0,0 +1,64 @@
174 +# Copyright 1999-2021 Gentoo Authors
175 +# Distributed under the terms of the GNU General Public License v2
176 +
177 +EAPI=7
178 +
179 +inherit toolchain-funcs flag-o-matic usr-ldscript
180 +
181 +DESCRIPTION="Password database"
182 +HOMEPAGE="https://packages.gentoo.org/package/sys-libs/pwdb"
183 +SRC_URI="mirror://gentoo/${P}.tar.gz"
184 +
185 +LICENSE="|| ( BSD GPL-2 )"
186 +SLOT="0"
187 +KEYWORDS="~alpha amd64 arm ~hppa ~ia64 ~m68k ~mips ppc ppc64 ~s390 sparc x86"
188 +IUSE="selinux"
189 +RESTRICT="test" #122603
190 +
191 +# Note: NIS could probably be made conditional if anyone cared ...
192 +RDEPEND="
193 + net-libs/libnsl:0=
194 + net-libs/libtirpc
195 + selinux? ( sys-libs/libselinux )"
196 +DEPEND="${RDEPEND}"
197 +BDEPEND="virtual/pkgconfig"
198 +
199 +DOCS=( CHANGES CREDITS README doc/pwdb.txt )
200 +HTML_DOCS=( doc/html/. )
201 +
202 +PATCHES=( "${FILESDIR}"/${P}-build.patch )
203 +
204 +src_prepare() {
205 + default
206 +
207 + use selinux && eapply "${FILESDIR}"/${P}-selinux.patch
208 +
209 + append-cppflags $($(tc-getPKG_CONFIG) --cflags libtirpc)
210 + export LDLIBS=$($(tc-getPKG_CONFIG) --libs libtirpc)
211 +
212 + sed -i \
213 + -e "s/^DIRS = .*/DIRS = libpwdb/" \
214 + -e "s:EXTRAS += :EXTRAS += ${CFLAGS} :" \
215 + Makefile || die
216 + sed -i \
217 + -e "s:=gcc:=$(tc-getCC):g" \
218 + -e "s:=ar:=$(tc-getAR):g" \
219 + -e "s:=ranlib:=$(tc-getRANLIB):g" \
220 + default.defs || die
221 +}
222 +
223 +src_install() {
224 + dodir /usr/$(get_libdir) /usr/include/pwdb
225 + emake \
226 + INCLUDED="${D}"/usr/include/pwdb \
227 + LIBDIR="${D}"/usr/$(get_libdir) \
228 + LDCONFIG="echo" \
229 + install
230 +
231 + gen_usr_ldscript -a pwdb
232 +
233 + insinto /etc
234 + doins conf/pwdb.conf
235 +
236 + einstalldocs
237 +}