Bug 1259054

Summary: builddep plugin fails to recognize virtual file dependencies
Product: [Fedora] Fedora Reporter: Carlos O'Donell <codonell>
Component: dnf-plugins-coreAssignee: Packaging Maintenance Team <packaging-team-maint>
Status: CLOSED CURRENTRELEASE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: low Docs Contact:
Priority: high    
Version: 22CC: arjun.is, codonell, jakub, jdisnard, jsilhan, law, mebrown, mfabian, mluscon, mmraka, msimacek, msuchy, packaging-team-maint, pfrankli, pnemade, praiskup, rholy, spoyarek, tim.lauridsen, vmukhame, williams
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2015-09-07 11:25:55 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:

Description Carlos O'Donell 2015-09-01 20:54:17 UTC
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 20:55:17 UTC
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 10:31:29 UTC
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 10:33:48 UTC
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 16:15:07 UTC
The root cause might be potentially the same as in the bug 1223478.

Comment 5 Michael Mráka 2015-09-03 08:57:44 UTC
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 09:06:27 UTC
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 09:44:58 UTC
Moving back per #6 and bottom of #3.

Comment 8 Miroslav Suchý 2015-09-03 09:45:44 UTC
procps-ng.spec contains:
Provides: /bin/ps

Comment 9 Honza Silhan 2015-09-07 11:25:55 UTC
It's fixed along with bug 1242946 in dnf-1.1.1