Compare commits
	
		
			No commits in common. "a8" and "a10s-deprecated" have entirely different histories.
		
	
	
		
			a8
			...
			a10s-depre
		
	
		
| @ -8,9 +8,9 @@ actions: | ||||
|       - name: "Eduard Abdullin" | ||||
|         email: "eabdullin@almalinux.org" | ||||
|         line: | ||||
|           - "0001-Improvements-for-AlmaLinux-OS-and-CloudLinux-OS.patch" | ||||
|           - "0031-Improvements-for-AlmaLinux-OS-and-CloudLinux-OS.patch" | ||||
| 
 | ||||
|   - add_files: | ||||
|       - type: "patch" | ||||
|         name: "0001-Improvements-for-AlmaLinux-OS-and-CloudLinux-OS.patch" | ||||
|         number: 100 | ||||
|         name: "0031-Improvements-for-AlmaLinux-OS-and-CloudLinux-OS.patch" | ||||
|         number: 1000 | ||||
|  | ||||
| @ -1,28 +1,36 @@ | ||||
| From 4650b8c8819bd6b9f6163567f2b8f8e94ee5ee3c Mon Sep 17 00:00:00 2001 | ||||
| From: Elkhan Mammadli <elkhan.mammadli@protonmail.com> | ||||
| Date: Thu, 13 Mar 2025 18:23:03 +0400 | ||||
| From f4f100c0dddf1f11b239374a8dc452739b8e6a81 Mon Sep 17 00:00:00 2001 | ||||
| From: Andrew Lukoshko <alukoshko@almalinux.org> | ||||
| Date: Thu, 28 Mar 2024 14:24:08 +0000 | ||||
| Subject: [PATCH] Improvements for AlmaLinux OS and CloudLinux OS | ||||
| 
 | ||||
| - Fix cc_ntp module.
 | ||||
| - Add support to cc_ca_certs module.
 | ||||
| - Improve support for systemd integration.
 | ||||
| Add AlmaLinux OS and CloudLinux OS support to: | ||||
| 
 | ||||
| Signed-off-by: Andrew Lukoshko <alukoshko@almalinux.org> | ||||
| Modules: | ||||
| - cc_ca_certs
 | ||||
| - cc_ntp
 | ||||
| - cc_resolv_conf
 | ||||
| 
 | ||||
| Datasources: | ||||
| - Rbx Cloud Datasource
 | ||||
| 
 | ||||
| Systemd services: | ||||
| - cloud-final.service
 | ||||
| - cloud-init-local.service
 | ||||
| - cloud-init.service
 | ||||
| ---
 | ||||
|  cloudinit/config/cc_ca_certs.py         |  8 ++++ | ||||
|  cloudinit/config/cc_ntp.py              |  3 ++ | ||||
|  cloudinit/config/cc_ntp.py              | 11 ++--- | ||||
|  cloudinit/config/cc_resolv_conf.py      |  2 + | ||||
|  cloudinit/settings.py                   |  2 +- | ||||
|  cloudinit/sources/DataSourceRbxCloud.py |  2 +- | ||||
|  systemd/cloud-config.service.tmpl       |  2 +- | ||||
|  systemd/cloud-final.service.tmpl        |  4 +- | ||||
|  systemd/cloud-init-local.service.tmpl   | 12 ++--- | ||||
|  systemd/cloud-init.service.tmpl         |  4 +- | ||||
|  systemd/cloud-final.service.tmpl        |  2 +- | ||||
|  systemd/cloud-init-local.service.tmpl   | 10 ++-- | ||||
|  systemd/cloud-init.service.tmpl         |  2 +- | ||||
|  templates/chrony.conf.almalinux.tmpl    | 51 ++++++++++++++++++++ | ||||
|  templates/chrony.conf.cloudlinux.tmpl   | 51 ++++++++++++++++++++ | ||||
|  templates/ntp.conf.almalinux.tmpl       | 64 +++++++++++++++++++++++++ | ||||
|  templates/ntp.conf.cloudlinux.tmpl      | 64 +++++++++++++++++++++++++ | ||||
|  13 files changed, 256 insertions(+), 13 deletions(-) | ||||
|  12 files changed, 252 insertions(+), 17 deletions(-) | ||||
|  create mode 100644 templates/chrony.conf.almalinux.tmpl | ||||
|  create mode 100644 templates/chrony.conf.cloudlinux.tmpl | ||||
|  create mode 100644 templates/ntp.conf.almalinux.tmpl | ||||
| @ -55,19 +63,34 @@ index 8d3fd9a..4dd5843 100644 | ||||
|      "debian", | ||||
|      "fedora", | ||||
| diff --git a/cloudinit/config/cc_ntp.py b/cloudinit/config/cc_ntp.py
 | ||||
