Bug 1259054 - builddep plugin fails to recognize virtual file dependencies
builddep plugin fails to recognize virtual file dependencies
Status: CLOSED CURRENTRELEASE
Product: Fedora
Classification: Fedora
Component: dnf-plugins-core (Show other bugs)
22
x86_64 Linux
high Severity low
: ---
: ---
Assigned To: packaging-team-maint
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2015-09-01 16:54 EDT by Carlos O'Donell
Modified: 2015-09-07 07:25 EDT (History)
21 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2015-09-07 07:25:55 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 Carlos O'Donell 2015-09-01 16:54:17 EDT
fedpkg clone glibc
cd glibc
fedpkg mockbuild

Fails with:
~~~
ERROR: Command failed: 
 # /usr/bin/dnf builddep --installroot /var/lib/mock/fedora-rawhide-x86_64/root/ --releasever 24 /var/lib/mock/fedora-rawhide-x86_64/root//builddir/build/SRPMS/glibc-2.22.90-5.fc24.src.rpm --setopt=tsflags=nocontexts
Using metadata from Tue Sep  1 16:18:46 2015 (0:34:41 hours old)
No matching package to install: '/bin/awk'
No matching package to install: '/bin/kill'
No matching package to install: '/bin/ps'
Package binutils-2.25.1-4.fc24.x86_64 is already installed, skipping.
Package elfutils-0.163-3.fc24.x86_64 is already installed, skipping.
Package gcc-5.1.1-4.fc23.x86_64 is already installed, skipping.
Package gcc-5.1.1-4.fc23.x86_64 is already installed, skipping.
Package gcc-c++-5.1.1-4.fc23.x86_64 is already installed, skipping.
Package kernel-headers-4.2.0-1.fc24.x86_64 is already installed, skipping.
Package rpm-4.12.90-7.fc24.x86_64 is already installed, skipping.
Package sed-4.2.2-11.fc23.x86_64 is already installed, skipping.
Package systemd-225-1.fc24.x86_64 is already installed, skipping.
Error: Not all dependencies satisfied
~~~

This could be a problem with dnf vs. yum, but this used to work just fine and continues to work on the koji builders.
Comment 1 Carlos O'Donell 2015-09-01 16:55:17 EDT
While it's easy enough to add BuildRequires on gawk, util-linux, and procps-ng, that's not entirely the point of submitting this bug. We want this transition to be as smooth as possible and this appears to be a wrinkle we could fix.
Comment 2 Miroslav Suchý 2015-09-02 06:31:29 EDT
This is bug in builddep plugin. Moving to DNF team.
I reproduced it with
  dnf-plugins-core-0.1.10-1.fc22.noarch
Comment 3 Miroslav Suchý 2015-09-02 06:33:48 EDT
Reproducer is to put in spec file
  BuildRequires: /bin/ps

# dnf builddep foo.spec
No matching package to install: '/bin/ps'

While
# rpm -q --provides procps-ng
/bin/ps
...
Comment 4 Radek Holy 2015-09-02 12:15:07 EDT
The root cause might be potentially the same as in the bug 1223478.
Comment 5 Michael Mráka 2015-09-03 04:57:44 EDT
This is in fact caused by https://fedoraproject.org/wiki/Features/UsrMove.

Packages gawk, util-linux, and procps-ng provide files /usr/bin/awk, /usr/bin/kill and /usr/bin/ps. Dnf has no way to guess that there might be a link /bin -> usr/bin so /bin/* Requires can be fulfilled by those /usr/bin/xxx files.

The correct solution here is to fix BuildRequires in glibc spec to
/usr/bin/awk /usr/bin/kill /usr/bin/ps.
Comment 6 Radek Holy 2015-09-03 05:06:27 EDT
No, procps-ng provides a virtual provide "/bin/ps". This is allowed by Fedora packaging guidelines. DNF does not need to guess anything here...
Comment 7 Miroslav Suchý 2015-09-03 05:44:58 EDT
Moving back per #6 and bottom of #3.
Comment 8 Miroslav Suchý 2015-09-03 05:45:44 EDT
procps-ng.spec contains:
Provides: /bin/ps
Comment 9 Honza Silhan 2015-09-07 07:25:55 EDT
It's fixed along with bug 1242946 in dnf-1.1.1

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