Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 13 additions & 1 deletion base/comps/kernel/kernel.comp.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ without = [

[components.kernel.build.defines]
# RPM release number for the Azure Linux kernel package
azl_pkgrelease = "5"
azl_pkgrelease = "6"
Comment thread
ellie-di marked this conversation as resolved.
# 4th version component from the AZL kernel source (6.18.31.1). Included in specrelease so it appears
# in the RPM Release tag, uname -r, and /lib/modules/ path (e.g. 6.18.31-1.1.azl4.aarch64).
kextraversion = "1"
Expand Down Expand Up @@ -225,6 +225,15 @@ type = "spec-insert-tag"
tag = "Source6002"
value = "kmod-nvidia-open.inc"

[[components.kernel.overlays]]
description = "Add conditional Requires for kmod-nvidia-open to base kernel package."
type = "spec-search-replace"
regex = '^Requires:\s*\(\(%\{name\}-modules-extra-uname-r\s*=\s*%\{KVERREL\}\)\s*if\s*%\{name\}-modules-extra-matched\)$'
replacement = """Requires: ((%{name}-modules-extra-uname-r = %{KVERREL}) if %{name}-modules-extra-matched)
%ifarch x86_64 aarch64
Requires: ((kmod-nvidia-open-uname-r = %{KVERREL}) if kmod-nvidia-open-matched)
%endif"""

# --- kmod framework: phase anchor insertion ---
# These overlays insert unique sentinel comments at unconditional locations in
# the upstream spec. Per-kmod overlays below target these sentinels with
Expand Down Expand Up @@ -360,6 +369,9 @@ description = "Prepend AZL changelog entries (one per lock-fingerprint change) a
type = "spec-prepend-lines"
section = "%changelog"
lines = [
"* Wed Jul 08 2026 Elaheh Dehghani <edehghani@microsoft.com> - 6.18.31-1.6",
"- feat(kmod-nvidia-open): add kmod-nvidia-open-matched sentinel package for automatic kernel upgrade tracking",
"",
"* Wed May 27 2026 Daniel McIlvaney <damcilva@microsoft.com> - 6.18.31-1.5",
"- feat(kernel): add hand-curated changelog entry",
"",
Expand Down
14 changes: 14 additions & 0 deletions base/comps/kernel/kmod-nvidia-open.inc
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,15 @@ AutoReq: no
Provides: nvidia-open-kmod-version = %{nvidia_open_version}
provides: nvidia-kmod = %{nvidia_open_version}
Provides: kmod-%{_kmod_name} = %{version}-%{release}
Provides: kmod-nvidia-open-uname-r = %{KVERREL}
# Mark this kmod as install-only so multiple versions can coexist alongside
# their matching kernels (dnf/dnf5 default installonlypkgs includes the
# 'installonlypkg(kernel-module)' token).
Provides: installonlypkg(kernel-module)
Requires: %{name}-core-uname-r = %{KVERREL}
Requires: kmod-nvidia-open-matched = %{version}-%{release}
# TODO: Add userspace package dependency when package name/version contract is finalized.
# Requires: <nvidia-userspace-package> = %{nvidia_open_version}
Requires(post): kmod
Requires(postun): kmod
Conflicts: nvidia-closed-kmod
Expand All @@ -43,6 +47,13 @@ Each kernel version produces a separate kmod package
can coexist with their own NVIDIA modules.
Use 'Requires: nvidia-open-kmod-version = %{nvidia_open_version}' to depend on a
specific NVIDIA driver version, or 'Requires: kmod-nvidia-open' for any version.

%package -n kmod-nvidia-open-matched
Summary: Meta package to ensure kmod-nvidia-open is installed for all kernels

%description -n kmod-nvidia-open-matched
This meta package provides a single reference that other packages can Require to have kmod-nvidia-open installed for all kernels. When installed, the kernel package automatically pulls in the version-matched kmod-nvidia-open for each kernel version on this machine (x86_64 and aarch64 only).

%endif

%endif
Expand Down Expand Up @@ -138,6 +149,9 @@ install -D -m 0644 %{_builddir}/open-gpu-kernel-modules-%{nvidia_open_version}/C
/lib/modules/%{KVERREL}/extra/nvidia/nvidia-uvm.ko.%{compext}
/lib/modules/%{KVERREL}/extra/nvidia/nvidia-peermem.ko.%{compext}
%{_modprobedir}/kmod-%{_kmod_name}-%{nvidia_open_version}.conf
%files -n kmod-nvidia-open-matched
# empty sentinel package — no files

%endif

%endif
2 changes: 1 addition & 1 deletion locks/kernel.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@
version = 1
import-commit = '5271a1b047ef402ddee40242e02eda23fc273044'
upstream-commit = '5271a1b047ef402ddee40242e02eda23fc273044'
input-fingerprint = 'sha256:35fd40d8d7ed26e4e80c412fbe33499ead22ceac032a92c1be2f3c2f729f7df3'
input-fingerprint = 'sha256:1bf1167a6aed633fd9744271f8447f04c2ebe45d5c01c5cfd0dc78a5e7ed1fd8'
resolution-input-hash = 'sha256:466421704711c4fd3c71f0b2ed715a0e61d49e3e26f3a2637fee755795849c8e'
2 changes: 1 addition & 1 deletion specs/k/kernel/kernel.azl.macros
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@
# Do not edit manually; changes will be overwritten.
%_without_debug 1
%_without_selftests 1
%azl_pkgrelease 5
%azl_pkgrelease 6
%kextraversion 1
%nvidia_open_version 595.58.03
6 changes: 6 additions & 0 deletions specs/k/kernel/kernel.spec
Original file line number Diff line number Diff line change
Expand Up @@ -752,6 +752,9 @@ Requires: %{name}-core-uname-r = %{KVERREL}
Requires: %{name}-modules-uname-r = %{KVERREL}
Requires: %{name}-modules-core-uname-r = %{KVERREL}
Requires: ((%{name}-modules-extra-uname-r = %{KVERREL}) if %{name}-modules-extra-matched)
%ifarch x86_64 aarch64
Requires: ((kmod-nvidia-open-uname-r = %{KVERREL}) if kmod-nvidia-open-matched)
%endif
Provides: installonlypkg(kernel)
%endif

Expand Down Expand Up @@ -4578,6 +4581,9 @@ fi\

# AZL-KMOD-FILES-ANCHOR — do not remove (kmod overlays chain here)
%changelog
* Wed Jul 08 2026 Elaheh Dehghani <edehghani@microsoft.com> - 6.18.31-1.6
- feat(kmod-nvidia-open): add kmod-nvidia-open-matched sentinel package for automatic kernel upgrade tracking

* Wed May 27 2026 Daniel McIlvaney <damcilva@microsoft.com> - 6.18.31-1.5
- feat(kernel): add hand-curated changelog entry

Expand Down
14 changes: 14 additions & 0 deletions specs/k/kernel/kmod-nvidia-open.inc
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,15 @@ AutoReq: no
Provides: nvidia-open-kmod-version = %{nvidia_open_version}
provides: nvidia-kmod = %{nvidia_open_version}
Provides: kmod-%{_kmod_name} = %{version}-%{release}
Provides: kmod-nvidia-open-uname-r = %{KVERREL}
# Mark this kmod as install-only so multiple versions can coexist alongside
# their matching kernels (dnf/dnf5 default installonlypkgs includes the
# 'installonlypkg(kernel-module)' token).
Provides: installonlypkg(kernel-module)
Requires: %{name}-core-uname-r = %{KVERREL}
Requires: kmod-nvidia-open-matched = %{version}-%{release}
# TODO: Add userspace package dependency when package name/version contract is finalized.
# Requires: <nvidia-userspace-package> = %{nvidia_open_version}
Requires(post): kmod
Requires(postun): kmod
Conflicts: nvidia-closed-kmod
Expand All @@ -43,6 +47,13 @@ Each kernel version produces a separate kmod package
can coexist with their own NVIDIA modules.
Use 'Requires: nvidia-open-kmod-version = %{nvidia_open_version}' to depend on a
specific NVIDIA driver version, or 'Requires: kmod-nvidia-open' for any version.

%package -n kmod-nvidia-open-matched
Summary: Meta package to ensure kmod-nvidia-open is installed for all kernels

%description -n kmod-nvidia-open-matched
This meta package provides a single reference that other packages can Require to have kmod-nvidia-open installed for all kernels. When installed, the kernel package automatically pulls in the version-matched kmod-nvidia-open for each kernel version on this machine (x86_64 and aarch64 only).

%endif

%endif
Expand Down Expand Up @@ -138,6 +149,9 @@ install -D -m 0644 %{_builddir}/open-gpu-kernel-modules-%{nvidia_open_version}/C
/lib/modules/%{KVERREL}/extra/nvidia/nvidia-uvm.ko.%{compext}
/lib/modules/%{KVERREL}/extra/nvidia/nvidia-peermem.ko.%{compext}
%{_modprobedir}/kmod-%{_kmod_name}-%{nvidia_open_version}.conf
%files -n kmod-nvidia-open-matched
# empty sentinel package — no files

%endif

%endif
Loading