Subject: pkg/31991: additional password backends for net/samba
To: None <pkg-manager@netbsd.org, gnats-admin@netbsd.org,>
From: Geert Hendrickx <ghen@telenet.be>
List: pkgsrc-bugs
Date: 11/03/2005 13:24:00
>Number:         31991
>Category:       pkg
>Synopsis:       additional password backends for net/samba
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    pkg-manager
>State:          open
>Class:          change-request
>Submitter-Id:   net
>Arrival-Date:   Thu Nov 03 13:24:00 +0000 2005
>Originator:     Geert Hendrickx
>Release:        NetBSD 2.1
>Organization:
>Environment:
	
	
System: NetBSD mantis 2.1 NetBSD 2.1 (MANTIS) #0: Fri Oct 28 15:48:15 CEST 2005 geert@mantis:/cvs/obj/sys/arch/i386/compile/MANTIS i386
Architecture: i386
Machine: i386
>Description:
	
The patch below adds some new (but still experimental) passdb backends to net/samba: 
PostgreSQL, MySQL, and XML-based.  

An example setup can be found here: http://www.ogris.de/samba/
>How-To-Repeat:
>Fix:
Index: Makefile
===================================================================
RCS file: /pub/NetBSD-CVS/pkgsrc/net/samba/Makefile,v
retrieving revision 1.146
diff -u -r1.146 Makefile
--- Makefile	19 Aug 2005 18:12:38 -0000	1.146
+++ Makefile	3 Nov 2005 13:18:30 -0000
@@ -1,7 +1,7 @@
 # $NetBSD: Makefile,v 1.146 2005/08/19 18:12:38 jlam Exp $
 
 DISTNAME=		samba-3.0.14a
-PKGREVISION=		1
+PKGREVISION=		2
 CATEGORIES=		net
 MASTER_SITES=		ftp://ftp.samba.org/pub/samba/old-versions/ \
 			ftp://ring.asahi-net.or.jp/pub/net/samba/old-versions/ \
Index: PLIST
===================================================================
RCS file: /pub/NetBSD-CVS/pkgsrc/net/samba/PLIST,v
retrieving revision 1.31
diff -u -r1.31 PLIST
--- PLIST	5 Jun 2005 13:13:05 -0000	1.31
+++ PLIST	3 Nov 2005 13:18:30 -0000
@@ -39,6 +39,9 @@
 lib/samba/libsmbclient.so.0
 lib/samba/lowcase.dat
 lib/samba/nl.msg
+${MYSQL}lib/samba/pdb/mysql.so
+${PGSQL}lib/samba/pdb/pgsql.so
+${XML}lib/samba/pdb/xml.so
 lib/samba/pl.msg
 lib/samba/tr.msg
 lib/samba/upcase.dat
@@ -580,5 +583,6 @@
 @dirrm share/examples/samba
 @dirrm share/doc/samba
 @dirrm lib/samba/vfs
+${PDB}@dirrm lib/samba/pdb
 @dirrm lib/samba/charset
 @dirrm lib/samba
Index: options.mk
===================================================================
RCS file: /pub/NetBSD-CVS/pkgsrc/net/samba/options.mk,v
retrieving revision 1.8
diff -u -r1.8 options.mk
--- options.mk	5 Jun 2005 14:17:53 -0000	1.8
+++ options.mk	3 Nov 2005 13:18:30 -0000
@@ -1,9 +1,9 @@
 # $NetBSD: options.mk,v 1.8 2005/06/05 14:17:53 taca Exp $
 
-# Global and legacy options
+# Global options
 
 PKG_OPTIONS_VAR=	PKG_OPTIONS.samba
-PKG_SUPPORTED_OPTIONS=	pam ads cups ldap ldap-compat
+PKG_SUPPORTED_OPTIONS=	pam ads cups ldap ldap-compat pgsql mysql xml
 .include "../../mk/bsd.options.mk"
 
 ###
@@ -62,6 +62,49 @@
 .endif
 
 ###
+### Support PostgreSQL authentication and storage of Samba account information
+### Experimental!
+###
+.if !empty(PKG_OPTIONS:Mpgsql)
+.  include "../../mk/pgsql.buildlink3.mk"
+PDB+=			pgsql
+PLIST_SUBST+=		PGSQL=
+.else
+PLIST_SUBST+=		PGSQL="@comment "
+.endif
+
+###
+### Support MySQL authentication and storage of Samba account information
+### Experimental!
+###
+.if !empty(PKG_OPTIONS:Mmysql)
+.  include "../../mk/mysql.buildlink3.mk"
+PDB+=			mysql
+PLIST_SUBST+=		MYSQL=
+.else
+PLIST_SUBST+=		MYSQL="@comment "
+.endif
+
+###
+### Support XML authentication and storage of Samba account information
+### Experimental!
+###
+.if !empty(PKG_OPTIONS:Mxml)
+.  include "../../textproc/libxml2/buildlink3.mk"
+PDB+=			xml
+PLIST_SUBST+=		XML=
+.else
+PLIST_SUBST+=		XML="@comment "
+.endif
+
+.if !empty(PDB)
+CONFIGURE_ARGS+=	--with-expsam=${PDB:ts,}
+PLIST_SUBST+=		PDB=
+.else
+PLIST_SUBST+=		PDB="@comment "
+.endif
+
+###
 ### Only Linux supports smbmount for mounting a Samba share into the
 ### filesystem.
 ###

>Unformatted: