public inbox for systemtap@sourceware.org
 help / color / mirror / Atom feed
* Simple script to grab and install the appropriate kernel RPMs
@ 2008-11-03 19:14 William Cohen
  2008-11-04  6:57 ` K.Prasad
  2008-11-04 15:44 ` David Smith
  0 siblings, 2 replies; 7+ messages in thread
From: William Cohen @ 2008-11-03 19:14 UTC (permalink / raw)
  To: SystemTAP

[-- Attachment #1: Type: text/plain, Size: 482 bytes --]

Hi All,

In an effort to make it a bit easier to install systemtap on RHEL machines, I 
have made a small script to figure out which RPMs to install based either on the 
running kernel (no arguments to script) or the output of "uname -r" as an 
argument to the script. This script is only designed to work on RHEL. I would 
like to comments on it. The plan is to include this in the Systemtap beginners 
guide to make it easier for people to machine setup to run systemtap.

-Will


[-- Attachment #2: stapprep.sh --]
[-- Type: application/x-sh, Size: 1050 bytes --]

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Simple script to grab and install the appropriate kernel RPMs
  2008-11-03 19:14 Simple script to grab and install the appropriate kernel RPMs William Cohen
@ 2008-11-04  6:57 ` K.Prasad
  2008-11-04 15:49   ` William Cohen
  2008-11-04 15:44 ` David Smith
  1 sibling, 1 reply; 7+ messages in thread
From: K.Prasad @ 2008-11-04  6:57 UTC (permalink / raw)
  To: William Cohen; +Cc: SystemTAP

On Mon, Nov 03, 2008 at 02:13:48PM -0500, William Cohen wrote:
> Hi All,
>
> In an effort to make it a bit easier to install systemtap on RHEL 
> machines, I have made a small script to figure out which RPMs to install 
> based either on the running kernel (no arguments to script) or the output 
> of "uname -r" as an argument to the script. This script is only designed 
> to work on RHEL. I would like to comments on it. The plan is to include 
> this in the Systemtap beginners guide to make it easier for people to 
> machine setup to run systemtap.
>

Just thinking if the script mitigates the problem seen with PAE and smp
versions of the kernel, wherein uname -r would contain the string PAE
and smp, and the kernel package's name isn't a simple 'kernel-debuginfo'
but a 'kernel-PAE-debuginfo'.

Thanks,
K.Prasad

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Simple script to grab and install the appropriate kernel RPMs
  2008-11-03 19:14 Simple script to grab and install the appropriate kernel RPMs William Cohen
  2008-11-04  6:57 ` K.Prasad
@ 2008-11-04 15:44 ` David Smith
  2008-11-04 15:58   ` William Cohen
  1 sibling, 1 reply; 7+ messages in thread
From: David Smith @ 2008-11-04 15:44 UTC (permalink / raw)
  To: William Cohen; +Cc: SystemTAP

[-- Attachment #1: Type: text/plain, Size: 878 bytes --]

William Cohen wrote:
> Hi All,
> 
> In an effort to make it a bit easier to install systemtap on RHEL
> machines, I have made a small script to figure out which RPMs to install
> based either on the running kernel (no arguments to script) or the
> output of "uname -r" as an argument to the script. This script is only
> designed to work on RHEL. I would like to comments on it. The plan is to
> include this in the Systemtap beginners guide to make it easier for
> people to machine setup to run systemtap.

Here's the script I've used for awhile now (as you'll see since it
supports releases back to FC5).  It isn't much different than your
script, except it also supports Fedora.  Note that it currently doesn't
handle PAE kernels, but it could be made to handle that.

-- 
David Smith
dsmith@redhat.com
Red Hat
http://www.redhat.com
256.217.0141 (direct)
256.837.0057 (fax)

[-- Attachment #2: yum_kdebug.sh --]
[-- Type: application/x-shellscript, Size: 1080 bytes --]

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Simple script to grab and install the appropriate kernel RPMs
  2008-11-04  6:57 ` K.Prasad
@ 2008-11-04 15:49   ` William Cohen
  0 siblings, 0 replies; 7+ messages in thread
From: William Cohen @ 2008-11-04 15:49 UTC (permalink / raw)
  To: prasad; +Cc: SystemTAP

[-- Attachment #1: Type: text/plain, Size: 1517 bytes --]

K.Prasad wrote:
> On Mon, Nov 03, 2008 at 02:13:48PM -0500, William Cohen wrote:
>> Hi All,
>>
>> In an effort to make it a bit easier to install systemtap on RHEL 
>> machines, I have made a small script to figure out which RPMs to install 
>> based either on the running kernel (no arguments to script) or the output 
>> of "uname -r" as an argument to the script. This script is only designed 
>> to work on RHEL. I would like to comments on it. The plan is to include 
>> this in the Systemtap beginners guide to make it easier for people to 
>> machine setup to run systemtap.
>>
> 
> Just thinking if the script mitigates the problem seen with PAE and smp
> versions of the kernel, wherein uname -r would contain the string PAE
> and smp, and the kernel package's name isn't a simple 'kernel-debuginfo'
> but a 'kernel-PAE-debuginfo'.
> 
> Thanks,
> K.Prasad
> 

Hi Prasad,

The is a for loop that checks for "debug kdump PAE xen" variants in the script 
and adjusts the name accordingly. It should catch the cases you are talking 
about. Let me know if it doesn't.

I have also updated the script so it only prints out the needed packages when 
run by a normal user (normal user can't do rpm install so why even try?). When 
run by root it will attempt to download the packages and install them.

I have attached the revised version of the script to this email. The script is 
also checked into the git repository in the documentation section:

  doc/SystemTap_Beginners_Guide/en-US /extras/stapprep.sh

-Will

[-- Attachment #2: stapprep.sh --]
[-- Type: application/x-sh, Size: 1279 bytes --]

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Simple script to grab and install the appropriate kernel RPMs
  2008-11-04 15:44 ` David Smith
@ 2008-11-04 15:58   ` William Cohen
  2008-11-04 16:13     ` David Smith
  0 siblings, 1 reply; 7+ messages in thread
From: William Cohen @ 2008-11-04 15:58 UTC (permalink / raw)
  To: David Smith; +Cc: SystemTAP

David Smith wrote:
> William Cohen wrote:
>> Hi All,
>>
>> In an effort to make it a bit easier to install systemtap on RHEL
>> machines, I have made a small script to figure out which RPMs to install
>> based either on the running kernel (no arguments to script) or the
>> output of "uname -r" as an argument to the script. This script is only
>> designed to work on RHEL. I would like to comments on it. The plan is to
>> include this in the Systemtap beginners guide to make it easier for
>> people to machine setup to run systemtap.
> 
> Here's the script I've used for awhile now (as you'll see since it
> supports releases back to FC5).  It isn't much different than your
> script, except it also supports Fedora.  Note that it currently doesn't
> handle PAE kernels, but it could be made to handle that.
> 

Thanks, David for the script. Did you try to use the yum_kdebug.sh script for 
cross compiling examples? I noticed when trying to use "yum install" that yum 
would complain about installing kernels older than the currently installed kernel.

I would like to revise the stapprep.sh scrip to handle fedora repos correctly. 
There is the DEBUGINFOREPO variable that should be set appropriate for the 
various fedoras.

-Will

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Simple script to grab and install the appropriate kernel RPMs
  2008-11-04 15:58   ` William Cohen
@ 2008-11-04 16:13     ` David Smith
  2008-11-04 18:35       ` William Cohen
  0 siblings, 1 reply; 7+ messages in thread
From: David Smith @ 2008-11-04 16:13 UTC (permalink / raw)
  To: William Cohen; +Cc: SystemTAP

William Cohen wrote:
> David Smith wrote:
>> William Cohen wrote:

> Thanks, David for the script. Did you try to use the yum_kdebug.sh
> script for cross compiling examples? I noticed when trying to use "yum
> install" that yum would complain about installing kernels older than the
> currently installed kernel.

I've never seen yum complain about installing kernel debuginfo for older
kernels, but I also doubt I've done that operation much.  I might have a
vague memory of that happening, if so I would have just removed the
newer debuginfo by hand and run the script again.

> I would like to revise the stapprep.sh scrip to handle fedora repos
> correctly. There is the DEBUGINFOREPO variable that should be set
> appropriate for the various fedoras.

BTW, there is really no point in my keeping the older fc5/fc6 stuff in
my script,  I just haven't bothered taking it out.

You can certainly see how I'm handling the fedora repos by looking at my
script.

-- 
David Smith
dsmith@redhat.com
Red Hat
http://www.redhat.com
256.217.0141 (direct)
256.837.0057 (fax)

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Simple script to grab and install the appropriate kernel RPMs
  2008-11-04 16:13     ` David Smith
@ 2008-11-04 18:35       ` William Cohen
  0 siblings, 0 replies; 7+ messages in thread
From: William Cohen @ 2008-11-04 18:35 UTC (permalink / raw)
  To: David Smith; +Cc: SystemTAP

David Smith wrote:
> William Cohen wrote:
>> David Smith wrote:
>>> William Cohen wrote:
> 
>> Thanks, David for the script. Did you try to use the yum_kdebug.sh
>> script for cross compiling examples? I noticed when trying to use "yum
>> install" that yum would complain about installing kernels older than the
>> currently installed kernel.
> 
> I've never seen yum complain about installing kernel debuginfo for older
> kernels, but I also doubt I've done that operation much.  I might have a
> vague memory of that happening, if so I would have just removed the
> newer debuginfo by hand and run the script again.
> 
>> I would like to revise the stapprep.sh scrip to handle fedora repos
>> correctly. There is the DEBUGINFOREPO variable that should be set
>> appropriate for the various fedoras.
> 
> BTW, there is really no point in my keeping the older fc5/fc6 stuff in
> my script,  I just haven't bothered taking it out.
> 
> You can certainly see how I'm handling the fedora repos by looking at my
> script.
> 

Hi David,

I found that wildcard matching works for the --enablerepos, so I made a tweak so 
that it matches all debuginfo repos. The explicit version specified in rpm 
should avoid trying to pull in every possible kernel-devel, kernel-debuginfo 
rpm. The script works for fedora machines now with the bonus that the script is 
one line shorter. :) I did a git push so the script is available from the git repo.

-Will

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2008-11-04 18:35 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-11-03 19:14 Simple script to grab and install the appropriate kernel RPMs William Cohen
2008-11-04  6:57 ` K.Prasad
2008-11-04 15:49   ` William Cohen
2008-11-04 15:44 ` David Smith
2008-11-04 15:58   ` William Cohen
2008-11-04 16:13     ` David Smith
2008-11-04 18:35       ` William Cohen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).