Problems building Rocky 10 images with kiwi-ng

Ultimately, I would like to build a Rocky Linux 10 image to work with some custom Arm64 SBC hardware. I was able to modify the Raspberry Pi Rocky Linux 9 image to work with the SBC. It is up and running, but the Rocky Linux 10 image for Raspberry Pi seems to have moved to a GPT-based partitioning scheme that isn’t compatible with the SBC so I was looking at using some of the kiwi-ng tooling that I found in another post to accomplish that.

Specifically, I am trying out the instructions provided in the README.md for the r10 branch of this repository using a fresh, up-to-date Rocky Linux 10 x86_64 VM that I spun up for the image build experiments:

In going through the instructions in the README.md for the first example

and I hit a few problems. After installing rocky-release-core I couldn’t install the various kiwi packages:

$ sudo dnf install kiwi-cli git   dracut-kiwi-live   kiwi-systemdeps-{bootloaders,containers,core,disk-images,filesystems,image-validation,iso-media}
Rocky Linux 10 - SIG Core Common                                         1.3 kB/s | 939  B     00:00    
No match for argument: kiwi-cli
No match for argument: dracut-kiwi-live
No match for argument: kiwi-systemdeps-bootloaders
No match for argument: kiwi-systemdeps-containers
No match for argument: kiwi-systemdeps-core
No match for argument: kiwi-systemdeps-disk-images
No match for argument: kiwi-systemdeps-filesystems
No match for argument: kiwi-systemdeps-image-validation
No match for argument: kiwi-systemdeps-iso-media
Error: Unable to find a match: kiwi-cli dracut-kiwi-live kiwi-systemdeps-bootloaders kiwi-systemdeps-containers kiwi-systemdeps-core kiwi-systemdeps-disk-images kiwi-systemdeps-filesystems kiwi-systemdeps-image-validation kiwi-systemdeps-iso-media

After some digging around I found that the core-infra repository wasn’t enabled by default so I ran

$ sudo dnf config-manager --set-enabled core-infra

to enable that package repository.

Now when I run the same dnf install command I get:

$ sudo dnf install kiwi-cli git   dracut-kiwi-live   kiwi-systemdeps-{bootloaders,containers,core,disk-images,filesystems,image-validation,iso-media}
Rocky Linux 10 - SIG Core Infrastructure                                  13 kB/s |  14 kB     00:01    
Error: 
 Problem 1: conflicting requests
  - nothing provides dnf5 needed by kiwi-systemdeps-core-10.2.28-2.el10.core.x86_64 from core-infra
 Problem 2: package kiwi-systemdeps-iso-media-10.2.28-2.el10.core.x86_64 from core-infra requires kiwi-systemdeps-core = 10.2.28-2.el10.core, but none of the providers can be installed
  - conflicting requests
  - nothing provides dnf5 needed by kiwi-systemdeps-core-10.2.28-2.el10.core.x86_64 from core-infra
 Problem 3: package kiwi-systemdeps-bootloaders-10.2.28-2.el10.core.x86_64 from core-infra requires kiwi-systemdeps-core = 10.2.28-2.el10.core, but none of the providers can be installed
  - conflicting requests
  - nothing provides dnf5 needed by kiwi-systemdeps-core-10.2.28-2.el10.core.x86_64 from core-infra
 Problem 4: package kiwi-systemdeps-filesystems-10.2.28-2.el10.core.x86_64 from core-infra requires kiwi-systemdeps-core = 10.2.28-2.el10.core, but none of the providers can be installed
  - conflicting requests
  - nothing provides dnf5 needed by kiwi-systemdeps-core-10.2.28-2.el10.core.x86_64 from core-infra
 Problem 5: package kiwi-cli-10.2.28-2.el10.core.noarch from core-infra requires python3-kiwi = 10.2.28-2.el10.core, but none of the providers can be installed
  - package python3-kiwi-10.2.28-2.el10.core.noarch from core-infra requires kiwi-systemdeps-core = 10.2.28-2.el10.core, but none of the providers can be installed
  - conflicting requests
  - nothing provides dnf5 needed by kiwi-systemdeps-core-10.2.28-2.el10.core.x86_64 from core-infra
 Problem 6: package kiwi-systemdeps-disk-images-10.2.28-2.el10.core.x86_64 from core-infra requires kiwi-systemdeps-filesystems = 10.2.28-2.el10.core, but none of the providers can be installed
  - package kiwi-systemdeps-filesystems-10.2.28-2.el10.core.x86_64 from core-infra requires kiwi-systemdeps-core = 10.2.28-2.el10.core, but none of the providers can be installed
  - conflicting requests
  - nothing provides dnf5 needed by kiwi-systemdeps-core-10.2.28-2.el10.core.x86_64 from core-infra
