diff --git a/CHANGELOG.md b/CHANGELOG.md index 0069efc8..8102d698 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,7 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/) and this p ### Fixed +- Fixed `mariadbbackup_pkg_name` helper for yum-based platforms ([#276](https://github.com/sous-chefs/mariadb/issues/276)) - Fixed replication resource `load_current_value` to use Integers where required - Make `server_configuration` and `server_install` resources idempotent ([#265](https://github.com/sous-chefs/mariadb/issues/265)) diff --git a/libraries/helpers.rb b/libraries/helpers.rb index 1df2d5f2..c2f5cfb1 100644 --- a/libraries/helpers.rb +++ b/libraries/helpers.rb @@ -212,10 +212,15 @@ def secure_random end def mariadbbackup_pkg_name - if new_resource.version == '10.3' - 'mariadb-backup' + case node['platform_family'] + when 'rhel', 'fedora', 'amazon' + 'MariaDB-backup' else - "mariadb-backup-#{new_resource.version}" + if new_resource.version == '10.3' + 'mariadb-backup' + else + "mariadb-backup-#{new_resource.version}" + end end end diff --git a/test/cookbooks/test/recipes/galera_configuration.rb b/test/cookbooks/test/recipes/galera_configuration.rb index a844474d..4f0b2b0c 100644 --- a/test/cookbooks/test/recipes/galera_configuration.rb +++ b/test/cookbooks/test/recipes/galera_configuration.rb @@ -4,6 +4,12 @@ version '10.3' end +yum_repository 'epel' do + mirrorlist "http://mirrors.fedoraproject.org/mirrorlist?repo=epel-#{node['platform_version'].to_i}&arch=$basearch" + gpgkey "https://download.fedoraproject.org/pub/epel/RPM-GPG-KEY-EPEL-#{node['platform_version'].to_i}" + only_if { platform?('centos') } +end + mariadb_galera_configuration 'MariaDB Galera Configuration' do version '10.3' wsrep_sst_method 'mariabackup'