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 596085 - stap-prep suggest wrong kernel-debuginfo-common package to install
Summary: stap-prep suggest wrong kernel-debuginfo-common package to install
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: systemtap
Version: 6.0
Hardware: All
OS: Linux
low
medium
Target Milestone: rc
: ---
Assignee: Frank Ch. Eigler
QA Contact: Petr Muller
URL:
Whiteboard:
Depends On: 596083
Blocks:
TreeView+ depends on / blocked
 
Reported: 2010-05-26 09:45 UTC by Mark Wielaard
Modified: 2016-09-20 02:06 UTC (History)
9 users (show)

Fixed In Version: systemtap-1.2-5.el6
Doc Type: Bug Fix
Doc Text:
Clone Of: 596083
Environment:
Last Closed: 2010-11-10 21:44:27 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Mark Wielaard 2010-05-26 09:45:55 UTC
Same issue as reported against fedora 13 i686, for rhel 6 x86_64 the actual package versions is systemtap-1.2-2.el6.x86_64. stap-prep will suggest kernel-debuginfo-common-2.6.32-28.el6.x86_64 but should suggest/install kernel-debuginfo-common-x86_64-2.6.32-28.el6.x86_64.

+++ This bug was initially created as a clone of Bug #596083 +++

Description of problem:

Wrong kernel-debuginfo-common package suggested by stap-prep.

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

systemtap-1.2-1.fc13.i686

How reproducible:

Always

Steps to Reproduce:
1. Run $ stap-prep
2. See it suggest kernel-debuginfo-common-2.6.33.4-95.fc13.i686
3. Don't find that package (it is missing the -i686 substring in the name)
  
Actual results:

kernel-debuginfo-common-2.6.33.4-95.fc13.i686

Expected results:

kernel-debuginfo-common-i686-2.6.33.4-95.fc13.i686

Additional info:

This is a minor issue, since the main kernel-debuginfo package does pull in the right -common package, but it is confusing since it looks like you won't be able to satisfy the requirements (and stap-prep keeps saying you are missing a package).

Comment 2 Mark Wielaard 2010-05-26 10:30:15 UTC
Upstream git bugfix:

commit 928c149cfb5fef2dbdfc1c9d071e949dc67e8685
Author: Mark Wielaard <mjw>
Date:   Wed May 26 12:24:21 2010 +0200

    rhbz #596083 Make stap-prep resolve kernel-debuginfo-common package name.
    
    The kernel-debuginfo-common package name is slightly different on different
    distros. But the correct name is always required by the kernel-debuginfo
    package. So don't add it to the CANDIDATES list, but let the yumdowloader
    --resolve it. Tested on f13, rhel5 and rhel6 beta.
    
    * stap-prep: Remove kernel-debuginfo-common from CANDIDATES, add --resolve
      to yumdownloader.

diff --git a/stap-prep b/stap-prep
index 3c6bf78..7f8099f 100755
--- a/stap-prep
+++ b/stap-prep
@@ -18,8 +18,7 @@ KERN_ARCH=`uname -m`
 KERN_REV=`echo $UNAME | sed s/.$KERN_ARCH//` # strip arch from uname
 CANDIDATES="$KERNEL-$KERN_REV.$KERN_ARCH \
   $KERNEL-devel-$KERN_REV.$KERN_ARCH \
-  $KERNEL-debuginfo-$KERN_REV.$KERN_ARCH \
-  kernel-debuginfo-common-$KERN_REV.$KERN_ARCH"
+  $KERNEL-debuginfo-$KERN_REV.$KERN_ARCH"
 NEEDED=`rpm --qf "%{name}-%{version}-%{release}.%{arch}\n" \
     -q $CANDIDATES | grep "is not installed" | awk '{print $2}'`
 if [ "$NEEDED" != "" ]; then
