git: 50ec89c1baaf - main - net/smbldap-tools: resurrect^Wreadd previously expired port
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Wed, 30 Nov 2022 17:09:19 UTC
The branch main has been updated by danfe: URL: https://cgit.FreeBSD.org/ports/commit/?id=50ec89c1baafce0c9e893a1d790ca4a2f9fe2ab6 commit 50ec89c1baafce0c9e893a1d790ca4a2f9fe2ab6 Author: Alexey Dokuchaev <danfe@FreeBSD.org> AuthorDate: 2022-11-30 17:08:10 +0000 Commit: Alexey Dokuchaev <danfe@FreeBSD.org> CommitDate: 2022-11-30 17:08:10 +0000 net/smbldap-tools: resurrect^Wreadd previously expired port Perform minor cleanups, take maintainership for the time being. Requested by: someone on t.me/freebsd_ru --- MOVED | 1 - net/Makefile | 1 + net/smbldap-tools/Makefile | 61 +++++++++++++++++++++++++ net/smbldap-tools/distinfo | 3 ++ net/smbldap-tools/files/patch-smbldap-config.pl | 55 ++++++++++++++++++++++ net/smbldap-tools/pkg-descr | 9 ++++ net/smbldap-tools/pkg-plist | 21 +++++++++ 7 files changed, 150 insertions(+), 1 deletion(-) diff --git a/MOVED b/MOVED index fcef7be15120..275976c4af20 100644 --- a/MOVED +++ b/MOVED @@ -13173,7 +13173,6 @@ net/librouteros||2019-10-16|Has expired: Unfetchable, unmaintained net/nettest||2019-10-16|Has expired: Unfetchable, unmaintained net/py-netstring||2019-10-16|Has expired: Unfetchable, unmaintained net/radiusd-cistron||2019-10-16|Has expired: Unfetchable, unmaintained -net/smbldap-tools||2019-10-16|Has expired: Unfetchable, unmaintained net/wackford-squeers||2019-10-16|Has expired: Unfetchable, unmaintained net/wmnet2||2019-10-16|Has expired: Unfetchable, unmaintained net-im/pidgin-birthday-reminder||2019-10-16|Has expired: Unfetchable, unmaintained diff --git a/net/Makefile b/net/Makefile index 44dae6e30753..d983d4f0191a 100644 --- a/net/Makefile +++ b/net/Makefile @@ -1430,6 +1430,7 @@ SUBDIR += sl2tps SUBDIR += slackcat SUBDIR += smb4k + SUBDIR += smbldap-tools SUBDIR += smcroute SUBDIR += smm++ SUBDIR += sngrep diff --git a/net/smbldap-tools/Makefile b/net/smbldap-tools/Makefile new file mode 100644 index 000000000000..9194bcaedc3f --- /dev/null +++ b/net/smbldap-tools/Makefile @@ -0,0 +1,61 @@ +PORTNAME= smbldap-tools +PORTVERSION= 0.9.11 +CATEGORIES= net +MASTER_SITES= https://freebsd.lxxl.us/distfiles/ \ + http://freebsd.nsu.ru/distfiles/ LOCAL/danfe + +MAINTAINER= danfe@FreeBSD.org +COMMENT= Samba-LDAP management and support tools + +LICENSE= GPLv2+ +LICENSE_FILE= ${WRKSRC}/COPYING + +BUILD_DEPENDS= p5-perl-ldap>=0:net/p5-perl-ldap \ + p5-Crypt-SmbHash>=0:security/p5-Crypt-SmbHash \ + p5-Digest-SHA1>=0:security/p5-Digest-SHA1 \ + p5-Unicode-MapUTF8>=0:converters/p5-Unicode-MapUTF8 +RUN_DEPENDS:= ${BUILD_DEPENDS} + +USES= gmake perl5 +GNU_CONFIGURE= yes +CONFIGURE_ARGS= --with-samba-sysconfdir=${LOCALBASE}/etc \ + --with-samba-bindir=${LOCALBASE}/bin \ + --with-perl=${PERL} \ + --with-perl-libdir=sitelib +ALL_TARGET= build +NO_ARCH= yes + +PORTDOCS= * + +OPTIONS_DEFINE= MIGRATION_SCRIPTS DOCS +OPTIONS_SUB= yes +MIGRATION_SCRIPTS_DESC= Install migration scripts + +post-patch: + @${REINPLACE_CMD} -e 's|%%LOCALBASE%%|${LOCALBASE}|g' \ + ${WRKSRC}/smbldap-config.pl + +post-install: + @${MKDIR} ${STAGEDIR}${ETCDIR} +.for cf in smbldap.conf smbldap_bind.conf + ${INSTALL_DATA} ${WRKSRC}/${cf} ${STAGEDIR}${ETCDIR}/${cf}.sample +.endfor + +post-install-MIGRATION_SCRIPTS-on: +.for i in smbldap-migrate-pwdump-accounts smbldap-migrate-pwdump-groups \ +smbldap-migrate-unix-accounts smbldap-migrate-unix-groups + @${SED} -e 's|/usr/bin/perl|${PERL}|g' \ + ${WRKSRC}/doc/migration_scripts/$i > ${STAGEDIR}${PREFIX}/sbin/$i +.endfor + +post-install-DOCS-on: + @${MKDIR} ${STAGEDIR}${DOCSDIR} + ${INSTALL_SCRIPT} ${WRKSRC}/smbldap-config.cmd ${STAGEDIR}${DOCSDIR}/smbldap-config + ${INSTALL_SCRIPT} ${WRKSRC}/smbldap-upgrade-0.9.6.cmd ${STAGEDIR}${DOCSDIR}/smbldap-upgrade-0.9.6 +.for f in CONTRIBUTORS COPYING ChangeLog FILES INFRA INSTALL README TODO + ${INSTALL_DATA} ${WRKSRC}/${f} ${STAGEDIR}${DOCSDIR}/ +.endfor + ${INSTALL_DATA} ${WRKSRC}/doc/smbldap-tools.html ${STAGEDIR}${DOCSDIR}/smbldap-tools.html + ${INSTALL_DATA} ${WRKSRC}/doc/smbldap-tools.pdf ${STAGEDIR}${DOCSDIR}/smbldap-tools.pdf + +.include <bsd.port.mk> diff --git a/net/smbldap-tools/distinfo b/net/smbldap-tools/distinfo new file mode 100644 index 000000000000..7028b82a10e2 --- /dev/null +++ b/net/smbldap-tools/distinfo @@ -0,0 +1,3 @@ +TIMESTAMP = 1462862297 +SHA256 (smbldap-tools-0.9.11.tar.gz) = bf263c7b6cee2f51cb2b53a69f55747a7a3698f25d8571aedc026572fead9df5 +SIZE (smbldap-tools-0.9.11.tar.gz) = 337468 diff --git a/net/smbldap-tools/files/patch-smbldap-config.pl b/net/smbldap-tools/files/patch-smbldap-config.pl new file mode 100644 index 000000000000..ba2626212b4a --- /dev/null +++ b/net/smbldap-tools/files/patch-smbldap-config.pl @@ -0,0 +1,55 @@ +--- smbldap-config.pl.orig 2012-03-05 09:59:44.000000000 +0100 ++++ smbldap-config.pl 2014-10-05 19:32:18.349166265 +0200 +@@ -48,7 +48,7 @@ + print "-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-\n"; + + # we first check if Samba is up and running +-my $test_smb=`pidof smbd`; ++my $test_smb=`pgrep -x smbd`; + chomp($test_smb); + die "\nSamba needs to be started first !\n" if ($test_smb eq "" || not defined $test_smb); + +@@ -290,7 +290,7 @@ + + 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/sh",0); + + my $skeletonDir=read_entry(". default skeleton directory","","/etc/skel",0); + +@@ -441,7 +441,7 @@ + + # Login defs + # Default Login Shell +-# Ex: userLoginShell=\"/bin/bash\" ++# Ex: userLoginShell=\"/bin/sh\" + userLoginShell=\"$userLoginShell\" + + # Home directory +@@ -511,12 +511,12 @@ + # Allows not to use smbpasswd (if with_smbpasswd=\"0\" in smbldap.conf) but + # prefer Crypt::SmbHash library + with_smbpasswd=\"0\" +-smbpasswd=\"/usr/bin/smbpasswd\" ++smbpasswd=\"%%LOCALBASE%%/bin/smbpasswd\" + + # Allows not to use slappasswd (if with_slappasswd=\"0\" in smbldap.conf) + # but prefer Crypt:: libraries + with_slappasswd=\"0\" +-slappasswd=\"/usr/sbin/slappasswd\" ++slappasswd=\"%%LOCALBASE%%/sbin/slappasswd\" + + # comment out the following line to get rid of the default banner + # no_banner=\"1\" +@@ -557,3 +557,10 @@ + $mode=0600; + chmod $mode,"$smbldap_bind_conf","$smbldap_bind_conf.old"; + ++ ++############################################################ ++ ++=head1 NAME ++ ++=cut ++ diff --git a/net/smbldap-tools/pkg-descr b/net/smbldap-tools/pkg-descr new file mode 100644 index 000000000000..88f512b9fa01 --- /dev/null +++ b/net/smbldap-tools/pkg-descr @@ -0,0 +1,9 @@ +A collection of scripts, "over" user{add,del,mod} and group{add,del,mod} +system tools to manipulate users and groups stored in LDAP directory, +for DEN system like SAMBA-LDAP and pam/nss_ldap systems. + +Additionnaly, some scripts are designed to ease your migration from +a Windows NT 4.0 PDC Server to a Samba-LDAP PDC Server (Killer?;-): +smbldap-populate, smbldap-migrate-groups, smbldap-migrate-accounts. + +WWW: https://gna.org/projects/smbldap-tools/ diff --git a/net/smbldap-tools/pkg-plist b/net/smbldap-tools/pkg-plist new file mode 100644 index 000000000000..f50a60323e71 --- /dev/null +++ b/net/smbldap-tools/pkg-plist @@ -0,0 +1,21 @@ +sbin/smbldap-config +sbin/smbldap-groupadd +sbin/smbldap-groupdel +sbin/smbldap-grouplist +sbin/smbldap-groupmod +sbin/smbldap-groupshow +%%MIGRATION_SCRIPTS%%sbin/smbldap-migrate-pwdump-groups +%%MIGRATION_SCRIPTS%%sbin/smbldap-migrate-unix-accounts +%%MIGRATION_SCRIPTS%%sbin/smbldap-migrate-unix-groups +%%MIGRATION_SCRIPTS%%sbin/smbldap-migrate-pwdump-accounts +sbin/smbldap-passwd +sbin/smbldap-populate +sbin/smbldap-useradd +sbin/smbldap-userdel +sbin/smbldap-userinfo +sbin/smbldap-userlist +sbin/smbldap-usermod +sbin/smbldap-usershow +@sample %%ETCDIR%%/smbldap.conf.sample +@sample %%ETCDIR%%/smbldap_bind.conf.sample +%%SITE_PERL%%/smbldap_tools.pm