Skip to content

Commit fe9a3e4

Browse files
josephtateclaude
andcommitted
kernel-clk6.18: add ciq-kmod Requires and ship %clk_version macro
Require ciq-kmod from the kernel metapackage so the patched kmod binary (which handles xz-compressed symvers in CLK 6.x kernels) is pulled in automatically when the CLK kernel is installed. Ship /usr/lib/rpm/macros.d/macros.kernel-clk6.18 in kernel-clk6.18-devel so kmod spec files can use %clk_version to name CLK subpackages without hardcoding the kernel version string. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent 5b07720 commit fe9a3e4

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

ciq/SPECS/kernel-clk6.18.spec

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -701,6 +701,7 @@ Requires: %{name}-core-uname-r = %{KVERREL}
701701
Requires: %{name}-modules-uname-r = %{KVERREL}
702702
Requires: %{name}-modules-core-uname-r = %{KVERREL}
703703
Requires: ((%{name}-modules-extra-uname-r = %{KVERREL}) if %{name}-modules-extra-matched)
704+
Requires: ciq-kmod
704705
Provides: installonlypkg(kernel)
705706
Provides: kernel = %{specversion}-%{pkg_release}
706707
%endif
@@ -2967,6 +2968,12 @@ BuildKernel() {
29672968
mkdir -p $RPM_BUILD_ROOT/usr/src/kernels
29682969
mv $RPM_BUILD_ROOT/lib/modules/$KernelVer/build $RPM_BUILD_ROOT/$DevelDir
29692970

2971+
# Ship %clk_version macro with kernel-devel for use by kmod specs
2972+
if [ -z "$Variant" ]; then
2973+
install -D -m 0644 /dev/null $RPM_BUILD_ROOT/usr/lib/rpm/macros.d/macros.kernel-%{pkg_suffix}
2974+
printf '%%clk_version %{kernel_major_minor}\n' > $RPM_BUILD_ROOT/usr/lib/rpm/macros.d/macros.kernel-%{pkg_suffix}
2975+
fi
2976+
29702977
# This is going to create a broken link during the build, but we don't use
29712978
# it after this point. We need the link to actually point to something
29722979
# when kernel-devel is installed, and a relative link doesn't work across
@@ -4397,6 +4404,7 @@ fi\
43974404
%{expand:%%files %{?3:%{3}-}devel}\
43984405
%defverify(not mtime)\
43994406
/usr/src/kernels/%{KVERREL}%{?3:+%{3}}\
4407+
%{!?3:/usr/lib/rpm/macros.d/macros.kernel-%{pkg_suffix}}\
44004408
%{expand:%%files %{?3:%{3}-}devel-matched}\
44014409
%{expand:%%files -f kernel-%{?3:%{3}-}modules-extra.list %{?3:%{3}-}modules-extra}\
44024410
%{expand:%%files -f kernel-%{?3:%{3}-}modules-internal.list %{?3:%{3}-}modules-internal}\

0 commit comments

Comments
 (0)