Bug 1420754

Summary: Drop kernel-devel virtual provide
Product: [Fedora] Fedora Reporter: Nicolas Chauvet (kwizart) <kwizart>
Component: kernelAssignee: Kernel Maintainer List <kernel-maint>
Status: CLOSED CURRENTRELEASE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: rawhideCC: bugzilla, cz172638, fedora, gansalmon, hdegoede, ichavero, itamar, jonathan, kernel-maint, madhu.chinakonda, mchehab, robatino, samuel-rhbugs
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-03-24 22:44:19 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: 1420864, 1421105    
Bug Blocks: 1228897    
Attachments:
Description Flags
drop kernel-devel virtual provides none

Description Nicolas Chauvet (kwizart) 2017-02-09 13:33:27 UTC
Description of problem:
This clash with real kernel-devel package as it's not possible to prefer kernel-devel over kernel-debug-devel
    
The following packages are affected by this in fedora:
dkms
ipset-devel
systemtap-devel
    

Version-Release number of selected component (if applicable):
Current kernel packages in all branches

How reproducible:
always:
dnf install dkms on a new system 

Actual results:
it will install kernel-debug-devel

Expected results:
it should install of the kernel-devel for the current right variant or at least give a possibility to specify a


Additional info:


Packages requesting the appropriate kernel-devel should move to use:
Requires: kernel-devel-uname-r
%if 0%{?fedora:
Suggests: kernel-devel
}
    
Or when boolean dependencies will be allowed
Requires: kernel-devel-uname-r
Requires: (kernel-devel if kernel)
%ifarch i686
Requires: (kernel-PAE-devel if kernel-PAE)
%endif
%ifarch %{arm}
Requires: (kernel-lpae-devel if kernel-lpae)
%endif
...

Right now it doesn't work because any kernel*-devel has the kernel-devel provides, so RPM doesn't select it as a statistically better option.

Comment 1 Nicolas Chauvet (kwizart) 2017-02-09 13:34:32 UTC
Created attachment 1248813 [details]
drop kernel-devel virtual provides

Comment 2 Thorsten Leemhuis 2017-02-14 12:26:42 UTC
I'm have a gut feeling this is the wrong solution, as those provides were added for a reason. But I can't remember what it was; maybe it were archs that have no standard-kernel? Can't remember :-/ Maybe jwb knows, but I think they got added in the early davej days.

FWIW, I think the cleaner solution would be: Give all kernel variants a name to properly differentiate then (maybe call the standard kernel "generic", like Ubuntu does). Yes, that has downsides and risks, too, but it makes it more obvious what's happening. Because the root of the problems will stay if the kernel-devel provides is dropped: if you for example run the PAE kernel on and ix86 machine you still won't get the right kernel-devel package if you install "kernel-devel" (you need kernel-PAE-devel in that case).

Comment 3 Nicolas Chauvet (kwizart) 2017-02-14 14:17:35 UTC
I've tested on el7. There "yum install kernel-devel" install the right kernel-devel (same for kernel-debug-devel).

There is an additional tool (ksc) using kernel-devel provides.
But I don't think there is anything to change in el7. (unless one wants to run a fedora kernel on top of centos userspace, which might be done by centos armhfp team)...

Comment 4 Nicolas Chauvet (kwizart) 2017-02-14 14:36:12 UTC
(In reply to Thorsten Leemhuis from comment #2)
> I'm have a gut feeling this is the wrong solution, as those provides were
> added for a reason. 
Well, as the above list shows, there is an extremely limited number of users for kernel-devel provides anyway. (not to mention kernel*-devel-%{_target_cpu} ).

Anyway looking at el7 kernel, it the kernel-debug-devel varriant doesn't have the kernel-devel provides, so it seems like the bug was fixed in el7 earlier than in fedora.

Comment 5 Nicolas Chauvet (kwizart) 2017-02-14 14:43:23 UTC
(In reply to Thorsten Leemhuis from comment #2)
...
> the kernel-devel provides is dropped: if you for example run the PAE kernel
> on and ix86 machine you still won't get the right kernel-devel package if
> you install "kernel-devel" (you need kernel-PAE-devel in that case).
My impression is that this cannot be fixed until boolean deps are allowed.
A possible workaround would be to use:

Requires: kernel-devel-uname-r
%ifarch i686
Suggests: kernel-PAE-devel
%else
Suggests: kernel-devel
%endif
But in the amhfp case, the kernel-lpae isn't the more common. (not to mention that packages using kernel-devel are noarch, they would need to be turned into an arched package to allow this notation, which is possible).