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
2 changes: 1 addition & 1 deletion .azldev-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0256227f5434d9e00d7c8501b16848efa400a72b
830e6fed79750f8e24ae17cd630248f50c90c8a9
38 changes: 0 additions & 38 deletions base/comps/apache-sshd/apache-sshd.comp.toml
Original file line number Diff line number Diff line change
@@ -1,40 +1,2 @@
[components.apache-sshd]

[[components.apache-sshd.overlays]]
description = "Remove maven-remote-resources-plugin (Xpp3Dom classloading clash with plexus-xml/maven4)"
type = "spec-append-lines"
section = "%prep"
lines = ["%pom_remove_plugin :maven-remote-resources-plugin"]

[[components.apache-sshd.overlays]]
description = "Add patch for maven.compiler.release POM property (xmvn javadoc fix)"
type = "patch-add"
file = "add-maven-compiler-release.patch"
source = "add-maven-compiler-release.patch"

[[components.apache-sshd.overlays]]
description = "Use %autosetup to auto-apply all patches"
type = "spec-search-replace"
regex = '%setup -q'
replacement = '%autosetup -p1'

[[components.apache-sshd.overlays]]
description = "Remove explicit %patch call now handled by %autosetup"
type = "spec-search-replace"
regex = '%patch -P0 -p1'
replacement = ''

# AZL ships only java-25-openjdk; there is no java-21-openjdk, so the
# upstream BuildRequires on maven-local-openjdk21 is unsatisfiable.
# Retarget to the openjdk25 variant.
[[components.apache-sshd.overlays]]
description = "Remove BuildRequires on maven-local-openjdk21 — AZL does not ship java-21-openjdk"
type = "spec-remove-tag"
tag = "BuildRequires"
value = "maven-local-openjdk21"

[[components.apache-sshd.overlays]]
description = "Add BuildRequires on maven-local-openjdk25 in place of maven-local-openjdk21"
type = "spec-add-tag"
tag = "BuildRequires"
value = "maven-local-openjdk25"
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
# This change works around an upstream Fedora 43 packaging bug: the installed
# versions of maven-remote-resources-plugin, plexus-utils, and plexus-xml in the
# Fedora 43 repos are mutually incompatible during the Maven 3 -> 4 transition.
# This issue has existed in Fedora 43 and fails the build. The Fedora 44 commit
# (7959d32) upgraded apache-sshd to 2.16 and disabled maven-remote-resources-plugin
# for the RPM build to avoid this issue.
# TODO: remove this overlay once pinning to f44.

[metadata]
category = "azl-compatibility"
Comment thread
liunan-ms marked this conversation as resolved.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Why? Do we have any indication of what these changes were actually doing?

@liunan-ms liunan-ms Jul 9, 2026

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

This change works around an upstream Fedora 43 packaging bug: the installed versions of maven-remote-resources-plugin, plexus-utils, and plexus-xml in the Fedora 43 repos are mutually incompatible during the Maven 3 -> 4 transition. This issue has been existing in Fedora 43 and failing the build. The Fedora 44 (commit) upgraded apache-sshd version to 2.16 and disabled maven-remote-resources-plugin for the rpm build avoid this issue. I think azl-compability is a good fit for this change with upstream-status = "upstreamed" and commits without changing the spec and rebuild, so that we can remove this overlay once pinning to f44.

upstream-status = "upstreamed"
commits = [{ url = "https://src.fedoraproject.org/rpms/apache-sshd/c/7959d325a441ae1f8aa0aaabf91eec64e06b983b?branch=f44" }]


[[overlays]]
description = "Remove maven-remote-resources-plugin (Xpp3Dom classloading clash with plexus-xml/maven4)"
type = "spec-append-lines"
section = "%prep"
lines = ["%pom_remove_plugin :maven-remote-resources-plugin"]

[[overlays]]
description = "Add patch for maven.compiler.release POM property (xmvn javadoc fix)"
type = "patch-add"
file = "add-maven-compiler-release.patch"
source = "../add-maven-compiler-release.patch"

[[overlays]]
description = "Use %autosetup to auto-apply all patches"
type = "spec-search-replace"
regex = "%setup -q"
replacement = "%autosetup -p1"

[[overlays]]
description = "Remove explicit %patch call now handled by %autosetup"
type = "spec-search-replace"
regex = "%patch -P0 -p1"
replacement = ""
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# AZL ships only java-25-openjdk; there is no java-21-openjdk, so the
# upstream BuildRequires on maven-local-openjdk21 is unsatisfiable.
# Retarget to the openjdk25 variant.

[metadata]
category = "azl-pruning"
upstream-status = "upstreamable"

