Gentoo Archives: gentoo-commits

From: "Hanno Böck" <hanno@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: sys-auth/pam_mount/files/, sys-auth/pam_mount/
Date: Wed, 09 Sep 2020 14:11:00
Message-Id: 1599660645.bd103ede269b873c62a22c6d22f5c4caa5c9052b.hanno@gentoo
1 commit: bd103ede269b873c62a22c6d22f5c4caa5c9052b
2 Author: Hanno Böck <hanno <AT> gentoo <DOT> org>
3 AuthorDate: Wed Sep 9 14:10:45 2020 +0000
4 Commit: Hanno Böck <hanno <AT> gentoo <DOT> org>
5 CommitDate: Wed Sep 9 14:10:45 2020 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=bd103ede
7
8 sys-auth/pam_mount: Various fixes.
9
10 Remove old OpenSSL API.
11 Support LibreSSL.
12 Bump EAPI to 7.
13 Remove unused empty dir causing QA warning.
14
15 Signed-off-by: Hanno Böck <hanno <AT> gentoo.org>
16 Closes: https://bugs.gentoo.org/720244
17 Closes: https://bugs.gentoo.org/592584
18 Package-Manager: Portage-3.0.6, Repoman-3.0.1
19
20 ...am_mount-2.16-remove-obsolete-openssl-api.patch | 17 ++++++++
21 sys-auth/pam_mount/pam_mount-2.16-r2.ebuild | 50 ++++++++++++++++++++++
22 2 files changed, 67 insertions(+)
23
24 diff --git a/sys-auth/pam_mount/files/pam_mount-2.16-remove-obsolete-openssl-api.patch b/sys-auth/pam_mount/files/pam_mount-2.16-remove-obsolete-openssl-api.patch
25 new file mode 100644
26 index 00000000000..6139ba6b648
27 --- /dev/null
28 +++ b/sys-auth/pam_mount/files/pam_mount-2.16-remove-obsolete-openssl-api.patch
29 @@ -0,0 +1,17 @@
30 +These functions are obsolete and a noop in OpenSSL 1.1.
31 +
32 +diff -Naurp a/src/crypto.c b/src/crypto.c
33 +--- a/src/crypto.c 2016-09-23 09:52:47.000000000 +0200
34 ++++ b/src/crypto.c 2020-09-09 11:20:44.291423666 +0200
35 +@@ -67,11 +67,6 @@ EXPORT_SYMBOL int cryptmount_init(void)
36 + pthread_mutex_unlock(&ehd_init_lock);
37 + return ret;
38 + }
39 +-#ifdef HAVE_LIBCRYPTO
40 +- OpenSSL_add_all_algorithms();
41 +- OpenSSL_add_all_ciphers();
42 +- OpenSSL_add_all_digests();
43 +-#endif
44 + }
45 + ++ehd_use_count;
46 + pthread_mutex_unlock(&ehd_init_lock);
47
48 diff --git a/sys-auth/pam_mount/pam_mount-2.16-r2.ebuild b/sys-auth/pam_mount/pam_mount-2.16-r2.ebuild
49 new file mode 100644
50 index 00000000000..6ba3bfb7386
51 --- /dev/null
52 +++ b/sys-auth/pam_mount/pam_mount-2.16-r2.ebuild
53 @@ -0,0 +1,50 @@
54 +# Copyright 1999-2020 Gentoo Authors
55 +# Distributed under the terms of the GNU General Public License v2
56 +
57 +EAPI=7
58 +
59 +DESCRIPTION="A PAM module that can mount volumes for a user session"
60 +HOMEPAGE="http://pam-mount.sourceforge.net"
61 +SRC_URI="mirror://sourceforge/pam-mount/${P}.tar.xz"
62 +
63 +LICENSE="GPL-3"
64 +SLOT="0"
65 +KEYWORDS="~amd64 ~ppc ~x86"
66 +
67 +IUSE="crypt libressl ssl selinux"
68 +
69 +COMMON_DEPEND=">=sys-libs/pam-0.99
70 + >=sys-libs/libhx-3.12.1
71 + >=dev-libs/libxml2-2.6
72 + crypt? ( >=sys-fs/cryptsetup-1.1.0:= )
73 + ssl? (
74 + !libressl? ( dev-libs/openssl:0= )
75 + libressl? ( dev-libs/libressl:0= )
76 + )
77 + selinux? ( sys-libs/libselinux )"
78 +DEPEND="${COMMON_DEPEND}
79 + virtual/pkgconfig"
80 +RDEPEND="${COMMON_DEPEND}
81 + >=sys-apps/util-linux-2.20"
82 +
83 +PATCHES=(
84 + "${FILESDIR}"/pam_mount-2.16-crypto-Add-support-for-LUKS2.patch
85 + "${FILESDIR}"/pam_mount-2.16-remove-obsolete-openssl-api.patch
86 +)
87 +
88 +src_configure() {
89 + econf --with-slibdir="/$(get_libdir)" \
90 + $(use_with crypt cryptsetup) \
91 + $(use_with ssl crypto) \
92 + $(use_with selinux)
93 +}
94 +
95 +src_install() {
96 + default
97 + use selinux || rm -r "${D}"/etc/selinux
98 + dodoc doc/*.txt
99 +
100 + # Remove unused nonstandard run-dir, current version uses
101 + # FHS-compatible /run, but has leftover mkdir from old version
102 + rm -r "${D}/var/lib"
103 +}