RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
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...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 8
Classification: Red Hat
Component: systemtap
Version: 8.0
Hardware: ppc64le
OS: Linux
low
low
Target Milestone: rc
: 8.0
Assignee: Frank Ch. Eigler
QA Contact: Martin Cermak
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2019-04-25 22:48 UTC by Curtis Taylor
Modified: 2021-09-17 14:44 UTC (History)
6 users (show)

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


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHEA-2019:3366 0 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):
systemtap-4.0-8.el8.ppc64le

How reproducible:
Discovered during RHEL dress rehersal on ppc64le

Steps to Reproduce:
1. yum install systemtap

Actual results:
Installed:
  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
%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.

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.

https://access.redhat.com/errata/RHEA-2019:3366


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