Compare commits
No commits in common. 'c8' and 'a9-beta' have entirely different histories.
@ -1 +1 @@
|
||||
830185bb5ce87ad86e4d1c0c62329bb255ec1648 SOURCES/cloud-init-22.1.tar.gz
|
||||
0b491818abcdce5ba6c1b30c75dd680d6ee3983e SOURCES/23.1.1.tar.gz
|
||||
|
@ -1 +1 @@
|
||||
SOURCES/cloud-init-22.1.tar.gz
|
||||
SOURCES/23.1.1.tar.gz
|
||||
|
@ -0,0 +1,61 @@
|
||||
From c4d66915520554adedff9be7396f877cd1a5525c Mon Sep 17 00:00:00 2001
|
||||
From: Emanuele Giuseppe Esposito <eesposit@redhat.com>
|
||||
Date: Mon, 6 Mar 2023 16:37:20 +0100
|
||||
Subject: [PATCH] Add initial redhat changes
|
||||
|
||||
Adding minimal set of changes necessary for successful build of the package
|
||||
on RHEL/CentOS 9 Stream koji.
|
||||
|
||||
Merged patches (23.1.1):
|
||||
724a80ac Add TargetRelease
|
||||
967a4405b rhel/cloud.cfg: remove ssh_genkeytypes in settings.py and set in cloud.cfg
|
||||
^ Merged since it removes hunks added in this commit itself
|
||||
|
||||
Discarded because not needed anymore (packit):
|
||||
e3fd7ce12 Configure Packit to ignore the .gitignore file
|
||||
e18654e9 Fixes for packit support
|
||||
|
||||
Discarded because file does not exist anymore and templates are aligned with upstream:
|
||||
3576b12460bf18557857ee25df6bf530dab66612 Adding _netdev to the default mount configuration
|
||||
8092b57ab245856ff1fdde1469960608a489c95e Remove rhel specific files
|
||||
|
||||
Added the following entry to %files to keep track of the new README file in config/clean.d/README
|
||||
%doc %{_sysconfdir}/cloud/clean.d/README
|
||||
|
||||
ignored
|
||||
c75e509b0 Revert "Revert "Setting highest autoconnect priority for network-scripts""
|
||||
0eba5c619 Revert "Setting highest autoconnect priority for network-scripts"
|
||||
|
||||
ignored
|
||||
ba19343c0d9807d0c68a2d8e4ab274f3ca884247 Add Gitlab CI
|
||||
fe09305a5479a4814d6c46df07a906bafa29d637 Delete .gitlab-ci.yml
|
||||
|
||||
Conflicts:
|
||||
missing rhel/ static files and "" instead of '' in setup.py
|
||||
|
||||
Signed-off-by: Emanuele Giuseppe Esposito <eesposit@redhat.com>
|
||||
---
|
||||
cloudinit/settings.py | 5 +++--
|
||||
1 file changed, 3 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/cloudinit/settings.py b/cloudinit/settings.py
|
||||
index 8684d003..edbb217d 100644
|
||||
--- a/cloudinit/settings.py
|
||||
+++ b/cloudinit/settings.py
|
||||
@@ -53,13 +53,14 @@ CFG_BUILTIN = {
|
||||
],
|
||||
"def_log_file": "/var/log/cloud-init.log",
|
||||
"log_cfgs": [],
|
||||
- "syslog_fix_perms": ["syslog:adm", "root:adm", "root:wheel", "root:root"],
|
||||
+ "mount_default_fields": [None, None, "auto", "defaults,nofail", "0", "2"],
|
||||
+ "syslog_fix_perms": [],
|
||||
"system_info": {
|
||||
"paths": {
|
||||
"cloud_dir": "/var/lib/cloud",
|
||||
"templates_dir": "/etc/cloud/templates/",
|
||||
},
|
||||
- "distro": "ubuntu",
|
||||
+ "distro": "rhel",
|
||||
"network": {"renderers": None},
|
||||
},
|
||||
"vendor_data": {"enabled": True, "prefix": []},
|
@ -1,586 +0,0 @@
|
||||
From 5e1e568d7085fd4443b4e3ccc492f5e31747e270 Mon Sep 17 00:00:00 2001
|
||||
From: Amy Chen <xiachen@redhat.com>
|
||||
Date: Wed, 20 Apr 2022 10:59:48 +0800
|
||||
Subject: Add initial redhat setup
|
||||
|
||||
Merged patches (22.1)
|
||||
- d18029bf Add netifaces package as a Requires in cloud-init.spec.template
|
||||
- 31adf961 Add gdisk and openssl as deps to fix UEFI / Azure initialization
|
||||
- f4a2905d Add dhcp-client as a dependency
|
||||
- 290e14cc cloud-init.spec.template: update %systemd_postun parameter
|
||||
- 9be4ae9b (tag: cloud-init-21.1-1.el8) Update to cloud-init-21.1-1.el8
|
||||
|
||||
Conflicts:
|
||||
cloudinit/config/cc_chef.py Using double quotes instead of single quotes
|
||||
|
||||
cloudinit/settings.py
|
||||
- Using rhel settings
|
||||
- Using double quotes instead of single quotes
|
||||
|
||||
setup.py
|
||||
- Following the changes of 21.1 rebase
|
||||
- Using double quotes instead of single quotes
|
||||
|
||||
redhat/cloud-init.spec.template
|
||||
- Add the drop-in to the right cloud-init.spec used by our package builder, which is downstream-only part of the bz 2002492 fix.
|
||||
|
||||
redhat/Makefile.common
|
||||
- Backport the build handling fixes from patch "Update to cloud-init-21.1-1.el8"
|
||||
|
||||
Signed-off-by: Amy Chen <xiachen@redhat.com>
|
||||
|
||||
Merged patches (21.1):
|
||||
- 915d30ad Change gating file to correct rhel version
|
||||
- 311f318d Removing net-tools dependency
|
||||
- 74731806 Adding man pages to Red Hat spec file
|
||||
- 758d333d Removing blocking test from yaml configuration file
|
||||
- c7e7c59c Changing permission of cloud-init-generator to 755
|
||||
- 8b85abbb Installing man pages in the correct place with correct permissions
|
||||
- c6808d8d Fix unit failure of cloud-final.service if NetworkManager was not present.
|
||||
- 11866ef6 Report full specific version with "cloud-init --version"
|
||||
|
||||
Rebase notes (18.5):
|
||||
- added bash_completition file
|
||||
- added cloud-id file
|
||||
|
||||
Merged patches (20.3):
|
||||
- 01900d0 changing ds-identify patch from /usr/lib to /usr/libexec
|
||||
- 7f47ca3 Render the generator from template instead of cp
|
||||
|
||||
Merged patches (19.4):
|
||||
- 4ab5a61 Fix for network configuration not persisting after reboot
|
||||
- 84cf125 Removing cloud-user from wheel
|
||||
- 31290ab Adding gating tests for Azure, ESXi and AWS
|
||||
|
||||
Merged patches (18.5):
|
||||
- 2d6b469 add power-state-change module to cloud_final_modules
|
||||
- 764159f Adding systemd mount options to wait for cloud-init
|
||||
- da4d99e Adding disk_setup to rhel/cloud.cfg
|
||||
- f5c6832 Enable cloud-init by default on vmware
|
||||
|
||||
Conflicts:
|
||||
cloudinit/config/cc_chef.py:
|
||||
- Updated header documentation text
|
||||
- Replacing double quotes by simple quotes
|
||||
|
||||
setup.py:
|
||||
- Adding missing cmdclass info
|
||||
|
||||
Signed-off-by: Eduardo Otubo <otubo@redhat.com>
|
||||
---
|
||||
.gitignore | 1 +
|
||||
cloudinit/config/cc_chef.py | 65 ++-
|
||||
cloudinit/settings.py | 7 +-
|
||||
redhat/.gitignore | 1 +
|
||||
redhat/Makefile | 71 +++
|
||||
redhat/Makefile.common | 37 ++
|
||||
redhat/cloud-init-tmpfiles.conf | 1 +
|
||||
redhat/cloud-init.spec.template | 696 ++++++++++++++++++++++++++
|
||||
redhat/gating.yaml | 8 +
|
||||
redhat/rpmbuild/BUILD/.gitignore | 3 +
|
||||
redhat/rpmbuild/RPMS/.gitignore | 3 +
|
||||
redhat/rpmbuild/SOURCES/.gitignore | 3 +
|
||||
redhat/rpmbuild/SPECS/.gitignore | 3 +
|
||||
redhat/rpmbuild/SRPMS/.gitignore | 3 +
|
||||
redhat/scripts/frh.py | 25 +
|
||||
redhat/scripts/git-backport-diff | 327 ++++++++++++
|
||||
redhat/scripts/git-compile-check | 215 ++++++++
|
||||
redhat/scripts/process-patches.sh | 92 ++++
|
||||
redhat/scripts/tarball_checksum.sh | 3 +
|
||||
rhel/README.rhel | 5 +
|
||||
rhel/cloud-init-tmpfiles.conf | 1 +
|
||||
rhel/cloud.cfg | 69 +++
|
||||
rhel/systemd/cloud-config.service | 18 +
|
||||
rhel/systemd/cloud-config.target | 11 +
|
||||
rhel/systemd/cloud-final.service | 24 +
|
||||
rhel/systemd/cloud-init-local.service | 31 ++
|
||||
rhel/systemd/cloud-init.service | 25 +
|
||||
rhel/systemd/cloud-init.target | 7 +
|
||||
setup.py | 28 +-
|
||||
tools/read-version | 28 +-
|
||||
30 files changed, 1756 insertions(+), 55 deletions(-)
|
||||
create mode 100644 redhat/.gitignore
|
||||
create mode 100644 redhat/Makefile
|
||||
create mode 100644 redhat/Makefile.common
|
||||
create mode 100644 redhat/cloud-init-tmpfiles.conf
|
||||
create mode 100644 redhat/cloud-init.spec.template
|
||||
create mode 100644 redhat/gating.yaml
|
||||
create mode 100644 redhat/rpmbuild/BUILD/.gitignore
|
||||
create mode 100644 redhat/rpmbuild/RPMS/.gitignore
|
||||
create mode 100644 redhat/rpmbuild/SOURCES/.gitignore
|
||||
create mode 100644 redhat/rpmbuild/SPECS/.gitignore
|
||||
create mode 100644 redhat/rpmbuild/SRPMS/.gitignore
|
||||
create mode 100755 redhat/scripts/frh.py
|
||||
create mode 100755 redhat/scripts/git-backport-diff
|
||||
create mode 100755 redhat/scripts/git-compile-check
|
||||
create mode 100755 redhat/scripts/process-patches.sh
|
||||
create mode 100755 redhat/scripts/tarball_checksum.sh
|
||||
create mode 100644 rhel/README.rhel
|
||||
create mode 100644 rhel/cloud-init-tmpfiles.conf
|
||||
create mode 100644 rhel/cloud.cfg
|
||||
create mode 100644 rhel/systemd/cloud-config.service
|
||||
create mode 100644 rhel/systemd/cloud-config.target
|
||||
create mode 100644 rhel/systemd/cloud-final.service
|
||||
create mode 100644 rhel/systemd/cloud-init-local.service
|
||||
create mode 100644 rhel/systemd/cloud-init.service
|
||||
create mode 100644 rhel/systemd/cloud-init.target
|
||||
|
||||
diff --git a/cloudinit/config/cc_chef.py b/cloudinit/config/cc_chef.py
|
||||
index fdb3a6e3..d028c548 100644
|
||||
--- a/cloudinit/config/cc_chef.py
|
||||
+++ b/cloudinit/config/cc_chef.py
|
||||
@@ -6,7 +6,70 @@
|
||||
#
|
||||
# This file is part of cloud-init. See LICENSE file for license information.
|
||||
|
||||
-"""Chef: module that configures, starts and installs chef."""
|
||||
+"""
|
||||
+Chef
|
||||
+----
|
||||
+**Summary:** module that configures, starts and installs chef.
|
||||
+
|
||||
+This module enables chef to be installed (from packages or
|
||||
+from gems, or from omnibus). Before this occurs chef configurations are
|
||||
+written to disk (validation.pem, client.pem, firstboot.json, client.rb),
|
||||
+and needed chef folders/directories are created (/etc/chef and /var/log/chef
|
||||
+and so-on). Then once installing proceeds correctly if configured chef will
|
||||
+be started (in daemon mode or in non-daemon mode) and then once that has
|
||||
+finished (if ran in non-daemon mode this will be when chef finishes
|
||||
+converging, if ran in daemon mode then no further actions are possible since
|
||||
+chef will have forked into its own process) then a post run function can
|
||||
+run that can do finishing activities (such as removing the validation pem
|
||||
+file).
|
||||
+
|
||||
+**Internal name:** ``cc_chef``
|
||||
+
|
||||
+**Module frequency:** per always
|
||||
+
|
||||
+**Supported distros:** all
|
||||
+
|
||||
+**Config keys**::
|
||||
+
|
||||
+ chef:
|
||||
+ directories: (defaulting to /etc/chef, /var/log/chef, /var/lib/chef,
|
||||
+ /var/cache/chef, /var/backups/chef, /run/chef)
|
||||
+ validation_cert: (optional string to be written to file validation_key)
|
||||
+ special value 'system' means set use existing file
|
||||
+ validation_key: (optional the path for validation_cert. default
|
||||
+ /etc/chef/validation.pem)
|
||||
+ firstboot_path: (path to write run_list and initial_attributes keys that
|
||||
+ should also be present in this configuration, defaults
|
||||
+ to /etc/chef/firstboot.json)
|
||||
+ exec: boolean to run or not run chef (defaults to false, unless
|
||||
+ a gem installed is requested
|
||||
+ where this will then default
|
||||
+ to true)
|
||||
+
|
||||
+ chef.rb template keys (if falsey, then will be skipped and not
|
||||
+ written to /etc/chef/client.rb)
|
||||
+
|
||||
+ chef:
|
||||
+ client_key:
|
||||
+ encrypted_data_bag_secret:
|
||||
+ environment:
|
||||
+ file_backup_path:
|
||||
+ file_cache_path:
|
||||
+ json_attribs:
|
||||
+ log_level:
|
||||
+ log_location:
|
||||
+ node_name:
|
||||
+ omnibus_url:
|
||||
+ omnibus_url_retries:
|
||||
+ omnibus_version:
|
||||
+ pid_file:
|
||||
+ server_url:
|
||||
+ show_time:
|
||||
+ ssl_verify_mode:
|
||||
+ validation_cert:
|
||||
+ validation_key:
|
||||
+ validation_name:
|
||||
+"""
|
||||
|
||||
import itertools
|
||||
import json
|
||||
diff --git a/cloudinit/settings.py b/cloudinit/settings.py
|
||||
index ecc1403b..39650a5b 100644
|
||||
--- a/cloudinit/settings.py
|
||||
+++ b/cloudinit/settings.py
|
||||
@@ -50,13 +50,16 @@ CFG_BUILTIN = {
|
||||
],
|
||||
"def_log_file": "/var/log/cloud-init.log",
|
||||
"log_cfgs": [],
|
||||
- "syslog_fix_perms": ["syslog:adm", "root:adm", "root:wheel", "root:root"],
|
||||
+ "mount_default_fields": [None, None, "auto", "defaults,nofail", "0", "2"],
|
||||
+ "ssh_deletekeys": False,
|
||||
+ "ssh_genkeytypes": [],
|
||||
+ "syslog_fix_perms": [],
|
||||
"system_info": {
|
||||
"paths": {
|
||||
"cloud_dir": "/var/lib/cloud",
|
||||
"templates_dir": "/etc/cloud/templates/",
|
||||
},
|
||||
- "distro": "ubuntu",
|
||||
+ "distro": "rhel",
|
||||
"network": {"renderers": None},
|
||||
},
|
||||
"vendor_data": {"enabled": True, "prefix": []},
|
||||
diff --git a/rhel/README.rhel b/rhel/README.rhel
|
||||
new file mode 100644
|
||||
index 00000000..aa29630d
|
||||
--- /dev/null
|
||||
+++ b/rhel/README.rhel
|
||||
@@ -0,0 +1,5 @@
|
||||
+The following cloud-init modules are currently unsupported on this OS:
|
||||
+ - apt_update_upgrade ('apt_update', 'apt_upgrade', 'apt_mirror', 'apt_preserve_sources_list', 'apt_old_mirror', 'apt_sources', 'debconf_selections', 'packages' options)
|
||||
+ - byobu ('byobu_by_default' option)
|
||||
+ - chef
|
||||
+ - grub_dpkg
|
||||
diff --git a/rhel/cloud-init-tmpfiles.conf b/rhel/cloud-init-tmpfiles.conf
|
||||
new file mode 100644
|
||||
index 00000000..0c6d2a3b
|
||||
--- /dev/null
|
||||
+++ b/rhel/cloud-init-tmpfiles.conf
|
||||
@@ -0,0 +1 @@
|
||||
+d /run/cloud-init 0700 root root - -
|
||||
diff --git a/rhel/cloud.cfg b/rhel/cloud.cfg
|
||||
new file mode 100644
|
||||
index 00000000..82e8bf62
|
||||
--- /dev/null
|
||||
+++ b/rhel/cloud.cfg
|
||||
@@ -0,0 +1,69 @@
|
||||
+users:
|
||||
+ - default
|
||||
+
|
||||
+disable_root: 1
|
||||
+ssh_pwauth: 0
|
||||
+
|
||||
+mount_default_fields: [~, ~, 'auto', 'defaults,nofail,x-systemd.requires=cloud-init.service', '0', '2']
|
||||
+resize_rootfs_tmp: /dev
|
||||
+ssh_deletekeys: 0
|
||||
+ssh_genkeytypes: ~
|
||||
+syslog_fix_perms: ~
|
||||
+disable_vmware_customization: false
|
||||
+
|
||||
+cloud_init_modules:
|
||||
+ - disk_setup
|
||||
+ - migrator
|
||||
+ - bootcmd
|
||||
+ - write-files
|
||||
+ - growpart
|
||||
+ - resizefs
|
||||
+ - set_hostname
|
||||
+ - update_hostname
|
||||
+ - update_etc_hosts
|
||||
+ - rsyslog
|
||||
+ - users-groups
|
||||
+ - ssh
|
||||
+
|
||||
+cloud_config_modules:
|
||||
+ - mounts
|
||||
+ - locale
|
||||
+ - set-passwords
|
||||
+ - rh_subscription
|
||||
+ - yum-add-repo
|
||||
+ - package-update-upgrade-install
|
||||
+ - timezone
|
||||
+ - puppet
|
||||
+ - chef
|
||||
+ - salt-minion
|
||||
+ - mcollective
|
||||
+ - disable-ec2-metadata
|
||||
+ - runcmd
|
||||
+
|
||||
+cloud_final_modules:
|
||||
+ - rightscale_userdata
|
||||
+ - scripts-per-once
|
||||
+ - scripts-per-boot
|
||||
+ - scripts-per-instance
|
||||
+ - scripts-user
|
||||
+ - ssh-authkey-fingerprints
|
||||
+ - keys-to-console
|
||||
+ - phone-home
|
||||
+ - final-message
|
||||
+ - power-state-change
|
||||
+
|
||||
+system_info:
|
||||
+ default_user:
|
||||
+ name: cloud-user
|
||||
+ lock_passwd: true
|
||||
+ gecos: Cloud User
|
||||
+ groups: [adm, systemd-journal]
|
||||
+ sudo: ["ALL=(ALL) NOPASSWD:ALL"]
|
||||
+ shell: /bin/bash
|
||||
+ distro: rhel
|
||||
+ paths:
|
||||
+ cloud_dir: /var/lib/cloud
|
||||
+ templates_dir: /etc/cloud/templates
|
||||
+ ssh_svcname: sshd
|
||||
+
|
||||
+# vim:syntax=yaml
|
||||
diff --git a/rhel/systemd/cloud-config.service b/rhel/systemd/cloud-config.service
|
||||
new file mode 100644
|
||||
index 00000000..f3dcd4be
|
||||
--- /dev/null
|
||||
+++ b/rhel/systemd/cloud-config.service
|
||||
@@ -0,0 +1,18 @@
|
||||
+[Unit]
|
||||
+Description=Apply the settings specified in cloud-config
|
||||
+After=network-online.target cloud-config.target
|
||||
+Wants=network-online.target cloud-config.target
|
||||
+ConditionPathExists=!/etc/cloud/cloud-init.disabled
|
||||
+ConditionKernelCommandLine=!cloud-init=disabled
|
||||
+
|
||||
+[Service]
|
||||
+Type=oneshot
|
||||
+ExecStart=/usr/bin/cloud-init modules --mode=config
|
||||
+RemainAfterExit=yes
|
||||
+TimeoutSec=0
|
||||
+
|
||||
+# Output needs to appear in instance console output
|
||||
+StandardOutput=journal+console
|
||||
+
|
||||
+[Install]
|
||||
+WantedBy=cloud-init.target
|
||||
diff --git a/rhel/systemd/cloud-config.target b/rhel/systemd/cloud-config.target
|
||||
new file mode 100644
|
||||
index 00000000..ae9b7d02
|
||||
--- /dev/null
|
||||
+++ b/rhel/systemd/cloud-config.target
|
||||
@@ -0,0 +1,11 @@
|
||||
+# cloud-init normally emits a "cloud-config" upstart event to inform third
|
||||
+# parties that cloud-config is available, which does us no good when we're
|
||||
+# using systemd. cloud-config.target serves as this synchronization point
|
||||
+# instead. Services that would "start on cloud-config" with upstart can
|
||||
+# instead use "After=cloud-config.target" and "Wants=cloud-config.target"
|
||||
+# as appropriate.
|
||||
+
|
||||
+[Unit]
|
||||
+Description=Cloud-config availability
|
||||
+Wants=cloud-init-local.service cloud-init.service
|
||||
+After=cloud-init-local.service cloud-init.service
|
||||
diff --git a/rhel/systemd/cloud-final.service b/rhel/systemd/cloud-final.service
|
||||
new file mode 100644
|
||||
index 00000000..e281c0cf
|
||||
--- /dev/null
|
||||
+++ b/rhel/systemd/cloud-final.service
|
||||
@@ -0,0 +1,24 @@
|
||||
+[Unit]
|
||||
+Description=Execute cloud user/final scripts
|
||||
+After=network-online.target cloud-config.service rc-local.service
|
||||
+Wants=network-online.target cloud-config.service
|
||||
+ConditionPathExists=!/etc/cloud/cloud-init.disabled
|
||||
+ConditionKernelCommandLine=!cloud-init=disabled
|
||||
+
|
||||
+[Service]
|
||||
+Type=oneshot
|
||||
+ExecStart=/usr/bin/cloud-init modules --mode=final
|
||||
+RemainAfterExit=yes
|
||||
+TimeoutSec=0
|
||||
+KillMode=process
|
||||
+# Restart NetworkManager if it is present and running.
|
||||
+ExecStartPost=/bin/sh -c 'u=NetworkManager.service; \
|
||||
+ out=$(systemctl show --property=SubState $u) || exit; \
|
||||
+ [ "$out" = "SubState=running" ] || exit 0; \
|
||||
+ systemctl reload-or-try-restart $u'
|
||||
+
|
||||
+# Output needs to appear in instance console output
|
||||
+StandardOutput=journal+console
|
||||
+
|
||||
+[Install]
|
||||
+WantedBy=cloud-init.target
|
||||
diff --git a/rhel/systemd/cloud-init-local.service b/rhel/systemd/cloud-init-local.service
|
||||
new file mode 100644
|
||||
index 00000000..8f9f6c9f
|
||||
--- /dev/null
|
||||
+++ b/rhel/systemd/cloud-init-local.service
|
||||
@@ -0,0 +1,31 @@
|
||||
+[Unit]
|
||||
+Description=Initial cloud-init job (pre-networking)
|
||||
+DefaultDependencies=no
|
||||
+Wants=network-pre.target
|
||||
+After=systemd-remount-fs.service
|
||||
+Requires=dbus.socket
|
||||
+After=dbus.socket
|
||||
+Before=NetworkManager.service network.service
|
||||
+Before=network-pre.target
|
||||
+Before=shutdown.target
|
||||
+Before=firewalld.target
|
||||
+Conflicts=shutdown.target
|
||||
+RequiresMountsFor=/var/lib/cloud
|
||||
+ConditionPathExists=!/etc/cloud/cloud-init.disabled
|
||||
+ConditionKernelCommandLine=!cloud-init=disabled
|
||||
+
|
||||
+[Service]
|
||||
+Type=oneshot
|
||||
+ExecStartPre=/bin/mkdir -p /run/cloud-init
|
||||
+ExecStartPre=/sbin/restorecon /run/cloud-init
|
||||
+ExecStartPre=/usr/bin/touch /run/cloud-init/enabled
|
||||
+ExecStart=/usr/bin/cloud-init init --local
|
||||
+ExecStart=/bin/touch /run/cloud-init/network-config-ready
|
||||
+RemainAfterExit=yes
|
||||
+TimeoutSec=0
|
||||
+
|
||||
+# Output needs to appear in instance console output
|
||||
+StandardOutput=journal+console
|
||||
+
|
||||
+[Install]
|
||||
+WantedBy=cloud-init.target
|
||||
diff --git a/rhel/systemd/cloud-init.service b/rhel/systemd/cloud-init.service
|
||||
new file mode 100644
|
||||
index 00000000..d0023a05
|
||||
--- /dev/null
|
||||
+++ b/rhel/systemd/cloud-init.service
|
||||
@@ -0,0 +1,25 @@
|
||||
+[Unit]
|
||||
+Description=Initial cloud-init job (metadata service crawler)
|
||||
+Wants=cloud-init-local.service
|
||||
+Wants=sshd-keygen.service
|
||||
+Wants=sshd.service
|
||||
+After=cloud-init-local.service
|
||||
+After=NetworkManager.service network.service
|
||||
+Before=network-online.target
|
||||
+Before=sshd-keygen.service
|
||||
+Before=sshd.service
|
||||
+Before=systemd-user-sessions.service
|
||||
+ConditionPathExists=!/etc/cloud/cloud-init.disabled
|
||||
+ConditionKernelCommandLine=!cloud-init=disabled
|
||||
+
|
||||
+[Service]
|
||||
+Type=oneshot
|
||||
+ExecStart=/usr/bin/cloud-init init
|
||||
+RemainAfterExit=yes
|
||||
+TimeoutSec=0
|
||||
+
|
||||
+# Output needs to appear in instance console output
|
||||
+StandardOutput=journal+console
|
||||
+
|
||||
+[Install]
|
||||
+WantedBy=cloud-init.target
|
||||
diff --git a/rhel/systemd/cloud-init.target b/rhel/systemd/cloud-init.target
|
||||
new file mode 100644
|
||||
index 00000000..083c3b6f
|
||||
--- /dev/null
|
||||
+++ b/rhel/systemd/cloud-init.target
|
||||
@@ -0,0 +1,7 @@
|
||||
+# cloud-init target is enabled by cloud-init-generator
|
||||
+# To disable it you can either:
|
||||
+# a.) boot with kernel cmdline of 'cloud-init=disabled'
|
||||
+# b.) touch a file /etc/cloud/cloud-init.disabled
|
||||
+[Unit]
|
||||
+Description=Cloud-init target
|
||||
+After=multi-user.target
|
||||
diff --git a/setup.py b/setup.py
|
||||
index a9132d2c..3c377eaa 100755
|
||||
--- a/setup.py
|
||||
+++ b/setup.py
|
||||
@@ -139,21 +139,6 @@ INITSYS_FILES = {
|
||||
"sysvinit_deb": [f for f in glob("sysvinit/debian/*") if is_f(f)],
|
||||
"sysvinit_openrc": [f for f in glob("sysvinit/gentoo/*") if is_f(f)],
|
||||
"sysvinit_suse": [f for f in glob("sysvinit/suse/*") if is_f(f)],
|
||||
- "systemd": [
|
||||
- render_tmpl(f)
|
||||
- for f in (
|
||||
- glob("systemd/*.tmpl")
|
||||
- + glob("systemd/*.service")
|
||||
- + glob("systemd/*.socket")
|
||||
- + glob("systemd/*.target")
|
||||
- )
|
||||
- if (is_f(f) and not is_generator(f))
|
||||
- ],
|
||||
- "systemd.generators": [
|
||||
- render_tmpl(f, mode=0o755)
|
||||
- for f in glob("systemd/*")
|
||||
- if is_f(f) and is_generator(f)
|
||||
- ],
|
||||
"upstart": [f for f in glob("upstart/*") if is_f(f)],
|
||||
}
|
||||
INITSYS_ROOTS = {
|
||||
@@ -163,10 +148,6 @@ INITSYS_ROOTS = {
|
||||
"sysvinit_deb": "etc/init.d",
|
||||
"sysvinit_openrc": "etc/init.d",
|
||||
"sysvinit_suse": "etc/init.d",
|
||||
- "systemd": pkg_config_read("systemd", "systemdsystemunitdir"),
|
||||
- "systemd.generators": pkg_config_read(
|
||||
- "systemd", "systemdsystemgeneratordir"
|
||||
- ),
|
||||
"upstart": "etc/init/",
|
||||
}
|
||||
INITSYS_TYPES = sorted([f.partition(".")[0] for f in INITSYS_ROOTS.keys()])
|
||||
@@ -281,15 +262,13 @@ data_files = [
|
||||
(
|
||||
USR_LIB_EXEC + "/cloud-init",
|
||||
[
|
||||
- "tools/ds-identify",
|
||||
"tools/hook-hotplug",
|
||||
"tools/uncloud-init",
|
||||
"tools/write-ssh-key-fingerprints",
|
||||
],
|
||||
),
|
||||
(
|
||||
- USR + "/share/bash-completion/completions",
|
||||
- ["bash_completion/cloud-init"],
|
||||
+ ETC + "/bash_completion.d", ["bash_completion/cloud-init"],
|
||||
),
|
||||
(USR + "/share/doc/cloud-init", [f for f in glob("doc/*") if is_f(f)]),
|
||||
(
|
||||
@@ -308,8 +287,7 @@ if not platform.system().endswith("BSD"):
|
||||
ETC + "/NetworkManager/dispatcher.d/",
|
||||
["tools/hook-network-manager"],
|
||||
),
|
||||
- (ETC + "/dhcp/dhclient-exit-hooks.d/", ["tools/hook-dhclient"]),
|
||||
- (LIB + "/udev/rules.d", [f for f in glob("udev/*.rules")]),
|
||||
+ ("/usr/lib/udev/rules.d", [f for f in glob("udev/*.rules")]),
|
||||
(
|
||||
ETC + "/systemd/system/sshd-keygen@.service.d/",
|
||||
["systemd/disable-sshd-keygen-if-cloud-init-active.conf"],
|
||||
@@ -339,8 +317,6 @@ setuptools.setup(
|
||||
scripts=["tools/cloud-init-per"],
|
||||
license="Dual-licensed under GPLv3 or Apache 2.0",
|
||||
data_files=data_files,
|
||||
- install_requires=requirements,
|
||||
- cmdclass=cmdclass,
|
||||
entry_points={
|
||||
"console_scripts": [
|
||||
"cloud-init = cloudinit.cmd.main:main",
|
||||
diff --git a/tools/read-version b/tools/read-version
|
||||
index 02c90643..79755f78 100755
|
||||
--- a/tools/read-version
|
||||
+++ b/tools/read-version
|
||||
@@ -71,32 +71,8 @@ version_long = None
|
||||
is_release_branch_ci = (
|
||||
os.environ.get("TRAVIS_PULL_REQUEST_BRANCH", "").startswith("upstream/")
|
||||
)
|
||||
-if is_gitdir(_tdir) and which("git") and not is_release_branch_ci:
|
||||
- flags = []
|
||||
- if use_tags:
|
||||
- flags = ['--tags']
|
||||
- cmd = ['git', 'describe', '--abbrev=8', '--match=[0-9]*'] + flags
|
||||
-
|
||||
- try:
|
||||
- version = tiny_p(cmd).strip()
|
||||
- except RuntimeError:
|
||||
- version = None
|
||||
-
|
||||
- if version is None or not version.startswith(src_version):
|
||||
- sys.stderr.write("git describe version (%s) differs from "
|
||||
- "cloudinit.version (%s)\n" % (version, src_version))
|
||||
- sys.stderr.write(
|
||||
- "Please get the latest upstream tags.\n"
|
||||
- "As an example, this can be done with the following:\n"
|
||||
- "$ git remote add upstream https://git.launchpad.net/cloud-init\n"
|
||||
- "$ git fetch upstream --tags\n"
|
||||
- )
|
||||
- sys.exit(1)
|
||||
-
|
||||
- version_long = tiny_p(cmd + ["--long"]).strip()
|
||||
-else:
|
||||
- version = src_version
|
||||
- version_long = None
|
||||
+version = src_version
|
||||
+version_long = None
|
||||
|
||||
# version is X.Y.Z[+xxx.gHASH]
|
||||
# version_long is None or X.Y.Z-xxx-gHASH
|
||||
--
|
||||
2.31.1
|
||||
|
@ -0,0 +1,618 @@
|
||||
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 @@
|
||||
"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"],
|
||||
+ },
|
||||
+ "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"],
|
||||
+ },
|
||||
"rhel": {
|
||||
"ca_cert_path": "/usr/share/pki/ca-trust-source/",
|
||||
"ca_cert_filename": "anchors/cloud-init-ca-certs.crt",
|
||||
@@ -43,7 +57,7 @@
|
||||
ca-certificates package is installed but not if the
|
||||
ca-certificates-bundle package is installed.
|
||||
"""
|
||||
-distros = ["alpine", "debian", "ubuntu", "rhel"]
|
||||
+distros = ["almalinux", "alpine", "cloudlinux", "debian", "ubuntu", "rhel"]
|
||||
|
||||
meta: MetaSchema = {
|
||||
"id": "cc_ca_certs",
|
||||
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 @@
|
||||
|
||||
# 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",
|
||||
@@ -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 @@
|
||||
'cloud_dir': '/var/lib/cloud',
|
||||
'templates_dir': '/etc/cloud/templates/',
|
||||
},
|
||||
- 'distro': 'rhel',
|
||||
+ 'distro': 'almalinux',
|
||||
'network': {'renderers': None},
|
||||
},
|
||||
"vendor_data": {"enabled": True, "prefix": []},
|
||||
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 @@
|
||||
|
||||
def gratuitous_arp(items, distro):
|
||||
source_param = "-S"
|
||||
- if distro.name in ["fedora", "centos", "rhel"]:
|
||||
+ if distro.name in ["almalinux", "fedora", "centos", "cloudlinux", "rhel"]:
|
||||
source_param = "-s"
|
||||
for item in items:
|
||||
try:
|
||||
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
|
||||
@@ -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"] %}
|
||||
+{% set is_rhel = variant in ["rhel", "centos", "almalinux", "cloudlinux"] %}
|
||||
{% if is_bsd %}
|
||||
syslog_fix_perms: root:wheel
|
||||
{% elif variant in ["suse"] %}
|
||||
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
|
||||
@@ -1,4 +1,18 @@
|
||||
{
|
||||
+ "almalinux" : {
|
||||
+ "build-requires" : [
|
||||
+ "python3-devel"
|
||||
+ ],
|
||||
+ "requires" : [
|
||||
+ "e2fsprogs",
|
||||
+ "iproute",
|
||||
+ "net-tools",
|
||||
+ "procps",
|
||||
+ "rsyslog",
|
||||
+ "shadow-utils",
|
||||
+ "sudo"
|
||||
+ ]
|
||||
+ },
|
||||
"debian" : {
|
||||
"build-requires" : [
|
||||
"debhelper",
|
||||
@@ -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 @@
|
||||
After=network-online.target cloud-config.target
|
||||
After=snapd.seeded.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 -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 @@
|
||||
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 @@
|
||||
RemainAfterExit=yes
|
||||
TimeoutSec=0
|
||||
KillMode=process
|
||||
-{% if variant == "rhel" %}
|
||||
+{% if variant in ["almalinux", "cloudlinux", "rhel"] %}
|
||||
# Restart NetworkManager if it is present and running.
|
||||
ExecStartPost=/bin/sh -c 'u=NetworkManager.service; \
|
||||
out=$(systemctl show --property=SubState $u) || exit; \
|
||||
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
|
||||
@@ -1,23 +1,23 @@
|
||||
## template:jinja
|
||||
[Unit]
|
||||
Description=Initial cloud-init job (pre-networking)
|
||||
-{% if variant in ["ubuntu", "unknown", "debian", "rhel" ] %}
|
||||
+{% if variant in ["almalinux", "cloudlinux", "ubuntu", "unknown", "debian", "rhel" ] %}
|
||||
DefaultDependencies=no
|
||||
{% endif %}
|
||||
Wants=network-pre.target
|
||||
After=hv_kvp_daemon.service
|
||||
After=systemd-remount-fs.service
|
||||
-{% if variant == "rhel" %}
|
||||
+{% if variant in ["almalinux", "cloudlinux", "rhel"] %}
|
||||
Requires=dbus.socket
|
||||
After=dbus.socket
|
||||
{% endif %}
|
||||
Before=NetworkManager.service
|
||||
-{% if variant == "rhel" %}
|
||||
+{% if variant in ["almalinux", "cloudlinux", "rhel"] %}
|
||||
Before=network.service
|
||||
{% endif %}
|
||||
Before=network-pre.target
|
||||
Before=shutdown.target
|
||||
-{% if variant == "rhel" %}
|
||||
+{% if variant in ["almalinux", "cloudlinux", "rhel"] %}
|
||||
Before=firewalld.target
|
||||
Conflicts=shutdown.target
|
||||
{% endif %}
|
||||
@@ -26,14 +26,14 @@
|
||||
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 %}
|
||||
|
||||
[Service]
|
||||
Type=oneshot
|
||||
-{% if variant == "rhel" %}
|
||||
+{% if variant in ["almalinux", "cloudlinux", "rhel"] %}
|
||||
ExecStartPre=/bin/mkdir -p /run/cloud-init
|
||||
ExecStartPre=/sbin/restorecon /run/cloud-init
|
||||
ExecStartPre=/usr/bin/touch /run/cloud-init/enabled
|
||||
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
|
||||
@@ -1,7 +1,7 @@
|
||||
## template:jinja
|
||||
[Unit]
|
||||
Description=Initial cloud-init job (metadata service crawler)
|
||||
-{% if variant not in ["photon", "rhel"] %}
|
||||
+{% if variant not in ["almalinux", "cloudlinux", "photon", "rhel"] %}
|
||||
DefaultDependencies=no
|
||||
{% endif %}
|
||||
Wants=cloud-init-local.service
|
||||
@@ -37,7 +37,7 @@
|
||||
Conflicts=shutdown.target
|
||||
{% endif %}
|
||||
Before=systemd-user-sessions.service
|
||||
-{% if variant == "rhel" %}
|
||||
+{% if variant in ["almalinux", "cloudlinux", "rhel"] %}
|
||||
ConditionPathExists=!/etc/cloud/cloud-init.disabled
|
||||
ConditionKernelCommandLine=!cloud-init=disabled
|
||||
{% endif %}
|
||||
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
|
||||
@@ -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/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
|
||||
@@ -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/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 @@
|
||||
def test_sysconfig_available_uses_variant_mapping(self, m_info, m_avail):
|
||||
m_avail.return_value = True
|
||||
variants = [
|
||||
+ "almalinux",
|
||||
"suse",
|
||||
"centos",
|
||||
+ "cloudlinux",
|
||||
"eurolinux",
|
||||
"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 @@
|
||||
|
||||
# TODO(Look to align with tools.render-cloudcfg or cloudinit.distos.OSFAMILIES)
|
||||
DISTRO_VARIANTS = [
|
||||
+ "almalinux",
|
||||
"amazon",
|
||||
"arch",
|
||||
"centos",
|
||||
+ "cloudlinux",
|
||||
"debian",
|
||||
"eurolinux",
|
||||
"fedora",
|
||||
@@ -66,7 +68,9 @@
|
||||
system_cfg = util.load_yaml(stream.read())
|
||||
|
||||
default_user_exceptions = {
|
||||
+ "almalinux": "almalinux",
|
||||
"amazon": "ec2-user",
|
||||
+ "cloudlinux": "cloudlinux",
|
||||
"debian": "ubuntu",
|
||||
"rhel": "cloud-user",
|
||||
"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 @@
|
||||
|
||||
# Map the appropriate package dir needed for each distro choice
|
||||
DISTRO_PKG_TYPE_MAP = {
|
||||
+ 'almalinux': 'redhat',
|
||||
'centos': 'redhat',
|
||||
+ 'cloudlinux': 'redhat',
|
||||
'eurolinux': 'redhat',
|
||||
'miraclelinux': 'redhat',
|
||||
'rocky': 'redhat',
|
||||
@@ -68,14 +70,18 @@
|
||||
'--auto-agree-with-licenses']
|
||||
|
||||
DRY_DISTRO_INSTALL_PKG_CMD = {
|
||||
+ 'almalinux': ['yum', 'install', '--assumeyes'],
|
||||
'rocky': ['yum', 'install', '--assumeyes'],
|
||||
'centos': ['yum', 'install', '--assumeyes'],
|
||||
+ 'cloudlinux': ['yum', 'install', '--assumeyes'],
|
||||
'eurolinux': ['yum', 'install', '--assumeyes'],
|
||||
'miraclelinux': ['yum', 'install', '--assumeyes'],
|
||||
'redhat': ['yum', 'install', '--assumeyes'],
|
||||
}
|
||||
|
||||
DISTRO_INSTALL_PKG_CMD = {
|
||||
+ 'almalinux': MAYBE_RELIABLE_YUM_INSTALL,
|
||||
+ 'cloudlinux': MAYBE_RELIABLE_YUM_INSTALL,
|
||||
'rocky': MAYBE_RELIABLE_YUM_INSTALL,
|
||||
'eurolinux': MAYBE_RELIABLE_YUM_INSTALL,
|
||||
'miraclelinux': MAYBE_RELIABLE_YUM_INSTALL,
|
||||
@@ -90,6 +96,8 @@
|
||||
|
||||
# List of base system packages required to enable ci automation
|
||||
CI_SYSTEM_BASE_PKGS = {
|
||||
+ 'almalinux': ['python3-tox'],
|
||||
+ 'cloudlinux': ['python3-tox'],
|
||||
'common': ['make', 'sudo', 'tar'],
|
||||
'eurolinux': ['python3-tox'],
|
||||
'miraclelinux': ['python3-tox'],
|
||||
@@ -285,10 +293,10 @@
|
||||
cmd = DRY_DISTRO_INSTALL_PKG_CMD[distro]
|
||||
install_cmd.extend(cmd)
|
||||
|
||||
- if distro in ['centos', 'redhat', 'rocky', 'eurolinux']:
|
||||
+ if distro in ['almalinux', 'cloudlinux', 'centos', 'redhat', 'rocky', 'eurolinux']:
|
||||
# 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']:
|
||||
+ if distro in ['almalinux', 'cloudlinux', 'suse', 'opensuse', 'redhat', 'rocky', 'centos', 'eurolinux']:
|
||||
pkg_list.append('rpm-build')
|
||||
subprocess.check_call(install_cmd + pkg_list)
|
||||
|
||||
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 @@
|
||||
}
|
||||
local t=${gitdir%/*}
|
||||
case "$t" in
|
||||
- */worktrees)
|
||||
+ */worktrees)
|
||||
if [ -f "${t%worktrees}/config" ]; then
|
||||
gitdir="${t%worktrees}"
|
||||
fi
|
||||
@@ -191,7 +191,7 @@
|
||||
|
||||
get_os_info() {
|
||||
# run inside container, set OS_NAME, OS_VERSION
|
||||
- # example OS_NAME are centos, debian, opensuse, rockylinux
|
||||
+ # example OS_NAME are almalinux, centos, cloudlinux, debian, opensuse, rockylinux
|
||||
[ -n "${OS_NAME:-}" -a -n "${OS_VERSION:-}" ] && return 0
|
||||
if [ -f /etc/os-release ]; then
|
||||
OS_NAME=$(sh -c '. /etc/os-release; echo $ID')
|
||||
@@ -247,7 +247,7 @@
|
||||
install_packages() {
|
||||
get_os_info || return
|
||||
case "$OS_NAME" in
|
||||
- centos|rocky*) yum_install "$@";;
|
||||
+ almalinux|centos|cloudlinux|rocky*) yum_install "$@";;
|
||||
opensuse) zypper_install "$@";;
|
||||
debian|ubuntu) apt_install "$@";;
|
||||
*) error "Do not know how to install packages on ${OS_NAME}";
|
||||
@@ -486,16 +486,16 @@
|
||||
|
||||
local build_pkg="" build_srcpkg="" pkg_ext="" distflag=""
|
||||
case "$OS_NAME" in
|
||||
- centos|rocky) distflag="--distro=redhat";;
|
||||
+ almalinux|centos|cloudlinux|rocky) distflag="--distro=redhat";;
|
||||
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)
|
||||
+ almalinux|centos|cloudlinux|opensuse|rocky)
|
||||
build_pkg="./packages/brpm $distflag"
|
||||
build_srcpkg="./packages/brpm $distflag --srpm"
|
||||
pkg_ext=".rpm";;
|
@ -0,0 +1,42 @@
|
||||
From c589da20eb92231ef08e10c9724e3e6c663e6ce2 Mon Sep 17 00:00:00 2001
|
||||
From: Eduardo Otubo <otubo@redhat.com>
|
||||
Date: Thu, 17 Feb 2022 15:32:35 +0100
|
||||
Subject: [PATCH] Setting highest autoconnect priority for network-scripts
|
||||
|
||||
RH-Author: Eduardo Otubo <otubo@redhat.com>
|
||||
RH-MergeRequest: 22: Setting highest autoconnect priority for network-scripts
|
||||
RH-Commit: [1/1] 34f1d62f8934a983a124df95b861a1e448681d3b (otubo/cloud-init-src)
|
||||
RH-Bugzilla: 2036060
|
||||
RH-Acked-by: Miroslav Rezanina <mrezanin@redhat.com>
|
||||
RH-Acked-by: Emanuele Giuseppe Esposito <eesposit@redhat.com>
|
||||
|
||||
Set the highest autoconnect priority for network-scripts which is
|
||||
loaded by NetworkManager ifcfg-rh plugin. Note that keyfile is the only
|
||||
and default existing plugin on RHEL9, by setting the highest autoconnect
|
||||
priority for network-scripts, NetworkManager will activate
|
||||
network-scripts but keyfile. Network-scripts path:
|
||||
|
||||
Since this is a blocking issue, we decided to have this one-liner
|
||||
downstream-only patch so we can move forward and have a better
|
||||
NetworkManager support later on the release.
|
||||
|
||||
rhbz: 2036060
|
||||
x-downstream-only: yes
|
||||
|
||||
Signed-off-by: Eduardo Otubo <otubo@redhat.com>
|
||||
---
|
||||
cloudinit/net/sysconfig.py | 1 +
|
||||
1 file changed, 1 insertion(+)
|
||||
|
||||
diff --git a/cloudinit/net/sysconfig.py b/cloudinit/net/sysconfig.py
|
||||
index a7dbe55b..4262cd48 100644
|
||||
--- a/cloudinit/net/sysconfig.py
|
||||
+++ b/cloudinit/net/sysconfig.py
|
||||
@@ -317,6 +317,7 @@ class Renderer(renderer.Renderer):
|
||||
"ONBOOT": True,
|
||||
"USERCTL": False,
|
||||
"BOOTPROTO": "none",
|
||||
+ "AUTOCONNECT_PRIORITY": 999
|
||||
},
|
||||
"suse": {"BOOTPROTO": "static", "STARTMODE": "auto"},
|
||||
}
|
@ -1,52 +0,0 @@
|
||||
From ffa647e83efd4293bd027e9e390274aad8a12d94 Mon Sep 17 00:00:00 2001
|
||||
From: Eduardo Otubo <otubo@redhat.com>
|
||||
Date: Fri, 7 May 2021 13:36:13 +0200
|
||||
Subject: include 'NOZEROCONF=yes' in /etc/sysconfig/network
|
||||
|
||||
RH-Author: Eduardo Otubo <otubo@redhat.com>
|
||||