Bug 1054820

Summary: Automatically generate %{?scl:Requires: %scl_runtime}
Product: Red Hat Enterprise Linux 6 Reporter: Jan Zeleny <jzeleny>
Component: scl-utilsAssignee: Jan Zeleny <jzeleny>
Status: CLOSED WONTFIX QA Contact: Lukáš Zachar <lzachar>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 6.5CC: bgollahe, bkabrda, drieden, fedora, isenfeld, jsvarova, jzeleny, vondruch
Target Milestone: rcKeywords: ZStream
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: scl-utils-20120927-12.el6 Doc Type: Bug Fix
Doc Text:
Every collection package has to depend on a metapackage-runtime package. It is typically achieved by using the "%{?scl:Requires: %scl_runtime}" snippet. With this update, this dependency is generated automatically using the RPM generator. As a result, maintainers no longer have to store this snippet in their spec files.
Story Points: ---
Clone Of: 1054711 Environment:
Last Closed: 2014-09-26 12:42:10 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:
Bug Depends On: 1054711    
Bug Blocks: 1052414, 1054824, 1069109, 1075058, 1075066    

Description Jan Zeleny 2014-01-17 14:25:12 UTC
+++ This bug was initially created as a clone of Bug #1054711 +++

Every collection package has to depend on metapackage-runtime. It is typically achieved by %{?scl:Requires: %scl_runtime} snippet. But it would make more sense to generate this dependency automatically using RPM generator.

--- Additional comment from Jan Zeleny on 2014-01-17 12:32:41 CET ---

Makes sense. Scheduled for the next release considering no problems will be encountered along the way.

--- Additional comment from Vít Ondruch on 2014-01-17 13:32:00 CET ---



--- Additional comment from Vít Ondruch on 2014-01-17 13:33:44 CET ---

I put my own version of this generator into ror40 metapackage and it seems it works as expected.

--- Additional comment from Jan Zeleny on 2014-01-17 13:50:26 CET ---

Well, yeah. But the assumption here is that every collection has the -runtime package. That may be true at the moment but I don't think it's documented as a hard requirement, is it?

--- Additional comment from Vít Ondruch on 2014-01-17 14:03:37 CET ---

It is documented I would say:

http://docs.fedoraproject.org/en-US/Fedora_Contributor_Documentation/1/html/Software_Collections_Guide/sect-Package_Layout.html

But you are right that more universal approach would be to require package which specifies %scl_files in its %files section. Not sure if that would be worth of the effort.

--- Additional comment from Vít Ondruch on 2014-01-17 15:03:11 CET ---

Actually there are more specific references to -runtime in documentation:

https://access.redhat.com/site/documentation/en-US/Red_Hat_Developer_Toolset/2/html/Software_Collections_Guide/sect-Converting_a_Conventional_Spec_File.html

The documentation should be updated as well, when this will get implemented.

Comment 2 Jan Zeleny 2014-01-17 15:23:57 UTC
Created a documentation bug 1054824 to track this. Once this bug is fixed, the documentation should be fixed as well.

Comment 3 Vít Ondruch 2014-02-24 15:16:54 UTC
Please note, that for RHEL6, there will be necessary different solution then the generator proposed in bug #1054711, since RHEL6 has older RPM.

Comment 4 Jan Zeleny 2014-02-28 12:48:57 UTC
Note mostly to myself: using most of the commit 029120da28ed39ee94c09864baa2ddecb95593c4 will do the trick.

Comment 5 Jan Zeleny 2014-03-11 12:14:52 UTC
Please note that fixing this bug might require some changes in collection spec files to enable the functionality, see the referenced bug 1075058 for details.

Comment 7 Jan Zeleny 2014-03-28 14:55:23 UTC
As the proposed update broke some collections, we have to temporarily revert the patch. Looking for alternative solutions ...

Comment 8 Vít Ondruch 2014-03-31 08:01:28 UTC
(In reply to Jan Zeleny from comment #7)
> broke some collections

Could you be please more specific?

Comment 9 Jan Zeleny 2014-03-31 08:11:07 UTC
The only way how to add this requirement automatically to all packages is through dependency generators. To achieve that we had to turn off the internal dependency generators which are apparently used by quite a few packages, for example in mysql collections. Turning them off broke those collections.

Comment 12 Remi Collet 2014-09-08 06:59:19 UTC
Current version in Fedora add the Requires: <scl>-runtime.

I think, this should be arched
Requires: <scl>-runtime%{?_isa}

And perhaps even vendor aware
Requires: <scl>-runtime(%{?scl_vendor})%{?_isa}

Or (as scl_vendor didn't exist in RHEL)
Requires: <scl>-runtime(%{?_scl_prefix})%{?_isa}

Comment 13 Jan Zeleny 2014-09-08 11:02:56 UTC
(In reply to Remi Collet from comment #12)
> Current version in Fedora add the Requires: <scl>-runtime.
> 
> I think, this should be arched
> Requires: <scl>-runtime%{?_isa}
> 
> And perhaps even vendor aware
> Requires: <scl>-runtime(%{?scl_vendor})%{?_isa}
> 
> Or (as scl_vendor didn't exist in RHEL)
> Requires: <scl>-runtime(%{?_scl_prefix})%{?_isa}

Unfortunately, your request is irrelevant here. As per the latest consensus, the feature will be reverted in RHEL6 before it goes into production, as it's impossible to implement it without some compatibility implications which are unacceptable to various people.

If you are ok with us taking a look at this for future releases in Fedora, feel free to file a separate RFE. If you do, please elaborate on the reason behind your request.

Comment 14 Jan Zeleny 2014-09-26 12:42:10 UTC
As per maintainers' demand, the related patches are going to be reverted and the bug will not be addressed, as it would require changes in spec files of some collections.