Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
slapos
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Roque
slapos
Commits
28670e53
Commit
28670e53
authored
Sep 19, 2012
by
Kazuhiko Shiozaki
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/erp5-component' into erp5-component-z2.13
parents
5799bac2
e9b76a68
Changes
15
Hide whitespace changes
Inline
Side-by-side
Showing
15 changed files
with
108 additions
and
86 deletions
+108
-86
component/ghostscript/buildout.cfg
component/ghostscript/buildout.cfg
+2
-2
component/groonga/buildout.cfg
component/groonga/buildout.cfg
+3
-3
component/haproxy/buildout.cfg
component/haproxy/buildout.cfg
+2
-2
component/java/buildout.cfg
component/java/buildout.cfg
+8
-36
component/kumo/buildout.cfg
component/kumo/buildout.cfg
+1
-1
component/mariadb/buildout.cfg
component/mariadb/buildout.cfg
+6
-4
component/percona-toolkit/buildout.cfg
component/percona-toolkit/buildout.cfg
+2
-2
component/poppler/buildout.cfg
component/poppler/buildout.cfg
+2
-2
component/sphinx/buildout.cfg
component/sphinx/buildout.cfg
+2
-2
setup.py
setup.py
+1
-0
slapos/recipe/generic_kumofs/__init__.py
slapos/recipe/generic_kumofs/__init__.py
+5
-0
slapos/recipe/generic_mysql/__init__.py
slapos/recipe/generic_mysql/__init__.py
+12
-0
slapos/recipe/generic_mysql/mysql.py
slapos/recipe/generic_mysql/mysql.py
+41
-22
slapos/recipe/tidstorage/__init__.py
slapos/recipe/tidstorage/__init__.py
+17
-9
stack/erp5/buildout.cfg
stack/erp5/buildout.cfg
+4
-1
No files found.
component/ghostscript/buildout.cfg
View file @
28670e53
...
...
@@ -29,5 +29,5 @@ environment =
[ghostscript-9]
<= ghostscript-common
url = http://downloads.ghostscript.com/public/ghostscript-9.0
5
.tar.bz2
md5sum =
8bcef1f33ddf8a4d12b2cf8da385c19
1
url = http://downloads.ghostscript.com/public/ghostscript-9.0
6
.tar.bz2
md5sum =
46f9ebe40dc52755287b30704270db1
1
component/groonga/buildout.cfg
View file @
28670e53
...
...
@@ -7,12 +7,12 @@ parts =
[groonga]
recipe = hexagonit.recipe.cmmi
url = http://packages.groonga.org/source/groonga/groonga-2.0.
5
.tar.gz
md5sum = 6
ea6634ceee97f701add89ee39f4c1da
url = http://packages.groonga.org/source/groonga/groonga-2.0.
6
.tar.gz
md5sum = 6
4467d1ab8d5e0df8348a636972a95a7
configure-options =
--disable-static
--disable-glibtest
--disable-benchmark
--disable-document
--disable-
nginx
--disable-
groonga-httpd
--without-mecab
component/haproxy/buildout.cfg
View file @
28670e53
...
...
@@ -9,8 +9,8 @@ parts = haproxy
[haproxy]
recipe = hexagonit.recipe.cmmi
url = http://haproxy.1wt.eu/download/1.4/src/haproxy-1.4.2
1
.tar.gz
md5sum =
f36d5d13fd4a44ab454eee5d06cb38a2
url = http://haproxy.1wt.eu/download/1.4/src/haproxy-1.4.2
2
.tar.gz
md5sum =
a0b007c76f6a78524f3b3dd5e704979c
configure-command = true
# If the system is running on Linux 2.6, we use "linux26" as the TARGET,
# otherwise use "generic".
...
...
component/java/buildout.cfg
View file @
28670e53
...
...
@@ -29,9 +29,9 @@ slapos_promisee =
directory:javaws
file:lib/rt.jar
file:bin/java
# http://java.com/en/download/manual
.jsp?locale=en
x86 = http://javadl.sun.com/webapps/download/AutoDL?BundleId=
59621 7466b0b86bef21e3e31ae578b2b9f4
72
x86-64 = http://javadl.sun.com/webapps/download/AutoDL?BundleId=
59623 c5cfb8393d257b51e7a70e56b7784ac9
# http://java.com/en/download/manual
_v6.jsp
x86 = http://javadl.sun.com/webapps/download/AutoDL?BundleId=
68284 7eda40e790de1a907d591b62949b6e
72
x86-64 = http://javadl.sun.com/webapps/download/AutoDL?BundleId=
68286 839548714931443ba89719a995ece846
script =
import glob
if not self.options.get('url'): self.options['url'], self.options['md5sum'] = self.options[guessPlatform()].split(' ')
...
...
@@ -47,48 +47,20 @@ script =
workdir = guessworkdir(extract_dir)
self.copyTree(glob.glob(os.path.join(workdir, "jre1.6.0_*"))[0], "%(location)s")
[java-
sdk-1.6
.0]
[java-
re-1.7
.0]
recipe = slapos.recipe.build
slapos_promisee =
directory:bin
directory:lib
directory:man
directory:plugin
directory:javaws
file:jre/lib/rt.jar
file:bin/java
x86 = http://download.oracle.com/otn-pub/java/jdk/6u27-b07/jdk-6u27-linux-i586.bin bdb5f05bd20c6aa9a4729726191bf6fd
x86-64 = http://download.oracle.com/otn-pub/java/jdk/6u27-b07/jdk-6u27-linux-x64.bin 94f93a3ff03f824a238ecd79ad90433e
script =
if not self.options.get('url'): self.options['url'], self.options['md5sum'] = self.options[guessPlatform()].split(' ')
download_file = self.download(self.options['url'], self.options.get('md5sum'))
extract_dir = tempfile.mkdtemp(self.name)
os.chdir(extract_dir)
(download_dir, filename) = os.path.split(download_file)
auto_extract_bin = os.path.join(extract_dir, filename)
shutil.move(download_file, auto_extract_bin)
os.chmod(auto_extract_bin, 0777)
subprocess.call(["patch", auto_extract_bin, "-i", "${jdk-6u27-no-user-interaction-patch:location}/${jdk-6u27-no-user-interaction-patch:filename}"])
subprocess.call([auto_extract_bin])
self.cleanup_dir_list.append(extract_dir)
workdir = guessworkdir(extract_dir)
self.copyTree(os.path.join(workdir, "jdk1.6.0_27"), "%(location)s")
[java-sdk-1.7.0]
recipe = slapos.recipe.build
slapos_promisee =
directory:bin
directory:lib
directory:man
directory:jre
file:jre/lib/rt.jar
file:lib/rt.jar
file:bin/java
file:bin/javac
x86 = http://
download.oracle.com/otn-pub/java/jdk/7/jdk-7-linux-i586.tar.gz f97244a104f03731e5ff69f0dd5a9927
x86-64 = http://
download.oracle.com/otn-pub/java/jdk/7/jdk-7-linux-x64.tar.gz b3c1ef5faea7b180469c129a49762b64
# http://java.com/en/download/manual.jsp?locale=en
x86 = http://
javadl.sun.com/webapps/download/AutoDL?BundleId=68234 ea99bedd9db33e9e2970f4b70abd1e4b
x86-64 = http://
javadl.sun.com/webapps/download/AutoDL?BundleId=68236 5aa9bd26cdf1fa6afd2b15826b4ba139
script =
if not self.options.get('url'): self.options['url'], self.options['md5sum'] = self.options[guessPlatform()].split(' ')
extract_dir = self.extract(self.download(self.options['url'], self.options.get('md5sum')))
workdir = guessworkdir(extract_dir)
self.copyTree(workdir, "%(location)s")
component/kumo/buildout.cfg
View file @
28670e53
...
...
@@ -34,5 +34,5 @@ configure-options =
--with-msgpack=${messagepack:location}
environment =
CPPFLAGS=-I${zlib:location}/include -I${openssl:location}/include
CPPFLAGS=-I${zlib:location}/include -I${openssl:location}/include
-DKUMO_IPV6
LDFLAGS=-L${zlib:location}/lib -L${openssl:location}/lib -Wl,-rpath=${tokyocabinet:location}/lib -Wl,-rpath=${messagepack:location}/lib -Wl,-rpath=${zlib:location}/lib -Wl,-rpath=${openssl:location}/lib
component/mariadb/buildout.cfg
View file @
28670e53
...
...
@@ -25,10 +25,10 @@ download-only = true
[mariadb]
recipe = hexagonit.recipe.cmmi
version = 5.5.2
5
version = 5.5.2
7
revision = 1
url = http://downloads.askmonty.org/f/mariadb-${:version}/kvm-tarbake-jaunty-x86/mariadb-${:version}.tar.gz/from/http://ftp.osuosl.org/pub/mariadb
md5sum =
943f67c267d73a4080ab497e11740daf
md5sum =
ad6f3239a1d5af0a667e30f7c0b05037
# compile directory is required to build mysql plugins.
keep-compile-dir = true
patch-options = -p0
...
...
@@ -59,9 +59,11 @@ environment =
LDFLAGS=-L${libaio:location}/lib
[mroonga-mariadb]
# mroonga - a storage engine for MySQL. It provides fast fulltext search feature to all MySQL users.
# http://mroonga.github.com/
recipe = hexagonit.recipe.cmmi
url = https://github.com/downloads/mroonga/mroonga/mroonga-2.0
5
.tar.gz
md5sum =
6aee0e6ff948bba7c02854326afc11df
url = https://github.com/downloads/mroonga/mroonga/mroonga-2.0
6
.tar.gz
md5sum =
89ce640a57ed8f2161b8358ff4c29c66
configure-options =
--with-mysql-source=${mariadb:location}__compile__/mariadb-${mariadb:version}
--with-mysql-config=${mariadb:location}/bin/mysql_config
...
...
component/percona-toolkit/buildout.cfg
View file @
28670e53
...
...
@@ -10,7 +10,7 @@ parts =
recipe = hexagonit.recipe.cmmi
depends =
${perl:version}
url = http://www.percona.com/redir/downloads/percona-toolkit/2.
0.4/percona-toolkit-2.0.4
.tar.gz
md5sum =
df7dffcccb48d50f143849629228d4b4
url = http://www.percona.com/redir/downloads/percona-toolkit/2.
1.3/percona-toolkit-2.1.3
.tar.gz
md5sum =
6f8c4a0a0e43e467766cbdabaec9ef93
configure-command =
${perl:location}/bin/perl Makefile.PL
component/poppler/buildout.cfg
View file @
28670e53
...
...
@@ -13,8 +13,8 @@ extends =
[poppler]
recipe = hexagonit.recipe.cmmi
md5sum =
45dd2c16c8c4d1a39e830e45745c4e25
url = http://poppler.freedesktop.org/poppler-0.20.
2
.tar.gz
md5sum =
28c40266f374e1960a7bcead17d39f96
url = http://poppler.freedesktop.org/poppler-0.20.
3
.tar.gz
depends =
${libtiff:version}
configure-options =
...
...
component/sphinx/buildout.cfg
View file @
28670e53
...
...
@@ -20,8 +20,8 @@ filename = sphinx-1.10-beta-snowball.patch
recipe = hexagonit.recipe.cmmi
depends =
${mariadb:version}
url = http://sphinxsearch.com/files/sphinx-2.0.
2-beta
.tar.gz
md5sum =
fafe0f1a71d0ded32404c067eba7d0b3
url = http://sphinxsearch.com/files/sphinx-2.0.
5-release
.tar.gz
md5sum =
e71fdb5b0c2911247d48fb30550b9584
configure-options =
--with-mysql
--with-mysql-includes=${mariadb:location}/include/mysql
...
...
setup.py
View file @
28670e53
...
...
@@ -36,6 +36,7 @@ setup(name=name,
'xml_marshaller'
,
# need to communication with slapgrid
'zc.buildout'
,
# plays with buildout
'zc.recipe.egg'
,
# for scripts generation
'pytz'
,
# for timezone database
],
zip_safe
=
True
,
entry_points
=
{
...
...
slapos/recipe/generic_kumofs/__init__.py
View file @
28670e53
...
...
@@ -30,6 +30,11 @@ from slapos.recipe.librecipe import GenericBaseRecipe
class
Recipe
(
GenericBaseRecipe
):
def
install
(
self
):
ip
=
self
.
options
[
'ip'
]
address_family
=
self
.
options
.
get
(
'address-family'
,
'inet4'
)
if
address_family
==
'inet6'
:
ip
=
'['
+
ip
+
']'
elif
address_family
!=
'inet4'
:
raise
ValueError
(
'Unsupported address family: %r'
%
(
address_family
,
))
kumo_manager_port
=
int
(
self
.
options
[
'manager-port'
])
kumo_server_port
=
int
(
self
.
options
[
'server-port'
])
kumo_server_listen_port
=
int
(
self
.
options
[
'server-listen-port'
])
...
...
slapos/recipe/generic_mysql/__init__.py
View file @
28670e53
...
...
@@ -154,26 +154,38 @@ class Recipe(GenericBaseRecipe):
# TODO: move to a separate recipe (ack'ed by Cedric)
# percona toolkit (formerly known as maatkit) installation
for
pt_script_name
in
(
'pt-align'
,
'pt-archiver'
,
'pt-collect'
,
'pt-config-diff'
,
'pt-deadlock-logger'
,
'pt-diskstats'
,
'pt-duplicate-key-checker'
,
'pt-fifo-split'
,
'pt-find'
,
'pt-fingerprint'
,
'pt-fk-error-logger'
,
'pt-heartbeat'
,
'pt-index-usage'
,
'pt-ioprofile'
,
'pt-kill'
,
'pt-log-player'
,
'pt-mext'
,
'pt-mysql-summary'
,
'pt-online-schema-change'
,
'pt-pmp'
,
'pt-query-advisor'
,
'pt-query-digest'
,
'pt-show-grants'
,
'pt-sift'
,
'pt-slave-delay'
,
'pt-slave-find'
,
'pt-slave-restart'
,
'pt-stalk'
,
'pt-summary'
,
'pt-table-checksum'
,
'pt-table-sync'
,
'pt-table-usage'
,
'pt-tcp-model'
,
'pt-trend'
,
'pt-upgrade'
,
...
...
slapos/recipe/generic_mysql/mysql.py
View file @
28670e53
...
...
@@ -2,6 +2,7 @@ import os
import
subprocess
import
time
import
sys
import
pytz
def
runMysql
(
args
):
...
...
@@ -41,32 +42,50 @@ def updateMysql(args):
sleep
=
30
is_succeed
=
False
while
True
:
if
not
is_succeed
:
mysql_upgrade_list
=
[
conf
[
'mysql_upgrade_binary'
],
'--no-defaults'
,
'--user=root'
,
'--socket=%s'
%
conf
[
'socket'
]]
mysql_upgrade
=
subprocess
.
Popen
(
mysql_upgrade_list
,
stdout
=
subprocess
.
PIPE
,
stderr
=
subprocess
.
STDOUT
)
result
=
mysql_upgrade
.
communicate
()[
0
]
if
mysql_upgrade
.
returncode
is
None
:
mysql_upgrade
.
kill
()
if
mysql_upgrade
.
returncode
!=
0
and
not
'is already upgraded'
in
result
:
print
"Command %r failed with result:
\
n
%s"
%
(
mysql_upgrade_list
,
result
)
print
'Sleeping for %ss and retrying'
%
sleep
mysql_upgrade_list
=
[
conf
[
'mysql_upgrade_binary'
],
'--no-defaults'
,
'--user=root'
,
'--socket=%s'
%
conf
[
'socket'
]]
mysql_upgrade
=
subprocess
.
Popen
(
mysql_upgrade_list
,
stdout
=
subprocess
.
PIPE
,
stderr
=
subprocess
.
STDOUT
)
result
=
mysql_upgrade
.
communicate
()[
0
]
if
mysql_upgrade
.
returncode
is
None
:
mysql_upgrade
.
kill
()
if
mysql_upgrade
.
returncode
!=
0
and
not
'is already upgraded'
in
result
:
print
"Command %r failed with result:
\
n
%s"
%
(
mysql_upgrade_list
,
result
)
else
:
if
mysql_upgrade
.
returncode
==
0
:
print
"MySQL database upgraded with result:
\
n
%s"
%
result
else
:
if
mysql_upgrade
.
returncode
==
0
:
print
"MySQL database upgraded with result:
\
n
%s"
%
result
else
:
print
"No need to upgrade MySQL database"
mysql_list
=
[
conf
[
'mysql_binary'
].
strip
(),
'--no-defaults'
,
'-B'
,
'--user=root'
,
'--socket=%s'
%
conf
[
'socket'
]]
mysql
=
subprocess
.
Popen
(
mysql_list
,
stdin
=
subprocess
.
PIPE
,
stdout
=
subprocess
.
PIPE
,
stderr
=
subprocess
.
STDOUT
)
result
=
mysql
.
communicate
(
conf
[
'mysql_script'
])[
0
]
if
mysql
.
returncode
is
None
:
mysql
.
kill
()
print
"No need to upgrade MySQL database"
mysql_list
=
[
conf
[
'mysql_binary'
].
strip
(),
'--no-defaults'
,
'-B'
,
'--user=root'
,
'--socket=%s'
%
conf
[
'socket'
]]
mysql
=
subprocess
.
Popen
(
mysql_list
,
stdin
=
subprocess
.
PIPE
,
stdout
=
subprocess
.
PIPE
,
stderr
=
subprocess
.
STDOUT
)
result
=
mysql
.
communicate
(
conf
[
'mysql_script'
])[
0
]
if
mysql
.
returncode
is
None
:
mysql
.
kill
()
if
mysql
.
returncode
!=
0
:
print
'Command %r failed with:
\
n
%s'
%
(
mysql_list
,
result
)
else
:
# import timezone database
mysql_tzinfo_to_sql_binary
=
os
.
path
.
join
(
os
.
path
.
dirname
(
conf
[
'mysql_binary'
].
strip
()),
'mysql_tzinfo_to_sql'
)
zoneinfo_directory
=
'%s/zoneinfo'
%
os
.
path
.
dirname
(
pytz
.
__file__
)
mysql_tzinfo_to_sql_list
=
[
mysql_tzinfo_to_sql_binary
,
zoneinfo_directory
]
mysql_tzinfo_to_sql
=
subprocess
.
Popen
(
mysql_tzinfo_to_sql_list
,
stdin
=
subprocess
.
PIPE
,
stdout
=
subprocess
.
PIPE
,
stderr
=
subprocess
.
PIPE
)
timezone_sql
=
mysql_tzinfo_to_sql
.
communicate
()[
0
]
if
mysql
.
returncode
!=
0
:
print
'Command %r failed with:
\
n
%s'
%
(
mysql_list
,
result
)
print
'Sleeping for %ss and retrying'
%
sleep
print
'Command %r failed with:
\
n
%s'
%
(
mysql_tzinfo_to_sql_list
,
result
)
else
:
mysql
=
subprocess
.
Popen
(
mysql_list
+
[
'mysql'
,],
stdin
=
subprocess
.
PIPE
,
stdout
=
subprocess
.
PIPE
,
stderr
=
subprocess
.
STDOUT
)
result
=
mysql
.
communicate
(
timezone_sql
)[
0
]
if
mysql
.
returncode
is
None
:
mysql
.
kill
()
if
mysql
.
returncode
!=
0
:
print
'Command %r failed with:
\
n
%s'
%
(
mysql_list
,
result
)
is_succeed
=
True
print
'SlapOS initialisation script succesfully applied on database.'
if
is_succeed
:
print
'SlapOS initialisation script succesfully applied on database.'
break
print
'Sleeping for %ss and retrying'
%
sleep
sys
.
stdout
.
flush
()
sys
.
stderr
.
flush
()
time
.
sleep
(
sleep
)
slapos/recipe/tidstorage/__init__.py
View file @
28670e53
...
...
@@ -29,13 +29,21 @@ from slapos.recipe.librecipe import GenericBaseRecipe
class
Recipe
(
GenericBaseRecipe
):
def
install
(
self
):
path_list
=
[]
a
=
path_list
.
append
configuration_file
=
self
.
createFile
(
self
.
options
[
'configuration-path'
],
self
.
substituteTemplate
(
self
.
getTemplateFilename
(
'tidstorage.py.in'
),
self
.
options
))
a
(
configuration_file
)
tidstorage_wrapper
=
self
.
createPythonScript
(
self
.
options
[
'tidstorage-wrapper'
],
'slapos.recipe.librecipe.execute.execute'
,
[
self
.
options
[
'tidstoraged-binary'
],
'--nofork'
,
'--config'
,
configuration_file
])
a
(
tidstorage_wrapper
)
repozo_wrapper
=
self
.
createPythonScript
(
self
.
options
[
'repozo-wrapper'
],
'slapos.recipe.librecipe.execute.execute'
,
[
self
.
options
[
'tidstorage-repozo-binary'
],
'--config'
,
configuration_file
,
'--repozo'
,
self
.
options
[
'repozo-binary'
],
'-z'
])
a
(
repozo_wrapper
)
configuration_file
=
self
.
createFile
(
self
.
options
[
'configuration-path'
],
self
.
substituteTemplate
(
self
.
getTemplateFilename
(
'tidstorage.py.in'
),
self
.
options
))
return
path_list
tidstorage_wrapper
=
self
.
createPythonScript
(
self
.
options
[
'tidstorage-wrapper'
],
'slapos.recipe.librecipe.execute.execute'
,
[
self
.
options
[
'tidstoraged-binary'
],
'--nofork'
,
'--config'
,
configuration_file
])
repozo_wrapper
=
self
.
createPythonScript
(
self
.
options
[
'repozo-wrapper'
],
'slapos.recipe.librecipe.execute.execute'
,
[
self
.
options
[
'tidstorage-repozo-binary'
],
'--config'
,
configuration_file
,
'--repozo'
,
self
.
options
[
'repozo-binary'
],
'-z'
])
return
[
configuration_file
,
tidstorage_wrapper
,
repozo_wrapper
]
stack/erp5/buildout.cfg
View file @
28670e53
...
...
@@ -617,7 +617,7 @@ ply = 3.4
polib = 1.0.0
psutil = 0.6.1
python-ldap = 2.4.10
python-magic = 0.4.
2
python-magic = 0.4.
3
python-memcached = 1.47
restkit = 4.2.0
rtjp-eventlet = 0.3.2
...
...
@@ -636,3 +636,6 @@ uuid = 1.30
validictory = 0.8.3
xml-marshaller = 0.9.7
xupdate-processor = 0.4
mr.developer = 1.21
qrcode = 2.4.1
requests = 0.13.2
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment