Commit dfca7776 authored by Kirill Smelkov's avatar Kirill Smelkov

ZODB: Factor it to separate component

Factor-out things that provide components for ZODB stack from software/neoppod/
into component/ZODB/. We switch ZODB 3/4/5 to git checkouts, but used revisions
correspond to ZODB versions we were using before, so this should be a
non-functional change.

We need ZODB to be git checkouts for better control, because we'll want to add
our own patches to ZODB4, for example nexedi/ZODB!1.

If that change will be done, it will be done as a separate step.

We will also need git checkouts to add testing support for ZODB, so that we
could setup automatic testing for this essential-to-Nexedi component on our own
testing infrastructure.
parent c84f8f74
...@@ -3,22 +3,48 @@ ...@@ -3,22 +3,48 @@
[buildout] [buildout]
extends = extends =
../ZODB/buildout.cfg
../git/buildout.cfg ../git/buildout.cfg
parts = ZEO/scripts parts = ZEO/scripts
# ZEO allows to use either ZEO4 or ZEO5 # ZEO provides ZEO<X> depending on ZODB major version.
# To select which version to use users should do:
# #
# [ZEO] # - ZEO3 is part of ZODB3 distribution
# egg = ${ZEO<version>:egg} # https://github.com/zopefoundation/ZODB/tree/3.10.7-4-gb8d7a8567/src
# # - ZEO4 works only with ZODB4
# By default ZEO4 is used. # https://github.com/zopefoundation/ZEO/blob/4.3.1-1-g47d3fbe8/setup.py#L122
# - ZEO5 works only with ZODB5
# https://github.com/zopefoundation/ZEO/blob/5.2.2-1-g3d90ed42/setup.py#L20
[ZEO] [ZEO]
recipe = zc.recipe.egg:eggs recipe = slapos.recipe.build
egg = ${ZEO4:egg} depends = ${ZODB:egg}
eggs = ${:egg} init =
zodb = self.buildout['ZODB']
zmajor = zodb['major']
# ZODB3 -> just link ZEO to ZODB3 (ZEO3 is part of ZODB3)
if zmajor == '3':
options['egg'] = zodb['egg']
# ZODB{4,5}: link/depend to ZEO<ZODB.major>
else:
zeo_x = self.buildout['ZEO'+zmajor]
options['depends'] += '$${%s:egg}' % zeo_x.name
options['egg'] = zeo_x['egg']
# update [versions] from what is needed by ZEO<X>
for _ in zeo_x['egg_versions'].splitlines():
if _ == '' or _.startswith('#'):
continue
egg, eq, version = _.split() # 'transaction = 1.7.0'
assert eq == '='
self.buildout['versions'][egg] = version
# propagate updated [versions] -> easy_install
# (buildout does this in Buildout constructor)
import zc.buildout.easy_install
zc.buildout.easy_install.default_versions(self.buildout['versions'])
# ZEO/scripts installs scripts from ZEO # ZEO/scripts installs scripts from ZEO
...@@ -32,6 +58,7 @@ eggs = ${ZEO:egg} ...@@ -32,6 +58,7 @@ eggs = ${ZEO:egg}
recipe = zc.recipe.egg:develop recipe = zc.recipe.egg:develop
setup = ${ZEO4-repository:location} setup = ${ZEO4-repository:location}
egg = ZEO egg = ZEO
egg_versions =
[ZEO4-repository] [ZEO4-repository]
recipe = slapos.recipe.build:gitclone recipe = slapos.recipe.build:gitclone
...@@ -47,3 +74,8 @@ git-executable = ${git:location}/bin/git ...@@ -47,3 +74,8 @@ git-executable = ${git:location}/bin/git
recipe = zc.recipe.egg:eggs recipe = zc.recipe.egg:eggs
egg = ZEO egg = ZEO
eggs = ${:egg} eggs = ${:egg}
egg_versions =
ZEO = 5.2.2
trollius = 2.2.post1
futures = 3.2.0
# SlapOS component for ZODB development.
[buildout]
extends = buildout.cfg
# unpin ZODB<X> from particular revisions; only branch is left.
[ZODB3-repository]
revision=
[ZODB4-repository]
revision=
[ZODB5-repository]
revision=
# SlapOS component for ZODB.
# https://zodb.org/
[buildout]
extends =
../git/buildout.cfg
../python-cffi/buildout.cfg
parts = ZODB/scripts
# ZODB allows to use either ZODB3, ZODB4 or ZODB5.
# To select which version to use users should do:
#
# [ZODB]
# major = <ZODB-version-major>
#
# By default ZODB4 is used.
[ZODB]
recipe = slapos.recipe.build
major = 4
init =
# link/depend ZODB -> ZODB<X>
zodb_x = 'ZODB'+options['major']
zodb_x = self.buildout[zodb_x]
options['depends'] = '$${%s:egg}' % zodb_x.name
options['egg'] = zodb_x['egg']
options['location'] = zodb_x['setup']
# for ZODB3 also depend on _ZODB3-{ZODB,persistent,BTrees,ZEO}.
# installing those eggs ensures forward compatibility with ZODB4/5 where
# instead of single ZODB3 egg, there are separate ZODB,persistent,BTrees,... distributions.
if options['major'] == '3':
for egg in ['ZODB','persistent','BTrees','ZEO']:
z3egg = self.buildout['_ZODB3-%s' % egg]
options['depends'] += '\n$${%s:egg}' % z3egg.name
# update [versions] from what is needed by ZODB<X>
for _ in zodb_x['egg_versions'].splitlines():
if _ == '' or _.startswith('#'):
continue
egg, eq, version = _.split() # 'transaction = 1.7.0'
assert eq == '='
self.buildout['versions'][egg] = version
# propagate updated [versions] -> easy_install
# (buildout does this in Buildout constructor)
import zc.buildout.easy_install
zc.buildout.easy_install.default_versions(self.buildout['versions'])
# ZODB/scripts installs scripts from ZODB
[ZODB/scripts]
recipe = zc.recipe.egg:scripts
eggs = ${ZODB:egg}
[_ZODB-git-repository]
recipe = slapos.recipe.build:gitclone
repository = https://lab.nexedi.com/nexedi/ZODB.git
git-executable = ${git:location}/bin/git
[_ZODB45]
recipe = zc.recipe.egg:develop
egg = ZODB
depends = ${persistent:egg} ${BTrees:egg}
# eggs versions that are used by all ZODB{4,5}.
egg_versions =
BTrees = 4.5.1
persistent = 4.6.4
zodbpickle = 1.0.4
# Provide ZODB3 for those eggs that still care about ZODB3 compatibility -
# for example wendelin.core. ZODB3 3.11 is just a dependency egg on _latest_
# ZODB, persistent, BTrees and ZEO.
ZODB3 = 3.11.0
# ZODB4: we maintain our own 4-nxd branch with patches for wendelin.core to work
# correctly. The patches are backports of what is in ZODB master (ZODB5).
[ZODB4]
<= _ZODB45
setup = ${ZODB4-repository:location}
egg_versions +=
transaction = 1.7.0
[ZODB4-repository]
<= _ZODB-git-repository
location = ${buildout:parts-directory}/ZODB4
branch = 4-nxd
revision = 4.4.5-8-g401163753
# ZODB3: similarly to ZODB4 we maintain our 3.10-nxd branch.
[ZODB3]
recipe = zc.recipe.egg:develop
setup = ${ZODB3-repository:location}
egg = ZODB3
egg_versions =
transaction = 1.1.1
zdaemon = 2.0.7
[ZODB3-repository]
<= _ZODB-git-repository
location = ${buildout:parts-directory}/ZODB3
branch = 3.10-nxd
revision = 3.10.7-9-gc72883108
# Stub eggs for ZODB3 to be forward-compatible with ZODB4/5.
[_ZODB3-ZODB45-compat-egg]
recipe = zc.recipe.egg:develop
setup = ${ZODB3-repository:location}/ZODB45-compat/${:egg}/setup.py
depends = ${ZODB3:recipe}
[_ZODB3-ZODB]
<= _ZODB3-ZODB45-compat-egg
egg = ZODB
[_ZODB3-persistent]
<= _ZODB3-ZODB45-compat-egg
egg = persistent
[_ZODB3-BTrees]
<= _ZODB3-ZODB45-compat-egg
egg = BTrees
[_ZODB3-ZEO]
<= _ZODB3-ZODB45-compat-egg
egg = ZEO
# ZODB5: pristine upstream
[ZODB5]
<= _ZODB45
setup = ${ZODB5-repository:location}
egg_versions +=
transaction = 2.4.0
[ZODB5-repository]
<= _ZODB-git-repository
location = ${buildout:parts-directory}/ZODB5
branch = master
revision = 5.6.0-0-g3d06c0462
# XXX: buildout fails to install properly eggs with setup_requires
[BTrees]
recipe = zc.recipe.egg:custom
egg = ${:_buildout_section_name_}
setup-eggs = ${persistent:egg}
[persistent]
recipe = zc.recipe.egg:custom
egg = ${:_buildout_section_name_}
setup-eggs = ${python-cffi:egg}
...@@ -3,6 +3,7 @@ ...@@ -3,6 +3,7 @@
[buildout] [buildout]
extends = extends =
../pygolang/buildout.cfg ../pygolang/buildout.cfg
../ZODB/buildout.cfg
../zodbtools/buildout.cfg ../zodbtools/buildout.cfg
../numpy/buildout.cfg ../numpy/buildout.cfg
../golang/buildout.cfg ../golang/buildout.cfg
...@@ -24,6 +25,7 @@ environment = wendelin.core-env ...@@ -24,6 +25,7 @@ environment = wendelin.core-env
# dependent eggs that must come through in-tree recipes # dependent eggs that must come through in-tree recipes
depends = depends =
${ZODB:egg}
${zodbtools:egg} ${zodbtools:egg}
${numpy:egg} ${numpy:egg}
......
...@@ -56,6 +56,4 @@ template = inline: ...@@ -56,6 +56,4 @@ template = inline:
[versions] [versions]
neoppod = 1.12.0 neoppod = 1.12.0
zope.testrunner = 5.2
random2 = 1.0.1
manuel = 1.10.1 manuel = 1.10.1
...@@ -4,6 +4,7 @@ ...@@ -4,6 +4,7 @@
[buildout] [buildout]
extends = extends =
../pygolang/buildout.cfg ../pygolang/buildout.cfg
../ZODB/buildout.cfg
../ZEO/buildout.cfg ../ZEO/buildout.cfg
parts = parts =
...@@ -19,6 +20,7 @@ eggs = ...@@ -19,6 +20,7 @@ eggs =
# dependent eggs that must come through in-tree recipes # dependent eggs that must come through in-tree recipes
depends = depends =
${pygolang:egg} ${pygolang:egg}
${ZODB:egg}
# ZEO comes through zodbtools -> zodburi -> ZEO # ZEO comes through zodbtools -> zodburi -> ZEO
${ZEO:egg} ${ZEO:egg}
......
...@@ -3,8 +3,7 @@ ...@@ -3,8 +3,7 @@
[buildout] [buildout]
extends = extends =
# test*.cfg first extend from neoppod/software<ZODB-flabour>.cfg to use # test<X>.cfg configures ZODB.major=<X>.
# appropriate ZODB and versions of other components.
../../stack/nxdtest.cfg ../../stack/nxdtest.cfg
../pytest/buildout.cfg ../pytest/buildout.cfg
......
# SlapOS software release to test zodbtools/ZODB5 on Nexedi testing infrastructure. # SlapOS software release to test zodbtools/ZODB5 on Nexedi testing infrastructure.
[buildout] [buildout]
extends = extends = test-common.cfg
../../software/neoppod/software-zodb5.cfg
test-common.cfg [ZODB]
major = 5
# SlapOS software release to test zodbtools on Nexedi testing infrastructure. # SlapOS software release to test zodbtools on Nexedi testing infrastructure.
[buildout] [buildout]
extends = extends = test-common.cfg
../../software/neoppod/software.cfg
test-common.cfg
...@@ -18,6 +18,7 @@ extends = ...@@ -18,6 +18,7 @@ extends =
../../component/python-mysqlclient/buildout.cfg ../../component/python-mysqlclient/buildout.cfg
../../component/python-cryptography/buildout.cfg ../../component/python-cryptography/buildout.cfg
../../component/pycurl/buildout.cfg ../../component/pycurl/buildout.cfg
../../component/ZODB/buildout.cfg
../../component/ZEO/buildout.cfg ../../component/ZEO/buildout.cfg
../../component/zodbtools/buildout.cfg ../../component/zodbtools/buildout.cfg
...@@ -41,32 +42,23 @@ recipe = zc.recipe.egg:develop ...@@ -41,32 +42,23 @@ recipe = zc.recipe.egg:develop
setup = ${neoppod-repository:location} setup = ${neoppod-repository:location}
environment = neoppod-setup-env environment = neoppod-setup-env
[neoppod] # dependent eggs that must come through in-tree recipes
recipe = zc.recipe.egg intree-eggs =
eggs = neoppod[admin, ctl, master]
${cython-zstd:egg} ${cython-zstd:egg}
${msgpack-python:egg} ${msgpack-python:egg}
${:adapter-egg} ${:adapter-egg}
${BTrees:egg} ${ZODB:egg}
${zodbtools:egg}
adapter-egg = ${python-mysqlclient:egg}
[neoppod]
recipe = zc.recipe.egg
eggs = neoppod[admin, ctl, master]
${neoppod-develop:intree-eggs}
psutil psutil
ZODB
zope.testing zope.testing
${zodbtools:egg}
coverage coverage
setproctitle setproctitle
adapter-egg = ${python-mysqlclient:egg}
# XXX: buildout fails to install properly eggs with setup_requires
[BTrees]
recipe = zc.recipe.egg:custom
egg = ${:_buildout_section_name_}
setup-eggs = ${persistent:egg}
[persistent]
recipe = zc.recipe.egg:custom
egg = ${:_buildout_section_name_}
setup-eggs = ${python-cffi:egg}
###
[download-base-neo] [download-base-neo]
recipe = slapos.recipe.build:download recipe = slapos.recipe.build:download
...@@ -136,21 +128,11 @@ template = ...@@ -136,21 +128,11 @@ template =
{% endraw %} {% endraw %}
[versions] [versions]
BTrees = 4.5.1
ZODB = 4.4.5
coverage = 4.5.1 coverage = 4.5.1
mock = 3.0.5
ecdsa = 0.13 ecdsa = 0.13
mysqlclient = 1.3.12 mysqlclient = 1.3.12
persistent = 4.6.4
pycrypto = 2.6.1 pycrypto = 2.6.1
pycurl = 7.43.0 pycurl = 7.43.0
setproctitle = 1.1.10 setproctitle = 1.1.10
transaction = 1.7.0
zodbpickle = 1.0.4
cython-zstd = 0.2 cython-zstd = 0.2
python-dateutil = 2.7.3 python-dateutil = 2.7.3
# Required by:
# mock = 3.0.5
funcsigs = 1.0.2
[buildout] [buildout]
extends = software.cfg extends = software.cfg
[ZODB]
major = 3
[neoppod] [neoppod]
eggs = neoppod[admin, ctl, master, storage-importer, storage-mysqldb, tests] eggs = neoppod[admin, ctl, master, storage-importer, storage-mysqldb, tests]
${python-mysqlclient:egg} ${python-mysqlclient:egg}
ZODB3
patch-binary = ${patch:location}/bin/patch
ZODB3-patch-options = -p1
ZODB3-patches =
${neoppod-repository:location}/ZODB3.patch
[versions]
ZODB3 = 3.10.7+SlapOSPatched001
transaction = 1.1.1
zdaemon = 2.0.7
[buildout] [buildout]
extends = software.cfg extends = software.cfg
[ZODB]
major = 5
[neoppod] [neoppod]
eggs += mock eggs += mock
[ZEO]
egg = ${ZEO5:egg}
[versions]
ZODB = 5.6.0
ZEO = 5.2.2
transaction = 2.4.0
# Required by:
# ZEO==5.2.0
# trollius==2.2.post1
futures = 3.2.0
# Required by:
# ZEO==5.2.0
trollius = 2.2.post1
...@@ -31,12 +31,3 @@ url = ${:_profile_base_location_}/${:_update_hash_filename_} ...@@ -31,12 +31,3 @@ url = ${:_profile_base_location_}/${:_update_hash_filename_}
recipe = zc.recipe.egg recipe = zc.recipe.egg
eggs = erp5.util eggs = erp5.util
interpreter = ${:_buildout_section_name_} interpreter = ${:_buildout_section_name_}
[versions]
# To match ERP5
ZConfig = 2.9.3
zc.lockfile = 1.0.2
zope.event = 3.5.2
zope.exceptions = 3.6.2
zope.testing = 3.9.7
##
# To be extended after software-common.cfg if only SQLite backend is wanted. # To be extended after software-common.cfg if only SQLite backend is wanted.
[neoppod] [neoppod-develop]
adapter-egg = adapter-egg =
[instance-common] [instance-common]
......
...@@ -129,22 +129,3 @@ eggs = ...@@ -129,22 +129,3 @@ eggs =
${wendelin.core:egg} ${wendelin.core:egg}
# ping eggs versions
[versions]
ZODB3 = 3.11.0
zope.testing = 4.6.2
# Required by:
# ZEO==4.3.1
# ZODB==4.4.5
# zodburi==2.3.0
ZConfig = 3.2.0
# Required by:
# ZEO==4.3.1
# ZODB==4.4.5
zc.lockfile = 1.2.1
# Required by:
# neoppod==1.8.1
python-dateutil = 2.7.1
...@@ -664,7 +664,6 @@ PyXML = 0.8.5 ...@@ -664,7 +664,6 @@ PyXML = 0.8.5
Pympler = 0.4.3 Pympler = 0.4.3
StructuredText = 2.11.1 StructuredText = 2.11.1
WSGIUtils = 0.7 WSGIUtils = 0.7
ZODB3 = 3.11.0
# astroid 1.4.1 breaks testDynamicClassGeneration # astroid 1.4.1 breaks testDynamicClassGeneration
astroid = 1.3.8 astroid = 1.3.8
erp5diff = 0.8.1.7 erp5diff = 0.8.1.7
......
...@@ -155,6 +155,7 @@ Importing = 1.10 ...@@ -155,6 +155,7 @@ Importing = 1.10
MarkupSafe = 1.0 MarkupSafe = 1.0
PyYAML = 5.4.1 PyYAML = 5.4.1
Werkzeug = 1.0.1 Werkzeug = 1.0.1
ZConfig = 2.9.3
asn1crypto = 1.3.0 asn1crypto = 1.3.0
atomicwrites = 1.4.0 atomicwrites = 1.4.0
backports.functools-lru-cache = 1.6.1 backports.functools-lru-cache = 1.6.1
...@@ -181,6 +182,7 @@ itsdangerous = 0.24 ...@@ -181,6 +182,7 @@ itsdangerous = 0.24
lock-file = 2.0 lock-file = 2.0
lxml = 4.6.2 lxml = 4.6.2
meld3 = 1.0.2 meld3 = 1.0.2
mock = 3.0.5
more-itertools = 5.0.0 more-itertools = 5.0.0
netaddr = 0.7.19 netaddr = 0.7.19
pathlib2 = 2.3.5 pathlib2 = 2.3.5
...@@ -193,6 +195,7 @@ py = 1.9.0 ...@@ -193,6 +195,7 @@ py = 1.9.0
pyOpenSSL = 19.1.0 pyOpenSSL = 19.1.0
pyparsing = 2.2.0 pyparsing = 2.2.0
pytz = 2016.10 pytz = 2016.10
random2 = 1.0.1
regex = 2020.9.27 regex = 2020.9.27
requests = 2.24.0 requests = 2.24.0
scandir = 1.10.0 scandir = 1.10.0
...@@ -215,10 +218,14 @@ unicodecsv = 0.14.1 ...@@ -215,10 +218,14 @@ unicodecsv = 0.14.1
wcwidth = 0.2.5 wcwidth = 0.2.5
wheel = 0.35.1 wheel = 0.35.1
xml-marshaller = 1.0.2 xml-marshaller = 1.0.2
zc.lockfile = 1.0.2
zdaemon = 4.2.0 zdaemon = 4.2.0
zipp = 1.2.0 zipp = 1.2.0
zodburi = 2.4.0 zodburi = 2.4.0
zope.event = 3.5.2 zope.event = 3.5.2
zope.exceptions = 3.6.2
zope.testrunner = 5.2
zope.testing = 3.9.7
paramiko = 2.1.3 paramiko = 2.1.3
CacheControl = 0.12.5 CacheControl = 0.12.5
msgpack = 0.6.2 msgpack = 0.6.2
......
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