Bug 1170119

Summary: rpm install not always keep the native architecture of the machine in multilib environment
Product: Red Hat Enterprise Linux 7 Reporter: Patrik Kis <pkis>
Component: rpmAssignee: Florian Festi <ffesti>
Status: CLOSED ERRATA QA Contact: Karel Srot <ksrot>
Severity: medium Docs Contact:
Priority: medium    
Version: 7.1CC: ffesti, ksrot, lkardos
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: rpm-4.11.3-10.el7 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 1170124 (view as bug list) Environment:
Last Closed: 2015-11-19 11:58:25 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1170124    

Description Patrik Kis 2014-12-03 10:32:35 UTC
Description of problem:
In multilib environment if booth architectures are installed the native architecture of the machine should appear on the disk (e.g. on x86_64 machine if booth i686 and x86_64 version of a package are installed the x86_64 versions of binaries and libraries should be installed). This can be broken under certain circumstances.

Version-Release number of selected component (if applicable):
rpm-4.11.1-23.el7

How reproducible:
always

Steps to Reproduce:

[root@rhel70 new]# uname -p
x86_64
[root@rhel70 new]# rpm -qa krb5\*
krb5-libs-1.12.2-8.el7.i686
krb5-libs-1.12.2-8.el7.x86_64
[root@rhel70 new]# rpm -ivh krb5-server-1.12.2-8.el7.*.rpm krb5-devel-1.12.2-8.el7.*.rpm
Preparing...                          ################################# [100%]
Updating / installing...
   1:krb5-devel-1.12.2-8.el7          ################################# [ 25%]
   2:krb5-server-1.12.2-8.el7         ################################# [ 50%]
   3:krb5-devel-1.12.2-8.el7          ################################# [ 75%]
   4:krb5-server-1.12.2-8.el7         ################################# [100%]
[root@rhel70 new]# file /usr/bin/sclient /usr/sbin/sserver
/usr/bin/sclient:  ELF 32-bit LSB shared object, Intel 80386, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.32, BuildID[sha1]=0xefe01735210a6015283c3bd7a8e6256f2d1bc4d6, stripped
/usr/sbin/sserver: ELF 32-bit LSB shared object, Intel 80386, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.32, BuildID[sha1]=0xd1930e90c926388d35f3e01868a2169267207d13, stripped
[root@rhel70 new]# 
[root@rhel70 new]# rpm -qV krb5-devel.i686 
[root@rhel70 new]# rpm -qV krb5-devel.x86_64
S.5......    /usr/bin/sclient
S.5......    /usr/sbin/sserver
[root@rhel70 new]# rpm -qV krb5-server.i686 
[root@rhel70 new]# rpm -qV krb5-server.x86_64
S.5......    /usr/bin/sclient
S.5......    /usr/sbin/sserver
[root@rhel70 new]# 

Additional info:

The bug demonstrated itself because by mistake booth arch od krb5-server were distributed, what is a mistake. In the past only 2 krb5-devel and 1 krb5-server packages were released, and in that case the problem does not appear. In any case, this bug should be fixed also on rpm level.

[root@rhel70 new]# rpm -ivh krb5-server-1.12.2-8.el7.x86_64.rpm krb5-devel-1.12.2-8.el7.*.rpm
Preparing...                          ################################# [100%]
Updating / installing...
   1:krb5-devel-1.12.2-8.el7          ################################# [ 33%]
   2:krb5-server-1.12.2-8.el7         ################################# [ 67%]
   3:krb5-devel-1.12.2-8.el7          ################################# [100%]
[root@rhel70 new]# file /usr/bin/sclient /usr/sbin/sserver
/usr/bin/sclient:  ELF 64-bit LSB shared object, x86-64, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.32, BuildID[sha1]=0xba6c46db5380ecefac4788835d67e3fe9359aeba, stripped
/usr/sbin/sserver: ELF 64-bit LSB shared object, x86-64, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.32, BuildID[sha1]=0x1cfa9c9cd8c10594aafbc4085ee0d39b5d86b553, stripped
[root@rhel70 new]# rpm -qV krb5-devel.i686 
[root@rhel70 new]# rpm -qV krb5-devel.x86_64
[root@rhel70 new]# rpm -qV krb5-server.x86_64
[root@rhel70 new]#

Comment 1 Karel Srot 2015-04-02 07:27:40 UTC
Florian,
shouldn't rpm report a file conflict in such case?

Comment 2 Florian Festi 2015-04-02 13:43:22 UTC
No, with multilib files with color=1 (typically 32 bit binaries) are silently overwritten by files with color=2 (typically 64 bit binaries). We already fixed this in 6.7. See #1170124.

Comment 4 Ľuboš Kardoš 2015-04-02 14:16:05 UTC
One note why there is no conflict here. Let's have a look at file /usr/bin/sclient. We have this file in four packages (krb5-devel.i686, krb5-devel.x86_64, krb5-server.i686, krb5-server.x86_64) so we have following six combinations (4 choose 2 = 6).

/usr/bin/sclient(krb5-devel.i686) vs usr/bin/sclient(krb5-server.i686) -> the same content -> no file conflict
/usr/bin/sclient(krb5-devel.x86_64) vs usr/bin/sclient(krb5-server.x86_64) -> the same content -> no file conflict

/usr/bin/sclient(krb5-devel.i686) vs usr/bin/sclient(krb5-devel.x86_64) -> different colors -> no file conflict
/usr/bin/sclient(krb5-server.i686) vs usr/bin/sclient(krb5-server.x86_64) -> different colors -> no file conflict

/usr/bin/sclient(krb5-devel.i686) vs usr/bin/sclient(krb5-server.x86_64) -> different colors -> no file conflict
/usr/bin/sclient(krb5-server.i686) vs usr/bin/sclient(krb5-devel.x86_64) -> different colors -> no file conflict

So there is no conflict and 64bit variant of file /usr/bin/sclient should be installed.

Comment 7 errata-xmlrpc 2015-11-19 11:58:25 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://rhn.redhat.com/errata/RHBA-2015-2138.html