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

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
55 changes: 55 additions & 0 deletions SPECS/cloud-init/0011-generator-photon-uses-libexecdir.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Daniel Casota <dcasota@gmail.com>
Date: Thu, 10 Sep 2026 00:00:00 +0000
Subject: [PATCH] generator: photon installs ds-identify under libexecdir

The systemd generator template picks the ds-identify path from the build
variant. Photon is absent from the list of variants that use libexecdir, so
it falls through to the else branch and renders

dsidentify="/usr/lib/cloud-init/ds-identify"

while the meson install puts the binary at

/usr/libexec/cloud-init/ds-identify

The generator then exits 3, no datasource is ever identified, and all six
cloud-* units stay inactive despite being enabled. Nothing appears in
`systemctl --failed`, so instance configuration - injected SSH keys,
hostname, user-data, network config - is silently not applied.

Photon is an RPM distribution whose meson build installs helpers to
libexecdir, exactly like the variants already listed, so it belongs in that
branch.

Rendering the template confirms the change is scoped to photon:

before --variant photon -> /usr/lib/cloud-init/ds-identify
after --variant photon -> /usr/libexec/cloud-init/ds-identify
--variant rhel -> /usr/libexec/cloud-init/ds-identify (unchanged)
--variant ubuntu -> /usr/lib/cloud-init/ds-identify (unchanged)

Introduced by the 25.1.3 -> 26.2 upgrade, which moved the install from
%py3_install to %{meson_install} and relocated the payload to libexecdir.
The %files section was updated to match; the generator was not.

Signed-off-by: Daniel Casota <dcasota@gmail.com>
---
systemd/cloud-init-generator.tmpl | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/systemd/cloud-init-generator.tmpl b/systemd/cloud-init-generator.tmpl
index 888bad5..312a690 100644
--- a/systemd/cloud-init-generator.tmpl
+++ b/systemd/cloud-init-generator.tmpl
@@ -21,7 +21,7 @@ CLOUD_SYSTEM_TARGET="/usr/lib/systemd/system/cloud-init.target"
CLOUD_SYSTEM_TARGET="/lib/systemd/system/cloud-init.target"
{% endif %}
{% if variant in ["almalinux", "azurelinux", "centos", "cloudlinux", "eurolinux", "fedora",
- "miraclelinux", "openeuler", "OpenCloudOS", "openmandriva", "rhel", "rocky", "TencentOS", "virtuozzo"] %}
+ "miraclelinux", "openeuler", "OpenCloudOS", "openmandriva", "photon", "rhel", "rocky", "TencentOS", "virtuozzo"] %}
dsidentify="/usr/libexec/cloud-init/ds-identify"
{% elif variant == "benchmark" %}
dsidentify="/bin/true"
--
2.51.0
39 changes: 39 additions & 0 deletions SPECS/cloud-init/0012-photon-usr-lib-exec-is-libexecdir.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Daniel Casota <dcasota@gmail.com>
Date: Thu, 10 Sep 2026 00:00:00 +0000
Subject: [PATCH] photon: usr_lib_exec is /usr/libexec, as for the other RPM
distros

Distro.usr_lib_exec defaults to /usr/lib in cloudinit/distros/__init__.py,
and photon.py does not override it - while rhel.py:30 sets /usr/libexec.

The meson install puts the helpers in libexecdir:

/usr/libexec/cloud-init/write-ssh-key-fingerprints
/usr/libexec/cloud-init/hook-hotplug

so cc_keys_to_console looks for write-ssh-key-fingerprints under
/usr/lib/cloud-init and does not find it. Distro.get_clouddir() derives
from the same attribute.

This is the same libexecdir-vs-lib mismatch the generator template has,
expressed in Python rather than in a rendered shell script. Upstream issue
6588 describes the class of bug.

Signed-off-by: Daniel Casota <dcasota@gmail.com>
---
cloudinit/distros/photon.py | 1 +
1 file changed, 1 insertion(+)

--- a/cloudinit/distros/photon.py
+++ b/cloudinit/distros/photon.py
@@ -17,6 +17,7 @@
network_conf_dir = "/etc/systemd/network/"
systemd_locale_conf_fn = "/etc/locale.conf"
resolve_conf_fn = "/etc/systemd/resolved.conf"
+ usr_lib_exec = "/usr/libexec"

renderer_configs = {
"networkd": {
--
2.51.0
6 changes: 5 additions & 1 deletion SPECS/cloud-init/cloud-init.spec
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

Name: cloud-init
Version: 26.2
Release: 3%{?dist}
Release: 4%{?dist}
Summary: Cloud instance init scripts
Group: System Environment/Base
URL: http://launchpad.net/cloud-init
Expand All @@ -36,6 +36,8 @@ Patch6: 0007-cli-retain-file-argument-as-main-cmd-arg.patch
Patch7: 0008-No-single-process.patch
Patch8: 0009-Show-stdout-logs-in-journal-only.patch
Patch9: 0010-Drop-mandatory-configobj-dependency.patch
Patch10: 0011-generator-photon-uses-libexecdir.patch
Patch11: 0012-photon-usr-lib-exec-is-libexecdir.patch

BuildRequires: meson
BuildRequires: bash-completion-devel
Expand Down Expand Up @@ -165,6 +167,8 @@ rm -rf %{buildroot}
%{_mandir}/man1/*

%changelog
* Wed Sep 23 2026 Daniel Casota <dcasota@gmail.com> 26.2-4
- Point the systemd generator and helper lookups at /usr/libexec so ds-identify is found
* Tue Sep 22 2026 Prashant S Chauhan <prashant.singh-chauhan@broadcom.com> 26.2-3
- Remove stale python3-six dependency
* Tue Sep 01 2026 Prashant S Chauhan <prashant.singh-chauhan@broadcom.com> 26.2-2
Expand Down
Loading