Bug 228046 - [patch] Use "service ldconfig restart" for USE_LDCONFIG
Summary: [patch] Use "service ldconfig restart" for USE_LDCONFIG
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Ports Framework (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: Tijl Coosemans
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-05-07 17:29 UTC by Tijl Coosemans
Modified: 2018-05-14 19:19 UTC (History)
1 user (show)

See Also:


Attachments
patch (1.46 KB, patch)
2018-05-07 17:29 UTC, Tijl Coosemans
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Tijl Coosemans freebsd_committer 2018-05-07 17:29:59 UTC
Created attachment 193152 [details]
patch

Currently USE_LDCONFIG adds "@postexec ${LDCONFIG} -m ${USE_LDCONFIG}" to pkg-plist.  This command appends the path in USE_LDCONFIG to the list of ldconfig directories.  On reboot /etc/rc.d/ldconfig uses "sort -u" on the list of paths which may give a different order.  The patch replaces the postexec with "@postexec /usr/sbin/service ldconfig restart" which reruns the rc.d script so the order after a package install is the same as after a reboot.
Comment 1 Antoine Brodin freebsd_committer 2018-05-14 14:25:56 UTC
This looks good to me.
Comment 2 commit-hook freebsd_committer 2018-05-14 19:16:19 UTC
A commit references this bug:

Author: tijl
Date: Mon May 14 19:15:38 UTC 2018
New revision: 469956
URL: https://svnweb.freebsd.org/changeset/ports/469956

Log:
  Run "/usr/sbin/service ldconfig restart" for USE_LDCONFIG instead of
  "ldconfig -m <path>" so the order of ldconfig search directories after
  package installation is the same as after a reboot.  The original command
  simply appends the path to the list of directories while the ldconfig rc.d
  script uses "sort -u".

  Bump lang/gcc* which are known to install libraries with exactly the same
  name so the library loaded at runtime depends on the order of the search
  directories.

  PR:		228046
  Approved by:	portmgr (antoine)

Changes:
  head/Mk/bsd.port.mk
  head/lang/gcc47/Makefile
  head/lang/gcc48/Makefile
  head/lang/gcc49/Makefile
  head/lang/gcc5/Makefile
  head/lang/gcc6/Makefile
  head/lang/gcc6-devel/Makefile
  head/lang/gcc7/Makefile
  head/lang/gcc7-devel/Makefile
  head/lang/gcc8-devel/Makefile
  head/lang/gcc9-devel/Makefile