[ATrpms-users] How to build rpm for kernel that isn't in repo?
Axel Thimm
Axel.Thimm at ATrpms.net
Sun Mar 23 00:34:35 CET 2008
Hi,
On Sat, Mar 22, 2008 at 01:19:14PM -0500, Craig Huff wrote:
> I am interested in building a patched CentOS 5.1 kernel with TuxOnIce
> (formerly Suspend2) support and the associated kmdls I will need to
> support MythTV.
>
> This is partly to learn how it's done and partly rather than feeling
> like I'm badgering repository managers to build something that doesn't
> have many users.
I think tuxonice for CentOS has great potential. Matthias is already
offering builds although not as regular as the Fedora ones (probably
because his working systems are mostly Fedora I guess).
So having someone to help Matthias on that who keeps a sharp eye on
CentOS/RHEL kernel releases will certainly help improve the picture at
CentOS. :)
> However, I have not had to build anything from sources (thanks to
> Axel's excellent repository), much less patch the source and build it,
> so I am unclear of the process.
>
> For the current CentOS 5.1 kernel,
> (kernel-2.6.18-53.1.14.el5.i686.rpm, or perhaps
> kernel-2.6.18-53.1.14.el5.centos.plus.i686.rpm) how would I proceed?
> (How does Axel do this when he has the time and a pending request?)
Actually Axel has never ever patched tuxonice/suspend2 into
RHEL/CentOS kernels, all work has been done solely by Matthias (credit
where credit is due!)
> Is the correct sequence:
>
> 1) Download the appropriate source rpm from the CentOS repository and
> unpack it with rpm -i <downloaded file name>
> 2) Download the closest Suspend2 source rpm from Matthias Hensler's
> repository and unpack it with rpm -i <downloaded file name>
> 3) Make a copy of the Suspend2 spec file installed by step 2 in
> /usr/src/redhat/SPECS renamed to match the kernel version I want to
> build
> 4) Review and modify as required the new spec file
> 5) Build the new kernel with "rpmbuild -ba --target=i686 <new kernel
> version spec file name>"
> 6) Return to step 4 if there are errors until the build produces no
> error messages
I think this is mostly the picture. Add a
4b or 5b) Communicate with Matthias and other suspend2/tuxonice pros
interested in the RHEL/Fedora world
:)
> Or, do I need to do other things before I get to the rpmbuild command?
> Or, do I need to add other options to the command line to mimic the
> options Matthias (and as a result, Axel) normally builds in, such as:
> --define '_with_ntfs 1'
> --define '_dsdt_initrd 1'
These are all orthogonal to the tuxonice bits.
> and so on, in which case, which ones are normally specified on the
> command line?
The default is only to build w/o any options and one with
8kstacks. All the other options are for users rebuilding from src.rpm.
> Does the Suspend2 source rpm need to be unpacked each time a new
> CentOS kernel is unpacked (i.e. does the CentOS kernel source
> overwrite files from the Suspend2 source that are needed)?
I'm not sure what you mean - the suspend2 sources are actually patches
to the kernel, so they do overwrite in a defined manner. If the kernel
sources deviate too much from the previous ones you need to adjust the
patches of course.
> Finally, what is the end result -- a ready to install rpm that could
> be copied and used on any system to install the newer (and modified to
> support Suspend2) kernel or something that then needs other processing
> to produce an rpm?
The former, although the latter is probably what you do when
testing/developing things.
> Any help would be greatly appreciated.
>
> TIA,
>
> Craig.
--
Axel.Thimm at ATrpms.net
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://lists.atrpms.net/pipermail/atrpms-users/attachments/20080323/15fa189c/attachment.bin
More information about the atrpms-users
mailing list