summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'net-nds/nsscache')
-rw-r--r--net-nds/nsscache/Manifest6
-rw-r--r--net-nds/nsscache/metadata.xml5
-rw-r--r--net-nds/nsscache/nsscache-0.30-r2.ebuild46
-rw-r--r--net-nds/nsscache/nsscache-0.30.ebuild41
-rw-r--r--net-nds/nsscache/nsscache-0.31.ebuild47
-rw-r--r--net-nds/nsscache/nsscache-0.32.ebuild47
-rw-r--r--net-nds/nsscache/nsscache-0.49.ebuild89
7 files changed, 93 insertions, 188 deletions
diff --git a/net-nds/nsscache/Manifest b/net-nds/nsscache/Manifest
index ea087fb9106e..f86151e1c237 100644
--- a/net-nds/nsscache/Manifest
+++ b/net-nds/nsscache/Manifest
@@ -1,5 +1 @@
-DIST nsscache-0.30-gentoo-authorized-keys-command.py 8004 BLAKE2B d5acb0edf6389a7dd1382aad290b1541f147c11d06e1e8458aa1c6a7a3dd9e5d1db0a1a0f6f63d489c0bc464d545c6a1b6cf752f8a0050f9efb6f6d576e6e32f SHA512 58d3053aa140cbec214033ea3c524e7e7b670aa94a6ff306b9d816ffd4c23b8c781b1178ef7ce14009f8b45afaf05f75e9248e8c1eebef790b838baef5f50c26
-DIST nsscache-0.30-r3-gentoo-authorized-keys-command.py 11974 BLAKE2B 4272bab8d85ef0f39c8b26fd035009d3c77dd629fd7853e0072232393d329af1885ce44c4877d7718a37154661d9c85bb1f5276463875f9dfbbd023106d9d15a SHA512 b660a6ae19e6e42efbb07d0a368704706b0a0bd1bf0b2c84855f0d1c00d4cda80872432f5a25384d0c27e99bf60072beb12975bcfa0201b52fa040d0e6bc2da2
-DIST nsscache-0.30.tar.gz 109615 BLAKE2B 1b67da7241a974a541514849643115d8e6dd0e587dbd39e1919eaca5064b6fde79678c3443246444d1b8c75c4455ad008231ee1f1a6b74511d9a38e742be2c6e SHA512 22c58904eadd2e69405c42263c1c85c7b612151466386870fbea7685ab32835250a84f1acd83fca6f3289582c74df5371cbfb4f354679a302f240fd0ff334712
-DIST nsscache-0.31.tar.gz 108073 BLAKE2B c730786e4a273d039273f104d1458587741c5bc8b2e470d12a551765f3141aafb33df811feca432b493415e20c9abb07244b9c624e38053b95c15c5e41ba8303 SHA512 1be90b0217605f86d2effc6063a805fb604f535386cc9f2eb8b0244ab1293521fd1342f52e3fad98c7d95cf66db3dabf93747bf40ce5ed2bf70c8c07382001a4
-DIST nsscache-0.32.tar.gz 112333 BLAKE2B ac477eef53e8e9d8cdcc7a0d7b460046883aaba8836ec5d49f449aae0d4f0ea34cd10f89a98849a18e0a0b1b5d1eb4f4c99a138d6eb2bc6bc608a1cc33c28ac2 SHA512 c35f539ea017a328c1630031b7934c231b256d3f2198c6764954c42f36ed281432ff97667e5754692971b4f24be38887406f98718d5f49d364e1e3eebb32185f
+DIST nsscache-0.49.tar.gz 128598 BLAKE2B 2d0c9c2818f7dbab44bd4fd17b7e1dceb3f1a236c18c96be4cc5dcf8329c748c0b1f8dc0f462e186458b3ede380ebc408fe56bfe21bc5aa8720a15122f90cec6 SHA512 941f6fcb8f52294f910dcf8e1aaf7f07bf83e7812d9325a709248c49013b46a959c6abdbaafd161ddcef96525d02aa939c68c9548841a6b66b94417f86b67527
diff --git a/net-nds/nsscache/metadata.xml b/net-nds/nsscache/metadata.xml
index 2391c0ec85c5..434f8bb9eb58 100644
--- a/net-nds/nsscache/metadata.xml
+++ b/net-nds/nsscache/metadata.xml
@@ -1,11 +1,12 @@
<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
<maintainer type="person">
<email>robbat2@gentoo.org</email>
</maintainer>
<use>
- <flag name="nsscache">Depend on sys-auth/libnss-cache to handle flat files</flag>
+ <flag name="nsscache">Depend on <pkg>sys-auth/libnss-cache</pkg> to handle flat files</flag>
+ <flag name="s3">Support for S3-based NSS sources</flag>
</use>
<upstream>
<remote-id type="github">google/nsscache</remote-id>
diff --git a/net-nds/nsscache/nsscache-0.30-r2.ebuild b/net-nds/nsscache/nsscache-0.30-r2.ebuild
deleted file mode 100644
index 522bf5454392..000000000000
--- a/net-nds/nsscache/nsscache-0.30-r2.ebuild
+++ /dev/null
@@ -1,46 +0,0 @@
-# Copyright 1999-2018 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=5
-PYTHON_COMPAT=( python2_7 )
-
-inherit eutils 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
- https://dev.gentoo.org/~robbat2/nsscache-0.30-gentoo-authorized-keys-command.py"
-
-LICENSE="GPL-2"
-SLOT="0"
-KEYWORDS="~amd64 ~x86"
-REQUIRED_USE="${PYTHON_REQUIRED_USE}"
-IUSE="nsscache"
-
-DEPEND="${PYTHON_DEPS}
- dev-python/python-ldap[${PYTHON_USEDEP}]
- dev-python/pycurl[${PYTHON_USEDEP}]
- dev-python/bsddb3[${PYTHON_USEDEP}]"
-RDEPEND="${DEPEND}
- nsscache? ( >=sys-auth/libnss-cache-0.10 )"
-RESTRICT="test"
-S="${WORKDIR}/${PN}-version-${PV}"
-
-src_prepare() {
- find "${S}" -name '*.py' -exec \
- sed -i '/^import bsddb$/s,bsddb,bsddb3 as bsddb,g' \
- {} \+
- distutils-r1_src_prepare
-}
-
-src_install() {
- distutils-r1_src_install
-
- doman nsscache.1 nsscache.conf.5
- dodoc THANKS nsscache.cron CONTRIBUTING.md README.md
- exeinto /usr/libexec/nsscache
- newexe "${DISTDIR}"/nsscache-0.30-gentoo-authorized-keys-command.py authorized-keys-command.py
-
- keepdir /var/lib/nsscache
-}
diff --git a/net-nds/nsscache/nsscache-0.30.ebuild b/net-nds/nsscache/nsscache-0.30.ebuild
deleted file mode 100644
index 822766f671c9..000000000000
--- a/net-nds/nsscache/nsscache-0.30.ebuild
+++ /dev/null
@@ -1,41 +0,0 @@
-# Copyright 1999-2018 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=5
-PYTHON_COMPAT=( python2_7 )
-
-inherit eutils 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"
-REQUIRED_USE="${PYTHON_REQUIRED_USE}"
-IUSE="nsscache"
-
-DEPEND="${PYTHON_DEPS}
- dev-python/python-ldap[${PYTHON_USEDEP}]
- dev-python/pycurl[${PYTHON_USEDEP}]"
-RDEPEND="${DEPEND}
- nsscache? ( >=sys-auth/libnss-cache-0.10 )"
-RESTRICT="test"
-S="${WORKDIR}/${PN}-version-${PV}"
-
-src_prepare() {
- find "${S}" -name '*.py' -exec \
- sed -i '/^import bsddb$/s,bsddb,bsddb3 as bsddb,g' \
- {} \+
- distutils-r1_src_prepare
-}
-
-src_install() {
- distutils-r1_src_install
-
- doman nsscache.1 nsscache.conf.5
- dodoc THANKS nsscache.cron
-
- keepdir /var/lib/nsscache
-}
diff --git a/net-nds/nsscache/nsscache-0.31.ebuild b/net-nds/nsscache/nsscache-0.31.ebuild
deleted file mode 100644
index a62723e48c66..000000000000
--- a/net-nds/nsscache/nsscache-0.31.ebuild
+++ /dev/null
@@ -1,47 +0,0 @@
-# Copyright 1999-2018 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=5
-PYTHON_COMPAT=( python2_7 )
-
-inherit eutils 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"
-REQUIRED_USE="${PYTHON_REQUIRED_USE}"
-IUSE="nsscache"
-
-DEPEND="${PYTHON_DEPS}
- dev-python/python-ldap[${PYTHON_USEDEP}]
- dev-python/pycurl[${PYTHON_USEDEP}]
- dev-python/bsddb3[${PYTHON_USEDEP}]"
-RDEPEND="${DEPEND}
- nsscache? ( >=sys-auth/libnss-cache-0.10 )"
-RESTRICT="test"
-S="${WORKDIR}/${PN}-version-${PV}"
-
-src_prepare() {
- find "${S}" -name '*.py' -exec \
- sed -i '/^import bsddb$/s,bsddb,bsddb3 as bsddb,g' \
- {} \+
- distutils-r1_src_prepare
-}
-
-src_install() {
- distutils-r1_src_install
-
- doman nsscache.1 nsscache.conf.5
- dodoc THANKS nsscache.cron CONTRIBUTING.md README.md
- exeinto /usr/libexec/nsscache
- newexe "${DISTDIR}"/"${SCRIPT_A}" authorized-keys-command.py
-
- keepdir /var/lib/nsscache
-}
diff --git a/net-nds/nsscache/nsscache-0.32.ebuild b/net-nds/nsscache/nsscache-0.32.ebuild
deleted file mode 100644
index a62723e48c66..000000000000
--- a/net-nds/nsscache/nsscache-0.32.ebuild
+++ /dev/null
@@ -1,47 +0,0 @@
-# Copyright 1999-2018 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=5
-PYTHON_COMPAT=( python2_7 )
-
-inherit eutils 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"
-REQUIRED_USE="${PYTHON_REQUIRED_USE}"
-IUSE="nsscache"
-
-DEPEND="${PYTHON_DEPS}
- dev-python/python-ldap[${PYTHON_USEDEP}]
- dev-python/pycurl[${PYTHON_USEDEP}]
- dev-python/bsddb3[${PYTHON_USEDEP}]"
-RDEPEND="${DEPEND}
- nsscache? ( >=sys-auth/libnss-cache-0.10 )"
-RESTRICT="test"
-S="${WORKDIR}/${PN}-version-${PV}"
-
-src_prepare() {
- find "${S}" -name '*.py' -exec \
- sed -i '/^import bsddb$/s,bsddb,bsddb3 as bsddb,g' \
- {} \+
- distutils-r1_src_prepare
-}
-
-src_install() {
- distutils-r1_src_install
-
- doman nsscache.1 nsscache.conf.5
- dodoc THANKS nsscache.cron CONTRIBUTING.md README.md
- exeinto /usr/libexec/nsscache
- newexe "${DISTDIR}"/"${SCRIPT_A}" authorized-keys-command.py
-
- keepdir /var/lib/nsscache
-}
diff --git a/net-nds/nsscache/nsscache-0.49.ebuild b/net-nds/nsscache/nsscache-0.49.ebuild
new file mode 100644
index 000000000000..7c9dfe0b027a
--- /dev/null
+++ b/net-nds/nsscache/nsscache-0.49.ebuild
@@ -0,0 +1,89 @@
+# Copyright 1999-2024 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"
+
+# upstream *sources* say "or later", but upstream metadata does not include the
+# 'or later' clause.
+LICENSE="GPL-2+"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="nsscache s3 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
+#
+# The ebuild runs the unit testing explicitly, as upstream uses Docker to run
+# the integration tests.
+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[${PYTHON_USEDEP}]
+ )"
+
+S="${WORKDIR}/${PN}-version-${PV}"
+
+distutils_enable_tests pytest
+
+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
+}
+
+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.
+ # Subject to some debate, see bug 923061
+ # To be raised on gentoo-dev 2024/02/01
+ #find "${D}" \
+ # -path '*/site-packages/nss_cache/*' \( \
+ # -iname '*_test.py*' \
+ # -o -iname '*_test.*.py*' \
+ # \) \
+ # -delete \
+ #|| die "find failed"
+}
+
+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
+}