Bug 1560291 - dnf builddep chokes on Fedora SRPMs
Summary: dnf builddep chokes on Fedora SRPMs
Keywords:
Status: CLOSED DUPLICATE of bug 1547897
Alias: None
Product: Fedora
Classification: Fedora
Component: dnf
Version: 27
Hardware: Unspecified
OS: Unspecified
unspecified
low
Target Milestone: ---
Assignee: rpm-software-management
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2018-03-25 17:41 UTC by Pawel Veselov
Modified: 2018-03-28 09:42 UTC (History)
16 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2018-03-28 09:42:37 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Pawel Veselov 2018-03-25 17:41:47 UTC
Description of problem:
Running dnf builddep on at least one of Fedora own packages generates an error.

Version-Release number of selected component (if applicable): dnf-plugins-core-2.1.5-4.fc27


How reproducible:
Run dnf builddep on spec file from systemd-234-10.git5f8984e.fc27

Steps to Reproduce:
1. dnf download --source systemd-udev
2. rpm -U systemd-*.src.rpm
3. dnf builddep rpmbuild/SPECS/systemd.spec

Actual results:
Failed to open: 'rpmbuild/SPECS/systemd.spec', not a valid spec file: can't parse specfile

Error: Some packages could not be found.



Expected results:
Dependencies are installed, or indication which dependencies are missing are reported.

Additional info:

Comment 1 Zbigniew Jędrzejewski-Szmek 2018-03-26 13:53:03 UTC
This issue is caused by the defaults that rpm has. It will spread the files in the source rpm in various directories over the file system tree (~/rpmbuild/SPECS, ~/rpmbuild/SOURCES, ~/rpmbuild/PATCHES ?), instead of just putting them in cwd. _Nobody_ does stuff like that anymore, since it's incompatible with version control, causes naming conflicts between unrelated projects, and of course, makes it unnecessarily hard to find the files that are part of the srpm.

Most likely the issue is that rpm is not able find the systemd.triggers file that is %included in the spec file. You can play around with "rpm --define '_sourcedir .' --define '_specdir .'" when extracting the rpm.

I'll reassign this to rpm, maybe they can provide some additional advice (or finally change the defaults to something sane ;)).

Comment 2 Panu Matilainen 2018-03-28 09:42:37 UTC
Rpm ancient defaults are one thing, but changing them is not trivial because tonnes of documentation stops working, and certainly we wont be able to change them in any existing Fedora release. Locally overriding in /etc/rpm/ is probably the best way to deal with that right now, if you are prepared to drop the old rpmbuild/ directory style (most are :)

That aside, the problem here is the error message which fails to tell you what's actually wrong:

[pmatilai@sopuli ~]$ rpm -i systemd-234-10.git5f8984e.fc27.src.rpm 
[pmatilai@sopuli ~]$ rpmspec -q --buildrequires rpmbuild/SPECS/systemd.spec | wc -l
42
[root@sopuli pmatilai]# rpmspec -q --buildrequires rpmbuild/SPECS/systemd.spec
error: Unable to open /root/rpmbuild/SOURCES/triggers.systemd: No such file or directory
error: query of specfile rpmbuild/SPECS/systemd.spec failed, can't parse

So I'm considering this a dupe of bug 1547897.

*** This bug has been marked as a duplicate of bug 1547897 ***


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