summaryrefslogtreecommitdiff
path: root/sys-auth/nss-pam-ldapd
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2024-07-04 08:06:08 +0100
committerV3n3RiX <venerix@koprulu.sector>2024-07-04 08:06:08 +0100
commit2a8d2f71d1d9963368e0ef3d641d75979a689d12 (patch)
tree83e283f960ab2ebbc1a042b8ed6c37b78d47b37b /sys-auth/nss-pam-ldapd
parent8435c842b9e8fbb2bcc80397ab3aa655000459e2 (diff)
gentoo auto-resync : 04:07:2024 - 08:06:07
Diffstat (limited to 'sys-auth/nss-pam-ldapd')
-rw-r--r--sys-auth/nss-pam-ldapd/Manifest1
-rw-r--r--sys-auth/nss-pam-ldapd/nss-pam-ldapd-0.9.12-r4.ebuild166
2 files changed, 167 insertions, 0 deletions
diff --git a/sys-auth/nss-pam-ldapd/Manifest b/sys-auth/nss-pam-ldapd/Manifest
index 8245e2c2cbc5..88b7834ec4b9 100644
--- a/sys-auth/nss-pam-ldapd/Manifest
+++ b/sys-auth/nss-pam-ldapd/Manifest
@@ -12,4 +12,5 @@ AUX pynslcd.init 515 BLAKE2B 711ba152ea9cc52198171e451889ab42a224581bae7e4378846
DIST nss-pam-ldapd-0.9.12.tar.gz 791983 BLAKE2B af580d400230db709f7ac09720edd6127b3b26c6987d1e8f6d6535ad8e68fd8cb5cf2a3319e4456fb2af28aba6528f7a5cdc28463ccfee747dbbf6abc35eee87 SHA512 5eca4851a9bcb2779548d193a363a143d6106bfc6463b8d3f0c2d5d7d227ec1e680861383d4813f40b44d1be2ce5f7ed019d838f7f6796e15f96f7411d3bb8f6
EBUILD nss-pam-ldapd-0.9.12-r2.ebuild 4357 BLAKE2B a59a17353a23770f3b82cb408bc0bf6e62dac87a1d66aef838173da601726b3033fd6e904a07ece36971cc83caec0afec597e780a65bb54d5e2bef4d9f798e10 SHA512 eca3ebfd6ae0eda684e301e44675bcbfecfed783f917ce5b4d2d05d30682964fe4ba747e93bfd968619adee4b3e47c022cfc9d6849c8d842b19ca0962fcab982
EBUILD nss-pam-ldapd-0.9.12-r3.ebuild 4522 BLAKE2B 785f06623d3613e79adc3fd619fb8992fc89a629961bf50cf966f3f455f3688d7976b2123a343abcc806a62c85bd20be8f848e707464dc4813aa7e6c399cb3de SHA512 3d43146767b5928730836577950b1b489f5f2ad6505afe07741a8e215c83cd0374bd34299b1e010f2b71b84b85187d598292758a31209e8fd66737c12f15675a
+EBUILD nss-pam-ldapd-0.9.12-r4.ebuild 4544 BLAKE2B 2a93f95c97a20f7229dfbb9475b2ce24d4c402c7b271bb96acfd5d29286ae33111d0feaa80d5a489f3844467bbbcc93d0f7b644eeecffff5b088da9df098700f SHA512 b506d5e9c917479d6476ec88e7ff5498ed45a3cd83f050642ee674c1f6ea2b92c85744ac94070f13658b57fc56823435e52636ad6ac4f9dbcf6d00044ae1c2a8
MISC metadata.xml 1170 BLAKE2B 5c121a0afae864d757fda18c8546e494804c9b9d6a7d6fe2ad485b6a7bb2ed291776063407721222fa765251c9ca4d945740e8a0aa53da670747fb35cf1b8f9e SHA512 ba534679ae3b983a9b143530112f6495a4a4b5b82077095b3cc62965c1cf808c7a2d098410c00bee195112c5e7ff3afe4b368fa9a1662ce22cf48634229df7cf
diff --git a/sys-auth/nss-pam-ldapd/nss-pam-ldapd-0.9.12-r4.ebuild b/sys-auth/nss-pam-ldapd/nss-pam-ldapd-0.9.12-r4.ebuild
new file mode 100644
index 000000000000..85c045be9ab5
--- /dev/null
+++ b/sys-auth/nss-pam-ldapd/nss-pam-ldapd-0.9.12-r4.ebuild
@@ -0,0 +1,166 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+PYTHON_COMPAT=( python3_{10..12} )
+inherit autotools python-r1 s6 systemd tmpfiles multilib-minimal
+
+DESCRIPTION="NSS module for name lookups using LDAP"
+HOMEPAGE="https://arthurdejong.org/nss-pam-ldapd/"
+SRC_URI="https://arthurdejong.org/${PN}/${P}.tar.gz"
+
+LICENSE="LGPL-2.1"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~sparc ~x86"
+IUSE="debug kerberos +pam pynslcd sasl selinux test +utils"
+REQUIRED_USE="
+ ${PYTHON_REQUIRED_USE}
+ utils? ( ${PYTHON_REQUIRED_USE} )
+ kerberos? ( sasl )
+ test? ( ${PYTHON_REQUIRED_USE} pynslcd )
+"
+RESTRICT="!test? ( test )"
+
+RDEPEND="
+ acct-group/nslcd
+ acct-user/nslcd
+ net-nds/openldap:=[${MULTILIB_USEDEP}]
+ sasl? ( dev-libs/cyrus-sasl[${MULTILIB_USEDEP}] )
+ kerberos? ( virtual/krb5[${MULTILIB_USEDEP}] )
+ sys-libs/pam[${MULTILIB_USEDEP}]
+ utils? ( ${PYTHON_DEPS} )
+ pynslcd? (
+ dev-python/python-ldap[${PYTHON_USEDEP}]
+ dev-python/python-daemon[${PYTHON_USEDEP}]
+ )
+ elibc_musl? ( sys-libs/musl-nscd )
+ !sys-auth/nss_ldap
+ !sys-auth/pam_ldap
+"
+DEPEND="${RDEPEND}"
+BDEPEND="
+ ${PYTHON_DEPS}
+ test? ( dev-python/pylint[${PYTHON_USEDEP}] )
+"
+RDEPEND+=" selinux? ( sec-policy/selinux-nslcd )"
+
+PATCHES=(
+ "${FILESDIR}"/nss-pam-ldapd-0.9.4-disable-py3-only-linters.patch
+ "${FILESDIR}"/nss-pam-ldapd-0.9.11-use-mkstemp.patch
+ "${FILESDIR}"/nss-pam-ldapd-0.9.11-relative-imports.patch
+ "${FILESDIR}"/nss-pam-ldapd-0.9.11-tests.patch
+ "${FILESDIR}"/nss-pam-ldapd-0.9.11-tests-py39.patch
+ "${FILESDIR}"/nss-pam-ldapd-0.9.12-netdb-defines.patch
+)
+
+pkg_setup() {
+ [[ ${MERGE_TYPE} != binary ]] && python_setup
+}
+
+src_prepare() {
+ default
+
+ touch pynslcd/__init__.py || die "Could not create __init__.py for pynslcd"
+ mv pynslcd/pynslcd.py pynslcd/main.py || die
+
+ eautoreconf
+}
+
+multilib_src_configure() {
+ local myconf=(
+ --disable-utils
+ --enable-warnings
+ --with-ldap-lib=openldap
+ --with-ldap-conf-file="${EPREFIX}"/etc/nslcd.conf
+ --with-nslcd-pidfile=/run/nslcd/nslcd.pid
+ --with-nslcd-socket=/run/nslcd/socket
+ --with-nss-flavour=glibc
+ $(use_enable pynslcd)
+ $(use_enable debug)
+ $(use_enable kerberos)
+ $(use_enable pam)
+ $(use_enable sasl)
+
+ # nss libraries always go in /lib on Gentoo
+ --with-pam-seclib-dir="${EPREFIX}"/$(get_libdir)/security
+ --libdir="${EPREFIX}"/$(get_libdir)
+ )
+ ECONF_SOURCE="${S}" econf "${myconf[@]}"
+}
+
+multilib_src_test() {
+ python_test() {
+ cp -l "${S}"/pynslcd/*.py pynslcd/ || die "Could not copy python files for tests"
+ nonfatal emake check || die "tests failed with ${EPYTHON}"
+ }
+
+ pushd "${BUILD_DIR}" >/dev/null || die
+ ln -s ../pynslcd/constants.py utils/constants.py || die
+ python_foreach_impl python_test
+ popd >/dev/null || die
+}
+
+multilib_src_install() {
+ emake DESTDIR="${D}" install
+
+ if use pynslcd; then
+ python_moduleinto pynslcd
+ python_foreach_impl python_domodule pynslcd/*.py
+ fi
+}
+
+multilib_src_install_all() {
+ einstalldocs
+
+ newinitd "${FILESDIR}"/nslcd.init nslcd
+ s6_install_service nslcd "${FILESDIR}"/nslcd.s6
+
+ insinto /usr/share/nss-pam-ldapd
+ doins "${WORKDIR}"/${P}/nslcd.conf
+
+ fperms o-r /etc/nslcd.conf
+
+ if use utils; then
+ python_moduleinto nslcd
+ python_foreach_impl python_domodule utils/*.py
+
+ local script
+ for script in chsh getent; do
+ python_foreach_impl python_newscript utils/${script}.py ${script}.ldap
+ done
+ fi
+ if use pynslcd; then
+ rm -rf "${ED}"/usr/share/pynslcd || die
+ python_moduleinto pynslcd
+ python_foreach_impl python_domodule pynslcd/*.py
+ python_scriptinto /usr/sbin
+ python_foreach_impl python_newscript pynslcd/main.py pynslcd
+ newinitd "${FILESDIR}"/pynslcd.init pynslcd
+ fi
+
+ newtmpfiles "${FILESDIR}"/nslcd-tmpfiles.conf nslcd.conf
+ systemd_newunit "${FILESDIR}"/nslcd.service nslcd.service
+}
+
+pkg_postinst() {
+ tmpfiles_process nslcd.conf
+
+ elog "For this to work you must configure /etc/nslcd.conf"
+ elog "This configuration is similar to pam_ldap's /etc/ldap.conf"
+ elog
+ elog "In order to use nss-pam-ldapd, nslcd needs to be running. You can"
+ elog "start it like this:"
+ elog " # /etc/init.d/nslcd start"
+ elog
+ elog "You can add it to the default runlevel like so:"
+ elog " # rc-update add nslcd default"
+ elog
+ elog "If you have >=sys-apps/openrc-0.16.3, you can also use s6"
+ elog "to supervise this service."
+ elog "To do this, emerge sys-apps/s6 then add nslcd-s6"
+ elog "default runlevel instead of nslcd."
+ elog
+ elog "If you are upgrading, keep in mind that /etc/nss-ldapd.conf"
+ elog " is now named /etc/nslcd.conf"
+}