svn commit: r386090 - in head/net: . nsscache nsscache/files
Johannes Jost Meixner
xmj at FreeBSD.org
Mon May 11 17:18:58 UTC 2015
Author: xmj
Date: Mon May 11 17:18:55 2015
New Revision: 386090
URL: https://svnweb.freebsd.org/changeset/ports/386090
Log:
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 at kev009.com>
Obtained from: Limelight Networks
Added:
head/net/nsscache/
head/net/nsscache/Makefile (contents, props changed)
head/net/nsscache/distinfo (contents, props changed)
head/net/nsscache/files/
head/net/nsscache/files/patch-nsscache.conf (contents, props changed)
head/net/nsscache/files/patch-setup.py (contents, props changed)
head/net/nsscache/pkg-descr (contents, props changed)
Modified:
head/net/Makefile
Modified: head/net/Makefile
==============================================================================
--- head/net/Makefile Mon May 11 17:12:33 2015 (r386089)
+++ head/net/Makefile Mon May 11 17:18:55 2015 (r386090)
@@ -431,6 +431,7 @@
SUBDIR += nss-pam-ldapd
SUBDIR += nss-pam-ldapd-sasl
SUBDIR += nss_ldap
+ SUBDIR += nsscache
SUBDIR += nstxd
SUBDIR += ntimed
SUBDIR += ntlmaps
Added: head/net/nsscache/Makefile
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ head/net/nsscache/Makefile Mon May 11 17:18:55 2015 (r386090)
@@ -0,0 +1,38 @@
+# Created by: Kevin Bowling <k at kev009.com>
+# $FreeBSD$
+
+PORTNAME= nsscache
+PORTVERSION= 0.29
+CATEGORIES= net python
+
+MAINTAINER= k at 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>
Added: head/net/nsscache/distinfo
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ head/net/nsscache/distinfo Mon May 11 17:18:55 2015 (r386090)
@@ -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
Added: head/net/nsscache/files/patch-nsscache.conf
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ head/net/nsscache/files/patch-nsscache.conf Mon May 11 17:18:55 2015 (r386090)
@@ -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
Added: head/net/nsscache/files/patch-setup.py
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ head/net/nsscache/files/patch-setup.py Mon May 11 17:18:55 2015 (r386090)
@@ -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'])
Added: head/net/nsscache/pkg-descr
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ head/net/nsscache/pkg-descr Mon May 11 17:18:55 2015 (r386090)
@@ -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
More information about the svn-ports-all
mailing list