(try to add '--skip-broken' to skip uninstallable packages or '--nobest' to use not only best candidate packages)

So it seems like kiwi-systemdeps-core requires dnf5. I poked around some more and couldn’t find a way to resolve that dependency.

Any suggestions?

Thanks!

Until we provide dnf5 ourselves, you will need to enable EPEL.

Thanks for the suggestion! Using the EPEL version of kiwi-ng did help.

For other people’s benefit, to test things out with the EPEL version of kiwi-ng, I built a Rocky 10 Workstation image with my Rocky 10 x86_64 VM using sudo ./live-build.sh -l Workstation -o localbuild. The build was successful (though, I haven’t actually tried running the image quite yet).

Also, I tried using the same Rocky 10 x86_64 VM to build the aarch64 image, but the sbc-build.sh script seems to assume you are on an aarch64 machine, so that didn’t work. In other words, it isn’t designed for cross-architecture builds as far as I can tell. Reading up on kiwi-ng, kiwi-ng can do cross-architecture builds by using its “boxbuild” mode

and I tried modifying the sbc-build.sh script to perform a kiwi-ng “boxbuild”. The next road block, though, that I ran into is that I couldn’t find QEMU aarch64 support for KVM for Rocky 10 x86_64. So, that seemed to be a dead end. I would need to use some other Linux distribution to make that work if I wanted to do a cross-architecture build.

So, I turned to building the Rocky 10 image for aarch64 on a Rocky 9 aarch64 machine. I did get that to succeed but I had to do one additional thing. Basically, while running the sudo ./sbc-build.sh -o localbuild -c RaspberryPi -d build command, kiwi-ng was looking for the Rocky 10 GPG keys in /etc/pki/rpm-gpg. So, I downloaded the keys from:

https://download.rockylinux.org/pub/rocky/RPM-GPG-KEY-Rocky-10

https://download.rockylinux.org/pub/rocky/RPM-GPG-KEY-Rocky-10-Testing

and placed them in /etc/pki/rpm-gpg and I was able to build the Rocky 10 Raspberry Pi image using Rocky 9 on an aarch64 machine. For good measure I also downloaded the RPM-GPG-KEY-EPEL-10 from:

https://dl.fedoraproject.org/pub/epel/RPM-GPG-KEY-EPEL-10

and placed that key in /etc/pki/rpm-gpg as well. It probably wasn’t needed, but I did it anyway. I need to work on some customizations to see if I create the image I specifically need, but at least the build succeeded.

As an additional discovery, I did notice that there is a GenericArm option for the sbc-build.sh, but that doesn’t work since it can’t find some RPM repositories that it expects to be hosted at rockyrepos.gnulab.org. Unfortunately, that host does not exist. I tried paring back the RPMs that were dependent on those RPM repositories, but I haven’t quite gotten a full image build to succeed quite yet. Still, I did make a little progress.

I apologize for a question deep in this post, but are those RPMs for the GenericArm image hosted somewhere else so we can fix the kiwi-ng build process?

Finally, I would make one suggestion for the sbc-build.sh script. Basically, the script unconditionally tries to remove the config.xml file, but if a run fails and you try to run the script again the script will fail because the config.xml file was already removed. My quick solution was as follows:

diff --git a/sbc-build.sh b/sbc-build.sh
index 98bbcee..6c4fdd4 100755
--- a/sbc-build.sh
+++ b/sbc-build.sh
@@ -84,7 +84,9 @@ function switch_repo_to_peridot() {
 }
 
 function main() {
-  /bin/rm config.xml
+  if [ -f config.xml ]; then
+    /bin/rm config.xml
+  fi
   if [ ! -f "rocky-sbc-${SBC,,}.xml" ]; then
     echo "${SBC} was not found. Is it supported?"
     exit 42

I suspect the /bin/rm line could be made /bin/rm -f config.xml so that it doesn’t fail as an alternative approach.

I started to get access to the original Git repository to make the change request, but I haven’t gotten through the whole process.

Thanks again for the help!

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.