public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
From: Yaakov Selkowitz <yselkowi@redhat.com>
To: git-commits@fedoraproject.org
Subject: [rpms/cloud-init] rawhide: Add ELN support to distros
Date: Tue, 07 Jul 2026 20:52:23 GMT [thread overview]
Message-ID: <178345754353.1.17559516249954514669.rpms-cloud-init-3d2c8d5d5ce4@fedoraproject.org> (raw)
A new commit has been pushed.
Repo : rpms/cloud-init
Branch : rawhide
Commit : 3d2c8d5d5ce41b4a6c554fcdf5b83ba29588d65c
Author : Yaakov Selkowitz <yselkowi@redhat.com>
Date : 2026-07-07T16:51:15-04:00
Stats : +239/-0 in 2 file(s)
URL : https://src.fedoraproject.org/rpms/cloud-init/c/3d2c8d5d5ce41b4a6c554fcdf5b83ba29588d65c?branch=rawhide
Log:
Add ELN support to distros
ELN now identifies itself uniquely and more RHEL-like, rather than as a
variant of Fedora.
https://github.com/canonical/cloud-init/pull/6922
https://github.com/fedora-eln/eln/issues/565
---
diff --git a/0002-feat-add-ELN-support-to-distros.patch b/0002-feat-add-ELN-support-to-distros.patch
new file mode 100644
index 0000000..4e4aa36
--- /dev/null
+++ b/0002-feat-add-ELN-support-to-distros.patch
@@ -0,0 +1,236 @@
+From 54521dfea9b805d20e3e36e5c7cc2503fa4b2edd Mon Sep 17 00:00:00 2001
+From: Yaakov Selkowitz <yselkowi@redhat.com>
+Date: Tue, 30 Jun 2026 16:52:43 -0400
+Subject: [PATCH] feat: add ELN support to distros
+
+ELN now identifies itself uniquely and more RHEL-like, rather than as a
+variant of Fedora.
+
+https://github.com/fedora-eln/eln/issues/565
+
+Signed-off-by: Yaakov Selkowitz <yselkowi@redhat.com>
+---
+Backport of https://github.com/canonical/cloud-init/pull/6922 to 26.01
+
+diff --git a/cloudinit/config/cc_ca_certs.py b/cloudinit/config/cc_ca_certs.py
+index 939b62d07..50dda5198 100644
+--- a/cloudinit/config/cc_ca_certs.py
++++ b/cloudinit/config/cc_ca_certs.py
+@@ -74,17 +74,19 @@ DISTRO_FAMILY = {
+ "almalinux",
+ "centos",
+ "cloudlinux",
++ "eln",
+ "rocky",
+ ):
+ DISTRO_OVERRIDES[distro] = DISTRO_OVERRIDES["rhel"]
+
+ distros = [
+ "almalinux",
+ "aosc",
+ "centos",
+ "cloudlinux",
+ "alpine",
+ "debian",
++ "eln",
+ "fedora",
+ "raspberry-pi-os",
+ "rhel",
+diff --git a/cloudinit/config/cc_ntp.py b/cloudinit/config/cc_ntp.py
+index e1a27b8bc..37536dc3b 100644
+--- a/cloudinit/config/cc_ntp.py
++++ b/cloudinit/config/cc_ntp.py
+@@ -31,6 +31,7 @@ distros = [
+ "cloudlinux",
+ "cos",
+ "debian",
++ "eln",
+ "eurolinux",
+ "fedora",
+ "freebsd",
+@@ -146,6 +147,14 @@ DISTRO_CLIENT_CONFIG: Dict[str, Dict] = {
+ "confpath": "/etc/chrony/chrony.conf",
+ },
+ },
++ "eln": {
++ "ntp": {
++ "service_name": "ntpd",
++ },
++ "chrony": {
++ "service_name": "chronyd",
++ },
++ },
+ "freebsd": {
+ "ntp": {
+ "confpath": "/etc/ntp.conf",
+@@ -375,6 +384,9 @@ def generate_server_names(distro):
+ # For legal reasons x.pool.sles.ntp.org does not exist,
+ # use the opensuse pool
+ pool_distro = "opensuse"
++ elif distro == "eln":
++ # ELN is from the Fedora project
++ pool_distro = "fedora"
+ elif distro == "alpine" or distro == "eurolinux":
+ # Alpine-specific pool (i.e. x.alpine.pool.ntp.org) does not exist
+ # so use general x.pool.ntp.org instead. The same applies to EuroLinux
+diff --git a/cloudinit/config/cc_resolv_conf.py b/cloudinit/config/cc_resolv_conf.py
+index 920c539d9..5201f4cbd 100644
+--- a/cloudinit/config/cc_resolv_conf.py
++++ b/cloudinit/config/cc_resolv_conf.py
+@@ -28,6 +28,7 @@ meta: MetaSchema = {
+ "distros": [
+ "alpine",
+ "azurelinux",
++ "eln",
+ "fedora",
+ "mariner",
+ "opensuse",
+diff --git a/cloudinit/config/cc_yum_add_repo.py b/cloudinit/config/cc_yum_add_repo.py
+index 66e718015..95974d223 100644
+--- a/cloudinit/config/cc_yum_add_repo.py
++++ b/cloudinit/config/cc_yum_add_repo.py
+@@ -24,6 +24,7 @@ meta: MetaSchema = {
+ "azurelinux",
+ "centos",
+ "cloudlinux",
++ "eln",
+ "eurolinux",
+ "fedora",
+ "mariner",
+diff --git a/cloudinit/distros/__init__.py b/cloudinit/distros/__init__.py
+index 2703ebd83..b7c383514 100644
+--- a/cloudinit/distros/__init__.py
++++ b/cloudinit/distros/__init__.py
+@@ -76,6 +76,7 @@ OSFAMILIES = {
+ "azurelinux",
+ "centos",
+ "cloudlinux",
++ "eln",
+ "eurolinux",
+ "fedora",
+ "mariner",
+diff --git a/cloudinit/distros/eln.py b/cloudinit/distros/eln.py
+new file mode 100644
+index 000000000..6ceaf6d8b
+--- /dev/null
++++ b/cloudinit/distros/eln.py
+@@ -0,0 +1,7 @@
++# This file is part of cloud-init. See LICENSE file for license information.
++
++from cloudinit.distros import rhel
++
++
++class Distro(rhel.Distro):
++ pass
+diff --git a/cloudinit/net/sysconfig.py b/cloudinit/net/sysconfig.py
+index 5d2e2e1b3..1382403d1 100644
+--- a/cloudinit/net/sysconfig.py
++++ b/cloudinit/net/sysconfig.py
+@@ -24,6 +24,7 @@ KNOWN_DISTROS = [
+ "almalinux",
+ "centos",
+ "cloudlinux",
++ "eln",
+ "eurolinux",
+ "fedora",
+ "miraclelinux",
+diff --git a/cloudinit/sources/DataSourceRbxCloud.py b/cloudinit/sources/DataSourceRbxCloud.py
+index 2fba1149d..dc21aa427 100644
+--- a/cloudinit/sources/DataSourceRbxCloud.py
++++ b/cloudinit/sources/DataSourceRbxCloud.py
+@@ -60,7 +60,7 @@ def _sub_arp(cmd):
+
+ def gratuitous_arp(items, distro):
+ source_param = "-S"
+- if distro.name in ["fedora", "centos", "rhel"]:
++ if distro.name in ["fedora", "eln", "centos", "rhel"]:
+ source_param = "-s"
+ for item in items:
+ try:
+diff --git a/cloudinit/util.py b/cloudinit/util.py
+index 2cdd73655..ba57898ed 100644
+--- a/cloudinit/util.py
++++ b/cloudinit/util.py
+@@ -607,6 +607,7 @@ def _get_variant(info):
+ "centos",
+ "cloudlinux",
+ "debian",
++ "eln",
+ "eurolinux",
+ "fedora",
+ "mariner",
+diff --git a/config/cloud.cfg.tmpl b/config/cloud.cfg.tmpl
+index 3926ea8b4..1b0f46672 100644
+--- a/config/cloud.cfg.tmpl
++++ b/config/cloud.cfg.tmpl
+@@ -2,7 +2,7 @@
+ # The top level settings are used as module
+ # and base configuration.
+ {% set is_bsd = variant in ["dragonfly", "freebsd", "netbsd", "openbsd"] %}
+-{% set is_rhel = variant in ["almalinux", "centos", "cloudlinux", "eurolinux",
++{% set is_rhel = variant in ["almalinux", "centos", "cloudlinux", "eln", "eurolinux",
+ "miraclelinux", "rhel", "rocky", "virtuozzo"] %}
+ {% set gecos = ({"amazon": "EC2 Default User", "azurelinux": "Azure Linux",
+ "centos": "Cloud User", "debian": "Debian",
+@@ -25,7 +25,7 @@
+ {% set shells = ({"alpine": "/bin/ash", "dragonfly": "/bin/sh",
+ "freebsd": "/bin/tcsh", "netbsd": "/bin/sh",
+ "openbsd": "/bin/ksh"}) %}
+-{% set usernames = ({"amazon": "ec2-user", "centos": "cloud-user",
++{% set usernames = ({"amazon": "ec2-user", "centos": "cloud-user", "eln": "cloud-user",
+ "openmandriva": "omv", "raspberry-pi-os": "pi",
+ "rhel": "cloud-user",
+ "unknown": "ubuntu"}) %}
+diff --git a/systemd/cloud-init-generator.tmpl b/systemd/cloud-init-generator.tmpl
+index 888bad535..24324f204 100644
+--- a/systemd/cloud-init-generator.tmpl
++++ b/systemd/cloud-init-generator.tmpl
+@@ -20,7 +20,7 @@ CLOUD_SYSTEM_TARGET="/usr/lib/systemd/system/cloud-init.target"
+ {% else %}
+ CLOUD_SYSTEM_TARGET="/lib/systemd/system/cloud-init.target"
+ {% endif %}
+-{% if variant in ["almalinux", "centos", "cloudlinux", "eurolinux", "fedora",
++{% if variant in ["almalinux", "centos", "cloudlinux", "eln", "eurolinux", "fedora",
+ "miraclelinux", "openeuler", "OpenCloudOS", "openmandriva", "rhel", "rocky", "TencentOS", "virtuozzo"] %}
+ dsidentify="/usr/libexec/cloud-init/ds-identify"
+ {% elif variant == "benchmark" %}
+diff --git a/systemd/cloud-init-local.service.tmpl b/systemd/cloud-init-local.service.tmpl
+index ca6dbe0a1..00c13d84c 100644
+--- a/systemd/cloud-init-local.service.tmpl
++++ b/systemd/cloud-init-local.service.tmpl
+@@ -9,7 +9,7 @@ Wants=network-pre.target
+ After=hv_kvp_daemon.service
+ Before=network-pre.target
+ Before=shutdown.target
+-{% if variant in ["almalinux", "cloudlinux", "rhel"] %}
++{% if variant in ["almalinux", "cloudlinux", "centos", "eln", "rhel"] %}
+ Before=firewalld.target
+ {% endif %}
+ {% if variant in ["ubuntu", "unknown", "debian", "raspberry-pi-os"] %}
+diff --git a/systemd/cloud-init-main.service.tmpl b/systemd/cloud-init-main.service.tmpl
+index a38b2e817..8a52c2bf9 100644
+--- a/systemd/cloud-init-main.service.tmpl
++++ b/systemd/cloud-init-main.service.tmpl
+@@ -11,7 +11,7 @@ Description=Cloud-init: Single Process
+ {% if variant in ["almalinux", "cloudlinux", "ubuntu", "unknown", "debian", "raspberry-pi-os", "rhel", "fedora"] %}
+ DefaultDependencies=no
+ {% endif %}
+-{% if variant in ["almalinux", "cloudlinux", "rhel"] %}
++{% if variant in ["almalinux", "cloudlinux", "centos", "eln", "rhel"] %}
+ Requires=dbus.socket
+ After=dbus.socket
+ {% endif %}
+diff --git a/systemd/cloud-init-network.service.tmpl b/systemd/cloud-init-network.service.tmpl
+index 58a36f5df..203e04e4b 100644
+--- a/systemd/cloud-init-network.service.tmpl
++++ b/systemd/cloud-init-network.service.tmpl
+@@ -15,7 +15,7 @@ After=systemd-networkd-wait-online.service
+ {% if variant in ["ubuntu", "unknown", "debian", "raspberry-pi-os"] %}
+ After=networking.service
+ {% endif %}
+-{% if variant in ["almalinux", "centos", "cloudlinux", "eurolinux", "fedora",
++{% if variant in ["almalinux", "centos", "cloudlinux", "eln", "eurolinux", "fedora",
+ "miraclelinux", "openeuler", "OpenCloudOS", "openmandriva",
+ "rhel", "rocky", "suse", "TencentOS", "virtuozzo"] %}
+ After=NetworkManager.service
+---
diff --git a/cloud-init.spec b/cloud-init.spec
index 7366ebf..e2af9a1 100644
--- a/cloud-init.spec
+++ b/cloud-init.spec
@@ -18,6 +18,9 @@ Source1: cloud-init-tmpfiles.conf
# Fixes systemd dependency cycle on Fedora by adding DefaultDependencies=no
# and including Fedora in distribution-specific conditional blocks
Patch: 0001-fix-avoid-dependency-cycle-on-Fedora.patch
+# https://github.com/canonical/cloud-init/pull/6922
+# feat: add ELN support to distros
+Patch: 0002-feat-add-ELN-support-to-distros.patch
BuildArch: noarch
reply other threads:[~2026-07-07 20:52 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=178345754353.1.17559516249954514669.rpms-cloud-init-3d2c8d5d5ce4@fedoraproject.org \
--to=yselkowi@redhat.com \
--cc=git-commits@fedoraproject.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox