FLAME____ Why is the kernel source not included
Chris Adams
cmadams at hiwaay.net
Sat Oct 16 21:25:35 UTC 2004
Once upon a time, Ken Johanson <fedora at kensystem.com> said:
<a lot of stoopid stuff>
You keep claiming you have to download hundreds of megabytes of SRPMS to
get the kernel, which is wrong. You only need to download the specific
SRPM you want. Then you complained it is hard to find (which is frankly
even stoopider; if you can't match a version you probably don't have any
use for the source).
Anyway, to help you find the kernel matching the running kernel, since
this is such a difficult task for you, try this script.
************************************************************************
#!/bin/bash
# set this to your favorite mirror top-level Fedora Core directory
base=ftp://download.fedora.redhat.com/pub/fedora/linux/core
pkg=kernel
ver=`uname -r`
if [ "$ver" != "${ver%smp}" ]; then
pkg=kernel-smp
ver="${ver%smp}"
fi
srpm=`rpm -q --qf '%{SOURCERPM}' $pkg-$ver`
fver=`rpm -q --qf '%{VERSION}' fedora-release`
urls="$fver updates/$fver updates/testing/$fver development"
gotit=0
for url in $urls; do
echo "Checking $base/$url/SRPMS/$srpm"
wget "$base/$url/SRPMS/$srpm"
if [ $? = 0 ]; then
gotit=1
break
fi
echo
done
if [ $gotit = 0 ]; then
echo "Couldn't find matching kernel source" 1>&2
exit 1
fi
echo "Kernel source for running kernel is in $srpm"
************************************************************************
--
Chris Adams <cmadams at hiwaay.net>
Systems and Network Administrator - HiWAAY Internet Services
I don't speak for anybody but myself - that's enough trouble.
More information about the fedora-list
mailing list