From d1c53d00116011180e16f9132a2114b919501b87 Mon Sep 17 00:00:00 2001 From: Yury Bushmelev Date: Thu, 12 Dec 2024 15:53:40 +0800 Subject: [PATCH 1/4] Drop unsupported OSes * Amazon 2017 * CentOS 7/8 * Fedora 36/37/38 * RedHat 7 * Scientific 7/8 * VirtuozzoLinux 7 --- metadata.json | 25 ------------------------- 1 file changed, 25 deletions(-) diff --git a/metadata.json b/metadata.json index 9a6de65..23904d7 100644 --- a/metadata.json +++ b/metadata.json @@ -32,26 +32,15 @@ "9" ] }, - { - "operatingsystem": "Amazon", - "operatingsystemrelease": [ - "2017" - ] - }, { "operatingsystem": "CentOS", "operatingsystemrelease": [ - "7", - "8", "9" ] }, { "operatingsystem": "Fedora", "operatingsystemrelease": [ - "36", - "37", - "38", "40" ] }, @@ -65,7 +54,6 @@ { "operatingsystem": "RedHat", "operatingsystemrelease": [ - "7", "8", "9" ] @@ -76,19 +64,6 @@ "8", "9" ] - }, - { - "operatingsystem": "Scientific", - "operatingsystemrelease": [ - "7", - "8" - ] - }, - { - "operatingsystem": "VirtuozzoLinux", - "operatingsystemrelease": [ - "7" - ] } ], "requirements": [ From ded727b9ec9adafed839ff230cecd94ec9b466ba Mon Sep 17 00:00:00 2001 From: Yury Bushmelev Date: Thu, 12 Dec 2024 18:07:52 +0800 Subject: [PATCH 2/4] Drop support for RHEL < 6 --- manifests/plugin.pp | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/manifests/plugin.pp b/manifests/plugin.pp index 67c11ec..7bd2392 100644 --- a/manifests/plugin.pp +++ b/manifests/plugin.pp @@ -16,14 +16,7 @@ Optional[String] $pkg_prefix = undef, Optional[String] $pkg_name = undef, ) { - if $pkg_prefix { - $_pkg_prefix = $pkg_prefix - } else { - $_pkg_prefix = $facts['os']['release']['major'] ? { - Variant[Integer[5,5], Enum['5']] => 'yum', - default => 'yum-plugin', - } - } + $_pkg_prefix = $pkg_prefix.lest || { 'yum-plugin' } $_pkg_name = $pkg_name ? { Variant[Enum[''], Undef] => "${_pkg_prefix}-${name}", From 40b2ef1daa23e0cd258523fe42eec845cde8c7ce Mon Sep 17 00:00:00 2001 From: Yury Bushmelev Date: Thu, 12 Dec 2024 18:26:30 +0800 Subject: [PATCH 3/4] Drop unsupported OS Hiera files --- data/os/RedHat/Amazon.yaml | 210 --------------------------- data/os/RedHat/CentOS/7.yaml | 102 ------------- data/os/RedHat/CentOS/8.yaml | 160 -------------------- data/os/RedHat/VirtuozzoLinux/7.yaml | 162 --------------------- 4 files changed, 634 deletions(-) delete mode 100644 data/os/RedHat/Amazon.yaml delete mode 100644 data/os/RedHat/CentOS/7.yaml delete mode 100644 data/os/RedHat/CentOS/8.yaml delete mode 100644 data/os/RedHat/VirtuozzoLinux/7.yaml diff --git a/data/os/RedHat/Amazon.yaml b/data/os/RedHat/Amazon.yaml deleted file mode 100644 index 9d1ecc3..0000000 --- a/data/os/RedHat/Amazon.yaml +++ /dev/null @@ -1,210 +0,0 @@ -# Amazon Linux default repos ---- -yum::os_default_repos: - - 'amzn-main' - - 'amzn-main-debuginfo' - - 'amzn-main-source' - - 'amzn-nosrc' - - 'amzn-preview' - - 'amzn-preview-debuginfo' - - 'amzn-preview-source' - - 'amzn-updates' - - 'amzn-updates-debuginfo' - - 'amzn-updates-source' - - 'epel' - - 'epel-debuginfo' - - 'epel-source' - - 'epel-testing' - - 'epel-testing-debuginfo' - - 'epel-testing-source' - -# Upstream repo parameters "fastestmirror_enabled" and "report_instanceid" -# not defined for Amazon Linux default repos as Puppet does not currently -# support them. For more details, see: -# https://tickets.puppetlabs.com/browse/PUP-8730 -# https://tickets.puppetlabs.com/browse/PUP-8904 -yum::repos: - amzn-main: - descr: "amzn-main-Base" - mirrorlist: "http://repo.$awsregion.$awsdomain/$releasever/main/mirror.list" - mirrorlist_expire: 300 - metadata_expire: 300 - priority: 10 - failovermethod: "priority" - gpgcheck: true - gpgkey: "file:///etc/pki/rpm-gpg/RPM-GPG-KEY-amazon-ga" - enabled: true - retries: 3 - timeout: 5 - target: "/etc/yum.repos.d/amzn-main.repo" - amzn-main-debuginfo: - descr: "amzn-main-debuginfo" - mirrorlist: "http://repo.$awsregion.$awsdomain/$releasever/main/debuginfo/mirror.list" - mirrorlist_expire: 300 - metadata_expire: 300 - priority: 10 - failovermethod: "priority" - gpgcheck: true - gpgkey: "file:///etc/pki/rpm-gpg/RPM-GPG-KEY-amazon-ga" - enabled: false - retries: 3 - timeout: 5 - target: "/etc/yum.repos.d/amzn-main.repo" - amzn-main-source: - descr: "amzn-main-source" - mirrorlist: "http://repo.$awsregion.$awsdomain/$releasever/main/SRPMS/mirror.list" - mirrorlist_expire: 300 - metadata_expire: 300 - priority: 10 - failovermethod: "priority" - gpgcheck: true - gpgkey: "file:///etc/pki/rpm-gpg/RPM-GPG-KEY-amazon-ga" - enabled: false - retries: 3 - timeout: 5 - target: "/etc/yum.repos.d/amzn-main.repo" - amzn-nosrc: - descr: "amzn-nosrc-Base" - mirrorlist: "http://repo.$awsregion.$awsdomain/$releasever/nosrc/mirror.list" - mirrorlist_expire: 300 - metadata_expire: 300 - priority: 10 - failovermethod: "priority" - gpgcheck: false - gpgkey: "file:///etc/pki/rpm-gpg/RPM-GPG-KEY-amazon-ga" - enabled: false - retries: 3 - timeout: 5 - target: "/etc/yum.repos.d/amzn-nosrc.repo" - amzn-preview: - descr: "amzn-preview-Base" - mirrorlist: "http://repo.$awsregion.$awsdomain/$releasever/preview/mirror.list" - mirrorlist_expire: 300 - metadata_expire: 300 - priority: 10 - failovermethod: "priority" - gpgcheck: true - gpgkey: "file:///etc/pki/rpm-gpg/RPM-GPG-KEY-amazon-ga" - enabled: false - retries: 3 - timeout: 5 - target: "/etc/yum.repos.d/amzn-preview.repo" - amzn-preview-debuginfo: - descr: "amzn-preview-debuginfo" - mirrorlist: "http://repo.$awsregion.$awsdomain/$releasever/preview/debuginfo/mirror.list" - mirrorlist_expire: 300 - metadata_expire: 300 - priority: 10 - failovermethod: "priority" - gpgcheck: true - gpgkey: "file:///etc/pki/rpm-gpg/RPM-GPG-KEY-amazon-ga" - enabled: false - retries: 3 - timeout: 5 - target: "/etc/yum.repos.d/amzn-preview.repo" - amzn-preview-source: - descr: "amzn-preview-source" - mirrorlist: "http://repo.$awsregion.$awsdomain/$releasever/preview/SRPMS/mirror.list" - mirrorlist_expire: 300 - metadata_expire: 300 - priority: 10 - failovermethod: "priority" - gpgcheck: true - gpgkey: "file:///etc/pki/rpm-gpg/RPM-GPG-KEY-amazon-ga" - enabled: false - retries: 3 - timeout: 5 - target: "/etc/yum.repos.d/amzn-preview.repo" - amzn-updates: - descr: "amzn-updates-Base" - mirrorlist: "http://repo.$awsregion.$awsdomain/$releasever/updates/mirror.list" - mirrorlist_expire: 300 - metadata_expire: 300 - priority: 10 - failovermethod: "priority" - gpgcheck: true - gpgkey: "file:///etc/pki/rpm-gpg/RPM-GPG-KEY-amazon-ga" - enabled: true - retries: 3 - timeout: 5 - target: "/etc/yum.repos.d/amzn-updates.repo" - amzn-updates-debuginfo: - descr: "amzn-updates-debuginfo" - mirrorlist: "http://repo.$awsregion.$awsdomain/$releasever/updates/debuginfo/mirror.list" - mirrorlist_expire: 300 - metadata_expire: 300 - priority: 10 - failovermethod: "priority" - gpgcheck: true - gpgkey: "file:///etc/pki/rpm-gpg/RPM-GPG-KEY-amazon-ga" - enabled: false - retries: 3 - timeout: 5 - target: "/etc/yum.repos.d/amzn-updates.repo" - amzn-updates-source: - descr: "amzn-updates-source" - mirrorlist: "http://repo.$awsregion.$awsdomain/$releasever/updates/SRPMS/mirror.list" - mirrorlist_expire: 300 - metadata_expire: 300 - priority: 10 - failovermethod: "priority" - gpgcheck: true - gpgkey: "file:///etc/pki/rpm-gpg/RPM-GPG-KEY-amazon-ga" - enabled: false - retries: 3 - timeout: 5 - target: "/etc/yum.repos.d/amzn-updates.repo" - epel: - descr: "Extra Packages for Enterprise Linux 6 - $basearch" - #baseurl: "http://download.fedoraproject.org/pub/epel/6/$basearch" - mirrorlist: "https://mirrors.fedoraproject.org/metalink?repo=epel-6&arch=$basearch" - failovermethod: "priority" - enabled: false - gpgcheck: true - gpgkey: "file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-6" - target: "/etc/yum.repos.d/epel.repo" - epel-debuginfo: - descr: "Extra Packages for Enterprise Linux 6 - $basearch - Debug" - #baseurl: "http://download.fedoraproject.org/pub/epel/6/$basearch/debug" - mirrorlist: "https://mirrors.fedoraproject.org/metalink?repo=epel-debug-6&arch=$basearch" - failovermethod: "priority" - enabled: false - gpgkey: "file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-6" - gpgcheck: true - target: "/etc/yum.repos.d/epel.repo" - epel-source: - descr: "Extra Packages for Enterprise Linux 6 - $basearch - Source" - #baseurl: "http://download.fedoraproject.org/pub/epel/6/SRPMS" - mirrorlist: "https://mirrors.fedoraproject.org/metalink?repo=epel-source-6&arch=$basearch" - failovermethod: "priority" - enabled: false - gpgkey: "file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-6" - gpgcheck: true - target: "/etc/yum.repos.d/epel.repo" - epel-testing: - descr: "Extra Packages for Enterprise Linux 6 - Testing - $basearch" - #baseurl: "http://download.fedoraproject.org/pub/epel/testing/6/$basearch" - mirrorlist: "https://mirrors.fedoraproject.org/metalink?repo=testing-epel6&arch=$basearch" - failovermethod: "priority" - enabled: false - gpgcheck: true - gpgkey: "file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-6" - target: "/etc/yum.repos.d/epel-testing.repo" - epel-testing-debuginfo: - descr: "Extra Packages for Enterprise Linux 6 - Testing - $basearch - Debug" - #baseurl: "http://download.fedoraproject.org/pub/epel/testing/6/$basearch/debug" - mirrorlist: "https://mirrors.fedoraproject.org/metalink?repo=testing-debug-epel6&arch=$basearch" - failovermethod: "priority" - enabled: false - gpgkey: "file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-6" - gpgcheck: true - target: "/etc/yum.repos.d/epel-testing.repo" - epel-testing-source: - descr: "Extra Packages for Enterprise Linux 6 - Testing - $basearch - Source" - #baseurl: "http://download.fedoraproject.org/pub/epel/testing/6/SRPMS" - mirrorlist: "https://mirrors.fedoraproject.org/metalink?repo=testing-source-epel6&arch=$basearch" - failovermethod: "priority" - enabled: false - gpgkey: "file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-6" - gpgcheck: true - target: "/etc/yum.repos.d/epel-testing.repo" diff --git a/data/os/RedHat/CentOS/7.yaml b/data/os/RedHat/CentOS/7.yaml deleted file mode 100644 index 62a5590..0000000 --- a/data/os/RedHat/CentOS/7.yaml +++ /dev/null @@ -1,102 +0,0 @@ ---- -yum::os_default_repos: - - 'base' - - 'updates' - - 'cr' - - 'base-source' - - 'updates-source' - - 'centos-media' - - 'fasttrack' - - 'extras-source' - - 'base-debuginfo' - - 'extras' - - 'centosplus' - -yum::repos: - base: - enabled: true - descr: 'CentOS-$releasever - Base' - mirrorlist: 'http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=os&infra=$infra' - gpgcheck: true - gpgkey: "file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7" - target: '/etc/yum.repos.d/CentOS-Base.repo' - - updates: - enabled: true - descr: 'CentOS-$releasever - Updates' - mirrorlist: 'http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=updates&infra=$infra' - gpgcheck: true - gpgkey: "file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7" - target: '/etc/yum.repos.d/CentOS-Base.repo' - - cr: - enabled: false - descr: 'CentOS-$releasever - cr' - baseurl: 'http://mirror.centos.org/centos/$releasever/cr/$basearch/' - gpgcheck: true - gpgkey: "file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7" - target: '/etc/yum.repos.d/CentOS-CR.repo' - - base-source: - enabled: false - descr: 'CentOS-$releasever - Base Sources' - baseurl: 'http://vault.centos.org/centos/$releasever/os/Source/' - gpgcheck: true - gpgkey: "file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7" - target: '/etc/yum.repos.d/CentOS-Sources.repo' - - updates-source: - enabled: false - descr: 'CentOS-$releasever - Updates Sources' - baseurl: 'http://vault.centos.org/centos/$releasever/updates/Source/' - gpgcheck: true - gpgkey: "file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7" - target: '/etc/yum.repos.d/CentOS-Sources.repo' - - centos-media: - enabled: false - descr: 'CentOS-$releasever - Media' - baseurl: 'file:///media/CentOS/ file:///media/cdrom/ file:///media/cdrecorder/' - gpgcheck: true - gpgkey: "file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7" - target: '/etc/yum.repos.d/CentOS-Media.repo' - - extras: - enabled: false - descr: 'CentOS-$releasever - Extras' - mirrorlist: 'http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=extras&infra=$infra' - gpgcheck: true - gpgkey: "file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-%{facts.os.release.major}" - target: '/etc/yum.repos.d/CentOS-Base.repo' - - fasttrack: - enabled: false - descr: 'CentOS-$releasever - fasttrack' - mirrorlist: 'http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=fasttrack&infra=$infra' - gpgcheck: true - gpgkey: "file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-%{facts.os.release.major}" - target: '/etc/yum.repos.d/CentOS-fasttrack.repo' - - extras-source: - enabled: false - descr: 'CentOS-$releasever - Extras Sources' - baseurl: 'http://vault.centos.org/centos/$releasever/extras/Source/' - gpgcheck: true - gpgkey: "file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-%{facts.os.release.major}" - target: '/etc/yum.repos.d/CentOS-Sources.repo' - - base-debuginfo: - enabled: false - descr: 'CentOS-$releasever - Debuginfo' - baseurl: 'http://debuginfo.centos.org/$releasever/$basearch/' - gpgcheck: true - gpgkey: "file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-Debug-%{facts.os.release.major}" - target: '/etc/yum.repos.d/CentOS-Debuginfo.repo' - - centosplus: - enabled: false - descr: 'CentOS-$releasever - Plus' - mirrorlist: 'http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=centosplus&infra=$infra' - gpgcheck: true - gpgkey: "file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-%{facts.os.release.major}" - target: '/etc/yum.repos.d/CentOS-Base.repo' diff --git a/data/os/RedHat/CentOS/8.yaml b/data/os/RedHat/CentOS/8.yaml deleted file mode 100644 index 52e12db..0000000 --- a/data/os/RedHat/CentOS/8.yaml +++ /dev/null @@ -1,160 +0,0 @@ -yum::os_default_repos: - - 'AppStream' - - 'BaseOS' - - 'cr' - - 'Devel' - - 'HA' - - 'PowerTools' - - 'BaseOS-source' - - 'Appstream-source' - - 'c8-media-BaseOS' - - 'c8-media-AppStream' - - 'extras' - - 'fasttrack' - - 'extras-source' - - 'base-debuginfo' - - 'centosplus' - -yum::repos: - AppStream: - enabled: true - descr: 'CentOS-$releasever - AppStream' - baseurl: 'https://vault.centos.org/$contentdir/$releasever/AppStream/$basearch/os/' - mirrorlist: absent - gpgcheck: true - gpgkey: "file:///etc/pki/rpm-gpg/RPM-GPG-KEY-centosofficial" - target: '/etc/yum.repos.d/CentOS-Linux-AppStream.repo' - - BaseOS: - enabled: true - descr: 'CentOS-$releasever - Base' - baseurl: 'https://vault.centos.org/$contentdir/$releasever/BaseOS/$basearch/os/' - mirrorlist: absent - gpgcheck: true - gpgkey: "file:///etc/pki/rpm-gpg/RPM-GPG-KEY-centosofficial" - target: '/etc/yum.repos.d/CentOS-Linux-BaseOS.repo' - - cr: - enabled: false - descr: 'CentOS-$releasever - cr' - baseurl: 'https://vault.centos.org/$contentdir/$releasever/cr/$basearch/os/' - mirrorlist: absent - gpgcheck: true - gpgkey: "file:///etc/pki/rpm-gpg/RPM-GPG-KEY-centosofficial" - target: '/etc/yum.repos.d/CentOS-Linux-ContinuousRelease.repo' - - Devel: - enabled: false - descr: 'CentOS-$releasever - Devel WARNING! FOR BUILDROOT USE ONLY!' - baseurl: 'https://vault.centos.org/$contentdir/$releasever/Devel/$basearch/os/' - mirrorlist: absent - gpgcheck: true - gpgkey: "file:///etc/pki/rpm-gpg/RPM-GPG-KEY-centosofficial" - target: '/etc/yum.repos.d/CentOS-Linux-Devel.repo' - - HA: - enabled: false - descr: 'CentOS-$releasever - HA' - baseurl: 'https://vault.centos.org/$contentdir/$releasever/HighAvailability/$basearch/os/' - mirrorlist: absent - gpgcheck: true - gpgkey: "file:///etc/pki/rpm-gpg/RPM-GPG-KEY-centosofficial" - target: '/etc/yum.repos.d/CentOS-Linux-HighAvailability.repo' - - extras: - enabled: true - descr: 'CentOS-$releasever - Extras' - baseurl: 'https://vault.centos.org/$contentdir/$releasever/extras/$basearch/os/' - mirrorlist: absent - gpgcheck: true - gpgkey: "file:///etc/pki/rpm-gpg/RPM-GPG-KEY-centosofficial" - target: '/etc/yum.repos.d/CentOS-Linux-Extras.repo' - - PowerTools: - enabled: false - descr: 'CentOS-$releasever - PowerTools' - baseurl: 'https://vault.centos.org/$contentdir/$releasever/PowerTools/$basearch/os/' - mirrorlist: absent - gpgcheck: true - gpgkey: "file:///etc/pki/rpm-gpg/RPM-GPG-KEY-centosofficial" - target: '/etc/yum.repos.d/CentOS-Linux-PowerTools.repo' - - BaseOS-source: - enabled: false - descr: 'CentOS-$releasever - BaseOS Sources' - baseurl: 'https://vault.centos.org/$contentdir/$releasever/BaseOS/Source/' - gpgcheck: true - gpgkey: 'file:///etc/pki/rpm-gpg/RPM-GPG-KEY-centosofficial' - target: '/etc/yum.repos.d/CentOS-Linux-Sources.repo' - - Appstream-source: - enabled: false - descr: 'CentOS-$releasever - Appstream Sources' - baseurl: 'https://vault.centos.org/$contentdir/$releasever/Appstream/Source/' - gpgcheck: true - gpgkey: 'file:///etc/pki/rpm-gpg/RPM-GPG-KEY-centosofficial' - target: '/etc/yum.repos.d/CentOS-Linux-Sources.repo' - - centosplus-source: - enabled: false - descr: 'CentOS-$releasever - Plus Sources' - baseurl: 'https://vault.centos.org/$contentdir/$releasever/centosplus/Source/' - gpgcheck: true - gpgkey: 'file:///etc/pki/rpm-gpg/RPM-GPG-KEY-centosofficial' - target: '/etc/yum.repos.d/CentOS-Linux-Sources.repo' - - c8-media-BaseOS: - enabled: false - descr: 'CentOS-BaseOS-$releasever - Media' - baseurl: "file:///media/CentOS/BaseOS\n file:///media/cdrom/BaseOS\n file:///media/cdrecorder/BaseOS" - gpgcheck: true - gpgkey: "file:///etc/pki/rpm-gpg/RPM-GPG-KEY-centosofficial" - target: '/etc/yum.repos.d/CentOS-Media.repo' - - c8-media-AppStream: - enabled: false - descr: 'CentOS-AppStream-$releasever - Media' - baseurl: "file:///media/CentOS/AppStream\n file:///media/cdrom/AppStream\n file:///media/cdrecorder/AppStream" - gpgcheck: true - gpgkey: "file:///etc/pki/rpm-gpg/RPM-GPG-KEY-centosofficial" - target: '/etc/yum.repos.d/CentOS-Media.repo' - - extras: - enabled: false - descr: 'CentOS-$releasever - Extras' - mirrorlist: 'http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=extras&infra=$infra' - gpgcheck: true - gpgkey: "file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-%{facts.os.release.major}" - target: '/etc/yum.repos.d/CentOS-Base.repo' - - fasttrack: - enabled: false - descr: 'CentOS-$releasever - fasttrack' - mirrorlist: 'http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=fasttrack&infra=$infra' - gpgcheck: true - gpgkey: "file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-%{facts.os.release.major}" - target: '/etc/yum.repos.d/CentOS-fasttrack.repo' - - extras-source: - enabled: false - descr: 'CentOS-$releasever - Extras Sources' - baseurl: 'http://vault.centos.org/centos/$releasever/extras/Source/' - gpgcheck: true - gpgkey: "file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-%{facts.os.release.major}" - target: '/etc/yum.repos.d/CentOS-Sources.repo' - - base-debuginfo: - enabled: false - descr: 'CentOS-$releasever - Debuginfo' - baseurl: 'http://debuginfo.centos.org/$releasever/$basearch/' - gpgcheck: true - gpgkey: "file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-Debug-%{facts.os.release.major}" - target: '/etc/yum.repos.d/CentOS-Debuginfo.repo' - - centosplus: - enabled: false - descr: 'CentOS-$releasever - Plus' - mirrorlist: 'http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=centosplus&infra=$infra' - gpgcheck: true - gpgkey: "file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-%{facts.os.release.major}" - target: '/etc/yum.repos.d/CentOS-Base.repo' diff --git a/data/os/RedHat/VirtuozzoLinux/7.yaml b/data/os/RedHat/VirtuozzoLinux/7.yaml deleted file mode 100644 index 18a60c7..0000000 --- a/data/os/RedHat/VirtuozzoLinux/7.yaml +++ /dev/null @@ -1,162 +0,0 @@ -# VirtuozzoLinux 7 default repos ---- -# original comment regarding -factory repositories: -# -# These -factory repositories are for internal use by developers only -# Enable them on your own risk!!! -# -yum::os_default_repos: - - 'virtuozzolinux-base' - - 'virtuozzolinux-updates' - - 'virtuozzolinux-base-debuginfo' - - 'virtuozzolinux-updates-debuginfo' - - 'virtuozzolinux-factory' - - 'virtuozzolinux-factory-debuginfo' - - 'virtuozzo-os' - - 'virtuozzo-updates' - - 'virtuozzo-os-debuginfo' - - 'virtuozzo-updates-debuginfo' - - 'virtuozzo-readykernel' - - 'obsoleted_tmpls' - - 'factory' - - 'factory-debuginfo' - - 'virtuozzolinux-vz-factory' - - 'virtuozzolinux-vz-factory-debuginfo' - -yum::repos: - virtuozzolinux-base: - descr: "VirtuozzoLinux Base" - mirrorlist: "http://repo.virtuozzo.com/vzlinux/mirrorlist/mirrors-7-os" - #baseurl: "http://repo.virtuozzo.com/vzlinux/7/$basearch/os/" - enabled: true - gpgcheck: true - priority: "90" - gpgkey: "file:///etc/pki/rpm-gpg/RPM-GPG-KEY-Virtuozzo-7" - target: "/etc/yum.repos.d/virtuozzolinux-base.repo" - virtuozzolinux-updates: - descr: "VirtuozzoLinux Updates" - mirrorlist: "http://repo.virtuozzo.com/vzlinux/mirrorlist/mirrors-7-updates" - #baseurl: "http://repo.virtuozzo.com/vzlinux/7/$basearch/updates/" - enabled: true - gpgcheck: true - priority: "90" - gpgkey: "file:///etc/pki/rpm-gpg/RPM-GPG-KEY-Virtuozzo-7" - target: "/etc/yum.repos.d/virtuozzolinux-updates.repo" - virtuozzolinux-base-debuginfo: - descr: "VirtuozzoLinux Base debug packages" - mirrorlist: "http://repo.virtuozzo.com/vzlinux/mirrorlist/mirrors-7-os-debug" - #baseurl: "http://repo.virtuozzo.com/vzlinux/7/$basearch/debug/" - enabled: false - gpgcheck: true - gpgkey: "file:///etc/pki/rpm-gpg/RPM-GPG-KEY-Virtuozzo-7" - target: "/etc/yum.repos.d/virtuozzolinux-base-debuginfo.repo" - virtuozzolinux-updates-debuginfo: - descr: "VirtuozzoLinux Updates debug packages" - mirrorlist: "http://repo.virtuozzo.com/vzlinux/mirrorlist/mirrors-7-updates-debug" - #baseurl: "http://repo.virtuozzo.com/vzlinux/7/$basearch/updates-debug/" - enabled: false - gpgcheck: true - gpgkey: "file:///etc/pki/rpm-gpg/RPM-GPG-KEY-Virtuozzo-7" - target: "/etc/yum.repos.d/virtuozzolinux-updates-debuginfo.repo" - virtuozzolinux-factory: - descr: "VirtuozzoLinux Factory" - mirrorlist: "http://repo.virtuozzo.com/vzlinux/mirrorlist/mirrors-7-factory" - #baseurl: "http://repo.virtuozzo.com/vzlinux/7/$basearch/factory/" - priority: "90" - enabled: false - gpgcheck: false - target: "/etc/yum.repos.d/virtuozzolinux-factory.repo" - virtuozzolinux-factory-debuginfo: - descr: "VirtuozzoLinux Factory debug packages" - mirrorlist: "http://repo.virtuozzo.com/vzlinux/mirrorlist/mirrors-7-factory-debug" - #baseurl: "http://repo.virtuozzo.com/vzlinux/7/$basearch/factory-debug/" - priority: "90" - enabled: false - gpgcheck: false - target: "/etc/yum.repos.d/virtuozzolinux-factory-debuginfo.repo" - virtuozzo-os: - descr: "Virtuozzo" - mirrorlist: "http://repo.virtuozzo.com/vz/mirrorlists/7.0/releases-os.mirrorlist" - #baseurl: "http://repo.virtuozzo.com/vz/releases/7.0/x86_64/os/" - enabled: true - gpgcheck: true - priority: "50" - gpgkey: "file:///etc/pki/rpm-gpg/RPM-GPG-KEY-Virtuozzo-7" - target: "/etc/yum.repos.d/virtuozzo-os.repo" - virtuozzo-updates: - descr: "Virtuozzo Updates" - mirrorlist: "http://repo.virtuozzo.com/vz/mirrorlists/7.0/updates-os.mirrorlist" - #baseurl: "http://repo.virtuozzo.com/vz/updates/7.0/x86_64/os/" - enabled: true - gpgcheck: true - priority: "50" - gpgkey: "file:///etc/pki/rpm-gpg/RPM-GPG-KEY-Virtuozzo-7" - target: "/etc/yum.repos.d/virtuozzo-updates.repo" - virtuozzo-os-debuginfo: - descr: "Virtuozzo os Debug packages" - mirrorlist: "http://repo.virtuozzo.com/vz/mirrorlists/7.0/releases-debug.mirrorlist" - #baseurl: "http://repo.virtuozzo.com/vz/releases/7.0/x86_64/debug/" - enabled: false - gpgcheck: true - gpgkey: "file:///etc/pki/rpm-gpg/RPM-GPG-KEY-Virtuozzo-7" - target: "/etc/yum.repos.d/virtuozzo-os-debuginfo.repo" - virtuozzo-updates-debuginfo: - descr: "Virtuozzo updates Debug packages" - mirrorlist: "http://repo.virtuozzo.com/vz/mirrorlists/7.0/updates-debug.mirrorlist" - #baseurl: "http://repo.virtuozzo.com/vz/updates/7.0/x86_64/debug/" - enabled: false - gpgcheck: true - gpgkey: "file:///etc/pki/rpm-gpg/RPM-GPG-KEY-Virtuozzo-7" - target: "/etc/yum.repos.d/virtuozzo-updates-debuginfo.repo" - virtuozzo-readykernel: - descr: "Virtuozzo ReadyKernel" - baseurl: "https://appcatalog.virtuozzo.com/repo/readykernel-vz7/" - enabled: true - gpgcheck: true - priority: "50" - gpgkey: "file:///etc/pki/rpm-gpg/RPM-GPG-KEY-Virtuozzo-7" - target: "/etc/yum.repos.d/virtuozzo-readykernel.repo" - obsoleted_tmpls: - descr: "Virtuozzo obsoleted EZ-templates" - mirrorlist: "http://repo.virtuozzo.com/vz/mirrorlists/7.0/obsoleted_tmpls.mirrorlist" - #baseurl: "http://repo.virtuozzo.com/vz/obsoleted_tmpls/7.0/x86_64/os/" - enabled: false - gpgcheck: true - gpgkey: "file:///etc/pki/rpm-gpg/RPM-GPG-KEY-Virtuozzo-7" - target: "/etc/yum.repos.d/obsoleted_tmpls.repo" - factory: - descr: "Build Factory packages for Containers" - mirrorlist: "http://download.openvz.org/virtuozzo/mirrorlists/7.0/factory-os.mirrorlist" - #baseurl: "http://download.openvz.org/virtuozzo/factory/x86_64/os/" - priority: "49" - enabled: false - gpgcheck: false - gpgkey: "file:///etc/pki/rpm-gpg/RPM-GPG-KEY-Virtuozzo-7" - target: "/etc/yum.repos.d/factory.repo" - factory-debuginfo: - descr: "Debug packages for Containers from Build Factory" - mirrorlist: "http://download.openvz.org/virtuozzo/mirrorlists/7.0/factory-debug.mirrorlist" - #baseurl: "http://download.openvz.org/virtuozzo/factory/x86_64/debug/" - priority: "49" - enabled: false - gpgcheck: false - gpgkey: "file:///etc/pki/rpm-gpg/RPM-GPG-KEY-Virtuozzo-7" - target: "/etc/yum.repos.d/factory-debuginfo.repo" - virtuozzolinux-vz-factory: - descr: "VirtuozzoLinux Factory" - mirrorlist: "http://repo.virtuozzo.com/vzlinux/mirrorlist/mirrors-7-factory" - #baseurl: "http://repo.virtuozzo.com/vzlinux/7/$basearch/factory/" - priority: "90" - enabled: false - gpgcheck: true - gpgkey: "file:///etc/pki/rpm-gpg/VZLINUX_GPG_KEY" - target: "/etc/yum.repos.d/virtuozzolinux-vz-factory.repo" - virtuozzolinux-vz-factory-debuginfo: - descr: "VirtuozzoLinux Factory debug packages" - mirrorlist: "http://repo.virtuozzo.com/vzlinux/mirrorlist/mirrors-7-factory-debug" - #baseurl: "http://repo.virtuozzo.com/vzlinux/7/$basearch/factory-debug/" - priority: "90" - enabled: false - gpgcheck: true - gpgkey: "file:///etc/pki/rpm-gpg/VZLINUX_GPG_KEY" - target: "/etc/yum.repos.d/virtuozzolinux-vz-factory-debuginfo.repo" From 1cfcdc813c74959f337013da54f2b6174519b84a Mon Sep 17 00:00:00 2001 From: Yury Bushmelev Date: Thu, 12 Dec 2024 18:27:32 +0800 Subject: [PATCH 4/4] Drop unsupported OSes from unit tests --- spec/acceptance/define_group_spec.rb | 25 +-- spec/acceptance/define_versionlock_spec.rb | 86 +++------ spec/classes/init_spec.rb | 199 --------------------- spec/defines/plugin_spec.rb | 2 +- spec/defines/versionlock_spec.rb | 18 +- 5 files changed, 31 insertions(+), 299 deletions(-) diff --git a/spec/acceptance/define_group_spec.rb b/spec/acceptance/define_group_spec.rb index e22996d..8b1202d 100644 --- a/spec/acceptance/define_group_spec.rb +++ b/spec/acceptance/define_group_spec.rb @@ -17,18 +17,8 @@ apply_manifest(pp, catch_changes: true) end - # On stupid 7 test package has to be leaf package - # to be removed with a "groupremove". Can't find - # a common package that works. - case fact('os.release.major') - when '7' - describe package('libtool') do - it { is_expected.to be_installed } - end - else - describe package('make') do - it { is_expected.to be_installed } - end + describe package('make') do + it { is_expected.to be_installed } end end @@ -46,15 +36,8 @@ apply_manifest(pp, catch_changes: true) end - case fact('os.release.major') - when '7' - describe package('libtool') do - it { is_expected.not_to be_installed } - end - else - describe package('make') do - it { is_expected.not_to be_installed } - end + describe package('make') do + it { is_expected.not_to be_installed } end end end diff --git a/spec/acceptance/define_versionlock_spec.rb b/spec/acceptance/define_versionlock_spec.rb index 6039929..5108ac1 100644 --- a/spec/acceptance/define_versionlock_spec.rb +++ b/spec/acceptance/define_versionlock_spec.rb @@ -7,26 +7,17 @@ # Using puppet_apply as a helper it 'must work idempotently with no errors' do pp = <<-EOS - if versioncmp($facts['os']['release']['major'],'7') <= 0 { - yum::versionlock{ '0:bash-4.1.2-9.el6_2.*': - ensure => present, - } - yum::versionlock{ '0:tcsh-3.1.2-9.el6_2.*': - ensure => present, - } - } else { - yum::versionlock{ 'bash': - ensure => present, - version => '4.1.2', - release => '9.el6_2', - } - yum::versionlock{ 'tcsh': - ensure => present, - version => '3.1.2', - release => '9.el6_2', - arch => '*', - epoch => 0, - } + yum::versionlock{ 'bash': + ensure => present, + version => '4.1.2', + release => '9.el6_2', + } + yum::versionlock{ 'tcsh': + ensure => present, + version => '3.1.2', + release => '9.el6_2', + arch => '*', + epoch => 0, } # Lock a package with new style on all OSes @@ -44,31 +35,16 @@ apply_manifest(pp, catch_changes: true) end - if fact('os.release.major') == '7' - describe file('/etc/yum/pluginconf.d/versionlock.list') do - it { is_expected.to be_file } - it { is_expected.to contain '0:bash-4.1.2-9.el6_2.*' } - it { is_expected.to contain '0:tcsh-3.1.2-9.el6_2.*' } - it { is_expected.to contain '2:netscape-8.1.2-9.el6_2.*' } - end - else - describe file('/etc/dnf/plugins/versionlock.list') do - it { is_expected.to be_file } + describe file('/etc/dnf/plugins/versionlock.list') do + it { is_expected.to be_file } - it { is_expected.to contain 'bash-0:4.1.2-9.el6_2.*' } - it { is_expected.to contain 'tcsh-0:3.1.2-9.el6_2.*' } - it { is_expected.to contain 'netscape-2:8.1.2-9.el6_2.*' } - end + it { is_expected.to contain 'bash-0:4.1.2-9.el6_2.*' } + it { is_expected.to contain 'tcsh-0:3.1.2-9.el6_2.*' } + it { is_expected.to contain 'netscape-2:8.1.2-9.el6_2.*' } end - if fact('os.release.major') == '7' - describe package('yum-plugin-versionlock') do - it { is_expected.to be_installed } - end - else - describe package('python3-dnf-plugin-versionlock') do - it { is_expected.to be_installed } - end + describe package('python3-dnf-plugin-versionlock') do + it { is_expected.to be_installed } end end @@ -79,32 +55,16 @@ clean => true, } # Pick an obscure package that hopefully will not be installed. - if versioncmp($facts['os']['release']['major'],'7') <= 0 { - yum::versionlock{ '0:samba-devel-3.1.2-9.el6_2.*': - ensure => present, - } - } else { - yum::versionlock{'samba-devel': - ensure => present, - version => '3.1.2', - release => '9.el6_2', - } + yum::versionlock{'samba-devel': + ensure => present, + version => '3.1.2', + release => '9.el6_2', } EOS # Run it twice and test for idempotency apply_manifest(pp, catch_failures: true) apply_manifest(pp, catch_changes: true) - # Check the cache is really empty. - # all repos will have 0 packages. - # bit confused by the motivation of the first test? - if fact('os.release.major') == '7' - shell('yum -C repolist -d0 | grep -v "repo id" | awk "{print $NF}" FS= | grep -v 0', acceptable_exit_codes: [1]) - shell('yum -q list available samba-devel', acceptable_exit_codes: [1]) - elsif %w[8 9].include?(fact('os.release.major')) - shell('dnf -q list --available samba-devel', acceptable_exit_codes: [1]) - else - shell('dnf install -y samba-devel | grep "All matches were filtered"', acceptable_exit_codes: [0]) - end + shell('dnf -q list --available samba-devel', acceptable_exit_codes: [1]) end end diff --git a/spec/classes/init_spec.rb b/spec/classes/init_spec.rb index 6357578..f4611e7 100644 --- a/spec/classes/init_spec.rb +++ b/spec/classes/init_spec.rb @@ -151,56 +151,9 @@ updates-source centos-media ] - when '7' - it_behaves_like 'a catalog containing repos', %w[ - base - updates - cr - base-source - updates-source - centos-media - extras - centosplus - fasttrack - extras-source - base-debuginfo - ] - it_behaves_like 'a catalog not containing repos', %w[ - contrib - AppStream - BaseOS - Devel - HA - PowerTools - BaseOS-source - Appstream-source - c8-media-BaseOS - c8-media-AppStream - ] else it { is_expected.to have_yumrepo_resource_count(4) } end - when 'Amazon' - it { is_expected.to have_yumrepo_resource_count(16) } # rubocop:disable RSpec/RepeatedExample - - it_behaves_like 'a catalog containing repos', %w[ - amzn-main - amzn-main-debuginfo - amzn-main-source - amzn-nosrc - amzn-preview - amzn-preview-debuginfo - amzn-preview-source - amzn-updates - amzn-updates-debuginfo - amzn-updates-source - epel - epel-debuginfo - epel-source - epel-testing - epel-testing-debuginfo - epel-testing-source - ] when 'RedHat' it { is_expected.to have_yumrepo_resource_count(18) } @@ -224,47 +177,6 @@ rhui-REGION-rhel-server-debug-supplementary rhui-REGION-rhel-server-source-supplementary ] - when 'VirtuozzoLinux' - case facts[:os]['release']['major'] - when '6' - it { is_expected.to have_yumrepo_resource_count(12) } - - it_behaves_like 'a catalog containing repos', %w[ - virtuozzolinux-base - virtuozzolinux-updates - virtuozzolinux-base-debuginfo - virtuozzolinux-updates-debuginfo - virtuozzolinux-factory - virtuozzolinux-factory-debuginfo - virtuozzo-os - virtuozzo-updates - virtuozzo-os-debuginfo - virtuozzo-updates-debuginfo - virtuozzo-readykernel - obsoleted_tmpls - ] - when '7' - it { is_expected.to have_yumrepo_resource_count(16) } # rubocop:disable RSpec/RepeatedExample - - it_behaves_like 'a catalog containing repos', %w[ - virtuozzolinux-base - virtuozzolinux-updates - virtuozzolinux-base-debuginfo - virtuozzolinux-updates-debuginfo - virtuozzolinux-factory - virtuozzolinux-factory-debuginfo - virtuozzo-os - virtuozzo-updates - virtuozzo-os-debuginfo - virtuozzo-updates-debuginfo - virtuozzo-readykernel - obsoleted_tmpls - factory - factory-debuginfo - virtuozzolinux-vz-factory - virtuozzolinux-vz-factory-debuginfo - ] - end when 'AlmaLinux' case facts[:os]['release']['major'] when '8' @@ -357,73 +269,7 @@ extras-common extras-common-source ] - when '8' - it_behaves_like 'a catalog containing repos', %w[ - AppStream - cr - Devel - fasttrack - HA - PowerTools - BaseOS-source - Appstream-source - c8-media-BaseOS - c8-media-AppStream - extras - centosplus - extras-source - base-debuginfo - ] - when '7' - it_behaves_like 'a catalog containing repos', %w[ - cr - updates - extras - base-source - updates-source - extras-source - base-debuginfo - centosplus - centos-media - extras - centosplus - extras-source - base-debuginfo - ] - when '6' - it_behaves_like 'a catalog containing repos', %w[ - contrib - updates - extras - base-source - updates-source - extras-source - base-debuginfo - centosplus - centos-media - ] end - when 'Amazon' - it { is_expected.to have_yumrepo_resource_count(16) } # rubocop:disable RSpec/RepeatedExample - - it_behaves_like 'a catalog containing repos', %w[ - amzn-main - amzn-main-debuginfo - amzn-main-source - amzn-nosrc - amzn-preview - amzn-preview-debuginfo - amzn-preview-source - amzn-updates - amzn-updates-debuginfo - amzn-updates-source - epel - epel-debuginfo - epel-source - epel-testing - epel-testing-debuginfo - epel-testing-source - ] when 'RedHat' it { is_expected.to have_yumrepo_resource_count(18) } @@ -447,47 +293,6 @@ rhui-REGION-rhel-server-debug-supplementary rhui-REGION-rhel-server-source-supplementary ] - when 'VirtuozzoLinux' - case facts[:os]['release']['major'] - when '6' - it { is_expected.to have_yumrepo_resource_count(12) } - - it_behaves_like 'a catalog containing repos', %w[ - virtuozzolinux-base - virtuozzolinux-updates - virtuozzolinux-base-debuginfo - virtuozzolinux-updates-debuginfo - virtuozzolinux-factory - virtuozzolinux-factory-debuginfo - virtuozzo-os - virtuozzo-updates - virtuozzo-os-debuginfo - virtuozzo-updates-debuginfo - virtuozzo-readykernel - obsoleted_tmpls - ] - when '7' - it { is_expected.to have_yumrepo_resource_count(16) } # rubocop:disable RSpec/RepeatedExample - - it_behaves_like 'a catalog containing repos', %w[ - virtuozzolinux-base - virtuozzolinux-updates - virtuozzolinux-base-debuginfo - virtuozzolinux-updates-debuginfo - virtuozzolinux-factory - virtuozzolinux-factory-debuginfo - virtuozzo-os - virtuozzo-updates - virtuozzo-os-debuginfo - virtuozzo-updates-debuginfo - virtuozzo-readykernel - obsoleted_tmpls - factory - factory-debuginfo - virtuozzolinux-vz-factory - virtuozzolinux-vz-factory-debuginfo - ] - end when 'AlmaLinux' case facts[:os]['release']['major'] when '8' @@ -729,10 +534,6 @@ it { is_expected.to contain_yum__gpgkey('/etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-9') } when '8' it { is_expected.to contain_yum__gpgkey('/etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-8') } - when '7' - it { is_expected.to contain_yum__gpgkey('/etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-7') } - when '6' - it { is_expected.to contain_yum__gpgkey('/etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-6') } end end diff --git a/spec/defines/plugin_spec.rb b/spec/defines/plugin_spec.rb index b41617f..2928528 100644 --- a/spec/defines/plugin_spec.rb +++ b/spec/defines/plugin_spec.rb @@ -6,7 +6,7 @@ on_supported_os.each do |os, facts| context "on #{os}" do let(:facts) { facts } - let(:prefix) { facts[:os]['release']['major'] == '5' ? 'yum' : 'yum-plugin' } + let(:prefix) { 'yum-plugin' } context 'with no parameters' do let(:title) { 'fastestmirror' } diff --git a/spec/defines/versionlock_spec.rb b/spec/defines/versionlock_spec.rb index f024c66..11d4c69 100644 --- a/spec/defines/versionlock_spec.rb +++ b/spec/defines/versionlock_spec.rb @@ -4,10 +4,7 @@ describe 'yum::versionlock' do context 'with package_provider set to yum' do - let(:facts) do - { os: { release: { major: 7 } }, - package_provider: 'yum' } - end + let(:facts) { { package_provider: 'yum' } } context 'with a simple, well-formed title 0:bash-4.1.2-9.el6_2.x86_64' do let(:title) { '0:bash-4.1.2-9.el6_2.x86_64' } @@ -101,10 +98,7 @@ end context 'with a simple, well-formed package name title bash and a version' do - let(:facts) do - { os: { release: { major: 7 } }, - package_provider: 'yum' } - end + let(:facts) { { package_provider: 'yum' } } let(:title) { 'bash' } let(:params) { { version: '4.3' } } @@ -138,10 +132,7 @@ end context 'with package_provider set to dnf' do - let(:facts) do - { os: { release: { major: 8 } }, - package_provider: 'dnf' } - end + let(:facts) { { package_provider: 'dnf' } } context 'with a simple, well-formed title, no version set' do let(:title) { 'bash' } @@ -198,9 +189,6 @@ end context 'with package_provider unset' do - let(:facts) do - { os: { release: { major: 7 } } } - end let(:title) { 'bash' } let(:params) { { version: '4.3' } }