pkgsrc-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

pkg/45824: print/cups links indirectly to base's openssl when PREFER.openssl=pkgsrc is given

>Number:         45824
>Category:       pkg
>Synopsis:       print/cups links indirectly to base's openssl when 
>PREFER.openssl=pkgsrc is given
>Confidential:   no
>Severity:       critical
>Priority:       medium
>Responsible:    pkg-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Thu Jan 12 11:45:00 +0000 2012
>Originator:     Matthias Kretschmer
>Release:        NetBSD 5.1_STABLE
NetBSD 5.1_STABLE NetBSD 5.1_STABLE (CAT) #1: Fri Apr  8 
09:38:30 CEST 2011  
root@fourier.hangelar.local:/home/src/sys/arch/i386/compile/obj/CAT i386
print/cups links indirectly against base's openssl when PREFER.openssl=pkgsrc 
is given.  Furthermore both pkgsrc's and base's openssl libraries are 
referenced and the package won't use pkgsrc's openldap implementation even if 
PREFER.openldap-client=pkgsrc is set.

For example for cupsd:
# ldd /usr/pkg/sbin/cupsd
        -lcupsmime.1 => /usr/pkg/lib/
        -lcups.2 => /usr/pkg/lib/
        -lssl.0.9.8 => /usr/pkg/lib/             <-- pkgsrc
        -lcrypto.0.9.8 => /usr/pkg/lib/       <-- pkgsrc
        -lpthread.0 => /usr/lib/
        -lc.12 => /usr/lib/
        -lcrypt.0 => /usr/lib/
        -lm.0 => /usr/lib/
        -lz.1 => /usr/lib/
        -lslp.1 => /usr/pkg/lib/
        -lresolv.1 => /usr/lib/
        -lldap.2 => /usr/lib/
        -llber.2 => /usr/lib/
        -lcrypto.4 => /usr/lib/                   <-- base
        -lssl.6 => /usr/lib/                         <-- base
        -lpaper.1 => /usr/pkg/lib/
        -ldbus-1.3 => /usr/pkg/lib/

It is of course not a good thing to link to two versions of the same library.  
The reference to base's openssl is an indirect link from the openldap 
implementation.  Openldap is automatically enabled in print/cups due to the 
configure script checking for it.
Just compile print/cups with PREFER.openssl=pkgsrc.
The following patch tackles the problem by adding an option for ldap and if 
ldap is selected it includes databases/openldap-client/ for the 
handling of ldap.  So with the patch if you select 
PREFER.openldap-client=pkgsrc you correctly get openldap from pkgsrc and not 
base as expected which was not the case before.  Deselecting ldap just adds the 
configure parameter --disable-ldap to disable it.  I set ldap as a suggested 
option to make the change as similar to the old behaviour as possible (if one 
is not using ldap from pkgsrc there should be no change in the resulting 

RCS file: /cvsroot/pkgsrc/print/cups/,v
retrieving revision 1.13
diff -u -r1.13
---  13 Nov 2011 21:49:17 -0000      1.13
+++  12 Jan 2012 11:31:51 -0000
@@ -4,7 +4,8 @@
 PKG_OPTIONS_GROUP.pdftops=     ghostscript poppler
 PKG_SUPPORTED_OPTIONS= acl dbus dnssd kerberos libusb pam slp tcpwrappers
-PKG_SUGGESTED_OPTIONS= dbus dnssd kerberos libusb poppler slp
+PKG_SUGGESTED_OPTIONS= dbus dnssd kerberos libusb poppler slp ldap
 PKG_OPTIONS_LEGACY_OPTS+=      xpdf:poppler gs:ghostscript
 .include "../../mk/"
@@ -89,3 +90,10 @@
 CONFIGURE_ARGS+=       --disable-tcp-wrappers
+.if !empty(PKG_OPTIONS:Mldap)
+.include "../../databases/openldap-client/"
+CONFIGURE_ARGS+=       --enable-ldap
+CONFIGURE_ARGS+=       --disable-ldap

Home | Main Index | Thread Index | Old Index