Bug 1498894

Summary: Non-bootstraped build can miss cmake() Provides
Product: [Fedora] Fedora Reporter: Petr Pisar <ppisar>
Component: cmakeAssignee: Björn Esser (besser82) <besser82>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: rawhideCC: besser82, fat.lobyte9, helio, jreznik, orion, pmatilai, ppisar, rdieter, walter.pete
Target Milestone: ---Keywords: Reopened
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: cmake-3.10.1-4.fc27 cmake-3.10.1-4.fc26 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2018-01-03 21:19:06 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:
Attachments:
Description Flags
Proposed fix none

Description Petr Pisar 2017-10-05 13:40:42 UTC
Created attachment 1334841 [details]
Proposed fix

When building non-boostrapped cmake but with disabled some features,
cmake-data won't get into build root and cmake(FindPkg) and
cmake(UsePkg) Provides will be missing from just-built cmake-data
package.

This bug is not visible with full-fledged build because cmake-data with
the RPM dependency generator is installed transitively.

A simple fix that ensures cmake-data in the build root is attached.

If you have no objections, I will apply it to the master dist-git branch.

Comment 1 Petr Pisar 2017-10-09 09:40:02 UTC
Fixed in commit 8983c63ac85834e612a919e05418f3d97cc6ce61.

Comment 2 Alexander Korsunsky 2017-12-20 23:51:26 UTC
Hi, doesn't your fix break mock builds? 

I'm getting `Error: No Package found for cmake-data` when trying to build from source for EPEL 7 because there is no such package there.

Reverting 8983c63ac85834e612a919e05418f3d97cc6ce61 makes it build just fine.

What's the logic in depending on cmake-data when cmake-data is being created? That's a chicken and egg problem ;)

Comment 3 Petr Pisar 2017-12-21 09:55:55 UTC
Fedora's cmake package cannot be built without bootstrapping because of circular dependencies. This was true even before the 8983c63ac85834e612a919e05418f3d97cc6ce61 commit.

First you need to build it and its dependencies with enabled bootstrap (define %_with_bootstrap 1 or build with --with bootstrap option). Then you can disable the bootstrap and rebuild cmake again. When doing the second build, the cmake packages made in the bootstrap phase must be available in the build root.

This way all dependencies are satisfied. Including the cmake-data.

Comment 4 Björn Esser (besser82) 2017-12-21 11:18:55 UTC
I think, it would be a cleaner way to split out the rpm macros from -data into an rpm-macros subpackage (without any further dependencies) and get that pulled into the buildroot by redhat-rpm-macros instead…

I'll do that during today.

Comment 5 Petr Pisar 2017-12-21 16:05:45 UTC
Yes, that's a cleaner approach.

Comment 6 Fedora Update System 2017-12-21 17:44:33 UTC
redhat-rpm-config-67-2.fc27 cmake-3.10.1-3.fc27 has been submitted as an update to Fedora 27. https://bodhi.fedoraproject.org/updates/FEDORA-2017-3935cb7492

Comment 7 Fedora Update System 2017-12-21 17:45:50 UTC
cmake-3.10.1-3.fc26 redhat-rpm-config-63-2.fc26 has been submitted as an update to Fedora 26. https://bodhi.fedoraproject.org/updates/FEDORA-2017-5e144d356e

Comment 8 Fedora Update System 2017-12-21 17:46:01 UTC
cmake-3.10.1-3.fc26 redhat-rpm-config-63-2.fc26 has been submitted as an update to Fedora 26. https://bodhi.fedoraproject.org/updates/FEDORA-2017-5e144d356e

Comment 9 Fedora Update System 2017-12-22 12:42:52 UTC
cmake-3.10.1-4.fc27, redhat-rpm-config-67-2.fc27 has been pushed to the Fedora 27 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2017-3935cb7492

Comment 10 Fedora Update System 2017-12-22 13:15:48 UTC
cmake-3.10.1-4.fc26, redhat-rpm-config-63-2.fc26 has been pushed to the Fedora 26 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2017-5e144d356e

Comment 11 Fedora Update System 2017-12-24 21:18:19 UTC
cmake-3.10.1-4.fc27, redhat-rpm-config-67-2.fc27 has been pushed to the Fedora 27 stable repository. If problems still persist, please make note of it in this bug report.

Comment 12 Panu Matilainen 2018-01-03 10:39:26 UTC
Reopening: the applied solution drags python3 in as a dependency of redhat-rpm-config which bloats buildroots unnecessarily and also causes bootstrap images. Please revert and find another way.

Comment 13 Fedora Update System 2018-01-03 21:19:06 UTC
cmake-3.10.1-4.fc26, redhat-rpm-config-63-2.fc26 has been pushed to the Fedora 26 stable repository. If problems still persist, please make note of it in this bug report.