Gentoo Archives: gentoo-commits

From: Sam James <sam@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: sys-auth/pam_ssh_agent_auth/files/, sys-auth/pam_ssh_agent_auth/
Date: Fri, 30 Sep 2022 20:32:49
Message-Id: 1664569952.442365d12cdeabc1d2c7ac471d415cec2dd79356.sam@gentoo
1 commit: 442365d12cdeabc1d2c7ac471d415cec2dd79356
2 Author: Sam James <sam <AT> gentoo <DOT> org>
3 AuthorDate: Fri Sep 30 20:12:20 2022 +0000
4 Commit: Sam James <sam <AT> gentoo <DOT> org>
5 CommitDate: Fri Sep 30 20:32:32 2022 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=442365d1
7
8 sys-auth/pam_ssh_agent_auth: add 0.10.4; fix build with Clang 16
9
10 Closes: https://bugs.gentoo.org/725720
11 Closes: https://bugs.gentoo.org/870721
12 Signed-off-by: Sam James <sam <AT> gentoo.org>
13
14 sys-auth/pam_ssh_agent_auth/Manifest | 2 +
15 ...0001-Fix-function-prototypes-in-configure.patch | 49 ++++++
16 ...g-includes-implicit-function-declarations.patch | 176 +++++++++++++++++++++
17 .../pam_ssh_agent_auth-0.10.4.ebuild | 70 ++++++++
18 .../pam_ssh_agent_auth-9999.ebuild | 46 ++++--
19 5 files changed, 329 insertions(+), 14 deletions(-)
20
21 diff --git a/sys-auth/pam_ssh_agent_auth/Manifest b/sys-auth/pam_ssh_agent_auth/Manifest
22 index 023aa7f9e0ca..d53c12c96e1c 100644
23 --- a/sys-auth/pam_ssh_agent_auth/Manifest
24 +++ b/sys-auth/pam_ssh_agent_auth/Manifest
25 @@ -1,2 +1,4 @@
26 DIST pam_ssh_agent_auth-0.10.3-openssl-1.1.1.patch 46417 BLAKE2B bb62c32fc9c1eb5dc0788b9a535fdf6000812c57a6a758e693406a0d01bcf0cc5ec9f7622c4f21cee74895657a5a3ad13255e19d51e20eca8978e63864266629 SHA512 279fad3be9289c1da06d34e08d2b81a8ad863e07c7b0471419c029aa121abe9942ae4cc4259b7f1e2c2dd32368fc07dc1f9432aba860820455e0d9419c9e7f74
27 DIST pam_ssh_agent_auth-0.10.3.tar.bz2 1066393 BLAKE2B 07b113d05e09f770d63dbea813ea644199d2b103f9c6d7e5960bfad37cb181ce5a5f111f72e0274c0335e4c217ccd19bd53d61af23f8bc6aff14c1995fc4edc9 SHA512 d75062c4e46b0b011f46aed9704a99049995fea8b5115ff7ee26dad7e93cbcf54a8af7efc6b521109d77dc03c6f5284574d2e1b84c6829cec25610f24fb4bd66
28 +DIST pam_ssh_agent_auth-0.10.4.tar.gz 307110 BLAKE2B dad39724db4c35ff42e28492c23ab1073baf859ecf797003509b8aa3d29c71e7fae9601d193af1def58c64f149ced07e4e050fac89ae7f42fcbce5241b99df7b SHA512 caccf72174d15e43f4c86a459ac6448682e62116557cf1e1e828955f3d1731595b238df42adec57860e7f341e92daf5d8285020bcb5018f3b8a5145aa32ee1c2
29 +DIST pam_ssh_agent_auth-ed25519-donna.tar.gz 1169972 BLAKE2B f44fa6c00dbb5cdfe51661cb559428bf24c9886e166366d1700d479f033b8b61621d7821d39a9949a7ef7cd6f5be16be575790a8f6fee03276c2c142f65a792a SHA512 5e8b838bc66bdb1983e62b0ae969449741a3fb223198bce26fe3a8996e324728e8ba0e5259f9ef3db613fd484db21459e98c39367f7240940bc537210c6d7f63
30
31 diff --git a/sys-auth/pam_ssh_agent_auth/files/pam_ssh_agent_auth-0.10.4-0001-Fix-function-prototypes-in-configure.patch b/sys-auth/pam_ssh_agent_auth/files/pam_ssh_agent_auth-0.10.4-0001-Fix-function-prototypes-in-configure.patch
32 new file mode 100644
33 index 000000000000..143f7b7672f4
34 --- /dev/null
35 +++ b/sys-auth/pam_ssh_agent_auth/files/pam_ssh_agent_auth-0.10.4-0001-Fix-function-prototypes-in-configure.patch
36 @@ -0,0 +1,49 @@
37 +https://github.com/jbeverly/pam_ssh_agent_auth/pull/41
38 +
39 +From ad2cc74dce3a6eaff0df193a2ae3db177e0d594f Mon Sep 17 00:00:00 2001
40 +From: Sam James <sam@g.o>
41 +Date: Fri, 30 Sep 2022 20:51:17 +0100
42 +Subject: [PATCH 1/2] Fix function prototypes in configure
43 +
44 +This fixes building with Clang 16.
45 +
46 +Bug: https://bugs.gentoo.org/870721
47 +Signed-off-by: Sam James <sam@g.o>
48 +--- a/configure.ac
49 ++++ b/configure.ac
50 +@@ -500,7 +500,7 @@ int main(void) { exit(0); }
51 + AC_DEFINE(HAVE_BUNDLE, 1, [Define if your system uses bundles instead of ELF shared objects])
52 + AC_MSG_CHECKING(if we have working getaddrinfo)
53 + AC_TRY_RUN([#include <mach-o/dyld.h>
54 +-main() { if (NSVersionOfRunTimeLibrary("System") >= (60 << 16))
55 ++int main() { if (NSVersionOfRunTimeLibrary("System") >= (60 << 16))
56 + exit(0);
57 + else
58 + exit(1);
59 +@@ -1467,7 +1467,7 @@ AC_MSG_CHECKING([for (overly) strict mkstemp])
60 + AC_RUN_IFELSE(
61 + [AC_LANG_SOURCE([[
62 + #include <stdlib.h>
63 +-main() { char template[]="conftest.mkstemp-test";
64 ++int main() { char template[]="conftest.mkstemp-test";
65 + if (mkstemp(template) == -1)
66 + exit(1);
67 + unlink(template); exit(0);
68 +@@ -2598,7 +2598,7 @@ dnl test snprintf (broken on SCO w/gcc)
69 + #include <stdio.h>
70 + #include <string.h>
71 + #ifdef HAVE_SNPRINTF
72 +-main()
73 ++int main()
74 + {
75 + char buf[50];
76 + char expected_out[50];
77 +@@ -2615,7 +2615,7 @@ main()
78 + exit(0);
79 + }
80 + #else
81 +-main() { exit(0); }
82 ++int main() { exit(0); }
83 + #endif
84 + ]])], [ true ], [ AC_DEFINE(BROKEN_SNPRINTF) ],
85 + AC_MSG_WARN([cross compiling: Assuming working snprintf()])
86
87 diff --git a/sys-auth/pam_ssh_agent_auth/files/pam_ssh_agent_auth-0.10.4-0002-Add-missing-includes-implicit-function-declarations.patch b/sys-auth/pam_ssh_agent_auth/files/pam_ssh_agent_auth-0.10.4-0002-Add-missing-includes-implicit-function-declarations.patch
88 new file mode 100644
89 index 000000000000..dda8c88128f6
90 --- /dev/null
91 +++ b/sys-auth/pam_ssh_agent_auth/files/pam_ssh_agent_auth-0.10.4-0002-Add-missing-includes-implicit-function-declarations.patch
92 @@ -0,0 +1,176 @@
93 +https://github.com/jbeverly/pam_ssh_agent_auth/pull/41
94 +
95 +From a12729d18c7ddeae9781a20155d5db1396e9e954 Mon Sep 17 00:00:00 2001
96 +From: Sam James <sam@g.o>
97 +Date: Fri, 30 Sep 2022 20:54:45 +0100
98 +Subject: [PATCH 2/2] Add missing includes (implicit function declarations)
99 +
100 +This fixes building with Clang 16.
101 +
102 +Bug: https://bugs.gentoo.org/870721
103 +Closes: https://github.com/jbeverly/pam_ssh_agent_auth/pull/36
104 +Signed-off-by: Sam James <sam@g.o>
105 +--- a/configure.ac
106 ++++ b/configure.ac
107 +@@ -388,6 +388,7 @@ case "$host" in
108 + [AC_LANG_SOURCE([[
109 + #define testmacro foo
110 + #define testmacro bar
111 ++#include <stdlib.h>
112 + int main(void) { exit(0); }
113 + ]])],
114 + [ AC_MSG_RESULT(yes) ],
115 +@@ -500,6 +501,7 @@ int main(void) { exit(0); }
116 + AC_DEFINE(HAVE_BUNDLE, 1, [Define if your system uses bundles instead of ELF shared objects])
117 + AC_MSG_CHECKING(if we have working getaddrinfo)
118 + AC_TRY_RUN([#include <mach-o/dyld.h>
119 ++#include <stdlib.h>
120 + int main() { if (NSVersionOfRunTimeLibrary("System") >= (60 << 16))
121 + exit(0);
122 + else
123 +@@ -918,6 +920,7 @@ AC_MSG_CHECKING(compiler and flags for sanity)
124 + AC_RUN_IFELSE(
125 + [AC_LANG_SOURCE([
126 + #include <stdio.h>
127 ++#include <stdlib.h>
128 + int main(){exit(0);}
129 + ])],
130 + [ AC_MSG_RESULT(yes) ],
131 +@@ -944,6 +947,7 @@ AC_CHECK_FUNCS(dirname, [AC_CHECK_HEADERS(libgen.h)] ,[
132 + [AC_LANG_SOURCE([[
133 + #include <libgen.h>
134 + #include <string.h>
135 ++#include <stdlib.h>
136 +
137 + int main(int argc, char **argv) {
138 + char *s, buf[32];
139 +@@ -1102,6 +1106,7 @@ AC_RUN_IFELSE(
140 + [AC_LANG_SOURCE([[
141 + #include <sys/types.h>
142 + #include <dirent.h>
143 ++#include <stdlib.h>
144 + int main(void){struct dirent d;exit(sizeof(d.d_name)<=sizeof(char));}
145 + ]])],
146 + [AC_MSG_RESULT(yes)],
147 +@@ -1384,6 +1389,7 @@ if test "x$ac_cv_func_snprintf" = "xyes" ; then
148 + AC_RUN_IFELSE(
149 + [AC_LANG_SOURCE([[
150 + #include <stdio.h>
151 ++#include <stdlib.h>
152 + int main(void){char b[5];snprintf(b,5,"123456789");exit(b[4]!='\0');}
153 + ]])],
154 + [AC_MSG_RESULT(yes)],
155 +@@ -1408,6 +1414,7 @@ if test "x$ac_cv_func_asprintf" != "xyes" && \
156 + #include <sys/types.h>
157 + #include <stdio.h>
158 + #include <stdarg.h>
159 ++#include <stdlib.h>
160 +
161 + int x_snprintf(char *str,size_t count,const char *fmt,...)
162 + {
163 +@@ -1496,6 +1503,7 @@ if test ! -z "$check_for_openpty_ctty_bug"; then
164 + #include <sys/fcntl.h>
165 + #include <sys/types.h>
166 + #include <sys/wait.h>
167 ++#include <stdlib.h>
168 +
169 + int
170 + main()
171 +@@ -1543,6 +1551,7 @@ if test "x$ac_cv_func_getaddrinfo" = "xyes" && \
172 + AC_RUN_IFELSE(
173 + [AC_LANG_SOURCE([[
174 + #include <stdio.h>
175 ++#include <stdlib.h>
176 + #include <sys/socket.h>
177 + #include <netdb.h>
178 + #include <errno.h>
179 +@@ -1615,6 +1624,7 @@ if test "x$ac_cv_func_getaddrinfo" = "xyes" && \
180 + AC_RUN_IFELSE(
181 + [AC_LANG_SOURCE([[
182 + #include <stdio.h>
183 ++#include <stdlib.h>
184 + #include <sys/socket.h>
185 + #include <netdb.h>
186 + #include <errno.h>
187 +@@ -1677,6 +1687,7 @@ if test "x$check_for_conflicting_getspnam" = "x1"; then
188 + AC_COMPILE_IFELSE([AC_LANG_SOURCE(
189 + [
190 + #include <shadow.h>
191 ++#include <stdlib.h>
192 + int main(void) {exit(0);}
193 + ])],
194 + [
195 +@@ -1750,6 +1761,7 @@ AC_RUN_IFELSE(
196 + [AC_LANG_SOURCE([[
197 + #include <stdio.h>
198 + #include <string.h>
199 ++#include <stdlib.h>
200 + #include <openssl/opensslv.h>
201 + #define DATA "conftest.sslincver"
202 + int main(void) {
203 +@@ -1785,6 +1797,7 @@ AC_RUN_IFELSE(
204 + [AC_LANG_SOURCE([[
205 + #include <stdio.h>
206 + #include <string.h>
207 ++#include <stdlib.h>
208 + #include <openssl/opensslv.h>
209 + #include <openssl/crypto.h>
210 + #define DATA "conftest.ssllibver"
211 +@@ -1828,7 +1841,9 @@ AC_MSG_CHECKING([whether OpenSSL's headers match the library])
212 + AC_RUN_IFELSE(
213 + [AC_LANG_SOURCE([[
214 + #include <string.h>
215 ++#include <openssl/crypto.h>
216 + #include <openssl/opensslv.h>
217 ++#include <stdlib.h>
218 + int main(void) { exit(SSLeay() == OPENSSL_VERSION_NUMBER ? 0 : 1); }
219 + ]])],
220 + [
221 +@@ -1907,6 +1922,7 @@ AC_MSG_CHECKING([whether OpenSSL has crippled AES support])
222 + AC_LINK_IFELSE(
223 + [AC_LANG_SOURCE([[
224 + #include <string.h>
225 ++#include <stdlib.h>
226 + #include <openssl/evp.h>
227 + int main(void) { exit(EVP_aes_192_cbc() == NULL || EVP_aes_256_cbc() == NULL);}
228 + ]])],
229 +@@ -1952,6 +1968,7 @@ AC_MSG_CHECKING([whether OpenSSL's PRNG is internally seeded])
230 + AC_RUN_IFELSE(
231 + [AC_LANG_SOURCE([[
232 + #include <string.h>
233 ++#include <stdlib.h>
234 + #include <openssl/rand.h>
235 + int main(void) { exit(RAND_status() == 1 ? 0 : 1); }
236 + ]])],
237 +@@ -2123,6 +2140,7 @@ if test -z "$have_llong_max"; then
238 + AC_RUN_IFELSE(
239 + [AC_LANG_SOURCE([[
240 + #include <stdio.h>
241 ++#include <stdlib.h>
242 + /* Why is this so damn hard? */
243 + #ifdef __GNUC__
244 + # undef __GNUC__
245 +@@ -2597,6 +2615,7 @@ dnl test snprintf (broken on SCO w/gcc)
246 + [AC_LANG_SOURCE([[
247 + #include <stdio.h>
248 + #include <string.h>
249 ++#include <stdlib.h>
250 + #ifdef HAVE_SNPRINTF
251 + int main()
252 + {
253 +@@ -2740,6 +2759,7 @@ AC_CACHE_CHECK([for msg_accrights field in struct msghdr],
254 + ac_cv_have_accrights_in_msghdr, [
255 + AC_COMPILE_IFELSE([AC_LANG_SOURCE(
256 + [
257 ++#include <stdlib.h>
258 + #include <sys/types.h>
259 + #include <sys/socket.h>
260 + #include <sys/uio.h>
261 +@@ -2767,6 +2787,7 @@ AC_CACHE_CHECK([for msg_control field in struct msghdr],
262 + ac_cv_have_control_in_msghdr, [
263 + AC_COMPILE_IFELSE([AC_LANG_SOURCE(
264 + [
265 ++#include <stdlib.h>
266 + #include <sys/types.h>
267 + #include <sys/socket.h>
268 + #include <sys/uio.h>
269
270 diff --git a/sys-auth/pam_ssh_agent_auth/pam_ssh_agent_auth-0.10.4.ebuild b/sys-auth/pam_ssh_agent_auth/pam_ssh_agent_auth-0.10.4.ebuild
271 new file mode 100644
272 index 000000000000..d633a44c02ec
273 --- /dev/null
274 +++ b/sys-auth/pam_ssh_agent_auth/pam_ssh_agent_auth-0.10.4.ebuild
275 @@ -0,0 +1,70 @@
276 +# Copyright 1999-2022 Gentoo Authors
277 +# Distributed under the terms of the GNU General Public License v2
278 +
279 +EAPI=8
280 +
281 +inherit autotools toolchain-funcs pam
282 +
283 +DESCRIPTION="Simple module to authenticate users against their ssh-agent keys"
284 +HOMEPAGE="http://pamsshagentauth.sourceforge.net"
285 +
286 +if [[ ${PV} == *9999 ]] ; then
287 + EGIT_REPO_URI="https://github.com/jbeverly/${PN}.git"
288 + inherit git-r3
289 +else
290 + ED25519_DONNA_COMMIT="8757bd4cd209cb032853ece0ce413f122eef212c"
291 + SRC_URI="https://github.com/jbeverly/pam_ssh_agent_auth/archive/refs/tags/${P}.tar.gz"
292 + SRC_URI+=" https://github.com/floodyberry/ed25519-donna/archive/${ED25519_DONNA_COMMIT}.tar.gz -> ${PN}-ed25519-donna.tar.gz"
293 + S="${WORKDIR}"/${PN}-${P}
294 + KEYWORDS="~amd64 ~arm ~x86"
295 +fi
296 +
297 +LICENSE="MIT"
298 +SLOT="0"
299 +
300 +DEPEND="
301 + dev-libs/openssl:=
302 + sys-libs/pam
303 +"
304 +RDEPEND="
305 + ${DEPEND}
306 + virtual/ssh
307 +"
308 +# Needed for pod2man
309 +BDEPEND="dev-lang/perl"
310 +
311 +PATCHES=(
312 + "${FILESDIR}"/${PN}-0.10.4-0001-Fix-function-prototypes-in-configure.patch
313 + "${FILESDIR}"/${PN}-0.10.4-0002-Add-missing-includes-implicit-function-declarations.patch
314 +)
315 +
316 +src_prepare() {
317 + default
318 +
319 + # Missing from tag
320 + rm -r ed25519-donna || die
321 + ln -s "${WORKDIR}"/ed25519-donna-${ED25519_DONNA_COMMIT} "${S}"/ed25519-donna || die
322 +
323 + # For configure patches
324 + eautoreconf
325 +}
326 +
327 +src_configure() {
328 + pammod_hide_symbols
329 +
330 + # bug #725720
331 + export AR="$(type -P $(tc-getAR))"
332 +
333 + econf \
334 + --without-openssl-header-check \
335 + --libexecdir="$(getpam_mod_dir)"
336 +}
337 +
338 +src_install() {
339 + # Don't use emake install as it makes it harder to have proper
340 + # install paths.
341 + dopammod pam_ssh_agent_auth.so
342 + doman pam_ssh_agent_auth.8
343 +
344 + dodoc CONTRIBUTORS
345 +}
346
347 diff --git a/sys-auth/pam_ssh_agent_auth/pam_ssh_agent_auth-9999.ebuild b/sys-auth/pam_ssh_agent_auth/pam_ssh_agent_auth-9999.ebuild
348 index 0f8057731085..d633a44c02ec 100644
349 --- a/sys-auth/pam_ssh_agent_auth/pam_ssh_agent_auth-9999.ebuild
350 +++ b/sys-auth/pam_ssh_agent_auth/pam_ssh_agent_auth-9999.ebuild
351 @@ -1,9 +1,9 @@
352 -# Copyright 1999-2020 Gentoo Authors
353 +# Copyright 1999-2022 Gentoo Authors
354 # Distributed under the terms of the GNU General Public License v2
355
356 -EAPI=7
357 +EAPI=8
358
359 -inherit pam
360 +inherit autotools toolchain-funcs pam
361
362 DESCRIPTION="Simple module to authenticate users against their ssh-agent keys"
363 HOMEPAGE="http://pamsshagentauth.sourceforge.net"
364 @@ -12,31 +12,49 @@ if [[ ${PV} == *9999 ]] ; then
365 EGIT_REPO_URI="https://github.com/jbeverly/${PN}.git"
366 inherit git-r3
367 else
368 - SRC_URI="mirror://sourceforge/pamsshagentauth/${PN}/v${PV}/${P}.tar.bz2
369 - https://dev.gentoo.org/~juippis/distfiles/tmp/pam_ssh_agent_auth-0.10.3-openssl-1.1.1.patch"
370 + ED25519_DONNA_COMMIT="8757bd4cd209cb032853ece0ce413f122eef212c"
371 + SRC_URI="https://github.com/jbeverly/pam_ssh_agent_auth/archive/refs/tags/${P}.tar.gz"
372 + SRC_URI+=" https://github.com/floodyberry/ed25519-donna/archive/${ED25519_DONNA_COMMIT}.tar.gz -> ${PN}-ed25519-donna.tar.gz"
373 + S="${WORKDIR}"/${PN}-${P}
374 KEYWORDS="~amd64 ~arm ~x86"
375 fi
376
377 LICENSE="MIT"
378 SLOT="0"
379 -IUSE=""
380 +
381 +DEPEND="
382 + dev-libs/openssl:=
383 + sys-libs/pam
384 +"
385 +RDEPEND="
386 + ${DEPEND}
387 + virtual/ssh
388 +"
389 +# Needed for pod2man
390 +BDEPEND="dev-lang/perl"
391
392 PATCHES=(
393 - "${DISTDIR}/${P}-openssl-1.1.1.patch"
394 + "${FILESDIR}"/${PN}-0.10.4-0001-Fix-function-prototypes-in-configure.patch
395 + "${FILESDIR}"/${PN}-0.10.4-0002-Add-missing-includes-implicit-function-declarations.patch
396 )
397 -DEPEND="sys-libs/pam
398 - dev-libs/openssl:0="
399
400 -RDEPEND="${DEPEND}
401 - virtual/ssh"
402 +src_prepare() {
403 + default
404 +
405 + # Missing from tag
406 + rm -r ed25519-donna || die
407 + ln -s "${WORKDIR}"/ed25519-donna-${ED25519_DONNA_COMMIT} "${S}"/ed25519-donna || die
408
409 -# needed for pod2man
410 -DEPEND="${DEPEND}
411 - dev-lang/perl"
412 + # For configure patches
413 + eautoreconf
414 +}
415
416 src_configure() {
417 pammod_hide_symbols
418
419 + # bug #725720
420 + export AR="$(type -P $(tc-getAR))"
421 +
422 econf \
423 --without-openssl-header-check \
424 --libexecdir="$(getpam_mod_dir)"