| Summary: | yum-builddep does not install a package that rpmbuild reports as missing | ||
|---|---|---|---|
| Product: | Red Hat Enterprise Linux 7 | Reporter: | Alex Williamson <alex.williamson> |
| Component: | yum-utils | Assignee: | James Antill <james.antill> |
| Status: | CLOSED WONTFIX | QA Contact: | BaseOS QE Security Team <qe-baseos-security> |
| Severity: | unspecified | Docs Contact: | |
| Priority: | unspecified | ||
| Version: | 7.0 | CC: | acathrow, jdenemar, packaging-team-maint, pmatilai, riehecky, zpavlas |
| Target Milestone: | rc | Keywords: | Reopened |
| Target Release: | --- | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| Whiteboard: | |||
| Fixed In Version: | Doc Type: | Bug Fix | |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2014-01-24 11:52:39 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: | |
|
Description
Alex Williamson
2013-12-11 00:42:23 UTC
AFAIK sanlock package is in the optional channel so you may need to update your yum repos configuration. In any case, sanlock is present in rhel-7.0: $ brew latest-pkg rhel-7.0 sanlock Build Tag Built by ---------------------------------------- -------------------- ---------------- sanlock-3.0.1-2.el7 rhel-7.0 teigland I was able to yum install it without issue and without need to add any yum repos, that's not the problem I was reporting. The problem is yum-builddep doesn't install it, but rpmbuild requires it. yum remove sanlock and see for yourself. Ah, sorry about that. I misread the bug description. You are indeed right, "rpmbuild --rebuild libvirt-1.1.1-14.el7.src.rpm" complains about missing sanlock-devel while "yum-builddep libvirt-1.1.1-14.el7.src.rpm" says all build dependencies are installed. Looks like a bug in yum-builddep to me. It's reproducible with yum-utils-1.1.31-19.el7.noarch Most likely the difference comes from rpmbuild recalculating the build-requires by extracting the spec and parsing it, but yum-builddep using the src.rpm metadata. The results can differ for numerous reasons. 1) see 'rpm -qp --requires libvirt-1.1.1-14.el7.src.rpm' output, does the src.rpm as-built require sanlock-devel? 2) 'yum-builddep libvirt.spec' instead, this actually parses the spec and gets identical results to rpmbuild 1) the rpm command does not mention sanlock at all:
autoconf
automake
gettext-devel
libtool
/usr/bin/pod2man
python-devel
systemd-units
libxml2-devel
xhtml1-dtds
libxslt
readline-devel
ncurses-devel
gettext
libtasn1-devel
gnutls-devel
libattr-devel
libblkid-devel >= 2.17
augeas
systemd-devel >= 185
libpciaccess-devel >= 0.10.9
yajl-devel
libpcap-devel
libnl3-devel
avahi-devel
libselinux-devel
dnsmasq >= 2.41
iptables
iptables-ipv6
radvd
ebtables
module-init-tools
cyrus-sasl-devel
polkit-devel >= 0.112
util-linux
lvm2
iscsi-initiator-utils
parted-devel
device-mapper-devel
numactl-devel
libcap-ng-devel >= 0.5.0
fuse-devel >= 2.8.6
netcf-devel >= 0.2.2
libcurl-devel
audit-libs-devel
systemtap-sdt-devel
nfs-utils
dbus-devel
gawk
scrub
numad
rpmlib(FileDigests) <= 4.6.0-1
rpmlib(CompressedFileNames) <= 3.0.4-1
2) yes, yum-builddep used with libvirt.spec will install sanlock-devel
Can't yum-builddep just extract the spec file from the srpm and use it to get build requirements?
(In reply to Jiri Denemark from comment #5) > 1) the rpm command does not mention sanlock at all: Ok. What that means is the src.rpm was created in environment/conditions which differs from your build environment. The libvirt.spec is crazy with conditionals to make it buildable from rhel-5 to fedora-latest, making it more subject to this kind of fun than an average spec file. > 2) yes, yum-builddep used with libvirt.spec will install sanlock-devel > > Can't yum-builddep just extract the spec file from the srpm and use it to > get build requirements? Existing rpm versions dont provide an API for extracting contents from package payload (this is about to change in the next major rpm version, but that wont come to rhel-7). Doesn't mean it would be impossible to do so from yum-utils, but it hasn't been added because the functionality really belongs into rpm land. Also yum-builddep's ability to use .specs is relatively new in itself. *** Bug 1040221 has been marked as a duplicate of this bug. *** > Can't yum-builddep just extract the spec file from the srpm and use it to get build requirements?
"yum-builddep <package>" uses the repository metadata for <package>.src.rpm only, but does not actually download the srpm, so we can't extract the spec file from it. Implementing it is not trivial, and given that the current bahavior works fine in most cases and a workaround is available, I don't think it's necessary.
|