Gentoo Archives: gentoo-commits

From: Quentin Retornaz <gentoo@××××××××.com>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/proj/libressl:master commit in: sys-auth/pam_p11/, sys-auth/pam_p11/files/
Date: Mon, 09 May 2022 18:37:23
Message-Id: 1652121380.77ebf39a85244a176e1431694f7adb35bb8ea895.quentin@gentoo
1 commit: 77ebf39a85244a176e1431694f7adb35bb8ea895
2 Author: orbea <orbea <AT> riseup <DOT> net>
3 AuthorDate: Sun May 8 19:06:12 2022 +0000
4 Commit: Quentin Retornaz <gentoo <AT> retornaz <DOT> com>
5 CommitDate: Mon May 9 18:36:20 2022 +0000
6 URL: https://gitweb.gentoo.org/repo/proj/libressl.git/commit/?id=77ebf39a
7
8 sys-auth/pam_p11: Added
9
10 Signed-off-by: orbea <orbea <AT> riseup.net>
11 Closes: https://github.com/gentoo/libressl/pull/408
12 Signed-off-by: Quentin Retornaz <gentoo <AT> retornaz.com>
13
14 sys-auth/pam_p11/Manifest | 1 +
15 .../pam_p11/files/pam_p11-0.3.1-libressl.patch | 15 +++++++++
16 sys-auth/pam_p11/metadata.xml | 12 +++++++
17 sys-auth/pam_p11/pam_p11-0.3.1.ebuild | 37 ++++++++++++++++++++++
18 4 files changed, 65 insertions(+)
19
20 diff --git a/sys-auth/pam_p11/Manifest b/sys-auth/pam_p11/Manifest
21 new file mode 100644
22 index 0000000..36d88fc
23 --- /dev/null
24 +++ b/sys-auth/pam_p11/Manifest
25 @@ -0,0 +1 @@
26 +DIST pam_p11-0.3.1.tar.gz 422940 BLAKE2B b4c6d60a7ee31d808b9e928339f6e8aba3b56655b9f408ff7cd15ff4a397c89c00d00b0bbe70fc0b7bd6c6a246acd9c313c8f5b21a88e1474355c3407ff694f0 SHA512 caaa6882d4c007dfaba5974dc420bc45aa225f705679d170fdc9576aa49cbd24bba6985f14eb2bca97d4fe37aaf6088641add912dfbb93740b7d634f448addcf
27
28 diff --git a/sys-auth/pam_p11/files/pam_p11-0.3.1-libressl.patch b/sys-auth/pam_p11/files/pam_p11-0.3.1-libressl.patch
29 new file mode 100644
30 index 0000000..9a8b6c5
31 --- /dev/null
32 +++ b/sys-auth/pam_p11/files/pam_p11-0.3.1-libressl.patch
33 @@ -0,0 +1,15 @@
34 + Fix the build with libressl
35 +
36 +diff --git a/src/match_openssh.c b/src/match_openssh.c
37 +index de11c04..ea743ea 100644
38 +--- a/src/match_openssh.c
39 ++++ b/src/match_openssh.c
40 +@@ -17,7 +17,7 @@
41 +
42 + #define OPENSSH_LINE_MAX 16384 /* from openssh SSH_MAX_PUBKEY_BYTES */
43 +
44 +-#if (OPENSSL_VERSION_NUMBER < 0x10100000L) || defined (LIBRESSL_VERSION_NUMBER)
45 ++#if (OPENSSL_VERSION_NUMBER < 0x10100000L) || ( defined(LIBRESSL_VERSION_NUMBER) && LIBRESSL_VERSION_NUMBER < 0x3000000L )
46 + void RSA_get0_key(const RSA *r,
47 + const BIGNUM **n, const BIGNUM **e, const BIGNUM **d)
48 + {
49
50 diff --git a/sys-auth/pam_p11/metadata.xml b/sys-auth/pam_p11/metadata.xml
51 new file mode 100644
52 index 0000000..56e8da2
53 --- /dev/null
54 +++ b/sys-auth/pam_p11/metadata.xml
55 @@ -0,0 +1,12 @@
56 +<?xml version="1.0" encoding="UTF-8"?>
57 +<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
58 +<pkgmetadata>
59 + <maintainer type="person">
60 + <name>Lars Wendler</name>
61 + <email>polynomial-c@g.o</email>
62 + </maintainer>
63 + <upstream>
64 + <remote-id type="sourceforge">opensc</remote-id>
65 + <remote-id type="github">opensc/pam_p11</remote-id>
66 + </upstream>
67 +</pkgmetadata>
68
69 diff --git a/sys-auth/pam_p11/pam_p11-0.3.1.ebuild b/sys-auth/pam_p11/pam_p11-0.3.1.ebuild
70 new file mode 100644
71 index 0000000..2ce2d60
72 --- /dev/null
73 +++ b/sys-auth/pam_p11/pam_p11-0.3.1.ebuild
74 @@ -0,0 +1,37 @@
75 +# Copyright 1999-2022 Gentoo Authors
76 +# Distributed under the terms of the GNU General Public License v2
77 +
78 +EAPI=7
79 +
80 +inherit flag-o-matic pam
81 +
82 +DESCRIPTION="PAM module for authenticating against PKCS#11 tokens"
83 +HOMEPAGE="https://github.com/opensc/pam_p11/wiki"
84 +SRC_URI="https://github.com/OpenSC/${PN}/releases/download/${P}/${P}.tar.gz"
85 +
86 +LICENSE="LGPL-2.1"
87 +SLOT="0"
88 +KEYWORDS="~alpha amd64 ~hppa ~ia64 ppc ppc64 ~sparc x86"
89 +
90 +RDEPEND="sys-libs/pam
91 + dev-libs/libp11:=
92 + dev-libs/openssl:0="
93 +
94 +DEPEND="${RDEPEND}"
95 +BDEPEND="virtual/pkgconfig"
96 +
97 +PATCHES=(
98 + "${FILESDIR}/${P}-libressl.patch"
99 +)
100 +
101 +src_configure() {
102 + # Ugly way to work around deprecated declarations in openssl-3
103 + append-cflags -Wno-error=deprecated-declarations
104 +
105 + econf --with-pamdir="$(getpam_mod_dir)"
106 +}
107 +
108 +src_install() {
109 + default
110 + find "${D}" -name '*.la' -delete || die
111 +}