[[overlays]]
description = "Remove BuildRequires on maven-local-openjdk21 — AZL does not ship java-21-openjdk"
type = "spec-remove-tag"
tag = "BuildRequires"
value = "maven-local-openjdk21"

[[overlays]]
description = "Add BuildRequires on maven-local-openjdk25 in place of maven-local-openjdk21"
type = "spec-add-tag"
tag = "BuildRequires"
value = "maven-local-openjdk25"
2 changes: 2 additions & 0 deletions base/comps/components.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
includes = ["**/*.comp.toml", "component-check-disablement.toml", "component-mingw-disablement.toml", "components-publish-channels.toml"]

[default-component-config]
overlay-files = ["overlays/*.overlay.toml"]
#
# Components imported from Fedora with no per-component modifications.
# Please keep this list sorted alphabetically for readability.
Expand Down
26 changes: 0 additions & 26 deletions base/comps/dnf5/dnf5.comp.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,29 +5,3 @@
without = [
"plugin_rhsm"
]

# Upstream packaging of dnf5 includes compatibility symlinks
# for microdnf and other earlier versions of dnf. We provide the
# same for tdnf, for the benefit of earlier customers of Azure
# Linux.
[[components.dnf5.overlays]]
description = "Report that the dnf5 package provides tdnf for compatibility"
type = "spec-add-tag"
tag = "Provides"
value = "tdnf = %{version}-%{release}"

[[components.dnf5.overlays]]
description = "Include the tdnf compat symlink in the package"
type = "spec-append-lines"
section = "%files"
lines = [
"%{_bindir}/tdnf"
]

[[components.dnf5.overlays]]
description = "Provide /usr/bin/tdnf as a compat symlink to dnf5"
type = "spec-append-lines"
section = "%install"
lines = [
"ln -sr %{buildroot}%{_bindir}/dnf5 %{buildroot}%{_bindir}/tdnf"
]
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# Upstream packaging of dnf5 includes compatibility symlinks
# for microdnf and other earlier versions of dnf. We provide the
# same for tdnf, for the benefit of earlier customers of Azure
# Linux.

[metadata]
category = "azl-compatibility"
upstream-status = "inapplicable"

[[overlays]]
description = "Report that the dnf5 package provides tdnf for compatibility"
type = "spec-add-tag"
tag = "Provides"
value = "tdnf = %{version}-%{release}"

[[overlays]]
description = "Include the tdnf compat symlink in the package"
type = "spec-append-lines"
section = "%files"
lines = ["%{_bindir}/tdnf"]

[[overlays]]
description = "Provide /usr/bin/tdnf as a compat symlink to dnf5"
type = "spec-append-lines"
section = "%install"
lines = ["ln -sr %{buildroot}%{_bindir}/dnf5 %{buildroot}%{_bindir}/tdnf"]
13 changes: 0 additions & 13 deletions base/comps/fcode-utils/fcode-utils.comp.toml
Original file line number Diff line number Diff line change
@@ -1,14 +1 @@
[components.fcode-utils]

# GCC 15 defaults to C23 where `bool` is a keyword, conflicting with the
# project's `typedef enum boolean { FALSE = 0, TRUE = -1 } bool;` in
# shared/types.h. Force C17 (with GNU extensions) as a conservative workaround
# until a new upstream release includes the fix.
# Upstream fix: https://github.com/openbios/fcode-utils/issues/20
# TODO: Remove this overlay once a new upstream release (> 1.0.3) is available.
[[components.fcode-utils.overlays]]
description = "Force -std=gnu17 to work around GCC 15 C23 bool keyword conflict (openbios/fcode-utils#20)"
type = "spec-search-replace"
section = "%build"
regex = 'CFLAGS="%\{optflags\}"'
replacement = 'CFLAGS="%{optflags} -std=gnu17"'
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# GCC 15 defaults to C23 where `bool` is a keyword, conflicting with the
# project's `typedef enum boolean { FALSE = 0, TRUE = -1 } bool;` in
# shared/types.h. Force C17 (with GNU extensions) as a conservative workaround
# until a new upstream release includes the fix.
# Upstream fix: https://github.com/openbios/fcode-utils/issues/20
# TODO: Remove this overlay once a new upstream release (> 1.0.3) is available.

[metadata]
category = "azl-temp-workaround"
upstream-status = "upstreamable"
commits = [{ url = "https://github.com/openbios/fcode-utils/commit/3fa70fef80276aab948ee6c7d10903b268d5b2d5" }]

