pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/sysutils/smbldap-tools Importing smbldap-tools version...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/b747ea4c20f4
branches:  trunk
changeset: 543414:b747ea4c20f4
user:      taca <taca%pkgsrc.org@localhost>
date:      Mon Jun 16 16:04:25 2008 +0000

description:
Importing smbldap-tools version 0.9.5.  It has still experimental phase.


Smbldap-tools is a set of scripts designed to help integrate Samba and
a LDAP directory.  They target both users and administrators of unix
systems.

Users can change their password in a way similar to the standard
`passwd' command.

Administrators can perform user and group management command line
actions and synchronise Samba account management consistently.

A version of these tools are bundled with samba, but this set is from
the master development site and is generally more up to date.

diffstat:

 sysutils/smbldap-tools/DESCR            |   12 ++
 sysutils/smbldap-tools/MESSAGE          |    7 +
 sysutils/smbldap-tools/Makefile         |   94 ++++++++++++++++++++++
 sysutils/smbldap-tools/PLIST            |   27 ++++++
 sysutils/smbldap-tools/distinfo         |   14 +++
 sysutils/smbldap-tools/patches/patch-aa |   96 +++++++++++++++++++++++
 sysutils/smbldap-tools/patches/patch-ab |   96 +++++++++++++++++++++++
 sysutils/smbldap-tools/patches/patch-ac |   64 +++++++++++++++
 sysutils/smbldap-tools/patches/patch-ad |   31 +++++++
 sysutils/smbldap-tools/patches/patch-ae |   40 +++++++++
 sysutils/smbldap-tools/patches/patch-af |   13 +++
 sysutils/smbldap-tools/patches/patch-ag |   13 +++
 sysutils/smbldap-tools/patches/patch-ah |   96 +++++++++++++++++++++++
 sysutils/smbldap-tools/patches/patch-ai |  131 ++++++++++++++++++++++++++++++++
 14 files changed, 734 insertions(+), 0 deletions(-)

diffs (truncated from 790 to 300 lines):

diff -r f12b71aad989 -r b747ea4c20f4 sysutils/smbldap-tools/DESCR
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/sysutils/smbldap-tools/DESCR      Mon Jun 16 16:04:25 2008 +0000
@@ -0,0 +1,12 @@
+Smbldap-tools is a set of scripts designed to help integrate Samba and
+a LDAP directory.  They target both users and administrators of unix
+systems.
+
+Users can change their password in a way similar to the standard
+`passwd' command.
+
+Administrators can perform user and group management command line
+actions and synchronise Samba account management consistently.
+
+A version of these tools are bundled with samba, but this set is from
+the master development site and is generally more up to date.
diff -r f12b71aad989 -r b747ea4c20f4 sysutils/smbldap-tools/MESSAGE
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/sysutils/smbldap-tools/MESSAGE    Mon Jun 16 16:04:25 2008 +0000
@@ -0,0 +1,7 @@
+===========================================================================
+$NetBSD: MESSAGE,v 1.1.1.1 2008/06/16 16:04:25 taca Exp $
+
+Please use this package with caution since it includes experimental
+patches.
+
+===========================================================================
diff -r f12b71aad989 -r b747ea4c20f4 sysutils/smbldap-tools/Makefile
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/sysutils/smbldap-tools/Makefile   Mon Jun 16 16:04:25 2008 +0000
@@ -0,0 +1,94 @@
+# $NetBSD: Makefile,v 1.1.1.1 2008/06/16 16:04:25 taca Exp $
+
+DISTNAME=      smbldap-tools-0.9.5
+CATEGORIES=    sysutils net databases
+MASTER_SITES=  http://download.gna.org/smbldap-tools/packages/
+EXTRACT_SUFX=  .tgz
+
+MAINTAINER=    pkgsrc-users%NetBSD.org@localhost
+HOMEPAGE=      https://gna.org/projects/smbldap-tools/
+COMMENT=       Set of ldap administration scripts for samba
+
+DEPENDS+=      samba>=3.0.22:../../net/samba
+DEPENDS+=      p5-perl-ldap>=0.33:../../databases/p5-perl-ldap
+DEPENDS+=      p5-Crypt-SmbHash>=0.12:../../security/p5-Crypt-SmbHash
+DEPENDS+=      p5-Digest-SHA1>=2.11:../../security/p5-Digest-SHA1
+DEPENDS+=      p5-Unicode-MapUTF8-[0-9]*:../../converters/p5-Unicode-MapUTF8
+
+NO_BUILD=      yes
+USE_TOOLS+=    perl:run
+WRKSRC=                ${WRKDIR}/smbldap-tools-0.9.5
+
+SMBLDAP_CONF=  smbldap.conf smbldap_bind.conf
+SMBLDAP_DOCS=  doc/smbldap-tools.html doc/smbldap-tools.pdf
+SMBLDAP_EG=    doc/slapd.conf doc/smb.conf
+SMBLDAP_LIBS=  smbldap_tools.pm
+SMBLDAP_PASSWD=        smbldap-passwd
+SMBLDAP_TOOLS= smbldap-groupadd smbldap-groupdel smbldap-groupmod \
+               smbldap-groupshow  \
+               smbldap-useradd smbldap-userdel smbldap-userinfo \
+               smbldap-usermod smbldap-usershow
+SMBLDAP_UTILS= configure.pl smbldap-populate \
+               doc/migration_scripts/smbldap-migrate-pwdump-accounts \
+               doc/migration_scripts/smbldap-migrate-pwdump-groups \
+               doc/migration_scripts/smbldap-migrate-unix-accounts \
+               doc/migration_scripts/smbldap-migrate-unix-groups
+
+REPLACE_PERL=  ${SMBLDAP_LIBS} ${SMBLDAP_PASSWD} ${SMBLDAP_TOOLS} \
+               ${SMBLDAP_UTILS}
+
+SUBST_CLASSES+=                path
+SUBST_STAGE.path=      pre-install
+SUBST_FILES.path=      configure.pl doc/slapd.conf doc/smb.conf
+SUBST_FILES.path+=     smbldap_tools.pm smbldap.conf
+SUBST_SED.path=                -e "s,@PREFIX@,${PREFIX},g"
+SUBST_SED.path+=       -e "s,@OPENLDAP_VARDIR@,${OPENLDAP_VARDIR},g"
+SUBST_SED.path+=       -e "s,@PKG_SYSCONFDIR@,${PKG_SYSCONFDIR},g"
+SUBST_SED.path+=       -e "s,@SAMBA_PIDDIR@,${SAMBA_PIDDIR},g"
+
+SUBST_CLASSES+=                conf
+SUBST_STAGE.conf=      pre-install
+SUBST_FILES.conf=      configure.pl
+SUBST_SED.conf+=       -e '/\$$Source: /cvsroot/pkgsrc/sysutils/smbldap-tools/Makefile,v $$]//g'
+SUBST_SED.conf+=       -e '/\$$Id: Makefile,v 1.1.1.1 2008/06/16 16:04:25 taca Exp $$]//g'
+
+EGDIR=                 share/examples/smbldap-tools
+
+CONF_FILES+=           ${EGDIR}/smbldap.conf ${PKG_SYSCONFDIR}/smbldap.conf
+CONF_FILES_PERMS+=     ${EGDIR}/smbldap_bind.conf \
+                       ${PKG_SYSCONFDIR}/smbldap_bind.conf \
+                       ${BINOWN} ${BINGRP} 0600
+
+BUILD_DEFS=            VARBASE
+INSTALLATION_DIRS=     bin sbin/smbldap-tools share/doc/smbldap-tools ${EGDIR}
+
+.include "../../mk/bsd.prefs.mk"
+
+PKG_SYSCONFSUBDIR?=    smbldap-tools
+OPENLDAP_VARDIR?=      ${VARBASE}/openldap
+SAMBA_PIDDIR?=         ${VARBASE}/run
+
+do-install:
+.for f in ${SMBLDAP_LIBS}
+       ${INSTALL_DATA} ${WRKSRC}/${f} ${DESTDIR}${PERL5_INSTALLVENDORLIB}
+.endfor
+.for f in ${SMBLDAP_PASSWD}
+       ${INSTALL_SCRIPT} ${WRKSRC}/${f} ${DESTDIR}${PREFIX}/bin
+.endfor
+.for f in ${SMBLDAP_TOOLS}
+       ${INSTALL_SCRIPT} ${WRKSRC}/${f} ${DESTDIR}${PREFIX}/sbin
+.endfor
+.for f in ${SMBLDAP_UTILS}
+       ${INSTALL_SCRIPT} ${WRKSRC}/${f} ${DESTDIR}${PREFIX}/sbin/smbldap-tools
+.endfor
+.for f in ${SMBLDAP_CONF} ${SMBLDAP_EG}
+       ${INSTALL_DATA} ${WRKSRC}/${f} \
+               ${DESTDIR}${PREFIX}/share/examples/smbldap-tools
+.endfor
+.for f in ${SMBLDAP_DOCS}
+       ${INSTALL_DATA} ${WRKSRC}/${f} \
+               ${DESTDIR}${PREFIX}/share/doc/smbldap-tools
+.endfor
+
+.include "../../lang/perl5/vars.mk"
+.include "../../mk/bsd.pkg.mk"
diff -r f12b71aad989 -r b747ea4c20f4 sysutils/smbldap-tools/PLIST
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/sysutils/smbldap-tools/PLIST      Mon Jun 16 16:04:25 2008 +0000
@@ -0,0 +1,27 @@
+@comment $NetBSD: PLIST,v 1.1.1.1 2008/06/16 16:04:25 taca Exp $
+bin/smbldap-passwd
+${PERL5_SUB_INSTALLVENDORLIB}/smbldap_tools.pm
+sbin/smbldap-groupadd
+sbin/smbldap-groupdel
+sbin/smbldap-groupmod
+sbin/smbldap-groupshow
+sbin/smbldap-useradd
+sbin/smbldap-userdel
+sbin/smbldap-userinfo
+sbin/smbldap-usermod
+sbin/smbldap-usershow
+sbin/smbldap-tools/configure.pl
+sbin/smbldap-tools/smbldap-populate
+sbin/smbldap-tools/smbldap-migrate-pwdump-accounts
+sbin/smbldap-tools/smbldap-migrate-pwdump-groups
+sbin/smbldap-tools/smbldap-migrate-unix-accounts
+sbin/smbldap-tools/smbldap-migrate-unix-groups
+share/doc/smbldap-tools/smbldap-tools.html
+share/doc/smbldap-tools/smbldap-tools.pdf
+share/examples/smbldap-tools/slapd.conf
+share/examples/smbldap-tools/smb.conf
+share/examples/smbldap-tools/smbldap.conf
+share/examples/smbldap-tools/smbldap_bind.conf
+@dirrm share/examples/smbldap-tools
+@dirrm share/doc/smbldap-tools
+@dirrm sbin/smbldap-tools
diff -r f12b71aad989 -r b747ea4c20f4 sysutils/smbldap-tools/distinfo
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/sysutils/smbldap-tools/distinfo   Mon Jun 16 16:04:25 2008 +0000
@@ -0,0 +1,14 @@
+$NetBSD: distinfo,v 1.1.1.1 2008/06/16 16:04:25 taca Exp $
+
+SHA1 (smbldap-tools-0.9.5.tgz) = 05534385b6f7d031d0721d64f339bf8d166a68f5
+RMD160 (smbldap-tools-0.9.5.tgz) = 055d7dc059d19ad153412c449d1448858c1fe42c
+Size (smbldap-tools-0.9.5.tgz) = 303131 bytes
+SHA1 (patch-aa) = f49e131afbead61baafef55bc5d8a5dd700bbf7d
+SHA1 (patch-ab) = f785d67107435cc94ed202de84249aa4f95dd7fd
+SHA1 (patch-ac) = db681d57c9eb1b6195e77bd7d58431f3bb773421
+SHA1 (patch-ad) = ec00520ae444ed7842e6139bf592b855e0de491f
+SHA1 (patch-ae) = b9909ba4c29aa894c133d21fdd73183b51fbc0de
+SHA1 (patch-af) = 3eedae8c4fa29736231ffa0a6885a3f416f58d04
+SHA1 (patch-ag) = f8b0f27ab3938f82b22df01c126f75d196157099
+SHA1 (patch-ah) = cd2e2b15061e0f1c0c2d0cf9aedf9d90a106342a
+SHA1 (patch-ai) = ed9f750eeb5985846df3fa6652cc8796f1d7736b
diff -r f12b71aad989 -r b747ea4c20f4 sysutils/smbldap-tools/patches/patch-aa
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/sysutils/smbldap-tools/patches/patch-aa   Mon Jun 16 16:04:25 2008 +0000
@@ -0,0 +1,96 @@
+$NetBSD: patch-aa,v 1.1.1.1 2008/06/16 16:04:25 taca Exp $
+
+--- configure.pl.orig  2008-04-22 17:13:29.000000000 +0900
++++ configure.pl
+@@ -31,6 +31,7 @@
+ 
+ use strict;
+ use File::Basename;
++use FileHandle;
+ 
+ # we need to be root to configure the scripts
+ if ($< != 0) {
+@@ -49,16 +50,19 @@ Before starting, check
+ print "-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-\n";
+ 
+ # we first check if Samba is up and running
+-my $test_smb=`pidof smbd`;
+-chomp($test_smb);
++my $test_smb;
++$test_smb = read_pidfile('@SAMBA_PIDDIR@/smbd.pid');
++if (not defined $test_smb) {
++    $test_smb =`pidof smbd`;
++    chomp($test_smb);
++}
++
+ die "\nSamba need to be started first !\n" if ($test_smb eq "" || not defined $test_smb);
+ 
+ print "Looking for configuration files...\n\n";
+ my $smb_conf="";
+-if (-e "/etc/samba/smb.conf") {
+-  $smb_conf="/etc/samba/smb.conf";
+-} elsif (-e "/usr/local/samba/lib/smb.conf") {
+-  $smb_conf="/usr/local/samba/lib/smb.conf";
++if (-e "@PREFIX@/etc/samba/smb.conf") {
++  $smb_conf="@PREFIX@/etc/samba/smb.conf";
+ }
+ print "Samba Configuration File Path [$smb_conf] > ";
+ chomp(my $config_smb=<STDIN>);
+@@ -66,14 +70,7 @@ if ($config_smb ne "") {
+   $smb_conf=$config_smb;
+ }
+ 
+-my $conf_dir;
+-if (-d "/etc/opt/IDEALX/smbldap-tools") {
+-      $conf_dir="/etc/opt/IDEALX/smbldap-tools/";
+-} elsif (-d "/etc/smbldap-tools") {
+-      $conf_dir="/etc/smbldap-tools/";
+-} else {
+-      $conf_dir="/etc/opt/IDEALX/smbldap-tools/";
+-}
++my $conf_dir = '@PKG_SYSCONFDIR@';
+ 
+ print "\nThe default directory in which the smbldap configuration files are stored is shown.\n";
+ print "If you need to change this, enter the full directory path, then press enter to continue.\n";
+@@ -304,7 +301,7 @@ my $default_user_gidnumber=read_entry(".
+ 
+ my $default_computer_gidnumber=read_entry(". default computer gidNumber","","515",0);
+ 
+-my $userLoginShell=read_entry(". default login shell","","/bin/bash",0);
++my $userLoginShell=read_entry(". default login shell","","/bin/csh",0);
+ 
+ my $skeletonDir=read_entry(". default skeleton directory","","/etc/skel",0);
+ 
+@@ -528,12 +525,12 @@ mailDomain=\"$mailDomain\"
+ # Allows not to use smbpasswd (if with_smbpasswd == 0 in smbldap_conf.pm) but
+ # prefer Crypt::SmbHash library
+ with_smbpasswd=\"0\"
+-smbpasswd=\"/usr/bin/smbpasswd\"
++smbpasswd=\"@PREFIX@/bin/smbpasswd\"
+ 
+ # Allows not to use slappasswd (if with_slappasswd == 0 in smbldap_conf.pm)
+ # but prefer Crypt:: libraries
+ with_slappasswd=\"0\"
+-slappasswd=\"/usr/sbin/slappasswd\"
++slappasswd=\"@PREFIX@/sbin/slappasswd\"
+ 
+ # comment out the following line to get rid of the default banner
+ # no_banner=\"1\"
+@@ -574,5 +571,15 @@ print "  $smbldap_bind_conf done.\n";
+ $mode=0600;
+ chmod $mode,"$smbldap_bind_conf","$smbldap_bind_conf.old";
+ 
+-
+-
++sub read_pidfile {
++    my($file) = @_;
++    my($fh, $line);
++
++    $fh = new FileHandle $file;
++    if (defined $fh) {
++      $line = $fh->getline;
++      chomp($line);
++      $fh->close;
++    }
++    return $line;
++}
diff -r f12b71aad989 -r b747ea4c20f4 sysutils/smbldap-tools/patches/patch-ab
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/sysutils/smbldap-tools/patches/patch-ab   Mon Jun 16 16:04:25 2008 +0000
@@ -0,0 +1,96 @@
+$NetBSD: patch-ab,v 1.1.1.1 2008/06/16 16:04:25 taca Exp $
+
+--- doc/slapd.conf.orig        2008-04-22 17:13:30.000000000 +0900
++++ doc/slapd.conf
+@@ -2,11 +2,11 @@
+ # See slapd.conf(5) for details on configuration options.
+ # This file should NOT be world readable.
+ #
+-include               /etc/openldap/schema/core.schema
+-include               /etc/openldap/schema/cosine.schema
+-include               /etc/openldap/schema/inetorgperson.schema
+-include               /etc/openldap/schema/nis.schema
+-include               /etc/openldap/schema/samba.schema
++include               @PREFIX@/etc/openldap/schema/core.schema
++include               @PREFIX@/etc/openldap/schema/cosine.schema
++include               @PREFIX@/etc/openldap/schema/inetorgperson.schema
++include               @PREFIX@/etc/openldap/schema/nis.schema
++include               @PREFIX@/etc/openldap/schema/samba.schema
+ 
+ schemacheck   on
+ 
+@@ -17,11 +17,11 @@ allow bind_v2



Home | Main Index | Thread Index | Old Index