It’s not really a secret on how to build packages in mock. The documentation shows how. It is also not a secret where our source packages are. You can find them at our koji or our repos.
# !!! Note this uses 9.4, as that is the current latest available version. !!!
% dnf install epel-release -y
% crb enable
% dnf install mock -y
% usermod -aG mock user
% mock -r rocky-9-x86_64 /path/to/source/package.rpm
Why not use the source package or even the debuginfo packages here or here? We have all of the debug packages, source packages, and binary packages that we build available.
Rocky Linux 9.1 is no longer supported. Click here for more information.
What if I wanted to create a container with all packages already installed so mock wont have to install them? in order to make the build process faster.
Can CIQ make a video on this and put it on youtube? I believe this is something so many people would be interested to know about…maybe.
What I meant to say: it is such a common thing for companies to maintain their own kernel. But they may want to stick with the “Rocky” way to build the kernel from their own repo.
The default mock config already provides a bootstrap container that does this part of this for you. You can make your own if you wish, you would just need to point the mock config where to go. Look in /etc/mock/templates.
You should ask them directly.
Custom kernel builds are not supported. See here. I understand that companies want to have their own custom kernels, but those 6 points should be read thoroughly before ever considering so.
The default mock configuration as provided by the mock package builds against the latest Rocky Linux 9 available. It does not build against 9.1 as it is not supported. Because that kernel is about 3 releases old, that can very easily be the reason why it is not building for you. You will need to create a custom mock config that points to 9.1 in the vault if you are building for an end of life release. See here for examples.
With that said, we do not have issues building our packages using this method in any of our build systems or on our local systems.