From 21435953e16cda318a82334ddbadb3b5c36d9ea7 Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Wed, 15 Jan 2020 15:51:32 +0000 Subject: gentoo resync : 15.01.2020 --- sys-auth/nss-pam-ldapd/Manifest | 1 + .../nss-pam-ldapd/nss-pam-ldapd-0.9.11-r1.ebuild | 164 +++++++++++++++++++++ 2 files changed, 165 insertions(+) create mode 100644 sys-auth/nss-pam-ldapd/nss-pam-ldapd-0.9.11-r1.ebuild (limited to 'sys-auth/nss-pam-ldapd') diff --git a/sys-auth/nss-pam-ldapd/Manifest b/sys-auth/nss-pam-ldapd/Manifest index 062daa5f8222..4e2ab917cd16 100644 --- a/sys-auth/nss-pam-ldapd/Manifest +++ b/sys-auth/nss-pam-ldapd/Manifest @@ -10,5 +10,6 @@ AUX pynslcd.initd 522 BLAKE2B 180d1ffa695a1cb6fccddfdc8719745e0d21ab082caeffbd0a DIST nss-pam-ldapd-0.9.10.tar.gz 749302 BLAKE2B 38cdc0e2a5b971d18412d7a583a265cdc87249342139dd4af9cddc61d17bc3d4d19b43c6705fdabc9dccc5ad4f7dad5ea473f75cde2915e485252fdf9116a1c6 SHA512 be559bc0d60bcf25af94919d456922bee4abb2c0417a8d2daf954d9aa9af2d41cb06a20cef04d9afd61c1316a744331753ee1cb25ef4a9c5411c508193231218 DIST nss-pam-ldapd-0.9.11.tar.gz 777878 BLAKE2B c2b442786dd788dcf4373939ed52b4585d1821a7168fdd342ded3c99ef9ac8f3e4af0ac360f842b61885c1f2bc2ef85a0ce9ce0c1027bc974d0ba5242505657f SHA512 2b307805667526b85c724e113fe38899eee397e5c8673e89090d4836ce6d0ffcf18dd022d6c20a5e11d4138e736451b841a0f16ba379d524de4faaaf02906645 EBUILD nss-pam-ldapd-0.9.10.ebuild 4202 BLAKE2B f69180c0b26d8938c337e86f119a295567f096de6e1d76be14bec78bf5a8ac9267b894cbfad9453cf92332f275fe6485bbc2ad1ea61a615d90e95b904f37588f SHA512 800110dcf105c27eb4df03cf352ee22c371c3350fb670e6a45f0d09b6f2b0754e2e6de98f86648b82bc94fe34cbcdf75645226ae775c3808c50797ac982ad8a3 +EBUILD nss-pam-ldapd-0.9.11-r1.ebuild 4215 BLAKE2B d0797ed09f70c7afdf6d167cef5c12885da664bca943bc3ee20fd836805536c64f9eae6f4611075088060b1684f373d745c8461f5cc7cb59c03618a4a729b059 SHA512 cb8c283e4d424be4339b3d30723e1a5b4abac60603c3155120e60f8a2417b799026378faf56fd034104f0d55267d91624ac80ca7c7dd9cb8de7432024a73ce43 EBUILD nss-pam-ldapd-0.9.11.ebuild 4203 BLAKE2B 61b0c5674acf6a3b08bb7d796ddf1bbe14b609eb7404325dac0b84f4bd5696cf07dfe8c934623ec6a3275bc4f7ab8a15fb575103a06f3b456ee0e766fb6fe645 SHA512 7f2210393c1813189bb655f9b61150fe3d90463cbbdf533cd7c68925d27c6bc5b76db2a2799f5903bb36be5962b4596c4be7740cf631250446ec1d684941e601 MISC metadata.xml 1169 BLAKE2B 22b5c9adcafb123a6af088ddfcaa1962eaf250ed153020e65afe36a0e6473b1f8c624f770634a91c3a983c74ded1d43535bb4930f13c6470fad681f5a77fcd51 SHA512 ab658f7d791db370920a4eb57da8ead2713b1cabda6f2dccd24478855043802e7c70a07c3aeaa33829b19dc94a4317d8b5ebec07d1caebe07b4fb3bc59b27b4c diff --git a/sys-auth/nss-pam-ldapd/nss-pam-ldapd-0.9.11-r1.ebuild b/sys-auth/nss-pam-ldapd/nss-pam-ldapd-0.9.11-r1.ebuild new file mode 100644 index 000000000000..606482cbb097 --- /dev/null +++ b/sys-auth/nss-pam-ldapd/nss-pam-ldapd-0.9.11-r1.ebuild @@ -0,0 +1,164 @@ +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 + +PYTHON_COMPAT=(python2_7 python3_6) +inherit eutils prefix user python-r1 multilib multilib-minimal systemd s6 + +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="~amd64 ~x86" +IUSE="debug kerberos +pam pynslcd sasl test +utils" +RESTRICT="!test? ( test )" + +COMMON_DEP=" + 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}] + ) + !sys-auth/nss_ldap + !sys-auth/pam_ldap" +RDEPEND="${COMMON_DEP}" +DEPEND="${COMMON_DEP} + test? ( + ${PYTHON_DEPS} + dev-python/pylint[${PYTHON_USEDEP}] + ) + sys-devel/automake" + +REQUIRED_USE=" + utils? ( ${PYTHON_REQUIRED_USE} ) + test? ( ${PYTHON_REQUIRED_USE} pynslcd )" + +PATCHES=( + "${FILESDIR}"/${PN}-0.9.4-disable-py3-only-linters.patch + "${FILESDIR}"/${PN}-0.9.11-pynslcd-module-paths.patch +) + +pkg_setup() { + enewgroup nslcd + enewuser nslcd -1 -1 -1 nslcd +} + +src_prepare() { + cp pynslcd/pynslcd.py "${S}" || die "Copying pynslcd failed" + + default + use utils && python_setup + touch pynslcd/__init__.py || die "Could not create __init__.py for pynslcd" +} + +multilib_src_configure() { + local -a myconf + + myconf=( + --disable-utils + --enable-warnings + --with-ldap-lib=openldap + --with-ldap-conf-file=/etc/nslcd.conf + --with-nslcd-pidfile=/run/nslcd/nslcd.pid + --with-nslcd-socket=/run/nslcd/socket + $(usex x86-fbsd '--with-nss-flavour=' '--with-nss-flavour=' 'freebsd' 'glibc') + $(use_enable pynslcd) + $(use_enable debug) + $(use_enable kerberos) + $(use_enable pam) + $(use_enable sasl) + ) + + # nss libraries always go in /lib on Gentoo + if multilib_is_native_abi ; then + myconf+=("--with-pam-seclib-dir=${EPREFIX}/$(get_libdir)/security") + myconf+=("--libdir=${EPREFIX}/$(get_libdir)") + else + myconf+=("--with-pam-seclib-dir=/$(get_libdir)/security") + myconf+=("--libdir=/$(get_libdir)") + fi + + ECONF_SOURCE="${S}" econf "${myconf[@]}" +} + +multilib_src_install_all() { + local script + + newinitd "${FILESDIR}"/nslcd-init-r1 nslcd + newinitd "${FILESDIR}"/nslcd-init-r2 nslcd + s6_install_service nslcd "${FILESDIR}"/nslcd-run-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 + + for script in chsh getent; do + python_foreach_impl python_newscript utils/${script}.py ${script}.ldap + done + fi + if use pynslcd; then + rm -rf "${D}"/usr/share/pynslcd + python_moduleinto pynslcd + python_foreach_impl python_domodule pynslcd/*.py + python_scriptinto /usr/sbin + python_newscript pynslcd.py pynslcd + newinitd "${FILESDIR}"/pynslcd.initd pynslcd + fi + + systemd_newtmpfilesd "${FILESDIR}"/nslcd-tmpfiles.conf nslcd.conf + systemd_dounit "${FILESDIR}"/nslcd.service +} + +multilib_src_install() { + emake DESTDIR="${D}" install + + if use pynslcd; then + python_moduleinto pynslcd + python_foreach_impl python_domodule pynslcd/*.py + fi +} + +python_test() { + PYTHONPATH="${S}" emake check +} + +multilib_src_test() { + pushd "${BUILD_DIR}" + ln -s ../pynslcd/constants.py utils/constants.py + python_foreach_impl python_test + popd +} + +pkg_postinst() { + echo + elog "For this to work you must configure /etc/nslcd.conf" + elog "This configuration is similar to pam_ldap's /etc/ldap.conf" + echo + 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" + echo + 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" + echo +} -- cgit v1.2.3