Preparing source repository
The kernel source tar is too big to put in a regular git repository, so upstream usually does not commit it. Therefore, we need to get the source files from SRPM via dnf download --source kernel
.
Remember to check the corresponding changelog with dnf changelog kernel
, or from the extracted kernel.spec
file.
In order to reduce the tar file size, xz
compression is preferred.
Versioning
- Debian tags backported packages with
~bpoXY+Z
suffix. https://packages.debian.org/bookworm-backports/kernel/linux-image-6.6.13+bpo-amd64 - Rocky Linux SIG/Security tags packages with
.security.0.X
suffix.
curl -O https://dl.rockylinux.org/pub/sig/9/security/x86_64/security-common/Packages/o/openssh-8.7p1-38.1.el9_4.security.0.7.x86_64.rpm
$ rpm -qip openssh-8.7p1-38.1.el9_4.security.0.7.x86_64.rpm
Name : openssh
Version : 8.7p1
Release : 38.1.el9_4.security.0.7
Creating a project
It is recommended to create separate projects for each kernel X.Y version you maintain.
Creating a package
If you pulled the source repo from upstream, there could be multiple *.spec
files around. Remember to specify which spec file to use, otherwise the first spec file found in lexical order will be used.
Downloading artifacts
Recursively download .rpm files with wget
.
Example
This is a build of the Linux kernel on openEuler 22.03 LTS SP4 (x86_64) with Copr. Note that .oe2203sp4
is not appended to the release string, which is different from official openEuler packages.
$ rpm -qip kernel-6.6.0-33.0.0.40.x86_64.rpm
warning: kernel-6.6.0-33.0.0.40.x86_64.rpm: Header V4 RSA/SHA256 Signature, key ID bf50dae3: NOKEY
Name : kernel
Version : 6.6.0
Release : 33.0.0.40
Architecture: x86_64
Install Date: (not installed)
Group : Unspecified
Size : 118902540
License : GPLv2
Signature : RSA/SHA256, Sun 14 Jul 2024 04:47:18 AM UTC, Key ID 03c33fb2bf50dae3
Source RPM : kernel-6.6.0-33.0.0.40.src.rpm
Build Date : Sun 14 Jul 2024 03:04:30 AM UTC
Build Host : eur-prod-workerlocal-x86-64-normal-prod-00214392-20240714-02502
Vendor : openEuler Copr - user l2dy
URL : http://www.kernel.org/
Summary : Linux Kernel
Description :
The Linux Kernel, the operating system core itself.