2023-09-27 12:52:44 +00:00
|
|
|
diff -aruN cloud-init-22.1/cloudinit/config/cc_ca_certs.py cloud-init-22.1.patched/cloudinit/config/cc_ca_certs.py
|
|
|
|
--- cloud-init-22.1/cloudinit/config/cc_ca_certs.py 2022-02-15 21:02:23
|
|
|
|
+++ cloud-init-22.1.patched/cloudinit/config/cc_ca_certs.py 2023-08-04 12:53:10
|
|
|
|
@@ -19,6 +19,20 @@
|
2023-04-20 11:03:58 +00:00
|
|
|
"ca_cert_update_cmd": ["update-ca-certificates"],
|
|
|
|
}
|
|
|
|
DISTRO_OVERRIDES = {
|
|
|
|
+ "almalinux": {
|
|
|
|
+ "ca_cert_path": "/usr/share/pki/ca-trust-source/",
|
|
|
|
+ "ca_cert_filename": "anchors/cloud-init-ca-certs.crt",
|
|
|
|
+ "ca_cert_config": None,
|
|
|
|
+ "ca_cert_system_path": "/etc/pki/ca-trust/",
|
|
|
|
+ "ca_cert_update_cmd": ["update-ca-trust"],
|
2023-09-27 12:52:44 +00:00
|
|
|
+ },
|
|
|
|
+ "cloudlinux": {
|
|
|
|
+ "ca_cert_path": "/usr/share/pki/ca-trust-source/",
|
|
|
|
+ "ca_cert_filename": "anchors/cloud-init-ca-certs.crt",
|
|
|
|
+ "ca_cert_config": None,
|
|
|
|
+ "ca_cert_system_path": "/etc/pki/ca-trust/",
|
|
|
|
+ "ca_cert_update_cmd": ["update-ca-trust"],
|
2023-04-20 11:03:58 +00:00
|
|
|
+ },
|
|
|
|
"rhel": {
|
|
|
|
"ca_cert_path": "/usr/share/pki/ca-trust-source/",
|
|
|
|
"ca_cert_filename": "anchors/cloud-init-ca-certs.crt",
|
2023-09-27 12:52:44 +00:00
|
|
|
@@ -43,7 +57,7 @@
|
2023-04-20 11:03:58 +00:00
|
|
|
ca-certificates package is installed but not if the
|
|
|
|
ca-certificates-bundle package is installed.
|
|
|
|
"""
|
|
|
|
-distros = ["alpine", "debian", "ubuntu", "rhel"]
|
2023-09-27 12:52:44 +00:00
|
|
|
+distros = ["almalinux", "alpine", "cloudlinux", "debian", "ubuntu", "rhel"]
|
2023-04-20 11:03:58 +00:00
|
|
|
|
|
|
|
meta: MetaSchema = {
|
|
|
|
"id": "cc_ca_certs",
|
2023-09-27 12:52:44 +00:00
|
|
|
diff -aruN cloud-init-22.1/cloudinit/config/cc_ntp.py cloud-init-22.1.patched/cloudinit/config/cc_ntp.py
|
|
|
|
--- cloud-init-22.1/cloudinit/config/cc_ntp.py 2022-02-15 21:02:23
|
|
|
|
+++ cloud-init-22.1.patched/cloudinit/config/cc_ntp.py 2023-08-04 12:53:57
|
|
|
|
@@ -80,6 +80,14 @@
|
2023-04-20 11:03:58 +00:00
|
|
|
|
|
|
|
# This is Distro-specific configuration overrides of the base config
|
|
|
|
DISTRO_CLIENT_CONFIG = {
|
|
|
|
+ "almalinux": {
|
|
|
|
+ "ntp": {
|
|
|
|
+ "service_name": "ntpd",
|
|
|
|
+ },
|
|
|
|
+ "chrony": {
|
|
|
|
+ "service_name": "chronyd",
|
|
|
|
+ },
|
|
|
|
+ },
|
|
|
|
"alpine": {
|
|
|
|
"chrony": {
|
|
|
|
"confpath": "/etc/chrony/chrony.conf",
|
2023-09-27 12:52:44 +00:00
|
|
|
@@ -89,6 +97,14 @@
|
|
|
|
"confpath": "/etc/ntp.conf",
|
|
|
|
"packages": [],
|
|
|
|
"service_name": "ntpd",
|
|
|
|
+ },
|
|
|
|
+ },
|
|
|
|
+ "cloudlinux": {
|
|
|
|
+ "ntp": {
|
|
|
|
+ "service_name": "ntpd",
|
|
|
|
+ },
|
|
|
|
+ "chrony": {
|
|
|
|
+ "service_name": "chronyd",
|
|
|
|
},
|
|
|
|
},
|
|
|
|
"debian": {
|
|
|
|
diff -aruN cloud-init-22.1/cloudinit/settings.py cloud-init-22.1.patched/cloudinit/settings.py
|
|
|
|
--- cloud-init-22.1/cloudinit/settings.py 2023-08-04 12:47:34
|
|
|
|
+++ cloud-init-22.1.patched/cloudinit/settings.py 2023-08-04 12:46:54
|
|
|
|
@@ -58,7 +58,7 @@
|
2023-04-20 12:04:16 +00:00
|
|
|
'cloud_dir': '/var/lib/cloud',
|
|
|
|
'templates_dir': '/etc/cloud/templates/',
|
2023-04-20 11:03:58 +00:00
|
|
|
},
|
2023-04-20 12:04:16 +00:00
|
|
|
- 'distro': 'rhel',
|
|
|
|
+ 'distro': 'almalinux',
|
|
|
|
'network': {'renderers': None},
|
2023-04-20 11:03:58 +00:00
|
|
|
},
|
|
|
|
"vendor_data": {"enabled": True, "prefix": []},
|
2023-09-27 12:52:44 +00:00
|
|
|
diff -aruN cloud-init-22.1/cloudinit/sources/DataSourceRbxCloud.py cloud-init-22.1.patched/cloudinit/sources/DataSourceRbxCloud.py
|
|
|
|
--- cloud-init-22.1/cloudinit/sources/DataSourceRbxCloud.py 2022-02-15 21:02:23
|
|
|
|
+++ cloud-init-22.1.patched/cloudinit/sources/DataSourceRbxCloud.py 2023-08-04 12:54:44
|
|
|
|
@@ -55,7 +55,7 @@
|
2023-04-20 11:03:58 +00:00
|
|
|
|
|
|
|
def gratuitous_arp(items, distro):
|
|
|
|
source_param = "-S"
|
|
|
|
- if distro.name in ["fedora", "centos", "rhel"]:
|
2023-09-27 12:52:44 +00:00
|
|
|
+ if distro.name in ["almalinux", "fedora", "centos", "cloudlinux", "rhel"]:
|
2023-04-20 11:03:58 +00:00
|
|
|
source_param = "-s"
|
|
|
|
for item in items:
|
|
|
|
try:
|
2023-09-27 12:52:44 +00:00
|
|
|
diff -aruN cloud-init-22.1/config/cloud.cfg.tmpl cloud-init-22.1.patched/config/cloud.cfg.tmpl
|
|
|
|
--- cloud-init-22.1/config/cloud.cfg.tmpl 2023-08-04 12:47:34
|
|
|
|
+++ cloud-init-22.1.patched/config/cloud.cfg.tmpl 2023-08-04 12:56:00
|
2023-04-20 11:03:58 +00:00
|
|
|
@@ -2,7 +2,7 @@
|
|
|
|
# The top level settings are used as module
|
|
|
|
# and system configuration.
|
|
|
|
{% set is_bsd = variant in ["dragonfly", "freebsd", "netbsd", "openbsd"] %}
|
|
|
|
-{% set is_rhel = variant in ["rhel", "centos"] %}
|
2023-09-27 12:52:44 +00:00
|
|
|
+{% set is_rhel = variant in ["rhel", "centos", "almalinux", "cloudlinux"] %}
|
2023-04-20 11:03:58 +00:00
|
|
|
{% if is_bsd %}
|
|
|
|
syslog_fix_perms: root:wheel
|
|
|
|
{% elif variant in ["suse"] %}
|
2023-09-27 12:52:44 +00:00
|
|
|
diff -aruN cloud-init-22.1/packages/pkg-deps.json cloud-init-22.1.patched/packages/pkg-deps.json
|
|
|
|
--- cloud-init-22.1/packages/pkg-deps.json 2022-02-15 21:02:23
|
|
|
|
+++ cloud-init-22.1.patched/packages/pkg-deps.json 2023-08-04 12:55:20
|
2023-04-20 11:03:58 +00:00
|
|
|
@@ -1,4 +1,18 @@
|
|
|
|
{
|
|
|
|
+ "almalinux" : {
|
|
|
|
+ "build-requires" : [
|
|
|
|
+ "python3-devel"
|
|
|
|
+ ],
|
|
|
|
+ "requires" : [
|
|
|
|
+ "e2fsprogs",
|
|
|
|
+ "iproute",
|
|
|
|
+ "net-tools",
|
|
|
|
+ "procps",
|
|
|
|
+ "rsyslog",
|
|
|
|
+ "shadow-utils",
|
|
|
|
+ "sudo"
|
|
|
|
+ ]
|
|
|
|
+ },
|
|
|
|
"debian" : {
|
|
|
|
"build-requires" : [
|
|
|
|
"debhelper",
|
2023-09-27 12:52:44 +00:00
|
|
|
@@ -14,6 +28,20 @@
|
|
|
|
]
|
|
|
|
},
|
|
|
|
"centos" : {
|
|
|
|
+ "build-requires" : [
|
|
|
|
+ "python3-devel"
|
|
|
|
+ ],
|
|
|
|
+ "requires" : [
|
|
|
|
+ "e2fsprogs",
|
|
|
|
+ "iproute",
|
|
|
|
+ "net-tools",
|
|
|
|
+ "procps",
|
|
|
|
+ "rsyslog",
|
|
|
|
+ "shadow-utils",
|
|
|
|
+ "sudo"
|
|
|
|
+ ]
|
|
|
|
+ },
|
|
|
|
+ "cloudlinux" : {
|
|
|
|
"build-requires" : [
|
|
|
|
"python3-devel"
|
|
|
|
],
|
|
|
|
diff -aruN cloud-init-22.1/systemd/cloud-config.service.tmpl cloud-init-22.1.patched/systemd/cloud-config.service.tmpl
|
|
|
|
--- cloud-init-22.1/systemd/cloud-config.service.tmpl 2023-08-04 12:47:34
|
|
|
|
+++ cloud-init-22.1.patched/systemd/cloud-config.service.tmpl 2023-08-04 12:56:40
|
|
|
|
@@ -4,7 +4,7 @@
|
2023-04-20 11:03:58 +00:00
|
|
|
After=network-online.target cloud-config.target
|
|
|
|
After=snapd.seeded.service
|
|
|
|
Wants=network-online.target cloud-config.target
|
|
|
|
-{% if variant == "rhel" %}
|
2023-09-27 12:52:44 +00:00
|
|
|
+{% if variant in ["almalinux", "cloudlinux", "rhel"] %}
|
2023-04-20 11:03:58 +00:00
|
|
|
ConditionPathExists=!/etc/cloud/cloud-init.disabled
|
|
|
|
ConditionKernelCommandLine=!cloud-init=disabled
|
|
|
|
{% endif %}
|
2023-09-27 12:52:44 +00:00
|
|
|
diff -aruN cloud-init-22.1/systemd/cloud-final.service.tmpl cloud-init-22.1.patched/systemd/cloud-final.service.tmpl
|
|
|
|
--- cloud-init-22.1/systemd/cloud-final.service.tmpl 2023-08-04 12:47:34
|
|
|
|
+++ cloud-init-22.1.patched/systemd/cloud-final.service.tmpl 2023-08-04 12:57:11
|
|
|
|
@@ -7,7 +7,7 @@
|
2023-04-20 11:03:58 +00:00
|
|
|
Before=apt-daily.service
|
|
|
|
{% endif %}
|
|
|
|
Wants=network-online.target cloud-config.service
|
|
|
|
-{% if variant == "rhel" %}
|
2023-09-27 12:52:44 +00:00
|
|
|
+{% if variant in ["almalinux", "cloudlinux", "rhel"] %}
|
2023-04-20 11:03:58 +00:00
|
|
|
ConditionPathExists=!/etc/cloud/cloud-init.disabled
|
|
|
|
ConditionKernelCommandLine=!cloud-init=disabled
|
|
|
|
{% endif %}
|
2023-09-27 12:52:44 +00:00
|
|
|
@@ -19,7 +19,7 @@
|
2023-04-20 11:03:58 +00:00
|
|
|
RemainAfterExit=yes
|
|
|
|
TimeoutSec=0
|
|
|
|
KillMode=process
|
|
|
|
-{% if variant == "rhel" %}
|
2023-09-27 12:52:44 +00:00
|
|
|
+{% if variant in ["almalinux", "cloudlinux", "rhel"] %}
|
2023-04-20 11:03:58 +00:00
|
|
|
# Restart NetworkManager if it is present and running.
|
|
|
|
ExecStartPost=/bin/sh -c 'u=NetworkManager.service; \
|
|
|
|
out=$(systemctl show --property=SubState $u) || exit; \
|
2023-09-27 12:52:44 +00:00
|
|
|
diff -aruN cloud-init-22.1/systemd/cloud-init-local.service.tmpl cloud-init-22.1.patched/systemd/cloud-init-local.service.tmpl
|
|
|
|
--- cloud-init-22.1/systemd/cloud-init-local.service.tmpl 2023-08-04 12:47:34
|
|
|
|
+++ cloud-init-22.1.patched/systemd/cloud-init-local.service.tmpl 2023-08-04 13:00:54
|
2023-04-20 11:03:58 +00:00
|
|
|
@@ -1,23 +1,23 @@
|
|
|
|
## template:jinja
|
|
|
|
[Unit]
|
|
|
|
Description=Initial cloud-init job (pre-networking)
|
|
|
|
-{% if variant in ["ubuntu", "unknown", "debian", "rhel" ] %}
|
2023-09-27 12:52:44 +00:00
|
|
|
+{% if variant in ["almalinux", "cloudlinux", "ubuntu", "unknown", "debian", "rhel" ] %}
|
2023-04-20 11:03:58 +00:00
|
|
|
DefaultDependencies=no
|
|
|
|
{% endif %}
|
|
|
|
Wants=network-pre.target
|
|
|
|
After=hv_kvp_daemon.service
|
|
|
|
After=systemd-remount-fs.service
|
|
|
|
-{% if variant == "rhel" %}
|
2023-09-27 12:52:44 +00:00
|
|
|
+{% if variant in ["almalinux", "cloudlinux", "rhel"] %}
|
2023-04-20 11:03:58 +00:00
|
|
|
Requires=dbus.socket
|
|
|
|
After=dbus.socket
|
|
|
|
{% endif %}
|
|
|
|
Before=NetworkManager.service
|
|
|
|
-{% if variant == "rhel" %}
|
2023-09-27 12:52:44 +00:00
|
|
|
+{% if variant in ["almalinux", "cloudlinux", "rhel"] %}
|
2023-04-20 11:03:58 +00:00
|
|
|
Before=network.service
|
|
|
|
{% endif %}
|
|
|
|
Before=network-pre.target
|
|
|
|
Before=shutdown.target
|
|
|
|
-{% if variant == "rhel" %}
|
2023-09-27 12:52:44 +00:00
|
|
|
+{% if variant in ["almalinux", "cloudlinux", "rhel"] %}
|
2023-04-20 11:03:58 +00:00
|
|
|
Before=firewalld.target
|
|
|
|
Conflicts=shutdown.target
|
|
|
|
{% endif %}
|
2023-09-27 12:52:44 +00:00
|
|
|
@@ -26,14 +26,14 @@
|
2023-04-20 11:03:58 +00:00
|
|
|
Conflicts=shutdown.target
|
|
|
|
{% endif %}
|
|
|
|
RequiresMountsFor=/var/lib/cloud
|
|
|
|
-{% if variant == "rhel" %}
|
2023-09-27 12:52:44 +00:00
|
|
|
+{% if variant in ["almalinux", "cloudlinux", "rhel"] %}
|
2023-04-20 11:03:58 +00:00
|
|
|
ConditionPathExists=!/etc/cloud/cloud-init.disabled
|
|
|
|
ConditionKernelCommandLine=!cloud-init=disabled
|
|
|
|
{% endif %}
|
|
|
|
|
|
|
|
[Service]
|
|
|
|
Type=oneshot
|
|
|
|
-{% if variant == "rhel" %}
|
2023-09-27 12:52:44 +00:00
|
|
|
+{% if variant in ["almalinux", "cloudlinux", "rhel"] %}
|
2023-04-20 11:03:58 +00:00
|
|
|
ExecStartPre=/bin/mkdir -p /run/cloud-init
|
|
|
|
ExecStartPre=/sbin/restorecon /run/cloud-init
|
|
|
|
ExecStartPre=/usr/bin/touch /run/cloud-init/enabled
|
2023-09-27 12:52:44 +00:00
|
|
|
diff -aruN cloud-init-22.1/systemd/cloud-init.service.tmpl cloud-init-22.1.patched/systemd/cloud-init.service.tmpl
|
|
|
|
--- cloud-init-22.1/systemd/cloud-init.service.tmpl 2023-08-04 12:47:34
|
|
|
|
+++ cloud-init-22.1.patched/systemd/cloud-init.service.tmpl 2023-08-04 13:01:39
|
2023-04-20 11:03:58 +00:00
|
|
|
@@ -1,7 +1,7 @@
|
|
|
|
## template:jinja
|
|
|
|
[Unit]
|
|
|
|
Description=Initial cloud-init job (metadata service crawler)
|
|
|
|
-{% if variant not in ["photon", "rhel"] %}
|
2023-09-27 12:52:44 +00:00
|
|
|
+{% if variant not in ["almalinux", "cloudlinux", "photon", "rhel"] %}
|
2023-04-20 11:03:58 +00:00
|
|
|
DefaultDependencies=no
|
|
|
|
{% endif %}
|
|
|
|
Wants=cloud-init-local.service
|
2023-09-27 12:52:44 +00:00
|
|
|
@@ -37,7 +37,7 @@
|
2023-04-20 11:03:58 +00:00
|
|
|
Conflicts=shutdown.target
|
|
|
|
{% endif %}
|
|
|
|
Before=systemd-user-sessions.service
|
|
|
|
-{% if variant == "rhel" %}
|
2023-09-27 12:52:44 +00:00
|
|
|
+{% if variant in ["almalinux", "cloudlinux", "rhel"] %}
|
2023-04-20 11:03:58 +00:00
|
|
|
ConditionPathExists=!/etc/cloud/cloud-init.disabled
|
|
|
|
ConditionKernelCommandLine=!cloud-init=disabled
|
|
|
|
{% endif %}
|
2023-09-27 12:52:44 +00:00
|
|
|
diff -aruN cloud-init-22.1/templates/chrony.conf.almalinux.tmpl cloud-init-22.1.patched/templates/chrony.conf.almalinux.tmpl
|
|
|
|
--- cloud-init-22.1/templates/chrony.conf.almalinux.tmpl 1970-01-01 02:00:00
|
|
|
|
+++ cloud-init-22.1.patched/templates/chrony.conf.almalinux.tmpl 2023-08-04 12:46:54
|
2023-04-20 11:03:58 +00:00
|
|
|
@@ -0,0 +1,45 @@
|
|
|
|
+## template:jinja
|
|
|
|
+# Use public servers from the pool.ntp.org project.
|
|
|
|
+# Please consider joining the pool (http://www.pool.ntp.org/join.html).
|
|
|
|
+{% if pools %}# pools
|
|
|
|
+{% endif %}
|
|
|
|
+{% for pool in pools -%}
|
|
|
|
+pool {{pool}} iburst
|
|
|
|
+{% endfor %}
|
|
|
|
+{%- if servers %}# servers
|
|
|
|
+{% endif %}
|
|
|
|
+{% for server in servers -%}
|
|
|
|
+server {{server}} iburst
|
|
|
|
+{% endfor %}
|
|
|
|
+
|
|
|
|
+# Record the rate at which the system clock gains/losses time.
|
|
|
|
+driftfile /var/lib/chrony/drift
|
|
|
|
+
|
|
|
|
+# Allow the system clock to be stepped in the first three updates
|
|
|
|
+# if its offset is larger than 1 second.
|
|
|
|
+makestep 1.0 3
|
|
|
|
+
|
|
|
|
+# Enable kernel synchronization of the real-time clock (RTC).
|
|
|
|
+rtcsync
|
|
|
|
+
|
|
|
|
+# Enable hardware timestamping on all interfaces that support it.
|
|
|
|
+#hwtimestamp *
|
|
|
|
+
|
|
|
|
+# Increase the minimum number of selectable sources required to adjust
|
|
|
|
+# the system clock.
|
|
|
|
+#minsources 2
|
|
|
|
+
|
|
|
|
+# Allow NTP client access from local network.
|
|
|
|
+#allow 192.168.0.0/16
|
|
|
|
+
|
|
|
|
+# Serve time even if not synchronized to a time source.
|
|
|
|
+#local stratum 10
|
|
|
|
+
|
|
|
|
+# Specify file containing keys for NTP authentication.
|
|
|
|
+#keyfile /etc/chrony.keys
|
|
|
|
+
|
|
|
|
+# Specify directory for log files.
|
|
|
|
+logdir /var/log/chrony
|
|
|
|
+
|
|
|
|
+# Select which information is logged.
|
|
|
|
+#log measurements statistics tracking
|
2023-09-27 12:52:44 +00:00
|
|
|
diff -aruN cloud-init-22.1/templates/chrony.conf.cloudlinux.tmpl cloud-init-22.1.patched/templates/chrony.conf.cloudlinux.tmpl
|
|
|
|
--- cloud-init-22.1/templates/chrony.conf.cloudlinux.tmpl 1970-01-01 02:00:00
|
|
|
|
+++ cloud-init-22.1.patched/templates/chrony.conf.cloudlinux.tmpl 2023-08-04 13:02:20
|
|
|
|
@@ -0,0 +1,45 @@
|
|
|
|
+## template:jinja
|
|
|
|
+# Use public servers from the pool.ntp.org project.
|
|
|
|
+# Please consider joining the pool (http://www.pool.ntp.org/join.html).
|
|
|
|
+{% if pools %}# pools
|
|
|
|
+{% endif %}
|
|
|
|
+{% for pool in pools -%}
|
|
|
|
+pool {{pool}} iburst
|
|
|
|
+{% endfor %}
|
|
|
|
+{%- if servers %}# servers
|
|
|
|
+{% endif %}
|
|
|
|
+{% for server in servers -%}
|
|
|
|
+server {{server}} iburst
|
|
|
|
+{% endfor %}
|
|
|
|
+
|
|
|
|
+# Record the rate at which the system clock gains/losses time.
|
|
|
|
+driftfile /var/lib/chrony/drift
|
|
|
|
+
|
|
|
|
+# Allow the system clock to be stepped in the first three updates
|
|
|
|
+# if its offset is larger than 1 second.
|
|
|
|
+makestep 1.0 3
|
|
|
|
+
|
|
|
|
+# Enable kernel synchronization of the real-time clock (RTC).
|
|
|
|
+rtcsync
|
|
|
|
+
|
|
|
|
+# Enable hardware timestamping on all interfaces that support it.
|
|
|
|
+#hwtimestamp *
|
|
|
|
+
|
|
|
|
+# Increase the minimum number of selectable sources required to adjust
|
|
|
|
+# the system clock.
|
|
|
|
+#minsources 2
|
|
|
|
+
|
|
|
|
+# Allow NTP client access from local network.
|
|
|
|
+#allow 192.168.0.0/16
|
|
|
|
+
|
|
|
|
+# Serve time even if not synchronized to a time source.
|
|
|
|
+#local stratum 10
|
|
|
|
+
|
|
|
|
+# Specify file containing keys for NTP authentication.
|
|
|
|
+#keyfile /etc/chrony.keys
|
|
|
|
+
|
|
|
|
+# Specify directory for log files.
|
|
|
|
+logdir /var/log/chrony
|
|
|
|
+
|
|
|
|
+# Select which information is logged.
|
|
|
|
+#log measurements statistics tracking
|
|
|
|
diff -aruN cloud-init-22.1/templates/ntp.conf.almalinux.tmpl cloud-init-22.1.patched/templates/ntp.conf.almalinux.tmpl
|
|
|
|
--- cloud-init-22.1/templates/ntp.conf.almalinux.tmpl 1970-01-01 02:00:00
|
|
|
|
+++ cloud-init-22.1.patched/templates/ntp.conf.almalinux.tmpl 2023-08-04 12:46:54
|
|
|
|
@@ -0,0 +1,61 @@
|
|
|
|
+## template:jinja
|
|
|
|
+
|
|
|
|
+# For more information about this file, see the man pages
|
|
|
|
+# ntp.conf(5), ntp_acc(5), ntp_auth(5), ntp_clock(5), ntp_misc(5), ntp_mon(5).
|
|
|
|
+
|
|
|
|
+driftfile /var/lib/ntp/drift
|
|
|
|
+
|
|
|
|
+# Permit time synchronization with our time source, but do not
|
|
|
|
+# permit the source to query or modify the service on this system.
|
|
|
|
+restrict default kod nomodify notrap nopeer noquery
|
|
|
|
+restrict -6 default kod nomodify notrap nopeer noquery
|
|
|
|
+
|
|
|
|
+# 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 -6 ::1
|
|
|
|
+
|
|
|
|
+# Hosts on local network are less restricted.
|
|
|
|
+#restrict 192.168.1.0 mask 255.255.255.0 nomodify notrap
|
|
|
|
+
|
|
|
|
+# Use public servers from the pool.ntp.org project.
|
|
|
|
+# Please consider joining the pool (http://www.pool.ntp.org/join.html).
|
|
|
|
+{% if pools %}# pools
|
|
|
|
+{% endif %}
|
|
|
|
+{% for pool in pools -%}
|
|
|
|
+pool {{pool}} iburst
|
|
|
|
+{% endfor %}
|
|
|
|
+{%- if servers %}# servers
|
|
|
|
+{% endif %}
|
|
|
|
+{% for server in servers -%}
|
|
|
|
+server {{server}} iburst
|
|
|
|
+{% endfor %}
|
|
|
|
+
|
|
|
|
+#broadcast 192.168.1.255 autokey # broadcast server
|
|
|
|
+#broadcastclient # broadcast client
|
|
|
|
+#broadcast 224.0.1.1 autokey # multicast server
|
|
|
|
+#multicastclient 224.0.1.1 # multicast client
|
|
|
|
+#manycastserver 239.255.254.254 # manycast server
|
|
|
|
+#manycastclient 239.255.254.254 autokey # manycast client
|
|
|
|
+
|
|
|
|
+# Enable public key cryptography.
|
|
|
|
+#crypto
|
|
|
|
+
|
|
|
|
+includefile /etc/ntp/crypto/pw
|
|
|
|
+
|
|
|
|
+# Key file containing the keys and key identifiers used when operating
|
|
|
|
+# with symmetric key cryptography.
|
|
|
|
+keys /etc/ntp/keys
|
|
|
|
+
|
|
|
|
+# Specify the key identifiers which are trusted.
|
|
|
|
+#trustedkey 4 8 42
|
|
|
|
+
|
|
|
|
+# Specify the key identifier to use with the ntpdc utility.
|
|
|
|
+#requestkey 8
|
|
|
|
+
|
|
|
|
+# Specify the key identifier to use with the ntpq utility.
|
|
|
|
+#controlkey 8
|
|
|
|
+
|
|
|
|
+# Enable writing of statistics records.
|
|
|
|
+#statistics clockstats cryptostats loopstats peerstats
|
|
|
|
diff -aruN cloud-init-22.1/templates/ntp.conf.cloudlinux.tmpl cloud-init-22.1.patched/templates/ntp.conf.cloudlinux.tmpl
|
|
|
|
--- cloud-init-22.1/templates/ntp.conf.cloudlinux.tmpl 1970-01-01 02:00:00
|
|
|
|
+++ cloud-init-22.1.patched/templates/ntp.conf.cloudlinux.tmpl 2023-08-04 13:03:08
|
2023-04-20 11:03:58 +00:00
|
|
|
@@ -0,0 +1,61 @@
|
|
|
|
+## template:jinja
|
|
|
|
+
|
|
|
|
+# For more information about this file, see the man pages
|
|
|
|
+# ntp.conf(5), ntp_acc(5), ntp_auth(5), ntp_clock(5), ntp_misc(5), ntp_mon(5).
|
|
|
|
+
|
|
|
|
+driftfile /var/lib/ntp/drift
|
|
|
|
+
|
|
|
|
+# Permit time synchronization with our time source, but do not
|
|
|
|
+# permit the source to query or modify the service on this system.
|
|
|
|
+restrict default kod nomodify notrap nopeer noquery
|
|
|
|
+restrict -6 default kod nomodify notrap nopeer noquery
|
|
|
|
+
|
|
|
|
+# 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 -6 ::1
|
|
|
|
+
|
|
|
|
+# Hosts on local network are less restricted.
|
|
|
|
+#restrict 192.168.1.0 mask 255.255.255.0 nomodify notrap
|
|
|
|
+
|
|
|
|
+# Use public servers from the pool.ntp.org project.
|
|
|
|
+# Please consider joining the pool (http://www.pool.ntp.org/join.html).
|
|
|
|
+{% if pools %}# pools
|
|
|
|
+{% endif %}
|
|
|
|
+{% for pool in pools -%}
|
|
|
|
+pool {{pool}} iburst
|
|
|
|
+{% endfor %}
|
|
|
|
+{%- if servers %}# servers
|
|
|
|
+{% endif %}
|
|
|
|
+{% for server in servers -%}
|
|
|
|
+server {{server}} iburst
|
|
|
|
+{% endfor %}
|
|
|
|
+
|
|
|
|
+#broadcast 192.168.1.255 autokey # broadcast server
|
|
|
|
+#broadcastclient # broadcast client
|
|
|
|
+#broadcast 224.0.1.1 autokey # multicast server
|
|
|
|
+#multicastclient 224.0.1.1 # multicast client
|
|
|
|
+#manycastserver 239.255.254.254 # manycast server
|
|
|
|
+#manycastclient 239.255.254.254 autokey # manycast client
|
|
|
|
+
|
|
|
|
+# Enable public key cryptography.
|
|
|
|
+#crypto
|
|
|
|
+
|
|
|
|
+includefile /etc/ntp/crypto/pw
|
|
|
|
+
|
|
|
|
+# Key file containing the keys and key identifiers used when operating
|
|
|
|
+# with symmetric key cryptography.
|
|
|
|
+keys /etc/ntp/keys
|
|
|
|
+
|
|
|
|
+# Specify the key identifiers which are trusted.
|
|
|
|
+#trustedkey 4 8 42
|
|
|
|
+
|
|
|
|
+# Specify the key identifier to use with the ntpdc utility.
|
|
|
|
+#requestkey 8
|
|
|
|
+
|
|
|
|
+# Specify the key identifier to use with the ntpq utility.
|
|
|
|
+#controlkey 8
|
|
|
|
+
|
|
|
|
+# Enable writing of statistics records.
|
|
|
|
+#statistics clockstats cryptostats loopstats peerstats
|
2023-09-27 12:52:44 +00:00
|
|
|
diff -aruN cloud-init-22.1/tests/unittests/test_net.py cloud-init-22.1.patched/tests/unittests/test_net.py
|
|
|
|
--- cloud-init-22.1/tests/unittests/test_net.py 2023-08-04 12:47:34
|
|
|
|
+++ cloud-init-22.1.patched/tests/unittests/test_net.py 2023-08-04 13:04:10
|
|
|
|
@@ -6254,8 +6254,10 @@
|
2023-04-20 11:03:58 +00:00
|
|
|
def test_sysconfig_available_uses_variant_mapping(self, m_info, m_avail):
|
|
|
|
m_avail.return_value = True
|
|
|
|
variants = [
|
|
|
|
+ "almalinux",
|
|
|
|
"suse",
|
|
|
|
"centos",
|
2023-09-27 12:52:44 +00:00
|
|
|
+ "cloudlinux",
|
2023-04-20 11:03:58 +00:00
|
|
|
"eurolinux",
|
2023-09-27 12:52:44 +00:00
|
|
|
"fedora",
|
|
|
|
"rhel",
|
|
|
|
diff -aruN cloud-init-22.1/tests/unittests/test_render_cloudcfg.py cloud-init-22.1.patched/tests/unittests/test_render_cloudcfg.py
|
|
|
|
--- cloud-init-22.1/tests/unittests/test_render_cloudcfg.py 2023-08-04 12:47:34
|
|
|
|
+++ cloud-init-22.1.patched/tests/unittests/test_render_cloudcfg.py 2023-08-04 13:04:48
|
|
|
|
@@ -9,9 +9,11 @@
|
2023-04-20 11:03:58 +00:00
|
|
|
|
|
|
|
# TODO(Look to align with tools.render-cloudcfg or cloudinit.distos.OSFAMILIES)
|
|
|
|
DISTRO_VARIANTS = [
|
|
|
|
+ "almalinux",
|
|
|
|
"amazon",
|
|
|
|
"arch",
|
|
|
|
"centos",
|
2023-09-27 12:52:44 +00:00
|
|
|
+ "cloudlinux",
|
|
|
|
"debian",
|
|
|
|
"eurolinux",
|
|
|
|
"fedora",
|
|
|
|
@@ -66,7 +68,9 @@
|
2023-04-20 11:03:58 +00:00
|
|
|
system_cfg = util.load_yaml(stream.read())
|
|
|
|
|
|
|
|
default_user_exceptions = {
|
|
|
|
+ "almalinux": "almalinux",
|
|
|
|
"amazon": "ec2-user",
|
2023-09-27 12:52:44 +00:00
|
|
|
+ "cloudlinux": "cloudlinux",
|
2023-04-20 11:03:58 +00:00
|
|
|
"debian": "ubuntu",
|
|
|
|
"rhel": "cloud-user",
|
2023-09-27 12:52:44 +00:00
|
|
|
"centos": "cloud-user",
|
|
|
|
diff -aruN cloud-init-22.1/tools/read-dependencies cloud-init-22.1.patched/tools/read-dependencies
|
|
|
|
--- cloud-init-22.1/tools/read-dependencies 2022-02-15 21:02:23
|
|
|
|
+++ cloud-init-22.1.patched/tools/read-dependencies 2023-08-04 13:06:19
|
|
|
|
@@ -22,7 +22,9 @@
|
2023-04-20 11:03:58 +00:00
|
|
|
|
|
|
|
# Map the appropriate package dir needed for each distro choice
|
|
|
|
DISTRO_PKG_TYPE_MAP = {
|
|
|
|
+ 'almalinux': 'redhat',
|
|
|
|
'centos': 'redhat',
|
2023-09-27 12:52:44 +00:00
|
|
|
+ 'cloudlinux': 'redhat',
|
2023-04-20 11:03:58 +00:00
|
|
|
'eurolinux': 'redhat',
|
|
|
|
'miraclelinux': 'redhat',
|
2023-09-27 12:52:44 +00:00
|
|
|
'rocky': 'redhat',
|
|
|
|
@@ -68,14 +70,18 @@
|
2023-04-20 11:03:58 +00:00
|
|
|
'--auto-agree-with-licenses']
|
|
|
|
|
|
|
|
DRY_DISTRO_INSTALL_PKG_CMD = {
|
|
|
|
+ 'almalinux': ['yum', 'install', '--assumeyes'],
|
|
|
|
'rocky': ['yum', 'install', '--assumeyes'],
|
|
|
|
'centos': ['yum', 'install', '--assumeyes'],
|
2023-09-27 12:52:44 +00:00
|
|
|
+ 'cloudlinux': ['yum', 'install', '--assumeyes'],
|
2023-04-20 11:03:58 +00:00
|
|
|
'eurolinux': ['yum', 'install', '--assumeyes'],
|
2023-09-27 12:52:44 +00:00
|
|
|
'miraclelinux': ['yum', 'install', '--assumeyes'],
|
|
|
|
'redhat': ['yum', 'install', '--assumeyes'],
|
2023-04-20 11:03:58 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
DISTRO_INSTALL_PKG_CMD = {
|
|
|
|
+ 'almalinux': MAYBE_RELIABLE_YUM_INSTALL,
|
2023-09-27 12:52:44 +00:00
|
|
|
+ 'cloudlinux': MAYBE_RELIABLE_YUM_INSTALL,
|
2023-04-20 11:03:58 +00:00
|
|
|
'rocky': MAYBE_RELIABLE_YUM_INSTALL,
|
|
|
|
'eurolinux': MAYBE_RELIABLE_YUM_INSTALL,
|
|
|
|
'miraclelinux': MAYBE_RELIABLE_YUM_INSTALL,
|
2023-09-27 12:52:44 +00:00
|
|
|
@@ -90,6 +96,8 @@
|
2023-04-20 11:03:58 +00:00
|
|
|
|
|
|
|
# List of base system packages required to enable ci automation
|
|
|
|
CI_SYSTEM_BASE_PKGS = {
|
|
|
|
+ 'almalinux': ['python3-tox'],
|
2023-09-27 12:52:44 +00:00
|
|
|
+ 'cloudlinux': ['python3-tox'],
|
2023-04-20 11:03:58 +00:00
|
|
|
'common': ['make', 'sudo', 'tar'],
|
|
|
|
'eurolinux': ['python3-tox'],
|
|
|
|
'miraclelinux': ['python3-tox'],
|
2023-09-27 12:52:44 +00:00
|
|
|
@@ -285,10 +293,10 @@
|
2023-04-20 11:03:58 +00:00
|
|
|
cmd = DRY_DISTRO_INSTALL_PKG_CMD[distro]
|
|
|
|
install_cmd.extend(cmd)
|
|
|
|
|
|
|
|
- if distro in ['centos', 'redhat', 'rocky', 'eurolinux']:
|
2023-09-27 12:52:44 +00:00
|
|
|
+ if distro in ['almalinux', 'cloudlinux', 'centos', 'redhat', 'rocky', 'eurolinux']:
|
2023-04-20 11:03:58 +00:00
|
|
|
# CentOS and Redhat need epel-release to access oauthlib and jsonschema
|
|
|
|
subprocess.check_call(install_cmd + ['epel-release'])
|
|
|
|
- if distro in ['suse', 'opensuse', 'redhat', 'rocky', 'centos', 'eurolinux']:
|
2023-09-27 12:52:44 +00:00
|
|
|
+ if distro in ['almalinux', 'cloudlinux', 'suse', 'opensuse', 'redhat', 'rocky', 'centos', 'eurolinux']:
|
2023-04-20 11:03:58 +00:00
|
|
|
pkg_list.append('rpm-build')
|
|
|
|
subprocess.check_call(install_cmd + pkg_list)
|
|
|
|
|
2023-09-27 12:52:44 +00:00
|
|
|
diff -aruN cloud-init-22.1/tools/run-container cloud-init-22.1.patched/tools/run-container
|
|
|
|
--- cloud-init-22.1/tools/run-container 2022-02-15 21:02:23
|
|
|
|
+++ cloud-init-22.1.patched/tools/run-container 2023-08-04 13:07:29
|
|
|
|
@@ -102,7 +102,7 @@
|
2023-04-20 11:03:58 +00:00
|
|
|
}
|
|
|
|
local t=${gitdir%/*}
|
|
|
|
case "$t" in
|
|
|
|
- */worktrees)
|
|
|
|
+ */worktrees)
|
|
|
|
if [ -f "${t%worktrees}/config" ]; then
|
|
|
|
gitdir="${t%worktrees}"
|
|
|
|
fi
|
2023-09-27 12:52:44 +00:00
|
|
|
@@ -191,7 +191,7 @@
|
2023-04-20 11:03:58 +00:00
|
|
|
|
|
|
|
get_os_info() {
|
|
|
|
# run inside container, set OS_NAME, OS_VERSION
|
|
|
|
- # example OS_NAME are centos, debian, opensuse, rockylinux
|
2023-09-27 12:52:44 +00:00
|
|
|
+ # example OS_NAME are almalinux, centos, cloudlinux, debian, opensuse, rockylinux
|
2023-04-20 11:03:58 +00:00
|
|
|
[ -n "${OS_NAME:-}" -a -n "${OS_VERSION:-}" ] && return 0
|
|
|
|
if [ -f /etc/os-release ]; then
|
|
|
|
OS_NAME=$(sh -c '. /etc/os-release; echo $ID')
|
2023-09-27 12:52:44 +00:00
|
|
|
@@ -247,7 +247,7 @@
|
2023-04-20 11:03:58 +00:00
|
|
|
install_packages() {
|
|
|
|
get_os_info || return
|
|
|
|
case "$OS_NAME" in
|
|
|
|
- centos|rocky*) yum_install "$@";;
|
2023-09-27 12:52:44 +00:00
|
|
|
+ almalinux|centos|cloudlinux|rocky*) yum_install "$@";;
|
2023-04-20 11:03:58 +00:00
|
|
|
opensuse) zypper_install "$@";;
|
|
|
|
debian|ubuntu) apt_install "$@";;
|
|
|
|
*) error "Do not know how to install packages on ${OS_NAME}";
|
2023-09-27 12:52:44 +00:00
|
|
|
@@ -486,16 +486,16 @@
|
2023-04-20 11:03:58 +00:00
|
|
|
|
|
|
|
local build_pkg="" build_srcpkg="" pkg_ext="" distflag=""
|
|
|
|
case "$OS_NAME" in
|
|
|
|
- centos|rocky) distflag="--distro=redhat";;
|
2023-09-27 12:52:44 +00:00
|
|
|
+ almalinux|centos|cloudlinux|rocky) distflag="--distro=redhat";;
|
2023-04-20 11:03:58 +00:00
|
|
|
opensuse) distflag="--distro=suse";;
|
|
|
|
esac
|
|
|
|
|
|
|
|
case "$OS_NAME" in
|
|
|
|
debian|ubuntu)
|
|
|
|
- build_pkg="./packages/bddeb -d"
|
|
|
|
+ build_pkg="./packages/bddeb -d"
|
|
|
|
build_srcpkg="./packages/bddeb -S -d"
|
|
|
|
pkg_ext=".deb";;
|
|
|
|
- centos|opensuse|rocky)
|
2023-09-27 12:52:44 +00:00
|
|
|
+ almalinux|centos|cloudlinux|opensuse|rocky)
|
2023-04-20 11:03:58 +00:00
|
|
|
build_pkg="./packages/brpm $distflag"
|
|
|
|
build_srcpkg="./packages/brpm $distflag --srpm"
|
|
|
|
pkg_ext=".rpm";;
|