Skip to content

fix(cloud-init): update cloud-init to correctly support azl4#16938

Draft
ddstreet wants to merge 4 commits intomicrosoft:tomls/base/mainfrom
ddstreet:cloud-init-cfg
Draft

fix(cloud-init): update cloud-init to correctly support azl4#16938
ddstreet wants to merge 4 commits intomicrosoft:tomls/base/mainfrom
ddstreet:cloud-init-cfg

Conversation

@ddstreet
Copy link
Copy Markdown
Contributor

This modifies the spec file to pass the variant as 'azurelinux', as well as applying patches to adjust the cloud-init templates for cloud.cfg and the systemd units.

The patches are not yet upstreamed; some review and testing of the specific template settings should be done before upstreaming.

Copilot AI review requested due to automatic review settings April 29, 2026 14:37
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Updates the cloud-init component packaging for Azure Linux 4 by ensuring the rendered templates/configs are generated with an azurelinux variant and by patching upstream templates to recognize that variant.

Changes:

  • Add a patch to include azurelinux in cloud-init’s systemd unit/generator templates.
  • Add a patch to adjust cloud.cfg template behavior for azurelinux (including default user handling) and update the related unit test.
  • Update cloud-init.comp.toml overlays to apply the new patches and to replace the spec’s render-template --variant ... invocation with --variant azurelinux.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 3 comments.

File Description
base/comps/cloud-init/cloud-init.comp.toml Adds new Patch/file overlays and changes the spec search/replace to force --variant azurelinux.
base/comps/cloud-init/add-azurelinux-to-systemd-templates.patch Extends systemd template conditionals to treat azurelinux like Fedora/RHEL-family variants where appropriate.
base/comps/cloud-init/update-cloud-cfg.patch Adjusts cloud.cfg template logic for azurelinux and updates an upstream unit test expectation.

section = "%install"
regex = '%py3_install -- --init-system=systemd'
replacement = '%py3_install -- --init-system=systemd --distro=fedora'
regex = 'python3 tools/render-template --variant %{\?rhel:rhel}%{!\?rhel:fedora}'
Copy link

Copilot AI Apr 29, 2026

Choose a reason for hiding this comment

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

The spec-search-replace regex contains RPM macro braces (%{...}) that are regex metacharacters. Unescaped { / } will cause most regex engines (including Rust/Python-style) to fail to compile the pattern, so this overlay may not apply at all. Escape the braces (and keep the ? escapes), or match the whole render-template line with a brace-free pattern anchored in %install.

Suggested change
regex = 'python3 tools/render-template --variant %{\?rhel:rhel}%{!\?rhel:fedora}'
section = "%install"
regex = '^python3 tools/render-template --variant .*$'

Copilot uses AI. Check for mistakes.
Comment on lines +39 to +43
[[components.cloud-init.overlays]]
description = "Set variant to azurelinux"
type = "spec-search-replace"
section = "%install"
regex = '%py3_install -- --init-system=systemd'
replacement = '%py3_install -- --init-system=systemd --distro=fedora'
regex = 'python3 tools/render-template --variant %{\?rhel:rhel}%{!\?rhel:fedora}'
replacement = "python3 tools/render-template --variant azurelinux"
Copy link

Copilot AI Apr 29, 2026

Choose a reason for hiding this comment

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

This overlay updates the %install render-template invocation, but the PR also removed the previous %py3_install ... --distro=... override (the current rendered spec uses --distro=fedora). If --distro isn’t passed at install time, systemd templates like cloud-init-generator may render without a variant and can regress ds-identify path selection. Consider keeping the %py3_install override and switching it to --distro=azurelinux so template rendering is consistent with the new patches.

Copilot uses AI. Check for mistakes.
Comment on lines +27 to +31
[[components.cloud-init.overlays]]
description = "Update cloud.cfg template"
type = "spec-add-tag"
tag = "Patch"
value = "update-cloud-cfg.patch"
Copy link

Copilot AI Apr 29, 2026

Choose a reason for hiding this comment

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

