LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Fedora
User Name
Password
Fedora This forum is for the discussion of the Fedora Project.

Notices


Reply
  Search this Thread
Old 03-14-2004, 02:36 PM   #1
Thetargos
Senior Member
 
Registered: Mar 2003
Location: Mexico City
Distribution: Fedora, Ubuntu & Mint
Posts: 1,679

Rep: Reputation: 45
RPM target installation questions (kernel).


So I successfully built an rpm kernel from a plain vanilla 2.6.4 source tree (yeah, baby!!). Now I obviously have two rpms generated: the actual kernel (kernel-2.6.4-2.rpm) and the source package (kernel-2.6.4-2.src.rpm). Now my questions is quite simple really. For the source package, should I rename it to kernel-source-2.6.4-2.rpm? How do I know without installing an rpm package where will the files be installed to? (something like rpm -ql <package> but before you actually install it).

Thanks for any imput. Up until now I've been unable to locate this information within the manual pages (I must admit also, that I really suck at understanding most of those manuals... some of them are just too cryptic).

PS: If you wanna know how to do it in FC1, just say so, and I'll consider posting a guide on how to build, install, etc a 2.6.x Kernel for FC1 (and in RPM format )
 
Old 03-14-2004, 04:04 PM   #2
BigNate
Member
 
Registered: Mar 2003
Location: Harrisburg, PA
Distribution: Gentoo, Debian, Ubuntu, Red Hat/CentOS
Posts: 719

Rep: Reputation: 30
There should be a Specfile and a Makefile in there.
 
Old 03-14-2004, 04:12 PM   #3
Thetargos
Senior Member
 
Registered: Mar 2003
Location: Mexico City
Distribution: Fedora, Ubuntu & Mint
Posts: 1,679

Original Poster
Rep: Reputation: 45
I'll look into it, but looking at the top level Makefile there's no reference to the spec (that I could find)... I'll check the top level Spec file. Thanks.
 
Old 03-14-2004, 10:57 PM   #4
misc
Senior Member
 
Registered: Apr 2003
Distribution: Red Hat + Fedora
Posts: 1,084

Rep: Reputation: 54
Re: RPM target installation questions (kernel).

Quote:
(kernel-2.6.4-2.src.rpm). Now my questions is quite simple really. For the source package, should I rename it to kernel-source-2.6.4-2.rpm?
Why? The file name is irrelevant. The real package name is stored inside the package format header.
Quote:
How do I know without installing an rpm package where will the files be installed to? (something like rpm -ql <package> but before you actually install it).
rpm -qpl filename | less
or:
rpm -qplv filename | less

Note that src.rpm packages are not installed, but extracted. You can also use rpm -ivvh file to get more verbose output.
 
Old 03-14-2004, 11:02 PM   #5
Thetargos
Senior Member
 
Registered: Mar 2003
Location: Mexico City
Distribution: Fedora, Ubuntu & Mint
Posts: 1,679

Original Poster
Rep: Reputation: 45
Re: Re: RPM target installation questions (kernel).

Quote:
Originally posted by misc
Why? The file name is irrelevant. The real package name is stored inside the package format header.

rpm -qpl filename | less
or:
rpm -qplv filename | less

Note that src.rpm packages are not installed, but extracted. You can also use rpm -ivvh file to get more verbose output.
Thank you VERY much... this is just what I was looking for. I meant that about the .src.rpm based on the kenrel-source packages distributed by RH and Fedora. If this particular package will start a kernel compilation, how do I make one that will just extract the sources to /usr/src?
 
Old 03-14-2004, 11:12 PM   #6
misc
Senior Member
 
Registered: Apr 2003
Distribution: Red Hat + Fedora
Posts: 1,084

