diff --git a/buildout/development.cfg b/buildout/development.cfg index c8343c90f83f224626f457fc76f85c4a04275f5f..4e4b28b04082f1d0f92ceb37e10fd1783f7ded4e 100644 --- a/buildout/development.cfg +++ b/buildout/development.cfg @@ -3,7 +3,6 @@ extends = official.cfg parts += create-directories - mysql-binaries mysql-cnf mysql-instance start-mysql-instance diff --git a/buildout/mysql-instance/buildout.cfg b/buildout/mysql-instance/buildout.cfg index 4b4334bd06a735ab60e64d19a08d11c675cac530..6c00efa8ad2f967734dc6bf54f90c4c355fc5273 100644 --- a/buildout/mysql-instance/buildout.cfg +++ b/buildout/mysql-instance/buildout.cfg @@ -4,7 +4,6 @@ [buildout] parts = - mycnf mysql-instance [configuration] @@ -19,17 +18,17 @@ mysql_cnf_file = ${buildout:etc-directory}/my.cnf [mysql-bin] recipe = collective.recipe.template input = ${buildout:directory}/mysql-instance/templates/mysql.in -output = ${buildout:directory}/bin/mysql +output = ${buildout:data-bin-directory}/mysql [mysql-admin] recipe = collective.recipe.template input = ${buildout:directory}/mysql-instance/templates/mysqladmin.in -output = ${buildout:directory}/bin/mysqladmin +output = ${buildout:data-bin-directory}/mysqladmin -[mysqld-bin] +[mysqld_safe-bin] recipe = collective.recipe.template -input = ${buildout:directory}/mysql-instance/templates/mysqld.in -output = ${buildout:directory}/bin/mysqld +input = ${buildout:directory}/mysql-instance/templates/mysqld_safe.in +output = ${buildout:data-bin-directory}/mysqld_safe [mysql-cnf] recipe = collective.recipe.template @@ -37,6 +36,13 @@ input = ${buildout:directory}/mysql-instance/templates/my.cnf.in output = ${configuration:mysql_cnf_file} [mysql-instance] +depends = + ${create-directories:command} + ${mysql-cnf:output} + ${mysql-bin:output} + ${mysql-admin:output} + ${mysqld_safe-bin:output} + recipe = plone.recipe.command command = mkdir -p ${configuration:mysql_datadir} @@ -44,7 +50,7 @@ command = [start-mysql-instance] recipe = plone.recipe.command -command = ${software_definition:software_home}/bin/mysqld_safe --defaults-file=${configuration:mysql_cnf_file} & +command = ${buildout:data-bin-directory}/bin/mysqld_safe & update-command = ${:command} [stop-mysql-instance] diff --git a/buildout/mysql-instance/templates/mysql.in b/buildout/mysql-instance/templates/mysql.in index 812a8aae201563fde245c686046e7873b4e43761..e0fdfdfb2f6708dbddaaca817621eef0e7d31349 100755 --- a/buildout/mysql-instance/templates/mysql.in +++ b/buildout/mysql-instance/templates/mysql.in @@ -1,3 +1,3 @@ #!/bin/sh -${software_definition:mysql_software}/bin/mysql --no-defaults --protocol=tcp --host=${configuration:mysql_host} --port=${configuration:mysql_port} $@ +${software_definition:mysql_software}/bin/mysql --defaults-file=${configuration:mysql_cnf_file} $@ diff --git a/buildout/mysql-instance/templates/mysqladmin.in b/buildout/mysql-instance/templates/mysqladmin.in index 57cd1eb87365c6b29ab557f0cab623f08602acf2..db39d292e5861fc5089d42203c5221f7067b6e91 100755 --- a/buildout/mysql-instance/templates/mysqladmin.in +++ b/buildout/mysql-instance/templates/mysqladmin.in @@ -1,3 +1,3 @@ #!/bin/sh -${software_definition:mysql_software}/bin/mysqladmin --no-defaults --protocol=tcp --host=${configuration:mysql_host} --port=${configuration:mysql_port} $@ +${software_definition:mysql_software}/bin/mysqladmin --defaults-file=${configuration:mysql_cnf_file} $@ diff --git a/buildout/mysql-instance/templates/mysqld.in b/buildout/mysql-instance/templates/mysqld.in deleted file mode 100755 index d27490b03425410a4a3b0402a47379eb9758cdb7..0000000000000000000000000000000000000000 --- a/buildout/mysql-instance/templates/mysqld.in +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/sh - -${software_definition:mysql_software}/bin/mysqld_safe --no-defaults --port=${configuration:mysql_port} --pid-file=${configuration:mysql_pid} --log-error=${configuration:mysql_error_log} --basedir=${software_definition:mysql_software} --datadir=${configuration:mysql_datadir} --socket=${configuration:mysql_sock} diff --git a/buildout/mysql-instance/templates/mysqld_safe.in b/buildout/mysql-instance/templates/mysqld_safe.in new file mode 100755 index 0000000000000000000000000000000000000000..9a12ebb7fdabef1a9766d2d8760377c89d4947a4 --- /dev/null +++ b/buildout/mysql-instance/templates/mysqld_safe.in @@ -0,0 +1,3 @@ +#!/bin/sh + +${software_definition:mysql_software}/bin/mysqld_safe --defaults-file=${configuration:mysql_cnf_file} $@ diff --git a/buildout/mysql-tritonn-5.0/buildout.cfg b/buildout/mysql-tritonn-5.0/buildout.cfg index 7b384b124890b72dad487832c42e673fcaacad9f..a91be45583d38a55e8e6ed976705294e11181c43 100644 --- a/buildout/mysql-tritonn-5.0/buildout.cfg +++ b/buildout/mysql-tritonn-5.0/buildout.cfg @@ -42,15 +42,6 @@ environment = CXXFLAGS =-I${senna:location}/include LDLAGS =-L${senna:location}/lib -[mysql-binaries] -# another approach - software buildout provides easily accessible binaries -recipe = plone.recipe.command -command = - ln -sf ${software_definition:mysql_software}/bin/mysql ${buildout:directory}/bin/mysql - ln -sf ${software_definition:mysql_software}/bin/mysqladmin ${buildout:directory}/bin/mysqladmin - ln -sf ${software_definition:mysql_software}/bin/mysqld_safe ${buildout:directory}/bin/mysqld_safe - ln -sf ${software_definition:mysql_software}/bin/mysql_install_db ${buildout:directory}/bin/mysql_install_db - [requirements] binary = flex bison patch gcc g++ development = /usr/include/termcap.h /usr/include/curses.h diff --git a/buildout/official.cfg b/buildout/official.cfg index 55f33ab333ff69a47f9a714ccb87d6e015b5fe4d..d3647940849e79846738b5b0b4d1aa3596f8b6ad 100644 --- a/buildout/official.cfg +++ b/buildout/official.cfg @@ -17,6 +17,7 @@ extends = var-directory = ${:directory}/var etc-directory = ${:var-directory}/etc log-directory = ${:var-directory}/log +data-bin-directory = ${:var-directory}/bin versions = versions find-links = @@ -63,6 +64,7 @@ command = mkdir -p ${buildout:etc-directory} mkdir -p ${buildout:var-directory} mkdir -p ${buildout:log-directory} + mkdir -p ${buildout:data-bin-directory} [software_definition] software_home = ${buildout:directory} diff --git a/buildout/zope-instance/buildout.cfg b/buildout/zope-instance/buildout.cfg index ddf93f4c825b28cd57ba69a64ad0e7359fd294f3..a22a39a1be08b7813c6bca5bcf3ec3df34ce985d 100644 --- a/buildout/zope-instance/buildout.cfg +++ b/buildout/zope-instance/buildout.cfg @@ -40,7 +40,7 @@ products = # XXX: This have to be converted into recipe recipe = plone.recipe.command command = - echo "CREATE DATABASE IF NOT EXISTS ${create_erp5_site:mysql_database_name} DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci" | ${software_definition:software_home}/bin/mysql --defaults-file=${configuration:mysql_cnf_file} -u root + echo "CREATE DATABASE IF NOT EXISTS ${create_erp5_site:mysql_database_name} DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci" | ${buildout:data-bin-directory}/mysql -u root [create_erp5_site] depends = ${create_mysql_database:command}