Bug 194475 - security/heimdal has a dependency on libcom_err from heimdal base
Summary: security/heimdal has a dependency on libcom_err from heimdal base
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Ports Framework (show other bugs)
Version: Latest
Hardware: amd64 Any
: --- Affects Some People
Assignee: Hiroki Sato
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-10-20 03:44 UTC by dewayne
Modified: 2014-11-22 10:58 UTC (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description dewayne 2014-10-20 03:44:56 UTC
The heimdal port is not self contained and relies upon parts (libcom_err.*) of the heimdal base to function.

The heimdal port pulls in /usr/lib/libcom_err which is installed via heimdal base. When heimdal port builds, configure performs a test for libcom_err, if it exists link to it, otherwise fail.

To ensure that the heimdal port is not dependent on the heimdal base, the following 3 steps are required:

1) Have this in the /usr/ports/security/heimdal/Makefile:
PLIST_SUB+=    LIBCOM_ERR=""
2) and remove /usr/ports/security/heimdal/files/patch-lib-com_err-Makefile.in

As I build ports on a development machine which has heimdal from base installed, the heimdal package expects /usr/lib/libcom_err.* to exist.  However our production systems have /etc/src.conf containing:
WITHOUT_GSSAPI=yes
WITHOUT_KERBEROS=yes
WITHOUT_KERBEROS_SUPPORT=yes
So for our development machine we remove /usr/lib/libcom_err.* to enable the heimdal port's configure script to NOT detect /usr/lib/libcom_err.*

3) Either build a base system without /usr/lib/libcom_err.* or remove the files prior to building the heimdal port, to ensure that the heimdal port is entirely self-contained; particularly when heimdal is NOT part of the base system or the target system.  If I was more technical, I would see about eliminating configure's test for the existence of /usr/lib/libcom_err.* files and to unconditionally build its own from its library; ideally build its own libcom_err files, similar to the way samba41 does this.
Comment 1 Hiroki Sato freebsd_committer 2014-10-20 04:34:48 UTC
Take.
Comment 2 commit-hook freebsd_committer 2014-11-22 10:52:51 UTC
A commit references this bug:

Author: hrs
Date: Sat Nov 22 10:52:00 UTC 2014
New revision: 373047
URL: https://svnweb.freebsd.org/changeset/ports/373047

Log:
  - Move headers and libraries into PREFIX/{include,lib}/heimdal.  This
    prevents build breakage when a port depends on heimdal in base and
    some other libraries in LOCALBASE/lib such as OpenSSL from ports
    at the same time.

  - Always build libcom_err[*].

  PR:	194475 [*]

Changes:
  head/Mk/Uses/gssapi.mk
  head/security/heimdal/Makefile
  head/security/heimdal/files/kpasswdd-Makefile
  head/security/heimdal/files/patch-configure
  head/security/heimdal/pkg-plist
Comment 3 Hiroki Sato freebsd_committer 2014-11-22 10:58:07 UTC
Changes in r373047 should fix this problem.  libcom_err is now built unconditionally and the port works regardless of WITHOUT_KERBEROS=yes.  If there is still a problem, please let me know.