Bug 149249
| Summary: | RFE: Way to depend on a specific kernel package (including arch) | ||
|---|---|---|---|
| Product: | [Fedora] Fedora | Reporter: | Ville Skyttä <scop> |
| Component: | kernel | Assignee: | Rik van Riel <riel> |
| Status: | CLOSED RAWHIDE | QA Contact: | |
| Severity: | medium | Docs Contact: | |
| Priority: | medium | ||
| Version: | rawhide | CC: | cfeist, davej, dwmw2, fedora, wtogami |
| Target Milestone: | --- | Keywords: | FutureFeature |
| Target Release: | --- | ||
| Hardware: | All | ||
| OS: | Linux | ||
| Whiteboard: | |||
| Fixed In Version: | Doc Type: | Enhancement | |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2005-05-28 08:29:57 UTC | Type: | --- |
| 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: | |||
| Bug Blocks: | 136450 | ||
One more alternative:
kernel-%{_target_cpu} = %{version}-%{release}
kernel-smp-%{_target_cpu} = %{version}-%{release}
This is analoguous with the kernel*-devel-%{_target_cpu} provisions in Rawhide's
kernel*-devel packages.
...one more for the road (my preferred one, I think):
kernel-%{_target_cpu} = <uname -r output>
That would be:
kernel-%{_target_cpu} = %{KVERREL}
Easy enough. I'll propose a patch today (and will probably commit it
today, too).
Thanks. But be sure to take the "variant" into account, like:
kernel-%{_target_cpu} = %{KVERREL}
kernel-%{_target_cpu} = %{KVERREL}smp
kernel-%{_target_cpu} = %{KVERREL}xen0
kernel-%{_target_cpu} = %{KVERREL}xenU
I now have:
Provides: kernel-%{_target_cpu} = %{rpmversion}-%{release}
Provides: kernel-smp-%{_target_cpu} = %{rpmversion}-%{release}
Provides: kernel-xen0-%{_target_cpu} = %{rpmversion}-%{release}
Provides: kernel-xenU-%{_target_cpu} = %{rpmversion}-%{release}
Chris, Ville, which do you prefer ?
OK, Chris prefers the variant proposed by Ville. I'll go with that... After all, you guys are my target audience ;) *edits spec file and proposes new patch* OK, the new patch was accepted. I just committed a change to rawhide cvs that
adds headers of this form:
Provides: kernel-%{_target_cpu} = %{rpmversion}-%{release}smp
The next rawhide kernel build should have them.
Everyone satisfied? close? This will work for my module packages, thanks Rik! |
Currently, there's no way to depend on a specific kernel package in a way that includes the kernel's arch. Such a dependency is needed in kernel module packages. Even N = V-R style dependencies (excluding the arch) cannot be made very robustly now: - Dependency on /boot/vmlinuz-$uname is not portable. - Dependency on "kernel = version-release" is not reliable due to the broad "Provides: kernel = version" provision (note: no release tag in it) in _all_ kernel packages, causing _any_ installed variant (SMP, etc) to satisfy the dependency on a specific "kernel = version-release", *and* for any release that has the required version. IOW, a kernel-smp-V-R package has "Provides: kernel = V", which satisfies for example "Requires: kernel = V-X" which is not desirable in this case (think UP kernel module packages). - Dependency on a dir below /lib/modules/$uname might be satisfied by a non-kernel package, eg. a "buggy" module package. Ditto (although less probable) for files below it. But this still doesn't include the arch. Suggested remedy: an additional provision, something like: Provides: kernel(abi) = <output of "uname -r" for that kernel>-%{_target_cpu} Using "uname -r" this way is consistent with most of the versioned things in the kernel package. Alternatively: Provides: kernel(abi) = %{version}-%{release}-%{_target_cpu} # UP kernel Provides: kernel-smp(abi) = %{version}-%{release}-%{_target_cpu} # SMP kernel # etc... That would work too, but I personally think it's not as easy to work with as "uname -r". Yes, generic arch-qualified dependencies in rpm would be a nifty feature that could help with this issue (assuming eg. the broad "kernel = V" provision in all kernel packages wouldn't interfere with it). It's not needed in very many packages outside of kernel and modules though, and the workarounds are trivial, so I guess such a RFE would be promptly closed as WONTFIX referring to these very workarounds.