diff --git a/.azldev-version b/.azldev-version index 95552389490..cad168e1ff6 100644 --- a/.azldev-version +++ b/.azldev-version @@ -1 +1 @@ -0256227f5434d9e00d7c8501b16848efa400a72b +35d8fae562980db7bda057d79322cc51ddad8d62 diff --git a/base/comps/apache-sshd/apache-sshd.comp.toml b/base/comps/apache-sshd/apache-sshd.comp.toml index b1bf4840112..53d729fcaa9 100644 --- a/base/comps/apache-sshd/apache-sshd.comp.toml +++ b/base/comps/apache-sshd/apache-sshd.comp.toml @@ -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" diff --git a/base/comps/apache-sshd/overlays/0001-remove-maven-remote-resources.overlay.toml b/base/comps/apache-sshd/overlays/0001-remove-maven-remote-resources.overlay.toml new file mode 100644 index 00000000000..02aa819bb11 --- /dev/null +++ b/base/comps/apache-sshd/overlays/0001-remove-maven-remote-resources.overlay.toml @@ -0,0 +1,26 @@ +[metadata] +category = "azl-compatibility" + +[[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 = "" diff --git a/base/comps/apache-sshd/overlays/0002-remove-buildrequires-maven-local.overlay.toml b/base/comps/apache-sshd/overlays/0002-remove-buildrequires-maven-local.overlay.toml new file mode 100644 index 00000000000..51c20cb919c --- /dev/null +++ b/base/comps/apache-sshd/overlays/0002-remove-buildrequires-maven-local.overlay.toml @@ -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" +upstreamable = false + +[[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" diff --git a/base/comps/dnf5/dnf5.comp.toml b/base/comps/dnf5/dnf5.comp.toml index 9b03f062f6e..2fbe9680418 100644 --- a/base/comps/dnf5/dnf5.comp.toml +++ b/base/comps/dnf5/dnf5.comp.toml @@ -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" -] diff --git a/base/comps/dnf5/overlays/0001-report-dnf5-package-provides.overlay.toml b/base/comps/dnf5/overlays/0001-report-dnf5-package-provides.overlay.toml new file mode 100644 index 00000000000..59bd10a2552 --- /dev/null +++ b/base/comps/dnf5/overlays/0001-report-dnf5-package-provides.overlay.toml @@ -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" +upstreamable = false + +[[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"] diff --git a/base/comps/fcode-utils/fcode-utils.comp.toml b/base/comps/fcode-utils/fcode-utils.comp.toml index d2176573b7f..213f86ee896 100644 --- a/base/comps/fcode-utils/fcode-utils.comp.toml +++ b/base/comps/fcode-utils/fcode-utils.comp.toml @@ -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"' diff --git a/base/comps/fcode-utils/overlays/0001-force-std-gnu17-work.overlay.toml b/base/comps/fcode-utils/overlays/0001-force-std-gnu17-work.overlay.toml new file mode 100644 index 00000000000..e9aa9c4fe76 --- /dev/null +++ b/base/comps/fcode-utils/overlays/0001-force-std-gnu17-work.overlay.toml @@ -0,0 +1,17 @@ +# 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-compatibility" +upstreamable = true + +[[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\"" diff --git a/base/comps/iscsi-initiator-utils/iscsi-initiator-utils.comp.toml b/base/comps/iscsi-initiator-utils/iscsi-initiator-utils.comp.toml index 4c0779aec09..70d7141a8fc 100644 --- a/base/comps/iscsi-initiator-utils/iscsi-initiator-utils.comp.toml +++ b/base/comps/iscsi-initiator-utils/iscsi-initiator-utils.comp.toml @@ -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' diff --git a/base/comps/iscsi-initiator-utils/overlays/0001-replace-hardcoded-redhat-build.overlay.toml b/base/comps/iscsi-initiator-utils/overlays/0001-replace-hardcoded-redhat-build.overlay.toml new file mode 100644 index 00000000000..309518db78f --- /dev/null +++ b/base/comps/iscsi-initiator-utils/overlays/0001-replace-hardcoded-redhat-build.overlay.toml @@ -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-compatibility" +upstreamable = true + +[[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" diff --git a/base/comps/kernel-headers/kernel-headers.comp.toml b/base/comps/kernel-headers/kernel-headers.comp.toml index 1ff231aa549..c6b6a4c0020 100644 --- a/base/comps/kernel-headers/kernel-headers.comp.toml +++ b/base/comps/kernel-headers/kernel-headers.comp.toml @@ -16,56 +16,6 @@ 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" @@ -73,45 +23,3 @@ 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"""] diff --git a/base/comps/kernel-headers/overlays/0001-set-specversion-3-part.overlay.toml b/base/comps/kernel-headers/overlays/0001-set-specversion-3-part.overlay.toml new file mode 100644 index 00000000000..ba30a9c3c51 --- /dev/null +++ b/base/comps/kernel-headers/overlays/0001-set-specversion-3-part.overlay.toml @@ -0,0 +1,15 @@ +[metadata] +category = "azl-platform-adaptation" +upstreamable = false + +[[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" diff --git a/base/comps/kernel-headers/overlays/0002-set-specrelease-kextraversion-pkgrelease.overlay.toml b/base/comps/kernel-headers/overlays/0002-set-specrelease-kextraversion-pkgrelease.overlay.toml new file mode 100644 index 00000000000..5cf46810706 --- /dev/null +++ b/base/comps/kernel-headers/overlays/0002-set-specrelease-kextraversion-pkgrelease.overlay.toml @@ -0,0 +1,9 @@ +[metadata] +category = "azl-release-management" +upstreamable = false + +[[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}" diff --git a/base/comps/kernel-headers/overlays/0003-add-make-build-dependency.overlay.toml b/base/comps/kernel-headers/overlays/0003-add-make-build-dependency.overlay.toml new file mode 100644 index 00000000000..d0655df8546 --- /dev/null +++ b/base/comps/kernel-headers/overlays/0003-add-make-build-dependency.overlay.toml @@ -0,0 +1,29 @@ +# Build deps (Fedora's spec has none since it uses pre-built headers). + +[metadata] +category = "azl-compatibility" +upstreamable = false + +[[overlays]] +type = "spec-add-tag" +description = "Add make as a build dependency for generating headers from source" +tag = "BuildRequires" +value = "make" + +[[overlays]] +type = "spec-add-tag" +description = "Add gcc as a build dependency for generating headers from source" +tag = "BuildRequires" +value = "gcc" + +[[overlays]] +type = "spec-add-tag" +description = "Add perl as a build dependency for kernel header sanitization scripts" +tag = "BuildRequires" +value = "perl" + +[[overlays]] +type = "spec-add-tag" +description = "Add rsync as a build dependency for kernel headers_install" +tag = "BuildRequires" +value = "rsync" diff --git a/base/comps/kernel-headers/overlays/0004-6-18-31-1.overlay.toml b/base/comps/kernel-headers/overlays/0004-6-18-31-1.overlay.toml new file mode 100644 index 00000000000..0aa82d883e8 --- /dev/null +++ b/base/comps/kernel-headers/overlays/0004-6-18-31-1.overlay.toml @@ -0,0 +1,18 @@ +# Source: use full Azure Linux kernel tarball instead of pre-built headers. + +[metadata] +category = "azl-platform-adaptation" +upstreamable = false + +[[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" + +# Prep: extract Azure Linux tarball. +[[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}" diff --git a/base/comps/kernel-headers/overlays/0005-build-generate-native-cross.overlay.toml b/base/comps/kernel-headers/overlays/0005-build-generate-native-cross.overlay.toml new file mode 100644 index 00000000000..7741121d50f --- /dev/null +++ b/base/comps/kernel-headers/overlays/0005-build-generate-native-cross.overlay.toml @@ -0,0 +1,19 @@ +# 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). + +[metadata] +category = "azl-platform-adaptation" +upstreamable = false + +[[overlays]] +type = "spec-append-lines" +section = "%build" +lines = ["make mrproper\nmake headers_install INSTALL_HDR_PATH=headers-native\n\n# Determine native kernel arch and cross-compile for the other\nnative_karch=$(uname -m | sed 's/x86_64/x86/;s/aarch64/arm64/')\nfor cross_arch in arm64 x86; do\n [ \"$cross_arch\" = \"$native_karch\" ] && continue\n make ARCH=$cross_arch headers_install INSTALL_HDR_PATH=headers-$cross_arch\ndone"] + +# 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. +[[overlays]] +type = "spec-prepend-lines" +section = "%install" +lines = ["native_karch=$(uname -m | sed 's/x86_64/x86/;s/aarch64/arm64/')\n\nmkdir -p $RPM_BUILD_ROOT%{_includedir}\ncp -rv headers-native/include/* $RPM_BUILD_ROOT%{_includedir}\n\nfor cross_arch in arm64 x86; do\n [ \"$cross_arch\" = \"$native_karch\" ] && continue\n cross_arch_includedir=$RPM_BUILD_ROOT%{_prefix}/${cross_arch}-linux-gnu/include\n mkdir -p $cross_arch_includedir\n cp -rv headers-$cross_arch/include/* $cross_arch_includedir\ndone\n\nexit 0"] diff --git a/base/comps/libspf2/libspf2.comp.toml b/base/comps/libspf2/libspf2.comp.toml index 690de4db728..29344eb9d9c 100644 --- a/base/comps/libspf2/libspf2.comp.toml +++ b/base/comps/libspf2/libspf2.comp.toml @@ -1,47 +1,3 @@ [components.libspf2] # Release: 19.20210922git%{git}%{?dist} release = { calculation = "manual" } - -# Fix noarch rpmdiff failure in the -apidocs subpackage. -# -# Root cause: the upstream spec enables doxygen SHORT_NAMES=YES via sed in -# %build. SHORT_NAMES replaces all output filenames with a global counter -# (a00001, a00002, ...) assigned by convertNameToFile() in doxygen. The -# counter order depends on readdir() traversal and multi-threaded output -# generation (ThreadPool + hash-based containers), making it nondeterministic -# across hosts/architectures. AZL's x86_64 and aarch64 builders produce -# different filename sequences, triggering Koji's noarch rpmdiff check. -# -# Fix approach (two layers): -# 1. Remove the sed that enables SHORT_NAMES — doxygen's default (NO) derives -# filenames from symbol names, which is fully deterministic. -# 2. Disable CALL_GRAPH in Doxyfile.in — even with deterministic filenames, -# graphviz-generated graph images (SVG/PNG) can have nondeterministic -# content due to layout differences across architectures. Removing call -# graphs eliminates this second source of divergence. The HTML pages, -# class/file indexes, and all textual content are unaffected. - -# Layer 1: Neutralize SHORT_NAMES=YES — keep the default (NO) for deterministic filenames -[[components.libspf2.overlays]] -type = "spec-search-replace" -section = "%build" -description = "Disable SHORT_NAMES override — counter-based naming is nondeterministic across architectures, causing noarch rpmdiff failures" -regex = 'sed -i -e .+SHORT_NAMES.+Doxyfile' -replacement = '# SHORT_NAMES left at default (NO) for reproducible noarch builds' - -# Layer 2: Disable call graphs to avoid nondeterministic graphviz output -[[components.libspf2.overlays]] -type = "patch-add" -description = "Disable doxygen CALL_GRAPH to remove nondeterministic graphviz-generated images from noarch -apidocs" -source = "disable-call-graphs.patch" - -# The spec uses explicit %patch calls (not %autopatch/%patchlist), so patch-add -# only registers the Patch tag — we need to apply it ourselves. -# Patch4 because upstream has Patch1-3; patch-add auto-assigns the next number. -[[components.libspf2.overlays]] -type = "spec-append-lines" -section = "%prep" -description = "Apply the disable-call-graphs patch" -lines = [ - "%patch -P4 -p1", -] diff --git a/base/comps/libspf2/overlays/0001-disable-short-names-override.overlay.toml b/base/comps/libspf2/overlays/0001-disable-short-names-override.overlay.toml new file mode 100644 index 00000000000..333f77f27ee --- /dev/null +++ b/base/comps/libspf2/overlays/0001-disable-short-names-override.overlay.toml @@ -0,0 +1,37 @@ +# Fix noarch rpmdiff failure in the -apidocs subpackage. +# +# Root cause: the upstream spec enables doxygen SHORT_NAMES=YES via sed in +# %build. SHORT_NAMES replaces all output filenames with a global counter +# (a00001, a00002, ...) assigned by convertNameToFile() in doxygen. The +# counter order depends on readdir() traversal and multi-threaded output +# generation (ThreadPool + hash-based containers), making it nondeterministic +# across hosts/architectures. AZL's x86_64 and aarch64 builders produce +# different filename sequences, triggering Koji's noarch rpmdiff check. +# +# Fix approach (two layers): +# 1. Remove the sed that enables SHORT_NAMES — doxygen's default (NO) derives +# filenames from symbol names, which is fully deterministic. +# 2. Disable CALL_GRAPH in Doxyfile.in — even with deterministic filenames, +# graphviz-generated graph images (SVG/PNG) can have nondeterministic +# content due to layout differences across architectures. Removing call +# graphs eliminates this second source of divergence. The HTML pages, +# class/file indexes, and all textual content are unaffected. + +# Layer 1: Neutralize SHORT_NAMES=YES — keep the default (NO) for deterministic filenames + +[metadata] +category = "azl-compatibility" +upstreamable = true + +[[overlays]] +type = "spec-search-replace" +section = "%build" +description = "Disable SHORT_NAMES override — counter-based naming is nondeterministic across architectures, causing noarch rpmdiff failures" +regex = "sed -i -e .+SHORT_NAMES.+Doxyfile" +replacement = "# SHORT_NAMES left at default (NO) for reproducible noarch builds" + +# Layer 2: Disable call graphs to avoid nondeterministic graphviz output +[[overlays]] +type = "patch-add" +description = "Disable doxygen CALL_GRAPH to remove nondeterministic graphviz-generated images from noarch -apidocs" +source = "../disable-call-graphs.patch" diff --git a/base/comps/libspf2/overlays/0002-apply-disable-call-graphs.overlay.toml b/base/comps/libspf2/overlays/0002-apply-disable-call-graphs.overlay.toml new file mode 100644 index 00000000000..0b38e900fe1 --- /dev/null +++ b/base/comps/libspf2/overlays/0002-apply-disable-call-graphs.overlay.toml @@ -0,0 +1,13 @@ +# The spec uses explicit %patch calls (not %autopatch/%patchlist), so patch-add +# only registers the Patch tag — we need to apply it ourselves. +# Patch4 because upstream has Patch1-3; patch-add auto-assigns the next number. + +[metadata] +category = "azl-compatibility" +upstreamable = true + +[[overlays]] +type = "spec-append-lines" +section = "%prep" +description = "Apply the disable-call-graphs patch" +lines = ["%patch -P4 -p1"] diff --git a/base/comps/libyang/libyang.comp.toml b/base/comps/libyang/libyang.comp.toml index 3ceb2c6d0d9..4ff4adaf37b 100644 --- a/base/comps/libyang/libyang.comp.toml +++ b/base/comps/libyang/libyang.comp.toml @@ -1,12 +1 @@ [components.libyang] - -# The spec hardcodes "pushd redhat-linux-build" in %check, assuming the CMake build directory -# is named redhat-linux-build (Fedora's %{_vpath_builddir} where _vendor=redhat). On AZL, -# _vendor=azurelinux, so the directory is azurelinux-linux-build. Replace with the standard -# %{_vpath_builddir} RPM macro. -[[components.libyang.overlays]] -description = "Replace hardcoded redhat-linux-build with %{_vpath_builddir} in %check so ctest finds the CMake build dir on AZL" -type = "spec-search-replace" -section = "%check" -regex = 'redhat-linux-build' -replacement = '%{_vpath_builddir}' diff --git a/base/comps/libyang/overlays/0001-replace-hardcoded-redhat-build.overlay.toml b/base/comps/libyang/overlays/0001-replace-hardcoded-redhat-build.overlay.toml new file mode 100644 index 00000000000..10ce58d965d --- /dev/null +++ b/base/comps/libyang/overlays/0001-replace-hardcoded-redhat-build.overlay.toml @@ -0,0 +1,15 @@ +# The spec hardcodes "pushd redhat-linux-build" in %check, assuming the CMake build directory +# is named redhat-linux-build (Fedora's %{_vpath_builddir} where _vendor=redhat). On AZL, +# _vendor=azurelinux, so the directory is azurelinux-linux-build. Replace with the standard +# %{_vpath_builddir} RPM macro. + +[metadata] +category = "azl-compatibility" +upstreamable = true + +[[overlays]] +description = "Replace hardcoded redhat-linux-build with %{_vpath_builddir} in %check so ctest finds the CMake build dir on AZL" +type = "spec-search-replace" +section = "%check" +regex = "redhat-linux-build" +replacement = "%{_vpath_builddir}" diff --git a/base/comps/llvm/llvm.comp.toml b/base/comps/llvm/llvm.comp.toml index 77f4ef4d66d..e5852a6e389 100644 --- a/base/comps/llvm/llvm.comp.toml +++ b/base/comps/llvm/llvm.comp.toml @@ -6,21 +6,3 @@ # due to missing /proc/sys/kernel tunables and cgroup support for threads/forks. build.without = ["mlir", "check"] -[[components.llvm.overlays]] -description = "Use the Azure Linux GCC toolchain triple in clang's default config so clang can find gcc runtime files in stage2 builds" -type = "spec-search-replace" -regex = '%global cfg_file_content --gcc-triple=%{_target_cpu}-redhat-linux' -replacement = '%global cfg_file_content --gcc-triple=%{_target_cpu}-%{_vendor}-linux' - -# Patch the fallback triples to include azurelinux. -# When clang's config files are not present, it will fall back to a set of hardcoded triples, which don't include azurelinux. -[[components.llvm.overlays]] -description = "Patch fallback triples to include azurelinux." -type = "patch-add" -source = "0001-Clang-Add-azurelinux-to-fallback-triples.patch" - -[[components.llvm.overlays]] -description = "Manually add above patch, because llvm uses some advanced %autopatch and doesn't pick this up automatically." -type = "spec-append-lines" -section = "%prep" -lines = ["%patch -p1 -P2202"] diff --git a/base/comps/llvm/overlays/0001-gcc-toolchain-triple-clang.overlay.toml b/base/comps/llvm/overlays/0001-gcc-toolchain-triple-clang.overlay.toml new file mode 100644 index 00000000000..7e306c53d74 --- /dev/null +++ b/base/comps/llvm/overlays/0001-gcc-toolchain-triple-clang.overlay.toml @@ -0,0 +1,9 @@ +[metadata] +category = "azl-compatibility" +upstreamable = false + +[[overlays]] +description = "Use the Azure Linux GCC toolchain triple in clang's default config so clang can find gcc runtime files in stage2 builds" +type = "spec-search-replace" +regex = "%global cfg_file_content --gcc-triple=%{_target_cpu}-redhat-linux" +replacement = "%global cfg_file_content --gcc-triple=%{_target_cpu}-%{_vendor}-linux" diff --git a/base/comps/llvm/overlays/0002-patch-fallback-triples-include.overlay.toml b/base/comps/llvm/overlays/0002-patch-fallback-triples-include.overlay.toml new file mode 100644 index 00000000000..45e2d8cc92a --- /dev/null +++ b/base/comps/llvm/overlays/0002-patch-fallback-triples-include.overlay.toml @@ -0,0 +1,17 @@ +# Patch the fallback triples to include azurelinux. +# When clang's config files are not present, it will fall back to a set of hardcoded triples, which don't include azurelinux. + +[metadata] +category = "azl-compatibility" +upstreamable = true + +[[overlays]] +description = "Patch fallback triples to include azurelinux." +type = "patch-add" +source = "../0001-Clang-Add-azurelinux-to-fallback-triples.patch" + +[[overlays]] +description = "Manually add above patch, because llvm uses some advanced %autopatch and doesn't pick this up automatically." +type = "spec-append-lines" +section = "%prep" +lines = ["%patch -p1 -P2202"] diff --git a/base/comps/llvm20/llvm20.comp.toml b/base/comps/llvm20/llvm20.comp.toml index 7714777938a..4e88b6654a8 100644 --- a/base/comps/llvm20/llvm20.comp.toml +++ b/base/comps/llvm20/llvm20.comp.toml @@ -4,21 +4,3 @@ # due to missing /proc/sys/kernel tunables and cgroup support for threads/forks. build.without = ["mlir", "check"] -[[components.llvm20.overlays]] -description = "Use the Azure Linux GCC toolchain triple in clang20's default config so clang20 can find gcc runtime files in stage2 builds" -type = "spec-search-replace" -regex = '%global cfg_file_content --gcc-triple=%{_target_cpu}-redhat-linux' -replacement = '%global cfg_file_content --gcc-triple=%{_target_cpu}-%{_vendor}-linux' - -# Patch the fallback triples to include azurelinux. -# When clang's config files are not present, it will fall back to a set of hardcoded triples, which don't include azurelinux. -[[components.llvm20.overlays]] -description = "Patch fallback triples to include azurelinux." -type = "patch-add" -source = "0001-Clang-Add-azurelinux-to-fallback-triples.patch" - -[[components.llvm20.overlays]] -description = "Manually add above patch, because llvm uses some advanced %autopatch and doesn't pick this up automatically." -type = "spec-append-lines" -section = "%prep" -lines = ["%patch -p1 -P2202"] diff --git a/base/comps/llvm20/overlays/0001-gcc-toolchain-triple-clang20.overlay.toml b/base/comps/llvm20/overlays/0001-gcc-toolchain-triple-clang20.overlay.toml new file mode 100644 index 00000000000..ddd2dabb200 --- /dev/null +++ b/base/comps/llvm20/overlays/0001-gcc-toolchain-triple-clang20.overlay.toml @@ -0,0 +1,9 @@ +[metadata] +category = "azl-compatibility" +upstreamable = false + +[[overlays]] +description = "Use the Azure Linux GCC toolchain triple in clang20's default config so clang20 can find gcc runtime files in stage2 builds" +type = "spec-search-replace" +regex = "%global cfg_file_content --gcc-triple=%{_target_cpu}-redhat-linux" +replacement = "%global cfg_file_content --gcc-triple=%{_target_cpu}-%{_vendor}-linux" diff --git a/base/comps/llvm20/overlays/0002-patch-fallback-triples-include.overlay.toml b/base/comps/llvm20/overlays/0002-patch-fallback-triples-include.overlay.toml new file mode 100644 index 00000000000..45e2d8cc92a --- /dev/null +++ b/base/comps/llvm20/overlays/0002-patch-fallback-triples-include.overlay.toml @@ -0,0 +1,17 @@ +# Patch the fallback triples to include azurelinux. +# When clang's config files are not present, it will fall back to a set of hardcoded triples, which don't include azurelinux. + +[metadata] +category = "azl-compatibility" +upstreamable = true + +[[overlays]] +description = "Patch fallback triples to include azurelinux." +type = "patch-add" +source = "../0001-Clang-Add-azurelinux-to-fallback-triples.patch" + +[[overlays]] +description = "Manually add above patch, because llvm uses some advanced %autopatch and doesn't pick this up automatically." +type = "spec-append-lines" +section = "%prep" +lines = ["%patch -p1 -P2202"] diff --git a/base/comps/mock-core-configs/mock-core-configs.comp.toml b/base/comps/mock-core-configs/mock-core-configs.comp.toml index 0d077e35b0c..cc20b315ef5 100644 --- a/base/comps/mock-core-configs/mock-core-configs.comp.toml +++ b/base/comps/mock-core-configs/mock-core-configs.comp.toml @@ -1,90 +1 @@ [components.mock-core-configs] - -# Bump release to reflect Azure Linux customizations. -[[components.mock-core-configs.overlays]] -description = "Bump Release to reflect Azure Linux customizations" -type = "spec-update-tag" -tag = "Release" -value = "3%{?dist}" - -# -# Add the Azure Linux 4.0 mock configs and template. -# These files ship the chroot definition that lets users run -# `mock ` on an Azure Linux 4.0 host and produce AZL4 RPMs. -# - -[[components.mock-core-configs.overlays]] -description = "Add Azure Linux 4.0 mock chroot template (azure-linux-4.tpl)" -type = "file-add" -file = "azure-linux-4.tpl" -source = "azure-linux-4.tpl" - -[[components.mock-core-configs.overlays]] -description = "Add Azure Linux 4.0 mock config for x86_64" -type = "file-add" -file = "azure-linux-4-x86_64.cfg" -source = "azure-linux-4-x86_64.cfg" - -[[components.mock-core-configs.overlays]] -description = "Add Azure Linux 4.0 mock config for aarch64" -type = "file-add" -file = "azure-linux-4-aarch64.cfg" -source = "azure-linux-4-aarch64.cfg" - -# Register the new files as additional Sources so they land in the SRPM. -# Use explicit source numbers (rather than positional `Source:`) so that -# `%{SOURCE10}`/`%{SOURCE11}`/`%{SOURCE12}` references in %install stay correct -# even if upstream adds or reorders sources. This is also what the Fedora -# Packaging Guidelines recommend over `%{_sourcedir}/...` for robustness. -# We offset to Source10+ so we have headroom in case upstream ever adds -# additional low-numbered sources. -[[components.mock-core-configs.overlays]] -description = "Register azure-linux-4.tpl as Source10" -type = "spec-insert-tag" -tag = "Source10" -value = "azure-linux-4.tpl" - -[[components.mock-core-configs.overlays]] -description = "Register azure-linux-4-x86_64.cfg as Source11" -type = "spec-insert-tag" -tag = "Source11" -value = "azure-linux-4-x86_64.cfg" - -[[components.mock-core-configs.overlays]] -description = "Register azure-linux-4-aarch64.cfg as Source12" -type = "spec-insert-tag" -tag = "Source12" -value = "azure-linux-4-aarch64.cfg" - -# Install the new config files into the buildroot. The upstream %install -# auto-builds the %files manifest by find(1)-ing under %{buildroot}, but -# since spec-append-lines runs us *after* that find we explicitly echo our -# files into the same .cfgs manifest the spec uses for %files. -[[components.mock-core-configs.overlays]] -description = "Install Azure Linux 4.0 configs and add them to the %files manifest" -type = "spec-append-lines" -section = "%install" -lines = [ - "", - "# Azure Linux 4.0 configs (added by azldev overlay).", - "install -m 0644 %{SOURCE10} %{buildroot}%{_sysconfdir}/mock/templates/azure-linux-4.tpl", - "install -m 0644 %{SOURCE11} %{buildroot}%{_sysconfdir}/mock/azure-linux-4-x86_64.cfg", - "install -m 0644 %{SOURCE12} %{buildroot}%{_sysconfdir}/mock/azure-linux-4-aarch64.cfg", - "echo \"%%config(noreplace) %{_sysconfdir}/mock/templates/azure-linux-4.tpl\" >> %{name}.cfgs", - "echo \"%%config(noreplace) %{_sysconfdir}/mock/azure-linux-4-x86_64.cfg\" >> %{name}.cfgs", - "echo \"%%config(noreplace) %{_sysconfdir}/mock/azure-linux-4-aarch64.cfg\" >> %{name}.cfgs", -] - -# Override the fedora-derived $cfg value computed by upstream %post so that -# default.cfg points at our azure-linux-* config. Since this RPM only ships -# on Azure Linux, we don't need a build-time guard. We anchor on the -# single-line existence-check that immediately follows the upstream %if -# blocks (overlays don't support multi-line regexes) and inject our -# assignment just before it; this also suppresses the otherwise-spurious -# "fedora-4-x86_64.cfg does not exist" warning at install time. -[[components.mock-core-configs.overlays]] -description = "Set $cfg to azure-linux config in %post before existence check" -type = "spec-search-replace" -section = "%post" -regex = 'if \[ -e %\{_sysconfdir\}/mock/\$cfg \]; then' -replacement = "cfg=azure-linux-$ver-$mock_arch.cfg\n\nif [ -e %{_sysconfdir}/mock/$cfg ]; then" diff --git a/base/comps/mock-core-configs/overlays/0001-bump-release-reflect-customizations.overlay.toml b/base/comps/mock-core-configs/overlays/0001-bump-release-reflect-customizations.overlay.toml new file mode 100644 index 00000000000..d90cdd8b6f6 --- /dev/null +++ b/base/comps/mock-core-configs/overlays/0001-bump-release-reflect-customizations.overlay.toml @@ -0,0 +1,11 @@ +# Bump release to reflect Azure Linux customizations. + +[metadata] +category = "azl-release-management" +upstreamable = false + +[[overlays]] +description = "Bump Release to reflect Azure Linux customizations" +type = "spec-update-tag" +tag = "Release" +value = "3%{?dist}" diff --git a/base/comps/mock-core-configs/overlays/0002-add-4-0-mock.overlay.toml b/base/comps/mock-core-configs/overlays/0002-add-4-0-mock.overlay.toml new file mode 100644 index 00000000000..b50ec0e52f8 --- /dev/null +++ b/base/comps/mock-core-configs/overlays/0002-add-4-0-mock.overlay.toml @@ -0,0 +1,76 @@ +# +# Add the Azure Linux 4.0 mock configs and template. +# These files ship the chroot definition that lets users run +# `mock ` on an Azure Linux 4.0 host and produce AZL4 RPMs. +# + +[metadata] +category = "azl-compatibility" +upstreamable = false + +[[overlays]] +description = "Add Azure Linux 4.0 mock chroot template (azure-linux-4.tpl)" +type = "file-add" +file = "azure-linux-4.tpl" +source = "../azure-linux-4.tpl" + +[[overlays]] +description = "Add Azure Linux 4.0 mock config for x86_64" +type = "file-add" +file = "azure-linux-4-x86_64.cfg" +source = "../azure-linux-4-x86_64.cfg" + +[[overlays]] +description = "Add Azure Linux 4.0 mock config for aarch64" +type = "file-add" +file = "azure-linux-4-aarch64.cfg" +source = "../azure-linux-4-aarch64.cfg" + +# Register the new files as additional Sources so they land in the SRPM. +# Use explicit source numbers (rather than positional `Source:`) so that +# `%{SOURCE10}`/`%{SOURCE11}`/`%{SOURCE12}` references in %install stay correct +# even if upstream adds or reorders sources. This is also what the Fedora +# Packaging Guidelines recommend over `%{_sourcedir}/...` for robustness. +# We offset to Source10+ so we have headroom in case upstream ever adds +# additional low-numbered sources. +[[overlays]] +description = "Register azure-linux-4.tpl as Source10" +type = "spec-insert-tag" +tag = "Source10" +value = "azure-linux-4.tpl" + +[[overlays]] +description = "Register azure-linux-4-x86_64.cfg as Source11" +type = "spec-insert-tag" +tag = "Source11" +value = "azure-linux-4-x86_64.cfg" + +[[overlays]] +description = "Register azure-linux-4-aarch64.cfg as Source12" +type = "spec-insert-tag" +tag = "Source12" +value = "azure-linux-4-aarch64.cfg" + +# Install the new config files into the buildroot. The upstream %install +# auto-builds the %files manifest by find(1)-ing under %{buildroot}, but +# since spec-append-lines runs us *after* that find we explicitly echo our +# files into the same .cfgs manifest the spec uses for %files. +[[overlays]] +description = "Install Azure Linux 4.0 configs and add them to the %files manifest" +type = "spec-append-lines" +section = "%install" +lines = ["", "# Azure Linux 4.0 configs (added by azldev overlay).", "install -m 0644 %{SOURCE10} %{buildroot}%{_sysconfdir}/mock/templates/azure-linux-4.tpl", "install -m 0644 %{SOURCE11} %{buildroot}%{_sysconfdir}/mock/azure-linux-4-x86_64.cfg", "install -m 0644 %{SOURCE12} %{buildroot}%{_sysconfdir}/mock/azure-linux-4-aarch64.cfg", "echo \"%%config(noreplace) %{_sysconfdir}/mock/templates/azure-linux-4.tpl\" >> %{name}.cfgs", "echo \"%%config(noreplace) %{_sysconfdir}/mock/azure-linux-4-x86_64.cfg\" >> %{name}.cfgs", "echo \"%%config(noreplace) %{_sysconfdir}/mock/azure-linux-4-aarch64.cfg\" >> %{name}.cfgs"] + +# Override the fedora-derived $cfg value computed by upstream %post so that +# default.cfg points at our azure-linux-* config. Since this RPM only ships +# on Azure Linux, we don't need a build-time guard. We anchor on the +# single-line existence-check that immediately follows the upstream %if +# blocks (overlays don't support multi-line regexes) and inject our +# assignment just before it; this also suppresses the otherwise-spurious +# "fedora-4-x86_64.cfg does not exist" warning at install time. +[[overlays]] +description = "Set $cfg to azure-linux config in %post before existence check" +type = "spec-search-replace" +section = "%post" +regex = "if \\[ -e %\\{_sysconfdir\\}/mock/\\$cfg \\]; then" +replacement = "cfg=azure-linux-$ver-$mock_arch.cfg\n\nif [ -e %{_sysconfdir}/mock/$cfg ]; then" diff --git a/base/comps/oneapi-level-zero/oneapi-level-zero.comp.toml b/base/comps/oneapi-level-zero/oneapi-level-zero.comp.toml index 6f3878df880..a8cae378dc4 100644 --- a/base/comps/oneapi-level-zero/oneapi-level-zero.comp.toml +++ b/base/comps/oneapi-level-zero/oneapi-level-zero.comp.toml @@ -1,12 +1 @@ [components.oneapi-level-zero] - -# The spec hardcodes "./redhat-linux-build/bin/zello_world" in %install, assuming the CMake -# build directory is named redhat-linux-build (Fedora's %{_vpath_builddir} where -# _vendor=redhat). On AZL, _vendor=azurelinux so the directory is azurelinux-linux-build. -# Replace with the standard %{_vpath_builddir} RPM macro. -[[components.oneapi-level-zero.overlays]] -description = "Replace hardcoded redhat-linux-build with %{_vpath_builddir} in %install so zello_world binary is found on AZL" -type = "spec-search-replace" -section = "%install" -regex = 'redhat-linux-build' -replacement = '%{_vpath_builddir}' diff --git a/base/comps/oneapi-level-zero/overlays/0001-replace-hardcoded-redhat-build.overlay.toml b/base/comps/oneapi-level-zero/overlays/0001-replace-hardcoded-redhat-build.overlay.toml new file mode 100644 index 00000000000..b33abb25138 --- /dev/null +++ b/base/comps/oneapi-level-zero/overlays/0001-replace-hardcoded-redhat-build.overlay.toml @@ -0,0 +1,15 @@ +# The spec hardcodes "./redhat-linux-build/bin/zello_world" in %install, assuming the CMake +# build directory is named redhat-linux-build (Fedora's %{_vpath_builddir} where +# _vendor=redhat). On AZL, _vendor=azurelinux so the directory is azurelinux-linux-build. +# Replace with the standard %{_vpath_builddir} RPM macro. + +[metadata] +category = "azl-compatibility" +upstreamable = true + +[[overlays]] +description = "Replace hardcoded redhat-linux-build with %{_vpath_builddir} in %install so zello_world binary is found on AZL" +type = "spec-search-replace" +section = "%install" +regex = "redhat-linux-build" +replacement = "%{_vpath_builddir}" diff --git a/base/comps/onnx/onnx.comp.toml b/base/comps/onnx/onnx.comp.toml index d0f450eb27e..9d95e21040e 100644 --- a/base/comps/onnx/onnx.comp.toml +++ b/base/comps/onnx/onnx.comp.toml @@ -1,22 +1 @@ [components.onnx] - -# Fedora's 0002-Let-pyproject_wheel-use-binaries-from-cmake_build.patch hardcodes -# "redhat-linux-build" as the CMake build directory name in setup.py. On AZL, -# %{_vpath_builddir} = azurelinux-linux-build, so %pyproject_wheel can't find the -# CMake build output. Fix by parameterizing via an environment variable (the Python -# equivalent of the Make variable approach used for iscsi-initiator-utils). - -[[components.onnx.overlays]] -description = "Replace hardcoded redhat-linux-build with VPATH_BUILDDIR env var lookup in setup.py patch" -type = "file-search-replace" -file = "0002-Let-pyproject_wheel-use-binaries-from-cmake_build.patch" -regex = '"redhat-linux-build"' -replacement = 'os.environ.get("VPATH_BUILDDIR", "redhat-linux-build")' - -[[components.onnx.overlays]] -description = "Export VPATH_BUILDDIR=%{_vpath_builddir} so setup.py finds the CMake build dir" -type = "spec-prepend-lines" -section = "%build" -lines = [ - "export VPATH_BUILDDIR=%{_vpath_builddir}", -] diff --git a/base/comps/onnx/overlays/0001-replace-hardcoded-redhat-build.overlay.toml b/base/comps/onnx/overlays/0001-replace-hardcoded-redhat-build.overlay.toml new file mode 100644 index 00000000000..8552193e6a8 --- /dev/null +++ b/base/comps/onnx/overlays/0001-replace-hardcoded-redhat-build.overlay.toml @@ -0,0 +1,22 @@ +# Fedora's 0002-Let-pyproject_wheel-use-binaries-from-cmake_build.patch hardcodes +# "redhat-linux-build" as the CMake build directory name in setup.py. On AZL, +# %{_vpath_builddir} = azurelinux-linux-build, so %pyproject_wheel can't find the +# CMake build output. Fix by parameterizing via an environment variable (the Python +# equivalent of the Make variable approach used for iscsi-initiator-utils). + +[metadata] +category = "azl-compatibility" +upstreamable = true + +[[overlays]] +description = "Replace hardcoded redhat-linux-build with VPATH_BUILDDIR env var lookup in setup.py patch" +type = "file-search-replace" +file = "0002-Let-pyproject_wheel-use-binaries-from-cmake_build.patch" +regex = "\"redhat-linux-build\"" +replacement = "os.environ.get(\"VPATH_BUILDDIR\", \"redhat-linux-build\")" + +[[overlays]] +description = "Export VPATH_BUILDDIR=%{_vpath_builddir} so setup.py finds the CMake build dir" +type = "spec-prepend-lines" +section = "%build" +lines = ["export VPATH_BUILDDIR=%{_vpath_builddir}"] diff --git a/base/comps/open-vm-tools/open-vm-tools.comp.toml b/base/comps/open-vm-tools/open-vm-tools.comp.toml index f0090395e8f..c5364b9a0fe 100644 --- a/base/comps/open-vm-tools/open-vm-tools.comp.toml +++ b/base/comps/open-vm-tools/open-vm-tools.comp.toml @@ -1,18 +1 @@ [components.open-vm-tools] - -# Rename the source file to remove the literal '\' character so the repo can -# be checked out on Windows for compliance scanning. '\' is invalid in file -# names on Windows. The systemd unit name installed in the buildroot keeps -# the '\x2d' escape (which systemd decodes to '-' inside a path segment) -- -# only the source filename in our git tree changes. -[[components.open-vm-tools.overlays]] -description = "Rename source file to remove '\\' (invalid on Windows filesystems)" -type = "file-rename" -file = 'run-vmblock\x2dfuse.mount' -replacement = "run-vmblock-fuse.mount.in" - -[[components.open-vm-tools.overlays]] -description = "Update Source3 reference to match renamed file" -type = "spec-update-tag" -tag = "Source3" -value = "run-vmblock-fuse.mount.in" diff --git a/base/comps/open-vm-tools/overlays/0001-rename-source-file-remove.overlay.toml b/base/comps/open-vm-tools/overlays/0001-rename-source-file-remove.overlay.toml new file mode 100644 index 00000000000..86d9dc298e0 --- /dev/null +++ b/base/comps/open-vm-tools/overlays/0001-rename-source-file-remove.overlay.toml @@ -0,0 +1,21 @@ +# Rename the source file to remove the literal '\' character so the repo can +# be checked out on Windows for compliance scanning. '\' is invalid in file +# names on Windows. The systemd unit name installed in the buildroot keeps +# the '\x2d' escape (which systemd decodes to '-' inside a path segment) -- +# only the source filename in our git tree changes. + +[metadata] +category = "azl-compatibility" +upstreamable = false + +[[overlays]] +description = "Rename source file to remove '\\' (invalid on Windows filesystems)" +type = "file-rename" +file = "run-vmblock\\x2dfuse.mount" +replacement = "run-vmblock-fuse.mount.in" + +[[overlays]] +description = "Update Source3 reference to match renamed file" +type = "spec-update-tag" +tag = "Source3" +value = "run-vmblock-fuse.mount.in" diff --git a/base/comps/openblas/openblas.comp.toml b/base/comps/openblas/openblas.comp.toml index ab315c86e72..e14e09d8080 100644 --- a/base/comps/openblas/openblas.comp.toml +++ b/base/comps/openblas/openblas.comp.toml @@ -1,13 +1 @@ [components.openblas] - -# The openblas %build section runs `make ... lapack-test`, which invokes -# lapack_testing.py (a Python 3 script). Upstream Fedora doesn't declare -# BuildRequires: python3 either, but python3 gets pulled in transitively -# through perl-devel → systemtap-sdt-devel → python3. AZL builds perl -# without systemtap (build.without = ["perl_enables_systemtap"]), breaking -# that chain and leaving python3 unavailable in the buildroot. -[[components.openblas.overlays]] -description = "Add missing BuildRequires on python3 needed by lapack_testing.py during %build" -type = "spec-add-tag" -tag = "BuildRequires" -value = "python3" diff --git a/base/comps/openblas/overlays/0001-add-missing-buildrequires-python3.overlay.toml b/base/comps/openblas/overlays/0001-add-missing-buildrequires-python3.overlay.toml new file mode 100644 index 00000000000..f168336d269 --- /dev/null +++ b/base/comps/openblas/overlays/0001-add-missing-buildrequires-python3.overlay.toml @@ -0,0 +1,16 @@ +# The openblas %build section runs `make ... lapack-test`, which invokes +# lapack_testing.py (a Python 3 script). Upstream Fedora doesn't declare +# BuildRequires: python3 either, but python3 gets pulled in transitively +# through perl-devel → systemtap-sdt-devel → python3. AZL builds perl +# without systemtap (build.without = ["perl_enables_systemtap"]), breaking +# that chain and leaving python3 unavailable in the buildroot. + +[metadata] +category = "azl-compatibility" +upstreamable = true + +[[overlays]] +description = "Add missing BuildRequires on python3 needed by lapack_testing.py during %build" +type = "spec-add-tag" +tag = "BuildRequires" +value = "python3" diff --git a/base/comps/openexr/openexr.comp.toml b/base/comps/openexr/openexr.comp.toml index 5bf969cce3d..1ec27ed80e1 100644 --- a/base/comps/openexr/openexr.comp.toml +++ b/base/comps/openexr/openexr.comp.toml @@ -1,7 +1,2 @@ [components.openexr] -[[components.openexr.overlays]] -description = "Use portable %{__cmake_builddir} macro instead of hardcoded redhat-linux-build path" -type = "spec-search-replace" -regex = 'redhat-linux-build' -replacement = '%{__cmake_builddir}' diff --git a/base/comps/openexr/overlays/0001-portable-cmake-builddir-macro.overlay.toml b/base/comps/openexr/overlays/0001-portable-cmake-builddir-macro.overlay.toml new file mode 100644 index 00000000000..e3993744dd9 --- /dev/null +++ b/base/comps/openexr/overlays/0001-portable-cmake-builddir-macro.overlay.toml @@ -0,0 +1,9 @@ +[metadata] +category = "azl-compatibility" +upstreamable = true + +[[overlays]] +description = "Use portable %{__cmake_builddir} macro instead of hardcoded redhat-linux-build path" +type = "spec-search-replace" +regex = "redhat-linux-build" +replacement = "%{__cmake_builddir}" diff --git a/base/comps/openpace/openpace.comp.toml b/base/comps/openpace/openpace.comp.toml index 86702940582..de1a306c276 100644 --- a/base/comps/openpace/openpace.comp.toml +++ b/base/comps/openpace/openpace.comp.toml @@ -1,25 +1,2 @@ [components.openpace] -[[components.openpace.overlays]] -description = """ -Fix install-data-local silently dropping one documentation file per build. - -The upstream Makefile.am uses 'find -exec sh -c ... {} +' without a dummy $0 -placeholder. Per POSIX, the first argument after 'sh -c script' becomes $0 and -is excluded from $@, causing the first file returned by find to be silently -dropped. Different filesystem types return files in different find order, so -different files are dropped on x86_64 vs aarch64 builders, causing noarch -rpmdiff failures in Koji. - -TODO: push change to upstream -""" -type = "patch-add" -source = "fix-install-data-local-missing-dollar0.patch" - -[[components.openpace.overlays]] -description = "Apply the install-data-local fix patch after existing patches" -type = "spec-search-replace" -section = "%prep" -regex = '^%patch 1 -p1 -b \.unsupported-tests$' -replacement = """%patch 1 -p1 -b .unsupported-tests -%patch 2 -p1""" diff --git a/base/comps/openpace/overlays/0001-fix-install-data-local.overlay.toml b/base/comps/openpace/overlays/0001-fix-install-data-local.overlay.toml new file mode 100644 index 00000000000..20212f709f2 --- /dev/null +++ b/base/comps/openpace/overlays/0001-fix-install-data-local.overlay.toml @@ -0,0 +1,15 @@ +[metadata] +category = "azl-compatibility" +upstreamable = true + +[[overlays]] +description = "Fix install-data-local silently dropping one documentation file per build.\n\nThe upstream Makefile.am uses 'find -exec sh -c ... {} +' without a dummy $0\nplaceholder. Per POSIX, the first argument after 'sh -c script' becomes $0 and\nis excluded from $@, causing the first file returned by find to be silently\ndropped. Different filesystem types return files in different find order, so\ndifferent files are dropped on x86_64 vs aarch64 builders, causing noarch\nrpmdiff failures in Koji.\n\nTODO: push change to upstream\n" +type = "patch-add" +source = "../fix-install-data-local-missing-dollar0.patch" + +[[overlays]] +description = "Apply the install-data-local fix patch after existing patches" +type = "spec-search-replace" +section = "%prep" +regex = "^%patch 1 -p1 -b \\.unsupported-tests$" +replacement = "%patch 1 -p1 -b .unsupported-tests\n%patch 2 -p1" diff --git a/base/comps/pcsc-lite-asekey/overlays/0001-plain-gcc-instead-triplet.overlay.toml b/base/comps/pcsc-lite-asekey/overlays/0001-plain-gcc-instead-triplet.overlay.toml new file mode 100644 index 00000000000..113a6267170 --- /dev/null +++ b/base/comps/pcsc-lite-asekey/overlays/0001-plain-gcc-instead-triplet.overlay.toml @@ -0,0 +1,17 @@ +# The upstream Makefile constructs the compiler name as CC=$(BUILD)-gcc, where +# BUILD is the GNU triplet from ./configure --build=. For reasons that we still need +# to investigate, on our Koji builders the triplet vendor is "koji" (e.g. aarch64-koji-linux), +# for which no gcc symlink exists. This results in calling a symlink that doesn't exist, +# which fails. +# We can work around this for now by overriding CC=gcc to call gcc directory. + +[metadata] +category = "azl-compatibility" +upstreamable = false + +[[overlays]] +description = "Use plain gcc instead of triplet-prefixed compiler name to work around build on Koji builders" +type = "spec-search-replace" +section = "%build" +regex = "%\\{make_build\\}" +replacement = "%{make_build} CC=gcc" diff --git a/base/comps/pcsc-lite-asekey/pcsc-lite-asekey.comp.toml b/base/comps/pcsc-lite-asekey/pcsc-lite-asekey.comp.toml index 5232ace9a07..8981c1cc849 100644 --- a/base/comps/pcsc-lite-asekey/pcsc-lite-asekey.comp.toml +++ b/base/comps/pcsc-lite-asekey/pcsc-lite-asekey.comp.toml @@ -1,16 +1,3 @@ [components.pcsc-lite-asekey] # Release: 27%{dist} release = { calculation = "manual" } - -# The upstream Makefile constructs the compiler name as CC=$(BUILD)-gcc, where -# BUILD is the GNU triplet from ./configure --build=. For reasons that we still need -# to investigate, on our Koji builders the triplet vendor is "koji" (e.g. aarch64-koji-linux), -# for which no gcc symlink exists. This results in calling a symlink that doesn't exist, -# which fails. -# We can work around this for now by overriding CC=gcc to call gcc directory. -[[components.pcsc-lite-asekey.overlays]] -description = "Use plain gcc instead of triplet-prefixed compiler name to work around build on Koji builders" -type = "spec-search-replace" -section = "%build" -regex = '%\{make_build\}' -replacement = '%{make_build} CC=gcc' diff --git a/base/comps/perl-Archive-Any-Lite/overlays/0001-rename-patch-file-remove.overlay.toml b/base/comps/perl-Archive-Any-Lite/overlays/0001-rename-patch-file-remove.overlay.toml new file mode 100644 index 00000000000..fcb0aaf6723 --- /dev/null +++ b/base/comps/perl-Archive-Any-Lite/overlays/0001-rename-patch-file-remove.overlay.toml @@ -0,0 +1,18 @@ +# Rename patch to remove ':' so the repo can be checked out on Windows for +# compliance scanning. ':' is reserved on Windows filesystems. + +[metadata] +category = "azl-compatibility" +upstreamable = false + +[[overlays]] +description = "Rename patch file to remove ':' (invalid on Windows filesystems)" +type = "file-rename" +file = "Archive-Any-Lite-0.08-EU:MM.patch" +replacement = "Archive-Any-Lite-0.08-EUMM.patch" + +[[overlays]] +description = "Update Patch0 reference to match renamed file" +type = "spec-update-tag" +tag = "Patch0" +value = "Archive-Any-Lite-0.08-EUMM.patch" diff --git a/base/comps/perl-Archive-Any-Lite/perl-Archive-Any-Lite.comp.toml b/base/comps/perl-Archive-Any-Lite/perl-Archive-Any-Lite.comp.toml index 6c25bb6e6d8..c766065b123 100644 --- a/base/comps/perl-Archive-Any-Lite/perl-Archive-Any-Lite.comp.toml +++ b/base/comps/perl-Archive-Any-Lite/perl-Archive-Any-Lite.comp.toml @@ -1,15 +1 @@ [components.perl-Archive-Any-Lite] - -# Rename patch to remove ':' so the repo can be checked out on Windows for -# compliance scanning. ':' is reserved on Windows filesystems. -[[components.perl-Archive-Any-Lite.overlays]] -description = "Rename patch file to remove ':' (invalid on Windows filesystems)" -type = "file-rename" -file = "Archive-Any-Lite-0.08-EU:MM.patch" -replacement = "Archive-Any-Lite-0.08-EUMM.patch" - -[[components.perl-Archive-Any-Lite.overlays]] -description = "Update Patch0 reference to match renamed file" -type = "spec-update-tag" -tag = "Patch0" -value = "Archive-Any-Lite-0.08-EUMM.patch" diff --git a/base/comps/perl-Crypt-PasswdMD5/overlays/0001-rename-patch-file-remove.overlay.toml b/base/comps/perl-Crypt-PasswdMD5/overlays/0001-rename-patch-file-remove.overlay.toml new file mode 100644 index 00000000000..afcaec7415d --- /dev/null +++ b/base/comps/perl-Crypt-PasswdMD5/overlays/0001-rename-patch-file-remove.overlay.toml @@ -0,0 +1,18 @@ +# Rename patch to remove ':' so the repo can be checked out on Windows for +# compliance scanning. ':' is reserved on Windows filesystems. + +[metadata] +category = "azl-compatibility" +upstreamable = false + +[[overlays]] +description = "Rename patch file to remove ':' (invalid on Windows filesystems)" +type = "file-rename" +file = "Crypt-PasswdMD5-1.42-d:md5-version.patch" +replacement = "Crypt-PasswdMD5-1.42-d-md5-version.patch" + +[[overlays]] +description = "Update Patch0 reference to match renamed file" +type = "spec-update-tag" +tag = "Patch0" +value = "Crypt-PasswdMD5-1.42-d-md5-version.patch" diff --git a/base/comps/perl-Crypt-PasswdMD5/perl-Crypt-PasswdMD5.comp.toml b/base/comps/perl-Crypt-PasswdMD5/perl-Crypt-PasswdMD5.comp.toml index 3b97c2fc2e8..47cce236b4f 100644 --- a/base/comps/perl-Crypt-PasswdMD5/perl-Crypt-PasswdMD5.comp.toml +++ b/base/comps/perl-Crypt-PasswdMD5/perl-Crypt-PasswdMD5.comp.toml @@ -1,15 +1 @@ [components.perl-Crypt-PasswdMD5] - -# Rename patch to remove ':' so the repo can be checked out on Windows for -# compliance scanning. ':' is reserved on Windows filesystems. -[[components.perl-Crypt-PasswdMD5.overlays]] -description = "Rename patch file to remove ':' (invalid on Windows filesystems)" -type = "file-rename" -file = "Crypt-PasswdMD5-1.42-d:md5-version.patch" -replacement = "Crypt-PasswdMD5-1.42-d-md5-version.patch" - -[[components.perl-Crypt-PasswdMD5.overlays]] -description = "Update Patch0 reference to match renamed file" -type = "spec-update-tag" -tag = "Patch0" -value = "Crypt-PasswdMD5-1.42-d-md5-version.patch" diff --git a/base/comps/python-heatclient/overlays/0001-disable-doc-generation-work.overlay.toml b/base/comps/python-heatclient/overlays/0001-disable-doc-generation-work.overlay.toml new file mode 100644 index 00000000000..c9648b5ad04 --- /dev/null +++ b/base/comps/python-heatclient/overlays/0001-disable-doc-generation-work.overlay.toml @@ -0,0 +1,13 @@ +# Disable doc generation to avoid cliff sphinxext Python 3.14 incompatibility. +# TODO: re-enable doc once cliff sphinxext fix is released upstream +# Upstream fix: https://github.com/openstack/cliff/commit/391261c849c994ca2d3f42926497e633047ed8c7 + +[metadata] +category = "azl-compatibility" +upstreamable = true + +[[overlays]] +description = "Disable doc generation to work around cliff sphinxext Python 3.14 incompatibility" +type = "spec-search-replace" +regex = "^%global with_doc 1$" +replacement = "%global with_doc 0" diff --git a/base/comps/python-heatclient/python-heatclient.comp.toml b/base/comps/python-heatclient/python-heatclient.comp.toml index d343f0deeb4..b2d99f298f8 100644 --- a/base/comps/python-heatclient/python-heatclient.comp.toml +++ b/base/comps/python-heatclient/python-heatclient.comp.toml @@ -1,10 +1 @@ [components.python-heatclient] - -# Disable doc generation to avoid cliff sphinxext Python 3.14 incompatibility. -# TODO: re-enable doc once cliff sphinxext fix is released upstream -# Upstream fix: https://github.com/openstack/cliff/commit/391261c849c994ca2d3f42926497e633047ed8c7 -[[components.python-heatclient.overlays]] -description = "Disable doc generation to work around cliff sphinxext Python 3.14 incompatibility" -type = "spec-search-replace" -regex = '^%global with_doc 1$' -replacement = '%global with_doc 0' diff --git a/base/comps/python-manilaclient/overlays/0001-disable-doc-generation-work.overlay.toml b/base/comps/python-manilaclient/overlays/0001-disable-doc-generation-work.overlay.toml new file mode 100644 index 00000000000..c9648b5ad04 --- /dev/null +++ b/base/comps/python-manilaclient/overlays/0001-disable-doc-generation-work.overlay.toml @@ -0,0 +1,13 @@ +# Disable doc generation to avoid cliff sphinxext Python 3.14 incompatibility. +# TODO: re-enable doc once cliff sphinxext fix is released upstream +# Upstream fix: https://github.com/openstack/cliff/commit/391261c849c994ca2d3f42926497e633047ed8c7 + +[metadata] +category = "azl-compatibility" +upstreamable = true + +[[overlays]] +description = "Disable doc generation to work around cliff sphinxext Python 3.14 incompatibility" +type = "spec-search-replace" +regex = "^%global with_doc 1$" +replacement = "%global with_doc 0" diff --git a/base/comps/python-manilaclient/python-manilaclient.comp.toml b/base/comps/python-manilaclient/python-manilaclient.comp.toml index a5fb5df1f8d..f45e7ab5647 100644 --- a/base/comps/python-manilaclient/python-manilaclient.comp.toml +++ b/base/comps/python-manilaclient/python-manilaclient.comp.toml @@ -1,10 +1 @@ [components.python-manilaclient] - -# Disable doc generation to avoid cliff sphinxext Python 3.14 incompatibility. -# TODO: re-enable doc once cliff sphinxext fix is released upstream -# Upstream fix: https://github.com/openstack/cliff/commit/391261c849c994ca2d3f42926497e633047ed8c7 -[[components.python-manilaclient.overlays]] -description = "Disable doc generation to work around cliff sphinxext Python 3.14 incompatibility" -type = "spec-search-replace" -regex = '^%global with_doc 1$' -replacement = '%global with_doc 0' diff --git a/base/comps/python-octaviaclient/overlays/0001-disable-doc-generation-work.overlay.toml b/base/comps/python-octaviaclient/overlays/0001-disable-doc-generation-work.overlay.toml new file mode 100644 index 00000000000..c9648b5ad04 --- /dev/null +++ b/base/comps/python-octaviaclient/overlays/0001-disable-doc-generation-work.overlay.toml @@ -0,0 +1,13 @@ +# Disable doc generation to avoid cliff sphinxext Python 3.14 incompatibility. +# TODO: re-enable doc once cliff sphinxext fix is released upstream +# Upstream fix: https://github.com/openstack/cliff/commit/391261c849c994ca2d3f42926497e633047ed8c7 + +[metadata] +category = "azl-compatibility" +upstreamable = true + +[[overlays]] +description = "Disable doc generation to work around cliff sphinxext Python 3.14 incompatibility" +type = "spec-search-replace" +regex = "^%global with_doc 1$" +replacement = "%global with_doc 0" diff --git a/base/comps/python-octaviaclient/python-octaviaclient.comp.toml b/base/comps/python-octaviaclient/python-octaviaclient.comp.toml index 7f8d8128848..70da4eabeb1 100644 --- a/base/comps/python-octaviaclient/python-octaviaclient.comp.toml +++ b/base/comps/python-octaviaclient/python-octaviaclient.comp.toml @@ -1,10 +1 @@ [components.python-octaviaclient] - -# Disable doc generation to avoid cliff sphinxext Python 3.14 incompatibility. -# TODO: re-enable doc once cliff sphinxext fix is released upstream -# Upstream fix: https://github.com/openstack/cliff/commit/391261c849c994ca2d3f42926497e633047ed8c7 -[[components.python-octaviaclient.overlays]] -description = "Disable doc generation to work around cliff sphinxext Python 3.14 incompatibility" -type = "spec-search-replace" -regex = '^%global with_doc 1$' -replacement = '%global with_doc 0' diff --git a/base/comps/python-pyside6/overlays/0001-replace-hardcoded-redhat-build.overlay.toml b/base/comps/python-pyside6/overlays/0001-replace-hardcoded-redhat-build.overlay.toml new file mode 100644 index 00000000000..6afe70722f6 --- /dev/null +++ b/base/comps/python-pyside6/overlays/0001-replace-hardcoded-redhat-build.overlay.toml @@ -0,0 +1,13 @@ +# The spec hardcodes "redhat-linux-build" in %build and %install, assuming the CMake build +# directory follows Fedora's naming (%{_vendor}=redhat). On AZL, _vendor=azurelinux so the +# directory is azurelinux-linux-build. Replace with the standard %{_vpath_builddir} RPM macro. + +[metadata] +category = "azl-compatibility" +upstreamable = true + +[[overlays]] +description = "Replace hardcoded redhat-linux-build with %{_vpath_builddir} so the spec finds the CMake build dir on AZL" +type = "spec-search-replace" +regex = "redhat-linux-build" +replacement = "%{_vpath_builddir}" diff --git a/base/comps/python-pyside6/python-pyside6.comp.toml b/base/comps/python-pyside6/python-pyside6.comp.toml index 4320c50b36f..c7bd76162d0 100644 --- a/base/comps/python-pyside6/python-pyside6.comp.toml +++ b/base/comps/python-pyside6/python-pyside6.comp.toml @@ -1,10 +1 @@ [components.python-pyside6] - -# The spec hardcodes "redhat-linux-build" in %build and %install, assuming the CMake build -# directory follows Fedora's naming (%{_vendor}=redhat). On AZL, _vendor=azurelinux so the -# directory is azurelinux-linux-build. Replace with the standard %{_vpath_builddir} RPM macro. -[[components.python-pyside6.overlays]] -description = "Replace hardcoded redhat-linux-build with %{_vpath_builddir} so the spec finds the CMake build dir on AZL" -type = "spec-search-replace" -regex = 'redhat-linux-build' -replacement = '%{_vpath_builddir}' diff --git a/base/comps/rocm-compilersupport/overlays/0001-set-release-release-driven.overlay.toml b/base/comps/rocm-compilersupport/overlays/0001-set-release-release-driven.overlay.toml new file mode 100644 index 00000000000..a2dfe039df8 --- /dev/null +++ b/base/comps/rocm-compilersupport/overlays/0001-set-release-release-driven.overlay.toml @@ -0,0 +1,14 @@ +# spec-set-tag is the documented form for manual-release components and is +# anchor-free, so this survives upstream Release-line restructures (e.g. +# Fedora's rocm-7.x preview branch wraps Release in %if/%endif which would +# break a literal spec-search-replace anchor). + +[metadata] +category = "azl-release-management" +upstreamable = false + +[[overlays]] +description = "Set Release to %{azl_release}-driven formula so AZL-only rebuilds bump cleanly without manual edits" +type = "spec-set-tag" +tag = "Release" +value = "%[15 + %{azl_release}].rocm%{rocm_version}%{?dist}" diff --git a/base/comps/rocm-compilersupport/overlays/0002-drop-llvm-triple-cfg.overlay.toml b/base/comps/rocm-compilersupport/overlays/0002-drop-llvm-triple-cfg.overlay.toml new file mode 100644 index 00000000000..a552c9bb03a --- /dev/null +++ b/base/comps/rocm-compilersupport/overlays/0002-drop-llvm-triple-cfg.overlay.toml @@ -0,0 +1,70 @@ +# AZL changes %_vendor from "redhat" to "azurelinux" (see azurelinux-rpm-config), +# so GCC installs its runtime objects under /usr/lib/gcc/-azurelinux-linux//. +# Upstream clang's GCCInstallationDetector triple list does not include the +# "azurelinux" vendor, so without help any clang built against this layout can't +# find crtbeginS.o / libstdc++ / libgcc and link of any C++ test program (e.g. +# CMake compiler probe) fails with "cannot open crtbeginS.o" and "unable to find +# library -lstdc++". +# +# Fix it by dropping .cfg next to the clang binaries with +# --gcc-triple=. Clang's config-file lookup (clang/lib/Driver/Driver.cpp +# step 5) tries .cfg from the binary's directory before any system +# config dir, mode-independently — so this single file covers clang, clang++, +# clang-cpp, clang-cl, clang-dxc, and flang, without leaking onto explicit +# cross-target (--target=...) invocations whose triple won't match the filename. +# +# The three overlays below drop the file in three places: +# 1. next to the stage-1 clang in the in-package build tree, so stage 2+ +# of this spec's %build can compile and link; +# 2. pre-staged inside the stage-2 build tree before %cmake_build runs, so +# the LLVM runtimes sub-build (compiler-rt, libcxx, libcxxabi) can +# configure once stage-2 clang is produced; +# 3. installed into %{bundle_prefix}/bin alongside the shipped clang, so +# every downstream ROCm consumer (mivisionx, rocblas, hipblaslt, …) +# sees the right toolchain triple without needing any change of its own. + +[metadata] +category = "azl-compatibility" +upstreamable = false + +[[overlays]] +description = "Drop %{llvm_triple}.cfg next to the in-tree stage-1 clang so later build stages can locate the Azure Linux GCC toolchain" +type = "spec-search-replace" +section = "%build" +regex = "build_stage1=\\$p/build-llvm" +replacement = "build_stage1=$p/build-llvm\n\n# AZL: drop the per-triple clang config inside the stage-1 build tree so\n# every subsequent stage (stage-2 llvm, device-libs, comgr, hipcc) compiled\n# by this clang finds the Azure Linux GCC toolchain at\n# /usr/lib/gcc/%{_target_cpu}-%{_vendor}-linux/.\necho \"--gcc-triple=%{_target_cpu}-%{_vendor}-linux\" > $build_stage1/bin/%{llvm_triple}.cfg" + +# Stage 2 builds the LLVM "runtimes" project (compiler-rt, libcxx, libcxxabi) +# as a sub-build that re-invokes CMake using the freshly-built stage-2 clang +# at build-llvm-2/bin/. That sub-build re-runs the compiler/linker probes +# and hits the same GCC-toolchain-detection failure as stage 1 unless its +# clang has a per-triple config alongside it. Drop the cfg file into the +# stage-2 bin directory before %cmake_build runs; it sits there until clang +# is built and is picked up automatically on first invocation. +[[overlays]] +description = "Drop %{llvm_triple}.cfg into the stage-2 build tree so the LLVM runtimes sub-build can find the Azure Linux GCC toolchain" +type = "spec-search-replace" +section = "%build" +regex = "-DLLVM_ENABLE_RUNTIMES=%\\{llvm_runtimes\\}" +replacement = "-DLLVM_ENABLE_RUNTIMES=%{llvm_runtimes}\n\n# AZL: pre-stage the per-triple clang config inside build-llvm-2/bin so\n# the LLVM runtimes sub-build can locate the Azure Linux GCC toolchain.\n# The .cfg only needs to exist by the time clang is invoked.\nmkdir -p $PWD/build-llvm-2/bin\necho \"--gcc-triple=%{_target_cpu}-%{_vendor}-linux\" > $PWD/build-llvm-2/bin/%{llvm_triple}.cfg" + +# The shipped rocm-llvm clang at %{bundle_prefix}/bin/ doesn't read /etc/clang +# (which is where the system llvm/llvm20 packages put their --gcc-triple cfg), +# so we need to drop a per-triple cfg next to the rocm-llvm binaries too. +# Appending to %install (rather than anchoring on a fragile upstream comment +# like "# Remove lld's libs") guarantees this runs even if upstream reshapes +# the cleanup block at the bottom of %install. +[[overlays]] +description = "Install %{llvm_triple}.cfg next to the shipped rocm-llvm clang so every downstream ROCm consumer sees the Azure Linux GCC toolchain" +type = "spec-append-lines" +section = "%install" +lines = ["", "# AZL: drop a per-triple clang config file next to the shipped rocm-llvm", "# binaries so every clang/clang++/flang/clang-cl/clang-dxc invocation that", "# uses the default (AZL) target triple can locate the GCC toolchain at", "# /usr/lib/gcc/%{_target_cpu}-%{_vendor}-linux/. Cross-target invocations", "# (--target=) do not match this filename and are unaffected.", "echo \"--gcc-triple=%{_target_cpu}-%{_vendor}-linux\" > %{buildroot}%{bundle_prefix}/bin/%{llvm_triple}.cfg"] + +# %{bundle_prefix}/bin/clang* in %files -n rocm-clang does not match a file +# named .cfg, so it has to be listed explicitly. +[[overlays]] +description = "Ship the per-triple clang config file as part of rocm-clang" +type = "spec-append-lines" +section = "%files" +package = "rocm-clang" +lines = ["%{bundle_prefix}/bin/%{llvm_triple}.cfg"] diff --git a/base/comps/rocm-compilersupport/overlays/0003-patch-fallback-triples-include.overlay.toml b/base/comps/rocm-compilersupport/overlays/0003-patch-fallback-triples-include.overlay.toml new file mode 100644 index 00000000000..6bf21472f70 --- /dev/null +++ b/base/comps/rocm-compilersupport/overlays/0003-patch-fallback-triples-include.overlay.toml @@ -0,0 +1,11 @@ +# Patch the fallback triples to include azurelinux. +# When clang's config files are not present, it will fall back to a set of hardcoded triples, which don't include azurelinux. + +[metadata] +category = "azl-compatibility" +upstreamable = true + +[[overlays]] +description = "Patch fallback triples to include azurelinux." +type = "patch-add" +source = "../0001-Clang-Add-azurelinux-to-fallback-triples.patch" diff --git a/base/comps/rocm-compilersupport/rocm-compilersupport.comp.toml b/base/comps/rocm-compilersupport/rocm-compilersupport.comp.toml index 30f5e0a84f7..1e9dacab9ab 100644 --- a/base/comps/rocm-compilersupport/rocm-compilersupport.comp.toml +++ b/base/comps/rocm-compilersupport/rocm-compilersupport.comp.toml @@ -26,107 +26,3 @@ release = { calculation = "manual" } # 4. fix(rocm-compilersupport): teach rocm-llvm clang to find the AZL GCC toolchain azl_release = "4" -[[components.rocm-compilersupport.overlays]] -# spec-set-tag is the documented form for manual-release components and is -# anchor-free, so this survives upstream Release-line restructures (e.g. -# Fedora's rocm-7.x preview branch wraps Release in %if/%endif which would -# break a literal spec-search-replace anchor). -description = "Set Release to %{azl_release}-driven formula so AZL-only rebuilds bump cleanly without manual edits" -type = "spec-set-tag" -tag = "Release" -value = "%[15 + %{azl_release}].rocm%{rocm_version}%{?dist}" - -[[components.rocm-compilersupport.overlays]] -# AZL changes %_vendor from "redhat" to "azurelinux" (see azurelinux-rpm-config), -# so GCC installs its runtime objects under /usr/lib/gcc/-azurelinux-linux//. -# Upstream clang's GCCInstallationDetector triple list does not include the -# "azurelinux" vendor, so without help any clang built against this layout can't -# find crtbeginS.o / libstdc++ / libgcc and link of any C++ test program (e.g. -# CMake compiler probe) fails with "cannot open crtbeginS.o" and "unable to find -# library -lstdc++". -# -# Fix it by dropping .cfg next to the clang binaries with -# --gcc-triple=. Clang's config-file lookup (clang/lib/Driver/Driver.cpp -# step 5) tries .cfg from the binary's directory before any system -# config dir, mode-independently — so this single file covers clang, clang++, -# clang-cpp, clang-cl, clang-dxc, and flang, without leaking onto explicit -# cross-target (--target=...) invocations whose triple won't match the filename. -# -# The three overlays below drop the file in three places: -# 1. next to the stage-1 clang in the in-package build tree, so stage 2+ -# of this spec's %build can compile and link; -# 2. pre-staged inside the stage-2 build tree before %cmake_build runs, so -# the LLVM runtimes sub-build (compiler-rt, libcxx, libcxxabi) can -# configure once stage-2 clang is produced; -# 3. installed into %{bundle_prefix}/bin alongside the shipped clang, so -# every downstream ROCm consumer (mivisionx, rocblas, hipblaslt, …) -# sees the right toolchain triple without needing any change of its own. -description = "Drop %{llvm_triple}.cfg next to the in-tree stage-1 clang so later build stages can locate the Azure Linux GCC toolchain" -type = "spec-search-replace" -section = "%build" -regex = '''build_stage1=\$p/build-llvm''' -replacement = '''build_stage1=$p/build-llvm - -# AZL: drop the per-triple clang config inside the stage-1 build tree so -# every subsequent stage (stage-2 llvm, device-libs, comgr, hipcc) compiled -# by this clang finds the Azure Linux GCC toolchain at -# /usr/lib/gcc/%{_target_cpu}-%{_vendor}-linux/. -echo "--gcc-triple=%{_target_cpu}-%{_vendor}-linux" > $build_stage1/bin/%{llvm_triple}.cfg''' - -[[components.rocm-compilersupport.overlays]] -# Stage 2 builds the LLVM "runtimes" project (compiler-rt, libcxx, libcxxabi) -# as a sub-build that re-invokes CMake using the freshly-built stage-2 clang -# at build-llvm-2/bin/. That sub-build re-runs the compiler/linker probes -# and hits the same GCC-toolchain-detection failure as stage 1 unless its -# clang has a per-triple config alongside it. Drop the cfg file into the -# stage-2 bin directory before %cmake_build runs; it sits there until clang -# is built and is picked up automatically on first invocation. -description = "Drop %{llvm_triple}.cfg into the stage-2 build tree so the LLVM runtimes sub-build can find the Azure Linux GCC toolchain" -type = "spec-search-replace" -section = "%build" -regex = '''-DLLVM_ENABLE_RUNTIMES=%\{llvm_runtimes\}''' -replacement = '''-DLLVM_ENABLE_RUNTIMES=%{llvm_runtimes} - -# AZL: pre-stage the per-triple clang config inside build-llvm-2/bin so -# the LLVM runtimes sub-build can locate the Azure Linux GCC toolchain. -# The .cfg only needs to exist by the time clang is invoked. -mkdir -p $PWD/build-llvm-2/bin -echo "--gcc-triple=%{_target_cpu}-%{_vendor}-linux" > $PWD/build-llvm-2/bin/%{llvm_triple}.cfg''' - -[[components.rocm-compilersupport.overlays]] -# The shipped rocm-llvm clang at %{bundle_prefix}/bin/ doesn't read /etc/clang -# (which is where the system llvm/llvm20 packages put their --gcc-triple cfg), -# so we need to drop a per-triple cfg next to the rocm-llvm binaries too. -# Appending to %install (rather than anchoring on a fragile upstream comment -# like "# Remove lld's libs") guarantees this runs even if upstream reshapes -# the cleanup block at the bottom of %install. -description = "Install %{llvm_triple}.cfg next to the shipped rocm-llvm clang so every downstream ROCm consumer sees the Azure Linux GCC toolchain" -type = "spec-append-lines" -section = "%install" -lines = [ - "", - "# AZL: drop a per-triple clang config file next to the shipped rocm-llvm", - "# binaries so every clang/clang++/flang/clang-cl/clang-dxc invocation that", - "# uses the default (AZL) target triple can locate the GCC toolchain at", - "# /usr/lib/gcc/%{_target_cpu}-%{_vendor}-linux/. Cross-target invocations", - "# (--target=) do not match this filename and are unaffected.", - "echo \"--gcc-triple=%{_target_cpu}-%{_vendor}-linux\" > %{buildroot}%{bundle_prefix}/bin/%{llvm_triple}.cfg", -] - -[[components.rocm-compilersupport.overlays]] -# %{bundle_prefix}/bin/clang* in %files -n rocm-clang does not match a file -# named .cfg, so it has to be listed explicitly. -description = "Ship the per-triple clang config file as part of rocm-clang" -type = "spec-append-lines" -section = "%files" -package = "rocm-clang" -lines = [ - "%{bundle_prefix}/bin/%{llvm_triple}.cfg", -] - -# Patch the fallback triples to include azurelinux. -# When clang's config files are not present, it will fall back to a set of hardcoded triples, which don't include azurelinux. -[[components.rocm-compilersupport.overlays]] -description = "Patch fallback triples to include azurelinux." -type = "patch-add" -source = "0001-Clang-Add-azurelinux-to-fallback-triples.patch" diff --git a/base/comps/rust/overlays/0001-disable-mingw-cross-compilation.overlay.toml b/base/comps/rust/overlays/0001-disable-mingw-cross-compilation.overlay.toml new file mode 100644 index 00000000000..a5323eef303 --- /dev/null +++ b/base/comps/rust/overlays/0001-disable-mingw-cross-compilation.overlay.toml @@ -0,0 +1,11 @@ +# Azure Linux does not ship mingw cross-compilation toolchains. + +[metadata] +category = "azl-pruning" +upstreamable = false + +[[overlays]] +description = "Disable mingw cross-compilation targets — Azure Linux does not ship mingw toolchains" +type = "spec-search-replace" +regex = "%global mingw_targets i686-pc-windows-gnu x86_64-pc-windows-gnu" +replacement = "#global mingw_targets i686-pc-windows-gnu x86_64-pc-windows-gnu" diff --git a/base/comps/rust/overlays/0002-s-compiler-rt-runtime.overlay.toml b/base/comps/rust/overlays/0002-s-compiler-rt-runtime.overlay.toml new file mode 100644 index 00000000000..aed2036b93d --- /dev/null +++ b/base/comps/rust/overlays/0002-s-compiler-rt-runtime.overlay.toml @@ -0,0 +1,17 @@ +[metadata] +category = "azl-compatibility" +upstreamable = false + +[[overlays]] +description = "Use Azure Linux's compiler-rt runtime triple for Rust profiler_builtins; LLVM installs clang runtimes under %{_target_platform}, not redhat" +type = "spec-search-replace" +section = "%build" +regex = "%define profiler %{clang_lib}/%{_arch}-redhat-linux-gnu/libclang_rt.profile.a" +replacement = "%define profiler %{clang_lib}/%{_target_platform}/libclang_rt.profile.a" + +[[overlays]] +description = "Use Azure Linux's compiler-rt runtime triple for Rust optimized compiler builtins; LLVM installs clang runtimes under %{_target_platform}, not redhat" +type = "spec-search-replace" +section = "%build" +regex = "%define optimized_builtins %{clang_lib}/%{_arch}-redhat-linux-gnu/libclang_rt.builtins.a" +replacement = "%define optimized_builtins %{clang_lib}/%{_target_platform}/libclang_rt.builtins.a" diff --git a/base/comps/rust/rust.comp.toml b/base/comps/rust/rust.comp.toml index d7efd5e6bd3..1deb03c6b84 100644 --- a/base/comps/rust/rust.comp.toml +++ b/base/comps/rust/rust.comp.toml @@ -2,24 +2,3 @@ # Fedora repo does not host 1.93, which the spec gets pinned to. Fetch # spec from a more recent commit to pickup version - 1.94.1. spec = { type = "upstream", upstream-distro = { name = "fedora", version = "43"}, upstream-commit = "b431103e3e71d30dda680c95d2f5d4fe50003436" } - -# Azure Linux does not ship mingw cross-compilation toolchains. -[[components.rust.overlays]] -description = "Disable mingw cross-compilation targets — Azure Linux does not ship mingw toolchains" -type = "spec-search-replace" -regex = '%global mingw_targets i686-pc-windows-gnu x86_64-pc-windows-gnu' -replacement = '#global mingw_targets i686-pc-windows-gnu x86_64-pc-windows-gnu' - -[[components.rust.overlays]] -description = "Use Azure Linux's compiler-rt runtime triple for Rust profiler_builtins; LLVM installs clang runtimes under %{_target_platform}, not redhat" -type = "spec-search-replace" -section = "%build" -regex = '%define profiler %{clang_lib}/%{_arch}-redhat-linux-gnu/libclang_rt.profile.a' -replacement = '%define profiler %{clang_lib}/%{_target_platform}/libclang_rt.profile.a' - -[[components.rust.overlays]] -description = "Use Azure Linux's compiler-rt runtime triple for Rust optimized compiler builtins; LLVM installs clang runtimes under %{_target_platform}, not redhat" -type = "spec-search-replace" -section = "%build" -regex = '%define optimized_builtins %{clang_lib}/%{_arch}-redhat-linux-gnu/libclang_rt.builtins.a' -replacement = '%define optimized_builtins %{clang_lib}/%{_target_platform}/libclang_rt.builtins.a' diff --git a/base/comps/shim/overlays/0001-release-management-change.overlay.toml b/base/comps/shim/overlays/0001-release-management-change.overlay.toml new file mode 100644 index 00000000000..de952a3a521 --- /dev/null +++ b/base/comps/shim/overlays/0001-release-management-change.overlay.toml @@ -0,0 +1,26 @@ +# TEMPORARILY force dist tag to be present in release to avoid NEVR conflicts + +[metadata] +category = "azl-release-management" +upstreamable = false + +[[overlays]] +type = "spec-search-replace" +regex = "%global dist.*" +replacement = "" + +# TEMPORARILY remove release from the dependency on the shim unsigned packages +[[overlays]] +type = "spec-search-replace" +regex = "^BuildRequires:.*unsignedx64.*$" +replacement = "BuildRequires: %{unsignedx64} = 15.8" + +[[overlays]] +type = "spec-search-replace" +regex = "^BuildRequires:.*unsignedia32.*$" +replacement = "BuildRequires: %{unsignedia32} = 15.8" + +[[overlays]] +type = "spec-search-replace" +regex = "^BuildRequires:.*unsignedaa64.*$" +replacement = "BuildRequires: %{unsignedaa64} = 15.8" diff --git a/base/comps/shim/overlays/0002-compatibility-change.overlay.toml b/base/comps/shim/overlays/0002-compatibility-change.overlay.toml new file mode 100644 index 00000000000..b4e8785d82a --- /dev/null +++ b/base/comps/shim/overlays/0002-compatibility-change.overlay.toml @@ -0,0 +1,10 @@ +# TEMPORARILY use the unsigned shim binaries from our shim-unsigned-ARCH packages + +[metadata] +category = "azl-compatibility" +upstreamable = false + +[[overlays]] +type = "spec-append-lines" +section = "%prep" +lines = ["test -e %{shimdirx64}/$(basename %{shimefix64}) && cp -vf %{shimdirx64}/$(basename %{shimefix64}) %{shimefix64} ||:", "test -e %{shimdiria32}/$(basename %{shimefiia32}) && cp -vf %{shimdiria32}/$(basename %{shimefiia32}) %{shimefiia32} ||:", "test -e %{shimdiraa64}/$(basename %{shimefiaa64}) && cp -vf %{shimdiraa64}/$(basename %{shimefiaa64}) %{shimefiaa64} ||:"] diff --git a/base/comps/shim/overlays/0003-set-boot-csv-boot.overlay.toml b/base/comps/shim/overlays/0003-set-boot-csv-boot.overlay.toml new file mode 100644 index 00000000000..a6b1cd41384 --- /dev/null +++ b/base/comps/shim/overlays/0003-set-boot-csv-boot.overlay.toml @@ -0,0 +1,12 @@ +# BOOT*.CSV files are UTF-16LE, so regex/replacement include explicit NUL bytes. + +[metadata] +category = "azl-branding-policy" +upstreamable = false + +[[overlays]] +description = "Set BOOT*.CSV boot-entry label from Fedora to AzureLinux" +type = "file-search-replace" +file = "BOOT*.CSV" +regex = "F\u0000e\u0000d\u0000o\u0000r\u0000a\u0000" +replacement = "A\u0000z\u0000u\u0000r\u0000e\u0000L\u0000i\u0000n\u0000u\u0000x\u0000" diff --git a/base/comps/shim/shim.comp.toml b/base/comps/shim/shim.comp.toml index f28485d83cc..06a3e7f2d7c 100644 --- a/base/comps/shim/shim.comp.toml +++ b/base/comps/shim/shim.comp.toml @@ -1,22 +1,3 @@ [components.shim] spec = { type = "upstream", upstream-distro = { name = "fedora", version = "43" }, upstream-commit = "7b08c421ed4dbca88af0cbaabb73332d08944c86" } -overlays = [ - # TEMPORARILY force dist tag to be present in release to avoid NEVR conflicts - { type = "spec-search-replace", regex = '%global dist.*', replacement = "" }, - - # TEMPORARILY remove release from the dependency on the shim unsigned packages - { type = "spec-search-replace", regex = '^BuildRequires:.*unsignedx64.*$', replacement = "BuildRequires: %{unsignedx64} = 15.8" }, - { type = "spec-search-replace", regex = '^BuildRequires:.*unsignedia32.*$', replacement = "BuildRequires: %{unsignedia32} = 15.8" }, - { type = "spec-search-replace", regex = '^BuildRequires:.*unsignedaa64.*$', replacement = "BuildRequires: %{unsignedaa64} = 15.8" }, - - # TEMPORARILY use the unsigned shim binaries from our shim-unsigned-ARCH packages - { type = "spec-append-lines", section = "%prep", lines = [ - "test -e %{shimdirx64}/$(basename %{shimefix64}) && cp -vf %{shimdirx64}/$(basename %{shimefix64}) %{shimefix64} ||:", - "test -e %{shimdiria32}/$(basename %{shimefiia32}) && cp -vf %{shimdiria32}/$(basename %{shimefiia32}) %{shimefiia32} ||:", - "test -e %{shimdiraa64}/$(basename %{shimefiaa64}) && cp -vf %{shimdiraa64}/$(basename %{shimefiaa64}) %{shimefiaa64} ||:", - ] }, - - # BOOT*.CSV files are UTF-16LE, so regex/replacement include explicit NUL bytes. - { description = "Set BOOT*.CSV boot-entry label from Fedora to AzureLinux", type = "file-search-replace", file = "BOOT*.CSV", regex = "F\u0000e\u0000d\u0000o\u0000r\u0000a\u0000", replacement = "A\u0000z\u0000u\u0000r\u0000e\u0000L\u0000i\u0000n\u0000u\u0000x\u0000" }, -] diff --git a/base/comps/unicode-ucd/overlays/0001-install-m-0644-unihan.overlay.toml b/base/comps/unicode-ucd/overlays/0001-install-m-0644-unihan.overlay.toml new file mode 100644 index 00000000000..8372e0ee49c --- /dev/null +++ b/base/comps/unicode-ucd/overlays/0001-install-m-0644-unihan.overlay.toml @@ -0,0 +1,19 @@ +# The upstream spec uses `cp -p` to install Unihan.zip (Source1) into the UCD +# directory. The `-p` flag preserves the source file's original permissions. +# Fedora's lookaside cache delivers files with 0644, but azldev's downloader +# stores them with 0600 — so the installed Unihan.zip ends up owner-only +# readable instead of world-readable. +# +# Fix: replace `cp -p` with `install -m 0644` to set permissions explicitly, +# making the result independent of the downloader's behavior. + +[metadata] +category = "azl-compatibility" +upstreamable = true + +[[overlays]] +description = "Use install -m 0644 for Unihan.zip to ensure correct permissions regardless of source file mode" +type = "spec-search-replace" +section = "%install" +regex = "cp -p %\\{SOURCE1\\} %\\{buildroot\\}%\\{ucddir\\}" +replacement = "install -m 0644 %{SOURCE1} %{buildroot}%{ucddir}" diff --git a/base/comps/unicode-ucd/overlays/0002-manually-bump-release.overlay.toml b/base/comps/unicode-ucd/overlays/0002-manually-bump-release.overlay.toml new file mode 100644 index 00000000000..1c49c6a65dd --- /dev/null +++ b/base/comps/unicode-ucd/overlays/0002-manually-bump-release.overlay.toml @@ -0,0 +1,12 @@ +# WORKAROUND: Manually bump the Release on this package to aid with Stage2 +# bring-up. + +[metadata] +category = "azl-release-management" +upstreamable = false + +[[overlays]] +description = "Manually bump release" +type = "spec-update-tag" +tag = "Release" +value = "2%{?dist}" diff --git a/base/comps/unicode-ucd/unicode-ucd.comp.toml b/base/comps/unicode-ucd/unicode-ucd.comp.toml index f186cc4a228..fe4d75f0e55 100644 --- a/base/comps/unicode-ucd/unicode-ucd.comp.toml +++ b/base/comps/unicode-ucd/unicode-ucd.comp.toml @@ -1,25 +1 @@ [components.unicode-ucd] - -# The upstream spec uses `cp -p` to install Unihan.zip (Source1) into the UCD -# directory. The `-p` flag preserves the source file's original permissions. -# Fedora's lookaside cache delivers files with 0644, but azldev's downloader -# stores them with 0600 — so the installed Unihan.zip ends up owner-only -# readable instead of world-readable. -# -# Fix: replace `cp -p` with `install -m 0644` to set permissions explicitly, -# making the result independent of the downloader's behavior. -[[components.unicode-ucd.overlays]] -description = "Use install -m 0644 for Unihan.zip to ensure correct permissions regardless of source file mode" -type = "spec-search-replace" -section = "%install" -regex = 'cp -p %\{SOURCE1\} %\{buildroot\}%\{ucddir\}' -replacement = 'install -m 0644 %{SOURCE1} %{buildroot}%{ucddir}' - -# WORKAROUND: Manually bump the Release on this package to aid with Stage2 -# bring-up. -[[components.unicode-ucd.overlays]] -description = "Manually bump release" -type = "spec-update-tag" -tag = "Release" -value = "2%{?dist}" - diff --git a/distro/azurelinux.distro.toml b/distro/azurelinux.distro.toml index 2662f685e26..21f8bb08a9a 100644 --- a/distro/azurelinux.distro.toml +++ b/distro/azurelinux.distro.toml @@ -19,6 +19,10 @@ mock-config-aarch64 = "mock/azl4/stage1/azurelinux-4.0-aarch64.cfg" [distros.azurelinux.versions.'4.0-stage1'.default-component-config] # NOTE: Ensure that the snapshot date matches the snapshot date used below for stage2. spec = { type = "upstream", upstream-distro = { name = "fedora", version = "43", snapshot = "2026-02-24T00:00:00-08:00" } } +# Discover per-file overlay documents from each component's ./overlays/ directory. +# Inherited relative pattern is resolved per-component; globs that match no files +# are ignored, so components without an overlays/ dir are unaffected. +overlay-files = ["overlays/*.overlay.toml"] # # Azure Linux 4.0 Stage2 @@ -36,3 +40,7 @@ mock-config-aarch64 = "mock/azl4/stage2/azurelinux-4.0-aarch64.cfg" [distros.azurelinux.versions.'4.0-stage2'.default-component-config] # NOTE: Ensure that the snapshot date matches the snapshot date used above for stage1. spec = { type = "upstream", upstream-distro = { name = "fedora", version = "43", snapshot = "2026-02-24T00:00:00-08:00" } } +# Discover per-file overlay documents from each component's ./overlays/ directory. +# Inherited relative pattern is resolved per-component; globs that match no files +# are ignored, so components without an overlays/ dir are unaffected. +overlay-files = ["overlays/*.overlay.toml"] diff --git a/external/schemas/azldev.schema.json b/external/schemas/azldev.schema.json index e2e8dd16836..d665b45f9bd 100644 --- a/external/schemas/azldev.schema.json +++ b/external/schemas/azldev.schema.json @@ -3,6 +3,22 @@ "$id": "https://github.com/microsoft/azure-linux-dev-tools/internal/projectconfig/config-file", "$ref": "#/$defs/ConfigFile", "$defs": { + "BugRef": { + "properties": { + "url": { + "type": "string", + "pattern": "^https?://", + "format": "uri", + "title": "URL", + "description": "HTTP(S) link to the bug entry" + } + }, + "additionalProperties": false, + "type": "object", + "required": [ + "url" + ] + }, "CheckConfig": { "properties": { "skip": { @@ -119,6 +135,14 @@ "title": "Overlays", "description": "Overlays to apply to this component's spec and/or sources" }, + "overlay-files": { + "items": { + "type": "string" + }, + "type": "array", + "title": "Overlay files", + "description": "Path or glob patterns (relative to the component config file or matched spec directory) matched against the filesystem to locate per-file overlay documents after component config resolution. Use an empty list to disable inherited overlay-file patterns" + }, "build": { "$ref": "#/$defs/ComponentBuildConfig", "title": "Build configuration", @@ -278,6 +302,11 @@ "type": "string", "title": "Source", "description": "For overlays that require a source file as input" + }, + "metadata": { + "$ref": "#/$defs/OverlayMetadata", + "title": "Metadata", + "description": "Optional documentation metadata describing the overlay's intent and provenance" } }, "additionalProperties": false, @@ -344,6 +373,11 @@ "title": "Distros", "description": "Definitions of distros to build for or consume from" }, + "resources": { + "$ref": "#/$defs/ResourcesConfig", + "title": "Resources", + "description": "Reusable named resource definitions" + }, "component-groups": { "additionalProperties": { "$ref": "#/$defs/ComponentGroupConfig" @@ -513,6 +547,11 @@ "type": "string", "title": "Mock config file", "description": "Path to the aarch64 mock config file for this version" + }, + "inputs": { + "$ref": "#/$defs/DistroVersionInputs", + "title": "Inputs", + "description": "Per-use-case input repositories" } }, "additionalProperties": false, @@ -521,6 +560,44 @@ "release-ver" ] }, + "DistroVersionInput": { + "properties": { + "repo": { + "type": "string", + "title": "Repo", + "description": "Name of an entry under [resources.rpm-repos]; mutually exclusive with set" + }, + "set": { + "type": "string", + "title": "Set", + "description": "Name of an entry under [resources.rpm-repo-sets]; mutually exclusive with repo" + } + }, + "additionalProperties": false, + "type": "object" + }, + "DistroVersionInputs": { + "properties": { + "rpm-build": { + "items": { + "$ref": "#/$defs/DistroVersionInput" + }, + "type": "array", + "title": "RPM-build inputs", + "description": "Repos and repo-sets made available to mock when building RPMs" + }, + "image-build": { + "items": { + "$ref": "#/$defs/DistroVersionInput" + }, + "type": "array", + "title": "Image-build inputs", + "description": "Repos and repo-sets made available to kiwi when building images" + } + }, + "additionalProperties": false, + "type": "object" + }, "ImageCapabilities": { "properties": { "machine-bootable": { @@ -663,6 +740,53 @@ "type" ] }, + "OverlayMetadata": { + "properties": { + "category": { + "type": "string", + "enum": [ + "backport-dist-git", + "azl-pruning", + "azl-compatibility", + "azl-dep-missing-workaround", + "azl-branding-policy", + "azl-disable-flaky-tests", + "azl-disable-unsupported-tests", + "azl-security-compliance", + "azl-release-management", + "azl-platform-adaptation" + ], + "title": "Category", + "description": "Classification of the overlay's intent" + }, + "commits": { + "items": { + "type": "string" + }, + "type": "array", + "title": "Commits", + "description": "URLs of upstream commits this overlay backports or references" + }, + "bugs": { + "items": { + "$ref": "#/$defs/BugRef" + }, + "type": "array", + "title": "Bug references", + "description": "References to issue-tracker entries related to this overlay" + }, + "upstreamable": { + "type": "boolean", + "title": "Upstreamable", + "description": "Whether this overlay's change can be upstreamed; omit if not yet assessed" + } + }, + "additionalProperties": false, + "type": "object", + "required": [ + "category" + ] + }, "PackageConfig": { "properties": { "publish": { @@ -846,6 +970,206 @@ "additionalProperties": false, "type": "object" }, + "ResourcesConfig": { + "properties": { + "rpm-repos": { + "additionalProperties": { + "$ref": "#/$defs/RpmRepoResource" + }, + "propertyNames": { + "type": "string", + "pattern": "^[A-Za-z0-9][A-Za-z0-9_.:-]*$", + "description": "Name; projected verbatim into dnf section headers and kiwi --add-repo arguments." + }, + "type": "object", + "title": "RPM repositories", + "description": "Reusable named RPM repository definitions" + }, + "rpm-repo-set-templates": { + "additionalProperties": { + "$ref": "#/$defs/RpmRepoSetTemplate" + }, + "propertyNames": { + "type": "string", + "pattern": "^[A-Za-z0-9][A-Za-z0-9_.:-]*$", + "description": "Name; projected verbatim into dnf section headers and kiwi --add-repo arguments." + }, + "type": "object", + "title": "RPM repo set templates", + "description": "Named layout templates that describe a fixed matrix of sub-repos" + }, + "rpm-repo-sets": { + "additionalProperties": { + "$ref": "#/$defs/RpmRepoSet" + }, + "propertyNames": { + "type": "string", + "pattern": "^[A-Za-z0-9][A-Za-z0-9_.:-]*$", + "description": "Name; projected verbatim into dnf section headers and kiwi --add-repo arguments." + }, + "type": "object", + "title": "RPM repo sets", + "description": "Template instantiations that expand to a group of related RPM repos" + } + }, + "additionalProperties": false, + "type": "object" + }, + "RpmRepoResource": { + "oneOf": [ + { + "not": { + "required": [ + "metalink" + ] + }, + "required": [ + "base-uri" + ] + }, + { + "not": { + "required": [ + "base-uri" + ] + }, + "required": [ + "metalink" + ] + } + ], + "properties": { + "description": { + "type": "string", + "title": "Description", + "description": "Human-readable description (diagnostic only)" + }, + "type": { + "type": "string", + "enum": [ + "rpm-md" + ], + "title": "Type", + "description": "Repository access protocol; defaults to rpm-md" + }, + "base-uri": { + "type": "string", + "pattern": "^https?://[^\\s]+$", + "format": "uri", + "title": "Base URI", + "description": "Repository base URI (dnf baseurl). Mutually exclusive with metalink. Must be an http(s) URL." + }, + "metalink": { + "type": "string", + "pattern": "^https?://[^\\s]+$", + "format": "uri", + "title": "Metalink", + "description": "Repository metalink URL. Mutually exclusive with base-uri. Must be an http(s) URL." + }, + "disable-gpg-check": { + "type": "boolean", + "title": "Disable GPG check", + "description": "Opt out of GPG signature verification for this repo (zero value = checking enabled)" + }, + "gpg-key": { + "type": "string", + "pattern": "^((https?|file)://\\S+|[^\\s:]\\S*)$", + "title": "GPG key", + "description": "Path or URI to the GPG key file. Accepted URI schemes: http, https, file. Bare paths are resolved relative to the defining TOML file." + }, + "arches": { + "items": { + "type": "string" + }, + "type": "array", + "title": "Arches", + "description": "Restrict to specific target architectures; empty = all" + } + }, + "additionalProperties": false, + "type": "object" + }, + "RpmRepoSet": { + "properties": { + "description": { + "type": "string", + "title": "Description", + "description": "Human-readable description (diagnostic only)" + }, + "template": { + "type": "string", + "title": "Template", + "description": "Name of the rpm-repo-set-template to instantiate" + }, + "base-uri": { + "type": "string", + "pattern": "^https?://[^\\s]+$", + "format": "uri", + "title": "Base URI", + "description": "URL prefix under which all sub-repos in this set live" + }, + "name-prefix": { + "type": "string", + "title": "Name prefix", + "description": "Prepended to each sub-repo's name to form the repo ID" + }, + "gpg-key": { + "type": "string", + "pattern": "^\\S+$", + "title": "GPG key", + "description": "Path or URI to the GPG key file. Accepted URI schemes: http, https, file. Bare paths are resolved relative to the defining TOML file." + }, + "disable-gpg-check": { + "type": "boolean", + "title": "Disable GPG check", + "description": "Opt out of GPG signature verification for repos in this set" + }, + "arches": { + "items": { + "type": "string" + }, + "type": "array", + "title": "Arches", + "description": "Restrict to specific target architectures; empty = all" + }, + "subrepos": { + "items": { + "type": "string" + }, + "type": "array", + "title": "Sub-repos", + "description": "Allowlist of template sub-repos to instantiate (default: all)" + } + }, + "additionalProperties": false, + "type": "object", + "required": [ + "template", + "base-uri" + ] + }, + "RpmRepoSetTemplate": { + "properties": { + "description": { + "type": "string", + "title": "Description", + "description": "Human-readable description (diagnostic only)" + }, + "subrepos": { + "items": { + "$ref": "#/$defs/SubrepoSpec" + }, + "type": "array", + "title": "Sub-repos", + "description": "Ordered list of sub-repos in the layout" + } + }, + "additionalProperties": false, + "type": "object", + "required": [ + "subrepos" + ] + }, "SourceFileReference": { "properties": { "filename": { @@ -934,6 +1258,36 @@ "type" ] }, + "SubrepoSpec": { + "properties": { + "name": { + "type": "string", + "title": "Name", + "description": "Stable short identifier; combined with the set's name-prefix to form the repo ID" + }, + "subpath": { + "type": "string", + "title": "Sub-path", + "description": "Relative path under the set's base URI; may contain $basearch" + }, + "kind": { + "type": "string", + "enum": [ + "binary", + "debug", + "source" + ], + "title": "Kind", + "description": "Sub-repo classification; defaults to binary" + } + }, + "additionalProperties": false, + "type": "object", + "required": [ + "name", + "subpath" + ] + }, "TestSuiteConfig": { "properties": { "description": {