[[overlays]]
description = "Force -std=gnu17 to work around GCC 15 C23 bool keyword conflict (openbios/fcode-utils#20)"
type = "spec-search-replace"
section = "%build"
regex = "CFLAGS=\"%\\{optflags\\}\""
replacement = "CFLAGS=\"%{optflags} -std=gnu17\""
Original file line number Diff line number Diff line change
@@ -1,24 +1,3 @@
[components.iscsi-initiator-utils]
# Release: 0.git%{shortcommit0}%{?dist}.2
release = { calculation = "manual" }

# Fedora's 0104-libiscsi-build-fixes.patch hardcodes -L../redhat-linux-build in the libiscsi
# Makefile, assuming the meson build directory is named redhat-linux-build (from Fedora's
# %{_vpath_builddir} = %{_vendor}-%{_target_os}-build where _vendor=redhat). On AZL,
# _vendor=azurelinux, so the directory is azurelinux-linux-build and the linker can't find
# libopeniscsiusr.so. Fix by parameterizing the path via a MESON_BUILDDIR make variable,
# passed from the spec using the standard %{_vpath_builddir} RPM macro.

[[components.iscsi-initiator-utils.overlays]]
description = "Replace hardcoded redhat-linux-build with $(MESON_BUILDDIR) make variable in libiscsi Makefile patch"
type = "file-search-replace"
file = "0104-libiscsi-build-fixes.patch"
regex = 'redhat-linux-build'
replacement = '$(MESON_BUILDDIR)'

[[components.iscsi-initiator-utils.overlays]]
description = "Pass MESON_BUILDDIR=%{_vpath_builddir} to make so libiscsi finds libopeniscsiusr.so in the correct meson build dir"
type = "spec-search-replace"
section = "%build"
regex = '%make_build LDFLAGS'
replacement = '%make_build MESON_BUILDDIR=%{_vpath_builddir} LDFLAGS'
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# Fedora's 0104-libiscsi-build-fixes.patch hardcodes -L../redhat-linux-build in the libiscsi
# Makefile, assuming the meson build directory is named redhat-linux-build (from Fedora's
# %{_vpath_builddir} = %{_vendor}-%{_target_os}-build where _vendor=redhat). On AZL,
# _vendor=azurelinux, so the directory is azurelinux-linux-build and the linker can't find
# libopeniscsiusr.so. Fix by parameterizing the path via a MESON_BUILDDIR make variable,
# passed from the spec using the standard %{_vpath_builddir} RPM macro.

[metadata]
category = "azl-branding-policy"
upstream-status = "upstreamable"

[[overlays]]
description = "Replace hardcoded redhat-linux-build with $(MESON_BUILDDIR) make variable in libiscsi Makefile patch"
type = "file-search-replace"
file = "0104-libiscsi-build-fixes.patch"
regex = "redhat-linux-build"
replacement = "$(MESON_BUILDDIR)"

[[overlays]]
description = "Pass MESON_BUILDDIR=%{_vpath_builddir} to make so libiscsi finds libopeniscsiusr.so in the correct meson build dir"
type = "spec-search-replace"
section = "%build"
regex = "%make_build LDFLAGS"
replacement = "%make_build MESON_BUILDDIR=%{_vpath_builddir} LDFLAGS"
92 changes: 0 additions & 92 deletions base/comps/kernel-headers/kernel-headers.comp.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,102 +16,10 @@ azl_pkgrelease = "1"
# 4th version component from the AZL kernel source (6.18.31.1).
kextraversion = "1"

[[components.kernel-headers.overlays]]
type = "spec-search-replace"
description = "Set specversion to 3-part version matching kernel's specrpmversion"
regex = "%define specversion .+"
replacement = "%define specversion 6.18.31"

[[components.kernel-headers.overlays]]
type = "spec-search-replace"
description = "Set tarfile_release to 3-part version (tarball name uses specversion.kextraversion)"
regex = "%define tarfile_release .+"
replacement = "%define tarfile_release 6.18.31"

[[components.kernel-headers.overlays]]
type = "spec-search-replace"
description = "Set specrelease to kextraversion.azl_pkgrelease.dist so the 4th version component and package release are explicit"
regex = "%define specrelease .+"
replacement = "%define specrelease %{kextraversion}.%{azl_pkgrelease}%{?dist}"

# Build deps (Fedora's spec has none since it uses pre-built headers).
[[components.kernel-headers.overlays]]
type = "spec-add-tag"
description = "Add make as a build dependency for generating headers from source"
tag = "BuildRequires"
value = "make"

[[components.kernel-headers.overlays]]
type = "spec-add-tag"
description = "Add gcc as a build dependency for generating headers from source"
tag = "BuildRequires"
value = "gcc"

