mirror of
https://git.FreeBSD.org/ports.git
synced 2025-01-01 05:45:45 +00:00
net/nsscache: add port
nsscache is a utility for caching directory service information into local cache files. On FreeBSD, it is intended to be used with the net/libnss-cache port but it can also output BDB files for use by other operating systems. WWW: https://github.com/google/nsscache PR: 200123 Submitted by: Kevin Bowling <kevin.bowling@kev009.com> Obtained from: Limelight Networks
This commit is contained in:
parent
e4978fc246
commit
6b8a9b9fef
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=386090
@ -431,6 +431,7 @@
|
||||
SUBDIR += nss-pam-ldapd
|
||||
SUBDIR += nss-pam-ldapd-sasl
|
||||
SUBDIR += nss_ldap
|
||||
SUBDIR += nsscache
|
||||
SUBDIR += nstxd
|
||||
SUBDIR += ntimed
|
||||
SUBDIR += ntlmaps
|
||||
|
38
net/nsscache/Makefile
Normal file
38
net/nsscache/Makefile
Normal file
@ -0,0 +1,38 @@
|
||||
# Created by: Kevin Bowling <k@kev009.com>
|
||||
# $FreeBSD$
|
||||
|
||||
PORTNAME= nsscache
|
||||
PORTVERSION= 0.29
|
||||
CATEGORIES= net python
|
||||
|
||||
MAINTAINER= k@kev009.com
|
||||
COMMENT= Python utility to create a local cache of directory services
|
||||
|
||||
LICENSE= GPLv2
|
||||
LICENSE_FILE= ${WRKSRC}/COPYING
|
||||
|
||||
RUN_DEPENDS= ${PYTHON_SITELIBDIR}/pycurl.so:${PORTSDIR}/ftp/py-curl \
|
||||
${PYTHON_PKGNAMEPREFIX}ldap2>0:${PORTSDIR}/net/py-ldap2 \
|
||||
${PYTHON_PKGNAMEPREFIX}bsddb>0:${PORTSDIR}/databases/py-bsddb
|
||||
|
||||
USES= python:2
|
||||
USE_PYTHON= autoplist distutils
|
||||
USE_GITHUB= yes
|
||||
GH_ACCOUNT= google
|
||||
GH_TAGNAME= version/${DISTVERSION}
|
||||
|
||||
PLIST_FILES= '@sample etc/nsscache.conf.sample' '@dir /var/db/nsscache' \
|
||||
man/man1/nsscache.1.gz man/man5/nsscache.conf.5.gz
|
||||
|
||||
post-patch:
|
||||
@${REINPLACE_CMD} -e 's|/etc/nsscache.conf|${PREFIX}/etc/nsscache.conf|g' ${WRKSRC}/nss_cache/config.py
|
||||
@${REINPLACE_CMD} -e "s|%%PREFIX%%|${PREFIX}|g" ${WRKSRC}/nsscache.conf
|
||||
@${REINPLACE_CMD} -e "s|/var/lib/misc|/var/db/nsscache|g" ${WRKSRC}/nsscache.conf.5
|
||||
|
||||
post-install:
|
||||
${INSTALL_DATA} ${WRKSRC}/nsscache.conf ${STAGEDIR}${PREFIX}/etc/nsscache.conf.sample
|
||||
${INSTALL_MAN} ${WRKSRC}/nsscache.1 ${STAGEDIR}${MANPREFIX}/man/man1
|
||||
${INSTALL_MAN} ${WRKSRC}/nsscache.conf.5 ${STAGEDIR}${MANPREFIX}/man/man5
|
||||
@${MKDIR} ${STAGEDIR}/var/db/nsscache
|
||||
|
||||
.include <bsd.port.mk>
|
2
net/nsscache/distinfo
Normal file
2
net/nsscache/distinfo
Normal file
@ -0,0 +1,2 @@
|
||||
SHA256 (google-nsscache-0.29-version-0.29_GH0.tar.gz) = 631cd032eecdbf27d276540d9e5bb945fced6e71bb3bc8f64475d80c472d9308
|
||||
SIZE (google-nsscache-0.29-version-0.29_GH0.tar.gz) = 106591
|
38
net/nsscache/files/patch-nsscache.conf
Normal file
38
net/nsscache/files/patch-nsscache.conf
Normal file
@ -0,0 +1,38 @@
|
||||
--- nsscache.conf.orig 2014-10-21 10:32:31 UTC
|
||||
+++ nsscache.conf
|
||||
@@ -2,7 +2,7 @@
|
||||
#
|
||||
# nsscache loads a config file from the environment variable NSSCACHE_CONFIG
|
||||
#
|
||||
-# By default this is /etc/nsscache.conf
|
||||
+# By default this is %%PREFIX%%/etc/nsscache.conf
|
||||
#
|
||||
# Commented values are overrideable defaults, uncommented values
|
||||
# require you to set them.
|
||||
@@ -13,14 +13,14 @@
|
||||
source = ldap
|
||||
|
||||
# Default NSS data cache module name
|
||||
-cache = nssdb
|
||||
-#cache = files
|
||||
+#cache = nssdb
|
||||
+cache = files
|
||||
|
||||
# NSS maps to be cached
|
||||
maps = passwd, group, shadow, netgroup, automount
|
||||
|
||||
# Directory to store our update/modify timestamps
|
||||
-timestamp_dir = /var/lib/nsscache
|
||||
+timestamp_dir = /var/db/nsscache
|
||||
|
||||
# Lockfile to use for update/repair operations
|
||||
#lockfile = /var/run/nsscache
|
||||
@@ -89,7 +89,7 @@ ldap_filter = (objectclass=posixAccount)
|
||||
|
||||
# Directory to store nssdb databases. Current libnss_db code requires
|
||||
# the path below
|
||||
-nssdb_dir = /var/lib/misc
|
||||
+nssdb_dir = /var/db/nsscache
|
||||
|
||||
# Path to `makedb', supplied by the nss_db module
|
||||
#nssdb_makedb = /usr/bin/makedb
|
9
net/nsscache/files/patch-setup.py
Normal file
9
net/nsscache/files/patch-setup.py
Normal file
@ -0,0 +1,9 @@
|
||||
--- setup.py.orig 2014-10-21 10:32:31 UTC
|
||||
+++ setup.py
|
||||
@@ -48,5 +48,4 @@ as LDAP.''',
|
||||
'nss_cache.util',
|
||||
'nss_cache.update',
|
||||
'nss_cache.sources'],
|
||||
- scripts=['nsscache'],
|
||||
- data_files=[('/etc', ['nsscache.conf'])])
|
||||
+ scripts=['nsscache'])
|
7
net/nsscache/pkg-descr
Normal file
7
net/nsscache/pkg-descr
Normal file
@ -0,0 +1,7 @@
|
||||
nsscache is a utility for caching directory service information into local
|
||||
cache files.
|
||||
|
||||
On FreeBSD, it is intended to be used with the net/libnss-cache port but it
|
||||
can also output BDB files for use by other operating systems.
|
||||
|
||||
WWW: https://github.com/google/nsscache
|
Loading…
Reference in New Issue
Block a user