Commit 28ba5cca authored by Cédric de Saint Martin's avatar Cédric de Saint Martin
Browse files

Merge branch 'master' into wordpress

parents d01956ec c737e941
Changes Changes
======= =======
0.64 (Unrelease) 0.65 (2012-09-07)
---------------- -----------------
* No change yet. * No change yet.
0.65 (2012-09-07)
-----------------
* Add egg_test, recipe allowing to do "python setup.py test" on a list of
eggs. [Rafael Monnerat, Cedric de Saint Martin]
0.64.2 (2012-08.28)
-------------------
* Specify description on gitinit recipe. [Antoine Catton]
0.64.1 (2012-08-28)
-------------------
* Fix: minor fix on downloader recipe in order to allow cross-device renaming.
[Antoine Catton]
0.64 (2012-08-27)
----------------
* Fix: remove "template" recipe which was collinding with slapos.recipe.template.
[Antoine Catton]
0.63 (2012-08-22) 0.63 (2012-08-22)
---------------- ----------------
......
...@@ -28,8 +28,8 @@ filename = imagemagick-6.6.6-1-no-gsx-gsc-probe.patch ...@@ -28,8 +28,8 @@ filename = imagemagick-6.6.6-1-no-gsx-gsc-probe.patch
[imagemagick] [imagemagick]
recipe = hexagonit.recipe.cmmi recipe = hexagonit.recipe.cmmi
url = ftp://ftp.imagemagick.org/pub/ImageMagick/ImageMagick-6.7.8-6.tar.bz2 url = ftp://ftp.imagemagick.org/pub/ImageMagick/ImageMagick-6.7.8-8.tar.bz2
md5sum = e9d90a09b42fe8d9a8cf807274adff30 md5sum = 4e5c8f102f3e7401587c924f5b4bca15
depends = depends =
${libtiff:version} ${libtiff:version}
${librsvg:version} ${librsvg:version}
......
...@@ -12,12 +12,12 @@ find-links = ...@@ -12,12 +12,12 @@ find-links =
[libreoffice-bin] [libreoffice-bin]
recipe = slapos.recipe.build recipe = slapos.recipe.build
# here, two %s are used, first one is for directory name (eg. x86_64), and second one is for filename (eg. x86-64). # here, two %s are used, first one is for directory name (eg. x86_64), and second one is for filename (eg. x86-64).
version = 3.5.5 version = 3.5.6
url = http://download.documentfoundation.org/libreoffice/stable/${:version}/rpm/%s/LibO_${:version}_Linux_%s_install-rpm_en-US.tar.gz url = http://download.documentfoundation.org/libreoffice/stable/${:version}/rpm/%s/LibO_${:version}_Linux_%s_install-rpm_en-US.tar.gz
# supported architectures md5sums # supported architectures md5sums
md5sum_x86 = 88434a91af56a751fad2e737c2ad6bba md5sum_x86 = 079609188b86ede3b3eebe2b75862b31
md5sum_x86-64 = a8c2c35af75807c3ed6c8d04fe6c6419 md5sum_x86-64 = 6a559fa9c62c810464254d129bd2dc17
# where office code can be found? # where office code can be found?
officedir = libreoffice3.5 officedir = libreoffice3.5
......
[buildout]
extends =
../pcre/buildout.cfg
../zlib/buildout.cfg
../openssl/buildout.cfg
parts = nginx
[nginx]
recipe = hexagonit.recipe.cmmi
url = http://nginx.org/download/nginx-1.0.14.tar.gz
configure-options=
--with-ipv6
--with-http_ssl_module
--with-ld-opt="-L ${zlib:location}/lib -L ${openssl:location}/lib -L ${pcre:location}/lib -Wl,-rpath=${pcre:location}/lib -Wl,-rpath=${zlib:location}/lib -Wl,-rpath=${openssl:location}/lib"
--with-cc-opt="-I ${pcre:location}/include -I ${openssl:location}/include -I ${zlib:location}/include"
...@@ -8,8 +8,8 @@ extends = ...@@ -8,8 +8,8 @@ extends =
[openldap] [openldap]
recipe = hexagonit.recipe.cmmi recipe = hexagonit.recipe.cmmi
url = ftp://ftp.openldap.org/pub/OpenLDAP/openldap-release/openldap-2.4.31.tgz url = ftp://ftp.openldap.org/pub/OpenLDAP/openldap-release/openldap-2.4.32.tgz
md5sum = 804c6cb5698db30b75ad0ff1c25baefd md5sum = 6a3e85cf61860ca5e8a1eba6753dd9d0
configure-options = configure-options =
--disable-static --disable-static
--disable-slapd --disable-slapd
......
[buildout]
parts = python-setuptools
[setuptools-download]
recipe = slapos.recipe.download
filename = setuptools-0.6c11-py2.7.egg
url = http://pypi.python.org/packages/2.7/s/setuptools/${:filename}
md5sum = fe1f997bc722265116870bc7919059ea
[python-setuptools]
# Hack to manually install setuptools outside of the Buildout environment.
# It is useful in case of using things like "python setup.py test" in eggs
# downloaded from source (so not using bildout magic).
# To be able to use it, you should in your instance do an:
# export PYTHONPATH=${:location} (defined in ${:environment})
location = ${buildout:parts-directory}/${:_buildout_section_name_}
environment = export PATH=${python2.7:location}/bin:$PATH; export PYTHONPATH=${:location};
stop-on-error = true
recipe = plone.recipe.command
update = true
command = ${:environment} (mkdir ${:location}; sh ${setuptools-download:location}/${setuptools-download:filename} --install-dir ${:location}) || (rm -fr ${:location}; exit 1)
...@@ -127,14 +127,14 @@ ipython = 0.13 ...@@ -127,14 +127,14 @@ ipython = 0.13
lxml = 2.3.5 lxml = 2.3.5
meld3 = 0.6.8 meld3 = 0.6.8
netaddr = 0.7.7 netaddr = 0.7.7
slapos.core = 0.28.4 slapos.core = 0.28.5
slapos.libnetworkcache = 0.12 slapos.libnetworkcache = 0.12
xml-marshaller = 0.9.7 xml-marshaller = 0.9.7
z3c.recipe.scripts = 1.0.1 z3c.recipe.scripts = 1.0.1
zc.recipe.egg = 1.3.2 zc.recipe.egg = 1.3.2
# Required by: # Required by:
# slapos.core==0.28.4 # slapos.core==0.28.5
Flask = 0.9 Flask = 0.9
# Required by: # Required by:
...@@ -146,11 +146,11 @@ Sphinx = 1.1.3 ...@@ -146,11 +146,11 @@ Sphinx = 1.1.3
hexagonit.recipe.download = 1.5.1 hexagonit.recipe.download = 1.5.1
# Required by: # Required by:
# slapos.core==0.28.4 # slapos.core==0.28.5
netifaces = 0.8 netifaces = 0.8
# Required by: # Required by:
# slapos.core==0.28.4 # slapos.core==0.28.5
# slapos.libnetworkcache==0.12 # slapos.libnetworkcache==0.12
# supervisor==3.0a12 # supervisor==3.0a12
# zc.buildout==1.6.0-dev-SlapOS-006 # zc.buildout==1.6.0-dev-SlapOS-006
...@@ -158,9 +158,9 @@ netifaces = 0.8 ...@@ -158,9 +158,9 @@ netifaces = 0.8
setuptools = 0.6c12dev-r88846 setuptools = 0.6c12dev-r88846
# Required by: # Required by:
# slapos.core==0.28.4 # slapos.core==0.28.5
supervisor = 3.0a12 supervisor = 3.0a12
# Required by: # Required by:
# slapos.core==0.28.4 # slapos.core==0.28.5
zope.interface = 4.0.1 zope.interface = 4.0.1
...@@ -2,7 +2,19 @@ ...@@ -2,7 +2,19 @@
parts = tar parts = tar
[tar-drop.gets.patch]
recipe = hexagonit.recipe.download
url = ${:_profile_base_location_}/${:filename}
md5sum = 9352820566aa3534a04bd269c9f89f48
download-only = true
filename = drop.gets.patch
[tar] [tar]
virtual-depends = ${tar-drop.gets.patch:md5sum}
patch-options = -p1
patches =
${tar-drop.gets.patch:location}/${tar-drop.gets.patch:filename}
recipe = hexagonit.recipe.cmmi recipe = hexagonit.recipe.cmmi
url = http://ftp.gnu.org/gnu/tar/tar-1.26.tar.gz url = http://ftp.gnu.org/gnu/tar/tar-1.26.tar.gz
md5sum = 00d1e769c6af702c542cca54b728920d md5sum = 00d1e769c6af702c542cca54b728920d
......
diff -ur tar-1.26.orig/gnu/stdio.in.h tar-1.26/gnu/stdio.in.h
--- tar-1.26.orig/gnu/stdio.in.h 2011-03-12 10:14:33.000000000 +0100
+++ tar-1.26/gnu/stdio.in.h 2012-08-24 15:35:22.299190847 +0200
@@ -164,7 +164,10 @@
so any use of gets warrants an unconditional warning. Assume it is
always declared, since it is required by C89. */
#undef gets
+#if defined(__GLIBC__) && !defined(__UCLIBC__) && !__GLIBC_PREREQ(2, 16)
_GL_WARN_ON_USE (gets, "gets is a security hole - use fgets instead");
+#endif
+
#if @GNULIB_FOPEN@
# if @REPLACE_FOPEN@
...@@ -40,5 +40,5 @@ environment = ...@@ -40,5 +40,5 @@ environment =
[varnish-3.0] [varnish-3.0]
<= varnish-2.1 <= varnish-2.1
url = http://repo.varnish-cache.org/source/varnish-3.0.2.tar.gz url = http://repo.varnish-cache.org/source/varnish-3.0.3.tar.gz
md5sum = c8eae0aabbe66b6daabdf3a1f58cd47a md5sum = 714310c83fdbd2061d897dacd3f63d8b
...@@ -2,7 +2,7 @@ from setuptools import setup, find_packages ...@@ -2,7 +2,7 @@ from setuptools import setup, find_packages
import glob import glob
import os import os
version = '0.63-dev' version = '0.66-dev'
name = 'slapos.cookbook' name = 'slapos.cookbook'
long_description = open("README.txt").read() + "\n" + \ long_description = open("README.txt").read() + "\n" + \
open("CHANGES.txt").read() + "\n" open("CHANGES.txt").read() + "\n"
...@@ -50,7 +50,7 @@ setup(name=name, ...@@ -50,7 +50,7 @@ setup(name=name,
'check_port_listening = slapos.recipe.check_port_listening:Recipe', 'check_port_listening = slapos.recipe.check_port_listening:Recipe',
'check_url_available = slapos.recipe.check_url_available:Recipe', 'check_url_available = slapos.recipe.check_url_available:Recipe',
'cloud9 = slapos.recipe.cloud9:Recipe', 'cloud9 = slapos.recipe.cloud9:Recipe',
'cloudooo.test = slapos.recipe.cloudooo_test:Recipe', 'cloudooo.test = slapos.recipe.erp5_test:CloudoooRecipe',
'cron.d = slapos.recipe.dcron:Part', 'cron.d = slapos.recipe.dcron:Part',
'cron = slapos.recipe.dcron:Recipe', 'cron = slapos.recipe.dcron:Recipe',
'davstorage = slapos.recipe.davstorage:Recipe', 'davstorage = slapos.recipe.davstorage:Recipe',
...@@ -59,6 +59,7 @@ setup(name=name, ...@@ -59,6 +59,7 @@ setup(name=name,
'dropbear.client = slapos.recipe.dropbear:Client', 'dropbear.client = slapos.recipe.dropbear:Client',
'dropbear = slapos.recipe.dropbear:Recipe', 'dropbear = slapos.recipe.dropbear:Recipe',
'duplicity = slapos.recipe.duplicity:Recipe', 'duplicity = slapos.recipe.duplicity:Recipe',
'egg_test = slapos.recipe.erp5_test:EggTestRecipe',
'equeue = slapos.recipe.equeue:Recipe', 'equeue = slapos.recipe.equeue:Recipe',
'erp5.bootstrap = slapos.recipe.erp5_bootstrap:Recipe', 'erp5.bootstrap = slapos.recipe.erp5_bootstrap:Recipe',
'erp5.promise = slapos.recipe.erp5_promise:Recipe', 'erp5.promise = slapos.recipe.erp5_promise:Recipe',
...@@ -130,7 +131,6 @@ setup(name=name, ...@@ -130,7 +131,6 @@ setup(name=name,
'sshkeys_authority = slapos.recipe.sshkeys_authority:Recipe', 'sshkeys_authority = slapos.recipe.sshkeys_authority:Recipe',
'stunnel = slapos.recipe.stunnel:Recipe', 'stunnel = slapos.recipe.stunnel:Recipe',
'symbolic.link = slapos.recipe.symbolic_link:Recipe', 'symbolic.link = slapos.recipe.symbolic_link:Recipe',
'template = slapos.recipe.template:Recipe',
'testnode = slapos.recipe.testnode:Recipe', 'testnode = slapos.recipe.testnode:Recipe',
'tidstorage = slapos.recipe.tidstorage:Recipe', 'tidstorage = slapos.recipe.tidstorage:Recipe',
'urlparse = slapos.recipe._urlparse:Recipe', 'urlparse = slapos.recipe._urlparse:Recipe',
......
##############################################################################
#
# Copyright (c) 2010 Vifib SARL and Contributors. All Rights Reserved.
#
# WARNING: This program as such is intended to be used by professional
# programmers who take the whole responsibility of assessing all potential
# consequences resulting from its eventual inadequacies and bugs
# End users who are looking for a ready-to-use solution with commercial
# guarantees and support are strongly adviced to contract a Free Software
# Service Company
#
# This program is Free Software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 3
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#
##############################################################################
from slapos.recipe.librecipe import GenericBaseRecipe
import urlparse
class Recipe(GenericBaseRecipe):
def install(self):
path_list = []
common_dict = dict(
prepend_path=self.options['prepend-path'],
)
common_list = [
"--paster_path", self.options['ooo-paster'],
self.options['configuration-file']
]
run_unit_test_path = self.createPythonScript(self.options['run-unit-test'],
__name__ + '.test.runUnitTest', [dict(
call_list=[self.options['run-unit-test-binary'],
] + common_list, **common_dict)])
path_list.append(run_unit_test_path)
path_list.append(self.createPythonScript(self.options['run-test-suite'],
__name__ + '.test.runTestSuite', [dict(
call_list=[self.options['run-test-suite-binary'],
], **common_dict)]))
return path_list
##############################################################################
#
# Copyright (c) 2010 Vifib SARL and Contributors. All Rights Reserved.
#
# WARNING: This program as such is intended to be used by professional
# programmers who take the whole responsibility of assessing all potential
# consequences resulting from its eventual inadequacies and bugs
# End users who are looking for a ready-to-use solution with commercial
# guarantees and support are strongly adviced to contract a Free Software
# Service Company
#
# This program is Free Software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 3
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#
##############################################################################
import os
import sys
def runTestSuite(args):
env = os.environ.copy()
d = args[0]
env['PATH'] = ':'.join([d['prepend_path']] + os.environ['PATH'].split(':'))
# Deal with Shebang size limitation
executable_filepath = d['call_list'][0]
file_object = open(executable_filepath, 'r')
line = file_object.readline()
file_object.close()
argument_list = []
if line[:2] == '#!':
executable_filepath = line[2:].strip()
argument_list.append(executable_filepath)
argument_list.extend(d['call_list'])
argument_list.extend(sys.argv[1:])
argument_list.append(env)
os.execle(executable_filepath, *argument_list)
def runUnitTest(args):
env = os.environ.copy()
d = args[0]
env['PATH'] = ':'.join([d['prepend_path']] + os.environ.get('PATH', '').split(':'))
# Deal with Shebang size limitation
executable_filepath = d['call_list'][0]
file_object = open(executable_filepath, 'r')
line = file_object.readline()
file_object.close()
argument_list = []
if line[:2] == '#!':
executable_filepath = line[2:].strip()
argument_list.append(executable_filepath)
argument_list.extend(d['call_list'])
argument_list.extend(sys.argv[1:])
argument_list.append(env)
os.execle(executable_filepath, *argument_list)
...@@ -59,7 +59,7 @@ def service(args): ...@@ -59,7 +59,7 @@ def service(args):
return 127 # Not-null return code return 127 # Not-null return code
if not args['archive']: if not args['archive']:
os.rename(tmpoutput, args['output']) shutil.move(tmpoutput, args['output'])
else: else:
# XXX: hardcoding path # XXX: hardcoding path
extract_dir = os.path.join(tmpdir, 'extract') extract_dir = os.path.join(tmpdir, 'extract')
...@@ -74,8 +74,8 @@ def service(args): ...@@ -74,8 +74,8 @@ def service(args):
if len(archive_content) == 1 and \ if len(archive_content) == 1 and \
os.path.isfile(os.path.join(extract_dir, os.path.isfile(os.path.join(extract_dir,
archive_content[0])): archive_content[0])):
os.rename(os.path.join(extract_dir, shutil.move(os.path.join(extract_dir,
archive_content[0]), archive_content[0]),
args['output']) args['output'])
else: else:
return 127 # Not-null return code return 127 # Not-null return code
......
...@@ -27,6 +27,9 @@ ...@@ -27,6 +27,9 @@
from slapos.recipe.librecipe import GenericBaseRecipe from slapos.recipe.librecipe import GenericBaseRecipe
import urlparse import urlparse
# The follow recipes should be unified somehow in order to improve
# code mantainence.
class Recipe(GenericBaseRecipe): class Recipe(GenericBaseRecipe):
def install(self): def install(self):
testinstance = self.options['test-instance-path'] testinstance = self.options['test-instance-path']
...@@ -72,3 +75,62 @@ class Recipe(GenericBaseRecipe): ...@@ -72,3 +75,62 @@ class Recipe(GenericBaseRecipe):
] + common_list, **common_dict)])) ] + common_list, **common_dict)]))
return path_list return path_list
class CloudoooRecipe(GenericBaseRecipe):
def install(self):
path_list = []
common_dict = dict(
prepend_path=self.options['prepend-path'],
)
common_list = [
"--paster_path", self.options['ooo-paster'],
self.options['configuration-file']
]
run_unit_test_path = self.createPythonScript(self.options['run-unit-test'],
__name__ + '.test.runUnitTest', [dict(
call_list=[self.options['run-unit-test-binary'],
] + common_list, **common_dict)])
path_list.append(run_unit_test_path)
path_list.append(self.createPythonScript(self.options['run-test-suite'],
__name__ + '.test.runTestSuite', [dict(
call_list=[self.options['run-test-suite-binary'],
], **common_dict)]))
return path_list
class EggTestRecipe(GenericBaseRecipe):
"""
Recipe used to create wrapper used to run test suite (python setup.py test)
off a list of Python eggs.
"""
def install(self):
path_list = []
test_list = self.options['test-list'].strip().replace('\n', ',')
common_dict = {}
environment_dict = {}
if self.options.get('environment'):
environment_part = self.buildout.get(self.options['environment'])
if environment_part:
for key, value in environment_part.iteritems():
environment_dict[key] = value
common_list = [ "--source_code_path_list", test_list]
argument_dict = dict(
call_list=[self.options['run-test-suite-binary'],] + common_list,
environment=environment_dict,
**common_dict
)
if 'prepend-path' in self.options:
argument_dict['prepend_path'] = self.options['prepend-path']
run_test_suite_script = self.createPythonScript(
self.options['run-test-suite'], __name__ + '.test.runTestSuite',
[argument_dict]
)
path_list.append(run_test_suite_script)
return path_list
...@@ -29,11 +29,20 @@ import sys ...@@ -29,11 +29,20 @@ import sys
def runTestSuite(args): def runTestSuite(args):
env = os.environ.copy() env = os.environ.copy()
d = args[0] d = args[0]
env['OPENSSL_BINARY'] = d['openssl_binary'] if 'openssl_binary' in d:
env['TEST_CA_PATH'] = d['test_ca_path'] env['OPENSSL_BINARY'] = d['openssl_binary']
env['PATH'] = ':'.join([d['prepend_path']] + os.environ['PATH'].split(':')) if 'test_ca_path' in d:
env['INSTANCE_HOME'] = d['instance_home'] env['TEST_CA_PATH'] = d['test_ca_path']
env['REAL_INSTANCE_HOME'] = d['instance_home'] if 'prepend_path' in d:
env['PATH'] = ':'.join([d['prepend_path']] + os.environ.get('PATH', '').split(':'))
if 'instance_home' in d:
env['INSTANCE_HOME'] = d['instance_home']
env['REAL_INSTANCE_HOME'] = d['instance_home']
# If defined, will add (and replace if existing) envvars to environment.
if 'environment' in d:
env.update(d['environment'])
# Deal with Shebang size limitation # Deal with Shebang size limitation
executable_filepath = d['call_list'][0] executable_filepath = d['call_list'][0]
file_object = open(executable_filepath, 'r') file_object = open(executable_filepath, 'r')
...@@ -51,11 +60,15 @@ def runTestSuite(args): ...@@ -51,11 +60,15 @@ def runTestSuite(args):
def runUnitTest(args): def runUnitTest(args):
env = os.environ.copy() env = os.environ.copy()
d = args[0] d = args[0]
env['OPENSSL_BINARY'] = d['openssl_binary'] if 'openssl_binary' in d:
env['TEST_CA_PATH'] = d['test_ca_path'] env['OPENSSL_BINARY'] = d['openssl_binary']
env['PATH'] = ':'.join([d['prepend_path']] + os.environ.get('PATH', '').split(':')) if 'test_ca_path' in d:
env['INSTANCE_HOME'] = d['instance_home'] env['TEST_CA_PATH'] = d['test_ca_path']
env['REAL_INSTANCE_HOME'] = d['instance_home'] if 'prepend_path' in d:
env['PATH'] = ':'.join([d['prepend_path']] + os.environ.get('PATH', '').split(':'))
if 'instance_home' in d:
env['INSTANCE_HOME'] = d['instance_home']
env['REAL_INSTANCE_HOME'] = d['instance_home']
# Deal with Shebang size limitation # Deal with Shebang size limitation
executable_filepath = d['call_list'][0] executable_filepath = d['call_list'][0]
file_object = open(executable_filepath, 'r') file_object = open(executable_filepath, 'r')
......
...@@ -23,10 +23,6 @@ backend default { ...@@ -23,10 +23,6 @@ backend default {
# Called at the beginning of a request, after the complete request has been received and parsed # Called at the beginning of a request, after the complete request has been received and parsed
sub vcl_recv { sub vcl_recv {
# Force lookup if the request is a no-cache request from the client
if (req.http.cache-control ~ "no-cache") {
ban_url(req.url);
}
# Pass any requests that Varnish does not understand straight to the backend. # Pass any requests that Varnish does not understand straight to the backend.
if (req.request != "GET" && if (req.request != "GET" &&
req.request != "HEAD" && req.request != "HEAD" &&
......
...@@ -36,12 +36,14 @@ class Recipe(GenericBaseRecipe): ...@@ -36,12 +36,14 @@ class Recipe(GenericBaseRecipe):
def install(self): def install(self):
repolist = json.loads(self.options['repos']) repolist = json.loads(self.options['repos'])
for repo in repolist: for repo, desc in repolist.iteritems():
absolute_path = os.path.join(self.options['base-directory'], '%s.git' % repo) absolute_path = os.path.join(self.options['base-directory'], '%s.git' % repo)
if not os.path.exists(absolute_path): if not os.path.exists(absolute_path):
check_call([self.options['git-binary'], 'init', check_call([self.options['git-binary'], 'init',
'--bare', absolute_path]) '--bare', absolute_path])
check_call([self.options['git-binary'], 'config', 'http.receivepack', 'true'], # XXX: Hardcoded path
cwd=absolute_path) description_filename = os.path.join(absolute_path, 'description')
with open(description_filename, 'w') as description_file:
description_file.write(desc)
return [] return []
...@@ -107,6 +107,7 @@ class Recipe(GenericBaseRecipe): ...@@ -107,6 +107,7 @@ class Recipe(GenericBaseRecipe):
mysql_binary=mysql_binary, mysql_binary=mysql_binary,
socket=socket, socket=socket,
configuration_file=mysql_conf_file, configuration_file=mysql_conf_file,
cwd=self.options['mysql-base-directory'],
) )
) )
path_list.append(mysqld) path_list.append(mysqld)
......
...@@ -17,7 +17,7 @@ def runMysql(conf): ...@@ -17,7 +17,7 @@ def runMysql(conf):
popen = subprocess.Popen([conf['mysql_install_binary'], popen = subprocess.Popen([conf['mysql_install_binary'],
'--skip-name-resolve', '--skip-host-cache', '--no-defaults', '--skip-name-resolve', '--skip-host-cache', '--no-defaults',
'--datadir=%s' % conf['data_directory']], '--datadir=%s' % conf['data_directory']],
stdout=subprocess.PIPE, stderr=subprocess.STDOUT) stdout=subprocess.PIPE, stderr=subprocess.STDOUT, cwd=conf['cwd'])
result = popen.communicate()[0] result = popen.communicate()[0]
if popen.returncode is None or popen.returncode != 0: if popen.returncode is None or popen.returncode != 0:
print "Failed to initialise server.\nThe error was: %s" % result print "Failed to initialise server.\nThe error was: %s" % result
......
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