I have a driver that requires installing the kernel sources (into my own rpmbuild tree, not the system) prior to compiling. I followed the info for centos6 here:
http://wiki.centos.org/HowTos/I_need_the_Kernel_Source#head-a8dae925eec15786...
I can successfully compile and install the module from tarball after manually prepping the kernel sources, but I need to turn this into a proper RPM and am wondering if there are macros I'm not seeing for how to prep the kernel sources as part of a %prep or %build phase. I have looked at many real-world spec files and googled all afternoon and cannot find any info on this. As this will ultimately be a mock build, having to go into the mock shell and manually prep the sources would be a PITA. Am I looking for something that doesn't exist?
Thanks for any suggestions you might have!
On 5.8.2014 03:24, BC wrote:
I have a driver that requires installing the kernel sources (into my own rpmbuild tree, not the system)
Why not define the kernel source as buildrequire?
I can successfully compile and install the module from tarball after manually prepping the kernel sources, but I need to turn this into a proper RPM and am wondering if there are macros I'm not seeing for how to prep the kernel sources as part of a %prep or %build phase. I have looked at many real-world spec files and googled all afternoon and cannot find any info on this.
Have a look at the %setup macro and it's parameters http://docs.fedoraproject.org/en-US/Fedora_Draft_Documentation/0.1/html/RPM_...
On Wed, Aug 6, 2014 at 8:11 PM, Markus Falb markus.falb@fasel.at wrote:
On 5.8.2014 03:24, BC wrote:
Why not define the kernel source as buildrequire?
Seems quite recursive to me. I would have to list the source rpm for the various kernels which means I would be bundling a src.rpm into the driver's src.rpm as well as calling rpmbuild itself from within a spec file. This would be the RPM way of doing it, at least (I do need to generate/distribute the src.rpm for the driver). Short of any rpm-specific way of solving the "my spec file relies on real kernel sources", I'll probably have make a kernel-sources RPM (not source RPM) that actually installs somewhere other than $HOME and use that RPM as a buildrequire in place of kernel-devel, which is insufficient for my need.
On 05/08/14 02:24, BC wrote:
I have a driver that requires installing the kernel sources (into my own rpmbuild tree, not the system) prior to compiling.
Are you absolutely sure?
What driver is it? With some specifics we might be able to help.
I followed the info for centos6 here:
http://wiki.centos.org/HowTos/I_need_the_Kernel_Source#head-a8dae925eec15786...
I can successfully compile and install the module from tarball after manually prepping the kernel sources, but I need to turn this into a proper RPM and am wondering if there are macros I'm not seeing for how to prep the kernel sources as part of a %prep or %build phase. I have looked at many real-world spec files and googled all afternoon and cannot find any info on this. As this will ultimately be a mock build, having to go into the mock shell and manually prep the sources would be a PITA. Am I looking for something that doesn't exist?
Thanks for any suggestions you might have!