commit: 854aa3695b55ac48d199e269e0029d0c68363e86 Author: Robin H. Johnson <robbat2 <AT> gentoo <DOT> org> AuthorDate: Sat Jan 27 19:27:56 2024 +0000 Commit: Robin H. Johnson <robbat2 <AT> gentoo <DOT> org> CommitDate: Sat Jan 27 19:31:26 2024 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=854aa369
net-nds/nsscache: bump, passes tests on py3.10..12 Signed-off-by: Robin H. Johnson <robbat2 <AT> gentoo.org> net-nds/nsscache/Manifest | 4 +- net-nds/nsscache/nsscache-0.39-r1.ebuild | 66 ------------------------ net-nds/nsscache/nsscache-0.47.ebuild | 72 -------------------------- net-nds/nsscache/nsscache-0.49.ebuild | 88 ++++++++++++++++++++++++++++++++ 4 files changed, 89 insertions(+), 141 deletions(-) diff --git a/net-nds/nsscache/Manifest b/net-nds/nsscache/Manifest index e7b222c0c8a1..f86151e1c237 100644 --- a/net-nds/nsscache/Manifest +++ b/net-nds/nsscache/Manifest @@ -1,3 +1 @@ -DIST nsscache-0.30-r3-gentoo-authorized-keys-command.py 11974 BLAKE2B 4272bab8d85ef0f39c8b26fd035009d3c77dd629fd7853e0072232393d329af1885ce44c4877d7718a37154661d9c85bb1f5276463875f9dfbbd023106d9d15a SHA512 b660a6ae19e6e42efbb07d0a368704706b0a0bd1bf0b2c84855f0d1c00d4cda80872432f5a25384d0c27e99bf60072beb12975bcfa0201b52fa040d0e6bc2da2 -DIST nsscache-0.39.tar.gz 127896 BLAKE2B 8383ca53ee5cf2f84e4485722d35598b624005bb32073696a23daa1061c0b057d26333cdee9c97cedcb99daa8c61362719d80b01b216c163a327cd4edeabeefd SHA512 f93cec949302f21bc5989ab3192302a32349ee4ae98e2f05f169cca8a16a821f39857cb0fff52c7b54552828684b4723d22e44f97525a01577ab89bd159e0376 -DIST nsscache-0.47.tar.gz 126225 BLAKE2B f238d4a6565038420dee7359edadf348a0e5fb581b8238b23d3835cc10ad9676917bfa6573c6a1d462d7afee36398954744ff2d498b4c1ed3459666b3aa6ad5c SHA512 94cd9a62169146f1e10f78476a950dfc708b6c2063cffed3617bbfa9c43aaf134b1f038a94079df408e168877d32f07b64b61f048d34fed283828cc75e7dd2cf +DIST nsscache-0.49.tar.gz 128598 BLAKE2B 2d0c9c2818f7dbab44bd4fd17b7e1dceb3f1a236c18c96be4cc5dcf8329c748c0b1f8dc0f462e186458b3ede380ebc408fe56bfe21bc5aa8720a15122f90cec6 SHA512 941f6fcb8f52294f910dcf8e1aaf7f07bf83e7812d9325a709248c49013b46a959c6abdbaafd161ddcef96525d02aa939c68c9548841a6b66b94417f86b67527 diff --git a/net-nds/nsscache/nsscache-0.39-r1.ebuild b/net-nds/nsscache/nsscache-0.39-r1.ebuild deleted file mode 100644 index f486563ad771..000000000000 --- a/net-nds/nsscache/nsscache-0.39-r1.ebuild +++ /dev/null @@ -1,66 +0,0 @@ -# Copyright 1999-2023 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=7 - -PYTHON_COMPAT=( python3_10 ) - -inherit distutils-r1 - -DESCRIPTION="commandline tool to sync directory services to local cache" -HOMEPAGE="https://github.com/google/nsscache" -SCRIPT_A='nsscache-0.30-r3-gentoo-authorized-keys-command.py' -SRC_URI=" - https://github.com/google/nsscache/archive/version/${PV}.tar.gz -> ${P}.tar.gz - https://dev.gentoo.org/~robbat2/${SCRIPT_A}" - -LICENSE="GPL-2" -SLOT="0" -KEYWORDS="~amd64 ~x86" -IUSE="berkdb nsscache s3" -RESTRICT="test" # requires network - -DEPEND=" - dev-python/ldap3[${PYTHON_USEDEP}] - dev-python/pycurl[${PYTHON_USEDEP}] - berkdb? ( dev-python/bsddb3[${PYTHON_USEDEP}] ) - s3? ( dev-python/boto3[${PYTHON_USEDEP}] )" -RDEPEND="${DEPEND} - nsscache? ( >=sys-auth/libnss-cache-0.10 )" - -S="${WORKDIR}/${PN}-version-${PV}" - -python_prepare_all() { - sed -i \ - -e "/setup_requires/s,'pytest-runner',,g" \ - -e '/tests_require/s,\[.*\],[],g' \ - setup.py || die - sed -i \ - -e '/test=pytest/d' \ - setup.cfg || die - sed -i \ - -e '/pytest/d' \ - requirements.txt || die - - distutils-r1_python_prepare_all -} - -python_compile() { - distutils-r1_python_compile --verbose -} - -python_install() { - distutils-r1_python_install - - python_scriptinto /usr/libexec/nsscache - python_newexe "${DISTDIR}"/"${SCRIPT_A}" authorized-keys-command.py -} - -python_install_all() { - distutils-r1_python_install_all - - doman nsscache.1 nsscache.conf.5 - dodoc THANKS nsscache.cron CONTRIBUTING.md README.md - - keepdir /var/lib/nsscache -} diff --git a/net-nds/nsscache/nsscache-0.47.ebuild b/net-nds/nsscache/nsscache-0.47.ebuild deleted file mode 100644 index e399b4dd7a00..000000000000 --- a/net-nds/nsscache/nsscache-0.47.ebuild +++ /dev/null @@ -1,72 +0,0 @@ -# Copyright 1999-2023 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=7 - -PYTHON_COMPAT=( python3_10 ) - -inherit distutils-r1 - -DESCRIPTION="commandline tool to sync directory services to local cache" -HOMEPAGE="https://github.com/google/nsscache" -SCRIPT_A='nsscache-0.30-r3-gentoo-authorized-keys-command.py' -SRC_URI=" - https://github.com/google/nsscache/archive/version/${PV}.tar.gz -> ${P}.tar.gz - https://dev.gentoo.org/~robbat2/${SCRIPT_A}" - -LICENSE="GPL-2" -SLOT="0" -#KEYWORDS="~amd64 ~x86" -KEYWORDS="" # pending infra testing -IUSE="nsscache s3 test" -RESTRICT="test" # requires network - -#test? ( dev-python/pytest-cov[${PYTHON_USEDEP}] dev-python/mox3[${PYTHON_USEDEP}] ) -DEPEND=" - dev-python/ldap3[${PYTHON_USEDEP}] - dev-python/pycurl[${PYTHON_USEDEP}] - s3? ( dev-python/boto3[${PYTHON_USEDEP}] )" -RDEPEND="${DEPEND} - nsscache? ( >=sys-auth/libnss-cache-0.10 )" - -S="${WORKDIR}/${PN}-version-${PV}" - -python_prepare_all() { - # If tests are disabled in the ebuild, disable in setup - if [[ "${RESTRICT/test}" != "$RESTRICT" ]]; then - sed -i \ - -e "/setup_requires/s,'pytest-runner',,g" \ - -e '/tests_require/s,\[.*\],[],g' \ - setup.py || die - sed -i \ - -e '/test=pytest/d' \ - setup.cfg || die - sed -i \ - -e '/pytest/d' \ - requirements.txt || die - fi - - distutils-r1_python_prepare_all -} - -python_compile() { - distutils-r1_python_compile --verbose -} - -python_install() { - distutils-r1_python_install - - python_scriptinto /usr/libexec/nsscache - python_newexe "${DISTDIR}"/"${SCRIPT_A}" authorized-keys-command.py -} - -python_install_all() { - distutils-r1_python_install_all - - doman nsscache.1 nsscache.conf.5 - dodoc THANKS nsscache.cron CONTRIBUTING.md README.md - - keepdir /var/lib/nsscache -} - -[[ "${RESTRICT/test}" != "$RESTRICT" ]] && distutils_enable_tests pytest diff --git a/net-nds/nsscache/nsscache-0.49.ebuild b/net-nds/nsscache/nsscache-0.49.ebuild new file mode 100644 index 000000000000..90f77100fc73 --- /dev/null +++ b/net-nds/nsscache/nsscache-0.49.ebuild @@ -0,0 +1,88 @@ +# Copyright 1999-2023 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +DISTUTILS_USE_PEP517=setuptools +PYTHON_COMPAT=( python3_{10,11,12} ) + +inherit distutils-r1 + +DESCRIPTION="commandline tool to sync directory services to local cache" +HOMEPAGE="https://github.com/google/nsscache" +SRC_URI="https://github.com/google/nsscache/archive/version/${PV}.tar.gz -> ${P}.tar.gz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="nsscache s3 test" + +# testing requires local network (e.g. spin up slapd, httpd) +#PROPERTIES="test_network" +#RESTRICT="test" + +# Optional extras: +# TODO: gcs? ( https://pypi.org/project/google-cloud-storage/ ) +# +# Testing: +# *unit* tests do not require networking. +# *integration* tests require openldap's slapd and networking +RDEPEND=" + nsscache? ( >=sys-auth/libnss-cache-0.10 ) + >=dev-python/python-ldap-3.4[${PYTHON_USEDEP}] + >=dev-python/pycurl-7.45.2[${PYTHON_USEDEP}] + s3? ( dev-python/boto3[${PYTHON_USEDEP}] )" +DEPEND="${RDEPEND} + dev-python/packaging[${PYTHON_USEDEP}] + test? ( + dev-python/pytest-cov[${PYTHON_USEDEP}] + )" + +S="${WORKDIR}/${PN}-version-${PV}" + +python_prepare_all() { + # nsscache.conf is example only, and should be installed in docs. + # Default config tries $PREFIX/config/nsscache.conf + sed -i \ + -e '/data_files/{s,.nsscache.conf.,,}' \ + setup.py + # Upstream forgot to bump the version + sed -i \ + -e '/^__version__/s,0.48,0.49,g' \ + nss_cache/__init__.py + + distutils-r1_python_prepare_all +} + +python_compile() { + distutils-r1_python_compile --verbose +} + +python_install() { + distutils-r1_python_install + + python_scriptinto /usr/libexec/nsscache + python_doexe examples/authorized-keys-command.py + + # Do not install the tests as functional source. + find "${D}" \ + -path '*/site-packages/nss_cache/*' \( \ + -iname '*_test.py*' \ + -o -iname '*_test.*.py*' \ + \) \ + -delete + + # Ignore any exit code from find. + return 0 +} + +python_install_all() { + distutils-r1_python_install_all + + doman nsscache.1 nsscache.conf.5 + dodoc THANKS *.md nsscache.conf nsscache.cron + + keepdir /var/lib/nsscache +} + +distutils_enable_tests pytest