| index 9eef24f..653db7d 100644
 | ||||
| index 9eef24f..1015d43 100644
 | ||||
| --- a/cloudinit/config/cc_ntp.py
 | ||||
| +++ b/cloudinit/config/cc_ntp.py
 | ||||
| @@ -227,6 +227,9 @@ for distro in ("opensuse-microos", "opensuse-tumbleweed", "opensuse-leap"):
 | ||||
| @@ -109,14 +109,6 @@ DISTRO_CLIENT_CONFIG = {
 | ||||
|              "service_name": "ntpd", | ||||
|          }, | ||||
|      }, | ||||
| -    "centos": {
 | ||||
| -        "ntp": {
 | ||||
| -            "service_name": "ntpd",
 | ||||
| -        },
 | ||||
| -        "chrony": {
 | ||||
| -            "service_name": "chronyd",
 | ||||
| -        },
 | ||||
| -    },
 | ||||
|      "cos": { | ||||
|          "chrony": { | ||||
|              "service_name": "chronyd", | ||||
| @@ -224,6 +216,9 @@ DISTRO_CLIENT_CONFIG = {
 | ||||
|  for distro in ("opensuse-microos", "opensuse-tumbleweed", "opensuse-leap"): | ||||
|      DISTRO_CLIENT_CONFIG[distro] = DISTRO_CLIENT_CONFIG["opensuse"] | ||||
|   | ||||
| +for distro in ("almalinux", "centos", "cloudlinux"):
 | ||||
| +    DISTRO_CLIENT_CONFIG[distro] = DISTRO_CLIENT_CONFIG["rhel"]
 | ||||
| +
 | ||||
|  for distro in ("sle_hpc", "sle-micro"): | ||||
|      DISTRO_CLIENT_CONFIG[distro] = DISTRO_CLIENT_CONFIG["sles"] | ||||
|   | ||||
| +for distro in ("almalinux", "cloudlinux", "rocky"):
 | ||||
| +    DISTRO_CLIENT_CONFIG[distro] = DISTRO_CLIENT_CONFIG["rhel"]
 | ||||
| +
 | ||||
|  # The schema definition for each cloud-config module is a strict contract for | ||||
|  # describing supported configuration parameters for each cloud-config section. | ||||
|  # It allows cloud-config to validate and alert users to invalid or ignored | ||||
| diff --git a/cloudinit/config/cc_resolv_conf.py b/cloudinit/config/cc_resolv_conf.py
 | ||||
| index aa88919..4eb1d76 100644
 | ||||
| --- a/cloudinit/config/cc_resolv_conf.py
 | ||||
| @ -83,7 +106,7 @@ index aa88919..4eb1d76 100644 | ||||
|          "mariner", | ||||
|          "opensuse", | ||||
| diff --git a/cloudinit/settings.py b/cloudinit/settings.py
 | ||||
| index 3a581e5..def6d4b 100644
 | ||||
| index 5ced21b..51cb115 100644
 | ||||
| --- a/cloudinit/settings.py
 | ||||
| +++ b/cloudinit/settings.py
 | ||||
| @@ -61,7 +61,7 @@ CFG_BUILTIN = {
 | ||||
| @ -108,33 +131,11 @@ index 9214f1b..14880ec 100644 | ||||
|          source_param = "-s" | ||||
|      for item in items: | ||||
|          try: | ||||
| diff --git a/systemd/cloud-config.service.tmpl b/systemd/cloud-config.service.tmpl
 | ||||
| index 76e50ae..047969a 100644
 | ||||
| --- a/systemd/cloud-config.service.tmpl
 | ||||
| +++ b/systemd/cloud-config.service.tmpl
 | ||||
| @@ -5,7 +5,7 @@ After=network-online.target cloud-config.target
 | ||||
|  After=snapd.seeded.service | ||||
|  Before=systemd-user-sessions.service | ||||
|  Wants=network-online.target cloud-config.target | ||||
| -{% if variant == "rhel" %}
 | ||||
| +{% if variant in ["almalinux", "cloudlinux", "rhel"] %}
 | ||||
|  ConditionPathExists=!/etc/cloud/cloud-init.disabled | ||||
|  ConditionKernelCommandLine=!cloud-init=disabled | ||||
|  {% endif %} | ||||
| diff --git a/systemd/cloud-final.service.tmpl b/systemd/cloud-final.service.tmpl
 | ||||
| index 85f423a..578c7f4 100644
 | ||||
| index bcf8b00..6d34761 100644
 | ||||
| --- a/systemd/cloud-final.service.tmpl
 | ||||
| +++ b/systemd/cloud-final.service.tmpl
 | ||||
| @@ -7,7 +7,7 @@ After=multi-user.target
 | ||||
|  Before=apt-daily.service | ||||
|  {% endif %} | ||||
|  Wants=network-online.target cloud-config.service | ||||
| -{% if variant == "rhel" %}
 | ||||
| +{% if variant in ["almalinux", "cloudlinux", "rhel"] %}
 | ||||
|  ConditionPathExists=!/etc/cloud/cloud-init.disabled | ||||
|  ConditionKernelCommandLine=!cloud-init=disabled | ||||
|  {% endif %} | ||||
| @@ -19,7 +19,7 @@ ExecStart=/usr/bin/cloud-init modules --mode=final
 | ||||
| @@ -18,7 +18,7 @@ ExecStart=/usr/bin/cloud-init modules --mode=final
 | ||||
|  RemainAfterExit=yes | ||||
|  TimeoutSec=0 | ||||
|  KillMode=process | ||||
| @ -144,7 +145,7 @@ index 85f423a..578c7f4 100644 | ||||
|  ExecStartPost=/bin/sh -c 'u=NetworkManager.service; \ | ||||
|   out=$(systemctl show --property=SubState $u) || exit; \ | ||||
| diff --git a/systemd/cloud-init-local.service.tmpl b/systemd/cloud-init-local.service.tmpl
 | ||||
| index 6f3f9d8..3f56494 100644
 | ||||
| index 3a1ca7f..853ae2c 100644
 | ||||
| --- a/systemd/cloud-init-local.service.tmpl
 | ||||
| +++ b/systemd/cloud-init-local.service.tmpl
 | ||||
| @@ -1,23 +1,23 @@
 | ||||
| @ -152,7 +153,7 @@ index 6f3f9d8..3f56494 100644 | ||||
|  [Unit] | ||||
|  Description=Initial cloud-init job (pre-networking) | ||||
| -{% if variant in ["ubuntu", "unknown", "debian", "rhel" ] %}
 | ||||
| +{% if variant in ["almalinux", "cloudlinux", "ubuntu", "unknown", "debian", "rhel"] %}
 | ||||
| +{% if variant in ["almalinux", "cloudlinux", "ubuntu", "unknown", "debian", "rhel" ] %}
 | ||||
|  DefaultDependencies=no | ||||
|  {% endif %} | ||||
|  Wants=network-pre.target | ||||
| @ -175,15 +176,7 @@ index 6f3f9d8..3f56494 100644 | ||||
|  Before=firewalld.target | ||||
|  Conflicts=shutdown.target | ||||
|  {% endif %} | ||||
| @@ -26,14 +26,14 @@ Before=sysinit.target
 | ||||
|  Conflicts=shutdown.target | ||||
|  {% endif %} | ||||
|  RequiresMountsFor=/var/lib/cloud | ||||
| -{% if variant == "rhel" %}
 | ||||
| +{% if variant in ["almalinux", "cloudlinux", "rhel"] %}
 | ||||
|  ConditionPathExists=!/etc/cloud/cloud-init.disabled | ||||
|  ConditionKernelCommandLine=!cloud-init=disabled | ||||
|  {% endif %} | ||||
| @@ -32,7 +32,7 @@ ConditionEnvironment=!KERNEL_CMDLINE=cloud-init=disabled
 | ||||
|   | ||||
|  [Service] | ||||
|  Type=oneshot | ||||
| @ -193,7 +186,7 @@ index 6f3f9d8..3f56494 100644 | ||||
|  ExecStartPre=/sbin/restorecon /run/cloud-init | ||||
|  ExecStartPre=/usr/bin/touch /run/cloud-init/enabled | ||||
| diff --git a/systemd/cloud-init.service.tmpl b/systemd/cloud-init.service.tmpl
 | ||||
| index 26d2e39..71f867e 100644
 | ||||
| index bf91164..1ae88f7 100644
 | ||||
| --- a/systemd/cloud-init.service.tmpl
 | ||||
| +++ b/systemd/cloud-init.service.tmpl
 | ||||
| @@ -1,7 +1,7 @@
 | ||||
| @ -205,15 +198,6 @@ index 26d2e39..71f867e 100644 | ||||
|  DefaultDependencies=no | ||||
|  {% endif %} | ||||
|  Wants=cloud-init-local.service | ||||
| @@ -38,7 +38,7 @@ Conflicts=shutdown.target
 | ||||
|  Before=shutdown.target | ||||
|  Conflicts=shutdown.target | ||||
|  {% endif %} | ||||
| -{% if variant == "rhel" %}
 | ||||
| +{% if variant in ["almalinux", "cloudlinux", "rhel"] %}
 | ||||
|  ConditionPathExists=!/etc/cloud/cloud-init.disabled | ||||
|  ConditionKernelCommandLine=!cloud-init=disabled | ||||
|  {% endif %} | ||||
| diff --git a/templates/chrony.conf.almalinux.tmpl b/templates/chrony.conf.almalinux.tmpl
 | ||||
| new file mode 100644 | ||||
| index 0000000..43b1f5d
 | ||||
| @ -330,7 +314,7 @@ index 0000000..43b1f5d | ||||
| +#log measurements statistics tracking
 | ||||
| diff --git a/templates/ntp.conf.almalinux.tmpl b/templates/ntp.conf.almalinux.tmpl
 | ||||
| new file mode 100644 | ||||
| index 0000000..6d166aa
 | ||||
| index 0000000..9884df5
 | ||||
| --- /dev/null
 | ||||
| +++ b/templates/ntp.conf.almalinux.tmpl
 | ||||
| @@ -0,0 +1,64 @@
 | ||||
| @ -349,7 +333,7 @@ index 0000000..6d166aa | ||||
| +# Permit all access over the loopback interface.  This could
 | ||||
| +# be tightened as well, but to do so would effect some of
 | ||||
| +# the administrative functions.
 | ||||
| +restrict 127.0.0.1
 | ||||
| +restrict 127.0.0.1 
 | ||||
| +restrict -6 ::1
 | ||||
| +
 | ||||
| +# Hosts on local network are less restricted.
 | ||||
| @ -384,7 +368,7 @@ index 0000000..6d166aa | ||||
| +includefile /etc/ntp/crypto/pw
 | ||||
| +
 | ||||
| +# Key file containing the keys and key identifiers used when operating
 | ||||
| +# with symmetric key cryptography.
 | ||||
| +# with symmetric key cryptography. 
 | ||||
| +keys /etc/ntp/keys
 | ||||
| +
 | ||||
| +# Specify the key identifiers which are trusted.
 | ||||
| @ -400,7 +384,7 @@ index 0000000..6d166aa | ||||
| +#statistics clockstats cryptostats loopstats peerstats
 | ||||
| diff --git a/templates/ntp.conf.cloudlinux.tmpl b/templates/ntp.conf.cloudlinux.tmpl
 | ||||
| new file mode 100644 | ||||
| index 0000000..6d166aa
 | ||||
| index 0000000..9884df5
 | ||||
| --- /dev/null
 | ||||
| +++ b/templates/ntp.conf.cloudlinux.tmpl
 | ||||
| @@ -0,0 +1,64 @@
 | ||||
| @ -419,7 +403,7 @@ index 0000000..6d166aa | ||||
| +# Permit all access over the loopback interface.  This could
 | ||||
| +# be tightened as well, but to do so would effect some of
 | ||||
| +# the administrative functions.
 | ||||
| +restrict 127.0.0.1
 | ||||
| +restrict 127.0.0.1 
 | ||||
| +restrict -6 ::1
 | ||||
| +
 | ||||
| +# Hosts on local network are less restricted.
 | ||||
| @ -454,7 +438,7 @@ index 0000000..6d166aa | ||||
| +includefile /etc/ntp/crypto/pw
 | ||||
| +
 | ||||
| +# Key file containing the keys and key identifiers used when operating
 | ||||
| +# with symmetric key cryptography.
 | ||||
| +# with symmetric key cryptography. 
 | ||||
| +keys /etc/ntp/keys
 | ||||
| +
 | ||||
| +# Specify the key identifiers which are trusted.
 | ||||
| @ -469,5 +453,5 @@ index 0000000..6d166aa | ||||
| +# Enable writing of statistics records.
 | ||||
| +#statistics clockstats cryptostats loopstats peerstats
 | ||||
| -- 
 | ||||
| 2.43.5 | ||||
| 2.27.0 | ||||
| 
 | ||||
		Loading…
	
		Reference in New Issue
	
	Block a user