Commit 3216cb3a authored by Julien Muchembled's avatar Julien Muchembled

rdiff-backup: do not depend on buildout python

parent 893a5bd2
[buildout] [buildout]
extends = extends =
../librsync/buildout.cfg ../librsync/buildout.cfg
../coreutils/buildout.cfg ../python-2.7/buildout.cfg
parts = parts =
rdiff-backup-output rdiff-backup-1.0.5
rdiff-backup-1.3.4
[rdiff-backup-build] [rdiff-backup-common]
recipe = zc.recipe.egg:custom recipe = slapos.recipe.cmmi
egg = rdiff-backup shared = true
patches =
${:_profile_base_location_}/rdiff-backup-1.2.8-librsync-1.0.0.patch#5e54a67845edd6942fcf7359c921e003
patch-options = -p1 patch-options = -p1
patch-binary = ${patch:location}/bin/patch patch-binary = ${patch:location}/bin/patch
include-dirs = configure-command = true
${librsync:location}/include/ make-binary = true
library-dirs = post-install =
${librsync:location}/lib/ set %(location)s/lib/python2.7
rpath = %(python)s setup.py build_ext -I${librsync:location}/include -L${librsync:location}/lib -R${librsync:location}/lib build install --prefix=%(location)s --install-lib=$1
${librsync:location}/lib/ cd %(location)s/bin
# If you need another release, override this link sed -i '/^import\b.*\bsys\b/s,$,\nsys.path[0] = '\"$1\", *
# and pin the egg in the [versions] section of the stack or SR. ./rdiff-backup -V
find-links = http://pkgs.fedoraproject.org/repo/pkgs/rdiff-backup/rdiff-backup-1.0.5.tar.gz/fa2a165fa07a94be52c52e3545bc7758/rdiff-backup-1.0.5.tar.gz python = ${python2.7:executable}
[rdiff-backup-common:python27]
python = ${buildout:executable}
[rdiff-backup-1.0.5]
<= rdiff-backup-common
url = https://pkgs.fedoraproject.org/repo/pkgs/rdiff-backup/rdiff-backup-1.0.5.tar.gz/${:md5sum}/rdiff-backup-1.0.5.tar.gz
md5sum = fa2a165fa07a94be52c52e3545bc7758
patches =
${:_profile_base_location_}/rdiff-backup-1.2.8-librsync-1.0.0.patch#5e54a67845edd6942fcf7359c921e003
[rdiff-backup-build-1.3.4] [rdiff-backup-1.3.4]
<= rdiff-backup-build <= rdiff-backup-common
# use our own version # use our own version
find-links = http://www.nexedi.org/static/packages/source/rdiff-backup-1.3.4nxd6.tar.gz url = http://www.nexedi.org/static/packages/source/rdiff-backup-1.3.4nxd6.tar.gz
md5sum = 06b8df2099baebca6086a315b031fd53
patches = patches =
${:_profile_base_location_}/rdiff-backup-1.3.4-librsync-1.0.0.patch#31fafc8bc4a00f002f52008a9f3b671f ${:_profile_base_location_}/rdiff-backup-1.3.4-librsync-1.0.0.patch#31fafc8bc4a00f002f52008a9f3b671f
[rdiff-backup]
# Scripts only generation part for rdiff-backup
recipe = zc.recipe.egg
eggs =
${rdiff-backup-build:egg}
entry-points =
rdiff-backup=rdiff_backup.Main:Main
arguments = sys.argv[1:]
[rdiff-backup-output]
# Shared binary location to ease migration
recipe = plone.recipe.command
stop-on-error = true
update-command = ${:command}
command = ${coreutils-output:test} -x ${:rdiff-backup}
rdiff-backup = ${buildout:directory}/bin/rdiff-backup
...@@ -26,7 +26,7 @@ md5sum = 851262d7174da868805cb7c8e1ced7c0 ...@@ -26,7 +26,7 @@ md5sum = 851262d7174da868805cb7c8e1ced7c0
[template-backup-script] [template-backup-script]
filename = template-backup-script.sh.in filename = template-backup-script.sh.in
md5sum = 4c75f8462eaef2d8fcf24627e5f3575a md5sum = 3f3286347a7e271e7bfa66e1a840989b
[template-crontab-line] [template-crontab-line]
filename = template-crontab-line.in filename = template-crontab-line.in
......
...@@ -16,7 +16,6 @@ extends = ...@@ -16,7 +16,6 @@ extends =
../../stack/monitor/buildout.cfg ../../stack/monitor/buildout.cfg
parts = parts =
rdiff-backup
dcron dcron
logrotate logrotate
nginx nginx
...@@ -102,7 +101,6 @@ output = ${buildout:directory}/template.cfg ...@@ -102,7 +101,6 @@ output = ${buildout:directory}/template.cfg
mode = 0644 mode = 0644
[versions] [versions]
rdiff-backup = 1.0.5+SlapOSPatched001
gunicorn = 19.1.1 gunicorn = 19.1.1
plone.recipe.command = 1.1 plone.recipe.command = 1.1
PyRSS2Gen = 1.1 PyRSS2Gen = 1.1
...@@ -13,7 +13,7 @@ ${coreutils-output:echo} "Available only if backup succeed." > $${:statistic_log ...@@ -13,7 +13,7 @@ ${coreutils-output:echo} "Available only if backup succeed." > $${:statistic_log
# set -e # set -e
cd $${:datadirectory} cd $${:datadirectory}
${util-linux:location}/bin/flock $${:status_log}.lock \ ${util-linux:location}/bin/flock $${:status_log}.lock \
${rdiff-backup-output:rdiff-backup} \ ${rdiff-backup-1.0.5:location}/bin/rdiff-backup \
$${:exclude_string} \ $${:exclude_string} \
--include='$${:include}' \ --include='$${:include}' \
--exclude='**' \ --exclude='**' \
...@@ -26,7 +26,7 @@ RESULT=$? ...@@ -26,7 +26,7 @@ RESULT=$?
if [ $RESULT -eq 0 ] if [ $RESULT -eq 0 ]
then then
${coreutils-output:echo} "`${coreutils-output:date} --iso-8601=seconds -u`, $${:statistic_log}, $${:hostname}, backup success" >> $${:status_log} ${coreutils-output:echo} "`${coreutils-output:date} --iso-8601=seconds -u`, $${:statistic_log}, $${:hostname}, backup success" >> $${:status_log}
${findutils-output:find} rdiff-backup-data/ -maxdepth 1 -name "session_statistic*" | ${coreutils-output:sort} | ${coreutils-output:tail} -n 1 | ${findutils-output:xargs} ${rdiff-backup-output:rdiff-backup} --calculate-average > $${:statistic_log} ${findutils-output:find} rdiff-backup-data/ -maxdepth 1 -name "session_statistic*" | ${coreutils-output:sort} | ${coreutils-output:tail} -n 1 | ${findutils-output:xargs} ${rdiff-backup-1.0.5:location}/bin/rdiff-backup --calculate-average > $${:statistic_log}
else else
${coreutils-output:echo} "`${coreutils-output:date} --iso-8601=seconds -u`, $${:statistic_log}, $${:hostname}, backup failed" >> $${:status_log} ${coreutils-output:echo} "`${coreutils-output:date} --iso-8601=seconds -u`, $${:statistic_log}, $${:hostname}, backup failed" >> $${:status_log}
fi fi
...@@ -6,7 +6,6 @@ extends = ...@@ -6,7 +6,6 @@ extends =
../../component/caddy/buildout.cfg ../../component/caddy/buildout.cfg
../../component/gzip/buildout.cfg ../../component/gzip/buildout.cfg
../../component/logrotate/buildout.cfg ../../component/logrotate/buildout.cfg
../../component/rdiff-backup/buildout.cfg
../../component/trafficserver/buildout.cfg ../../component/trafficserver/buildout.cfg
../../component/6tunnel/buildout.cfg ../../component/6tunnel/buildout.cfg
../../component/xz-utils/buildout.cfg ../../component/xz-utils/buildout.cfg
...@@ -20,7 +19,6 @@ extends = ...@@ -20,7 +19,6 @@ extends =
parts += parts +=
caucase-eggs caucase-eggs
template template
rdiff-backup
caddyprofiledeps caddyprofiledeps
kedifa-develop kedifa-develop
kedifa kedifa
...@@ -234,7 +232,6 @@ ecdsa = 0.13 ...@@ -234,7 +232,6 @@ ecdsa = 0.13
gitdb = 0.6.4 gitdb = 0.6.4
plone.recipe.command = 1.1 plone.recipe.command = 1.1
pycrypto = 2.6.1 pycrypto = 2.6.1
rdiff-backup = 1.0.5+SlapOSPatched001
smmap = 0.9.0 smmap = 0.9.0
websockify = 0.8.0 websockify = 0.8.0
......
...@@ -2,9 +2,5 @@ ...@@ -2,9 +2,5 @@
extends = extends =
software.cfg software.cfg
# Ignore these for now
common-parts -=
rdiff-backup
[python] [python]
part = python3 part = python3
...@@ -23,7 +23,6 @@ common-parts = ...@@ -23,7 +23,6 @@ common-parts =
template template
# XXX: we have to manually add this for resilience # XXX: we have to manually add this for resilience
rdiff-backup
pbs-recipe-egg pbs-recipe-egg
......
...@@ -51,8 +51,6 @@ from slapos.testing.utils import findFreeTCPPort ...@@ -51,8 +51,6 @@ from slapos.testing.utils import findFreeTCPPort
has_kvm = os.access('/dev/kvm', os.R_OK | os.W_OK) has_kvm = os.access('/dev/kvm', os.R_OK | os.W_OK)
skipUnlessKvm = unittest.skipUnless(has_kvm, 'kvm not loaded or not allowed') skipUnlessKvm = unittest.skipUnless(has_kvm, 'kvm not loaded or not allowed')
skipIfPython3 = unittest.skipIf(
six.PY3, 'rdiff-backup is not compatible with Python 3 yet')
if has_kvm: if has_kvm:
setUpModule, InstanceTestCase = makeModuleSetUpAndTestCaseClass( setUpModule, InstanceTestCase = makeModuleSetUpAndTestCaseClass(
...@@ -385,7 +383,6 @@ class TestAccessKvmClusterAdditional(MonitorAccessMixin, InstanceTestCase): ...@@ -385,7 +383,6 @@ class TestAccessKvmClusterAdditional(MonitorAccessMixin, InstanceTestCase):
self.assertIn('<title>noVNC</title>', result.text) self.assertIn('<title>noVNC</title>', result.text)
@skipIfPython3
@skipUnlessKvm @skipUnlessKvm
class TestAccessKvmClusterBootstrap(MonitorAccessMixin, InstanceTestCase): class TestAccessKvmClusterBootstrap(MonitorAccessMixin, InstanceTestCase):
__partition_reference__ = 'akcb' __partition_reference__ = 'akcb'
...@@ -432,7 +429,6 @@ class TestAccessKvmClusterBootstrap(MonitorAccessMixin, InstanceTestCase): ...@@ -432,7 +429,6 @@ class TestAccessKvmClusterBootstrap(MonitorAccessMixin, InstanceTestCase):
self.assertIn('<title>noVNC</title>', result.text) self.assertIn('<title>noVNC</title>', result.text)
@skipIfPython3
@skipUnlessKvm @skipUnlessKvm
class TestInstanceResilient(InstanceTestCase, KvmMixin): class TestInstanceResilient(InstanceTestCase, KvmMixin):
__partition_reference__ = 'ir' __partition_reference__ = 'ir'
...@@ -515,7 +511,6 @@ ir3:sshd-on-watch RUNNING""", ...@@ -515,7 +511,6 @@ ir3:sshd-on-watch RUNNING""",
) )
@skipIfPython3
@skipUnlessKvm @skipUnlessKvm
class TestAccessResilientAdditional(InstanceTestCase): class TestAccessResilientAdditional(InstanceTestCase):
__partition_reference__ = 'ara' __partition_reference__ = 'ara'
...@@ -849,7 +844,6 @@ class TestBootImageUrlList(InstanceTestCase, FakeImageServerMixin): ...@@ -849,7 +844,6 @@ class TestBootImageUrlList(InstanceTestCase, FakeImageServerMixin):
self.assertPromiseFails(self.config_state_promise) self.assertPromiseFails(self.config_state_promise)
@skipIfPython3
@skipUnlessKvm @skipUnlessKvm
class TestBootImageUrlListResilient(TestBootImageUrlList): class TestBootImageUrlListResilient(TestBootImageUrlList):
kvm_instance_partition_reference = 'biul2' kvm_instance_partition_reference = 'biul2'
...@@ -993,7 +987,6 @@ class TestBootImageUrlSelect(TestBootImageUrlList): ...@@ -993,7 +987,6 @@ class TestBootImageUrlSelect(TestBootImageUrlList):
) )
@skipIfPython3
@skipUnlessKvm @skipUnlessKvm
class TestBootImageUrlSelectResilient(TestBootImageUrlSelect): class TestBootImageUrlSelectResilient(TestBootImageUrlSelect):
kvm_instance_partition_reference = 'bius2' kvm_instance_partition_reference = 'bius2'
...@@ -1222,7 +1215,6 @@ class TestWhitelistFirewallRequest(TestWhitelistFirewall): ...@@ -1222,7 +1215,6 @@ class TestWhitelistFirewallRequest(TestWhitelistFirewall):
self.assertIn('4.4.4.4', self.content_json) self.assertIn('4.4.4.4', self.content_json)
@skipIfPython3
@skipUnlessKvm @skipUnlessKvm
class TestWhitelistFirewallResilient(TestWhitelistFirewall): class TestWhitelistFirewallResilient(TestWhitelistFirewall):
kvm_instance_partition_reference = 'wf2' kvm_instance_partition_reference = 'wf2'
...@@ -1232,7 +1224,6 @@ class TestWhitelistFirewallResilient(TestWhitelistFirewall): ...@@ -1232,7 +1224,6 @@ class TestWhitelistFirewallResilient(TestWhitelistFirewall):
return 'kvm-resilient' return 'kvm-resilient'
@skipIfPython3
@skipUnlessKvm @skipUnlessKvm
class TestWhitelistFirewallRequestResilient(TestWhitelistFirewallRequest): class TestWhitelistFirewallRequestResilient(TestWhitelistFirewallRequest):
kvm_instance_partition_reference = 'wf2' kvm_instance_partition_reference = 'wf2'
......
...@@ -2,10 +2,6 @@ ...@@ -2,10 +2,6 @@
extends = extends =
software.cfg software.cfg
# Ignore these for now
common-parts -=
rdiff-backup
[python] [python]
part = python3 part = python3
......
...@@ -45,7 +45,6 @@ common-parts = ...@@ -45,7 +45,6 @@ common-parts =
template-slapformat-definition.cfg template-slapformat-definition.cfg
template-slapuser-script template-slapuser-script
# XXX: we have to manually add this for resilience # XXX: we have to manually add this for resilience
rdiff-backup
pbs-recipe-egg pbs-recipe-egg
parts = parts =
......
...@@ -24,7 +24,6 @@ extends = ...@@ -24,7 +24,6 @@ extends =
../component/mesa/buildout.cfg ../component/mesa/buildout.cfg
../component/onlyoffice-core/buildout.cfg ../component/onlyoffice-core/buildout.cfg
../component/poppler/buildout.cfg ../component/poppler/buildout.cfg
../component/rdiff-backup/buildout.cfg
../component/xorg/buildout.cfg ../component/xorg/buildout.cfg
versions = versions versions = versions
...@@ -60,7 +59,6 @@ parts = ...@@ -60,7 +59,6 @@ parts =
file file
poppler poppler
rdiff-backup
apache apache
haproxy haproxy
cloudooo-develop cloudooo-develop
...@@ -77,7 +75,6 @@ PasteScript = 3.2.0 ...@@ -77,7 +75,6 @@ PasteScript = 3.2.0
WSGIUtils = 0.7.2 WSGIUtils = 0.7.2
WSGIserver = 1.3 WSGIserver = 1.3
python-magic = 0.4.18 python-magic = 0.4.18
rdiff-backup = 1.0.5+SlapOSPatched001
# Required by: # Required by:
# PasteScript== 3.2.0 # PasteScript== 3.2.0
......
...@@ -32,7 +32,6 @@ extends = ...@@ -32,7 +32,6 @@ extends =
../../component/pycrypto-python/buildout.cfg ../../component/pycrypto-python/buildout.cfg
../../component/pysvn-python/buildout.cfg ../../component/pysvn-python/buildout.cfg
../../component/python-ldap-python/buildout.cfg ../../component/python-ldap-python/buildout.cfg
../../component/rdiff-backup/buildout.cfg
../../component/scikit-learn/buildout.cfg ../../component/scikit-learn/buildout.cfg
../../component/scikit-image/buildout.cfg ../../component/scikit-image/buildout.cfg
../../component/PyWavelets/buildout.cfg ../../component/PyWavelets/buildout.cfg
...@@ -64,7 +63,6 @@ extends = ...@@ -64,7 +63,6 @@ extends =
parts += parts +=
erp5-util-develop erp5-util-develop
slapos-cookbook slapos-cookbook
rdiff-backup
mroonga-mariadb mroonga-mariadb
tesseract tesseract
tesseract-eng-traineddata tesseract-eng-traineddata
...@@ -624,9 +622,6 @@ zope.dottedname = 4.1.0 ...@@ -624,9 +622,6 @@ zope.dottedname = 4.1.0
# test_UserManagerInterfaces in testERP5Security fails with 1.10.0. # test_UserManagerInterfaces in testERP5Security fails with 1.10.0.
Products.PluggableAuthService = 1.9.0 Products.PluggableAuthService = 1.9.0
# we are still using this old stable version.
rdiff-backup = 1.0.5+SlapOSPatched001
# modified version that works fine for buildout installation # modified version that works fine for buildout installation
SOAPpy = 0.12.0nxd001 SOAPpy = 0.12.0nxd001
......
...@@ -20,7 +20,6 @@ parts = ...@@ -20,7 +20,6 @@ parts =
# needed tools for resiliency # needed tools for resiliency
gzip gzip
rdiff-backup
dash dash
[pbs-recipe-egg] [pbs-recipe-egg]
...@@ -124,12 +123,3 @@ mode = 0644 ...@@ -124,12 +123,3 @@ mode = 0644
[exporter-default-configuration] [exporter-default-configuration]
# Time in minutes to wait for the backup to finish # Time in minutes to wait for the backup to finish
backup_wait_time = 10 backup_wait_time = 10
[rdiff-backup]
eggs =
${rdiff-backup-build-1.3.4:egg}
[versions]
# 1.3.4nxdX is invalid version string, thus pached version string is not '1.3.4nxdX+SlapOSPatched001'
# but '1.3.4nxdX-SlapOSPatched001'.
rdiff-backup = 1.3.4nxd6-SlapOSPatched001
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
# not need these here). # not need these here).
[pbsready] [pbsready]
filename = pbsready.cfg.in filename = pbsready.cfg.in
md5sum = 4b0f914a54c9be5bff2b86f3416f4584 md5sum = afb54d1aafd5854116028bc63501409b
[pbsready-import] [pbsready-import]
filename = pbsready-import.cfg.in filename = pbsready-import.cfg.in
...@@ -26,7 +26,7 @@ md5sum = 2b0c71b085cfe8017f28098c160b1f49 ...@@ -26,7 +26,7 @@ md5sum = 2b0c71b085cfe8017f28098c160b1f49
[template-pull-backup] [template-pull-backup]
filename = instance-pull-backup.cfg.in filename = instance-pull-backup.cfg.in
md5sum = 382d9b57faac92da3c723760f2210c13 md5sum = e64e13854332bcc2595df187fcae1203
[template-replicated] [template-replicated]
filename = template-replicated.cfg.in filename = template-replicated.cfg.in
......
...@@ -113,7 +113,7 @@ feeds = $${directory:notifier-feeds} ...@@ -113,7 +113,7 @@ feeds = $${directory:notifier-feeds}
callbacks-directory = $${directory:notifier-callbacks} callbacks-directory = $${directory:notifier-callbacks}
equeue-socket = $${equeue:socket} equeue-socket = $${equeue:socket}
notifier-binary = ${buildout:bin-directory}/pubsubnotifier notifier-binary = ${buildout:bin-directory}/pubsubnotifier
rdiffbackup-binary = ${buildout:bin-directory}/rdiff-backup rdiffbackup-binary = ${rdiff-backup-1.3.4:location}/bin/rdiff-backup
sshclient-binary = $${openssh-client:wrapper-path} sshclient-binary = $${openssh-client:wrapper-path}
known-hosts = $${directory:dot-ssh}/known_hosts known-hosts = $${directory:dot-ssh}/known_hosts
promises-directory = $${basedirectory:promises} promises-directory = $${basedirectory:promises}
...@@ -133,7 +133,7 @@ status-item-directory = $${directory:notifier-status-items} ...@@ -133,7 +133,7 @@ status-item-directory = $${directory:notifier-status-items}
[pbs-resilient-status-feed] [pbs-resilient-status-feed]
recipe = slapos.cookbook:wrapper recipe = slapos.cookbook:wrapper
command-line = ${buildout:directory}/bin/generatefeed --output $${:feed-path} --status-item-path $${pbs:status-item-directory} --title "Status feed for $${monitor-instance-parameter:root-instance-title}-PBS" --link $${pbs:log-url} command-line = ${buildout:bin-directory}/generatefeed --output $${:feed-path} --status-item-path $${pbs:status-item-directory} --title "Status feed for $${monitor-instance-parameter:root-instance-title}-PBS" --link $${pbs:log-url}
feed-path = $${directory:monitor-resilient}/pbs-status-rss feed-path = $${directory:monitor-resilient}/pbs-status-rss
wrapper-path = $${rootdirectory:bin}/resilient-genstatusrss.py wrapper-path = $${rootdirectory:bin}/resilient-genstatusrss.py
...@@ -197,7 +197,7 @@ wrapper-path = $${rootdirectory:bin}/ssh ...@@ -197,7 +197,7 @@ wrapper-path = $${rootdirectory:bin}/ssh
[resilient-genstatrss-wrapper] [resilient-genstatrss-wrapper]
recipe = slapos.cookbook:wrapper recipe = slapos.cookbook:wrapper
# XXX - hard-coded Urls # XXX - hard-coded Urls
command-line = ${buildout:directory}/bin/rdiffbackup.genstatrss --output '$${monitor-directory:public}/resilient-feed' --rdiff_backup_data_folder '$${pbs:rdiff-backup-data-folder}' --feed_url '$${monitor-conf-parameters:base-url}/public/resilient-feed' command-line = ${buildout:bin-directory}/rdiffbackup.genstatrss --output '$${monitor-directory:public}/resilient-feed' --rdiff_backup_data_folder '$${pbs:rdiff-backup-data-folder}' --feed_url '$${monitor-conf-parameters:base-url}/public/resilient-feed'
wrapper-path = $${directory:bin}/resilient-genstatrss.py wrapper-path = $${directory:bin}/resilient-genstatrss.py
[pbs-push-history-log] [pbs-push-history-log]
......
...@@ -103,7 +103,7 @@ recipe = slapos.cookbook:pbs ...@@ -103,7 +103,7 @@ recipe = slapos.cookbook:pbs
client = false client = false
path = $${directory:backup} path = $${directory:backup}
wrapper = $${rootdirectory:bin}/rdiffbackup-server wrapper = $${rootdirectory:bin}/rdiffbackup-server
rdiffbackup-binary = ${buildout:bin-directory}/rdiff-backup rdiffbackup-binary = ${rdiff-backup-1.3.4:location}/bin/rdiff-backup
#---------------- #----------------
...@@ -141,7 +141,7 @@ context = ...@@ -141,7 +141,7 @@ context =
[notifier-resilient-status-feed] [notifier-resilient-status-feed]
recipe = slapos.cookbook:wrapper recipe = slapos.cookbook:wrapper
command-line = ${buildout:directory}/bin/generatefeed --output $${:feed-path} --status-item-path $${notifier:status-item-directory} --title "Status feed for $${notifier:instance-root-name}" --link $${notifier:log-url} command-line = ${buildout:bin-directory}/generatefeed --output $${:feed-path} --status-item-path $${notifier:status-item-directory} --title "Status feed for $${notifier:instance-root-name}" --link $${notifier:log-url}
feed-path = $${directory:monitor-resilient}/notifier-status-rss feed-path = $${directory:monitor-resilient}/notifier-status-rss
wrapper-path = $${rootdirectory:bin}/resilient-genstatusrss.py wrapper-path = $${rootdirectory:bin}/resilient-genstatusrss.py
......
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