diff options
author | Mark Linimon <linimon@FreeBSD.org> | 2004-03-13 10:39:59 +0000 |
---|---|---|
committer | Mark Linimon <linimon@FreeBSD.org> | 2004-03-13 10:39:59 +0000 |
commit | e6beafd1cf279b67b0454519c613c2f845bb065b (patch) | |
tree | f9c27b6f860965cb443ec71a99d9ba718e75f205 /net/samba3 | |
parent | Fix configure. (diff) |
Address some oddities on 4.x: work around NSS support missing; the separate
knob for Kerberos is misleading, as it is necessary only for ADS support;
the installation scripts renamed installed binaries to *.old. Also,
delete the USE_OPENLDAP_VER?= line, it is not only not needed once you
set USE_OPENLDAP=yes, it can positively interfere with LDAP version bumps
PR: ports/64057
Submitted by: Timur I. Bakeyev <timur@gnu.org> (maintainer)
Reviewd by: eik
Notes
Notes:
svn path=/head/; revision=103877
Diffstat (limited to 'net/samba3')
-rw-r--r-- | net/samba3/Makefile | 66 | ||||
-rw-r--r-- | net/samba3/files/patch-script_installbin.sh | 12 | ||||
-rw-r--r-- | net/samba3/files/patch-script_installscripts.sh | 12 | ||||
-rw-r--r-- | net/samba3/files/smb.conf.default | 49 | ||||
-rw-r--r-- | net/samba3/pkg-plist | 4 |
5 files changed, 85 insertions, 58 deletions
diff --git a/net/samba3/Makefile b/net/samba3/Makefile index e4689858f05a..957b0d1a178f 100644 --- a/net/samba3/Makefile +++ b/net/samba3/Makefile @@ -21,7 +21,6 @@ CONFLICTS= ja-samba-2.* samba-2.* sharity-light-1.* samba-libsmbclient-3.* OPTIONS= CUPS "With CUPS printing support" on \ LDAP "With LDAP support" on \ - KRB5 "With Kerberos5 support" on \ ADS "With Active Directory support" on \ WINBIND "With WinBIND support" on \ ACL_SUPPORT "With ACL support" off \ @@ -39,7 +38,6 @@ OPTIONS= CUPS "With CUPS printing support" on \ POPT "With installed POPT library" on USE_BZIP2= yes -USE_SIZE= yes USE_RC_SUBR= yes NO_LATEST_LINK= yes INSTALLS_SHLIB= yes @@ -77,7 +75,7 @@ CONFIGURE_ARGS= --exec-prefix=${PREFIX} \ .if defined(WITH_PYTHON) USE_PYTHON= 2.1+ -# Hack to make it work with OPTIONS. Breakes portlint +# Hack to make it work with OPTIONS. Breaks portlint .include "${PORTSDIR}/Mk/bsd.python.mk" CONFIGURE_ARGS+= --with-python PLIST_SUB+= PYTHON="" \ @@ -87,10 +85,6 @@ CONFIGURE_ARGS+= --without-python PLIST_SUB+= PYTHON="@comment " .endif -.if !defined(WITHOUT_CUPS) -WITH_CUPS= yes -.endif - .if defined(WITH_CUPS) LIB_DEPENDS+= cups.2:${PORTSDIR}/print/cups-base CONFIGURE_ARGS+= --enable-cups @@ -119,40 +113,35 @@ CONFIGURE_ARGS+= --with-msdfs .if !defined(WITHOUT_WINBIND) CONFIGURE_ARGS+= --with-winbind PLIST_SUB+= WINBIND="" +.if ${OSVERSION} >= 500112 +WITH_WINBIND_NSS= yes +.endif .else CONFIGURE_ARGS+= --without-winbind PLIST_SUB+= WINBIND="@comment " .endif -.if !defined(WITHOUT_LDAP) -WANT_LDAP= yes -CONFIGURE_ARGS+= --with-ldap +.if defined(WITH_WINBIND_NSS) +PLIST_SUB+= WINBIND_NSS="" .else -CONFIGURE_ARGS+= --without-ldap -.endif - -.if !defined(WITHOUT_KRB5) && defined(KRB5_HOME) && exists(${KRB5_HOME}/lib/libgssapi_krb5.a) -CONFIGURE_ARGS+= --with-krb5=${KRB5_HOME} -.elif !defined(WITHOUT_KRB5) && defined(HEIMDAL_HOME) && exists(${HEIMDAL_HOME}/lib/libgssapi.a) -CONFIGURE_ARGS+= --with-krb5=${HEIMDAL_HOME} -.elif !defined(WITHOUT_KRB5) && (defined(MAKE_KERBEROS5) || ${OSVERSION} > 500105) && exists(/usr/lib/libkrb5.a) -CONFIGURE_ARGS+= --with-krb5=/usr -.else -# Kerberos5 is necessary for ADS -.if defined(WITH_ADS) -BROKEN= "Kerberos5 is necessary for ADS support. Please, install either Heimdal or MIT-Kerberos" -.endif -WITHOUT_ADS= yes -CONFIGURE_ARGS+= --without-krb5 +PLIST_SUB+= WINBIND_NSS="@comment " .endif .if !defined(WITHOUT_ADS) WANT_LDAP= yes +WANT_KRB5= yes CONFIGURE_ARGS+= --with-ads .else CONFIGURE_ARGS+= --without-ads .endif +.if !defined(WITHOUT_LDAP) +WANT_LDAP= yes +CONFIGURE_ARGS+= --with-ldap +.else +CONFIGURE_ARGS+= --without-ldap +.endif + # SAM .if defined(WITH_SAM_XML) #USE_GNOME= libxml2 @@ -195,9 +184,23 @@ CONFIGURE_ARGS+= --with-expsam=${WANT_EXPSAM_MODULES} .endif # SAM +# Kerberos5 is necessary for ADS +.if defined(WANT_KRB5) +.if defined(KRB5_HOME) && exists(${KRB5_HOME}/lib/libgssapi_krb5.a) +CONFIGURE_ARGS+= --with-krb5=${KRB5_HOME} +.elif defined(HEIMDAL_HOME) && exists(${HEIMDAL_HOME}/lib/libgssapi.a) +CONFIGURE_ARGS+= --with-krb5=${HEIMDAL_HOME} +.elif (defined(MAKE_KERBEROS5) || ${OSVERSION} > 500105) && exists(/usr/lib/libkrb5.a) +CONFIGURE_ARGS+= --with-krb5=${DESTDIR}/usr +.else +#BROKEN= "Kerberos5 is necessary for ADS support. Please, install either Heimdal or MIT-Kerberos" +.endif +.else +CONFIGURE_ARGS+= --without-krb5 +.endif + .if defined(WANT_LDAP) USE_OPENLDAP= yes -USE_OPENLDAP_VER?= 21 .endif .if defined(WITH_PAM_SMBPASS) @@ -210,7 +213,7 @@ PLIST_SUB+= SMBPASS="@comment " .if defined(WITH_ACL_SUPPORT) .if ${OSVERSION} < 500018 -BROKEN= "Requires a recent FreeBSD 5.0-CURRENT" +BROKEN= "Requires FreeBSD 5.x at least after 20010326" .else CONFIGURE_ARGS+= --with-acl-support .endif @@ -264,6 +267,11 @@ RC_SCRIPTS_SUB= PREFIX=${PREFIX} \ SAMBA_SPOOL=${SAMBA_SPOOL} \ SAMBA_RUNDIR=${SAMBA_RUNDIR} +pre-fetch: + @${ECHO_MSG} "===> -------------------------------------------" + @${ECHO_MSG} "===> Run 'make config' to (re)configure the port" + @${ECHO_MSG} "===> -------------------------------------------" + post-install: .for sect in 1 5 7 8 @${MKDIR} ${MAN${sect}PREFIX}/man/man${sect} @@ -315,8 +323,10 @@ post-install: .endif -@${LN} -snf libsmbclient.so.0 ${SAMBA_LIBDIR}/libsmbclient.so .if !defined(WITHOUT_WINBIND) +.if defined(WITH_WINBIND_NSS) ${INSTALL_PROGRAM} ${WRKSRC}/nsswitch/nss_winbind.so ${SAMBA_LIBDIR}/nss_winbind.so.1 ${INSTALL_PROGRAM} ${WRKSRC}/nsswitch/nss_wins.so ${SAMBA_LIBDIR}/nss_wins.so.1 +.endif ${INSTALL_PROGRAM} ${WRKSRC}/nsswitch/pam_winbind.so ${SAMBA_LIBDIR} .endif .if defined(WITH_PAM_SMBPASS) diff --git a/net/samba3/files/patch-script_installbin.sh b/net/samba3/files/patch-script_installbin.sh new file mode 100644 index 000000000000..66a0577eeb16 --- /dev/null +++ b/net/samba3/files/patch-script_installbin.sh @@ -0,0 +1,12 @@ +--- script/installbin.sh.orig Tue Mar 9 15:33:32 2004 ++++ script/installbin.sh Tue Mar 9 15:35:43 2004 +@@ -17,8 +17,7 @@ + p2=`basename $p` + echo Installing $p as $BINDIR/$p2 + if [ -f $BINDIR/$p2 ]; then +- rm -f $BINDIR/$p2.old +- mv $BINDIR/$p2 $BINDIR/$p2.old ++ rm -f $BINDIR/$p2 $BINDIR/$p2.old + fi + cp $p $BINDIR/ + chmod $INSTALLPERMS $BINDIR/$p2 diff --git a/net/samba3/files/patch-script_installscripts.sh b/net/samba3/files/patch-script_installscripts.sh new file mode 100644 index 000000000000..4091df6c4290 --- /dev/null +++ b/net/samba3/files/patch-script_installscripts.sh @@ -0,0 +1,12 @@ +--- script/installscripts.sh.orig Tue Mar 9 15:35:54 2004 ++++ script/installscripts.sh Tue Mar 9 15:36:38 2004 +@@ -25,8 +25,7 @@ + p2=`basename $p` + echo Installing $BINDIR/$p2 + if [ -f $BINDIR/$p2 ]; then +- rm -f $BINDIR/$p2.old +- mv $BINDIR/$p2 $BINDIR/$p2.old ++ rm -f $BINDIR/$p2 $BINDIR/$p2.old + fi + cp $p $BINDIR/ + chmod $INSTALLPERMS $BINDIR/$p2 diff --git a/net/samba3/files/smb.conf.default b/net/samba3/files/smb.conf.default index 20b7fecb2965..884ae9bef071 100644 --- a/net/samba3/files/smb.conf.default +++ b/net/samba3/files/smb.conf.default @@ -3,7 +3,7 @@ # here. Samba has a huge number of configurable options (perhaps too # many!) most of which are not shown in this example # -# For a step by step guide on installation, configuration and usage of Samba, +# For a step by step guide on installing, configuring and using Samba, # read the Samba HOWTO Collection. # # Any line which starts with a ; (semi-colon) or a # (hash) @@ -28,26 +28,6 @@ # user level security. See the HOWTO Collection for details. security = user -# Use password server option only with security = server -# The argument list may include: -# password server = My_PDC_Name [My_BDC_Name] [My_Next_BDC_Name] -# or to auto-locate the domain controller/s -# password server = * -; password server = <NT-Server-Name> - -# You may wish to use password encryption. Please read -# ENCRYPTION.txt, Win95.txt and WinNT.txt in the Samba documentation. -# Do not enable this option unless you have read those documents -; encrypt passwords = yes -# Use the realm option only with security = ads -# Specifies the Active Directory realm the host is part of -; realm = MY_REALM - -# Backend to store user information in. New installations should -# use either tdbsam or ldapsam. smbpasswd is available for backwards -# compatibility. tdbsam requires no further configuration. -; passdb backend = tdbsam - # This option is important for security. It allows you to restrict # connections to machines which are on your local network. The # following example restricts access to two C class networks and @@ -69,8 +49,8 @@ # It should not be necessary to specify the print system type unless # it is non-standard. Currently supported print systems include: -# cups, bsd, sysv, plp, lprng, aix, hpux, qnx -; printing = bsd +# bsd, cups, sysv, plp, lprng, aix, hpux, qnx +; printing = cups # Uncomment this if you want a guest account, you must add this to /etc/passwd # otherwise the user "nobody" is used @@ -83,6 +63,21 @@ # Put a capping on the size of the log files (in Kb). max log size = 50 +# Use password server option only with security = server +# The argument list may include: +# password server = My_PDC_Name [My_BDC_Name] [My_Next_BDC_Name] +# or to auto-locate the domain controller/s +# password server = * +; password server = <NT-Server-Name> + +# Use the realm option only with security = ads +# Specifies the Active Directory realm the host is part of +; realm = MY_REALM + +# Backend to store user information in. New installations should +# use either tdbsam or ldapsam. smbpasswd is available for backwards +# compatibility. tdbsam requires no further configuration. +; passdb backend = tdbsam # Using the following line enables you to customise your configuration # on a per machine basis. The %m gets replaced with the netbios name @@ -94,7 +89,9 @@ # Most people will find that this option gives better performance. # See the chapter 'Samba performance issues' in the Samba HOWTO Collection # and the manual pages for details. - socket options = TCP_NODELAY +# You may want to add the following on a Linux system: +# SO_RCVBUF=8192 SO_SNDBUF=8192 + socket options = TCP_NODELAY # Configure Samba to use multiple interfaces # If you have multiple network interfaces then you must list them @@ -119,10 +116,6 @@ # and gives it a slightly higher chance of winning the election ; preferred master = yes -# Use only if you have an NT server on your network that has been -# configured at install time to be a primary domain controller. -; domain controller = <NT-Domain-Controller-SMBName> - # Enable this if you want Samba to be a domain logon server for # Windows95 workstations. ; domain logons = yes diff --git a/net/samba3/pkg-plist b/net/samba3/pkg-plist index a59e3e56c332..29cbb00468ea 100644 --- a/net/samba3/pkg-plist +++ b/net/samba3/pkg-plist @@ -56,8 +56,8 @@ lib/samba/charset/CP850.so lib/libsmbclient.a lib/libsmbclient.so lib/libsmbclient.so.0 -%%WINBIND%%lib/nss_winbind.so.1 -%%WINBIND%%lib/nss_wins.so.1 +%%WINBIND_NSS%%lib/nss_winbind.so.1 +%%WINBIND_NSS%%lib/nss_wins.so.1 %%WINBIND%%lib/pam_winbind.so %%SMBPASS%%lib/pam_smbpass.so %%PYTHON%%lib/%%PYTHON_VERSION%%/site-packages/samba/__init__.py |