yum-builddep command examples
yum-builddep – install missing dependencies for building an RPM package
Download and install all the RPMs needed to build the kernel RPM:
yumdownloader --source kernel && rpm2cpio kernel*src.rpm | cpio -i kernel.spec && \ yum-builddep kernel.spec
The kernel includes specific BuildRequires dependencies for different architectures. In order to make sure that those dependencies are downloaded and installed, the SRPM should be downloaded, the .spec file extracted from it and used to determine the full dependency list.