Bug 195319 - security/heimdal moved libs, did not fix pkg-config; broke existing binaries
Summary: security/heimdal moved libs, did not fix pkg-config; broke existing binaries
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Some People
Assignee: Hiroki Sato
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-11-24 00:08 UTC by Phil Pennock
Modified: 2014-11-24 01:41 UTC (History)
0 users

See Also:
freebsd: maintainer-feedback? (hrs)


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Phil Pennock 2014-11-24 00:08:53 UTC
Commit 7ffdbf37 in freebsd-ports was "Move headers and libraries into PREFIX/{include,lib}/heimdal".

The commit neglected to update "libdata/pkgconfig/heimdal-gssapi.pc", thus programs built using pkg-config can not pick up the new library location, and end up building against system libraries.  In addition, because the new location is not in the system library path, and nothing in the ".pc" file says to update the RPATH, programs will successfully build and link, but the run-time linker will fail to resolve the heimdal libraries.

I am one of the Exim maintainers, I use heimdal-gssapi in building Exim locally (not an option exposed by the mail/exim port, and I'm building from source as an upstream maintainer anyway).  This change meant that a "pkg upgrade" broke my running MTA because the upgrade did not leave the old libraries in the compat/ area, so non-Ports programs suddenly break.

So, minimally, there needs to be an UPDATING notice of this breaking change, but ideally there would also be a migration compatibility aid to not just nuke libraries from appearing anywhere in the system runtime library path.

To be able to use the new locations, I modified `heimdal-gssapi.pc` to state:

    libdir=${exec_prefix}/lib/heimdal
    includedir=${prefix}/include/heimdal

and on the `Libs:` line, after the `-L${libdir}` I added: `-Wl,-rpath=${libdir}`

With those three changes to the pkg-config spec for heimdal-gssapi, Exim once more builds and links and the resulting binary can be successfully loaded by the runtime linker.
Comment 1 Bugzilla Automation freebsd_committer freebsd_triage 2014-11-24 00:08:53 UTC
Auto-assigned to maintainer hrs@FreeBSD.org
Comment 2 commit-hook freebsd_committer freebsd_triage 2014-11-24 00:35:20 UTC
A commit references this bug:

Author: hrs
Date: Mon Nov 24 00:34:38 UTC 2014
New revision: 373188
URL: https://svnweb.freebsd.org/changeset/ports/373188

Log:
  - Fix heimdal-gssapi.pc.
  - Add an UPDATING entry.

  PR:	195319

Changes:
  head/UPDATING
  head/security/heimdal/Makefile
  head/security/heimdal/files/patch-tools-heimdal-gssapi.pc.in
Comment 3 Hiroki Sato freebsd_committer freebsd_triage 2014-11-24 00:49:52 UTC
Thank you for your report and I am sorry for the breakage.  I fixed heimdal-gssapi.pc and added an entry into UPDATING just now.  If there is still something wrong, please let me know.
Comment 4 Phil Pennock 2014-11-24 01:41:43 UTC
Changes have made it to git in svn_head branch and look sane to me there, thanks.

Sometime after this propagates out to where a poudriere run can pick up the changes, I'll try it out, but with US holidays this week it may be a week or so before I do.

Thanks.