From 5106f1d6b68848b2152c481c9f088d92ea82b332 Mon Sep 17 00:00:00 2001 From: Lance Albertson Date: Fri, 18 Oct 2024 15:36:07 -0700 Subject: [PATCH] Various PHP and platform updates - Add support for PHP 8.3 and 8.4 - Remove support for PHP 5.6, 7.0 and 7.1 - Remove support for CentOS 7 and CentOS Stream 8 Signed-off-by: Lance Albertson --- .github/workflows/ci.yml | 42 +-------- CHANGELOG.md | 4 + README.md | 27 +++--- attributes/remi-gpgkey.rb | 8 -- attributes/remi-php56-debuginfo.rb | 12 --- attributes/remi-php56.rb | 19 ---- attributes/remi-php70-debuginfo.rb | 12 --- attributes/remi-php70.rb | 19 ---- attributes/remi-php71-debuginfo.rb | 12 --- attributes/remi-php71.rb | 19 ---- attributes/remi-php72.rb | 6 +- attributes/remi-php73.rb | 6 +- attributes/remi-php74.rb | 6 +- attributes/remi-php80.rb | 6 +- attributes/remi-php81.rb | 6 +- attributes/remi-php82.rb | 6 +- attributes/remi-php83-debuginfo.rb | 12 +++ attributes/remi-php83.rb | 15 ++++ attributes/remi-php84-debuginfo.rb | 12 +++ attributes/remi-php84.rb | 15 ++++ attributes/remi-safe.rb | 6 +- attributes/remi-test.rb | 6 +- attributes/remi.rb | 6 +- documentation/remi_modular.md | 2 - documentation/remi_php56.md | 36 -------- .../{remi_php70.md => remi_php83.md} | 7 +- .../{remi_php71.md => remi_php84.md} | 7 +- kitchen.yml | 90 +++++-------------- libraries/helpers.rb | 18 +--- recipes/remi-php56.rb | 30 ------- recipes/remi-php70.rb | 30 ------- recipes/remi-php71.rb | 30 ------- recipes/remi-php83.rb | 27 ++++++ recipes/remi-php84.rb | 27 ++++++ resources/remi_modular.rb | 2 - resources/remi_php56.rb | 35 -------- resources/remi_php70.rb | 35 -------- resources/remi_php71.rb | 35 -------- resources/remi_php72.rb | 25 +----- resources/remi_php73.rb | 27 +----- resources/remi_php74.rb | 25 +----- resources/remi_php80.rb | 25 +----- resources/remi_php81.rb | 25 +----- resources/remi_php82.rb | 25 +----- resources/remi_php83.rb | 19 ++++ resources/remi_php84.rb | 19 ++++ spec/remi_modular_spec.rb | 8 -- spec/remi_php56_spec.rb | 36 -------- spec/remi_php70_spec.rb | 36 -------- spec/remi_php71_spec.rb | 36 -------- spec/remi_php72_spec.rb | 8 -- spec/remi_php73_spec.rb | 8 -- spec/remi_php74_spec.rb | 8 -- spec/remi_php80_spec.rb | 8 -- spec/remi_php81_spec.rb | 8 -- spec/remi_php82_spec.rb | 8 -- spec/remi_php83_spec.rb | 29 ++++++ spec/remi_php84_spec.rb | 29 ++++++ spec/remi_safe_spec.rb | 6 -- spec/remi_spec.rb | 19 ++-- spec/remi_test_spec.rb | 19 ++-- test/integration/inspec/controls/php_spec.rb | 19 +--- test/integration/inspec/controls/remi_spec.rb | 8 +- .../inspec/controls/remi_test_spec.rb | 8 +- 64 files changed, 291 insertions(+), 893 deletions(-) delete mode 100644 attributes/remi-php56-debuginfo.rb delete mode 100644 attributes/remi-php56.rb delete mode 100644 attributes/remi-php70-debuginfo.rb delete mode 100644 attributes/remi-php70.rb delete mode 100644 attributes/remi-php71-debuginfo.rb delete mode 100644 attributes/remi-php71.rb create mode 100644 attributes/remi-php83-debuginfo.rb create mode 100644 attributes/remi-php83.rb create mode 100644 attributes/remi-php84-debuginfo.rb create mode 100644 attributes/remi-php84.rb delete mode 100644 documentation/remi_php56.md rename documentation/{remi_php70.md => remi_php83.md} (92%) rename documentation/{remi_php71.md => remi_php84.md} (92%) delete mode 100644 recipes/remi-php56.rb delete mode 100644 recipes/remi-php70.rb delete mode 100644 recipes/remi-php71.rb create mode 100644 recipes/remi-php83.rb create mode 100644 recipes/remi-php84.rb delete mode 100644 resources/remi_php56.rb delete mode 100644 resources/remi_php70.rb delete mode 100644 resources/remi_php71.rb create mode 100644 resources/remi_php83.rb create mode 100644 resources/remi_php84.rb delete mode 100644 spec/remi_php56_spec.rb delete mode 100644 spec/remi_php70_spec.rb delete mode 100644 spec/remi_php71_spec.rb create mode 100644 spec/remi_php83_spec.rb create mode 100644 spec/remi_php84_spec.rb diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index e6eac53..7c4745f 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -25,7 +25,6 @@ jobs: os: - almalinux-8 - almalinux-9 - # - centos-7 - centos-stream-9 - fedora-latest - rockylinux-8 @@ -33,56 +32,19 @@ jobs: suite: - 'remi' - 'remi-test' - - 'remi-php56' - - 'remi-php70' - - 'remi-php71' - 'remi-php72' - 'remi-php73' - 'remi-php74' - 'remi-php80' - 'remi-php81' - 'remi-php82' + - 'remi-php83' + - 'remi-php84' exclude: - os: almalinux-8 suite: remi-test - os: almalinux-9 suite: remi-test - - os: almalinux-8 - suite: remi-php56 - - os: almalinux-9 - suite: remi-php56 - - os: centos-stream-9 - suite: remi-php56 - - os: rockylinux-8 - suite: remi-php56 - - os: rockylinux-9 - suite: remi-php56 - - os: fedora-latest - suite: remi-php56 - - os: almalinux-8 - suite: remi-php70 - - os: almalinux-9 - suite: remi-php70 - - os: centos-stream-9 - suite: remi-php70 - - os: fedora-latest - suite: remi-php70 - - os: rockylinux-8 - suite: remi-php70 - - os: rockylinux-9 - suite: remi-php70 - - os: almalinux-8 - suite: remi-php71 - - os: almalinux-9 - suite: remi-php71 - - os: centos-stream-9 - suite: remi-php71 - - os: fedora-latest - suite: remi-php71 - - os: rockylinux-8 - suite: remi-php71 - - os: rockylinux-9 - suite: remi-php71 - os: almalinux-9 suite: remi-php72 - os: centos-stream-9 diff --git a/CHANGELOG.md b/CHANGELOG.md index 6cbc95e..78c1b13 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,10 @@ This file is used to list changes made in each version of the yum-remi-chef coo ## Unreleased +- Add support for PHP 8.3 and 8.4 +- Remove support for PHP 5.6, 7.0 and 7.1 +- Remove support for CentOS 7 and CentOS Stream 8 + ## 7.1.0 - *2024-07-31* - Update for Fedora 39 and 40 diff --git a/README.md b/README.md index 0086fb0..62eb80d 100644 --- a/README.md +++ b/README.md @@ -6,7 +6,9 @@ [![OpenCollective](https://opencollective.com/sous-chefs/sponsors/badge.svg)](#sponsors) [![License](https://img.shields.io/badge/License-Apache%202.0-green.svg)](https://opensource.org/licenses/Apache-2.0) -The yum-remi-chef cookbook takes over management of the repository ids of the [remi](https://rpms.remirepo.net/) repository . It allows attribute manipulation of `remi`, `remi-safe`, `remi-php56`, `remi-php70`, `remi-php71`, `remi-php72`, `remi-php73`, `remi-php74`, `remi-php80`, `remi-php81`, `remi-php82` and `remi-test` repositories. +The yum-remi-chef cookbook takes over management of the repository ids of the [remi](https://rpms.remirepo.net/) +repository . It allows attribute manipulation of `remi`, `remi-safe`, `remi-php72`, `remi-php73`, `remi-php74`, +`remi-php80`, `remi-php81`, `remi-php82`, `remi-php83`, `remi-php84` and `remi-test` repositories. ## Maintainers @@ -27,16 +29,14 @@ This cookbook is maintained by the Sous Chefs. The Sous Chefs are a community of The following platforms and PHP versions are supported, as per [upstream](https://rpms.remirepo.net) -- `x` via a Yum repo, `M` via DNF modules: -| PHP version | 5.6 | 7.0 | 7.1 | 7.2 | 7.3 | 7.4 | 8.0 | 8.1 | 8.2 | -| --------------- | --- | --- | --- | --- | --- | --- | --- | --- | --- | -| AlmaLinux 8 | | | | M | M | M | M | M | M | -| AlmaLinux 9 | | | | | | M | M | M | M | -| CentOS 7 | x | x | x | x | x | x | x | x | x | -| CentOS Stream 8 | | | | M | M | M | M | M | M | -| CentOS Stream 9 | | | | | | M | M | M | M | -| Fedora (latest) | | | | | | | | M | M | -| Rocky Linux 8 | | | | M | M | M | M | M | M | -| Rocky Linux 9 | | | | | | M | M | M | M | +| PHP version | 7.2 | 7.3 | 7.4 | 8.0 | 8.1 | 8.2 | 8.3 | 8.4 | +| --------------- | --- | --- | --- | --- | --- | --- | --- | --- | +| AlmaLinux 8 | M | M | M | M | M | M | M | M | +| AlmaLinux 9 | | | M | M | M | M | M | M | +| CentOS Stream 9 | | | M | M | M | M | M | M | +| Fedora (latest) | | | | | M | M | M | M | +| Rocky Linux 8 | M | M | M | M | M | M | M | M | +| Rocky Linux 9 | | | M | M | M | M | M | M | ## Recipes @@ -54,15 +54,14 @@ Same function as the above recipes, but as resources instead. - [`yum_remi_safe`](documentation/remi_safe.md) - [`yum_remi_test`](documentation/remi_test.md) - [`yum_remi_modular`](documentation/remi_modular.md) -- [`yum_remi_php56`](documentation/remi_php56.md) -- [`yum_remi_php70`](documentation/remi_php70.md) -- [`yum_remi_php71`](documentation/remi_php71.md) - [`yum_remi_php72`](documentation/remi_php72.md) - [`yum_remi_php73`](documentation/remi_php73.md) - [`yum_remi_php74`](documentation/remi_php74.md) - [`yum_remi_php80`](documentation/remi_php80.md) - [`yum_remi_php81`](documentation/remi_php81.md) - [`yum_remi_php82`](documentation/remi_php82.md) +- [`yum_remi_php83`](documentation/remi_php83.md) +- [`yum_remi_php84`](documentation/remi_php84.md) ## Contributors diff --git a/attributes/remi-gpgkey.rb b/attributes/remi-gpgkey.rb index 8792a8b..5750513 100644 --- a/attributes/remi-gpgkey.rb +++ b/attributes/remi-gpgkey.rb @@ -4,12 +4,6 @@ case node['platform_family'] when 'fedora' case node['platform_version'].to_i - when 32, 33 - 'https://rpms.remirepo.net/RPM-GPG-KEY-remi2020' - when 34, 35 - 'https://rpms.remirepo.net/RPM-GPG-KEY-remi2021' - when 36, 37 - 'https://rpms.remirepo.net/RPM-GPG-KEY-remi2022' when 38, 39 'https://rpms.remirepo.net/RPM-GPG-KEY-remi2023' when 40 @@ -19,8 +13,6 @@ end when 'rhel' case node['platform_version'].to_i - when 7 - 'https://rpms.remirepo.net/RPM-GPG-KEY-remi' when 8 'https://rpms.remirepo.net/RPM-GPG-KEY-remi2018' when 9 diff --git a/attributes/remi-php56-debuginfo.rb b/attributes/remi-php56-debuginfo.rb deleted file mode 100644 index 9b33ee5..0000000 --- a/attributes/remi-php56-debuginfo.rb +++ /dev/null @@ -1,12 +0,0 @@ -default['yum']['remi-php56-debuginfo']['repositoryid'] = 'remi-php56-debuginfo' -default['yum']['remi-php56-debuginfo']['gpgcheck'] = true -default['yum']['remi-php56-debuginfo']['enabled'] = false -default['yum']['remi-php56-debuginfo']['managed'] = false - -if platform_family?('fedora') - default['yum']['remi-php56-debuginfo']['baseurl'] = "http://rpms.remirepo.net/fedora/#{node['platform_version'].to_i}/debug-php56/$basearch/" - default['yum']['remi-php56-debuginfo']['description'] = "Remi's PHP 5.6 RPM repository for Fedora Linux #{node['platform_version'].to_i} - $basearch - debuginfo" -else - default['yum']['remi-php56-debuginfo']['baseurl'] = "http://rpms.remirepo.net/enterprise/#{node['platform_version'].to_i}/debug-php56/$basearch/" - default['yum']['remi-php56-debuginfo']['description'] = "Remi's PHP 5.6 RPM repository for Enterprise Linux #{node['platform_version'].to_i} - $basearch - debuginfo" -end diff --git a/attributes/remi-php56.rb b/attributes/remi-php56.rb deleted file mode 100644 index 5b83912..0000000 --- a/attributes/remi-php56.rb +++ /dev/null @@ -1,19 +0,0 @@ -default['yum']['remi-php56']['repositoryid'] = 'remi-php56' -default['yum']['remi-php56']['gpgcheck'] = true -default['yum']['remi-php56']['enabled'] = true -default['yum']['remi-php56']['managed'] = true - -case node['platform_family'] -when 'fedora' - # default['yum']['remi-php56']['baseurl'] = "http://cdn.remirepo.net/fedora/#{node['platform_version'].to_i}/php56/$basearch/" - default['yum']['remi-php56']['mirrorlist'] = "http://cdn.remirepo.net/fedora/#{node['platform_version'].to_i}/php56/$basearch/mirror" - default['yum']['remi-php56']['description'] = "Remi's PHP 5.6 RPM repository for Fedora Linux #{node['platform_version'].to_i} - $basearch" -when 'rhel' - # default['yum']['remi-php56']['baseurl'] = "http://cdn.remirepo.net/enterprise/#{node['platform_version'].to_i}/php56/$basearch/" - default['yum']['remi-php56']['mirrorlist'] = if node['platform_version'].to_i == 7 - "http://cdn.remirepo.net/enterprise/#{node['platform_version'].to_i}/php56/mirror" - else - "http://cdn.remirepo.net/enterprise/#{node['platform_version'].to_i}/php56/$basearch/mirror" - end - default['yum']['remi-php56']['description'] = "Remi's PHP 5.6 RPM repository for Enterprise Linux #{node['platform_version'].to_i} - $basearch" -end diff --git a/attributes/remi-php70-debuginfo.rb b/attributes/remi-php70-debuginfo.rb deleted file mode 100644 index 8536121..0000000 --- a/attributes/remi-php70-debuginfo.rb +++ /dev/null @@ -1,12 +0,0 @@ -default['yum']['remi-php70-debuginfo']['repositoryid'] = 'remi-php70-debuginfo' -default['yum']['remi-php70-debuginfo']['gpgcheck'] = true -default['yum']['remi-php70-debuginfo']['enabled'] = false -default['yum']['remi-php70-debuginfo']['managed'] = false - -if platform_family?('fedora') - default['yum']['remi-php70-debuginfo']['baseurl'] = "http://rpms.remirepo.net/fedora/#{node['platform_version'].to_i}/debug-php70/$basearch/" - default['yum']['remi-php70-debuginfo']['description'] = "Remi's PHP 7.0 RPM repository for Fedora Linux #{node['platform_version'].to_i} - $basearch - debuginfo" -else - default['yum']['remi-php70-debuginfo']['baseurl'] = "http://rpms.remirepo.net/enterprise/#{node['platform_version'].to_i}/debug-php70/$basearch/" - default['yum']['remi-php70-debuginfo']['description'] = "Remi's PHP 7.0 RPM repository for Enterprise Linux #{node['platform_version'].to_i} - $basearch - debuginfo" -end diff --git a/attributes/remi-php70.rb b/attributes/remi-php70.rb deleted file mode 100644 index ba3f596..0000000 --- a/attributes/remi-php70.rb +++ /dev/null @@ -1,19 +0,0 @@ -default['yum']['remi-php70']['repositoryid'] = 'remi-php70' -default['yum']['remi-php70']['gpgcheck'] = true -default['yum']['remi-php70']['enabled'] = true -default['yum']['remi-php70']['managed'] = true - -case node['platform_family'] -when 'fedora' - # default['yum']['remi-php70']['baseurl'] = "http://cdn.remirepo.net/fedora/#{node['platform_version'].to_i}/php70/$basearch/" - default['yum']['remi-php70']['mirrorlist'] = "http://cdn.remirepo.net/fedora/#{node['platform_version'].to_i}/php70/$basearch/mirror" - default['yum']['remi-php70']['description'] = "Remi's PHP 7.0 RPM repository for Fedora Linux #{node['platform_version'].to_i} - $basearch" -when 'rhel' - # default['yum']['remi-php70']['baseurl'] = "http://cdn.remirepo.net/enterprise/#{node['platform_version'].to_i}/php70/$basearch/" - default['yum']['remi-php70']['mirrorlist'] = if node['platform_version'].to_i == 7 - "http://cdn.remirepo.net/enterprise/#{node['platform_version'].to_i}/php70/mirror" - else - "http://cdn.remirepo.net/enterprise/#{node['platform_version'].to_i}/php70/$basearch/mirror" - end - default['yum']['remi-php70']['description'] = "Remi's PHP 7.0 RPM repository for Enterprise Linux #{node['platform_version'].to_i} - $basearch" -end diff --git a/attributes/remi-php71-debuginfo.rb b/attributes/remi-php71-debuginfo.rb deleted file mode 100644 index 7a8eaf4..0000000 --- a/attributes/remi-php71-debuginfo.rb +++ /dev/null @@ -1,12 +0,0 @@ -default['yum']['remi-php71-debuginfo']['repositoryid'] = 'remi-php71-debuginfo' -default['yum']['remi-php71-debuginfo']['gpgcheck'] = true -default['yum']['remi-php71-debuginfo']['enabled'] = false -default['yum']['remi-php71-debuginfo']['managed'] = false - -if platform_family?('fedora') - default['yum']['remi-php71-debuginfo']['baseurl'] = "http://rpms.remirepo.net/fedora/#{node['platform_version'].to_i}/debug-php71/$basearch/" - default['yum']['remi-php71-debuginfo']['description'] = "Remi's PHP 7.1 RPM repository for Fedora Linux #{node['platform_version'].to_i} - $basearch - debuginfo" -else - default['yum']['remi-php71-debuginfo']['baseurl'] = "http://rpms.remirepo.net/enterprise/#{node['platform_version'].to_i}/debug-php71/$basearch/" - default['yum']['remi-php71-debuginfo']['description'] = "Remi's PHP 7.1 RPM repository for Enterprise Linux #{node['platform_version'].to_i} - $basearch - debuginfo" -end diff --git a/attributes/remi-php71.rb b/attributes/remi-php71.rb deleted file mode 100644 index c3dd8a2..0000000 --- a/attributes/remi-php71.rb +++ /dev/null @@ -1,19 +0,0 @@ -default['yum']['remi-php71']['repositoryid'] = 'remi-php71' -default['yum']['remi-php71']['gpgcheck'] = true -default['yum']['remi-php71']['enabled'] = true -default['yum']['remi-php71']['managed'] = true - -case node['platform_family'] -when 'fedora' - # default['yum']['remi-php71']['baseurl'] = "http://cdn.remirepo.net/fedora/#{node['platform_version'].to_i}/php71/$basearch/" - default['yum']['remi-php71']['mirrorlist'] = "http://cdn.remirepo.net/fedora/#{node['platform_version'].to_i}/php71/$basearch/mirror" - default['yum']['remi-php71']['description'] = "Remi's PHP 7.1 RPM repository for Fedora Linux #{node['platform_version'].to_i} - $basearch" -when 'rhel' - # default['yum']['remi-php71']['baseurl'] = "http://cdn.remirepo.net/enterprise/#{node['platform_version'].to_i}/php71/$basearch/" - default['yum']['remi-php71']['mirrorlist'] = if node['platform_version'].to_i == 7 - "http://cdn.remirepo.net/enterprise/#{node['platform_version'].to_i}/php71/mirror" - else - "http://cdn.remirepo.net/enterprise/#{node['platform_version'].to_i}/php71/$basearch/mirror" - end - default['yum']['remi-php71']['description'] = "Remi's PHP 7.1 RPM repository for Enterprise Linux #{node['platform_version'].to_i} - $basearch" -end diff --git a/attributes/remi-php72.rb b/attributes/remi-php72.rb index 9013a42..5f4785c 100644 --- a/attributes/remi-php72.rb +++ b/attributes/remi-php72.rb @@ -10,10 +10,6 @@ default['yum']['remi-php72']['description'] = "Remi's PHP 7.2 RPM repository for Fedora Linux #{node['platform_version'].to_i} - $basearch" when 'rhel' # default['yum']['remi-php72']['baseurl'] = "http://cdn.remirepo.net/enterprise/#{node['platform_version'].to_i}/php72/$basearch/" - default['yum']['remi-php72']['mirrorlist'] = if node['platform_version'].to_i == 7 - "http://cdn.remirepo.net/enterprise/#{node['platform_version'].to_i}/php72/mirror" - else - "http://cdn.remirepo.net/enterprise/#{node['platform_version'].to_i}/php72/$basearch/mirror" - end + default['yum']['remi-php72']['mirrorlist'] = "http://cdn.remirepo.net/enterprise/#{node['platform_version'].to_i}/php72/$basearch/mirror" default['yum']['remi-php72']['description'] = "Remi's PHP 7.2 RPM repository for Enterprise Linux #{node['platform_version'].to_i} - $basearch" end diff --git a/attributes/remi-php73.rb b/attributes/remi-php73.rb index 007ad73..6ca95eb 100644 --- a/attributes/remi-php73.rb +++ b/attributes/remi-php73.rb @@ -10,10 +10,6 @@ default['yum']['remi-php73']['description'] = "Remi's PHP 7.3 RPM repository for Fedora Linux #{node['platform_version'].to_i} - $basearch" when 'rhel' # default['yum']['remi-php73']['baseurl'] = "http://cdn.remirepo.net/enterprise/#{node['platform_version'].to_i}/php73/$basearch/" - default['yum']['remi-php73']['mirrorlist'] = if node['platform_version'].to_i == 7 - "http://cdn.remirepo.net/enterprise/#{node['platform_version'].to_i}/php73/mirror" - else - "http://cdn.remirepo.net/enterprise/#{node['platform_version'].to_i}/php73/$basearch/mirror" - end + default['yum']['remi-php73']['mirrorlist'] = "http://cdn.remirepo.net/enterprise/#{node['platform_version'].to_i}/php73/$basearch/mirror" default['yum']['remi-php73']['description'] = "Remi's PHP 7.3 RPM repository for Enterprise Linux #{node['platform_version'].to_i} - $basearch" end diff --git a/attributes/remi-php74.rb b/attributes/remi-php74.rb index 25162af..aa98db1 100644 --- a/attributes/remi-php74.rb +++ b/attributes/remi-php74.rb @@ -10,10 +10,6 @@ default['yum']['remi-php74']['description'] = "Remi's PHP 7.4 RPM repository for Fedora Linux #{node['platform_version'].to_i} - $basearch" when 'rhel' # default['yum']['remi-php74']['baseurl'] = "http://cdn.remirepo.net/enterprise/#{node['platform_version'].to_i}/php74/$basearch/" - default['yum']['remi-php74']['mirrorlist'] = if node['platform_version'].to_i == 7 - "http://cdn.remirepo.net/enterprise/#{node['platform_version'].to_i}/php74/mirror" - else - "http://cdn.remirepo.net/enterprise/#{node['platform_version'].to_i}/php74/$basearch/mirror" - end + default['yum']['remi-php74']['mirrorlist'] = "http://cdn.remirepo.net/enterprise/#{node['platform_version'].to_i}/php74/$basearch/mirror" default['yum']['remi-php74']['description'] = "Remi's PHP 7.4 RPM repository for Enterprise Linux #{node['platform_version'].to_i} - $basearch" end diff --git a/attributes/remi-php80.rb b/attributes/remi-php80.rb index 60bb7f4..ee9c36b 100644 --- a/attributes/remi-php80.rb +++ b/attributes/remi-php80.rb @@ -10,10 +10,6 @@ default['yum']['remi-php80']['description'] = "Remi's PHP 8.0 RPM repository for Fedora Linux #{node['platform_version'].to_i} - $basearch" when 'rhel' # default['yum']['remi-php80']['baseurl'] = "http://cdn.remirepo.net/enterprise/#{node['platform_version'].to_i}/php80/$basearch/" - default['yum']['remi-php80']['mirrorlist'] = if node['platform_version'].to_i == 7 - "http://cdn.remirepo.net/enterprise/#{node['platform_version'].to_i}/php80/mirror" - else - "http://cdn.remirepo.net/enterprise/#{node['platform_version'].to_i}/php80/$basearch/mirror" - end + default['yum']['remi-php80']['mirrorlist'] = "http://cdn.remirepo.net/enterprise/#{node['platform_version'].to_i}/php80/$basearch/mirror" default['yum']['remi-php80']['description'] = "Remi's PHP 8.0 RPM repository for Enterprise Linux #{node['platform_version'].to_i} - $basearch" end diff --git a/attributes/remi-php81.rb b/attributes/remi-php81.rb index a7bacea..cdc66b0 100644 --- a/attributes/remi-php81.rb +++ b/attributes/remi-php81.rb @@ -10,10 +10,6 @@ default['yum']['remi-php81']['description'] = "Remi's PHP 8.1 RPM repository for Fedora Linux #{node['platform_version'].to_i} - $basearch" when 'rhel' # default['yum']['remi-php81']['baseurl'] = "http://cdn.remirepo.net/enterprise/#{node['platform_version'].to_i}/php81/$basearch/" - default['yum']['remi-php81']['mirrorlist'] = if node['platform_version'].to_i == 7 - "http://cdn.remirepo.net/enterprise/#{node['platform_version'].to_i}/php81/mirror" - else - "http://cdn.remirepo.net/enterprise/#{node['platform_version'].to_i}/php81/$basearch/mirror" - end + default['yum']['remi-php81']['mirrorlist'] = "http://cdn.remirepo.net/enterprise/#{node['platform_version'].to_i}/php81/$basearch/mirror" default['yum']['remi-php81']['description'] = "Remi's PHP 8.1 RPM repository for Enterprise Linux #{node['platform_version'].to_i} - $basearch" end diff --git a/attributes/remi-php82.rb b/attributes/remi-php82.rb index c7e0ef5..ef1b296 100644 --- a/attributes/remi-php82.rb +++ b/attributes/remi-php82.rb @@ -10,10 +10,6 @@ default['yum']['remi-php82']['description'] = "Remi's PHP 8.2 RPM repository for Fedora Linux #{node['platform_version'].to_i} - $basearch" when 'rhel' # default['yum']['remi-php82']['baseurl'] = "http://cdn.remirepo.net/enterprise/#{node['platform_version'].to_i}/php82/$basearch/" - default['yum']['remi-php82']['mirrorlist'] = if node['platform_version'].to_i == 7 - "http://cdn.remirepo.net/enterprise/#{node['platform_version'].to_i}/php82/mirror" - else - "http://cdn.remirepo.net/enterprise/#{node['platform_version'].to_i}/php82/$basearch/mirror" - end + default['yum']['remi-php82']['mirrorlist'] = "http://cdn.remirepo.net/enterprise/#{node['platform_version'].to_i}/php82/$basearch/mirror" default['yum']['remi-php82']['description'] = "Remi's PHP 8.2 RPM repository for Enterprise Linux #{node['platform_version'].to_i} - $basearch" end diff --git a/attributes/remi-php83-debuginfo.rb b/attributes/remi-php83-debuginfo.rb new file mode 100644 index 0000000..905bf77 --- /dev/null +++ b/attributes/remi-php83-debuginfo.rb @@ -0,0 +1,12 @@ +default['yum']['remi-php83-debuginfo']['repositoryid'] = 'remi-php83-debuginfo' +default['yum']['remi-php83-debuginfo']['gpgcheck'] = true +default['yum']['remi-php83-debuginfo']['enabled'] = false +default['yum']['remi-php83-debuginfo']['managed'] = false + +if platform_family?('fedora') + default['yum']['remi-php83-debuginfo']['baseurl'] = "http://rpms.remirepo.net/fedora/#{node['platform_version'].to_i}/debug-php83/$basearch/" + default['yum']['remi-php83-debuginfo']['description'] = "Remi's PHP 8.3 RPM repository for Fedora Linux #{node['platform_version'].to_i} - $basearch - debuginfo" +else + default['yum']['remi-php83-debuginfo']['baseurl'] = "http://rpms.remirepo.net/enterprise/#{node['platform_version'].to_i}/debug-php83/$basearch/" + default['yum']['remi-php83-debuginfo']['description'] = "Remi's PHP 8.3 RPM repository for Enterprise Linux #{node['platform_version'].to_i} - $basearch - debuginfo" +end diff --git a/attributes/remi-php83.rb b/attributes/remi-php83.rb new file mode 100644 index 0000000..5bf28df --- /dev/null +++ b/attributes/remi-php83.rb @@ -0,0 +1,15 @@ +default['yum']['remi-php83']['repositoryid'] = 'remi-php83' +default['yum']['remi-php83']['gpgcheck'] = true +default['yum']['remi-php83']['enabled'] = true +default['yum']['remi-php83']['managed'] = true + +case node['platform_family'] +when 'fedora' + # default['yum']['remi-php83']['baseurl'] = "http://cdn.remirepo.net/fedora/#{node['platform_version'].to_i}/php83/$basearch/" + default['yum']['remi-php83']['mirrorlist'] = "http://cdn.remirepo.net/fedora/#{node['platform_version'].to_i}/php83/$basearch/mirror" + default['yum']['remi-php83']['description'] = "Remi's PHP 8.3 RPM repository for Fedora Linux #{node['platform_version'].to_i} - $basearch" +when 'rhel' + # default['yum']['remi-php83']['baseurl'] = "http://cdn.remirepo.net/enterprise/#{node['platform_version'].to_i}/php83/$basearch/" + default['yum']['remi-php83']['mirrorlist'] = "http://cdn.remirepo.net/enterprise/#{node['platform_version'].to_i}/php83/$basearch/mirror" + default['yum']['remi-php83']['description'] = "Remi's PHP 8.3 RPM repository for Enterprise Linux #{node['platform_version'].to_i} - $basearch" +end diff --git a/attributes/remi-php84-debuginfo.rb b/attributes/remi-php84-debuginfo.rb new file mode 100644 index 0000000..3457e54 --- /dev/null +++ b/attributes/remi-php84-debuginfo.rb @@ -0,0 +1,12 @@ +default['yum']['remi-php84-debuginfo']['repositoryid'] = 'remi-php84-debuginfo' +default['yum']['remi-php84-debuginfo']['gpgcheck'] = true +default['yum']['remi-php84-debuginfo']['enabled'] = false +default['yum']['remi-php84-debuginfo']['managed'] = false + +if platform_family?('fedora') + default['yum']['remi-php84-debuginfo']['baseurl'] = "http://rpms.remirepo.net/fedora/#{node['platform_version'].to_i}/debug-php84/$basearch/" + default['yum']['remi-php84-debuginfo']['description'] = "Remi's PHP 8.4 RPM repository for Fedora Linux #{node['platform_version'].to_i} - $basearch - debuginfo" +else + default['yum']['remi-php84-debuginfo']['baseurl'] = "http://rpms.remirepo.net/enterprise/#{node['platform_version'].to_i}/debug-php84/$basearch/" + default['yum']['remi-php84-debuginfo']['description'] = "Remi's PHP 8.4 RPM repository for Enterprise Linux #{node['platform_version'].to_i} - $basearch - debuginfo" +end diff --git a/attributes/remi-php84.rb b/attributes/remi-php84.rb new file mode 100644 index 0000000..51d5465 --- /dev/null +++ b/attributes/remi-php84.rb @@ -0,0 +1,15 @@ +default['yum']['remi-php84']['repositoryid'] = 'remi-php84' +default['yum']['remi-php84']['gpgcheck'] = true +default['yum']['remi-php84']['enabled'] = true +default['yum']['remi-php84']['managed'] = true + +case node['platform_family'] +when 'fedora' + # default['yum']['remi-php84']['baseurl'] = "http://cdn.remirepo.net/fedora/#{node['platform_version'].to_i}/php84/$basearch/" + default['yum']['remi-php84']['mirrorlist'] = "http://cdn.remirepo.net/fedora/#{node['platform_version'].to_i}/php84/$basearch/mirror" + default['yum']['remi-php84']['description'] = "Remi's PHP 8.4 RPM repository for Fedora Linux #{node['platform_version'].to_i} - $basearch" +when 'rhel' + # default['yum']['remi-php84']['baseurl'] = "http://cdn.remirepo.net/enterprise/#{node['platform_version'].to_i}/php84/$basearch/" + default['yum']['remi-php84']['mirrorlist'] = "http://cdn.remirepo.net/enterprise/#{node['platform_version'].to_i}/php84/$basearch/mirror" + default['yum']['remi-php84']['description'] = "Remi's PHP 8.4 RPM repository for Enterprise Linux #{node['platform_version'].to_i} - $basearch" +end diff --git a/attributes/remi-safe.rb b/attributes/remi-safe.rb index ef73211..0eb616a 100644 --- a/attributes/remi-safe.rb +++ b/attributes/remi-safe.rb @@ -10,10 +10,6 @@ default['yum']['remi-safe']['description'] = "Safe Remi's RPM repository for Fedora Linux #{node['platform_version'].to_i} - $basearch" when 'rhel' # default['yum']['remi-safe']['baseurl'] = "http://cdn.remirepo.net/enterprise/#{node['platform_version'].to_i}/remi/$basearch/" - default['yum']['remi-safe']['mirrorlist'] = if node['platform_version'].to_i == 7 - "http://cdn.remirepo.net/enterprise/#{node['platform_version'].to_i}/safe/mirror" - else - "http://cdn.remirepo.net/enterprise/#{node['platform_version'].to_i}/safe/$basearch/mirror" - end + default['yum']['remi-safe']['mirrorlist'] = "http://cdn.remirepo.net/enterprise/#{node['platform_version'].to_i}/safe/$basearch/mirror" default['yum']['remi-safe']['description'] = "Safe Remi's RPM repository for Enterprise Linux #{node['platform_version'].to_i} - $basearch" end diff --git a/attributes/remi-test.rb b/attributes/remi-test.rb index 59b3ff6..da61f70 100644 --- a/attributes/remi-test.rb +++ b/attributes/remi-test.rb @@ -10,10 +10,6 @@ default['yum']['remi-test']['description'] = "Remi's test RPM repository for Fedora Linux #{node['platform_version'].to_i} - $basearch" when 'rhel' # default['yum']['remi-safe']['baseurl'] = "http://rpms.remirepo.net/enterprise/#{node['platform_version'].to_i}/test/$basearch/" - default['yum']['remi-test']['mirrorlist'] = if node['platform_version'].to_i == 7 - "http://cdn.remirepo.net/enterprise/#{node['platform_version'].to_i}/test/mirror" - else - "http://cdn.remirepo.net/enterprise/#{node['platform_version'].to_i}/test/$basearch/mirror" - end + default['yum']['remi-test']['mirrorlist'] = "http://cdn.remirepo.net/enterprise/#{node['platform_version'].to_i}/test/$basearch/mirror" default['yum']['remi-test']['description'] = "Remi's test RPM repository for Enterprise Linux #{node['platform_version'].to_i} - $basearch" end diff --git a/attributes/remi.rb b/attributes/remi.rb index c3bdc83..1f77ae7 100644 --- a/attributes/remi.rb +++ b/attributes/remi.rb @@ -10,10 +10,6 @@ default['yum']['remi']['description'] = "Remi's RPM repository for Fedora Linux #{node['platform_version'].to_i} - $basearch" when 'rhel' # default['yum']['remi']['baseurl'] = "http://cdn.remirepo.net/enterprise/#{node['platform_version'].to_i}/remi/$basearch/" - default['yum']['remi']['mirrorlist'] = if node['platform_version'].to_i == 7 - "http://cdn.remirepo.net/enterprise/#{node['platform_version'].to_i}/remi/mirror" - else - "http://cdn.remirepo.net/enterprise/#{node['platform_version'].to_i}/remi/$basearch/mirror" - end + default['yum']['remi']['mirrorlist'] = "http://cdn.remirepo.net/enterprise/#{node['platform_version'].to_i}/remi/$basearch/mirror" default['yum']['remi']['description'] = "Remi's RPM repository for Enterprise Linux #{node['platform_version'].to_i} - $basearch" end diff --git a/documentation/remi_modular.md b/documentation/remi_modular.md index 768534e..60fc8aa 100644 --- a/documentation/remi_modular.md +++ b/documentation/remi_modular.md @@ -4,8 +4,6 @@ Adds the `remi-modular` repo to the YUM / DNF repo list. -> ⚠ This repo is not supported on CentOS 7 - ## Actions | Action | Description | diff --git a/documentation/remi_php56.md b/documentation/remi_php56.md deleted file mode 100644 index a8b8bb4..0000000 --- a/documentation/remi_php56.md +++ /dev/null @@ -1,36 +0,0 @@ -# `yum_remi_php56` - -[Back to resource list](../README.md#resources) - -Adds the `remi-php56` repo to the YUM / DNF repo list. - -> ⚠ This repo **overrides** the system PHP packages! -> ⚠ This repo is not supported on CentOS 8+ or Fedora - -## Actions - -| Action | Description | -| --------- | ------------------------------ | -| `:create` | Creates the repo configuration | - -## Properties - -These properties are passed through to `yum_repository`. More information on these properties can be found on [the Chef docs for `yum_repository`](https://docs.chef.io/resources/yum_repository/). - -| Name | Type | Default | -| ------------------- | --------------- | ------------------------------------------------------------------------- | -| `baseurl` | `String` | Platform specific, see [`remi_repo_baseurl`](../libraries/helpers.rb) | -| `mirrorlist` | `String` | Platform specific, see [`remi_repo_mirrorlist`](../libraries/helpers.rb) | -| `description` | `String` | Platform specific, see [`remi_repo_description`](../libraries/helpers.rb) | -| `enabled` | `true`, `false` | `true` | -| `debug_baseurl` | `String` | Platform specific, see [`remi_repo_baseurl`](../libraries/helpers.rb) | -| `debug_description` | `String` | Platform specific, see [`remi_repo_description`](../libraries/helpers.rb) | -| `debug_enabled` | `true`, `false` | `false` | -| `gpgkey` | `String` | Platform specific, see [`remi_gpg_key`](../libraries/helpers.rb) | -| `gpgcheck` | `true`, `false` | `true` | - -## Examples - -```ruby -yum_remi_php56 'default' -``` diff --git a/documentation/remi_php70.md b/documentation/remi_php83.md similarity index 92% rename from documentation/remi_php70.md rename to documentation/remi_php83.md index 89bfa60..e65f934 100644 --- a/documentation/remi_php70.md +++ b/documentation/remi_php83.md @@ -1,11 +1,10 @@ -# `yum_remi_php70` +# `yum_remi_php83` [Back to resource list](../README.md#resources) -Adds the `remi-php70` repo to the YUM / DNF repo list. +Adds the `remi-php83` repo to the YUM / DNF repo list. > ⚠ This repo **overrides** the system PHP packages! -> ⚠ This repo is not supported on CentOS 8+ or Fedora ## Actions @@ -32,5 +31,5 @@ These properties are passed through to `yum_repository`. More information on the ## Examples ```ruby -yum_remi_php70 'default' +yum_remi_php83 'default' ``` diff --git a/documentation/remi_php71.md b/documentation/remi_php84.md similarity index 92% rename from documentation/remi_php71.md rename to documentation/remi_php84.md index a613759..ce2db93 100644 --- a/documentation/remi_php71.md +++ b/documentation/remi_php84.md @@ -1,11 +1,10 @@ -# `yum_remi_php71` +# `yum_remi_php84` [Back to resource list](../README.md#resources) -Adds the `remi-php71` repo to the YUM / DNF repo list. +Adds the `remi-php84` repo to the YUM / DNF repo list. > ⚠ This repo **overrides** the system PHP packages! -> ⚠ This repo is not supported on CentOS 8+ or Fedora ## Actions @@ -32,5 +31,5 @@ These properties are passed through to `yum_repository`. More information on the ## Examples ```ruby -yum_remi_php71 'default' +yum_remi_php84 'default' ``` diff --git a/kitchen.yml b/kitchen.yml index a6df644..2844249 100644 --- a/kitchen.yml +++ b/kitchen.yml @@ -19,8 +19,6 @@ verifier: platforms: - name: almalinux-8 - name: almalinux-9 - - name: centos-7 - - name: centos-stream-8 - name: centos-stream-9 - name: fedora-latest - name: rockylinux-8 @@ -57,169 +55,129 @@ suites: - remi - remi-safe - remi-modular - excludes: - - centos-7 - - - name: remi-php56 - run_list: - - recipe[test::php] - attributes: - remi-test: - version: '5.6' - verifier: - controls: - - remi - - remi-safe - - php - inputs: - version: '5.6' - excludes: - - almalinux-8 - - almalinux-9 - - centos-stream-8 - - centos-stream-9 - - fedora-latest - - rockylinux-8 - - rockylinux-9 - - name: remi-php70 + - name: remi-php72 run_list: - recipe[test::php] attributes: remi-test: - version: '7.0' + version: '7.2' verifier: controls: - remi - remi-safe - php inputs: - version: '7.0' + version: '7.2' excludes: - - almalinux-8 - almalinux-9 - - centos-stream-8 - centos-stream-9 - fedora-latest - - rockylinux-8 - rockylinux-9 - - name: remi-php71 + - name: remi-php73 run_list: - recipe[test::php] attributes: remi-test: - version: '7.1' + version: '7.3' verifier: controls: - remi - remi-safe - php inputs: - version: '7.1' + version: '7.3' excludes: - - almalinux-8 - almalinux-9 - - centos-stream-8 - centos-stream-9 - fedora-latest - - rockylinux-8 - rockylinux-9 - - name: remi-php72 + - name: remi-php74 run_list: - recipe[test::php] attributes: remi-test: - version: '7.2' + version: '7.4' verifier: controls: - remi - remi-safe - php inputs: - version: '7.2' + version: '7.4' excludes: - - almalinux-9 - - centos-stream-9 - fedora-latest - - rockylinux-9 - - name: remi-php73 + - name: remi-php80 run_list: - recipe[test::php] attributes: remi-test: - version: '7.3' + version: '8.0' verifier: controls: - remi - remi-safe - php inputs: - version: '7.3' + version: '8.0' excludes: - - almalinux-9 - - centos-stream-9 - fedora-latest - - rockylinux-9 - - name: remi-php74 + - name: remi-php81 run_list: - recipe[test::php] attributes: remi-test: - version: '7.4' + version: '8.1' verifier: controls: - remi - remi-safe - php inputs: - version: '7.4' - excludes: - - fedora-latest + version: '8.1' - - name: remi-php80 + - name: remi-php82 run_list: - recipe[test::php] attributes: remi-test: - version: '8.0' + version: '8.2' verifier: controls: - remi - remi-safe - php inputs: - version: '8.0' - excludes: - - fedora-latest + version: '8.2' - - name: remi-php81 + - name: remi-php83 run_list: - recipe[test::php] attributes: remi-test: - version: '8.1' + version: '8.3' verifier: controls: - remi - remi-safe - php inputs: - version: '8.1' + version: '8.3' - - name: remi-php82 + - name: remi-php84 run_list: - recipe[test::php] attributes: remi-test: - version: '8.2' + version: '8.4' verifier: controls: - remi - remi-safe - php inputs: - version: '8.2' + version: '8.4' diff --git a/libraries/helpers.rb b/libraries/helpers.rb index b71c291..8030430 100644 --- a/libraries/helpers.rb +++ b/libraries/helpers.rb @@ -5,20 +5,10 @@ def rhel_8_or_fedora? (platform_family?('rhel') && node['platform_version'].to_i >= 8) || platform_family?('fedora') end - def rhel_7? - (platform_family?('rhel') && node['platform_version'].to_i == 7) - end - def remi_gpg_key case node['platform_family'] when 'fedora' case node['platform_version'].to_i - when 32, 33 - 'https://rpms.remirepo.net/RPM-GPG-KEY-remi2020' - when 34, 35 - 'https://rpms.remirepo.net/RPM-GPG-KEY-remi2021' - when 36, 37 - 'https://rpms.remirepo.net/RPM-GPG-KEY-remi2022' when 38, 39 'https://rpms.remirepo.net/RPM-GPG-KEY-remi2023' when 40 @@ -26,8 +16,6 @@ def remi_gpg_key end when 'rhel' case node['platform_version'].to_i - when 7 - 'https://rpms.remirepo.net/RPM-GPG-KEY-remi' when 8 'https://rpms.remirepo.net/RPM-GPG-KEY-remi2018' when 9 @@ -50,11 +38,7 @@ def remi_repo_mirrorlist(repo_slug) when 'fedora' "http://cdn.remirepo.net/fedora/#{node['platform_version'].to_i}/#{repo_slug}/$basearch/mirror" when 'rhel' - if node['platform_version'].to_i == 7 - "http://cdn.remirepo.net/enterprise/#{node['platform_version'].to_i}/#{repo_slug}/mirror" - else - "http://cdn.remirepo.net/enterprise/#{node['platform_version'].to_i}/#{repo_slug}/$basearch/mirror" - end + "http://cdn.remirepo.net/enterprise/#{node['platform_version'].to_i}/#{repo_slug}/$basearch/mirror" end end diff --git a/recipes/remi-php56.rb b/recipes/remi-php56.rb deleted file mode 100644 index f457ac5..0000000 --- a/recipes/remi-php56.rb +++ /dev/null @@ -1,30 +0,0 @@ -# -# Author:: Sean OMeara () -# Recipe:: yum-remi-chef::remi-php56 -# -# Copyright:: 2015-2019, Chef Software, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -yum_remi_php56 'default' do - baseurl node['yum']['remi-php56']['baseurl'] - mirrorlist node['yum']['remi-php56']['mirrorlist'] - description node['yum']['remi-php56']['description'] - enabled node['yum']['remi-php56']['enabled'] - debug_baseurl node['yum']['remi-php56-debuginfo']['baseurl'] - debug_description node['yum']['remi-php56-debuginfo']['description'] - debug_enabled node['yum']['remi-php56-debuginfo']['enabled'] - gpgcheck node['yum']['remi-php56']['gpgcheck'] - gpgkey node['yum-remi-chef']['gpgkey'] - only_if { node['yum']['remi-php56']['managed'] } -end diff --git a/recipes/remi-php70.rb b/recipes/remi-php70.rb deleted file mode 100644 index 47b5a1b..0000000 --- a/recipes/remi-php70.rb +++ /dev/null @@ -1,30 +0,0 @@ -# -# Author:: Sean OMeara () -# Recipe:: yum-remi-chef::remi-php70 -# -# Copyright:: 2015-2019, Chef Software, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -yum_remi_php70 'default' do - baseurl node['yum']['remi-php70']['baseurl'] - mirrorlist node['yum']['remi-php70']['mirrorlist'] - description node['yum']['remi-php70']['description'] - enabled node['yum']['remi-php70']['enabled'] - debug_baseurl node['yum']['remi-php70-debuginfo']['baseurl'] - debug_description node['yum']['remi-php70-debuginfo']['description'] - debug_enabled node['yum']['remi-php70-debuginfo']['enabled'] - gpgcheck node['yum']['remi-php70']['gpgcheck'] - gpgkey node['yum-remi-chef']['gpgkey'] - only_if { node['yum']['remi-php70']['managed'] } -end diff --git a/recipes/remi-php71.rb b/recipes/remi-php71.rb deleted file mode 100644 index d172ff1..0000000 --- a/recipes/remi-php71.rb +++ /dev/null @@ -1,30 +0,0 @@ -# -# Author:: Sean OMeara () -# Recipe:: yum-remi-chef::remi-php71 -# -# Copyright:: 2015-2019, Chef Software, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -yum_remi_php71 'default' do - baseurl node['yum']['remi-php71']['baseurl'] - mirrorlist node['yum']['remi-php71']['mirrorlist'] - description node['yum']['remi-php71']['description'] - enabled node['yum']['remi-php71']['enabled'] - debug_baseurl node['yum']['remi-php71-debuginfo']['baseurl'] - debug_description node['yum']['remi-php71-debuginfo']['description'] - debug_enabled node['yum']['remi-php71-debuginfo']['enabled'] - gpgcheck node['yum']['remi-php71']['gpgcheck'] - gpgkey node['yum-remi-chef']['gpgkey'] - only_if { node['yum']['remi-php71']['managed'] } -end diff --git a/recipes/remi-php83.rb b/recipes/remi-php83.rb new file mode 100644 index 0000000..b9c7b22 --- /dev/null +++ b/recipes/remi-php83.rb @@ -0,0 +1,27 @@ +# +# Author:: Lance Albertson () +# Recipe:: yum-remi-chef::remi-php83 +# +# Copyright:: 2022, Oregon State University +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +yum_remi_php83 'default' do + baseurl node['yum']['remi-php83']['baseurl'] + gpgcheck node['yum']['remi-php83']['gpgcheck'] + enabled node['yum']['remi-php83']['enabled'] + mirrorlist node['yum']['remi-php83']['mirrorlist'] + description node['yum']['remi-php83']['description'] + gpgkey node['yum-remi-chef']['gpgkey'] + only_if { node['yum']['remi-php83']['managed'] } +end diff --git a/recipes/remi-php84.rb b/recipes/remi-php84.rb new file mode 100644 index 0000000..7164c62 --- /dev/null +++ b/recipes/remi-php84.rb @@ -0,0 +1,27 @@ +# +# Author:: Lance Albertson () +# Recipe:: yum-remi-chef::remi-php84 +# +# Copyright:: 2022, Oregon State University +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +yum_remi_php84 'default' do + baseurl node['yum']['remi-php84']['baseurl'] + gpgcheck node['yum']['remi-php84']['gpgcheck'] + enabled node['yum']['remi-php84']['enabled'] + mirrorlist node['yum']['remi-php84']['mirrorlist'] + description node['yum']['remi-php84']['description'] + gpgkey node['yum-remi-chef']['gpgkey'] + only_if { node['yum']['remi-php84']['managed'] } +end diff --git a/resources/remi_modular.rb b/resources/remi_modular.rb index e6ad8f3..20835ce 100644 --- a/resources/remi_modular.rb +++ b/resources/remi_modular.rb @@ -11,8 +11,6 @@ property :debug_description, String, default: lazy { remi_repo_description('debug-modular') } action :create do - raise "`remi-modular` is not available for #{node['platform']} #{node['platform_version'].to_i}" if rhel_7? - yum_remi 'default' yum_repository 'remi-modular' do diff --git a/resources/remi_php56.rb b/resources/remi_php56.rb deleted file mode 100644 index f863279..0000000 --- a/resources/remi_php56.rb +++ /dev/null @@ -1,35 +0,0 @@ -provides :yum_remi_php56 -unified_mode true - -use '_partials/_common' - -property :baseurl, String, default: lazy { remi_repo_baseurl('php56') } -property :mirrorlist, String, default: lazy { remi_repo_mirrorlist('php56') } -property :description, String, default: lazy { remi_repo_description('php56') } - -property :debug_baseurl, String, default: lazy { remi_repo_baseurl('debug-php56') } -property :debug_description, String, default: lazy { remi_repo_description('debug-php56') } - -action :create do - raise "`remi-php56` is not available for #{node['platform']} #{node['platform_version'].to_i}" if rhel_8_or_fedora? - - yum_remi 'default' - - # use repo on C7 - yum_repository 'remi-php56' do - baseurl new_resource.baseurl - mirrorlist new_resource.mirrorlist - description new_resource.description - enabled new_resource.enabled - gpgcheck new_resource.gpgcheck - gpgkey new_resource.gpgkey - end - - yum_repository 'remi-php56-debuginfo' do - baseurl new_resource.debug_baseurl - description new_resource.debug_description - enabled new_resource.debug_enabled - gpgcheck new_resource.gpgcheck - gpgkey new_resource.gpgkey - end if new_resource.debug_enabled -end diff --git a/resources/remi_php70.rb b/resources/remi_php70.rb deleted file mode 100644 index a38afcd..0000000 --- a/resources/remi_php70.rb +++ /dev/null @@ -1,35 +0,0 @@ -provides :yum_remi_php70 -unified_mode true - -use '_partials/_common' - -property :baseurl, String, default: lazy { remi_repo_baseurl('php70') } -property :mirrorlist, String, default: lazy { remi_repo_mirrorlist('php70') } -property :description, String, default: lazy { remi_repo_description('php70') } - -property :debug_baseurl, String, default: lazy { remi_repo_baseurl('debug-php70') } -property :debug_description, String, default: lazy { remi_repo_description('debug-php70') } - -action :create do - raise "`remi-php70` is not available for #{node['platform']} #{node['platform_version'].to_i}" if rhel_8_or_fedora? - - yum_remi 'default' - - # use repo on C7 - yum_repository 'remi-php70' do - baseurl new_resource.baseurl - mirrorlist new_resource.mirrorlist - description new_resource.description - enabled new_resource.enabled - gpgcheck new_resource.gpgcheck - gpgkey new_resource.gpgkey - end - - yum_repository 'remi-php70-debuginfo' do - baseurl new_resource.debug_baseurl - description new_resource.debug_description - enabled new_resource.debug_enabled - gpgcheck new_resource.gpgcheck - gpgkey new_resource.gpgkey - end if new_resource.debug_enabled -end diff --git a/resources/remi_php71.rb b/resources/remi_php71.rb deleted file mode 100644 index 90fb23c..0000000 --- a/resources/remi_php71.rb +++ /dev/null @@ -1,35 +0,0 @@ -provides :yum_remi_php71 -unified_mode true - -use '_partials/_common' - -property :baseurl, String, default: lazy { remi_repo_baseurl('php71') } -property :mirrorlist, String, default: lazy { remi_repo_mirrorlist('php71') } -property :description, String, default: lazy { remi_repo_description('php71') } - -property :debug_baseurl, String, default: lazy { remi_repo_baseurl('debug-php71') } -property :debug_description, String, default: lazy { remi_repo_description('debug-php71') } - -action :create do - raise "`remi-php71` is not available for #{node['platform']} #{node['platform_version'].to_i}" if rhel_8_or_fedora? - - yum_remi 'default' - - # use repo on C7 - yum_repository 'remi-php71' do - baseurl new_resource.baseurl - mirrorlist new_resource.mirrorlist - description new_resource.description - enabled new_resource.enabled - gpgcheck new_resource.gpgcheck - gpgkey new_resource.gpgkey - end - - yum_repository 'remi-php71-debuginfo' do - baseurl new_resource.debug_baseurl - description new_resource.debug_description - enabled new_resource.debug_enabled - gpgcheck new_resource.gpgcheck - gpgkey new_resource.gpgkey - end if new_resource.debug_enabled -end diff --git a/resources/remi_php72.rb b/resources/remi_php72.rb index a9f4c38..6b1ab1e 100644 --- a/resources/remi_php72.rb +++ b/resources/remi_php72.rb @@ -15,28 +15,7 @@ yum_remi 'default' - # use repo on C7 - if rhel_7? - yum_repository 'remi-php72' do - baseurl new_resource.baseurl - mirrorlist new_resource.mirrorlist - description new_resource.description - enabled new_resource.enabled - gpgcheck new_resource.gpgcheck - gpgkey new_resource.gpgkey - end + yum_remi_modular 'default' - yum_repository 'remi-php72-debuginfo' do - baseurl new_resource.debug_baseurl - description new_resource.debug_description - enabled new_resource.debug_enabled - gpgcheck new_resource.gpgcheck - gpgkey new_resource.gpgkey - end if new_resource.debug_enabled - else - # use modules on C8 / Fedora - yum_remi_modular 'default' - - dnf_module 'php:remi-7.2' - end + dnf_module 'php:remi-7.2' end diff --git a/resources/remi_php73.rb b/resources/remi_php73.rb index d2a2370..7e102a6 100644 --- a/resources/remi_php73.rb +++ b/resources/remi_php73.rb @@ -11,32 +11,9 @@ property :debug_description, String, default: lazy { remi_repo_description('debug-php73') } action :create do - raise "`remi-php73` is not available for #{node['platform']} #{node['platform_version'].to_i}" if fedora? - yum_remi 'default' - # use repo on C7 - if rhel_7? - yum_repository 'remi-php73' do - baseurl new_resource.baseurl - mirrorlist new_resource.mirrorlist - description new_resource.description - enabled new_resource.enabled - gpgcheck new_resource.gpgcheck - gpgkey new_resource.gpgkey - end - - yum_repository 'remi-php73-debuginfo' do - baseurl new_resource.debug_baseurl - description new_resource.debug_description - enabled new_resource.debug_enabled - gpgcheck new_resource.gpgcheck - gpgkey new_resource.gpgkey - end if new_resource.debug_enabled - else - # use modules on C8 / Fedora - yum_remi_modular 'default' + yum_remi_modular 'default' - dnf_module 'php:remi-7.3' - end + dnf_module 'php:remi-7.3' end diff --git a/resources/remi_php74.rb b/resources/remi_php74.rb index 6efb744..edf3528 100644 --- a/resources/remi_php74.rb +++ b/resources/remi_php74.rb @@ -15,28 +15,7 @@ yum_remi 'default' - # use repo on C7 - if rhel_7? - yum_repository 'remi-php74' do - baseurl new_resource.baseurl - mirrorlist new_resource.mirrorlist - description new_resource.description - enabled new_resource.enabled - gpgcheck new_resource.gpgcheck - gpgkey new_resource.gpgkey - end + yum_remi_modular 'default' - yum_repository 'remi-php74-debuginfo' do - baseurl new_resource.debug_baseurl - description new_resource.debug_description - enabled new_resource.debug_enabled - gpgcheck new_resource.gpgcheck - gpgkey new_resource.gpgkey - end if new_resource.debug_enabled - else - # use modules on C8 / Fedora - yum_remi_modular 'default' - - dnf_module 'php:remi-7.4' - end + dnf_module 'php:remi-7.4' end diff --git a/resources/remi_php80.rb b/resources/remi_php80.rb index 39b6e22..1724c94 100644 --- a/resources/remi_php80.rb +++ b/resources/remi_php80.rb @@ -13,28 +13,7 @@ action :create do yum_remi 'default' - # use repo on C7 - if rhel_7? - yum_repository 'remi-php80' do - baseurl new_resource.baseurl - mirrorlist new_resource.mirrorlist - description new_resource.description - enabled new_resource.enabled - gpgcheck new_resource.gpgcheck - gpgkey new_resource.gpgkey - end + yum_remi_modular 'default' - yum_repository 'remi-php80-debuginfo' do - baseurl new_resource.debug_baseurl - description new_resource.debug_description - enabled new_resource.debug_enabled - gpgcheck new_resource.gpgcheck - gpgkey new_resource.gpgkey - end if new_resource.debug_enabled - else - # use modules on C8 / Fedora - yum_remi_modular 'default' - - dnf_module 'php:remi-8.0' - end + dnf_module 'php:remi-8.0' end diff --git a/resources/remi_php81.rb b/resources/remi_php81.rb index 2466010..3e67d8f 100644 --- a/resources/remi_php81.rb +++ b/resources/remi_php81.rb @@ -13,28 +13,7 @@ action :create do yum_remi 'default' - # use repo on C7 - if rhel_7? - yum_repository 'remi-php81' do - baseurl new_resource.baseurl - mirrorlist new_resource.mirrorlist - description new_resource.description - enabled new_resource.enabled - gpgcheck new_resource.gpgcheck - gpgkey new_resource.gpgkey - end + yum_remi_modular 'default' - yum_repository 'remi-php81-debuginfo' do - baseurl new_resource.debug_baseurl - description new_resource.debug_description - enabled new_resource.debug_enabled - gpgcheck new_resource.gpgcheck - gpgkey new_resource.gpgkey - end if new_resource.debug_enabled - else - # use modules on C8 / Fedora - yum_remi_modular 'default' - - dnf_module 'php:remi-8.1' - end + dnf_module 'php:remi-8.1' end diff --git a/resources/remi_php82.rb b/resources/remi_php82.rb index 09c1844..f41eb89 100644 --- a/resources/remi_php82.rb +++ b/resources/remi_php82.rb @@ -13,28 +13,7 @@ action :create do yum_remi 'default' - # use repo on C7 - if rhel_7? - yum_repository 'remi-php82' do - baseurl new_resource.baseurl - mirrorlist new_resource.mirrorlist - description new_resource.description - enabled new_resource.enabled - gpgcheck new_resource.gpgcheck - gpgkey new_resource.gpgkey - end + yum_remi_modular 'default' - yum_repository 'remi-php82-debuginfo' do - baseurl new_resource.debug_baseurl - description new_resource.debug_description - enabled new_resource.debug_enabled - gpgcheck new_resource.gpgcheck - gpgkey new_resource.gpgkey - end if new_resource.debug_enabled - else - # use modules on C8 / Fedora - yum_remi_modular 'default' - - dnf_module 'php:remi-8.2' - end + dnf_module 'php:remi-8.2' end diff --git a/resources/remi_php83.rb b/resources/remi_php83.rb new file mode 100644 index 0000000..712a8a0 --- /dev/null +++ b/resources/remi_php83.rb @@ -0,0 +1,19 @@ +provides :yum_remi_php83 +unified_mode true + +use '_partials/_common' + +property :baseurl, String, default: lazy { remi_repo_baseurl('php83') } +property :mirrorlist, String, default: lazy { remi_repo_mirrorlist('php83') } +property :description, String, default: lazy { remi_repo_description('php83') } + +property :debug_baseurl, String, default: lazy { remi_repo_baseurl('debug-php83') } +property :debug_description, String, default: lazy { remi_repo_description('debug-php83') } + +action :create do + yum_remi 'default' + + yum_remi_modular 'default' + + dnf_module 'php:remi-8.3' +end diff --git a/resources/remi_php84.rb b/resources/remi_php84.rb new file mode 100644 index 0000000..c2527f3 --- /dev/null +++ b/resources/remi_php84.rb @@ -0,0 +1,19 @@ +provides :yum_remi_php84 +unified_mode true + +use '_partials/_common' + +property :baseurl, String, default: lazy { remi_repo_baseurl('php84') } +property :mirrorlist, String, default: lazy { remi_repo_mirrorlist('php84') } +property :description, String, default: lazy { remi_repo_description('php84') } + +property :debug_baseurl, String, default: lazy { remi_repo_baseurl('debug-php84') } +property :debug_description, String, default: lazy { remi_repo_description('debug-php84') } + +action :create do + yum_remi 'default' + + yum_remi_modular 'default' + + dnf_module 'php:remi-8.4' +end diff --git a/spec/remi_modular_spec.rb b/spec/remi_modular_spec.rb index 782936a..9bf0d29 100644 --- a/spec/remi_modular_spec.rb +++ b/spec/remi_modular_spec.rb @@ -6,14 +6,6 @@ default_attributes['yum']['remi-modular']['enabled'] = true default_attributes['yum']['remi-modular']['managed'] = true - # context 'on CentOS 7' do - # platform 'centos', '7' - - # it do - # expect { chef_run }.to raise_error /`remi-modular` is not available for centos 7/ - # end - # end - context 'on AlmaLinux 8' do platform 'almalinux', '8' diff --git a/spec/remi_php56_spec.rb b/spec/remi_php56_spec.rb deleted file mode 100644 index 05666fa..0000000 --- a/spec/remi_php56_spec.rb +++ /dev/null @@ -1,36 +0,0 @@ -require 'spec_helper' - -describe 'yum-remi-chef::remi-php56' do - step_into :yum_remi_php56 - step_into :yum_remi_safe - step_into :yum_remi - - default_attributes['yum']['remi-php56']['enabled'] = true - default_attributes['yum']['remi-php56']['managed'] = true - default_attributes['yum']['remi-php56-debuginfo']['enabled'] = true - default_attributes['yum']['remi-php56-debuginfo']['managed'] = true - - context 'on CentOS 7' do - platform 'centos', '7' - - it { is_expected.to create_yum_repository('remi-safe') } - it { is_expected.to create_yum_repository('remi-php56') } - it { is_expected.to create_yum_repository('remi-php56-debuginfo') } - end - - # context 'on AlmaLinux 8' do - # platform 'almalinux', '8' - - # it do - # expect { chef_run }.to raise_error /`remi-php56` is not available for almalinux 8/ - # end - # end - - # context 'on AlmaLinux 9' do - # platform 'almalinux', '9' - - # it do - # expect { chef_run }.to raise_error /`remi-php56` is not available for almalinux 9/ - # end - # end -end diff --git a/spec/remi_php70_spec.rb b/spec/remi_php70_spec.rb deleted file mode 100644 index 744ab63..0000000 --- a/spec/remi_php70_spec.rb +++ /dev/null @@ -1,36 +0,0 @@ -require 'spec_helper' - -describe 'yum-remi-chef::remi-php70' do - step_into :yum_remi_php70 - step_into :yum_remi_safe - step_into :yum_remi - - default_attributes['yum']['remi-php70']['enabled'] = true - default_attributes['yum']['remi-php70']['managed'] = true - default_attributes['yum']['remi-php70-debuginfo']['enabled'] = true - default_attributes['yum']['remi-php70-debuginfo']['managed'] = true - - context 'on CentOS 7' do - platform 'centos', '7' - - it { is_expected.to create_yum_repository('remi-safe') } - it { is_expected.to create_yum_repository('remi-php70') } - it { is_expected.to create_yum_repository('remi-php70-debuginfo') } - end - - # context 'on AlmaLinux 8' do - # platform 'almalinux', '8' - - # it do - # expect { chef_run }.to raise_error /`remi-php70` is not available for almalinux 8/ - # end - # end - - # context 'on AlmaLinux 9' do - # platform 'almalinux', '9' - - # it do - # expect { chef_run }.to raise_error /`remi-php70` is not available for almalinux 9/ - # end - # end -end diff --git a/spec/remi_php71_spec.rb b/spec/remi_php71_spec.rb deleted file mode 100644 index 105db91..0000000 --- a/spec/remi_php71_spec.rb +++ /dev/null @@ -1,36 +0,0 @@ -require 'spec_helper' - -describe 'yum-remi-chef::remi-php71' do - step_into :yum_remi_php71 - step_into :yum_remi_safe - step_into :yum_remi - - default_attributes['yum']['remi-php71']['enabled'] = true - default_attributes['yum']['remi-php71']['managed'] = true - default_attributes['yum']['remi-php71-debuginfo']['enabled'] = true - default_attributes['yum']['remi-php71-debuginfo']['managed'] = true - - context 'on CentOS 7' do - platform 'centos', '7' - - it { is_expected.to create_yum_repository('remi-safe') } - it { is_expected.to create_yum_repository('remi-php71') } - it { is_expected.to create_yum_repository('remi-php71-debuginfo') } - end - - # context 'on AlmaLinux 8' do - # platform 'almalinux', '8' - - # it do - # expect { chef_run }.to raise_error /`remi-php71` is not available for almalinux 8/ - # end - # end - - # context 'on AlmaLinux 9' do - # platform 'almalinux', '9' - - # it do - # expect { chef_run }.to raise_error /`remi-php71` is not available for almalinux 9/ - # end - # end -end diff --git a/spec/remi_php72_spec.rb b/spec/remi_php72_spec.rb index 6f6e532..59fa893 100644 --- a/spec/remi_php72_spec.rb +++ b/spec/remi_php72_spec.rb @@ -11,14 +11,6 @@ default_attributes['yum']['remi-php72-debuginfo']['enabled'] = true default_attributes['yum']['remi-php72-debuginfo']['managed'] = true - context 'on CentOS 7' do - platform 'centos', '7' - - it { is_expected.to create_yum_repository('remi-safe') } - it { is_expected.to create_yum_repository('remi-php72') } - it { is_expected.to create_yum_repository('remi-php72-debuginfo') } - end - context 'on AlmaLinux 8' do platform 'almalinux', '8' diff --git a/spec/remi_php73_spec.rb b/spec/remi_php73_spec.rb index 6b4a61b..db8410b 100644 --- a/spec/remi_php73_spec.rb +++ b/spec/remi_php73_spec.rb @@ -11,14 +11,6 @@ default_attributes['yum']['remi-php73-debuginfo']['enabled'] = true default_attributes['yum']['remi-php73-debuginfo']['managed'] = true - context 'on CentOS 7' do - platform 'centos', '7' - - it { is_expected.to create_yum_repository('remi-safe') } - it { is_expected.to create_yum_repository('remi-php73') } - it { is_expected.to create_yum_repository('remi-php73-debuginfo') } - end - context 'on AlmaLinux 8' do platform 'almalinux', '8' diff --git a/spec/remi_php74_spec.rb b/spec/remi_php74_spec.rb index ef9b1f0..612bab5 100644 --- a/spec/remi_php74_spec.rb +++ b/spec/remi_php74_spec.rb @@ -11,14 +11,6 @@ default_attributes['yum']['remi-php74-debuginfo']['enabled'] = true default_attributes['yum']['remi-php74-debuginfo']['managed'] = true - context 'on CentOS 7' do - platform 'centos', '7' - - it { is_expected.to create_yum_repository('remi-safe') } - it { is_expected.to create_yum_repository('remi-php74') } - it { is_expected.to create_yum_repository('remi-php74-debuginfo') } - end - context 'on AlmaLinux 8' do platform 'almalinux', '8' diff --git a/spec/remi_php80_spec.rb b/spec/remi_php80_spec.rb index 8ba7662..9c905b6 100644 --- a/spec/remi_php80_spec.rb +++ b/spec/remi_php80_spec.rb @@ -11,14 +11,6 @@ default_attributes['yum']['remi-php80-debuginfo']['enabled'] = true default_attributes['yum']['remi-php80-debuginfo']['managed'] = true - context 'on CentOS 7' do - platform 'centos', '7' - - it { is_expected.to create_yum_repository('remi-safe') } - it { is_expected.to create_yum_repository('remi-php80') } - it { is_expected.to create_yum_repository('remi-php80-debuginfo') } - end - context 'on AlmaLinux 8' do platform 'almalinux', '8' diff --git a/spec/remi_php81_spec.rb b/spec/remi_php81_spec.rb index b521b0d..ac0d6e9 100644 --- a/spec/remi_php81_spec.rb +++ b/spec/remi_php81_spec.rb @@ -11,14 +11,6 @@ default_attributes['yum']['remi-php81-debuginfo']['enabled'] = true default_attributes['yum']['remi-php81-debuginfo']['managed'] = true - context 'on CentOS 7' do - platform 'centos', '7' - - it { is_expected.to create_yum_repository('remi-safe') } - it { is_expected.to create_yum_repository('remi-php81') } - it { is_expected.to_not create_yum_repository('remi-php81-debuginfo') } - end - context 'on AlmaLinux 8' do platform 'almalinux', '8' diff --git a/spec/remi_php82_spec.rb b/spec/remi_php82_spec.rb index 8c4a4fa..335a5ed 100644 --- a/spec/remi_php82_spec.rb +++ b/spec/remi_php82_spec.rb @@ -11,14 +11,6 @@ default_attributes['yum']['remi-php82-debuginfo']['enabled'] = true default_attributes['yum']['remi-php82-debuginfo']['managed'] = true - context 'on CentOS 7' do - platform 'centos', '7' - - it { is_expected.to create_yum_repository('remi-safe') } - it { is_expected.to create_yum_repository('remi-php82') } - it { is_expected.to_not create_yum_repository('remi-php82-debuginfo') } - end - context 'on AlmaLinux 8' do platform 'almalinux', '8' diff --git a/spec/remi_php83_spec.rb b/spec/remi_php83_spec.rb new file mode 100644 index 0000000..38aa3f5 --- /dev/null +++ b/spec/remi_php83_spec.rb @@ -0,0 +1,29 @@ +require 'spec_helper' + +describe 'yum-remi-chef::remi-php83' do + step_into :yum_remi_php83 + step_into :yum_remi_modular + step_into :yum_remi_safe + step_into :yum_remi + + default_attributes['yum']['remi-php83']['enabled'] = true + default_attributes['yum']['remi-php83']['managed'] = true + default_attributes['yum']['remi-php83-debuginfo']['enabled'] = true + default_attributes['yum']['remi-php83-debuginfo']['managed'] = true + + context 'on AlmaLinux 8' do + platform 'almalinux', '8' + + it { is_expected.to create_yum_repository('remi-safe') } + it { is_expected.to create_yum_repository('remi-modular') } + it { is_expected.to switch_to_dnf_module('php:remi-8.3') } + end + + context 'on AlmaLinux 9' do + platform 'almalinux', '9' + + it { is_expected.to create_yum_repository('remi-safe') } + it { is_expected.to create_yum_repository('remi-modular') } + it { is_expected.to switch_to_dnf_module('php:remi-8.3') } + end +end diff --git a/spec/remi_php84_spec.rb b/spec/remi_php84_spec.rb new file mode 100644 index 0000000..f9dacc0 --- /dev/null +++ b/spec/remi_php84_spec.rb @@ -0,0 +1,29 @@ +require 'spec_helper' + +describe 'yum-remi-chef::remi-php84' do + step_into :yum_remi_php84 + step_into :yum_remi_modular + step_into :yum_remi_safe + step_into :yum_remi + + default_attributes['yum']['remi-php84']['enabled'] = true + default_attributes['yum']['remi-php84']['managed'] = true + default_attributes['yum']['remi-php84-debuginfo']['enabled'] = true + default_attributes['yum']['remi-php84-debuginfo']['managed'] = true + + context 'on AlmaLinux 8' do + platform 'almalinux', '8' + + it { is_expected.to create_yum_repository('remi-safe') } + it { is_expected.to create_yum_repository('remi-modular') } + it { is_expected.to switch_to_dnf_module('php:remi-8.4') } + end + + context 'on AlmaLinux 9' do + platform 'almalinux', '9' + + it { is_expected.to create_yum_repository('remi-safe') } + it { is_expected.to create_yum_repository('remi-modular') } + it { is_expected.to switch_to_dnf_module('php:remi-8.4') } + end +end diff --git a/spec/remi_safe_spec.rb b/spec/remi_safe_spec.rb index 4c526bd..144c49a 100644 --- a/spec/remi_safe_spec.rb +++ b/spec/remi_safe_spec.rb @@ -6,12 +6,6 @@ default_attributes['yum']['remi-safe-debuginfo']['enabled'] = true default_attributes['yum']['remi-safe-debuginfo']['managed'] = true - context 'on CentOS 7' do - platform 'centos', '7' - - it { is_expected.to create_yum_repository('remi-safe') } - end - %w(8 9).each do |version| context "on AlmaLinux #{version}" do platform 'almalinux', version diff --git a/spec/remi_spec.rb b/spec/remi_spec.rb index 8518933..972ce4b 100644 --- a/spec/remi_spec.rb +++ b/spec/remi_spec.rb @@ -6,13 +6,6 @@ default_attributes['yum']['remi-debuginfo']['enabled'] = true default_attributes['yum']['remi-debuginfo']['managed'] = true - context 'on CentOS 7' do - platform 'centos', '7' - - it { is_expected.to create_yum_repository('remi') } - it { is_expected.to_not create_yum_repository('remi-debuginfo') } - end - %w(8 9).each do |version| context "on AlmaLinux #{version}" do platform 'almalinux', version @@ -22,10 +15,10 @@ end end - context 'on Fedora latest' do - platform 'fedora' - - it { is_expected.to create_yum_repository('remi') } - it { is_expected.to_not create_yum_repository('remi-debuginfo') } - end + # context 'on Fedora latest' do + # platform 'fedora' + # + # it { is_expected.to create_yum_repository('remi') } + # it { is_expected.to_not create_yum_repository('remi-debuginfo') } + # end end diff --git a/spec/remi_test_spec.rb b/spec/remi_test_spec.rb index ce1ef07..d0aa5b3 100644 --- a/spec/remi_test_spec.rb +++ b/spec/remi_test_spec.rb @@ -8,13 +8,6 @@ default_attributes['yum']['remi-test-debuginfo']['enabled'] = true default_attributes['yum']['remi-test-debuginfo']['managed'] = true - context 'on CentOS 7' do - platform 'centos', '7' - - it { is_expected.to create_yum_repository('remi-test') } - it { is_expected.to create_yum_repository('remi-test-debuginfo') } - end - %w(8 9).each do |version| context "on AlmaLinux #{version}" do platform 'almalinux', version @@ -24,10 +17,10 @@ end end - context 'on Fedora latest' do - platform 'fedora' - - it { is_expected.to create_yum_repository('remi-test') } - it { is_expected.to create_yum_repository('remi-test-debuginfo') } - end + # context 'on Fedora latest' do + # platform 'fedora' + # + # it { is_expected.to create_yum_repository('remi-test') } + # it { is_expected.to create_yum_repository('remi-test-debuginfo') } + # end end diff --git a/test/integration/inspec/controls/php_spec.rb b/test/integration/inspec/controls/php_spec.rb index 75553dc..52a8ce4 100644 --- a/test/integration/inspec/controls/php_spec.rb +++ b/test/integration/inspec/controls/php_spec.rb @@ -1,5 +1,4 @@ version = input('version') -shortver = version.delete('.').to_i control 'php' do title 'verify correct version of PHP and repo was installed' @@ -8,21 +7,7 @@ its('stdout') { should match /#{version}/ } end - if os.redhat? && os.release.to_i == 7 - describe yum.repo("remi-php#{shortver}") do - it { should exist } - it { should be_enabled } - its('mirrors') { should cmp "http://cdn.remirepo.net/enterprise/#{os.release.to_i}/php#{shortver}/mirror" } - end - - describe ini("/etc/yum.repos.d/remi-php#{shortver}.repo") do - its("remi-php#{shortver}.gpgcheck") { should cmp 1 } - its("remi-php#{shortver}.gpgkey") { should cmp 'https://rpms.remirepo.net/RPM-GPG-KEY-remi' } - end - else - # Centos 8 or Fedora use module instead of repo - describe command('dnf module list php') do - its('stdout') { should match /php +remi-#{version} \[e\]/ } - end + describe command('dnf module list php') do + its('stdout') { should match /php +remi-#{version} \[e\]/ } end end diff --git a/test/integration/inspec/controls/remi_spec.rb b/test/integration/inspec/controls/remi_spec.rb index 3a83bd7..a0fa8ae 100644 --- a/test/integration/inspec/controls/remi_spec.rb +++ b/test/integration/inspec/controls/remi_spec.rb @@ -9,11 +9,7 @@ when 'fedora' "http://cdn.remirepo.net/fedora/#{os.release.to_i}/remi/#{os.arch}/mirror" else # rhel - if os.release.to_i == 7 - "http://cdn.remirepo.net/enterprise/#{os.release.to_i}/remi/mirror" - else - "http://cdn.remirepo.net/enterprise/#{os.release.to_i}/remi/#{os.arch}/mirror" - end + "http://cdn.remirepo.net/enterprise/#{os.release.to_i}/remi/#{os.arch}/mirror" end end end @@ -26,8 +22,6 @@ 'https://rpms.remirepo.net/RPM-GPG-KEY-remi2024' else # rhel case os.release.to_i - when 7 - 'https://rpms.remirepo.net/RPM-GPG-KEY-remi' when 8 'https://rpms.remirepo.net/RPM-GPG-KEY-remi2018' when 9 diff --git a/test/integration/inspec/controls/remi_test_spec.rb b/test/integration/inspec/controls/remi_test_spec.rb index 54920bc..f613ce3 100644 --- a/test/integration/inspec/controls/remi_test_spec.rb +++ b/test/integration/inspec/controls/remi_test_spec.rb @@ -9,11 +9,7 @@ when 'fedora' "http://cdn.remirepo.net/fedora/#{os.release.to_i}/test/#{os.arch}/mirror" else # rhel - if os.release.to_i == 7 - "http://cdn.remirepo.net/enterprise/#{os.release.to_i}/test/mirror" - else - "http://cdn.remirepo.net/enterprise/#{os.release.to_i}/test/#{os.arch}/mirror" - end + "http://cdn.remirepo.net/enterprise/#{os.release.to_i}/test/#{os.arch}/mirror" end end end @@ -26,8 +22,6 @@ 'https://rpms.remirepo.net/RPM-GPG-KEY-remi2024' else # rhel case os.release.to_i - when 7 - 'https://rpms.remirepo.net/RPM-GPG-KEY-remi' when 8 'https://rpms.remirepo.net/RPM-GPG-KEY-remi2018' when 9