[[components.kernel-headers.overlays]]
type = "spec-add-tag"
description = "Add perl as a build dependency for kernel header sanitization scripts"
tag = "BuildRequires"
value = "perl"

[[components.kernel-headers.overlays]]
type = "spec-add-tag"
description = "Add rsync as a build dependency for kernel headers_install"
tag = "BuildRequires"
value = "rsync"

# Source: use full Azure Linux kernel tarball instead of pre-built headers.
[[components.kernel-headers.overlays]]
type = "spec-update-tag"
description = "Use the Azure Linux 6.18.31.1 kernel source tarball instead of Fedora's pre-built headers tarball"
tag = "Source0"
value = "kernel-%{specversion}.%{kextraversion}.tar.gz"

[[components.kernel-headers.source-files]]
filename = "kernel-6.18.31.1.tar.gz"
hash = "1bf684812ff3fc38974dc99b3e2309cb46dc5af93ac794e79a4a4f3dd17debfadb14510aeaaa7fa2d4c6254876a9f8bc67b900a1951c8dda5d94e5f5028a7557"
hash-type = "SHA512"
origin = { type = "download", uri = "https://github.com/microsoft/CBL-Mariner-Linux-Kernel/archive/rolling-lts/azl4/6.18.31.1.tar.gz" }

# Prep: extract Azure Linux tarball.
[[components.kernel-headers.overlays]]
type = "spec-search-replace"
description = "Extract the Azure Linux 6.18.31.1 kernel source archive layout"
regex = "%setup -q -c"
replacement = "%setup -q -n CBL-Mariner-Linux-Kernel-rolling-lts-azl4-%{specversion}.%{kextraversion}"

# Build: generate native + cross headers from Azure Linux kernel source.
# Uses make headers_install which produces properly sanitized userspace headers.
# Detects native arch and cross-compiles for the other (x86_64 <-> arm64).
[[components.kernel-headers.overlays]]
type = "spec-append-lines"
section = "%build"
lines = ["""
make mrproper
make headers_install INSTALL_HDR_PATH=headers-native

# Determine native kernel arch and cross-compile for the other
native_karch=$(uname -m | sed 's/x86_64/x86/;s/aarch64/arm64/')
for cross_arch in arm64 x86; do
[ "$cross_arch" = "$native_karch" ] && continue
make ARCH=$cross_arch headers_install INSTALL_HDR_PATH=headers-$cross_arch
done"""]

# Install: copy headers_install output into RPM buildroot, replacing Fedora's copy logic.
# The exit 0 at the end short-circuits the original Fedora install logic.
[[components.kernel-headers.overlays]]
type = "spec-prepend-lines"
section = "%install"
lines = ["""
native_karch=$(uname -m | sed 's/x86_64/x86/;s/aarch64/arm64/')

mkdir -p $RPM_BUILD_ROOT%{_includedir}
cp -rv headers-native/include/* $RPM_BUILD_ROOT%{_includedir}

for cross_arch in arm64 x86; do
[ "$cross_arch" = "$native_karch" ] && continue
cross_arch_includedir=$RPM_BUILD_ROOT%{_prefix}/${cross_arch}-linux-gnu/include
mkdir -p $cross_arch_includedir
cp -rv headers-$cross_arch/include/* $cross_arch_includedir
done

exit 0"""]
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# Category azl-release-management: these edits only rewrite version-string
# macros (specversion / tarfile_release) to a 3-part version so the spec's
# version and tarball name track the AZL kernel's versioning scheme. This is
# version/release mechanics.
# upstream-status inapplicable: permanent AZL-only versioning, never sent upstream.

[metadata]
category = "azl-release-management"
upstream-status = "inapplicable"

[[overlays]]
type = "spec-search-replace"
description = "Set specversion to 3-part version matching kernel's specrpmversion"
regex = "%define specversion .+"
replacement = "%define specversion 6.18.31"

[[overlays]]
type = "spec-search-replace"
description = "Set tarfile_release to 3-part version (tarball name uses specversion.kextraversion)"
regex = "%define tarfile_release .+"
replacement = "%define tarfile_release 6.18.31"
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# Category azl-release-management: this sets the specrelease macro so the 4th version
# component and package release are explicit.
# upstream-status inapplicable: permanent AZL-only release scheme, never upstreamed.

[metadata]
category = "azl-release-management"
upstream-status = "inapplicable"

[[overlays]]
type = "spec-search-replace"
description = "Set specrelease to kextraversion.azl_pkgrelease.dist so the 4th version component and package release are explicit"
regex = "%define specrelease .+"
replacement = "%define specrelease %{kextraversion}.%{azl_pkgrelease}%{?dist}"
Loading
Loading