Commit 9eb45d11 authored by Romain Courteaud's avatar Romain Courteaud

Use librecipe.execute to provide perl binary.

Without this, system perl will be used.
parent de4f5964
......@@ -930,5 +930,29 @@ class Recipe(BaseSlapRecipe):
mysql_backup_cron = os.path.join(self.cron_d, 'mysql_backup')
open(mysql_backup_cron, 'w').write('0 0 * * * ' + backup_controller)
self.path_list.append(mysql_backup_cron)
# maatkit installation
for mk_script_name in (
'mk-variable-advisor',
'mk-table-usage-binary',
'mk-visual-explain',
'mk-config-diff',
'mk-deadlock-logger',
'mk-error-log',
'mk-index-usage',
'mk-query-advisor',
):
mk_argument_list = [self.options['perl_binary'],
self.options['%s_binary' % mk_script_name],
'--defaults-file=%s' % mysql_conf_path,
'--socket=%s' %mysql_conf['socket'].strip(), '--user=root',
]
environment = dict(PATH='%s' % self.bin_directory)
mk_exe = zc.buildout.easy_install.scripts([(
mk_script_name,'slapos.recipe.librecipe.execute', 'executee')],
self.ws, sys.executable, self.bin_directory, arguments=[
mk_argument_list, environment])[0]
self.path_list.append(mk_exe)
# The return could be more explicit database, user ...
return mysql_conf
......@@ -32,6 +32,14 @@ tidstorage_repozo_binary = ${buildout:bin-directory}/tidstorage_repozo
tidstoraged_binary = ${buildout:bin-directory}/tidstoraged
xtrabackup_binary = ${xtrabackup:location}/bin/xtrabackup_51
zabbix_agent_binary = ${zabbix-agent:location}/sbin/zabbix_agent
mk-variable-advisor-binary = ${perl:siteprefix}/bin/mk-variable-advisor
mk-table-usage-binary = ${perl:siteprefix}/bin/mk-table-usage
mk-visual-explain-binary = ${perl:siteprefix}/bin/mk-visual-explain
mk-config-diff-binary = ${perl:siteprefix}/bin/mk-config-diff
mk-deadlock-logger-binary = ${perl:siteprefix}/bin/mk-deadlock-logger
mk-error-log-binary = ${perl:siteprefix}/bin/mk-error-log
mk-index-usage-binary = ${perl:siteprefix}/bin/mk-index-usage
mk-query-advisor-binary = ${perl:siteprefix}/bin/mk-query-advisor
# cloudooo specific configuration
ooo_binary_path = ${libreoffice-bin:location}/program
......@@ -59,14 +67,6 @@ link_binary_list =
${poppler:location}/bin/pdfinfo
${poppler:location}/bin/pdftotext
${poppler:location}/bin/pdftohtml
${maatkit:location}/bin/mk-variable-advisor
${maatkit:location}/bin/mk-table-usage
${maatkit:location}/bin/mk-visual-explain
${maatkit:location}/bin/mk-config-diff
${maatkit:location}/bin/mk-deadlock-logger
${maatkit:location}/bin/mk-error-log
${maatkit:location}/bin/mk-index-usage
${maatkit:location}/bin/mk-query-advisor
bt5_repo_list =
${erp5:location}/product/ERP5/bootstrap bt5bootstrap
......
......@@ -40,7 +40,7 @@ extra-paths +=
[template]
url = ${:_profile_base_location_}/instance.cfg
md5sum = dc7b3515924a4d18bfb9094fa9538f56
md5sum = 4d06f3e4b80e8e9bd0d18a3fba3100a3
[eggcheck]
recipe = plone.recipe.command
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment