Skip to content

Commit

Permalink
allow gpgkey to be configured and use 2023 key by default (#58)
Browse files Browse the repository at this point in the history
* allow gpgkey to be configured and use 2023 key by default

Signed-off-by: Ben Konick <[email protected]>

* use 2023 key by default

Signed-off-by: Ben Konick <[email protected]>

* keep 5.7 on 2022 key

Signed-off-by: Ben Konick <[email protected]>

---------

Signed-off-by: Ben Konick <[email protected]>
  • Loading branch information
bkonick authored Jan 31, 2024
1 parent cafb5b7 commit 5099109
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 6 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## Unreleased

- Add gpgkey property to repo resource
- Default to 2023 GPG key

## 5.3.4 - *2023-03-01*

- Remove CircleCI
Expand Down
2 changes: 1 addition & 1 deletion attributes/mysql-connectors-community.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
default['yum']['mysql-connectors-community']['repositoryid'] = 'mysql-connectors-community'
default['yum']['mysql-connectors-community']['gpgkey'] = 'https://repo.mysql.com/RPM-GPG-KEY-mysql-2022'
default['yum']['mysql-connectors-community']['gpgkey'] = 'https://repo.mysql.com/RPM-GPG-KEY-mysql-2023'
default['yum']['mysql-connectors-community']['description'] = 'MySQL Connectors Community'
default['yum']['mysql-connectors-community']['gpgcheck'] = true
default['yum']['mysql-connectors-community']['enabled'] = true
Expand Down
14 changes: 9 additions & 5 deletions resources/repo.rb
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,10 @@
default: true,
description: 'Enable or disable GPG checks'

property :gpgkey, [String, Array],
default: 'https://repo.mysql.com/RPM-GPG-KEY-mysql-2023',
description: 'GPG key(s)'

property :mysql_community_server, [true, false],
default: true,
description: 'Enable or disable mysql community server repo'
Expand Down Expand Up @@ -65,39 +69,39 @@
baseurl "https://repo.mysql.com/yum/mysql-#{new_resource.version}-community/#{os}/#{os_ver}/$basearch/"
gpgcheck new_resource.gpgcheck
enabled new_resource.mysql_community_server
gpgkey 'https://repo.mysql.com/RPM-GPG-KEY-mysql-2022'
gpgkey new_resource.gpgkey
end

yum_repository 'mysql-connectors-community' do
description 'MySQL Connectors Community'
baseurl "https://repo.mysql.com/yum/mysql-connectors-community/#{os}/#{os_ver}/$basearch/"
gpgcheck new_resource.gpgcheck
enabled new_resource.mysql_connectors_community
gpgkey 'https://repo.mysql.com/RPM-GPG-KEY-mysql-2022'
gpgkey new_resource.gpgkey
end

yum_repository 'mysql-tools-community' do
description 'MySQL Tools Community'
baseurl "https://repo.mysql.com/yum/mysql-tools-community/#{os}/#{os_ver}/$basearch/"
gpgcheck new_resource.gpgcheck
enabled new_resource.mysql_tools_community
gpgkey 'https://repo.mysql.com/RPM-GPG-KEY-mysql-2022'
gpgkey new_resource.gpgkey
end

yum_repository 'mysql-tools-preview' do
description 'MySQL Tools Preview'
baseurl "https://repo.mysql.com/yum/mysql-tools-preview/#{os}/#{os_ver}/$basearch/"
gpgcheck new_resource.gpgcheck
enabled new_resource.mysql_tools_preview
gpgkey 'https://repo.mysql.com/RPM-GPG-KEY-mysql-2022'
gpgkey new_resource.gpgkey
end

yum_repository 'mysql-cluster-community' do
description "MySQL Cluster #{new_resource.version} Community"
baseurl "https://repo.mysql.com/yum/mysql-cluster-#{new_resource.version}-community/#{os}/#{os_ver}/$basearch/"
gpgcheck new_resource.gpgcheck
enabled new_resource.mysql_cluster_community
gpgkey 'https://repo.mysql.com/RPM-GPG-KEY-mysql-2022'
gpgkey new_resource.gpgkey
end
end

Expand Down

0 comments on commit 5099109

Please sign in to comment.