From andrew@hm.pstu.ac.ru  Mon Dec 15 04:16:28 2003
Return-Path: <andrew@hm.pstu.ac.ru>
Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125])
	by hub.freebsd.org (Postfix) with ESMTP id EF49E16A4CE
	for <FreeBSD-gnats-submit@freebsd.org>; Mon, 15 Dec 2003 04:16:27 -0800 (PST)
Received: from serv1.pstu.ac.ru (ns.pstu.ac.ru [195.19.160.1])
	by mx1.FreeBSD.org (Postfix) with ESMTP id 16DAD43D3C
	for <FreeBSD-gnats-submit@freebsd.org>; Mon, 15 Dec 2003 04:16:24 -0800 (PST)
	(envelope-from andrew@hm.pstu.ac.ru)
Received: from hm.pstu.ac.ru (hm.pstu.ac.ru [195.19.162.101])
	by serv1.pstu.ac.ru (8.12.9/8.12.10/check_local-5) with ESMTP id hBFCGJBI042980
	for <FreeBSD-gnats-submit@freebsd.org>; Mon, 15 Dec 2003 17:16:20 +0500 (YEKT)
	(envelope-from andrew@hm.pstu.ac.ru)
Received: Received: from hm.pstu.ac.ru (localhost [127.0.0.1])
        by hm.pstu.ac.ru (8.12.9p1/8.12.9) with ESMTP id hBFCF11R098603
        for <FreeBSD-gnats-submit@freebsd.org>; Mon, 15 Dec 2003 17:15:01 +0500 (YEKT)
        (envelope-from andrew@hm.pstu.ac.ru)
Received: (from andrew@localhost)
	by hm.pstu.ac.ru (8.12.9p1/8.12.9/Submit) id hBFCF0Gh098596;
	Mon, 15 Dec 2003 17:15:00 +0500 (YEKT)
Message-Id: <200312151215.hBFCF0Gh098596@hm.pstu.ac.ru>
Date: Mon, 15 Dec 2003 17:15:00 +0500 (YEKT)
From: Andrew Khlebutin <andreyh@perm.ru>
Reply-To: Andrew Khlebutin <andreyh@perm.ru>
To: FreeBSD-gnats-submit@freebsd.org
Cc:
Subject: net/samba-devel port with libiconv trouble
X-Send-Pr-Version: 3.113
X-GNATS-Notify:

>Number:         60254
>Category:       ports
>Synopsis:       net/samba-devel port with libiconv trouble
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    freebsd-ports-bugs
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          update
>Submitter-Id:   current-users
>Arrival-Date:   Mon Dec 15 04:20:15 PST 2003
>Closed-Date:    Fri Mar 05 06:29:05 PST 2004
>Last-Modified:  Fri Mar 05 06:29:05 PST 2004
>Originator:     Andrew Khlebutin
>Release:        FreeBSD 5.1-RELEASE-p10 i386
>Organization:
>Environment:
System: FreeBSD hm.pstu.ac.ru 5.1-RELEASE-p10 FreeBSD 5.1-RELEASE-p10 #0: Tue Oct 28 21:07:27 YEKT 2003 root@hm.pstu.ac.ru:/usr/obj/usr/src/sys/hm i386
iconv-2.0_3, libiconv-1.9.1_3

	
>Description:
	
I tried to compile samba with libiconv and found bug with detecting which
conversion library to use.  There are both converters installed at my PC -
converters/libiconv and converters/iconv. In detection process configure
found only first conversion  library (iconv) which doesn't have suitable
conversion modules. I think configure should search for other conversion
libraries - but it really did not. It continued with messages "Sufficient
support for iconv function was not found". To fix this bug aclocal.m4
needs to be changed, there should be added "rjs_CHARSET inside jm_ICONV" call.

>How-To-Repeat:
	
cd /usr/ports/converters/iconv && make install clean
cd /usr/ports/net/samba-devel && make WITHOUT_CUPS=yes WITH_LIBICONV=yes

with installed converters/iconv:
...skip...
checking for iconv in /usr/local... yes
checking can we convert from CP850 to UCS2-LE?... no
checking can we convert from IBM850 to UCS2-LE?... no
checking can we convert from ASCII to UCS2-LE?... no
checking can we convert from 646 to UCS2-LE?... no
checking can we convert from UTF-8 to UCS2-LE?... no
checking can we convert from UTF8 to UCS2-LE?... no
configure: WARNING: Sufficient support for iconv function was not found.
    Install libiconv from http://freshmeat.net/projects/libiconv/ for better charset comp atibility!
...skip...

without converters/iconv:
...skip...
checking for iconv in /usr/local... yes
checking can we convert from CP850 to UCS2-LE?... CP850
checking can we convert from ASCII to UCS2-LE?... ASCII
checking can we convert from UTF-8 to UCS2-LE?... UTF-8
...skip...

