Red Hat Topics - Do I have Fedora kernel source installed?

This is Interesting: Free IT Magazines  
Home > Archive > Red Hat Topics > January 2006 > Do I have Fedora kernel source installed?





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author Do I have Fedora kernel source installed?
workingstiff19@hotmail.com

2006-01-27, 9:05 pm

I am used to RHAS and RHES, but now I have a PC running Fedora Core
release 4 (Stentz):
Linux host.company-inc.com 2.6.14-1.1656_FC4 #1 Thu Jan 5 22:13:55
EST 2006 x86_64 x86_64 x86_64 GNU/Linux

....and (blush) I am just trying to determine whether I have the kernel
source so I can compile Cisc
o's VPN client. In the last few versions of AS and ES I worked with,
they changed the source packa
ges to include the headers, but have they also renamed "kernel-source"
to "kernel-devel"?

Packages installed:

root@host:/usr/src# rpm -qa | grep kern

kernel-2.6.11-1.1369_FC4
kernel-devel-2.6.11-1.1369_FC4
kernel-devel-2.6.14-1.1656_FC4
glibc-kernheaders-2.4-9.1.94
kernel-2.6.14-1.1656_FC4


Under /usr/src/kernels, I have:
2.6.11-1.1369_FC4-x86_64/ 2.6.14-1.1656_FC4-x86_64/
....but the only *.c files under those are under subdirectories called
"scripts."

Under /usr/src/redhat there are the usual subdirectories (BUILD/ RPMS/
SOURCES/ SPECS/ SRPMS/) but no C code at all.


--> Somebody told me to try this command: up2date --get-source kernel
....but it results in this error:

Fetching all package list for channel: updates-released...
An error has occurred:
exceptions.TypeError
See /var/log/up2date for more information

....and here's that information from /var/log/up2date:

[Wed Jan 25 09:12:25 2006] up2date File "/usr/sbin/up2date", line
1265, in ?
sys.exit(main() or 0)
File "/usr/sbin/up2date", line 711, in main
return getPackages(pkgNames, source=1)
File "/usr/sbin/up2date", line 995, in getPackages
progressCallback = wrapperUtils.percent)
File "/usr/share/rhn/up2date_client/rhnPackageInfo.py", line 279, in
getAllAvailableAllArchPackageList
package_list = allAvailablePackageList(
File "/usr/share/rhn/up2date_client/rhnPackageInfo.py", line 218, in
allAvailablePackageList
progressCallback = progressCallback )
File "/usr/share/rhn/up2date_client/rpcServer.py", line 316, in
doCall
ret = apply(method, args, kwargs)
File "/usr/share/rhn/up 2date_client/repoDirector.py", line 24, in
listAllPackages
return self.handlers[channel['type']].listAllPackages(channel,
msgCallback, progressCallback)
File "/usr/share/rhn/up2date_client/rpmSource.py", line 241, in
listAllPackages
msgCallback, progressCallback)

Lenard

2006-01-27, 9:05 pm

workingstiff19@hotmail.com wrote:

> I am used to RHAS and RHES, but now I have a PC running Fedora Core
> release 4 (Stentz):


http://fedora.redhat.com/docs/relea...rata/#sn-kernel


--
"A personal computer is called a personal computer because it's yours,
Anything that runs on that computer, you should have control over."
Andrew Moss, Microsoft's senior director of technical policy, 2005
Richard Tijink

2006-01-29, 8:50 pm

you need to get the kernel-*.src.rpm package from the fedora (or mirror)
ftp-server. e.g.:
wget
ftp://ftp.nluug.nl/vol/1/fedora/cor...369_FC4.src.rpm


