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
>Organization:
>Environment:
NetBSD cat.cs.uni-bonn.de 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
>Description:
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
/usr/pkg/sbin/cupsd:
        -lcupsmime.1 => /usr/pkg/lib/libcupsmime.so.1
        -lcups.2 => /usr/pkg/lib/libcups.so.2
        -lssl.0.9.8 => /usr/pkg/lib/libssl.so.0.9.8             <-- pkgsrc
        -lcrypto.0.9.8 => /usr/pkg/lib/libcrypto.so.0.9.8       <-- pkgsrc
        -lpthread.0 => /usr/lib/libpthread.so.0
        -lc.12 => /usr/lib/libc.so.12
        -lcrypt.0 => /usr/lib/libcrypt.so.0
        -lm.0 => /usr/lib/libm.so.0
        -lz.1 => /usr/lib/libz.so.1
        -lslp.1 => /usr/pkg/lib/libslp.so.1
        -lresolv.1 => /usr/lib/libresolv.so.1
        -lldap.2 => /usr/lib/libldap.so.2
        -llber.2 => /usr/lib/liblber.so.2
        -lcrypto.4 => /usr/lib/libcrypto.so.4                   <-- base
        -lssl.6 => /usr/lib/libssl.so.6                         <-- base
        -lpaper.1 => /usr/pkg/lib/libpaper.so.1
        -ldbus-1.3 => /usr/pkg/lib/libdbus-1.so.3

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.
>How-To-Repeat:
Just compile print/cups with PREFER.openssl=pkgsrc.
>Fix:
The following patch tackles the problem by adding an option for ldap and if 
ldap is selected it includes databases/openldap-client/buildlink3.mk 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 
binary).

Index: options.mk
===================================================================
RCS file: /cvsroot/pkgsrc/print/cups/options.mk,v
retrieving revision 1.13
diff -u -r1.13 options.mk
--- options.mk  13 Nov 2011 21:49:17 -0000      1.13
+++ options.mk  12 Jan 2012 11:31:51 -0000
@@ -4,7 +4,8 @@
 PKG_OPTIONS_REQUIRED_GROUPS=   pdftops
 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_SUPPORTED_OPTIONS+= ldap
+PKG_SUGGESTED_OPTIONS= dbus dnssd kerberos libusb poppler slp ldap
 PKG_OPTIONS_LEGACY_OPTS+=      xpdf:poppler gs:ghostscript
 
 .include "../../mk/bsd.options.mk"
@@ -89,3 +90,10 @@
 .else
 CONFIGURE_ARGS+=       --disable-tcp-wrappers
 .endif
+
+.if !empty(PKG_OPTIONS:Mldap)
+.include "../../databases/openldap-client/buildlink3.mk"
+CONFIGURE_ARGS+=       --enable-ldap
+.else
+CONFIGURE_ARGS+=       --disable-ldap
+.endif



Home | Main Index | Thread Index | Old Index