Bug 203059

Summary: [patch] dns/dnscrypt-proxy: init script missing dependency on ldconfig
Product: Ports & Packages Reporter: Gregorio Guidi <greg_g>
Component: Individual Port(s)Assignee: Jason Unovitch <junovitch>
Status: Closed FIXED    
Severity: Affects Many People CC: freebsd, junovitch
Priority: --- Keywords: patch
Version: LatestFlags: bugzilla: maintainer-feedback? (freebsd)
Hardware: Any   
OS: Any   
Attachments:
Description Flags
correction ldconfig freebsd: maintainer-approval+

Description Gregorio Guidi 2015-09-12 14:24:38 UTC
On my system, after installing dns/dnscrypt-proxy and activating it, I get a failure on boot due to a missing library (libsodium.so.13 not found).

This seems to happen because dnscrypt-proxy starts before ldconfig during boot, so /usr/local/lib (where libsodium resides) is not in the loader path when dnscrypt-proxy starts.

The following patch adds a dependency of dnscrypt-proxy to the ldconfig init script and solves the problem for me:

--- /usr/ports/dns/dnscrypt-proxy/files/dnscrypt-proxy.in.old   2015-09-12 15:58:19.252440000 +0200
+++ /usr/ports/dns/dnscrypt-proxy/files/dnscrypt-proxy.in       2015-09-12 15:58:47.804793000 +0200
@@ -3,7 +3,7 @@
 # $FreeBSD: head/dns/dnscrypt-proxy/files/dnscrypt-proxy.in 395430 2015-08-27 15:15:20Z feld $
 #
 # PROVIDE: dnscrypt_proxy
-# REQUIRE: SERVERS cleanvar
+# REQUIRE: SERVERS cleanvar ldconfig
 # BEFORE: named local_unbound unbound
 # KEYWORD: shutdown
 #
Comment 1 Leo Vandewoestijne 2015-09-22 13:50:18 UTC
Thanks for the correction patch / your solution!
I will upload another of the same in a minute.
Comment 2 Leo Vandewoestijne 2015-09-22 13:50:57 UTC
Created attachment 161273 [details]
correction ldconfig
Comment 3 commit-hook freebsd_committer freebsd_triage 2015-09-26 02:39:25 UTC
A commit references this bug:

Author: junovitch
Date: Sat Sep 26 02:39:11 UTC 2015
New revision: 397925
URL: https://svnweb.freebsd.org/changeset/ports/397925

Log:
  dns/dnscrypt-proxy: ensure daemon starts after ldconfig

  - While here, fix format of $FreeBSD$ tag in rc script
  - Also remove fbsd:nokeywords and add svn:keywords to rc script

  PR:		203059
  Submitted by:	Gregorio Guidi <gregorio.guidi@gmail.com> (original patch)
  Approved by:	Leo Vandewoestijne <freebsd@dns-lab.com> (maintainer)

Changes:
  head/dns/dnscrypt-proxy/Makefile
  head/dns/dnscrypt-proxy/files/dnscrypt-proxy.in
  head/dns/dnscrypt-proxy/files/dnscrypt-proxy_multi.in
Comment 4 Jason Unovitch freebsd_committer freebsd_triage 2015-09-26 02:40:48 UTC
Committed.  Thanks for the report!