Re: FLAME____ Why is the kernel source not included

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Once upon a time, Ken Johanson <fedora@xxxxxxxxxxxxx> 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@xxxxxxxxxx>
Systems and Network Administrator - HiWAAY Internet Services
I don't speak for anybody but myself - that's enough trouble.


[Index of Archives]     [Current Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]     [Fedora Docs]

  Powered by Linux