From cfea8015c2a81a2f8fdf9cbcc4d8714a30370108 Mon Sep 17 00:00:00 2001 From: Tom Parker Date: Thu, 20 May 2021 18:49:05 -0400 Subject: [PATCH 1/5] Added support for AlmaLinux 8 --- data/os/RedHat/AlmaLinux.yaml | 125 ++++++++++++++++++++++++++++++++++ metadata.json | 6 ++ spec/classes/init_spec.rb | 40 +++++++++++ 3 files changed, 171 insertions(+) create mode 100644 data/os/RedHat/AlmaLinux.yaml diff --git a/data/os/RedHat/AlmaLinux.yaml b/data/os/RedHat/AlmaLinux.yaml new file mode 100644 index 00000000..123cd277 --- /dev/null +++ b/data/os/RedHat/AlmaLinux.yaml @@ -0,0 +1,125 @@ +--- +yum::os_default_repos: + - 'baseos' + - 'appstream' + - 'powertools' + - 'extras' + - 'baseos-source' + - 'appstream-source' + - 'powertools-source' + - 'extras-source' + - 'baseos-debuginfo' + - 'appstream-debuginfo' + - 'powertools-debuginfo' + - 'extras-debuginfo' + +yum::repos: + baseos: + enabled: true + descr: 'AlmaLinux-$releasever - BaseOS' + mirrorlist: 'https://mirrors.almalinux.org/mirrorlist/$releasever/baseos' + # baseurl: https://repo.almalinux.org/almalinux/$releasever/BaseOS/$basearch/os/ + gpgcheck: true + gpgkey: 'file:///etc/pki/rpm-gpg/RPM-GPG-KEY-AlmaLinux' + target: '/etc/yum.repos.d/almalinux.repo' + fastestmirror: true + + appstream: + enabled: true + descr: 'AlmaLinux $releasever - AppStream' + mirrorlist: 'https://mirrors.almalinux.org/mirrorlist/$releasever/appstream' + # baseurl: https://repo.almalinux.org/almalinux/$releasever/AppStream/$basearch/os/ + gpgcheck: true + gpgkey: "file:///etc/pki/rpm-gpg/RPM-GPG-KEY-AlmaLinux" + target: '/etc/yum.repos.d/almalinux.repo' + fastestmirror: true + + powertools: + descr: 'AlmaLinux $releasever - PowerTools' + mirrorlist: 'https://mirrors.almalinux.org/mirrorlist/$releasever/powertools' + # baseurl: https://repo.almalinux.org/almalinux/$releasever/PowerTools/$basearch/os/ + enabled: true + gpgcheck: true + gpgkey: 'file:///etc/pki/rpm-gpg/RPM-GPG-KEY-AlmaLinux' + fastestmirror: true + + extras: + name: 'AlmaLinux $releasever - Extras' + mirrorlist: 'https://mirrors.almalinux.org/mirrorlist/$releasever/extras' + # baseurl: https://repo.almalinux.org/almalinux/$releasever/extras/$basearch/os/ + enabled: true + gpgcheck: true + gpgkey: 'file:///etc/pki/rpm-gpg/RPM-GPG-KEY-AlmaLinux' + fastestmirror: true + + baseos-source: + name: 'AlmaLinux $releasever - BaseOS Source' + mirrorlist: 'https://mirrors.almalinux.org/mirrorlist/$releasever/baseos-source' + # baseurl: https://repo.almalinux.org/almalinux/$releasever/BaseOS/Source/ + enabled: false + gpgcheck: true + gpgkey: 'file:///etc/pki/rpm-gpg/RPM-GPG-KEY-AlmaLinux' + fastestmirror: true + + appstream-source: + name: 'AlmaLinux $releasever - AppStream Source' + mirrorlist: 'https://mirrors.almalinux.org/mirrorlist/$releasever/appstream-source' + # baseurl: https://repo.almalinux.org/almalinux/$releasever/AppStream/Source/ + enabled: false + gpgcheck: true + gpgkey: 'file:///etc/pki/rpm-gpg/RPM-GPG-KEY-AlmaLinux' + fastestmirror: true + + powertools-source: + name: 'AlmaLinux $releasever - PowerTools Source' + mirrorlist: 'https://mirrors.almalinux.org/mirrorlist/$releasever/powertools-source' + # baseurl: https://repo.almalinux.org/almalinux/$releasever/PowerTools/Source/ + enabled: false + gpgcheck: true + gpgkey: 'file:///etc/pki/rpm-gpg/RPM-GPG-KEY-AlmaLinux' + fastestmirror: true + + extras-source: + name: 'AlmaLinux $releasever - Extras Source' + mirrorlist: 'https://mirrors.almalinux.org/mirrorlist/$releasever/extras-source' + # baseurl: https://repo.almalinux.org/almalinux/$releasever/extras/Source/ + enabled: false + gpgcheck: true + gpgkey: 'file:///etc/pki/rpm-gpg/RPM-GPG-KEY-AlmaLinux' + fastestmirror: true + + baseos-debuginfo: + name: 'AlmaLinux $releasever - BaseOS debuginfo' + mirrorlist: 'https://mirrors.almalinux.org/mirrorlist/$releasever/baseos-debuginfo' + # baseurl: https://repo.almalinux.org/almalinux/$releasever/BaseOS/debug/$basearch/ + enabled: false + gpgcheck: true + gpgkey: 'file:///etc/pki/rpm-gpg/RPM-GPG-KEY-AlmaLinux' + fastestmirror: true + + appstream-debuginfo: + name: 'AlmaLinux $releasever - AppStream debuginfo' + mirrorlist: 'https://mirrors.almalinux.org/mirrorlist/$releasever/appstream-debuginfo' + # baseurl: https://repo.almalinux.org/almalinux/$releasever/AppStream/debug/$basearch/ + enabled: false + gpgcheck: true + gpgkey: 'file:///etc/pki/rpm-gpg/RPM-GPG-KEY-AlmaLinux' + fastestmirror: true + + powertools-debuginfo: + name: 'AlmaLinux $releasever - PowerTools debuginfo' + mirrorlist: 'https://mirrors.almalinux.org/mirrorlist/$releasever/powertools-debuginfo' + # baseurl: https://repo.almalinux.org/almalinux/$releasever/PowerTools/debug/$basearch/ + enabled: false + gpgcheck: true + gpgkey: 'file:///etc/pki/rpm-gpg/RPM-GPG-KEY-AlmaLinux' + fastestmirror: true + + extras-debuginfo: + name: 'AlmaLinux $releasever - Extras debuginfo' + mirrorlist: 'https://mirrors.almalinux.org/mirrorlist/$releasever/extras-debuginfo' + # baseurl: https://repo.almalinux.org/almalinux/$releasever/extras/debug/$basearch/ + enabled: false + gpgcheck: true + gpgkey: 'file:///etc/pki/rpm-gpg/RPM-GPG-KEY-AlmaLinux' + fastestmirror: true diff --git a/metadata.json b/metadata.json index c0bca61e..7e015c3e 100644 --- a/metadata.json +++ b/metadata.json @@ -70,6 +70,12 @@ "operatingsystemrelease": [ "2017" ] + }, + { + "operatingsystem": "AlmaLinux", + "operatingsystemrelease": [ + "8" + ] } ], "requirements": [ diff --git a/spec/classes/init_spec.rb b/spec/classes/init_spec.rb index bf61704e..13ebe647 100644 --- a/spec/classes/init_spec.rb +++ b/spec/classes/init_spec.rb @@ -165,6 +165,27 @@ 'virtuozzolinux-vz-factory-debuginfo' ] end + when 'AlmaLinux' + case facts[:os]['release']['major'] + when '8' + it { is_expected.to have_yumrepo_resource_count(12) } + it_behaves_like 'a catalog containing repos', [ + 'baseos', + 'appstream', + 'powertools', + 'extras', + 'baseos-source', + 'appstream-source', + 'powertools-source', + 'extras-source', + 'baseos-debuginfo', + 'appstream-debuginfo', + 'powertools-debuginfo', + 'extras-debuginfo', + ] + end + else + it { is_expected.to have_yumrepo_resource_count(0) } end context 'and the CentOS base repo is negated' do @@ -264,6 +285,25 @@ 'virtuozzolinux-vz-factory-debuginfo' ] end + when 'AlmaLinux' + case facts[:os]['release']['major'] + when '8' + it { is_expected.to have_yumrepo_resource_count(12) } # rubocop:disable RSpec/RepeatedExample + it_behaves_like 'a catalog containing repos', [ + 'baseos', + 'appstream', + 'powertools', + 'extras', + 'baseos-source', + 'appstream-source', + 'powertools-source', + 'extras-source', + 'baseos-debuginfo', + 'appstream-debuginfo', + 'powertools-debuginfo', + 'extras-debuginfo', + ] + end else it { is_expected.to have_yumrepo_resource_count(0) } end From 099b779603d5e5aa94e5cb38c7dc092fba4ed889 Mon Sep 17 00:00:00 2001 From: sycosyth Date: Mon, 14 Jun 2021 13:18:23 -0400 Subject: [PATCH 2/5] Add Fedora Support Add support for fedora 33/34 --- metadata.json | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/metadata.json b/metadata.json index 78f8c806..cd76f9f4 100644 --- a/metadata.json +++ b/metadata.json @@ -76,6 +76,13 @@ "operatingsystemrelease": [ "8" ] + }, + { + "operatingsystem": "Fedora", + "operatingsystemrelease": [ + "33", + "34" + ] } ], "requirements": [ From bd4acbf2967639fddf6a030910fdade821f739e5 Mon Sep 17 00:00:00 2001 From: Matt Mercier Date: Mon, 6 Dec 2021 13:01:37 -0500 Subject: [PATCH 3/5] Added support for Fedora in metadata, Fedora yaml already existed --- metadata.json | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/metadata.json b/metadata.json index cd76f9f4..9623b35f 100644 --- a/metadata.json +++ b/metadata.json @@ -78,11 +78,7 @@ ] }, { - "operatingsystem": "Fedora", - "operatingsystemrelease": [ - "33", - "34" - ] + "operatingsystem": "Fedora" } ], "requirements": [ From a0f3916875c473421341825c0c582cecf6ba56a8 Mon Sep 17 00:00:00 2001 From: Matt Mercier Date: Fri, 24 Mar 2023 16:20:06 -0400 Subject: [PATCH 4/5] Nobara support --- metadata.json | 3 +++ 1 file changed, 3 insertions(+) diff --git a/metadata.json b/metadata.json index 63bc55da..ae3b8444 100644 --- a/metadata.json +++ b/metadata.json @@ -79,6 +79,9 @@ }, { "operatingsystem": "Fedora" + }, + { + "operatingsystem": "Nobara" } ], "requirements": [ From 1e88f6969e295a904e7ae70a0d1fd2814bf0cf58 Mon Sep 17 00:00:00 2001 From: Matt Mulroney Date: Thu, 7 Nov 2024 21:36:58 -0500 Subject: [PATCH 5/5] DNF5 removed group$verb, replacing with group $verb. this also works on el7 --- manifests/group.pp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/manifests/group.pp b/manifests/group.pp index 18113f75..2a393383 100644 --- a/manifests/group.pp +++ b/manifests/group.pp @@ -31,14 +31,14 @@ case $ensure { 'present', 'installed', default: { exec { "yum-groupinstall-${name}": - command => join(concat(["yum -y groupinstall '${name}'"], $install_options), ' '), - unless => "yum grouplist hidden '${name}' | egrep -i '^Installed.+Groups:$'", + command => join(concat(["yum -y group install '${name}'"], $install_options), ' '), + unless => "yum group list hidden '${name}' | egrep -i '^Installed.+Groups:$'", timeout => $timeout, } if $ensure == 'latest' { exec { "yum-groupinstall-${name}-latest": - command => join(concat(["yum -y groupinstall '${name}'"], $install_options), ' '), - onlyif => "yum groupinfo '${name}' | egrep '\\s+\\+'", + command => join(concat(["yum -y group install '${name}'"], $install_options), ' '), + onlyif => "yum group info '${name}' | egrep '\\s+\\+'", timeout => $timeout, require => Exec["yum-groupinstall-${name}"], } @@ -47,8 +47,8 @@ 'absent', 'purged': { exec { "yum-groupremove-${name}": - command => "yum -y groupremove '${name}'", - onlyif => "yum grouplist hidden '${name}' | egrep -i '^Installed.+Groups:$'", + command => "yum -y group remove '${name}'", + onlyif => "yum group list hidden '${name}' | egrep -i '^Installed.+Groups:$'", timeout => $timeout, } }