Bug 178601

Summary: databases/postgresql92-server: postgresql port has wrong check for MIT_KRB5
Product: Ports & Packages Reporter: wollman <wollman>
Component: Individual Port(s)Assignee: pgsql
Status: Closed Overcome By Events    
Severity: Affects Only Me CC: cs, wollman
Priority: Normal    
Version: Latest   
Hardware: Any   
OS: Any   

Description wollman 2013-05-13 20:10:00 UTC
The databases/postgresql92-server Makefile contains the following conditional:

.   else
CONFIGURE_ARGS+=--with-krb5
# Allow defining a home built MIT Kerberos by setting KRB5_HOME
.    if defined(KRB5_HOME) && exists(${KRB5_HOME}/lib/libgssapi_krb5.a) && exists(${KRB5_HOME}/bin/krb5-config)
LIB_DEPENDS+=   krb5.3:${PORTSDIR}/security/krb5
.    endif
.   endif
.  endif

The current security/krb5 port does not install libgssapi_krb5.a, so
this does not pick up the correct dependency, and thus building in a
clean environment (as with poudriere) fails.

Fix: 

Change the conditional to:

.    if defined(KRB5_HOME) && exists(${KRB5_HOME}/lib/libgssapi_krb5.so.2) && exists(${KRB5_HOME}/bin/krb5-config)
How-To-Repeat: 
Configure databases/postgresql92-client to use the MIT implementation
of Kerberos and try to build it when the krb5 package is not installed.
Comment 1 wollman 2013-05-13 20:30:21 UTC
On second thought, all of the checks that are conditional on
package-installed files should simply be deleted; if the dependency is
enabled in the port configuration, it should always be included
whether or not its files are already installed.  (Or perhaps this can
be conditionalized on PACKAGE_BUILDING?)

-GAWollman
Comment 2 Edwin Groothuis freebsd_committer freebsd_triage 2013-05-19 17:20:20 UTC
Responsible Changed
From-To: freebsd-ports-bugs->pgsql

Over to maintainer (via the GNATS Auto Assign Tool)
Comment 3 Carlo Strub freebsd_committer freebsd_triage 2014-09-14 10:29:24 UTC
Is this PR still relevant?
Comment 4 Garrett Wollman freebsd_committer freebsd_triage 2015-07-14 01:12:22 UTC
(In reply to Carlo Strub from comment #3)
I just stumbled across this again, and it's still broken.

As a general rule, a port MUST define its upwards dependencies without reference to whether any of the files it depends on actually exist or not, because the files will not have been installed if the dependency is not declared.