Hello everyone,
I’m trying to build a kernel package from the src.rpm for Arm’s AlmaLinux 10-beta. I’m new to AlmaLinux and package systems, so I would like to ask where I should get the almalinux-10-aarch64.cfg
for the mock command:
$ mock -r almalinux-10-aarch64 --rebuild kernel-6.11.0-0.rc5.23.el10.src.rpm
This command finishes with the following error:
ERROR: Could not find required config file: /etc/mock/almalinux-10-aarch64.cfg
ERROR: If you're trying to specify a path, include the .cfg extension, e.g. -r ./target.cfg
ERROR: Non-existing Mock config 'almalinux-10-aarch64'
I guess it won’t be enough just to copy the config for almalinux-9
, as it will also be necessary to provide almalinux-10.tpl
and so on, like in the example below:
[ok@pc-11278 kernel]$ cat /etc/mock/almalinux-9-aarch64.cfg
include('templates/almalinux-9.tpl')
config_opts['root'] = 'almalinux-9-aarch64'
config_opts['description'] = 'AlmaLinux 9'
config_opts['target_arch'] = 'aarch64'
config_opts['legal_host_arches'] = ('aarch64',)
How should I build the kernel.src.rpm in this case?
I assume that I can do the following: “rpmbuild -ba ~/rpmbuild/SPECS/kernel.spec” but IIUC use mock is better, isn’t it?
Another question I have is if I want to update a config, which wiil be used for kernel compilation, which defconfig should I use:
ls -la ~/rpmbuild/SOURCES/kernel-aarch64-*.config
-rw-r--r--. 1 ok ok 249242 Sep 23 02:00 /home/ok/rpmbuild/SOURCES/kernel-aarch64-64k-debug-rhel.config
-rw-r--r--. 1 ok ok 249675 Feb 17 12:12 /home/ok/rpmbuild/SOURCES/kernel-aarch64-64k-rhel.config
-rw-r--r--. 1 ok ok 249103 Sep 23 02:00 /home/ok/rpmbuild/SOURCES/kernel-aarch64-debug-rhel.config
-rw-r--r--. 1 ok ok 249547 Sep 23 02:00 /home/ok/rpmbuild/SOURCES/kernel-aarch64-rhel.config
-rw-r--r--. 1 ok ok 250914 Sep 23 02:00 /home/ok/rpmbuild/SOURCES/kernel-aarch64-rt-debug-rhel.config
-rw-r--r--. 1 ok ok 251358 Sep 23 02:00 /home/ok/rpmbuild/SOURCES/kernel-aarch64-rt-rhel.config
Thanks in advance.