2010-04-22 17:49:54 |
Andy Whitcroft |
description |
Binary package hint: linux-tools-common
linux-tools-common contains a small redirection-script (/usr/bin/perf), for dispatching to the perf-version corresponding to the running kernel.
This script uses basically ${`uname -r`%-*} to figure the running kernel version, where %-* strips the last dash-delimited component of the kernel name. This breaks for -generic-pae.
Examples of uname "-r":
2.6.32-19-generic # Works today
2.6.32-19-generic-pae # Breaks, since the TWO last components needs to be stripped.
A proposed solution could be to instead use "%%-[a-z-]*", which would remove ALL trailing letters, and dashes, up to the last digit in the string (the package-release-number).
However, since I don't know kernel-release names for other architectures, it needs to be verified first.
Suggested new perf, change only on line 3
----------------
#!/bin/bash
version=`uname -r`
version=${version%%-[a-z-]*}
exec "perf_$version" "$@" |
SRU Justification
Justification: by default the perf command will not work correctly on any flavour which contains a - in its name
Impact: unable to use the perf command to debug applications when using generic-paeetc
Fix Description: change flavour removal to work with all flavours through use of the known shape version number
Patch: http://kernel.ubuntu.com/git?p=ubuntu/ubuntu-lucid.git;a=commit;h=6ec3efb32496eafa8be998507d26f7ffbe0747c4
Risks: low, this only changes the perf wrapper which has been tested with all known flavours
TEST CASE: attempt to use perf on a generic-pae install note it fails, install patch, note it now works as expected
===
Binary package hint: linux-tools-common
linux-tools-common contains a small redirection-script (/usr/bin/perf), for dispatching to the perf-version corresponding to the running kernel.
This script uses basically ${`uname -r`%-*} to figure the running kernel version, where %-* strips the last dash-delimited component of the kernel name. This breaks for -generic-pae.
Examples of uname "-r":
2.6.32-19-generic # Works today
2.6.32-19-generic-pae # Breaks, since the TWO last components needs to be stripped.
A proposed solution could be to instead use "%%-[a-z-]*", which would remove ALL trailing letters, and dashes, up to the last digit in the string (the package-release-number).
However, since I don't know kernel-release names for other architectures, it needs to be verified first.
Suggested new perf, change only on line 3
----------------
#!/bin/bash
version=`uname -r`
version=${version%%-[a-z-]*}
exec "perf_$version" "$@"
|
|