From 9a536fa5063d9810336d2cc29b0af6dc909c7bee Mon Sep 17 00:00:00 2001 From: Louis Abel <tucklesepk@gmail.com> Date: Tue, 25 Apr 2023 18:10:17 -0700 Subject: [PATCH] update for 23.1.1 --- ROCKY/CFG/cloud-init.cfg | 6 +- ...cloud-user-is-applied-to-Rocky-Linux.patch | 25 ++++ ROCKY/_supporting/22.4-backport.patch | 13 -- ROCKY/_supporting/backports.patch | 119 ------------------ ROCKY/_supporting/future-backport.patch | 13 -- 5 files changed, 28 insertions(+), 148 deletions(-) create mode 100644 ROCKY/_supporting/0001-Ensure-cloud-user-is-applied-to-Rocky-Linux.patch delete mode 100644 ROCKY/_supporting/22.4-backport.patch delete mode 100644 ROCKY/_supporting/backports.patch delete mode 100644 ROCKY/_supporting/future-backport.patch diff --git a/ROCKY/CFG/cloud-init.cfg b/ROCKY/CFG/cloud-init.cfg index 59c51f6..4fa4432 100644 --- a/ROCKY/CFG/cloud-init.cfg +++ b/ROCKY/CFG/cloud-init.cfg @@ -1,16 +1,16 @@ add { - file: "ROCKY/_supporting/future-backport.patch" + file: "ROCKY/_supporting/0001-Ensure-cloud-user-is-applied-to-Rocky-Linux.patch" } spec_change { file { - name: "future-backport.patch" + name: "0001-Ensure-cloud-user-is-applied-to-Rocky-Linux.patch" type: Patch add: true } append { field: "Release" - value: ".0.2" + value: ".0.1" } changelog { author_name: "Release Engineering" diff --git a/ROCKY/_supporting/0001-Ensure-cloud-user-is-applied-to-Rocky-Linux.patch b/ROCKY/_supporting/0001-Ensure-cloud-user-is-applied-to-Rocky-Linux.patch new file mode 100644 index 0000000..140f33d --- /dev/null +++ b/ROCKY/_supporting/0001-Ensure-cloud-user-is-applied-to-Rocky-Linux.patch @@ -0,0 +1,25 @@ +From 0bd79b358111cc897b508131916dbc3035bcf280 Mon Sep 17 00:00:00 2001 +From: Louis Abel <label@rockylinux.org> +Date: Tue, 25 Apr 2023 18:08:54 -0700 +Subject: [PATCH] Ensure cloud-user is applied to Rocky Linux + +--- + config/cloud.cfg.tmpl | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/config/cloud.cfg.tmpl b/config/cloud.cfg.tmpl +index 12f32c5..c712aa4 100644 +--- a/config/cloud.cfg.tmpl ++++ b/config/cloud.cfg.tmpl +@@ -262,7 +262,7 @@ system_info: + name: ec2-user + lock_passwd: True + gecos: EC2 Default User +-{% elif variant in ["rhel", "centos"] %} ++{% elif variant in ["rhel", "centos", "rocky"] %} + name: cloud-user + lock_passwd: true + gecos: Cloud User +-- +2.40.0 + diff --git a/ROCKY/_supporting/22.4-backport.patch b/ROCKY/_supporting/22.4-backport.patch deleted file mode 100644 index 30486d6..0000000 --- a/ROCKY/_supporting/22.4-backport.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff --git a/config/cloud.cfg.tmpl b/config/cloud.cfg.tmpl -index fdd5a357..e3641a4f 100644 ---- a/config/cloud.cfg.tmpl -+++ b/config/cloud.cfg.tmpl -@@ -260,7 +260,7 @@ system_info: - name: ec2-user - lock_passwd: True - gecos: EC2 Default User --{% elif variant in ["rhel", "centos"] %} -+{% elif variant in ["rhel", "centos", "rocky"] %} - name: cloud-user - lock_passwd: true - gecos: Cloud User diff --git a/ROCKY/_supporting/backports.patch b/ROCKY/_supporting/backports.patch deleted file mode 100644 index 4958f5d..0000000 --- a/ROCKY/_supporting/backports.patch +++ /dev/null @@ -1,119 +0,0 @@ -From cd54584819d62a0c6ee1c7085c425fd930604f9a Mon Sep 17 00:00:00 2001 -From: Louis Abel <label@firemonitor.angelsofclockwork.net> -Date: Tue, 29 Nov 2022 11:25:06 -0700 -Subject: [PATCH] fix is_rhel temporarily - ---- - config/cloud.cfg.tmpl | 27 +++++++++++++------------ - tests/unittests/test_render_cloudcfg.py | 1 + - 2 files changed, 15 insertions(+), 13 deletions(-) - -diff --git a/config/cloud.cfg.tmpl b/config/cloud.cfg.tmpl -index 80ab4f9..08b6efb 100644 ---- a/config/cloud.cfg.tmpl -+++ b/config/cloud.cfg.tmpl -@@ -2,6 +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", "rocky"] %} - {% if is_bsd %} - syslog_fix_perms: root:wheel - {% elif variant in ["suse"] %} -@@ -32,9 +33,9 @@ disable_root: false - disable_root: true - {% endif %} - --{% if variant in ["almalinux", "alpine", "amazon", "centos", "cloudlinux", "eurolinux", -- "fedora", "miraclelinux", "openEuler", "rhel", "rocky", "virtuozzo"] %} --{% if variant == "rhel" %} -+{% if variant in ["almalinux", "alpine", "amazon", "cloudlinux", "eurolinux", -+ "fedora", "miraclelinux", "openEuler", "openmandriva", "rocky", "virtuozzo"] or is_rhel %} -+{% if is_rhel %} - mount_default_fields: [~, ~, 'auto', 'defaults,nofail,x-systemd.requires=cloud-init.service,_netdev', '0', '2'] - {% else %} - mount_default_fields: [~, ~, 'auto', 'defaults,nofail', '0', '2'] -@@ -70,7 +71,7 @@ network: - config: disabled - {% endif %} - --{% if variant == "rhel" %} -+{% if is_rhel %} - # Default redhat settings: - ssh_deletekeys: true - ssh_genkeytypes: ['rsa', 'ecdsa', 'ed25519'] -@@ -119,16 +120,16 @@ cloud_config_modules: - {% endif %} - {% if variant not in ["photon"] %} - - ssh-import-id --{% if variant not in ["rhel"] %} -+{% if not is_rhel %} - - keyboard - {% endif %} - - locale - {% endif %} - - set-passwords --{% if variant in ["rhel"] %} -+{% if is_rhel %} - - rh_subscription - {% endif %} --{% if variant in ["rhel", "fedora", "photon"] %} -+{% if variant in ["fedora", "openmandriva", "photon"] or is_rhel %} - {% if variant not in ["photon"] %} - - spacewalk - {% endif %} -@@ -193,9 +194,9 @@ cloud_final_modules: - # (not accessible to handlers/transforms) - system_info: - # This will affect which distro class gets used --{% if variant in ["almalinux", "alpine", "amazon", "arch", "centos", "cloudlinux", "debian", -+{% if variant in ["almalinux", "alpine", "amazon", "arch", "cloudlinux", "debian", - "eurolinux", "fedora", "freebsd", "gentoo", "netbsd", "miraclelinux", "openbsd", "openEuler", -- "photon", "rhel", "rocky", "suse", "ubuntu", "virtuozzo"] %} -+ "openmandriva", "photon", "rocky", "suse", "ubuntu", "virtuozzo"] or is_rhel %} - distro: {{ variant }} - {% elif variant in ["dragonfly"] %} - distro: dragonflybsd -@@ -248,15 +249,15 @@ system_info: - primary: http://ports.ubuntu.com/ubuntu-ports - security: http://ports.ubuntu.com/ubuntu-ports - ssh_svcname: ssh --{% elif variant in ["almalinux", "alpine", "amazon", "arch", "centos", "cloudlinux", "eurolinux", -- "fedora", "gentoo", "miraclelinux", "openEuler", "rhel", "rocky", "suse", "virtuozzo"] %} -+{% elif variant in ["almalinux", "alpine", "amazon", "arch", "cloudlinux", "eurolinux", -+ "fedora", "gentoo", "miraclelinux", "openEuler", "openmandriva", "rocky", "suse", "virtuozzo"] or is_rhel %} - # Default user name + that default users groups (if added/used) - default_user: - {% if variant == "amazon" %} - name: ec2-user - lock_passwd: True - gecos: EC2 Default User --{% elif variant == "rhel" %} -+{% elif is_rhel %} - name: cloud-user - lock_passwd: true - gecos: Cloud User -@@ -275,7 +276,7 @@ system_info: - groups: [adm, sudo] - {% elif variant == "arch" %} - groups: [wheel, users] --{% elif variant == "rhel" %} -+{% elif is_rhel %} - groups: [adm, systemd-journal] - {% else %} - groups: [wheel, adm, systemd-journal] -diff --git a/tests/unittests/test_render_cloudcfg.py b/tests/unittests/test_render_cloudcfg.py -index 9f95d44..1a6e271 100644 ---- a/tests/unittests/test_render_cloudcfg.py -+++ b/tests/unittests/test_render_cloudcfg.py -@@ -69,6 +69,7 @@ class TestRenderCloudCfg: - "amazon": "ec2-user", - "debian": "ubuntu", - "rhel": "cloud-user", -+ "centos": "cloud-user", - "unknown": "ubuntu", - } - default_user = system_cfg["system_info"]["default_user"]["name"] --- -2.31.1 - diff --git a/ROCKY/_supporting/future-backport.patch b/ROCKY/_supporting/future-backport.patch deleted file mode 100644 index 2d8939b..0000000 --- a/ROCKY/_supporting/future-backport.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff --git a/config/cloud.cfg.tmpl b/config/cloud.cfg.tmpl -index 08b6efb..ed82d8d 100644 ---- a/config/cloud.cfg.tmpl -+++ b/config/cloud.cfg.tmpl -@@ -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", "rocky"] %} - {% if is_bsd %} - syslog_fix_perms: root:wheel - {% elif variant in ["suse"] %} -- GitLab