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-a8dae925eec15786df9f6f8c918eff16bf67be0d 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_Guide/ch09s04.html#id796983 -- Kind Regards, Markus Falb
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-a8dae925eec15786df9f6f8c918eff16bf67be0d > > 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!