S
S
Seboreia2015-08-04 12:55:21
linux
Seboreia, 2015-08-04 12:55:21

Building vanilla kernel to rpm package for centos 6.6?

Hello!
I didn't really have to build rpms, but it became necessary to use grsecurity, and for this you need to patch the kernel. The patch is applied to the vanilla core of a certain version. Actually, on the Internet they assemble a package of either the native centos kernel (using src.rpm) or via make rpm. I try the second option:
1. download the sources and unpack them in rpmbuild/BUILD
2. patch them patch -p1 < grsecurity.patch
3. configure the kernel make menuconfig (at least enable grsecurity)
4. run the build make -j 4 rpm:
5 After an hour and a half of assembly I get an error:
Processing files: kernel-3.14.49_grsec-1.x86_64
error: File not found: /home/sebor/rpmbuild/BUILDROOT/kernel-3.14.49_grsec-1.x86_64/lib/modules/ 3.14.49-grsec/build
error: File not found: /home/sebor/rpmbuild/BUILDROOT/kernel-3.14.49_grsec-1.x86_64/lib/modules/3.14.49-grsec/source
Package build errors:
File not found: /home/sebor/rpmbuild /BUILDROOT/kernel-3.14.49_grsec-1.x86_64/lib/modules/3.14.49-grsec/build
File not found: /home/sebor/rpmbuild/BUILDROOT/kernel-3.14.49_grsec-1.x86_64/lib/modules /3.14.49-grsec/source
make[1]: *** [rpm] Error 1
make: *** [rpm] Error 2
What could be the catch?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
Seboreia, 2015-08-05
@Seboreia

In general, I had to comment out the lines in the scripts/package/mkspec file before building:
echo "%post devel"
echo "ln -s /usr/src/kernels/$KERNELRELEASE /lib/modules/$KERNELRELEASE/build"
echo "ln - s /usr/src/kernels/$KERNELRELEASE /lib/modules/$KERNELRELEASE/source"
echo "%exclude /lib/modules/$KERNELRELEASE/build"
echo "%exclude /lib/modules/$KERNELRELEASE/source"
Then the package is assembled.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question