Bug 19944 - libsafe breaks rpm building
Summary: libsafe breaks rpm building
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Red Hat Powertools
Classification: Retired
Component: libsafe
Version: 7.0
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Tim Powers
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2000-10-27 22:00 UTC by Stan Bubrouski
Modified: 2008-05-01 15:37 UTC (History)
0 users

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2000-10-28 18:48:20 UTC
Embargoed:


Attachments (Terms of Use)

Description Stan Bubrouski 2000-10-27 22:00:44 UTC
When using rpm --rebuild to rebuild a source rpm, if the libsafe package is
installed the recompiled package will have a dependency on libsafe.so.1.3
which is incorrect it needs to be /lib/libsafe.so.1.3 otherwise rpm will
not find libsafe.so.1.3 and thus the dependency will fail.  This will occur
100% of the time when a package is build using rpm --rebuild because
libsafe puts LD_PRELOAD=/lib/libsafe.so.1.3 in users' environment when they
login.  Here is an example of the problem using the wget package:



[root@linux redhat]# rpm -q --requires wget-1.5.3-10         
/sbin/install-info  
/bin/sh  
rpmlib(PayloadFilesHavePrefix) <= 4.0-1
ld-linux.so.2  
libc.so.6  
libc.so.6(GLIBC_2.0)  
libc.so.6(GLIBC_2.1)  
libc.so.6(GLIBC_2.1.3)  
rpmlib(CompressedFileNames) <= 3.0.4-1
[root@linux redhat]# rpm --rebuild wget-1.5.3-10.src.rpm
<snip>
[root@linux redhat]# rpm -qp --requires wget-1.5.3-10.i386.rpm         
/sbin/install-info  
/bin/sh  
rpmlib(PayloadFilesHavePrefix) <= 4.0-1
ld-linux.so.2  
libc.so.6  
libdl.so.2  
libsafe.so.1.3  
libc.so.6(GLIBC_2.0)  
libc.so.6(GLIBC_2.1)  
libc.so.6(GLIBC_2.1.3)  
rpmlib(CompressedFileNames) <= 3.0.4-1
[root@linux redhat]# rpm -ivh wget-1.5.3-10.i386.rpm 
error: failed dependencies:
        libsafe.so.1.3 is needed by wget-1.5.3-10
[root@linux redhat]# rpm -q libsafe                        
libsafe-1.3-7
[root@linux redhat]# rpm -V libsafe
[root@linux redhat]# 


Not sure how this would be fixed... exactly... but in any case the problem
is irritating and is definately seems errata-worthy to me.  Otherwise
anyone using the libsafe package is going to have to install all rpms built
on their system using rpm -ivh --nodeps which is not something most people
would appreciate especially if they use automated scripts to rebuild
packages or even have package rebuilding scheduled using cron or something.

The only question I can see is whether this is an rpm problem or a problem
caused by something libsafe isn't doing but should (i.e. in
/etc/profile.d/libsafe.{sh,csh} ) like setting an environmental variable to
so ld knows not to use it or to use it (should be optional for users, not
all people who use libsafe want programs they make linked with it because
they may not work on other systems without libsafe).  That's just one
idea.  Changing rpm config files in /usr/lib/rpm may be an option as well. 
Any feedback on this one?

-Stan Bubrouski

Comment 1 Tim Powers 2000-10-28 18:48:17 UTC
I just spoke with the maintainer of RPM, and this is not really a libsafe bug,
and it's not an RPM bug. It's just not a bug according to Jeff. Here's what he
said when I told him that I agree with you about needing /lib in front:

	Why do you think the dependency is incorrect? If you choose to build with
libbsafe, then you will link in libbsafe.so.1, which will be found by
/usr/lib/rpm/find-requires, all perfectly correct. It's not true that the
dependency should be /lib/libbsafe.so.1.3, as the library could be anywhere,
while the soname is still needed for "correct" (assuming that the intent was to
compile in bsafe) execution. You might also wish/need a dependency on the file
path for the library, but that's a different matter.

	I agree the dependency may be undesireable. Either don't build with libbsafe
enabled, or modify rpm's find-requires. This can be done by writing a 1 line script:
		/usr/lib/rpm/find-requires | sed -e 's,libsafe.so.1,,'
and configuring:
		%__find_requires  <path_to_your_script>
	



Does this help? I am going to mark this as not a bug, if that's not satisfactory
for you change the component to be rpm in the distro. It's all how RPM picks up
dependancies at build time.

Tim



Note You need to log in before you can comment on or make changes to this bug.