Some packages are built with kernel-headers-4.18 instead of kernel-headers-5.10

Bug #1965831 reported by M. Vefa Bicakci
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
StarlingX
Triaged
Low
Anthony Nowell

Bug Description

Brief Description
=====================

The CentOS-based StarlingX build system builds some packages with the kernel-headers-4.18 package instead of the kernel-headers-5.10 package.

This was discovered while investigating why a package in the process of being added to StarlingX, libbnxt_re ( https://review.opendev.org/c/starlingx/kernel/+/833465 ), failed to build until near the end of the build process.

In this case, libbnxt_re depended on two sets of C language header files, some of which happened to be provided by kernel-headers and another provided by rdma-core-devel. However, because the build system includes the kernel-headers-4.18 package from CentOS 8 in the build chroot file system by default, there was a conflict between the two sets of header files, which resulted in libbnxt_re build being retried over and over until the "kernel" package would be built by the build system, which would allow the installation of kernel-headers-5.10.99 into the chroot file system, which would implicitly resolve the compatibility issue.

Severity
=====================
Minor, but this needs review.

Steps to Reproduce
=====================
Build CentOS-based StarlingX, and check the "installed_pkgs" files produced by the build system. Recall that the installed_pkgs files indicate the set of packages installed while a package is being built.

The following commands depict the issue:

$ grep --include=installed_pkgs -rs -E -e 'kernel(|-rt)-headers' ${MY_BUILD_DIR}/std/results/${USER}*-std/ | grep -F -c 4.18
179
$ grep --include=installed_pkgs -rs -E -e 'kernel(|-rt)-headers' ${MY_BUILD_DIR}/std/results/${USER}*-std/ | grep -F -c 5.10
132

Expected Behavior
=====================
Ideally, the kernel-headers package from the v5.10 kernel should be used for the builds.

Actual Behavior
=====================
As seen in the output of the grep commands above, a large number of packages are built with the v4.18 kernel's headers.

Reproducibility
=====================
This issue is very reproducible, but the results are not always exactly the same. My understanding is that as soon as the v5.10 kernel packages are built, then the resulting kernel-headers-5.10 packages are installed into the chroot/mock file system. This explains why some packages are correctly built with kernel-headers-5.10, whereas most others are built with kernel-headers-4.18.

System Configuration
=====================
Not applicable.

Branch/Pull Time/Commit
=====================
Seen with a recent StarlingX master branch build.

Last Pass
=====================
This issue was most likely introduced with the switch to the 5.10 kernel, because prior to that the kernel-headers package used by the build and the actual kernel in use by StarlingX were both acquired from CentOS, and there used to be no mismatch.

Timestamp/Logs
=====================
Please see the grep output above.

Test Activity
=====================
Developer build.

Workaround
=====================
This issue was temporarily resolved by adding an explicit dependency like the following for libbnxt_re:

BuildRequires: kernel%{?bt_ext}-headers >= 5.10

Tags: stx.build
Ghada Khalil (gkhalil)
tags: added: stx.build
Ghada Khalil (gkhalil)
Changed in starlingx:
importance: Undecided → Medium
assignee: nobody → Anthony Nowell (anowell1)
status: New → Triaged
tags: added: stx.7.0
Revision history for this message
Ghada Khalil (gkhalil) wrote :

screening: lowering the priority as this doesn't seem to have a serious impact on runtime starlingx operations. This will not hold up stx.7.0

tags: removed: stx.7.0
Changed in starlingx:
importance: Medium → Low
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.