Skip to content

Conversation

NikhilDikshit
Copy link
Collaborator

@NikhilDikshit NikhilDikshit commented Apr 7, 2025

This PR is based on a new branch synced from the 6.12.15 tag of the kernel-src-tree and serves as the foundation for CIQ's custom kernel packaging and release workflows.

We're introducing a functional CIQ kernel packaging setup based on the kernel-ark infrastructure. It includes updates to Makefiles, spec templates, config stubs, and scripts to support the Rocky flavor. Major changes include enabling Rocky-specific macros, adjusting naming conventions, stubbing config generation for pre-provided configs, and integrating necessary filters and build logic. The result is a clean, modular build system tailored for CIQ’s kernel needs, with support for generating SRPMs and binary packages for the Rocky Linux target.

This commit brings in the upstream kernel-ark packaging tree.
It includes all the necessary scripts, Makefiles, and configuration
files which will be used for our CIQ kernel packaging.
Replace all hardcoded references to "redhat" with "ciq" in KABI
related scripts.
All packaging-related Makefiles and relevant variables now use
the 'ciq' prefix instead of 'redhat'. In addition, several Rocky
specific acros have been defined to ensure the build system
selects the correct configurations.
Renamed occurrences of "redhat" to "ciq" in packaging scripts.
Also enabled Rocky flavor support during spec file generation
to ensure proper macro substitution and build compatibility.
Introduced minimal stub implementations for config generation
scripts to allow builds to proceed using pre-built kernel configs.
Updated the kernel spec template to add support for Rocky flavor. This
includes adding Rocky-specific config sources, enabling the necessary
macros, and updating build-time logic to ensure compatibility with CIQ’s
kernel configuration and packaging workflow.
Added kernel.spec to the CIQ SPECS directory and captured
autogenerated filtermods logs for troubleshooting.
ciq/BugsFixed Outdated
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we know what this is for?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure. This got generated in the PR. Let me look into it.

@PlaidCat
Copy link

PlaidCat commented Apr 7, 2025

Ummm you might have issues with the .github/workflows without the larger images enabled

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should delete all of ciq/kabi/*

The commit reverts certain macros that were added during testing.
Copy link

@PlaidCat PlaidCat left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Still chunking through but here is my half way.

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should delete all of ciq/kabi/*

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should delete all of ciq/kabi/*

Makefile.rhelver Outdated
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

File name and still uses rhelver

Comment on lines +336 to +338
KABI_TARBALL:=$(CIQ)/kernel-abi-stablelists-$(SPECKABIVERSION).tar.xz
KABIDW := $(CIQ)/kabi-dwarf
KABIDW_TARBALL:=$(CIQ)/kernel-kabi-dw-$(SPECKABIVERSION).tar.xz
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Goes with last comments we can strip all the KABI stuff

ciq/Makefile Outdated
Comment on lines 387 to 404
$(REDHAT)/kabi/show-kabi -k $(REDHAT)/kabi/kabi-module/ -m \
-a $$KABIARCH -r $(RHEL_MAJOR).$(RHEL_MINOR) > $(REDHAT)/kabi/Module.kabi_$$KABIARCH;\
$(CIQ)/kabi/show-kabi -k $(CIQ)/kabi/kabi-module/ -m \
-a $$KABIARCH -r $(RHEL_MAJOR).$(RHEL_MINOR) > $(CIQ)/kabi/Module.kabi_$$KABIARCH;\
for i in {0..$(RHEL_MINOR)}; do \
mkdir -p $(REDHAT)/kabi/kabi-rhel$(RHEL_MAJOR)$$i/;\
$(REDHAT)/kabi/show-kabi -k $(REDHAT)/kabi/kabi-module/ -s -a $$KABIARCH \
-r $(RHEL_MAJOR).$$i > $(REDHAT)/kabi/kabi-rhel$(RHEL_MAJOR)$$i/kabi_stablelist_$$KABIARCH;\
mkdir -p $(CIQ)/kabi/kabi-rhel$(RHEL_MAJOR)$$i/;\
$(CIQ)/kabi/show-kabi -k $(CIQ)/kabi/kabi-module/ -s -a $$KABIARCH \
-r $(RHEL_MAJOR).$$i > $(CIQ)/kabi/kabi-rhel$(RHEL_MAJOR)$$i/kabi_stablelist_$$KABIARCH;\
done;\
done;
@(cd $(REDHAT)/kabi/ && ln -Tsf kabi-rhel$(RHEL_MAJOR)$(RHEL_MINOR) kabi-current)
@(cd $(CIQ)/kabi/ && ln -Tsf kabi-rhel$(RHEL_MAJOR)$(RHEL_MINOR) kabi-current)

dist-kabi-dup: dist-python-check
@for KABIARCH in $(ARCH_LIST); do \
touch $(REDHAT)/kabi/Module.kabi_dup_$$KABIARCH;\
if [ -d $(REDHAT)/kabi/kabi-dup-module/kabi_$$KABIARCH ]; then \
$(REDHAT)/kabi/show-kabi -k $(REDHAT)/kabi/kabi-dup-module/ -m \
touch $(CIQ)/kabi/Module.kabi_dup_$$KABIARCH;\
if [ -d $(CIQ)/kabi/kabi-dup-module/kabi_$$KABIARCH ]; then \
$(CIQ)/kabi/show-kabi -k $(CIQ)/kabi/kabi-dup-module/ -m \
-a $$KABIARCH -r $(RHEL_MAJOR).$(RHEL_MINOR) > \
$(REDHAT)/kabi/Module.kabi_dup_$$KABIARCH;\
$(CIQ)/kabi/Module.kabi_dup_$$KABIARCH;\
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Goes with last commits we can strip all the KABI stuff

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Probably unneeded

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Carry over from Fedora, we don't have Gitlab

Comment on lines 2064 to 2075
update_target=%{primary_target}
#update_target=%{primary_target}
update_target=rocky
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you define primary_target above to rocky so it should be kept that way

Comment on lines 2709 to 2720
python3 %{SOURCE151} %{SOURCE152} $KernelAddonsDirOut virt %{primary_target} %{_target_cpu}
python3 %{SOURCE151} %{SOURCE152} $KernelAddonsDirOut virt rocky %{_target_cpu}
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See above

Copy link

@PlaidCat PlaidCat left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we actually want any for the RHEL keys in our kernel?

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We don't use Koji can probably nuke this unless we want it for reference

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Drop this we likely didn't do any of this

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These are Fedora versions I believe ... we might want this if we're going to to Rocky9 and Rocky10 UserSapces

Since CIQ does not use the same Config generation system as
Fedora/RedHat and we do make olddefconfig to catch new and changed
configs from upstream we do not have some of the markers that
Fedora/RedHat have in their config. Our condition is a little easier we
only support aarch64 and x86_64, however the upstream kernel knows
aarch64 as arm64 so you can't use _cput_target directly.  In this case
we have a simple if else.  Should we need anything more complex than
this single if statement we need to scrape the arch out of the config
headers.
@NikhilDikshit
Copy link
Collaborator Author

Internal follow-up tickets have been created to address the comments raised on this PR.

elguero added 2 commits April 9, 2025 12:26
This commit adds the secure boot certs and macros for building our kernel on our
secure boot builders.

Signed-off-by: Michael L. Young <[email protected]>

LE-2746
Adding CIQ secure boot to the kernel spec template
@josephtate josephtate closed this Apr 9, 2025
@josephtate josephtate deleted the linux-6.12.y branch April 9, 2025 20:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

5 participants