workingstiff19@hotmail.com wrote:
> I am used to RHAS and RHES, but now I have a PC running Fedora Core
> release 4 (Stentz):
> Linux host.company-inc.com 2.6.14-1.1656_FC4 #1 Thu Jan 5 22:13:55
> EST 2006 x86_64 x86_64 x86_64 GNU/Linux
>
> ...and (blush) I am just trying to determine whether I have the kernel
> source so I can compile Cisc
> o's VPN client. In the last few versions of AS and ES I worked with,
> they changed the source packa
> ges to include the headers, but have they also renamed "kernel-source"
> to "kernel-devel"?
>
> Packages installed:
>
> root@host:/usr/src# rpm -qa | grep kern
>
> kernel-2.6.11-1.1369_FC4
> kernel-devel-2.6.11-1.1369_FC4
> kernel-devel-2.6.14-1.1656_FC4
> glibc-kernheaders-2.4-9.1.94
> kernel-2.6.14-1.1656_FC4
>
>
> Under /usr/src/kernels, I have:
> 2.6.11-1.1369_FC4-x86_64/ 2.6.14-1.1656_FC4-x86_64/
> ...but the only *.c files under those are under subdirectories called
> "scripts."
>
> Under /usr/src/redhat there are the usual subdirectories (BUILD/ RPMS/
> SOURCES/ SPECS/ SRPMS/) but no C code at all.
>
>
> --> Somebody told me to try this command: up2date --get-source kernel
> ...but it results in this error:
>
> Fetching all package list for channel: updates-released...
> An error has occurred:
> exceptions.TypeError
> See /var/log/up2date for more information
>
> ...and here's that information from /var/log/up2date:
>
> [Wed Jan 25 09:12:25 2006] up2date File "/usr/sbin/up2date", line
> 1265, in ?
> sys.exit(main() or 0)
> File "/usr/sbin/up2date", line 711, in main
> return getPackages(pkgNames, source=1)
> File "/usr/sbin/up2date", line 995, in getPackages
> progressCallback = wrapperUtils.percent)
> File "/usr/share/rhn/up2date_client/rhnPackageInfo.py", line 279, in
> getAllAvailableAllArchPackageList
> package_list = allAvailablePackageList(
> File "/usr/share/rhn/up2date_client/rhnPackageInfo.py", line 218, in
> allAvailablePackageList
> progressCallback = progressCallback )
> File "/usr/share/rhn/up2date_client/rpcServer.py", line 316, in
> doCall
> ret = apply(method, args, kwargs)
> File "/usr/share/rhn/up 2date_client/repoDirector.py", line 24, in
> listAllPackages
> return self.handlers[channel['type']].listAllPackages(channel,
> msgCallback, progressCallback)
> File "/usr/share/rhn/up2date_client/rpmSource.py", line 241, in
> listAllPackages
> msgCallback, progressCallback)
>

Some Other Somebody Else

2006-01-29, 8:50 pm

On Sat, 28 Jan 2006 12:52:24 +0100, Richard Tijink
<richardnews@risor.net> wrote:

>you need to get the kernel-*.src.rpm package from the fedora (or mirror)
>ftp-server. e.g.:
>wget
>ftp://ftp.nluug.nl/vol/1/fedora/cor...369_FC4.src.rpm


I'm pretty sure that is something different - SRPMS (*.src.rpm) are
used to build binary rpms; they are organized differently from the
RPMS used to keep a copy of the kernel source accessible for compiling
other source code that refers to it. If you install a src.rpm
package, you get the source as a tarball in /usr/src/redhat/SOURCES;
if you install the source packages used for compiling related
software, you get a separate directory tree (where depends on the
distribution and version).
Moe Trin

2006-01-29, 8:50 pm

On Sat, 28 Jan 2006, in the Usenet newsgroup alt.os.linux.redhat, in article
<fesmt15lf9nabgt71gm4e4s8auv5l374hb@4ax.com>, Some Other Somebody Else wrote:

><richardnews@risor.net> wrote:


[vbcol=seagreen]
>I'm pretty sure that is something different - SRPMS (*.src.rpm) are
>used to build binary rpms; they are organized differently from the
>RPMS used to keep a copy of the kernel source accessible for compiling
>other source code that refers to it.


From the RELEASE-NOTES file for FC4:

Fedora Core 4 does not include the kernel-source package provided by
older versions. Instead, configured sources are available as
described in the section called "Kernel Flavors". User that require
access to Fedora Core original kernel sources can find them in the
kernel .src.rpm package. To create an exploded source tree from this
file, perform the following steps:

Old guy
Some Other Somebody Else

2006-01-29, 8:50 pm

On Sat, 28 Jan 2006 19:48:07 -0600, ibuprofin@painkiller.example.tld
(Moe Trin) wrote:

>[...] From the RELEASE-NOTES file for FC4:
>
> Fedora Core 4 does not include the kernel-source package provided by
> older versions. Instead, configured sources are available as
> described in the section called "Kernel Flavors". User that require
> access to Fedora Core original kernel sources can find them in the
> kernel .src.rpm package. To create an exploded source tree from this
> file, perform the following steps:
>
> Old guy


Interesting; I don't remember whether I had read that -- however,
regarding the above reference to the section called "Kernel Flavors":


[begin release notes quote]

6.2.2.2. Kernel Flavors

Fedora Core includes the following kernel builds:

* Native kernel, in both uniprocessor and SMP varieties.

Configured sources are available in the
kernel-devel-<version>.<arch>.rpm package.

* Virtual kernel for use with the XEN emulator package.

Configured sources are available in the
kernel-xen0-devel-<version>.<arch>.rpm package.

Sources for both kernel flavors may be installed at the same time. The
files will be installed into the
/usr/src/kernels/<version>[-xen0]-<arch>/ tree. Use the command:

# rpm -Uvh kernel-devel[-xen0]-<version>.<arch>.rpm

as appropriate.
[Tip] Following Generic Textbooks

Many of the tutorials, examples, and textbooks about Linux kernel
development assume the kernel sources are installed under the
/usr/src/linux directory. If you make a symbolic link, as shown below,
you should be able to use those learning materials with the Fedora
Core packages. Install the appropriate kernel sources, as shown
earlier, and then:

