commit: 77ebf39a85244a176e1431694f7adb35bb8ea895 Author: orbea <orbea <AT> riseup <DOT> net> AuthorDate: Sun May 8 19:06:12 2022 +0000 Commit: Quentin Retornaz <gentoo <AT> retornaz <DOT> com> CommitDate: Mon May 9 18:36:20 2022 +0000 URL: https://gitweb.gentoo.org/repo/proj/libressl.git/commit/?id=77ebf39a
sys-auth/pam_p11: Added Signed-off-by: orbea <orbea <AT> riseup.net> Closes: https://github.com/gentoo/libressl/pull/408 Signed-off-by: Quentin Retornaz <gentoo <AT> retornaz.com> sys-auth/pam_p11/Manifest | 1 + .../pam_p11/files/pam_p11-0.3.1-libressl.patch | 15 +++++++++ sys-auth/pam_p11/metadata.xml | 12 +++++++ sys-auth/pam_p11/pam_p11-0.3.1.ebuild | 37 ++++++++++++++++++++++ 4 files changed, 65 insertions(+) diff --git a/sys-auth/pam_p11/Manifest b/sys-auth/pam_p11/Manifest new file mode 100644 index 0000000..36d88fc --- /dev/null +++ b/sys-auth/pam_p11/Manifest @@ -0,0 +1 @@ +DIST pam_p11-0.3.1.tar.gz 422940 BLAKE2B b4c6d60a7ee31d808b9e928339f6e8aba3b56655b9f408ff7cd15ff4a397c89c00d00b0bbe70fc0b7bd6c6a246acd9c313c8f5b21a88e1474355c3407ff694f0 SHA512 caaa6882d4c007dfaba5974dc420bc45aa225f705679d170fdc9576aa49cbd24bba6985f14eb2bca97d4fe37aaf6088641add912dfbb93740b7d634f448addcf 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 new file mode 100644 index 0000000..9a8b6c5 --- /dev/null +++ b/sys-auth/pam_p11/files/pam_p11-0.3.1-libressl.patch @@ -0,0 +1,15 @@ + Fix the build with libressl + +diff --git a/src/match_openssh.c b/src/match_openssh.c +index de11c04..ea743ea 100644 +--- a/src/match_openssh.c ++++ b/src/match_openssh.c +@@ -17,7 +17,7 @@ + + #define OPENSSH_LINE_MAX 16384 /* from openssh SSH_MAX_PUBKEY_BYTES */ + +-#if (OPENSSL_VERSION_NUMBER < 0x10100000L) || defined (LIBRESSL_VERSION_NUMBER) ++#if (OPENSSL_VERSION_NUMBER < 0x10100000L) || ( defined(LIBRESSL_VERSION_NUMBER) && LIBRESSL_VERSION_NUMBER < 0x3000000L ) + void RSA_get0_key(const RSA *r, + const BIGNUM **n, const BIGNUM **e, const BIGNUM **d) + { diff --git a/sys-auth/pam_p11/metadata.xml b/sys-auth/pam_p11/metadata.xml new file mode 100644 index 0000000..56e8da2 --- /dev/null +++ b/sys-auth/pam_p11/metadata.xml @@ -0,0 +1,12 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer type="person"> + <name>Lars Wendler</name> + <email>[email protected]</email> + </maintainer> + <upstream> + <remote-id type="sourceforge">opensc</remote-id> + <remote-id type="github">opensc/pam_p11</remote-id> + </upstream> +</pkgmetadata> diff --git a/sys-auth/pam_p11/pam_p11-0.3.1.ebuild b/sys-auth/pam_p11/pam_p11-0.3.1.ebuild new file mode 100644 index 0000000..2ce2d60 --- /dev/null +++ b/sys-auth/pam_p11/pam_p11-0.3.1.ebuild @@ -0,0 +1,37 @@ +# Copyright 1999-2022 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +inherit flag-o-matic pam + +DESCRIPTION="PAM module for authenticating against PKCS#11 tokens" +HOMEPAGE="https://github.com/opensc/pam_p11/wiki" +SRC_URI="https://github.com/OpenSC/${PN}/releases/download/${P}/${P}.tar.gz" + +LICENSE="LGPL-2.1" +SLOT="0" +KEYWORDS="~alpha amd64 ~hppa ~ia64 ppc ppc64 ~sparc x86" + +RDEPEND="sys-libs/pam + dev-libs/libp11:= + dev-libs/openssl:0=" + +DEPEND="${RDEPEND}" +BDEPEND="virtual/pkgconfig" + +PATCHES=( + "${FILESDIR}/${P}-libressl.patch" +) + +src_configure() { + # Ugly way to work around deprecated declarations in openssl-3 + append-cflags -Wno-error=deprecated-declarations + + econf --with-pamdir="$(getpam_mod_dir)" +} + +src_install() { + default + find "${D}" -name '*.la' -delete || die +}
