Bug 976350 - yum-builddep tries to install incorrect dependencies for gdb.src.rpm
yum-builddep tries to install incorrect dependencies for gdb.src.rpm
Status: CLOSED NOTABUG
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: yum-utils (Show other bugs)
7.0
Unspecified Unspecified
unspecified Severity unspecified
: rc
: ---
Assigned To: James Antill
BaseOS QE Security Team
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2013-06-20 08:34 EDT by Dagmar Prokopová
Modified: 2014-07-01 18:54 EDT (History)
6 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2013-07-24 10:19:25 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Dagmar Prokopová 2013-06-20 08:34:19 EDT
Description of problem:
Yum-builddep proposes installation of incorrect packages (ppc-32 variant on x86_64 and s390x machines):

On rhel7 server x86_64:

[root@hp-dl380pgen8-02-vm-7 ~]# yum-builddep gdb-7.6-31.el7.src.rpm 
Loaded plugins: product-id
Getting requirements for gdb-7.6-31.el7.src
 --> texinfo-5.1-1.el7.x86_64
 --> Already installed : gettext-0.18.2.1-1.el7.x86_64
 --> Already installed : flex-2.5.37-1.el7.x86_64
 --> Already installed : bison-2.7-2.el7.x86_64
 --> texinfo-tex-5.1-1.el7.x86_64
 --> Already installed : perl-podlators-2.5.1-1.el7.noarch
 --> 2:texlive-ec-svn25033.1.0-22.el7.noarch
 --> 2:texlive-cm-super-svn15878.0-22.el7.noarch
Error: No Package found for expat-devel(ppc-32)
Error: No Package found for libselinux-devel(ppc-32)
Error: No Package found for ncurses-devel(ppc-32)
Error: No Package found for python-devel(ppc-32)
Error: No Package found for readline-devel(ppc-32) >= 6.2-4
Error: No Package found for rpm-devel(ppc-32)
Error: No Package found for xz-devel(ppc-32)
Error: No Package found for zlib-devel(ppc-32)

[root@hp-dl380pgen8-02-vm-7 ~]# rpmbuild -bb rpmbuild/SPECS/gdb.spec
error: Failed build dependencies:
	readline-devel(x86-64) >= 6.2-4 is needed by gdb-7.6-31.el7.x86_64
	ncurses-devel(x86-64) is needed by gdb-7.6-31.el7.x86_64
	texinfo is needed by gdb-7.6-31.el7.x86_64
	expat-devel(x86-64) is needed by gdb-7.6-31.el7.x86_64
	xz-devel(x86-64) is needed by gdb-7.6-31.el7.x86_64
	rpm-devel(x86-64) is needed by gdb-7.6-31.el7.x86_64
	zlib-devel(x86-64) is needed by gdb-7.6-31.el7.x86_64
	libselinux-devel(x86-64) is needed by gdb-7.6-31.el7.x86_64
	python-devel(x86-64) is needed by gdb-7.6-31.el7.x86_64
	texinfo-tex is needed by gdb-7.6-31.el7.x86_64
	texlive-ec is needed by gdb-7.6-31.el7.x86_64
	texlive-cm-super is needed by gdb-7.6-31.el7.x86_64


The very same issue appears on s390x.


Version-Release number of selected component (if applicable):
yum-utils-1.1.31-14.el7.noarch
gdb-7.6-31.el7.src.rpm

How reproducible:
always

Steps to Reproduce:
1. yum-builddep gdb-7.6-31.el7.src.rpm

Actual results:
yum-builddep fails and dependencies need to be installed manually to build gdb from source

Expected results:
yum-builddep installs correct packages successfully
Comment 2 Panu Matilainen 2013-06-20 09:35:08 EDT
When used with src.rpm like that, yum-builddep assumes the src.rpm has been built for the same architecture you're running it on. When that's not the case (brew/koji build src.rpm on a random arch), the build-dependencies recorded in the src.rpm can be unsatisfiable.

Unpack the src.rpm and use yum-builddep on the spec instead.
Comment 3 Dagmar Prokopová 2013-06-20 14:01:00 EDT
I see! Good to know. Thanks a lot.
Comment 4 Panu Matilainen 2013-06-21 02:56:35 EDT
Also FWIW, the FPC recently banned the use of %{_isa} in BuildRequires because of issues like this:
http://fedoraproject.org/wiki/Packaging:Guidelines#BuildRequires_and_.25.7B_isa.7D

That does nothing but wipe the issue partially under the carpet as arch-specific build-requires are necessary and do exist in numerous packages.
Comment 5 Miroslav Franc 2013-07-03 06:11:02 EDT
This is not very ideal, it seems that on RHEL5 yum-builddep does not work on spec files and on RHEL6 and RHEL7 does not work on srpms.
Comment 6 Panu Matilainen 2013-07-03 06:18:09 EDT
yum-builddep works on srpms everywhere, but it can only operate correctly when the srpm was built on the same architecture (and other such environment issues) yum-builddep is being used on. This is just as true for RHEL5 as it is for RHEL6 and RHEL7.
Comment 7 Jan Zeleny 2013-07-24 10:19:25 EDT
As per comments 2, 3 and 6 I assume that this is not a real bug, rather an expected behavior (no matter how inconvenient for some cases). Closing ...

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