Bug 1259054 - builddep plugin fails to recognize virtual file dependencies
Summary: builddep plugin fails to recognize virtual file dependencies
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Fedora
Classification: Fedora
Component: dnf-plugins-core
Version: 22
Hardware: x86_64
OS: Linux
high
low
Target Milestone: ---
Assignee: Packaging Maintenance Team
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-09-01 20:54 UTC by Carlos O'Donell
Modified: 2015-09-07 11:25 UTC (History)
21 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2015-09-07 11:25:55 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

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


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