Skip to content

Commit

Permalink
feat: remove gearman / mysql binaries
Browse files Browse the repository at this point in the history
  • Loading branch information
Bellardia committed Jan 22, 2024
1 parent 793f5c3 commit 699e4f1
Show file tree
Hide file tree
Showing 16 changed files with 8 additions and 5 deletions.
Binary file not shown.
Binary file not shown.
Binary file removed base/files/mysql/libevent-core-2.1-6_amd64.deb
Binary file not shown.
Binary file removed base/files/mysql/libevent-core-2.1-6_arm64.deb
Binary file not shown.
Binary file removed base/files/mysql/libssl1.1_1.1.1f_amd64.deb
Binary file not shown.
Binary file removed base/files/mysql/libssl1.1_1.1.1f_arm64.deb
Binary file not shown.
Binary file removed base/files/mysql/mysql-client-5.7.42_amd64.deb
Binary file not shown.
Binary file removed base/files/mysql/mysql-client-5.7.42_arm64.deb
Binary file not shown.
Binary file removed base/files/mysql/mysql-client-core-5.7.42_amd64.deb
Binary file not shown.
Binary file removed base/files/mysql/mysql-client-core-5.7.42_arm64.deb
Binary file not shown.
Binary file removed base/files/mysql/mysql-server-5.7.42_amd64.deb
Binary file not shown.
Binary file removed base/files/mysql/mysql-server-5.7.42_arm64.deb
Binary file not shown.
Binary file removed base/files/mysql/mysql-server-core-5.7.42_amd64.deb
Binary file not shown.
Binary file removed base/files/mysql/mysql-server-core-5.7.42_arm64.deb
Binary file not shown.
5 changes: 3 additions & 2 deletions base/recipes/gearman.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,14 @@
retries 5
end

cookbook_files = "#{Chef::Config[:file_cache_path]}/cookbooks/#{cookbook_name}/files/gearman"
arch = case node["kernel"]["machine"]
when "aarch64", "arm64" then "arm64"
else "amd64"
end
boost_deb = "libboost-program-options1.71.0_1.71.0-6ubuntu6_#{arch}.deb"

execute "dpkg -i #{cookbook_files}/libboost-program-options1.71.0_1.71.0-6ubuntu6_#{arch}.deb;" do
execute "curl -sLO https://miscfile-staging.s3.amazonaws.com/chef/base/gearman/#{boost_deb} && dpkg -i #{boost_deb};" do
cwd "/tmp"
only_if { node["lsb"]["release"].to_i >= 22 }
end

Expand Down
8 changes: 5 additions & 3 deletions base/recipes/mysql.rb
Original file line number Diff line number Diff line change
Expand Up @@ -35,20 +35,22 @@
action :nothing
end

cookbook_files = "#{Chef::Config[:file_cache_path]}/cookbooks/#{cookbook_name}/files/mysql"
arch = case node["kernel"]["machine"]
when "aarch64", "arm64" then "arm64"
else "amd64"
end

dependencies = node["lsb"]["release"].to_i >= 22 ? ["libevent-core-2.1-6", "libssl1.1_1.1.1f"] : ["libevent-core-2.1-6"]
dependencies.each do |pkg|
execute "dpkg -i #{cookbook_files}/#{pkg}_#{arch}.deb;" do
execute "curl -sLO https://miscfile-staging.s3.amazonaws.com/chef/base/mysql/#{pkg}_#{arch}.deb && dpkg -i #{pkg}_#{arch}.deb" do
cwd "/tmp"
not_if "dpkg -S #{pkg} | grep '^#{pkg}'"
end
end
["mysql-client-core", "mysql-client", "mysql-server-core", "mysql-server"].each do |pkg|
execute "DEBIAN_FRONTEND=noninteractive dpkg -i #{cookbook_files}/#{pkg}-#{node["mysql"]["version"]}_#{arch}.deb || true" do
package = "#{pkg}-#{node["mysql"]["version"]}_#{arch}.deb"
execute "curl -sLO https://miscfile-staging.s3.amazonaws.com/chef/base/mysql/#{package} && (DEBIAN_FRONTEND=noninteractive dpkg -i #{package} || true)" do
cwd "/tmp"
not_if "dpkg -S #{pkg}- | grep '^#{pkg}-#{node["mysql"]["version"].to_i}'"
notifies :run, "execute[mysql-configure]", :before if pkg == "mysql-server"
notifies :edit, "replace_or_add[mysql-dpkg-configure]", :immediately if pkg == "mysql-server"
Expand Down

0 comments on commit 699e4f1

Please sign in to comment.