Bug 558960 - /bin/rpm relies on libraries in /usr
Summary: /bin/rpm relies on libraries in /usr
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: rpm
Version: rawhide
Hardware: All
OS: Linux
low
medium
Target Milestone: ---
Assignee: Panu Matilainen
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2010-01-26 18:43 UTC by Jan Stodola
Modified: 2012-03-31 06:41 UTC (History)
6 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2012-03-31 06:41:38 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Jan Stodola 2010-01-26 18:43:09 UTC
Description of problem:
/bin/rpm relies on libraries in /usr:

[root@rtt5 ~]# ldd /bin/rpm
        linux-vdso64.so.1 =>  (0x0000020000024000)
        librpmbuild.so.1 => /usr/lib64/librpmbuild.so.1 (0x000002000005a000)
        librpm.so.1 => /usr/lib64/librpm.so.1 (0x0000020000088000)
        libmagic.so.1 => /usr/lib64/libmagic.so.1 (0x00000200000fd000)
        librpmio.so.1 => /usr/lib64/librpmio.so.1 (0x000002000011c000)
        libselinux.so.1 => /lib64/libselinux.so.1 (0x0000020000150000)
        libcap.so.2 => /lib64/libcap.so.2 (0x0000020000172000)
        libacl.so.1 => /lib64/libacl.so.1 (0x0000020000179000)
        libdb-4.7.so => /lib64/libdb-4.7.so (0x0000020000183000)
        libbz2.so.1 => /lib64/libbz2.so.1 (0x0000020000316000)
        liblzma.so.0 => /usr/lib64/liblzma.so.0 (0x000002000032d000)
        liblua-5.1.so => /usr/lib64/liblua-5.1.so (0x0000020000355000)
        libm.so.6 => /lib64/libm.so.6 (0x0000020000389000)
        libelf.so.1 => /usr/lib64/libelf.so.1 (0x000002000042f000)
        libnss3.so => /usr/lib64/libnss3.so (0x0000020000449000)
        libpopt.so.0 => /lib64/libpopt.so.0 (0x000002000058c000)
        libz.so.1 => /lib64/libz.so.1 (0x0000020000598000)
        librt.so.1 => /lib64/librt.so.1 (0x00000200005b1000)
        libpthread.so.0 => /lib64/libpthread.so.0 (0x00000200005bb000)
        libc.so.6 => /lib64/libc.so.6 (0x00000200005db000)
        libgcc_s.so.1 => /lib64/libgcc_s.so.1 (0x000002000077b000)
        libdl.so.2 => /lib64/libdl.so.2 (0x000002000078e000)
        /lib/ld64.so.1 (0x0000020000000000)
        libattr.so.1 => /lib64/libattr.so.1 (0x0000020000793000)
        libnssutil3.so => /usr/lib64/libnssutil3.so (0x000002000079a000)
        libplc4.so => /lib64/libplc4.so (0x00000200007bc000)
        libplds4.so => /lib64/libplds4.so (0x00000200007c1000)
        libnspr4.so => /lib64/libnspr4.so (0x00000200007c6000)

Version-Release number of selected component (if applicable):
rpm-4.8.0-4.el6.s390x

How reproducible:
always

Steps to Reproduce:
1. install RHEL6 with rpm package
 
Actual results:
/bin/rpm relies on libraries in /usr

Expected results:
/bin/rpm does not rely on libraries in /usr

Comment 1 RHEL Program Management 2010-01-26 18:46:01 UTC
This request was evaluated by Red Hat Product Management for inclusion in a Red
Hat Enterprise Linux major release.  Product Management has requested further
review of this request by Red Hat Engineering, for potential inclusion in a Red
Hat Enterprise Linux Major release.  This request is not yet committed for
inclusion.

Comment 2 Bill Nottingham 2010-01-26 18:54:10 UTC
This has always been this way, by historical precedent. rpm isn't needed before /usr is mounted, in any case.

Comment 3 Panu Matilainen 2010-01-27 09:51:44 UTC
Yes, well known ages old issue, going back to dawn of times when /bin/rpm was (and could be) statically linked. Ignoring the "static linking considered harmful" aspec, there were historical problems with at least NPTL transition and statically linked binaries doing dlopen(). I've no clue whether these are issues anymore and if there are some new issues. Of course neither Fedora or RHEL provides static libraries for what a static /bin/rpm would need...

That basically leaves us with:

1) Move all the goo that /bin/rpm links to /lib[64], which is quite a pile: NSS, liblua, libmagic, liblzma, all rpm's own libraries...

2) Move /bin/rpm to /usr/[s]bin/rpm instead to avoid dragging half the world into /lib[64]. This would undoubtedly cause huge breakage for scripts and other things that assume the historical /bin/rpm location. A lame backwards-compatibility kludge could be planting a symlink for the new location into /bin, but that just gets us back to the starting point: /bin should not reference /usr.

3) Let the sleeping dogs lie...

Comment 4 RHEL Program Management 2010-07-15 14:25:42 UTC
This issue has been proposed when we are only considering blocker
issues in the current Red Hat Enterprise Linux release. It has
been denied for the current Red Hat Enterprise Linux release.

** If you would still like this issue considered for the current
release, ask your support representative to file as a blocker on
your behalf. Otherwise ask that it be considered for the next
Red Hat Enterprise Linux release. **

Comment 5 Phil Knirsch 2010-09-10 15:01:59 UTC
Hm, looks like we went with 3) from comment #3 and pretty sure we can't fix that during the lifetime of RHEL-6 anymore (horrible breakage would most likely be the outcome).

How about we'll aim for fixing this for good in Fedora first?

Thanks & regards, Phil

Comment 6 Panu Matilainen 2010-09-28 07:50:56 UTC
I seem to recall various packages moving their libraries from /usr/lib to /lib in RHEL 5, so from that POV there's "historic precedent" that such things can be done in released versions. It's just that the number of packages requiring library moving is at least half a dozen in this case. Sure all that goo /can/ be moved around, but do we really want to? Seems to me more like a distro-level decision.

Doing it in Fedora first would be a start at least...

Comment 7 Phil Knirsch 2010-09-30 14:09:28 UTC
Jan, any objection to move this to Fedora rawhide instead and discuss that in FESCO if thats actually wanted/needed?

Thanks & regards, Phil

Comment 8 Jan Stodola 2010-09-30 14:46:03 UTC
Phil, I don't have any objection to move this issue to Fedora.

Comment 9 Phil Knirsch 2010-09-30 14:57:33 UTC
Thanks Jan.

Let's move this there then and see what we can do in Fedora about this.

Regards, Phil

Comment 10 Panu Matilainen 2011-03-10 18:36:55 UTC
With rpm >= 4.9.0 this would involve less packages than before: "only" rpm-libs, elfutils-libelf, lua, xz-libs, nss and nss-util (+ anything they in turn require from /usr) would need libraries relocated to /lib(64). However lots of essential rpm configuration still lives in /usr/lib/rpm and changing that gets ugly real fast.

Considering that systemd thinks separate /usr is not even a supported setup anymore, I'm tempted to just close this as WONTBOTHER.

Comment 11 Panu Matilainen 2012-03-31 06:41:38 UTC
What we have here is a rare bug that cured itself by waiting :) With /usrmove in F >= 17, this is no longer an issue.


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