@@ -30,7 +29,8 @@ if [ "$NEEDED" != "" ]; then
             echo "Need to first install yum-utils for yumdownloader"
             yum install -y yum-utils
         fi
-        yumdownloader --enablerepo="*debuginfo*" $NEEDED --destdir=$DIR
+        yumdownloader --enablerepo="*debuginfo*" $NEEDED --destdir=$DIR \
+                      --resolve
         check_error $? "problem downloading rpm(s) $NEEDED"
         rpm --force -ivh $DIR/*.rpm
         check_error $? "problem installing rpm(s) $NEEDED"

Comment 3 Mark Wielaard 2010-06-01 09:45:19 UTC
An followup patch makes sure that also different variants (pea, debug, etc) are handled correctly on rhel6 kernels:

commit 6f6a731f169d44e0a45d46224de34429cf3252ff
Author: Mark Wielaard <mjw>
Date:   Tue Jun 1 11:37:59 2010 +0200

    rhbz #596083 Account for dot and dotless kernel variant in stap-prep.
    
    uname -r can produce different kinds of output:
    2.6.32-30.el6.x86_64 (no variant, but including ".arch")
    2.6.18-194.3.1.el5debug ("variant", without dot, no arch)
    2.6.33.4-95.fc13.i686.PAE (".arch.variant", two dots)
    We didn't handle the dot before the variant used in newer distros.
    
    * stap-prep: Remove either ".variant" or "variant" from the end of release
      uname string.

diff --git a/stap-prep b/stap-prep
index 7f8099f..2ee40ea 100755
--- a/stap-prep
+++ b/stap-prep
@@ -1,6 +1,10 @@
 #! /bin/bash
 check_error() { if test $1 != 0; then echo $2; exit $1; fi }
 
+# uname -r can produce different kinds of output:
+# 2.6.32-30.el6.x86_64 (no variant, but including ".arch")
+# 2.6.18-194.3.1.el5debug ("variant", without dot, no arch)
+# 2.6.33.4-95.fc13.i686.PAE (".arch.variant", two dots)
 if [ "$#" -lt 1 ]; then
     UNAME=`uname -r` # determine the kernel running on the machine
 else
@@ -9,7 +13,8 @@ fi
 UNAME=`echo $UNAME | sed "s/ //"` #strip out any whitespace
 KERNEL="kernel"
 for VARIANT in debug kdump PAE xen; do
-  TMP=`echo $UNAME | sed s/$VARIANT//`
+  # strip out ".variant" or else "variant" at end.
+  TMP=`echo $UNAME | sed s/\\\\.$VARIANT\$// | sed s/$VARIANT\$//`
   if [ "$TMP" != "$UNAME" ]; then
       UNAME=$TMP; KERNEL="kernel-$VARIANT"
   fi

Comment 4 Mark Wielaard 2010-06-03 12:40:02 UTC
So to solve this problem, the following two commits (mentioned in comment #2 and comment #2) need to be backported from upstream, or stap-prep will not work correctly against rhel6 kernels:

commit 928c149cfb5fef2dbdfc1c9d071e949dc67e8685
commit 6f6a731f169d44e0a45d46224de34429cf3252ff

Together they solve the "oops, kernel-debuginfo-common package was renamed" and the "oops, kernel variant now has a dash" issues.

Comment 5 RHEL Program Management 2010-06-03 12:43:20 UTC
This request was evaluated by Red Hat Product Management for inclusion in a Red
Hat Enterprise Linux major release.  Product Management has requested further
review of this request by Red Hat Engineering, for potential inclusion in a Red
Hat Enterprise Linux Major release.  This request is not yet committed for
inclusion.

Comment 8 releng-rhel@redhat.com 2010-11-10 21:44:27 UTC
Red Hat Enterprise Linux 6.0 is now available and should resolve
the problem described in this bug report. This report is therefore being closed
with a resolution of CURRENTRELEASE. You may reopen this bug report if the
solution does not work for you.


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