Full configure logs can be found at http://hydra.pstu.ru/samba/with_iconv.tar.bz2
& http://hydra.pstu.ru/samba/without_iconv.tar.bz2.

Some cosmetic bugs in samba-devel port's Makefile was found too:
1. Samba's   libs   are   installed  to  /usr/local/etc  because  of
--libdir=${SAMBA_CONFDIR}.
2. Without  --with-libiconv=/usr/local  in .if defined(WITH_LIBICONV)
section configure didn't find libiconv.
3. It's much more convinient to write logs to separate dir
/var/log/samba than to /var/log because files log.<machine_name> thrash
shared log catalogue extemely.

>Fix:

Deinstall converters/iconv, install samba-devel, reinstall converters/iconv ;)

And also do 

--- Makefile.orig       Tue Nov 25 21:12:19 2003
+++ Makefile    Mon Dec 15 00:51:45 2003
@@ -33,7 +33,7 @@
 # directories
 VARDIR=                /var
 SAMBA_SPOOL=   ${VARDIR}/spool/samba
-SAMBA_LOGDIR=  ${VARDIR}/log
+SAMBA_LOGDIR=  ${VARDIR}/log/samba
 SAMBA_PRIVATE= ${PREFIX}/private
 SAMBA_CONFDIR= ${PREFIX}/etc
 # sample files
@@ -44,12 +44,12 @@
 NO_LATEST_LINK=        yes
 USE_AUTOCONF=  yes
 WANT_AUTOCONF_VER=     253
-CONFIGURE_ARGS=        --libdir=${SAMBA_CONFDIR} \
+CONFIGURE_ARGS=        --libdir=${PREFIX}/lib --sysconfdir=${SAMBA_CONFDIR} \
                --localstatedir=${VARDIR} --with-swatdir=${PREFIX}/share/swat \
                --with-sambabook=${PREFIX}/share/swat/using_samba \
                --with-lockdir=${VARDIR}/lock --with-privatedir=${SAMBA_PRIVATE} \
-               --with-piddir=${VARDIR}/run --with-logfilebase=${VARDIR}/log
+               --with-piddir=${VARDIR}/run --with-logfilebase=${VARDIR}/log/samba
 
 .include <bsd.port.pre.mk>
 
@@ -89,7 +89,7 @@
 
 .if defined(WITH_LIBICONV)
 LIB_DEPENDS+=          iconv.3:${PORTSDIR}/converters/libiconv
-CONFIGURE_ARGS+=       --with-libiconv
+CONFIGURE_ARGS+=       --with-libiconv=/usr/local
 .endif
 
 WRKSRC=                ${WRKDIR}/${DISTNAME}/source
@@ -132,6 +132,7 @@
        ${CHMOD} 500 ${SAMBA_PRIVATE}
        ${CHOWN} root:wheel ${PREFIX}/bin/smbpasswd
        ${CHMOD} 111 ${PREFIX}/bin/smbpasswd
+       ${MKDIR} ${VARDIR}/log/samba
 .if defined(PACKAGE_BUILDING)
        ${ECHO_CMD} "private/smbpasswd" >> ${TMPPLIST}
        ${ECHO_CMD} "@dirrm private" >> ${TMPPLIST}
>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-ports-bugs->dwcjr 
Responsible-Changed-By: linimon 
Responsible-Changed-When: Tue Dec 16 22:30:37 PST 2003 
Responsible-Changed-Why:  
Over to maintainer. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=60254 

From: Antoine Jacoutot <ajacoutot@lphp.org>
To: freebsd-gnats-submit@FreeBSD.org, andreyh@perm.ru
Cc:  
Subject: Re: ports/60254: net/samba-devel port with libiconv trouble
Date: Tue, 13 Jan 2004 14:31:50 +0100

 You can also build the samba-devel port this way:
 
 # env CONFIGURE_ENV="CPPFLAGS=-I/usr/local/include LDFLAGS=-L/usr/local/lib" 
 make install clean
 
 Regards,
 
 Antoine
 
Responsible-Changed-From-To: dwcjr->freebsd-ports-bugs 
Responsible-Changed-By: linimon 
Responsible-Changed-When: Thu Mar 4 15:21:29 PST 2004 
Responsible-Changed-Why:  
samba* maintainership was reset to ports@ by marcus on 03/04/2004, 
so return this PR to the pool. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=60254 
State-Changed-From-To: open->closed 
State-Changed-By: obraun 
State-Changed-When: Fri Mar 5 06:28:36 PST 2004 
State-Changed-Why:  
Committed with upgrade submitted by new maintainer. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=60254 
>Unformatted:
