| Summary: | Make kernel source auto discovered | ||
|---|---|---|---|
| Product: | [Tools] Linux Tools | Reporter: | Alexander Kurtakov <akurtakov> |
| Component: | Systemtap | Assignee: | Otavio Pontes <obusatto> |
| Status: | CLOSED FIXED | QA Contact: | |
| Severity: | normal | ||
| Priority: | P3 | CC: | anithra, pmuldoon, swagiaal |
| Version: | unspecified | ||
| Target Milestone: | 2.0 | ||
| Hardware: | PC | ||
| OS: | Linux | ||
| Whiteboard: | |||
|
Description
Alexander Kurtakov
Nice idea. But what should we do if there is more than one kernel source in /usr/src/kernels? choose one of them? Or just point to /usr/src/kernels to display all kernel sources? What about pointing to the current running one ? uname -r gives the exact version name as present in /usr/src/kernels on Fedora, isn't it the same on other distros? (In reply to comment #2) > What about pointing to the current running one ? uname -r gives the exact > version name as present in /usr/src/kernels on Fedora, isn't it the same on > other distros? Not everyone follows this. There are distros that adds the kernel source directly in /usr/src (not in /usr/src/kernels), named linux-{VERSION_NUMBER}. Sles does this as far as I know. Gentoo and arch too. Some distros use to create a symlink in /usr/src/linux pointing to newest linux kernel src installed. We could look for /usr/src/linux, /usr/src/kernels/$(uname -r), /usr/src/linux-$(uname -r). Is there any other place we can look for kernel sources? (In reply to comment #3) > (In reply to comment #2) > > What about pointing to the current running one ? uname -r gives the exact > > version name as present in /usr/src/kernels on Fedora, isn't it the same on > > other distros? > > Not everyone follows this. There are distros that adds the kernel source > directly in /usr/src (not in /usr/src/kernels), named > linux-{VERSION_NUMBER}. Sles does this as far as I know. Gentoo and arch > too. Some distros use to create a symlink in /usr/src/linux pointing to > newest linux kernel src installed. > > We could look for /usr/src/linux, /usr/src/kernels/$(uname -r), > /usr/src/linux-$(uname -r). Is there any other place we can look for kernel > sources? From previous experience I have different view on the problem. We look for the places where distros supported by current contributors put things and let the rest contribute their fix. We can never support every possible odd combination. (In reply to comment #4) > (In reply to comment #3) > > (In reply to comment #2) > > > What about pointing to the current running one ? uname -r gives the exact > > > version name as present in /usr/src/kernels on Fedora, isn't it the same on > > > other distros? > > > > Not everyone follows this. There are distros that adds the kernel source > > directly in /usr/src (not in /usr/src/kernels), named > > linux-{VERSION_NUMBER}. Sles does this as far as I know. Gentoo and arch > > too. Some distros use to create a symlink in /usr/src/linux pointing to > > newest linux kernel src installed. > > > > We could look for /usr/src/linux, /usr/src/kernels/$(uname -r), > > /usr/src/linux-$(uname -r). Is there any other place we can look for kernel > > sources? > > From previous experience I have different view on the problem. We look for > the places where distros supported by current contributors put things and > let the rest contribute their fix. We can never support every possible odd > combination. I see. It is nice for us to have this working for rhel and sles. And the solution I mentioned solve both distros. I commented about gentoo and arch because I know about them, but I am really not worried about gentoo/arch users. They should know what they are doing. :) Fixed here: https://git.eclipse.org/r/#/c/9849/ |