# ln -s /usr/src/kernels/kernel-<all-the-rest> /usr/src/linux

[end release notes quote]


In other words, it is not at all clear that the distiction and
assertion I made above are invalid, or that those compiling software
that uses kernel sources generally "require access to Fedora Core
original kernel sources" and not "configured sources [...] available
as described..."

I am not familiar with Cisco's VPN client, so I guess it may be an
exception, but I would suspect that the kernel-devel* packages, rather
than SRPMS, were the ones generally used for compiling such software.
This would be analogous to the general use of other *-devel* packages,
as distinguished from SRPMS.
Moe Trin

2006-01-29, 8:50 pm

On Sun, 29 Jan 2006, in the Usenet newsgroup alt.os.linux.redhat, in article
<luuot1hortcimhtvmf67t45kh89bq4skcu@4ax.com>, Some Other Somebody Else wrote:
>In other words, it is not at all clear that the distiction and
>assertion I made above are invalid, or that those compiling software
>that uses kernel sources generally "require access to Fedora Core
>original kernel sources" and not "configured sources [...] available
>as described..."


I agree it's rather a confusing mess. But think of this:

39172170 Oct 28 00:26 linux-2.6.14.tar.bz2
39187886 Nov 9 00:22 linux-2.6.14.1.tar.bz2
39184746 Nov 11 05:39 linux-2.6.14.2.tar.bz2
39186327 Nov 24 22:23 linux-2.6.14.3.tar.bz2
39194430 Dec 15 00:29 linux-2.6.14.4.tar.bz2
39192826 Dec 27 00:29 linux-2.6.14.5.tar.bz2
39189601 Jan 8 02:31 linux-2.6.14.6.tar.bz2

That's out of ftp.kernel.org in /pub/linux/kernel/v2.6/

15326820 Jan 6 17:13 kernel-2.6.14-1.1656_FC4.i586.rpm
14860537 Jan 6 17:14 kernel-2.6.14-1.1656_FC4.i686.rpm
4306263 Jan 6 17:14 kernel-devel-2.6.14-1.1656_FC4.i586.rpm
4303963 Jan 6 17:15 kernel-devel-2.6.14-1.1656_FC4.i686.rpm
2515692 Jan 6 17:15 kernel-doc-2.6.14-1.1656_FC4.noarch.rpm
15241525 Jan 6 17:15 kernel-smp-2.6.14-1.1656_FC4.i686.rpm
4322979 Jan 6 17:15 kernel-smp-devel-2.6.14-1.1656_FC4.i686.rpm

That's out of a mirror of /linux/core/updates/4/i386/ directory at Red Hat,
and

40523094 Jan 6 17:13 kernel-2.6.14-1.1656_FC4.src.rpm

that's out of the /linux/core/updates/4/SRPMS/ directory. So, the -devel
package is a tenth the size of the source, and the resulting kernel is
3.5 times the devel package???

>I am not familiar with Cisco's VPN client, so I guess it may be an
>exception, but I would suspect that the kernel-devel* packages, rather
>than SRPMS, were the ones generally used for compiling such software.


For ordinary compiles, the -devel packages include all the hooks that the
compilation needs, and GENERALLY once the compile is completed, the
-devel package isn't needed (the result "runs" out of the regular packages).
I don't know what Cisco's client needs either, so I can't comment either
way. Still, the release notes state that the "exploded source tree is not
required to build a kernel module, such as your own device driver, against
the currently in-use kernel. So I suppose the real answer is "does it work"
or not.

>This would be analogous to the general use of other *-devel* packages,
>as distinguished from SRPMS.


True - but as you can see above, either the -devel package is compressed
with something amazing, or there is a lot of stuff not included. Don't
forget that a compressed file doesn't shrink much when compressed a second
time. The uncompressed kernel source is around 200 Megs now. Of course,
given that the kernel source will compile on everything from a 80386 to a
Z/390, you could probably strip a lot of the IFDEF stuff for architectures
you don't have... but _that_ much???

Old guy
Some Other Somebody Else

2006-01-29, 8:50 pm

On Sun, 29 Jan 2006 16:57:22 -0600, ibuprofin@painkiller.example.tld
(Moe Trin) wrote:

>[quite a bit]


I'm not quite sure where you're going with this, since it neither
seems to contradict what I said, nor to specifically pertain to the
original question. When you started, you seemed to be disputing what
I had said, so I just pointed out that it still seemed to be true, and
now you just seem to be piling random debris on top of it.

I found it hard; it's hard to find; oh well, whatever; never mind....
Some Other Somebody Else

2006-01-30, 5:47 pm

Not to imply any objection to the subject matter per se, just to the
apparent obfuscation. Those do seem like potentially interesting
questions, not that they'd have to be interesting to me to be on topic
anyway, but I tried to point out the general difference between the
uses of the different types of packages because it seems like a source
of potentially annoying confusion to a newbie, even though some more
experienced users might take it for granted.
Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com