1 |
commit: 9e8143eb1adca61845444132a576fc50b6ff47bd |
2 |
Author: Robin H. Johnson <robbat2 <AT> gentoo <DOT> org> |
3 |
AuthorDate: Mon Nov 19 00:41:51 2018 +0000 |
4 |
Commit: Robin H. Johnson <robbat2 <AT> gentoo <DOT> org> |
5 |
CommitDate: Mon Nov 19 00:42:18 2018 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=9e8143eb |
7 |
|
8 |
sys-auth/ssh-ldap-pubkey: fixes for complex LDAP filters |
9 |
|
10 |
Package-Manager: Portage-2.3.51, Repoman-2.3.12 |
11 |
Signed-off-by: Robin H. Johnson <robbat2 <AT> gentoo.org> |
12 |
|
13 |
sys-auth/ssh-ldap-pubkey/Manifest | 2 + |
14 |
.../ssh-ldap-pubkey-1.3.0-r2.ebuild | 85 ++++++++++++++++++++++ |
15 |
2 files changed, 87 insertions(+) |
16 |
|
17 |
diff --git a/sys-auth/ssh-ldap-pubkey/Manifest b/sys-auth/ssh-ldap-pubkey/Manifest |
18 |
index dc55673bcde..7874cae4be7 100644 |
19 |
--- a/sys-auth/ssh-ldap-pubkey/Manifest |
20 |
+++ b/sys-auth/ssh-ldap-pubkey/Manifest |
21 |
@@ -1 +1,3 @@ |
22 |
DIST ssh-ldap-pubkey-1.3.0.tar.gz 14530 BLAKE2B 1de6913e4abb25d441731b3c36b64361f5fa8900c289b1f4ef58776ab0018414d20b4b24716833e1e27e5dc18079ec77c283bab88879e3fb719fc9ad054267ea SHA512 0c675b0bf68ccecdabda5f4f559772fd0d34151794c2a3855e063befffe9777ceb79e99b5649f15e5bd0c4ea40c22f734d1748a8053d49bffea58077b72efe16 |
23 |
+DIST ssh-ldap-pubkey-130478a7532a8d3dfb0c8e3fbeac494908b8ec55.patch 1494 BLAKE2B 3fb89340d8177db79396b13615437aa921ecc2d21b8ca5c918587bb07f9fb53bc8f356c50c57269b1ffe04995033815d7632ff060485d4c29d34dc7805227533 SHA512 dfc137b6fb2bc0aea698b23ea462de2bd00503b9b21f022b77b28d51020758730ea4017b890e298616beb198816489862830d4dda7cae5114572523ad6289472 |
24 |
+DIST ssh-ldap-pubkey-8d718357dfa5a62f919e61cf620a862cae87e833.patch 2215 BLAKE2B abeaa5a364cd98050fd8abb1019cc203b72e96baa4c3704c7aac6cadc07d999defa2333f6ca4f6793dd0e758b08ab198135c65d100f5f91eba6273c07dd20250 SHA512 85136608352fb35ede70eff8522e09167e48eed5c99a87756ea8b3f641de0dc169bf066d0c21a28fc35c41337372803d97bd37ca8bad1dbafb92464086fe3a63 |
25 |
|
26 |
diff --git a/sys-auth/ssh-ldap-pubkey/ssh-ldap-pubkey-1.3.0-r2.ebuild b/sys-auth/ssh-ldap-pubkey/ssh-ldap-pubkey-1.3.0-r2.ebuild |
27 |
new file mode 100644 |
28 |
index 00000000000..2e4b4ba0441 |
29 |
--- /dev/null |
30 |
+++ b/sys-auth/ssh-ldap-pubkey/ssh-ldap-pubkey-1.3.0-r2.ebuild |
31 |
@@ -0,0 +1,85 @@ |
32 |
+# Copyright 1999-2018 Gentoo Authors |
33 |
+# Distributed under the terms of the GNU General Public License v2 |
34 |
+ |
35 |
+EAPI="6" |
36 |
+ |
37 |
+PYTHON_COMPAT=( python2_7 python3_{4,5,6} ) |
38 |
+inherit distutils-r1 |
39 |
+ |
40 |
+DESCRIPTION="Utility to manage SSH public keys stored in LDAP" |
41 |
+HOMEPAGE="https://github.com/jirutka/ssh-ldap-pubkey" |
42 |
+ |
43 |
+if [[ ${PV} == "9999" ]]; then |
44 |
+ EGIT_REPO_URI="https://github.com/jirutka/${PN}/${PN}.git" |
45 |
+ |
46 |
+ inherit git-r3 |
47 |
+else |
48 |
+ SRC_URI="https://github.com/jirutka/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz" |
49 |
+ KEYWORDS="~alpha ~amd64 ~ppc64 ~x86" |
50 |
+fi |
51 |
+PATCHES=( ) |
52 |
+PATCH_COMMITS=( |
53 |
+ # https://github.com/jirutka/ssh-ldap-pubkey/pull/33/ |
54 |
+ # config.parse_config: fix parsing of non-word characters |
55 |
+ 130478a7532a8d3dfb0c8e3fbeac494908b8ec55 |
56 |
+ # https://github.com/jirutka/ssh-ldap-pubkey/pull/33/ |
57 |
+ # find_dn_by_login: handle complex filters |
58 |
+ 8d718357dfa5a62f919e61cf620a862cae87e833 |
59 |
+) |
60 |
+for c in "${PATCH_COMMITS[@]}" ; do |
61 |
+ d="${PN}-${c}.patch" |
62 |
+ PATCHES+=( "${DISTDIR}/${d}" ) |
63 |
+ SRC_URI="${SRC_URI} https://github.com/jirutka/${PN}/commit/${c}.patch -> ${d}" |
64 |
+done |
65 |
+ |
66 |
+LICENSE="MIT" |
67 |
+SLOT="0" |
68 |
+IUSE="schema test" |
69 |
+RESTRICT="!test? ( test )" |
70 |
+ |
71 |
+MY_CDEPEND=" |
72 |
+ dev-python/docopt[${PYTHON_USEDEP}] |
73 |
+ >=dev-python/python-ldap-3.0[${PYTHON_USEDEP}] |
74 |
+ virtual/logger" |
75 |
+ |
76 |
+DEPEND=" |
77 |
+ ${MY_CDEPEND} |
78 |
+ dev-python/setuptools[${PYTHON_USEDEP}] |
79 |
+ test? ( |
80 |
+ dev-python/pytest[${PYTHON_USEDEP}] |
81 |
+ dev-python/pytest-describe[${PYTHON_USEDEP}] |
82 |
+ dev-python/pytest-mock[${PYTHON_USEDEP}] |
83 |
+ )" |
84 |
+ |
85 |
+# We need to block previous net-misc/openssh packages |
86 |
+# to avoid file collision on "/etc/openldap/schema/openssh-lpk.schema" |
87 |
+RDEPEND="${MY_CDEPEND} |
88 |
+ schema? ( !net-misc/openssh[ldap] )" |
89 |
+ |
90 |
+DOCS=( README.md CHANGELOG.adoc ) |
91 |
+ |
92 |
+src_prepare() { |
93 |
+ sed -i -e 's/pyldap/python-ldap >= 3.0/' setup.py || die |
94 |
+ distutils-r1_src_prepare |
95 |
+} |
96 |
+ |
97 |
+python_test() { |
98 |
+ pytest -vv || die "Tests failed under ${EPYTHON}" |
99 |
+} |
100 |
+ |
101 |
+python_install_all() { |
102 |
+ distutils-r1_python_install_all |
103 |
+ |
104 |
+ if use schema; then |
105 |
+ insinto /etc/openldap/schema |
106 |
+ doins etc/openssh-lpk.schema |
107 |
+ fi |
108 |
+ |
109 |
+ local MY_DOCDIR="/usr/share/doc/${PF}/examples" |
110 |
+ insinto "${MY_DOCDIR}" |
111 |
+ doins etc/ldap.conf |
112 |
+ |
113 |
+ # We don't want to compress this small file to allow user |
114 |
+ # to diff configuration against upstream's default |
115 |
+ docompress -x "${MY_DOCDIR}" |
116 |
+} |