Bug 1703264
Summary: | systemtap loose dependency results in kernel-debug-devel install although kernel-debug not installed | ||
---|---|---|---|
Product: | Red Hat Enterprise Linux 8 | Reporter: | Curtis Taylor <cutaylor> |
Component: | systemtap | Assignee: | Frank Ch. Eigler <fche> |
systemtap sub component: | system-version | QA Contact: | Martin Cermak <mcermak> |
Status: | CLOSED ERRATA | Docs Contact: | |
Severity: | low | ||
Priority: | low | CC: | dsmith, fche, lberk, mcermak, mjw, pkratoch |
Version: | 8.0 | Keywords: | Triaged |
Target Milestone: | rc | Flags: | pm-rhel:
mirror+
|
Target Release: | 8.0 | ||
Hardware: | ppc64le | ||
OS: | Linux | ||
Whiteboard: | |||
Fixed In Version: | systemtap-4.1-1.el8 | Doc Type: | No Doc Update |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2019-11-05 20:55:09 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: |
Description
Curtis Taylor
2019-04-25 22:48:47 UTC
Expected results was supposed to be: Only kernel-devel-`uname -r` is installed, not kernel-debug-devel if kernel-debug isn't installed. Not sure what if anything systemtap's .spec file could do differently here. It's good news that at least kernel-devel is there. dnf adding kernel-debug-devel is at worst a bit of wasted space. Shall we redirect this to the dnf team for suggestions? Yes, it makes sense to ask the dnf team what is needed to make the loose dependency only install kernel-debug-devel when systemtap is installed and kernel-debug is installed, but not include kernel-debug-devel when kernel-debug is not installed. Hi, if I understand this correctly, you want the systemtap to require kernel-debug-devel only if kernel-debug is installed. You can achieve this by adding the following dependency into to systemtap .spec file: Requires: (kernel-debug-devel if kernel-debug) The boolean dependencies are described for example here: https://rpm.org/user_doc/boolean_dependencies.html Is this solution sufficient for you? That looks like just the thing, excellent. Is there some rpm macro-conditional magic to detect whether a sufficiently fresh rpm version is being used? We'd like to have a single spec file for a range of distro versions, so would have to disable boolean stuff for the older ones. upstream commit 8bb72aa68b70 So, I searched for some macro-conditional magic, but apparently, it's not currently possible to make condition based on a package version. However, a common practice is to make condition based on the system version. You can add something like: %if 0%{?rhel} >= 8 BuildRequires: rpm >= 4.13.0 %endif %if 0%{?rhel} >= 8 Requires: (kernel-debug-devel if kernel-debug) %else Requires: kernel-debug-devel %endif But I didn't try this out, so please check if it works well. Also, similar condition can be added for Fedora. Verified with systemtap-4.1-6.el8. Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://access.redhat.com/errata/RHEA-2019:3366 |