The overlays/patch list changes here will alter the rendered spec output, but this PR doesn’t include the corresponding update to the checked-in rendered spec (specs/c/cloud-init/cloud-init.spec). Please re-render (azldev comp render -p cloud-init) and commit the updated rendered spec so the repo stays consistent.

Copilot uses AI. Check for mistakes.
@github-actions
Copy link
Copy Markdown

❌ Rendered specs are out of date

🚧🚧🚧🚧🚧

Warning

Disregard this comment.

Spec rendering is still under development and checked-in specs
should not be updated in PRs yet.
Please ignore this comment for now unless you are actively
working on the render pipeline.

🚧🚧🚧🚧🚧

FIX: — run this and commit the result:

azldev component render -a --clean-stale

Or download the fix patch and apply it:

gh run download 25115323112 -R microsoft/azurelinux -n rendered-specs-patch
git apply rendered-specs.patch
Category Count
Content diffs 4008
Extra files (untracked) 271
Missing files (deleted) 312

Content diffs

`specs/3/389-ds-base/389-ds-base.spec`
--- committed/specs/3/389-ds-base/389-ds-base.spec
+++ rendered/specs/3/389-ds-base/389-ds-base.spec
@@ -1,5 +1,5 @@
 ## START: Set by rpmautospec
-## (rpmautospec version 0.8.4)
+## (rpmautospec version 0.8.3)
 ## RPMAUTOSPEC: autorelease, autochangelog
 %define autorelease(e:s:pb:n) %{?-p:0.}%{lua:
     release_number = 8;
@@ -1123,7 +1123,7 @@
 
 %changelog
 ## START: Generated by rpmautospec
-* Wed Apr 22 2026 azldev <azurelinux@microsoft.com> - 3.1.4-8
+* Wed Apr 29 2026 azldev <azurelinux@microsoft.com> - 3.1.4-8
 - Latest state for 389-ds-base
 
 * Fri Feb 13 2026 Viktor Ashirov <vashirov@redhat.com> - 3.1.4-7
`specs/7/7zip/7zip.spec`
--- committed/specs/7/7zip/7zip.spec
+++ rendered/specs/7/7zip/7zip.spec
@@ -1,5 +1,5 @@
 ## START: Set by rpmautospec
-## (rpmautospec version 0.8.4)
+## (rpmautospec version 0.8.3)
 ## RPMAUTOSPEC: autorelease, autochangelog
 %define autorelease(e:s:pb:n) %{?-p:0.}%{lua:
     release_number = 2;
@@ -138,7 +138,7 @@
 
 %changelog
 ## START: Generated by rpmautospec
-* Wed Apr 22 2026 azldev <azurelinux@microsoft.com> - 25.01-2
+* Wed Apr 29 2026 azldev <azurelinux@microsoft.com> - 25.01-2
 - Latest state for 7zip
 
 * Wed Nov 26 2025 Michel Lind <salimma@fedoraproject.org> - 25.01-1
`specs/a/AMF/AMF.spec`
--- committed/specs/a/AMF/AMF.spec
+++ rendered/specs/a/AMF/AMF.spec
@@ -1,5 +1,5 @@
 ## START: Set by rpmautospec
-## (rpmautospec version 0.8.4)
+## (rpmautospec version 0.8.3)
 ## RPMAUTOSPEC: autorelease, autochangelog
 %define autorelease(e:s:pb:n) %{?-p:0.}%{lua:
     release_number = 2;
@@ -87,7 +87,7 @@
 
 %changelog
 ## START: Generated by rpmautospec
-* Wed Apr 22 2026 azldev <azurelinux@microsoft.com> - 1:1.5.0-2
+* Wed Apr 29 2026 azldev <azurelinux@microsoft.com> - 1:1.5.0-2
 - Latest state for AMF
 
 * Fri Oct 31 2025 Simone Caronni <negativo17@gmail.com> - 1:1.5.0-1
`specs/a/aardvark-dns/aardvark-dns.spec`
--- committed/specs/a/aardvark-dns/aardvark-dns.spec
+++ rendered/specs/a/aardvark-dns/aardvark-dns.spec
@@ -1,5 +1,5 @@
 ## START: Set by rpmautospec
-## (rpmautospec version 0.8.4)
+## (rpmautospec version 0.8.3)
 ## RPMAUTOSPEC: autorelease, autochangelog
 %define autorelease(e:s:pb:n) %{?-p:0.}%{lua:
     release_number = 2;
@@ -130,7 +130,7 @@
 
 %changelog
 ## START: Generated by rpmautospec
-* Wed Apr 22 2026 azldev <azurelinux@microsoft.com> - 2:1.17.0-2
+* Wed Apr 29 2026 azldev <azurelinux@microsoft.com> - 2:1.17.0-2
 - Latest state for aardvark-dns
 
 * Wed Nov 12 2025 Packit <hello@packit.dev> - 2:1.17.0-1
`specs/a/abseil-cpp/abseil-cpp.spec`
--- committed/specs/a/abseil-cpp/abseil-cpp.spec
+++ rendered/specs/a/abseil-cpp/abseil-cpp.spec
@@ -1,5 +1,5 @@
 ## START: Set by rpmautospec
-## (rpmautospec version 0.8.4)
+## (rpmautospec version 0.8.3)
 ## RPMAUTOSPEC: autorelease, autochangelog
 %define autorelease(e:s:pb:n) %{?-p:0.}%{lua:
     release_number = 2;
@@ -267,7 +267,7 @@
 
 %changelog
 ## START: Generated by rpmautospec
-* Wed Apr 22 2026 azldev <azurelinux@microsoft.com> - 20250814.1-2
+* Wed Apr 29 2026 azldev <azurelinux@microsoft.com> - 20250814.1-2
 - Latest state for abseil-cpp
 
 * Tue Sep 23 2025 Benjamin A. Beasley <code@musicinmybrain.net> - 20250814.1-1
`specs/a/accountsservice/accountsservice.spec`
--- committed/specs/a/accountsservice/accountsservice.spec
+++ rendered/specs/a/accountsservice/accountsservice.spec
@@ -1,5 +1,5 @@
 ## START: Set by rpmautospec
-## (rpmautospec version 0.8.4)
+## (rpmautospec version 0.8.3)
 ## RPMAUTOSPEC: autorelease, autochangelog
 %define autorelease(e:s:pb:n) %{?-p:0.}%{lua:
     release_number = 15;
@@ -130,7 +130,7 @@
 
 %changelog
 ## START: Generated by rpmautospec
-* Wed Apr 22 2026 azldev <azurelinux@microsoft.com> - 23.13.9-15
+* Wed Apr 29 2026 azldev <azurelinux@microsoft.com> - 23.13.9-15
 - Latest state for accountsservice
 
 * Wed Jul 23 2025 Fedora Release Engineering <releng@fedoraproject.org> - 23.13.9-9
`specs/a/adobe-source-code-pro-fonts/adobe-source-code-pro-fonts.spec`
--- committed/specs/a/adobe-source-code-pro-fonts/adobe-source-code-pro-fonts.spec
+++ rendered/specs/a/adobe-source-code-pro-fonts/adobe-source-code-pro-fonts.spec
@@ -1,5 +1,5 @@
 ## START: Set by rpmautospec
-## (rpmautospec version 0.8.4)
+## (rpmautospec version 0.8.3)
 ## RPMAUTOSPEC: autorelease, autochangelog
 %define autorelease(e:s:pb:n) %{?-p:0.}%{lua:
     release_number = 8;
@@ -71,7 +71,7 @@
 
 %changelog
 ## START: Generated by rpmautospec
-* Wed Apr 22 2026 azldev <azurelinux@microsoft.com> - 2.042.1.062.1.026-8
+* Wed Apr 29 2026 azldev <azurelinux@microsoft.com> - 2.042.1.062.1.026-8
 - Latest state for adobe-source-code-pro-fonts
 
 * Wed Jul 23 2025 Fedora Release Engineering <releng@fedoraproject.org> - 2.042.1.062.1.026-7
`specs/a/adwaita-icon-theme-legacy/adwaita-icon-theme-legacy.spec`
--- committed/specs/a/adwaita-icon-theme-legacy/adwaita-icon-theme-legacy.spec
+++ rendered/specs/a/adwaita-icon-theme-legacy/adwaita-icon-theme-legacy.spec
@@ -1,5 +1,5 @@
 ## START: Set by rpmautospec
-## (rpmautospec version 0.8.4)
+## (rpmautospec version 0.8.3)
 ## RPMAUTOSPEC: autorelease, autochangelog
 %define autorelease(e:s:pb:n) %{?-p:0.}%{lua:
     release_number = 6;
@@ -87,7 +87,7 @@
 
 %changelog
 ## START: Generated by rpmautospec
-* Wed Apr 22 2026 azldev <azurelinux@microsoft.com> - 46.2-6
+* Wed Apr 29 2026 azldev <azurelinux@microsoft.com> - 46.2-6
 - Latest state for adwaita-icon-theme-legacy
 
 * Wed Jul 23 2025 Fedora Release Engineering <releng@fedoraproject.org> - 46.2-4
`specs/a/adwaita-icon-theme/adwaita-icon-theme.spec`
--- committed/specs/a/adwaita-icon-theme/adwaita-icon-theme.spec
+++ rendered/specs/a/adwaita-icon-theme/adwaita-icon-theme.spec
@@ -1,5 +1,5 @@
 ## START: Set by rpmautospec
-## (rpmautospec version 0.8.4)
+## (rpmautospec version 0.8.3)
 ## RPMAUTOSPEC: autorelease, autochangelog
 %define autorelease(e:s:pb:n) %{?-p:0.}%{lua:
     release_number = 4;
@@ -93,7 +93,7 @@
 
 %changelog
 ## START: Generated by rpmautospec
-* Wed Apr 22 2026 azldev <azurelinux@microsoft.com> - 49.0-4
+* Wed Apr 29 2026 azldev <azurelinux@microsoft.com> - 49.0-4
 - Latest state for adwaita-icon-theme
 
 * Mon Sep 15 2025 Michael Catanzaro <mcatanzaro@gnome.org> - 49.0-1
`specs/a/afflib/afflib.spec`
--- committed/specs/a/afflib/afflib.spec
+++ rendered/specs/a/afflib/afflib.spec
@@ -1,5 +1,5 @@
 ## START: Set by rpmautospec
-## (rpmautospec version 0.8.4)
+## (rpmautospec version 0.8.3)
 ## RPMAUTOSPEC: autorelease, autochangelog
 %define autorelease(e:s:pb:n) %{?-p:0.}%{lua:
     release_number = 16;
@@ -223,7 +223,7 @@
 
 %changelog
 ## START: Generated by rpmautospec
-* Wed Apr 22 2026 azldev <azurelinux@microsoft.com> - 3.7.20-16
+* Wed Apr 29 2026 azldev <azurelinux@microsoft.com> - 3.7.20-16
 - Latest state for afflib
 
 * Wed Jul 23 2025 Fedora Release Engineering <releng@fedoraproject.org> - 3.7.20-15

… and 3998 more file(s). Run the remediation command above to see all changes.

Files to add

These files are produced by azldev component render but are missing from your branch. Add them.

  • specs/7/7zip/7z-dont-echo-password.diff
  • specs/a/aurorae/README.md
  • specs/b/blosc/blosc-CMake4.0.patch
  • specs/c/cinnamon/Use_DesktopAppInfo_from_GioUnix.patch
  • specs/c/cinnamon/fix_mount_applet.patch
  • specs/c/cloud-init/add-azurelinux-to-systemd-templates.patch
  • specs/c/cloud-init/update-cloud-cfg.patch
  • specs/c/colm/colm-libfsm-ac_check_lib.diff
  • specs/c/cpp-httplib/cpp-httplib-cpp11-test.patch
  • specs/c/cpp-httplib/cpp-httplib-test-issue2301-online.patch
  • specs/d/dejavu-fonts/.fmf/version
  • specs/d/dejavu-fonts/57-dejavu-sans-fonts.xml
  • specs/d/dejavu-fonts/57-dejavu-sans-mono-fonts.xml
  • specs/d/dejavu-fonts/57-dejavu-serif-fonts.xml
  • specs/d/dejavu-fonts/58-dejavu-lgc-sans-fonts.xml
  • specs/d/dejavu-fonts/58-dejavu-lgc-sans-mono-fonts.xml
  • specs/d/dejavu-fonts/58-dejavu-lgc-serif-fonts.xml
  • specs/d/dejavu-fonts/plans/dejavu-lgc-sans-fonts.fmf
  • specs/d/dejavu-fonts/plans/dejavu-lgc-sans-mono-fonts.fmf
  • specs/d/dejavu-fonts/plans/dejavu-lgc-serif-fonts.fmf
  • specs/d/dejavu-fonts/plans/dejavu-sans-fonts.fmf
  • specs/d/dejavu-fonts/plans/dejavu-sans-mono-fonts.fmf
  • specs/d/dejavu-fonts/plans/dejavu-serif-fonts.fmf
  • specs/d/dhcpcd/roy-marples.name.asc
  • specs/d/dns-root-data/registry-admin.key
  • specs/d/dnsmasq/dnsmasq-2.92-dnssec-wildcard.patch
  • specs/d/dos2unix/38C1F572B12725BE.asc
  • specs/e/ed/antoniodiazdiaz-keyring.asc
  • specs/e/ethtool/ethtool-netlink-fix-missing-headers.diff
  • specs/f/ffmpeg/ffmpeg-CVE-2025-22921.patch
  • specs/f/ffmpeg/ffmpeg-support-evc-base-libraries.patch
  • specs/f/fontawesome-fonts/60-fontawesome-6-brands-fonts.conf
  • specs/f/fontawesome-fonts/60-fontawesome-6-free-fonts.conf
  • specs/f/fontawesome-fonts/changelog
  • specs/f/fontforge/Fix_Splinefont_shell_invocation.patch
  • specs/g/geometry-hpp/geometry-hpp-optional-benchmarks.patch
  • specs/g/ghc-Glob/Glob-0.10.2.cabal
  • specs/g/ghc-HTTP/HTTP-4000.4.1.cabal
  • specs/g/ghc-HaXml/HaXml-1.25.14.cabal
  • specs/g/ghc-Only/Only-0.1.cabal
  • specs/g/ghc-aeson/aeson-2.2.3.0.cabal
  • specs/g/ghc-asn1-encoding/asn1-encoding-0.9.6.cabal
  • specs/g/ghc-assoc/assoc-1.1.1.cabal
  • specs/g/ghc-async/async-2.2.5.cabal
  • specs/g/ghc-attoparsec-iso8601/attoparsec-iso8601-1.1.1.0.cabal
  • specs/g/ghc-attoparsec/attoparsec-0.14.4.cabal
  • specs/g/ghc-base16-bytestring/base16-bytestring-1.0.2.0.cabal
  • specs/g/ghc-base64-bytestring/base64-bytestring-1.2.1.0.cabal
  • specs/g/ghc-bifunctors/bifunctors-5.6.2.cabal
  • specs/g/ghc-blaze-html/blaze-html-0.9.2.0.cabal

… and 221 more file(s).

Files to remove

These files are in your branch but are not produced by render. Remove them.

  • specs/a/azurelinux-release/proc-version-override.service
  • specs/a/azurelinux-release/proc-version-override.sh
  • specs/c/chromium/0001-Add-PPC64-support-for-boringssl.patch
  • specs/c/chromium/0001-Add-ppc64-target-to-libaom.patch
  • specs/c/chromium/0001-Add-pregenerated-config-for-libaom-on-ppc64.patch
  • specs/c/chromium/0001-Enable-ppc64-pointer-compression.patch
  • specs/c/chromium/0001-Force-baseline-POWER8-AltiVec-VSX-CPU-features-when-.patch
  • specs/c/chromium/0001-Implement-support-for-PPC64-on-Linux.patch
  • specs/c/chromium/0001-Implement-support-for-ppc64-on-Linux.patch
  • specs/c/chromium/0001-add-xnn-ppc64el-support.patch
  • specs/c/chromium/0001-sandbox-Enable-seccomp_bpf-for-ppc64.patch
  • specs/c/chromium/0001-swiftshader-fix-build.patch
  • specs/c/chromium/0001-third_party-angle-Include-missing-header-cstddef-in-.patch
  • specs/c/chromium/0001-third_party-libvpx-Properly-generate-gni-on-ppc64.patch
  • specs/c/chromium/0001-third_party-pffft-Include-altivec.h-on-ppc64-with-SI.patch
  • specs/c/chromium/0002-Add-PPC64-generated-files-for-boringssl.patch
  • specs/c/chromium/0002-Add-ppc64-trap-instructions.patch
  • specs/c/chromium/0002-regenerate-xnn-buildgn.patch
  • specs/c/chromium/0002-third_party-libvpx-Remove-bad-ppc64-config.patch
  • specs/c/chromium/0002-third_party-lss-kernel-structs.patch
  • specs/c/chromium/0003-third_party-libvpx-Add-ppc64-generated-config.patch
  • specs/c/chromium/0004-third_party-crashpad-port-curl-transport-ppc64.patch
  • specs/c/chromium/0004-third_party-libvpx-work-around-ambiguous-vsx.patch
  • specs/c/chromium/0009-sandbox-ignore-byte-span-error.patch
  • specs/c/chromium/HACK-debian-clang-disable-base-musttail.patch
  • specs/c/chromium/HACK-debian-clang-disable-pa-musttail.patch
  • specs/c/chromium/HACK-third_party-libvpx-use-generic-gnu.patch
  • specs/c/chromium/README.fedora
  • specs/c/chromium/Rtc_base-system-arch.h-PPC.patch
  • specs/c/chromium/add-ppc64-architecture-string.patch
  • specs/c/chromium/add-ppc64-architecture-to-extensions.diff
  • specs/c/chromium/add-ppc64-pthread-stack-size.patch
  • specs/c/chromium/chromium-107-proprietary-codecs.patch
  • specs/c/chromium/chromium-108-system-opus.patch
  • specs/c/chromium/chromium-115-initial_prefs-etc-path.patch
  • specs/c/chromium/chromium-117-widevine-other-locations.patch
  • specs/c/chromium/chromium-117-workaround_for_crash_on_BTI_capable_system.patch
  • specs/c/chromium/chromium-118-dma_buf_export_sync_file-conflict.patch
  • specs/c/chromium/chromium-118-sigtrap_system_ffmpeg.patch
  • specs/c/chromium/chromium-121-system-libxml.patch
  • specs/c/chromium/chromium-122-clang-build-flags.patch
  • specs/c/chromium/chromium-123-fstack-protector-strong.patch
  • specs/c/chromium/chromium-123-screen-ai-service.patch
  • specs/c/chromium/chromium-124-el8-arm64-memory_tagging.patch
  • specs/c/chromium/chromium-124-qt6.patch
  • specs/c/chromium/chromium-127-aarch64-duplicate-case-value.patch
  • specs/c/chromium/chromium-127-el8-ifunc-header.patch
  • specs/c/chromium/chromium-130-hardware_destructive_interference_size.patch
  • specs/c/chromium/chromium-131-fix-qt-ui.pach
  • specs/c/chromium/chromium-132-el8-unsupport-rustc-flags.patch

… and 262 more file(s).

@ddstreet ddstreet marked this pull request as draft April 29, 2026 18:52
@ddstreet
Copy link
Copy Markdown
Contributor Author

converting to draft temporarily, so i can get real patches set up in a branch on a forked cloud-init repo.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants