Gentoo Archives: gentoo-commits

From: "Michał Górny" <mgorny@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: sys-auth/nss-pam-ldapd/files/, sys-auth/nss-pam-ldapd/
Date: Mon, 31 May 2021 21:00:37
Message-Id: 1622494774.9e08547fd71306256ba4ab5518c5067b12ef8040.mgorny@gentoo
1 commit: 9e08547fd71306256ba4ab5518c5067b12ef8040
2 Author: Michał Górny <mgorny <AT> gentoo <DOT> org>
3 AuthorDate: Mon May 31 20:59:34 2021 +0000
4 Commit: Michał Górny <mgorny <AT> gentoo <DOT> org>
5 CommitDate: Mon May 31 20:59:34 2021 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=9e08547f
7
8 sys-auth/nss-pam-ldapd: Remove old
9
10 Signed-off-by: Michał Górny <mgorny <AT> gentoo.org>
11
12 ...nss-pam-ldapd-0.9.11-pynslcd-module-paths.patch | 25 ----
13 .../nss-pam-ldapd/nss-pam-ldapd-0.9.11-r2.ebuild | 163 ---------------------
14 2 files changed, 188 deletions(-)
15
16 diff --git a/sys-auth/nss-pam-ldapd/files/nss-pam-ldapd-0.9.11-pynslcd-module-paths.patch b/sys-auth/nss-pam-ldapd/files/nss-pam-ldapd-0.9.11-pynslcd-module-paths.patch
17 deleted file mode 100644
18 index 75ad1015afc..00000000000
19 --- a/sys-auth/nss-pam-ldapd/files/nss-pam-ldapd-0.9.11-pynslcd-module-paths.patch
20 +++ /dev/null
21 @@ -1,25 +0,0 @@
22 -diff --git a/pynslcd/pynslcd.py b/pynslcd/pynslcd.py
23 -index 0691b61..df2ca4a 100755
24 ---- a/pynslcd/pynslcd.py
25 -+++ b/pynslcd/pynslcd.py
26 -@@ -30,13 +30,13 @@ import threading
27 - import daemon
28 - import ldap
29 -
30 --import cfg
31 --import common
32 --import constants
33 --import invalidator
34 --import mypidfile
35 --import search
36 --from tio import TIOStream
37 -+import pynslcd.cfg
38 -+import pynslcd.common
39 -+import pynslcd.constants
40 -+import pynslcd.invalidator
41 -+import pynslcd.mypidfile
42 -+import pynslcd.search
43 -+from pynslcd.tio import TIOStream
44 -
45 -
46 - # the name of the program
47
48 diff --git a/sys-auth/nss-pam-ldapd/nss-pam-ldapd-0.9.11-r2.ebuild b/sys-auth/nss-pam-ldapd/nss-pam-ldapd-0.9.11-r2.ebuild
49 deleted file mode 100644
50 index 58c7e24d630..00000000000
51 --- a/sys-auth/nss-pam-ldapd/nss-pam-ldapd-0.9.11-r2.ebuild
52 +++ /dev/null
53 @@ -1,163 +0,0 @@
54 -# Copyright 1999-2021 Gentoo Authors
55 -# Distributed under the terms of the GNU General Public License v2
56 -
57 -EAPI=6
58 -
59 -PYTHON_COMPAT=(python3_7)
60 -inherit prefix user python-r1 multilib multilib-minimal systemd s6 tmpfiles
61 -
62 -DESCRIPTION="NSS module for name lookups using LDAP"
63 -HOMEPAGE="https://arthurdejong.org/nss-pam-ldapd/"
64 -SRC_URI="https://arthurdejong.org/${PN}/${P}.tar.gz"
65 -
66 -LICENSE="LGPL-2.1"
67 -SLOT="0"
68 -KEYWORDS="amd64 x86"
69 -IUSE="debug kerberos +pam pynslcd sasl test +utils"
70 -RESTRICT="!test? ( test )"
71 -
72 -COMMON_DEP="
73 - net-nds/openldap[${MULTILIB_USEDEP}]
74 - sasl? ( dev-libs/cyrus-sasl[${MULTILIB_USEDEP}] )
75 - kerberos? ( virtual/krb5[${MULTILIB_USEDEP}] )
76 - sys-libs/pam[${MULTILIB_USEDEP}]
77 - utils? ( ${PYTHON_DEPS} )
78 - pynslcd? (
79 - dev-python/python-ldap[${PYTHON_USEDEP}]
80 - dev-python/python-daemon[${PYTHON_USEDEP}]
81 - )
82 - !sys-auth/nss_ldap
83 - !sys-auth/pam_ldap"
84 -RDEPEND="${COMMON_DEP}"
85 -DEPEND="${COMMON_DEP}
86 - test? (
87 - ${PYTHON_DEPS}
88 - dev-python/pylint[${PYTHON_USEDEP}]
89 - )
90 - sys-devel/automake"
91 -
92 -REQUIRED_USE="
93 - utils? ( ${PYTHON_REQUIRED_USE} )
94 - test? ( ${PYTHON_REQUIRED_USE} pynslcd )"
95 -
96 -PATCHES=(
97 - "${FILESDIR}"/${PN}-0.9.4-disable-py3-only-linters.patch
98 - "${FILESDIR}"/${PN}-0.9.11-pynslcd-module-paths.patch
99 -)
100 -
101 -pkg_setup() {
102 - enewgroup nslcd
103 - enewuser nslcd -1 -1 -1 nslcd
104 -}
105 -
106 -src_prepare() {
107 - cp pynslcd/pynslcd.py "${S}" || die "Copying pynslcd failed"
108 -
109 - default
110 - use utils && python_setup
111 - touch pynslcd/__init__.py || die "Could not create __init__.py for pynslcd"
112 -}
113 -
114 -multilib_src_configure() {
115 - local -a myconf
116 -
117 - myconf=(
118 - --disable-utils
119 - --enable-warnings
120 - --with-ldap-lib=openldap
121 - --with-ldap-conf-file=/etc/nslcd.conf
122 - --with-nslcd-pidfile=/run/nslcd/nslcd.pid
123 - --with-nslcd-socket=/run/nslcd/socket
124 - $(usex x86-fbsd '--with-nss-flavour=' '--with-nss-flavour=' 'freebsd' 'glibc')
125 - $(use_enable pynslcd)
126 - $(use_enable debug)
127 - $(use_enable kerberos)
128 - $(use_enable pam)
129 - $(use_enable sasl)
130 - )
131 -
132 - # nss libraries always go in /lib on Gentoo
133 - if multilib_is_native_abi ; then
134 - myconf+=("--with-pam-seclib-dir=${EPREFIX}/$(get_libdir)/security")
135 - myconf+=("--libdir=${EPREFIX}/$(get_libdir)")
136 - else
137 - myconf+=("--with-pam-seclib-dir=/$(get_libdir)/security")
138 - myconf+=("--libdir=/$(get_libdir)")
139 - fi
140 -
141 - ECONF_SOURCE="${S}" econf "${myconf[@]}"
142 -}
143 -
144 -multilib_src_install_all() {
145 - local script
146 -
147 - newinitd "${FILESDIR}"/nslcd.init nslcd
148 - s6_install_service nslcd "${FILESDIR}"/nslcd.s6
149 -
150 - insinto /usr/share/nss-pam-ldapd
151 - doins "${WORKDIR}/${P}/nslcd.conf"
152 -
153 - fperms o-r /etc/nslcd.conf
154 -
155 - if use utils; then
156 - python_moduleinto nslcd
157 - python_foreach_impl python_domodule utils/*.py
158 -
159 - for script in chsh getent; do
160 - python_foreach_impl python_newscript utils/${script}.py ${script}.ldap
161 - done
162 - fi
163 - if use pynslcd; then
164 - rm -rf "${D}"/usr/share/pynslcd
165 - python_moduleinto pynslcd
166 - python_foreach_impl python_domodule pynslcd/*.py
167 - python_scriptinto /usr/sbin
168 - python_newscript pynslcd.py pynslcd
169 - newinitd "${FILESDIR}"/pynslcd.init pynslcd
170 - fi
171 -
172 - newtmpfiles "${FILESDIR}"/nslcd-tmpfiles.conf nslcd.conf
173 - systemd_newunit "${FILESDIR}"/nslcd.service nslcd.service
174 -}
175 -
176 -multilib_src_install() {
177 - emake DESTDIR="${D}" install
178 -
179 - if use pynslcd; then
180 - python_moduleinto pynslcd
181 - python_foreach_impl python_domodule pynslcd/*.py
182 - fi
183 -}
184 -
185 -python_test() {
186 - PYTHONPATH="${S}" emake check
187 -}
188 -
189 -multilib_src_test() {
190 - pushd "${BUILD_DIR}"
191 - ln -s ../pynslcd/constants.py utils/constants.py
192 - python_foreach_impl python_test
193 - popd
194 -}
195 -
196 -pkg_postinst() {
197 - echo
198 - elog "For this to work you must configure /etc/nslcd.conf"
199 - elog "This configuration is similar to pam_ldap's /etc/ldap.conf"
200 - echo
201 - elog "In order to use nss-pam-ldapd, nslcd needs to be running. You can"
202 - elog "start it like this:"
203 - elog " # /etc/init.d/nslcd start"
204 - echo
205 - elog "You can add it to the default runlevel like so:"
206 - elog " # rc-update add nslcd default"
207 - elog
208 - elog "If you have >=sys-apps/openrc-0.16.3, you can also use s6"
209 - elog "to supervise this service."
210 - elog "To do this, emerge sys-apps/s6 then add nslcd-s6"
211 - elog "default runlevel instead of nslcd."
212 - elog
213 - elog "If you are upgrading, keep in mind that /etc/nss-ldapd.conf"
214 - elog " is now named /etc/nslcd.conf"
215 - echo
216 -}