Bug 471054

Summary: focus linking of gsoap, X11 and pq into daemons and tools
Product: Red Hat Enterprise MRG Reporter: Matthew Farrellee <matt>
Component: condorAssignee: Matthew Farrellee <matt>
Status: CLOSED ERRATA QA Contact: Luigi Toscano <ltoscano>
Severity: medium Docs Contact:
Priority: medium    
Version: 1.0CC: fnadge, ltoscano
Target Milestone: 1.3   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Previously, all daemons and command line tools were linked against the same set of libraries, which left dependencies on pcre and gsoap. This update removes these redundant dependencies. These, and other, dependencies are not necessary.
Story Points: ---
Clone Of: Environment:
Last Closed: 2010-10-14 16:12:35 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Matthew Farrellee 2008-11-11 15:53:08 UTC
Currently (7.2 and earlier), all daemons and command line tools are linked against the same set of libraries. This leaves dependencies on pcre and gsoap for command line tools and X11 for daemons and tools (only kbdd requires). These, and other, dependencies are not necessary. They are an artifact of the build system, which needs to be fixed.

Comment 1 Matthew Farrellee 2010-01-04 15:39:59 UTC
Bad:

$ condor_version
$CondorVersion: 7.4.1 Dec 11 2009 BuildID: RH-7.4.1-0.7.1.el5 PRE-RELEASE $
$CondorPlatform: X86_64-LINUX_RHEL5 $
$ ldd $(which condor_shadow) | grep -e soap -e pcre -e classad
	libpcre.so.0 => /lib64/libpcre.so.0 (0x0000003210400000)
	libgsoapssl++.so.0 => /usr/lib64/libgsoapssl++.so.0 (0x0000003211400000)
	libclassad.so.0 => /usr/lib64/libclassad.so.0 (0x0000003210c00000)

Good:

$ ./release_dir/bin/condor_version 
$CondorVersion: 7.5.0 Jan  4 2010 PRE-RELEASE $
$CondorPlatform: I386-LINUX_F12 $

$ ldd release_dir/sbin/condor_shadow | grep -e soap -e pcre -e classad
	libpcre.so.0 => /lib/libpcre.so.0 (0x07c52000)
	libclassad.so.0 => /usr/lib/libclassad.so.0 (0x003e5000)

Comment 2 Matthew Farrellee 2010-01-04 16:48:17 UTC
Better:

$ ./release_dir/bin/condor_version
$CondorVersion: 7.5.0 Jan  4 2010 PRE-RELEASE $
$CondorPlatform: I386-LINUX_F12 $

$ ldd release_dir/sbin/condor_shadow | grep -e soap -e pcre -e classad
	libpcre.so.0 => /lib/libpcre.so.0 (0x07c52000)

Comment 3 Matthew Farrellee 2010-01-04 17:02:15 UTC
Acceptable:

$ grep libgsoap release_dir/bin/condor_* release_dir/sbin/condor_*             
Binary file release_dir/sbin/condor_collector matches
Binary file release_dir/sbin/condor_schedd matches

$ grep libclassad release_dir/bin/condor_* release_dir/sbin/condor_*
Binary file release_dir/bin/condor_check_userlogs matches
Binary file release_dir/bin/condor_dagman matches
Binary file release_dir/bin/condor_q matches
Binary file release_dir/bin/condor_submit_dag matches
Binary file release_dir/bin/condor_userlog matches
Binary file release_dir/bin/condor_userlog_job_counter matches

Comment 4 Matthew Farrellee 2010-01-04 17:54:10 UTC
pcre gets pulled in for classad's regex() function and for user mapping via the MapFile - regex are not used for ALLOW/DENY security configuration

Comment 5 Matthew Farrellee 2010-01-04 17:56:34 UTC
commit cfe7e27765d818a6b8d8c695d7ad2984e45dedab
Author: Matthew Farrellee <matt@>
Date:   Mon Jan 4 12:04:32 2010 -0500

    Pulled -lclassad from general LIBS, all makefiles that needed -lclassad had it explicitly

Comment 6 Matthew Farrellee 2010-01-04 18:00:44 UTC
Acceptable:

$ grep libpq /usr/sbin/condor_*
Binary file /usr/sbin/condor_advertise matches
Binary file /usr/sbin/condor_dbmsd matches
Binary file /usr/sbin/condor_fetchlog matches
Binary file /usr/sbin/condor_off matches
Binary file /usr/sbin/condor_on matches
Binary file /usr/sbin/condor_preen matches
Binary file /usr/sbin/condor_quill matches
Binary file /usr/sbin/condor_reconfig matches
Binary file /usr/sbin/condor_restart matches
Binary file /usr/sbin/condor_store_cred matches
$ grep libpq /usr/bin/condor_*
Binary file /usr/bin/condor_cod matches
Binary file /usr/bin/condor_config_val matches
Binary file /usr/bin/condor_dump_history matches
Binary file /usr/bin/condor_findhost matches
Binary file /usr/bin/condor_history matches
Binary file /usr/bin/condor_load_history matches
Binary file /usr/bin/condor_q matches
Binary file /usr/bin/condor_qedit matches
Binary file /usr/bin/condor_reschedule matches
Binary file /usr/bin/condor_ssh_to_job matches
Binary file /usr/bin/condor_stats matches
Binary file /usr/bin/condor_transfer_data matches
Binary file /usr/bin/condor_userprio matches
Binary file /usr/bin/condor_vacate matches
Binary file /usr/bin/condor_version matches
Binary file /usr/bin/condor_wait matches

Comment 7 Matthew Farrellee 2010-01-04 18:13:22 UTC
Fixed in 7.4.2-0.1

Comment 8 Matthew Farrellee 2010-04-21 14:10:04 UTC
As of 7.4.3-0.11, libpq should be removed entirely

Comment 9 Matthew Farrellee 2010-04-21 14:17:27 UTC
Verify with the "Better" and "Acceptable" comments

Comment 10 Luigi Toscano 2010-06-01 15:57:19 UTC
libpq is not linked anymore.
libX11 is linked by condor_kbdd only.
The usage of libgsoap and libclassad has been restricted according to Comment #3 .
(The usage of pcre has been moved to bz584825).

Verified on condor 7.4.3-0.16 on RHEL 4.8/5.5, i386/x86_64.

Comment 11 Florian Nadge 2010-10-07 17:25:02 UTC
    Technical note added. If any revisions are required, please edit the "Technical Notes" field
    accordingly. All revisions will be proofread by the Engineering Content Services team.
    
    New Contents:
Previously, all daemons and command line tools were linked against the same set of libraries, which left dependencies on pcre and gsoap. This update removes these redundant dependencies. These, and other, dependencies are not necessary.

Comment 13 errata-xmlrpc 2010-10-14 16:12:35 UTC
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on therefore solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.

http://rhn.redhat.com/errata/RHSA-2010-0773.html