Bug 87417

Summary: mail/postfix refers to WITH_OPENLDAP_VER option, which doesn't have any effect
Product: Ports & Packages Reporter: Alson van der Meulen <alson+bugs>
Component: Individual Port(s)Assignee: Marcus Alves Grando <mnag>
Status: Closed FIXED    
Severity: Affects Only Me    
Priority: Normal    
Version: Latest   
Hardware: Any   
OS: Any   

Description Alson van der Meulen 2005-10-14 00:20:12 UTC
The configuration dialog of the postfix port suggests to use WITH_OPENLDAP_VER to change the OpenLDAP version that's used. However, with WITH_OPENLDAP_VER=23 in /etc/make.conf, it still depends on openldap-client-2.2.x (and fails because openldap-server-2.3 in installed).

Fix: 

It works fine with WANT_OPENLDAP_VER=23 in make.conf, but I'm not sure if you're supposed to put this option in make.conf. Either change the menu description or make WITH_OPENLDAP_VER work.
How-To-Repeat: Set WITH_OPENLDAP_VER=23 in make.conf, and compile postfix with LDAP support.
Comment 1 Mark Linimon 2005-10-14 00:33:55 UTC
> It works fine with WANT_OPENLDAP_VER=23 in make.conf, but I'm not sure
> if you're supposed to put this option in make.conf. Either change the
> menu description or make WITH_OPENLDAP_VER work.

From bsd.port.mk:

  # Note: the distinction between the USE_* and WANT_* variables, and the
  # WITH_* and WITHOUT_* variables, are that the former are restricted to
  # usage inside the ports framework, and the latter are reserved for user-
  # settable options.  (Setting USE_* in /etc/make.conf is always wrong).

I will make a note to myself to add the text about WANT_* to the Porter's
Handbook.  The other variables are discussed correctly in 

http://www.freebsd.org/doc/en_US.ISO8859-1/books/porters-handbook/makefile-options.html

and

http://www.freebsd.org/doc/en_US.ISO8859-1/books/porters-handbook/makefile-depend.html

(down towards the end.)

mcl
Comment 2 Alson van der Meulen 2005-10-14 01:49:05 UTC
* Mark Linimon <linimon@lonesome.com> [2005-10-14 01:36]:
> From bsd.port.mk:
> 
>   # Note: the distinction between the USE_* and WANT_* variables, and the
>   # WITH_* and WITHOUT_* variables, are that the former are restricted to
>   # usage inside the ports framework, and the latter are reserved for user-
>   # settable options.  (Setting USE_* in /etc/make.conf is always wrong).
> 
> I will make a note to myself to add the text about WANT_* to the Porter's
> Handbook.  The other variables are discussed correctly in 
> 
> http://www.freebsd.org/doc/en_US.ISO8859-1/books/porters-handbook/makefile-options.html
> 
> and
> 
> http://www.freebsd.org/doc/en_US.ISO8859-1/books/porters-handbook/makefile-depend.html

I did remember that you're only supposed to use WITH* in make.conf for
ports, but there doesn't seem to be any other way to force postfix (and
maybe some other ports) to use OpenLDAP 2.3 without editting the
Makefile, at least not with the documented WITH_OPENLDAP_VER.

I only suggest this as a workaround, certainly not a permanent solution.
Since you can only have one version of OpenLDAP installed at a time, it
doesn't make much sense to me to select this version in the port. If one
port requires version 2.2, and another requires 2.3, you can't install
them both at the same time. So having a variable to set the OpenLDAP
version from make.conf (eg. WITH_OPENLDAP_VER as supported by exim)
seems logical. Whether support for this should be added to individual
ports or bsd.port.mk (I believe the latter does support WITH_MYSQL_VER)
isn't my decision.

Alson
Comment 3 Marcus Alves Grando freebsd_committer freebsd_triage 2005-10-14 03:08:11 UTC
Dear Vivek,

Do you approve this proposed patch[1], until the bsd.port.mk patch[2]
aren't commited?

[1]
http://marcus.grupos.com.br:8080/patch/postfix.patch

[2]
http://www.freebsd.org/cgi/query-pr.cgi?pr=87420

-- 
Marcus Alves Grando
marcus(at)corp.grupos.com.br  |  Grupos Internet S/A
  mnag(at)FreeBSD.org         |  FreeBSD.org
Comment 4 Marcus Alves Grando freebsd_committer freebsd_triage 2005-10-14 03:08:13 UTC
Responsible Changed
From-To: freebsd-ports-bugs->mnag

I'll take it.
Comment 5 Marcus Alves Grando freebsd_committer freebsd_triage 2005-10-14 03:08:25 UTC
State Changed
From-To: open->feedback

Ask for maintainer approval.
Comment 6 Vick Khera 2005-10-14 15:13:14 UTC
On Oct 13, 2005, at 10:08 PM, Marcus Alves Grando wrote:

> Dear Vivek,
>
> Do you approve this proposed patch[1], until the bsd.port.mk patch[2]
> aren't commited?

yes, I approve
Comment 7 Marcus Alves Grando freebsd_committer freebsd_triage 2005-10-14 15:20:38 UTC
State Changed
From-To: feedback->closed

Fixed. Thanks.