Mysql 8.0.28 => 8.0.33 (#8197)

This commit is contained in:
Ed Reel
2023-04-19 10:28:07 -05:00
committed by GitHub
parent fceba3a202
commit 9059eb03f1

View File

@@ -3,23 +3,20 @@ require 'package'
class Mysql < Package
description "MySQL Community Edition is a freely downloadable version of the world's most popular open source database"
homepage 'https://www.mysql.com/'
version '8.0.28'
version '8.0.33'
license 'GPL-2'
compatibility 'x86_64'
source_url 'https://dev.mysql.com/get/Downloads/MySQL-8.0/mysql-8.0.28-linux-glibc2.17-x86_64-minimal.tar.xz'
source_sha256 '39d58319a2d34b27dc229eb32c07f3902863fb5dfe25d25b5d537cc7299b4fed'
binary_url({
})
binary_sha256({
})
source_url 'https://dev.mysql.com/get/Downloads/MySQL-8.0/mysql-8.0.33-linux-glibc2.12-x86_64.tar.xz'
source_sha256 '4900c972a508d5b2f6d28bb9c51cf45906b6746d616d978f3996fbf2ca59467f'
depends_on 'numactl'
no_fhs
no_compile_needed
def self.install
ENV['CREW_FHS_NONCOMPLIANCE_ONLY_ADVISORY'] = '1'
reload_constants
FileUtils.mkdir_p "#{CREW_DEST_PREFIX}/bin"
FileUtils.mkdir_p "#{CREW_DEST_PREFIX}/etc/bash.d"
FileUtils.mkdir_p "#{CREW_DEST_PREFIX}/mysql"
FileUtils.mkdir_p "#{CREW_DEST_PREFIX}/share"
FileUtils.mv 'man/', "#{CREW_DEST_PREFIX}/share"
@@ -30,6 +27,9 @@ class Mysql < Package
end
FileUtils.ln_s "#{CREW_PREFIX}/mysql/support-files/mysql.server", "#{CREW_DEST_PREFIX}/bin/mysql.server"
FileUtils.ln_s "#{CREW_PREFIX}/mysql/support-files/mysql_multi.server", "#{CREW_DEST_PREFIX}/bin/mysql_multi.server"
File.write "#{CREW_DEST_PREFIX}/etc/bash.d/01-mysql", <<~EOF
[ -x #{CREW_PREFIX}/bin/mysql.server ] && #{CREW_PREFIX}/bin/mysql.server start
EOF
end
def self.postinstall
@@ -40,17 +40,14 @@ class Mysql < Package
puts 'To lockdown permissions, execute the following:'.orange
puts 'mysql_secure_installation'.orange
puts
puts 'To reset the root password, see https://dev.mysql.com/doc/refman/8.0/en/resetting-permissions.html#resetting-permissions-unix'.lightblue
puts 'To reset the root password, see https://dev.mysql.com/doc/refman/8.0/en/resetting-permissions.html#resetting-permissions-unix.'.lightblue
puts
puts 'To start/stop mysqld, execute the following:'.lightblue
puts 'mysql.server start'.lightblue
puts 'mysql.server stop'.lightblue
puts
puts 'To start mysqld on login, execute the following:'.lightblue
puts "echo 'if [ -f #{CREW_PREFIX}/bin/mysql.server ]; then' >> ~/.bashrc".lightblue
puts "echo ' #{CREW_PREFIX}/bin/mysql.server start' >> ~/.bashrc".lightblue
puts "echo 'fi' >> ~/.bashrc".lightblue
puts 'source ~/.bashrc'.lightblue
puts 'mysql.server start will execute on login.'.lightblue
puts "To prevent this, edit or remove #{CREW_PREFIX}/etc/bash.d/01-mysql.".lightblue
puts
puts "Databases are stored in #{CREW_PREFIX}/mysql/data.".lightblue
puts
@@ -66,7 +63,7 @@ class Mysql < Package
case $stdin.gets.chomp.downcase
when 'y', 'yes'
FileUtils.rm_rf data_dir.to_s
puts "#{data_dir} removed.".lightred
puts "#{data_dir} removed.".lightgreen
else
puts "#{data_dir} saved.".lightgreen
end