Rep: Reputation: 54
Every src.rpm extracts below /usr/src/redhat by default (unless you've configured RPM to extract it somewhere else -- you should do that).

On the contrary, the kernel-source package is a binary rpm, created with rpmbuild --rebuild --target i386 kernel*.src.rpm
 
Old 03-14-2004, 11:19 PM   #7
Thetargos
Senior Member
 
Registered: Mar 2003
Location: Mexico City
Distribution: Fedora, Ubuntu & Mint
Posts: 1,679

Original Poster
Rep: Reputation: 45
Quote:
Originally posted by misc
Every src.rpm extracts below /usr/src/redhat by default (unless you've configured RPM to extract it somewhere else -- you should do that).
This much I knew. I was just puzzled about the kernel-source package... That way I may be able to give my three computers a more centralized administration by just building one kernel optimized for them, in binary form instead of having to compile pretty much the same kernel in each one. The kenrel-source package would come in handy for drivers stuff (mainly ALSA and nVidia and or ATi's)
Quote:
On the contrary, the kernel-source package is a binary rpm, created with rpmbuild --rebuild --target i386 kernel*.src.rpm
So this usual rebuild will generate the kernel-source and not build an i386 generic kernel?

Last edited by Thetargos; 03-14-2004 at 11:21 PM.
 
Old 03-14-2004, 11:41 PM   #8
misc
Senior Member
 
Registered: Apr 2003
Distribution: Red Hat + Fedora
Posts: 1,084

Rep: Reputation: 54
Quote:
So this usual rebuild will generate the kernel-source and not build an i386 generic kernel?
Unlike other target architectures, target i386 will build several .i386.rpm sub-packages, including kernel, kernel-doc, kernel-source and kernel-BOOT.
 
Old 03-14-2004, 11:44 PM   #9
Thetargos
Senior Member
 
Registered: Mar 2003
Location: Mexico City
Distribution: Fedora, Ubuntu & Mint
Posts: 1,679

Original Poster
Rep: Reputation: 45
w00t! Thanks for the info! This is MUCH appreciated!

BTW the rpm -qplv kernel-2.6.4-2.src.rpm only lists two files, the tar.gz of the kenrel (kernel-2.6.4.tar.gz) and the the spec file. Anyway I'll give that a try (although it will take a while )
 
Old 03-15-2004, 12:04 AM   #10
misc
Senior Member
 
Registered: Apr 2003
Distribution: Red Hat + Fedora
Posts: 1,084

Rep: Reputation: 54
That's expected. A src.rpm contains just a spec file, a source archive, maybe additional patches, helper scripts, prepared config files, everything that's needed to build the binary stuff from the sources.
 
Old 03-15-2004, 10:31 PM   #11
jon-do
Member
 
Registered: Feb 2004
Distribution: Red 9, FC 2 Test 3
Posts: 98

Rep: Reputation: 16
Re: RPM target installation questions (kernel).

Quote:
Originally posted by Thetargos
So I successfully built an rpm kernel from a plain vanilla 2.6.4 source tree (yeah, baby!!). Now I obviously have two rpms generated: the actual kernel (kernel-2.6.4-2.rpm) and the source package (kernel-2.6.4-2.src.rpm). Now my questions is quite simple really. For the source package, should I rename it to kernel-source-2.6.4-2.rpm? How do I know without installing an rpm package where will the files be installed to? (something like rpm -ql <package> but before you actually install it).

Thanks for any imput. Up until now I've been unable to locate this information within the manual pages (I must admit also, that I really suck at understanding most of those manuals... some of them are just too cryptic).

PS: If you wanna know how to do it in FC1, just say so, and I'll consider posting a guide on how to build, install, etc a 2.6.x Kernel for FC1 (and in RPM format )
Can you tell me how you build the rpm format, I already have the kernel 2.6.4 installed
 
Old 03-16-2004, 01:46 PM   #12
Thetargos
Senior Member
 
Registered: Mar 2003
Location: Mexico City
Distribution: Fedora, Ubuntu & Mint
Posts: 1,679

Original Poster
Rep: Reputation: 45
Re: Re: RPM target installation questions (kernel).

Quote:
Originally posted by jon-do
Can you tell me how you build the rpm format, I already have the kernel 2.6.4 installed
What I did:
  • Ensure rpm will not look for debugging lists. For that you should create/edit the file /root/.rmpmacros and add:
    Code:
    %debug_package %{null}
  • Now simply run at the linux-2.6.4 root directory: make rpm.
Warning You should really use the above mentioned rpm commands to fine tune/tweak the supplied kenrel.spec file!! (in my case the installed kernel did not provided an initrd image, until I did)

Last edited by Thetargos; 03-16-2004 at 01:48 PM.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
cannot build source rpm/ rpm questions kpachopoulos Fedora 3 07-24-2005 09:15 AM
Few installation questions (RPM, Java, Webcam)... sbogus Linux - Newbie 11 06-11-2004 04:51 AM
binary vs source RPM (and other RPM questions) calimer Linux - Software 4 06-22-2003 12:33 AM
compiling a kernel module for a different target akaBeaVis Linux - Software 10 06-09-2003 12:47 AM
Please help - Gimp RPM installation and general questions Annapanna Linux - Newbie 5 06-05-2002 02:12 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Fedora

All times are GMT -5. The time now is 07:12 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration