Bug 1703264 - systemtap loose dependency results in kernel-debug-devel install although kernel-debug not installed
Summary: systemtap loose dependency results in kernel-debug-devel install although ker...
Alias: None
Product: Red Hat Enterprise Linux 8
Classification: Red Hat
Component: systemtap
Version: 8.0
Hardware: ppc64le
OS: Linux
Target Milestone: rc
: 8.0
Assignee: Frank Ch. Eigler
QA Contact: Martin Cermak
Depends On:
TreeView+ depends on / blocked
Reported: 2019-04-25 22:48 UTC by Curtis Taylor
Modified: 2019-11-05 20:55 UTC (History)
6 users (show)

Fixed In Version: systemtap-4.1-1.el8
Doc Type: No Doc Update
Doc Text:
Clone Of:
Last Closed: 2019-11-05 20:55:09 UTC
Type: Bug
Target Upstream Version:

Attachments (Terms of Use)

System ID Priority Status Summary Last Updated
Red Hat Product Errata RHEA-2019:3366 None None None 2019-11-05 20:55:17 UTC

Description Curtis Taylor 2019-04-25 22:48:47 UTC
Description of problem:
Installing systemtap results in kernel-debug-devel being installed unexpectedly

Version-Release number of selected component (if applicable):

How reproducible:
Discovered during RHEL dress rehersal on ppc64le

Steps to Reproduce:
1. yum install systemtap

Actual results:
  systemtap-4.0-7.el8.ppc64le             kernel-debug-devel-4.18.0-80.el8.ppc64le    kernel-devel-4.18.0-80.el8.ppc64le    systemtap-runtime-4.0-7.el8.ppc64le    systemtap-client-4.0-7.el8.ppc64le    
  gcc-8.2.1-3.5.el8.ppc64le               systemtap-devel-4.0-7.el8.ppc64le           cpp-8.2.1-3.5.el8.ppc64le             isl-0.16.1-6.el8.ppc64le               libatomic-8.2.1-3.5.el8.ppc64le       
  kernel-headers-4.18.0-80.el8.ppc64le    libasan-8.2.1-3.5.el8.ppc64le               make-1:4.2.1-9.el8.ppc64le            glibc-headers-2.28-42.el8.ppc64le      libxcrypt-devel-4.1.1-4.el8.ppc64le   
  glibc-devel-2.28-42.el8.ppc64le         libubsan-8.2.1-3.5.el8.ppc64le             

Expected results:
Only, kernel-debug-`uname -r` is installed and not kernel-debug-devel if kernel-debug isn't installed.

Additional info:

Comment 1 Curtis Taylor 2019-04-25 22:51:14 UTC
Expected results was supposed to be:

Only kernel-devel-`uname -r` is installed, not kernel-debug-devel if kernel-debug isn't installed.

Comment 2 Frank Ch. Eigler 2019-04-26 13:49:22 UTC
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?

Comment 3 Curtis Taylor 2019-04-26 16:06:33 UTC
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.

Comment 4 Pavla Kratochvilova 2019-04-29 13:45:34 UTC
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?

Comment 5 Frank Ch. Eigler 2019-04-29 16:03:20 UTC
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.

Comment 6 Frank Ch. Eigler 2019-04-29 16:43:32 UTC
upstream commit 8bb72aa68b70

Comment 7 Pavla Kratochvilova 2019-05-02 07:39:48 UTC
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

%if 0%{?rhel} >= 8
Requires: (kernel-debug-devel if kernel-debug)
Requires: kernel-debug-devel

But I didn't try this out, so please check if it works well. Also, similar condition can be added for Fedora.

Comment 10 Martin Cermak 2019-08-27 13:53:06 UTC
Verified with systemtap-4.1-6.el8.

Comment 12 errata-xmlrpc 2019-11-05 20:55:09 UTC
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.


Note You need to log in before you can comment on or make changes to this bug.