[elrepo] kernel-ml build instructions

Phil Perry phil at elrepo.org
Wed Aug 29 16:14:54 EDT 2018


On 29/08/18 20:46, Alan Bartlett wrote:
> On 29 August 2018 at 02:08, Andrew Gurinovich <altmind at gmail.com> wrote:
>> Hello.
>> I would like to rebuild the whole elrepo with custom compiler flags for
>> personal use.
>> Can you please suggest, how the rpms are being build right now?
> 
> I can only speak for the kernel (kernel-lt & kernel-ml) build process.
> Mock is used to provide a clean, controlled, chroot environment for
> the native OS. That is RHEL6 and RHEL7.
> 
>> When I'm trying to rpmbuild from spec files, there are no sources in
>> /home/user/rpmbuild
>> When I'm trying to build kernel-ml, there is no config file.
> 
> Install the .nosrc.rpm package into your private rpmbuild directory
> structure and drop the relevant linux-4.X.Y.tar.xz file (obtained from
> upstream, kernel.org) into you SOURCES/ directory.
> 
> Alan.

The rest of the repo is built likewise, in mock.

All kmod .src.rpms should rebuild cleanly against the latest RHEL 
kernel. There are some exceptions, notably .nosrc.rpms which do not 
contain the upstream tarball to save space/bandwidth. As Alan mentioned 
above, for any .nosrc.rpms you will need to fetch the upstream source 
tarball in addition to the .nosrc.rpm, which should always be linked 
towards the start of the SPEC file.

Generally, kmod packages do not _need_ to be built in mock as typically 
they do not link anything other than the kernel they are built against; 
anything else should always be built in mock for consistency.

Rebuilding kmod packages will result in kernel modules which are not 
signed by elrepo for Secure Boot. If you are using Secure Boot you will 
probably want to sign the modules with your own signing key. There is 
logic in the SPEC file to allow for this from the command line at build 
time. If doing this in mock, you will need to install your signing keys 
into your build root before building.

The VirtualGL-libs i686 package on el7 has hints in the SPEC file how to 
build as there is no 32-bit rhel7 tree to build against in mock.

Hope that helps.

Phil


More information about the elrepo mailing list