Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 10 Mar 2004 08:57:46 -0800 (PST)
From:      "Timur I. Bakeyev" <timur@gnu.org>
To:        freebsd-gnats-submit@FreeBSD.org
Subject:   ports/64057: Update for samba-devel
Message-ID:  <200403101657.i2AGvkuq032170@www.freebsd.org>
Resent-Message-ID: <200403101700.i2AH0YYv006686@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         64057
>Category:       ports
>Synopsis:       Update for samba-devel
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          maintainer-update
>Submitter-Id:   current-users
>Arrival-Date:   Wed Mar 10 09:00:34 PST 2004
>Closed-Date:
>Last-Modified:
>Originator:     Timur I. Bakeyev
>Release:        5-CURRENT
>Organization:
>Environment:
FreeBSD timur.home.bat.ru 5.2-CURRENT FreeBSD 5.2-CURRENT #1: Fri Dec 26 00:21:54 CET 2003     root@timur.home.bat.ru:/usr/src/sys/i386/compile/COMMON  i386
>Description:
      This is an update for samba-devel that address some oddities on a 4.x platform.

* There is no NSS support on 4.x
* Separate knob for Kerberos is misleading, as it is necessary only for ADS support.
* Installation scripts rename installed binaries to *.old.



>How-To-Repeat:
      Try to compile samba-devel on 4.x platform.
>Fix:
      Here is the patch:

Index: Makefile
===================================================================
RCS file: /home/ncvs/ports/net/samba-devel/Makefile,v
retrieving revision 1.105
diff -u -r1.105 Makefile
--- Makefile	5 Mar 2004 14:25:42 -0000	1.105
+++ Makefile	10 Mar 2004 16:25:18 -0000
@@ -7,7 +7,7 @@
 
 PORTNAME=	samba
 PORTVERSION=	3.0.2.a
-PORTREVISION=	1
+PORTREVISION=	2
 PORTEPOCH=	1
 CATEGORIES=	net
 MASTER_SITES=	http://us1.samba.org/samba/ftp/%SUBDIR%/ \
@@ -32,7 +32,6 @@
 
 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 \
@@ -100,10 +99,6 @@
 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
@@ -132,40 +127,35 @@
 .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
-.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
+.if defined(WITH_WINBIND_NSS)
+PLIST_SUB+=		WINBIND_NSS=""
 .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
@@ -208,6 +198,21 @@
 .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
@@ -223,7 +228,7 @@
 
 .if defined(WITH_ACL_SUPPORT)
 .if ${OSVERSION} < 500018
-BROKEN=	"Requires a recent FreeBSD 5.0-CURRENT"
+BROKEN=	"Requires at least FreeBSD 5.1"
 .else
 CONFIGURE_ARGS+=	--with-acl-support
 .endif
@@ -277,6 +282,11 @@
 			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}
@@ -328,8 +338,10 @@
 .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)
Index: pkg-plist
===================================================================
RCS file: /home/ncvs/ports/net/samba-devel/pkg-plist,v
retrieving revision 1.46
diff -u -r1.46 pkg-plist
--- pkg-plist	5 Mar 2004 14:25:42 -0000	1.46
+++ pkg-plist	10 Mar 2004 16:25:19 -0000
@@ -56,8 +56,8 @@
 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
Index: files/patch-script_installbin.sh
===================================================================
RCS file: files/patch-script_installbin.sh
diff -N files/patch-script_installbin.sh
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ files/patch-script_installbin.sh	10 Mar 2004 16:25:19 -0000
@@ -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
Index: files/patch-script_installscripts.sh
===================================================================
RCS file: files/patch-script_installscripts.sh
diff -N files/patch-script_installscripts.sh
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ files/patch-script_installscripts.sh	10 Mar 2004 16:25:19 -0000
@@ -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
Index: files/smb.conf.default
===================================================================
RCS file: /home/ncvs/ports/net/samba-devel/files/smb.conf.default,v
retrieving revision 1.12
diff -u -r1.12 smb.conf.default
--- files/smb.conf.default	5 Mar 2004 14:25:42 -0000	1.12
+++ files/smb.conf.default	10 Mar 2004 16:25:19 -0000
@@ -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 to 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,6 +89,8 @@
 # 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.
+# 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
@@ -118,10 +115,6 @@
 # Preferred Master causes Samba to force a local browser election on startup
 # 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. 

>Release-Note:
>Audit-Trail:
>Unformatted:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200403101657.i2AGvkuq032170>