From fb754958e8ee436a1645c9fc49e0d290267cdbe6 Mon Sep 17 00:00:00 2001 From: Gabriel Monnerat <gabriel@tiolive.com> Date: Tue, 27 Mar 2012 07:50:56 -0300 Subject: [PATCH] Revert "merger master into cloudooo branch" to make the merge in the right way, without squash. This reverts commit 72acaad9bad80f6582f2cf5ffa3e3532dc35a6f3. --- .gitignore | 1 - CHANGES.txt | 152 +- MANIFEST.in | 4 +- component/alsa/buildout.cfg | 21 - component/apache/buildout.cfg | 14 +- component/binutils/buildout.cfg | 8 - component/boa/buildout.cfg | 37 - component/busybox/buildout.cfg | 18 - component/ca-certificates/buildout.cfg | 23 - .../ca-certificates-sbin-dir.patch | 27 - component/cclient/buildout.cfg | 5 +- component/cclient/imap-2007f.patch | 43 +- component/chromium/buildout.cfg | 47 - component/cmake/buildout.cfg | 4 +- component/corosync/buildout.cfg | 14 - component/curl/buildout.cfg | 4 +- .../cyrus-sasl-prototype-declaration.patch | 11 + component/dash/buildout.cfg | 12 - component/dbus/buildout.cfg | 30 - component/dropbear/buildout.cfg | 24 +- .../dropbear-0.53.1-static_build_fix.patch | 11 - component/dropbear/no-shell-checking.patch | 20 - component/dropbear/userspace.patch | 2 +- component/erlang/buildout.cfg | 8 - component/file/buildout.cfg | 8 +- component/firefox/buildout.cfg | 40 - component/fontconfig/buildout.cfg | 1 - component/fonts/buildout.cfg | 10 +- component/freetype/buildout.cfg | 4 +- component/gcc/buildout.cfg | 20 - component/gcc/gcc-java-pre-4.4.patch | 36 - component/gdbm/buildout.cfg | 15 +- .../gdbm/gdbm-Makefile.in-nochange.patch | 40 + component/ghostscript/buildout.cfg | 22 +- component/ghostscript/ghostscript-hooks.py | 7 + component/git/buildout.cfg | 6 +- component/gnutls/buildout.cfg | 34 - component/graphviz/buildout.cfg | 8 +- component/grep/buildout.cfg | 8 +- component/groonga/buildout.cfg | 8 +- component/gtk-2/buildout.cfg | 82 - ...ocket-Plugin-for-MySQL-1.0.6-mariadb.patch | 37 + component/handlersocket/buildout.cfg | 36 + component/haproxy/buildout.cfg | 4 +- component/intltool/buildout.cfg | 19 - component/libaio/buildout.cfg | 12 - component/libmemcached/buildout.cfg | 30 - component/libpng/buildout.cfg | 4 +- component/libtool/buildout.cfg | 4 +- component/mariadb/buildout.cfg | 35 +- .../mysql_create_system_tables__no_test.patch | 26 - component/membase/buildout.cfg | 138 -- component/memcached/buildout.cfg | 66 +- .../memcached-fix-strict-aliasing.patch | 40 + component/memcached/memcached-gcc-4.4.patch | 12 - component/memcached/memcached-gcc4.6.patch | 36 + component/memstrike/buildout.cfg | 34 - component/mesa/buildout.cfg | 41 - component/mroonga/buildout.cfg | 40 + .../groonga-storage-engine-0.4.mariadb.patch | 14 + component/mydumper/buildout.cfg | 79 - .../mydumper-remove-warnings-errors.patch | 11 - component/mysql-5.1/buildout.cfg | 12 +- .../mysql-5.1.49-sphinx-1.10.diff} | 1721 ++++++++++++++--- .../mysql_create_system_tables__no_test.patch | 26 - component/mysql-5.5/buildout.cfg | 76 - .../mysql_create_system_tables__no_test.patch | 27 - component/mysql-tritonn-5.0/buildout.cfg | 5 +- component/ncurses/buildout.cfg | 3 +- component/nspr/buildout.cfg | 25 - component/nss/buildout.cfg | 67 - component/openldap/buildout.cfg | 4 +- component/openssl/buildout.cfg | 18 +- component/openssl/openssl-nodoc.patch | 11 - component/opera/buildout.cfg | 47 - component/percona-toolkit/buildout.cfg | 16 - component/perl-DBD-MySQL/buildout.cfg | 13 +- .../DBD-mysql-4.019.rpathsupport.patch | 19 - component/perl-DBD-common/buildout.cfg | 16 - component/perl-DBD-mariadb/buildout.cfg | 23 - component/perl-XML-Parser/buildout.cfg | 30 - component/perl/buildout.cfg | 6 +- component/pkgconfig/buildout.cfg | 6 +- component/pwgen/buildout.cfg | 8 - component/python-2.6/buildout.cfg | 2 - component/python-2.7/buildout.cfg | 2 - component/qt/buildout.cfg | 61 - component/rdiff-backup/buildout.cfg | 2 +- component/readline/buildout.cfg | 28 +- component/sed/buildout.cfg | 2 + component/sheepstrike/buildout.cfg | 12 - .../shellinabox/0001-Switch-to-IPv6.patch | 213 -- ...002-Allow-to-run-entire-command-path.patch | 26 - component/shellinabox/buildout.cfg | 34 - component/slapos/buildout.cfg | 39 +- component/sphinx/buildout.cfg | 4 +- .../sphinx/sphinx-1.10-fix_nosigpipe.patch | 19 + component/sqlite3/buildout.cfg | 4 +- component/xorg/buildout.cfg | 268 +-- component/xtrabackup/buildout.cfg | 24 +- .../xtrabackup/xtrabackup-1.6.2_build.patch | 13 +- component/xtrabackup/xtrabackup_build.patch | 151 ++ component/zabbix/buildout.cfg | 4 +- setup.py | 73 +- slapos/recipe/README.apache_frontend.txt | 4 - slapos/recipe/README.download.txt | 36 + slapos/recipe/README.helloworld.txt | 4 + slapos/recipe/README.java.txt | 46 + slapos/recipe/README.lamp.txt | 49 +- slapos/recipe/README.seleniumrunner.txt | 24 - slapos/recipe/_urlparse.py | 52 - slapos/recipe/apache_frontend/__init__.py | 442 ----- .../apache_frontend/template/apache.conf.in | 74 - .../template/apache.conf.path-protected.in | 5 - .../template/apache.location-snippet.conf.in | 5 - .../template/apache.ssl-snippet.conf.in | 6 - .../apache_frontend/template/notfound.html | 9 - .../template/stunnel.conf.entry.in | 3 - .../apache_frontend/template/stunnel.conf.in | 14 - .../apache_frontend/template/varnish.vcl.in | 245 --- slapos/recipe/apache_zope_backend/__init__.py | 67 - .../template/apache.zope.conf.in | 63 - slapos/recipe/apachephp/__init__.py | 117 -- slapos/recipe/apachephp/template/php.ini.in | 18 - slapos/recipe/apacheproxy/__init__.py | 66 - slapos/recipe/apacheproxy/template/apache.in | 43 - .../recipe/certificate_authority/__init__.py | 2 +- .../certificate_authority.py | 3 +- slapos/recipe/davstorage/__init__.py | 176 +- slapos/recipe/dcron.py | 7 +- .../recipe/{symbolic_link.py => download.py} | 56 +- slapos/recipe/dropbear.py | 172 -- slapos/recipe/duplicity.py | 26 +- slapos/recipe/equeue.py | 46 - slapos/recipe/erp5/__init__.py | 1099 ++++++++++- slapos/recipe/erp5/catdatefile.py | 14 + .../{pulse2 => erp5}/certificate_authority.py | 0 slapos/recipe/{erp5_update => erp5}/erp5.py | 12 +- .../{generic_mysql => erp5}/innobackupex.py | 0 slapos/recipe/erp5/killpidfromfile.py | 12 + .../recipe/{generic_mysql => erp5}/mysql.py | 0 .../erp5/template/apache.ssl-snippet.conf.in | 2 - .../recipe/erp5/template/apache.zope.conf.in | 4 - .../template/cloudooo.cfg.in | 1 - .../{haproxy => erp5}/template/haproxy.cfg.in | 4 +- .../template/initmysql.sql.in | 0 .../template/kumo_gateway.in | 0 .../template/kumo_manager.in | 0 .../template/kumo_server.in | 0 .../template/logrotate_entry.in | 0 .../template/memcached.in | 0 .../template/my.cnf.in | 9 +- .../erp5/template/mysql-init-function.sql.in | 5 - .../template/openssl.cnf.ca.in | 0 .../{generic_zope => erp5}/template/site.zcml | 0 slapos/recipe/erp5/template/tidstorage.py.in | 15 + .../recipe/{zeo => erp5}/template/zeo.conf.in | 0 .../zope-deadlockdebugger-snippet.conf.in | 7 + .../template/zope-tidstorage-snippet.conf.in | 6 + .../erp5/template/zope-zeo-snippet.conf.in | 10 + .../erp5/template/zope-zodb-snippet.conf.in | 7 + .../template/zope.conf.in | 11 +- .../template/zope.conf.timerservice.in} | 0 slapos/recipe/erp5/test_suite_runner.py | 23 + slapos/recipe/erp5/testrunner.py | 23 + slapos/recipe/erp5_test/__init__.py | 74 - slapos/recipe/erp5_test/test.py | 72 - slapos/recipe/erp5_update/__init__.py | 73 - .../recipe/erp5scalabilitytestbed/__init__.py | 106 - .../template/erp5tester_manager_run.in | 9 - .../template/nosqltester_run.in | 7 - slapos/recipe/erp5testnode/SlapOSControler.py | 94 + slapos/recipe/erp5testnode/Updater.py | 189 ++ slapos/recipe/erp5testnode/__init__.py | 194 +- .../erp5testnode/template/erp5testnode.cfg.in | 31 - .../erp5testnode/template/slapos.cfg.in | 10 + slapos/recipe/erp5testnode/testnode.py | 245 +++ slapos/recipe/fontconfig/__init__.py | 85 - .../template/fontconfig-snippet.cfg.in | 1 - .../fontconfig/template/fontconfig.cfg.in | 5 - .../template/onetimedownload_run.in | 4 - slapos/recipe/generate_cloudooo.py | 60 - slapos/recipe/generate_erp5_tidstorage.py | 198 -- slapos/recipe/generic_cloudooo/__init__.py | 58 - slapos/recipe/generic_kumofs/__init__.py | 70 - slapos/recipe/generic_memcached/__init__.py | 56 - slapos/recipe/generic_mysql/__init__.py | 179 -- slapos/recipe/generic_zope/__init__.py | 135 -- .../recipe/generic_zope/template/zope.conf.in | 73 - .../generic_zope_zeo_client/__init__.py | 165 -- .../template/site.zcml | 26 - .../template/zope.zeo.entry.conf.in | 10 - slapos/recipe/haproxy/__init__.py | 101 - .../template/haproxy-server-snippet.cfg.in | 2 - slapos/recipe/{publish.py => helloworld.py} | 24 +- slapos/recipe/java.py | 120 ++ slapos/recipe/kvm/__init__.py | 62 +- slapos/recipe/kvm/certificate_authority.py | 8 +- slapos/recipe/lamp/__init__.py | 32 +- slapos/recipe/lamp/template/my.cnf.in | 5 +- slapos/recipe/librecipe/__init__.py | 1 - slapos/recipe/librecipe/execute.py | 64 +- slapos/recipe/librecipe/filehash.py | 96 - slapos/recipe/librecipe/generic.py | 50 +- slapos/recipe/librecipe/genericslap.py | 67 +- slapos/recipe/librecipe/inotify.py | 51 - slapos/recipe/lockfile.py | 90 - slapos/recipe/logrotate.py | 72 +- slapos/recipe/mkdirectory.py | 2 +- slapos/recipe/mydumper.py | 112 -- slapos/recipe/mysql/__init__.py | 92 +- slapos/recipe/mysql/backup.py | 22 + .../certificate_authority.py | 8 +- .../template/logrotate_entry.in | 0 slapos/recipe/mysql/template/my.cnf.in | 3 +- .../template/openssl.cnf.ca.in | 0 .../template/stunnel.conf.in | 0 slapos/recipe/nosqltestbed/__init__.py | 203 +- slapos/recipe/nosqltestbed/kumo/__init__.py | 288 --- .../kumo/template/kumo_server_run.in | 6 - .../kumo/template/kumotester_manager_run.in | 8 - .../kumo/template/memstrike_run.in | 4 - .../{kumo => }/template/kumo_gateway_run.in | 3 +- .../{kumo => }/template/kumo_manager_run.in | 3 +- .../nosqltestbed/template/kumo_server_run.in | 4 + .../template/kumotester_manager_run.in | 4 + .../template/nosqltester_manager_run.in | 5 +- .../nosqltestbed/template/nosqltester_run.in | 4 +- slapos/recipe/notifier.py | 89 - slapos/recipe/osoeslaptraining/__init__.py | 206 ++ .../apache.py | 0 .../{pulse2 => osoeslaptraining}/mysql.py | 27 +- .../template/apache.in | 1 - .../template/my.cnf.in | 0 .../template/mysqlinit.sql.in | 0 .../template/php.ini.in | 0 slapos/recipe/pbs.py | 228 --- slapos/recipe/publishurl.py | 6 +- slapos/recipe/pulse2/__init__.py | 431 ----- slapos/recipe/pulse2/apache.py | 22 - slapos/recipe/pulse2/innobackupex.py | 25 - slapos/recipe/pulse2/template/apache.in.in | 58 - slapos/recipe/pulse2/template/memcached.in | 2 - slapos/recipe/pulse2/template/mmc-core.in | 2 - .../pulse2/template/mmc_conf/agent/config.ini | 59 - .../template/mmc_conf/agent/config.ini.in | 59 - .../pulse2/template/mmc_conf/mmc.ini.in | 53 - .../pulse2/template/mmc_conf/plugins/base.ini | 190 -- .../template/mmc_conf/plugins/base.ini.in | 190 -- .../template/mmc_conf/plugins/ppolicy.ini.in | 26 - .../pulse2_conf/plugins/dyngroup.ini.in | 34 - .../template/pulse2_conf/plugins/glpi.ini.in | 53 - .../pulse2_conf/plugins/imaging.ini.in | 35 - .../pulse2_conf/plugins/inventory.ini.in | 73 - .../template/pulse2_conf/plugins/msc.ini.in | 143 -- .../template/pulse2_conf/plugins/pkgs.ini.in | 15 - .../pulse2_conf/plugins/pulse2.ini.in | 16 - .../pulse2_conf/pulse2/atftpd/pcre.conf.in | 14 - .../imaging-server/imaging-server.ini.in | 116 -- .../inventory-server/inventory-server.ini.in | 68 - .../pulse2/launchers/launchers.ini.in | 160 -- .../pulse2/launchers/log_launcher_01.ini.in | 21 - .../pulse2_conf/pulse2/p2ipc-windows.ini.in | 58 - .../template/pulse2_conf/pulse2/p2ipc.ini.in | 11 - .../package-server/package-server.ini.in | 200 -- .../plugin_terminal_type.ini.in | 21 - .../pulse2/scheduler/scheduler.ini.in | 178 -- slapos/recipe/pwgen.py | 45 - slapos/recipe/request.py | 53 +- .../ERP5TypeFunctionalTestCase.py | 356 ---- slapos/recipe/seleniumrunner/__init__.py | 107 - .../erp5functionaltestreporthandler.py | 187 -- .../seleniumrunner/template/xvfb_run.in | 5 - slapos/recipe/seleniumrunner/testrunner.py | 138 -- slapos/recipe/shell.py | 57 - slapos/recipe/shellinabox.py | 106 - slapos/recipe/simplelogger.py | 26 +- slapos/recipe/slaprunner/__init__.py | 17 +- .../recipe/slaprunner/template/slapos.cfg.in | 8 - slapos/recipe/softwaretype.py | 24 +- slapos/recipe/sphinx/__init__.py | 58 - slapos/recipe/sphinx/template/sphinx.conf.in | 596 ------ slapos/recipe/sshkeys_authority.py | 160 -- slapos/recipe/stunnel/__init__.py | 59 +- slapos/recipe/stunnel/template/server.conf.in | 4 +- slapos/recipe/tidstorage/__init__.py | 41 - .../tidstorage/template/tidstorage.py.in | 15 - slapos/recipe/vifib.py | 10 +- slapos/recipe/waitfor.py | 42 - slapos/recipe/xwiki/template/.svn/all-wcprops | 35 + slapos/recipe/xwiki/template/.svn/entries | 198 ++ .../text-base/hibernate.cfg.xml.in.svn-base | 128 ++ .../.svn/text-base/initmysql.sql.in.svn-base | 4 + .../.svn/text-base/my.cnf.in.svn-base | 75 + .../.svn/text-base/mysqld.bin.svn-base | 2 + .../text-base/tomcat-server.xml.in.svn-base | 148 ++ slapos/recipe/xwiki/template/my.cnf.in | 57 +- slapos/recipe/zeo/__init__.py | 92 - .../template/zeo-filestorage-snippet.conf.in | 4 - software/MediaWiki/instance.cfg | 15 - .../patch/mediawiki-1.17.0.config.patch | 10 - software/MediaWiki/software.cfg | 146 -- software/SilverStripe/instance.cfg | 15 - software/SilverStripe/software.cfg | 130 -- software/apache-frontend/instance.cfg | 18 - software/apache-frontend/software.cfg | 141 -- software/b2evolution/instance.cfg | 15 - software/b2evolution/software.cfg | 131 -- software/cloudooo/instance.cfg | 2 +- software/cmsmadesimple/instance.cfg | 15 - software/cmsmadesimple/software.cfg | 129 -- software/coppermine/software.cfg | 140 -- .../coppermine/template/coppermine.inc.php.in | 25 - software/davstorage/instance-davstorage.cfg | 151 -- software/davstorage/instance.cfg | 12 - software/davstorage/software.cfg | 135 -- software/dotclear/instance.cfg | 17 - software/dotclear/software.cfg | 141 -- .../dotclear/template/dotclear.inc.php.in | 25 - software/dotproject/instance.cfg | 17 - software/dotproject/software.cfg | 140 -- .../dotproject/template/config.inc.php.in | 25 - software/drupal/instance.cfg | 15 - software/drupal/software.cfg | 129 -- software/eSKUeL/instance.cfg | 15 - software/eSKUeL/software.cfg | 130 -- software/erp5/instance-cloudooo.cfg | 61 - software/erp5/instance-erp5-development.cfg | 129 -- software/erp5/instance-erp5-production.cfg | 93 - software/erp5/instance-kumofs.cfg | 111 -- software/erp5/instance-mariadb.cfg | 174 -- software/erp5/instance-memcached.cfg | 35 - software/erp5/instance-sphinx.cfg | 43 - software/erp5/instance-zope.cfg | 258 --- software/erp5/instance.cfg | 107 +- software/erp5/snippet-backend.cfg | 42 - software/erp5/snippet-fontconfig.cfg | 2 - software/erp5/snippet-master.cfg | 235 --- software/erp5/snippet-zeo.cfg | 16 - software/erp5/snippet-zope.cfg | 52 - software/erp5/software.cfg | 312 ++- software/erp5scalabilitytestbed/instance.cfg | 13 - software/erp5scalabilitytestbed/software.cfg | 60 - software/erp5testnode/instance-default.cfg | 150 -- software/erp5testnode/instance.cfg | 17 +- software/erp5testnode/software.cfg | 192 +- software/ezpublish/instance.cfg | 15 - software/ezpublish/software.cfg | 129 -- software/joomla/instance.cfg | 15 - software/joomla/software.cfg | 130 -- software/kumofs/software.cfg | 103 +- software/kvm/instance.cfg | 2 +- software/kvm/software.cfg | 172 +- software/lamp-template-static/instance.cfg | 10 - software/lamp-template-static/software.cfg | 114 -- software/lamp-template/instance.cfg | 17 - software/lamp-template/software.cfg | 133 -- software/lamp-template/template/php.ini.in | 18 - .../template/phpmyadmin.inc.php.in | 25 - .../lamp-template/template/wp-config.php.in | 90 - software/libcloud-requester/instance.cfg | 19 - software/libcloud-requester/software.cfg | 31 - software/libcloud/instance.cfg | 21 - software/libcloud/software.cfg | 43 - software/magento/instance.cfg | 15 - software/magento/software.cfg | 129 -- software/mariadb/instance-mariadb.cfg | 179 -- software/mariadb/instance-recover.cfg | 7 - software/mariadb/instance-remotebackuped.cfg | 31 - software/mariadb/instance.cfg | 22 +- software/mariadb/software.cfg | 48 +- software/memcached/software.cfg | 2 +- software/mysql-5.1/software.cfg | 110 +- software/nbd/software.cfg | 5 - software/net2ftp/configure.py | 25 - software/net2ftp/instance.cfg | 25 - software/net2ftp/software.cfg | 154 -- software/net2ftp/template/net2ftp.inc.php.in | 147 -- software/nosqltestbed/instance.cfg | 16 - software/nosqltestbed/software.cfg | 70 - software/openX/instance.cfg | 15 - software/openX/software.cfg | 130 -- software/os-commerce/instance.cfg | 15 - software/os-commerce/software.cfg | 130 -- software/phpbb/instance.cfg | 22 - software/phpbb/software.cfg | 132 -- software/phpmyadmin/software.cfg | 108 +- software/phpnuke/instance.cfg | 17 - software/phpnuke/software.cfg | 142 -- software/phpnuke/template/phpnuke.inc.php.in | 25 - software/pimcore/instance.cfg | 15 - software/pimcore/software.cfg | 129 -- software/piwigo/instance.cfg | 17 - software/piwigo/software.cfg | 142 -- software/piwigo/template/piwigo.inc.php.in | 15 - software/piwik/instance.cfg | 15 - software/piwik/software.cfg | 131 -- software/prestashop/instance.cfg | 22 - software/prestashop/software.cfg | 132 -- software/proactive/instance.cfg | 13 - software/proactive/software.cfg | 51 - software/pulse/instance.cfg | 21 - software/pulse/software.cfg | 145 -- software/punbb/instance.cfg | 17 - software/punbb/software.cfg | 141 -- software/punbb/template/punbb.inc.php.in | 18 - software/seleniumrunner/instance.cfg | 11 - software/seleniumrunner/software.cfg | 52 - software/sheepdogtestbed/instance.cfg | 13 - software/sheepdogtestbed/software.cfg | 20 - software/simpleMachineForum/instance.cfg | 15 - software/simpleMachineForum/software.cfg | 131 -- software/slaprunner/instance.cfg | 50 - software/slaprunner/software.cfg | 135 +- software/spip/instance.cfg | 15 - software/spip/software.cfg | 129 -- software/statusnet/instance.cfg | 15 - software/statusnet/software.cfg | 130 -- software/sugar-crm/instance.cfg | 15 - software/sugar-crm/software.cfg | 129 -- software/testnode/instance.cfg | 18 - software/testnode/software.cfg | 82 - software/tiki/instance.cfg | 15 - software/tiki/software.cfg | 129 -- software/vifib/software.cfg | 18 +- .../{coppermine => wordpress}/instance.cfg | 0 software/wordpress/software.cfg | 45 +- software/wordpress/wp-config.php.in | 16 +- software/xoops/instance.cfg | 15 - software/xoops/software.cfg | 130 -- software/xwiki/instance.cfg | 15 - software/xwiki/software.cfg | 47 - software/zencart/configure.py | 20 - software/zencart/instance.cfg | 23 - software/zencart/software.cfg | 143 -- stack/cloudooo.cfg | 5 +- stack/erp5.cfg | 106 +- stack/kvm.cfg | 92 + stack/lamp.cfg | 76 +- stack/lamp/buildout.cfg | 142 -- stack/lamp/instance-apache-backup.cfg | 156 -- stack/lamp/instance-apache-php.cfg | 191 -- stack/lamp/instance-backuped.cfg | 174 -- .../lamp/instance-mariadb-pbsready-export.cfg | 33 - .../lamp/instance-mariadb-pbsready-import.cfg | 24 - stack/lamp/instance-mariadb-pbsready.cfg | 110 -- stack/lamp/instance-mariadb.cfg | 187 -- stack/lamp/instance-pull-backup.cfg | 172 -- stack/lamp/instance.cfg | 17 - stack/nbd.cfg | 3 - stack/sheepdogtestbed.cfg | 17 - stack/slapos.cfg | 40 - stack/tomcat.cfg | 56 - 453 files changed, 6318 insertions(+), 22180 deletions(-) delete mode 100644 component/alsa/buildout.cfg delete mode 100644 component/binutils/buildout.cfg delete mode 100644 component/boa/buildout.cfg delete mode 100644 component/busybox/buildout.cfg delete mode 100644 component/ca-certificates/buildout.cfg delete mode 100644 component/ca-certificates/ca-certificates-sbin-dir.patch delete mode 100644 component/chromium/buildout.cfg delete mode 100644 component/corosync/buildout.cfg create mode 100644 component/cyrus-sasl/cyrus-sasl-prototype-declaration.patch delete mode 100644 component/dash/buildout.cfg delete mode 100644 component/dbus/buildout.cfg delete mode 100644 component/dropbear/dropbear-0.53.1-static_build_fix.patch delete mode 100644 component/dropbear/no-shell-checking.patch delete mode 100644 component/erlang/buildout.cfg delete mode 100644 component/firefox/buildout.cfg delete mode 100644 component/gcc/gcc-java-pre-4.4.patch create mode 100644 component/gdbm/gdbm-Makefile.in-nochange.patch create mode 100644 component/ghostscript/ghostscript-hooks.py delete mode 100644 component/gnutls/buildout.cfg delete mode 100644 component/gtk-2/buildout.cfg create mode 100644 component/handlersocket/HandlerSocket-Plugin-for-MySQL-1.0.6-mariadb.patch create mode 100644 component/handlersocket/buildout.cfg delete mode 100644 component/intltool/buildout.cfg delete mode 100644 component/libaio/buildout.cfg delete mode 100644 component/libmemcached/buildout.cfg delete mode 100644 component/mariadb/mysql_create_system_tables__no_test.patch delete mode 100644 component/membase/buildout.cfg create mode 100644 component/memcached/memcached-fix-strict-aliasing.patch delete mode 100644 component/memcached/memcached-gcc-4.4.patch create mode 100644 component/memcached/memcached-gcc4.6.patch delete mode 100644 component/memstrike/buildout.cfg delete mode 100644 component/mesa/buildout.cfg create mode 100644 component/mroonga/buildout.cfg create mode 100644 component/mroonga/groonga-storage-engine-0.4.mariadb.patch delete mode 100644 component/mydumper/buildout.cfg delete mode 100644 component/mydumper/mydumper-remove-warnings-errors.patch rename component/{mysql-5.5/mysql-5.5-sphinx-2.0.1-beta.diff => mysql-5.1/mysql-5.1.49-sphinx-1.10.diff} (67%) delete mode 100644 component/mysql-5.1/mysql_create_system_tables__no_test.patch delete mode 100644 component/mysql-5.5/buildout.cfg delete mode 100644 component/mysql-5.5/mysql_create_system_tables__no_test.patch delete mode 100644 component/nspr/buildout.cfg delete mode 100644 component/nss/buildout.cfg delete mode 100644 component/openssl/openssl-nodoc.patch delete mode 100644 component/opera/buildout.cfg delete mode 100644 component/percona-toolkit/buildout.cfg delete mode 100644 component/perl-DBD-common/DBD-mysql-4.019.rpathsupport.patch delete mode 100644 component/perl-DBD-common/buildout.cfg delete mode 100644 component/perl-DBD-mariadb/buildout.cfg delete mode 100644 component/perl-XML-Parser/buildout.cfg delete mode 100644 component/pwgen/buildout.cfg delete mode 100644 component/qt/buildout.cfg delete mode 100644 component/sheepstrike/buildout.cfg delete mode 100644 component/shellinabox/0001-Switch-to-IPv6.patch delete mode 100644 component/shellinabox/0002-Allow-to-run-entire-command-path.patch delete mode 100644 component/shellinabox/buildout.cfg create mode 100644 component/sphinx/sphinx-1.10-fix_nosigpipe.patch create mode 100644 component/xtrabackup/xtrabackup_build.patch delete mode 100644 slapos/recipe/README.apache_frontend.txt create mode 100644 slapos/recipe/README.download.txt create mode 100644 slapos/recipe/README.helloworld.txt create mode 100644 slapos/recipe/README.java.txt delete mode 100644 slapos/recipe/README.seleniumrunner.txt delete mode 100644 slapos/recipe/_urlparse.py delete mode 100644 slapos/recipe/apache_frontend/__init__.py delete mode 100644 slapos/recipe/apache_frontend/template/apache.conf.in delete mode 100644 slapos/recipe/apache_frontend/template/apache.conf.path-protected.in delete mode 100644 slapos/recipe/apache_frontend/template/apache.location-snippet.conf.in delete mode 100644 slapos/recipe/apache_frontend/template/apache.ssl-snippet.conf.in delete mode 100644 slapos/recipe/apache_frontend/template/notfound.html delete mode 100644 slapos/recipe/apache_frontend/template/stunnel.conf.entry.in delete mode 100644 slapos/recipe/apache_frontend/template/stunnel.conf.in delete mode 100644 slapos/recipe/apache_frontend/template/varnish.vcl.in delete mode 100644 slapos/recipe/apache_zope_backend/__init__.py delete mode 100644 slapos/recipe/apache_zope_backend/template/apache.zope.conf.in delete mode 100644 slapos/recipe/apachephp/__init__.py delete mode 100644 slapos/recipe/apachephp/template/php.ini.in delete mode 100644 slapos/recipe/apacheproxy/__init__.py delete mode 100644 slapos/recipe/apacheproxy/template/apache.in rename slapos/recipe/{symbolic_link.py => download.py} (50%) delete mode 100644 slapos/recipe/dropbear.py delete mode 100644 slapos/recipe/equeue.py create mode 100644 slapos/recipe/erp5/catdatefile.py rename slapos/recipe/{pulse2 => erp5}/certificate_authority.py (100%) rename slapos/recipe/{erp5_update => erp5}/erp5.py (96%) rename slapos/recipe/{generic_mysql => erp5}/innobackupex.py (100%) create mode 100644 slapos/recipe/erp5/killpidfromfile.py rename slapos/recipe/{generic_mysql => erp5}/mysql.py (100%) rename slapos/recipe/{generic_cloudooo => erp5}/template/cloudooo.cfg.in (97%) rename slapos/recipe/{haproxy => erp5}/template/haproxy.cfg.in (92%) rename slapos/recipe/{generic_mysql => erp5}/template/initmysql.sql.in (100%) rename slapos/recipe/{generic_kumofs => erp5}/template/kumo_gateway.in (100%) rename slapos/recipe/{generic_kumofs => erp5}/template/kumo_manager.in (100%) rename slapos/recipe/{generic_kumofs => erp5}/template/kumo_server.in (100%) rename slapos/recipe/{apache_frontend => erp5}/template/logrotate_entry.in (100%) rename slapos/recipe/{generic_memcached => erp5}/template/memcached.in (100%) rename slapos/recipe/{generic_mysql => erp5}/template/my.cnf.in (87%) delete mode 100644 slapos/recipe/erp5/template/mysql-init-function.sql.in rename slapos/recipe/{apache_frontend => erp5}/template/openssl.cnf.ca.in (100%) rename slapos/recipe/{generic_zope => erp5}/template/site.zcml (100%) create mode 100644 slapos/recipe/erp5/template/tidstorage.py.in rename slapos/recipe/{zeo => erp5}/template/zeo.conf.in (100%) create mode 100644 slapos/recipe/erp5/template/zope-deadlockdebugger-snippet.conf.in create mode 100644 slapos/recipe/erp5/template/zope-tidstorage-snippet.conf.in create mode 100644 slapos/recipe/erp5/template/zope-zeo-snippet.conf.in create mode 100644 slapos/recipe/erp5/template/zope-zodb-snippet.conf.in rename slapos/recipe/{generic_zope_zeo_client => erp5}/template/zope.conf.in (85%) rename slapos/recipe/{generic_zope_zeo_client/template/zope.conf.timeserver.in => erp5/template/zope.conf.timerservice.in} (100%) create mode 100644 slapos/recipe/erp5/test_suite_runner.py create mode 100644 slapos/recipe/erp5/testrunner.py delete mode 100644 slapos/recipe/erp5_test/__init__.py delete mode 100644 slapos/recipe/erp5_test/test.py delete mode 100644 slapos/recipe/erp5_update/__init__.py delete mode 100644 slapos/recipe/erp5scalabilitytestbed/__init__.py delete mode 100755 slapos/recipe/erp5scalabilitytestbed/template/erp5tester_manager_run.in delete mode 100755 slapos/recipe/erp5scalabilitytestbed/template/nosqltester_run.in create mode 100644 slapos/recipe/erp5testnode/SlapOSControler.py create mode 100644 slapos/recipe/erp5testnode/Updater.py delete mode 100644 slapos/recipe/erp5testnode/template/erp5testnode.cfg.in create mode 100644 slapos/recipe/erp5testnode/template/slapos.cfg.in create mode 100644 slapos/recipe/erp5testnode/testnode.py delete mode 100644 slapos/recipe/fontconfig/__init__.py delete mode 100644 slapos/recipe/fontconfig/template/fontconfig-snippet.cfg.in delete mode 100644 slapos/recipe/fontconfig/template/fontconfig.cfg.in delete mode 100644 slapos/recipe/fontconfig/template/onetimedownload_run.in delete mode 100644 slapos/recipe/generate_cloudooo.py delete mode 100644 slapos/recipe/generate_erp5_tidstorage.py delete mode 100644 slapos/recipe/generic_cloudooo/__init__.py delete mode 100644 slapos/recipe/generic_kumofs/__init__.py delete mode 100644 slapos/recipe/generic_memcached/__init__.py delete mode 100644 slapos/recipe/generic_mysql/__init__.py delete mode 100644 slapos/recipe/generic_zope/__init__.py delete mode 100644 slapos/recipe/generic_zope/template/zope.conf.in delete mode 100644 slapos/recipe/generic_zope_zeo_client/__init__.py delete mode 100644 slapos/recipe/generic_zope_zeo_client/template/site.zcml delete mode 100644 slapos/recipe/generic_zope_zeo_client/template/zope.zeo.entry.conf.in delete mode 100644 slapos/recipe/haproxy/__init__.py delete mode 100644 slapos/recipe/haproxy/template/haproxy-server-snippet.cfg.in rename slapos/recipe/{publish.py => helloworld.py} (76%) create mode 100644 slapos/recipe/java.py delete mode 100644 slapos/recipe/librecipe/filehash.py delete mode 100644 slapos/recipe/librecipe/inotify.py delete mode 100644 slapos/recipe/lockfile.py delete mode 100644 slapos/recipe/mydumper.py rename slapos/recipe/{apache_frontend => mysql}/certificate_authority.py (93%) mode change 100755 => 100644 rename slapos/recipe/{pulse2 => mysql}/template/logrotate_entry.in (100%) rename slapos/recipe/{pulse2 => mysql}/template/openssl.cnf.ca.in (100%) rename slapos/recipe/{pulse2 => mysql}/template/stunnel.conf.in (100%) delete mode 100644 slapos/recipe/nosqltestbed/kumo/__init__.py delete mode 100644 slapos/recipe/nosqltestbed/kumo/template/kumo_server_run.in delete mode 100644 slapos/recipe/nosqltestbed/kumo/template/kumotester_manager_run.in delete mode 100644 slapos/recipe/nosqltestbed/kumo/template/memstrike_run.in rename slapos/recipe/nosqltestbed/{kumo => }/template/kumo_gateway_run.in (67%) rename slapos/recipe/nosqltestbed/{kumo => }/template/kumo_manager_run.in (82%) create mode 100644 slapos/recipe/nosqltestbed/template/kumo_server_run.in create mode 100644 slapos/recipe/nosqltestbed/template/kumotester_manager_run.in delete mode 100644 slapos/recipe/notifier.py create mode 100644 slapos/recipe/osoeslaptraining/__init__.py rename slapos/recipe/{apache_zope_backend => osoeslaptraining}/apache.py (100%) rename slapos/recipe/{pulse2 => osoeslaptraining}/mysql.py (73%) rename slapos/recipe/{apachephp => osoeslaptraining}/template/apache.in (97%) rename slapos/recipe/{pulse2 => osoeslaptraining}/template/my.cnf.in (100%) rename slapos/recipe/{pulse2 => osoeslaptraining}/template/mysqlinit.sql.in (100%) rename slapos/recipe/{pulse2 => osoeslaptraining}/template/php.ini.in (100%) delete mode 100644 slapos/recipe/pbs.py delete mode 100644 slapos/recipe/pulse2/__init__.py delete mode 100644 slapos/recipe/pulse2/apache.py delete mode 100644 slapos/recipe/pulse2/innobackupex.py delete mode 100644 slapos/recipe/pulse2/template/apache.in.in delete mode 100644 slapos/recipe/pulse2/template/memcached.in delete mode 100644 slapos/recipe/pulse2/template/mmc-core.in delete mode 100644 slapos/recipe/pulse2/template/mmc_conf/agent/config.ini delete mode 100644 slapos/recipe/pulse2/template/mmc_conf/agent/config.ini.in delete mode 100644 slapos/recipe/pulse2/template/mmc_conf/mmc.ini.in delete mode 100644 slapos/recipe/pulse2/template/mmc_conf/plugins/base.ini delete mode 100644 slapos/recipe/pulse2/template/mmc_conf/plugins/base.ini.in delete mode 100644 slapos/recipe/pulse2/template/mmc_conf/plugins/ppolicy.ini.in delete mode 100644 slapos/recipe/pulse2/template/pulse2_conf/plugins/dyngroup.ini.in delete mode 100644 slapos/recipe/pulse2/template/pulse2_conf/plugins/glpi.ini.in delete mode 100644 slapos/recipe/pulse2/template/pulse2_conf/plugins/imaging.ini.in delete mode 100644 slapos/recipe/pulse2/template/pulse2_conf/plugins/inventory.ini.in delete mode 100644 slapos/recipe/pulse2/template/pulse2_conf/plugins/msc.ini.in delete mode 100644 slapos/recipe/pulse2/template/pulse2_conf/plugins/pkgs.ini.in delete mode 100644 slapos/recipe/pulse2/template/pulse2_conf/plugins/pulse2.ini.in delete mode 100644 slapos/recipe/pulse2/template/pulse2_conf/pulse2/atftpd/pcre.conf.in delete mode 100644 slapos/recipe/pulse2/template/pulse2_conf/pulse2/imaging-server/imaging-server.ini.in delete mode 100644 slapos/recipe/pulse2/template/pulse2_conf/pulse2/inventory-server/inventory-server.ini.in delete mode 100644 slapos/recipe/pulse2/template/pulse2_conf/pulse2/launchers/launchers.ini.in delete mode 100644 slapos/recipe/pulse2/template/pulse2_conf/pulse2/launchers/log_launcher_01.ini.in delete mode 100644 slapos/recipe/pulse2/template/pulse2_conf/pulse2/p2ipc-windows.ini.in delete mode 100644 slapos/recipe/pulse2/template/pulse2_conf/pulse2/p2ipc.ini.in delete mode 100644 slapos/recipe/pulse2/template/pulse2_conf/pulse2/package-server/package-server.ini.in delete mode 100644 slapos/recipe/pulse2/template/pulse2_conf/pulse2/package-server/plugin_terminal_type.ini.in delete mode 100644 slapos/recipe/pulse2/template/pulse2_conf/pulse2/scheduler/scheduler.ini.in delete mode 100644 slapos/recipe/pwgen.py delete mode 100644 slapos/recipe/seleniumrunner/ERP5TypeFunctionalTestCase.py delete mode 100644 slapos/recipe/seleniumrunner/__init__.py delete mode 100644 slapos/recipe/seleniumrunner/erp5functionaltestreporthandler.py delete mode 100644 slapos/recipe/seleniumrunner/template/xvfb_run.in delete mode 100644 slapos/recipe/seleniumrunner/testrunner.py delete mode 100644 slapos/recipe/shell.py delete mode 100644 slapos/recipe/shellinabox.py delete mode 100644 slapos/recipe/sphinx/__init__.py delete mode 100644 slapos/recipe/sphinx/template/sphinx.conf.in delete mode 100644 slapos/recipe/sshkeys_authority.py delete mode 100644 slapos/recipe/tidstorage/__init__.py delete mode 100644 slapos/recipe/tidstorage/template/tidstorage.py.in delete mode 100644 slapos/recipe/waitfor.py create mode 100644 slapos/recipe/xwiki/template/.svn/all-wcprops create mode 100644 slapos/recipe/xwiki/template/.svn/entries create mode 100644 slapos/recipe/xwiki/template/.svn/text-base/hibernate.cfg.xml.in.svn-base create mode 100644 slapos/recipe/xwiki/template/.svn/text-base/initmysql.sql.in.svn-base create mode 100644 slapos/recipe/xwiki/template/.svn/text-base/my.cnf.in.svn-base create mode 100644 slapos/recipe/xwiki/template/.svn/text-base/mysqld.bin.svn-base create mode 100644 slapos/recipe/xwiki/template/.svn/text-base/tomcat-server.xml.in.svn-base delete mode 100644 slapos/recipe/zeo/__init__.py delete mode 100644 slapos/recipe/zeo/template/zeo-filestorage-snippet.conf.in delete mode 100644 software/MediaWiki/instance.cfg delete mode 100644 software/MediaWiki/patch/mediawiki-1.17.0.config.patch delete mode 100644 software/MediaWiki/software.cfg delete mode 100644 software/SilverStripe/instance.cfg delete mode 100644 software/SilverStripe/software.cfg delete mode 100644 software/apache-frontend/instance.cfg delete mode 100644 software/apache-frontend/software.cfg delete mode 100644 software/b2evolution/instance.cfg delete mode 100644 software/b2evolution/software.cfg delete mode 100644 software/cmsmadesimple/instance.cfg delete mode 100644 software/cmsmadesimple/software.cfg delete mode 100644 software/coppermine/software.cfg delete mode 100644 software/coppermine/template/coppermine.inc.php.in delete mode 100644 software/davstorage/instance-davstorage.cfg delete mode 100644 software/davstorage/instance.cfg delete mode 100644 software/davstorage/software.cfg delete mode 100644 software/dotclear/instance.cfg delete mode 100644 software/dotclear/software.cfg delete mode 100644 software/dotclear/template/dotclear.inc.php.in delete mode 100644 software/dotproject/instance.cfg delete mode 100644 software/dotproject/software.cfg delete mode 100644 software/dotproject/template/config.inc.php.in delete mode 100644 software/drupal/instance.cfg delete mode 100644 software/drupal/software.cfg delete mode 100644 software/eSKUeL/instance.cfg delete mode 100644 software/eSKUeL/software.cfg delete mode 100644 software/erp5/instance-cloudooo.cfg delete mode 100644 software/erp5/instance-erp5-development.cfg delete mode 100644 software/erp5/instance-erp5-production.cfg delete mode 100644 software/erp5/instance-kumofs.cfg delete mode 100644 software/erp5/instance-mariadb.cfg delete mode 100644 software/erp5/instance-memcached.cfg delete mode 100644 software/erp5/instance-sphinx.cfg delete mode 100644 software/erp5/instance-zope.cfg delete mode 100644 software/erp5/snippet-backend.cfg delete mode 100644 software/erp5/snippet-fontconfig.cfg delete mode 100644 software/erp5/snippet-master.cfg delete mode 100644 software/erp5/snippet-zeo.cfg delete mode 100644 software/erp5/snippet-zope.cfg delete mode 100644 software/erp5scalabilitytestbed/instance.cfg delete mode 100644 software/erp5scalabilitytestbed/software.cfg delete mode 100644 software/erp5testnode/instance-default.cfg delete mode 100644 software/ezpublish/instance.cfg delete mode 100644 software/ezpublish/software.cfg delete mode 100644 software/joomla/instance.cfg delete mode 100644 software/joomla/software.cfg delete mode 100644 software/lamp-template-static/instance.cfg delete mode 100644 software/lamp-template-static/software.cfg delete mode 100644 software/lamp-template/instance.cfg delete mode 100644 software/lamp-template/software.cfg delete mode 100644 software/lamp-template/template/php.ini.in delete mode 100644 software/lamp-template/template/phpmyadmin.inc.php.in delete mode 100644 software/lamp-template/template/wp-config.php.in delete mode 100644 software/libcloud-requester/instance.cfg delete mode 100644 software/libcloud-requester/software.cfg delete mode 100644 software/libcloud/instance.cfg delete mode 100644 software/libcloud/software.cfg delete mode 100644 software/magento/instance.cfg delete mode 100644 software/magento/software.cfg delete mode 100644 software/mariadb/instance-mariadb.cfg delete mode 100644 software/mariadb/instance-recover.cfg delete mode 100644 software/mariadb/instance-remotebackuped.cfg delete mode 100644 software/net2ftp/configure.py delete mode 100644 software/net2ftp/instance.cfg delete mode 100644 software/net2ftp/software.cfg delete mode 100644 software/net2ftp/template/net2ftp.inc.php.in delete mode 100644 software/nosqltestbed/instance.cfg delete mode 100644 software/nosqltestbed/software.cfg delete mode 100644 software/openX/instance.cfg delete mode 100644 software/openX/software.cfg delete mode 100644 software/os-commerce/instance.cfg delete mode 100644 software/os-commerce/software.cfg delete mode 100644 software/phpbb/instance.cfg delete mode 100644 software/phpbb/software.cfg delete mode 100644 software/phpnuke/instance.cfg delete mode 100644 software/phpnuke/software.cfg delete mode 100644 software/phpnuke/template/phpnuke.inc.php.in delete mode 100644 software/pimcore/instance.cfg delete mode 100644 software/pimcore/software.cfg delete mode 100644 software/piwigo/instance.cfg delete mode 100644 software/piwigo/software.cfg delete mode 100644 software/piwigo/template/piwigo.inc.php.in delete mode 100644 software/piwik/instance.cfg delete mode 100644 software/piwik/software.cfg delete mode 100644 software/prestashop/instance.cfg delete mode 100644 software/prestashop/software.cfg delete mode 100644 software/proactive/instance.cfg delete mode 100644 software/proactive/software.cfg delete mode 100644 software/pulse/instance.cfg delete mode 100644 software/pulse/software.cfg delete mode 100644 software/punbb/instance.cfg delete mode 100644 software/punbb/software.cfg delete mode 100644 software/punbb/template/punbb.inc.php.in delete mode 100644 software/seleniumrunner/instance.cfg delete mode 100644 software/seleniumrunner/software.cfg delete mode 100644 software/sheepdogtestbed/instance.cfg delete mode 100644 software/sheepdogtestbed/software.cfg delete mode 100644 software/simpleMachineForum/instance.cfg delete mode 100644 software/simpleMachineForum/software.cfg delete mode 100644 software/spip/instance.cfg delete mode 100644 software/spip/software.cfg delete mode 100644 software/statusnet/instance.cfg delete mode 100644 software/statusnet/software.cfg delete mode 100644 software/sugar-crm/instance.cfg delete mode 100644 software/sugar-crm/software.cfg delete mode 100644 software/testnode/instance.cfg delete mode 100644 software/testnode/software.cfg delete mode 100644 software/tiki/instance.cfg delete mode 100644 software/tiki/software.cfg rename software/{coppermine => wordpress}/instance.cfg (100%) delete mode 100644 software/xoops/instance.cfg delete mode 100644 software/xoops/software.cfg delete mode 100644 software/xwiki/instance.cfg delete mode 100644 software/xwiki/software.cfg delete mode 100644 software/zencart/configure.py delete mode 100644 software/zencart/instance.cfg delete mode 100644 software/zencart/software.cfg create mode 100644 stack/kvm.cfg delete mode 100644 stack/lamp/buildout.cfg delete mode 100644 stack/lamp/instance-apache-backup.cfg delete mode 100644 stack/lamp/instance-apache-php.cfg delete mode 100644 stack/lamp/instance-backuped.cfg delete mode 100644 stack/lamp/instance-mariadb-pbsready-export.cfg delete mode 100644 stack/lamp/instance-mariadb-pbsready-import.cfg delete mode 100644 stack/lamp/instance-mariadb-pbsready.cfg delete mode 100644 stack/lamp/instance-mariadb.cfg delete mode 100644 stack/lamp/instance-pull-backup.cfg delete mode 100644 stack/lamp/instance.cfg delete mode 100644 stack/sheepdogtestbed.cfg delete mode 100644 stack/slapos.cfg delete mode 100644 stack/tomcat.cfg diff --git a/.gitignore b/.gitignore index 4cb18e24e..5ca1dfd34 100644 --- a/.gitignore +++ b/.gitignore @@ -8,4 +8,3 @@ downloads/ eggs/ parts/ slapos.cookbook.egg-info -.*.swp diff --git a/CHANGES.txt b/CHANGES.txt index 76a689432..fcffa3d16 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -1,145 +1,10 @@ Changes ======= -0.40.1 (2012-03-01) +0.21 (unreleased) ----------------- - * Fix manifest to include files needed for apache. [Cedric de Saint Martin] - -0.40 (2012-03-01) ------------------ - - * apache_frontend initial release. [Cedric de Saint Martin] - -0.39 (2012-02-20) ------------------ - - * seleniumrunner initial release. [Cedric de Saint Martin] - -0.38 (2011-12-05) ------------------ - - * erp5: Swtich to percona, as maatkit is obsoleted. [Sebastien Robin] - * erp5: Improve haproxy configuration. [Sebastien Robin] - * erp5: Support sphinxd. [Kazuhiko Shiozaki] - * erp5: Improve and make logging more usual. [Sebastien Robin] - * erp5: Allow mysql connection from localhost. [Romain Courteaud] - * erp5: Allow to control Zope/Zeo cache [Arnaud Fontaine] - * erp5: Increase precision in logs [Julien Muchembled] - * erp5: Improve erp5 update [Arnaud Fontaine, Rafael Monnerat] - -0.37 (2011-11-24) ------------------ - - * KVM : allow access to several KVM instances without SSL certificate duplicate - problem. [Cedric de Saint Martin] - -0.36 (2011-11-16) ------------------ - - * erp5testnode : the code of testnode is not in slapos repository anymore - -0.35 (2011-11-10) ------------------ - - * KVM : Promise are now working properly. [艁ukasz Nowak] - * KVM : Use NoVNC with automatic login. [Cedric de Saint Martin] - * KVM : Use websockify egg and remove numpy hack. [Cedric de Saint Martin] - -0.34 (2011-11-08) ------------------ - - * Any LAMP software can specify its own php.ini [Alain Takoudjou] - * LAMP : Fix bug where buildout does not has sufficient rights to update - application parts. [Alain Takoudjou] - * LAMP : Update formatting when returning list of renamed files. - [Alain Takoudjou] - -0.33 (2011-10-31) ------------------ - - * erp5 : use percona toolkit instead of maatkit [Sebastien Robin] - -0.32 (2011-10-28) ------------------ - - * LAMP : Recipe can now call lampconfigure from slapos.toolbox which will - configure PHP application instance when needed. [Alain Takoudjou Kamdem] - -0.31 (2011-10-16) ------------------ - - * Split big redundant recipes into small ones. In order to factorize the code - and have everything in the buildout file. [Antoine Catton, Romain Courteaud, - 艁ukasz Nowak] - * LAMP : Update apache and php configuration files to work with a lot of different - PHP software. [Alain Takoudjou Kamdem] - * LAMP : Recipe can launch scripts, move or remove files or directories - when a given condition is filled. Useful when PHP apps require you to - remove "admin" directory after configuration for example. - [Alain Takoudjou Kamdem] - -0.30 (2011-10-06) ------------------ - - * LAMP : Update apache and php configuration files to work with a lot of different - PHP software. [Alain Takoudjou Kamdem] - -0.29 (2011-09-28) ------------------ - - * mysql: bug fix on database recovering (avoid importing dump two times). [Antoine Catton] - -0.28 (2011-09-27) ------------------ - - * lamp.request: requesting the mariadb software release instead of itself. [Antoine Catton] - * lamp.request: adding support of remote backup repo (using a different - software type). The default remote backup is a davstorage. [Antoine Catton] - -0.27 (2011-09-27) ------------------ - - * mysql: add backup and backup recovering using different software type. [Antoine Catton] - -0.26 (2011-09-27) ------------------ - - * Davstorage: returning more explicit url (using webdav scheme). [Antoine Catton] - * Other mysql minor fixes. [Antoine Catton] - -0.25 (2011-09-21) ------------------ - - * mysql: Restore to default behaviour. [Antoine Catton] - * mysql: Use mysqldump instead of non trustable backup system. [Antoine Catton] - -0.24 (2011-09-19) ------------------ - - * mysql: Unhardcode the requested url. [Antoine Catton] - -0.23 (2011-09-19) ------------------ - - * Clean code in mysql recipe [Cedric de Saint Martin] - * librecipe: Provide createPromiseWrapper method. [Antoine Catton] - * kvm: Expose promisee checks to slapgrid. [Antoine Catton] - * davstorage: Initial version. [Antoine Catton] - * mysql: Support DAV backup. [Antoine Catton] - -0.22 (2011-09-12) ------------------ - - * Fix haproxy setup for erp5 [Sebastien Robin] - -0.21 (2011-09-12) ------------------ - - * Update PHP configuration to set session and date options. - [Alain Takoudjou Kamdem] - * Improve logrotate policy and haproxy config for erp5 - [Sebastien Robin] + * No change yet. 0.20 (2011-09-07) ----------------- @@ -158,16 +23,10 @@ Changes * Repackage egg to include needed .bin files. [Cedric de Saint Martin] -0.17 (2011-08-25) +0.17 (unreleased) ----------------- - * Add XWiki software release [Cedric de Saint Martin] - -0.16 (2011-07-15) ------------------ - - * Improve Vifib and pure ERP5 instantiation [Rafael Monnerat] - * Use configurator for Vifib [Rafael Monnerat] + * No changes yet. 0.16 (2011-07-15) ----------------- @@ -206,10 +65,9 @@ Changes ----------------- * Add PHPMyAdmin software release used in SlapOS tutorials - [Cedric de Saint Martin] + [Cedric de Saint Martin] * Add slaprunner software release [Cedric de Saint Martin] - 0.9 (2011-06-24) ---------------- diff --git a/MANIFEST.in b/MANIFEST.in index 7a7a46ad5..5453d02b8 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -1,6 +1,4 @@ include CHANGES.txt -include slapos/recipe/generic_zope/template/site.zcml -include slapos/recipe/apache_frontend/template/notfound.html +include slapos/recipe/erp5/template/site.zcml recursive-include slapos/recipe *.in -recursive-include slapos/recipe *.bin recursive-include slapos/recipe README.*.txt diff --git a/component/alsa/buildout.cfg b/component/alsa/buildout.cfg deleted file mode 100644 index 3c91b1fdf..000000000 --- a/component/alsa/buildout.cfg +++ /dev/null @@ -1,21 +0,0 @@ -[buildout] -parts = - alsa - -[alsa] -# Contains libasound -recipe = hexagonit.recipe.cmmi -url = ftp://ftp.alsa-project.org/pub/lib/alsa-lib-1.0.24.1.tar.bz2 -#md5sum = d55a9d7d2a79d738a1b7a511cffda4b6 -configure-options = - --disable-static - --disable-aload - --disable-mixer - --disable-pcm - --disable-rawmidi - --disable-hwdep - --disable-seq - --disable-ucm - --disable-alisp - --disable-old-symbols - --disable-python \ No newline at end of file diff --git a/component/apache/buildout.cfg b/component/apache/buildout.cfg index 3c7cad1c1..42d1c7162 100644 --- a/component/apache/buildout.cfg +++ b/component/apache/buildout.cfg @@ -13,13 +13,23 @@ extends = ../sqlite3/buildout.cfg ../zlib/buildout.cfg +[apache-CVE-2011-3368.patch] +recipe = hexagonit.recipe.download +md5sum = 1ad598213480ddfc239ce6359b7b2c0b +url = http://www.apache.org/dist/httpd/patches/apply_to_2.2.21/CVE-2011-3368.patch +filename = ${:_buildout_section_name_} +download-only = true + [apache] # inspired on http://old.aclark.net/team/aclark/blog/a-lamp-buildout-for-wordpress-and-other-php-apps/ recipe = hexagonit.recipe.cmmi depends = ${gdbm:version} -url = http://mir2.ovh.net/ftp.apache.org/dist//httpd/httpd-2.2.22.tar.bz2 -md5sum = 9fe3093194c8a57f085ff7c3fc43715f +url = http://mir2.ovh.net/ftp.apache.org/dist//httpd/httpd-2.2.21.tar.bz2 +md5sum = 1696ae62cd879ab1d4dd9ff021a470f2 +patches = + ${apache-CVE-2011-3368.patch:location}/${apache-CVE-2011-3368.patch:filename} +patch-options = -p1 configure-options = --disable-static --enable-authn-alias --enable-bucketeer diff --git a/component/binutils/buildout.cfg b/component/binutils/buildout.cfg deleted file mode 100644 index e20a16205..000000000 --- a/component/binutils/buildout.cfg +++ /dev/null @@ -1,8 +0,0 @@ -[buildout] -parts = - binutils - -[binutils] -recipe = hexagonit.recipe.cmmi -url = http://ftp.gnu.org/gnu/binutils/binutils-2.21.1.tar.bz2 -md5sum = bde820eac53fa3a8d8696667418557ad diff --git a/component/boa/buildout.cfg b/component/boa/buildout.cfg deleted file mode 100644 index ec2c615bc..000000000 --- a/component/boa/buildout.cfg +++ /dev/null @@ -1,37 +0,0 @@ -[buildout] - -parts = boa - -[boa-patch-ENOSYS] -recipe = hexagonit.recipe.download -url = http://sources.gentoo.org/cgi-bin/viewvc.cgi/gentoo-x86/www-servers/boa/files/boa-0.94.14_rc21-ENOSYS.patch?revision=1.1 -filename = boa-0.94.14_rc21-ENOSYS.patch -md5sum = 7206b342195961501ed1eae38486e5db -download-only = true - - -[boa] -recipe = slapos.recipe.build -url = http://www.boa.org/boa-0.94.14rc21.tar.gz -md5sum = e24b570bd767a124fcfb40a34d148ba9 -patches = - ${boa-patch-ENOSYS:location}/${boa-patch-ENOSYS:filename} -slapos_promise = - directory:bin/ - file:bin/boa - file:bin/boa_indexer -script = - import shutil - import os - url = self.download(self.options['url'], self.options['md5sum']) - extract_dir = self.extract(url) - workdir = guessworkdir(extract_dir) - self.applyPatchList(self.options.get('patches'), '-p1', cwd=workdir) - call(['./configure'], cwd=workdir) - call(['make'], cwd=workdir) - # Installation of boa. Manually, no make install - os.makedirs('%(location)s/bin/') - shutil.copyfile(workdir + '/src/boa', '%(location)s/bin/boa') - os.chmod('%(location)s/bin/boa', 0755) - shutil.copyfile(workdir + '/src/boa_indexer', '%(location)s/bin/boa_indexer') - os.chmod('%(location)s/bin/boa_indexer', 0755) diff --git a/component/busybox/buildout.cfg b/component/busybox/buildout.cfg deleted file mode 100644 index 8145eea7d..000000000 --- a/component/busybox/buildout.cfg +++ /dev/null @@ -1,18 +0,0 @@ -[buildout] - -parts = busybox - -[busybox] -recipe = slapos.recipe.build -url = http://busybox.net/downloads/busybox-1.19.3.tar.bz2 -md5sum = c3938e1ac59602387009bbf1dd1af7f6 -script = - extract_dir = self.extract(self.download(%(url)r, %(md5sum)r)) - workdir = guessworkdir(extract_dir) - self.logger.info("Creating default configuration") - call(['make', 'defconfig'], cwd=workdir, env=env) - self.logger.info("Building") - call(['make'], cwd=workdir, env=env) - self.logger.info("Installing") - call(['make', 'CONFIG_PREFIX=%(location)s', 'install'], cwd=workdir, env=env) - self.logger.info("Installation finished") diff --git a/component/ca-certificates/buildout.cfg b/component/ca-certificates/buildout.cfg deleted file mode 100644 index 850821bdc..000000000 --- a/component/ca-certificates/buildout.cfg +++ /dev/null @@ -1,23 +0,0 @@ -# CA certificates - -[buildout] -parts = - ca-certificates - - -[ca-certificates-sbin-dir.patch] -recipe = hexagonit.recipe.download -url = ${:_profile_base_location_}/${:filename} -md5sum = 0b4e7d82ce768823c01954ee41ef177b -filename = ${:_buildout_section_name_} -download-only = true - -[ca-certificates] -recipe = hexagonit.recipe.cmmi -version = 20120212 -url = ftp://ftp.free.fr/mirrors/ftp.debian.org/pool/main/c/ca-certificates/ca-certificates_${:version}.tar.gz -patches = - ${ca-certificates-sbin-dir.patch:location}/${ca-certificates-sbin-dir.patch:filename} -patch-options = -p0 -configure-command = true -make-targets = install DESTDIR=${buildout:parts-directory}/${:_buildout_section_name_} CERTSDIR=certs SBINDIR=sbin diff --git a/component/ca-certificates/ca-certificates-sbin-dir.patch b/component/ca-certificates/ca-certificates-sbin-dir.patch deleted file mode 100644 index 8a2914b8f..000000000 --- a/component/ca-certificates/ca-certificates-sbin-dir.patch +++ /dev/null @@ -1,27 +0,0 @@ ---- Makefile.orig 2011-12-11 20:54:02.000000000 +0100 -+++ Makefile 2012-01-09 17:36:55.059392824 +0100 -@@ -17,7 +17,7 @@ - - install: - for dir in $(SUBDIRS); do \ -- mkdir $(DESTDIR)/$(CERTSDIR)/$$dir; \ -+ mkdir -p $(DESTDIR)/$(CERTSDIR)/$$dir; \ - $(MAKE) -C $$dir install CERTSDIR=$(DESTDIR)/$(CERTSDIR)/$$dir; \ - done - for dir in sbin; do \ ---- sbin/Makefile.orig 2011-12-11 20:54:02.000000000 +0100 -+++ sbin/Makefile 2012-01-09 17:31:45.207387898 +0100 -@@ -3,9 +3,12 @@ - # - # - -+SBINDIR=/usr/sbin -+ - all: - - clean: - - install: -- install -m755 update-ca-certificates $(DESTDIR)/usr/sbin/ -+ mkdir -p $(DESTDIR)/$(SBINDIR) -+ install -m755 update-ca-certificates $(DESTDIR)/$(SBINDIR) diff --git a/component/cclient/buildout.cfg b/component/cclient/buildout.cfg index df52123e6..a80953234 100644 --- a/component/cclient/buildout.cfg +++ b/component/cclient/buildout.cfg @@ -12,15 +12,16 @@ parts = [cclient-patch] recipe = slapos.recipe.download url = ${:_profile_base_location_}/imap-2007f.patch -md5sum = 42c77fdd5d7a976fc302b93aadb3da98 +#md5sum = Student may put here md5sum of this file, this is good idea +download-only = True location = ${buildout:parts-directory}/${:_buildout_section_name_} filename = imap-2007f.patch [cclient] recipe = hexagonit.recipe.cmmi url = ftp://ftp.cac.washington.edu/imap/imap-2007f.tar.gz -md5sum = 2126fd125ea26b73b20f01fcd5940369 configure-command = true +keep-compile-dir = true # cclient does not support parallel compilation make-options = slx diff --git a/component/cclient/imap-2007f.patch b/component/cclient/imap-2007f.patch index 7460b9232..50b64970c 100644 --- a/component/cclient/imap-2007f.patch +++ b/component/cclient/imap-2007f.patch @@ -1,19 +1,6 @@ --- old/Makefile 2011-09-22 13:19:53.000000000 +0100 -+++ new/Makefile 2011-11-09 15:02:54.038306922 +0100 -@@ -280,7 +280,11 @@ - SYSTEM=unix - TOOLS=tools - TOUCH=touch -- -+IMAPDIR=$(CCLIENT)/cclient -+COMPILEDIR = $(CCLIENT)/cclient__compile__/imap-2007f -+CP=cp -r -+INSTALL=install -+FOR=for - - # Primary build command - -@@ -580,7 +584,6 @@ ++++ new/Makefile 2011-09-23 11:29:12.405271442 +0100 +@@ -580,7 +580,6 @@ @echo +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ @echo @echo Do you want to continue this build anyway? Type y or n please: @@ -21,7 +8,7 @@ nounenc: @echo +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -@@ -639,7 +642,7 @@ +@@ -639,7 +638,7 @@ @echo +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ @echo @echo Do you want to build with IPv6 anyway? Type y or n please: @@ -30,27 +17,15 @@ @echo OK, I will remember that you really want to build with IPv6. @echo You will not see this message again. @$(TOUCH) ip6 -@@ -731,6 +734,24 @@ +@@ -731,6 +730,12 @@ $(SH) -c '$(RM) an ua OSTYPE SPECIALS c-client mtest imapd ipopd mailutil mlock dmail tmail || true' $(CD) tools;$(MAKE) clean -+install: -+ $(INSTALL) -v -d $(IMAPDIR)/include -+ $(INSTALL) -v -d $(IMAPDIR)/lib -+ $(INSTALL) -v -m 644 $(COMPILEDIR)/c-client/*.h $(IMAPDIR)/include -+ $(INSTALL) -v -m 644 $(COMPILEDIR)/c-client/c-client.a $(IMAPDIR)/lib -+ $(CP) $(COMPILEDIR)/ipopd $(COMPILEDIR)/mailutil $(COMPILEDIR)/imapd \ -+ $(COMPILEDIR)/dmail $(COMPILEDIR)/mlock $(COMPILEDIR)/mtest $(COMPILEDIR)/tmail $(IMAPDIR) -+ $(RM) $(IMAPDIR)/ipopd/*.h $(IMAPDIR)/ipopd/*.c $(IMAPDIR)/ipopd/Makefile; -+ $(RM) $(IMAPDIR)/mailutil/*.h $(IMAPDIR)/mailutil/*.c $(IMAPDIR)/mailutil/Makefile; -+ $(RM) $(IMAPDIR)/imapd/*.h $(IMAPDIR)/imapd/*.c $(IMAPDIR)/imapd/Makefile; -+ $(RM) $(IMAPDIR)/tmail/*.h $(IMAPDIR)/tmail/*.c $(IMAPDIR)/tmail/Makefile; -+ $(RM) $(IMAPDIR)/mlock/*.h $(IMAPDIR)/mlock/*.c $(IMAPDIR)/mlock/Makefile; -+ $(RM) $(IMAPDIR)/mtest/*.h $(IMAPDIR)/mtest/*.c $(IMAPDIR)/mtest/Makefile; -+ $(RM) $(IMAPDIR)/dmail/*.h $(IMAPDIR)/dmail/*.c $(IMAPDIR)/dmail/Makefile; -+ $(INSTALL) -v -m 644 $(COMPILEDIR)/ip6 $(IMAPDIR) -+ $(INSTALL) -v -m 644 $(COMPILEDIR)/OSTYPE $(IMAPDIR) -+ $(INSTALL) -v -m 644 $(COMPILEDIR)/SPECIALS $(IMAPDIR) ++install: ++ install -v -d $(CCLIENT)/cclient/include ++ ln -svf $(CCLIENT)/cclient__compile__/imap-2007f/c-client $(CCLIENT)/cclient/include ++ install -v -d $(CCLIENT)/cclient/lib ++ ln -svf $(CCLIENT)/cclient__compile__/imap-2007f/c-client/c-client.a $(CCLIENT)/cclient/lib/libc-client.a + # A monument to a hack of long ago and far away... diff --git a/component/chromium/buildout.cfg b/component/chromium/buildout.cfg deleted file mode 100644 index c7fcc4735..000000000 --- a/component/chromium/buildout.cfg +++ /dev/null @@ -1,47 +0,0 @@ -[buildout] -extends = - ../dbus/buildout.cfg - ../fontconfig/buildout.cfg - ../glib/buildout.cfg - ../gtk-2/buildout.cfg - ../libpng/buildout.cfg - ../xorg/buildout.cfg - -parts = - chromium - -[chromium] -recipe = slapos.recipe.build -slapos_promise = - file:chrome - file:chrome-wrapper - file:chrome-slapos - -#chromium zip files for linux seem to be corrupted : rights are not correctly -#set (+x) when unzipping using python, but it works when doing "unzip chromium.zip" -#AND it works when unzipping any other archive with python. -#Conclusion : Google, please, learn how to make zip files. -linux_x86 = http://commondatastorage.googleapis.com/chromium-browser-continuous/Linux/109696/chrome-linux.zip 8ba6c022849b2a882b6e65163c147eb9 -linux_x86-64 = http://commondatastorage.googleapis.com/chromium-browser-snapshots/Linux_x64/109696/chrome-linux.zip a3ed3feb285ecfe7c722576db80d5099 -mac_x86-64 = http://commondatastorage.googleapis.com/chromium-browser-continuous/Mac/100142/chrome-mac.zip cb3a76b8a1a93be94df2f500fb621131 - -script = - #If part directory already exist, will just throw an error. - import sys - platform = '%%s_%%s' %% (guessOperatingSystem(), guessPlatform()) - if not self.options.get('url'): self.options['url'], self.options['md5sum'] = self.options[platform].split(' ') - extract_dir = self.extract(self.download(self.options['url'], self.options.get('md5sum'))) - workdir = guessworkdir(extract_dir) - self.copyTree(workdir, "%(location)s") - wrapper_location = os.path.join("%(location)s", "chrome-slapos") - wrapper = open(wrapper_location, 'w') - wrapper.write("""#!/bin/sh - export LD_LIBRARY_PATH=${libXrender:location}/lib/:${fontconfig:location}/lib/:${dbus:location}/lib/:${dbus-glib:location}/lib/:${pango:location}/lib:${cairo:location}/lib:${glib:location}/lib:${gtk-2:location}/lib:${atk:location}/lib:${gdk-pixbuf:location}/lib:${libXt:location}/lib:${gtk-2:location}/lib:${libpng:location}/lib:%(location)s - %(location)s/chrome""") - wrapper.flush() - wrapper.close() - os.chmod(wrapper_location, 0766) - os.chmod(os.path.join("%(location)s", 'chrome'), 0766) - os.chmod(os.path.join("%(location)s", 'chrome-wrapper'), 0766) - -# requirements : libXrender1 libxss1 x11-common \ No newline at end of file diff --git a/component/cmake/buildout.cfg b/component/cmake/buildout.cfg index 51789dfc5..387e7a2ff 100644 --- a/component/cmake/buildout.cfg +++ b/component/cmake/buildout.cfg @@ -4,5 +4,5 @@ parts = [cmake] recipe = hexagonit.recipe.cmmi -url = http://www.cmake.org/files/v2.8/cmake-2.8.6.tar.gz -md5sum = 2147da452fd9212bb9b4542a9eee9d5b +url = http://www.cmake.org/files/v2.8/cmake-2.8.3.tar.gz +md5sum = a76a44b93acf5e3badda9de111385921 diff --git a/component/corosync/buildout.cfg b/component/corosync/buildout.cfg deleted file mode 100644 index 13f435a48..000000000 --- a/component/corosync/buildout.cfg +++ /dev/null @@ -1,14 +0,0 @@ -[buildout] -extends = - nss.cfg -parts = - corocosync - -[corosync] -recipe = hexagonit.recipe.cmmi -url = ftp://ftp:downloads@corosync.org/downloads/corosync-1.3.1/corosync-1.3.1.tar.gz -md5sum = c58459a009a3a9d0b9c00e276a190d90 -environment = - CPPFLAGS=-I${nspr:location}/include/nspr -I${nss:location}/include/nss - PKG_CONFIG_PATH=${nss:location}/lib/pkgconfig:${nspr:location}/lib/pkgconfig - LDFLAGS =-L${nspr:location}/lib -Wl,-rpath=${nspr:location}/lib -L${nss:location}/lib -Wl,-rpath=${nss:location}/lib -Wl,-rpath=${buildout:parts-directory}/${:_buildout_section_name_}/lib diff --git a/component/curl/buildout.cfg b/component/curl/buildout.cfg index 859f2248b..1ce963326 100644 --- a/component/curl/buildout.cfg +++ b/component/curl/buildout.cfg @@ -11,8 +11,8 @@ parts = [curl] recipe = hexagonit.recipe.cmmi -url = http://curl.haxx.se/download/curl-7.24.0.tar.bz2 -#md5sum = 5f6d50c4d4ee38c57fe37e3cff75adbd +url = http://curl.haxx.se/download/curl-7.21.7.tar.bz2 +md5sum = 5f6d50c4d4ee38c57fe37e3cff75adbd configure-options = --disable-static --disable-ldap diff --git a/component/cyrus-sasl/cyrus-sasl-prototype-declaration.patch b/component/cyrus-sasl/cyrus-sasl-prototype-declaration.patch new file mode 100644 index 000000000..04d562eed --- /dev/null +++ b/component/cyrus-sasl/cyrus-sasl-prototype-declaration.patch @@ -0,0 +1,11 @@ +--- cyrus-sasl-2.1.23/include/sasl.h 2010-11-25 18:15:05.000000000 +0100 ++++ cyrus-sasl-2.1.23/include/sasl.h 2010-11-25 18:15:34.000000000 +0100 +@@ -346,7 +346,7 @@ + * Mechanisms must ignore callbacks with id's they don't recognize. + */ + unsigned long id; +- int (*proc)(); /* Callback function. Types of arguments vary by 'id' */ ++ int (*proc); /* Callback function. Types of arguments vary by 'id' */ + void *context; + } sasl_callback_t; + diff --git a/component/dash/buildout.cfg b/component/dash/buildout.cfg deleted file mode 100644 index 6f75d323b..000000000 --- a/component/dash/buildout.cfg +++ /dev/null @@ -1,12 +0,0 @@ -[buildout] - -parts = dash - -[dash] -recipe = hexagonit.recipe.cmmi -url = http://gondor.apana.org.au/~herbert/dash/files/dash-0.5.7.tar.gz -md5sum = f6cedb10ae7258adb5ab17a10ae80d51 -configure-options = - --disable-static - --disable-fnmatch - --disable-glob diff --git a/component/dbus/buildout.cfg b/component/dbus/buildout.cfg deleted file mode 100644 index d51359506..000000000 --- a/component/dbus/buildout.cfg +++ /dev/null @@ -1,30 +0,0 @@ -[buildout] -extends = - ../libxml2/buildout.cfg - ../pkgconfig/buildout.cfg - ../libexpat/buildout.cfg - -parts = - dbus - -[dbus] -recipe = hexagonit.recipe.cmmi -url = http://dbus.freedesktop.org/releases/dbus/dbus-1.4.10.tar.gz -md5sum = 402a2f8102bedbe236e2891b2b0f31c2 -configure-options = - --disable-static -environment = - PATH=${pkgconfig:location}/bin:%(PATH)s - PKG_CONFIG_PATH=${libxml2:location}/lib/pkgconfig - CPPFLAGS=-I${libexpat:location}/include - LDFLAGS=-L${libexpat:location}/lib - -[dbus-glib] -recipe = hexagonit.recipe.cmmi -url = http://dbus.freedesktop.org/releases/dbus-glib/dbus-glib-0.94.tar.gz -md5sum = e1f1506a6f4941e67bffd614b1ad5af6 -environment = - PATH=${pkgconfig:location}/bin:${glib:location}/bin:%(PATH)s - PKG_CONFIG_PATH=${dbus:location}/lib/pkgconfig:${glib:location}/lib/pkgconfig - CPPFLAGS=-I${libexpat:location}/include - LDFLAGS=-L${libexpat:location}/lib -L${gettext:location}/lib diff --git a/component/dropbear/buildout.cfg b/component/dropbear/buildout.cfg index b5a63897d..dbb070920 100644 --- a/component/dropbear/buildout.cfg +++ b/component/dropbear/buildout.cfg @@ -13,7 +13,7 @@ parts = [dropbear-userspace-patch] recipe = hexagonit.recipe.download -md5sum = 3d934c2c90e8c57536a4fa2cf8ad216d +md5sum = 89f575b9a9586b04ef9073c9c3af13ae url = ${:_profile_base_location_}/${:filename} filename = userspace.patch download-only = true @@ -25,31 +25,15 @@ url = ${:_profile_base_location_}/${:filename} filename = ipv6-support.patch download-only = true -[dropbear-no-shell-check-patch] -recipe = hexagonit.recipe.download -md5sum = bb2ac410bd4cb2b07c23bfcc712e45f7 -url = ${:_profile_base_location_}/${:filename} -filename = no-shell-checking.patch -download-only = true - -[dropbear-static_build_fix.patch] -recipe = hexagonit.recipe.download -md5sum = 6e0ccc1949dfa31b4bc3951b9bb6472e -url = ${:_profile_base_location_}/${:filename} -filename = dropbear-0.53.1-static_build_fix.patch -download-only = true - [dropbear] recipe = hexagonit.recipe.cmmi md5sum = 0284ea239083f04c8b874e08e1aca243 -# XXX: We still use an old version of dropbear instead of the last one -# in order have all patches working. -url = http://matt.ucc.asn.au/dropbear/releases/dropbear-0.53.1.tar.bz2 +url = http://matt.ucc.asn.au/dropbear/dropbear-0.53.1.tar.bz2 configure-options = --prefix=${buildout:parts-directory}/${:_buildout_section_name_} --with-zlib=${zlib:location} - CFLAGS="-DENABLE_SINGLEUSER -D__DIRTY_NO_SHELL_CHECKING" + CFLAGS="-DENABLE_SINGLEUSER " environment = CPPFLAGS =-I${zlib:location}/include @@ -58,8 +42,6 @@ environment = patches= ${dropbear-userspace-patch:location}/${dropbear-userspace-patch:filename} ${dropbear-ipv6-patch:location}/${dropbear-ipv6-patch:filename} - ${dropbear-no-shell-check-patch:location}/${dropbear-no-shell-check-patch:filename} - ${dropbear-static_build_fix.patch:location}/${dropbear-static_build_fix.patch:filename} patch-options= -p1 diff --git a/component/dropbear/dropbear-0.53.1-static_build_fix.patch b/component/dropbear/dropbear-0.53.1-static_build_fix.patch deleted file mode 100644 index 8fd95e941..000000000 --- a/component/dropbear/dropbear-0.53.1-static_build_fix.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- a/Makefile.in 2012-02-13 18:01:23.505279581 +0100 -+++ b/Makefile.in 2012-02-13 18:04:17.070140233 +0100 -@@ -77,7 +77,7 @@ - INSTALL=@INSTALL@ - CPPFLAGS=@CPPFLAGS@ - CFLAGS+=-I. -I$(srcdir) $(CPPFLAGS) @CFLAGS@ --LIBS+=@LIBS@ -+LIBS+=@CRYPTLIB@ @LIBS@ - LDFLAGS=@LDFLAGS@ - - EXEEXT=@EXEEXT@ diff --git a/component/dropbear/no-shell-checking.patch b/component/dropbear/no-shell-checking.patch deleted file mode 100644 index 534912eaf..000000000 --- a/component/dropbear/no-shell-checking.patch +++ /dev/null @@ -1,20 +0,0 @@ -diff --git a/svr-auth.c b/svr-auth.c -index 87e3c5e..8b93a22 100644 ---- a/svr-auth.c -+++ b/svr-auth.c -@@ -267,6 +267,7 @@ static int checkusername(unsigned char *username, unsigned int userlen) { - usershell = "/bin/sh"; - } - -+#ifndef __DIRTY_NO_SHELL_CHECKING - /* check the shell is valid. If /etc/shells doesn't exist, getusershell() - * should return some standard shells like "/bin/sh" and "/bin/csh" (this - * is platform-specific) */ -@@ -288,6 +289,7 @@ static int checkusername(unsigned char *username, unsigned int userlen) { - - goodshell: - endusershell(); -+#endif - TRACE(("matching shell")) - - TRACE(("uid = %d", ses.authstate.pw_uid)) diff --git a/component/dropbear/userspace.patch b/component/dropbear/userspace.patch index b64798e6f..376c85b08 100644 --- a/component/dropbear/userspace.patch +++ b/component/dropbear/userspace.patch @@ -48,7 +48,7 @@ index 87e3c5e..adb2e8b 100644 + if (svr_opts.singleuser) { + m_free(username); + /* Get the current login of the user running dropbear */ -+ username = m_strdup(getpwuid(getuid())->pw_name); ++ username = m_strdup(getlogin()); + } +#endif /* ifdef ENABLE_SINGLEUSER */ servicename = buf_getstring(ses.payload, &servicelen); diff --git a/component/erlang/buildout.cfg b/component/erlang/buildout.cfg deleted file mode 100644 index 4e39c26d9..000000000 --- a/component/erlang/buildout.cfg +++ /dev/null @@ -1,8 +0,0 @@ -[buildout] -parts = - erlang - -[erlang] -recipe = hexagonit.recipe.cmmi -url = http://www.erlang.org/download/otp_src_R14B03.tar.gz -md5sum = 7979e662d11476b97c462feb7c132fb7 diff --git a/component/file/buildout.cfg b/component/file/buildout.cfg index a5cfc0924..f8a33f6c0 100644 --- a/component/file/buildout.cfg +++ b/component/file/buildout.cfg @@ -1,15 +1,13 @@ -# File - Determines file type using "magic" numbers -# http://www.darwinsys.com/file/ - [buildout] parts = file extends = ../zlib/buildout.cfg + [file] recipe = hexagonit.recipe.cmmi -url = ftp://ftp.astron.com/pub/file/file-5.10.tar.gz -md5sum = 4cea34b087b060772511e066e2038196 +url = ftp://ftp.astron.com/pub/file/file-5.07.tar.gz +md5sum = b8d1f9a8a644067bd0a703cebf3f4858 configure-options = --disable-static environment = diff --git a/component/firefox/buildout.cfg b/component/firefox/buildout.cfg deleted file mode 100644 index 4b8bf8a4d..000000000 --- a/component/firefox/buildout.cfg +++ /dev/null @@ -1,40 +0,0 @@ -[buildout] -extends = - ../alsa/buildout.cfg - ../xorg/buildout.cfg - ../fontconfig/buildout.cfg - ../dbus/buildout.cfg - ../gtk-2/buildout.cfg - ../libpng/buildout.cfg - -parts = - firefox - -[firefox] -recipe = slapos.recipe.build -slapos_promise = - file:firefox - file:firefox-bin - -depends = - ${liberation-fonts:location} - ${ipaex-fonts:location} - -x86 = http://releases.mozilla.org/pub/mozilla.org/firefox/releases/7.0.1/linux-i686/fr/firefox-7.0.1.tar.bz2 42c2559892f26ed2a0563faaf693a00f -x86-64 = http://releases.mozilla.org/pub/mozilla.org/firefox/releases/7.0.1/linux-x86_64/en-US/firefox-7.0.1.tar.bz2 20d6c8e3dfc97d08d1dec7d0479f924f - -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") - wrapper_location = os.path.join("%(location)s", "firefox-slapos") - wrapper = open(wrapper_location, 'w') - wrapper.write("""#!/bin/sh - cd %(location)s - export LD_LIBRARY_PATH=${libXrender:location}/lib/:${fontconfig:location}/lib/:${dbus:location}/lib/:${dbus-glib:location}/lib/:${pango:location}/lib:${cairo:location}/lib:${glib:location}/lib:${gtk-2:location}/lib:${atk:location}/lib:${gdk-pixbuf:location}/lib:${libXt:location}/lib:${libpng:location}/lib:${libSM:location}/lib:${libICE:location}/lib:${alsa:location}/lib:%(location)s - export PATH=${fontconfig:location}/bin:$PATH - %(location)s/firefox $*""") - wrapper.close() - os.chmod(wrapper_location, 0777) - diff --git a/component/fontconfig/buildout.cfg b/component/fontconfig/buildout.cfg index 1198708d9..27081e36d 100644 --- a/component/fontconfig/buildout.cfg +++ b/component/fontconfig/buildout.cfg @@ -13,7 +13,6 @@ parts = recipe = hexagonit.recipe.cmmi url = http://fontconfig.org/release/fontconfig-2.8.0.tar.gz md5sum = 77e15a92006ddc2adbb06f840d591c0e -# XXX-Cedric : should we use --with-add-fonts={somefont:location}/share,{someotherfont:location}/share? configure-options = --disable-static --disable-docs diff --git a/component/fonts/buildout.cfg b/component/fonts/buildout.cfg index a14865777..0a8a59c52 100644 --- a/component/fonts/buildout.cfg +++ b/component/fonts/buildout.cfg @@ -2,7 +2,6 @@ parts = liberation-fonts ipaex-fonts - ipa-fonts [fonts] location = ${buildout:parts-directory}/${:_buildout_section_name_} @@ -17,7 +16,7 @@ url = https://fedorahosted.org/releases/l/i/liberation-fonts/liberation-fonts-tt md5sum = 8150db1c6e27cacdfd524b563b85b69e destination = ${fonts:location}/${:_buildout_section_name_} -# IPAex and IPA Font - Japanese fonts provided by IPA +# IPAex Font - Japanese fonts provided by IPA # http://ossipedia.ipa.go.jp/ipafont/index.html [ipaex-fonts] recipe = hexagonit.recipe.download @@ -25,10 +24,3 @@ strip-top-level-dir = true url = http://info.openlab.ipa.go.jp/ipafont/fontdata/IPAexfont00103.zip md5sum = ac67b2fc3aab7f683d89f0070df284e7 destination = ${fonts:location}/${:_buildout_section_name_} - -[ipa-fonts] -recipe = hexagonit.recipe.download -strip-top-level-dir = true -url = http://info.openlab.ipa.go.jp/ipafont/fontdata/IPAfont00303.zip -md5sum = 39a828acf27790adbe4944dfb4d94bb1 -destination = ${fonts:location}/${:_buildout_section_name_} diff --git a/component/freetype/buildout.cfg b/component/freetype/buildout.cfg index c358b3e99..2ca184fa0 100644 --- a/component/freetype/buildout.cfg +++ b/component/freetype/buildout.cfg @@ -10,8 +10,8 @@ parts = [freetype] recipe = hexagonit.recipe.cmmi -url = http://download.savannah.gnu.org/releases/freetype/freetype-2.4.8.tar.bz2 -md5sum = dbf2caca1d3afd410a29217a9809d397 +url = http://download.savannah.gnu.org/releases/freetype/freetype-2.4.6.tar.bz2 +md5sum = 5e6510613f612809d2d7862592b92ab7 configure-options = --disable-static environment = diff --git a/component/gcc/buildout.cfg b/component/gcc/buildout.cfg index 65262028e..86cde9fdb 100644 --- a/component/gcc/buildout.cfg +++ b/component/gcc/buildout.cfg @@ -63,7 +63,6 @@ md5sum = d7cd6a27c8801e66cbaa964a039ecfdb filename = ecj.jar [gcc-download] -hack-revision = ${gcc-interconnection-workaround:hack-revision} recipe = hexagonit.recipe.download url = http://www.mirrorservice.org/sites/sourceware.org/pub/gcc/releases/gcc-4.5.3/gcc-4.5.3.tar.bz2 md5sum = 8e0b5c12212e185f3e4383106bfa9cc6 @@ -71,7 +70,6 @@ strip-top-level-dir = True destination = ${gcc-source:location} [gcc-java-download] -hack-revision = ${gcc-interconnection-workaround:hack-revision} recipe = hexagonit.recipe.download url = http://www.mirrorservice.org/sites/sourceware.org/pub/gcc/releases/gcc-4.5.3/gcc-java-4.5.3.tar.bz2 md5sum = 08e045fdbdc22ac9af3aec3b8d16dbab @@ -80,7 +78,6 @@ destination = ${gcc-source:location} ignore-existing = true [gcc-source] -hack-revision = ${gcc-interconnection-workaround:hack-revision} location = ${buildout:parts-directory}/${:_buildout_section_name_} [gcc-multiarch.patch] @@ -90,15 +87,7 @@ url = ${:_profile_base_location_}/${:filename} filename = ${:_buildout_section_name_} download-only = true -[gcc-java-pre-4.4.patch] -recipe = hexagonit.recipe.download -md5sum = 9a563576126d9fcf234ef29c2fc7df76 -url = ${:_profile_base_location_}/${:filename} -filename = ${:_buildout_section_name_} -download-only = true - [gcc-java-minimal] -hack-revision = ${gcc-interconnection-workaround:hack-revision} depends = ${gcc-download:location} ${gcc-java-download:location} @@ -107,7 +96,6 @@ path = ${gcc-source:location} md5sum = bb3265edf0fa7543e50cedb93e04e427 patches = ${gcc-multiarch.patch:location}/${gcc-multiarch.patch:filename} - ${gcc-java-pre-4.4.patch:location}/${gcc-java-pre-4.4.patch:filename} patch-options = -p2 configure-command = make clean \\; make distclean \\; ./configure # GMP does not correctly detect achitecture so it have to be given @@ -133,7 +121,6 @@ environment = make-targets = install -j1 [gcc] -hack-revision = ${gcc-interconnection-workaround:hack-revision} depends = ${gcc-download:location} ${gcc-java-download:location} @@ -164,10 +151,3 @@ environment = PATH=${zip:location}/bin:%(PATH)s # make install does not work when several core are used make-targets = install -j1 - -[gcc-interconnection-workaround] -# gcc parts are interconnected, so buildout is not capable to clean them up -# until gcc will be simplified by using more robust build recipe (like -# slapos.recipe.build) each time any of parts which reuses this one gets updated -# the hack-revision have to be increased -hack-revision = 1 diff --git a/component/gcc/gcc-java-pre-4.4.patch b/component/gcc/gcc-java-pre-4.4.patch deleted file mode 100644 index 9d4e96c8f..000000000 --- a/component/gcc/gcc-java-pre-4.4.patch +++ /dev/null @@ -1,36 +0,0 @@ -Patch for http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50888 - ---- a/src/libjava/libjava/prims.cc.orig 2012-01-20 11:30:18.586157610 +0100 -+++ b/src/libjava/libjava/prims.cc 2012-01-20 11:30:58.192770947 +0100 -@@ -38,6 +38,14 @@ - #endif - - #ifndef DISABLE_GETENV_PROPERTIES -+#ifdef __GLIBC__ -+/* glibc 2.15+ provides even for C++ inline optimized ::isspace etc. -+ Unfortunately those inlines are throw (), and call a function pointer -+ (which is throw () too, but with -fnon-call-exceptions this results -+ in a __cxa_call_unexpected call. This macro disables the optimized -+ version. */ -+#define __NO_CTYPE 1 -+#endif - #include <ctype.h> - #include <java-props.h> - #define PROCESS_GCJ_PROPERTIES process_gcj_properties() ---- a/src/libjava/prims.cc.orig 2012-01-20 11:30:23.042818341 +0100 -+++ b/src/libjava/prims.cc 2012-01-20 11:31:01.389433254 +0100 -@@ -38,6 +38,14 @@ - #endif - - #ifndef DISABLE_GETENV_PROPERTIES -+#ifdef __GLIBC__ -+/* glibc 2.15+ provides even for C++ inline optimized ::isspace etc. -+ Unfortunately those inlines are throw (), and call a function pointer -+ (which is throw () too, but with -fnon-call-exceptions this results -+ in a __cxa_call_unexpected call. This macro disables the optimized -+ version. */ -+#define __NO_CTYPE 1 -+#endif - #include <ctype.h> - #include <java-props.h> - #define PROCESS_GCJ_PROPERTIES process_gcj_properties() diff --git a/component/gdbm/buildout.cfg b/component/gdbm/buildout.cfg index d8d9105cd..c97171d9b 100644 --- a/component/gdbm/buildout.cfg +++ b/component/gdbm/buildout.cfg @@ -2,18 +2,25 @@ parts = gdbm +[gdbm-nochange-patch-download] +recipe = hexagonit.recipe.download +url = ${:_profile_base_location_}/${:filename} +md5sum = fafa6cae0afbf2b5afb9ef3b8e3035a4 +download-only = true +filename = gdbm-Makefile.in-nochange.patch + [gdbm] recipe = hexagonit.recipe.cmmi -version = 1.10 -url = ftp://ftp.gnu.org/gnu/gdbm/gdbm-${:version}.tar.gz -md5sum = 88770493c2559dc80b561293e39d3570 +url = ftp://ftp.gnu.org/gnu/gdbm/gdbm-1.8.3.tar.gz +md5sum = 1d1b1d5c0245b1c00aff92da751e9aa1 +patches = ${gdbm-nochange-patch-download:location}/${gdbm-nochange-patch-download:filename} configure-options = --disable-static # install as parts/gdbm/include/gdbm/*.h etc. because some softwares # (eg. python's dbmmodule.c extension) assume the location like this. includedir = ${buildout:parts-directory}/${:_buildout_section_name_}/include make-targets = - install includedir=${:includedir}/gdbm && rm -f ${:includedir}/*.h && ln -sf gdbm/gdbm.h ${:includedir}/gdbm.h + install install-compat includedir=${:includedir}/gdbm && rm -f ${:includedir}/*.h && ln -sf gdbm/gdbm.h ${:includedir}/gdbm.h # it seems that parallel build sometimes fails for gdbm. make-options = -j1 diff --git a/component/gdbm/gdbm-Makefile.in-nochange.patch b/component/gdbm/gdbm-Makefile.in-nochange.patch new file mode 100644 index 000000000..014520f58 --- /dev/null +++ b/component/gdbm/gdbm-Makefile.in-nochange.patch @@ -0,0 +1,40 @@ +--- Makefile.in 2002-10-08 16:09:12.000000000 +0000 ++++ Makefile.in.nochange 2010-11-03 21:17:38.579435530 +0000 +@@ -14,10 +14,6 @@ + INSTALL_PROGRAM = @INSTALL_PROGRAM@ + INSTALL_DATA = @INSTALL_DATA@ + +-# File ownership and group +-BINOWN = bin +-BINGRP = bin +- + MAKEINFO = makeinfo + TEXI2DVI = texi2dvi + +@@ -131,11 +127,11 @@ + $(INSTALL_ROOT)$(includedir) $(INSTALL_ROOT)$(man3dir) \ + $(INSTALL_ROOT)$(infodir) + $(LIBTOOL) $(INSTALL) -c libgdbm.la $(INSTALL_ROOT)$(libdir)/libgdbm.la +- $(INSTALL_DATA) -o $(BINOWN) -g $(BINGRP) gdbm.h \ ++ $(INSTALL_DATA) gdbm.h \ + $(INSTALL_ROOT)$(includedir)/gdbm.h +- $(INSTALL_DATA) -o $(BINOWN) -g $(BINGRP) $(srcdir)/gdbm.3 \ ++ $(INSTALL_DATA) $(srcdir)/gdbm.3 \ + $(INSTALL_ROOT)$(man3dir)/gdbm.3 +- $(INSTALL_DATA) -o $(BINOWN) -g $(BINGRP) $(srcdir)/gdbm.info \ ++ $(INSTALL_DATA) $(srcdir)/gdbm.info \ + $(INSTALL_ROOT)$(infodir)/gdbm.info + + install-compat: +@@ -143,9 +139,9 @@ + $(INSTALL_ROOT)$(includedir) + $(LIBTOOL) $(INSTALL) -c libgdbm_compat.la \ + $(INSTALL_ROOT)$(libdir)/libgdbm_compat.la +- $(INSTALL_DATA) -o $(BINOWN) -g $(BINGRP) $(srcdir)/dbm.h \ ++ $(INSTALL_DATA) $(srcdir)/dbm.h \ + $(INSTALL_ROOT)$(includedir)/dbm.h +- $(INSTALL_DATA) -o $(BINOWN) -g $(BINGRP) $(srcdir)/ndbm.h \ ++ $(INSTALL_DATA) $(srcdir)/ndbm.h \ + $(INSTALL_ROOT)$(includedir)/ndbm.h + + #libgdbm.a: $(OBJS) gdbm.h diff --git a/component/ghostscript/buildout.cfg b/component/ghostscript/buildout.cfg index 85ff41306..90f4b639a 100644 --- a/component/ghostscript/buildout.cfg +++ b/component/ghostscript/buildout.cfg @@ -7,8 +7,16 @@ extends = parts = ghostscript +[ghostscript-hooks-download] +recipe = hexagonit.recipe.download +url = ${:_profile_base_location_}/${:filename} +filename = ghostscript-hooks.py +md5sum = 731475648c91507bd1dfe2a61ee84552 +download-only = true + [ghostscript-common] recipe = hexagonit.recipe.cmmi +pre-configure-hook = ${ghostscript-hooks-download:location}/${ghostscript-hooks-download:filename}:pre_configure_hook configure-options = --disable-cups --disable-cairo @@ -24,9 +32,17 @@ environment = LD_LIBRARY_PATH=${fontconfig:location}/lib [ghostscript] -<= ghostscript-9 +# we prefer ghostscript-8 for now, because ghostscript-9.00 seems to have a +# problem with Japanese fonts if -dTextAlphaBits=4 is specified by +# imagemagick. +<= ghostscript-8 [ghostscript-9] <= ghostscript-common -url = http://downloads.ghostscript.com/public/ghostscript-9.04.tar.bz2 -md5sum = 9f6899e821ab6d78ab2c856f10fa3023 +url = http://ghostscript.com/releases/ghostscript-9.00.tar.gz +md5sum = a402462478b4cdda3e1816899227b845 + +[ghostscript-8] +<= ghostscript-common +url = http://www.nexedi.org/static/tarballs/ghostscript/ghostscript-8.71-no-looping-symlink.tar.bz2 +md5sum = 34639af3ffe8594f2c5ea944dfbe1d78 diff --git a/component/ghostscript/ghostscript-hooks.py b/component/ghostscript/ghostscript-hooks.py new file mode 100644 index 000000000..c39936894 --- /dev/null +++ b/component/ghostscript/ghostscript-hooks.py @@ -0,0 +1,7 @@ +import os +def pre_configure_hook(oprtions, buildout): + # fixes python bug related to not creating symlink contained in tarfiles + for missing in 'configure.ac', 'Makefile.in': + if not os.path.exists(os.path.join(os.path.curdir, missing)): + os.symlink(os.path.join(os.path.curdir, 'base', missing), + os.path.join(os.path.curdir, missing)) diff --git a/component/git/buildout.cfg b/component/git/buildout.cfg index a848e34be..9ff6bc1e6 100644 --- a/component/git/buildout.cfg +++ b/component/git/buildout.cfg @@ -13,8 +13,10 @@ parts = [git] recipe = hexagonit.recipe.cmmi -url = http://git-core.googlecode.com/files/git-1.7.8.3.tar.gz -md5sum = 7a4bc5160166537d4da5eb48a7670dff +# url = http://kernel.org/pub/software/scm/git/git-1.7.4.5.tar.bz2 +# Circumvent kernel.org downtime +url = http://ftp.free.fr/mirrors/ftp.kernel.org/software/scm/git/git-1.7.4.5.tar.bz2 +md5sum = 2fa6c4c847ed87523cf55de54af457eb configure-options = --with-curl=${curl:location} --with-openssl=${openssl:location} diff --git a/component/gnutls/buildout.cfg b/component/gnutls/buildout.cfg deleted file mode 100644 index 4bb35dd94..000000000 --- a/component/gnutls/buildout.cfg +++ /dev/null @@ -1,34 +0,0 @@ -[buildout] -extends = - ../readline/buildout.cfg - ../ncurses/buildout.cfg - ../zlib/buildout.cfg - -parts = gnutls - -[gpg-error] -recipe = hexagonit.recipe.cmmi -url = ftp://ftp.gnupg.org/gcrypt/libgpg-error/libgpg-error-1.10.tar.gz -md5sum = 7c2710ef439f82ac429b88fec88e9a4c - -[gcrypt] -recipe = hexagonit.recipe.cmmi -url = ftp://ftp.gnupg.org/gcrypt/libgcrypt/libgcrypt-1.4.6.tar.gz -md5sum = bfd45922eefb8a24d598af77366220d4 -configure-options = - --with-gpg-error-prefix=${gpg-error:location} -environment = - CPPFLAGS=-I${gpg-error:location}/include - LDFLAGS=-Wl,-rpath -Wl,${gpg-error:location}/lib -Wl,${gpg-error:location}/lib/libgpg-error.so.0 - -[gnutls] -# XXX-Cedric : update to latest gnutls -recipe = hexagonit.recipe.cmmi -url = ftp://ftp.gnupg.org/gcrypt/gnutls/gnutls-2.8.6.tar.bz2 -md5sum = eb0a6d7d3cb9ac684d971c14f9f6d3ba -configure-options = - --with-libgcrypt-prefix=${gcrypt:location} -environment = - CPPFLAGS=-I${zlib:location}/include -I${readline:location}/include -I${ncurses:location}/include -I${ncurses:location}/include/ncursesw -I${gcrypt:location}/include -I${gpg-error:location}/include - LDFLAGS=-L${readline:location}/lib -L${ncurses:location}/lib -L${gcrypt:location}/lib -Wl,-rpath -Wl,${zlib:location}/lib -Wl,-rpath -Wl,${readline:location}/lib -Wl,-rpath -Wl,${ncurses:location}/lib -Wl,-rpath -Wl,${gcrypt:location}/lib -Wl,-rpath -Wl,${gpg-error:location}/lib -Wl,${gcrypt:location}/lib/libgcrypt.so.11 - PKG_CONFIG=${zlib:location}/lib/pkgconfig diff --git a/component/graphviz/buildout.cfg b/component/graphviz/buildout.cfg index 85f97fb14..2cbcb438b 100644 --- a/component/graphviz/buildout.cfg +++ b/component/graphviz/buildout.cfg @@ -8,15 +8,17 @@ extends = ../fontconfig/buildout.cfg ../freetype/buildout.cfg ../libpng/buildout.cfg + ../libtool/buildout.cfg ../pkgconfig/buildout.cfg ../zlib/buildout.cfg [graphviz] recipe = hexagonit.recipe.cmmi -url = http://www.graphviz.org/pub/graphviz/stable/SOURCES/graphviz-2.28.0.tar.gz -md5sum = 8d26c1171f30ca3b1dc1b429f7937e58 +url = http://www.graphviz.org/pub/graphviz/stable/SOURCES/graphviz-2.26.3.tar.gz +md5sum = 6f45946fa622770c45609778c0a982ee configure-options = - --with-included-ltdl + --with-ltdl-include=${libtool:location}/include + --with-ltdl-lib=${libtool:location}/lib --with-pngincludedir=${libpng:location}/include --with-pnglibdir=${libpng:location}/lib --with-zincludedir=${zlib:location}/include diff --git a/component/grep/buildout.cfg b/component/grep/buildout.cfg index 231f7bca9..589bb6cb4 100644 --- a/component/grep/buildout.cfg +++ b/component/grep/buildout.cfg @@ -6,8 +6,8 @@ parts = [grep] recipe = hexagonit.recipe.cmmi -url = http://ftp.gnu.org/gnu/grep/grep-2.9.tar.gz -md5sum = 03e3451a38b0d615cb113cbeaf252dc0 +url = http://ftp.gnu.org/gnu/grep/grep-2.8.tar.gz +md5sum = cb2dfc502c5afc7a4a6e5f6cefd6850e environment = - CPPFLAGS=-I${pcre:location}/include - LDFLAGS=-L${pcre:location}/lib -Wl,-rpath=${pcre:location}/lib + PKG_CONFIG_PATH=${pcre:location}/lib/pkgconfig + LDFLAGS =-Wl,--as-needed -Wl,-rpath=${pcre:location}/lib diff --git a/component/groonga/buildout.cfg b/component/groonga/buildout.cfg index 4c863643c..45608460e 100644 --- a/component/groonga/buildout.cfg +++ b/component/groonga/buildout.cfg @@ -1,4 +1,5 @@ -# groonga - an open-source fulltext search engine and column store +# mroonga - a MySQL storage engine using full-text search engine groonga +# http://mroonga.github.com/ # http://groonga.org/ [buildout] @@ -7,10 +8,9 @@ parts = [groonga] recipe = hexagonit.recipe.cmmi -url = http://packages.groonga.org/source/groonga/groonga-1.2.9.tar.gz -md5sum = 47117baa401a3db08362e00f94fced12 +url = http://packages.groonga.org/source/groonga/groonga-1.2.5.tar.gz +md5sum = 7e608406677b7a3f91e287acc0c718c0 configure-options = --disable-static --disable-glibtest - --disable-benchmark --without-mecab diff --git a/component/gtk-2/buildout.cfg b/component/gtk-2/buildout.cfg deleted file mode 100644 index 611f34efb..000000000 --- a/component/gtk-2/buildout.cfg +++ /dev/null @@ -1,82 +0,0 @@ -[buildout] -extends = - ../glib/buildout.cfg - ../pkgconfig/buildout.cfg - ../libpng/buildout.cfg - ../xorg/buildout.cfg - ../zlib/buildout.cfg - ../freetype/buildout.cfg - ../fontconfig/buildout.cfg - ../gettext/buildout.cfg - ../libtiff/buildout.cfg - ../libjpeg/buildout.cfg - -parts = - gtk-2 - -[cairo] -recipe = hexagonit.recipe.cmmi -url = http://cairographics.org/releases/cairo-1.10.2.tar.gz -md5sum = f101a9e88b783337b20b2e26dfd26d5f -configure-options = - --enable-tee=yes -environment = - PATH=${freetype:location}/bin:${pkgconfig:location}/bin:%(PATH)s - PKG_CONFIG_PATH=${fontconfig:location}/lib/pkgconfig:${freetype:location}/lib/pkgconfig:${zlib:location}/lib/pkgconfig:${libpng:location}/lib/pkgconfig:${pixman:location}/lib/pkgconfig:${libX11:location}/lib/pkgconfig:${libXrender:location}/lib/pkgconfig - CPPFLAGS=-I${libpng:location}/include/ -I${zlib:location}/include -I${libX11:location}/include/ -I${xproto:location}/include -I${kbproto:location}/include -I${libXrender:location}/include -I${render:location}/include - LDFLAGS=-L${zlib:location}/lib -Wl,-rpath=${zlib:location}/lib -L${libXrender:location}/lib -Wl,-rpath=${libXrender:location}/lib - LD_LIBRARY_PATH=${render:location}/lib:${libX11:location}/lib:${libXrender:location}/lib - -[pango] -recipe = hexagonit.recipe.cmmi -url = http://ftp.gnome.org/pub/gnome/sources/pango/1.29/pango-1.29.3.tar.bz2 -md5sum = be4e3891353fae6b62a6f8d7689c4266 -configure-options = - --disable-static -# XXX-Cedric : Why, god, why do I have to supply the -lXrender option to linker? -environment = - PATH=${glib:location}/bin:${freetype:location}/bin:${pkgconfig:location}/bin:%(PATH)s - PKG_CONFIG_PATH=${glib:location}/lib/pkgconfig:${fontconfig:location}/lib/pkgconfig:${freetype:location}/lib/pkgconfig:${cairo:location}/lib/pkgconfig::${libXrender:location}/lib/pkgconfig - CPPFLAGS=-I${cairo:location}/include/cairo - LDFLAGS=-L${zlib:location}/lib -Wl,-rpath=${zlib:location}/lib -L${libXrender:location}/lib -Wl,-rpath=${libXrender:location}/lib -lXrender - LD_LIBRARY_PATH=${render:location}/lib:${libX11:location}/lib:${libXrender:location}/lib - -[gdk-pixbuf] -recipe = hexagonit.recipe.cmmi -url = http://ftp.gnome.org/pub/gnome/sources/gdk-pixbuf/2.24/gdk-pixbuf-2.24.0.tar.bz2 -md5sum = d8ece3a4ade4a91c768328620e473ab8 -configure-options = - --disable-static - --without-libintl-prefix -environment = - PATH=${glib:location}/bin:${pkgconfig:location}/bin:%(PATH)s - PKG_CONFIG_PATH=${glib:location}/lib/pkgconfig:${gettext:location}/lib/pkgconfig:${fontconfig:location}/lib/pkgconfig:${freetype:location}/lib/pkgconfig:${cairo:location}/lib/pkgconfig - CPPFLAGS=-I${libtiff:location}/include -I${libjpeg:location}/include -I${libpng:location}/include - LDFLAGS=-L${gettext:location}/lib -Wl,-rpath=${gettext:location}/lib -L${glib:location}/lib -Wl,-rpath=${glib:location}/lib -L${libtiff:location}/lib -Wl,-rpath=${libtiff:location}/lib -L${libjpeg:location}/lib -Wl,-rpath=${libjpeg:location}/lib -L${libpng:location}/lib -Wl,-rpath=${libpng:location}/lib -L${zlib:location}/lib -Wl,-rpath=${zlib:location}/lib - LD_LIBRARY_PATH=${glib:location}/lib:${gettext:location}/lib - -[atk] -recipe = hexagonit.recipe.cmmi -url = http://ftp.gnome.org/pub/gnome/sources/atk/2.0/atk-2.0.1.tar.bz2 -md5sum = 87f20b78deaedef858ac54358c0786b1 -environment = - PATH=${glib:location}/bin:${pkgconfig:location}/bin:%(PATH)s - PKG_CONFIG_PATH=${glib:location}/lib/pkgconfig - LDFLAGS=-L${gettext:location}/lib -Wl,-rpath=${gettext:location}/lib -L${glib:location}/lib -Wl,-rpath=${gettext:location}/lib - LD_LIBRARY_PATH=${glib:location}/lib:${gettext:location}/lib - -[gtk-2] -recipe = hexagonit.recipe.cmmi -url = http://ftp.gnome.org/pub/gnome/sources/gtk+/2.24/gtk+-2.24.6.tar.bz2 -md5sum = 421100f6597e613234f8dead6091a9fe -configure-options = - --disable-static - --disable-cups - --disable-papi - --enable-explicit-deps -environment = - PATH=${gdk-pixbuf:location}/bin:${glib:location}/bin:${pkgconfig:location}/bin:%(PATH)s - PKG_CONFIG_PATH=${glib:location}/lib/pkgconfig:${gettext:location}/lib/pkgconfig:${fontconfig:location}/lib/pkgconfig:${freetype:location}/lib/pkgconfig:${libXau:location}/lib/pkgconfig:${xproto:location}/lib/pkgconfig:${cairo:location}/lib/pkgconfig:${atk:location}/lib/pkgconfig:${gdk-pixbuf:location}/lib/pkgconfig:${pango:location}/lib/pkgconfig:${libX11:location}/lib/pkgconfig:${libXext:location}/lib/pkgconfig:${pixman:location}/lib/pkgconfig:${libpng:location}/lib/pkgconfig:${kbproto:location}/lib/pkgconfig:${libXrender:location}/lib/pkgconfig:${xextproto:location}/lib/pkgconfig:${libxcb:location}/lib/pkgconfig:${xcbproto:location}/lib/pkgconfig:${xorg-libpthread-stubs:location}/lib/pkgconfig - CPPFLAGS=-I${libtiff:location}/include -I${libjpeg:location}/include -I${libpng:location}/include -I${libX11:location}/include/ -I${xproto:location}/include -I${kbproto:location}/include -I${libXrender:location}/include -I${render:location}/include -I${libXext:location}/include -I${cairo:location}/include/cairo - LDFLAGS=-L${gettext:location}/lib -L${glib:location}/lib -L${libtiff:location}/lib -L${libjpeg:location}/lib -L${libpng:location}/lib -L${zlib:location}/lib -L${libXrender:location}/lib -L${libX11:location}/lib -L${libXext:location}/lib -L${pango:location}/lib - LD_LIBRARY_PATH=${glib:location}/lib:${gettext:location}/lib:${libX11:location}/lib diff --git a/component/handlersocket/HandlerSocket-Plugin-for-MySQL-1.0.6-mariadb.patch b/component/handlersocket/HandlerSocket-Plugin-for-MySQL-1.0.6-mariadb.patch new file mode 100644 index 000000000..a3d817294 --- /dev/null +++ b/component/handlersocket/HandlerSocket-Plugin-for-MySQL-1.0.6-mariadb.patch @@ -0,0 +1,37 @@ +--- a/configure.ac ++++ b/configure.ac +@@ -28,7 +28,7 @@ + MYSQL_INC="$MYSQL_INC -I$ac_mysql_source_dir/regex" + MYSQL_INC="$MYSQL_INC -I$ac_mysql_source_dir" + AC_SUBST(MYSQL_INC) +- MYSQL_SOURCE_VERSION=`cat $ac_mysql_source_dir/configure.in | grep "\[[MySQL Server\]]" | sed -e "s|.*\([[0-9]]\+\.[[0-9]]\+\.[[0-9]]\+[[0-9a-zA-Z\_\-]]*\).*|\1|"` ++ MYSQL_SOURCE_VERSION=`cat $ac_mysql_source_dir/configure.in | grep "\[[MariaDB Server\]]" | sed -e "s|.*\([[0-9]]\+\.[[0-9]]\+\.[[0-9]]\+[[0-9a-zA-Z\_\-]]*\).*|\1|"` + AC_MSG_RESULT([yes: Using $ac_mysql_source_dir, version $MYSQL_SOURCE_VERSION]) + else + AC_MSG_ERROR([invalid MySQL source directory: $ac_mysql_source_dir]) +--- a/handlersocket/database.cpp ++++ b/handlersocket/database.cpp +@@ -686,19 +686,19 @@ + for (uint32_t i = 0; i < limit + skip; ++i) { + if (i == 0) { + const key_part_map kpm = (1U << args.kvalslen) - 1; +- r = hnd->index_read_map(table->record[0], key_buf, kpm, find_flag); ++ r = hnd->ha_index_read_map(table->record[0], key_buf, kpm, find_flag); + } else { + switch (find_flag) { + case HA_READ_BEFORE_KEY: + case HA_READ_KEY_OR_PREV: +- r = hnd->index_prev(table->record[0]); ++ r = hnd->ha_index_prev(table->record[0]); + break; + case HA_READ_AFTER_KEY: + case HA_READ_KEY_OR_NEXT: +- r = hnd->index_next(table->record[0]); ++ r = hnd->ha_index_next(table->record[0]); + break; + case HA_READ_KEY_EXACT: +- r = hnd->index_next_same(table->record[0], key_buf, kplen_sum); ++ r = hnd->ha_index_next_same(table->record[0], key_buf, kplen_sum); + break; + default: + r = HA_ERR_END_OF_FILE; /* to finish the loop */ diff --git a/component/handlersocket/buildout.cfg b/component/handlersocket/buildout.cfg new file mode 100644 index 000000000..72a260caa --- /dev/null +++ b/component/handlersocket/buildout.cfg @@ -0,0 +1,36 @@ +# Handlersocket - a NoSQL plugin for MySQL. +# http://github.com/ahiguti/HandlerSocket-Plugin-for-MySQL + +[buildout] +extends = + ../autoconf/buildout.cfg + ../automake/buildout.cfg + ../libtool/buildout.cfg + ../mariadb/buildout.cfg + +parts = + handlersocket + +[handlersocket-mariadb-patch] +recipe = hexagonit.recipe.download +url = ${:_profile_base_location_}/${:filename} +md5sum = 2654feea2e867c898b741ac0f0aa8e14 +filename = HandlerSocket-Plugin-for-MySQL-1.0.6-mariadb.patch +download-only = true + +[handlersocket] +recipe = hexagonit.recipe.cmmi +url = http://github.com/ahiguti/HandlerSocket-Plugin-for-MySQL/tarball/1.0.6 +md5sum = 57f5c131e3d29701b01dd92c35ed25fd +patch-options = -p1 +patches = + ${handlersocket-mariadb-patch:location}/${handlersocket-mariadb-patch:filename} +configure-command = + ACLOCAL_ARGS=-I${libtool:location}/share/aclocal ./autogen.sh && ./configure +configure-options = + --prefix=${buildout:parts-directory}/${:_buildout_section_name_} + --with-mysql-source=${mariadb:location}__compile__/mariadb-${mariadb:version} + --with-mysql-bindir=${mariadb:location}/bin + --with-mysql-plugindir=${mariadb:location}/lib/mysql/plugin +environment = + PATH =${autoconf:location}/bin:${automake-1.11:location}/bin:${libtool:location}/bin:%(PATH)s diff --git a/component/haproxy/buildout.cfg b/component/haproxy/buildout.cfg index 1d2465842..59333f0d7 100644 --- a/component/haproxy/buildout.cfg +++ b/component/haproxy/buildout.cfg @@ -3,8 +3,8 @@ parts = haproxy [haproxy] recipe = hexagonit.recipe.cmmi -url = http://haproxy.1wt.eu/download/1.4/src/haproxy-1.4.19.tar.gz -md5sum = 41392d738460dbf99295fd928031c6a4 +url = http://haproxy.1wt.eu/download/1.4/src/haproxy-1.4.18.tar.gz +md5sum = 4ac88bb1a76c4b84ed4f6131183bedbe configure-command = true # If the system is running on Linux 2.6, we use "linux26" as the TARGET, # otherwise use "generic". diff --git a/component/intltool/buildout.cfg b/component/intltool/buildout.cfg deleted file mode 100644 index 70835edcd..000000000 --- a/component/intltool/buildout.cfg +++ /dev/null @@ -1,19 +0,0 @@ -[buildout] -extends = - ../gettext/buildout.cfg - ../perl/buildout.cfg - ../perl-XML-Parser/buildout.cfg - -parts = - intltool - -[intltool] -recipe = hexagonit.recipe.cmmi -url = http://edge.launchpad.net/intltool/trunk/0.41.1/+download/intltool-0.41.1.tar.gz -md5sum = d6c91bf06681919ccfdf3624035b75dc -depends = - ${perl:version} - ${perl-XML-Parser:location} -environment = - PATH=${perl:location}/bin:${gettext:location}/bin:${pkgconfig:location}/bin:%(PATH)s - PKG_CONFIG_PATH=${perl:location}/lib/pkgconfig diff --git a/component/libaio/buildout.cfg b/component/libaio/buildout.cfg deleted file mode 100644 index 4d46fe3c4..000000000 --- a/component/libaio/buildout.cfg +++ /dev/null @@ -1,12 +0,0 @@ -[buildout] -parts = - libaio - -[libaio] -recipe = hexagonit.recipe.cmmi -# originally located at http://www.kernel.org/pub/linux/libs/aio/ -url = http://ftp.free.fr/mirrors/ftp.debian.org/pool/main/liba/libaio/libaio_0.3.109.orig.tar.gz -md5sum = 435a5b16ca6198eaf01155263d855756 -location = ${buildout:parts-directory}/${:_buildout_section_name_} -configure-command = echo -make-options = prefix=${:location} diff --git a/component/libmemcached/buildout.cfg b/component/libmemcached/buildout.cfg deleted file mode 100644 index 4b3b210ea..000000000 --- a/component/libmemcached/buildout.cfg +++ /dev/null @@ -1,30 +0,0 @@ -[buildout] - -parts = - libmemcached - -[libmemcached] -<= libmemcached-0.50 - -[libmemcached-0.50] -<= libmemcached-common -url = http://launchpad.net/libmemcached/1.0/0.50/+download/libmemcached-0.50.tar.gz -md5sum = c8627014a37cd821cf93317b8de6f9f8 - -[libmemcached-0.44] -<= libmemcached-common -url = http://launchpad.net/libmemcached/1.0/0.44/+download/libmemcached-0.44.tar.gz -md5sum = e6bd825c46fa080b550f90f9001cba8c - -[libmemcached-common] -recipe = hexagonit.recipe.cmmi -configure-options = - --without-docs - --without-memcached - --without-libgtest-prefix - --without-libevent-prefix - --without-libinnodb-prefix - --without-libsasl-prefix - --without-libsasl2-prefix - - diff --git a/component/libpng/buildout.cfg b/component/libpng/buildout.cfg index a78e8143e..d7ead5bdf 100644 --- a/component/libpng/buildout.cfg +++ b/component/libpng/buildout.cfg @@ -15,5 +15,5 @@ environment = [libpng] <= libpng-common -url = http://download.sourceforge.net/libpng/libpng-1.5.5.tar.bz2 -md5sum = 3270bf2990c3174ae939388398de751e +url = http://download.sourceforge.net/libpng/libpng-1.5.4.tar.bz2 +md5sum = b43afe39237b69859522455b215f9e85 diff --git a/component/libtool/buildout.cfg b/component/libtool/buildout.cfg index 8d6256665..d50fa5703 100644 --- a/component/libtool/buildout.cfg +++ b/component/libtool/buildout.cfg @@ -3,7 +3,7 @@ parts = libtool [libtool] recipe = hexagonit.recipe.cmmi -md5sum = d2f3b7d4627e69e13514a40e72a24d50 -url = http://ftp.gnu.org/gnu/libtool/libtool-2.4.2.tar.gz +md5sum = b32b04148ecdd7344abc6fe8bd1bb021 +url = http://ftp.gnu.org/gnu/libtool/libtool-2.4.tar.gz configure-options = --disable-static diff --git a/component/mariadb/buildout.cfg b/component/mariadb/buildout.cfg index d98313f30..73e4c8719 100644 --- a/component/mariadb/buildout.cfg +++ b/component/mariadb/buildout.cfg @@ -5,7 +5,6 @@ extends = ../zlib/buildout.cfg ../groonga/buildout.cfg - ../libevent/buildout.cfg ../ncurses/buildout.cfg ../pkgconfig/buildout.cfg ../readline/buildout.cfg @@ -13,18 +12,11 @@ extends = parts = mariadb -[mariadb-no_test-patch] -recipe = hexagonit.recipe.download -url = ${:_profile_base_location_}/${:filename} -md5sum = d65f61829cfbcd5062f49db2b00bd6fe -filename = mysql_create_system_tables__no_test.patch -download-only = true - [mariadb] recipe = hexagonit.recipe.cmmi -version = 5.3.3-rc -url = http://downloads.askmonty.org/f/mariadb-${:version}/kvm-tarbake-jaunty-x86/mariadb-${:version}.tar.gz/from/http:/ftp.osuosl.org/pub/mariadb -md5sum = 715c61bb101acc7d37e893f6a9de9267 +version = 5.3.1-beta +url = http://downloads.askmonty.org/f/mariadb-${:version}/kvm-tarbake-jaunty-x86/mariadb-${:version}.tar.gz/from/http://mirror.layerjet.com/mariadb +md5sum = 5b3a94de1c1fcaa193edbbc8d7f8ffe4 # compile directory is required to build mysql plugins. keep-compile-dir = true # configure: how to avoid searching for my.cnf? @@ -39,30 +31,19 @@ configure-options = --with-pic --with-fast-mutexes --with-charset=utf8 - --with-extra-charsets=complex --with-collation=utf8_unicode_ci - --with-big-tables - --with-embedded-server - --with-plugins=max-no-ndb - --with-aria-tmp-tables - --without-plugin-innodb_plugin - --without-plugin-oqgraph --without-readline --with-ssl - --with-libevent=${libevent:location} --with-zlib-dir=${zlib:location} -patch-options = -p0 -patches = - ${mariadb-no_test-patch:location}/${mariadb-no_test-patch:filename} environment = - CPPFLAGS=-I${ncurses:location}/include -I${readline5:location}/include - LDFLAGS=-Wl,-rpath=${libevent:location}/lib -L${ncurses:location}/lib -Wl,-rpath=${ncurses:location}/lib -L${readline5:location}/lib -Wl,-rpath=${readline5:location}/lib -Wl,-rpath=${zlib:location}/lib + CPPFLAGS =-I${ncurses:location}/include -I${readline:location}/include + LDFLAGS =-L${readline:location}/lib -L${ncurses:location}/lib -Wl,-rpath=${zlib:location}/lib -Wl,-rpath=${ncurses:location}/lib -Wl,-rpath=${readline:location}/lib -[mroonga-mariadb] +[groonga-storage-engine-mariadb] recipe = hexagonit.recipe.cmmi -url = https://github.com/downloads/mroonga/mroonga/mroonga-1.11.tar.gz -md5sum = 69e56246226e0b9969ee7f99e08aa7da +url = http://github.com/downloads/mroonga/mroonga/groonga-storage-engine-0.5.tar.gz +md5sum = 52fed75d97a91f239750a1011ea9e468 configure-options = --with-mysql-source=${mariadb:location}__compile__/mariadb-${mariadb:version} --with-mysql-config=${mariadb:location}/bin/mysql_config diff --git a/component/mariadb/mysql_create_system_tables__no_test.patch b/component/mariadb/mysql_create_system_tables__no_test.patch deleted file mode 100644 index 31f5d0ab1..000000000 --- a/component/mariadb/mysql_create_system_tables__no_test.patch +++ /dev/null @@ -1,26 +0,0 @@ -# 33_scripts__mysql_create_system_tables__no_test.dpatch by <ch@debian.org> - -A user with no password prevents a normal user from login under certain -circumstances as it is checked first. -See http://bugs.debian.org/301741 -and http://bugs.mysql.com/bug.php?id=6901 - ---- scripts/mysql_system_tables_data.sql 2008-12-04 22:59:44.000000000 +0100 -+++ scripts/mysql_system_tables_data.sql 2008-12-04 23:00:07.000000000 +0100 -@@ -11,8 +11,6 @@ - -- Fill "db" table with default grants for anyone to - -- access database 'test' and 'test_%' if "db" table didn't exist - CREATE TEMPORARY TABLE tmp_db LIKE db; --INSERT INTO tmp_db VALUES ('%','test','','Y','Y','Y','Y','Y','Y','N','Y','Y','Y','Y','Y','Y','Y','Y','N','N','Y','Y'); --INSERT INTO tmp_db VALUES ('%','test\_%','','Y','Y','Y','Y','Y','Y','N','Y','Y','Y','Y','Y','Y','Y','Y','N','N','Y','Y'); - INSERT INTO db SELECT * FROM tmp_db WHERE @had_db_table=0; - DROP TABLE tmp_db; - -@@ -24,7 +22,5 @@ - INSERT INTO tmp_user VALUES ('localhost','root','','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','','','','',0,0,0,0,'',''); - REPLACE INTO tmp_user SELECT @current_hostname,'root','','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','','','','',0,0,0,0,'','' FROM dual WHERE LOWER( @current_hostname) != 'localhost'; - REPLACE INTO tmp_user VALUES ('127.0.0.1','root','','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','','','','',0,0,0,0,'',''); --INSERT INTO tmp_user (host,user) VALUES ('localhost',''); --INSERT INTO tmp_user (host,user) SELECT @current_hostname,'' FROM dual WHERE LOWER(@current_hostname ) != 'localhost'; - INSERT INTO user SELECT * FROM tmp_user WHERE @had_user_table=0; - DROP TABLE tmp_user; diff --git a/component/membase/buildout.cfg b/component/membase/buildout.cfg deleted file mode 100644 index 3fd1e63a4..000000000 --- a/component/membase/buildout.cfg +++ /dev/null @@ -1,138 +0,0 @@ -[buildout] -extends = - ../curl/buildout.cfg - ../libevent/buildout.cfg - ../erlang/buildout.cfg - -parts = - membase-source - membase-memcached - membase-libmemcached - membase-libconflate - membase-libvbucket - membase-moxi - membase-bucket_engine - membase-ep-engine - membase-membase-cli - membase-memcachetest - membase-ns_server - membase-vbucketmigrator - -[membase] -location = ${buildout:parts-directory}/${:_buildout_section_name_} - -[membase-source] -<= membase-1.7.0-source - -[membase-1.7.0-source] -<= membase-source-common -url = http://files.couchbase.com/source/membase-server_src-1.7.0.tar.gz -md5sum = c933fffea299d00e43b002cb65738663 - -[membase-source-common] -recipe = hexagonit.recipe.download -strip-top-level-dir = true - -[membase-component-common] -recipe = hexagonit.recipe.cmmi -path = ${membase-source:location}/${:component} -prefix = ${membase:location} -configure-options = - --prefix=${:prefix} - ${:component-configure-options} - -[membase-libmemcached] -<= membase-component-common -component = libmemcached -component-configure-options = - --disable-static - --enable-shared - --disable-dtrace - --without-docs - --disable-sasl - --with-memcached=${membase:location}/bin/memcached - -[membase-memcached] -<= membase-component-common -component = memcached -patches = -configure-command = - ./configure -component-configure-options = - --enable-isasl - -[membase-libconflate] -<= membase-component-common -component = libconflate -component-configure-options = - --disable-static - --enable-shared - --without-check - --with-libcurl-prefix=${curl:location} - -[membase-libvbucket] -<= membase-component-common -component = libvbucket -component-configure-options = - --disable-static - --enable-shared - --without-docs - --with-libhashkit-prefix=${membase:location} - -[membase-moxi] -<= membase-component-common -component = moxi -component-configure-options = - --enable-moxi-libvbucket - --enable-moxi-libmemcached - --without-check - --with-libevent-prefix=${libevent:location} - --with-libmemcached-prefix=${membase:location} - --with-memcached=${membase:location}/bin/memcached - --with-libhashkit-prefix=${membase:location} - --with-libconflate-prefix=${membase:location} - --with-libvbucket-prefix=${membase:location} - -[membase-bucket_engine] -<= membase-component-common -component = bucket_engine -component-configure-options = - --with-memcached=${membase-source:location}/memcached - -[membase-ep-engine] -<= membase-component-common -component = ep-engine -component-configure-options = - --with-memcached=${membase-source:location}/memcached - -[membase-membase-cli] -<= membase-component-common -component = membase-cli -patches = -configure-command = - ./configure -component-configure-options = - -[membase-memcachetest] -<= membase-component-common -component = memcachetest -component-configure-options = - --with-memcached=${membase:location}/bin/memcached - -[membase-ns_server] -<= membase-component-common -component = ns_server -patches = -configure-command = - ./configure -component-configure-options = -environment = - PATH=${erlang:location}/bin:%(PATH)s - -[membase-vbucketmigrator] -<= membase-component-common -component = vbucketmigrator -component-configure-options = - --without-sasl - --with-isasl - diff --git a/component/memcached/buildout.cfg b/component/memcached/buildout.cfg index dbc2979c0..5c36165e4 100644 --- a/component/memcached/buildout.cfg +++ b/component/memcached/buildout.cfg @@ -1,9 +1,16 @@ [buildout] parts = memcached -extends = - ../autoconf/buildout.cfg - ../automake/buildout.cfg - ../libevent/buildout.cfg +extends = ../libevent/buildout.cfg + +[memcached-strict-aliasing-patch] +# on some platforms original memcached refuses to build: +# * http://code.google.com/p/memcached/issues/detail?id=60 +# * http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=565033 +recipe = hexagonit.recipe.download +url = ${:_profile_base_location_}/${:filename} +md5sum = c03b3bfc237b77667b0e90442b0980e8 +download-only = true +filename = memcached-fix-strict-aliasing.patch [memcached-fix-array-subscript-is-above-array-bounds] recipe = hexagonit.recipe.download @@ -12,30 +19,45 @@ filename = memcached-1.4-fix-array-subscript-is-above-array-bounds.patch download-only = true md5sum = 472508b9a4b6c0b9f5d6f2abce3444e3 -[memcached-gcc-4.4.patch] +[memcached-gcc4.6.patch] recipe = hexagonit.recipe.download url = ${:_profile_base_location_}/${:filename} -filename = memcached-gcc-4.4.patch +filename = memcached-gcc4.6.patch download-only = true -md5sum = fd98d0cbfc4d3a25ac9808472fbe62f8 +md5sum = 3418477f64500cd2a8dce046f5d72fec [memcached] -recipe = hexagonit.recipe.cmmi -url = http://memcached.googlecode.com/files/memcached-1.4.8.tar.gz -md5sum = b7104e269511621c2777367d6d6315fe +<= memcached-1.4.6 + +[memcached-1.4.6] +<= memcached-common +url = http://memcached.googlecode.com/files/memcached-1.4.6.tar.gz +md5sum = 243e5d82de27e6e45caf0ebfd400e41a patches = - ${memcached-fix-array-subscript-is-above-array-bounds:location}/${memcached-fix-array-subscript-is-above-array-bounds:filename} ${memcached-gcc-4.4.patch:location}/${memcached-gcc-4.4.patch:filename} -patch-options = -p1 -configure-command = - aclocal-1.11 - autoheader - automake-1.11 --foreign - autoconf - ./configure + ${memcached-fix-array-subscript-is-above-array-bounds:location}/${memcached-fix-array-subscript-is-above-array-bounds:filename} + +[memcached-1.4.5] +<= memcached-common +url = http://memcached.googlecode.com/files/memcached-1.4.5.tar.gz +md5sum = 583441a25f937360624024f2881e5ea8 +patches = + ${memcached-strict-aliasing-patch:location}/${memcached-strict-aliasing-patch:filename} + ${memcached-fix-array-subscript-is-above-array-bounds:location}/${memcached-fix-array-subscript-is-above-array-bounds:filename} + ${memcached-gcc4.6.patch:location}/${memcached-gcc4.6.patch:filename} + +[memcached-1.4.4] +<= memcached-common +url = http://memcached.googlecode.com/files/memcached-1.4.4.tar.gz +md5sum = 5ca5b24de347e97ac1f48f3785b4178a +patches = + ${memcached-strict-aliasing-patch:location}/${memcached-strict-aliasing-patch:filename} + ${memcached-fix-array-subscript-is-above-array-bounds:location}/${memcached-fix-array-subscript-is-above-array-bounds:filename} + ${memcached-gcc4.6.patch:location}/${memcached-gcc4.6.patch:filename} + +[memcached-common] +recipe = hexagonit.recipe.cmmi configure-options = - --prefix=${buildout:parts-directory}/${:_buildout_section_name_} --with-libevent=${libevent:location} - --disable-docs +patch-options = -p1 environment = - PATH=${autoconf:location}/bin:${automake-1.11:location}/bin:%(PATH)s - LDFLAGS =-Wl,-rpath=${libevent:location}/lib + LDFLAGS =-Wl,-rpath=${libevent:location}/lib diff --git a/component/memcached/memcached-fix-strict-aliasing.patch b/component/memcached/memcached-fix-strict-aliasing.patch new file mode 100644 index 000000000..ac8d4dde5 --- /dev/null +++ b/component/memcached/memcached-fix-strict-aliasing.patch @@ -0,0 +1,40 @@ +diff -rdBu memcached-1.4.0-rc1/memcached.h memcached-1.4.0-my/memcached.h +--- memcached-1.4.0-rc1/memcached.h 2009-05-29 00:51:56.000000000 +0400 ++++ memcached-1.4.0-my/memcached.h 2009-06-07 22:32:52.000000000 +0400 +@@ -75,21 +75,21 @@ + + /* warning: don't use these macros with a function, as it evals its arg twice */ + #define ITEM_get_cas(i) ((uint64_t)(((i)->it_flags & ITEM_CAS) ? \ +- *(uint64_t*)&((i)->end[0]) : 0x0)) ++ *(uint64_t*)((char*)(i) + sizeof(*i)) : 0x0)) + #define ITEM_set_cas(i,v) { if ((i)->it_flags & ITEM_CAS) { \ +- *(uint64_t*)&((i)->end[0]) = v; } } ++ *(uint64_t*)((char*)(i) + sizeof(*i)) = v; } } + +-#define ITEM_key(item) (((char*)&((item)->end[0])) \ ++#define ITEM_key(item) ((char*)(item) + sizeof(*item) \ + + (((item)->it_flags & ITEM_CAS) ? sizeof(uint64_t) : 0)) + +-#define ITEM_suffix(item) ((char*) &((item)->end[0]) + (item)->nkey + 1 \ ++#define ITEM_suffix(item) ((char*)(item) + sizeof(*item) + (item)->nkey + 1 \ + + (((item)->it_flags & ITEM_CAS) ? sizeof(uint64_t) : 0)) + +-#define ITEM_data(item) ((char*) &((item)->end[0]) + (item)->nkey + 1 \ ++#define ITEM_data(item) ((char*)(item) + sizeof(*item) + (item)->nkey + 1 \ + + (item)->nsuffix \ + + (((item)->it_flags & ITEM_CAS) ? sizeof(uint64_t) : 0)) + +-#define ITEM_ntotal(item) (sizeof(struct _stritem) + (item)->nkey + 1 \ ++#define ITEM_ntotal(item) (sizeof(*item) + (item)->nkey + 1 \ + + (item)->nsuffix + (item)->nbytes \ + + (((item)->it_flags & ITEM_CAS) ? sizeof(uint64_t) : 0)) + +@@ -285,7 +285,6 @@ + uint8_t it_flags; /* ITEM_* above */ + uint8_t slabs_clsid;/* which slab class we're in */ + uint8_t nkey; /* key length, w/terminating null and padding */ +- void * end[]; + /* if it_flags & ITEM_CAS we have 8 bytes CAS */ + /* then null-terminated key */ + /* then " flags length\r\n" (no terminating null) */ + diff --git a/component/memcached/memcached-gcc-4.4.patch b/component/memcached/memcached-gcc-4.4.patch deleted file mode 100644 index f86324858..000000000 --- a/component/memcached/memcached-gcc-4.4.patch +++ /dev/null @@ -1,12 +0,0 @@ -# In OpenSuse 11.2, 'gcc -dumpversion' returns '4.4', not '4.4.*'. ---- memcached-1.4.8/configure.ac.orig -+++ memcached-1.4.8/configure.ac -@@ -502,7 +502,7 @@ - GCC_VERSION=`$CC -dumpversion` - CFLAGS="$CFLAGS -Wall -Werror -pedantic -Wmissing-prototypes -Wmissing-declarations -Wredundant-decls" - case $GCC_VERSION in -- 4.4.*) -+ 4.4 | 4.4.*) - CFLAGS="$CFLAGS -fno-strict-aliasing" - ;; - esac diff --git a/component/memcached/memcached-gcc4.6.patch b/component/memcached/memcached-gcc4.6.patch new file mode 100644 index 000000000..53647d90a --- /dev/null +++ b/component/memcached/memcached-gcc4.6.patch @@ -0,0 +1,36 @@ +diff --git a/items.c b/items.c +index e7f01ea..9fc6704 100644 +--- a/items.c ++++ b/items.c +@@ -450,9 +450,7 @@ void do_item_stats_sizes(ADD_STAT add_stats, void *c) { + for (i = 0; i < num_buckets; i++) { + if (histogram[i] != 0) { + char key[8]; +- int klen = 0; +- klen = snprintf(key, sizeof(key), "%d", i * 32); +- assert(klen < sizeof(key)); ++ assert(snprintf(key, sizeof(key), "%d", i * 32) < sizeof(key)); + APPEND_STAT(key, "%u", histogram[i]); + } + } +diff --git a/memcached.c b/memcached.c +index 750c8b3..0913b77 100644 +--- a/memcached.c ++++ b/memcached.c +@@ -4627,8 +4627,6 @@ int main (int argc, char **argv) { + + /* create the listening socket, bind it, and init */ + if (settings.socketpath == NULL) { +- int udp_port; +- + const char *portnumber_filename = getenv("MEMCACHED_PORT_FILENAME"); + char temp_portnumber_filename[PATH_MAX]; + FILE *portnumber_file = NULL; +@@ -4658,7 +4656,6 @@ int main (int argc, char **argv) { + * then daemonise if needed, then init libevent (in some cases + * descriptors created by libevent wouldn't survive forking). + */ +- udp_port = settings.udpport ? settings.udpport : settings.port; + + /* create the UDP listening socket and bind it */ + errno = 0; diff --git a/component/memstrike/buildout.cfg b/component/memstrike/buildout.cfg deleted file mode 100644 index 5235973db..000000000 --- a/component/memstrike/buildout.cfg +++ /dev/null @@ -1,34 +0,0 @@ -[buildout] -extends = - ../libmemcached/buildout.cfg - ../git/buildout.cfg - ../autoconf/buildout.cfg - ../automake/buildout.cfg - ../libtool/buildout.cfg - -parts = - memstrike - -[memstrike] -recipe = hexagonit.recipe.cmmi -path = ${memstrikesource:location} -configure-command = - ./bootstrap - ./configure -configure-options = - --prefix=${buildout:parts-directory}/${:_buildout_section_name_} - --with-libmemcached=${libmemcached:location} -environment = - PATH =${autoconf:location}/bin:${automake-1.11:location}/bin:${libtool:location}/bin:%(PATH)s - LDFLAGS =-Wl,-rpath=${libmemcached:location}/lib - -[memstrikesource] -recipe=plone.recipe.command -location = ${buildout:parts-directory}/${:_buildout_section_name_} -stop-on-error = true -revision = 39d7a99e8bb7eea6df8b -command = - rm -rf ${:location} && - ${git:location}/bin/git clone --quiet git://github.com/frsyuki/memstrike.git ${:location} && - cd ${:location} && - ${git:location}/bin/git checkout --quiet ${:revision} diff --git a/component/mesa/buildout.cfg b/component/mesa/buildout.cfg deleted file mode 100644 index 5e04066cd..000000000 --- a/component/mesa/buildout.cfg +++ /dev/null @@ -1,41 +0,0 @@ -[buildout] -extends = - ../xorg/buildout.cfg - -parts = - mesa - -[libdrm] -#does not seem to compile with -jX -recipe = hexagonit.recipe.cmmi -url = http://dri.freedesktop.org/libdrm/libdrm-2.4.26.tar.bz2 -md5sum = 062569426773f69b11a47a7712bba770 -configure-options = - --enable-nouveau-experimental-api -environment = - PATH=${pkgconfig:location}/bin:%(PATH)s - PKG_CONFIG_PATH=${xorg-libpthread-stubs:location}/lib/pkgconfig:${pciaccess:location}/lib/pkgconfig - - -[mesa] -recipe = hexagonit.recipe.cmmi -url = ftp://ftp.freedesktop.org//pub/mesa/7.11/MesaLib-7.11.tar.bz2 -md5sum = ff03aca82d0560009a076a87c888cf13 -configure-options = - --disable-static - --disable-driglx-direct - --disable-glu - --disable-glw - --disable-glut - --disable-egl - --disable-gallium-llvm - --with-gallium-drivers= - --with-dri-drivers= - --with-expat=${libexpat:location} - --with-driver=xlib -environment = - PATH=${pkgconfig:location}/bin:${makedepend:location}/bin:${flex:location}/bin:${bison:location}/bin:%(PATH)s - PKG_CONFIG_PATH=${libdrm:location}/lib/pkgconfig:${dri2proto:location}/lib/pkgconfig:${xorg-libpthread-stubs:location}/lib/pkgconfig:${pciaccess:location}/lib/pkgconfig:${libX11:location}/lib/pkgconfig:${glproto:location}/lib/pkgconfig:${libX11:location}/lib/pkgconfig:${libXext:location}/lib/pkgconfig:${xfixes:location}/lib/pkgconfig:${xdamage:location}/lib/pkgconfig:${xproto:location}/lib/pkgconfig:${xextproto:location}/lib/pkgconfig - CPPFLAGS=-I${libexpat:location}/include -I${libdrm:location}/include/libdrm -I${libdrm:location}/include -I${xproto:location}/include -I${libX11:location}/include -I${libXext:location}/include/ -I${xextproto:location}/include - LDFLAGS=-L${libexpat:location}/lib - PYTHON=${buildout:executable} diff --git a/component/mroonga/buildout.cfg b/component/mroonga/buildout.cfg new file mode 100644 index 000000000..8ce6cce95 --- /dev/null +++ b/component/mroonga/buildout.cfg @@ -0,0 +1,40 @@ +# mroonga - a MySQL storage engine using full-text search engine groonga +# http://mroonga.github.com/ +# http://groonga.org/ + +[buildout] +parts = + mroonga +extends = + ../mariadb/buildout.cfg + ../pkgconfig/buildout.cfg + +[groonga] +recipe = hexagonit.recipe.cmmi +url = http://groonga.org/files/groonga/groonga-1.1.0.tar.gz +md5sum = a5a381db446e017f172bf6b003a4fed9 +configure-options = + --without-mecab + +[mroonga-mariadb-patch] +recipe = hexagonit.recipe.download +url = ${:_profile_base_location_}/${:filename} +md5sum = da2457b9f8006cddb279a165128479e5 +filename = groonga-storage-engine-0.4.mariadb.patch +download-only = true + +[mroonga] +recipe = hexagonit.recipe.cmmi +url = http://github.com/downloads/mroonga/mroonga/groonga-storage-engine-0.4.tar.gz +md5sum = eb39ddaebb5a295f103bb1f66d5b33da +patch-options = -p1 +patches = + ${mroonga-mariadb-patch:location}/${mroonga-mariadb-patch:filename} +configure-options = + --with-mysql-source=${mariadb:location}__compile__/mariadb-${mariadb:version} + --with-mysql-config=${mariadb:location}/bin/mysql_config +environment = + PATH=${groonga:location}/bin:${pkgconfig:location}/bin:%(PATH)s + CPPFLAGS=-I${groonga:location}/include/groonga + LDFLAGS=-L${groonga:location}/lib + PKG_CONFIG_PATH=${groonga:location}/lib/pkgconfig diff --git a/component/mroonga/groonga-storage-engine-0.4.mariadb.patch b/component/mroonga/groonga-storage-engine-0.4.mariadb.patch new file mode 100644 index 000000000..6d0ba557d --- /dev/null +++ b/component/mroonga/groonga-storage-engine-0.4.mariadb.patch @@ -0,0 +1,14 @@ +diff -ur groonga-storage-engine-0.4.orig/configure groonga-storage-engine-0.4/configure +--- groonga-storage-engine-0.4.orig/configure 2010-11-24 06:23:50.000000000 +0100 ++++ groonga-storage-engine-0.4/configure 2011-01-01 16:01:07.000000000 +0100 +@@ -13925,8 +13925,8 @@ + as_fn_error "failed to run \"$ac_mysql_config\": $plugindir" "$LINENO" 5 + fi + MYSQL_INC="$MYSQL_INC $($ac_mysql_config --include)" +- ac_mysql_major_version="`$ac_mysql_config --version | cut -b 1-3`" +- if test "$ac_mysql_major_version" = "5.1"; then ++ ac_mysql_major_version="`$ac_mysql_config --version | cut -b 1,3`" ++ if test $ac_mysql_major_version -lt 55; then + MYSQL51="-DMYSQL51" + + fi diff --git a/component/mydumper/buildout.cfg b/component/mydumper/buildout.cfg deleted file mode 100644 index 7ec23de0f..000000000 --- a/component/mydumper/buildout.cfg +++ /dev/null @@ -1,79 +0,0 @@ -[buildout] - -extends = - ../cmake/buildout.cfg - ../glib/buildout.cfg - ../pcre/buildout.cfg - ../mariadb/buildout.cfg - -parts = mydumper - -# XXX-Antoine: -# This is really dirty, but it's the only way to install -# mydumper that works -[mydumper] -recipe = slapos.recipe.build -url = http://launchpad.net/mydumper/0.2/0.2.3/+download/mydumper-0.2.3.tar.gz -md5sum = 36e6a1c97a9634a6882ddaac5e2697d5 -buildout-bin-dir = ${buildout:bin-directory} -cmake-command = ${cmake:location}/bin/cmake -mysql-config = ${mariadb:location}/bin/mysql_config -doc-dependency = ${mydumper-doc:eggs} -mysqllib = ${mariadb:location}/lib -pkg-config-path = ${glib:location}/lib/pkgconfig/:${pcre:location}/lib/pkgconfig/ -libraries = ${zlib:location}/lib/:${glib:location}/lib/:${pcre:location}/lib/:${mariadb:location}/lib/mysql/ -includes = ${zlib:location}/include/:${glib:location}/include/:${pcre:location}/include/:${mariadb:location}/include/mysql/ -cflags = -I${zlib:location}/include/ -I${glib:location}/include/ -I${pcre:location}/include/ -I${mariadb:location}/include/mysql/ -mydumper-patches = - ${:_profile_base_location_}/mydumper-remove-warnings-errors.patch 917fea16b5ddea195cfa33fbd9827f57 -p1 -slapos_promise = - directory:bin - file:bin/mydumper - file:bin/myloader -script = - import os - url = self.download(self.options['url'], self.options.get('md5sum')) - extract_dir = self.extract(url) - workdir = guessworkdir(extract_dir) - self.applyPatchList(self.options['mydumper-patches'], cwd=workdir) - env['PATH'] = self.options['buildout-bin-dir'] + ':' + env.get('PATH', '') - env['PKG_CONFIG_PATH'] = self.options['pkg-config-path'] + ':' + \ - env.get('PKG_CONFIG_PATH', '') - env['CMAKE_INCLUDE_PATH'] = self.options['includes'] - env['CMAKE_LIBRARY_PATH'] = self.options['libraries'] - env['CFLAGS'] = self.options['cflags'] - command_line = [self.options['cmake-command'], - '-DCMAKE_INSTALL_PREFIX=%%s' %% self.options['location'], - '-DMYSQL_CONFIG=%%s' %% self.options['mysql-config'], - '-DCMAKE_C_FLAGS=%%s' %% self.options['cflags'], - '-DCMAKE_INSTALL_RPATH=%%s' %% self.options['libraries'], - '.'] - call(command_line, cwd=workdir, env=env) - call(['make'], cwd=workdir, env=env) - call(['make', 'install'], cwd=workdir, env=env) - -[mydumper-doc] -recipe = zc.recipe.egg -eggs = - Sphinx -dependent-scripts = true - -# XXX-Antoine: here's what I did using hexagonit.recipe.cmmi. -# and it wasn't working ! -#[mydumper] -#recipe = hexagonit.recipe.cmmi -#url = http://launchpad.net/mydumper/0.2/0.2.3/+download/mydumper-0.2.3.tar.gz -#md5sum = 36e6a1c97a9634a6882ddaac5e2697d5 -#strip-top-level-dir = true -#location = ${buildout:parts-directory}/${:_buildout_section_name_} -#configure-command = -# ${cmake:location}/bin/cmake \ -# -DCMAKE_INSTALL_PREFIX=${:location} \ -# -DMYSQL_CONFIG=${mariadb:location}/bin/mysql_config \ -# -DCMAKE_INCLUDE_PATH=${zlib:location}/include \ -# -DCMAKE_LIBRARY_PATH=${zlib:location}/lib \ -# . -#environment= -# PATH=$PATH:${buildout:bin-directory} -# PKG_CONFIG_PATH=${glib:location}/lib/pkgconfig/:${pcre:location}/lib/pkgconfig/ - diff --git a/component/mydumper/mydumper-remove-warnings-errors.patch b/component/mydumper/mydumper-remove-warnings-errors.patch deleted file mode 100644 index d3db33ad5..000000000 --- a/component/mydumper/mydumper-remove-warnings-errors.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -12,7 +12,7 @@ - - add_subdirectory(docs) - --set(CMAKE_C_FLAGS "-Wall -Wunused -Wwrite-strings -Wno-strict-aliasing -Wextra -Wshadow -Werror -O3 -g ${MYSQL_CFLAGS}") -+set(CMAKE_C_FLAGS "-Wall -Wunused -Wwrite-strings -Wno-strict-aliasing -Wextra -Wshadow -O3 -g ${MYSQL_CFLAGS}") - - include_directories(${MYDUMPER_SOURCE_DIR} ${MYSQL_INCLUDE_DIR} ${GLIB2_INCLUDE_DIR} ${PCRE_INCLUDE_DIR} ${ZLIB_INCLUDE_DIRS}) - diff --git a/component/mysql-5.1/buildout.cfg b/component/mysql-5.1/buildout.cfg index 1397b9511..5c912b79d 100644 --- a/component/mysql-5.1/buildout.cfg +++ b/component/mysql-5.1/buildout.cfg @@ -21,13 +21,6 @@ md5sum = eefcd08c400c58d3e89542ab482a8429 filename = mysql-5.1-sphinx-2.0.1-beta.diff download-only = true -[mysql-5.1-no_test-patch] -recipe = hexagonit.recipe.download -url = ${:_profile_base_location_}/${:filename} -md5sum = 22b0ef8baec5efc182e10d233c6f14ca -filename = mysql_create_system_tables__no_test.patch -download-only = true - [mysql-5.1] recipe = hexagonit.recipe.cmmi version = 5.1.58 @@ -67,7 +60,6 @@ make-options = patch-options = -p0 patches = ${mysql-5.1-sphinx-patch:location}/${mysql-5.1-sphinx-patch:filename} - ${mysql-5.1-no_test-patch:location}/${mysql-5.1-no_test-patch:filename} environment = PATH =${autoconf:location}/bin:${automake-1.11:location}/bin:${libtool:location}/bin:${bison:location}/bin:${flex:location}/bin:%(PATH)s CPPFLAGS =-I${ncurses:location}/include -I${readline:location}/include @@ -75,8 +67,8 @@ environment = [groonga-storage-engine-mysql-5.1] recipe = hexagonit.recipe.cmmi -url = http://github.com/downloads/mroonga/mroonga/groonga-storage-engine-1.0.0.tar.gz -md5sum = 289b8b7919e790599ea79b6fe9270e04 +url = http://github.com/downloads/mroonga/mroonga/groonga-storage-engine-0.9.tar.gz +md5sum = 78fe07122dc376796a5aede476f50cfd configure-options = --with-mysql-source=${mysql-5.1:location}__compile__/mysql-${mysql-5.1:version} --with-mysql-config=${mysql-5.1:location}/bin/mysql_config diff --git a/component/mysql-5.5/mysql-5.5-sphinx-2.0.1-beta.diff b/component/mysql-5.1/mysql-5.1.49-sphinx-1.10.diff similarity index 67% rename from component/mysql-5.5/mysql-5.5-sphinx-2.0.1-beta.diff rename to component/mysql-5.1/mysql-5.1.49-sphinx-1.10.diff index ee9f88cfa..dc8dda51d 100644 --- a/component/mysql-5.5/mysql-5.5-sphinx-2.0.1-beta.diff +++ b/component/mysql-5.1/mysql-5.1.49-sphinx-1.10.diff @@ -1,7 +1,10 @@ -diff -uNr storage/sphinx/CMakeLists.txt storage/sphinx/CMakeLists.txt ---- storage/sphinx/CMakeLists.txt 1970-01-01 01:00:00.000000000 +0100 -+++ storage/sphinx/CMakeLists.txt 2011-10-13 00:59:59.282957578 +0200 -@@ -0,0 +1,16 @@ +# This patch is based on: +# http://www.sphinxsearch.com/downloads/sphinx-1.10-beta.tar.gz + +diff -uNr mysql-5.1.49.orig/storage/sphinx/CMakeLists.txt mysql-5.1.49/storage/sphinx/CMakeLists.txt +--- mysql-5.1.49.orig/storage/sphinx/CMakeLists.txt 1970-01-01 09:00:00.000000000 +0900 ++++ mysql-5.1.49/storage/sphinx/CMakeLists.txt 2008-02-15 01:37:44.000000000 +0900 +@@ -0,0 +1,11 @@ +SET(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -DSAFEMALLOC -DSAFE_MUTEX") +SET(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -DSAFEMALLOC -DSAFE_MUTEX") +ADD_DEFINITIONS(-DMYSQL_SERVER) @@ -12,15 +15,10 @@ diff -uNr storage/sphinx/CMakeLists.txt storage/sphinx/CMakeLists.txt + ${CMAKE_SOURCE_DIR}/regex) + +SET(SPHINX_SOURCES ha_sphinx.cc) -+IF(MYSQL_VERSION_ID LESS 50515) +ADD_LIBRARY(sphinx ha_sphinx.cc) -+ELSE() -+SET(SPHINX_PLUGIN_DYNAMIC "ha_sphinx") -+MYSQL_ADD_PLUGIN(sphinx ${SPHINX_SOURCES} STORAGE_ENGINE MODULE_ONLY LINK_LIBRARIES mysys) -+ENDIF() -diff -uNr storage/sphinx/gen_data.php storage/sphinx/gen_data.php ---- storage/sphinx/gen_data.php 1970-01-01 01:00:00.000000000 +0100 -+++ storage/sphinx/gen_data.php 2006-06-07 09:28:43.000000000 +0200 +diff -uNr mysql-5.1.49.orig/storage/sphinx/gen_data.php mysql-5.1.49/storage/sphinx/gen_data.php +--- mysql-5.1.49.orig/storage/sphinx/gen_data.php 1970-01-01 09:00:00.000000000 +0900 ++++ mysql-5.1.49/storage/sphinx/gen_data.php 2006-06-07 16:28:43.000000000 +0900 @@ -0,0 +1,37 @@ +<?php + @@ -59,17 +57,17 @@ diff -uNr storage/sphinx/gen_data.php storage/sphinx/gen_data.php + + +?> -diff -uNr storage/sphinx/ha_sphinx.cc storage/sphinx/ha_sphinx.cc ---- storage/sphinx/ha_sphinx.cc 1970-01-01 01:00:00.000000000 +0100 -+++ storage/sphinx/ha_sphinx.cc 2011-10-13 00:59:59.282957578 +0200 -@@ -0,0 +1,3547 @@ +diff -uNr mysql-5.1.49.orig/storage/sphinx/ha_sphinx.cc mysql-5.1.49/storage/sphinx/ha_sphinx.cc +--- mysql-5.1.49.orig/storage/sphinx/ha_sphinx.cc 1970-01-01 09:00:00.000000000 +0900 ++++ mysql-5.1.49/storage/sphinx/ha_sphinx.cc 2010-07-08 20:05:08.000000000 +0900 +@@ -0,0 +1,3363 @@ +// -+// $Id: ha_sphinx.cc 2752 2011-03-29 08:21:05Z tomat $ ++// $Id: ha_sphinx.cc 2391 2010-07-08 11:05:08Z tomat $ +// + +// -+// Copyright (c) 2001-2011, Andrew Aksyonoff -+// Copyright (c) 2008-2011, Sphinx Technologies Inc ++// Copyright (c) 2001-2010, Andrew Aksyonoff ++// Copyright (c) 2008-2010, Sphinx Technologies Inc +// All rights reserved +// +// This program is free software; you can redistribute it and/or modify @@ -89,10 +87,7 @@ diff -uNr storage/sphinx/ha_sphinx.cc storage/sphinx/ha_sphinx.cc + +#include <mysql_version.h> + -+#if MYSQL_VERSION_ID>=50515 -+#include "sql_class.h" -+#include "sql_array.h" -+#elif MYSQL_VERSION_ID>50100 ++#if MYSQL_VERSION_ID>50100 +#include "mysql_priv.h" +#include <mysql/plugin.h> +#else @@ -187,22 +182,6 @@ diff -uNr storage/sphinx/ha_sphinx.cc storage/sphinx/ha_sphinx.cc + +#endif + -+#if MYSQL_VERSION_ID>=50515 -+ -+#define sphinx_hash_init my_hash_init -+#define sphinx_hash_free my_hash_free -+#define sphinx_hash_search my_hash_search -+#define sphinx_hash_delete my_hash_delete -+ -+#else -+ -+#define sphinx_hash_init hash_init -+#define sphinx_hash_free hash_free -+#define sphinx_hash_search hash_search -+#define sphinx_hash_delete hash_delete -+ -+#endif -+ +///////////////////////////////////////////////////////////////////////////// + +// FIXME! make this all dynamic @@ -219,7 +198,7 @@ diff -uNr storage/sphinx/ha_sphinx.cc storage/sphinx/ha_sphinx.cc +#define SPHINXSE_MAX_ALLOC (16*1024*1024) +#define SPHINXSE_MAX_KEYWORDSTATS 4096 + -+#define SPHINXSE_VERSION "0.9.9 ($Revision: 2752 $)" ++#define SPHINXSE_VERSION "0.9.9 ($Revision: 2391 $)" + +// FIXME? the following is cut-n-paste from sphinx.h and searchd.cpp +// cut-n-paste is somewhat simpler that adding dependencies however.. @@ -268,7 +247,6 @@ diff -uNr storage/sphinx/ha_sphinx.cc storage/sphinx/ha_sphinx.cc + SPH_RANK_PROXIMITY = 4, ///< phrase proximity + SPH_RANK_MATCHANY = 5, ///< emulate old match-any weighting + SPH_RANK_FIELDMASK = 6, ///< sets bits where there were matches -+ SPH_RANK_SPH04 = 7, ///< codename SPH04, phrase proximity + bm25 + head/exact boost + + SPH_RANK_TOTAL, + SPH_RANK_DEFAULT = SPH_RANK_PROXIMITY_BM25 @@ -496,20 +474,10 @@ diff -uNr storage/sphinx/ha_sphinx.cc storage/sphinx/ha_sphinx.cc + + CHARSET_INFO * m_pQueryCharset; + -+ bool m_bReplace; ///< are we doing an INSERT or REPLACE -+ -+ bool m_bCondId; ///< got a value from condition pushdown -+ longlong m_iCondId; ///< value acquired from id=value condition pushdown -+ bool m_bCondDone; ///< index_read() is now over -+ + CSphSEThreadData () + : m_bStats ( false ) + , m_bQuery ( false ) + , m_pQueryCharset ( NULL ) -+ , m_bReplace ( false ) -+ , m_bCondId ( false ) -+ , m_iCondId ( 0 ) -+ , m_bCondDone ( false ) + {} +}; + @@ -757,8 +725,8 @@ diff -uNr storage/sphinx/ha_sphinx.cc storage/sphinx/ha_sphinx.cc + if ( !sphinx_init ) + { + sphinx_init = 1; -+ void ( pthread_mutex_init ( &sphinx_mutex, MY_MUTEX_INIT_FAST ) ); -+ sphinx_hash_init ( &sphinx_open_tables, system_charset_info, 32, 0, 0, ++ VOID ( pthread_mutex_init ( &sphinx_mutex, MY_MUTEX_INIT_FAST ) ); ++ hash_init ( &sphinx_open_tables, system_charset_info, 32, 0, 0, + sphinx_get_key, 0, 0 ); + + #if MYSQL_VERSION_ID > 50100 @@ -808,7 +776,7 @@ diff -uNr storage/sphinx/ha_sphinx.cc storage/sphinx/ha_sphinx.cc + sphinx_init = 0; + if ( sphinx_open_tables.records ) + error = 1; -+ sphinx_hash_free ( &sphinx_open_tables ); ++ hash_free ( &sphinx_open_tables ); + pthread_mutex_destroy ( &sphinx_mutex ); + } + @@ -1213,12 +1181,12 @@ diff -uNr storage/sphinx/ha_sphinx.cc storage/sphinx/ha_sphinx.cc + { + // check if we already have this share +#if MYSQL_VERSION_ID>=50120 -+ pShare = (CSphSEShare*) sphinx_hash_search ( &sphinx_open_tables, (const uchar *) table_name, strlen(table_name) ); ++ pShare = (CSphSEShare*) hash_search ( &sphinx_open_tables, (const uchar *) table_name, strlen(table_name) ); +#else +#ifdef __WIN__ -+ pShare = (CSphSEShare*) sphinx_hash_search ( &sphinx_open_tables, (const byte *) table_name, strlen(table_name) ); ++ pShare = (CSphSEShare*) hash_search ( &sphinx_open_tables, (const byte *) table_name, strlen(table_name) ); +#else -+ pShare = (CSphSEShare*) sphinx_hash_search ( &sphinx_open_tables, table_name, strlen(table_name) ); ++ pShare = (CSphSEShare*) hash_search ( &sphinx_open_tables, table_name, strlen(table_name) ); +#endif // win +#endif // pre-5.1.20 + @@ -1270,7 +1238,7 @@ diff -uNr storage/sphinx/ha_sphinx.cc storage/sphinx/ha_sphinx.cc + + if ( !--pShare->m_iUseCount ) + { -+ sphinx_hash_delete ( &sphinx_open_tables, (byte *)pShare ); ++ hash_delete ( &sphinx_open_tables, (byte *)pShare ); + SafeDelete ( pShare ); + } + @@ -1452,13 +1420,11 @@ diff -uNr storage/sphinx/ha_sphinx.cc storage/sphinx/ha_sphinx.cc + m_sQuery = sField; + m_bQuery = true; + -+ // unescape only 1st one ++ // unescape + char *s = sField, *d = sField; -+ int iSlashes = 0; + while ( *s ) + { -+ iSlashes = ( *s=='\\' ) ? iSlashes+1 : 0; -+ if ( ( iSlashes%2 )==0 ) *d++ = *s; ++ if ( *s!='\\' ) *d++ = *s; + s++; + } + *d = '\0'; @@ -1519,7 +1485,6 @@ diff -uNr storage/sphinx/ha_sphinx.cc storage/sphinx/ha_sphinx.cc + else if ( !strcmp ( sValue, "proximity" ) ) m_eRanker = SPH_RANK_PROXIMITY; + else if ( !strcmp ( sValue, "matchany" ) ) m_eRanker = SPH_RANK_MATCHANY; + else if ( !strcmp ( sValue, "fieldmask" ) ) m_eRanker = SPH_RANK_FIELDMASK; -+ else if ( !strcmp ( sValue, "sph04" ) ) m_eRanker = SPH_RANK_SPH04; + else + { + snprintf ( m_sParseError, sizeof(m_sParseError), "unknown ranking mode '%s'", sValue ); @@ -1863,8 +1828,6 @@ diff -uNr storage/sphinx/ha_sphinx.cc storage/sphinx/ha_sphinx.cc + pCur = pNext; + } + -+ SPH_DEBUG ( "q [[ %s ]]", m_sQuery ); -+ + SPH_RET(true); +} + @@ -2154,29 +2117,15 @@ diff -uNr storage/sphinx/ha_sphinx.cc storage/sphinx/ha_sphinx.cc + } else + { + int tmp_errno; -+ bool bError = false; -+ -+#if MYSQL_VERSION_ID>=50515 -+ struct addrinfo tmp_hostent, *hp; -+ tmp_errno = getaddrinfo ( sHost, NULL, &tmp_hostent, &hp ); -+ if ( !tmp_errno ) -+ { -+ freeaddrinfo ( hp ); -+ bError = true; -+ } -+#else + struct hostent tmp_hostent, *hp; + char buff2 [ GETHOSTBYNAME_BUFF_SIZE ]; -+ hp = my_gethostbyname_r ( sHost, &tmp_hostent, buff2, sizeof(buff2), &tmp_errno ); ++ ++ hp = my_gethostbyname_r ( sHost, &tmp_hostent, ++ buff2, sizeof(buff2), &tmp_errno ); + if ( !hp ) + { + my_gethostbyname_r_free(); -+ bError = true; -+ } -+#endif + -+ if ( bError ) -+ { + char sError[256]; + my_snprintf ( sError, sizeof(sError), "failed to resolve searchd host (name=%s)", sHost ); + @@ -2184,13 +2133,9 @@ diff -uNr storage/sphinx/ha_sphinx.cc storage/sphinx/ha_sphinx.cc + SPH_RET(-1); + } + -+#if MYSQL_VERSION_ID>=50515 -+ memcpy ( &sin.sin_addr, hp->ai_addr, Min ( sizeof(sin.sin_addr), (size_t)hp->ai_addrlen ) ); -+ freeaddrinfo ( hp ); -+#else -+ memcpy ( &sin.sin_addr, hp->h_addr, Min ( sizeof(sin.sin_addr), (size_t)hp->h_length ) ); ++ memcpy ( &sin.sin_addr, hp->h_addr, ++ Min ( sizeof(sin.sin_addr), (size_t)hp->h_length ) ); + my_gethostbyname_r_free(); -+#endif + } + } else + { @@ -2298,20 +2243,6 @@ diff -uNr storage/sphinx/ha_sphinx.cc storage/sphinx/ha_sphinx.cc +} + + -+int ha_sphinx::extra ( enum ha_extra_function op ) -+{ -+ CSphSEThreadData * pTls = GetTls(); -+ if ( pTls ) -+ { -+ if ( op==HA_EXTRA_WRITE_CAN_REPLACE ) -+ pTls->m_bReplace = true; -+ else if ( op==HA_EXTRA_WRITE_CANNOT_REPLACE ) -+ pTls->m_bReplace = false; -+ } -+ return 0; -+} -+ -+ +int ha_sphinx::write_row ( byte * ) +{ + SPH_ENTER_METHOD(); @@ -2327,8 +2258,7 @@ diff -uNr storage/sphinx/ha_sphinx.cc storage/sphinx/ha_sphinx.cc + sQuery.length ( 0 ); + sValue.length ( 0 ); + -+ CSphSEThreadData * pTls = GetTls (); -+ sQuery.append ( pTls && pTls->m_bReplace ? "REPLACE INTO " : "INSERT INTO " ); ++ sQuery.append ( "INSERT INTO " ); + sQuery.append ( m_pShare->m_sIndex ); + sQuery.append ( " (" ); + @@ -2394,66 +2324,14 @@ diff -uNr storage/sphinx/ha_sphinx.cc storage/sphinx/ha_sphinx.cc +} + + -+static inline bool IsIntegerFieldType ( enum_field_types eType ) -+{ -+ return eType==MYSQL_TYPE_LONG || eType==MYSQL_TYPE_LONGLONG; -+} -+ -+ -+static inline bool IsIDField ( Field * pField ) -+{ -+ enum_field_types eType = pField->type(); -+ -+ if ( eType==MYSQL_TYPE_LONGLONG ) -+ return true; -+ -+ if ( eType==MYSQL_TYPE_LONG && ((Field_num*)pField)->unsigned_flag ) -+ return true; -+ -+ return false; -+} -+ -+ -+int ha_sphinx::delete_row ( const byte * ) ++int ha_sphinx::update_row ( const byte *, byte * ) +{ + SPH_ENTER_METHOD(); -+ if ( !m_pShare || !m_pShare->m_bSphinxQL ) -+ SPH_RET ( HA_ERR_WRONG_COMMAND ); -+ -+ char sQueryBuf[1024]; -+ String sQuery ( sQueryBuf, sizeof(sQueryBuf), &my_charset_bin ); -+ sQuery.length ( 0 ); -+ -+ sQuery.append ( "DELETE FROM " ); -+ sQuery.append ( m_pShare->m_sIndex ); -+ sQuery.append ( " WHERE id=" ); -+ -+ char sValue[32]; -+ snprintf ( sValue, sizeof(sValue), "%lld", table->field[0]->val_int() ); -+ sQuery.append ( sValue ); -+ -+ // FIXME? pretty inefficient to reconnect every time under high load, -+ // but this was intentionally written for a low load scenario.. -+ MYSQL * pConn = mysql_init ( NULL ); -+ if ( !pConn ) -+ SPH_RET ( ER_OUT_OF_RESOURCES ); -+ -+ unsigned int uTimeout = 1; -+ mysql_options ( pConn, MYSQL_OPT_CONNECT_TIMEOUT, (const char*)&uTimeout ); -+ -+ if ( !mysql_real_connect ( pConn, m_pShare->m_sHost, "root", "", "", m_pShare->m_iPort, m_pShare->m_sSocket, 0 ) ) -+ SPH_RET ( HandleMysqlError ( pConn, ER_CONNECT_TO_FOREIGN_DATA_SOURCE ) ); -+ -+ if ( mysql_real_query ( pConn, sQuery.ptr(), sQuery.length() ) ) -+ SPH_RET ( HandleMysqlError ( pConn, ER_QUERY_ON_FOREIGN_DATA_SOURCE ) ); -+ -+ // all ok! -+ mysql_close ( pConn ); -+ SPH_RET(0); ++ SPH_RET ( HA_ERR_WRONG_COMMAND ); +} + + -+int ha_sphinx::update_row ( const byte *, byte * ) ++int ha_sphinx::delete_row ( const byte * ) +{ + SPH_ENTER_METHOD(); + SPH_RET ( HA_ERR_WRONG_COMMAND ); @@ -2466,11 +2344,6 @@ diff -uNr storage/sphinx/ha_sphinx.cc storage/sphinx/ha_sphinx.cc +{ + SPH_ENTER_METHOD(); + active_index = keynr; -+ -+ CSphSEThreadData * pTls = GetTls(); -+ if ( pTls ) -+ pTls->m_bCondDone = false; -+ + SPH_RET(0); +} + @@ -2484,7 +2357,7 @@ diff -uNr storage/sphinx/ha_sphinx.cc storage/sphinx/ha_sphinx.cc + +uint32 ha_sphinx::UnpackDword () +{ -+ if ( m_pCur+sizeof(uint32)>m_pResponseEnd ) // NOLINT ++ if ( m_pCur+sizeof(uint32)>m_pResponseEnd ) + { + m_pCur = m_pResponseEnd; + m_bUnpackError = true; @@ -2492,7 +2365,7 @@ diff -uNr storage/sphinx/ha_sphinx.cc storage/sphinx/ha_sphinx.cc + } + + uint32 uRes = ntohl ( sphUnalignedRead ( *(uint32*)m_pCur ) ); -+ m_pCur += sizeof(uint32); // NOLINT ++ m_pCur += sizeof(uint32); + return uRes; +} + @@ -2654,10 +2527,10 @@ diff -uNr storage/sphinx/ha_sphinx.cc storage/sphinx/ha_sphinx.cc + assert ( pStats ); + + char * pCurSave = m_pCur; -+ for ( uint i=0; i<m_iMatchesTotal && m_pCur<m_pResponseEnd-sizeof(uint32); i++ ) // NOLINT ++ for ( uint i=0; i<m_iMatchesTotal && m_pCur<m_pResponseEnd-sizeof(uint32); i++ ) + { + m_pCur += m_bId64 ? 12 : 8; // skip id+weight -+ for ( uint32 i=0; i<m_iAttrs && m_pCur<m_pResponseEnd-sizeof(uint32); i++ ) // NOLINT ++ for ( uint32 i=0; i<m_iAttrs && m_pCur<m_pResponseEnd-sizeof(uint32); i++ ) + { + if ( m_dAttrs[i].m_uType & SPH_ATTR_MULTI ) + { @@ -2713,45 +2586,25 @@ diff -uNr storage/sphinx/ha_sphinx.cc storage/sphinx/ha_sphinx.cc + if ( condf->functype()!=Item_func::EQ_FUNC || condf->argument_count()!=2 ) + break; + ++ Item ** args = condf->arguments(); ++ if ( args[0]->type()!=COND::FIELD_ITEM || args[1]->type()!=COND::STRING_ITEM ) ++ break; ++ ++ Item_field * pField = (Item_field *) args[0]; ++ if ( pField->field->field_index!=2 ) // FIXME! magic key index ++ break; ++ + // get my tls + CSphSEThreadData * pTls = GetTls (); + if ( !pTls ) + break; + -+ Item ** args = condf->arguments(); -+ if ( !m_pShare->m_bSphinxQL ) -+ { -+ // on non-QL tables, intercept query=value condition for SELECT -+ if (!( args[0]->type()==COND::FIELD_ITEM && args[1]->type()==COND::STRING_ITEM )) -+ break; -+ -+ Item_field * pField = (Item_field *) args[0]; -+ if ( pField->field->field_index!=2 ) // FIXME! magic key index -+ break; -+ -+ // copy the query, and let know that we intercepted this condition -+ Item_string * pString = (Item_string *) args[1]; -+ pTls->m_bQuery = true; -+ strncpy ( pTls->m_sQuery, pString->str_value.c_ptr(), sizeof(pTls->m_sQuery) ); -+ pTls->m_sQuery[sizeof(pTls->m_sQuery)-1] = '\0'; -+ pTls->m_pQueryCharset = pString->str_value.charset(); -+ -+ } else -+ { -+ if (!( args[0]->type()==COND::FIELD_ITEM && args[1]->type()==COND::INT_ITEM )) -+ break; -+ -+ // on QL tables, intercept id=value condition for DELETE -+ Item_field * pField = (Item_field *) args[0]; -+ if ( pField->field->field_index!=0 ) // FIXME! magic key index -+ break; -+ -+ Item_int * pVal = (Item_int *) args[1]; -+ pTls->m_iCondId = pVal->val_int(); -+ pTls->m_bCondId = true; -+ } -+ -+ // we intercepted this condition ++ // copy the query, and let know that we intercepted this condition ++ Item_string * pString = (Item_string *) args[1]; ++ pTls->m_bQuery = true; ++ strncpy ( pTls->m_sQuery, pString->str_value.c_ptr(), sizeof(pTls->m_sQuery) ); ++ pTls->m_sQuery[sizeof(pTls->m_sQuery)-1] = '\0'; ++ pTls->m_pQueryCharset = pString->str_value.charset(); + return NULL; + } + @@ -2764,8 +2617,9 @@ diff -uNr storage/sphinx/ha_sphinx.cc storage/sphinx/ha_sphinx.cc +void ha_sphinx::cond_pop () +{ + CSphSEThreadData * pTls = GetTls (); -+ if ( pTls ) ++ if ( pTls && pTls->m_bQuery ) + pTls->m_bQuery = false; ++ return; +} + + @@ -2806,38 +2660,6 @@ diff -uNr storage/sphinx/ha_sphinx.cc storage/sphinx/ha_sphinx.cc + } + pTls->m_tStats.Reset (); + -+ // sphinxql table, just return the key once -+ if ( m_pShare->m_bSphinxQL ) -+ { -+ // over and out -+ if ( pTls->m_bCondDone ) -+ SPH_RET ( HA_ERR_END_OF_FILE ); -+ -+ // return a value from pushdown, if any -+ if ( pTls->m_bCondId ) -+ { -+ table->field[0]->store ( pTls->m_iCondId, 1 ); -+ pTls->m_bCondDone = true; -+ SPH_RET(0); -+ } -+ -+ // return a value from key -+ longlong iRef = 0; -+ if ( key_len==4 ) -+ iRef = uint4korr ( key ); -+ else if ( key_len==8 ) -+ iRef = uint8korr ( key ); -+ else -+ { -+ my_error ( ER_QUERY_ON_FOREIGN_DATA_SOURCE, MYF(0), "INTERNAL ERROR: unexpected key length" ); -+ SPH_RET ( HA_ERR_END_OF_FILE ); -+ } -+ -+ table->field[0]->store ( iRef, 1 ); -+ pTls->m_bCondDone = true; -+ SPH_RET(0); -+ } -+ + // parse query + if ( pTls->m_bQuery ) + { @@ -3018,7 +2840,7 @@ diff -uNr storage/sphinx/ha_sphinx.cc storage/sphinx/ha_sphinx.cc + + for ( uint32 i=0; i<m_iAttrs; i++ ) + { -+ longlong iValue64 = 0; ++ longlong iValue64; + uint32 uValue = UnpackDword (); + if ( m_dAttrs[i].m_uType==SPH_ATTR_BIGINT ) + iValue64 = ( (longlong)uValue<<32 ) | UnpackDword(); @@ -3295,6 +3117,12 @@ diff -uNr storage/sphinx/ha_sphinx.cc storage/sphinx/ha_sphinx.cc +} + + ++static inline bool IsIntegerFieldType ( enum_field_types eType ) ++{ ++ return eType==MYSQL_TYPE_LONG || eType==MYSQL_TYPE_LONGLONG; ++} ++ ++ +// create() is called to create a database. The variable name will have the name +// of the table. When create() is called you do not need to worry about opening +// the table. Also, the FRM file will have already been created so adjusting @@ -3323,7 +3151,7 @@ diff -uNr storage/sphinx/ha_sphinx.cc storage/sphinx/ha_sphinx.cc + break; + } + -+ if ( !IsIDField ( table->field[0] ) ) ++ if ( !IsIntegerFieldType ( table->field[0]->type() ) || !((Field_num *)table->field[0])->unsigned_flag ) + { + my_snprintf ( sError, sizeof(sError), "%s: 1st column (docid) MUST be unsigned integer or bigint", name ); + break; @@ -3379,32 +3207,10 @@ diff -uNr storage/sphinx/ha_sphinx.cc storage/sphinx/ha_sphinx.cc + for ( ; tInfo.m_bSphinxQL; ) + { + sError[0] = '\0'; ++ bool bId = false; + -+ // check that 1st column is id, is of int type, and has an index -+ if ( strcmp ( table->field[0]->field_name, "id" ) ) -+ { -+ my_snprintf ( sError, sizeof(sError), "%s: 1st column must be called 'id'", name ); -+ break; -+ } -+ -+ if ( !IsIDField ( table->field[0] ) ) -+ { -+ my_snprintf ( sError, sizeof(sError), "%s: 'id' column must be INT UNSIGNED or BIGINT", name ); -+ break; -+ } -+ -+ // check index -+ if ( -+ table->s->keys!=1 || -+ table->key_info[0].key_parts!=1 || -+ strcasecmp ( table->key_info[0].key_part[0].field->field_name, "id" ) ) -+ { -+ my_snprintf ( sError, sizeof(sError), "%s: 'id' column must be indexed", name ); -+ break; -+ } -+ -+ // check column types -+ for ( int i=1; i<(int)table->s->fields; i++ ) ++ // check column types, and also for presence of an id column ++ for ( int i=0; i<(int)table->s->fields; i++ ) + { + enum_field_types eType = table->field[i]->type(); + if ( eType!=MYSQL_TYPE_TIMESTAMP && !IsIntegerFieldType(eType) && eType!=MYSQL_TYPE_VARCHAR && eType!=MYSQL_TYPE_FLOAT ) @@ -3413,10 +3219,18 @@ diff -uNr storage/sphinx/ha_sphinx.cc storage/sphinx/ha_sphinx.cc + name, i+1, table->field[i]->field_name ); + break; + } ++ if ( strcmp ( table->field[i]->field_name, "id" )==0 ) ++ bId = true; + } + if ( sError[0] ) + break; + ++ if ( !bId ) ++ { ++ my_snprintf ( sError, sizeof(sError), "%s: id column not found", name ); ++ break; ++ } ++ + // all good + break; + } @@ -3608,14 +3422,14 @@ diff -uNr storage/sphinx/ha_sphinx.cc storage/sphinx/ha_sphinx.cc +#endif // >50100 + +// -+// $Id: ha_sphinx.cc 2752 2011-03-29 08:21:05Z tomat $ ++// $Id: ha_sphinx.cc 2391 2010-07-08 11:05:08Z tomat $ +// -diff -uNr storage/sphinx/ha_sphinx.h storage/sphinx/ha_sphinx.h ---- storage/sphinx/ha_sphinx.h 1970-01-01 01:00:00.000000000 +0100 -+++ storage/sphinx/ha_sphinx.h 2011-10-13 00:59:59.282957578 +0200 -@@ -0,0 +1,169 @@ +diff -uNr mysql-5.1.49.orig/storage/sphinx/ha_sphinx.h mysql-5.1.49/storage/sphinx/ha_sphinx.h +--- mysql-5.1.49.orig/storage/sphinx/ha_sphinx.h 1970-01-01 09:00:00.000000000 +0900 ++++ mysql-5.1.49/storage/sphinx/ha_sphinx.h 2010-06-30 07:48:24.000000000 +0900 +@@ -0,0 +1,166 @@ +// -+// $Id: ha_sphinx.h 2428 2010-08-03 11:38:09Z shodan $ ++// $Id: ha_sphinx.h 2379 2010-06-29 22:48:24Z shodan $ +// + +#ifdef USE_PRAGMA_INTERFACE @@ -3623,9 +3437,7 @@ diff -uNr storage/sphinx/ha_sphinx.h storage/sphinx/ha_sphinx.h +#endif + + -+#if MYSQL_VERSION_ID>=50515 -+#define TABLE_ARG TABLE_SHARE -+#elif MYSQL_VERSION_ID>50100 ++#if MYSQL_VERSION_ID>50100 +#define TABLE_ARG st_table_share +#else +#define TABLE_ARG st_table @@ -3665,7 +3477,7 @@ diff -uNr storage/sphinx/ha_sphinx.h storage/sphinx/ha_sphinx.h + +public: +#if MYSQL_VERSION_ID<50100 -+ ha_sphinx ( TABLE_ARG * table_arg ); // NOLINT ++ ha_sphinx ( TABLE_ARG * table_arg ); +#else + ha_sphinx ( handlerton * hton, TABLE_ARG * table_arg ); +#endif @@ -3703,12 +3515,11 @@ diff -uNr storage/sphinx/ha_sphinx.h storage/sphinx/ha_sphinx.h + int write_row ( byte * buf ); + int update_row ( const byte * old_data, byte * new_data ); + int delete_row ( const byte * buf ); -+ int extra ( enum ha_extra_function op ); + + int index_init ( uint keynr, bool sorted ); // 5.1.x + int index_init ( uint keynr ) { return index_init ( keynr, false ); } // 5.0.x + -+ int index_end (); ++ int index_end (); + int index_read ( byte * buf, const byte * key, uint key_len, enum ha_rkey_function find_flag ); + int index_read_idx ( byte * buf, uint idx, const byte * key, uint key_len, enum ha_rkey_function find_flag ); + int index_next ( byte * buf ); @@ -3781,11 +3592,11 @@ diff -uNr storage/sphinx/ha_sphinx.h storage/sphinx/ha_sphinx.h +int sphinx_showfunc_words ( THD *, SHOW_VAR *, char * ); + +// -+// $Id: ha_sphinx.h 2428 2010-08-03 11:38:09Z shodan $ ++// $Id: ha_sphinx.h 2379 2010-06-29 22:48:24Z shodan $ +// -diff -uNr storage/sphinx/INSTALL storage/sphinx/INSTALL ---- storage/sphinx/INSTALL 1970-01-01 01:00:00.000000000 +0100 -+++ storage/sphinx/INSTALL 2010-07-07 18:12:02.000000000 +0200 +diff -uNr mysql-5.1.49.orig/storage/sphinx/INSTALL mysql-5.1.49/storage/sphinx/INSTALL +--- mysql-5.1.49.orig/storage/sphinx/INSTALL 1970-01-01 09:00:00.000000000 +0900 ++++ mysql-5.1.49/storage/sphinx/INSTALL 2010-07-08 01:12:02.000000000 +0900 @@ -0,0 +1,48 @@ +Building MySQL with SphinxSE +============================= @@ -3835,9 +3646,9 @@ diff -uNr storage/sphinx/INSTALL storage/sphinx/INSTALL +win/build-vs8 + +--eof-- -diff -uNr storage/sphinx/Makefile.am storage/sphinx/Makefile.am ---- storage/sphinx/Makefile.am 1970-01-01 01:00:00.000000000 +0100 -+++ storage/sphinx/Makefile.am 2009-02-13 22:26:46.000000000 +0100 +diff -uNr mysql-5.1.49.orig/storage/sphinx/Makefile.am mysql-5.1.49/storage/sphinx/Makefile.am +--- mysql-5.1.49.orig/storage/sphinx/Makefile.am 1970-01-01 09:00:00.000000000 +0900 ++++ mysql-5.1.49/storage/sphinx/Makefile.am 2009-02-14 06:26:46.000000000 +0900 @@ -0,0 +1,59 @@ +# Copyright (C) 2000 MySQL AB & MySQL Finland AB & TCX DataKonsult AB +# @@ -3898,9 +3709,9 @@ diff -uNr storage/sphinx/Makefile.am storage/sphinx/Makefile.am +EXTRA_DIST = cmakelists.txt +# Don't update the files from bitkeeper +%::SCCS/s.% -diff -uNr storage/sphinx/make-patch.sh storage/sphinx/make-patch.sh ---- storage/sphinx/make-patch.sh 1970-01-01 01:00:00.000000000 +0100 -+++ storage/sphinx/make-patch.sh 2008-09-05 20:06:30.000000000 +0200 +diff -uNr mysql-5.1.49.orig/storage/sphinx/make-patch.sh mysql-5.1.49/storage/sphinx/make-patch.sh +--- mysql-5.1.49.orig/storage/sphinx/make-patch.sh 1970-01-01 09:00:00.000000000 +0900 ++++ mysql-5.1.49/storage/sphinx/make-patch.sh 2008-09-06 03:06:30.000000000 +0900 @@ -0,0 +1,36 @@ +#!/bin/sh + @@ -3938,26 +3749,26 @@ diff -uNr storage/sphinx/make-patch.sh storage/sphinx/make-patch.sh +for name in $FILES; do + diff -BNru "$ORIG$name" "$NEW$name" >> $OUT +done -diff -uNr storage/sphinx/plug.in storage/sphinx/plug.in ---- storage/sphinx/plug.in 1970-01-01 01:00:00.000000000 +0100 -+++ storage/sphinx/plug.in 2006-06-07 09:28:43.000000000 +0200 +diff -uNr mysql-5.1.49.orig/storage/sphinx/plug.in mysql-5.1.49/storage/sphinx/plug.in +--- mysql-5.1.49.orig/storage/sphinx/plug.in 1970-01-01 09:00:00.000000000 +0900 ++++ mysql-5.1.49/storage/sphinx/plug.in 2006-06-07 16:28:43.000000000 +0900 @@ -0,0 +1,5 @@ +MYSQL_STORAGE_ENGINE(sphinx,, [Sphinx Storage Engine], + [Sphinx Storage Engines], [max,max-no-ndb]) +MYSQL_PLUGIN_DIRECTORY(sphinx, [storage/sphinx]) +MYSQL_PLUGIN_STATIC(sphinx, [libsphinx.a]) +MYSQL_PLUGIN_DYNAMIC(sphinx, [ha_sphinx.la]) -diff -uNr storage/sphinx/snippets_udf.cc storage/sphinx/snippets_udf.cc ---- storage/sphinx/snippets_udf.cc 1970-01-01 01:00:00.000000000 +0100 -+++ storage/sphinx/snippets_udf.cc 2011-01-01 03:33:06.000000000 +0100 +diff -uNr mysql-5.1.49.orig/storage/sphinx/snippets_udf.cc mysql-5.1.49/storage/sphinx/snippets_udf.cc +--- mysql-5.1.49.orig/storage/sphinx/snippets_udf.cc 1970-01-01 09:00:00.000000000 +0900 ++++ mysql-5.1.49/storage/sphinx/snippets_udf.cc 2010-01-05 04:17:57.000000000 +0900 @@ -0,0 +1,768 @@ +// -+// $Id: snippets_udf.cc 2616 2011-01-01 02:33:06Z shodan $ ++// $Id: snippets_udf.cc 2153 2010-01-04 19:17:57Z shodan $ +// + +// -+// Copyright (c) 2001-2011, Andrew Aksyonoff -+// Copyright (c) 2008-2011, Sphinx Technologies Inc ++// Copyright (c) 2001-2010, Andrew Aksyonoff ++// Copyright (c) 2008-2010, Sphinx Technologies Inc +// All rights reserved +// +// This program is free software; you can redistribute it and/or modify @@ -4717,5 +4528,1327 @@ diff -uNr storage/sphinx/snippets_udf.cc storage/sphinx/snippets_udf.cc +} + +// -+// $Id: snippets_udf.cc 2616 2011-01-01 02:33:06Z shodan $ ++// $Id: snippets_udf.cc 2153 2010-01-04 19:17:57Z shodan $ +// +diff -uNr mysql-5.1.49.orig/storage/sphinx/sphinx.5.0.22.diff mysql-5.1.49/storage/sphinx/sphinx.5.0.22.diff +--- mysql-5.1.49.orig/storage/sphinx/sphinx.5.0.22.diff 1970-01-01 09:00:00.000000000 +0900 ++++ mysql-5.1.49/storage/sphinx/sphinx.5.0.22.diff 2006-06-07 16:28:43.000000000 +0900 +@@ -0,0 +1,284 @@ ++diff -B -N -r -u mysql-5.0.22/config/ac-macros/ha_sphinx.m4 mysql-5.0.22.sx/config/ac-macros/ha_sphinx.m4 ++--- mysql-5.0.22/config/ac-macros/ha_sphinx.m4 1970-01-01 01:00:00.000000000 +0100 +++++ mysql-5.0.22.sx/config/ac-macros/ha_sphinx.m4 2006-06-06 19:49:38.000000000 +0200 ++@@ -0,0 +1,30 @@ +++dnl --------------------------------------------------------------------------- +++dnl Macro: MYSQL_CHECK_EXAMPLEDB +++dnl Sets HAVE_SPHINX_DB if --with-sphinx-storage-engine is used +++dnl --------------------------------------------------------------------------- +++AC_DEFUN([MYSQL_CHECK_SPHINXDB], [ +++ AC_ARG_WITH([sphinx-storage-engine], +++ [ +++ --with-sphinx-storage-engine +++ Enable the Sphinx Storage Engine], +++ [sphinxdb="$withval"], +++ [sphinxdb=no]) +++ AC_MSG_CHECKING([for example storage engine]) +++ +++ case "$sphinxdb" in +++ yes ) +++ AC_DEFINE([HAVE_SPHINX_DB], [1], [Builds Sphinx Engine]) +++ AC_MSG_RESULT([yes]) +++ [sphinxdb=yes] +++ ;; +++ * ) +++ AC_MSG_RESULT([no]) +++ [sphinxdb=no] +++ ;; +++ esac +++ +++]) +++dnl --------------------------------------------------------------------------- +++dnl END OF MYSQL_CHECK_EXAMPLE SECTION +++dnl --------------------------------------------------------------------------- +++ ++diff -B -N -r -u mysql-5.0.22/configure.in mysql-5.0.22.sx/configure.in ++--- mysql-5.0.22/configure.in 2006-05-25 10:56:45.000000000 +0200 +++++ mysql-5.0.22.sx/configure.in 2006-06-06 19:49:38.000000000 +0200 ++@@ -41,6 +41,7 @@ ++ sinclude(config/ac-macros/ha_berkeley.m4) ++ sinclude(config/ac-macros/ha_blackhole.m4) ++ sinclude(config/ac-macros/ha_example.m4) +++sinclude(config/ac-macros/ha_sphinx.m4) ++ sinclude(config/ac-macros/ha_federated.m4) ++ sinclude(config/ac-macros/ha_innodb.m4) ++ sinclude(config/ac-macros/ha_ndbcluster.m4) ++@@ -2450,6 +2451,7 @@ ++ MYSQL_CHECK_BDB ++ MYSQL_CHECK_INNODB ++ MYSQL_CHECK_EXAMPLEDB +++MYSQL_CHECK_SPHINXDB ++ MYSQL_CHECK_ARCHIVEDB ++ MYSQL_CHECK_CSVDB ++ MYSQL_CHECK_BLACKHOLEDB ++diff -B -N -r -u mysql-5.0.22/libmysqld/Makefile.am mysql-5.0.22.sx/libmysqld/Makefile.am ++--- mysql-5.0.22/libmysqld/Makefile.am 2006-05-25 10:56:55.000000000 +0200 +++++ mysql-5.0.22.sx/libmysqld/Makefile.am 2006-06-06 19:49:38.000000000 +0200 ++@@ -27,7 +27,7 @@ ++ -DSHAREDIR="\"$(MYSQLSHAREdir)\"" ++ INCLUDES= @bdb_includes@ \ ++ -I$(top_builddir)/include -I$(top_srcdir)/include \ ++- -I$(top_srcdir)/sql -I$(top_srcdir)/sql/examples \ +++ -I$(top_srcdir)/sql -I$(top_srcdir)/sql/examples -I$(top_srcdir)/sql/sphinx \ ++ -I$(top_srcdir)/regex \ ++ $(openssl_includes) $(yassl_includes) @ZLIB_INCLUDES@ ++ ++@@ -38,6 +38,7 @@ ++ libmysqlsources = errmsg.c get_password.c libmysql.c client.c pack.c \ ++ my_time.c ++ sqlexamplessources = ha_example.cc ha_tina.cc +++sqlsphinxsources = ha_sphinx.cc ++ ++ noinst_HEADERS = embedded_priv.h emb_qcache.h ++ ++@@ -65,7 +66,7 @@ ++ parse_file.cc sql_view.cc sql_trigger.cc my_decimal.cc \ ++ ha_blackhole.cc ha_archive.cc my_user.c ++ ++-libmysqld_int_a_SOURCES= $(libmysqld_sources) $(libmysqlsources) $(sqlsources) $(sqlexamplessources) +++libmysqld_int_a_SOURCES= $(libmysqld_sources) $(libmysqlsources) $(sqlsources) $(sqlexamplessources) $(sqlsphinxsources) ++ libmysqld_a_SOURCES= ++ ++ # automake misses these ++@@ -133,12 +134,16 @@ ++ rm -f $$f; \ ++ @LN_CP_F@ $(top_srcdir)/sql/examples/$$f $$f; \ ++ done; \ +++ for f in $(sqlsphinxsources); do \ +++ rm -f $$f; \ +++ @LN_CP_F@ $(top_srcdir)/sql/sphinx/$$f $$f; \ +++ done; \ ++ rm -f client_settings.h; \ ++ @LN_CP_F@ $(top_srcdir)/libmysql/client_settings.h client_settings.h ++ ++ ++ clean-local: ++- rm -f `echo $(sqlsources) $(libmysqlsources) $(sqlexamplessources) | sed "s;\.lo;.c;g"` \ +++ rm -f `echo $(sqlsources) $(libmysqlsources) $(sqlexamplessources) $(sqlsphinxsources) | sed "s;\.lo;.c;g"` \ ++ $(top_srcdir)/linked_libmysqld_sources; \ ++ rm -f client_settings.h ++ ++diff -B -N -r -u mysql-5.0.22/sql/handler.cc mysql-5.0.22.sx/sql/handler.cc ++--- mysql-5.0.22/sql/handler.cc 2006-05-25 10:56:42.000000000 +0200 +++++ mysql-5.0.22.sx/sql/handler.cc 2006-06-06 19:49:38.000000000 +0200 ++@@ -78,6 +78,15 @@ ++ NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, ++ HTON_NO_FLAGS }; ++ #endif +++#ifdef HAVE_SPHINX_DB +++#include "sphinx/ha_sphinx.h" +++extern handlerton sphinx_hton; +++#else +++handlerton sphinx_hton = { "SPHINX", SHOW_OPTION_NO, "SPHINX storage engine", +++ DB_TYPE_SPHINX_DB, NULL, 0, 0, NULL, NULL, +++ NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, +++ HTON_NO_FLAGS }; +++#endif ++ #ifdef HAVE_INNOBASE_DB ++ #include "ha_innodb.h" ++ extern handlerton innobase_hton; ++@@ -147,6 +156,7 @@ ++ &example_hton, ++ &archive_hton, ++ &tina_hton, +++ &sphinx_hton, ++ &ndbcluster_hton, ++ &federated_hton, ++ &myisammrg_hton, ++@@ -345,6 +355,12 @@ ++ return new (alloc) ha_tina(table); ++ return NULL; ++ #endif +++#ifdef HAVE_SPHINX_DB +++ case DB_TYPE_SPHINX_DB: +++ if (have_sphinx_db == SHOW_OPTION_YES) +++ return new (alloc) ha_sphinx(table); +++ return NULL; +++#endif ++ #ifdef HAVE_NDBCLUSTER_DB ++ case DB_TYPE_NDBCLUSTER: ++ if (have_ndbcluster == SHOW_OPTION_YES) ++diff -B -N -r -u mysql-5.0.22/sql/handler.h mysql-5.0.22.sx/sql/handler.h ++--- mysql-5.0.22/sql/handler.h 2006-05-25 10:56:55.000000000 +0200 +++++ mysql-5.0.22.sx/sql/handler.h 2006-06-06 19:49:38.000000000 +0200 ++@@ -183,8 +183,9 @@ ++ DB_TYPE_BERKELEY_DB, DB_TYPE_INNODB, ++ DB_TYPE_GEMINI, DB_TYPE_NDBCLUSTER, ++ DB_TYPE_EXAMPLE_DB, DB_TYPE_ARCHIVE_DB, DB_TYPE_CSV_DB, ++- DB_TYPE_FEDERATED_DB, +++ DB_TYPE_FEDERATED_DB, ++ DB_TYPE_BLACKHOLE_DB, +++ DB_TYPE_SPHINX_DB, ++ DB_TYPE_DEFAULT // Must be last ++ }; ++ ++diff -B -N -r -u mysql-5.0.22/sql/Makefile.am mysql-5.0.22.sx/sql/Makefile.am ++--- mysql-5.0.22/sql/Makefile.am 2006-05-25 10:56:41.000000000 +0200 +++++ mysql-5.0.22.sx/sql/Makefile.am 2006-06-06 19:49:38.000000000 +0200 ++@@ -66,6 +66,7 @@ ++ sql_array.h sql_cursor.h \ ++ examples/ha_example.h ha_archive.h \ ++ examples/ha_tina.h ha_blackhole.h \ +++ sphinx/ha_sphinx.h \ ++ ha_federated.h ++ mysqld_SOURCES = sql_lex.cc sql_handler.cc \ ++ item.cc item_sum.cc item_buff.cc item_func.cc \ ++@@ -102,6 +103,7 @@ ++ sp_cache.cc parse_file.cc sql_trigger.cc \ ++ examples/ha_example.cc ha_archive.cc \ ++ examples/ha_tina.cc ha_blackhole.cc \ +++ sphinx/ha_sphinx.cc \ ++ ha_federated.cc ++ ++ gen_lex_hash_SOURCES = gen_lex_hash.cc ++diff -B -N -r -u mysql-5.0.22/sql/mysqld.cc mysql-5.0.22.sx/sql/mysqld.cc ++--- mysql-5.0.22/sql/mysqld.cc 2006-05-25 10:56:41.000000000 +0200 +++++ mysql-5.0.22.sx/sql/mysqld.cc 2006-06-06 19:49:38.000000000 +0200 ++@@ -6420,6 +6420,11 @@ ++ #else ++ have_csv_db= SHOW_OPTION_NO; ++ #endif +++#ifdef HAVE_SPHINX_DB +++ have_sphinx_db= SHOW_OPTION_YES; +++#else +++ have_sphinx_db= SHOW_OPTION_NO; +++#endif ++ #ifdef HAVE_NDBCLUSTER_DB ++ have_ndbcluster=SHOW_OPTION_DISABLED; ++ #else ++@@ -7457,6 +7462,7 @@ ++ #undef have_example_db ++ #undef have_archive_db ++ #undef have_csv_db +++#undef have_sphinx_db ++ #undef have_federated_db ++ #undef have_partition_db ++ #undef have_blackhole_db ++@@ -7467,6 +7473,7 @@ ++ SHOW_COMP_OPTION have_example_db= SHOW_OPTION_NO; ++ SHOW_COMP_OPTION have_archive_db= SHOW_OPTION_NO; ++ SHOW_COMP_OPTION have_csv_db= SHOW_OPTION_NO; +++SHOW_COMP_OPTION have_sphinx_db= SHOW_OPTION_NO; ++ SHOW_COMP_OPTION have_federated_db= SHOW_OPTION_NO; ++ SHOW_COMP_OPTION have_partition_db= SHOW_OPTION_NO; ++ SHOW_COMP_OPTION have_blackhole_db= SHOW_OPTION_NO; ++diff -B -N -r -u mysql-5.0.22/sql/mysql_priv.h mysql-5.0.22.sx/sql/mysql_priv.h ++--- mysql-5.0.22/sql/mysql_priv.h 2006-05-25 10:56:43.000000000 +0200 +++++ mysql-5.0.22.sx/sql/mysql_priv.h 2006-06-06 19:49:38.000000000 +0200 ++@@ -1279,6 +1279,12 @@ ++ #else ++ extern SHOW_COMP_OPTION have_csv_db; ++ #endif +++#ifdef HAVE_SPHINX_DB +++extern handlerton sphinx_hton; +++#define have_sphinx_db sphinx_hton.state +++#else +++extern SHOW_COMP_OPTION have_sphinx_db; +++#endif ++ #ifdef HAVE_FEDERATED_DB ++ extern handlerton federated_hton; ++ #define have_federated_db federated_hton.state ++diff -B -N -r -u mysql-5.0.22/sql/set_var.cc mysql-5.0.22.sx/sql/set_var.cc ++--- mysql-5.0.22/sql/set_var.cc 2006-05-25 10:56:41.000000000 +0200 +++++ mysql-5.0.22.sx/sql/set_var.cc 2006-06-06 19:49:38.000000000 +0200 ++@@ -809,6 +809,7 @@ ++ {"have_compress", (char*) &have_compress, SHOW_HAVE}, ++ {"have_crypt", (char*) &have_crypt, SHOW_HAVE}, ++ {"have_csv", (char*) &have_csv_db, SHOW_HAVE}, +++ {"have_sphinx", (char*) &have_sphinx_db, SHOW_HAVE}, ++ {"have_example_engine", (char*) &have_example_db, SHOW_HAVE}, ++ {"have_federated_engine", (char*) &have_federated_db, SHOW_HAVE}, ++ {"have_geometry", (char*) &have_geometry, SHOW_HAVE}, ++diff -B -N -r -u mysql-5.0.22/sql/sql_lex.h mysql-5.0.22.sx/sql/sql_lex.h ++--- mysql-5.0.22/sql/sql_lex.h 2006-05-25 10:56:41.000000000 +0200 +++++ mysql-5.0.22.sx/sql/sql_lex.h 2006-06-06 19:49:38.000000000 +0200 ++@@ -58,6 +58,7 @@ ++ SQLCOM_SHOW_DATABASES, SQLCOM_SHOW_TABLES, SQLCOM_SHOW_FIELDS, ++ SQLCOM_SHOW_KEYS, SQLCOM_SHOW_VARIABLES, SQLCOM_SHOW_LOGS, SQLCOM_SHOW_STATUS, ++ SQLCOM_SHOW_INNODB_STATUS, SQLCOM_SHOW_NDBCLUSTER_STATUS, SQLCOM_SHOW_MUTEX_STATUS, +++ SQLCOM_SHOW_SPHINX_STATUS, ++ SQLCOM_SHOW_PROCESSLIST, SQLCOM_SHOW_MASTER_STAT, SQLCOM_SHOW_SLAVE_STAT, ++ SQLCOM_SHOW_GRANTS, SQLCOM_SHOW_CREATE, SQLCOM_SHOW_CHARSETS, ++ SQLCOM_SHOW_COLLATIONS, SQLCOM_SHOW_CREATE_DB, SQLCOM_SHOW_TABLE_STATUS, ++diff -B -N -r -u mysql-5.0.22/sql/sql_parse.cc mysql-5.0.22.sx/sql/sql_parse.cc ++--- mysql-5.0.22/sql/sql_parse.cc 2006-05-25 10:56:41.000000000 +0200 +++++ mysql-5.0.22.sx/sql/sql_parse.cc 2006-06-06 19:49:38.000000000 +0200 ++@@ -25,6 +25,9 @@ ++ #ifdef HAVE_INNOBASE_DB ++ #include "ha_innodb.h" ++ #endif +++#ifdef HAVE_SPHINX_DB +++#include "sphinx/ha_sphinx.h" +++#endif ++ ++ #ifdef HAVE_NDBCLUSTER_DB ++ #include "ha_ndbcluster.h" ++@@ -2722,6 +2725,15 @@ ++ break; ++ } ++ #endif +++#ifdef HAVE_SPHINX_DB +++ case SQLCOM_SHOW_SPHINX_STATUS: +++ { +++ if (check_global_access(thd, SUPER_ACL)) +++ goto error; +++ res = sphinx_show_status(thd); +++ break; +++ } +++#endif ++ #ifdef HAVE_REPLICATION ++ case SQLCOM_LOAD_MASTER_TABLE: ++ { ++diff -B -N -r -u mysql-5.0.22/sql/sql_yacc.yy mysql-5.0.22.sx/sql/sql_yacc.yy ++--- mysql-5.0.22/sql/sql_yacc.yy 2006-05-25 10:56:43.000000000 +0200 +++++ mysql-5.0.22.sx/sql/sql_yacc.yy 2006-06-06 19:49:38.000000000 +0200 ++@@ -6584,6 +6584,9 @@ ++ case DB_TYPE_INNODB: ++ Lex->sql_command = SQLCOM_SHOW_INNODB_STATUS; ++ break; +++ case DB_TYPE_SPHINX_DB: +++ Lex->sql_command = SQLCOM_SHOW_SPHINX_STATUS; +++ break; ++ default: ++ my_error(ER_NOT_SUPPORTED_YET, MYF(0), "STATUS"); ++ YYABORT; +diff -uNr mysql-5.1.49.orig/storage/sphinx/sphinx.5.0.27.diff mysql-5.1.49/storage/sphinx/sphinx.5.0.27.diff +--- mysql-5.1.49.orig/storage/sphinx/sphinx.5.0.27.diff 1970-01-01 09:00:00.000000000 +0900 ++++ mysql-5.1.49/storage/sphinx/sphinx.5.0.27.diff 2006-12-15 08:13:25.000000000 +0900 +@@ -0,0 +1,284 @@ ++diff -B -N -r -u mysql-5.0.22/config/ac-macros/ha_sphinx.m4 mysql-5.0.22.sx/config/ac-macros/ha_sphinx.m4 ++--- mysql-5.0.22/config/ac-macros/ha_sphinx.m4 1970-01-01 01:00:00.000000000 +0100 +++++ mysql-5.0.22.sx/config/ac-macros/ha_sphinx.m4 2006-06-06 19:49:38.000000000 +0200 ++@@ -0,0 +1,30 @@ +++dnl --------------------------------------------------------------------------- +++dnl Macro: MYSQL_CHECK_EXAMPLEDB +++dnl Sets HAVE_SPHINX_DB if --with-sphinx-storage-engine is used +++dnl --------------------------------------------------------------------------- +++AC_DEFUN([MYSQL_CHECK_SPHINXDB], [ +++ AC_ARG_WITH([sphinx-storage-engine], +++ [ +++ --with-sphinx-storage-engine +++ Enable the Sphinx Storage Engine], +++ [sphinxdb="$withval"], +++ [sphinxdb=no]) +++ AC_MSG_CHECKING([for example storage engine]) +++ +++ case "$sphinxdb" in +++ yes ) +++ AC_DEFINE([HAVE_SPHINX_DB], [1], [Builds Sphinx Engine]) +++ AC_MSG_RESULT([yes]) +++ [sphinxdb=yes] +++ ;; +++ * ) +++ AC_MSG_RESULT([no]) +++ [sphinxdb=no] +++ ;; +++ esac +++ +++]) +++dnl --------------------------------------------------------------------------- +++dnl END OF MYSQL_CHECK_EXAMPLE SECTION +++dnl --------------------------------------------------------------------------- +++ ++diff -B -N -r -u mysql-5.0.22/configure.in mysql-5.0.22.sx/configure.in ++--- mysql-5.0.22/configure.in 2006-05-25 10:56:45.000000000 +0200 +++++ mysql-5.0.22.sx/configure.in 2006-06-06 19:49:38.000000000 +0200 ++@@ -41,6 +41,7 @@ ++ sinclude(config/ac-macros/ha_berkeley.m4) ++ sinclude(config/ac-macros/ha_blackhole.m4) ++ sinclude(config/ac-macros/ha_example.m4) +++sinclude(config/ac-macros/ha_sphinx.m4) ++ sinclude(config/ac-macros/ha_federated.m4) ++ sinclude(config/ac-macros/ha_innodb.m4) ++ sinclude(config/ac-macros/ha_ndbcluster.m4) ++@@ -2450,6 +2451,7 @@ ++ MYSQL_CHECK_BDB ++ MYSQL_CHECK_INNODB ++ MYSQL_CHECK_EXAMPLEDB +++MYSQL_CHECK_SPHINXDB ++ MYSQL_CHECK_ARCHIVEDB ++ MYSQL_CHECK_CSVDB ++ MYSQL_CHECK_BLACKHOLEDB ++diff -B -N -r -u mysql-5.0.22/libmysqld/Makefile.am mysql-5.0.22.sx/libmysqld/Makefile.am ++--- mysql-5.0.22/libmysqld/Makefile.am 2006-05-25 10:56:55.000000000 +0200 +++++ mysql-5.0.22.sx/libmysqld/Makefile.am 2006-06-06 19:49:38.000000000 +0200 ++@@ -27,7 +27,7 @@ ++ -DSHAREDIR="\"$(MYSQLSHAREdir)\"" ++ INCLUDES= @bdb_includes@ \ ++ -I$(top_builddir)/include -I$(top_srcdir)/include \ ++- -I$(top_srcdir)/sql -I$(top_srcdir)/sql/examples \ +++ -I$(top_srcdir)/sql -I$(top_srcdir)/sql/examples -I$(top_srcdir)/sql/sphinx \ ++ -I$(top_srcdir)/regex \ ++ $(openssl_includes) $(yassl_includes) @ZLIB_INCLUDES@ ++ ++@@ -38,6 +38,7 @@ ++ libmysqlsources = errmsg.c get_password.c libmysql.c client.c pack.c \ ++ my_time.c ++ sqlexamplessources = ha_example.cc ha_tina.cc +++sqlsphinxsources = ha_sphinx.cc ++ ++ noinst_HEADERS = embedded_priv.h emb_qcache.h ++ ++@@ -65,7 +66,7 @@ ++ parse_file.cc sql_view.cc sql_trigger.cc my_decimal.cc \ ++ ha_blackhole.cc ha_archive.cc my_user.c ++ ++-libmysqld_int_a_SOURCES= $(libmysqld_sources) $(libmysqlsources) $(sqlsources) $(sqlexamplessources) +++libmysqld_int_a_SOURCES= $(libmysqld_sources) $(libmysqlsources) $(sqlsources) $(sqlexamplessources) $(sqlsphinxsources) ++ libmysqld_a_SOURCES= ++ ++ # automake misses these ++@@ -133,12 +134,16 @@ ++ rm -f $$f; \ ++ @LN_CP_F@ $(top_srcdir)/sql/examples/$$f $$f; \ ++ done; \ +++ for f in $(sqlsphinxsources); do \ +++ rm -f $$f; \ +++ @LN_CP_F@ $(top_srcdir)/sql/sphinx/$$f $$f; \ +++ done; \ ++ rm -f client_settings.h; \ ++ @LN_CP_F@ $(top_srcdir)/libmysql/client_settings.h client_settings.h ++ ++ ++ clean-local: ++- rm -f `echo $(sqlsources) $(libmysqlsources) $(sqlexamplessources) | sed "s;\.lo;.c;g"` \ +++ rm -f `echo $(sqlsources) $(libmysqlsources) $(sqlexamplessources) $(sqlsphinxsources) | sed "s;\.lo;.c;g"` \ ++ $(top_srcdir)/linked_libmysqld_sources; \ ++ rm -f client_settings.h ++ ++diff -B -N -r -u mysql-5.0.22/sql/handler.cc mysql-5.0.22.sx/sql/handler.cc ++--- mysql-5.0.22/sql/handler.cc 2006-05-25 10:56:42.000000000 +0200 +++++ mysql-5.0.22.sx/sql/handler.cc 2006-06-06 19:49:38.000000000 +0200 ++@@ -78,6 +78,15 @@ ++ NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, ++ HTON_NO_FLAGS }; ++ #endif +++#ifdef HAVE_SPHINX_DB +++#include "sphinx/ha_sphinx.h" +++extern handlerton sphinx_hton; +++#else +++handlerton sphinx_hton = { "SPHINX", SHOW_OPTION_NO, "SPHINX storage engine", +++ DB_TYPE_SPHINX_DB, NULL, 0, 0, NULL, NULL, +++ NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, +++ HTON_NO_FLAGS }; +++#endif ++ #ifdef HAVE_INNOBASE_DB ++ #include "ha_innodb.h" ++ extern handlerton innobase_hton; ++@@ -147,6 +156,7 @@ ++ &example_hton, ++ &archive_hton, ++ &tina_hton, +++ &sphinx_hton, ++ &ndbcluster_hton, ++ &federated_hton, ++ &myisammrg_hton, ++@@ -345,6 +355,12 @@ ++ return new (alloc) ha_tina(table); ++ return NULL; ++ #endif +++#ifdef HAVE_SPHINX_DB +++ case DB_TYPE_SPHINX_DB: +++ if (have_sphinx_db == SHOW_OPTION_YES) +++ return new (alloc) ha_sphinx(table); +++ return NULL; +++#endif ++ #ifdef HAVE_NDBCLUSTER_DB ++ case DB_TYPE_NDBCLUSTER: ++ if (have_ndbcluster == SHOW_OPTION_YES) ++diff -B -N -r -u mysql-5.0.22/sql/handler.h mysql-5.0.22.sx/sql/handler.h ++--- mysql-5.0.22/sql/handler.h 2006-05-25 10:56:55.000000000 +0200 +++++ mysql-5.0.22.sx/sql/handler.h 2006-06-06 19:49:38.000000000 +0200 ++@@ -183,8 +183,9 @@ ++ DB_TYPE_BERKELEY_DB, DB_TYPE_INNODB, ++ DB_TYPE_GEMINI, DB_TYPE_NDBCLUSTER, ++ DB_TYPE_EXAMPLE_DB, DB_TYPE_ARCHIVE_DB, DB_TYPE_CSV_DB, ++- DB_TYPE_FEDERATED_DB, +++ DB_TYPE_FEDERATED_DB, ++ DB_TYPE_BLACKHOLE_DB, +++ DB_TYPE_SPHINX_DB, ++ DB_TYPE_DEFAULT // Must be last ++ }; ++ ++diff -B -N -r -u mysql-5.0.22/sql/Makefile.am mysql-5.0.22.sx/sql/Makefile.am ++--- mysql-5.0.22/sql/Makefile.am 2006-05-25 10:56:41.000000000 +0200 +++++ mysql-5.0.22.sx/sql/Makefile.am 2006-06-06 19:49:38.000000000 +0200 ++@@ -66,6 +66,7 @@ ++ sql_array.h sql_cursor.h \ ++ examples/ha_example.h ha_archive.h \ ++ examples/ha_tina.h ha_blackhole.h \ +++ sphinx/ha_sphinx.h \ ++ ha_federated.h ++ mysqld_SOURCES = sql_lex.cc sql_handler.cc \ ++ item.cc item_sum.cc item_buff.cc item_func.cc \ ++@@ -102,6 +103,7 @@ ++ sp_cache.cc parse_file.cc sql_trigger.cc \ ++ examples/ha_example.cc ha_archive.cc \ ++ examples/ha_tina.cc ha_blackhole.cc \ +++ sphinx/ha_sphinx.cc \ ++ ha_federated.cc ++ ++ gen_lex_hash_SOURCES = gen_lex_hash.cc ++diff -B -N -r -u mysql-5.0.22/sql/mysqld.cc mysql-5.0.22.sx/sql/mysqld.cc ++--- mysql-5.0.22/sql/mysqld.cc 2006-05-25 10:56:41.000000000 +0200 +++++ mysql-5.0.22.sx/sql/mysqld.cc 2006-06-06 19:49:38.000000000 +0200 ++@@ -6420,6 +6420,11 @@ ++ #else ++ have_csv_db= SHOW_OPTION_NO; ++ #endif +++#ifdef HAVE_SPHINX_DB +++ have_sphinx_db= SHOW_OPTION_YES; +++#else +++ have_sphinx_db= SHOW_OPTION_NO; +++#endif ++ #ifdef HAVE_NDBCLUSTER_DB ++ have_ndbcluster=SHOW_OPTION_DISABLED; ++ #else ++@@ -7457,6 +7462,7 @@ ++ #undef have_example_db ++ #undef have_archive_db ++ #undef have_csv_db +++#undef have_sphinx_db ++ #undef have_federated_db ++ #undef have_partition_db ++ #undef have_blackhole_db ++@@ -7467,6 +7473,7 @@ ++ SHOW_COMP_OPTION have_example_db= SHOW_OPTION_NO; ++ SHOW_COMP_OPTION have_archive_db= SHOW_OPTION_NO; ++ SHOW_COMP_OPTION have_csv_db= SHOW_OPTION_NO; +++SHOW_COMP_OPTION have_sphinx_db= SHOW_OPTION_NO; ++ SHOW_COMP_OPTION have_federated_db= SHOW_OPTION_NO; ++ SHOW_COMP_OPTION have_partition_db= SHOW_OPTION_NO; ++ SHOW_COMP_OPTION have_blackhole_db= SHOW_OPTION_NO; ++diff -B -N -r -u mysql-5.0.22/sql/mysql_priv.h mysql-5.0.22.sx/sql/mysql_priv.h ++--- mysql-5.0.22/sql/mysql_priv.h 2006-05-25 10:56:43.000000000 +0200 +++++ mysql-5.0.22.sx/sql/mysql_priv.h 2006-06-06 19:49:38.000000000 +0200 ++@@ -1279,6 +1279,12 @@ ++ #else ++ extern SHOW_COMP_OPTION have_csv_db; ++ #endif +++#ifdef HAVE_SPHINX_DB +++extern handlerton sphinx_hton; +++#define have_sphinx_db sphinx_hton.state +++#else +++extern SHOW_COMP_OPTION have_sphinx_db; +++#endif ++ #ifdef HAVE_FEDERATED_DB ++ extern handlerton federated_hton; ++ #define have_federated_db federated_hton.state ++diff -B -N -r -u mysql-5.0.22/sql/set_var.cc mysql-5.0.22.sx/sql/set_var.cc ++--- mysql-5.0.22/sql/set_var.cc 2006-05-25 10:56:41.000000000 +0200 +++++ mysql-5.0.22.sx/sql/set_var.cc 2006-06-06 19:49:38.000000000 +0200 ++@@ -864,6 +864,7 @@ ++ {"have_compress", (char*) &have_compress, SHOW_HAVE}, ++ {"have_crypt", (char*) &have_crypt, SHOW_HAVE}, ++ {"have_csv", (char*) &have_csv_db, SHOW_HAVE}, +++ {"have_sphinx", (char*) &have_sphinx_db, SHOW_HAVE}, ++ {"have_dynamic_loading", (char*) &have_dlopen, SHOW_HAVE}, ++ {"have_example_engine", (char*) &have_example_db, SHOW_HAVE}, ++ {"have_federated_engine", (char*) &have_federated_db, SHOW_HAVE}, ++diff -B -N -r -u mysql-5.0.22/sql/sql_lex.h mysql-5.0.22.sx/sql/sql_lex.h ++--- mysql-5.0.22/sql/sql_lex.h 2006-05-25 10:56:41.000000000 +0200 +++++ mysql-5.0.22.sx/sql/sql_lex.h 2006-06-06 19:49:38.000000000 +0200 ++@@ -58,6 +58,7 @@ ++ SQLCOM_SHOW_DATABASES, SQLCOM_SHOW_TABLES, SQLCOM_SHOW_FIELDS, ++ SQLCOM_SHOW_KEYS, SQLCOM_SHOW_VARIABLES, SQLCOM_SHOW_LOGS, SQLCOM_SHOW_STATUS, ++ SQLCOM_SHOW_INNODB_STATUS, SQLCOM_SHOW_NDBCLUSTER_STATUS, SQLCOM_SHOW_MUTEX_STATUS, +++ SQLCOM_SHOW_SPHINX_STATUS, ++ SQLCOM_SHOW_PROCESSLIST, SQLCOM_SHOW_MASTER_STAT, SQLCOM_SHOW_SLAVE_STAT, ++ SQLCOM_SHOW_GRANTS, SQLCOM_SHOW_CREATE, SQLCOM_SHOW_CHARSETS, ++ SQLCOM_SHOW_COLLATIONS, SQLCOM_SHOW_CREATE_DB, SQLCOM_SHOW_TABLE_STATUS, ++diff -B -N -r -u mysql-5.0.22/sql/sql_parse.cc mysql-5.0.22.sx/sql/sql_parse.cc ++--- mysql-5.0.22/sql/sql_parse.cc 2006-05-25 10:56:41.000000000 +0200 +++++ mysql-5.0.22.sx/sql/sql_parse.cc 2006-06-06 19:49:38.000000000 +0200 ++@@ -25,6 +25,9 @@ ++ #ifdef HAVE_INNOBASE_DB ++ #include "ha_innodb.h" ++ #endif +++#ifdef HAVE_SPHINX_DB +++#include "sphinx/ha_sphinx.h" +++#endif ++ ++ #ifdef HAVE_NDBCLUSTER_DB ++ #include "ha_ndbcluster.h" ++@@ -2722,6 +2725,15 @@ ++ break; ++ } ++ #endif +++#ifdef HAVE_SPHINX_DB +++ case SQLCOM_SHOW_SPHINX_STATUS: +++ { +++ if (check_global_access(thd, SUPER_ACL)) +++ goto error; +++ res = sphinx_show_status(thd); +++ break; +++ } +++#endif ++ #ifdef HAVE_REPLICATION ++ case SQLCOM_LOAD_MASTER_TABLE: ++ { ++diff -B -N -r -u mysql-5.0.22/sql/sql_yacc.yy mysql-5.0.22.sx/sql/sql_yacc.yy ++--- mysql-5.0.22/sql/sql_yacc.yy 2006-05-25 10:56:43.000000000 +0200 +++++ mysql-5.0.22.sx/sql/sql_yacc.yy 2006-06-06 19:49:38.000000000 +0200 ++@@ -6584,6 +6584,9 @@ ++ case DB_TYPE_INNODB: ++ Lex->sql_command = SQLCOM_SHOW_INNODB_STATUS; ++ break; +++ case DB_TYPE_SPHINX_DB: +++ Lex->sql_command = SQLCOM_SHOW_SPHINX_STATUS; +++ break; ++ default: ++ my_error(ER_NOT_SUPPORTED_YET, MYF(0), "STATUS"); ++ YYABORT; +diff -uNr mysql-5.1.49.orig/storage/sphinx/sphinx.5.0.37.diff mysql-5.1.49/storage/sphinx/sphinx.5.0.37.diff +--- mysql-5.1.49.orig/storage/sphinx/sphinx.5.0.37.diff 1970-01-01 09:00:00.000000000 +0900 ++++ mysql-5.1.49/storage/sphinx/sphinx.5.0.37.diff 2009-02-14 22:57:42.000000000 +0900 +@@ -0,0 +1,338 @@ ++--- mysql-5.0.67/config/ac-macros/ha_sphinx.m4 1970-01-01 10:00:00.000000000 +1000 +++++ mysql-5.0.67-sphinx/config/ac-macros/ha_sphinx.m4 2009-02-14 09:15:48.000000000 +1000 ++@@ -0,0 +1,30 @@ +++dnl --------------------------------------------------------------------------- +++dnl Macro: MYSQL_CHECK_EXAMPLEDB +++dnl Sets HAVE_SPHINX_DB if --with-sphinx-storage-engine is used +++dnl --------------------------------------------------------------------------- +++AC_DEFUN([MYSQL_CHECK_SPHINXDB], [ +++ AC_ARG_WITH([sphinx-storage-engine], +++ [ +++ --with-sphinx-storage-engine +++ Enable the Sphinx Storage Engine], +++ [sphinxdb="$withval"], +++ [sphinxdb=no]) +++ AC_MSG_CHECKING([for example storage engine]) +++ +++ case "$sphinxdb" in +++ yes ) +++ AC_DEFINE([HAVE_SPHINX_DB], [1], [Builds Sphinx Engine]) +++ AC_MSG_RESULT([yes]) +++ [sphinxdb=yes] +++ ;; +++ * ) +++ AC_MSG_RESULT([no]) +++ [sphinxdb=no] +++ ;; +++ esac +++ +++]) +++dnl --------------------------------------------------------------------------- +++dnl END OF MYSQL_CHECK_EXAMPLE SECTION +++dnl --------------------------------------------------------------------------- +++ ++--- mysql-5.0.67/configure.in 2008-08-04 23:19:07.000000000 +1100 +++++ mysql-5.0.67-sphinx/configure.in 2009-02-14 09:15:48.000000000 +1000 ++@@ -58,6 +58,7 @@ ++ sinclude(config/ac-macros/ha_berkeley.m4) ++ sinclude(config/ac-macros/ha_blackhole.m4) ++ sinclude(config/ac-macros/ha_example.m4) +++sinclude(config/ac-macros/ha_sphinx.m4) ++ sinclude(config/ac-macros/ha_federated.m4) ++ sinclude(config/ac-macros/ha_innodb.m4) ++ sinclude(config/ac-macros/ha_ndbcluster.m4) ++@@ -2625,6 +2626,7 @@ ++ MYSQL_CHECK_BDB ++ MYSQL_CHECK_INNODB ++ MYSQL_CHECK_EXAMPLEDB +++MYSQL_CHECK_SPHINXDB ++ MYSQL_CHECK_ARCHIVEDB ++ MYSQL_CHECK_CSVDB ++ MYSQL_CHECK_BLACKHOLEDB ++--- mysql-5.0.67/libmysqld/Makefile.am 2008-08-04 23:19:18.000000000 +1100 +++++ mysql-5.0.67-sphinx/libmysqld/Makefile.am 2009-02-14 09:15:48.000000000 +1000 ++@@ -29,6 +29,7 @@ ++ -I$(top_builddir)/include -I$(top_srcdir)/include \ ++ -I$(top_builddir)/sql -I$(top_srcdir)/sql \ ++ -I$(top_srcdir)/sql/examples \ +++ -I$(top_srcdir)/sql/sphinx \ ++ -I$(top_srcdir)/regex \ ++ $(openssl_includes) @ZLIB_INCLUDES@ ++ ++@@ -39,6 +40,7 @@ ++ libmysqlsources = errmsg.c get_password.c libmysql.c client.c pack.c \ ++ my_time.c ++ sqlexamplessources = ha_example.cc ha_tina.cc +++sqlsphinxsources = ha_sphinx.cc ++ ++ noinst_HEADERS = embedded_priv.h emb_qcache.h ++ ++@@ -67,7 +69,7 @@ ++ parse_file.cc sql_view.cc sql_trigger.cc my_decimal.cc \ ++ ha_blackhole.cc ha_archive.cc my_user.c ++ ++-libmysqld_int_a_SOURCES= $(libmysqld_sources) $(libmysqlsources) $(sqlsources) $(sqlexamplessources) +++libmysqld_int_a_SOURCES= $(libmysqld_sources) $(libmysqlsources) $(sqlsources) $(sqlexamplessources) $(sqlsphinxsources) ++ libmysqld_a_SOURCES= ++ ++ # automake misses these ++@@ -147,12 +149,16 @@ ++ rm -f $$f; \ ++ @LN_CP_F@ $(top_srcdir)/sql/examples/$$f $$f; \ ++ done; \ +++ for f in $(sqlsphinxsources); do \ +++ rm -f $$f; \ +++ @LN_CP_F@ $(top_srcdir)/sql/sphinx/$$f $$f; \ +++ done; \ ++ rm -f client_settings.h; \ ++ @LN_CP_F@ $(top_srcdir)/libmysql/client_settings.h client_settings.h ++ ++ ++ clean-local: ++- rm -f `echo $(sqlsources) $(libmysqlsources) $(sqlexamplessources) | sed "s;\.lo;.c;g"` \ +++ rm -f `echo $(sqlsources) $(libmysqlsources) $(sqlexamplessources) $(sqlsphinxsources) | sed "s;\.lo;.c;g"` \ ++ $(top_srcdir)/linked_libmysqld_sources; \ ++ rm -f client_settings.h ++ ++--- mysql-5.0.67/sql/handler.cc 2008-08-04 23:20:04.000000000 +1100 +++++ mysql-5.0.67-sphinx/sql/handler.cc 2009-02-14 09:15:48.000000000 +1000 ++@@ -77,6 +77,15 @@ ++ NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, ++ HTON_NO_FLAGS }; ++ #endif +++#ifdef HAVE_SPHINX_DB +++#include "sphinx/ha_sphinx.h" +++extern handlerton sphinx_hton; +++#else +++handlerton sphinx_hton = { "SPHINX", SHOW_OPTION_NO, "SPHINX storage engine", +++ DB_TYPE_SPHINX_DB, NULL, 0, 0, NULL, NULL, +++ NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, +++ HTON_NO_FLAGS }; +++#endif ++ #ifdef HAVE_INNOBASE_DB ++ #include "ha_innodb.h" ++ extern handlerton innobase_hton; ++@@ -141,6 +150,7 @@ ++ &example_hton, ++ &archive_hton, ++ &tina_hton, +++ &sphinx_hton, ++ &ndbcluster_hton, ++ &federated_hton, ++ &myisammrg_hton, ++@@ -341,6 +351,12 @@ ++ return new (alloc) ha_tina(table); ++ return NULL; ++ #endif +++#ifdef HAVE_SPHINX_DB +++ case DB_TYPE_SPHINX_DB: +++ if (have_sphinx_db == SHOW_OPTION_YES) +++ return new (alloc) ha_sphinx(table); +++ return NULL; +++#endif ++ #ifdef HAVE_NDBCLUSTER_DB ++ case DB_TYPE_NDBCLUSTER: ++ if (have_ndbcluster == SHOW_OPTION_YES) ++--- mysql-5.0.67/sql/handler.h 2008-08-04 23:20:04.000000000 +1100 +++++ mysql-5.0.67-sphinx/sql/handler.h 2009-02-14 09:15:48.000000000 +1000 ++@@ -186,8 +186,9 @@ ++ DB_TYPE_BERKELEY_DB, DB_TYPE_INNODB, ++ DB_TYPE_GEMINI, DB_TYPE_NDBCLUSTER, ++ DB_TYPE_EXAMPLE_DB, DB_TYPE_ARCHIVE_DB, DB_TYPE_CSV_DB, ++- DB_TYPE_FEDERATED_DB, +++ DB_TYPE_FEDERATED_DB, ++ DB_TYPE_BLACKHOLE_DB, +++ DB_TYPE_SPHINX_DB, ++ DB_TYPE_DEFAULT // Must be last ++ }; ++ ++--- mysql-5.0.67/sql/Makefile.am 2008-08-04 23:20:02.000000000 +1100 +++++ mysql-5.0.67-sphinx/sql/Makefile.am 2009-02-14 09:23:28.000000000 +1000 ++@@ -68,6 +68,7 @@ ++ sql_array.h sql_cursor.h \ ++ examples/ha_example.h ha_archive.h \ ++ examples/ha_tina.h ha_blackhole.h \ +++ sphinx/ha_sphinx.h \ ++ ha_federated.h ++ mysqld_SOURCES = sql_lex.cc sql_handler.cc \ ++ item.cc item_sum.cc item_buff.cc item_func.cc \ ++@@ -105,6 +106,7 @@ ++ sp_cache.cc parse_file.cc sql_trigger.cc \ ++ examples/ha_example.cc ha_archive.cc \ ++ examples/ha_tina.cc ha_blackhole.cc \ +++ sphinx/ha_sphinx.cc \ ++ ha_federated.cc ++ ++ gen_lex_hash_SOURCES = gen_lex_hash.cc ++@@ -174,6 +176,10 @@ ++ udf_example_la_SOURCES= udf_example.c ++ udf_example_la_LDFLAGS= -module -rpath $(pkglibdir) ++ +++pkglib_LTLIBRARIES = sphinx/sphinx.la +++sphinx_sphinx_la_SOURCES = sphinx/snippets_udf.cc +++sphinx_sphinx_la_LDFLAGS = -module +++ ++ ++ # Don't update the files from bitkeeper ++ %::SCCS/s.% ++--- mysql-5.0.67/sql/mysqld.cc 2008-08-04 23:20:07.000000000 +1100 +++++ mysql-5.0.67-sphinx/sql/mysqld.cc 2009-02-14 09:15:48.000000000 +1000 ++@@ -36,6 +36,10 @@ ++ #include <sys/prctl.h> ++ #endif ++ +++#ifdef HAVE_SPHINX_DB +++#include "sphinx/ha_sphinx.h" +++#endif +++ ++ #ifdef HAVE_INNOBASE_DB ++ #define OPT_INNODB_DEFAULT 1 ++ #else ++@@ -6633,6 +6637,13 @@ ++ {"Threads_running", (char*) &thread_running, SHOW_INT_CONST}, ++ {"Uptime", (char*) 0, SHOW_STARTTIME}, ++ {"Uptime_since_flush_status",(char*) 0, SHOW_FLUSHTIME}, +++#ifdef HAVE_SPHINX_DB +++ {"sphinx_total", (char *)sphinx_showfunc_total, SHOW_SPHINX_FUNC}, +++ {"sphinx_total_found", (char *)sphinx_showfunc_total_found, SHOW_SPHINX_FUNC}, +++ {"sphinx_time", (char *)sphinx_showfunc_time, SHOW_SPHINX_FUNC}, +++ {"sphinx_word_count", (char *)sphinx_showfunc_word_count, SHOW_SPHINX_FUNC}, +++ {"sphinx_words", (char *)sphinx_showfunc_words, SHOW_SPHINX_FUNC}, +++#endif ++ {NullS, NullS, SHOW_LONG} ++ }; ++ ++@@ -6875,6 +6886,11 @@ ++ #else ++ have_csv_db= SHOW_OPTION_NO; ++ #endif +++#ifdef HAVE_SPHINX_DB +++ have_sphinx_db= SHOW_OPTION_YES; +++#else +++ have_sphinx_db= SHOW_OPTION_NO; +++#endif ++ #ifdef HAVE_NDBCLUSTER_DB ++ have_ndbcluster=SHOW_OPTION_DISABLED; ++ #else ++@@ -7983,6 +7999,7 @@ ++ #undef have_example_db ++ #undef have_archive_db ++ #undef have_csv_db +++#undef have_sphinx_db ++ #undef have_federated_db ++ #undef have_partition_db ++ #undef have_blackhole_db ++@@ -7993,6 +8010,7 @@ ++ SHOW_COMP_OPTION have_example_db= SHOW_OPTION_NO; ++ SHOW_COMP_OPTION have_archive_db= SHOW_OPTION_NO; ++ SHOW_COMP_OPTION have_csv_db= SHOW_OPTION_NO; +++SHOW_COMP_OPTION have_sphinx_db= SHOW_OPTION_NO; ++ SHOW_COMP_OPTION have_federated_db= SHOW_OPTION_NO; ++ SHOW_COMP_OPTION have_partition_db= SHOW_OPTION_NO; ++ SHOW_COMP_OPTION have_blackhole_db= SHOW_OPTION_NO; ++--- mysql-5.0.67/sql/mysql_priv.h 2008-08-04 23:20:07.000000000 +1100 +++++ mysql-5.0.67-sphinx/sql/mysql_priv.h 2009-02-14 09:15:48.000000000 +1000 ++@@ -1439,6 +1439,12 @@ ++ #else ++ extern SHOW_COMP_OPTION have_csv_db; ++ #endif +++#ifdef HAVE_SPHINX_DB +++extern handlerton sphinx_hton; +++#define have_sphinx_db sphinx_hton.state +++#else +++extern SHOW_COMP_OPTION have_sphinx_db; +++#endif ++ #ifdef HAVE_FEDERATED_DB ++ extern handlerton federated_hton; ++ #define have_federated_db federated_hton.state ++--- mysql-5.0.67/sql/set_var.cc 2008-08-04 23:20:08.000000000 +1100 +++++ mysql-5.0.67-sphinx/sql/set_var.cc 2009-02-14 09:15:48.000000000 +1000 ++@@ -888,6 +888,7 @@ ++ {"have_compress", (char*) &have_compress, SHOW_HAVE}, ++ {"have_crypt", (char*) &have_crypt, SHOW_HAVE}, ++ {"have_csv", (char*) &have_csv_db, SHOW_HAVE}, +++ {"have_sphinx", (char*) &have_sphinx_db, SHOW_HAVE}, ++ {"have_dynamic_loading", (char*) &have_dlopen, SHOW_HAVE}, ++ {"have_example_engine", (char*) &have_example_db, SHOW_HAVE}, ++ {"have_federated_engine", (char*) &have_federated_db, SHOW_HAVE}, ++--- mysql-5.0.67/sql/sql_lex.h 2008-08-04 23:20:10.000000000 +1100 +++++ mysql-5.0.67-sphinx/sql/sql_lex.h 2009-02-14 09:15:48.000000000 +1000 ++@@ -57,6 +57,7 @@ ++ SQLCOM_SHOW_DATABASES, SQLCOM_SHOW_TABLES, SQLCOM_SHOW_FIELDS, ++ SQLCOM_SHOW_KEYS, SQLCOM_SHOW_VARIABLES, SQLCOM_SHOW_LOGS, SQLCOM_SHOW_STATUS, ++ SQLCOM_SHOW_INNODB_STATUS, SQLCOM_SHOW_NDBCLUSTER_STATUS, SQLCOM_SHOW_MUTEX_STATUS, +++ SQLCOM_SHOW_SPHINX_STATUS, ++ SQLCOM_SHOW_PROCESSLIST, SQLCOM_SHOW_MASTER_STAT, SQLCOM_SHOW_SLAVE_STAT, ++ SQLCOM_SHOW_GRANTS, SQLCOM_SHOW_CREATE, SQLCOM_SHOW_CHARSETS, ++ SQLCOM_SHOW_COLLATIONS, SQLCOM_SHOW_CREATE_DB, SQLCOM_SHOW_TABLE_STATUS, ++--- mysql-5.0.67/sql/sql_parse.cc 2008-08-04 23:20:10.000000000 +1100 +++++ mysql-5.0.67-sphinx/sql/sql_parse.cc 2009-02-14 09:15:48.000000000 +1000 ++@@ -24,6 +24,9 @@ ++ #ifdef HAVE_INNOBASE_DB ++ #include "ha_innodb.h" ++ #endif +++#ifdef HAVE_SPHINX_DB +++#include "sphinx/ha_sphinx.h" +++#endif ++ ++ #ifdef HAVE_NDBCLUSTER_DB ++ #include "ha_ndbcluster.h" ++@@ -3006,6 +3009,15 @@ ++ break; ++ } ++ #endif +++#ifdef HAVE_SPHINX_DB +++ case SQLCOM_SHOW_SPHINX_STATUS: +++ { +++ if (check_global_access(thd, SUPER_ACL)) +++ goto error; +++ res = sphinx_show_status(thd); +++ break; +++ } +++#endif ++ #ifdef HAVE_REPLICATION ++ case SQLCOM_LOAD_MASTER_TABLE: ++ { ++--- mysql-5.0.67/sql/sql_yacc.yy 2008-08-04 23:20:12.000000000 +1100 +++++ mysql-5.0.67-sphinx/sql/sql_yacc.yy 2009-02-14 09:15:48.000000000 +1000 ++@@ -7393,6 +7393,9 @@ ++ case DB_TYPE_INNODB: ++ Lex->sql_command = SQLCOM_SHOW_INNODB_STATUS; ++ break; +++ case DB_TYPE_SPHINX_DB: +++ Lex->sql_command = SQLCOM_SHOW_SPHINX_STATUS; +++ break; ++ default: ++ my_error(ER_NOT_SUPPORTED_YET, MYF(0), "STATUS"); ++ MYSQL_YYABORT; ++--- mysql-5.0.67/sql/structs.h 2008-08-04 23:20:12.000000000 +1100 +++++ mysql-5.0.67-sphinx/sql/structs.h 2009-02-14 09:15:48.000000000 +1000 ++@@ -188,6 +188,9 @@ ++ SHOW_SSL_CTX_SESS_TIMEOUTS, SHOW_SSL_CTX_SESS_CACHE_FULL, ++ SHOW_SSL_GET_CIPHER_LIST, ++ #endif /* HAVE_OPENSSL */ +++#ifdef HAVE_SPHINX_DB +++ SHOW_SPHINX_FUNC, +++#endif ++ SHOW_NET_COMPRESSION, ++ SHOW_RPL_STATUS, SHOW_SLAVE_RUNNING, SHOW_SLAVE_RETRIED_TRANS, ++ SHOW_KEY_CACHE_LONG, SHOW_KEY_CACHE_CONST_LONG, SHOW_KEY_CACHE_LONGLONG, ++--- mysql-5.0.67/sql/sql_show.cc 2008-08-04 23:20:11.000000000 +1100 +++++ mysql-5.0.67-sphinx/sql/sql_show.cc 2009-02-14 09:15:48.000000000 +1000 ++@@ -1473,6 +1473,16 @@ ++ value= (char*) ((sys_var*) value)->value_ptr(thd, value_type, ++ &null_lex_str); ++ } +++ #ifdef HAVE_SPHINX_DB +++ else if (show_type == SHOW_SPHINX_FUNC) +++ { +++ SHOW_VAR var; +++ ((int (*)(THD *, SHOW_VAR *, char *))value)(thd, &var, buff); +++ +++ value = var.value; +++ show_type = var.type; +++ } +++ #endif /* HAVE_SPHINX_DB */ ++ ++ pos= end= buff; ++ switch (show_type) { +diff -uNr mysql-5.1.49.orig/storage/sphinx/sphinx.5.0.91.diff mysql-5.1.49/storage/sphinx/sphinx.5.0.91.diff +--- mysql-5.1.49.orig/storage/sphinx/sphinx.5.0.91.diff 1970-01-01 09:00:00.000000000 +0900 ++++ mysql-5.1.49/storage/sphinx/sphinx.5.0.91.diff 2010-07-07 05:03:30.000000000 +0900 +@@ -0,0 +1,400 @@ ++diff -r 319c65835581 CMakeLists.txt ++--- a/CMakeLists.txt Sun Jun 20 15:15:01 2010 +0400 +++++ b/CMakeLists.txt Sun Jun 20 15:59:31 2010 +0400 ++@@ -70,6 +70,10 @@ ++ ADD_DEFINITIONS(-DHAVE_INNOBASE_DB) ++ ENDIF(WITH_INNOBASE_STORAGE_ENGINE) ++ +++IF(WITH_SPHINX_STORAGE_ENGINE) +++ ADD_DEFINITIONS(-DHAVE_SPHINX_DB) +++ENDIF(WITH_SPHINX_STORAGE_ENGINE) +++ ++ SET(localstatedir "C:\\mysql\\data") ++ CONFIGURE_FILE(${CMAKE_SOURCE_DIR}/support-files/my-huge.cnf.sh ++ ${CMAKE_SOURCE_DIR}/support-files/my-huge.ini @ONLY) ++diff -r 319c65835581 configure.in ++--- a/configure.in Sun Jun 20 15:15:01 2010 +0400 +++++ b/configure.in Sun Jun 20 15:59:31 2010 +0400 ++@@ -60,6 +60,7 @@ ++ sinclude(config/ac-macros/ha_berkeley.m4) ++ sinclude(config/ac-macros/ha_blackhole.m4) ++ sinclude(config/ac-macros/ha_example.m4) +++sinclude(config/ac-macros/ha_sphinx.m4) ++ sinclude(config/ac-macros/ha_federated.m4) ++ sinclude(config/ac-macros/ha_innodb.m4) ++ sinclude(config/ac-macros/ha_ndbcluster.m4) ++@@ -2696,6 +2697,7 @@ ++ MYSQL_CHECK_BDB ++ MYSQL_CHECK_INNODB ++ MYSQL_CHECK_EXAMPLEDB +++MYSQL_CHECK_SPHINXDB ++ MYSQL_CHECK_ARCHIVEDB ++ MYSQL_CHECK_CSVDB ++ MYSQL_CHECK_BLACKHOLEDB ++diff -r 319c65835581 libmysqld/Makefile.am ++--- a/libmysqld/Makefile.am Sun Jun 20 15:15:01 2010 +0400 +++++ b/libmysqld/Makefile.am Sun Jun 20 15:59:31 2010 +0400 ++@@ -29,6 +29,7 @@ ++ -I$(top_builddir)/include -I$(top_srcdir)/include \ ++ -I$(top_builddir)/sql -I$(top_srcdir)/sql \ ++ -I$(top_srcdir)/sql/examples \ +++ -I$(top_srcdir)/sql/sphinx \ ++ -I$(top_srcdir)/regex \ ++ $(openssl_includes) @ZLIB_INCLUDES@ ++ ++@@ -39,6 +40,7 @@ ++ libmysqlsources = errmsg.c get_password.c libmysql.c client.c pack.c \ ++ my_time.c ++ sqlexamplessources = ha_example.cc ha_tina.cc +++sqlsphinxsources = ha_sphinx.cc ++ ++ noinst_HEADERS = embedded_priv.h emb_qcache.h ++ ++@@ -67,7 +69,7 @@ ++ parse_file.cc sql_view.cc sql_trigger.cc my_decimal.cc \ ++ ha_blackhole.cc ha_archive.cc my_user.c ++ ++-libmysqld_int_a_SOURCES= $(libmysqld_sources) $(libmysqlsources) $(sqlsources) $(sqlexamplessources) +++libmysqld_int_a_SOURCES= $(libmysqld_sources) $(libmysqlsources) $(sqlsources) $(sqlexamplessources) $(sqlsphinxsources) ++ libmysqld_a_SOURCES= ++ ++ # automake misses these ++@@ -147,12 +149,16 @@ ++ rm -f $$f; \ ++ @LN_CP_F@ $(top_srcdir)/sql/examples/$$f $$f; \ ++ done; \ +++ for f in $(sqlsphinxsources); do \ +++ rm -f $$f; \ +++ @LN_CP_F@ $(top_srcdir)/sql/sphinx/$$f $$f; \ +++ done; \ ++ rm -f client_settings.h; \ ++ @LN_CP_F@ $(top_srcdir)/libmysql/client_settings.h client_settings.h ++ ++ ++ clean-local: ++- rm -f `echo $(sqlsources) $(libmysqlsources) $(sqlexamplessources) | sed "s;\.lo;.c;g"` \ +++ rm -f `echo $(sqlsources) $(libmysqlsources) $(sqlexamplessources) $(sqlsphinxsources) | sed "s;\.lo;.c;g"` \ ++ $(top_srcdir)/linked_libmysqld_sources; \ ++ rm -f client_settings.h ++ ++diff -r 319c65835581 sql/CMakeLists.txt ++--- a/sql/CMakeLists.txt Sun Jun 20 15:15:01 2010 +0400 +++++ b/sql/CMakeLists.txt Sun Jun 20 15:59:31 2010 +0400 ++@@ -50,6 +50,7 @@ ++ filesort.cc gstream.cc ha_blackhole.cc ++ ha_archive.cc ha_heap.cc ha_myisam.cc ha_myisammrg.cc ++ ha_innodb.cc ha_federated.cc ha_berkeley.cc +++ sphinx/ha_sphinx.cc ++ handler.cc hash_filo.cc hash_filo.h ++ hostname.cc init.cc item.cc item_buff.cc item_cmpfunc.cc ++ item_create.cc item_func.cc item_geofunc.cc item_row.cc ++diff -r 319c65835581 sql/Makefile.am ++--- a/sql/Makefile.am Sun Jun 20 15:15:01 2010 +0400 +++++ b/sql/Makefile.am Sun Jun 20 15:59:31 2010 +0400 ++@@ -68,6 +68,7 @@ ++ sql_array.h sql_cursor.h \ ++ examples/ha_example.h ha_archive.h \ ++ examples/ha_tina.h ha_blackhole.h \ +++ sphinx/ha_sphinx.h \ ++ ha_federated.h ++ mysqld_SOURCES = sql_lex.cc sql_handler.cc \ ++ item.cc item_sum.cc item_buff.cc item_func.cc \ ++@@ -105,6 +106,7 @@ ++ sp_cache.cc parse_file.cc sql_trigger.cc \ ++ examples/ha_example.cc ha_archive.cc \ ++ examples/ha_tina.cc ha_blackhole.cc \ +++ sphinx/ha_sphinx.cc \ ++ ha_federated.cc ++ ++ gen_lex_hash_SOURCES = gen_lex_hash.cc ++@@ -175,6 +177,10 @@ ++ udf_example_la_SOURCES= udf_example.c ++ udf_example_la_LDFLAGS= -module -rpath $(pkglibdir) ++ +++pkglib_LTLIBRARIES = sphinx/sphinx.la +++sphinx_sphinx_la_SOURCES = sphinx/snippets_udf.cc +++sphinx_sphinx_la_LDFLAGS = -module +++ ++ ++ # Don't update the files from bitkeeper ++ %::SCCS/s.% ++diff -r 319c65835581 sql/handler.cc ++--- a/sql/handler.cc Sun Jun 20 15:15:01 2010 +0400 +++++ b/sql/handler.cc Sun Jun 20 15:59:31 2010 +0400 ++@@ -77,6 +77,15 @@ ++ NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, ++ HTON_NO_FLAGS }; ++ #endif +++#ifdef HAVE_SPHINX_DB +++#include "sphinx/ha_sphinx.h" +++extern handlerton sphinx_hton; +++#else +++handlerton sphinx_hton = { "SPHINX", SHOW_OPTION_NO, "SPHINX storage engine", +++ DB_TYPE_SPHINX_DB, NULL, 0, 0, NULL, NULL, +++ NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, +++ HTON_NO_FLAGS }; +++#endif ++ #ifdef HAVE_INNOBASE_DB ++ #include "ha_innodb.h" ++ extern handlerton innobase_hton; ++@@ -141,6 +150,7 @@ ++ &example_hton, ++ &archive_hton, ++ &tina_hton, +++ &sphinx_hton, ++ &ndbcluster_hton, ++ &federated_hton, ++ &myisammrg_hton, ++@@ -342,6 +352,12 @@ ++ return new (alloc) ha_tina(table); ++ return NULL; ++ #endif +++#ifdef HAVE_SPHINX_DB +++ case DB_TYPE_SPHINX_DB: +++ if (have_sphinx_db == SHOW_OPTION_YES) +++ return new (alloc) ha_sphinx(table); +++ return NULL; +++#endif ++ #ifdef HAVE_NDBCLUSTER_DB ++ case DB_TYPE_NDBCLUSTER: ++ if (have_ndbcluster == SHOW_OPTION_YES) ++diff -r 319c65835581 sql/handler.h ++--- a/sql/handler.h Sun Jun 20 15:15:01 2010 +0400 +++++ b/sql/handler.h Sun Jun 20 15:59:31 2010 +0400 ++@@ -186,8 +186,9 @@ ++ DB_TYPE_BERKELEY_DB, DB_TYPE_INNODB, ++ DB_TYPE_GEMINI, DB_TYPE_NDBCLUSTER, ++ DB_TYPE_EXAMPLE_DB, DB_TYPE_ARCHIVE_DB, DB_TYPE_CSV_DB, ++- DB_TYPE_FEDERATED_DB, +++ DB_TYPE_FEDERATED_DB, ++ DB_TYPE_BLACKHOLE_DB, +++ DB_TYPE_SPHINX_DB, ++ DB_TYPE_DEFAULT // Must be last ++ }; ++ ++diff -r 319c65835581 sql/mysql_priv.h ++--- a/sql/mysql_priv.h Sun Jun 20 15:15:01 2010 +0400 +++++ b/sql/mysql_priv.h Sun Jun 20 15:59:31 2010 +0400 ++@@ -1462,6 +1462,12 @@ ++ #else ++ extern SHOW_COMP_OPTION have_csv_db; ++ #endif +++#ifdef HAVE_SPHINX_DB +++extern handlerton sphinx_hton; +++#define have_sphinx_db sphinx_hton.state +++#else +++extern SHOW_COMP_OPTION have_sphinx_db; +++#endif ++ #ifdef HAVE_FEDERATED_DB ++ extern handlerton federated_hton; ++ #define have_federated_db federated_hton.state ++diff -r 319c65835581 sql/mysqld.cc ++--- a/sql/mysqld.cc Sun Jun 20 15:15:01 2010 +0400 +++++ b/sql/mysqld.cc Sun Jun 20 15:59:31 2010 +0400 ++@@ -36,6 +36,10 @@ ++ #include <sys/prctl.h> ++ #endif ++ +++#ifdef HAVE_SPHINX_DB +++#include "sphinx/ha_sphinx.h" +++#endif +++ ++ #ifdef HAVE_INNOBASE_DB ++ #define OPT_INNODB_DEFAULT 1 ++ #else ++@@ -6721,6 +6725,13 @@ ++ #ifdef COMMUNITY_SERVER ++ {"Uptime_since_flush_status",(char*) 0, SHOW_FLUSHTIME}, ++ #endif +++#ifdef HAVE_SPHINX_DB +++ {"sphinx_total", (char *)sphinx_showfunc_total, SHOW_SPHINX_FUNC}, +++ {"sphinx_total_found", (char *)sphinx_showfunc_total_found, SHOW_SPHINX_FUNC}, +++ {"sphinx_time", (char *)sphinx_showfunc_time, SHOW_SPHINX_FUNC}, +++ {"sphinx_word_count", (char *)sphinx_showfunc_word_count, SHOW_SPHINX_FUNC}, +++ {"sphinx_words", (char *)sphinx_showfunc_words, SHOW_SPHINX_FUNC}, +++#endif ++ {NullS, NullS, SHOW_LONG} ++ }; ++ ++@@ -6964,6 +6975,11 @@ ++ #else ++ have_csv_db= SHOW_OPTION_NO; ++ #endif +++#ifdef HAVE_SPHINX_DB +++ have_sphinx_db= SHOW_OPTION_YES; +++#else +++ have_sphinx_db= SHOW_OPTION_NO; +++#endif ++ #ifdef HAVE_NDBCLUSTER_DB ++ have_ndbcluster=SHOW_OPTION_DISABLED; ++ #else ++@@ -8087,6 +8103,7 @@ ++ #undef have_example_db ++ #undef have_archive_db ++ #undef have_csv_db +++#undef have_sphinx_db ++ #undef have_federated_db ++ #undef have_partition_db ++ #undef have_blackhole_db ++@@ -8097,6 +8114,7 @@ ++ SHOW_COMP_OPTION have_example_db= SHOW_OPTION_NO; ++ SHOW_COMP_OPTION have_archive_db= SHOW_OPTION_NO; ++ SHOW_COMP_OPTION have_csv_db= SHOW_OPTION_NO; +++SHOW_COMP_OPTION have_sphinx_db= SHOW_OPTION_NO; ++ SHOW_COMP_OPTION have_federated_db= SHOW_OPTION_NO; ++ SHOW_COMP_OPTION have_partition_db= SHOW_OPTION_NO; ++ SHOW_COMP_OPTION have_blackhole_db= SHOW_OPTION_NO; ++diff -r 319c65835581 sql/set_var.cc ++--- a/sql/set_var.cc Sun Jun 20 15:15:01 2010 +0400 +++++ b/sql/set_var.cc Sun Jun 20 15:59:31 2010 +0400 ++@@ -913,6 +913,7 @@ ++ {"have_profiling", (char*) &have_profiling, SHOW_HAVE}, ++ {"have_crypt", (char*) &have_crypt, SHOW_HAVE}, ++ {"have_csv", (char*) &have_csv_db, SHOW_HAVE}, +++ {"have_sphinx", (char*) &have_sphinx_db, SHOW_HAVE}, ++ {"have_dynamic_loading", (char*) &have_dlopen, SHOW_HAVE}, ++ {"have_example_engine", (char*) &have_example_db, SHOW_HAVE}, ++ {"have_federated_engine", (char*) &have_federated_db, SHOW_HAVE}, ++diff -r 319c65835581 sql/sql_lex.h ++--- a/sql/sql_lex.h Sun Jun 20 15:15:01 2010 +0400 +++++ b/sql/sql_lex.h Sun Jun 20 15:59:31 2010 +0400 ++@@ -57,6 +57,7 @@ ++ SQLCOM_SHOW_DATABASES, SQLCOM_SHOW_TABLES, SQLCOM_SHOW_FIELDS, ++ SQLCOM_SHOW_KEYS, SQLCOM_SHOW_VARIABLES, SQLCOM_SHOW_LOGS, SQLCOM_SHOW_STATUS, ++ SQLCOM_SHOW_INNODB_STATUS, SQLCOM_SHOW_NDBCLUSTER_STATUS, SQLCOM_SHOW_MUTEX_STATUS, +++ SQLCOM_SHOW_SPHINX_STATUS, ++ SQLCOM_SHOW_PROCESSLIST, SQLCOM_SHOW_MASTER_STAT, SQLCOM_SHOW_SLAVE_STAT, ++ SQLCOM_SHOW_GRANTS, SQLCOM_SHOW_CREATE, SQLCOM_SHOW_CHARSETS, ++ SQLCOM_SHOW_COLLATIONS, SQLCOM_SHOW_CREATE_DB, SQLCOM_SHOW_TABLE_STATUS, ++diff -r 319c65835581 sql/sql_parse.cc ++--- a/sql/sql_parse.cc Sun Jun 20 15:15:01 2010 +0400 +++++ b/sql/sql_parse.cc Sun Jun 20 15:59:31 2010 +0400 ++@@ -24,6 +24,9 @@ ++ #ifdef HAVE_INNOBASE_DB ++ #include "ha_innodb.h" ++ #endif +++#ifdef HAVE_SPHINX_DB +++#include "sphinx/ha_sphinx.h" +++#endif ++ ++ #ifdef HAVE_NDBCLUSTER_DB ++ #include "ha_ndbcluster.h" ++@@ -3166,6 +3169,15 @@ ++ break; ++ } ++ #endif +++#ifdef HAVE_SPHINX_DB +++ case SQLCOM_SHOW_SPHINX_STATUS: +++ { +++ if (check_global_access(thd, SUPER_ACL)) +++ goto error; +++ res = sphinx_show_status(thd); +++ break; +++ } +++#endif ++ #ifdef HAVE_REPLICATION ++ case SQLCOM_LOAD_MASTER_TABLE: ++ { ++diff -r 319c65835581 sql/sql_show.cc ++--- a/sql/sql_show.cc Sun Jun 20 15:15:01 2010 +0400 +++++ b/sql/sql_show.cc Sun Jun 20 15:59:31 2010 +0400 ++@@ -1500,6 +1500,16 @@ ++ value= (char*) var->value_ptr(thd, value_type, &null_lex_str); ++ charset= var->charset(thd); ++ } +++ #ifdef HAVE_SPHINX_DB +++ else if (show_type == SHOW_SPHINX_FUNC) +++ { +++ SHOW_VAR var; +++ ((int (*)(THD *, SHOW_VAR *, char *))value)(thd, &var, buff); +++ +++ value = var.value; +++ show_type = var.type; +++ } +++ #endif /* HAVE_SPHINX_DB */ ++ ++ pos= end= buff; ++ switch (show_type) { ++diff -r 319c65835581 sql/sql_yacc.yy ++--- a/sql/sql_yacc.yy Sun Jun 20 15:15:01 2010 +0400 +++++ b/sql/sql_yacc.yy Sun Jun 20 15:59:31 2010 +0400 ++@@ -8342,6 +8342,9 @@ ++ case DB_TYPE_INNODB: ++ Lex->sql_command = SQLCOM_SHOW_INNODB_STATUS; ++ break; +++ case DB_TYPE_SPHINX_DB: +++ Lex->sql_command = SQLCOM_SHOW_SPHINX_STATUS; +++ break; ++ default: ++ my_error(ER_NOT_SUPPORTED_YET, MYF(0), "STATUS"); ++ MYSQL_YYABORT; ++diff -r 319c65835581 sql/sql_yacc.cc ++--- a/sql/sql_yacc.cc Sun Jun 20 15:15:01 2010 +0400 +++++ b/sql/sql_yacc.cc Sun Jun 20 15:59:31 2010 +0400 ++@@ -27003,6 +27003,9 @@ ++ case DB_TYPE_INNODB: ++ Lex->sql_command = SQLCOM_SHOW_INNODB_STATUS; ++ break; +++ case DB_TYPE_SPHINX_DB: +++ Lex->sql_command = SQLCOM_SHOW_SPHINX_STATUS; +++ break; ++ default: ++ my_error(ER_NOT_SUPPORTED_YET, MYF(0), "STATUS"); ++ MYSQL_YYABORT; ++diff -r 319c65835581 sql/structs.h ++--- a/sql/structs.h Sun Jun 20 15:15:01 2010 +0400 +++++ b/sql/structs.h Sun Jun 20 15:59:31 2010 +0400 ++@@ -194,6 +194,9 @@ ++ SHOW_SSL_CTX_SESS_TIMEOUTS, SHOW_SSL_CTX_SESS_CACHE_FULL, ++ SHOW_SSL_GET_CIPHER_LIST, ++ #endif /* HAVE_OPENSSL */ +++#ifdef HAVE_SPHINX_DB +++ SHOW_SPHINX_FUNC, +++#endif ++ SHOW_NET_COMPRESSION, ++ SHOW_RPL_STATUS, SHOW_SLAVE_RUNNING, SHOW_SLAVE_RETRIED_TRANS, ++ SHOW_KEY_CACHE_LONG, SHOW_KEY_CACHE_CONST_LONG, SHOW_KEY_CACHE_LONGLONG, ++diff -r 319c65835581 win/configure.js ++--- a/win/configure.js Sun Jun 20 15:15:01 2010 +0400 +++++ b/win/configure.js Sun Jun 20 15:59:31 2010 +0400 ++@@ -45,6 +45,7 @@ ++ case "WITH_EXAMPLE_STORAGE_ENGINE": ++ case "WITH_FEDERATED_STORAGE_ENGINE": ++ case "WITH_INNOBASE_STORAGE_ENGINE": +++ case "WITH_SPHINX_STORAGE_ENGINE": ++ case "__NT__": ++ case "DISABLE_GRANT_OPTIONS": ++ case "EMBED_MANIFESTS": ++--- mysql-5.0.67/config/ac-macros/ha_sphinx.m4 1970-01-01 10:00:00.000000000 +1000 +++++ mysql-5.0.67-sphinx/config/ac-macros/ha_sphinx.m4 2009-02-14 09:15:48.000000000 +1000 ++@@ -0,0 +1,30 @@ +++dnl --------------------------------------------------------------------------- +++dnl Macro: MYSQL_CHECK_EXAMPLEDB +++dnl Sets HAVE_SPHINX_DB if --with-sphinx-storage-engine is used +++dnl --------------------------------------------------------------------------- +++AC_DEFUN([MYSQL_CHECK_SPHINXDB], [ +++ AC_ARG_WITH([sphinx-storage-engine], +++ [ +++ --with-sphinx-storage-engine +++ Enable the Sphinx Storage Engine], +++ [sphinxdb="$withval"], +++ [sphinxdb=no]) +++ AC_MSG_CHECKING([for example storage engine]) +++ +++ case "$sphinxdb" in +++ yes ) +++ AC_DEFINE([HAVE_SPHINX_DB], [1], [Builds Sphinx Engine]) +++ AC_MSG_RESULT([yes]) +++ [sphinxdb=yes] +++ ;; +++ * ) +++ AC_MSG_RESULT([no]) +++ [sphinxdb=no] +++ ;; +++ esac +++ +++]) +++dnl --------------------------------------------------------------------------- +++dnl END OF MYSQL_CHECK_EXAMPLE SECTION +++dnl --------------------------------------------------------------------------- +++ diff --git a/component/mysql-5.1/mysql_create_system_tables__no_test.patch b/component/mysql-5.1/mysql_create_system_tables__no_test.patch deleted file mode 100644 index 0087e1758..000000000 --- a/component/mysql-5.1/mysql_create_system_tables__no_test.patch +++ /dev/null @@ -1,26 +0,0 @@ -# 33_scripts__mysql_create_system_tables__no_test.dpatch by <ch@debian.org> - -A user with no password prevents a normal user from login under certain -circumstances as it is checked first. -See http://bugs.debian.org/301741 -and http://bugs.mysql.com/bug.php?id=6901 - ---- scripts/mysql_system_tables_data.sql 2008-12-04 22:59:44.000000000 +0100 -+++ scripts/mysql_system_tables_data.sql 2008-12-04 23:00:07.000000000 +0100 -@@ -11,8 +11,6 @@ - -- Fill "db" table with default grants for anyone to - -- access database 'test' and 'test_%' if "db" table didn't exist - CREATE TEMPORARY TABLE tmp_db LIKE db; --INSERT INTO tmp_db VALUES ('%','test','','Y','Y','Y','Y','Y','Y','N','Y','Y','Y','Y','Y','Y','Y','Y','N','N','Y','Y'); --INSERT INTO tmp_db VALUES ('%','test\_%','','Y','Y','Y','Y','Y','Y','N','Y','Y','Y','Y','Y','Y','Y','Y','N','N','Y','Y'); - INSERT INTO db SELECT * FROM tmp_db WHERE @had_db_table=0; - DROP TABLE tmp_db; - -@@ -24,7 +22,5 @@ - INSERT INTO tmp_user VALUES ('localhost','root','','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','','','','',0,0,0,0); - REPLACE INTO tmp_user SELECT @current_hostname,'root','','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','','','','',0,0,0,0 FROM dual WHERE LOWER( @current_hostname) != 'localhost'; - REPLACE INTO tmp_user VALUES ('127.0.0.1','root','','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','','','','',0,0,0,0); --INSERT INTO tmp_user (host,user) VALUES ('localhost',''); --INSERT INTO tmp_user (host,user) SELECT @current_hostname,'' FROM dual WHERE LOWER(@current_hostname ) != 'localhost'; - INSERT INTO user SELECT * FROM tmp_user WHERE @had_user_table=0; - DROP TABLE tmp_user; diff --git a/component/mysql-5.5/buildout.cfg b/component/mysql-5.5/buildout.cfg deleted file mode 100644 index 1c55e0ea1..000000000 --- a/component/mysql-5.5/buildout.cfg +++ /dev/null @@ -1,76 +0,0 @@ -[buildout] -extends = - ../autoconf/buildout.cfg - ../automake/buildout.cfg - ../bison/buildout.cfg - ../cmake/buildout.cfg - ../groonga/buildout.cfg - ../libaio/buildout.cfg - ../libtool/buildout.cfg - ../ncurses/buildout.cfg - ../pkgconfig/buildout.cfg - ../zlib/buildout.cfg - -parts = - mysql-5.5 - -[mysql-5.5-sphinx-patch] -# this patch comes from sphinx-2.0.1-beta including changes for -# MySQL-5.5 in -# http://code.google.com/p/sphinxsearch/source/detail?r=2921 -recipe = hexagonit.recipe.download -url = ${:_profile_base_location_}/${:filename} -md5sum = 04549822ebfa91b5f84025ff49ef24c2 -filename = mysql-5.5-sphinx-2.0.1-beta.diff -download-only = true - -[mysql-5.5-no_test-patch] -recipe = hexagonit.recipe.download -url = ${:_profile_base_location_}/${:filename} -md5sum = bb7ee34b9a98da1f913566c63ffbc6f5 -filename = mysql_create_system_tables__no_test.patch -download-only = true - -[mysql-5.5] -recipe = hexagonit.recipe.cmmi -version = 5.5.16 -url = http://mysql.he.net/Downloads/MySQL-5.5/mysql-${:version}.tar.gz -md5sum = 462ab3752dd666ec06ca32f92673b59e -# compile directory is required to build mysql plugins. -keep-compile-dir = true -patch-options = -p0 -patches = - ${mysql-5.5-sphinx-patch:location}/${mysql-5.5-sphinx-patch:filename} - ${mysql-5.5-no_test-patch:location}/${mysql-5.5-no_test-patch:filename} -configure-command = ${cmake:location}/bin/cmake -# we use embeded yassl instead of openssl to avoid compilation errors on sphinx search engine. -configure-options = - -DCMAKE_INSTALL_PREFIX=${buildout:parts-directory}/${:_buildout_section_name_} - -DBUILD_CONFIG=mysql_release - -DDEFAULT_CHARSET=utf8 - -DDEFAULT_COLLATION=utf8_unicode_ci - -DWITH_SSL=bundled - -DWITH_ZLIB=system - -DWITHOUT_EXAMPLE_STORAGE_ENGINE=1 - -DWITHOUT_DAEMON_EXAMPLE=1 - -DWITH_SPHINX_STORAGE_ENGINE=1 - -DCMAKE_C_FLAGS="-I${libaio:location}/include -I${ncurses:location}/include -I${zlib:location}/include" - -DCMAKE_INSTALL_RPATH=${libaio:location}/lib:${ncurses:location}/lib:${zlib:location}/lib -environment = - CMAKE_PROGRAM_PATH=${autoconf:location}/bin:${automake-1.11:location}/bin:${cmake:location}/bin:${libtool:location}/bin:${bison:location}/bin:${flex:location}/bin - CMAKE_INCLUDE_PATH=${libaio:location}/include:${ncurses:location}/include:${zlib:location}/include - CMAKE_LIBRARY_PATH=${libaio:location}/lib:${ncurses:location}/lib:${zlib:location}/lib - LDFLAGS=-L${libaio:location}/lib - -[groonga-storage-engine-mysql-5.5] -recipe = hexagonit.recipe.cmmi -url = http://github.com/downloads/mroonga/mroonga/groonga-storage-engine-1.0.0.tar.gz -md5sum = 289b8b7919e790599ea79b6fe9270e04 -configure-options = - --with-mysql-source=${mysql-5.5:location}__compile__/mysql-${mysql-5.5:version} - --with-mysql-config=${mysql-5.5:location}/bin/mysql_config -environment = - PATH=${groonga:location}/bin:${pkgconfig:location}/bin:%(PATH)s - CPPFLAGS=-I${groonga:location}/include/groonga - LDFLAGS=-L${groonga:location}/lib - PKG_CONFIG_PATH=${groonga:location}/lib/pkgconfig diff --git a/component/mysql-5.5/mysql_create_system_tables__no_test.patch b/component/mysql-5.5/mysql_create_system_tables__no_test.patch deleted file mode 100644 index 8d917ea1a..000000000 --- a/component/mysql-5.5/mysql_create_system_tables__no_test.patch +++ /dev/null @@ -1,27 +0,0 @@ -# 33_scripts__mysql_create_system_tables__no_test.dpatch by <ch@debian.org> - -A user with no password prevents a normal user from login under certain -circumstances as it is checked first. -See http://bugs.debian.org/301741 -and http://bugs.mysql.com/bug.php?id=6901 - ---- scripts/mysql_system_tables_data.sql 2008-12-04 22:59:44.000000000 +0100 -+++ scripts/mysql_system_tables_data.sql 2008-12-04 23:00:07.000000000 +0100 -@@ -26,8 +26,6 @@ - -- Fill "db" table with default grants for anyone to - -- access database 'test' and 'test_%' if "db" table didn't exist - CREATE TEMPORARY TABLE tmp_db LIKE db; --INSERT INTO tmp_db VALUES ('%','test','','Y','Y','Y','Y','Y','Y','N','Y','Y','Y','Y','Y','Y','Y','Y','N','N','Y','Y'); --INSERT INTO tmp_db VALUES ('%','test\_%','','Y','Y','Y','Y','Y','Y','N','Y','Y','Y','Y','Y','Y','Y','Y','N','N','Y','Y'); - INSERT INTO db SELECT * FROM tmp_db WHERE @had_db_table=0; - DROP TABLE tmp_db; - -@@ -40,8 +38,6 @@ - REPLACE INTO tmp_user SELECT @current_hostname,'root','','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','','','','',0,0,0,0,'','' FROM dual WHERE LOWER( @current_hostname) != 'localhost'; - REPLACE INTO tmp_user VALUES ('127.0.0.1','root','','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','','','','',0,0,0,0,'',''); - REPLACE INTO tmp_user VALUES ('::1','root','','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','','','','',0,0,0,0,'',''); --INSERT INTO tmp_user (host,user) VALUES ('localhost',''); --INSERT INTO tmp_user (host,user) SELECT @current_hostname,'' FROM dual WHERE LOWER(@current_hostname ) != 'localhost'; - INSERT INTO user SELECT * FROM tmp_user WHERE @had_user_table=0; - DROP TABLE tmp_user; - diff --git a/component/mysql-tritonn-5.0/buildout.cfg b/component/mysql-tritonn-5.0/buildout.cfg index d5d0ecd0d..6514d768e 100644 --- a/component/mysql-tritonn-5.0/buildout.cfg +++ b/component/mysql-tritonn-5.0/buildout.cfg @@ -76,6 +76,7 @@ configure-options = --enable-assembler --without-readline --with-sphinx-storage-engine + --with-named-curses-libs=${ncurses:location}/lib/libncurses.so --with-zlib-dir=${zlib:location} make-options = @@ -88,5 +89,5 @@ patches = ${mysql-5.0-sphinx-patch:location}/${mysql-5.0-sphinx-patch:filename} environment = PATH=${senna:location}/bin:${autoconf:location}/bin:${automake-1.11:location}/bin:${libtool:location}/bin:${bison:location}/bin:${flex:location}/bin:%(PATH)s - CPPFLAGS=-I${senna:location}/include/senna -I${ncurses:location}/include -I${readline5:location}/include - LDFLAGS=-L${senna:location}/lib -L${readline5:location}/lib -L${ncurses:location}/lib -Wl,-rpath=${zlib:location}/lib -Wl,-rpath=${openssl:location}/lib -Wl,-rpath=${ncurses:location}/lib -Wl,-rpath=${readline5:location}/lib + CPPFLAGS=-I${senna:location}/include/senna -I${ncurses:location}/include -I${readline:location}/include + LDFLAGS=-L${senna:location}/lib -L${readline:location}/lib -Wl,-rpath=${zlib:location}/lib -Wl,-rpath=${openssl:location}/lib -Wl,-rpath=${ncurses:location}/lib -Wl,-rpath=${readline:location}/lib diff --git a/component/ncurses/buildout.cfg b/component/ncurses/buildout.cfg index 63dea9283..3944e6318 100644 --- a/component/ncurses/buildout.cfg +++ b/component/ncurses/buildout.cfg @@ -15,9 +15,10 @@ configure-options = --enable-rpath # tricky way to rerun with --enable-widec make-targets = - install && (for i in curses unctrl eti form menu panel term; do ln -sf ncurses/$i.h ${buildout:parts-directory}/${:_buildout_section_name_}/include/$i.h; done; ln -sf libncurses.so ${buildout:parts-directory}/${:_buildout_section_name_}/lib/libcurses.so) && ./configure ${:configure-options} --enable-widec && make ${:make-options} install + install && (for i in curses unctrl eti form menu panel term; do ln -sf ncurses/$i.h ${buildout:parts-directory}/${:_buildout_section_name_}/include/$i.h; done) && ./configure ${:configure-options} --enable-widec && make install # pass dummy LDCONFIG to skip needless calling of ldconfig by non-root user environment = + LDFLAGS =-Wl,--as-needed LDCONFIG=/bin/echo make-options = -j1 diff --git a/component/nspr/buildout.cfg b/component/nspr/buildout.cfg deleted file mode 100644 index cd027e57e..000000000 --- a/component/nspr/buildout.cfg +++ /dev/null @@ -1,25 +0,0 @@ -[buildout] -parts = nspr - -[nspr-pkgconfig-patch-download] -recipe = hexagonit.recipe.download -filename = nspr-4.8.6-pkgconfig-1.patch -url = http://www.linuxfromscratch.org/patches/blfs/svn/${:filename} -md5sum = 7c00beff0475314f59214842509e407f -download-only = true - -[nspr] -recipe = hexagonit.recipe.cmmi -url = https://ftp.mozilla.org/pub/mozilla.org/nspr/releases/v4.8.7/src/nspr-4.8.7.tar.gz -md5sum = 97e30989a56ab813453b71261849c200 -patches = ${nspr-pkgconfig-patch-download:location}/${nspr-pkgconfig-patch-download:filename} -patch-options = -p1 -configure-command = - cd mozilla/nsprpub - ./configure -configure-options = - --prefix=${buildout:parts-directory}/${:_buildout_section_name_} - --with-mozilla - --enable-64bit -make-options = - -C mozilla/nsprpub diff --git a/component/nss/buildout.cfg b/component/nss/buildout.cfg deleted file mode 100644 index 99aa83c87..000000000 --- a/component/nss/buildout.cfg +++ /dev/null @@ -1,67 +0,0 @@ -[buildout] -extends = - https://svn.erp5.org/repos/public/erp5/trunk/buildout/software-profiles/zlib.cfg - nspr.cfg - sed.cfg -parts = - nss - -[nss-patch] -recipe = hexagonit.recipe.download -filename = nss-3.12.9-with-nspr-4.8.7-1.patch -url = http://www.linuxfromscratch.org/patches/blfs/svn/nss-3.12.8-standalone-1.patch -md5sum = ee7b5966961bef16ca896435e78652d3 -download-only = true - -[nss-download] -recipe = hexagonit.recipe.download -url = ftp://ftp.mozilla.org/pub/mozilla.org/security/nss/releases/NSS_3_12_9_RTM/src/nss-3.12.9.tar.gz -md5sum = bd32f183ca28440c1744650be31a9ccc -strip-top-level-dir = true - -[nss] -recipe = plone.recipe.command -source = ${nss-download:location} -destination = ${buildout:parts-directory}/${:_buildout_section_name_} -location = ${buildout:parts-directory}/${:_buildout_section_name_} -compile-location = ${buildout:parts-directory}/${:_buildout_section_name_}_compile_ -stop-on-error = true -command = - rm -rf ${:destination} && - mkdir -p ${:destination} && - rm -rf ${:compile-location} && - cp -R ${:source} ${:compile-location} && - cd ${:compile-location} && - patch -Np1 -i ${nss-patch:location}/${nss-patch:filename} && - ${sed:location}/bin/sed -i "s/ZLIB_LIBS = -lz//g" ${:compile-location}/mozilla/security/coreconf/Linux.mk && - ${sed:location}/bin/sed -i "s/# INCLUDES += -I\/usr\/include -Y\/usr\/include\/linux/INCLUDES += \$(ZLIB_INCLUDE_DIR)/g" ${:compile-location}/mozilla/security/coreconf/Linux.mk && - gmake -C mozilla/security/nss \ - USE_64=1 \ - BUILD_OPT=1 \ - ZLIB_INCLUDE_DIR=-I${zlib:location}/include \ - ZLIB_LIBS="-lz -L${zlib:location}/lib -Wl,-rpath=${zlib:location}/lib" \ - NSPR_INCLUDE_DIR=${nspr:location}/include/nspr \ - NSPR_LIB_DIR="${nspr:location}/lib -Wl,-rpath=${nspr:location}/lib" \ - NSSUTIL_LIB_DIR="${:location}/lib -Wl,-rpath=${:location}/lib" \ - nss_build_all && - mkdir -p ${:destination}/bin && - mkdir -p ${:destination}/include/nss3 && - mkdir -p ${:destination}/lib/pkgconfig && - install -v -m755 ${:compile-location}/mozilla/dist/*.OBJ/lib/*.so ${:destination}/lib && - install -v -m644 ${:compile-location}/mozilla/dist/*.OBJ/lib/{*.chk,libcrmf.a} ${:destination}/lib && - install -v -m755 -d ${:destination}/include/nss && - install -v -m755 ${:compile-location}/mozilla/dist/*.OBJ/bin/{certutil,nss-config,pk12util} ${:destination}/bin && - install -v -m644 ${:compile-location}/mozilla/dist/*.OBJ/lib/pkgconfig/nss.pc ${:destination}/lib/pkgconfig && - cp -v -RL ${:compile-location}/mozilla/dist/{public,private}/nss/* ${:destination}/include/nss && - chmod 644 ${:destination}/include/nss/* && - cd ${buildout:parts-directory} && - rm -rf ${:compile-location} - -[nss-cmmi] -recipe = hexagonit.recipe.cmmi -path = ${nss-download:location}/mozilla/security/nss -configure-command = echo "No need to configure" -make-binary = gmake -make-options = USE_64=1 -make-targets = nss_build_all - diff --git a/component/openldap/buildout.cfg b/component/openldap/buildout.cfg index d8ea71c81..c09a66926 100644 --- a/component/openldap/buildout.cfg +++ b/component/openldap/buildout.cfg @@ -7,8 +7,8 @@ extends = [openldap] recipe = hexagonit.recipe.cmmi -url = ftp://ftp.openldap.org/pub/OpenLDAP/openldap-release/openldap-2.4.26.tgz -md5sum = f36f3086031dd56ae94f722ffae8df5e +url = ftp://ftp.openldap.org/pub/OpenLDAP/openldap-release/openldap-2.4.25.tgz +md5sum = ec63f9c2add59f323a0459128846905b configure-options = --disable-static --disable-slapd diff --git a/component/openssl/buildout.cfg b/component/openssl/buildout.cfg index 22398442b..a5b1b950e 100644 --- a/component/openssl/buildout.cfg +++ b/component/openssl/buildout.cfg @@ -5,27 +5,15 @@ [buildout] extends = - ../ca-certificates/buildout.cfg ../zlib/buildout.cfg parts = openssl -[openssl-nodoc.patch] -# Disable doc generation part in Makefile -recipe = hexagonit.recipe.download -md5sum = b4887a7b4e18402447bc6227d2493b92 -url = ${:_profile_base_location_}/${:filename} -filename = ${:_buildout_section_name_} -download-only = true - [openssl] recipe = hexagonit.recipe.cmmi -url = https://www.openssl.org/source/openssl-1.0.0g.tar.gz -md5sum = 07ecbe4324f140d157478637d6beccf1 -patches = - ${openssl-nodoc.patch:location}/${openssl-nodoc.patch:filename} -patch-options = -p0 +url = https://www.openssl.org/source/openssl-1.0.0e.tar.gz +md5sum = 7040b89c4c58c7a1016c0dfa6e821c86 configure-command = ./config configure-options = -I${zlib:location}/include @@ -39,7 +27,5 @@ configure-options = # it seems that parallel build sometimes fails for openssl. make-options = -j1 -make-targets = - install && rm -f ${buildout:parts-directory}/${:_buildout_section_name_}/etc/ssl/certs/* && for i in ${ca-certificates:location}/certs/*/*.crt; do ln -sv $i ${buildout:parts-directory}/${:_buildout_section_name_}/etc/ssl/certs/`${buildout:parts-directory}/${:_buildout_section_name_}/bin/openssl x509 -hash -noout -in $i`.0; done; true LDFLAGS="-Wl,-rpath=${zlib:location}/lib -Wl,-rpath=${buildout:parts-directory}/${:_buildout_section_name_}/lib" SHARED_LDFLAGS="-Wl,-rpath=${zlib:location}/lib -Wl,-rpath=${buildout:parts-directory}/${:_buildout_section_name_}/lib" diff --git a/component/openssl/openssl-nodoc.patch b/component/openssl/openssl-nodoc.patch deleted file mode 100644 index 084de6c53..000000000 --- a/component/openssl/openssl-nodoc.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- Makefile 2012-01-18 14:42:28.000000000 +0100 -+++ Makefile 2012-01-24 17:43:40.000000000 +0100 -@@ -494,7 +494,7 @@ - dist_pem_h: - (cd crypto/pem; $(MAKE) -e $(BUILDENV) pem.h; $(MAKE) clean) - --install: all install_docs install_sw -+install: all install_sw - - install_sw: - @$(PERL) $(TOP)/util/mkdir-p.pl $(INSTALL_PREFIX)$(INSTALLTOP)/bin \ diff --git a/component/opera/buildout.cfg b/component/opera/buildout.cfg deleted file mode 100644 index 01223165e..000000000 --- a/component/opera/buildout.cfg +++ /dev/null @@ -1,47 +0,0 @@ -[buildout] -# Work in progress -extends = - ../xorg/buildout.cfg - ../fontconfig/buildout.cfg - ../dbus/buildout.cfg - ../gtk-2/buildout.cfg - ../libpng/buildout.cfg - -parts = - opera - -[opera] -recipe = slapos.recipe.build -slapos_promise = - file:opera - -depends = - ${liberation-fonts:location} - ${ipaex-fonts:location} - -x86 = http://arc.opera.com/pub/opera/linux/1151/opera-11.51-1087.i386.linux.tar.bz2 91db21fc001e736a6432627fbf93062f -x86-64 = todohttp://arc.opera.com/pub/opera/linux/1151/opera-11.51-1087.i386.linux.tar.bz2 91db21fc001e736a6432627fbf93062f - -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") - wrapper_location = os.path.join("%(location)s", "opera-slapos") - wrapper = open(wrapper_location, 'w') - wrapper.write("""#!/bin/sh - cd %(location)s - export LD_LIBRARY_PATH=${libXrender:location}/lib/:${fontconfig:location}/lib/:${dbus:location}/lib/:${dbus-glib:location}/lib/:${pango:location}/lib:${cairo:location}/lib:${glib:location}/lib:${gtk-2:location}/lib:${atk:location}/lib:${gdk-pixbuf:location}/lib:${libXt:location}/lib:${libpng:location}/lib:${libSM:location}/lib:${libICE:location}/lib:%(location)s - export PATH=${fontconfig:location}/bin:$PATH - %(location)s/opera $*""") - wrapper.close() - profile_directory = os.path.join("%(location)s", "profile") - os.mkdir(profile_directory) - opera_config = open(os.path.join(profile_directory, "opera6.ini"), "w") - opera_config.write("""[State] - Reading Plugins=0 - Accept License=1 - Run=0""") - opera_config.close() - os.chmod(wrapper_location, 0766) - diff --git a/component/percona-toolkit/buildout.cfg b/component/percona-toolkit/buildout.cfg deleted file mode 100644 index 5b2047a8d..000000000 --- a/component/percona-toolkit/buildout.cfg +++ /dev/null @@ -1,16 +0,0 @@ -[buildout] -extends = - ../perl/buildout.cfg - ../perl-DBI/buildout.cfg - ../perl-DBD-mariadb/buildout.cfg -parts = - percona-toolkit - -[percona-toolkit] -recipe = hexagonit.recipe.cmmi -depends = - ${perl:version} -url = http://www.percona.com/redir/downloads/percona-toolkit/percona-toolkit-2.0.1.tar.gz -md5sum = 3a78c78672cb7c634bda35dfb2f817bf -configure-command = - ${perl:location}/bin/perl Makefile.PL diff --git a/component/perl-DBD-MySQL/buildout.cfg b/component/perl-DBD-MySQL/buildout.cfg index 8be6ddab2..f9475e66a 100644 --- a/component/perl-DBD-MySQL/buildout.cfg +++ b/component/perl-DBD-MySQL/buildout.cfg @@ -1,11 +1,20 @@ [buildout] extends = + ../perl/buildout.cfg + ../perl-DBI/buildout.cfg ../mysql-tritonn-5.0/buildout.cfg - ../perl-DBD-common/buildout.cfg - + ../zlib/buildout.cfg + ../openssl/buildout.cfg parts = perl-DBD-MySQL +[perl-DBD-MySQL-patch] +recipe = hexagonit.recipe.download +md5sum = e12e9233f20b0370cfcf5228ea767fbc +url = ${:_profile_base_location_}/${:filename} +filename = DBD-mysql-4.019.rpathsupport.patch +download-only = true + [perl-DBD-MySQL] recipe = hexagonit.recipe.cmmi version = 4.019 diff --git a/component/perl-DBD-common/DBD-mysql-4.019.rpathsupport.patch b/component/perl-DBD-common/DBD-mysql-4.019.rpathsupport.patch deleted file mode 100644 index 10370c7d5..000000000 --- a/component/perl-DBD-common/DBD-mysql-4.019.rpathsupport.patch +++ /dev/null @@ -1,19 +0,0 @@ ---- DBD-mysql-4.019.back/Makefile.PL 2011-05-09 03:12:07.000000000 +0200 -+++ DBD-mysql-4.019/Makefile.PL 2011-06-22 11:44:06.478371893 +0200 -@@ -358,7 +358,14 @@ - 'Data::Dumper' => 0 }; - } - --ExtUtils::MakeMaker::WriteMakefile(%o); -+ -+my %config; -+if (defined($ENV{'OTHERLDFLAGS'})) { -+ $config{dynamic_lib} = { OTHERLDFLAGS => " $ENV{'OTHERLDFLAGS'} " }; -+} -+ -+ -+ExtUtils::MakeMaker::WriteMakefile(%o, %config); - exit 0; - - - diff --git a/component/perl-DBD-common/buildout.cfg b/component/perl-DBD-common/buildout.cfg deleted file mode 100644 index 4f2229756..000000000 --- a/component/perl-DBD-common/buildout.cfg +++ /dev/null @@ -1,16 +0,0 @@ -# Please use perl-DBD-MySQL or perl-DBD-mariadb -[buildout] -extends = - ../perl/buildout.cfg - ../perl-DBI/buildout.cfg - ../zlib/buildout.cfg - ../openssl/buildout.cfg - -[perl-DBD-MySQL-patch] -recipe = hexagonit.recipe.download -md5sum = e12e9233f20b0370cfcf5228ea767fbc -url = ${:_profile_base_location_}/${:filename} -filename = DBD-mysql-4.019.rpathsupport.patch -download-only = true - - diff --git a/component/perl-DBD-mariadb/buildout.cfg b/component/perl-DBD-mariadb/buildout.cfg deleted file mode 100644 index ac379cb87..000000000 --- a/component/perl-DBD-mariadb/buildout.cfg +++ /dev/null @@ -1,23 +0,0 @@ -[buildout] -extends = - ../mariadb/buildout.cfg - ../perl-DBD-common/buildout.cfg - -parts = - perl-DBD-mariadb - -[perl-DBD-mariadb] -recipe = hexagonit.recipe.cmmi -version = 4.019 -depends = - ${perl:version} - ${perl-DBI:version} -url = http://search.cpan.org/CPAN/authors/id/C/CA/CAPTTOFU/DBD-mysql-4.019.tar.gz -md5sum = 566d98ab8ffac9626a31f6f6d455558e -patches = - ${perl-DBD-MySQL-patch:location}/${perl-DBD-MySQL-patch:filename} -patch-options = -p1 -configure-command = - ${perl:location}/bin/perl Makefile.PL --mysql_config=${mariadb:location}/bin/mysql_config -environment = - OTHERLDFLAGS=-Wl,-rpath=${zlib:location}/lib -Wl,-rpath=${mariadb:location}/lib/mysql -Wl,-rpath=${openssl:location}/lib \ No newline at end of file diff --git a/component/perl-XML-Parser/buildout.cfg b/component/perl-XML-Parser/buildout.cfg deleted file mode 100644 index b70813f62..000000000 --- a/component/perl-XML-Parser/buildout.cfg +++ /dev/null @@ -1,30 +0,0 @@ -[buildout] -extends = - ../libexpat/buildout.cfg - ../libxml2/buildout.cfg - ../perl/buildout.cfg - ../perl-libwww-perl/buildout.cfg - ../zlib/buildout.cfg -parts = - perl-XML-Parser - -[perl-XML-Parser] -recipe = hexagonit.recipe.cmmi -depends = - ${perl:version} - ${perl-libwww-perl:location} -url = http://search.cpan.org/CPAN/authors/id/M/MS/MSERGEANT/XML-Parser-2.36.tar.gz -md5sum = 1b868962b658bd87e1563ecd56498ded -configure-command = - ${perl:location}/bin/perl Makefile.PL \ - EXPATINCPATH=${libexpat:location}/include \ - EXPATLIBPATH=${libexpat:location}/lib \ - INC="-I${libxml2:location}/include/libxml2" \ - LIBS="-L${libxml2:location}/lib -L${zlib:location}/lib" -# Parallel make does not work for this package on fast machines -# with many cores -make-options = - OTHERLDFLAGS=" -Wl,-rpath=${libxml2:location}/lib -Wl,-rpath=${zlib:location}/lib" -j1 -environment = - LD_LIBRARY_PATH=${libxml2:location}/lib:${zlib:location}/lib - PERLLIB=blib/lib diff --git a/component/perl/buildout.cfg b/component/perl/buildout.cfg index c27ca6d56..8673f03b3 100644 --- a/component/perl/buildout.cfg +++ b/component/perl/buildout.cfg @@ -14,11 +14,9 @@ filename = ${:_buildout_section_name_} [perl] recipe = hexagonit.recipe.cmmi -depends = - ${gdbm:version} -version = 5.14.2 +version = 5.14.1 url = http://www.cpan.org/src/5.0/perl-${:version}.tar.bz2 -md5sum = 04a4c5d3c1f9f19d77daff8e8cd19a26 +md5sum = 97cd306a2c22929cc141a09568f43bb0 siteprefix = ${buildout:parts-directory}/site_${:_buildout_section_name_} patch-options = -p1 patches = diff --git a/component/pkgconfig/buildout.cfg b/component/pkgconfig/buildout.cfg index 0166d3938..210a555db 100644 --- a/component/pkgconfig/buildout.cfg +++ b/component/pkgconfig/buildout.cfg @@ -11,8 +11,8 @@ extends = [pkgconfig] recipe = hexagonit.recipe.cmmi -url = http://pkgconfig.freedesktop.org/releases/pkg-config-0.26.tar.gz -md5sum = 47525c26a9ba7ba14bf85e01509a7234 +url = http://pkgconfig.freedesktop.org/releases/pkg-config-0.25.tar.gz +md5sum = a3270bab3f4b69b7dc6dbdacbcae9745 location = ${buildout:parts-directory}/${:_buildout_section_name_} # build pkg-config twice so that second configure can use pkg-config # to compute GLIB_CFLAGS and GLIB_LIBS. @@ -27,5 +27,3 @@ environment = PKG_CONFIG_PATH=${glib:location}/lib/pkgconfig CPPFLAGS=-I${glib:location}/include -I${popt:location}/include LDFLAGS=-L${gettext:location}/lib -Wl,-rpath=${gettext:location}/lib -L${glib:location}/lib -Wl,-rpath=${glib:location}/lib -L${popt:location}/lib -Wl,-rpath=${popt:location}/lib - GLIB_CFLAGS=-I${glib:location}/include/glib-2.0 -I${glib:location}/lib/glib-2.0/include - GLIB_LIBS=-L${glib:location}/lib -lglib-2.0 -lintl diff --git a/component/pwgen/buildout.cfg b/component/pwgen/buildout.cfg deleted file mode 100644 index e7ad653d0..000000000 --- a/component/pwgen/buildout.cfg +++ /dev/null @@ -1,8 +0,0 @@ -[buildout] -parts = - pwgen - -[pwgen] -recipe = hexagonit.recipe.cmmi -url = http://downloads.sourceforge.net/project/pwgen/pwgen/2.06/pwgen-2.06.tar.gz -md5sum = 935aebcbe610fbc9de8125e7b7d71297 diff --git a/component/python-2.6/buildout.cfg b/component/python-2.6/buildout.cfg index cf1f16347..6755b652e 100644 --- a/component/python-2.6/buildout.cfg +++ b/component/python-2.6/buildout.cfg @@ -24,8 +24,6 @@ filename = python-2.6.6-no_system_inc_dirs.patch [python2.6] recipe = hexagonit.recipe.cmmi -depends = - ${gdbm:version} # This is actually the default setting for prefix, but we can't use it in # other settings in this part if we don't set it explicitly here. prefix = ${buildout:parts-directory}/${:_buildout_section_name_} diff --git a/component/python-2.7/buildout.cfg b/component/python-2.7/buildout.cfg index e4a5f5cbc..765488f74 100644 --- a/component/python-2.7/buildout.cfg +++ b/component/python-2.7/buildout.cfg @@ -38,8 +38,6 @@ python = python2.7 [python2.7common] recipe = hexagonit.recipe.cmmi -depends = - ${gdbm:version} # This is actually the default setting for prefix, but we can't use it in # other settings in this part if we don't set it explicitly here. prefix = ${buildout:parts-directory}/${:_buildout_section_name_} diff --git a/component/qt/buildout.cfg b/component/qt/buildout.cfg deleted file mode 100644 index 7806db1f1..000000000 --- a/component/qt/buildout.cfg +++ /dev/null @@ -1,61 +0,0 @@ -[buildout] - -parts = - qt - -[qt] -recipe = slapos.recipe.build -slapos_promisee = - file:plop - -# Online installer -x86 = http://get.qt.nokia.com/qtsdk/Qt_SDK_Lin32_online_v1_1_3_en.run eae2e2a1396fec1369b66c71d7df6eab -x86-64 = http://get.qt.nokia.com/qtsdk/Qt_SDK_Lin64_online_v1_1_3_en.run a4d929bc4d6511290c07c3745477b77b -# Offline installer -#x86 = http://get.qt.nokia.com/qtsdk/Qt_SDK_Lin32_offline_v1_1_3_en.run 106fdae4ec8947c491ab0a827a02da12 -#x86-64 = http://get.qt.nokia.com/qtsdk/Qt_SDK_Lin64_offline_v1_1_3_en.run 8c280beb11ee763840464572ed80e8b8 - -# Needs many dependencies. - -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([auto_extract_bin]) - self.cleanup_dir_list.append(extract_dir) - workdir = guessworkdir(extract_dir) - import pdb; pdb.set_trace() - self.copyTree(os.path.join(workdir, "jre1.6.0_27"), "%(location)s") - - - -#ldd qt.run -# linux-gate.so.1 => (0xb7827000) -# libutil.so.1 => /lib/i686/cmov/libutil.so.1 (0xb781c000) -# libgobject-2.0.so.0 => not found -# libSM.so.6 => not found -# libICE.so.6 => not found -# libXrender.so.1 => not found -# libfontconfig.so.1 => not found -# libfreetype.so.6 => /usr/lib/libfreetype.so.6 (0xb77a4000) -# libz.so.1 => /usr/lib/libz.so.1 (0xb778f000) -# libXext.so.6 => /usr/lib/libXext.so.6 (0xb7780000) -# libX11.so.6 => /usr/lib/libX11.so.6 (0xb7663000) -# libdl.so.2 => /lib/i686/cmov/libdl.so.2 (0xb765f000) -# libgthread-2.0.so.0 => not found -# librt.so.1 => /lib/i686/cmov/librt.so.1 (0xb7655000) -# libglib-2.0.so.0 => not found -# libpthread.so.0 => /lib/i686/cmov/libpthread.so.0 (0xb763c000) -# libstdc++.so.6 => /usr/lib/libstdc++.so.6 (0xb754d000) -# libm.so.6 => /lib/i686/cmov/libm.so.6 (0xb7527000) -# libgcc_s.so.1 => /lib/libgcc_s.so.1 (0xb7508000) -# libc.so.6 => /lib/i686/cmov/libc.so.6 (0xb73c2000) -# libxcb.so.1 => /usr/lib/libxcb.so.1 (0xb73a9000) -# /lib/ld-linux.so.2 (0xb7828000) -# libXau.so.6 => /usr/lib/libXau.so.6 (0xb73a6000) -# libXdmcp.so.6 => /usr/lib/libXdmcp.so.6 (0xb73a1000) \ No newline at end of file diff --git a/component/rdiff-backup/buildout.cfg b/component/rdiff-backup/buildout.cfg index e3678ddff..b6d15bd56 100644 --- a/component/rdiff-backup/buildout.cfg +++ b/component/rdiff-backup/buildout.cfg @@ -13,7 +13,7 @@ library-dirs = ${librsync:location}/lib/ rpath = ${librsync:location}/lib/ -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 +find-links = http://download.savannah.nongnu.org/releases/rdiff-backup/rdiff-backup-1.0.5.tar.gz [rdiff-backup] # Scripts only generation part for rdiff-backup diff --git a/component/readline/buildout.cfg b/component/readline/buildout.cfg index 273cbffb9..d023f5fa7 100644 --- a/component/readline/buildout.cfg +++ b/component/readline/buildout.cfg @@ -1,33 +1,15 @@ [buildout] parts = - readline5 readline - -# readline-5.x is still used for GPL2 only softwares. -[readline5] -recipe = hexagonit.recipe.cmmi -url = http://ftp.gnu.org/gnu/readline/readline-5.2.tar.gz -md5sum = e39331f32ad14009b9ff49cc10c5e751 -configure-options = - --enable-multibyte - --disable-static - -# readline-5.x is still used for GPL2 only softwares. -[readline5] -recipe = hexagonit.recipe.cmmi -url = http://ftp.gnu.org/gnu/readline/readline-5.2.tar.gz -md5sum = e39331f32ad14009b9ff49cc10c5e751 -configure-options = - --enable-multibyte - --disable-static - --with-ncurses=${ncurses:location} -environment = - LDFLAGS =-Wl,-rpath=${ncurses:location}/lib +extends = + ../ncurses/buildout.cfg [readline] recipe = hexagonit.recipe.cmmi url = http://ftp.gnu.org/gnu/readline/readline-6.2.tar.gz md5sum = 67948acb2ca081f23359d0256e9a271c configure-options = - --enable-multibyte --disable-static + --with-ncurses=${ncurses:location} +environment = + LDFLAGS =-Wl,-rpath=${ncurses:location}/lib diff --git a/component/sed/buildout.cfg b/component/sed/buildout.cfg index a195db399..8e286bdae 100644 --- a/component/sed/buildout.cfg +++ b/component/sed/buildout.cfg @@ -6,5 +6,7 @@ parts = recipe = hexagonit.recipe.cmmi url = ftp://ftp.gnu.org/gnu/sed/sed-4.2.1.tar.gz md5sum = f0fd4d7da574d4707e442285fd2d3b86 +configure-options = + --prefix=${buildout:parts-directory}/${:_buildout_section_name_} environment = LDFLAGS =-Wl,--as-needed diff --git a/component/sheepstrike/buildout.cfg b/component/sheepstrike/buildout.cfg deleted file mode 100644 index ff37b6930..000000000 --- a/component/sheepstrike/buildout.cfg +++ /dev/null @@ -1,12 +0,0 @@ -[buildout] -parts = sheepstrike - -[sheepstrike] -recipe = hexagonit.recipe.cmmi -url = https://gitorious.org/sheepstrike/sheepstrike/archive-tarball/0.1 -md5sum = 2c5009eb7c32d7ba5d270d0b88d7e5ab -prefix = ${buildout:parts-directory}/${:_buildout_section_name_} -configure-options = --prefix=${:prefix} -configure-command = - ./bootstrap - ./configure diff --git a/component/shellinabox/0001-Switch-to-IPv6.patch b/component/shellinabox/0001-Switch-to-IPv6.patch deleted file mode 100644 index 37829e18b..000000000 --- a/component/shellinabox/0001-Switch-to-IPv6.patch +++ /dev/null @@ -1,213 +0,0 @@ -From 50ec7439e80bd6a77346dc6482895e481d8cd43a Mon Sep 17 00:00:00 2001 -From: Antoine Catton <acatton@tiolive.com> -Date: Tue, 10 Jan 2012 18:30:20 +0100 -Subject: [PATCH] Switch to IPv6 - ---- - libhttp/http.h | 4 ++-- - libhttp/httpconnection.c | 11 ++++++++++- - libhttp/server.c | 33 +++++++++++++++++++-------------- - libhttp/server.h | 6 +++--- - shellinabox/shellinaboxd.c | 14 +++++++------- - 5 files changed, 41 insertions(+), 27 deletions(-) - -diff --git a/libhttp/http.h b/libhttp/http.h -index e7840fa..5cd61e3 100644 ---- a/libhttp/http.h -+++ b/libhttp/http.h -@@ -66,8 +66,8 @@ typedef struct ServerConnection ServerConnection; - typedef struct Server Server; - typedef struct URL URL; - --Server *newCGIServer(int localhostOnly, int portMin, int portMax, int timeout); --Server *newServer(int localhostOnly, int port); -+Server *newCGIServer(char *ipv6, int portMin, int portMax, int timeout); -+Server *newServer(char *ipv6, int port); - void deleteServer(Server *server); - int serverGetListeningPort(Server *server); - int serverGetFd(Server *server); -diff --git a/libhttp/httpconnection.c b/libhttp/httpconnection.c -index c8e69f6..cae467f 100644 ---- a/libhttp/httpconnection.c -+++ b/libhttp/httpconnection.c -@@ -823,8 +823,17 @@ static int httpHandleCommand(struct HttpConnection *http, - const char *host = getFromHashMap(&http->header, - "host"); - if (host) { -+ int brackets = 0; // For IPv6 hosts - for (char ch; (ch = *host) != '\000'; host++) { -- if (ch == ':') { -+ if (ch == '[') { -+ brackets = 1; -+ break; -+ } -+ if (ch == ']') { -+ brackets = 0; -+ break; -+ } -+ if (!brackets && ch == ':') { - *(char *)host = '\000'; - break; - } -diff --git a/libhttp/server.c b/libhttp/server.c -index f52a269..2c30bd8 100644 ---- a/libhttp/server.c -+++ b/libhttp/server.c -@@ -170,19 +170,19 @@ static int serverQuitHandler(struct HttpConnection *http, void *arg) { - return HTTP_DONE; - } - --struct Server *newCGIServer(int localhostOnly, int portMin, int portMax, -+struct Server *newCGIServer(char *ipv6, int portMin, int portMax, - int timeout) { - struct Server *server; - check(server = malloc(sizeof(struct Server))); -- initServer(server, localhostOnly, portMin, portMax, timeout); -+ initServer(server, ipv6, portMin, portMax, timeout); - return server; - } - --struct Server *newServer(int localhostOnly, int port) { -- return newCGIServer(localhostOnly, port, port, -1); -+struct Server *newServer(char *ipv6, int port) { -+ return newCGIServer(ipv6, port, port, -1); - } - --void initServer(struct Server *server, int localhostOnly, int portMin, -+void initServer(struct Server *server, char *ipv6, int portMin, - int portMax, int timeout) { - server->looping = 0; - server->exitAll = 0; -@@ -192,14 +192,19 @@ void initServer(struct Server *server, int localhostOnly, int portMin, - server->numConnections = 0; - - int true = 1; -- server->serverFd = socket(PF_INET, SOCK_STREAM, 0); -+ server->serverFd = socket(PF_INET6, SOCK_STREAM, 0); - check(server->serverFd >= 0); - check(!setsockopt(server->serverFd, SOL_SOCKET, SO_REUSEADDR, - &true, sizeof(true))); -- struct sockaddr_in serverAddr = { 0 }; -- serverAddr.sin_family = AF_INET; -- serverAddr.sin_addr.s_addr = htonl(localhostOnly -- ? INADDR_LOOPBACK : INADDR_ANY); -+ struct sockaddr_in6 serverAddr = { 0 }; -+ serverAddr.sin6_family = AF_INET6; -+ if (ipv6 != NULL) { -+ if (!inet_pton(AF_INET6, ipv6, serverAddr.sin6_addr.s6_addr)) { -+ fatal("Bad ipv6 address"); -+ } -+ } else { -+ serverAddr.sin6_addr = in6addr_any; -+ } - - // Linux unlike BSD does not have support for picking a local port range. - // So, we have to randomly pick a port from our allowed port range, and then -@@ -214,14 +219,14 @@ void initServer(struct Server *server, int localhostOnly, int portMin, - int portStart = rand() % (portMax - portMin + 1) + portMin; - for (int p = 0; p <= portMax-portMin; p++) { - int port = (p+portStart)%(portMax-portMin+1)+ portMin; -- serverAddr.sin_port = htons(port); -+ serverAddr.sin6_port = htons(port); - if (!bind(server->serverFd, (struct sockaddr *)&serverAddr, - sizeof(serverAddr))) { - break; - } -- serverAddr.sin_port = 0; -+ serverAddr.sin6_port = 0; - } -- if (!serverAddr.sin_port) { -+ if (!serverAddr.sin6_port) { - fatal("Failed to find any available port"); - } - } -@@ -231,7 +236,7 @@ void initServer(struct Server *server, int localhostOnly, int portMin, - check(!getsockname(server->serverFd, (struct sockaddr *)&serverAddr, - &socklen)); - check(socklen == sizeof(serverAddr)); -- server->port = ntohs(serverAddr.sin_port); -+ server->port = ntohs(serverAddr.sin6_port); - info("Listening on port %d", server->port); - - check(server->pollFds = malloc(sizeof(struct pollfd))); -diff --git a/libhttp/server.h b/libhttp/server.h -index bb879fb..5ffb698 100644 ---- a/libhttp/server.h -+++ b/libhttp/server.h -@@ -78,10 +78,10 @@ struct Server { - struct SSLSupport ssl; - }; - --struct Server *newCGIServer(int localhostOnly, int portMin, int portMax, -+struct Server *newCGIServer(char *ipv6, int portMin, int portMax, - int timeout); --struct Server *newServer(int localhostOnly, int port); --void initServer(struct Server *server, int localhostOnly, int portMin, -+struct Server *newServer(char *ipv6, int port); -+void initServer(struct Server *server, char *ipv6, int portMin, - int portMax, int timeout); - void destroyServer(struct Server *server); - void deleteServer(struct Server *server); -diff --git a/shellinabox/shellinaboxd.c b/shellinabox/shellinaboxd.c -index dcf05ff..2d1d758 100644 ---- a/shellinabox/shellinaboxd.c -+++ b/shellinabox/shellinaboxd.c -@@ -80,7 +80,7 @@ - static int port; - static int portMin; - static int portMax; --static int localhostOnly = 0; -+static char *ipv6 = NULL; - static int noBeep = 0; - static int numericHosts = 0; - static int enableSSL = 1; -@@ -747,7 +747,7 @@ static void usage(void) { - " -g, --group=GID switch to this group (default: %s)\n" - " -h, --help print this message\n" - " --linkify=[none|normal|agressive] default is \"normal\"\n" -- " --localhost-only only listen on 127.0.0.1\n" -+ " --ipv6 listen on a specific ipv6\n" - " --no-beep suppress all audio output\n" - " -n, --numeric do not resolve hostnames\n" - " -p, --port=PORT select a port (default: %d)\n" -@@ -839,7 +839,7 @@ static void parseArgs(int argc, char * const argv[]) { - { "static-file", 1, 0, 'f' }, - { "group", 1, 0, 'g' }, - { "linkify", 1, 0, 0 }, -- { "localhost-only", 0, 0, 0 }, -+ { "ipv6", 1, 0, 0 }, - { "no-beep", 0, 0, 0 }, - { "numeric", 0, 0, 'n' }, - { "port", 1, 0, 'p' }, -@@ -1001,8 +1001,8 @@ static void parseArgs(int argc, char * const argv[]) { - "\"none\", \"normal\", or \"aggressive\"."); - } - } else if (!idx--) { -- // Localhost Only -- localhostOnly = 1; -+ // IPv6 -+ ipv6 = optarg; - } else if (!idx--) { - // No Beep - noBeep = 1; -@@ -1197,7 +1197,7 @@ int main(int argc, char * const argv[]) { - // Create a new web server - Server *server; - if (port) { -- check(server = newServer(localhostOnly, port)); -+ check(server = newServer(ipv6, port)); - dropPrivileges(); - setUpSSL(server); - } else { -@@ -1217,7 +1217,7 @@ int main(int argc, char * const argv[]) { - _exit(0); - } - check(!NOINTR(close(fds[0]))); -- check(server = newCGIServer(localhostOnly, portMin, portMax, -+ check(server = newCGIServer(ipv6, portMin, portMax, - AJAX_TIMEOUT)); - cgiServer = server; - setUpSSL(server); --- -1.7.6.5 - diff --git a/component/shellinabox/0002-Allow-to-run-entire-command-path.patch b/component/shellinabox/0002-Allow-to-run-entire-command-path.patch deleted file mode 100644 index f05cec31c..000000000 --- a/component/shellinabox/0002-Allow-to-run-entire-command-path.patch +++ /dev/null @@ -1,26 +0,0 @@ -From eee6f7180dc5dd4523264e7ce0721945ab2b78a1 Mon Sep 17 00:00:00 2001 -From: Antoine Catton <acatton@tiolive.com> -Date: Wed, 11 Jan 2012 17:32:15 +0100 -Subject: [PATCH 2/2] Allow to run entire command path. - ---- - shellinabox/launcher.c | 3 +-- - 1 files changed, 1 insertions(+), 2 deletions(-) - -diff --git a/shellinabox/launcher.c b/shellinabox/launcher.c -index fb8a133..e116a75 100644 ---- a/shellinabox/launcher.c -+++ b/shellinabox/launcher.c -@@ -1226,8 +1226,7 @@ static void execService(int width, int height, struct Service *service, - - extern char **environ; - environ = environment; -- char *cmd = strrchr(argv[0], '/'); -- execvp(cmd ? cmd + 1: argv[0], argv); -+ execvp(argv[0], argv); - } - - void setWindowSize(int pty, int width, int height) { --- -1.7.6.5 - diff --git a/component/shellinabox/buildout.cfg b/component/shellinabox/buildout.cfg deleted file mode 100644 index 55c2e6b17..000000000 --- a/component/shellinabox/buildout.cfg +++ /dev/null @@ -1,34 +0,0 @@ -[buildout] -extends = - ../zlib/buildout.cfg - ../openssl/buildout.cfg - ../patch/buildout.cfg - -parts = shellinabox - -[shellinabox-full-path-patch] -recipe = hexagonit.recipe.download -filename = 0002-Allow-to-run-entire-command-path.patch -url = ${:_profile_base_location_}/${:filename} -download-only = true - - -[shellinabox-ipv6-patch] -recipe = hexagonit.recipe.download -filename = 0001-Switch-to-IPv6.patch -url = ${:_profile_base_location_}/${:filename} -download-only = true - -[shellinabox] -recipe = hexagonit.recipe.cmmi -url = http://shellinabox.googlecode.com/files/shellinabox-2.10.tar.gz -md5sum = 0e144910d85d92edc54702ab9c46f032 -environment = - CFLAGS = -I${zlib:location}/include -I${openssl:location}/include - LDFLAGS = -L${zlib:location}/lib -Wl,-rpath=${zlib:location}/lib -L${openssl:location}/lib -Wl,-rpath=${openssl:location}/lib - PKG_CONFIG_PATH = ${openssl:location}/lib/pkgconfig/ -patch-binary = ${patch:location}/bin/patch -patch-options = -p1 -patches = - ${shellinabox-ipv6-patch:location}/${shellinabox-ipv6-patch:filename} - ${shellinabox-full-path-patch:location}/${shellinabox-full-path-patch:filename} diff --git a/component/slapos/buildout.cfg b/component/slapos/buildout.cfg index 3552cffc5..6b254b3b4 100644 --- a/component/slapos/buildout.cfg +++ b/component/slapos/buildout.cfg @@ -112,25 +112,24 @@ scripts = slapproxy = slapos.proxy:main [versions] -zc.buildout = 1.6.0-dev-SlapOS-004 - -# Generated by buildout-versions +zc.buildout = 1.6.0-dev-SlapOS-002 Jinja2 = 2.6 -Werkzeug = 0.8.3 -buildout-versions = 1.7 +Werkzeug = 0.8.1 collective.recipe.template = 1.9 hexagonit.recipe.cmmi = 1.5.0 -lxml = 2.3.3 -meld3 = 0.6.8 +ipython = 0.11 +lxml = 2.3.1 +meld3 = 0.6.7 netaddr = 0.7.6 -slapos.core = 0.23 -slapos.libnetworkcache = 0.12 +setuptools = 0.6c12dev-r88846 +slapos.core = 0.19 +slapos.libnetworkcache = 0.10 xml-marshaller = 0.9.7 -z3c.recipe.scripts = 1.0.1 +z3c.recipe.scripts = 1.0.1 zc.recipe.egg = 1.3.2 # Required by: -# slapos.core==0.23 +# slapos.core==0.19 Flask = 0.8 # Required by: @@ -138,21 +137,13 @@ Flask = 0.8 hexagonit.recipe.download = 1.5.0 # Required by: -# slapos.core==0.23 -netifaces = 0.8 - -# Required by: -# slapos.core==0.23 -# slapos.libnetworkcache==0.12 -# supervisor==3.0a12 -# zc.buildout==1.6.0-dev-SlapOS-004 -# zope.interface==3.8.0 -setuptools = 0.6c12dev-r88846 +# slapos.core==0.19 +netifaces = 0.6 # Required by: -# slapos.core==0.23 -supervisor = 3.0a12 +# slapos.core==0.19 +supervisor = 3.0a10 # Required by: -# slapos.core==0.23 +# slapos.core==0.19 zope.interface = 3.8.0 diff --git a/component/sphinx/buildout.cfg b/component/sphinx/buildout.cfg index bb8b0aa7c..10257b2e9 100644 --- a/component/sphinx/buildout.cfg +++ b/component/sphinx/buildout.cfg @@ -18,8 +18,8 @@ filename = sphinx-1.10-beta-snowball.patch [sphinx] recipe = hexagonit.recipe.cmmi -url = http://sphinxsearch.com/files/sphinx-2.0.2-beta.tar.gz -md5sum = fafe0f1a71d0ded32404c067eba7d0b3 +url = http://sphinxsearch.com/files/sphinx-2.0.1-beta.tar.gz +md5sum = 95c217d81d0b7a4ff73d5297318c3481 configure-options = --with-mysql --with-mysql-includes=${mariadb:location}/include/mysql diff --git a/component/sphinx/sphinx-1.10-fix_nosigpipe.patch b/component/sphinx/sphinx-1.10-fix_nosigpipe.patch new file mode 100644 index 000000000..b6f1311c7 --- /dev/null +++ b/component/sphinx/sphinx-1.10-fix_nosigpipe.patch @@ -0,0 +1,19 @@ +# http://www.sphinxsearch.com/bugs/view.php?id=550 +# 0000550: Can not make libsphinxclient + +--- sphinx-1.10-beta/api/libsphinxclient/sphinxclient.c 2010-07-15 13:05:40.000000000 +0200 ++++ sphinx-1.10-beta/api/libsphinxclient/sphinxclient.c 2010-07-21 20:43:26.760024489 +0200 +@@ -1355,11 +1355,13 @@ + + optval = 1; + #ifndef _WIN32 ++ #ifdef SO_NOSIGPIPE + if ( setsockopt ( sock, SOL_SOCKET, SO_NOSIGPIPE, (void *)&optval, (socklen_t)sizeof(optval) ) < 0 ) + { + set_error ( client, "setsockopt() failed: %s", sock_error() ); + return -1; + } ++ #endif + #endif + + res = connect ( sock, (struct sockaddr*)&sa, sizeof(sa) ); diff --git a/component/sqlite3/buildout.cfg b/component/sqlite3/buildout.cfg index e26919da5..168ca9b5f 100644 --- a/component/sqlite3/buildout.cfg +++ b/component/sqlite3/buildout.cfg @@ -5,8 +5,8 @@ parts = [sqlite3] recipe = hexagonit.recipe.cmmi -url = http://www.sqlite.org/sqlite-autoconf-3071000.tar.gz -md5sum = 9ed2ca93577b58cfa0d01f64b9312ab9 +url = http://www.sqlite.org/sqlite-autoconf-3070800.tar.gz +md5sum = 6bfb46d73caaa1bbbcd2b52184b6c542 configure-options = --disable-static --enable-readline diff --git a/component/xorg/buildout.cfg b/component/xorg/buildout.cfg index 9258a76ce..8807f69e9 100644 --- a/component/xorg/buildout.cfg +++ b/component/xorg/buildout.cfg @@ -1,13 +1,12 @@ +# Minimalistict xorg [buildout] extends = ../freetype/buildout.cfg - ../intltool/buildout.cfg ../libuuid/buildout.cfg ../libxml2/buildout.cfg ../libxslt/buildout.cfg ../pkgconfig/buildout.cfg ../zlib/buildout.cfg - ../openssl/buildout.cfg parts = libXdmcp @@ -32,8 +31,6 @@ configure-options = --disable-specs --without-xmlto --without-fop -environment = - PATH=${libxml2:location}/bin:${pkgconfig:location}/bin:%(PATH)s [xextproto] recipe = hexagonit.recipe.cmmi @@ -52,8 +49,6 @@ configure-options = --disable-docs --without-xmlto --without-fop -environment = - PATH=${pkgconfig:location}/bin:%(PATH)s [libXau] recipe = hexagonit.recipe.cmmi @@ -100,9 +95,6 @@ url = http://www.x.org/releases/X11R7.6/src/lib/libXext-1.2.0.tar.bz2 md5sum = 9bb236ff0193e9fc1c1fb504dd840331 environment = PKG_CONFIG_PATH=${xcbproto:location}/lib/pkgconfig:${libXau:location}/lib/pkgconfig:${xproto:location}/lib/pkgconfig:${xorg-libpthread-stubs:location}/lib/pkgconfig:${xextproto:location}/lib/pkgconfig:${libX11:location}/lib/pkgconfig:${libxcb:location}/lib/pkgconfig - CPPFLAGS=-I${xcbproto:location}/include -I${libXau:location}/include -I${xproto:location}/include -I${xorg-libpthread-stubs:location}/include -I${xextproto:location}/include -I${libX11:location}/include -I${libxcb:location}/include - LD_LIBRARY_PATH=${xcbproto:location}/lib:${libXau:location}/lib:${xorg-libpthread-stubs:location}/lib:${xextproto:location}/lib:${libX11:location}/lib:${libxcb:location}/lib - LD_RUN_PATH=${xcbproto:location}/lib:${libXau:location}/lib:${xorg-libpthread-stubs:location}/lib:${xextproto:location}/lib:${libX11:location}/lib:${libxcb:location}/lib PATH=${pkgconfig:location}/bin:%(PATH)s # Warning: do *not* enable -fPIC CFLAGS for this library. Even if it fails and ld asks you to enable it. This will not solve your problem, and create an unexpected (by build chain) setup (all .o will be position-independant code). # CFLAGS=-fPIC @@ -124,16 +116,6 @@ download-only = true filename = 700c7896b832d6e4fb0185f0d5382b01f94e7141.patch md5sum = 52635ef694ee6f1acb642a77ee8eb010 -[inputproto] -recipe = hexagonit.recipe.cmmi -url = http://www.x.org/releases/X11R7.6/src/everything/inputproto-2.0.1.tar.bz2 -md5sum = da9bf9e5d174163f597d2d72757d9038 - -[kbproto] -recipe = hexagonit.recipe.cmmi -url = http://www.x.org/releases/X11R7.6/src/everything/kbproto-1.0.5.tar.bz2 -md5sum = e7edb59a3f54af15f749e8f3e314ee62 - [libX11] recipe = hexagonit.recipe.cmmi url = http://www.x.org/releases/X11R7.6/src/lib/libX11-1.4.0.tar.bz2 @@ -144,19 +126,14 @@ configure-options = --disable-composecache --disable-xcms --disable-xf86bigfont + --disable-xkb --disable-specs --without-xmlto --without-fop environment = - PKG_CONFIG_PATH=${xproto:location}/lib/pkgconfig:${xextproto:location}/lib/pkgconfig:${xtrans:location}/share/pkgconfig:${libxcb:location}/lib/pkgconfig:${xorg-libpthread-stubs:location}/lib/pkgconfig:${libXau:location}/lib/pkgconfig:${inputproto:location}/lib/pkgconfig:${kbproto:location}/lib/pkgconfig - LD_LIBRARY_PATH=${xproto:location}/lib:${xextproto:location}/lib:${libxcb:location}/lib - LD_RUN_PATH=${xproto:location}/lib:${xextproto:location}/lib:${libxcb:location}/lib + PKG_CONFIG_PATH=${xproto:location}/lib/pkgconfig:${xextproto:location}/lib/pkgconfig:${xtrans:location}/share/pkgconfig:${libxcb:location}/lib/pkgconfig:${xorg-libpthread-stubs:location}/lib/pkgconfig:${libXau:location}/lib/pkgconfig PATH=${pkgconfig:location}/bin:%(PATH)s - -# Below is stuff for xserver - - [libXdmcp] recipe = hexagonit.recipe.cmmi url = http://www.x.org/releases/X11R7.6/src/lib/libXdmcp-1.1.0.tar.bz2 @@ -169,147 +146,11 @@ configure-options = --without-xmlto --without-fop -[fixesproto] -recipe = hexagonit.recipe.cmmi -url = http://www.x.org/releases/X11R7.6/src/everything/fixesproto-4.1.2.tar.bz2 -md5sum = bdb58ecc313b509247036d5c11fa99df - -[bigreqsproto] -recipe = hexagonit.recipe.cmmi -url = http://www.x.org/releases/X11R7.6/src/everything/bigreqsproto-1.1.1.tar.bz2 -md5sum = 6f6c24436c2b3ab235eb14a85b9aaacf - -[xcmiscproto] -recipe = hexagonit.recipe.cmmi -url = http://www.x.org/releases/X11R7.6/src/everything/xcmiscproto-1.2.1.tar.bz2 -md5sum = cd7372cd827bfd7ca7e9238f2ce274b1 - -[damageproto] -recipe = hexagonit.recipe.cmmi -url = http://www.x.org/releases/X11R7.6/src/everything/damageproto-1.2.1.tar.bz2 -md5sum = 998e5904764b82642cc63d97b4ba9e95 - -[randrproto] -recipe = hexagonit.recipe.cmmi -url = http://www.x.org/releases/X11R7.6/src/everything/randrproto-1.3.2.tar.bz2 -md5sum = 597491c0d8055e2a66f11350c4985775 - -[renderproto] -recipe = hexagonit.recipe.cmmi -url = http://www.x.org/releases/X11R7.6/src/everything/renderproto-0.11.1.tar.bz2 -md5sum = a914ccc1de66ddeb4b611c6b0686e274 - -[videoproto] -recipe = hexagonit.recipe.cmmi -url = http://www.x.org/releases/X11R7.6/src/everything/videoproto-2.3.1.tar.bz2 -md5sum = c3b348c6e2031b72b11ae63fc7f805c2 - -[fontsproto] -recipe = hexagonit.recipe.cmmi -url = http://www.x.org/releases/X11R7.6/src/everything/fontsproto-2.1.1.tar.bz2 -md5sum = 37102ffcaa73f77d700acd6f7a25d8f0 - -[recordproto] -recipe = hexagonit.recipe.cmmi -url = http://www.x.org/releases/X11R7.6/src/everything/recordproto-1.14.1.tar.bz2 -md5sum = 24541a30b399213def35f48efd926c63 - -[resourceproto] -recipe = hexagonit.recipe.cmmi -url = http://www.x.org/releases/X11R7.6/src/everything/resourceproto-1.1.1.tar.bz2 -md5sum = 8ff0525ae7502b48597b78d00bc22284 - [xineramaproto] recipe = hexagonit.recipe.cmmi -url = http://www.x.org/releases/X11R7.6/src/everything/xineramaproto-1.2.tar.bz2 +url = http://www.x.org/releases/X11R7.6/src/proto/xineramaproto-1.2.tar.bz2 md5sum = a8aadcb281b9c11a91303e24cdea45f5 -[pixman] -recipe = hexagonit.recipe.cmmi -url = http://xorg.freedesktop.org/archive/individual/lib/pixman-0.23.2.tar.bz2 -md5sum = 2e2805f5ca02edeb15a7862779670069 - -[libfontenc] -recipe = hexagonit.recipe.cmmi -url = http://www.x.org/releases/X11R7.6/src/everything/libfontenc-1.1.0.tar.bz2 -md5sum = 11d3c292f05a90f6f67840a9e9c3d9b8 -environment = - PKG_CONFIG_PATH=${xproto:location}/lib/pkgconfig - LD_LIBRARY_PATH=${xproto:location}/lib/ - LD_RUN_PATH=${xproto:location}/lib/ - CPPFLAGS=-I${xproto:location}/include/ -I${zlib:location}/include - PATH=${pkgconfig:location}/bin:%(PATH)s - -[libXfont] -recipe = hexagonit.recipe.cmmi -url = http://www.x.org/releases/X11R7.6/src/everything/libXfont-1.4.3.tar.bz2 -md5sum = 6fb689cfe13d8d9460f4abb5bd88588d -environment = - PKG_CONFIG_PATH=${fontsproto:location}/lib/pkgconfig:${libfontenc:location}/lib/pkgconfig:${xproto:location}/lib/pkgconfig:${xtrans:location}/share/pkgconfig:${freetype:location}/lib/pkgconfig - LD_LIBRARY_PATH=${fontsproto:location}/lib:${libfontenc:location}/lib:${xtrans:location}/include/:${xproto:location}/lib/:${freetype:location}/lib - LD_RUN_PATH=${fontsproto:location}/lib:${libfontenc:location}/lib:${xproto:location}/lib/:${xtrans:location}/include/:${freetype:location}/lib - LDFLAGS=-L${zlib:location}/lib - CPPFLAGS=-I${zlib:location}/include - PATH=${pkgconfig:location}/bin:%(PATH)s - -[libxkbfile] -recipe = hexagonit.recipe.cmmi -url = http://www.x.org/releases/X11R7.6/src/everything/libxkbfile-1.0.7.tar.bz2 -md5sum = 59b4fe0bdf8d9b05e45b59e8fe9e7516 -environment = - PKG_CONFIG_PATH=${kbproto:location}/lib/pkgconfig:${libX11:location}/lib/pkgconfig:${xproto:location}/lib/pkgconfig - LD_LIBRARY_PATH=${kbproto:location}/lib:${libX11:location}/lib:${xproto:location}/lib/ - LD_RUN_PATH=${kbproto:location}/lib:${libX11:location}/lib:${xproto:location}/lib/ - CPPFLAGS=-I${xproto:location}/include/ -I${libX11:location}/include/ -I${kbproto:location}/include - PATH=${pkgconfig:location}/bin:%(PATH)s - -[xkeyboard-config] -recipe = hexagonit.recipe.cmmi -url = http://www.x.org/releases/individual/data/xkeyboard-config/xkeyboard-config-2.1.tar.bz2 -md5sum = 57ecc78bacd8ecc398d8ed6588f4d04b -depends = - ${perl:version} - ${perl-XML-Parser:location} -configure-options = - --disable-static - --enable-shared - --enable-compat-rules - --with-xkb-rules-symlink=xfree86 -environment = - PATH=${gettext:location}/bin:${intltool:location}/bin:${perl:location}/bin:${pkgconfig:location}/bin:${xkbcomp:location}/bin:%(PATH)s - PKG_CONFIG_PATH=${libX11:location}/lib/pkgconfig:${xproto:location}/lib/pkgconfig:${kbproto:location}/lib/pkgconfig:${libxcb:location}/lib/pkgconfig:${xorg-libpthread-stubs:location}/lib/pkgconfig:${libXau:location}/lib/pkgconfig - -[xkbcomp] -recipe = hexagonit.recipe.cmmi -url = http://www.x.org/releases/X11R7.6/src/app/xkbcomp-1.2.0.tar.bz2 -md5sum = 0f55995cd8da9b2d88553e1a2e17cd0a -# Hardcoded location for xkeyboard-config, needed during compile time -xkeyboard-config-location = ${libxkbfile:location}/../xkeyboard-config/share/X11/xkb -configure-options = - --with-xkb-config-root=${:xkeyboard-config-location} -environment = - PKG_CONFIG_PATH=${libxkbfile:location}/lib/pkgconfig:${libX11:location}/lib/pkgconfig:${xproto:location}/lib/pkgconfig:${kbproto:location}/lib/pkgconfig:${libxcb:location}/lib/pkgconfig:${xorg-libpthread-stubs:location}/lib/pkgconfig:${libXau:location}/lib/pkgconfig - LD_LIBRARY_PATH=${libxkbfile:location}/lib/:${libX11:location}/lib - LD_RUN_PATH=${libxkbfile:location}/lib/:${libX11:location}/lib - CPPFLAGS=-I${libxkbfile:location}/include/ -I${libX11:location}/include -I${xproto:location}/include -I${kbproto:location}/include - PATH=${pkgconfig:location}/bin:%(PATH)s - -[render] -recipe = hexagonit.recipe.cmmi -url = http://xlibs.freedesktop.org/release/renderext-0.9.tar.bz2 -md5sum = d43c2afc69937655d13c02588c9ff974 - -[libXrender] -recipe = hexagonit.recipe.cmmi -url = http://xlibs.freedesktop.org/release/libXrender-0.9.0.tar.bz2 -md5sum = ce7cda009aa0b10a73637941d44ae789 -environment = - PKG_CONFIG_PATH=${render:location}/lib/pkgconfig:${libX11:location}/lib/pkgconfig - CPPFLAGS=-I${libX11:location}/include/ -I${xproto:location}/include -I${kbproto:location}/include - LD_LIBRARY_PATH=${render:location}/lib:${libX11:location}/lib - LD_RUN_PATH=${render:location}/lib - PATH=${pkgconfig:location}/bin:%(PATH)s - [libXinerama] recipe = hexagonit.recipe.cmmi url = http://www.x.org/releases/X11R7.6/src/lib/libXinerama-1.1.1.tar.bz2 @@ -344,104 +185,3 @@ environment = PKG_CONFIG_PATH=${libICE:location}/lib/pkgconfig:${libuuid:location}/lib/pkgconfig:${xproto:location}/lib/pkgconfig:${xtrans:location}/share/pkgconfig PATH=${pkgconfig:location}/bin:%(PATH)s LIBUUID_CFLAGS=-I${libuuid:location}/include - -[libXt] -recipe = hexagonit.recipe.cmmi -url = http://www.x.org/releases/X11R7.6/src/lib/libXt-1.0.9.tar.bz2 -md5sum = 8a414f8f2327aaa616ca2dcac1f5d8c3 -configure-options = - --disable-static -environment = - PATH=${pkgconfig:location}/bin:%(PATH)s - PKG_CONFIG_PATH=${render:location}/lib/pkgconfig:${libX11:location}/lib/pkgconfig:${xproto:location}/lib/pkgconfig:${kbproto:location}/lib/pkgconfig:${libSM:location}/lib/pkgconfig:${libICE:location}/lib/pkgconfig - CPPFLAGS=-I${xproto:location}/include -I${libX11:location}/include -I${libSM:location}/include -I${libICE:location}/include -I${kbproto:location}/include - - -[dri2proto] -recipe = hexagonit.recipe.cmmi -url = http://xorg.freedesktop.org/releases/individual/proto/dri2proto-2.6.tar.gz -md5sum = 873142af5db695537cfe05e01d13541f -configure-options = - --disable-static -environment = - PATH=${pkgconfig:location}/bin:%(PATH)s - PKG_CONFIG_PATH=${xorg-libpthread-stubs:location}/lib/pkgconfig - - -[pciaccess] -recipe = hexagonit.recipe.cmmi -url = http://www.x.org/releases/X11R7.6/src/lib/libpciaccess-0.12.0.tar.bz2 -md5sum = 285e07976274572e1f1e68edee09b70a -configure-options = - --disable-static -environment = - PATH=${pkgconfig:location}/bin:%(PATH)s - -[makedepend] -recipe = hexagonit.recipe.cmmi -url = http://xorg.freedesktop.org/releases/individual/util/makedepend-1.0.3.tar.bz2 -md5sum = 4e6cb97bbecfbb34f3f644a75e513093 -configure-options = - --disable-static -environment = - PATH=${pkgconfig:location}/bin:%(PATH)s - PKG_CONFIG_PATH=${xproto:location}/lib/pkgconfig - -[glproto] -recipe = hexagonit.recipe.cmmi -url = http://xorg.freedesktop.org/releases/individual/proto/glproto-1.4.14.tar.bz2 -md5sum = f48257daf0017f7a7667e5bf48ca3578 -configure-options = - --disable-static -environment = - PATH=${pkgconfig:location}/bin:%(PATH)s - PKG_CONFIG_PATH=${xproto:location}/lib/pkgconfig - -[xfixes] -recipe = hexagonit.recipe.cmmi -url = http://xorg.freedesktop.org/releases/individual/lib/libXfixes-4.0.5.tar.bz2 -md5sum = 1b4b8386bd5d1751b2c7177223ad4629 -configure-options = - --disable-static -environment = - PATH=${pkgconfig:location}/bin:%(PATH)s - PKG_CONFIG_PATH=${xproto:location}/lib/pkgconfig:${libX11:location}/lib/pkgconfig:${xextproto:location}/lib/pkgconfig:${fixesproto:location}/lib/pkgconfig:${xorg-util-macros:location}/share/pkgconfig - CPPFLAGS=-I${libX11:location}/include -I${xproto:location}/include -I${fixesproto:location}/include -I${xextproto:location}/include - -[xdamage] -recipe = hexagonit.recipe.cmmi -url = http://xorg.freedesktop.org/releases/individual/lib/libXdamage-1.1.3.tar.bz2 -md5sum = 44774e1a065158b52f1a0da5100cebec -configure-options = - --disable-static -environment = - PATH=${pkgconfig:location}/bin:%(PATH)s - PKG_CONFIG_PATH=${damageproto:location}/lib/pkgconfig:${xfixes:location}/lib/pkgconfig:${fixesproto:location}/lib/pkgconfig:${xextproto:location}/lib/pkgconfig:${libX11:location}/lib/pkgconfig - CPPFLAGS=-I${libX11:location}/include -I${xproto:location}/include -I${fixesproto:location}/include -I${xextproto:location}/include -I${damageproto:location}/include -I${xfixes:location}/include - -[xserver] -# Adds Xvfb functionnality -recipe = hexagonit.recipe.cmmi -url = http://www.x.org/releases/X11R7.6/src/xserver/xorg-server-1.9.3.tar.bz2 -md5sum = 5bef6839a76d029204ab31aa2fcb5201 -configure-options = - --enable-xvfb - --disable-aiglx - --disable-composite - --disable-screensaver - --disable-glx - --disable-dri - --disable-dri2 - --disable-xorg - --disable-xprint - --disable-config-hal - --with-xkb-bin-directory=${xkbcomp:location}/bin - --with-xkb-path=${xkeyboard-config:location}/share/X11/xkb -#XXX-Cedric : The following can be safely removed as soon as Xvfb is known as working -# --with-default-font-path="${xfree86-fonts:location}/share/fonts/X11/Type1,${fontutil:location}/share/fonts/X11/75dpi,${cursor-fonts:location}/share/fonts/X11/misc" -#depends = ${adobe-75dpi-fonts:location} -environment = - PKG_CONFIG_PATH=${pixman:location}/lib/pkgconfig:${openssl:location}/lib/pkgconfig:${xorg-util-macros:location}/share/pkgconfig:${fixesproto:location}/lib/pkgconfig:${damageproto:location}/lib/pkgconfig:${xcmiscproto:location}/lib/pkgconfig:${xtrans:location}/share/pkgconfig:${bigreqsproto:location}/lib/pkgconfig:${xproto:location}/lib/pkgconfig:${randrproto:location}/lib/pkgconfig:${renderproto:location}/lib/pkgconfig:${xextproto:location}/lib/pkgconfig:${inputproto:location}/lib/pkgconfig:${kbproto:location}/lib/pkgconfig:${fontsproto:location}/lib/pkgconfig:${videoproto:location}/lib/pkgconfig:${recordproto:location}/lib/pkgconfig:${resourceproto:location}/lib/pkgconfig:${xineramaproto:location}/lib/pkgconfig:${libXau:location}/lib/pkgconfig:${libxkbfile:location}/lib/pkgconfig:${libXfont:location}/lib/pkgconfig - CPPFLAGS=-I${xproto:location}/include -I${pixman:location}/include/pixman-1 -I${xextproto:location}/include -I${inputproto:location}/include -I${fontsproto:location}/include -I${kbproto:location}/include -I${xineramaproto:location}/include -I${renderproto:location}/include -I${bigreqsproto:location}/include -I${videoproto:location}/include -I${resourceproto:location}/include -I${xcmiscproto:location}/include -I${xtrans:location}/include -I${libXau:location}/include -I${randrproto:location}/include -I${libxkbfile:location}/include -I${recordproto:location}/include -I${fixesproto:location}/include -I${damageproto:location}/include - PATH=${pkgconfig:location}/bin:%(PATH)s - LDFLAGS=-Wl,-rpath,${openssl:location}/lib diff --git a/component/xtrabackup/buildout.cfg b/component/xtrabackup/buildout.cfg index 6769e6843..753376d34 100644 --- a/component/xtrabackup/buildout.cfg +++ b/component/xtrabackup/buildout.cfg @@ -18,7 +18,7 @@ parts = [xtrabackup-build-patch-download] recipe = hexagonit.recipe.download url = ${:_profile_base_location_}/${:filename} -md5sum = b1536fe65e32592e4a0a14bf3b159885 +md5sum = 95b2c2ef625f88d85bf8876269a19372 download-only = true filename = xtrabackup-1.6.2_build.patch @@ -29,33 +29,17 @@ md5sum = d642ea7b30d1322a516fbece4ee100e0 download-only = true filename = ${:_buildout_section_name_} -[mysql-5.1-download] -recipe = hexagonit.recipe.download -version = 5.1.56 -url = http://s3.amazonaws.com/percona.com/downloads/community/mysql-${:version}.tar.gz -md5sum = 15161d67f4830aad3a8a89e083749d49 -download-only = true -filename = mysql-${:version}.tar.gz - -[libtar-download] -recipe = hexagonit.recipe.download -version = 1.2.11 -url = http://s3.amazonaws.com/percona.com/downloads/community/libtar-${:version}.tar.gz -md5sum = 604238e8734ce6e25347a58c4f1a1d7e -download-only = true -filename = libtar-${:version}.tar.gz - [xtrabackup] recipe = hexagonit.recipe.cmmi -url = http://www.percona.com/downloads/XtraBackup/XtraBackup-1.6.3/source/xtrabackup-1.6.3.tar.gz -md5sum = d0b827fd18cd76416101eb7b7c56a311 +url = http://www.percona.com/redir/downloads/XtraBackup/xtrabackup-1.6.2/source/xtrabackup-1.6.2.tar.gz +md5sum = 933243ae362156c98f1211eb87b3b4ea make-binary = true patches = ${xtrabackup-build-patch-download:location}/${xtrabackup-build-patch-download:filename} ${allow_force_ibbackup.patch:location}/${allow_force_ibbackup.patch:filename} patch-options = -p1 location = ${buildout:parts-directory}/${:_buildout_section_name_} -configure-command = ln -sf ${mysql-5.1-download:location}/${mysql-5.1-download:filename} ${libtar-download:location}/${libtar-download:filename} . && utils/build.sh innodb51_builtin ${:location} ${libtool:location} +configure-command = utils/build.sh innodb51_builtin ${:location} ${libtool:location} environment = CPPFLAGS =-I${zlib:location}/include -I${ncurses:location}/include -I${readline:location}/include LDFLAGS =-L${zlib:location}/lib -Wl,-rpath=${zlib:location}/lib -L${ncurses:location}/lib -Wl,-rpath=${ncurses:location}/lib -L${readline:location}/lib -Wl,-rpath=${readline:location}/lib diff --git a/component/xtrabackup/xtrabackup-1.6.2_build.patch b/component/xtrabackup/xtrabackup-1.6.2_build.patch index 6a2474a2d..41c2188fa 100644 --- a/component/xtrabackup/xtrabackup-1.6.2_build.patch +++ b/component/xtrabackup/xtrabackup-1.6.2_build.patch @@ -27,16 +27,17 @@ diff -ur xtrabackup-1.6.2.orig/utils/build.sh xtrabackup-1.6.2/utils/build.sh exit -1 } -@@ -79,7 +81,11 @@ +@@ -79,7 +81,12 @@ { echo "Configuring the server" cd $server_dir - BUILD/autorun.sh -+ aclocal -I $libtool_location/share/aclocal -I config/ac-macros || die "Can't execute aclocal" -+ autoheader || die "Can't execute autoheader" -+ libtoolize --automake --force --copy || die "Can't execute libtoolize" -+ automake --add-missing --force --copy || die "Can't execute automake" -+ autoconf || die "Can't execute autoconf" ++ libtoolize -c -f ++ aclocal -I $libtool_location/share/aclocal -I config/ac-macros ++ autoheader ++ automake -c -a -f ++ autoconf ++ touch sql/sql_yacc.yy eval $configure_cmd echo "Building the server" diff --git a/component/xtrabackup/xtrabackup_build.patch b/component/xtrabackup/xtrabackup_build.patch new file mode 100644 index 000000000..4d1aba8a3 --- /dev/null +++ b/component/xtrabackup/xtrabackup_build.patch @@ -0,0 +1,151 @@ +diff --git a/Makefile b/Makefile +index dbb15d5..852a627 100644 +--- a/Makefile ++++ b/Makefile +@@ -137,5 +137,5 @@ $(TARGET): xtrabackup.o $(INNODBOBJS) $(MYSQLOBJS) + clean: + rm -f *.o xtrabackup_* + install: +- install -m 755 innobackupex-1.5.1 $(BIN_DIR) ++ install -m 755 innobackupex-1.5.1 $(BIN_DIR)/innobackupex + install -m 755 xtrabackup_* $(BIN_DIR) +diff --git a/utils/build.sh b/utils/build.sh +index 3f0cee7..c41dc89 100755 +--- a/utils/build.sh ++++ b/utils/build.sh +@@ -21,12 +21,14 @@ function usage() + { + echo "Build an xtrabackup binary against the specified InnoDB flavor." + echo +- echo "Usage: `basename $0` CODEBASE" ++ echo "Usage: `basename $0` CODEBASE PREFIX LIBTOOL_LOCATION" + echo "where CODEBASE can be one of the following values or aliases:" + echo " innodb51_builtin | 5.1 build against built-in InnoDB in MySQL 5.1" + echo " innodb55 | 5.5 build against InnoDB in MySQL 5.5" + echo " xtradb51 | xtradb build against Percona Server with XtraDB 5.1" + echo " xtradb55 | xtradb55 build against Percona Server with XtraDB 5.5" ++ echo "where PREFIX is abolute path for install location" ++ echo "where LIBTOOL_LOCATION is abolute path of libtool" + exit -1 + } + +@@ -79,7 +81,12 @@ function build_server() + { + echo "Configuring the server" + cd $server_dir +- BUILD/autorun.sh ++ libtoolize -c -f ++ aclocal -I $libtool_location/share/aclocal -I config/ac-macros ++ autoheader ++ automake -c -a -f ++ autoconf ++ touch sql/sql_yacc.yy + eval $configure_cmd + + echo "Building the server" +@@ -92,9 +99,10 @@ function build_xtrabackup() + echo "Building XtraBackup" + mkdir $build_dir + cp $top_dir/Makefile $top_dir/xtrabackup.c $build_dir ++ cp $top_dir/innobackupex $build_dir/innobackupex-1.5.1 + + cd $build_dir +- $MAKE_CMD $xtrabackup_target ++ $MAKE_CMD PREFIX=$1 $xtrabackup_target + cd $top_dir + } + +@@ -103,11 +111,36 @@ function build_tar4ibd() + echo "Building tar4ibd" + unpack_and_patch libtar-1.2.11.tar.gz tar4ibd_libtar-1.2.11.patch + cd libtar-1.2.11 +- ./configure ++ ./configure --prefix=$1 + $MAKE_CMD + cd $topdir + } + ++function install_server() ++{ ++ echo "Installing the server" ++ cd $server_dir ++ $MAKE_CMD install ++ cd $top_dir ++} ++ ++function install_xtrabackup() ++{ ++ echo "Installing XtraBackup" ++ echo $build_dir ++ cd $build_dir ++ $MAKE_CMD PREFIX=$1 install ++ cd $top_dir ++} ++ ++function install_tar4ibd() ++{ ++ echo "Installing tar4ibd" ++ cd libtar-1.2.11 ++ $MAKE_CMD install ++ cd $topdir ++} ++ + ################################################################################ + # Do all steps to build the server, xtrabackup and tar4ibd + # Expects the following variables to be set before calling: +@@ -136,9 +169,15 @@ function build_all() + + build_server + +- build_xtrabackup ++ build_xtrabackup $1 ++ ++ build_tar4ibd $1 ++ ++ install_server ++ ++ install_xtrabackup $1 + +- build_tar4ibd ++ install_tar4ibd + } + + if ! test -f xtrabackup.c +@@ -148,6 +187,15 @@ then + fi + + type=$1 ++prefix=$2 ++if [ "x$prefix" == "x" ] ; then ++ usage ++fi ++libtool_location=$3 ++if [ "x$libtool_location" == "x" ] ; then ++ usage ++fi ++ + top_dir=`pwd` + + case "$type" in +@@ -161,9 +209,10 @@ case "$type" in + --with-plugins=innobase \ + --with-zlib-dir=bundled \ + --enable-shared \ +- --with-extra-charsets=complex" ++ --with-extra-charsets=complex \ ++ --prefix=$2" + +- build_all ++ build_all $2 + ;; + + "innodb55" | "5.5") +@@ -225,7 +274,7 @@ case "$type" in + + build_server + +- build_xtrabackup ++ build_xtrabackup + + build_tar4ibd + ;; diff --git a/component/zabbix/buildout.cfg b/component/zabbix/buildout.cfg index 53248664d..a18f88e7a 100644 --- a/component/zabbix/buildout.cfg +++ b/component/zabbix/buildout.cfg @@ -4,8 +4,8 @@ parts = [zabbix-agent] recipe = hexagonit.recipe.cmmi -url = http://prdownloads.sourceforge.net/zabbix/zabbix-1.8.10.tar.gz?download -md5sum = 7e89f80c1822787c0831f7c0dbefcd7b +url = http://prdownloads.sourceforge.net/zabbix/zabbix-1.8.5.tar.gz?download +md5sum = 58b9253fb0eace1e20b2fe5c1fce32a3 configure-options = --enable-agent --enable-ipv6 diff --git a/setup.py b/setup.py index cf08ce108..17e57428e 100755 --- a/setup.py +++ b/setup.py @@ -2,7 +2,7 @@ from setuptools import setup, find_packages import glob import os -version = '0.40.1' +version = '0.21-dev' name = 'slapos.cookbook' long_description = open("README.txt").read() + "\n" + \ open("CHANGES.txt").read() + "\n" @@ -30,7 +30,6 @@ setup(name=name, 'lxml', # for full blown python interpreter 'netaddr', # to manipulate on IP addresses 'setuptools', # namespaces - 'inotifyx', # to watch filesystem changes (used in lockfile) 'slapos.core', # uses internally # 'slapos.toolbox', # needed for libcloud, cloudmgr, disabled for now 'xml_marshaller', # need to communication with slapgrid @@ -40,88 +39,32 @@ setup(name=name, zip_safe=True, entry_points={ 'zc.buildout': [ - 'apache.frontend = slapos.recipe.apache_frontend:Recipe', - 'apachephp = slapos.recipe.apachephp:Recipe', - 'apacheproxy = slapos.recipe.apacheproxy:Recipe', - 'apache.zope.backend = slapos.recipe.apache_zope_backend:Recipe', - 'certificate_authority = slapos.recipe.certificate_authority:Recipe', - 'certificate_authority.request = slapos.recipe.certificate_authority:Request', - 'cron = slapos.recipe.dcron:Recipe', - 'cron.d = slapos.recipe.dcron:Part', - 'davstorage = slapos.recipe.davstorage:Recipe', - 'dropbear = slapos.recipe.dropbear:Recipe', - 'dropbear.add_authorized_key = slapos.recipe.dropbear:AddAuthorizedKey', - 'dropbear.client = slapos.recipe.dropbear:Client', - 'duplicity = slapos.recipe.duplicity:Recipe', - 'erp5scalabilitytestbed = slapos.recipe.erp5scalabilitytestbed:Recipe', - 'equeue = slapos.recipe.equeue:Recipe', + 'download = slapos.recipe.download:Recipe', + 'erp5 = slapos.recipe.erp5:Recipe', 'erp5testnode = slapos.recipe.erp5testnode:Recipe', 'helloworld = slapos.recipe.helloworld:Recipe', - 'generic.cloudooo = slapos.recipe.generic_cloudooo:Recipe', - 'fontconfig = slapos.recipe.fontconfig:Recipe', 'java = slapos.recipe.java:Recipe', 'kumofs = slapos.recipe.kumofs:Recipe', - 'generic.kumofs = slapos.recipe.generic_kumofs:Recipe', - 'haproxy = slapos.recipe.haproxy:Recipe', 'kvm = slapos.recipe.kvm:Recipe', 'libcloud = slapos.recipe.libcloud:Recipe', 'libcloudrequest = slapos.recipe.libcloudrequest:Recipe', - 'lockfile = slapos.recipe.lockfile:Recipe', 'memcached = slapos.recipe.memcached:Recipe', - 'generic.memcached = slapos.recipe.generic_memcached:Recipe', 'mysql = slapos.recipe.mysql:Recipe', - 'mydumper = slapos.recipe.mydumper:Recipe', - 'generic.mysql = slapos.recipe.generic_mysql:Recipe', - 'mkdirectory = slapos.recipe.mkdirectory:Recipe', 'nbdserver = slapos.recipe.nbdserver:Recipe', 'nosqltestbed = slapos.recipe.nosqltestbed:NoSQLTestBed', - 'notifier = slapos.recipe.notifier:Recipe', - 'notifier.callback = slapos.recipe.notifier:Callback', - 'notifier.notify = slapos.recipe.notifier:Notify', - 'lamp = slapos.recipe.lamp:Request', - 'lamp.request = slapos.recipe.lamp:Request', - 'lamp.static = slapos.recipe.lamp:Static', - 'lamp.simple = slapos.recipe.lamp:Simple', - 'logrotate = slapos.recipe.logrotate:Recipe', - 'logrotate.d = slapos.recipe.logrotate:Part', - 'pbs = slapos.recipe.pbs:Recipe', - 'publish = slapos.recipe.publish:Recipe', - 'publishurl = slapos.recipe.publishurl:Recipe', - 'pwgen = slapos.recipe.pwgen:Recipe', + 'osoeslaptraining = slapos.recipe.osoeslaptraining:Request', + 'osoeslaptraining.request = slapos.recipe.osoeslaptraining:Request', + 'osoeslaptraining.static = slapos.recipe.osoeslaptraining:Static', + 'osoeslaptraining.simple = slapos.recipe.osoeslaptraining:Simple', 'proactive = slapos.recipe.proactive:Recipe', - 'request = slapos.recipe.request:Recipe', - 'seleniumrunner = slapos.recipe.seleniumrunner:Recipe', 'sheepdogtestbed = slapos.recipe.sheepdogtestbed:SheepDogTestBed', - 'shell = slapos.recipe.shell:Recipe', - 'shellinabox = slapos.recipe.shellinabox:Recipe', - 'symbolic.link = slapos.recipe.symbolic_link:Recipe', - 'softwaretype = slapos.recipe.softwaretype:Recipe', 'siptester = slapos.recipe.siptester:SipTesterRecipe', - 'simplelogger = slapos.recipe.simplelogger:Recipe', 'slaprunner = slapos.recipe.slaprunner:Recipe', - 'sshkeys_authority = slapos.recipe.sshkeys_authority:Recipe', - 'sshkeys_authority.request = slapos.recipe.sshkeys_authority:Request', - 'sphinx= slapos.recipe.sphinx:Recipe', - 'stunnel = slapos.recipe.stunnel:Recipe', 'testnode = slapos.recipe.testnode:Recipe', - 'urlparse = slapos.recipe._urlparse:Recipe', 'vifib = slapos.recipe.vifib:Recipe', - 'waitfor = slapos.recipe.waitfor:Recipe', 'xwiki = slapos.recipe.xwiki:Recipe', 'cloudooo = slapos.recipe.cloudooo:Recipe', 'cloudoootestnode = slapos.recipe.cloudoootestnode:Recipe', 'zabbixagent = slapos.recipe.zabbixagent:Recipe', - 'generic.zope = slapos.recipe.generic_zope:Recipe', - 'generic.zope.zeo.client = slapos.recipe.generic_zope_zeo_client:Recipe', - 'generate.erp5.tidstorage = slapos.recipe.generate_erp5_tidstorage:Recipe', - 'generate.cloudooo = slapos.recipe.generate_cloudooo:Recipe', - 'zeo = slapos.recipe.zeo:Recipe', - 'tidstorage = slapos.recipe.tidstorage:Recipe', - 'erp5.update = slapos.recipe.erp5_update:Recipe', - 'erp5.test = slapos.recipe.erp5_test:Recipe', - ], - 'slapos.recipe.nosqltestbed.plugin': [ - 'kumo = slapos.recipe.nosqltestbed.kumo:KumoTestBed', - ], - }, + ]}, ) diff --git a/slapos/recipe/README.apache_frontend.txt b/slapos/recipe/README.apache_frontend.txt deleted file mode 100644 index f701b6591..000000000 --- a/slapos/recipe/README.apache_frontend.txt +++ /dev/null @@ -1,4 +0,0 @@ -apache_frontend -========== - -Frontend using Apache, allowing to rewrite and proxy URLs like myinstance.myfrontenddomainname.com to real IP/URL of myinstance. \ No newline at end of file diff --git a/slapos/recipe/README.download.txt b/slapos/recipe/README.download.txt new file mode 100644 index 000000000..a74c946c5 --- /dev/null +++ b/slapos/recipe/README.download.txt @@ -0,0 +1,36 @@ +download +======== + +Extremely simple recipe to download using zc.buildout download utility. + +Usage +----- + +:: + + [buildout] + parts = + download + + [download] + recipe = slapos.cookbook:download + url = https://some.url/file + +Such profile will download https://some.url/file and put it in +buildout:parts-directory/download/download + +filename parameter can be used to change destination named filename. + +destination parameter allows to put explicit destination. + +md5sum parameter allows pass md5sum. + +mode (octal, so for rw-r--r-- use 0644) allows to set mode + +Exposes target attribute which is path to downloaded file. + +Notes +----- + +This recipe suffers from buildout download utility issue, which will do not +try to redownload resource with wrong md5sum. diff --git a/slapos/recipe/README.helloworld.txt b/slapos/recipe/README.helloworld.txt new file mode 100644 index 000000000..50a7fc181 --- /dev/null +++ b/slapos/recipe/README.helloworld.txt @@ -0,0 +1,4 @@ +helloworld +========== + +It only installs a dummy wrapper saying "Hello World!" and sends to the master an "HelloWorld" parameter. diff --git a/slapos/recipe/README.java.txt b/slapos/recipe/README.java.txt new file mode 100644 index 000000000..cd433460a --- /dev/null +++ b/slapos/recipe/README.java.txt @@ -0,0 +1,46 @@ +java +==== + + This recipe downloads and installs java in your buildout. + +Buildout configuration: +----------------------- + + Add this section to your buildout configuration:: + + [buildout] + parts = + ... your other parts ... + java + ... + + [java] + recipe = slapos.cookbook:java + + By default it will fetch Java 6u25, but you might want to install from another location or another version like this:: + + [java] + recipe = slapos.cookbook:java + download-url = ftp://location/to/self-extracting/java.bin + + Or you can install openjdk instead. + + [java] + recipe = slapos.cookbook:java + flavour = openjdk + + +Notes: +------ + + This recipe only works with linux at the moment + + This recipe requires rpm2cpio and cpio to be installed on your system. + +Authors: +-------- + + Original author: Cedric de Saint Martin - cedric.dsm [ at ] tiolive [ dot ] com + + Inspired by : z3c.recipe.openoffice made by Jean-Francois Roche - jfroche@affinitic.be + diff --git a/slapos/recipe/README.lamp.txt b/slapos/recipe/README.lamp.txt index d1738526d..7a75a2033 100644 --- a/slapos/recipe/README.lamp.txt +++ b/slapos/recipe/README.lamp.txt @@ -1,9 +1,9 @@ lamp ===== -The lamp recipe helps you to deploy simply a php based application on slapos. This recipe is -able to setup mariadb, apache and apache-php for your php application, and is also capable of -configuring your software during installation to ensure a full compatibility. +the lamp recipe help you to deploy simply a php based application on slapos. This recipe is +able to setup mariadb, apache and apache-php for your php application, is also capable to +configure your software during installation to ensure a full compatibility. How to use? @@ -34,26 +34,9 @@ in this case you need to write a python script and lamp recipe must run it when How to use? ----------- -this part of lamp recipe work with slapos.toolbox, Therefore you must add it to your recipe. -in software.cfg, replace instance-recipe-egg part by - -[instance-recipe-egg] -recipe = zc.recipe.egg -python = python2.7 -eggs = - ${mysql-python:egg} - ${instance-recipe:egg} - slapos.toolbox[lampconfigure] - -and add into your instance.cfg - -lampconfigure_directory = ${buildout:bin-directory}/lampconfigure - - CONDITION -------- - -the action (delete, rename, script, chmod) only starts when the condition is filled. +the action (move, rename, launch script) only starts when the condition is filled. in instance.cfg, add file_token = path_of_file @@ -69,13 +52,14 @@ into mariadb databse for example table_name = admin. if you use name_of_table = **, the action will begin when database is ready. constraint is the sql_condition to use when search entry into name_of_table for example constraint = `admin_id`=1 -you can't use file_token and table_name at the same time, otherwise file_token will be used in priority. Beware of conditions that will never be satisfied. +you can no use file_token and table_name at the same time, otherwise file_token will be used in priority. attention +to the conditions that will never be satisfied. ACTION ------- -The action starts when condition is true +the action start when condition is true 1- delete file or folder into instance.cfg, use @@ -86,23 +70,13 @@ for example delete = admin 2- rename file or folder into instance.cfg, use -rename_chmod = mode (optional) -rename = old_name1 => new_name1, old_name2 => new_name2, ... +rename = old_name1 => new_name1, old_name2 => new_name2, ... you can also use -you can also use rename = old_name1, old_name2 => new_name2, ... in this case old_name1 will be rename and the new name will be chose by joining old_name1 and mysql_user: this should give rename = old_name1 => old_name1-mysql_user, old_name2 => new_name2, ... -use rename_chmod to apply a mode to new_name1, new_name2, ... - -3- Change mode of file or directory - -this is usefull if you want to change the mode of files into your www-data, use - -chmod = file1, file2, .... -mode = mode_to_apply (ex= 0644) -4- Launch python script +3- launch python script use script = ${configure-script:location}/${configure-script:filename} into instance.cfg, add part configure-script into software.cfg @@ -116,10 +90,10 @@ url = url_of_script_name.py filename = script_name.py download-only = True -The script_name.py should contain a main function, sys.argv is given to the main. you can write script_name.py like this +the script_name.py should contain a main module, sys.argv is passed to the main. you can write script_name.py like this .... def setup(args): - mysql_port, mysql_host, mysql_user, mysql_password, mysql_database, base_url, htdocs = args + base_url, htdocs, renamed, mysql_user, mysql_password, mysql_database, mysql_host = args ....... if __name__ == '__main__': @@ -128,4 +102,3 @@ if __name__ == '__main__': base_url: is the url of php software htdocs: is the path of www-data directory mysql_user, mysql_password, mysql_database, mysql_host: is the mariadb parameters -you can also use "import MySQLdb" if you want to access to database via your python script \ No newline at end of file diff --git a/slapos/recipe/README.seleniumrunner.txt b/slapos/recipe/README.seleniumrunner.txt deleted file mode 100644 index eec75eeba..000000000 --- a/slapos/recipe/README.seleniumrunner.txt +++ /dev/null @@ -1,24 +0,0 @@ -seleniumrunner -========== -Allows to run selenium tests through browser and xvfb. Posts the results on -Nexedi ERP5. - -Parameters -===== - * project : name of the project inside of ERP5 test result instance - * user : username to use in ERP5 instance to test - * password : password to use in ERP5 instance to test - * suite_name : name of test suite to launch - * url : url to portal_test of ERP5 isntance to test - * test_report_instance_url : url of test_result_module to put results - - * Example : - <?xml version="1.0" encoding="utf-8"?> - <instance> - <parameter id="project">Vifib</parameter> - <parameter id="user">myuser</parameter> - <parameter id="password">mypassword</parameter> - <parameter id="suite_name">my_zuite</parameter> - <parameter id="url">https://myerp5totest/erp5/portal_tests</parameter> - <parameter id="test_report_instance_url">https://user:passwordwww.myerp5withtestresults.com/test_result_module/</parameter> - </instance> diff --git a/slapos/recipe/_urlparse.py b/slapos/recipe/_urlparse.py deleted file mode 100644 index 0a04c80cd..000000000 --- a/slapos/recipe/_urlparse.py +++ /dev/null @@ -1,52 +0,0 @@ -############################################################################## -# -# 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 urlparse import urlparse - -from slapos.recipe.librecipe import GenericBaseRecipe - -class Recipe(GenericBaseRecipe): - - def _options(self, options): - url = urlparse(options['url']) - - def to_str(data): - if data is None: - return '' - return str(data) - - options.update(scheme=url.scheme, - username=to_str(url.username), - password=to_str(url.password), - host=to_str(url.hostname), - port=to_str(url.port), - path=url.path.strip('/'), - params=url.params, - query=url.query, - fragment=url.fragment) - - def install(self): - return [] diff --git a/slapos/recipe/apache_frontend/__init__.py b/slapos/recipe/apache_frontend/__init__.py deleted file mode 100644 index acb67c8d4..000000000 --- a/slapos/recipe/apache_frontend/__init__.py +++ /dev/null @@ -1,442 +0,0 @@ -############################################################################## -# -# 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 BaseSlapRecipe -import os -import pkg_resources -import hashlib -import sys -import zc.buildout -import zc.recipe.egg -import ConfigParser -import re - - -class Recipe(BaseSlapRecipe): - - def getTemplateFilename(self, template_name): - return pkg_resources.resource_filename(__name__, - 'template/%s' % template_name) - - def _install(self): - self.path_list = [] - self.requirements, self.ws = self.egg.working_set() - - # self.cron_d is a directory, where cron jobs can be registered - self.cron_d = self.installCrond() - self.logrotate_d, self.logrotate_backup = self.installLogrotate() - self.killpidfromfile = zc.buildout.easy_install.scripts( - [('killpidfromfile', 'slapos.recipe.erp5.killpidfromfile', - 'killpidfromfile')], self.ws, sys.executable, self.bin_directory)[0] - - self.path_list.append(self.killpidfromfile) - - frontend_port_number = self.parameter_dict.get("port", 4443) - frontend_domain_name = self.parameter_dict.get("domain", - "host.vifib.net") - - base_varnish_port = 26009 - slave_instance_list = self.parameter_dict.get("slave_instance_list", []) - rewrite_rule_list = [] - slave_dict = {} - service_dict = {} - if frontend_port_number is 443: - base_url = "%s/" % frontend_domain_name - else: - base_url = "%s:%s/" % (frontend_domain_name, frontend_port_number) - for slave_instance in slave_instance_list: - url = slave_instance.get("url") - if url is None: - continue - reference = slave_instance.get("slave_reference") - subdomain = reference.replace("-", "").lower() - slave_dict[reference] = "https://%s.%s" % (subdomain, base_url) - - enable_cache = slave_instance.get("enable_cache", "") - if enable_cache.upper() in ('1', 'TRUE'): - # Varnish should use stunnel to connect to the backend - base_varnish_control_port = base_varnish_port - base_varnish_port += 1 - # Use regex - host_regex = "((\[\w*|[0-9]+\.)(\:|)).*(\]|\.[0-9]+)" - slave_host = re.search(host_regex, url).group(0) - port_regex = "\w+(\/|)$" - matcher = re.search(port_regex, url) - if matcher is not None: - slave_port = matcher.group(0) - slave_port = slave_port.replace("/", "") - elif url.startswith("https://"): - slave_port = 443 - else: - slave_port = 80 - service_name = "varnish_%s" % reference - varnish_ip = self.getLocalIPv4Address() - stunnel_port = base_varnish_port + 1 - self.installVarnishCache(service_name, - ip=varnish_ip, - port=base_varnish_port, - control_port=base_varnish_control_port, - backend_host=varnish_ip, - backend_port=stunnel_port, - size="1G") - service_dict[service_name] = dict(public_ip=varnish_ip, - public_port=stunnel_port, - private_ip=slave_host.replace("[", "").replace("]", ""), - private_port=slave_port) - rewrite_rule_list.append("%s.%s http://%s:%s" % \ - (reference.replace("-", ""), frontend_domain_name, - varnish_ip, base_varnish_port)) - base_varnish_port += 2 - else: - rewrite_rule_list.append("%s.%s %s" % (subdomain, frontend_domain_name, - url)) - - valid_certificate_str = self.parameter_dict.get("domain_ssl_ca_cert") - valid_key_str = self.parameter_dict.get("domain_ssl_ca_key") - - if valid_certificate_str is None and valid_key_str is None: - ca_conf = self.installCertificateAuthority() - key, certificate = self.requestCertificate(frontend_domain_name) - else: - ca_conf = self.installValidCertificateAuthority( - frontend_domain_name, valid_certificate_str, valid_key_str) - key = ca_conf.pop("key") - certificate = ca_conf.pop("certificate") - - if service_dict != {}: - if valid_certificate_str is not None and valid_key_str is not None: - self.installCertificateAuthority() - stunnel_key, stunnel_certificate = \ - self.requestCertificate(frontend_domain_name) - else: - stunnel_key, stunnet_certificate = key, certificate - self.installStunnel(service_dict, - stunnel_certificate, stunnel_key, - ca_conf["ca_crl"], - ca_conf["certificate_authority_path"]) - - apache_parameter_dict = self.installFrontendApache( - ip_list=["[%s]" % self.getGlobalIPv6Address(), - self.getLocalIPv4Address()], - port=frontend_port_number, - name=frontend_domain_name, - rewrite_rule_list=rewrite_rule_list, - key=key, certificate=certificate) - - for reference, url in slave_dict.iteritems(): - self.setConnectionDict(dict(site_url=url), reference) - - self.setConnectionDict( - dict(site_url=apache_parameter_dict["site_url"], - domain_ipv6_address=self.getGlobalIPv6Address(), - domain_ipv4_address=self.getLocalIPv4Address())) - return self.path_list - - def installLogrotate(self): - """Installs logortate main configuration file and registers its to cron""" - logrotate_d = os.path.abspath(os.path.join(self.etc_directory, - 'logrotate.d')) - self._createDirectory(logrotate_d) - logrotate_backup = self.createBackupDirectory('logrotate') - logrotate_conf = self.createConfigurationFile("logrotate.conf", - "include %s" % logrotate_d) - logrotate_cron = os.path.join(self.cron_d, 'logrotate') - state_file = os.path.join(self.data_root_directory, 'logrotate.status') - open(logrotate_cron, 'w').write('0 0 * * * %s -s %s %s' % - (self.options['logrotate_binary'], state_file, logrotate_conf)) - self.path_list.extend([logrotate_d, logrotate_conf, logrotate_cron]) - return logrotate_d, logrotate_backup - - def registerLogRotation(self, name, log_file_list, postrotate_script): - """Register new log rotation requirement""" - open(os.path.join(self.logrotate_d, name), 'w').write( - self.substituteTemplate(self.getTemplateFilename( - 'logrotate_entry.in'), - dict(file_list=' '.join(['"'+q+'"' for q in log_file_list]), - postrotate=postrotate_script, olddir=self.logrotate_backup))) - - def requestCertificate(self, name): - hash = hashlib.sha512(name).hexdigest() - key = os.path.join(self.ca_private, hash + self.ca_key_ext) - certificate = os.path.join(self.ca_certs, hash + self.ca_crt_ext) - parser = ConfigParser.RawConfigParser() - parser.add_section('certificate') - parser.set('certificate', 'name', name) - parser.set('certificate', 'key_file', key) - parser.set('certificate', 'certificate_file', certificate) - parser.write(open(os.path.join(self.ca_request_dir, hash), 'w')) - return key, certificate - - def installCrond(self): - timestamps = self.createDataDirectory('cronstamps') - cron_output = os.path.join(self.log_directory, 'cron-output') - self._createDirectory(cron_output) - catcher = zc.buildout.easy_install.scripts([('catchcron', - __name__ + '.catdatefile', 'catdatefile')], self.ws, sys.executable, - self.bin_directory, arguments=[cron_output])[0] - self.path_list.append(catcher) - cron_d = os.path.join(self.etc_directory, 'cron.d') - crontabs = os.path.join(self.etc_directory, 'crontabs') - self._createDirectory(cron_d) - self._createDirectory(crontabs) - wrapper = zc.buildout.easy_install.scripts([('crond', - 'slapos.recipe.librecipe.execute', 'execute')], self.ws, sys.executable, - self.wrapper_directory, arguments=[ - self.options['dcrond_binary'].strip(), '-s', cron_d, '-c', crontabs, - '-t', timestamps, '-f', '-l', '5', '-M', catcher] - )[0] - self.path_list.append(wrapper) - return cron_d - - def installValidCertificateAuthority(self, domain_name, certificate, key): - ca_dir = os.path.join(self.data_root_directory, 'ca') - ca_private = os.path.join(ca_dir, 'private') - ca_certs = os.path.join(ca_dir, 'certs') - ca_crl = os.path.join(ca_dir, 'crl') - self._createDirectory(ca_dir) - for path in (ca_private, ca_certs, ca_crl): - self._createDirectory(path) - key_path = os.path.join(ca_private, domain_name + ".key") - certificate_path = os.path.join(ca_certs, domain_name + ".crt") - self._writeFile(key_path, key) - self._writeFile(certificate_path, certificate) - return dict(certificate_authority_path=ca_dir, - ca_crl=ca_crl, - certificate=certificate_path, - key=key_path) - - def installCertificateAuthority(self, ca_country_code='XX', - ca_email='xx@example.com', ca_state='State', ca_city='City', - ca_company='Company'): - backup_path = self.createBackupDirectory('ca') - self.ca_dir = os.path.join(self.data_root_directory, 'ca') - self._createDirectory(self.ca_dir) - self.ca_request_dir = os.path.join(self.ca_dir, 'requests') - self._createDirectory(self.ca_request_dir) - config = dict(ca_dir=self.ca_dir, request_dir=self.ca_request_dir) - self.ca_private = os.path.join(self.ca_dir, 'private') - self.ca_certs = os.path.join(self.ca_dir, 'certs') - self.ca_crl = os.path.join(self.ca_dir, 'crl') - self.ca_newcerts = os.path.join(self.ca_dir, 'newcerts') - self.ca_key_ext = '.key' - self.ca_crt_ext = '.crt' - for d in [self.ca_private, self.ca_crl, self.ca_newcerts, self.ca_certs]: - self._createDirectory(d) - for f in ['crlnumber', 'serial']: - if not os.path.exists(os.path.join(self.ca_dir, f)): - open(os.path.join(self.ca_dir, f), 'w').write('01') - if not os.path.exists(os.path.join(self.ca_dir, 'index.txt')): - open(os.path.join(self.ca_dir, 'index.txt'), 'w').write('') - openssl_configuration = os.path.join(self.ca_dir, 'openssl.cnf') - config.update( - working_directory=self.ca_dir, - country_code=ca_country_code, - state=ca_state, - city=ca_city, - company=ca_company, - email_address=ca_email, - ) - self._writeFile(openssl_configuration, pkg_resources.resource_string( - __name__, 'template/openssl.cnf.ca.in') % config) - self.path_list.extend(zc.buildout.easy_install.scripts([ - ('certificate_authority', __name__ + '.certificate_authority', - 'runCertificateAuthority')], - self.ws, sys.executable, self.wrapper_directory, arguments=[dict( - openssl_configuration=openssl_configuration, - openssl_binary=self.options['openssl_binary'], - certificate=os.path.join(self.ca_dir, 'cacert.pem'), - key=os.path.join(self.ca_private, 'cakey.pem'), - crl=os.path.join(self.ca_crl), - request_dir=self.ca_request_dir - )])) - - # configure backup - backup_cron = os.path.join(self.cron_d, 'ca_rdiff_backup') - open(backup_cron, 'w').write( - '''0 0 * * * %(rdiff_backup)s %(source)s %(destination)s'''%dict( - rdiff_backup=self.options['rdiff_backup_binary'], - source=self.ca_dir, - destination=backup_path)) - self.path_list.append(backup_cron) - - return dict( - ca_certificate=os.path.join(config['ca_dir'], 'cacert.pem'), - ca_crl=os.path.join(config['ca_dir'], 'crl'), - certificate_authority_path=config['ca_dir'] - ) - - def _getApacheConfigurationDict(self, name, ip_list, port): - apache_conf = dict() - apache_conf['server_name'] = name - apache_conf['pid_file'] = os.path.join(self.run_directory, - name + '.pid') - apache_conf['lock_file'] = os.path.join(self.run_directory, - name + '.lock') - apache_conf['document_root'] = os.path.join(self.data_root_directory, - 'htdocs') - apache_conf['ip_list'] = ip_list - apache_conf['port'] = port - apache_conf['server_admin'] = 'admin@' - apache_conf['error_log'] = os.path.join(self.log_directory, - name + '-error.log') - apache_conf['access_log'] = os.path.join(self.log_directory, - name + '-access.log') - self.registerLogRotation(name, [apache_conf['error_log'], - apache_conf['access_log']], self.killpidfromfile + ' ' + - apache_conf['pid_file'] + ' SIGUSR1') - return apache_conf - - def installVarnishCache(self, name, ip, port, control_port, backend_host, - backend_port, size="1G"): - """ - Install a varnish daemon for a certain address - """ - directory = self.createDataDirectory(name) - varnish_config = dict( - directory=directory, - pid = "%s/varnish.pid" % directory, - port="%s:%s" % (ip, port), - varnishd_binary=self.options["varnishd_binary"], - control_port="%s:%s" % (ip, control_port), - storage="file,%s/storage.bin,%s" % (directory, size)) - - config_file = self.createConfigurationFile("%s.conf" % name, - self.substituteTemplate(self.getTemplateFilename('varnish.vcl.in'), - dict(backend_host=backend_host, backend_port=backend_port))) - - varnish_argument_list = [varnish_config['varnishd_binary'].strip(), - "-F", "-n", directory, "-P", varnish_config["pid"], "-p", - "cc_command=exec %s " % self.options["gcc_binary"] +\ - "-fpic -shared -o %o %s", - "-f", config_file, - "-a", varnish_config["port"], "-T", varnish_config["control_port"], - "-s", varnish_config["storage"]] - environment = dict(PATH=self.options["binutils_directory"]) - wrapper = zc.buildout.easy_install.scripts([(name, - 'slapos.recipe.librecipe.execute', 'executee')], self.ws, - sys.executable, self.wrapper_directory, arguments=[varnish_argument_list, - environment])[0] - self.path_list.append(wrapper) - - return varnish_config - - def installStunnel(self, service_dict, certificate, - key, ca_crl, ca_path): - """Installs stunnel - service_dict = - { name: (public_ip, private_ip, public_port, private_port),} - """ - template_filename = self.getTemplateFilename('stunnel.conf.in') - template_entry_filename = self.getTemplateFilename('stunnel.conf.entry.in') - - log = os.path.join(self.log_directory, 'stunnel.log') - pid_file = os.path.join(self.run_directory, 'stunnel.pid') - stunnel_conf = dict( - pid_file=pid_file, - log=log, - cert = certificate, - key = key, - ca_crl = ca_crl, - ca_path = ca_path, - entry_str='' - ) - entry_list = [] - for name, parameter_dict in service_dict.iteritems(): - parameter_dict["name"] = name - entry_str = self.substituteTemplate(template_entry_filename, - parameter_dict) - entry_list.append(entry_str) - - stunnel_conf["entry_str"] = "\n".join(entry_list) - stunnel_conf_path = self.createConfigurationFile("stunnel.conf", - self.substituteTemplate(template_filename, - stunnel_conf)) - wrapper = zc.buildout.easy_install.scripts([('stunnel', - 'slapos.recipe.librecipe.execute', 'execute_wait')], self.ws, - sys.executable, self.wrapper_directory, arguments=[ - [self.options['stunnel_binary'].strip(), stunnel_conf_path], - [certificate, key]] - )[0] - self.path_list.append(wrapper) - return stunnel_conf - - def installFrontendApache(self, ip_list, port, key, certificate, name, - rewrite_rule_list=[], rewrite_rule_zope_list=[], - access_control_string=None): - # Create htdocs, populate it with default 404 document - htdocs_location = os.path.join(self.data_root_directory, 'htdocs') - self._createDirectory(htdocs_location) - notfound_file_location = os.path.join(htdocs_location, 'notfound.html') - notfound_template_file_location = self.getTemplateFilename( - 'notfound.html') - notfound_file_content = open(notfound_template_file_location, 'r').read() - self._writeFile(notfound_file_location, notfound_file_content) - - # Create configuration file and rewritemaps - apachemap_name = "apachemap.txt" - # XXX-Cedric : implement zope specific rewrites list. Current apachemap is - # generic and does not use VirtualHost Monster. - apachemapzope_name = "apachemapzope.txt" - self.createConfigurationFile(apachemap_name, "\n".join(rewrite_rule_list)) - self.createConfigurationFile(apachemapzope_name, - "\n".join(rewrite_rule_zope_list)) - apache_conf = self._getApacheConfigurationDict(name, ip_list, port) - apache_conf['ssl_snippet'] = self.substituteTemplate( - self.getTemplateFilename('apache.ssl-snippet.conf.in'), - dict(login_certificate=certificate, login_key=key)) - - apache_conf["listen"] = "\n".join(["Listen %s:%s" % (ip, port) for ip in ip_list]) - - path = self.substituteTemplate( - self.getTemplateFilename('apache.conf.path-protected.in'), - dict(path='/', access_control_string='none')) - - apache_conf.update(**dict( - path_enable=path, - apachemap_path=os.path.join(self.etc_directory, apachemap_name), - apachemapzope_path=os.path.join(self.etc_directory, apachemapzope_name), - apache_domain=name, - port=port, - )) - - apache_conf_string = self.substituteTemplate( - self.getTemplateFilename('apache.conf.in'), apache_conf) - - apache_config_file = self.createConfigurationFile('apache_frontend.conf', - apache_conf_string) - - - self.path_list.append(apache_config_file) - self.path_list.extend(zc.buildout.easy_install.scripts([( - name, 'slapos.recipe.erp5.apache', 'runApache')], self.ws, - sys.executable, self.wrapper_directory, arguments=[ - dict( - required_path_list=[key, certificate], - binary=self.options['httpd_binary'], - config=apache_config_file) - ])) - - return dict(site_url="https://%s:%s/" % (name, port)) diff --git a/slapos/recipe/apache_frontend/template/apache.conf.in b/slapos/recipe/apache_frontend/template/apache.conf.in deleted file mode 100644 index 1ec1e6cd1..000000000 --- a/slapos/recipe/apache_frontend/template/apache.conf.in +++ /dev/null @@ -1,74 +0,0 @@ -# Apache configuration file for Zope -# Automatically generated - -# Basic server configuration -PidFile "%(pid_file)s" -LockFile "%(lock_file)s" -ServerName %(server_name)s -DocumentRoot %(document_root)s - -%(listen)s - -ServerAdmin %(server_admin)s -DefaultType text/plain -TypesConfig conf/mime.types -AddType application/x-compress .Z -AddType application/x-gzip .gz .tgz - -# As backend is trusting REMOTE_USER header unset it always -RequestHeader unset REMOTE_USER - -# SSL Configuration -%(ssl_snippet)s - -# Log configuration -ErrorLog "%(error_log)s" -LogLevel warn -LogFormat "%%h %%{REMOTE_USER}i %%l %%u %%t \"%%r\" %%>s %%b \"%%{Referer}i\" \"%%{User-Agent}i\"" combined -LogFormat "%%h %%{REMOTE_USER}i %%l %%u %%t \"%%r\" %%>s %%b" common -CustomLog "%(access_log)s" common - -# Directory protection -<Directory /> - Options FollowSymLinks - AllowOverride None - Order deny,allow - Deny from all -</Directory> - -%(path_enable)s - -# Rewrite part -RewriteEngine On - -# Define the two rewritemaps : one for zope, one generic -RewriteMap apachemapzope txt:%(apachemapzope_path)s -RewriteMap apachemapgeneric txt:%(apachemap_path)s - -# First, we check if we have a zope backend server -# If so, let's use Virtual Host Daemon rewrite -#RewriteCond ${apachemapzope:%%{SERVER_NAME}} >"" -#RewriteRule ^/(\w+)($|/.*) ${apachemapzope:$1}/VirtualHostBase/https/%(apache_domain)s:%(port)s/VirtualHostRoot/_vh_$1$2 [L,P] - -# If we have generic backend server, let's rewrite without virtual host daemon -RewriteCond ${apachemapgeneric:%%{SERVER_NAME}} >"" -RewriteRule ^/(.*)$ ${apachemapgeneric:%%{SERVER_NAME}}/$1 [L,P] - -# If nothing exist : put a nice error -ErrorDocument 404 /notfound.html - -# List of modules -LoadModule authz_host_module modules/mod_authz_host.so -LoadModule log_config_module modules/mod_log_config.so -LoadModule setenvif_module modules/mod_setenvif.so -LoadModule version_module modules/mod_version.so -LoadModule proxy_module modules/mod_proxy.so -LoadModule proxy_http_module modules/mod_proxy_http.so -LoadModule ssl_module modules/mod_ssl.so -LoadModule mime_module modules/mod_mime.so -LoadModule dav_module modules/mod_dav.so -LoadModule dav_fs_module modules/mod_dav_fs.so -LoadModule negotiation_module modules/mod_negotiation.so -LoadModule rewrite_module modules/mod_rewrite.so -LoadModule headers_module modules/mod_headers.so -LoadModule antiloris_module modules/mod_antiloris.so diff --git a/slapos/recipe/apache_frontend/template/apache.conf.path-protected.in b/slapos/recipe/apache_frontend/template/apache.conf.path-protected.in deleted file mode 100644 index 0644a2afe..000000000 --- a/slapos/recipe/apache_frontend/template/apache.conf.path-protected.in +++ /dev/null @@ -1,5 +0,0 @@ -# Path protected -<Location %(path)s> - Order Deny,Allow - Allow from %(access_control_string)s -</Location> diff --git a/slapos/recipe/apache_frontend/template/apache.location-snippet.conf.in b/slapos/recipe/apache_frontend/template/apache.location-snippet.conf.in deleted file mode 100644 index 470260a8f..000000000 --- a/slapos/recipe/apache_frontend/template/apache.location-snippet.conf.in +++ /dev/null @@ -1,5 +0,0 @@ -<Location %(location)s> - Order Deny,Allow - Deny from all - Allow from %(allow_string)s -</Location> diff --git a/slapos/recipe/apache_frontend/template/apache.ssl-snippet.conf.in b/slapos/recipe/apache_frontend/template/apache.ssl-snippet.conf.in deleted file mode 100644 index 67e6766ef..000000000 --- a/slapos/recipe/apache_frontend/template/apache.ssl-snippet.conf.in +++ /dev/null @@ -1,6 +0,0 @@ -SSLEngine on -SSLProxyEngine on -SSLCertificateFile %(login_certificate)s -SSLCertificateKeyFile %(login_key)s -SSLRandomSeed startup builtin -SSLRandomSeed connect builtin diff --git a/slapos/recipe/apache_frontend/template/notfound.html b/slapos/recipe/apache_frontend/template/notfound.html deleted file mode 100644 index 2e87e0a9b..000000000 --- a/slapos/recipe/apache_frontend/template/notfound.html +++ /dev/null @@ -1,9 +0,0 @@ -<html> -<head> - <title>Instance not found</title> -</head> -<body> -<h1>This instance has not been found.</h1> -<p>If this error persists, please check your instance URL and status on SlapOS Master.</p> -</body> -</html> diff --git a/slapos/recipe/apache_frontend/template/stunnel.conf.entry.in b/slapos/recipe/apache_frontend/template/stunnel.conf.entry.in deleted file mode 100644 index ff22e9bd4..000000000 --- a/slapos/recipe/apache_frontend/template/stunnel.conf.entry.in +++ /dev/null @@ -1,3 +0,0 @@ -[%(name)s] -accept = %(public_ip)s:%(public_port)s -connect = %(private_ip)s:%(private_port)s diff --git a/slapos/recipe/apache_frontend/template/stunnel.conf.in b/slapos/recipe/apache_frontend/template/stunnel.conf.in deleted file mode 100644 index e1264d7d6..000000000 --- a/slapos/recipe/apache_frontend/template/stunnel.conf.in +++ /dev/null @@ -1,14 +0,0 @@ -foreground = yes -output = %(log)s -pid = %(pid_file)s -syslog = no -client = yes -CApath = %(ca_path)s -key = %(key)s -CRLpath = %(ca_crl)s -cert = %(cert)s -sslVersion = SSLv3 -socket = l:TCP_NODELAY=1 -socket = r:TCP_NODELAY=1 - -%(entry_str)s diff --git a/slapos/recipe/apache_frontend/template/varnish.vcl.in b/slapos/recipe/apache_frontend/template/varnish.vcl.in deleted file mode 100644 index 1113fe234..000000000 --- a/slapos/recipe/apache_frontend/template/varnish.vcl.in +++ /dev/null @@ -1,245 +0,0 @@ -# This is a basic VCL configuration file for varnish. See the vcl(7) -# man page for details on VCL syntax and semantics. -# -# Default backend definition. Set this to point to your content -# server. -# -backend default { - .host = "%(backend_host)s"; - .port = "%(backend_port)s"; - .probe = { - .url = "/"; - .timeout = 10s; - .interval = 10s; - .window = 4; - .threshold = 3; - } -} -# -# Below is a commented-out copy of the default VCL logic. If you -# redefine any of these subroutines, the built-in logic will be -# appended to your code. -# -# sub vcl_recv { -# if (req.http.x-forwarded-for) { -# set req.http.X-Forwarded-For = -# req.http.X-Forwarded-For ", " client.ip; -# } else { -# set req.http.X-Forwarded-For = client.ip; -# } -# if (req.request != "GET" && -# req.request != "HEAD" && -# req.request != "PUT" && -# req.request != "POST" && -# req.request != "TRACE" && -# req.request != "OPTIONS" && -# req.request != "DELETE") { -# /* Non-RFC2616 or CONNECT which is weird. */ -# return (pipe); -# } -# if (req.request != "GET" && req.request != "HEAD") { -# /* We only deal with GET and HEAD by default */ -# return (pass); -# } -# if (req.http.Authorization || req.http.Cookie) { -# /* Not cacheable by default */ -# return (pass); -# } -# return (lookup); -# } -sub vcl_recv { - if (req.http.cache-control ~ "no-cache") { - purge_url(req.url); - } - - if (req.url ~ "\.(css|js|ico)$") { - unset req.http.cookie; - } - - # remove bogus cookies - if (req.http.Cookie) { - set req.http.Cookie = regsuball(req.http.Cookie, "(^|; ) *__utm.=[^;]+;? *", "\1"); - set req.http.Cookie = regsuball(req.http.Cookie, "(^|; ) *__ac_name=\x22\x22;? *", "\1"); - set req.http.Cookie = regsuball(req.http.Cookie, "(^|; ) *__ac=\x22Og.3D.3D\x22;? *", "\1"); - } - if (req.http.Cookie == "") { - remove req.http.Cookie; - } - - if (req.http.x-forwarded-for) { - set req.http.X-Forwarded-For = - req.http.X-Forwarded-For ", " client.ip; - } else { - set req.http.X-Forwarded-For = client.ip; - } - if (req.request != "GET" && - req.request != "HEAD" && - req.request != "PUT" && - req.request != "POST" && - req.request != "TRACE" && - req.request != "OPTIONS" && - req.request != "DELETE") { - /* Non-RFC2616 or CONNECT which is weird. */ - return (pipe); - } - if (req.request != "GET" && req.request != "HEAD") { - /* We only deal with GET and HEAD by default */ - return (pass); - } - if (req.http.Authorization) { - /* Not cacheable by default */ - return (pass); - } - if (req.http.Cookie && req.http.Cookie ~ "(^|; ) *__ac=") { - /* Not cacheable for authorised users, - but KM images are cacheable */ - if (!(req.url ~ "/km_img/.*\.(png|gif)$")) { - return (pass); - } - } - # XXX login form can defer based on __ac_name cookie value - if (req.url ~ "/(login_form|WebSite_viewLoginDialog)($|\?)") { - return (pass); - } - if (req.backend.healthy) { - set req.grace = 1h; - } else { - set req.grace = 1w; - } - return (lookup); -} -# -# sub vcl_pipe { -# # Note that only the first request to the backend will have -# # X-Forwarded-For set. If you use X-Forwarded-For and want to -# # have it set for all requests, make sure to have: -# # set req.http.connection = "close"; -# # here. It is not set by default as it might break some broken web -# # applications, like IIS with NTLM authentication. -# return (pipe); -# } -# -# sub vcl_pass { -# return (pass); -# } -# -# sub vcl_hash { -# set req.hash += req.url; -# if (req.http.host) { -# set req.hash += req.http.host; -# } else { -# set req.hash += server.ip; -# } -# return (hash); -# } -# -# sub vcl_hit { -# if (!obj.cacheable) { -# return (pass); -# } -# return (deliver); -# } -# -# sub vcl_miss { -# return (fetch); -# } -# -# sub vcl_fetch { -# if (!beresp.cacheable) { -# return (pass); -# } -# if (beresp.http.Set-Cookie) { -# return (pass); -# } -# return (deliver); -# } -sub vcl_fetch { - # we only cache 200 (OK) and 304 (Not Modified) responses. - if (beresp.status != 200 && beresp.status != 304) { - set beresp.cacheable = false; - } - - if (beresp.http.cache-control ~ "no-cache") { - set beresp.cacheable = false; - } - - if (!beresp.cacheable) { - unset beresp.http.expires; - set beresp.http.cache-control = "no-cache"; - return (pass); - } - - # we don't care haproxy's cookie. - if (beresp.http.Set-Cookie && beresp.http.Set-Cookie !~ "^SERVERID=[^;]+; path=/$") { - return (pass); - } - - if (req.url ~ "\.(css|js|ico)$") { - unset beresp.http.set-cookie; - set beresp.http.cache-control = regsub(beresp.http.cache-control, "^", "public,"); - set beresp.http.cache-control = regsub(beresp.http.cache-control, ",$", ""); - } - - # remove some headers added by caching policy manager to avoid - # '304 Not Modified' in case of login <-> logout switching. - if (beresp.http.content-type ~ "^text/html") { - unset beresp.http.last-modified; - } - - if (beresp.cacheable) { - /* Remove Expires from backend, it's not long enough */ - unset beresp.http.expires; - /* Set the clients TTL on this object */ - set beresp.http.cache-control = "max-age = 900"; - /* Set how long Varnish will keep it */ - set beresp.ttl = 1w; - /* marker for vcl_deliver to reset Age: */ - set beresp.http.magicmarker = "1"; - } - - set beresp.grace = 1w; - - return (deliver); -} -# -# sub vcl_deliver { -# return (deliver); -# } -sub vcl_deliver { - if (resp.http.magicmarker) { - /* Remove the magic marker */ - unset resp.http.magicmarker; - /* By definition we have a fresh object */ - set resp.http.age = "0"; - } - if (obj.hits > 0) { - set resp.http.X-Cache = obj.hits; - } else { - set resp.http.X-Cache = "MISS"; - } - return (deliver); -} - -# -# sub vcl_error { -# set obj.http.Content-Type = "text/html; charset=utf-8"; -# synthetic {" -# <?xml version="1.0" encoding="utf-8"?> -# <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" -# "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> -# <html> -# <head> -# <title>"} obj.status " " obj.response {"</title> -# </head> -# <body> -# <h1>Error "} obj.status " " obj.response {"</h1> -# <p>"} obj.response {"</p> -# <h3>Guru Meditation:</h3> -# <p>XID: "} req.xid {"</p> -# <hr> -# <p>Varnish cache server</p> -# </body> -# </html> -# "}; -# return (deliver); -# } diff --git a/slapos/recipe/apache_zope_backend/__init__.py b/slapos/recipe/apache_zope_backend/__init__.py deleted file mode 100644 index e4b23482e..000000000 --- a/slapos/recipe/apache_zope_backend/__init__.py +++ /dev/null @@ -1,67 +0,0 @@ -############################################################################## -# -# Copyright (c) 2011 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 pkg_resources - -class Recipe(GenericBaseRecipe): - def install(self): - path_list = [] - ip = self.options['ip'] - port = self.options['port'] - backend = self.options['backend'] - key = self.options['key-file'] - certificate = self.options['cert-file'] - access_control_string = self.options['access-control-string'] - apache_conf = dict() - apache_conf['pid_file'] = self.options['pid-file'] - apache_conf['lock_file'] = self.options['lock-file'] - apache_conf['ip'] = ip - apache_conf['port'] = port - apache_conf['server_admin'] = 'admin@' - apache_conf['error_log'] = self.options['error-log'] - apache_conf['access_log'] = self.options['access-log'] - apache_conf['server_name'] = '%s' % apache_conf['ip'] - apache_conf['certificate'] = certificate - apache_conf['key'] = key - apache_conf['path'] = '/' - apache_conf['access_control_string'] = access_control_string - apache_conf['rewrite_rule'] = "RewriteRule (.*) %s$1 [L,P]" % backend - apache_conf_string = pkg_resources.resource_string(__name__, - 'template/apache.zope.conf.in') % apache_conf - apache_config_file = self.createFile(self.options['configuration-file'], - apache_conf_string) - path_list.append(apache_config_file) - wrapper = self.createPythonScript(self.options['wrapper'], __name__ + - '.apache.runApache', [ - dict( - required_path_list=[key, certificate], - binary=self.options['apache-binary'], - config=apache_config_file - ) - ]) - path_list.append(wrapper) - return path_list diff --git a/slapos/recipe/apache_zope_backend/template/apache.zope.conf.in b/slapos/recipe/apache_zope_backend/template/apache.zope.conf.in deleted file mode 100644 index ac689e15f..000000000 --- a/slapos/recipe/apache_zope_backend/template/apache.zope.conf.in +++ /dev/null @@ -1,63 +0,0 @@ -# Apache configuration file for Zope -# Automatically generated - -# List of modules -LoadModule authz_host_module modules/mod_authz_host.so -LoadModule log_config_module modules/mod_log_config.so -LoadModule setenvif_module modules/mod_setenvif.so -LoadModule version_module modules/mod_version.so -LoadModule proxy_module modules/mod_proxy.so -LoadModule proxy_http_module modules/mod_proxy_http.so -LoadModule ssl_module modules/mod_ssl.so -LoadModule mime_module modules/mod_mime.so -LoadModule dav_module modules/mod_dav.so -LoadModule dav_fs_module modules/mod_dav_fs.so -LoadModule negotiation_module modules/mod_negotiation.so -LoadModule rewrite_module modules/mod_rewrite.so -LoadModule headers_module modules/mod_headers.so - -# Basic server configuration -PidFile "%(pid_file)s" -LockFile "%(lock_file)s" -Listen %(ip)s:%(port)s -ServerAdmin %(server_admin)s -TypesConfig conf/mime.types -AddType application/x-compress .Z -AddType application/x-gzip .gz .tgz - -# As backend is trusting REMOTE_USER header unset it always -RequestHeader unset REMOTE_USER - -# SSL Configuration -SSLEngine on -SSLCertificateFile %(certificate)s -SSLCertificateKeyFile %(key)s -SSLRandomSeed startup builtin -SSLRandomSeed connect builtin - -SSLProxyEngine On - -# Log configuration -ErrorLog "%(error_log)s" -# Default apache log format with request time in microsecond at the end -LogFormat "%%h %%l %%u %%t \"%%r\" %%>s %%b \"%%{Referer}i\" \"%%{User-Agent}i\" %%D" combined -CustomLog "%(access_log)s" combined - -# Directory protection -<Directory /> - Options FollowSymLinks - AllowOverride None - Order deny,allow - Deny from all -</Directory> - -# Path protected -<Location %(path)s> - Order Deny,Allow - Deny from all - Allow from %(access_control_string)s -</Location> - -# Magic of Zope related rewrite -RewriteEngine On -%(rewrite_rule)s diff --git a/slapos/recipe/apachephp/__init__.py b/slapos/recipe/apachephp/__init__.py deleted file mode 100644 index 927749ad9..000000000 --- a/slapos/recipe/apachephp/__init__.py +++ /dev/null @@ -1,117 +0,0 @@ -############################################################################## -# -# 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 shutil -import os -import signal -from binascii import b2a_uu as uuencode - -from slapos.recipe.librecipe import GenericBaseRecipe - -class Recipe(GenericBaseRecipe): - - def install(self): - path_list = [] - - # Copy application - shutil.rmtree(self.options['htdocs']) - shutil.copytree(self.options['source'], - self.options['htdocs']) - - # Install php.ini - php_ini = self.createFile(os.path.join(self.options['php-ini-dir'], - 'php.ini'), - self.substituteTemplate(self.getTemplateFilename('php.ini.in'), - dict(tmp_directory=self.options['tmp-dir'])) - ) - path_list.append(php_ini) - - # Install apache - apache_config = dict( - pid_file=self.options['pid-file'], - lock_file=self.options['lock-file'], - ip=self.options['ip'], - port=self.options['port'], - error_log=self.options['error-log'], - access_log=self.options['access-log'], - document_root=self.options['htdocs'], - php_ini_dir=self.options['php-ini-dir'], - ) - httpd_conf = self.createFile(self.options['httpd-conf'], - self.substituteTemplate(self.getTemplateFilename('apache.in'), - apache_config) - ) - path_list.append(httpd_conf) - - wrapper = self.createPythonScript(self.options['wrapper'], - 'slapos.recipe.librecipe.execute.execute', - [self.options['httpd-binary'], '-f', self.options['httpd-conf'], - '-DFOREGROUND'] - ) - path_list.append(wrapper) - - secret_key_filename = os.path.join(self.buildout['buildout']['directory'], - '.php_secret_key') - if not os.path.exists(secret_key_filename): - secret_key = uuencode(os.urandom(45)).strip() - # Remove unsafe characters - secret_key = secret_key.translate(None, '"\'') - with open(secret_key_filename, 'w') as secret_key_file: - secret_key_file.write(secret_key) - else: - with open(secret_key_filename, 'r') as secret_key_file: - secret_key = secret_key_file.read() - - application_conf = dict(mysql_database=self.options['mysql-database'], - mysql_user=self.options['mysql-username'], - mysql_password=self.options['mysql-password'], - mysql_host='%s:%s' % (self.options['mysql-host'], - self.options['mysql-port']), - secret_key=secret_key, - ) - - directory, file_ = os.path.split(self.options['configuration']) - - path = self.options['htdocs'] - if directory: - path = os.path.join(path, directory) - if not os.path.exists(path): - os.makedirs(path) - if not os.path.isdir(path): - raise OSError("Cannot create %r." % path) - - destination = os.path.join(path, file_) - config = self.createFile(destination, - self.substituteTemplate(self.options['template'], application_conf)) - path_list.append(config) - - if os.path.exists(self.options['pid-file']): - # Reload apache configuration - with open(self.options['pid-file']) as pid_file: - pid = int(pid_file.read().strip(), 10) - os.kill(pid, signal.SIGUSR1) # Graceful restart - - return path_list diff --git a/slapos/recipe/apachephp/template/php.ini.in b/slapos/recipe/apachephp/template/php.ini.in deleted file mode 100644 index ce041b0d9..000000000 --- a/slapos/recipe/apachephp/template/php.ini.in +++ /dev/null @@ -1,18 +0,0 @@ -[PHP] -engine = On -safe_mode = Off -expose_php = Off -error_reporting = E_ALL & ~(E_DEPRECATED|E_NOTICE|E_WARNING) -display_errors = On -display_startup_errors = Off -log_errors = On -log_errors_max_len = 1024 -ignore_repeated_errors = Off -ignore_repeated_source = Off -session.save_path = "%(tmp_directory)s" -session.auto_start = 0 -date.timezone = Europe/Paris -file_uploads = On -upload_max_filesize = 8M -post_max_size = 8M -magic_quotes_gpc=0ff diff --git a/slapos/recipe/apacheproxy/__init__.py b/slapos/recipe/apacheproxy/__init__.py deleted file mode 100644 index e494cfd6a..000000000 --- a/slapos/recipe/apacheproxy/__init__.py +++ /dev/null @@ -1,66 +0,0 @@ -############################################################################## -# -# 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 signal - -from slapos.recipe.librecipe import GenericBaseRecipe - -class Recipe(GenericBaseRecipe): - - def install(self): - path_list = [] - - # Install apache - apache_config = dict( - pid_file=self.options['pid-file'], - lock_file=self.options['lock-file'], - ip=self.options['ip'], - port=self.options['port'], - error_log=self.options['error-log'], - access_log=self.options['access-log'], - backend_url=self.options['url'], - ) - httpd_conf = self.createFile(self.options['httpd-conf'], - self.substituteTemplate(self.getTemplateFilename('apache.in'), - apache_config) - ) - path_list.append(httpd_conf) - - wrapper = self.createPythonScript(self.options['wrapper'], - 'slapos.recipe.librecipe.execute.execute', - [self.options['httpd-binary'], '-f', self.options['httpd-conf'], - '-DFOREGROUND'] - ) - path_list.append(wrapper) - - if os.path.exists(self.options['pid-file']): - # Reload apache configuration - with open(self.options['pid-file']) as pid_file: - pid = int(pid_file.read().strip(), 10) - os.kill(pid, signal.SIGUSR1) # Graceful restart - - return path_list diff --git a/slapos/recipe/apacheproxy/template/apache.in b/slapos/recipe/apacheproxy/template/apache.in deleted file mode 100644 index b857dd2eb..000000000 --- a/slapos/recipe/apacheproxy/template/apache.in +++ /dev/null @@ -1,43 +0,0 @@ -# Apache static configuration -# Automatically generated - -# Basic server configuration -PidFile "%(pid_file)s" -LockFile "%(lock_file)s" -Listen %(ip)s:%(port)s -ServerAdmin someone@email -DefaultType text/plain -TypesConfig conf/mime.types -AddType application/x-compress .Z -AddType application/x-gzip .gz .tgz - -# Log configuration -ErrorLog "%(error_log)s" -LogLevel warn -LogFormat "%%h %%{REMOTE_USER}i %%l %%u %%t \"%%r\" %%>s %%b \"%%{Referer}i\" \"%%{User-Agent}i\"" combined -LogFormat "%%h %%{REMOTE_USER}i %%l %%u %%t \"%%r\" %%>s %%b" common -CustomLog "%(access_log)s" common - -# Directory protection -<Directory /> - Options FollowSymLinks - AllowOverride None - Order deny,allow - Deny from all -</Directory> - -ProxyPass / %(backend_url)s - -# List of modules -LoadModule authz_host_module modules/mod_authz_host.so -LoadModule log_config_module modules/mod_log_config.so -LoadModule setenvif_module modules/mod_setenvif.so -LoadModule version_module modules/mod_version.so -LoadModule proxy_module modules/mod_proxy.so -LoadModule proxy_http_module modules/mod_proxy_http.so -LoadModule mime_module modules/mod_mime.so -LoadModule negotiation_module modules/mod_negotiation.so -LoadModule rewrite_module modules/mod_rewrite.so -LoadModule headers_module modules/mod_headers.so -LoadModule dir_module modules/mod_dir.so -LoadModule alias_module modules/mod_alias.so diff --git a/slapos/recipe/certificate_authority/__init__.py b/slapos/recipe/certificate_authority/__init__.py index 8cbbd7d08..2bf43ed72 100644 --- a/slapos/recipe/certificate_authority/__init__.py +++ b/slapos/recipe/certificate_authority/__init__.py @@ -117,7 +117,7 @@ class Request(Recipe): if os.path.islink(link): os.unlink(link) elif os.path.exists(link): - raise OSError("%r file should be a symbolic link." % link) + raise OSError("%r file should be a symbolic link.") os.symlink(key, key_file) os.symlink(certificate, cert_file) diff --git a/slapos/recipe/certificate_authority/certificate_authority.py b/slapos/recipe/certificate_authority/certificate_authority.py index d6e629f76..a4af4ab76 100644 --- a/slapos/recipe/certificate_authority/certificate_authority.py +++ b/slapos/recipe/certificate_authority/certificate_authority.py @@ -2,7 +2,6 @@ import os import subprocess import time import ConfigParser -import uuid def popenCommunicate(command_list, input=None): @@ -45,7 +44,7 @@ class CertificateAuthority: popenCommunicate([self.openssl_binary, 'req', '-nodes', '-config', self.openssl_configuration, '-new', '-x509', '-extensions', 'v3_ca', '-keyout', self.key, '-out', self.certificate, - '-days', '10950'], 'Certificate Authority %s\n' % uuid.uuid1()) + '-days', '10950'], 'Automatic Certificate Authority\n') except: try: for f in file_list: diff --git a/slapos/recipe/davstorage/__init__.py b/slapos/recipe/davstorage/__init__.py index fd150f087..ae79dd33f 100644 --- a/slapos/recipe/davstorage/__init__.py +++ b/slapos/recipe/davstorage/__init__.py @@ -24,88 +24,102 @@ # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. # ############################################################################## +from slapos.recipe.librecipe import BaseSlapRecipe +import os import subprocess -import httplib -import base64 - -from slapos.recipe.librecipe import GenericBaseRecipe - -class Recipe(GenericBaseRecipe): - - def _options(self, options): - options['password'] = self.generatePassword() - - def install(self): - path_list = [] - - htpasswd_file = self.options['htpasswd-file'] - # Create or empty the file - open(htpasswd_file, 'w').close() - path_list.append(htpasswd_file) - - user = self.options['user'] - password = self.options['password'] - subprocess.check_call([self.options['apache-htpasswd'], - '-bc', htpasswd_file, - user, password - ]) - +import pkg_resources +import zc.buildout +import zc.recipe.egg +import sys + +class Recipe(BaseSlapRecipe): + def getTemplateFilename(self, template_name): + return pkg_resources.resource_filename(__name__, + 'template/%s' % template_name) + + def _install(self): + self.path_list = [] + self.requirements, self.ws = self.egg.working_set() + document_root = self.createDataDirectory('www') + apache_config = self.installApache(document_root) + self.setConnectionUrl(scheme='webdavs', + host=apache_config['ip'], + port=apache_config['port'], + auth=(apache_config['user'], + apache_config['password'])) + return self.path_list + + def installApache(self, document_root, ip=None, port=None): + if ip is None: + ip=self.getGlobalIPv6Address() + if port is None: + port = '9080' + + htpasswd_config = self.createHtpasswd() + ssl_config = self.createCertificate(size=2048) apache_config = dict( - pid_file=self.options['pid-file'], - lock_file=self.options['lock-file'], - davlock_db=self.options['davdb-lock'], - ip=self.options['ip'], - port=self.options['port'], - error_log=self.options['error-log'], - access_log=self.options['access-log'], - document_root=self.options['htdocs'], - modules_dir=self.options['apache-modules-dir'], - mime_types=self.options['apache-mime-file'], - server_root=self.options['root'], - email_address=self.options['email-address'], - htpasswd_file=htpasswd_file, - ssl_certificate=self.options['cert-file'], - ssl_key=self.options['key-file'], + pid_file=os.path.join(self.run_directory, 'httpd.pid'), + lock_file=os.path.join(self.run_directory, 'httpd.lock'), + davlock_db=os.path.join(self.run_directory, 'davdb.lock'), + ip=ip, + port=port, + error_log=os.path.join(self.log_directory, 'httpd-error.log'), + access_log=os.path.join(self.log_directory, 'httpd-access.log'), + document_root=document_root, + modules_dir=self.options['apache_modules_dir'], + mime_types=self.options['apache_mime_file'], + server_root=self.work_directory, + email_address='admin@vifib.net', + htpasswd_file=htpasswd_config['htpasswd_file'], + ssl_certificate=ssl_config['certificate'], + ssl_key=ssl_config['key'], ) - - # Create logfiles - for log in [self.options['error-log'], self.options['access-log']]: - open(log, 'a').close() - - config_file = self.createFile(self.options['conf-file'], - self.substituteTemplate(self.getTemplateFilename('httpd.conf.in'), - apache_config) - ) - path_list.append(config_file) - - wrapper = self.createPythonScript(self.options['wrapper'], - 'slapos.recipe.librecipe.execute.execute', - [self.options['apache-binary'], '-f', config_file, '-DFOREGROUND']) - path_list.append(wrapper) - - promise = self.createPythonScript(self.options['promise'], - __name__ + '.promise', - dict(host=self.options['ip'], port=int(self.options['port']), - user=self.options['user'], password=self.options['password']) - ) - path_list.append(promise) - - return path_list - -def promise(args): - host = args['host'] - port = args['port'] - user = args['user'] - password = args['password'] - - connection = httplib.HTTPSConnection(host, port) - auth = base64.b64encode('%s:%s' % (user, password)) - connection.request('OPTIONS', '/', - headers=dict( - Authorization='Basic %s' % auth, - ) - ) - connection.getresponse() - - return 0 + httpd_config_file = self.createConfigurationFile('httpd.conf', + self.substituteTemplate(self.getTemplateFilename('httpd.conf.in'), + apache_config)) + self.path_list.append(httpd_config_file) + apache_runner = zc.buildout.easy_install.scripts( + [('httpd', 'slapos.recipe.librecipe.execute', 'execute')], + self.ws, sys.executable, self.wrapper_directory, + arguments=[self.options['apache_binary'], + '-f', httpd_config_file, + '-DFOREGROUND', + ] + )[0] + self.path_list.append(apache_runner) + return dict(ip=apache_config['ip'], + port=apache_config['port'], + user=htpasswd_config['user'], + password=htpasswd_config['password'] + ) + + def createHtpasswd(self): + htpasswd = self.createConfigurationFile('htpasswd', '') + self.path_list.append(htpasswd) + password = self.generatePassword() + user = 'user' + subprocess.check_call([self.options['apache_htpasswd'], + '-bc', htpasswd, + user, password + ]) + return dict(htpasswd_file=htpasswd, + user=user, + password=password) + + def createCertificate(self, size=1024, subject='/C=FR/L=Marcq-en-Baroeul/O=Nexedi'): + key_file = os.path.join(self.etc_directory, 'httpd.key') + self.path_list.append(key_file) + + certificate_file = os.path.join(self.etc_directory, 'httpd.crt') + self.path_list.append(certificate_file) + + subprocess.check_call([self.options['openssl_binary'], + 'req', '-x509', '-nodes', + '-newkey', 'rsa:%s' % size, + '-subj', str(subject), + '-out', certificate_file, + '-keyout', key_file + ]) + return dict(key=key_file, + certificate=certificate_file) diff --git a/slapos/recipe/dcron.py b/slapos/recipe/dcron.py index 7de2668f6..3bb1336c5 100644 --- a/slapos/recipe/dcron.py +++ b/slapos/recipe/dcron.py @@ -58,10 +58,13 @@ class Recipe(GenericBaseRecipe): class Part(GenericBaseRecipe): + def _options(self, options): + if 'name' not in options: + options['name'] = self.name + def install(self): cron_d = self.options['cron-entries'] - name = self.options['name'] - filename = os.path.join(cron_d, name) + filename = os.path.join(cron_d, 'name') with open(filename, 'w') as part: part.write('%(frequency)s %(command)s\n' % { diff --git a/slapos/recipe/symbolic_link.py b/slapos/recipe/download.py similarity index 50% rename from slapos/recipe/symbolic_link.py rename to slapos/recipe/download.py index 2bcc01d6f..e5a602a77 100644 --- a/slapos/recipe/symbolic_link.py +++ b/slapos/recipe/download.py @@ -1,6 +1,6 @@ ############################################################################## # -# Copyright (c) 2011 Vifib SARL and Contributors. All Rights Reserved. +# 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 @@ -26,31 +26,47 @@ ############################################################################## import os import logging - +import shutil +import zc.buildout class Recipe: def __init__(self, buildout, name, options): self.buildout = buildout self.name = name self.options = options self.logger = logging.getLogger(self.name) + if 'filename' in self.options and 'destination' in self.options: + raise zc.buildout.UserError('Parameters filename and destination are ' + 'exclusive.') + self.parts = None + self.destination = self.options.get('destination', None) + if self.destination is None: + self.parts = os.path.join(self.buildout['buildout']['parts-directory'], + self.name) + self.destination = os.path.join(self.parts, self.options.get('filename', + self.name)) + options['target'] = self.destination def install(self): - """ - Links binaries to instance's bin directory for easier exposal - """ - path_list = [] - target_directory = self.options['target-directory'] - for linkline in self.options['link-binary'].split(): - path, linkname = os.path.split(linkline) - - link = os.path.join(target_directory, linkname) - if os.path.lexists(link): - if not os.path.islink(link): - raise zc.buildout.UserError( - 'Target link already %r exists but it is not link' % link) - os.unlink(link) - os.symlink(linkline, link) - self.logger.debug('Created link %r -> %r' % (link, linkline)) - path_list.append(link) + if self.parts is not None: + if not os.path.isdir(self.parts): + os.mkdir(self.parts) + download = zc.buildout.download.Download(self.buildout['buildout'], + hash_name=True) + path, is_temp = download(self.options['url'], + md5sum=self.options.get('md5sum')) + if os.path.exists(self.destination): + os.unlink(self.destination) + shutil.copy(path, self.destination) + mode = self.options.get('mode') + if mode is not None: + mode = int(mode, 8) + os.chmod(self.destination, mode) + self.logger.debug('Mode of %r set to 0%o.' % (self.destination, mode)) + self.logger.debug('Downloaded %r and saved to %r.' % (self.options['url'], + self.destination)) + if self.parts is not None: + return [self.parts] + else: + return [] - return path_list + update = install diff --git a/slapos/recipe/dropbear.py b/slapos/recipe/dropbear.py deleted file mode 100644 index 6d630b47d..000000000 --- a/slapos/recipe/dropbear.py +++ /dev/null @@ -1,172 +0,0 @@ -############################################################################## -# -# 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 itertools -from slapos.recipe.librecipe import GenericBaseRecipe - -class KnownHostsFile(dict): - - def __init__(self, filename): - self._filename = filename - - def _load(self): - if os.path.exists(self._filename): - with open(self._filename, 'r') as keyfile: - for line in keyfile: - host, key = [column.strip() for column in line.split(' ', 1)] - self[host] = key - - def _dump(self): - with open(self._filename, 'w') as keyfile: - for key, value in self.items(): - if key is not None and value is not None: - keyfile.write('%(host)s %(key)s\n' % {'host': key, - 'key': value}) - - def __enter__(self): - self._load() - - def __exit__(self, exc_type, exc_value, traceback): - self._dump() - - - -class AuthorizedKeysFile(object): - - def __init__(self, filename): - self.filename = filename - - def append(self, key): - """Append the key to the file if the key's not in the file - """ - # Create the file it it does not exist - try: - file_ = os.open(self.filename, os.O_CREAT | os.O_EXCL) - os.close(file_) - except: - pass - - with open(self.filename, 'r') as keyfile: - # itertools.imap avoid loading all the authorized_keys file in - # memory which would be counterproductive. - present = (key.strip() in itertools.imap(lambda k: k.strip(), - keyfile)) - try: - keyfile.seek(-1, os.SEEK_END) - ended_by_newline = (keyfile.read() == '\n') - except IOError: - ended_by_newline = True - - if not present: - with open(self.filename, 'a') as keyfile: - if not ended_by_newline: - keyfile.write('\n') - keyfile.write(key.strip()) - -class Recipe(GenericBaseRecipe): - - def install(self): - path_list = [] - - dropbear_cmd = [self.options['dropbear-binary']] - # Don't fork into background - dropbear_cmd.append('-F') - # Log on stderr - dropbear_cmd.append('-E') - # Don't display motd - dropbear_cmd.append('-m') - # Disable password login - dropbear_cmd.extend(['-s', '-g']) - # Disable port forwarding - dropbear_cmd.extend(['-j', '-k']) - - host = self.options['host'] - if ':' in host: - host = '[%s]' % host - port = self.options['port'] - binding_address = '%s:%s' % (host, port) - dropbear_cmd.extend(['-p', binding_address]) - # Single user mode - dropbear_cmd.append('-n') - - if 'dss-keyfile' in self.options: - dropbear_cmd.extend(['-d', self.options['dss-keyfile']]) - else: - dropbear_cmd.extend(['-r', self.options['rsa-keyfile']]) - - env = {} - if 'home' in self.options: - env['DROPBEAR_OVERRIDE_HOME'] = self.options['home'] - - if 'shell' in self.options: - env['DROPBEAR_OVERRIDE_SHELL'] = self.options['shell'] - - wrapper = self.createPythonScript( - self.options['wrapper'], - 'slapos.recipe.librecipe.execute.executee', - (dropbear_cmd, env, ) - ) - path_list.append(wrapper) - - return path_list - -class Client(GenericBaseRecipe): - - def install(self): - env = dict() - - if 'home' in self.options: - env['HOME'] = self.options['home'] - self.createDirectory(self.options['home'], '.ssh') - - dropbear_cmd = [self.options['dbclient-binary'], '-T'] - if self.optionIsTrue('force-host-key', default=False): - dropbear_cmd.extend(['-y']) - - if 'identity-file' in self.options: - dropbear_cmd.extend(['-i', self.options['identity-file']]) - - wrapper = self.createPythonScript( - self.options['wrapper'], - 'slapos.recipe.librecipe.execute.executee', - (dropbear_cmd, env, ) - ) - - return [wrapper] - -class AddAuthorizedKey(GenericBaseRecipe): - - def install(self): - path_list = [] - - ssh = self.createDirectory(self.options['home'], '.ssh') - path_list.append(ssh) - - authorized_keys = AuthorizedKeysFile(os.path.join(ssh, 'authorized_keys')) - authorized_keys.append(self.options['key']) - - return path_list diff --git a/slapos/recipe/duplicity.py b/slapos/recipe/duplicity.py index c44e658f2..2e5d5d568 100644 --- a/slapos/recipe/duplicity.py +++ b/slapos/recipe/duplicity.py @@ -30,23 +30,15 @@ class Recipe(GenericBaseRecipe): def install(self): - remote_url = self.options['remote-backup'] - backup_directory = self.options['local-directory'] + remote_url = self.options['remote_backup'] + backup_directory = self.options['directory'] - cmd = [self.options['duplicity-binary'],] - options = ['--no-encryption', '--archive-dir', self.options['cache']] - - if self.optionIsTrue('recover', False): - options.append('--force') - # duplicity [options] remote backup - cmd.extend(options) - cmd.extend([remote_url, backup_directory]) - else: - # duplicity [options] local remote - cmd.extend(options) - cmd.extend([backup_directory, remote_url]) + wrapper = self.createPythonScript( + self.options['wrapper'], + 'slapos.recipe.librecipe.execute.execute', + [self.options['duplicity_binary'], '--no-encryption', + backup_directory, remote_url] + ) + return [wrapper] - wrapper = self.createPythonScript(self.options['wrapper'], - 'slapos.recipe.librecipe.execute.execute', cmd) - return [wrapper] diff --git a/slapos/recipe/equeue.py b/slapos/recipe/equeue.py deleted file mode 100644 index bc52654fd..000000000 --- a/slapos/recipe/equeue.py +++ /dev/null @@ -1,46 +0,0 @@ -############################################################################## -# -# 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 - -class Recipe(GenericBaseRecipe): - - def install(self): - - commandline = [self.options['equeue-binary']] - commandline.extend(['--database', self.options['database']]) - commandline.extend(['-l', self.options['log']]) - - if 'loglevel' in self.options: - commandline.extend(['--loglevel', self.options['loglevel']]) - - commandline.append(self.options['socket']) - - return [self.createPythonScript( - self.options['wrapper'], - 'slapos.recipe.librecipe.execute.execute', - commandline, - )] diff --git a/slapos/recipe/erp5/__init__.py b/slapos/recipe/erp5/__init__.py index 3d5f97241..03c7fb227 100644 --- a/slapos/recipe/erp5/__init__.py +++ b/slapos/recipe/erp5/__init__.py @@ -25,14 +25,130 @@ # ############################################################################## from slapos.recipe.librecipe import BaseSlapRecipe +import binascii +import os import pkg_resources +import pprint +import hashlib import sys import zc.buildout import zc.recipe.egg +import ConfigParser +import re + +_isurl = re.compile('([a-zA-Z0-9+.-]+)://').match + +# based on Zope2.utilities.mkzopeinstance.write_inituser +def Zope2InitUser(path, username, password): + open(path, 'w').write('') + os.chmod(path, 0600) + open(path, "w").write('%s:{SHA}%s\n' % ( + username,binascii.b2a_base64(hashlib.sha1(password).digest())[:-1])) class Recipe(BaseSlapRecipe): + def getTemplateFilename(self, template_name): + return pkg_resources.resource_filename(__name__, + 'template/%s' % template_name) + + site_id = 'erp5' + def _install(self): - raise NotImplementedError('Outdated.') + self.path_list = [] + self.requirements, self.ws = self.egg.working_set() + # self.cron_d is a directory, where cron jobs can be registered + self.cron_d = self.installCrond() + self.logrotate_d, self.logrotate_backup = self.installLogrotate() + self.killpidfromfile = zc.buildout.easy_install.scripts( + [('killpidfromfile', __name__ + '.killpidfromfile', + 'killpidfromfile')], self.ws, sys.executable, self.bin_directory)[0] + self.path_list.append(self.killpidfromfile) + ca_conf = self.installCertificateAuthority() + + memcached_conf = self.installMemcached(ip=self.getLocalIPv4Address(), + port=11000) + kumo_conf = self.installKumo(self.getLocalIPv4Address()) + conversion_server_conf = self.installConversionServer( + self.getLocalIPv4Address(), 23000, 23060) + mysql_conf = self.installMysqlServer(self.getLocalIPv4Address(), 45678) + user, password = self.installERP5() + + if self.parameter_dict.get("slap_software_type", "").lower() == "cluster": + # Site access is done by HAProxy + zope_access, site_access, key_access = self.installZopeCluster(ca_conf) + else: + zope_access = self.installZopeStandalone() + site_access = zope_access + key_access = None + + key, certificate = self.requestCertificate('Login Based Access') + apache_conf = dict( + apache_login=self.installBackendApache(ip=self.getGlobalIPv6Address(), + port=13000, backend=site_access, key=key, certificate=certificate)) + + connection_dict = dict(site_url=apache_conf['apache_login']) + + if self.parameter_dict.get("domain_name") is not None: + connection_dict["backend_url"] = apache_conf['apache_login'] + connection_dict["domain_ip"] = self.getGlobalIPv6Address() + + # XXX Define a fake domain_name for now. + frontend_name = self.parameter_dict.get("domain_name") + frontend_key, frontend_certificate = \ + self.requestCertificate(frontend_name) + + connection_dict["site_url"] = self.installFrontendZopeApache( + ip=self.getGlobalIPv6Address(), port=4443, name=frontend_name, + frontend_path='/', backend_path='', + backend_url=apache_conf['apache_login'], key=frontend_key, + certificate=frontend_certificate) + + default_bt5_list = [] + if self.parameter_dict.get("flavour", "default") == 'configurator': + default_bt5_list = self.options.get("configurator_bt5_list", '').split() + + self.installERP5Site(user, password, zope_access, mysql_conf, + conversion_server_conf, memcached_conf, kumo_conf, + self.site_id, default_bt5_list, ca_conf) + + self.installTestRunner(ca_conf, mysql_conf, conversion_server_conf, + memcached_conf, kumo_conf) + self.installTestSuiteRunner(ca_conf, mysql_conf, conversion_server_conf, + memcached_conf, kumo_conf) + self.linkBinary() + connection_dict.update(**dict( + site_user=user, + site_password=password, + memcached_url=memcached_conf['memcached_url'], + kumo_url=kumo_conf['kumo_address'] + )) + if key_access is not None: + connection_dict['key_access'] = key_access + if self.options.get('fulltext_search', None) == 'sphinx': + sphinx_searchd = self.installSphinxSearchd(ip=self.getLocalIPv4Address()) + connection_dict.update(**sphinx_searchd) + self.setConnectionDict(connection_dict) + return self.path_list + + def installZopeStandalone(self): + """ Install a single Zope instance without ZEO Server. + """ + zodb_dir = os.path.join(self.data_root_directory, 'zodb') + self._createDirectory(zodb_dir) + zodb_root_path = os.path.join(zodb_dir, 'main.fs') + + thread_amount_per_zope = int(self.options.get( + 'single_zope_thread_amount', 4)) + + zodb_cache_size = int(self.options.get('zodb_cache_size', 5000)) + + return self.installZope(ip=self.getLocalIPv4Address(), + port=12000 + 1, name='zope_%s' % 1, + zodb_configuration_string=self.substituteTemplate( + self.getTemplateFilename('zope-zodb-snippet.conf.in'), + dict(zodb_root_path=zodb_root_path, + zodb_cache_size=zodb_cache_size)), + with_timerservice=True, + thread_amount=thread_amount_per_zope) def installKeyAuthorisationApache(self, ipv6, port, backend, key, certificate, ca_conf, key_auth_path='/'): @@ -93,6 +209,807 @@ SSLCARevocationPath %(ca_crl)s""" else: return 'https://%(ip)s:%(port)s' % apache_conf + def installZopeCluster(self, ca_conf=None): + """ Install ERP5 using ZEO Cluster + """ + site_check_path = '/%s/getId' % self.site_id + thread_amount_per_zope = int(self.options.get( + 'cluster_zope_thread_amount', 1)) + + activity_node_amount = int(self.options.get( + "cluster_activity_node_amount", 2)) + + user_node_amount = int(self.options.get( + "cluster_user_node_amount", 2)) + + key_auth_node_amount = int(self.options.get( + "key_auth_node_amount", 0)) + + ip = self.getLocalIPv4Address() + storage_dict = self._requestZeoFileStorage('Zeo Server 1', 'main') + + zeo_conf = self.installZeo(ip) + tidstorage_config = dict(host=ip, port='6001') + + # XXX How to define good values for this? + mount_point = '/' + zodb_cache_size = 5000 + zeo_client_cache_size = '20MB' + check_path = '/erp5/account_module' + + known_tid_storage_identifier_dict = {} + known_tid_storage_identifier_dict[ + (((storage_dict['ip'],storage_dict['port']),), storage_dict['storage_name']) + ] = (zeo_conf[storage_dict['storage_name']]['path'], check_path or mount_point) + + zodb_configuration_string = self.substituteTemplate( + self.getTemplateFilename('zope-zeo-snippet.conf.in'), dict( + storage_name=storage_dict['storage_name'], + address='%s:%s' % (storage_dict['ip'], storage_dict['port']), + mount_point=mount_point, zodb_cache_size=zodb_cache_size, + zeo_client_cache_size=zeo_client_cache_size + )) + + zope_port = 12000 + # One Distribution Node (Single Thread Always) + zope_port += 1 + self.installZope(ip, zope_port, 'zope_distribution', with_timerservice=True, + zodb_configuration_string=zodb_configuration_string, + tidstorage_config=tidstorage_config) + + # Activity Nodes (Single Thread Always) + for i in range(activity_node_amount): + zope_port += 1 + self.installZope(ip, zope_port, 'zope_activity_%s' % i, + with_timerservice=True, + zodb_configuration_string=zodb_configuration_string, + tidstorage_config=tidstorage_config) + + # Four Web Page Nodes (Human access) + login_url_list = [] + for i in range(user_node_amount): + zope_port += 1 + login_url_list.append(self.installZope(ip, zope_port, + 'zope_login_%s' % i, with_timerservice=False, + zodb_configuration_string=zodb_configuration_string, + tidstorage_config=tidstorage_config, + thread_amount=thread_amount_per_zope)) + + login_haproxy = self.installHaproxy(ip, 15001, 'login', + site_check_path, login_url_list) + + key_access = None + if key_auth_node_amount > 0: + service_url_list = [] + for i in range(key_auth_node_amount): + zope_port += 1 + service_url_list.append(self.installZope(ip, zope_port, + 'zope_service_%s' % i, with_timerservice=False, + zodb_configuration_string=zodb_configuration_string, + tidstorage_config=tidstorage_config)) + service_haproxy = self.installHaproxy(ip, 15000, 'service', + site_check_path, service_url_list) + + key_auth_key, key_auth_certificate = self.requestCertificate( + 'Key Based Access') + key_access = self.installKeyAuthorisationApache(True, 15500, + service_haproxy, key_auth_key, key_auth_certificate, ca_conf) + + self.installTidStorage(tidstorage_config['host'], + tidstorage_config['port'], + known_tid_storage_identifier_dict, 'http://' + login_haproxy) + + return login_url_list[-1], login_haproxy, key_access + + def _requestZeoFileStorage(self, server_name, storage_name): + """Local, slap.request compatible, call to ask for filestorage on Zeo + + filter_kw can be used to select specific Zeo server + + Someday in future it will be possible to invoke: + + self.request( + software_release=self.computer_partition.getSoftwareRelease().getURI(), + software_type='Zeo Server', + partition_reference=storage_name, + filter_kw={'server_name': server_name}, + shared=True + ) + + Thanks to this it will be possible to select precisely on which server + which storage will be placed. + """ + base_port = 35001 + if getattr(self, '_zeo_storage_dict', None) is None: + self._zeo_storage_dict = {} + if getattr(self, '_zeo_storage_port_dict', None) is None: + self._zeo_storage_port_dict = {} + self._zeo_storage_port_dict.setdefault(server_name, + base_port+len(self._zeo_storage_port_dict)) + self._zeo_storage_dict[server_name] = self._zeo_storage_dict.get( + server_name, []) + [storage_name] + return dict( + ip=self.getLocalIPv4Address(), + port=self._zeo_storage_port_dict[server_name], + storage_name=storage_name + ) + + def installLogrotate(self): + """Installs logortate main configuration file and registers its to cron""" + logrotate_d = os.path.abspath(os.path.join(self.etc_directory, + 'logrotate.d')) + self._createDirectory(logrotate_d) + logrotate_backup = self.createBackupDirectory('logrotate') + logrotate_conf = self.createConfigurationFile("logrotate.conf", + "include %s" % logrotate_d) + logrotate_cron = os.path.join(self.cron_d, 'logrotate') + state_file = os.path.join(self.data_root_directory, 'logrotate.status') + open(logrotate_cron, 'w').write('0 0 * * * %s -s %s %s' % + (self.options['logrotate_binary'], state_file, logrotate_conf)) + self.path_list.extend([logrotate_d, logrotate_conf, logrotate_cron]) + return logrotate_d, logrotate_backup + + def registerLogRotation(self, name, log_file_list, postrotate_script): + """Register new log rotation requirement""" + open(os.path.join(self.logrotate_d, name), 'w').write( + self.substituteTemplate(self.getTemplateFilename( + 'logrotate_entry.in'), + dict(file_list=' '.join(['"'+q+'"' for q in log_file_list]), + postrotate=postrotate_script, olddir=self.logrotate_backup))) + + def linkBinary(self): + """Links binaries to instance's bin directory for easier exposal""" + for linkline in self.options.get('link_binary_list', '').splitlines(): + if not linkline: + continue + target = linkline.split() + if len(target) == 1: + target = target[0] + path, linkname = os.path.split(target) + else: + linkname = target[1] + target = target[0] + link = os.path.join(self.bin_directory, linkname) + if os.path.lexists(link): + if not os.path.islink(link): + raise zc.buildout.UserError( + 'Target link already %r exists but it is not link' % link) + os.unlink(link) + os.symlink(target, link) + self.logger.debug('Created link %r -> %r' % (link, target)) + self.path_list.append(link) + + def installKumo(self, ip, kumo_manager_port=13101, kumo_server_port=13201, + kumo_server_listen_port=13202, kumo_gateway_port=13301): + # XXX: kumo is not storing pid in file, unless it is not running as daemon + # but running daemons is incompatible with SlapOS, so there is currently + # no way to have Kumo's pid files to rotate logs and send signals to them + config = dict( + kumo_gateway_binary=self.options['kumo_gateway_binary'], + kumo_gateway_ip=ip, + kumo_gateway_log=os.path.join(self.log_directory, "kumo-gateway.log"), + kumo_manager_binary=self.options['kumo_manager_binary'], + kumo_manager_ip=ip, + kumo_manager_log=os.path.join(self.log_directory, "kumo-manager.log"), + kumo_server_binary=self.options['kumo_server_binary'], + kumo_server_ip=ip, + kumo_server_log=os.path.join(self.log_directory, "kumo-server.log"), + kumo_server_storage=os.path.join(self.data_root_directory, "kumodb.tch"), + kumo_manager_port=kumo_manager_port, + kumo_server_port=kumo_server_port, + kumo_server_listen_port=kumo_server_listen_port, + kumo_gateway_port=kumo_gateway_port + ) + + self.path_list.append(self.createRunningWrapper('kumo_gateway', + self.substituteTemplate(self.getTemplateFilename('kumo_gateway.in'), + config))) + + self.path_list.append(self.createRunningWrapper('kumo_manager', + self.substituteTemplate(self.getTemplateFilename('kumo_manager.in'), + config))) + + self.path_list.append(self.createRunningWrapper('kumo_server', + self.substituteTemplate(self.getTemplateFilename('kumo_server.in'), + config))) + + return dict( + kumo_address = '%s:%s' % (config['kumo_gateway_ip'], + config['kumo_gateway_port']), + kumo_gateway_ip=config['kumo_gateway_ip'], + kumo_gateway_port=config['kumo_gateway_port'], + ) + + def installMemcached(self, ip, port): + config = dict( + memcached_binary=self.options['memcached_binary'], + memcached_ip=ip, + memcached_port=port, + ) + self.path_list.append(self.createRunningWrapper('memcached', + self.substituteTemplate(self.getTemplateFilename('memcached.in'), + config))) + return dict(memcached_url='%s:%s' % + (config['memcached_ip'], config['memcached_port']), + memcached_ip=config['memcached_ip'], + memcached_port=config['memcached_port']) + + def installSphinxSearchd(self, ip, port=9312, sql_port=9306): + data_directory = self.createDataDirectory('sphinx') + sphinx_conf_path = self.createConfigurationFile('sphinx.conf', + self.substituteTemplate(self.getTemplateFilename('sphinx.conf.in'), dict( + ip_address=ip, + port=port, + sql_port=sql_port, + data_directory=data_directory, + log_directory=self.log_directory, + ))) + self.path_list.append(sphinx_conf_path) + wrapper = zc.buildout.easy_install.scripts([('sphinx_searchd', + 'slapos.recipe.librecipe.execute', 'execute')], self.ws, sys.executable, + self.wrapper_directory, arguments=[ + self.options['sphinx_searchd_binary'].strip(), '-c', sphinx_conf_path, '--nodetach'] + )[0] + self.path_list.append(wrapper) + return dict(sphinx_searchd_ip=ip, + sphinx_searchd_port=port, + sphinx_searchd_sql_port=sql_port) + + def installTestRunner(self, ca_conf, mysql_conf, conversion_server_conf, + memcached_conf, kumo_conf): + """Installs bin/runUnitTest executable to run all tests using + bin/runUnitTest""" + testinstance = self.createDataDirectory('testinstance') + # workaround wrong assumptions of ERP5Type.tests.runUnitTest about + # directory existence + unit_test = os.path.join(testinstance, 'unit_test') + connection_string_list = [] + for test_database, test_user, test_password in \ + mysql_conf['mysql_parallel_test_dict'][-4:]: + connection_string_list.append( + '%s@%s:%s %s %s' % (test_database, mysql_conf['ip'], + mysql_conf['tcp_port'], test_user, test_password)) + if not os.path.isdir(unit_test): + os.mkdir(unit_test) + runUnitTest = zc.buildout.easy_install.scripts([ + ('runUnitTest', __name__ + '.testrunner', 'runUnitTest')], + self.ws, sys.executable, self.bin_directory, arguments=[dict( + instance_home=testinstance, + prepend_path=self.bin_directory, + openssl_binary=self.options['openssl_binary'], + test_ca_path=ca_conf['certificate_authority_path'], + call_list=[self.options['runUnitTest_binary'], + '--erp5_sql_connection_string', '%(mysql_test_database)s@%' + '(ip)s:%(tcp_port)s %(mysql_test_user)s ' + '%(mysql_test_password)s' % mysql_conf, + '--extra_sql_connection_string_list',','.join(connection_string_list), + '--conversion_server_hostname=%(conversion_server_ip)s' % \ + conversion_server_conf, + '--conversion_server_port=%(conversion_server_port)s' % \ + conversion_server_conf, + '--volatile_memcached_server_hostname=%(memcached_ip)s' % memcached_conf, + '--volatile_memcached_server_port=%(memcached_port)s' % memcached_conf, + '--persistent_memcached_server_hostname=%(kumo_gateway_ip)s' % kumo_conf, + '--persistent_memcached_server_port=%(kumo_gateway_port)s' % kumo_conf, + ] + )])[0] + self.path_list.append(runUnitTest) + + def installTestSuiteRunner(self, ca_conf, mysql_conf, conversion_server_conf, + memcached_conf, kumo_conf): + """Installs bin/runTestSuite executable to run all tests using + bin/runUnitTest""" + testinstance = self.createDataDirectory('test_suite_instance') + # workaround wrong assumptions of ERP5Type.tests.runUnitTest about + # directory existence + unit_test = os.path.join(testinstance, 'unit_test') + if not os.path.isdir(unit_test): + os.mkdir(unit_test) + connection_string_list = [] + for test_database, test_user, test_password in \ + mysql_conf['mysql_parallel_test_dict']: + connection_string_list.append( + '%s@%s:%s %s %s' % (test_database, mysql_conf['ip'], + mysql_conf['tcp_port'], test_user, test_password)) + command = zc.buildout.easy_install.scripts([ + ('runTestSuite', __name__ + '.test_suite_runner', 'runTestSuite')], + self.ws, sys.executable, self.bin_directory, arguments=[dict( + instance_home=testinstance, + prepend_path=self.bin_directory, + openssl_binary=self.options['openssl_binary'], + test_ca_path=ca_conf['certificate_authority_path'], + call_list=[self.options['runTestSuite_binary'], + '--db_list', ','.join(connection_string_list), + '--conversion_server_hostname=%(conversion_server_ip)s' % \ + conversion_server_conf, + '--conversion_server_port=%(conversion_server_port)s' % \ + conversion_server_conf, + '--volatile_memcached_server_hostname=%(memcached_ip)s' % memcached_conf, + '--volatile_memcached_server_port=%(memcached_port)s' % memcached_conf, + '--persistent_memcached_server_hostname=%(kumo_gateway_ip)s' % kumo_conf, + '--persistent_memcached_server_port=%(kumo_gateway_port)s' % kumo_conf, + ] + )])[0] + self.path_list.append(command) + + def installCrond(self): + timestamps = self.createDataDirectory('cronstamps') + cron_output = os.path.join(self.log_directory, 'cron-output') + self._createDirectory(cron_output) + catcher = zc.buildout.easy_install.scripts([('catchcron', + __name__ + '.catdatefile', 'catdatefile')], self.ws, sys.executable, + self.bin_directory, arguments=[cron_output])[0] + self.path_list.append(catcher) + cron_d = os.path.join(self.etc_directory, 'cron.d') + crontabs = os.path.join(self.etc_directory, 'crontabs') + self._createDirectory(cron_d) + self._createDirectory(crontabs) + wrapper = zc.buildout.easy_install.scripts([('crond', + 'slapos.recipe.librecipe.execute', 'execute')], self.ws, sys.executable, + self.wrapper_directory, arguments=[ + self.options['dcrond_binary'].strip(), '-s', cron_d, '-c', crontabs, + '-t', timestamps, '-f', '-l', '5', '-M', catcher] + )[0] + self.path_list.append(wrapper) + return cron_d + + def requestCertificate(self, name): + hash = hashlib.sha512(name).hexdigest() + key = os.path.join(self.ca_private, hash + self.ca_key_ext) + certificate = os.path.join(self.ca_certs, hash + self.ca_crt_ext) + parser = ConfigParser.RawConfigParser() + parser.add_section('certificate') + parser.set('certificate', 'name', name) + parser.set('certificate', 'key_file', key) + parser.set('certificate', 'certificate_file', certificate) + parser.write(open(os.path.join(self.ca_request_dir, hash), 'w')) + return key, certificate + + def installCertificateAuthority(self, ca_country_code='XX', + ca_email='xx@example.com', ca_state='State', ca_city='City', + ca_company='Company'): + backup_path = self.createBackupDirectory('ca') + self.ca_dir = os.path.join(self.data_root_directory, 'ca') + self._createDirectory(self.ca_dir) + self.ca_request_dir = os.path.join(self.ca_dir, 'requests') + self._createDirectory(self.ca_request_dir) + config = dict(ca_dir=self.ca_dir, request_dir=self.ca_request_dir) + self.ca_private = os.path.join(self.ca_dir, 'private') + self.ca_certs = os.path.join(self.ca_dir, 'certs') + self.ca_crl = os.path.join(self.ca_dir, 'crl') + self.ca_newcerts = os.path.join(self.ca_dir, 'newcerts') + self.ca_key_ext = '.key' + self.ca_crt_ext = '.crt' + for d in [self.ca_private, self.ca_crl, self.ca_newcerts, self.ca_certs]: + self._createDirectory(d) + for f in ['crlnumber', 'serial']: + if not os.path.exists(os.path.join(self.ca_dir, f)): + open(os.path.join(self.ca_dir, f), 'w').write('01') + if not os.path.exists(os.path.join(self.ca_dir, 'index.txt')): + open(os.path.join(self.ca_dir, 'index.txt'), 'w').write('') + openssl_configuration = os.path.join(self.ca_dir, 'openssl.cnf') + config.update( + working_directory=self.ca_dir, + country_code=ca_country_code, + state=ca_state, + city=ca_city, + company=ca_company, + email_address=ca_email, + ) + self._writeFile(openssl_configuration, pkg_resources.resource_string( + __name__, 'template/openssl.cnf.ca.in') % config) + self.path_list.extend(zc.buildout.easy_install.scripts([ + ('certificate_authority', + __name__ + '.certificate_authority', 'runCertificateAuthority')], + self.ws, sys.executable, self.wrapper_directory, arguments=[dict( + openssl_configuration=openssl_configuration, + openssl_binary=self.options['openssl_binary'], + certificate=os.path.join(self.ca_dir, 'cacert.pem'), + key=os.path.join(self.ca_private, 'cakey.pem'), + crl=os.path.join(self.ca_crl), + request_dir=self.ca_request_dir + )])) + # configure backup + backup_cron = os.path.join(self.cron_d, 'ca_rdiff_backup') + open(backup_cron, 'w').write( + '''0 0 * * * %(rdiff_backup)s %(source)s %(destination)s'''%dict( + rdiff_backup=self.options['rdiff_backup_binary'], + source=self.ca_dir, + destination=backup_path)) + self.path_list.append(backup_cron) + + return dict( + ca_certificate=os.path.join(config['ca_dir'], 'cacert.pem'), + ca_crl=os.path.join(config['ca_dir'], 'crl'), + certificate_authority_path=config['ca_dir'] + ) + + def installConversionServer(self, ip, port, openoffice_port): + name = 'conversion_server' + working_directory = self.createDataDirectory(name) + conversion_server_dict = dict( + working_path=working_directory, + uno_path=self.options['ooo_uno_path'], + office_binary_path=self.options['ooo_binary_path'], + ip=ip, + port=port, + openoffice_port=openoffice_port, + ) + for env_line in self.options['environment'].splitlines(): + env_line = env_line.strip() + if not env_line: + continue + if '=' in env_line: + env_key, env_value = env_line.split('=') + conversion_server_dict[env_key.strip()] = env_value.strip() + else: + raise zc.buildout.UserError('Line %r in environment parameter is ' + 'incorrect' % env_line) + config_file = self.createConfigurationFile(name + '.cfg', + self.substituteTemplate(self.getTemplateFilename('cloudooo.cfg.in'), + conversion_server_dict)) + self.path_list.append(config_file) + self.path_list.extend(zc.buildout.easy_install.scripts([(name, + 'slapos.recipe.librecipe.execute', 'execute_with_signal_translation')], self.ws, + sys.executable, self.wrapper_directory, + arguments=[self.options['ooo_paster'].strip(), 'serve', config_file])) + return { + name + '_port': conversion_server_dict['port'], + name + '_ip': conversion_server_dict['ip'] + } + + def installHaproxy(self, ip, port, name, server_check_path, url_list): + # inter must be quite short in order to detect quickly an unresponsive node + # and to detect quickly a node which is back + # rise must be minimal possible : 1, indeed, a node which is back don't need + # to sleep more time and we can give him work immediately + # fall should be quite sort. with inter at 3, and fall at 2, a node will be + # considered as dead after 6 seconds. + # maxconn should be set as the maximum thread we have per zope, like this + # haproxy will manage the queue of request with the possibility to + # move a request to another node if the initially selected one is dead + server_template = """ server %(name)s %(address)s cookie %(name)s check inter 3s rise 1 fall 2 maxconn %(cluster_zope_thread_amount)s""" + config = dict(name=name, ip=ip, port=port, + server_check_path=server_check_path,) + i = 1 + server_list = [] + cluster_zope_thread_amount = self.options.get('cluster_zope_thread_amount', 1) + for url in url_list: + server_list.append(server_template % dict(name='%s_%s' % (name, i), + address=url, cluster_zope_thread_amount=cluster_zope_thread_amount)) + i += 1 + config['server_text'] = '\n'.join(server_list) + haproxy_conf_path = self.createConfigurationFile('haproxy_%s.cfg' % name, + self.substituteTemplate(self.getTemplateFilename('haproxy.cfg.in'), + config)) + self.path_list.append(haproxy_conf_path) + wrapper = zc.buildout.easy_install.scripts([('haproxy_%s' % name, + 'slapos.recipe.librecipe.execute', 'execute')], self.ws, sys.executable, + self.wrapper_directory, arguments=[ + self.options['haproxy_binary'].strip(), '-f', haproxy_conf_path] + )[0] + self.path_list.append(wrapper) + return '%s:%s' % (ip, port) + + def installERP5(self): + """ + All zope have to share file created by portal_classes + (until everything is integrated into the ZODB). + So, do not request zope instance and create multiple in the same partition. + """ + # Create instance directories + self.erp5_directory = self.createDataDirectory('erp5shared') + # Create init user + password = self.generatePassword() + # XXX Unhardcoded me please + user = 'zope' + Zope2InitUser( + os.path.join(self.erp5_directory, "inituser"), user, password) + + self._createDirectory(self.erp5_directory) + for directory in ( + 'Constraint', + 'Document', + 'Extensions', + 'PropertySheet', + 'import', + 'lib', + 'tests', + 'Products', + 'etc', + ): + self._createDirectory(os.path.join(self.erp5_directory, directory)) + self._createDirectory(os.path.join(self.erp5_directory, 'etc', + 'package-includes')) + + # Symlink to BT5 repositories defined in instance config. + # Those paths will eventually end up in the ZODB, and having symlinks + # inside the XXX makes it possible to reuse such ZODB with another software + # release[ version]. + # Note: this path cannot be used for development, it's really just a + # read-only repository. + repository_path = os.path.join(self.var_directory, "bt5_repository") + if not os.path.isdir(repository_path): + os.mkdir(repository_path) + self.path_list.append(repository_path) + self.bt5_repository_list = [] + append = self.bt5_repository_list.append + for repository in self.options.get('bt5_repository_list', '').split(): + repository = repository.strip() + if not repository: + continue + + if _isurl(repository) and not repository.startswith("file://"): + # XXX: assume it's a valid URL + append(repository) + continue + + if repository.startswith('file://'): + repository = repository.replace('file://', '', '') + + if os.path.isabs(repository): + repo_id = hashlib.sha1(repository).hexdigest() + link = os.path.join(repository_path, repo_id) + if os.path.lexists(link): + if not os.path.islink(link): + raise zc.buildout.UserError( + 'Target link already %r exists but it is not link' % link) + os.unlink(link) + os.symlink(repository, link) + self.logger.debug('Created link %r -> %r' % (link, repository_path)) + # Always provide a URL-Type + append("file://" + link) + + return user, password + + def installERP5Site(self, user, password, zope_access, mysql_conf, + conversion_server_conf=None, memcached_conf=None, + kumo_conf=None, + erp5_site_id='erp5', default_bt5_list=[], ca_conf={}, + supervisor_controlled=True): + """ + Create a script to automatically set up an erp5 site (controlled by + supervisor by default) on available zope and mysql environments. + """ + conversion_server = None + if conversion_server_conf is not None: + conversion_server = "%s:%s" % (conversion_server_conf['conversion_server_ip'], + conversion_server_conf['conversion_server_port']) + if memcached_conf is None: + memcached_conf = {} + if kumo_conf is None: + kumo_conf = {} + # XXX Conversion server and memcache server coordinates are not relevant + # for pure site creation. + mysql_connection_string = "%(mysql_database)s@%(ip)s:%(tcp_port)s %(mysql_user)s %(mysql_password)s" % mysql_conf + + bt5_list = self.parameter_dict.get("bt5_list", "").split() or default_bt5_list + bt5_repository_list = self.parameter_dict.get("bt5_repository_list", "").split() \ + or getattr(self, 'bt5_repository_list', []) + + erp5_update_directory = supervisor_controlled and self.wrapper_directory or \ + self.bin_directory + + script = zc.buildout.easy_install.scripts([('erp5_update', + __name__ + '.erp5', 'updateERP5')], self.ws, + sys.executable, erp5_update_directory, + arguments=[erp5_site_id, + mysql_connection_string, + [user, password, zope_access], + memcached_conf.get('memcached_url'), + conversion_server, + kumo_conf.get("kumo_address"), + bt5_list, + bt5_repository_list, + ca_conf.get('certificate_authority_path'), + self.options.get('openssl_binary')]) + + self.path_list.extend(script) + + return [] + + def installZeo(self, ip): + zodb_dir = os.path.join(self.data_root_directory, 'zodb') + self._createDirectory(zodb_dir) + zeo_configuration_dict = {} + zeo_number = 0 + for zeo_server in sorted(self._zeo_storage_dict.iterkeys()): + zeo_number += 1 + zeo_event_log = os.path.join(self.log_directory, 'zeo-%s.log'% zeo_number) + zeo_pid = os.path.join(self.run_directory, 'zeo-%s.pid'% zeo_number) + self.registerLogRotation('zeo-%s' % zeo_number, [zeo_event_log], + self.killpidfromfile + ' ' + zeo_pid + ' SIGUSR2') + config = dict( + zeo_ip=ip, + zeo_port=self._zeo_storage_port_dict[zeo_server], + zeo_event_log=zeo_event_log, + zeo_pid=zeo_pid, + ) + storage_definition_list = [] + for storage_name in sorted(self._zeo_storage_dict[zeo_server]): + path = os.path.join(zodb_dir, '%s.fs' % storage_name) + storage_definition_list.append("""<filestorage %(storage_name)s> + path %(path)s +</filestorage>"""% dict(storage_name=storage_name, path=path)) + zeo_configuration_dict[storage_name] = dict( + ip=ip, + port=config['zeo_port'], + path=path + ) + config['zeo_filestorage_snippet'] = '\n'.join(storage_definition_list) + zeo_conf_path = self.createConfigurationFile('zeo-%s.conf' % zeo_number, + self.substituteTemplate(self.getTemplateFilename('zeo.conf.in'), config)) + self.path_list.append(zeo_conf_path) + wrapper = zc.buildout.easy_install.scripts([('zeo_%s' % zeo_number, + 'slapos.recipe.librecipe.execute', 'execute')], self.ws, sys.executable, + self.wrapper_directory, arguments=[ + self.options['runzeo_binary'].strip(), '-C', zeo_conf_path] + )[0] + self.path_list.append(wrapper) + return zeo_configuration_dict + + def installRepozo(self, zodb_root_path): + """ + Add only repozo to cron (e.g. without tidstorage) allowing full + and incremental backups. + """ + backup_path = self.createBackupDirectory('zodb') + repozo_cron_path = os.path.join(self.cron_d, 'repozo') + repozo_cron_file = open(repozo_cron_path, 'w') + try: + repozo_cron_file.write(''' +0 0 * * 0 %(repozo_binary)s --backup --full --file="%(zodb_root_path)s" --repository="%(backup_path)s" +0 * * * * %(repozo_binary)s --backup --file="%(zodb_root_path)s" --repository="%(backup_path)s" +''' % dict(repozo_binary=self.options['repozo_binary'], + zodb_root_path=zodb_root_path, + backup_path=backup_path)) + finally: + repozo_cron_file.close() + + self.path_list.append(repozo_cron_path) + + def installTidStorage(self, ip, port, known_tid_storage_identifier_dict, + access_url): + """Install TidStorage with all required backup tools + + known_tid_storage_identifier_dict is a dictionary of: + (((ip, port),), storagename): (filestorage path, url for serialize) + url for serialize will be merged with access_url by internal tidstorage + + """ + backup_base_path = self.createBackupDirectory('zodb') + # it is time to fill known_tid_storage_identifier_dict with backup + # destination + formatted_storage_dict = dict() + for key, v in known_tid_storage_identifier_dict.copy().iteritems(): + # generate unique name for each backup + storage_name = key[1] + destination = os.path.join(backup_base_path, storage_name) + self._createDirectory(destination) + formatted_storage_dict[str(key)] = (v[0], destination, v[1]) + logfile = os.path.join(self.log_directory, 'tidstorage.log') + pidfile = os.path.join(self.run_directory, 'tidstorage.pid') + statusfile = os.path.join(self.log_directory, 'tidstorage.tid') + timestamp_file_path = os.path.join(self.log_directory, + 'repozo_tidstorage_timestamp.log') + # shared configuration file + tidstorage_config = self.createConfigurationFile('tidstorage.py', + self.substituteTemplate(self.getTemplateFilename('tidstorage.py.in'), + dict( + known_tid_storage_identifier_dict=pprint.pformat(formatted_storage_dict), + base_url='%s/%%s/serialize' % access_url, + host=ip, + port=port, + timestamp_file_path=timestamp_file_path, + logfile=logfile, + pidfile=pidfile, + statusfile=statusfile + ))) + # TID server + tidstorage_server = zc.buildout.easy_install.scripts([('tidstoraged', + 'slapos.recipe.librecipe.execute', 'execute')], self.ws, sys.executable, + self.wrapper_directory, arguments=[ + self.options['tidstoraged_binary'], '--nofork', '--config', + tidstorage_config])[0] + self.registerLogRotation('tidsorage', [logfile, timestamp_file_path], + self.killpidfromfile + ' ' + pidfile + ' SIGHUP') + self.path_list.append(tidstorage_config) + self.path_list.append(tidstorage_server) + + # repozo wrapper + tidstorage_repozo = zc.buildout.easy_install.scripts([('tidstorage_repozo', + 'slapos.recipe.librecipe.execute', 'execute')], self.ws, sys.executable, + self.bin_directory, arguments=[ + self.options['tidstorage_repozo_binary'], '--config', tidstorage_config, + '--repozo', self.options['repozo_binary'], '-z'])[0] + self.path_list.append(tidstorage_repozo) + + # and backup configuration + tidstorage_repozo_cron = os.path.join(self.cron_d, 'tidstorage_repozo') + open(tidstorage_repozo_cron, 'w').write('''0 0 * * * %(tidstorage_repozo)s +0 0 * * * cp -f %(tidstorage_tid)s %(tidstorage_tid_backup)s'''%dict( + tidstorage_repozo=tidstorage_repozo, + tidstorage_tid=statusfile, + tidstorage_tid_backup=os.path.join(backup_base_path, 'tidstorage.tid'))) + self.path_list.append(tidstorage_repozo_cron) + return dict(host=ip, port=port) + + def installZope(self, ip, port, name, zodb_configuration_string, + with_timerservice=False, tidstorage_config=None, thread_amount=1, + with_deadlockdebugger=True, zope_environment=None): + default_zope_environment = dict( + TMP=self.tmp_directory, + TMPDIR=self.tmp_directory, + HOME=self.tmp_directory, + PATH=self.bin_directory + ) + if zope_environment is None: + zope_environment = default_zope_environment.copy() + else: + for envk, envv in default_zope_environment.iteritems(): + if envk not in zope_environment: + zope_environment[envk] = envv + # Create zope configuration file + zope_config = dict( + products=self.options['products'], + thread_amount=thread_amount + ) + # configure default Zope2 zcml + open(os.path.join(self.erp5_directory, 'etc', 'site.zcml'), 'w').write( + pkg_resources.resource_string(__name__, 'template/site.zcml')) + zope_config['zodb_configuration_string'] = zodb_configuration_string + zope_config['instance'] = self.erp5_directory + zope_config['event_log'] = os.path.join(self.log_directory, + '%s-event.log' % name) + zope_config['z2_log'] = os.path.join(self.log_directory, + '%s-Z2.log' % name) + zope_config['pid-filename'] = os.path.join(self.run_directory, + '%s.pid' % name) + zope_config['lock-filename'] = os.path.join(self.run_directory, + '%s.lock' % name) + self.registerLogRotation(name, [zope_config['event_log'], + zope_config['z2_log']], self.killpidfromfile + ' ' + + zope_config['pid-filename'] + ' SIGUSR2') + + prefixed_products = [] + for product in reversed(zope_config['products'].split()): + product = product.strip() + if product: + prefixed_products.append('products %s' % product) + prefixed_products.insert(0, 'products %s' % os.path.join( + self.erp5_directory, 'Products')) + zope_config['products'] = '\n'.join(prefixed_products) + zope_config['address'] = '%s:%s' % (ip, port) + + zope_wrapper_template_location = self.getTemplateFilename('zope.conf.in') + zope_conf_content = self.substituteTemplate( + zope_wrapper_template_location, zope_config) + if with_timerservice: + zope_conf_content += self.substituteTemplate( + self.getTemplateFilename('zope.conf.timerservice.in'), zope_config) + if tidstorage_config is not None: + zope_conf_content += self.substituteTemplate( + self.getTemplateFilename('zope-tidstorage-snippet.conf.in'), + tidstorage_config) + if with_deadlockdebugger: + zope_conf_content += self.substituteTemplate( + self.getTemplateFilename('zope-deadlockdebugger-snippet.conf.in'), + dict(dump_url='/manage_debug_threads', + secret=self.generatePassword())) + + zope_conf_path = self.createConfigurationFile("%s.conf" % name, + zope_conf_content) + self.path_list.append(zope_conf_path) + # Create init script + wrapper = zc.buildout.easy_install.scripts([(name, + 'slapos.recipe.librecipe.execute', 'executee')], self.ws, sys.executable, + self.wrapper_directory, arguments=[ + [self.options['runzope_binary'].strip(), '-C', zope_conf_path], + zope_environment + ])[0] + self.path_list.append(wrapper) + return zope_config['address'] + def _getApacheConfigurationDict(self, prefix, ip, port): apache_conf = dict() apache_conf['pid_file'] = os.path.join(self.run_directory, @@ -201,3 +1118,183 @@ SSLCARevocationPath %(ca_crl)s""" ])) # Note: IPv6 is assumed always return 'https://%(server_name)s:%(port)s%(frontend_path)s' % (apache_conf) + + def installBackendApache(self, ip, port, backend, key, certificate, + suffix='', access_control_string=None): + apache_conf = self._getApacheConfigurationDict('backend_apache'+suffix, ip, + port) + apache_conf['server_name'] = '%s' % apache_conf['ip'] + apache_conf['ssl_snippet'] = pkg_resources.resource_string(__name__, + 'template/apache.ssl-snippet.conf.in') % dict( + login_certificate=certificate, login_key=key) + apache_config_file = self._writeApacheConfiguration('backend_apache'+suffix, + apache_conf, backend, access_control_string) + self.path_list.append(apache_config_file) + self.path_list.extend(zc.buildout.easy_install.scripts([( + 'backend_apache'+suffix, + __name__ + '.apache', 'runApache')], self.ws, + sys.executable, self.wrapper_directory, arguments=[ + dict( + required_path_list=[key, certificate], + binary=self.options['httpd_binary'], + config=apache_config_file + ) + ])) + # Note: IPv6 is assumed always + return 'https://[%(ip)s]:%(port)s' % apache_conf + + def installMysqlServer(self, ip, port, database='erp5', user='user', + test_database='test_erp5', test_user='test_user', template_filename=None, + parallel_test_database_amount=100, mysql_conf=None, with_backup=True, + with_percona_toolkit=True): + if mysql_conf is None: + mysql_conf = {} + backup_directory = self.createBackupDirectory('mysql') + if template_filename is None: + template_filename = self.getTemplateFilename('my.cnf.in') + error_log = os.path.join(self.log_directory, 'mysqld.log') + slow_query_log = os.path.join(self.log_directory, 'mysql-slow.log') + mysql_conf.update( + ip=ip, + data_directory=os.path.join(self.data_root_directory, + 'mysql'), + tcp_port=port, + pid_file=os.path.join(self.run_directory, 'mysqld.pid'), + socket=os.path.join(self.run_directory, 'mysqld.sock'), + error_log=error_log, + slow_query_log=slow_query_log, + mysql_database=database, + mysql_user=user, + mysql_password=self.generatePassword(), + mysql_test_password=self.generatePassword(), + mysql_test_database=test_database, + mysql_test_user=test_user, + mysql_parallel_test_dict=[ + ('test_%i' % x,)*2 + (self.generatePassword(),) \ + for x in xrange(0,parallel_test_database_amount)], + ) + self.registerLogRotation('mysql', [error_log, slow_query_log], + '%(mysql_binary)s --no-defaults -B --user=root ' + '--socket=%(mysql_socket)s -e "FLUSH LOGS"' % dict( + mysql_binary=self.options['mysql_binary'], + mysql_socket=mysql_conf['socket'])) + self._createDirectory(mysql_conf['data_directory']) + + mysql_conf_path = self.createConfigurationFile("my.cnf", + self.substituteTemplate(template_filename, + mysql_conf)) + + mysql_script_list = [] + for x_database, x_user, x_password in \ + [(mysql_conf['mysql_database'], + mysql_conf['mysql_user'], + mysql_conf['mysql_password']), + (mysql_conf['mysql_test_database'], + mysql_conf['mysql_test_user'], + mysql_conf['mysql_test_password']), + ] + mysql_conf['mysql_parallel_test_dict']: + mysql_script_list.append(pkg_resources.resource_string(__name__, + 'template/initmysql.sql.in') % { + 'mysql_database': x_database, + 'mysql_user': x_user, + 'mysql_password': x_password}) + mysql_script_list.append('EXIT') + mysql_script = '\n'.join(mysql_script_list) + self.path_list.extend(zc.buildout.easy_install.scripts([('mysql_update', + __name__ + '.mysql', 'updateMysql')], self.ws, + sys.executable, self.wrapper_directory, arguments=[dict( + mysql_script=mysql_script, + mysql_binary=self.options['mysql_binary'].strip(), + mysql_upgrade_binary=self.options['mysql_upgrade_binary'].strip(), + socket=mysql_conf['socket'], + )])) + self.path_list.extend(zc.buildout.easy_install.scripts([('mysqld', + __name__ + '.mysql', 'runMysql')], self.ws, + sys.executable, self.wrapper_directory, arguments=[dict( + mysql_install_binary=self.options['mysql_install_binary'].strip(), + mysqld_binary=self.options['mysqld_binary'].strip(), + data_directory=mysql_conf['data_directory'].strip(), + mysql_binary=self.options['mysql_binary'].strip(), + socket=mysql_conf['socket'].strip(), + configuration_file=mysql_conf_path, + )])) + self.path_list.extend([mysql_conf_path]) + + if with_backup: + # backup configuration + backup_directory = self.createBackupDirectory('mysql') + full_backup = os.path.join(backup_directory, 'full') + incremental_backup = os.path.join(backup_directory, 'incremental') + self._createDirectory(full_backup) + self._createDirectory(incremental_backup) + innobackupex_argument_list = [self.options['perl_binary'], + self.options['innobackupex_binary'], + '--defaults-file=%s' % mysql_conf_path, + '--socket=%s' %mysql_conf['socket'].strip(), '--user=root', + '--ibbackup=%s'% self.options['xtrabackup_binary']] + environment = dict(PATH='%s' % self.bin_directory) + innobackupex_incremental = zc.buildout.easy_install.scripts([( + 'innobackupex_incremental','slapos.recipe.librecipe.execute', 'executee')], + self.ws, sys.executable, self.bin_directory, arguments=[ + innobackupex_argument_list + ['--incremental'], + environment])[0] + self.path_list.append(innobackupex_incremental) + innobackupex_full = zc.buildout.easy_install.scripts([('innobackupex_full', + 'slapos.recipe.librecipe.execute', 'executee')], self.ws, + sys.executable, self.bin_directory, arguments=[ + innobackupex_argument_list, + environment])[0] + self.path_list.append(innobackupex_full) + backup_controller = zc.buildout.easy_install.scripts([ + ('innobackupex_controller', __name__ + '.innobackupex', 'controller')], + self.ws, sys.executable, self.bin_directory, + arguments=[innobackupex_incremental, innobackupex_full, full_backup, + incremental_backup])[0] + self.path_list.append(backup_controller) + mysql_backup_cron = os.path.join(self.cron_d, 'mysql_backup') + open(mysql_backup_cron, 'w').write('0 0 * * * ' + backup_controller) + self.path_list.append(mysql_backup_cron) + + if with_percona_toolkit: + # maatkit installation + for pt_script_name in ( + 'pt-archiver', + 'pt-config-diff', + 'pt-deadlock-logger', + 'pt-duplicate-key-checker', + 'pt-fifo-split', + 'pt-find', + 'pt-fk-error-logger', + 'pt-heartbeat', + 'pt-index-usage', + 'pt-kill', + 'pt-log-player', + 'pt-online-schema-change', + 'pt-query-advisor', + 'pt-query-digest', + 'pt-show-grants', + 'pt-slave-delay', + 'pt-slave-find', + 'pt-slave-restart', + 'pt-table-checksum', + 'pt-table-sync', + 'pt-tcp-model', + 'pt-trend', + 'pt-upgrade', + 'pt-variable-advisor', + 'pt-visual-explain', + ): + pt_argument_list = [self.options['perl_binary'], + self.options['%s_binary' % pt_script_name], + '--defaults-file=%s' % mysql_conf_path, + '--socket=%s' %mysql_conf['socket'].strip(), '--user=root', + ] + environment = dict(PATH='%s' % self.bin_directory) + pt_exe = zc.buildout.easy_install.scripts([( + pt_script_name,'slapos.recipe.librecipe.execute', 'executee')], + self.ws, sys.executable, self.bin_directory, arguments=[ + pt_argument_list, environment])[0] + self.path_list.append(pt_exe) + + # The return could be more explicit database, user ... + return mysql_conf diff --git a/slapos/recipe/erp5/catdatefile.py b/slapos/recipe/erp5/catdatefile.py new file mode 100644 index 000000000..d3de298b2 --- /dev/null +++ b/slapos/recipe/erp5/catdatefile.py @@ -0,0 +1,14 @@ +import os +import sys +import time +def catdatefile(args): + directory = args[0] + try: + suffix = args[1] + except IndexError: + suffix = '.log' + f = open(os.path.join(directory, + time.strftime('%Y-%m-%d.%H:%M.%s') + suffix), 'aw') + for line in sys.stdin.read(): + f.write(line) + f.close() diff --git a/slapos/recipe/pulse2/certificate_authority.py b/slapos/recipe/erp5/certificate_authority.py similarity index 100% rename from slapos/recipe/pulse2/certificate_authority.py rename to slapos/recipe/erp5/certificate_authority.py diff --git a/slapos/recipe/erp5_update/erp5.py b/slapos/recipe/erp5/erp5.py similarity index 96% rename from slapos/recipe/erp5_update/erp5.py rename to slapos/recipe/erp5/erp5.py index 80e942191..c5cadbade 100644 --- a/slapos/recipe/erp5_update/erp5.py +++ b/slapos/recipe/erp5/erp5.py @@ -251,6 +251,16 @@ class ERP5Updater(object): return True return False + def isCertificateAuthorityConfigured(self): + """ Check if certificate Authority is configured correctly. """ + external_connection_dict = self.system_signature_dict[ + 'external_connection_dict'] + if self.certificate_authority_path == external_connection_dict.get( + 'portal_certificate_authority/certificate_authority_path') and \ + self.openssl_binary == external_connection_dict.get( + 'portal_certificate_authority/openssl_binary'): + return True + return False def isCertificateAuthorityConfigured(self): """ Check if certificate Authority is configured correctly. """ external_connection_dict = self.system_signature_dict[ @@ -293,7 +303,6 @@ class ERP5Updater(object): def updateERP5Site(self): if not self.isERP5Present(): - self.log('INFO', 'No site present, adding new with id %r' % self.site_id) self.POST('/manage_addProduct/ERP5/manage_addERP5Site', { "id": self.site_id, "erp5_catalog_storage": self.erp5_catalog_storage, @@ -321,7 +330,6 @@ class ERP5Updater(object): def run(self): """ Keep running until kill""" while 1: - self.log('INFO', 'Sleeping for %s' % self.short_sleeping_time) time.sleep(self.short_sleeping_time) if not self.updateERP5Site(): self.loadSystemSignatureDict() diff --git a/slapos/recipe/generic_mysql/innobackupex.py b/slapos/recipe/erp5/innobackupex.py similarity index 100% rename from slapos/recipe/generic_mysql/innobackupex.py rename to slapos/recipe/erp5/innobackupex.py diff --git a/slapos/recipe/erp5/killpidfromfile.py b/slapos/recipe/erp5/killpidfromfile.py new file mode 100644 index 000000000..8082ea1b7 --- /dev/null +++ b/slapos/recipe/erp5/killpidfromfile.py @@ -0,0 +1,12 @@ +import sys +import os +import signal +def killpidfromfile(): + file = sys.argv[1] + sig = getattr(signal, sys.argv[2], None) + if sig is None: + raise ValueError('Unknwon signal name %s' % sys.argv[2]) + if os.path.exists(file): + pid = int(open(file).read()) + print 'Killing pid %s with signal %s' % (pid, sys.argv[2]) + os.kill(pid, sig) diff --git a/slapos/recipe/generic_mysql/mysql.py b/slapos/recipe/erp5/mysql.py similarity index 100% rename from slapos/recipe/generic_mysql/mysql.py rename to slapos/recipe/erp5/mysql.py diff --git a/slapos/recipe/erp5/template/apache.ssl-snippet.conf.in b/slapos/recipe/erp5/template/apache.ssl-snippet.conf.in index 8da5b7b19..f85a164cb 100644 --- a/slapos/recipe/erp5/template/apache.ssl-snippet.conf.in +++ b/slapos/recipe/erp5/template/apache.ssl-snippet.conf.in @@ -3,7 +3,5 @@ SSLCertificateFile %(login_certificate)s SSLCertificateKeyFile %(login_key)s SSLRandomSeed startup builtin SSLRandomSeed connect builtin -SSLProtocol -ALL +SSLv3 +TLSv1 -SSLCipherSuite ALL:!aNULL:!ADH:!eNULL:!LOW:!EXP:RC4+RSA:+HIGH:+MEDIUM SSLProxyEngine On diff --git a/slapos/recipe/erp5/template/apache.zope.conf.in b/slapos/recipe/erp5/template/apache.zope.conf.in index a63d29299..f24a5327b 100644 --- a/slapos/recipe/erp5/template/apache.zope.conf.in +++ b/slapos/recipe/erp5/template/apache.zope.conf.in @@ -26,10 +26,6 @@ TypesConfig conf/mime.types AddType application/x-compress .Z AddType application/x-gzip .gz .tgz -ServerTokens Prod -ServerSignature Off -TraceEnable Off - # As backend is trusting REMOTE_USER header unset it always RequestHeader unset REMOTE_USER diff --git a/slapos/recipe/generic_cloudooo/template/cloudooo.cfg.in b/slapos/recipe/erp5/template/cloudooo.cfg.in similarity index 97% rename from slapos/recipe/generic_cloudooo/template/cloudooo.cfg.in rename to slapos/recipe/erp5/template/cloudooo.cfg.in index 156f7e4ae..17ead81aa 100644 --- a/slapos/recipe/generic_cloudooo/template/cloudooo.cfg.in +++ b/slapos/recipe/erp5/template/cloudooo.cfg.in @@ -34,7 +34,6 @@ application_hostname = %(ip)s openoffice_port = %(openoffice_port)s # LD_LIBRARY_PATH passed to OpenOffice env-LD_LIBRARY_PATH = %(LD_LIBRARY_PATH)s -env-FONTCONFIG_FILE = %(FONTCONFIG_FILE)s # # Mimetype Registry diff --git a/slapos/recipe/haproxy/template/haproxy.cfg.in b/slapos/recipe/erp5/template/haproxy.cfg.in similarity index 92% rename from slapos/recipe/haproxy/template/haproxy.cfg.in rename to slapos/recipe/erp5/template/haproxy.cfg.in index a732c3bc8..aa8f8a865 100644 --- a/slapos/recipe/haproxy/template/haproxy.cfg.in +++ b/slapos/recipe/erp5/template/haproxy.cfg.in @@ -22,12 +22,12 @@ defaults timeout connect 5s # As requested in haproxy doc, make this "at least equal to timeout server". timeout client 305s - # Use "option forceclose" to not preserve client & server persistent connections + # Use "option httpclose" to not preserve client & server persistent connections # while handling every incoming request individually, dispatching them one after # another to servers, in HTTP close mode. This is really needed when haproxy # is configured with maxconn to 1, without this options browser are unable # to render a page - option forceclose + option httpclose listen %(name)s %(ip)s:%(port)s cookie SERVERID insert diff --git a/slapos/recipe/generic_mysql/template/initmysql.sql.in b/slapos/recipe/erp5/template/initmysql.sql.in similarity index 100% rename from slapos/recipe/generic_mysql/template/initmysql.sql.in rename to slapos/recipe/erp5/template/initmysql.sql.in diff --git a/slapos/recipe/generic_kumofs/template/kumo_gateway.in b/slapos/recipe/erp5/template/kumo_gateway.in similarity index 100% rename from slapos/recipe/generic_kumofs/template/kumo_gateway.in rename to slapos/recipe/erp5/template/kumo_gateway.in diff --git a/slapos/recipe/generic_kumofs/template/kumo_manager.in b/slapos/recipe/erp5/template/kumo_manager.in similarity index 100% rename from slapos/recipe/generic_kumofs/template/kumo_manager.in rename to slapos/recipe/erp5/template/kumo_manager.in diff --git a/slapos/recipe/generic_kumofs/template/kumo_server.in b/slapos/recipe/erp5/template/kumo_server.in similarity index 100% rename from slapos/recipe/generic_kumofs/template/kumo_server.in rename to slapos/recipe/erp5/template/kumo_server.in diff --git a/slapos/recipe/apache_frontend/template/logrotate_entry.in b/slapos/recipe/erp5/template/logrotate_entry.in similarity index 100% rename from slapos/recipe/apache_frontend/template/logrotate_entry.in rename to slapos/recipe/erp5/template/logrotate_entry.in diff --git a/slapos/recipe/generic_memcached/template/memcached.in b/slapos/recipe/erp5/template/memcached.in similarity index 100% rename from slapos/recipe/generic_memcached/template/memcached.in rename to slapos/recipe/erp5/template/memcached.in diff --git a/slapos/recipe/generic_mysql/template/my.cnf.in b/slapos/recipe/erp5/template/my.cnf.in similarity index 87% rename from slapos/recipe/generic_mysql/template/my.cnf.in rename to slapos/recipe/erp5/template/my.cnf.in index 25d951e86..632d35c99 100644 --- a/slapos/recipe/generic_mysql/template/my.cnf.in +++ b/slapos/recipe/erp5/template/my.cnf.in @@ -15,17 +15,12 @@ socket = %(socket)s datadir = %(data_directory)s pid-file = %(pid_file)s log-error = %(error_log)s -slow_query_log -slow_query_log_file = %(slow_query_log)s +log-slow-file = %(slow_query_log)s long_query_time = 5 max_allowed_packet = 128M query_cache_size = 32M -plugin-load = ha_groonga.so;ha_sphinx.so - -# By default only 100 connections are allowed, when using zeo -# we may have much more connections -# max_connections = 1000 +plugin-load = ha_innodb_plugin.so # The following are important to configure and depend a lot on to the size of # your database and the available resources. diff --git a/slapos/recipe/erp5/template/mysql-init-function.sql.in b/slapos/recipe/erp5/template/mysql-init-function.sql.in deleted file mode 100644 index c4d0cbde4..000000000 --- a/slapos/recipe/erp5/template/mysql-init-function.sql.in +++ /dev/null @@ -1,5 +0,0 @@ -USE mysql; -DROP FUNCTION IF EXISTS last_insert_grn_id; -CREATE FUNCTION last_insert_grn_id RETURNS INTEGER SONAME 'ha_groonga.so'; -DROP FUNCTION IF EXISTS sphinx_snippets; -CREATE FUNCTION sphinx_snippets RETURNS STRING SONAME 'sphinx.so'; diff --git a/slapos/recipe/apache_frontend/template/openssl.cnf.ca.in b/slapos/recipe/erp5/template/openssl.cnf.ca.in similarity index 100% rename from slapos/recipe/apache_frontend/template/openssl.cnf.ca.in rename to slapos/recipe/erp5/template/openssl.cnf.ca.in diff --git a/slapos/recipe/generic_zope/template/site.zcml b/slapos/recipe/erp5/template/site.zcml similarity index 100% rename from slapos/recipe/generic_zope/template/site.zcml rename to slapos/recipe/erp5/template/site.zcml diff --git a/slapos/recipe/erp5/template/tidstorage.py.in b/slapos/recipe/erp5/template/tidstorage.py.in new file mode 100644 index 000000000..88892982e --- /dev/null +++ b/slapos/recipe/erp5/template/tidstorage.py.in @@ -0,0 +1,15 @@ +known_tid_storage_identifier_dict = %(known_tid_storage_identifier_dict)s +base_url = '%(base_url)s' +address = '%(host)s' +port = %(port)s + +#fork = False +#setuid = None +#setgid = None +burst_period = 30 +full_dump_period = 300 + +timestamp_file_path = '%(timestamp_file_path)s' +logfile_name = '%(logfile)s' +pidfile_name = '%(pidfile)s' +status_file = '%(statusfile)s' diff --git a/slapos/recipe/zeo/template/zeo.conf.in b/slapos/recipe/erp5/template/zeo.conf.in similarity index 100% rename from slapos/recipe/zeo/template/zeo.conf.in rename to slapos/recipe/erp5/template/zeo.conf.in diff --git a/slapos/recipe/erp5/template/zope-deadlockdebugger-snippet.conf.in b/slapos/recipe/erp5/template/zope-deadlockdebugger-snippet.conf.in new file mode 100644 index 000000000..22df184d3 --- /dev/null +++ b/slapos/recipe/erp5/template/zope-deadlockdebugger-snippet.conf.in @@ -0,0 +1,7 @@ + +# DeadlockDebugger configuration +<product-config DeadlockDebugger> + dump_url %(dump_url)s + secret %(secret)s +</product-config> + diff --git a/slapos/recipe/erp5/template/zope-tidstorage-snippet.conf.in b/slapos/recipe/erp5/template/zope-tidstorage-snippet.conf.in new file mode 100644 index 000000000..cced8c752 --- /dev/null +++ b/slapos/recipe/erp5/template/zope-tidstorage-snippet.conf.in @@ -0,0 +1,6 @@ + +# TIDStorage connection +<product-config TIDStorage> + backend-ip %(host)s + backend-port %(port)s +</product-config> diff --git a/slapos/recipe/erp5/template/zope-zeo-snippet.conf.in b/slapos/recipe/erp5/template/zope-zeo-snippet.conf.in new file mode 100644 index 000000000..dbd9bcac2 --- /dev/null +++ b/slapos/recipe/erp5/template/zope-zeo-snippet.conf.in @@ -0,0 +1,10 @@ +<zodb_db %(storage_name)s> + cache-size %(zodb_cache_size)d + mount-point %(mount_point)s + <zeoclient> + cache-size %(zeo_client_cache_size)s + server %(address)s + storage %(storage_name)s + name %(storage_name)s + </zeoclient> +</zodb_db> diff --git a/slapos/recipe/erp5/template/zope-zodb-snippet.conf.in b/slapos/recipe/erp5/template/zope-zodb-snippet.conf.in new file mode 100644 index 000000000..4eb6a051b --- /dev/null +++ b/slapos/recipe/erp5/template/zope-zodb-snippet.conf.in @@ -0,0 +1,7 @@ +<zodb_db root> + cache-size %(zodb_cache_size)d + <filestorage> + path %(zodb_root_path)s + </filestorage> + mount-point / +</zodb_db> diff --git a/slapos/recipe/generic_zope_zeo_client/template/zope.conf.in b/slapos/recipe/erp5/template/zope.conf.in similarity index 85% rename from slapos/recipe/generic_zope_zeo_client/template/zope.conf.in rename to slapos/recipe/erp5/template/zope.conf.in index 9f64fff79..e85764013 100644 --- a/slapos/recipe/generic_zope_zeo_client/template/zope.conf.in +++ b/slapos/recipe/erp5/template/zope.conf.in @@ -31,14 +31,12 @@ lock-filename %(lock-filename)s # Logging configuration <eventlog> - level info <logfile> dateformat path %(event_log)s </logfile> </eventlog> <logger access> - level WARN <logfile> dateformat path %(z2_log)s @@ -51,14 +49,7 @@ lock-filename %(lock-filename)s </http-server> # ZODB configuration -%(zodb_configuration)s - +%(zodb_configuration_string)s <zoperunner> program $INSTANCE/bin/runzope </zoperunner> - -# DeadlockDebugger configuration -<product-config DeadlockDebugger> - dump_url %(dump_url)s - secret %(secret)s -</product-config> diff --git a/slapos/recipe/generic_zope_zeo_client/template/zope.conf.timeserver.in b/slapos/recipe/erp5/template/zope.conf.timerservice.in similarity index 100% rename from slapos/recipe/generic_zope_zeo_client/template/zope.conf.timeserver.in rename to slapos/recipe/erp5/template/zope.conf.timerservice.in diff --git a/slapos/recipe/erp5/test_suite_runner.py b/slapos/recipe/erp5/test_suite_runner.py new file mode 100644 index 000000000..f58d6ad47 --- /dev/null +++ b/slapos/recipe/erp5/test_suite_runner.py @@ -0,0 +1,23 @@ +import os +import sys +def runTestSuite(args): + env = os.environ.copy() + d = args[0] + env['OPENSSL_BINARY'] = d['openssl_binary'] + env['TEST_CA_PATH'] = d['test_ca_path'] + env['PATH'] = ':'.join([d['prepend_path']] + os.environ['PATH'].split(':')) + env['INSTANCE_HOME'] = d['instance_home'] + env['REAL_INSTANCE_HOME'] = d['instance_home'] + # 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) diff --git a/slapos/recipe/erp5/testrunner.py b/slapos/recipe/erp5/testrunner.py new file mode 100644 index 000000000..5aa09c11b --- /dev/null +++ b/slapos/recipe/erp5/testrunner.py @@ -0,0 +1,23 @@ +import os +import sys +def runUnitTest(args): + env = os.environ.copy() + d = args[0] + env['OPENSSL_BINARY'] = d['openssl_binary'] + env['TEST_CA_PATH'] = d['test_ca_path'] + env['PATH'] = ':'.join([d['prepend_path']] + os.environ['PATH'].split(':')) + env['INSTANCE_HOME'] = d['instance_home'] + env['REAL_INSTANCE_HOME'] = d['instance_home'] + # 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) diff --git a/slapos/recipe/erp5_test/__init__.py b/slapos/recipe/erp5_test/__init__.py deleted file mode 100644 index 1aeea2c5c..000000000 --- a/slapos/recipe/erp5_test/__init__.py +++ /dev/null @@ -1,74 +0,0 @@ -############################################################################## -# -# 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): - testinstance = self.options['test-instance-path'] - mysql_connection_string_list = [] - path_list = [] - # XXX: assume existence of 100 test databases, because slaves are not - # functional yet in slapos: testdb_0...testdb_100, with testuser_N - mysql_template = "%s@%s:%s %s %s" - mysql_parsed = urlparse.urlparse(self.options['mysql-url']) - for i in range(0, 100): - mysql_connection_string_list.append(mysql_template % ('testdb_%s'% i, - mysql_parsed.hostname, mysql_parsed.port, 'testuser_%s'% i, mysql_parsed.password)) - mysql_connection_string = mysql_template % ('erp5_test', mysql_parsed.hostname, - mysql_parsed.port, 'erp5_test', mysql_parsed.password) - cloudooo_parsed = urlparse.urlparse(self.options['cloudooo-url']) - memcached_parsed = urlparse.urlparse(self.options['memcached-url']) - kumofs_parsed = urlparse.urlparse(self.options['kumofs-url']) - common_dict = dict( - instance_home=testinstance, - prepend_path=self.options['prepend-path'], - openssl_binary=self.options['openssl-binary'], - test_ca_path=self.options['certificate-authority-path'], - ) - common_list = [ - '--conversion_server_hostname=%s' % cloudooo_parsed.hostname, - '--conversion_server_port=%s' % cloudooo_parsed.port, - '--volatile_memcached_server_hostname=%s' % memcached_parsed.hostname, - '--volatile_memcached_server_port=%s' % memcached_parsed.port, - '--persistent_memcached_server_hostname=%s' % kumofs_parsed.hostname, - '--persistent_memcached_server_port=%s' % kumofs_parsed.port, - ] - path_list.append(self.createPythonScript(self.options['run-unit-test'], - __name__ + '.test.runUnitTest', [dict( - call_list=[self.options['run-unit-test-binary'], - '--erp5_sql_connection_string', mysql_connection_string, - '--extra_sql_connection_string_list', ','.join( - mysql_connection_string_list), - ] + common_list, **common_dict)])) - path_list.append(self.createPythonScript(self.options['run-test-suite'], - __name__ + '.test.runUnitTest', [dict( - call_list=[self.options['run-test-suite-binary'], - '--db_list', ','.join(mysql_connection_string_list), - ] + common_list, **common_dict)])) - - return path_list diff --git a/slapos/recipe/erp5_test/test.py b/slapos/recipe/erp5_test/test.py deleted file mode 100644 index 249c871c3..000000000 --- a/slapos/recipe/erp5_test/test.py +++ /dev/null @@ -1,72 +0,0 @@ -############################################################################## -# -# 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['OPENSSL_BINARY'] = d['openssl_binary'] - env['TEST_CA_PATH'] = d['test_ca_path'] - env['PATH'] = ':'.join([d['prepend_path']] + os.environ['PATH'].split(':')) - env['INSTANCE_HOME'] = d['instance_home'] - env['REAL_INSTANCE_HOME'] = d['instance_home'] - # 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['OPENSSL_BINARY'] = d['openssl_binary'] - env['TEST_CA_PATH'] = d['test_ca_path'] - env['PATH'] = ':'.join([d['prepend_path']] + os.environ.get('PATH', '').split(':')) - env['INSTANCE_HOME'] = d['instance_home'] - env['REAL_INSTANCE_HOME'] = d['instance_home'] - # 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) - diff --git a/slapos/recipe/erp5_update/__init__.py b/slapos/recipe/erp5_update/__init__.py deleted file mode 100644 index 1f702b890..000000000 --- a/slapos/recipe/erp5_update/__init__.py +++ /dev/null @@ -1,73 +0,0 @@ -############################################################################## -# -# Copyright (c) 2011 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 urlparse -from slapos.recipe.librecipe import GenericSlapRecipe - -class Recipe(GenericSlapRecipe): - def _install(self): - conversion_server = None - if 'cloudooo-url' in self.options and self.options['cloudooo-url']: - parsed = urlparse.urlparse(self.options['cloudooo-url']) - conversion_server = "%s:%s" % (parsed.hostname, parsed.port) - memcached = None - if 'memcached-url' in self.options and self.options['memcached-url']: - parsed = urlparse.urlparse(self.options['memcached-url']) - memcached = "%s:%s" % (parsed.hostname, parsed.port) - kumofs = None - if 'kumofs-url' in self.options and self.options['kumofs-url']: - parsed = urlparse.urlparse(self.options['kumofs-url']) - kumofs = "%s:%s" % (parsed.hostname, parsed.port) - - parsed = urlparse.urlparse(self.options['mysql-url']) - mysql_connection_string = "%(database)s@%(hostname)s:%(port)s "\ - "%(username)s %(password)s" % dict( - database=parsed.path.split('/')[1], - hostname=parsed.hostname, - port=parsed.port, - username=parsed.username, - password=parsed.password - ) - - parsed = urlparse.urlparse(self.options['url']) - zope_user = parsed.username - zope_password = parsed.password - zope_host = '%s:%s' % (parsed.hostname, parsed.port) - bt5_list = [] - if len(self.parameter_dict.get("bt5_list", "").strip()): - bt5_list = self.parameter_dict["bt5_list"].split() - elif self.parameter_dict.get("flavour", "default") == 'configurator': - bt5_list = self.options['configurator-bt5-list'].split() - bt5_repository_list = self.parameter_dict.get("bt5_repository_list", - "").split() or self.options['bt5-repository-list'].split() - - script = self.createPythonScript(self.options['update-wrapper'], - __name__+'.erp5.updateERP5', [ - self.options['site-id'], mysql_connection_string, - [zope_user, zope_password, zope_host], - memcached, conversion_server, kumofs, bt5_list, bt5_repository_list, - self.options['cadir-path'], self.options['openssl-binary']]) - return [script] diff --git a/slapos/recipe/erp5scalabilitytestbed/__init__.py b/slapos/recipe/erp5scalabilitytestbed/__init__.py deleted file mode 100644 index b99a81dea..000000000 --- a/slapos/recipe/erp5scalabilitytestbed/__init__.py +++ /dev/null @@ -1,106 +0,0 @@ -############################################################################## -# -# Copyright (c) 2011 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 pkg_resources -from slapos.recipe.librecipe import BaseSlapRecipe - -class Recipe(BaseSlapRecipe): - def _install(self): - self.parameter_dict = self.computer_partition.getInstanceParameterDict() - software_type = self.parameter_dict.get('slap_software_type', 'default') - if software_type is None or software_type == 'RootSoftwareInstance': - software_type = 'erp5_scalability_cloud' - if "run_%s" % software_type in dir(self) and \ - callable(getattr(self, "run_%s" % software_type)): - return getattr(self, "run_%s" % software_type)() - else: - raise NotImplementedError("Do not support %s" % software_type) - - def run_erp5_scalability_cloud(self): - config = {} - config.update(self.options) - config.update(self.parameter_dict) - - config['address'] = self.getGlobalIPv6Address() - config['report_path'] = self.log_directory - config.setdefault('user_range_increment', 1) - config['software_release_url'] = self.software_release_url - config['server_url'] = self.server_url - config['key_file'] = self.key_file - config['cert_file'] = self.cert_file - config['computer_id'] = self.computer_id - config['computer_partition_id'] = self.computer_partition_id - config['plugin_name'] = 'erp5' - - if ',' in config['nb_users']: - config['nb_tester_init'] = config['nb_users'].split(',')[0] - config['nb_tester_max'] = config['nb_users'].split(',')[1] - else: - config['nb_tester_init'] = config['nb_users'] - config['nb_tester_max'] = config['nb_users'] - - connection = {} - connection['url'] = 'http://['+config['address']+']:5000/' - connection['erp5_url'] = config['erp5_url'] - connection['repeat'] = config['repeat'] - connection['nb_users'] = config['nb_users'] - connection['benchmark_suites'] = config['benchmark_suites'] - connection['erp5_publish_url'] = config.get('erp5_publish_url', '') - connection['erp5_publish_project'] = config.get('erp5_publish_project', '') - - self.computer_partition.setConnectionDict(connection) - - nosqltester_manager_wrapper_template_location = pkg_resources.resource_filename( - __name__, os.path.join('template', 'erp5tester_manager_run.in')) - - nosqltester_manager_runner_path = self.createRunningWrapper("erp5tester_manager", - self.substituteTemplate(nosqltester_manager_wrapper_template_location, config)) - - return [nosqltester_manager_runner_path] - - def run_erp5_tester(self): - tester_config = {} - tester_config.update(self.options) - tester_config.update(self.parameter_dict) - - tester_config['tester_address'] = self.getGlobalIPv6Address() - tester_config['report_path'] = self.log_directory - tester_config['filename_prefix'] = '%s-%s' % (self.computer_id, - self.computer_partition_id) - - tester_connection = {'url': 'http://[%s]:5000/' % \ - tester_config['tester_address']} - - self.computer_partition.setConnectionDict(tester_connection) - - tester_wrapper_template_location = pkg_resources.resource_filename( - __name__, os.path.join('template', 'nosqltester_run.in')) - - tester_runner_path = self.createRunningWrapper("nosqltester", - self.substituteTemplate(tester_wrapper_template_location, tester_config)) - - return [tester_runner_path] diff --git a/slapos/recipe/erp5scalabilitytestbed/template/erp5tester_manager_run.in b/slapos/recipe/erp5scalabilitytestbed/template/erp5tester_manager_run.in deleted file mode 100755 index 0f18882a0..000000000 --- a/slapos/recipe/erp5scalabilitytestbed/template/erp5tester_manager_run.in +++ /dev/null @@ -1,9 +0,0 @@ -#!/bin/sh -# BEWARE: This file is operated by slapgrid -# BEWARE: It will be overwritten automatically -exec %(scalability_tester_manager_binary)s %(plugin_name)s -a %(address)s \ - -r %(report_path)s -m %(nb_tester_init)s -t %(nb_tester_max)s \ - -i %(user_range_increment)s --erp5-publish-url "%(erp5_publish_url)s" \ - --erp5-publish-project "%(erp5_publish_project)s" %(software_release_url)s \ - %(server_url)s "%(key_file)s" "%(cert_file)s" %(computer_id)s \ - %(computer_partition_id)s diff --git a/slapos/recipe/erp5scalabilitytestbed/template/nosqltester_run.in b/slapos/recipe/erp5scalabilitytestbed/template/nosqltester_run.in deleted file mode 100755 index 91a0bdea7..000000000 --- a/slapos/recipe/erp5scalabilitytestbed/template/nosqltester_run.in +++ /dev/null @@ -1,7 +0,0 @@ -#!/bin/sh -# BEWARE: This file is operated by slapgrid -# BEWARE: It will be overwritten automatically -cd %(benchmark_suite_path)s && \ -exec %(scalability_tester_binary)s -m %(host_address)s -a %(tester_address)s \ - -r %(report_path)s -l %(report_path)s --filename-prefix %(filename_prefix)s \ - --repeat %(repeat)s %(erp5_url)s 1 %(benchmark_suites)s diff --git a/slapos/recipe/erp5testnode/SlapOSControler.py b/slapos/recipe/erp5testnode/SlapOSControler.py new file mode 100644 index 000000000..e9ed42f71 --- /dev/null +++ b/slapos/recipe/erp5testnode/SlapOSControler.py @@ -0,0 +1,94 @@ +import slapos.slap, subprocess, os, time +from xml_marshaller import xml_marshaller + +class SlapOSControler(object): + + def __init__(self, config, process_group_pid_set=None): + self.config = config + # By erasing everything, we make sure that we are able to "update" + # existing profiles. This is quite dirty way to do updates... + if os.path.exists(config['proxy_database']): + os.unlink(config['proxy_database']) + proxy = subprocess.Popen([config['slapproxy_binary'], + config['slapos_config']], close_fds=True, preexec_fn=os.setsid) + process_group_pid_set.add(proxy.pid) + # XXX: dirty, giving some time for proxy to being able to accept + # connections + time.sleep(10) + slap = slapos.slap.slap() + slap.initializeConnection(config['master_url']) + # register software profile + self.software_profile = config['custom_profile_path'] + slap.registerSupply().supply( + self.software_profile, + computer_guid=config['computer_id']) + computer = slap.registerComputer(config['computer_id']) + # create partition and configure computer + partition_reference = config['partition_reference'] + partition_path = os.path.join(config['instance_root'], partition_reference) + if not os.path.exists(partition_path): + os.mkdir(partition_path) + os.chmod(partition_path, 0750) + computer.updateConfiguration(xml_marshaller.dumps({ + 'address': config['ipv4_address'], + 'instance_root': config['instance_root'], + 'netmask': '255.255.255.255', + 'partition_list': [{'address_list': [{'addr': config['ipv4_address'], + 'netmask': '255.255.255.255'}, + {'addr': config['ipv6_address'], + 'netmask': 'ffff:ffff:ffff::'}, + ], + 'path': partition_path, + 'reference': partition_reference, + 'tap': {'name': partition_reference}, + } + ], + 'reference': config['computer_id'], + 'software_root': config['software_root']})) + + def runSoftwareRelease(self, config, environment, process_group_pid_set=None, + stdout=None, stderr=None): + print "SlapOSControler.runSoftwareRelease" + cpu_count = os.sysconf("SC_NPROCESSORS_ONLN") + os.putenv('MAKEFLAGS', '-j%s' % cpu_count) + os.environ['PATH'] = environment['PATH'] + slapgrid = subprocess.Popen([config['slapgrid_software_binary'], '-v', '-c', + #'--buildout-parameter',"'-U -N' -o", + config['slapos_config']], + stdout=stdout, stderr=stderr, + close_fds=True, preexec_fn=os.setsid) + process_group_pid_set.add(slapgrid.pid) + slapgrid.wait() + stdout.seek(0) + stderr.seek(0) + process_group_pid_set.remove(slapgrid.pid) + status_dict = {'status_code':slapgrid.returncode, + 'stdout':stdout.read(), + 'stderr':stderr.read()} + stdout.close() + stderr.close() + return status_dict + + def runComputerPartition(self, config, environment, + process_group_pid_set=None, + stdout=None, stderr=None): + print "SlapOSControler.runSoftwareRelease" + slap = slapos.slap.slap() + slap.registerOpenOrder().request(self.software_profile, + partition_reference='testing partition', + partition_parameter_kw=config['instance_dict']) + slapgrid = subprocess.Popen([config['slapgrid_partition_binary'], + config['slapos_config'], '-c', '-v'], + stdout=stdout, stderr=stderr, + close_fds=True, preexec_fn=os.setsid) + process_group_pid_set.add(slapgrid.pid) + slapgrid.wait() + stdout.seek(0) + stderr.seek(0) + process_group_pid_set.remove(slapgrid.pid) + status_dict = {'status_code':slapgrid.returncode, + 'stdout':stdout.read(), + 'stderr':stderr.read()} + stdout.close() + stderr.close() + return status_dict diff --git a/slapos/recipe/erp5testnode/Updater.py b/slapos/recipe/erp5testnode/Updater.py new file mode 100644 index 000000000..83ea60a1e --- /dev/null +++ b/slapos/recipe/erp5testnode/Updater.py @@ -0,0 +1,189 @@ +import os, sys, subprocess, re, threading +from testnode import SubprocessError + +_format_command_search = re.compile("[[\\s $({?*\\`#~';<>&|]").search +_format_command_escape = lambda s: "'%s'" % r"'\''".join(s.split("'")) +def format_command(*args, **kw): + cmdline = [] + for k, v in sorted(kw.items()): + if _format_command_search(v): + v = _format_command_escape(v) + cmdline.append('%s=%s' % (k, v)) + for v in args: + if _format_command_search(v): + v = _format_command_escape(v) + cmdline.append(v) + return ' '.join(cmdline) + +def subprocess_capture(p, quiet=False): + def readerthread(input, output, buffer): + while True: + data = input.readline() + if not data: + break + output(data) + buffer.append(data) + if p.stdout: + stdout = [] + output = quiet and (lambda data: None) or sys.stdout.write + stdout_thread = threading.Thread(target=readerthread, + args=(p.stdout, output, stdout)) + stdout_thread.setDaemon(True) + stdout_thread.start() + if p.stderr: + stderr = [] + stderr_thread = threading.Thread(target=readerthread, + args=(p.stderr, sys.stderr.write, stderr)) + stderr_thread.setDaemon(True) + stderr_thread.start() + if p.stdout: + stdout_thread.join() + if p.stderr: + stderr_thread.join() + p.wait() + return (p.stdout and ''.join(stdout), + p.stderr and ''.join(stderr)) + +GIT_TYPE = 'git' +SVN_TYPE = 'svn' + +class Updater(object): + + _git_cache = {} + realtime_output = True + stdin = file(os.devnull) + + def __init__(self, repository_path, revision=None, git_binary=None): + self.revision = revision + self._path_list = [] + self.repository_path = repository_path + self.git_binary = git_binary + + def getRepositoryPath(self): + return self.repository_path + + def getRepositoryType(self): + try: + return self.repository_type + except AttributeError: + # guess the type of repository we have + if os.path.isdir(os.path.join( + self.getRepositoryPath(), '.git')): + repository_type = GIT_TYPE + elif os.path.isdir(os.path.join( + self.getRepositoryPath(), '.svn')): + repository_type = SVN_TYPE + else: + raise NotImplementedError + self.repository_type = repository_type + return repository_type + + def deletePycFiles(self, path): + """Delete *.pyc files so that deleted/moved files can not be imported""" + for path, dir_list, file_list in os.walk(path): + for file in file_list: + if file[-4:] in ('.pyc', '.pyo'): + # allow several processes clean the same folder at the same time + try: + os.remove(os.path.join(path, file)) + except OSError, e: + if e.errno != errno.ENOENT: + raise + + def spawn(self, *args, **kw): + quiet = kw.pop('quiet', False) + env = kw and dict(os.environ, **kw) or None + command = format_command(*args, **kw) + print '\n$ ' + command + sys.stdout.flush() + p = subprocess.Popen(args, stdin=self.stdin, stdout=subprocess.PIPE, + stderr=subprocess.PIPE, env=env, + cwd=self.getRepositoryPath()) + if self.realtime_output: + stdout, stderr = subprocess_capture(p, quiet) + else: + stdout, stderr = p.communicate() + if not quiet: + sys.stdout.write(stdout) + sys.stderr.write(stderr) + result = dict(status_code=p.returncode, command=command, + stdout=stdout, stderr=stderr) + if p.returncode: + raise SubprocessError(result) + return result + + def _git(self, *args, **kw): + return self.spawn(self.git_binary, *args, **kw)['stdout'].strip() + + def _git_find_rev(self, ref): + try: + return self._git_cache[ref] + except KeyError: + if os.path.exists('.git/svn'): + r = self._git('svn', 'find-rev', ref) + assert r + self._git_cache[ref[0] != 'r' and 'r%u' % int(r) or r] = ref + else: + r = self._git('rev-list', '--topo-order', '--count', ref), ref + self._git_cache[ref] = r + return r + + def getRevision(self, *path_list): + if not path_list: + path_list = self._path_list + if self.getRepositoryType() == GIT_TYPE: + h = self._git('log', '-1', '--format=%H', '--', *path_list) + return self._git_find_rev(h) + elif self.getRepositoryType() == SVN_TYPE: + stdout = self.spawn('svn', 'info', *path_list)['stdout'] + return str(max(map(int, SVN_CHANGED_REV.findall(stdout)))) + raise NotImplementedError + + def checkout(self, *path_list): + if not path_list: + path_list = '.', + revision = self.revision + if self.getRepositoryType() == GIT_TYPE: + # edit .git/info/sparse-checkout if you want sparse checkout + if revision: + if type(revision) is str: + h = revision + else: + h = revision[1] + if h != self._git('rev-parse', 'HEAD'): + self.deletePycFiles('.') + self._git('reset', '--merge', h) + else: + self.deletePycFiles('.') + if os.path.exists('.git/svn'): + self._git('svn', 'rebase') + else: + self._git('pull', '--ff-only') + self.revision = self._git_find_rev(self._git('rev-parse', 'HEAD')) + elif self.getRepositoryType() == SVN_TYPE: + # following code allows sparse checkout + def svn_mkdirs(path): + path = os.path.dirname(path) + if path and not os.path.isdir(path): + svn_mkdirs(path) + self.spawn(*(args + ['--depth=empty', path])) + for path in path_list: + args = ['svn', 'up', '--force', '--non-interactive'] + if revision: + args.append('-r%s' % revision) + svn_mkdirs(path) + args += '--set-depth=infinity', path + self.deletePycFiles(path) + try: + status_dict = self.spawn(*args) + except SubprocessError, e: + if 'cleanup' not in e.stderr: + raise + self.spawn('svn', 'cleanup', path) + status_dict = self.spawn(*args) + if not revision: + self.revision = revision = SVN_UP_REV.findall( + status_dict['stdout'].splitlines()[-1])[0] + else: + raise NotImplementedError + self._path_list += path_list diff --git a/slapos/recipe/erp5testnode/__init__.py b/slapos/recipe/erp5testnode/__init__.py index 5761aa3ef..cd8f0f53b 100644 --- a/slapos/recipe/erp5testnode/__init__.py +++ b/slapos/recipe/erp5testnode/__init__.py @@ -24,80 +24,136 @@ # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. # ############################################################################## -import ConfigParser -import json +from slapos.recipe.librecipe import BaseSlapRecipe import os -import StringIO +import pkg_resources +import zc.buildout +import zc.recipe.egg +import sys -from slapos.recipe.librecipe import GenericBaseRecipe +CONFIG = dict( + proxy_port='5000', + computer_id='COMPUTER', + partition_reference='test0', +) -class Recipe(GenericBaseRecipe): - def install(self): - path_list = [] - options = self.options.copy() - del options['recipe'] - CONFIG = {k.replace('-', '_'): v for k, v in options.iteritems()} - CONFIG['PATH'] = os.environ['PATH'] +class Recipe(BaseSlapRecipe): + def __init__(self, buildout, name, options): + self.egg = zc.recipe.egg.Egg(buildout, options['recipe'], options) + BaseSlapRecipe.__init__(self, buildout, name, options) - if CONFIG['bt5_path']: - additional_bt5_repository_id_list = CONFIG['bt5_path'].split(",") - CONFIG['bt5_path'] = '' - for bt5_repository_id in additional_bt5_repository_id_list: - id_path = os.path.join(CONFIG['slapos_directory'], bt5_repository_id) - bt_path = os.path.join(id_path, "bt5") - CONFIG['bt5_path'] += "%s,%s," % (id_path, bt_path) + def installSlapOs(self): + CONFIG['slapos_directory'] = self.createDataDirectory('slapos') + CONFIG['working_directory'] = self.createDataDirectory('testnode') + CONFIG['software_root'] = os.path.join(CONFIG['slapos_directory'], + 'software') + CONFIG['instance_root'] = os.path.join(CONFIG['slapos_directory'], + 'instance') + CONFIG['proxy_database'] = os.path.join(CONFIG['slapos_directory'], + 'proxy.db') + CONFIG['proxy_host'] = self.getLocalIPv4Address() + CONFIG['master_url'] = 'http://%s:%s' % (CONFIG['proxy_host'], + CONFIG['proxy_port']) + self._createDirectory(CONFIG['software_root']) + self._createDirectory(CONFIG['instance_root']) + CONFIG['slapos_config'] = self.createConfigurationFile('slapos.cfg', + self.substituteTemplate(pkg_resources.resource_filename(__name__, + 'template/slapos.cfg.in'), CONFIG)) + self.path_list.append(CONFIG['slapos_config']) - if self.options['instance-dict']: - config_instance_dict = ConfigParser.ConfigParser() - config_instance_dict.add_section('instance_dict') - instance_dict = json.loads(self.options['instance-dict']) + def setupRunningWrapper(self): + self.path_list.extend(zc.buildout.easy_install.scripts([( + 'testnode', + __name__+'.testnode', 'run')], self.ws, + sys.executable, self.wrapper_directory, arguments=[ + dict( + computer_id=CONFIG['computer_id'], + instance_dict=eval(self.parameter_dict.get('instance_dict', '{}')), + instance_root=CONFIG['instance_root'], + ipv4_address=self.getLocalIPv4Address(), + ipv6_address=self.getGlobalIPv6Address(), + master_url=CONFIG['master_url'], + profile_path=self.parameter_dict['profile_path'], + proxy_database=CONFIG['proxy_database'], + proxy_port=CONFIG['proxy_port'], + slapgrid_partition_binary=self.options['slapgrid_partition_binary'], + slapgrid_software_binary=self.options['slapgrid_software_binary'], + slapos_config=CONFIG['slapos_config'], + slapproxy_binary=self.options['slapproxy_binary'], + git_binary=self.options['git_binary'], + software_root=CONFIG['software_root'], + working_directory=CONFIG['working_directory'], + vcs_repository_list=eval(self.parameter_dict.get('vcs_repository_list'),), + node_quantity=self.parameter_dict.get('node_quantity', '1'), + test_suite_master_url=self.parameter_dict.get( + 'test_suite_master_url', None), + test_suite=self.parameter_dict.get('test_suite'), + test_suite_title=self.parameter_dict.get('test_suite_title'), + test_node_title=self.parameter_dict.get('test_node_title'), + project_title=self.parameter_dict.get('project_title'), + bin_directory=self.bin_directory, + # botenvironemnt is splittable string of key=value to substitute + # environment of running bot + bot_environment=self.parameter_dict.get('bot_environment', ''), + partition_reference=CONFIG['partition_reference'], + environment=dict(PATH=os.environ['PATH']), + vcs_authentication_list=eval(self.parameter_dict.get( + 'vcs_authentication_list', 'None')), + ) + ])) - for k ,v in instance_dict.iteritems(): - config_instance_dict.set('instance_dict', k, v) - value = StringIO.StringIO() - config_instance_dict.write(value) - CONFIG['instance_dict'] = value.getvalue() + def installLocalGit(self): + git_dict = dict(git_binary = self.options['git_binary']) + git_dict.update(self.parameter_dict) + double_slash_end_position = 1 + # XXX, this should be provided by slapos + print "bin_directory : %r" % self.bin_directory + home_directory = os.path.join(*os.path.split(self.bin_directory)[0:-1]) + print "home_directory : %r" % home_directory + git_dict.setdefault("git_server_name", "git.erp5.org") + if git_dict.get('vcs_authentication_list', None) is not None: + vcs_authentication_list = eval(git_dict['vcs_authentication_list']) + netrc_file = open(os.path.join(home_directory, '.netrc'), 'w') + for vcs_authentication_dict in vcs_authentication_list: + netrc_file.write(""" +machine %(host)s +login %(user_name)s +password %(password)s +""" % vcs_authentication_dict) + netrc_file.close() - vcs_repository_list = json.loads(self.options['repository-list']) - config_repository_list = ConfigParser.ConfigParser() - i = 0 - for repository in vcs_repository_list: - section_name = 'vcs_repository_%d' % i - config_repository_list.add_section(section_name) - config_repository_list.set(section_name, 'url', repository['url']) - if 'branch' in repository: - config_repository_list.set(section_name, 'branch', repository['branch']) - if 'profile_path' in repository: - config_repository_list.set(section_name, 'profile_path', - repository['profile_path']) - if 'buildout_section_id' in repository: - config_repository_list.set(section_name, 'buildout_section_id', - repository['buildout_section_id']) - i += 1 - value = StringIO.StringIO() - config_repository_list.write(value) - CONFIG['repository_list'] = value.getvalue() + def installLocalRepository(self): + self.installLocalGit() - configuration_file = self.createFile( - self.options['configuration-file'], - self.substituteTemplate( - self.getTemplateFilename('erp5testnode.cfg.in'), - CONFIG - ), - ) - path_list.append(configuration_file) - path_list.append( - self.createPythonScript( - self.options['wrapper'], - 'slapos.recipe.librecipe.execute.executee', - [ # Executable - [ self.options['testnode'], '-l', self.options['log-file'], - configuration_file], - # Environment - { - 'GIT_SSL_NO_VERIFY': '1', - } - ], - ) - ) - return path_list + def installLocalZip(self): + zip = os.path.join(self.bin_directory, 'zip') + if os.path.lexists(zip): + os.unlink(zip) + os.symlink(self.options['zip_binary'], zip) + + def installLocalPython(self): + """Installs local python fully featured with eggs""" + self.path_list.extend(zc.buildout.easy_install.scripts([], self.ws, + sys.executable, self.bin_directory, scripts=None, + interpreter='python')) + + def installLocalRunUnitTest(self): + link = os.path.join(self.bin_directory, 'runUnitTest') + destination = os.path.join(CONFIG['instance_root'], + CONFIG['partition_reference'], 'bin', 'runUnitTest') + if os.path.lexists(link): + if not os.readlink(link) != destination: + os.unlink(link) + if not os.path.lexists(link): + os.symlink(destination, link) + + def _install(self): + self.requirements, self.ws = self.egg.working_set() + self.path_list = [] + self.installSlapOs() + self.setupRunningWrapper() + self.installLocalRepository() + self.installLocalZip() + self.installLocalPython() + self.installLocalRunUnitTest() + return self.path_list diff --git a/slapos/recipe/erp5testnode/template/erp5testnode.cfg.in b/slapos/recipe/erp5testnode/template/erp5testnode.cfg.in deleted file mode 100644 index 08c4619a2..000000000 --- a/slapos/recipe/erp5testnode/template/erp5testnode.cfg.in +++ /dev/null @@ -1,31 +0,0 @@ -[testnode] -slapos_directory = %(slapos_directory)s -working_directory = %(slapos_directory)s -test_suite_directory = %(test_suite_directory)s -log_directory = %(log_directory)s -run_directory = %(run_directory)s -proxy_host = %(proxy_host)s -proxy_port = %(proxy_port)s -test_suite_title = %(test_suite_title)s -test_suite = %(test_suite)s -node_quantity = %(node_quantity)s -test_node_title = %(test_node_title)s -project_title= %(project_title)s -ipv4_address = %(ipv4_address)s -ipv6_address = %(ipv6_address)s -test_suite_master_url = %(test_suite_master_url)s -bt5_path = %(bt5_path)s - -# Binaries -git_binary = %(git_binary)s -slapgrid_partition_binary = %(slapgrid_partition_binary)s -slapgrid_software_binary = %(slapgrid_software_binary)s -slapproxy_binary = %(slapproxy_binary)s -zip_binary = %(zip_binary)s - -[environment] -PATH = %(PATH)s - -%(instance_dict)s - -%(repository_list)s diff --git a/slapos/recipe/erp5testnode/template/slapos.cfg.in b/slapos/recipe/erp5testnode/template/slapos.cfg.in new file mode 100644 index 000000000..713f719a3 --- /dev/null +++ b/slapos/recipe/erp5testnode/template/slapos.cfg.in @@ -0,0 +1,10 @@ +[slapos] +software_root = %(software_root)s +instance_root = %(instance_root)s +master_url = %(master_url)s +computer_id = %(computer_id)s + +[slapproxy] +host = %(proxy_host)s +port = %(proxy_port)s +database_uri = %(proxy_database)s diff --git a/slapos/recipe/erp5testnode/testnode.py b/slapos/recipe/erp5testnode/testnode.py new file mode 100644 index 000000000..f090a3a86 --- /dev/null +++ b/slapos/recipe/erp5testnode/testnode.py @@ -0,0 +1,245 @@ +from xml_marshaller import xml_marshaller +import os, xmlrpclib, time, imp +from glob import glob +import signal +import slapos.slap +import subprocess +import sys +import socket +import pprint +from SlapOSControler import SlapOSControler + + +class SubprocessError(EnvironmentError): + def __init__(self, status_dict): + self.status_dict = status_dict + def __getattr__(self, name): + return self.status_dict[name] + def __str__(self): + return 'Error %i' % self.status_code + + +from Updater import Updater + +process_group_pid_set = set() +process_pid_file_list = [] +process_command_list = [] +def sigterm_handler(signal, frame): + for pgpid in process_group_pid_set: + try: + os.killpg(pgpid, signal.SIGTERM) + except: + pass + for pid_file in process_pid_file_list: + try: + os.kill(int(open(pid_file).read().strip()), signal.SIGTERM) + except: + pass + for p in process_command_list: + try: + subprocess.call(p) + except: + pass + sys.exit(1) + +signal.signal(signal.SIGTERM, sigterm_handler) + +def safeRpcCall(function, *args): + retry = 64 + while True: + try: + return function(*args) + except (socket.error, xmlrpclib.ProtocolError), e: + print >>sys.stderr, e + pprint.pprint(args, file(function._Method__name, 'w')) + time.sleep(retry) + retry += retry >> 1 + +def getInputOutputFileList(config, command_name): + stdout = open(os.path.join( + config['instance_root'],'.%s_out' % command_name), + 'w+') + stdout.write("%s\n" % command_name) + stderr = open(os.path.join( + config['instance_root'],'.%s_err' % command_name), + 'w+') + return (stdout, stderr) + +slapos_controler = None + +def run(args): + config = args[0] + slapgrid = None + supervisord_pid_file = os.path.join(config['instance_root'], 'var', 'run', + 'supervisord.pid') + subprocess.check_call([config['git_binary'], + "config", "--global", "http.sslVerify", "false"]) + previous_revision = None + + run_software = True + # Write our own software.cfg to use the local repository + custom_profile_path = os.path.join(config['working_directory'], 'software.cfg') + config['custom_profile_path'] = custom_profile_path + vcs_repository_list = config['vcs_repository_list'] + profile_content = None + assert len(vcs_repository_list), "we must have at least one repository" + for vcs_repository in vcs_repository_list: + url = vcs_repository['url'] + buildout_section_id = vcs_repository.get('buildout_section_id', None) + repository_id = buildout_section_id or \ + url.split('/')[-1].split('.')[0] + repository_path = os.path.join(config['working_directory'],repository_id) + vcs_repository['repository_id'] = repository_id + vcs_repository['repository_path'] = repository_path + if profile_content is None: + profile_content = """ +[buildout] +extends = %(software_config_path)s +""" % {'software_config_path': os.path.join(repository_path, + config['profile_path'])} + if not(buildout_section_id is None): + profile_content += """ +[%(buildout_section_id)s] +repository = %(repository_path)s +branch = %(branch)s +""" % {'buildout_section_id': buildout_section_id, + 'repository_path' : repository_path, + 'branch' : vcs_repository.get('branch','master')} + + custom_profile = open(custom_profile_path, 'w') + custom_profile.write(profile_content) + custom_profile.close() + config['repository_path'] = repository_path + sys.path.append(repository_path) + test_suite_title = config['test_suite_title'] or config['test_suite'] + + retry_software = False + try: + while True: + # kill processes from previous loop if any + try: + for pgpid in process_group_pid_set: + try: + os.killpg(pgpid, signal.SIGTERM) + except: + pass + process_group_pid_set.clear() + full_revision_list = [] + # Make sure we have local repository + for vcs_repository in vcs_repository_list: + repository_path = vcs_repository['repository_path'] + repository_id = vcs_repository['repository_id'] + if not os.path.exists(repository_path): + parameter_list = [config['git_binary'], 'clone', + vcs_repository['url']] + if vcs_repository.get('branch') is not None: + parameter_list.extend(['-b',vcs_repository.get('branch')]) + parameter_list.append(repository_path) + subprocess.check_call(parameter_list) + # Make sure we have local repository + updater = Updater(repository_path, git_binary=config['git_binary']) + updater.checkout() + revision = "-".join(updater.getRevision()) + full_revision_list.append('%s=%s' % (repository_id, revision)) + revision = ','.join(full_revision_list) + if previous_revision == revision: + time.sleep(120) + if not(retry_software): + continue + retry_software = False + previous_revision = revision + + print config + portal_url = config['test_suite_master_url'] + test_result_path = None + test_result = (test_result_path, revision) + if portal_url: + if portal_url[-1] != '/': + portal_url += '/' + portal = xmlrpclib.ServerProxy("%s%s" % + (portal_url, 'portal_task_distribution'), + allow_none=1) + master = portal.portal_task_distribution + assert master.getProtocolRevision() == 1 + test_result = safeRpcCall(master.createTestResult, + config['test_suite'], revision, [], + False, test_suite_title, + config['test_node_title'], config['project_title']) + print "testnode, test_result : %r" % (test_result,) + if test_result: + test_result_path, test_revision = test_result + if revision != test_revision: + for i, repository_revision in enumerate(test_revision.split(',')): + vcs_repository = vcs_repository_list[i] + repository_path = vcs_repository['repository_path'] + # other testnodes on other boxes are already ready to test another + # revision + updater = Updater(repository_path, git_binary=config['git_binary'], + revision=repository_revision.split('-')[1]) + updater.checkout() + + # Now prepare the installation of SlapOS and create instance + slapos_controler = SlapOSControler(config, + process_group_pid_set=process_group_pid_set) + for method_name in ("runSoftwareRelease", "runComputerPartition"): + stdout, stderr = getInputOutputFileList(config, method_name) + slapos_method = getattr(slapos_controler, method_name) + status_dict = slapos_method(config, + environment=config['environment'], + process_group_pid_set=process_group_pid_set, + stdout=stdout, stderr=stderr + ) + if status_dict['status_code'] != 0: + break + if status_dict['status_code'] != 0: + safeRpcCall(master.reportTaskFailure, + test_result_path, status_dict, config['test_node_title']) + retry_software = True + continue + + partition_path = os.path.join(config['instance_root'], + config['partition_reference']) + run_test_suite_path = os.path.join(partition_path, 'bin', + 'runTestSuite') + if not os.path.exists(run_test_suite_path): + raise ValueError('No %r provided' % run_test_suite_path) + + run_test_suite_revision = revision + if isinstance(revision, tuple): + revision = ','.join(revision) + # Deal with Shebang size limitation + file_object = open(run_test_suite_path, 'r') + line = file_object.readline() + file_object.close() + invocation_list = [] + if line[:2] == '#!': + invocation_list = line[2:].split() + invocation_list.extend([run_test_suite_path, + '--test_suite', config['test_suite'], + '--revision', revision, + '--test_suite_title', test_suite_title, + '--node_quantity', config['node_quantity'], + '--master_url', config['test_suite_master_url']]) + run_test_suite = subprocess.Popen(invocation_list) + process_group_pid_set.add(run_test_suite.pid) + run_test_suite.wait() + process_group_pid_set.remove(run_test_suite.pid) + except SubprocessError: + time.sleep(120) + continue + + finally: + # Nice way to kill *everything* generated by run process -- process + # groups working only in POSIX compilant systems + # Exceptions are swallowed during cleanup phase + print "going to kill %r" % (process_group_pid_set,) + for pgpid in process_group_pid_set: + try: + os.killpg(pgpid, signal.SIGTERM) + except: + pass + try: + if os.path.exists(supervisord_pid_file): + os.kill(int(open(supervisord_pid_file).read().strip()), signal.SIGTERM) + except: + pass \ No newline at end of file diff --git a/slapos/recipe/fontconfig/__init__.py b/slapos/recipe/fontconfig/__init__.py deleted file mode 100644 index c60e42b5a..000000000 --- a/slapos/recipe/fontconfig/__init__.py +++ /dev/null @@ -1,85 +0,0 @@ -############################################################################## -# -# Copyright (c) 2011 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 pkg_resources -import os -import zc.buildout - -class Recipe(GenericBaseRecipe): - """ - fontconfig instance configuration. - - conf-path -- location of the configuration file - - font-system-folder -- fonts installed by software release - - font-folder -- location where to download fonts - - url-list -- From where to download fonts - """ - - def install(self): - created_file_list = [] - font_folder = self.options['font-folder'] - service_folder = self.options['service-folder'] - snippet_filename = self.getTemplateFilename( - 'fontconfig-snippet.cfg.in') - font_snippet_list = [self.substituteTemplate(snippet_filename, - dict(font_folder_path=self.options['font-system-folder']))] - font_snippet_list.append(self.substituteTemplate(snippet_filename, - dict(font_folder_path=font_folder))) - - config = dict( - font_folder_path_snippet=''.join(font_snippet_list), - ) - template_filename = self.getTemplateFilename('fontconfig.cfg.in') - configuration_path = self.createFile( - self.options['conf-path'], - self.substituteTemplate(template_filename, config)) - - created_file_list.append(configuration_path) - # Instanciate onetimedownloads, one for each url - wrapper_template_location = pkg_resources.resource_filename( - __name__, os.path.join( - 'template', 'onetimedownload_run.in')) - - onetimedownload_config = {} - onetimedownload_config.update(self.options) - for index, url in enumerate(self.options['url-list'].split()): - if not url.strip(): - continue - bin_path = os.path.join(service_folder, 'onetimedownload%s' % index) - file_path = os.path.join(font_folder, '%s' % index) - onetimedownload_config['url'] = url - onetimedownload_config['file_path'] = file_path - onetimedownload_runner_path = self.createExecutable(bin_path, - self.substituteTemplate(wrapper_template_location, - onetimedownload_config)) - - created_file_list.append(onetimedownload_runner_path) - - return created_file_list diff --git a/slapos/recipe/fontconfig/template/fontconfig-snippet.cfg.in b/slapos/recipe/fontconfig/template/fontconfig-snippet.cfg.in deleted file mode 100644 index adfb6a2a4..000000000 --- a/slapos/recipe/fontconfig/template/fontconfig-snippet.cfg.in +++ /dev/null @@ -1 +0,0 @@ -<dir>%(font_folder_path)s</dir> diff --git a/slapos/recipe/fontconfig/template/fontconfig.cfg.in b/slapos/recipe/fontconfig/template/fontconfig.cfg.in deleted file mode 100644 index c6799d21d..000000000 --- a/slapos/recipe/fontconfig/template/fontconfig.cfg.in +++ /dev/null @@ -1,5 +0,0 @@ -<?xml version="1.0"?> -<!DOCTYPE fontconfig SYSTEM "fonts.dtd"> -<fontconfig> -%(font_folder_path_snippet)s -</fontconfig> \ No newline at end of file diff --git a/slapos/recipe/fontconfig/template/onetimedownload_run.in b/slapos/recipe/fontconfig/template/onetimedownload_run.in deleted file mode 100644 index 0060b06c0..000000000 --- a/slapos/recipe/fontconfig/template/onetimedownload_run.in +++ /dev/null @@ -1,4 +0,0 @@ -#!/bin/sh -# BEWARE: This file is operated by slapgrid -# BEWARE: It will be overwritten automatically -exec %(onetimedownload_path)s "%(url)s" "%(file_path)s" diff --git a/slapos/recipe/generate_cloudooo.py b/slapos/recipe/generate_cloudooo.py deleted file mode 100644 index 0a119a796..000000000 --- a/slapos/recipe/generate_cloudooo.py +++ /dev/null @@ -1,60 +0,0 @@ -############################################################################## -# -# Copyright (c) 2011 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 GenericSlapRecipe -import os -import json -import traceback - - -class Recipe(GenericSlapRecipe): - def _options(self, options): - self.dirname = os.path.join(self.buildout['buildout']['parts-directory'], - self.name) - options['output'] = os.path.join(self.dirname, self.name + '.cfg') - - def _generateRealTemplate(self): - # TODO check json against schema - json_data = {} - if self.parameter_dict.get('cloudooo-json', None): - json_data = json.loads(self.parameter_dict['cloudooo-json']) - # dymanic fonts - font_url_list = json_data.get('font_url_list', []) - fontconfig_template = open(self.options['template']).read() - fontconfig = open(self.options['snippet-fontconfig']).read() - fontconfig_extension = fontconfig % dict(font_url_list=' '.join(font_url_list)) - with open(self.options['output'], 'w') as f: - f.write(fontconfig_template + fontconfig_extension) - - def _install(self): - if not os.path.exists(self.dirname): - os.mkdir(self.dirname) - try: - self._generateRealTemplate() - except Exception: - print 'Ignored issue during template generation:\n%s' % \ - traceback.format_exc() - return [self.dirname] diff --git a/slapos/recipe/generate_erp5_tidstorage.py b/slapos/recipe/generate_erp5_tidstorage.py deleted file mode 100644 index cfc03e664..000000000 --- a/slapos/recipe/generate_erp5_tidstorage.py +++ /dev/null @@ -1,198 +0,0 @@ -############################################################################## -# -# Copyright (c) 2011 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 GenericSlapRecipe -import os -import json -import traceback - -SECTION_BACKEND_PUBLISHER = """[publish-apache-backend-list] -recipe = slapos.cookbook:publish""" -ZOPE_PORT_BASE = 12000 -ZEO_PORT_BASE = 15000 -HAPROXY_PORT_BASE = 11000 -APACHE_PORT_BASE = 10000 - -class Recipe(GenericSlapRecipe): - def _options(self, options): - self.dirname = os.path.join(self.buildout['buildout']['parts-directory'], - self.name) - options['output'] = os.path.join(self.dirname, self.name + '.cfg') - - def _generateRealTemplate(self): - current_zeo_port = ZEO_PORT_BASE - current_zope_port = ZOPE_PORT_BASE - current_apache_port = APACHE_PORT_BASE - current_haproxy_port = HAPROXY_PORT_BASE - json_data = json.loads(self.parameter_dict['json']) - site_id = str(json_data['site-id']) - # prepare zeo - output = '' - part_list = [] - zope_dict = {} - zope_connection_dict = {} - known_tid_storage_identifier_dict = {} - snippet_zeo = open(self.options['snippet-zeo']).read() - for zeo_id, zeo_configuration_list in json_data['zeo'].iteritems(): - storage_list = [] - a = storage_list.append - for zeo_slave in zeo_configuration_list: - zope_connection_dict[zeo_slave['storage-name']] = { - 'zope-cache-size': zeo_slave['zope-cache-size'], - 'zeo-cache-size': zeo_slave['zeo-cache-size'], - 'mount-point': zeo_slave['mount-point'] % {'site-id': site_id}, - 'storage-name': zeo_slave['storage-name'], - 'server': '${zeo-instance-%(zeo-id)s:ip}:${zeo-instance-%(zeo-id)s:port}' % {'zeo-id': zeo_id} - } - zodb_path = os.path.join('${directory:zodb}', zeo_slave['storage-name'] + '.fs') - a(' storage-name=%(storage-name)s zodb-path=%(zodb-path)s' % {'zodb-path': zodb_path, 'storage-name': zeo_slave['storage-name']}) - known_tid_storage_identifier_dict[ - "((('%(ip)s', %(port)s),), '%(storage_name)s')" % dict( - ip='${zeo-instance-%s:ip}' % zeo_id, - port='${zeo-instance-%s:port}' % zeo_id, - storage_name=zeo_slave['storage-name'])] = (zodb_path, '${directory:zodb-backup}/%s/' % zeo_slave['storage-name'], zeo_slave['serialize-path'] % {'site-id': site_id}) - current_zeo_port += 1 - output += snippet_zeo % dict( - zeo_id=zeo_id, - zeo_port=current_zeo_port, - storage_list='\n'.join(storage_list) - ) - part_list.extend([ - "zeo-instance-%s" % zeo_id, - "logrotate-entry-zeo-%s" % zeo_id - ]) - - zeo_connection_list = [] - a = zeo_connection_list.append - for k, v in zope_connection_dict.iteritems(): - a(' zeo-cache-size=%(zeo-cache-size)s zope-cache-size=%(zope-cache-size)s server=%(server)s mount-point=%(mount-point)s storage-name=%(storage-name)s' % v) - zeo_connection_string = '\n'.join(zeo_connection_list) - zope_dict.update( - timezone=json_data['timezone'], - zeo_connection_string=zeo_connection_string - ) - # always one distribution node - current_zope_port += 1 - snippet_zope = open(self.options['snippet-zope']).read() - zope_id = 'zope-distribution' - part_list.append(zope_id) - part_list.append('logrotate-entry-%s' % zope_id) - output += snippet_zope % dict(zope_thread_amount=1, zope_id=zope_id, - zope_port=current_zope_port, zope_timeserver=True, - longrequest_logger_file='', longrequest_logger_timeout='', - longrequest_logger_interval='', **zope_dict) - # always one admin node - current_zope_port += 1 - zope_id = 'zope-admin' - part_list.append(zope_id) - part_list.append('logrotate-entry-%s' % zope_id) - output += snippet_zope % dict(zope_thread_amount=1, zope_id=zope_id, - zope_port=current_zope_port, zope_timeserver=False, - longrequest_logger_file='', longrequest_logger_timeout='', - longrequest_logger_interval='', **zope_dict) - # handle activity key - for q in range(1, json_data['activity']['zopecount'] + 1): - current_zope_port += 1 - part_name = 'zope-activity-%s' % q - part_list.append(part_name) - part_list.append('logrotate-entry-%s' % part_name) - output += snippet_zope % dict(zope_thread_amount=1, zope_id=part_name, - zope_port=current_zope_port, zope_timeserver=True, - longrequest_logger_file='', longrequest_logger_timeout='', - longrequest_logger_interval='', **zope_dict) - # handle backend key - snippet_backend = open(self.options['snippet-backend']).read() - publish_url_list = [] - for backend_name, backend_configuration in json_data['backend'].iteritems(): - haproxy_backend_list = [] - for q in range(1, backend_configuration['zopecount'] + 1): - current_zope_port += 1 - part_name = 'zope-%s-%s' % (backend_name, q) - part_list.append(part_name) - part_list.append('logrotate-entry-%s' % part_name) - longrequest_logger = backend_configuration.get("longrequest-logger", None) - if longrequest_logger is not None: - longrequest_part_name = '%s-longrequest' %part_name - longrequest_logger_file = '${basedirectory:log}/%s.log' \ - %longrequest_part_name - longrequest_logger_timeout = longrequest_logger.get('timeout', '4') - longrequest_logger_interval = longrequest_logger.get('interval', '2') - else: - longrequest_logger_file = longrequest_logger_timeout = \ - longrequest_logger_interval = '' - output += snippet_zope % dict( - zope_thread_amount=backend_configuration['thread-amount'], - zope_id=part_name, zope_port=current_zope_port, zope_timeserver=False, - longrequest_logger_file=longrequest_logger_file, - longrequest_logger_timeout=longrequest_logger_timeout, - longrequest_logger_interval=longrequest_logger_interval, - **zope_dict) - haproxy_backend_list.append('${%(part_name)s:ip}:${%(part_name)s:port}' % dict(part_name=part_name)) - # now generate backend access - current_apache_port += 1 - current_haproxy_port += 1 - part_list.append('apache-%(backend_name)s ca-apache-%(backend_name)s logrotate-entry-apache-%(backend_name)s haproxy-%(backend_name)s' % dict(backend_name=backend_name)) - backend_dict = dict( - backend_name=backend_name, - apache_port=current_apache_port, - haproxy_port=current_haproxy_port, - access_control_string=backend_configuration['access-control-string'], - maxconn=backend_configuration['maxconn'], - server_check_path='/%s/getId' % site_id, - haproxy_backend_list=' '.join(haproxy_backend_list) - ) - publish_url_list.append('url-%(backend_name)s = https://[${apache-%(backend_name)s:ip}]:${apache-%(backend_name)s:port}' % dict( - backend_name=backend_name)) - output += snippet_backend % backend_dict - output += SECTION_BACKEND_PUBLISHER + '\n' - output += '\n'.join(publish_url_list) - part_list.append('publish-apache-backend-list') - prepend = open(self.options['snippet-master']).read() % dict( - part_list=' \n'.join([' '+q for q in part_list]), - known_tid_storage_identifier_dict=known_tid_storage_identifier_dict, - haproxy_section="haproxy-%s" % backend_name, - zope_section=zope_id, - site_id=site_id, - **self.parameter_dict - ) - output = prepend + output - with open(self.options['output'], 'w') as f: - f.write(output) - - def _install(self): - if not os.path.exists(self.dirname): - os.mkdir(self.dirname) - if not "json" in self.parameter_dict: - # no json transimtted, nothing to do - with open(self.options['output'], 'w') as f: - f.write("[buildout]\nparts =\n") - else: - try: - self._generateRealTemplate() - except Exception: - print 'Ignored issue during template generation:\n%s' % \ - traceback.format_exc() - return [self.dirname] diff --git a/slapos/recipe/generic_cloudooo/__init__.py b/slapos/recipe/generic_cloudooo/__init__.py deleted file mode 100644 index 86e59ff64..000000000 --- a/slapos/recipe/generic_cloudooo/__init__.py +++ /dev/null @@ -1,58 +0,0 @@ -############################################################################## -# -# Copyright (c) 2011 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 zc.buildout -from slapos.recipe.librecipe import GenericBaseRecipe - -class Recipe(GenericBaseRecipe): - def install(self): - path_list = [] - conversion_server_dict = dict( - working_path=self.options['data-directory'], - uno_path=self.options['ooo-uno-path'], - office_binary_path=self.options['ooo-binary-path'], - ip=self.options['ip'], - port=int(self.options['port']), - openoffice_port=int(self.options['openoffice-port']), - ) - for env_line in self.options['environment'].splitlines(): - env_line = env_line.strip() - if not env_line: - continue - if '=' in env_line: - env_key, env_value = env_line.split('=') - conversion_server_dict[env_key.strip()] = env_value.strip() - else: - raise zc.buildout.UserError('Line %r in environment parameter is ' - 'incorrect' % env_line) - config_file = self.createFile(self.options['configuration-file'], - self.substituteTemplate(self.getTemplateFilename('cloudooo.cfg.in'), - conversion_server_dict)) - path_list.append(config_file) - path_list.append(self.createPythonScript(self.options['wrapper'], - 'slapos.recipe.librecipe.execute.execute_with_signal_translation', - [self.options['ooo-paster'].strip(), 'serve', config_file])) - return path_list diff --git a/slapos/recipe/generic_kumofs/__init__.py b/slapos/recipe/generic_kumofs/__init__.py deleted file mode 100644 index 0b939c887..000000000 --- a/slapos/recipe/generic_kumofs/__init__.py +++ /dev/null @@ -1,70 +0,0 @@ -############################################################################## -# -# Copyright (c) 2011 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 -from slapos.recipe.librecipe import GenericBaseRecipe - -class Recipe(GenericBaseRecipe): - def install(self): - ip = self.options['ip'] - 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']) - kumo_gateway_port = int(self.options['gateway-port']) - path_list = [] - # XXX: kumo is not storing pid in file, unless it is not running as daemon - # but running daemons is incompatible with SlapOS, so there is currently - # no way to have Kumo's pid files to rotate logs and send signals to them - config = dict( - kumo_gateway_binary=self.options['kumo-gateway-binary'], - kumo_gateway_ip=ip, - kumo_gateway_log=self.options['kumo-gateway-log'], - kumo_manager_binary=self.options['kumo-manager-binary'], - kumo_manager_ip=ip, - kumo_manager_log=self.options['kumo-manager-log'], - kumo_server_binary=self.options['kumo-server-binary'], - kumo_server_ip=ip, - kumo_server_log=self.options['kumo-server-log'], - kumo_server_storage=os.path.join(self.options['data-directory'], "kumodb.tch"), - kumo_manager_port=kumo_manager_port, - kumo_server_port=kumo_server_port, - kumo_server_listen_port=kumo_server_listen_port, - kumo_gateway_port=kumo_gateway_port - ) - - path_list.append(self.createExecutable(self.options['gateway-wrapper'], - self.substituteTemplate(self.getTemplateFilename('kumo_gateway.in'), - config))) - - path_list.append(self.createExecutable(self.options['manager-wrapper'], - self.substituteTemplate(self.getTemplateFilename('kumo_manager.in'), - config))) - - path_list.append(self.createExecutable(self.options['server-wrapper'], - self.substituteTemplate(self.getTemplateFilename('kumo_server.in'), - config))) - - return path_list diff --git a/slapos/recipe/generic_memcached/__init__.py b/slapos/recipe/generic_memcached/__init__.py deleted file mode 100644 index 7a3a77a2a..000000000 --- a/slapos/recipe/generic_memcached/__init__.py +++ /dev/null @@ -1,56 +0,0 @@ -############################################################################## -# -# Copyright (c) 2011 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 - -class Recipe(GenericBaseRecipe): - """ - memcached instance configuration. - - wrapper-path -- location of the init script to generate - - binary-path -- location of the memcached command - - ip -- ip of the memcached server - - port -- port of the memcached server - """ - - def install(self): - template_filename = self.getTemplateFilename('memcached.in') - - config = dict( - memcached_binary=self.options['binary_path'], - memcached_ip=self.options['ip'], - memcached_port=self.options['port'], - ) - - executable_path = self.createExecutable( - self.options['wrapper_path'], - self.substituteTemplate(self.getTemplateFilename('memcached.in'), - config)) - - return [executable_path] diff --git a/slapos/recipe/generic_mysql/__init__.py b/slapos/recipe/generic_mysql/__init__.py deleted file mode 100644 index 6c36637d9..000000000 --- a/slapos/recipe/generic_mysql/__init__.py +++ /dev/null @@ -1,179 +0,0 @@ -############################################################################## -# -# Copyright (c) 2011 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 os - -class Recipe(GenericBaseRecipe): - - def _options(self, options): - options['password'] = self.generatePassword() - options['test-password'] = self.generatePassword() - for x in xrange(0, int(options['parallel-test-database-amount'])): - options['test-password-%s' % x] = self.generatePassword() - - def install(self): - path_list = [] - - template_filename = self.getTemplateFilename('my.cnf.in') - - mysql_conf = dict( - ip=self.options['ip'], - data_directory=self.options['data-directory'], - tcp_port=self.options['port'], - pid_file=self.options['pid-file'], - socket=self.options['socket'], - error_log=self.options['error-log'], - slow_query_log=self.options['slow-query-log'], - mysql_database=self.options['database'], - mysql_user=self.options['user'], - mysql_password=self.options['password'], - mysql_test_database=self.options['test-database'], - mysql_test_user=self.options['test-user'], - mysql_test_password=self.options['test-password'], - ) - - mysql_binary = self.options['mysql-binary'] - socket = self.options['socket'], - - mysql_conf_file = self.createFile( - self.options['conf-file'], - self.substituteTemplate(template_filename, mysql_conf) - ) - path_list.append(mysql_conf_file) - - mysql_script_list = [] - - # real database - mysql_script_list.append(self.substituteTemplate( - self.getTemplateFilename('initmysql.sql.in'), - { - 'mysql_database': mysql_conf['mysql_database'], - 'mysql_user': mysql_conf['mysql_user'], - 'mysql_password': mysql_conf['mysql_password'] - } - )) - # default test database - mysql_script_list.append(self.substituteTemplate( - self.getTemplateFilename('initmysql.sql.in'), - { - 'mysql_database': mysql_conf['mysql_test_database'], - 'mysql_user': mysql_conf['mysql_test_user'], - 'mysql_password': mysql_conf['mysql_test_password'] - } - )) - # parallel test databases - for x in xrange(0, int(self.options['parallel-test-database-amount'])): - mysql_script_list.append(self.substituteTemplate( - self.getTemplateFilename('initmysql.sql.in'), - { - 'mysql_database': self.options['mysql-test-database-base'] + '_%s' % x, - 'mysql_user': self.options['mysql-test-user-base'] + '_%s' % x, - 'mysql_password': self.options['test-password-%s' % x] - } - )) - mysql_script_list.append('EXIT') - mysql_script = '\n'.join(mysql_script_list) - - mysql_upgrade_binary = self.options['mysql-upgrade-binary'] - mysql_update = self.createPythonScript( - self.options['update-wrapper'], - '%s.mysql.updateMysql' % __name__, - [dict( - mysql_script=mysql_script, - mysql_binary=mysql_binary, - mysql_upgrade_binary=mysql_upgrade_binary, - socket=socket, - )] - ) - path_list.append(mysql_update) - - mysqld_binary = self.options['mysqld-binary'] - mysqld = self.createPythonScript( - self.options['wrapper'], - '%s.mysql.runMysql' % __name__, - [dict( - mysql_install_binary=self.options['mysql-install-binary'], - mysqld_binary=mysqld_binary, - data_directory=mysql_conf['data_directory'], - mysql_binary=mysql_binary, - socket=socket, - configuration_file=mysql_conf_file, - )] - ) - path_list.append(mysqld) - # backup configuration - full_backup = self.options['full-backup-directory'] - incremental_backup = self.options['incremental-backup-directory'] - innobackupex_argument_list = [self.options['perl-binary'], - self.options['innobackupex-binary'], - '--defaults-file=%s' % mysql_conf_file, - '--socket=%s' %mysql_conf['socket'].strip(), '--user=root', - '--ibbackup=%s'% self.options['xtrabackup-binary']] - environment = dict(PATH='%s' % self.options['bin-directory']) - innobackupex_incremental = self.createPythonScript(self.options['innobackupex-incremental'], 'slapos.recipe.librecipe.execute.executee', [innobackupex_argument_list + ['--incremental'], environment]) - path_list.append(innobackupex_incremental) - innobackupex_full = self.createPythonScript(self.options['innobackupex-full'], 'slapos.recipe.librecipe.execute.executee', [innobackupex_argument_list, environment]) - path_list.append(innobackupex_full) - backup_controller = self.createPythonScript(self.options['backup-script'], __name__ + '.innobackupex.controller', [innobackupex_incremental, innobackupex_full, full_backup, incremental_backup]) - path_list.append(backup_controller) - # maatkit installation - for pt_script_name in ( - 'pt-archiver', - 'pt-config-diff', - 'pt-deadlock-logger', - 'pt-duplicate-key-checker', - 'pt-fifo-split', - 'pt-find', - 'pt-fk-error-logger', - 'pt-heartbeat', - 'pt-index-usage', - 'pt-kill', - 'pt-log-player', - 'pt-online-schema-change', - 'pt-query-advisor', - 'pt-query-digest', - 'pt-show-grants', - 'pt-slave-delay', - 'pt-slave-find', - 'pt-slave-restart', - 'pt-table-checksum', - 'pt-table-sync', - 'pt-tcp-model', - 'pt-trend', - 'pt-upgrade', - 'pt-variable-advisor', - 'pt-visual-explain', - ): - pt_argument_list = [self.options['perl-binary'], - self.options['%s-binary' % pt_script_name], - '--defaults-file=%s' % mysql_conf_file, - '--socket=%s' %mysql_conf['socket'].strip(), '--user=root', - ] - pt_exe = self.createPythonScript(os.path.join(self.options['bin-directory'], pt_script_name), 'slapos.recipe.librecipe.execute.executee', [pt_argument_list, environment]) - path_list.append(pt_exe) - - return path_list diff --git a/slapos/recipe/generic_zope/__init__.py b/slapos/recipe/generic_zope/__init__.py deleted file mode 100644 index 0c29ac934..000000000 --- a/slapos/recipe/generic_zope/__init__.py +++ /dev/null @@ -1,135 +0,0 @@ -############################################################################## -# -# Copyright (c) 2011 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 binascii -import hashlib -import os -import re -import zc.buildout - -_isurl = re.compile('([a-zA-Z0-9+.-]+)://').match - -# based on Zope2.utilities.mkzopeinstance.write_inituser -def Zope2InitUser(path, username, password): - open(path, 'w').write('') - os.chmod(path, 0600) - open(path, "w").write('%s:{SHA}%s\n' % ( - username,binascii.b2a_base64(hashlib.sha1(password).digest())[:-1])) - -class Recipe(GenericBaseRecipe): - def _options(self, options): - options['password'] = self.generatePassword() - options['deadlock-password'] = self.generatePassword() - - def install(self): - """ - All zope have to share file created by portal_classes - (until everything is integrated into the ZODB). - So, do not request zope instance and create multiple in the same partition. - """ - path_list = [] - Zope2InitUser(self.options['inituser'], self.options['user'], - self.options['password']) - - # Symlink to BT5 repositories defined in instance config. - # Those paths will eventually end up in the ZODB, and having symlinks - # inside the XXX makes it possible to reuse such ZODB with another software - # release[ version]. - # Note: this path cannot be used for development, it's really just a - # read-only repository. - repository_path = self.options['bt5-repository'] - - self.bt5_repository_list = [] - append = self.bt5_repository_list.append - for repository in self.options.get('bt5-repository-list', '').split(): - repository = repository.strip() - if not repository: - continue - - if _isurl(repository) and not repository.startswith("file://"): - # XXX: assume it's a valid URL - append(repository) - continue - - if repository.startswith('file://'): - repository = repository.replace('file://', '', '') - - if os.path.isabs(repository): - repo_id = hashlib.sha1(repository).hexdigest() - link = os.path.join(repository_path, repo_id) - if os.path.lexists(link): - if not os.path.islink(link): - raise zc.buildout.UserError( - 'Target link already %r exists but it is not link' % link) - os.unlink(link) - os.symlink(repository, link) - self.logger.debug('Created link %r -> %r' % (link, repository_path)) - # Always provide a URL-Type - append("file://" + link) - - # Create zope configuration file - zope_config = dict( - products=self.options['products'], - thread_amount=self.options['thread-amount'], - zodb_root_path=self.options['zodb-path'], - zodb_cache_size=int(self.options['zodb-cache-size']), - ) - zope_environment = dict( - TMP=self.options['tmp-path'], - TMPDIR=self.options['tmp-path'], - HOME=self.options['tmp-path'], - PATH=self.options['bin-path'] - ) - # configure default Zope2 zcml - open(self.options['site-zcml'], 'w').write(open(self.getTemplateFilename( - 'site.zcml')).read()) - zope_config['instance'] = self.options['instance-path'] - zope_config['event_log'] = self.options['event-log'] - zope_config['z2_log'] = self.options['z2-log'] - zope_config['pid-filename'] = self.options['pid-file'] - zope_config['lock-filename'] = self.options['lock-file'] - prefixed_products = [] - for product in reversed(zope_config['products'].split()): - product = product.strip() - if product: - prefixed_products.append('products %s' % product) - prefixed_products.insert(0, 'products %s' % self.options[ - 'instance-products']) - zope_config['products'] = '\n'.join(prefixed_products) - zope_config['address'] = '%s:%s' % (self.options['ip'], self.options['port']) - zope_config.update(dump_url=self.options['deadlock-path'], - secret=self.options['deadlock-password']) - - zope_wrapper_template_location = self.getTemplateFilename('zope.conf.in') - zope_conf_content = self.substituteTemplate(zope_wrapper_template_location, - zope_config) - - zope_conf_path = self.createFile(self.options['configuration-file'], zope_conf_content) - path_list.append(zope_conf_path) - # Create init script - path_list.append(self.createPythonScript(self.options['wrapper'], 'slapos.recipe.librecipe.execute.executee', [[self.options['runzope-binary'].strip(), '-C', zope_conf_path], zope_environment])) - return path_list diff --git a/slapos/recipe/generic_zope/template/zope.conf.in b/slapos/recipe/generic_zope/template/zope.conf.in deleted file mode 100644 index 3853b0d64..000000000 --- a/slapos/recipe/generic_zope/template/zope.conf.in +++ /dev/null @@ -1,73 +0,0 @@ -## Zope 2 configuration file generated by SlapOS - -# Some defines -%%define INSTANCE %(instance)s -instancehome $INSTANCE - -# Used products -%(products)s - -# Environment is setup in running wrapper script -# Reason: zope.conf is read too late for some componets - -# No need to debug -debug-mode off - -# One thread is safe enough -zserver-threads %(thread_amount)s - -# File location -pid-filename %(pid-filename)s -lock-filename %(lock-filename)s - -# Temporary storage database (for sessions) -<zodb_db temporary> - <temporarystorage> - name temporary storage for sessioning - </temporarystorage> - mount-point /temp_folder - container-class Products.TemporaryFolder.TemporaryContainer -</zodb_db> - -# Logging configuration -<eventlog> - <logfile> - dateformat - path %(event_log)s - </logfile> -</eventlog> -<logger access> - <logfile> - dateformat - path %(z2_log)s - </logfile> -</logger> - -# Serving configuration -<http-server> - address %(address)s -</http-server> - -# ZODB configuration -<zodb_db root> - cache-size %(zodb_cache_size)d - <filestorage> - path %(zodb_root_path)s - </filestorage> - mount-point / -</zodb_db> -<zoperunner> - program $INSTANCE/bin/runzope -</zoperunner> - -# DeadlockDebugger configuration -<product-config DeadlockDebugger> - dump_url %(dump_url)s - secret %(secret)s -</product-config> - -# ERP5 Timer Service -%%import timerserver -<timer-server> - interval 5 -</timer-server> diff --git a/slapos/recipe/generic_zope_zeo_client/__init__.py b/slapos/recipe/generic_zope_zeo_client/__init__.py deleted file mode 100644 index 94e4cf8b9..000000000 --- a/slapos/recipe/generic_zope_zeo_client/__init__.py +++ /dev/null @@ -1,165 +0,0 @@ -############################################################################## -# -# Copyright (c) 2011 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 binascii -import hashlib -import os -import re -import zc.buildout - -_isurl = re.compile('([a-zA-Z0-9+.-]+)://').match - -# based on Zope2.utilities.mkzopeinstance.write_inituser -def Zope2InitUser(path, username, password): - open(path, 'w').write('') - os.chmod(path, 0600) - open(path, "w").write('%s:{SHA}%s\n' % ( - username,binascii.b2a_base64(hashlib.sha1(password).digest())[:-1])) - -class Recipe(GenericBaseRecipe): - def _options(self, options): - options['password'] = self.generatePassword() - options['deadlock-password'] = self.generatePassword() - - def install(self): - """ - All zope have to share file created by portal_classes - (until everything is integrated into the ZODB). - So, do not request zope instance and create multiple in the same partition. - """ - path_list = [] - Zope2InitUser(self.options['inituser'], self.options['user'], - self.options['password']) - - # Symlink to BT5 repositories defined in instance config. - # Those paths will eventually end up in the ZODB, and having symlinks - # inside the XXX makes it possible to reuse such ZODB with another software - # release[ version]. - # Note: this path cannot be used for development, it's really just a - # read-only repository. - repository_path = self.options['bt5-repository'] - - self.bt5_repository_list = [] - append = self.bt5_repository_list.append - for repository in self.options.get('bt5-repository-list', '').split(): - repository = repository.strip() - if not repository: - continue - - if _isurl(repository) and not repository.startswith("file://"): - # XXX: assume it's a valid URL - append(repository) - continue - - if repository.startswith('file://'): - repository = repository.replace('file://', '', '') - - if os.path.isabs(repository): - repo_id = hashlib.sha1(repository).hexdigest() - link = os.path.join(repository_path, repo_id) - if os.path.lexists(link): - if not os.path.islink(link): - raise zc.buildout.UserError( - 'Target link already %r exists but it is not link' % link) - os.unlink(link) - os.symlink(repository, link) - self.logger.debug('Created link %r -> %r' % (link, repository_path)) - # Always provide a URL-Type - append("file://" + link) - - # Generate Zeo connections - zeo_snippet_template = open(self.getTemplateFilename('zope.zeo.entry.conf.in' - )).read() - zeo_snippet_list = [] - for zeo_line in self.options['zeo-connection-string'].splitlines(): - zeo_line.strip() - if not zeo_line: - continue - d = dict() - for param in zeo_line.split(): - k, v = param.split('=') - d[k.strip()] = v.strip() - zeo_snippet_list.append(zeo_snippet_template % d) - # Create zope configuration file - zope_config = dict( - products=self.options['products'], - thread_amount=self.options['thread-amount'], - zodb_configuration='\n'.join(zeo_snippet_list) - ) - zope_environment = dict( - TMP=self.options['tmp-path'], - TMPDIR=self.options['tmp-path'], - HOME=self.options['tmp-path'], - PATH=self.options['bin-path'], - TIMEZONE=self.options['timezone'], - ) - - # longrequestlogger product which requires environment settings - longrequest_logger_file = self.options.get('longrequest-logger-file', None) - longrequest_logger_timeout = \ - self.options.get('longrequest-logger-timeout', None) - longrequest_logger_interval= \ - self.options.get('longrequest-logger-interval', None) - if longrequest_logger_file: - # add needed zope configuration - zope_environment.update( - **dict(longrequestlogger_file = longrequest_logger_file, - longrequestlogger_timeout = longrequest_logger_timeout, - longrequestlogger_interval = longrequest_logger_interval)) - - # configure default Zope2 zcml - open(self.options['site-zcml'], 'w').write(open(self.getTemplateFilename( - 'site.zcml')).read()) - zope_config['instance'] = self.options['instance-path'] - zope_config['event_log'] = self.options['event-log'] - zope_config['z2_log'] = self.options['z2-log'] - zope_config['pid-filename'] = self.options['pid-file'] - zope_config['lock-filename'] = self.options['lock-file'] - prefixed_products = [] - for product in reversed(zope_config['products'].split()): - product = product.strip() - if product: - prefixed_products.append('products %s' % product) - prefixed_products.insert(0, 'products %s' % self.options[ - 'instance-products']) - zope_config['products'] = '\n'.join(prefixed_products) - zope_config['address'] = '%s:%s' % (self.options['ip'], self.options['port']) - zope_config.update(dump_url=self.options['deadlock-path'], - secret=self.options['deadlock-password']) - - zope_wrapper_template_location = self.getTemplateFilename('zope.conf.in') - zope_conf_content = self.substituteTemplate(zope_wrapper_template_location, - zope_config) - if self.isTrueValue(self.options['timeserver']): - zope_conf_content += self.substituteTemplate(self.getTemplateFilename( - 'zope.conf.timeserver.in'), {}) - - zope_conf_path = self.createFile(self.options['configuration-file'], zope_conf_content) - path_list.append(zope_conf_path) - # Create init script - path_list.append(self.createPythonScript(self.options['wrapper'], 'slapos.recipe.librecipe.execute.executee', [[self.options['runzope-binary'].strip(), '-C', zope_conf_path], zope_environment])) - return path_list diff --git a/slapos/recipe/generic_zope_zeo_client/template/site.zcml b/slapos/recipe/generic_zope_zeo_client/template/site.zcml deleted file mode 100644 index 47454428e..000000000 --- a/slapos/recipe/generic_zope_zeo_client/template/site.zcml +++ /dev/null @@ -1,26 +0,0 @@ -<configure - xmlns="http://namespaces.zope.org/zope" - xmlns:meta="http://namespaces.zope.org/meta" - xmlns:five="http://namespaces.zope.org/five"> - - <include package="Products.Five" /> - <meta:redefinePermission from="zope2.Public" to="zope.Public" /> - - - <!-- Load the meta --> - <include files="package-includes/*-meta.zcml" /> - <five:loadProducts file="meta.zcml"/> - - <!-- Load the configuration --> - <include files="package-includes/*-configure.zcml" /> - <five:loadProducts /> - - <!-- Load the configuration overrides--> - <includeOverrides files="package-includes/*-overrides.zcml" /> - <five:loadProductsOverrides /> - - - <securityPolicy - component="Products.Five.security.FiveSecurityPolicy" /> - -</configure> diff --git a/slapos/recipe/generic_zope_zeo_client/template/zope.zeo.entry.conf.in b/slapos/recipe/generic_zope_zeo_client/template/zope.zeo.entry.conf.in deleted file mode 100644 index 3ef43f262..000000000 --- a/slapos/recipe/generic_zope_zeo_client/template/zope.zeo.entry.conf.in +++ /dev/null @@ -1,10 +0,0 @@ -<zodb_db %(storage-name)s> - cache-size %(zope-cache-size)s - mount-point %(mount-point)s - <zeoclient> - cache-size %(zeo-cache-size)s - server %(server)s - storage %(storage-name)s - name %(storage-name)s - </zeoclient> -</zodb_db> diff --git a/slapos/recipe/haproxy/__init__.py b/slapos/recipe/haproxy/__init__.py deleted file mode 100644 index ac7a06433..000000000 --- a/slapos/recipe/haproxy/__init__.py +++ /dev/null @@ -1,101 +0,0 @@ -############################################################################## -# -# Copyright (c) 2011 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 - -class Recipe(GenericBaseRecipe): - """ - haproxy instance configuration. - - name -- local name of the haproxy - - wrapper-path -- location of the init script to generate - - binary-path -- location of the haproxy command - - conf-path -- location of the configuration file - - ip -- ip of the haproxy server - - port -- port of the haproxy server - - server-check-path -- path of the domain to check - - address -- string with list of all url to check - Example: 127.0.0.1:12004 127.0.0.1:12005 - """ - - def install(self): - # inter must be quite short in order to detect quickly an unresponsive node - # and to detect quickly a node which is back - # rise must be minimal possible : 1, indeed, a node which is back don't need - # to sleep more time and we can give him work immediately - # fall should be quite sort. with inter at 3, and fall at 2, a node will be - # considered as dead after 6 seconds. - # maxconn should be set as the maximum thread we have per zope, like this - # haproxy will manage the queue of request with the possibility to - # move a request to another node if the initially selected one is dead - # maxqueue is the number of waiting request in the queue of every zope client. - # It allows to make sure that there is not a zope client handling all - # the work while other clients are doing nothing. This was happening - # even thoug we have round robin distribution because when a node dies - # some seconds, all request are dispatched to other nodes, and then users - # stick in other nodes and are not coming back. Please note this option - # is not an issue if you have more than (maxqueue * node_quantity) requests - # because haproxy will handle a top-level queue - - snippet_filename = self.getTemplateFilename( - 'haproxy-server-snippet.cfg.in') - # Prepare all filestorages - server_snippet = "" - i = 0 - name = self.options['name'] - for address in self.options['backend-list'].split(): - i += 1 - server_snippet += self.substituteTemplate( - snippet_filename, dict( - name='%s_%s' % (name, i), - address=address, - cluster_zope_thread_amount=self.options['maxconn'])) - - config = dict( - name=name, - ip=self.options['ip'], - port=self.options['port'], - server_text=server_snippet, - server_check_path=self.options['server-check-path'],) - template_filename = self.getTemplateFilename('haproxy.cfg.in') - configuration_path = self.createFile( - self.options['conf-path'], - self.substituteTemplate(template_filename, config)) - - # Create running wrapper - wrapper_path = self.createPythonScript( - self.options['wrapper-path'], - 'slapos.recipe.librecipe.execute.execute', - arguments=[self.options['binary-path'].strip(), '-f', configuration_path],) - - return [configuration_path, wrapper_path] diff --git a/slapos/recipe/haproxy/template/haproxy-server-snippet.cfg.in b/slapos/recipe/haproxy/template/haproxy-server-snippet.cfg.in deleted file mode 100644 index 28f24a06d..000000000 --- a/slapos/recipe/haproxy/template/haproxy-server-snippet.cfg.in +++ /dev/null @@ -1,2 +0,0 @@ - server %(name)s %(address)s cookie %(name)s check inter 3s rise 1 fall 2 maxqueue 5 maxconn %(cluster_zope_thread_amount)s - diff --git a/slapos/recipe/publish.py b/slapos/recipe/helloworld.py similarity index 76% rename from slapos/recipe/publish.py rename to slapos/recipe/helloworld.py index d3813047a..743f242e9 100644 --- a/slapos/recipe/publish.py +++ b/slapos/recipe/helloworld.py @@ -24,17 +24,21 @@ # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. # ############################################################################## -import zc.buildout +from slapos.recipe.librecipe import BaseSlapRecipe -from slapos.recipe.librecipe import GenericSlapRecipe +class Recipe(BaseSlapRecipe): -class Recipe(GenericSlapRecipe): def _install(self): - publish_dict = dict() - options = self.options.copy() - del options['recipe'] + parameter_dict = self.computer_partition.getInstanceParameterDict() + dummy_wrapper = self.createRunningWrapper('dummy', """#!/bin/sh +while [ true ] +do + sleep 10 + echo "Hello World!" +done""") - for k, v in options.iteritems(): - publish_dict[k] = v - self.setConnectionDict(publish_dict) - return [] + self.computer_partition.setConnectionDict(dict( + hello_world="Hello World!", + )) + return [dummy_wrapper] + \ No newline at end of file diff --git a/slapos/recipe/java.py b/slapos/recipe/java.py new file mode 100644 index 000000000..bcd605f82 --- /dev/null +++ b/slapos/recipe/java.py @@ -0,0 +1,120 @@ +import logging +import os +import shutil +import zc.buildout.easy_install +import zc.buildout.download +from platform import uname +import subprocess + +JAVA_URLS = { + 'x86': "http://javadl.sun.com/webapps/download/AutoDL?BundleId=48334", + 'x86-64': "http://javadl.sun.com/webapps/download/AutoDL?BundleId=48338" +} +# See http://java.com/en/download/manual.jsp + +ARCH_MAP = { + 'i386': 'x86', + 'i586': 'x86', + 'i686': 'x86', + 'x86_64': 'x86-64' +} + +ARCH_DIR_MAP = { + 'x86':'x86', + 'x86-64': 'x86_64' +} + +class Recipe(object): + def __init__(self, buildout, name, options): + self.buildout = buildout + self.name = name + self.options = options + self.logger = logging.getLogger(self.name) + + options['location'] = os.path.join( + buildout['buildout']['parts-directory'], + self.name) + options.setdefault('cpio', 'cpio') + options.setdefault('tmp-storage', options['location'] + '__unpack__') + if not options.get('download-url'): + options.setdefault('platform', self._guessPackagePlatform()) + options.setdefault( + 'flavour', + 'oracle-jdk') # or 'openjdk' + if options['flavour'] == 'openjdk': + raise Exception('OpenJDK is not yet supported.') + else: + options['download-url'] = JAVA_URLS[options['platform']] + + def _guessPackagePlatform(self): + arch = uname()[-2] + target = ARCH_MAP.get(arch) + assert target, 'Unknown architecture' + return target + + def install(self): + location = self.options['location'] + if os.path.exists(location): + return location + storage = self.options['tmp-storage'] + + download_file, is_temp = self.download() + + self.extract(storage, download_file) + self.copy(storage) + shutil.rmtree(storage) + return [location,] + + def download(self): + """Download tarball. Caching if required. + """ + url = self.options['download-url'] + namespace = self.options['recipe'] + download = zc.buildout.download.Download(self.buildout['buildout'], + namespace=namespace, + logger=self.logger) + return download(url) + + def extract(self, storage, download_file): + # Creates parts/java__something temp dir + if os.path.exists(storage): + shutil.rmtree(storage) + os.mkdir(storage) + os.chdir(storage) + # Move downloaded file into temp dir + (download_dir, filename) = os.path.split(download_file) + auto_extract_bin = os.path.join(storage, filename) + shutil.move(download_file, auto_extract_bin) + # Run auto-extract bin file + os.chmod(auto_extract_bin, 0777) + subprocess.call([auto_extract_bin]) + + def copy(self, storage): + """Copy java installation into parts directory. + """ + location = self.options['location'] + if os.path.exists(location): + self.logger.info('No need to re-install java part') + return False + self.logger.info("Copying unpacked contents") + java_dir = '' + for java_dir in ('java', 'jre1.6.0_25'): + if os.path.isdir(os.path.join(storage, java_dir)): + break + assert java_dir, 'Java directory seems missing.' + ignore_dir_list = [] + if 'ignore' in shutil.copytree.func_code.co_varnames: + shutil.copytree(os.path.join(storage, java_dir), + location, + ignore=lambda src,names:ignore_dir_list) + else: + shutil.copytree(os.path.join(storage, java_dir), + location) + for ignore_dir in ignore_dir_list: + ignore_dir = os.path.join(location, ignore_dir) + if os.path.exists(ignore_dir): + shutil.rmtree(ignore_dir) + return True + + def update(self): + pass diff --git a/slapos/recipe/kvm/__init__.py b/slapos/recipe/kvm/__init__.py index e4d568856..40c123135 100644 --- a/slapos/recipe/kvm/__init__.py +++ b/slapos/recipe/kvm/__init__.py @@ -59,8 +59,7 @@ class Recipe(BaseSlapRecipe): # Install the socket_connection_attempt script catcher = zc.buildout.easy_install.scripts( - [('check_port_listening', 'slapos.recipe.kvm.socket_connection_attempt', - 'connection_attempt')], + [('check_port_listening', __name__ + 'socket_connection_attempt', 'connection_attempt')], self.ws, sys.executable, self.bin_directory, @@ -85,11 +84,11 @@ class Recipe(BaseSlapRecipe): self.linkBinary() self.computer_partition.setConnectionDict(dict( - url = "https://[%s]:%s/vnc_auto.html?host=[%s]&port=%s&encrypt=1" % ( - noVNC_conf['source_ip'], - noVNC_conf['source_port'], - noVNC_conf['source_ip'], - noVNC_conf['source_port']), + url = "https://[%s]:%s/vnc.html?host=[%s]&port=%s&encrypt=1" % (noVNC_conf['source_ip'], + noVNC_conf['source_port'], + noVNC_conf['source_ip'], + noVNC_conf['source_port'] + ), password = kvm_conf['vnc_passwd'])) return self.path_list @@ -156,8 +155,7 @@ class Recipe(BaseSlapRecipe): # Instanciate KVM kvm_template_location = pkg_resources.resource_filename( - __name__, os.path.join( - 'template', 'kvm_run.in')) + __name__, 'template/kvm_run.in') kvm_runner_path = self.createRunningWrapper("kvm", self.substituteTemplate(kvm_template_location, @@ -167,9 +165,7 @@ class Recipe(BaseSlapRecipe): # Instanciate KVM controller kvm_controller_template_location = pkg_resources.resource_filename( - __name__, os.path.join( - 'template', - 'kvm_controller_run.in' )) + __name__, 'template/kvm_controller_run.in') kvm_controller_runner_path = self.createRunningWrapper("kvm_controller", self.substituteTemplate(kvm_controller_template_location, @@ -209,24 +205,34 @@ class Recipe(BaseSlapRecipe): """ noVNC_conf = {} - + noVNC_conf['source_ip'] = source_ip noVNC_conf['source_port'] = source_port - - execute_arguments = [[ - self.options['websockify'].strip(), - '--web', - self.options['noVNC_location'], - '--key=%s' % (self.key_path), - '--cert=%s' % (self.certificate_path), - '--ssl-only', - '%s:%s' % (source_ip, source_port), - '%s:%s' % (target_ip, target_port)], - [self.certificate_path, self.key_path]] - - self.path_list.extend(zc.buildout.easy_install.scripts([('websockify', - 'slapos.recipe.librecipe.execute', 'execute_wait')], self.ws, sys.executable, - self.wrapper_directory, arguments=execute_arguments)) + + # Install numpy. + # XXX-Cedric : this looks like a hack. Do we have better solution, knowing + # That websockify is not an egg? + numpy = zc.buildout.easy_install.install(['numpy'], self.options['eggs-directory']) + environment = dict(PYTHONPATH='%s' % numpy.entries[0]) + + # Instanciate Websockify + websockify_runner_path = zc.buildout.easy_install.scripts([('websockify', + 'slapos.recipe.librecipe.execute', 'executee_wait')], self.ws, + sys.executable, self.wrapper_directory, arguments=[ + [sys.executable.strip(), + self.options['websockify_path'], + '--web', + self.options['noVNC_location'], + '--key=%s' % (self.key_path), + '--cert=%s' % (self.certificate_path), + '--ssl-only', + '%s:%s' % (source_ip, source_port), + '%s:%s' % (target_ip, target_port)], + [self.certificate_path, self.key_path], + environment] + )[0] + + self.path_list.append(websockify_runner_path) # Add noVNC promise self.port_listening_promise_conf.update(hostname=noVNC_conf['source_ip'], diff --git a/slapos/recipe/kvm/certificate_authority.py b/slapos/recipe/kvm/certificate_authority.py index d05a46064..8caffc0c2 100755 --- a/slapos/recipe/kvm/certificate_authority.py +++ b/slapos/recipe/kvm/certificate_authority.py @@ -2,7 +2,6 @@ import os import subprocess import time import ConfigParser -import uuid def popenCommunicate(command_list, input=None): @@ -43,10 +42,9 @@ class CertificateAuthority: try: # no CA, let us create new one popenCommunicate([self.openssl_binary, 'req', '-nodes', '-config', - self.openssl_configuration, '-new', '-x509', '-extensions', 'v3_ca', - '-keyout', self.key, '-out', self.certificate, '-days', '10950'], - # Authority name will be random, so no instance has the same issuer - 'Certificate Authority %s\n' % uuid.uuid1()) + self.openssl_configuration, '-new', '-x509', '-extensions', + 'v3_ca', '-keyout', self.key, '-out', self.certificate, + '-days', '10950'], 'Automatic Certificate Authority\n') except: try: for f in file_list: diff --git a/slapos/recipe/lamp/__init__.py b/slapos/recipe/lamp/__init__.py index 55ae815bc..64af43341 100644 --- a/slapos/recipe/lamp/__init__.py +++ b/slapos/recipe/lamp/__init__.py @@ -127,11 +127,9 @@ class BaseRecipe(BaseSlapRecipe): self.substituteTemplate(pkg_resources.resource_filename(__name__, 'template/apache.in'), apache_config)) self.path_list.append(config_file) - php_ini = pkg_resources.resource_filename(__name__, 'template/php.ini.in') - if self.options.has_key('php_ini'): - php_ini = os.path.join(self.options['php_ini'], 'php.ini.in') self.path_list.append(self.createConfigurationFile('php.ini', - self.substituteTemplate(php_ini, dict(tmp_directory=self.tmp_directory)))) + self.substituteTemplate(pkg_resources.resource_filename(__name__, + 'template/php.ini.in'), dict(tmp_directory=self.tmp_directory)))) self.path_list.extend(zc.buildout.easy_install.scripts([( 'httpd', __name__ + '.apache', 'runApache')], self.ws, @@ -155,23 +153,23 @@ class BaseRecipe(BaseSlapRecipe): destination = os.path.join(path, file) open(destination, 'w').write(open(template, 'r').read() % d) - def configureInstallation(self, document_root, url, mysql_conf): + def configureInstallation(self, document_root, mysql_conf, url): """Start process which can launch python scripts, move or remove files or directories when installing software. """ if not self.options.has_key('delete') and not self.options.has_key('rename') and not\ self.options.has_key('chmod') and not self.options.has_key('script'): - return "" + return delete = [] chmod = [] data = [] rename = [] rename_list = "" - argument = [self.options['lampconfigure_directory'].strip(), - "-H", mysql_conf['mysql_host'], "-P", mysql_conf['mysql_port'], - "-p", mysql_conf['mysql_password'], "-u", mysql_conf['mysql_user']] + argument = [self.options['lampconfigure_directory'].strip()] if not self.options.has_key('file_token'): argument = argument + ["-d", mysql_conf['mysql_database'], + "-H", mysql_conf['mysql_host'], "-P", mysql_conf['mysql_port'], + "-p", mysql_conf['mysql_password'], "-u", mysql_conf['mysql_user'], "--table", self.options['table_name'].strip(), "--cond", self.options['constraint'].strip()] else: @@ -195,9 +193,9 @@ class BaseRecipe(BaseSlapRecipe): if self.options.has_key('rename_chmod'): cmd += ["--chmod", self.options['rename_chmod'].strip()] rename.append(cmd + [fname[0].strip(), fname[1].strip()]) - rename_list += fname[0] + " to " + fname[1] + " " + rename_list += fname[0] + "=>" + fname[1] + " " if self.options.has_key('chmod'): - chmod = ["chmod", self.options['mode'].strip()] + chmod = ["chmod ", self.options['mode'].strip()] for fname in self.options['chmod'].split(','): chmod.append(fname.strip()) if self.options.has_key('script') and \ @@ -227,14 +225,12 @@ class Simple(BaseRecipe): self.createHtdocs(self.options['source'].strip(), document_root) mysql_conf = self.installMysqlServer() url = self.installApache(document_root) - renamed = self.configureInstallation(document_root, url, mysql_conf) - connectionDict = dict( - url=url, + renamed = self.configureInstallation(document_root, mysql_conf, url) + self.setConnectionDict(dict( + url=url, + rename=renamed, **mysql_conf - ) - if not renamed == "": - connectionDict['rename'] = renamed - self.setConnectionDict(connectionDict) + )) if self.options.has_key('template') and self.options.has_key('configuration'): self.createConfiguration(self.options['template'], document_root, self.options['configuration'], mysql_conf) diff --git a/slapos/recipe/lamp/template/my.cnf.in b/slapos/recipe/lamp/template/my.cnf.in index 00eb28023..043fb3ad5 100644 --- a/slapos/recipe/lamp/template/my.cnf.in +++ b/slapos/recipe/lamp/template/my.cnf.in @@ -15,13 +15,12 @@ socket = %(socket)s datadir = %(data_directory)s pid-file = %(pid_file)s log-error = %(error_log)s -slow_query_log -slow_query_log_file = %(slow_query_log)s +log-slow-file = %(slow_query_log)s long_query_time = 5 max_allowed_packet = 128M query_cache_size = 32M -plugin-load = ha_groonga.so;ha_sphinx.so +plugin-load = ha_innodb_plugin.so # The following are important to configure and depend a lot on to the size of # your database and the available resources. diff --git a/slapos/recipe/librecipe/__init__.py b/slapos/recipe/librecipe/__init__.py index 9d3fea2e5..9a892bf0d 100644 --- a/slapos/recipe/librecipe/__init__.py +++ b/slapos/recipe/librecipe/__init__.py @@ -39,7 +39,6 @@ import urlparse # Use to do from slapos.recipe.librecipe import GenericBaseRecipe from generic import GenericBaseRecipe from genericslap import GenericSlapRecipe -from filehash import filehash class BaseSlapRecipe: """Base class for all slap.recipe.*""" diff --git a/slapos/recipe/librecipe/execute.py b/slapos/recipe/librecipe/execute.py index c28648afa..d9e04caaf 100644 --- a/slapos/recipe/librecipe/execute.py +++ b/slapos/recipe/librecipe/execute.py @@ -4,46 +4,6 @@ import signal import subprocess import time -import inotifyx - -def _wait_files_creation(file_list): - # Etablish a list of directory and subfiles - directories = dict() - for dirname, filename in [os.path.split(f) for f in file_list]: - directories.setdefault(dirname, dict()) - directories[dirname][filename] = False - - def all_files_exists(): - return all([all(files.values()) for files in directories.values()]) - - fd = inotifyx.init() - try: - # Watch every directories where the file are - watchdescriptors = dict() - for dirname in directories.keys(): - wd = inotifyx.add_watch(fd, - dirname, - inotifyx.IN_CREATE | inotifyx.IN_DELETE) - watchdescriptors[wd] = dirname - - # Set to True the file wich exists - for dirname, filename in [os.path.split(f) for f in file_list]: - directories[dirname][filename] = os.path.exists(os.path.join(dirname, - filename)) - # Let's wait for every file creation - while not all_files_exists(): - events_list = inotifyx.get_events(fd) - for event in events_list: - dirname = watchdescriptors[event.wd] - if event.name in directories[dirname]: - # One of watched file was created or deleted - if event.mask & inotifyx.IN_DELETE: - directories[dirname][event.name] = False - else: - directories[dirname][event.name] = True - - finally: - os.close(fd) def execute(args): """Portable execution with process replacement""" @@ -54,7 +14,18 @@ def execute_wait(args): """Execution but after all files in args[1] exists""" exec_list = list(args[0]) file_list = list(args[1]) - _wait_files_creation(file_list) + sleep = 60 + while True: + ready = True + for f in file_list: + if not os.path.exists(f): + print 'File %r does not exists, sleeping for %s' % (f, sleep) + ready = False + if ready: + break + # XXX: It's the same as ../ca/certificate_authoritiy.py + # We should use pyinotify as well. Or select() on socket. + time.sleep(sleep) os.execv(exec_list[0], exec_list + sys.argv[1:]) @@ -78,7 +49,16 @@ def executee_wait(args): env = os.environ.copy() for k,v in environment.iteritems(): env[k] = v - _wait_files_creation(file_list) + sleep = 60 + while True: + ready = True + for f in file_list: + if not os.path.exists(f): + print 'File %r does not exists, sleeping for %s' % (f, sleep) + ready = False + if ready: + break + time.sleep(sleep) os.execve(exec_list[0], exec_list + sys.argv[1:], env) def sig_handler(signal, frame): diff --git a/slapos/recipe/librecipe/filehash.py b/slapos/recipe/librecipe/filehash.py deleted file mode 100644 index c6fb270e9..000000000 --- a/slapos/recipe/librecipe/filehash.py +++ /dev/null @@ -1,96 +0,0 @@ -############################################################################## -# -# 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 hashlib -import shutil -import os - -DEFAULT_HASH = 'sha512' - -class Hash(object): - - def __init__(self, name): - self._hash = hashlib.new(name) - - def write(self, data): - self._hash.update(data) - - def read(self): - return self._hash.hexdigest() - -def filehash(filename, type_=DEFAULT_HASH): - if not os.path.isfile(filename): - raise ValueError("%r isn't a file" % filename) - - digest = Hash(type_) - with open(filename, 'r') as file_: - shutil.copyfileobj(file_, digest) - return digest.read() - -# Home made hashdeep <http://md5deep.sourceforge.net/> -def dirhash(dirname, type_=DEFAULT_HASH): - """Walk into a directory an return a unique hash for - the directory structure and its files content.""" - - if not os.path.isdir(dirname): - raise ValueError("%r isn't a directory" % dirname) - - digest = Hash(type_) - - # List the directory structure - path_list = [] - for dirname, dirlist, filelist in os.walk(dirname, followlinks=False): - for filename in filelist: - path_list.append(os.path.join(dirname, filename)) - path_list.sort() - - for path in path_list: - # Change the hash even if the file or the directory is empty - digest.write(path) - - # Update the hash with file content - if os.path.isfile(path): - with open(path, 'r') as file_: - shutil.copyfileobj(file_, digest) - - return digest.read() - -def pathhash(path, type_=DEFAULT_HASH): - if os.path.isdir(path): - return dirhash(path, type_) - elif os.path.isfile(path): - return filehash(path, type_) - raise ValueError("%r isn't a directory nor a file" % path) - -# you can use python -m slapos.recipe.librecipe.filehash [hash] path -if __name__ == '__main__': - import sys - if len(sys.argv) == 1: - raise ValueError("Not enough command line arguments") - if len(sys.argv) == 2: - print sys.argv[1], '-', pathhash(sys.argv[1]) - else: - print sys.argv[2], '-', pathhash(sys.argv[2], sys.argv[1]) diff --git a/slapos/recipe/librecipe/generic.py b/slapos/recipe/librecipe/generic.py index 86829c378..a203ce9b4 100644 --- a/slapos/recipe/librecipe/generic.py +++ b/slapos/recipe/librecipe/generic.py @@ -28,9 +28,6 @@ import logging import os import sys import inspect -import re -import urllib -import urlparse import pkg_resources import zc.buildout @@ -42,12 +39,11 @@ class GenericBaseRecipe(object): def __init__(self, buildout, name, options): """Recipe initialisation""" self.name = name + self.options = options self.buildout = buildout self.logger = logging.getLogger(name) - self.options = options.copy() # If _options use self.optionIsTrue self._options(options) # Options Hook - self.options = options.copy() # Updated options dict self._ws = self.getWorkingSet() @@ -102,17 +98,9 @@ class GenericBaseRecipe(object): path, arguments=arguments)[0] return script - def createDirectory(self, parent, name, mode=0700): - path = os.path.join(parent, name) - if not os.path.exists(path): - os.mkdir(path, mode) - elif not os.path.isdir(path): - raise OSError("%r exists but is not a directory." % name) - return path - def substituteTemplate(self, template_location, mapping_dict): """Read from file template_location an substitute content with - mapping_dict doing a dummy python format.""" + mapping_dict douing a dummy python format.""" with open(template_location, 'r') as template: return template.read() % mapping_dict @@ -132,38 +120,4 @@ class GenericBaseRecipe(object): return str(value).lower() in GenericBaseRecipe.TRUE_VALUES def optionIsTrue(self, optionname, default=None): - if default is not None and optionname not in self.options: - return default return self.isTrueValue(self.options[optionname]) - - def unparseUrl(self, scheme, host, path='', params='', query='', - fragment='', port=None, auth=None): - """Join a url with auth, host, and port. - - * auth can be either a login string or a tuple (login, password). - * if the host is an ipv6 address, brackets will be added to surround it. - - """ - # XXX-Antoine: I didn't find any standard module to join an url with - # login, password, ipv6 host and port. - # So instead of copy and past in every recipe I factorized it right here. - netloc = '' - if auth is not None: - auth = tuple(auth) - netloc = urllib.quote(str(auth[0])) # Login - if len(auth) > 1: - netloc += ':%s' % urllib.quote(auth[1]) # Password - netloc += '@' - - # host is an ipv6 address whithout brackets - if ':' in host and not re.match(r'^\[.*\]$', host): - netloc += '[%s]' % host - else: - netloc += str(host) - - if port is not None: - netloc += ':%s' % port - - url = urlparse.urlunparse((scheme, netloc, path, params, query, fragment)) - - return url diff --git a/slapos/recipe/librecipe/genericslap.py b/slapos/recipe/librecipe/genericslap.py index a4525b7ce..0181a0da6 100644 --- a/slapos/recipe/librecipe/genericslap.py +++ b/slapos/recipe/librecipe/genericslap.py @@ -24,17 +24,23 @@ # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. # ############################################################################## +import logging from slapos import slap +import zc.buildout +import zc.recipe.egg import time +import re +import urlparse -from generic import GenericBaseRecipe - -class GenericSlapRecipe(GenericBaseRecipe): +class GenericSlapRecipe(object): """Base class for all slap.recipe.*""" def __init__(self, buildout, name, options): """Default initialisation""" - GenericBaseRecipe.__init__(self, buildout, name, options) + self.name = name + options['eggs'] = 'slapos.cookbook' + self.options = options + self.logger = logging.getLogger(self.name) self.slap = slap.slap() # SLAP related information @@ -46,6 +52,21 @@ class GenericSlapRecipe(GenericBaseRecipe): self.key_file = slap_connection.get('key-file') self.cert_file = slap_connection.get('cert-file') + # setup egg to give possibility to generate scripts + self.egg = zc.recipe.egg.Egg(buildout, options['recipe'], options) + + # Hook options + self._options(options) + + # setup auto uninstall/install + self._setupAutoInstallUninstall() + + def _setupAutoInstallUninstall(self): + """By default SlapOS recipes are reinstalled each time""" + # Note: It is possible to create in future subclass which will do no-op in + # this method + self.options['slapos-timestamp'] = str(time.time()) + def install(self): self.slap.initializeConnection(self.server_url, self.key_file, self.cert_file) @@ -67,6 +88,42 @@ class GenericSlapRecipe(GenericBaseRecipe): """Hook which shall be implemented in children class""" raise NotImplementedError('Shall be implemented by subclass') + def _options(self, options): + """Hook which can be implemented in children class""" + pass + def setConnectionUrl(self, *args, **kwargs): - url = self.unparseUrl(*args, **kwargs) + url = self._unparseUrl(*args, **kwargs) self.setConnectionDict(dict(url=url)) + + def _unparseUrl(self, scheme, host, path='', params='', query='', + fragment='', port=None, auth=None): + """Join a url with auth, host, and port. + + * auth can be either a login string or a tuple (login, password). + * if the host is an ipv6 address, brackets will be added to surround it. + + """ + # XXX-Antoine: I didn't find any standard module to join an url with + # login, password, ipv6 host and port. + # So instead of copy and past in every recipe I factorized it right here. + netloc = '' + if auth is not None: + auth = tuple(auth) + netloc = str(auth[0]) # Login + if len(auth) > 1: + netloc += ':%s' % auth[1] # Password + netloc += '@' + + # host is an ipv6 address whithout brackets + if ':' in host and not re.match(r'^\[.*\]$', host): + netloc += '[%s]' % host + else: + netloc += str(host) + + if port is not None: + netloc += ':%s' % port + + url = urlparse.urlunparse((scheme, netloc, path, params, query, fragment)) + + return url diff --git a/slapos/recipe/librecipe/inotify.py b/slapos/recipe/librecipe/inotify.py deleted file mode 100644 index 3448ab7d3..000000000 --- a/slapos/recipe/librecipe/inotify.py +++ /dev/null @@ -1,51 +0,0 @@ -############################################################################## -# -# 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 inotifyx - -def subfiles(directory): - """Return the list of subfiles of a directory, and wait for the newly created - ones. - - CAUTION : *DONT TRY TO CONVERT THE RESULT OF THIS FUNCTION INTO A LIST ! - ALWAYS ITERATE OVER IT !!!*""" - watchfd = inotifyx.init() - inotifyx.add_watch(watchfd, directory, inotifyx.IN_CREATE) - try: - - subfiles = set(os.listdir(directory)) - subfiles |= set([file_.name for file_ in inotifyx.get_events(watchfd, 0)]) - - while True: - for file_ in subfiles: - yield os.path.join(directory, file_) - - subfiles = [file_.name for file_ in inotifyx.get_events(watchfd)] - - finally: - os.close(watchfd) diff --git a/slapos/recipe/lockfile.py b/slapos/recipe/lockfile.py deleted file mode 100644 index b27975f50..000000000 --- a/slapos/recipe/lockfile.py +++ /dev/null @@ -1,90 +0,0 @@ -############################################################################## -# -# 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 -import subprocess - -import inotifyx - -from slapos.recipe.librecipe import GenericBaseRecipe - -class LockFile(object): - - class LockException(Exception): - pass - - def __init__(self, filename, wait=True, exit=False): - self.filename = filename - if wait: - self.callback = lambda: self.waitDeletion() - elif not exit: - self.callback = lambda: self.raiseException() - else: - self.callback = lambda: sys.exit(1) - - def raiseException(self): - raise LockFile.LockException("Not able to lock the file") - - def waitDeletion(self): - inotify_fd = inotifyx.init() - try: - inotifyx.add_watch(inotify_fd, self.filename, inotifyx.IN_DELETE) - inotifyx.get_events(inotify_fd) - except IOError: # add_watch failed - pass - finally: - os.close(inotify_fd) - - self.__enter__() - - def __enter__(self): - try: - # Atomic file acquisition - self._fd = os.open(self.filename, os.O_CREAT | os.O_EXCL) - except OSError: - self.callback() - - def __exit__(self, exc_type, exc_value, traceback): - os.close(self._fd) - os.unlink(self.filename) - -def locked_run(args): - with LockFile(args['filename'], wait=args['wait'], exit=True): - subprocess.check_call([args['binary']]) - -class Recipe(GenericBaseRecipe): - - def install(self): - wrapper = self.createPythonScript(self.options['wrapper'], - __name__ + '.locked_run', - dict( - filename=self.options['lock-file'], - wait=self.optionIsTrue('wait', False), - binary=self.options['binary'], - ) - ) - return [wrapper] diff --git a/slapos/recipe/logrotate.py b/slapos/recipe/logrotate.py index 42959a1c0..9551952d8 100644 --- a/slapos/recipe/logrotate.py +++ b/slapos/recipe/logrotate.py @@ -30,55 +30,87 @@ from slapos.recipe.librecipe import GenericBaseRecipe class Recipe(GenericBaseRecipe): + def _options(self, options): + if 'name' not in options: + options['name'] = self.name + def install(self): + path_list = [] + logrotate_backup = self.options['backup'] logrotate_d = self.options['logrotate-entries'] logrotate_conf_file = self.options['conf'] - logrotate_conf = [ - 'daily', - 'dateext', - 'rotate 3650', - 'compress', - 'compresscmd %s' % self.options['gzip-binary'], - 'compressoptions -9', - 'uncompresscmd %s' % self.options['gunzip-binary'], - 'notifempty', - 'sharedscripts', - 'create', - 'include %s' % logrotate_d, - 'olddir %s' % logrotate_backup, - ] - - logrotate_conf_file = self.createFile(logrotate_conf_file, - '\n'.join(logrotate_conf)) + logrotate_conf = [] + logrotate_conf.append("include %s" % logrotate_d) + logrotate_conf.append("olddir %s" % logrotate_backup) + logrotate_conf.append("dateext") + + frequency = 'daily' + if 'frequency' in self.options: + frequency = self.options['frequency'] + logrotate_conf.append(frequency) + + num_rotate = 30 + if 'num-rotate' in self.options: + num_rotate = self.options['num-rotate'] + logrotate_conf.append("rotate %s" % num_rotate) + + logrotate_conf.append("compress") + logrotate_conf.append("compresscmd %s" % self.options['gzip-binary']) + logrotate_conf.append("compressoptions -9") + logrotate_conf.append("uncompresscmd %s" % self.options['gunzip-binary']) + + logrotate_conf_file = self.createFile(logrotate_conf_file, '\n'.join(logrotate_conf)) + logrotate_conf.append(logrotate_conf_file) state_file = self.options['state-file'] logrotate = self.createPythonScript( self.options['wrapper'], - 'slapos.recipe.librecipe.execute.execute', + 'slapos.recipe.librecipe.exceute.execute', [self.options['logrotate-binary'], '-s', state_file, logrotate_conf_file, ] ) + path_list.append(logrotate) - return [logrotate, logrotate_conf_file] + return path_list class Part(GenericBaseRecipe): + def _options(self, options): + if 'name' not in options: + options['name'] = self.name + def install(self): logrotate_d = self.options['logrotate-entries'] + part_path = os.path.join(logrotate_d, self.options['name']) + conf = [] + if 'frequency' in self.options: + conf.append(self.options['frequency']) + if 'num-rotate' in self.options: + conf.append('rotate %s' % self.options['num-rotate']) + if 'post' in self.options: conf.append("postrotate\n%s\nendscript" % self.options['post']) if 'pre' in self.options: conf.append("prerotate\n%s\nendscript" % self.options['pre']) + if self.optionIsTrue('sharedscripts', False): + conf.append("sharedscripts") + + if self.optionIsTrue('notifempty', False): + conf.append('notifempty') + + if self.optionIsTrue('create', True): + conf.append('create') + log = self.options['log'] - part_path = self.createFile(os.path.join(logrotate_d, self.options['name']), + self.createFile(os.path.join(logrotate_d, self.options['name']), "%(logfiles)s {\n%(conf)s\n}" % { 'logfiles': log, 'conf': '\n'.join(conf), diff --git a/slapos/recipe/mkdirectory.py b/slapos/recipe/mkdirectory.py index 2eebf5579..d715da3d5 100644 --- a/slapos/recipe/mkdirectory.py +++ b/slapos/recipe/mkdirectory.py @@ -42,7 +42,7 @@ class Recipe(GenericBaseRecipe): def install(self): - for directory in sorted(self.directory.values()): + for directory in self.directory.values(): path = directory if not os.path.exists(path): diff --git a/slapos/recipe/mydumper.py b/slapos/recipe/mydumper.py deleted file mode 100644 index 75dd3e2bc..000000000 --- a/slapos/recipe/mydumper.py +++ /dev/null @@ -1,112 +0,0 @@ -############################################################################## -# -# 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 subprocess - -from slapos.recipe.librecipe import GenericBaseRecipe - -def dump(args): - mydumper_cmd = [args['mydumper']] - mydumper_cmd.extend(['-B', args['database']]) - - if args['socket'] is not None: - mydumper_cmd.extend(['-S', args['socket']]) - else: - mydumper_cmd.extend(['-h', args['host']]) - mydumper_cmd.etxned(['-P', args['port']]) - - mydumper_cmd.extend(['-u', args['user']]) - if args['password'] is not None: - mydumper_cmd.extend(['-p', args['password']]) - - if args['compression']: - mydumper_cmd.append('--compress') - - if args['rows'] is not None: - mydumper_cmd.extend(['-r', args['rows']]) - - mydumper_cmd.extend(['-o', args['directory']]) - - subprocess.check_call(mydumper_cmd) - - - -def do_import(args): - mydumper_cmd = [args['mydumper']] - mydumper_cmd.extend(['-B', args['database']]) - - if args['socket'] is not None: - mydumper_cmd.extend(['-S', args['socket']]) - else: - mydumper_cmd.extend(['-h', args['host']]) - mydumper_cmd.etxned(['-P', args['port']]) - - mydumper_cmd.extend(['-u', args['user']]) - if args['password'] is not None: - mydumper_cmd.extend(['-p', args['password']]) - - mydumper_cmd.append('--overwrite-tables') - - mydumper_cmd.extend(['-d', args['directory']]) - - subprocess.check_call(mydumper_cmd) - - - -class Recipe(GenericBaseRecipe): - - def install(self): - # Host or socket should be defined - try: - self.options['host'] - except: - self.options['socket'] - - config = dict(database=self.options['database'], - socket=self.options.get('socket'), - host=self.options.get('host'), - port=self.options.get('port', 3306), - directory=self.options['backup-directory'], - user=self.options['user'], - password=self.options.get('password'), - ) - - name = __name__ - if self.optionIsTrue('import', False): - config.update(mydumper=self.options['myloader-binary']) - name += '.do_import' - else: - config.update(mydumper=self.options['mydumper-binary'], - compression=self.optionIsTrue('compression', default=False), - rows=self.options.get('rows'), - ) - name += '.dump' - - wrapper = self.createPythonScript(self.options['wrapper'], - name, - config) - - return [wrapper] diff --git a/slapos/recipe/mysql/__init__.py b/slapos/recipe/mysql/__init__.py index 14f28c26d..14c63140f 100644 --- a/slapos/recipe/mysql/__init__.py +++ b/slapos/recipe/mysql/__init__.py @@ -24,12 +24,8 @@ # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. # ############################################################################## -import os -import sys -import subprocess - from slapos.recipe.librecipe import GenericBaseRecipe -from slapos.recipe.librecipe import filehash +import os class Recipe(GenericBaseRecipe): @@ -48,13 +44,11 @@ class Recipe(GenericBaseRecipe): pid_file=self.options['pid-file'], socket=self.options['socket'], error_log=self.options['error-log'], + slow_query_log=self.options['slow-query-log'], mysql_database=self.options['database'], mysql_user=self.options['user'], mysql_password=self.options['password'], ) - mysql_script_list.append(init_script) - mysql_script_list.append('EXIT') - mysql_script = '\n'.join(mysql_script_list) mysql_binary = self.options['mysql-binary'] socket = self.options['socket'], @@ -115,24 +109,36 @@ class Recipe(GenericBaseRecipe): path_list.append(mysqld) # backup configuration - if self.optionIsTrue('backup', default=False): - backup_script = self.createPythonScript( - self.options['backup-script'], - '%s.do_backup' % __name__, - dict( - mydumper_binary=self.options['mydumper-binary'], - database=mysql_conf['mysql_database'], - socket=mysql_conf['socket'], - backup_directory=self.options['backup-directory'] - ), - ) - path_list.append(backup_script) + mysqldump_binary = self.options['mysqldump-binary'] + backup_directory = self.options['backup-directory'] + pending_backup_dir = self.options['backup-pending-directory'] + dump_filename = self.options['dumpname'] + + mysqldump_cmd = [mysqldump_binary, + mysql_conf['mysql_database'], + '-u', 'root', + '-S', mysql_conf['socket'].strip(), + '--single-transaction', '--opt', + ] + dump_file = os.path.join(backup_directory, dump_filename) + tmpdump_file = os.path.join(pending_backup_dir, dump_filename) + backup_script = self.createPythonScript( + self.options['backup-script'], + '%s.backup.do_backup' % __name__, + { + 'mysqldump': mysqldump_cmd, + 'gzip': self.options['gzip-binary'], + 'tmpdump': tmpdump_file, + 'dumpfile': dump_file, + }, + ) + path_list.append(backup_script) # Recovering backup if self.optionIsTrue('recovering', default=False): recovering_script = self.createPythonScript( self.options['recovering-wrapper'], - '%s.import_dump' % __name__, + '%s.recover.import_remote_dump' % __name__, { 'lock_file': os.path.join(self.work_directory, 'import_done'), @@ -150,47 +156,3 @@ class Recipe(GenericBaseRecipe): return path_list - -# Replace zcat dump.sql.gz | mysql -def import_dump(args): - # Get data from kwargs - cache_file = args['cache_file'] - database = args['database'] - mysql_binary = args['mysql_binary'] - mysql_socket = args['mysql_socket'] - dump_file = args['dump_file'] - zcat_binary = args['zcat_binary'] - - sha512sum = filehash(dump_file) - with open(cache_file, 'r') as cache_fileobj: - last_sha512sum = cache_fileobj.read().strip() - - if sha512sum != last_sha512sum: - zcat = subprocess.Popen([zcat_binary, dump_file], stdout=subprocess.PIPE) - mysql = subprocess.Popen([mysql_binary, '--socket=%s' % mysql_socket, '-D', - database, '-u', 'root'], stdin=zcat.stdout) - zcat.stdout.close() - - returncode = mysql.wait() - - if returncode == 0: - with open(cache_file, 'w') as cache_fileobj: - cache_fileobj.write(sha512sum) - - sys.exit(returncode) - -def promise(args): - # This is not a dependency of slapos.cookbook, because it shall be runned - # in a python environment having mysql-python - import MySQLdb - - user = args['user'] - password = args['password'] - db = args['db'] - host = args['host'] - port = args['port'] - - db = MySQLdb.connect(host=host, port=port, user=user, passwd=password, - db=db) - cursor = db.cursor() - cursor.close() diff --git a/slapos/recipe/mysql/backup.py b/slapos/recipe/mysql/backup.py index 489f1a148..590771d6b 100644 --- a/slapos/recipe/mysql/backup.py +++ b/slapos/recipe/mysql/backup.py @@ -1,3 +1,25 @@ import subprocess import os +# Replace mysqldump | gzip > tmpdump && mv -f tmpdump dumpfile +def do_backup(kwargs): + mysqldump_cmd = kwargs['mysqldump'] + gzip_bin = kwargs['gzip'] + tmpdump = kwargs['tmpdump'] + dumpfile = kwargs['dumpfile'] + + # mysqldump | gzip > tmpdump + with open(tmpdump, 'w') as output: + mysqldump = subprocess.Popen(mysqldump_cmd, + stdout=subprocess.PIPE, + stderr=subprocess.STDOUT) + gzip = subprocess.Popen([gzip_bin], + stdin=mysqldump.stdout, + stdout=output, + stderr=subprocess.STDOUT) + mysqldump.stdout.close() + + if gzip.wait() != 0: + raise ValueError("Gzip return a non zero value.") + + os.rename(tmpdump, dumpfile) diff --git a/slapos/recipe/apache_frontend/certificate_authority.py b/slapos/recipe/mysql/certificate_authority.py old mode 100755 new mode 100644 similarity index 93% rename from slapos/recipe/apache_frontend/certificate_authority.py rename to slapos/recipe/mysql/certificate_authority.py index d05a46064..8caffc0c2 --- a/slapos/recipe/apache_frontend/certificate_authority.py +++ b/slapos/recipe/mysql/certificate_authority.py @@ -2,7 +2,6 @@ import os import subprocess import time import ConfigParser -import uuid def popenCommunicate(command_list, input=None): @@ -43,10 +42,9 @@ class CertificateAuthority: try: # no CA, let us create new one popenCommunicate([self.openssl_binary, 'req', '-nodes', '-config', - self.openssl_configuration, '-new', '-x509', '-extensions', 'v3_ca', - '-keyout', self.key, '-out', self.certificate, '-days', '10950'], - # Authority name will be random, so no instance has the same issuer - 'Certificate Authority %s\n' % uuid.uuid1()) + self.openssl_configuration, '-new', '-x509', '-extensions', + 'v3_ca', '-keyout', self.key, '-out', self.certificate, + '-days', '10950'], 'Automatic Certificate Authority\n') except: try: for f in file_list: diff --git a/slapos/recipe/pulse2/template/logrotate_entry.in b/slapos/recipe/mysql/template/logrotate_entry.in similarity index 100% rename from slapos/recipe/pulse2/template/logrotate_entry.in rename to slapos/recipe/mysql/template/logrotate_entry.in diff --git a/slapos/recipe/mysql/template/my.cnf.in b/slapos/recipe/mysql/template/my.cnf.in index f72db9244..82af0f3e0 100644 --- a/slapos/recipe/mysql/template/my.cnf.in +++ b/slapos/recipe/mysql/template/my.cnf.in @@ -15,11 +15,12 @@ socket = %(socket)s datadir = %(data_directory)s pid-file = %(pid_file)s log-error = %(error_log)s +#log-slow-file = %(slow_query_log)s long_query_time = 5 max_allowed_packet = 128M query_cache_size = 32M -plugin-load = ha_groonga.so;ha_sphinx.so +plugin-load = ha_innodb_plugin.so # The following are important to configure and depend a lot on to the size of # your database and the available resources. diff --git a/slapos/recipe/pulse2/template/openssl.cnf.ca.in b/slapos/recipe/mysql/template/openssl.cnf.ca.in similarity index 100% rename from slapos/recipe/pulse2/template/openssl.cnf.ca.in rename to slapos/recipe/mysql/template/openssl.cnf.ca.in diff --git a/slapos/recipe/pulse2/template/stunnel.conf.in b/slapos/recipe/mysql/template/stunnel.conf.in similarity index 100% rename from slapos/recipe/pulse2/template/stunnel.conf.in rename to slapos/recipe/mysql/template/stunnel.conf.in diff --git a/slapos/recipe/nosqltestbed/__init__.py b/slapos/recipe/nosqltestbed/__init__.py index 72d2e2b63..b8661a5e1 100644 --- a/slapos/recipe/nosqltestbed/__init__.py +++ b/slapos/recipe/nosqltestbed/__init__.py @@ -25,31 +25,202 @@ # ############################################################################## -import sys +import os +import urllib +import urllib2 import pkg_resources -from logging import Formatter from slapos.recipe.librecipe import BaseSlapRecipe class NoSQLTestBed(BaseSlapRecipe): def _install(self): self.parameter_dict = self.computer_partition.getInstanceParameterDict() - try: - entry_point = pkg_resources.iter_entry_points(group='slapos.recipe.nosqltestbed.plugin', - name=self.parameter_dict.get('plugin', 'kumo')).next() - plugin_class = entry_point.load() - - testbed = plugin_class() - except: - print Formatter().formatException(sys.exc_info()) - return None - software_type = self.parameter_dict.get('slap_software_type', 'default') if software_type is None or software_type == 'RootSoftwareInstance': - software_type = 'default' - if "run_%s" % software_type in dir(testbed) and \ - callable(getattr(testbed, "run_%s" % software_type)): - return getattr(testbed, "run_%s" % software_type)(self) + software_type = 'kumo_cloud' + if "run_%s" % software_type in dir(self) and \ + callable(getattr(self, "run_%s" % software_type)): + return getattr(self, "run_%s" % software_type)() else: raise NotImplementedError("Do not support %s" % software_type) + def run_kumo_cloud(self): + """ Deploy kumofs systeom on a cloud. """ + + kumo_cloud_config = {} + kumo_cloud_config.update(self.options) + kumo_cloud_config.update(self.parameter_dict) + + kumo_cloud_config['address'] = self.getGlobalIPv6Address() + kumo_cloud_config['report_path'] = self.log_directory + + if 'nb_server_max' not in kumo_cloud_config: + kumo_cloud_config['nb_server_max'] = 3 + + if 'nb_tester_max' not in kumo_cloud_config: + kumo_cloud_config['nb_tester_max'] = 3 + + if 'nb_thread' not in kumo_cloud_config: + kumo_cloud_config['nb_thread'] = 1 + + if 'nb_request' not in kumo_cloud_config: + kumo_cloud_config['nb_request'] = 1000 + + kumo_cloud_config['software_release_url'] = self.software_release_url + kumo_cloud_config['server_url'] = self.server_url + kumo_cloud_config['key_file'] = self.key_file + kumo_cloud_config['cert_file'] = self.cert_file + kumo_cloud_config['computer_id'] = self.computer_id + kumo_cloud_config['computer_partition_id'] = self.computer_partition_id + kumo_cloud_config['plugin_name'] = 'kumo' + + kumo_cloud_connection = {} + kumo_cloud_connection['url'] = "http://["+kumo_cloud_config['address']+"]:5000/" + self.computer_partition.setConnectionDict(kumo_cloud_connection) + + nosqltester_manager_wrapper_template_location = pkg_resources.resource_filename( + __name__, os.path.join( + 'template', 'kumotester_manager_run.in')) + nosqltester_manager_runner_path = self.createRunningWrapper("kumotester_manager", + self.substituteTemplate(nosqltester_manager_wrapper_template_location, kumo_cloud_config)) + + return [nosqltester_manager_runner_path] + + def run_all(self): + """ Runs all services on one machine. """ + all_config = {} + all_config.update(self.options) + + ipaddress = "[%s]" % self.getGlobalIPv6Address() + + all_config['manager_address'] = ipaddress + all_config['manager_port'] = 19700 + all_config['server_address'] = ipaddress + all_config['server_port'] = 19800 + all_config['server_listen_port'] = 19900 + all_config['server_storage'] = os.path.join(self.data_root_directory, "kumodb.tch") + all_config['gateway_address'] = ipaddress + all_config['gateway_port'] = 11411 + all_config['manager_log'] = os.path.join(self.log_directory, "kumo-manager.log") + all_config['server_log'] = os.path.join(self.log_directory, "kumo-server.log") + all_config['gateway_log'] = os.path.join(self.log_directory, "kumo-gateway.log") + + manager_wrapper_template_location = pkg_resources.resource_filename( + __name__, os.path.join( + 'template', 'kumo_manager_run.in')) + manager_runner_path = self.createRunningWrapper("kumo-manager", + self.substituteTemplate(manager_wrapper_template_location, all_config)) + server_wrapper_template_location = pkg_resources.resource_filename( + __name__, os.path.join( + 'template', 'kumo_server_run.in')) + server_runner_path = self.createRunningWrapper("kumo-server", + self.substituteTemplate(server_wrapper_template_location, all_config)) + gateway_wrapper_template_location = pkg_resources.resource_filename( + __name__, os.path.join( + 'template', 'kumo_gateway_run.in')) + gateway_runner_path = self.createRunningWrapper("kumo-gateway", + self.substituteTemplate(gateway_wrapper_template_location, all_config)) + + return [manager_runner_path, server_runner_path, gateway_runner_path] + + def run_kumo_manager(self, ipaddress=None): + """ Runs the kumofs manager. """ + manager_config = {} + manager_config.update(self.options) + + if ipaddress is None: + manager_config['manager_address'] = "[%s]" % self.getGlobalIPv6Address() + else: + manager_config['manager_address'] = ipaddress + + manager_config['manager_port'] = 19700 + manager_config['manager_log'] = os.path.join(self.log_directory, "kumo-manager.log") + + manager_connection = {} + manager_connection['address'] = manager_config['manager_address'] + manager_connection['port'] = manager_config['manager_port'] + self.computer_partition.setConnectionDict(manager_connection) + + manager_wrapper_template_location = pkg_resources.resource_filename( + __name__, os.path.join( + 'template', 'kumo_manager_run.in')) + manager_runner_path = self.createRunningWrapper("kumo-manager", + self.substituteTemplate(manager_wrapper_template_location, manager_config)) + + return [manager_runner_path] + + def run_kumo_server(self): + """ Runs the kumofs server. """ + server_config = {} + server_config.update(self.options) + server_config.update(self.parameter_dict) + + server_config['server_address'] = "[%s]" % self.getGlobalIPv6Address() + server_config['server_port'] = 19800 + server_config['server_listen_port'] = 19900 + server_config['server_storage'] = os.path.join(self.var_directory,"kumodb.tch") + server_config['server_log'] = os.path.join(self.log_directory, "kumo-server.log") + + server_connection = {} + server_connection['address'] = server_config['server_address'] + self.computer_partition.setConnectionDict(server_connection) + + server_wrapper_template_location = pkg_resources.resource_filename( + __name__, os.path.join( + 'template', 'kumo_server_run.in')) + server_runner_path = self.createRunningWrapper("kumo-server", + self.substituteTemplate(server_wrapper_template_location, server_config)) + + return [server_runner_path] + + def run_kumo_gateway(self): + """ Runs the kumofs gateway. """ + gateway_config = {} + gateway_config.update(self.options) + gateway_config.update(self.parameter_dict) + + gateway_config['gateway_address'] = "[%s]" % self.getGlobalIPv6Address() + gateway_config['gateway_port'] = 11411 + gateway_config['gateway_log'] = os.path.join(self.log_directory, "kumo-gateway.log") + + gateway_connection = {} + gateway_connection['address'] = gateway_config['gateway_address'] + gateway_connection['port'] = gateway_config['gateway_port'] + self.computer_partition.setConnectionDict(gateway_connection) + + gateway_wrapper_template_location = pkg_resources.resource_filename( + __name__, os.path.join( + 'template', 'kumo_gateway_run.in')) + gateway_runner_path = self.createRunningWrapper("kumo-gateway", + self.substituteTemplate(gateway_wrapper_template_location, gateway_config)) + + return [gateway_runner_path] + + def run_kumo_tester(self): + """ Runs the kumofs tester. """ + tester_config = {} + tester_config.update(self.options) + tester_config.update(self.parameter_dict) + + tester_config['tester_address'] = self.getGlobalIPv6Address() + # tester_config['url'] = "http://%s:5000/" % tester_config['tester_address'] + # tester_config['start_url'] = "http://%s:5000/start" % tester_config['tester_address'] + tester_config['report_path'] = self.log_directory + tester_config['binary'] = tester_config['memstrike_binary'] + " -l " + \ + tester_config['gateway_address'].strip("[]") + " -p " + \ + tester_config['gateway_port'] + " -t " + \ + tester_config['nb_thread'] + " " + \ + tester_config['nb_request'] #" 1000" " -t 32 1024000" + + tester_connection = {} + tester_connection['start_url'] = "http://%s:5000/start" % tester_config['tester_address'] + self.computer_partition.setConnectionDict(tester_connection) + + tester_wrapper_template_location = pkg_resources.resource_filename( + __name__, os.path.join( + 'template', 'nosqltester_run.in')) + tester_runner_path = self.createRunningWrapper("nosqltester", + self.substituteTemplate(tester_wrapper_template_location, tester_config)) + + return [tester_runner_path] + diff --git a/slapos/recipe/nosqltestbed/kumo/__init__.py b/slapos/recipe/nosqltestbed/kumo/__init__.py deleted file mode 100644 index 1d3f2cc4a..000000000 --- a/slapos/recipe/nosqltestbed/kumo/__init__.py +++ /dev/null @@ -1,288 +0,0 @@ -############################################################################## -# -# Copyright (c) 2011 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 pkg_resources -from logging import Formatter - -class KumoTestBed(object): - - def run_default(self, recipe): - run_kumo_cloud(recipe) - - def run_kumo_cloud(self, recipe): - """ Deploy kumofs system on a cloud. """ - - kumo_cloud_config = {} - kumo_cloud_config.update(recipe.options) - kumo_cloud_config.update(recipe.parameter_dict) - - kumo_cloud_config['address'] = recipe.getGlobalIPv6Address() - kumo_cloud_config['report_path'] = recipe.log_directory - - kumo_cloud_config.setdefault('max_server', 4) - kumo_cloud_config.setdefault('max_tester', 5) - kumo_cloud_config.setdefault('nb_thread', 32) - kumo_cloud_config.setdefault('nb_request', 1024000) - kumo_cloud_config.setdefault('erp5_publish_url', '') - kumo_cloud_config.setdefault('erp5_publish_project', '') - - computer_guid_list = [] - computer_guid_list.append("COMP-23") # manager - computer_guid_list.append("COMP-13") # server 1 - computer_guid_list.append("COMP-14") # server 2 - computer_guid_list.append("COMP-20") # server 3 - computer_guid_list.append("COMP-19") # server 4 - computer_guid_list.append("COMP-23") # tester 1 - computer_guid_list.append("COMP-22") # tester 2 - computer_guid_list.append("COMP-14") # tester 3 - computer_guid_list.append("COMP-20") # tester 4 - computer_guid_list.append("COMP-19") # tester 5 - - kumo_cloud_config.setdefault('computer_guid_list', ":".join(computer_guid_list)) - - kumo_cloud_config['software_release_url'] = recipe.software_release_url - kumo_cloud_config['server_url'] = recipe.server_url - kumo_cloud_config['key_file'] = recipe.key_file - kumo_cloud_config['cert_file'] = recipe.cert_file - kumo_cloud_config['computer_id'] = recipe.computer_id - kumo_cloud_config['computer_partition_id'] = recipe.computer_partition_id - kumo_cloud_config['plugin_name'] = 'kumo' - - kumo_cloud_connection = {} - kumo_cloud_connection['url'] = "http://["+kumo_cloud_config['address']+"]:5000/" - kumo_cloud_connection['computer_guid_list'] = kumo_cloud_config['computer_guid_list'] - recipe.computer_partition.setConnectionDict(kumo_cloud_connection) - - nosqltester_manager_wrapper_template_location = pkg_resources.resource_filename( - __name__, os.path.join( - 'template', 'kumotester_manager_run.in')) - nosqltester_manager_runner_path = recipe.createRunningWrapper("kumotester_manager", - recipe.substituteTemplate(nosqltester_manager_wrapper_template_location, kumo_cloud_config)) - - return [nosqltester_manager_runner_path] - - def run_all(self, recipe): - """ Run all services on one machine. """ - all_config = {} - all_config.update(recipe.options) - - ipaddress = "[%s]" % recipe.getGlobalIPv6Address() - - all_config['manager_address'] = ipaddress - all_config['manager_port'] = 19700 - all_config['server_address'] = ipaddress - all_config['server_port'] = 19800 - all_config['server_listen_port'] = 19900 - all_config['server_storage'] = os.path.join(recipe.data_root_directory, "kumodb.tch") - all_config['gateway_address'] = ipaddress - all_config['gateway_port'] = 11411 - all_config['manager_log'] = os.path.join(recipe.log_directory, "kumo-manager.log") - all_config['server_log'] = os.path.join(recipe.log_directory, "kumo-server.log") - all_config['gateway_log'] = os.path.join(recipe.log_directory, "kumo-gateway.log") - - manager_wrapper_template_location = pkg_resources.resource_filename( - __name__, os.path.join( - 'template', 'kumo_manager_run.in')) - manager_runner_path = recipe.createRunningWrapper("kumo-manager", - recipe.substituteTemplate(manager_wrapper_template_location, all_config)) - server_wrapper_template_location = pkg_resources.resource_filename( - __name__, os.path.join( - 'template', 'kumo_server_run.in')) - server_runner_path = recipe.createRunningWrapper("kumo-server", - recipe.substituteTemplate(server_wrapper_template_location, all_config)) - gateway_wrapper_template_location = pkg_resources.resource_filename( - __name__, os.path.join( - 'template', 'kumo_gateway_run.in')) - gateway_runner_path = recipe.createRunningWrapper("kumo-gateway", - recipe.substituteTemplate(gateway_wrapper_template_location, all_config)) - - return [manager_runner_path, server_runner_path, gateway_runner_path] - - def run_kumo_manager(self, recipe): - """ Run the kumofs manager. """ - manager_config = {} - manager_config.update(recipe.options) - - manager_config['manager_address'] = "[%s]" % recipe.getGlobalIPv6Address() - manager_config['manager_port'] = 19700 - manager_config['manager_log'] = os.path.join(recipe.log_directory, "kumo-manager.log") - - manager_connection = {} - manager_connection['address'] = manager_config['manager_address'] - manager_connection['port'] = manager_config['manager_port'] - recipe.computer_partition.setConnectionDict(manager_connection) - - manager_wrapper_template_location = pkg_resources.resource_filename( - __name__, os.path.join( - 'template', 'kumo_manager_run.in')) - manager_runner_path = recipe.createRunningWrapper("kumo-manager", - recipe.substituteTemplate(manager_wrapper_template_location, manager_config)) - - return [manager_runner_path] - - def run_kumo_server(self, recipe): - """ Run the kumofs server. """ - server_config = {} - server_config.update(recipe.options) - server_config.update(recipe.parameter_dict) - - server_config['server_address'] = "[%s]" % recipe.getGlobalIPv6Address() - server_config['server_port'] = 19800 - server_config['server_listen_port'] = 19900 - server_config['server_storage'] = os.path.join(recipe.var_directory,"kumodb.tch") - server_config['server_log'] = os.path.join(recipe.log_directory, "kumo-server.log") - - server_connection = {} - server_connection['address'] = server_config['server_address'] - recipe.computer_partition.setConnectionDict(server_connection) - - server_wrapper_template_location = pkg_resources.resource_filename( - __name__, os.path.join( - 'template', 'kumo_server_run.in')) - server_runner_path = recipe.createRunningWrapper("kumo-server", - recipe.substituteTemplate(server_wrapper_template_location, server_config)) - - return [server_runner_path] - - def run_kumo_gateway(self, recipe): - """ Run the kumofs gateway. """ - gateway_config = {} - gateway_config.update(recipe.options) - gateway_config.update(recipe.parameter_dict) - - gateway_config['gateway_address'] = "[%s]" % recipe.getGlobalIPv6Address() - gateway_config['gateway_port'] = 11411 - gateway_config['gateway_log'] = os.path.join(recipe.log_directory, "kumo-gateway.log") - - gateway_connection = {} - gateway_connection['address'] = gateway_config['gateway_address'] - gateway_connection['port'] = gateway_config['gateway_port'] - recipe.computer_partition.setConnectionDict(gateway_connection) - - gateway_wrapper_template_location = pkg_resources.resource_filename( - __name__, os.path.join( - 'template', 'kumo_gateway_run.in')) - gateway_runner_path = recipe.createRunningWrapper("kumo-gateway", - recipe.substituteTemplate(gateway_wrapper_template_location, gateway_config)) - - return [gateway_runner_path] - - def run_kumo_tester(self, recipe): - """ Run the kumofs tester. """ - tester_config = {} - tester_config.update(recipe.options) - tester_config.update(recipe.parameter_dict) - - tester_config['tester_address'] = recipe.getGlobalIPv6Address() - # tester_config['url'] = "http://%s:5000/" % tester_config['tester_address'] - # tester_config['start_url'] = "http://%s:5000/start" % tester_config['tester_address'] - tester_config['report_path'] = recipe.log_directory - config_dict['binary'] = "%s -g -l %s -p %s -t %s %s" % (config_dict['memstrike_binary'], - config_dict['gateway_address'].strip("[]"), - str(config_dict['gateway_port']), - str(config_dict['nb_thread']), - str(config_dict['nb_request'])) - tester_config['log_directory'] = recipe.log_directory - tester_config['compress_method'] = "bz2" - - tester_connection = {} - tester_connection['url'] = "http://%s:5000/" % tester_config['tester_address'] - recipe.computer_partition.setConnectionDict(tester_connection) - - tester_wrapper_template_location = pkg_resources.resource_filename( - 'slapos.recipe.nosqltestbed', os.path.join( - 'template', 'nosqltester_run.in')) - tester_runner_path = recipe.createRunningWrapper("nosqltester", - recipe.substituteTemplate(tester_wrapper_template_location, tester_config)) - - return [tester_runner_path] - - def run_kumo_tester_and_gateway(self, recipe): - """ Run the kumofs tester and gateway on the same partition. """ - address = recipe.getGlobalIPv6Address() - - config_dict = {} - config_dict.update(recipe.options) - config_dict.update(recipe.parameter_dict) - - # Gateway part - config_dict['gateway_address'] = "[%s]" % address - config_dict['gateway_port'] = 11411 - config_dict['gateway_log'] = os.path.join(recipe.log_directory, "kumo-gateway.log") - - # Tester part - config_dict['tester_address'] = address - config_dict['report_path'] = recipe.log_directory - config_dict['binary'] = "%s -g -l %s -p %s -t %s %s" % (config_dict['memstrike_binary'], - config_dict['gateway_address'].strip("[]"), - str(config_dict['gateway_port']), - str(config_dict['nb_thread']), - str(config_dict['nb_request'])) - config_dict['log_directory'] = recipe.log_directory - config_dict['compress_method'] = "bz2" - - connection_dict = {} - # connection_dict['address'] = config_dict['gateway_address'] - # connection_dict['port'] = config_dict['gateway_port'] - connection_dict['url'] = "http://%s:5000/" % config_dict['tester_address'] - recipe.computer_partition.setConnectionDict(connection_dict) - - gateway_wrapper_template_location = pkg_resources.resource_filename( - __name__, os.path.join( - 'template', 'kumo_gateway_run.in')) - gateway_runner_path = recipe.createRunningWrapper("kumo-gateway", - recipe.substituteTemplate(gateway_wrapper_template_location, config_dict)) - - tester_wrapper_template_location = pkg_resources.resource_filename( - 'slapos.recipe.nosqltestbed', os.path.join( - 'template', 'nosqltester_run.in')) - tester_runner_path = recipe.createRunningWrapper("nosqltester", - recipe.substituteTemplate(tester_wrapper_template_location, config_dict)) - - return [gateway_runner_path, tester_runner_path] - - def run_memstrike_set(self, recipe): - """ Run memstrike in set mode. """ - memstrike_config = {} - memstrike_config.update(recipe.options) - memstrike_config.update(recipe.parameter_dict) - - memstrike_config['gateway_address'] = memstrike_config['gateway_address'].strip("[]") - - memstrike_connection = {} - memstrike_connection['status'] = "OK" - recipe.computer_partition.setConnectionDict(memstrike_connection) - - memstrike_wrapper_template_location = pkg_resources.resource_filename( - __name__, os.path.join( - 'template', 'memstrike_run.in')) - memstrike_runner_path = recipe.createRunningWrapper("memstrike_set", - recipe.substituteTemplate(memstrike_wrapper_template_location, memstrike_config)) - - return [memstrike_runner_path] - diff --git a/slapos/recipe/nosqltestbed/kumo/template/kumo_server_run.in b/slapos/recipe/nosqltestbed/kumo/template/kumo_server_run.in deleted file mode 100644 index cb6575b18..000000000 --- a/slapos/recipe/nosqltestbed/kumo/template/kumo_server_run.in +++ /dev/null @@ -1,6 +0,0 @@ -#!/bin/sh -# BEWARE: This file is operated by slapgrid -# BEWARE: It will be overwritten automatically -exec %(server_binary)s -l %(server_address)s:%(server_port)s \ - -L %(server_listen_port)s -m %(manager_address)s:%(manager_port)s \ - -s %(server_storage)s --verbose -o %(server_log)s diff --git a/slapos/recipe/nosqltestbed/kumo/template/kumotester_manager_run.in b/slapos/recipe/nosqltestbed/kumo/template/kumotester_manager_run.in deleted file mode 100644 index edd026a94..000000000 --- a/slapos/recipe/nosqltestbed/kumo/template/kumotester_manager_run.in +++ /dev/null @@ -1,8 +0,0 @@ -#!/bin/sh -# BEWARE: This file is operated by slapgrid -# BEWARE: It will be overwritten automatically -exec %(nosqltester_manager_binary)s %(plugin_name)s -a %(address)s \ - -r %(report_path)s -s %(max_server)s -t %(max_tester)s \ - --erp5-publish-url "%(erp5_publish_url)s" --erp5-publish-project "%(erp5_publish_project)s" \ - %(software_release_url)s %(server_url)s "%(key_file)s" "%(cert_file)s" %(computer_id)s %(computer_partition_id)s \ - %(nb_thread)s %(nb_request)s diff --git a/slapos/recipe/nosqltestbed/kumo/template/memstrike_run.in b/slapos/recipe/nosqltestbed/kumo/template/memstrike_run.in deleted file mode 100644 index 98660828a..000000000 --- a/slapos/recipe/nosqltestbed/kumo/template/memstrike_run.in +++ /dev/null @@ -1,4 +0,0 @@ -#!/bin/sh -# BEWARE: This file is operated by slapgrid -# BEWARE: It will be overwritten automatically -exec %(memstrike_binary)s -s -l %(gateway_address)s -p %(gateway_port)s -t %(nb_thread)s %(nb_request)s diff --git a/slapos/recipe/nosqltestbed/kumo/template/kumo_gateway_run.in b/slapos/recipe/nosqltestbed/template/kumo_gateway_run.in similarity index 67% rename from slapos/recipe/nosqltestbed/kumo/template/kumo_gateway_run.in rename to slapos/recipe/nosqltestbed/template/kumo_gateway_run.in index b7b312884..da8c8950d 100644 --- a/slapos/recipe/nosqltestbed/kumo/template/kumo_gateway_run.in +++ b/slapos/recipe/nosqltestbed/template/kumo_gateway_run.in @@ -1,5 +1,4 @@ #!/bin/sh # BEWARE: This file is operated by slapgrid # BEWARE: It will be overwritten automatically -exec %(gateway_binary)s -F -E -m %(manager_address)s:%(manager_port)s \ - -t %(gateway_address)s:%(gateway_port)s --verbose -o %(gateway_log)s +exec %(gateway_binary)s -F -E -m %(manager_address)s:%(manager_port)s -t %(gateway_address)s:%(gateway_port)s --verbose -o %(gateway_log)s diff --git a/slapos/recipe/nosqltestbed/kumo/template/kumo_manager_run.in b/slapos/recipe/nosqltestbed/template/kumo_manager_run.in similarity index 82% rename from slapos/recipe/nosqltestbed/kumo/template/kumo_manager_run.in rename to slapos/recipe/nosqltestbed/template/kumo_manager_run.in index ff6ac68f9..1a325b6db 100644 --- a/slapos/recipe/nosqltestbed/kumo/template/kumo_manager_run.in +++ b/slapos/recipe/nosqltestbed/template/kumo_manager_run.in @@ -1,5 +1,4 @@ #!/bin/sh # BEWARE: This file is operated by slapgrid # BEWARE: It will be overwritten automatically -exec %(manager_binary)s -a -l %(manager_address)s:%(manager_port)s \ - --verbose -o %(manager_log)s +exec %(manager_binary)s -a -l %(manager_address)s:%(manager_port)s --verbose -o %(manager_log)s diff --git a/slapos/recipe/nosqltestbed/template/kumo_server_run.in b/slapos/recipe/nosqltestbed/template/kumo_server_run.in new file mode 100644 index 000000000..008276f63 --- /dev/null +++ b/slapos/recipe/nosqltestbed/template/kumo_server_run.in @@ -0,0 +1,4 @@ +#!/bin/sh +# BEWARE: This file is operated by slapgrid +# BEWARE: It will be overwritten automatically +exec %(server_binary)s -l %(server_address)s:%(server_port)s -L %(server_listen_port)s -m %(manager_address)s:%(manager_port)s -s %(server_storage)s --verbose -o %(server_log)s diff --git a/slapos/recipe/nosqltestbed/template/kumotester_manager_run.in b/slapos/recipe/nosqltestbed/template/kumotester_manager_run.in new file mode 100644 index 000000000..7e9b2ae94 --- /dev/null +++ b/slapos/recipe/nosqltestbed/template/kumotester_manager_run.in @@ -0,0 +1,4 @@ +#!/bin/sh +# BEWARE: This file is operated by slapgrid +# BEWARE: It will be overwritten automatically +exec %(nosqltester_manager_binary)s -a %(address)s -r %(report_path)s -s %(nb_server_max)s -t %(nb_tester_max)s %(software_release_url)s %(server_url)s "%(key_file)s" "%(cert_file)s" %(computer_id)s %(computer_partition_id)s %(plugin_name)s %(nb_thread)s %(nb_request)s diff --git a/slapos/recipe/nosqltestbed/template/nosqltester_manager_run.in b/slapos/recipe/nosqltestbed/template/nosqltester_manager_run.in index d2a59d238..c6f1f591e 100644 --- a/slapos/recipe/nosqltestbed/template/nosqltester_manager_run.in +++ b/slapos/recipe/nosqltestbed/template/nosqltester_manager_run.in @@ -1,7 +1,4 @@ #!/bin/sh # BEWARE: This file is operated by slapgrid # BEWARE: It will be overwritten automatically -exec %(nosqltester_manager_binary)s %(plugin_name)s -a %(address)s \ - -r %(report_path)s -s %(max_server)s -t %(max_tester)s \ - --erp5-publish-url "%(erp5_publish_url)s" --erp5-publish-project "%(erp5_publish_project)s" \ - %(software_release_url)s %(server_url)s "%(key_file)s" "%(cert_file)s" %(computer_id)s %(computer_partition_id)s +exec %(nosqltester_manager_binary)s -a %(address)s -r %(report_path)s -s %(nb_server_max)s -t %(nb_tester_max)s %(software_release_url)s %(server_url)s "%(key_file)s" "%(cert_file)s" %(computer_id)s %(computer_partition_id)s %(plugin_name)s diff --git a/slapos/recipe/nosqltestbed/template/nosqltester_run.in b/slapos/recipe/nosqltestbed/template/nosqltester_run.in index 2e018cb84..7bda20af3 100644 --- a/slapos/recipe/nosqltestbed/template/nosqltester_run.in +++ b/slapos/recipe/nosqltestbed/template/nosqltester_run.in @@ -1,6 +1,4 @@ #!/bin/sh # BEWARE: This file is operated by slapgrid # BEWARE: It will be overwritten automatically -exec %(nosqltester_binary)s -m %(host_address)s -a %(tester_address)s \ - -r %(report_path)s -b "%(binary)s" -l %(log_directory)s \ - -c "%(compress_method)s" +exec %(nosqltester_binary)s -h %(host_address)s -a %(tester_address)s -r %(report_path)s -b "%(binary)s" diff --git a/slapos/recipe/notifier.py b/slapos/recipe/notifier.py deleted file mode 100644 index e14f4fc4d..000000000 --- a/slapos/recipe/notifier.py +++ /dev/null @@ -1,89 +0,0 @@ -############################################################################## -# -# 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 -from hashlib import sha512 -from slapos.recipe.librecipe import GenericBaseRecipe - -class Recipe(GenericBaseRecipe): - - def install(self): - commandline = [self.options['server-binary']] - commandline.extend(['--callbacks', self.options['callbacks']]) - commandline.extend(['--feeds', self.options['feeds']]) - commandline.extend(['--equeue-socket', self.options['equeue-socket']]) - commandline.append(self.options['host']) - commandline.append(self.options['port']) - - return [self.createPythonScript(self.options['wrapper'], - 'slapos.recipe.librecipe.execute.execute', - commandline)] - -class Callback(GenericBaseRecipe): - - def createCallback(self, notification_id, callback): - callback_id = sha512(notification_id).hexdigest() - callback = self.createFile(os.path.join(self.options['callbacks'], - callback_id), - callback) - return callback - - def install(self): - return [self.createCallback(self.options['on-notification-id'], - self.options['callback'])] - -class Notify(GenericBaseRecipe): - - def createNotifier(self, notifier_binary, executable, wrapper, **kwargs): - if not os.path.exists(kwargs['log']): - # Just a touch - open(kwargs['log'], 'w').close() - - commandline = [notifier_binary, - '-l', kwargs['log'], - '--title', kwargs['title'], - '--feed', kwargs['feed_url'], - '--notification-url', kwargs['notification_url'], - executable] - return self.createPythonScript(wrapper, - 'slapos.recipe.librecipe.execute.execute', - [str(i) for i in commandline]) - - def install(self): - feedurl = self.unparseUrl(scheme='http', host=self.options['host'], - port=self.options['port'], - path='/get/%s' % self.options['name']) - - script = self.createNotifier( - self.options['notifier-binary'], - wrapper=self.options['wrapper'], - executable=self.options['executable'], - log=os.path.join(self.options['feeds'], self.options['name']), - title=self.options['title'], - notification_url=self.options['notify'], - feed_url=feedurl, - ) - return [script] diff --git a/slapos/recipe/osoeslaptraining/__init__.py b/slapos/recipe/osoeslaptraining/__init__.py new file mode 100644 index 000000000..f3fb52447 --- /dev/null +++ b/slapos/recipe/osoeslaptraining/__init__.py @@ -0,0 +1,206 @@ +############################################################################## +# +# 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 BaseSlapRecipe +import os +import shutil +import pkg_resources +import zc.buildout +import sys +import zc.recipe.egg + +class BaseRecipe(BaseSlapRecipe): + def installMysqlServer(self, ip=None, port=None): + if ip is None: + ip = self.getLocalIPv4Address() + if port is None: + port = '3306' + mysql_conf = dict( + ip=ip, + data_directory=os.path.join(self.data_root_directory, + 'mysql'), + tcp_port=port, + pid_file=os.path.join(self.run_directory, 'mysqld.pid'), + socket=os.path.join(self.run_directory, 'mysqld.sock'), + error_log=os.path.join(self.log_directory, 'mysqld.log'), + slow_query_log=os.path.join(self.log_directory, + 'mysql-slow.log'), + database='appdb', + user='appuser', + password=self.generatePassword(), + ) + self._createDirectory(mysql_conf['data_directory']) + + mysql_conf_path = self.createConfigurationFile("my.cnf", + self.substituteTemplate(pkg_resources.resource_filename(__name__, 'template/my.cnf.in'), + mysql_conf)) + + mysql_script = pkg_resources.resource_string(__name__, + 'template/mysqlinit.sql.in') % mysql_conf + self.path_list.extend(zc.buildout.easy_install.scripts([('mysql_update', + __name__ + '.mysql', 'updateMysql')], self.ws, + sys.executable, self.wrapper_directory, arguments=[dict( + mysql_script=mysql_script, + mysql_binary=self.options['mysql_binary'].strip(), + mysql_upgrade_binary=self.options['mysql_upgrade_binary'].strip(), + socket=mysql_conf['socket'], + )])) + self.path_list.extend(zc.buildout.easy_install.scripts([('mysqld', + __name__ + '.mysql', 'runMysql')], self.ws, + sys.executable, self.wrapper_directory, arguments=[dict( + mysql_install_binary=self.options['mysql_install_binary'].strip(), + mysqld_binary=self.options['mysqld_binary'].strip(), + data_directory=mysql_conf['data_directory'].strip(), + mysql_binary=self.options['mysql_binary'].strip(), + socket=mysql_conf['socket'].strip(), + configuration_file=mysql_conf_path, + )])) + self.path_list.extend([mysql_conf_path]) + return dict( + mysql_host=mysql_conf['ip'], + mysql_port=mysql_conf['tcp_port'], + mysql_user=mysql_conf['user'], + mysql_password=mysql_conf['password'], + mysql_database=mysql_conf['database'], + ) + + def createHtdocs(self, source, document_root): + source = self.options['source'].strip() + document_root = self.createDataDirectory('htdocs') + for p in os.listdir(document_root): + path = os.path.join(document_root, p) + if os.path.isdir(path): + shutil.rmtree(path) + else: + os.unlink(path) + for p in os.listdir(source): + path = os.path.join(source, p) + if os.path.isdir(path): + shutil.copytree(path, os.path.join(document_root, p)) + else: + shutil.copy2(path, os.path.join(document_root, p)) + + def installApache(self, document_root, ip=None, port=None): + if ip is None: + ip=self.getGlobalIPv6Address() + if port is None: + port = '9080' + apache_config = dict( + pid_file=os.path.join(self.run_directory, 'httpd.pid'), + lock_file=os.path.join(self.run_directory, 'httpd.lock'), + ip=ip, + port=port, + error_log=os.path.join(self.log_directory, 'httpd-error.log'), + access_log=os.path.join(self.log_directory, 'httpd-access.log'), + document_root=document_root, + php_ini_dir=self.etc_directory + ) + config_file = self.createConfigurationFile('httpd.conf', + self.substituteTemplate(pkg_resources.resource_filename(__name__, + 'template/apache.in'), apache_config)) + self.path_list.append(config_file) + self.path_list.append(self.createConfigurationFile('php.ini', + self.substituteTemplate(pkg_resources.resource_filename(__name__, + 'template/php.ini.in'), {}))) + self.path_list.extend(zc.buildout.easy_install.scripts([( + 'httpd', + __name__ + '.apache', 'runApache')], self.ws, + sys.executable, self.wrapper_directory, arguments=[ + dict( + required_path_list=[], + binary=self.options['httpd_binary'], + config=config_file + ) + ])) + return 'http://[%s]:%s' % (ip, port) + + def createConfiguration(self, template, document_root, destination, d): + directory = os.path.dirname(destination) + file = os.path.basename(destination) + path = document_root + if directory: + path = os.path.join(document_root, directory) + if not os.path.exists(path): + os.makedirs(path) + destination = os.path.join(path, file) + open(destination, 'w').write(open(template, 'r').read() % d) + +class Static(BaseRecipe): + def _install(self): + self.path_list = [] + self.requirements, self.ws = self.egg.working_set() + document_root = self.createDataDirectory('htdocs') + self.createHtdocs(self.options['source'].strip(), document_root) + url = self.installApache(document_root) + self.setConnectionDict(dict(url = url)) + return self.path_list + +class Simple(BaseRecipe): + def _install(self): + self.path_list = [] + self.requirements, self.ws = self.egg.working_set() + document_root = self.createDataDirectory('htdocs') + self.createHtdocs(self.options['source'].strip(), document_root) + mysql_conf = self.installMysqlServer() + url = self.installApache(document_root) + self.setConnectionDict(dict( + url=url, + **mysql_conf + )) + self.createConfiguration(self.options['template'], document_root, + self.options['configuration'], mysql_conf) + return self.path_list + +class Request(BaseRecipe): + def _install(self): + self.path_list = [] + self.requirements, self.ws = self.egg.working_set() + software_type = self.parameter_dict['slap_software_type'] + if software_type == 'RootSoftwareInstance': + document_root = self.createDataDirectory('htdocs') + self.createHtdocs(self.options['source'].strip(), document_root) + mysql = self.request(self.software_release_url, 'MySQL Server', 'mysql') + mysql_conf = dict( + mysql_host=mysql.getConnectionParameter('mysql_host'), + mysql_port=mysql.getConnectionParameter('mysql_port'), + mysql_user=mysql.getConnectionParameter('mysql_user'), + mysql_password=mysql.getConnectionParameter('mysql_password'), + mysql_database=mysql.getConnectionParameter('mysql_database'), + ) + url = self.installApache(document_root) + self.setConnectionDict(dict( + url=url, + )) + self.createConfiguration(self.options['template'], document_root, + self.options['configuration'], mysql_conf) + elif software_type == 'MySQL Server': + mysql_conf = self.installMysqlServer() + self.setConnectionDict(dict( + **mysql_conf + )) + else: + raise zc.buildout.UserError('Uknown software type %r' % software_type) + return self.path_list diff --git a/slapos/recipe/apache_zope_backend/apache.py b/slapos/recipe/osoeslaptraining/apache.py similarity index 100% rename from slapos/recipe/apache_zope_backend/apache.py rename to slapos/recipe/osoeslaptraining/apache.py diff --git a/slapos/recipe/pulse2/mysql.py b/slapos/recipe/osoeslaptraining/mysql.py similarity index 73% rename from slapos/recipe/pulse2/mysql.py rename to slapos/recipe/osoeslaptraining/mysql.py index e2036076a..c0f399084 100644 --- a/slapos/recipe/pulse2/mysql.py +++ b/slapos/recipe/osoeslaptraining/mysql.py @@ -14,7 +14,6 @@ def runMysql(args): if not os.path.isdir(os.path.join(conf['data_directory'], 'mysql')): while True: # XXX: Protect with proper root password - # XXX: Follow http://dev.mysql.com/doc/refman/5.0/en/default-privileges.html popen = subprocess.Popen([conf['mysql_install_binary'], '--skip-name-resolve', '--no-defaults', '--datadir=%s' % conf['data_directory']], @@ -54,18 +53,20 @@ def updateMysql(args): 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() - if mysql.returncode != 0: - print 'Command %r failed with:\n%s' % (mysql_list, result) - print 'Sleeping for %ss and retrying' % sleep - else: - is_succeed = True - print 'SlapOS initialisation script succesfully applied on database.' + mysql_script = conf.get('mysql_script') + if mysql_script: + 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) + print 'Sleeping for %ss and retrying' % sleep + else: + is_succeed = True + print 'SlapOS initialisation script succesfully applied on database.' sys.stdout.flush() sys.stderr.flush() time.sleep(sleep) diff --git a/slapos/recipe/apachephp/template/apache.in b/slapos/recipe/osoeslaptraining/template/apache.in similarity index 97% rename from slapos/recipe/apachephp/template/apache.in rename to slapos/recipe/osoeslaptraining/template/apache.in index 8dc3ef81d..7de37f645 100644 --- a/slapos/recipe/apachephp/template/apache.in +++ b/slapos/recipe/osoeslaptraining/template/apache.in @@ -53,4 +53,3 @@ LoadModule rewrite_module modules/mod_rewrite.so LoadModule headers_module modules/mod_headers.so LoadModule dir_module modules/mod_dir.so LoadModule php5_module modules/libphp5.so -LoadModule alias_module modules/mod_alias.so diff --git a/slapos/recipe/pulse2/template/my.cnf.in b/slapos/recipe/osoeslaptraining/template/my.cnf.in similarity index 100% rename from slapos/recipe/pulse2/template/my.cnf.in rename to slapos/recipe/osoeslaptraining/template/my.cnf.in diff --git a/slapos/recipe/pulse2/template/mysqlinit.sql.in b/slapos/recipe/osoeslaptraining/template/mysqlinit.sql.in similarity index 100% rename from slapos/recipe/pulse2/template/mysqlinit.sql.in rename to slapos/recipe/osoeslaptraining/template/mysqlinit.sql.in diff --git a/slapos/recipe/pulse2/template/php.ini.in b/slapos/recipe/osoeslaptraining/template/php.ini.in similarity index 100% rename from slapos/recipe/pulse2/template/php.ini.in rename to slapos/recipe/osoeslaptraining/template/php.ini.in diff --git a/slapos/recipe/pbs.py b/slapos/recipe/pbs.py deleted file mode 100644 index 173e0d273..000000000 --- a/slapos/recipe/pbs.py +++ /dev/null @@ -1,228 +0,0 @@ -############################################################################## -# -# 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 json import loads as unjson -from hashlib import sha512 -from urlparse import urlparse -import os -import subprocess -import sys -import signal -import inspect - -from slapos.recipe.librecipe import GenericSlapRecipe -from slapos.recipe.dropbear import KnownHostsFile -from slapos.recipe.notifier import Notify -from slapos.recipe.notifier import Callback -from slapos import slap as slapmodule - - -def promise(args): - - def failed_ssh(partition, ssh): - # Bad python 2 syntax, looking forward python 3 to have print(file=) - print >> sys.stderr, "SSH Connection failed" - try: - ssh.terminate() - except: - pass - partition.bang("SSH Connection failed. rdiff-backup is unusable.") - - def sigterm_handler(signum, frame): - # Walk up in the stack to get promise local - # variables - ssh = None - for upper_frame in inspect.getouterframes(frame): - # Use promise.func_name insteand of 'promise' in order to be - # detected by editor if promise func name change. - # Else, it's hard to debug this kind of error. - if upper_frame[3] == promise.func_name: - try: - partition = upper_frame[0].f_locals['partition'] - ssh = upper_frame[0].f_locals['ssh'] - except KeyError: - raise SystemExit("SIGTERM Send too soon.") - break - # If ever promise function wasn't found in the stack. - if ssh is None: - raise SystemExit - failed_ssh(partition, ssh) - - signal.signal(signal.SIGTERM, sigterm_handler) - - slap = slapmodule.slap() - slap.initializeConnection(args['server_url'], - key_file=args.get('key_file'), cert_file=args.get('cert_file')) - partition = slap.registerComputerPartition(args['computer_id'], - args['partition_id']) - - # Rdiff Backup protocol quit command - quitcommand = 'q' + chr(255) + chr(0) * 7 - ssh_cmdline = [args['ssh_client'], '%(user)s@%(host)s/%(port)s' % args] - - ssh = subprocess.Popen(ssh_cmdline, stdin=subprocess.PIPE, - stdout=open(os.devnull), stderr=open(os.devnull)) - ssh.stdin.write(quitcommand) - ssh.stdin.flush() - ssh.stdin.close() - ssh.wait() - - if ssh.poll() is None: - return 1 - if ssh.returncode != 0: - failed_ssh(partition, ssh) - return ssh.returncode - - - -class Recipe(GenericSlapRecipe, Notify, Callback): - - def add_slave(self, entry, known_hosts_file): - path_list = [] - - url = entry.get('url') - if url is None: - url = '' - - # We assume that thanks to sha512 there's no collisions - url_hash = sha512(url).hexdigest() - name_hash = sha512(entry['name']).hexdigest() - - promise_path = os.path.join(self.options['promises-directory'], - url_hash) - parsed_url = urlparse(url) - promise_dict = self.promise_base_dict.copy() - promise_dict.update(user=parsed_url.username, - host=parsed_url.hostname, - port=parsed_url.port) - promise = self.createPythonScript(promise_path, - __name__ + '.promise', - promise_dict) - path_list.append(promise) - - - host = parsed_url.hostname - known_hosts_file[host] = entry['server-key'] - - remote_schema = '%(ssh)s -p %%s %(user)s@%(host)s' % \ - { - 'ssh': self.options['sshclient-binary'], - 'user': parsed_url.username, - 'host': parsed_url.hostname, - } - - command = [self.options['rdiffbackup-binary']] - command.extend(['--remote-schema', remote_schema]) - - remote_directory = '%(port)s::%(path)s' % {'port': parsed_url.port, - 'path': parsed_url.path} - - local_directory = self.createDirectory(self.options['directory'], - name_hash) - - if entry['type'] == 'push': - command.extend(['--restore-as-of', 'now']) - command.append('--force') - command.extend([local_directory, remote_directory]) - else: - command.extend([remote_directory, local_directory]) - - wrapper_basepath = os.path.join(self.options['wrappers-directory'], - url_hash) - - wrapper_path = wrapper_basepath - if 'notify' in entry: - wrapper_path = '%s_raw' % wrapper_basepath - - wrapper = self.createPythonScript( - wrapper_path, - 'slapos.recipe.librecipe.execute.execute', - [str(i) for i in command] - ) - path_list.append(wrapper) - - if 'notify' in entry: - feed_url = '%s/get/%s' % (self.options['notifier-url'], - entry['notification-id']) - wrapper = self.createNotifier( - self.options['notifier-binary'], - wrapper=wrapper_basepath, - executable=wrapper_path, - log=os.path.join(self.options['feeds'], entry['notification-id']), - title=entry.get('title', 'Untitled'), - notification_url=entry['notify'], - feed_url=feed_url, - ) - path_list.append(wrapper) - #self.setConnectionDict(dict(feed_url=feed_url), entry['slave_reference']) - - if 'on-notification' in entry: - path_list.append(self.createCallback(str(entry['on-notification']), - wrapper)) - else: - cron_entry = os.path.join(self.options['cron-entries'], url_hash) - with open(cron_entry, 'w') as cron_entry_file: - cron_entry_file.write('%s %s' % (entry['frequency'], wrapper)) - path_list.append(cron_entry) - - return path_list - - def _install(self): - path_list = [] - - - if self.optionIsTrue('client', True): - self.logger.info("Client mode") - - slap_connection = self.buildout['slap-connection'] - self.promise_base_dict = dict( - server_url=slap_connection['server-url'], - computer_id=slap_connection['computer-id'], - cert_file=slap_connection.get('cert-file'), - key_file=slap_connection.get('key-file'), - partition_id=slap_connection['partition-id'], - ssh_client=self.options['sshclient-binary'], - ) - - slaves = unjson(self.options['slave-instance-list']) - known_hosts = KnownHostsFile(self.options['known-hosts']) - with known_hosts: - for slave in slaves: - path_list.extend(self.add_slave(slave, known_hosts)) - - else: - command = [self.options['rdiffbackup-binary']] - self.logger.info("Server mode") - command.extend(['--restrict', self.options['path']]) - command.append('--server') - - wrapper = self.createPythonScript( - self.options['wrapper'], - 'slapos.recipe.librecipe.execute.execute', - command) - path_list.append(wrapper) - - return path_list diff --git a/slapos/recipe/publishurl.py b/slapos/recipe/publishurl.py index 0a30c34be..98655433a 100644 --- a/slapos/recipe/publishurl.py +++ b/slapos/recipe/publishurl.py @@ -56,10 +56,10 @@ class Recipe(GenericSlapRecipe): if option in self.options: self.urlparts[option] = self.options[option] - if 'username' in self.options: - self.urlparts.update(auth=(self.options['username'],)) + if 'user' in self.options: + self.urlparts.update(auth=(self.options['user'],)) if 'password' in self.options: - self.urlparts.update(auth=(self.options['username'], + self.urlparts.update(auth=(self.options['user'], self.options['password'])) self.setConnectionUrl(**self.urlparts) diff --git a/slapos/recipe/pulse2/__init__.py b/slapos/recipe/pulse2/__init__.py deleted file mode 100644 index a1deec9ce..000000000 --- a/slapos/recipe/pulse2/__init__.py +++ /dev/null @@ -1,431 +0,0 @@ -############################################################################## -# -# 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 BaseSlapRecipe -import hashlib -import os -import pkg_resources -import sys -import zc.buildout -import ConfigParser - -class Recipe(BaseSlapRecipe): - def getTemplateFilename(self, template_name): - return pkg_resources.resource_filename(__name__, - 'template/%s' % template_name) - - def _install(self): - # Apache - # TODO add in apache conf location of mmc.ini - document_root = self.createDataDirectory('htdocs') - self.createHtdocs(self.options['source'].strip(), document_root) - url = self.installApache(document_root) - - # MySQL - mysql_conf = self.installMysqlServer(self.getLocalIPv4Address(), 45678) - - # LDAP - ldap_port = dict() - - # Pulse - mmc_core_conf = self.installPulse2(ip=self.getLocalIPv4Address(), - port=11000, ldap_host=ldap_conf['host'], ldap_port=ldap_conf['port']) - - ca_conf = self.installCertificateAuthority() - key, certificate = self.requestCertificate('Pulse') - - stunnel_conf = self.installStunnel(self.getGlobalIPv6Address(), - self.getLocalIPv4Address(), 12345, pulse_conf['inventory_port'], - certificate, key, ca_conf['ca_crl'], - ca_conf['certificate_authority_path']) - - self.linkBinary() - self.setConnectionDict(dict( - stunnel_inventory_ip = stunnel_conf['public_ip'], - stunnel_inventory_port = stunnel_conf['public_port'], - url=url, - **mysql_conf - )) - return self.path_list - - def linkBinary(self): - """Links binaries to instance's bin directory for easier exposal""" - for linkline in self.options.get('link_binary_list', '').splitlines(): - if not linkline: - continue - target = linkline.split() - if len(target) == 1: - target = target[0] - path, linkname = os.path.split(target) - else: - linkname = target[1] - target = target[0] - link = os.path.join(self.bin_directory, linkname) - if os.path.lexists(link): - if not os.path.islink(link): - raise zc.buildout.UserError( - 'Target link already %r exists but it is not link' % link) - os.unlink(link) - os.symlink(target, link) - self.logger.debug('Created link %r -> %r' % (link, target)) - self.path_list.append(link) - - def installCrond(self): - timestamps = self.createDataDirectory('cronstamps') - cron_output = os.path.join(self.log_directory, 'cron-output') - self._createDirectory(cron_output) - catcher = zc.buildout.easy_install.scripts([('catchcron', - __name__ + '.catdatefile', 'catdatefile')], self.ws, sys.executable, - self.bin_directory, arguments=[cron_output])[0] - self.path_list.append(catcher) - cron_d = os.path.join(self.etc_directory, 'cron.d') - crontabs = os.path.join(self.etc_directory, 'crontabs') - self._createDirectory(cron_d) - self._createDirectory(crontabs) - # Use execute from erp5. - wrapper = zc.buildout.easy_install.scripts([('crond', - 'slapos.recipe.librecipe.execute', 'execute')], self.ws, sys.executable, - self.wrapper_directory, arguments=[ - self.options['dcrond_binary'].strip(), '-s', cron_d, '-c', crontabs, - '-t', timestamps, '-f', '-l', '5', '-M', catcher] - )[0] - self.path_list.append(wrapper) - return cron_d - - def installLogrotate(self): - """Installs logortate main configuration file and registers its to cron""" - logrotate_d = os.path.abspath(os.path.join(self.etc_directory, - 'logrotate.d')) - self._createDirectory(logrotate_d) - logrotate_backup = self.createBackupDirectory('logrotate') - logrotate_conf = self.createConfigurationFile("logrotate.conf", - "include %s" % logrotate_d) - logrotate_cron = os.path.join(self.cron_d, 'logrotate') - state_file = os.path.join(self.data_root_directory, 'logrotate.status') - open(logrotate_cron, 'w').write('0 0 * * * %s -s %s %s' % - (self.options['logrotate_binary'], state_file, logrotate_conf)) - self.path_list.extend([logrotate_d, logrotate_conf, logrotate_cron]) - return logrotate_d, logrotate_backup - - def registerLogRotation(self, name, log_file_list, postrotate_script): - """Register new log rotation requirement""" - open(os.path.join(self.logrotate_d, name), 'w').write( - self.substituteTemplate(self.getTemplateFilename( - 'logrotate_entry.in'), - dict(file_list=' '.join(['"'+q+'"' for q in log_file_list]), - postrotate=postrotate_script, olddir=self.logrotate_backup))) - - def installCertificateAuthority(self, ca_country_code='XX', - ca_email='xx@example.com', ca_state='State', ca_city='City', - ca_company='Company'): - backup_path = self.createBackupDirectory('ca') - self.ca_dir = os.path.join(self.data_root_directory, 'ca') - self._createDirectory(self.ca_dir) - self.ca_request_dir = os.path.join(self.ca_dir, 'requests') - self._createDirectory(self.ca_request_dir) - config = dict(ca_dir=self.ca_dir, request_dir=self.ca_request_dir) - self.ca_private = os.path.join(self.ca_dir, 'private') - self.ca_certs = os.path.join(self.ca_dir, 'certs') - self.ca_crl = os.path.join(self.ca_dir, 'crl') - self.ca_newcerts = os.path.join(self.ca_dir, 'newcerts') - self.ca_key_ext = '.key' - self.ca_crt_ext = '.crt' - for d in [self.ca_private, self.ca_crl, self.ca_newcerts, self.ca_certs]: - self._createDirectory(d) - for f in ['crlnumber', 'serial']: - if not os.path.exists(os.path.join(self.ca_dir, f)): - open(os.path.join(self.ca_dir, f), 'w').write('01') - if not os.path.exists(os.path.join(self.ca_dir, 'index.txt')): - open(os.path.join(self.ca_dir, 'index.txt'), 'w').write('') - openssl_configuration = os.path.join(self.ca_dir, 'openssl.cnf') - config.update( - working_directory=self.ca_dir, - country_code=ca_country_code, - state=ca_state, - city=ca_city, - company=ca_company, - email_address=ca_email, - ) - self._writeFile(openssl_configuration, pkg_resources.resource_string( - __name__, 'template/openssl.cnf.ca.in') % config) - self.path_list.extend(zc.buildout.easy_install.scripts([ - ('certificate_authority', - __name__ + '.certificate_authority', 'runCertificateAuthority')], - self.ws, sys.executable, self.wrapper_directory, arguments=[dict( - openssl_configuration=openssl_configuration, - openssl_binary=self.options['openssl_binary'], - certificate=os.path.join(self.ca_dir, 'cacert.pem'), - key=os.path.join(self.ca_private, 'cakey.pem'), - crl=os.path.join(self.ca_crl), - request_dir=self.ca_request_dir - )])) - # configure backup - backup_cron = os.path.join(self.cron_d, 'ca_rdiff_backup') - open(backup_cron, 'w').write( - '''0 0 * * * %(rdiff_backup)s %(source)s %(destination)s'''%dict( - rdiff_backup=self.options['rdiff_backup_binary'], - source=self.ca_dir, - destination=backup_path)) - self.path_list.append(backup_cron) - - return dict( - ca_certificate=os.path.join(config['ca_dir'], 'cacert.pem'), - ca_crl=os.path.join(config['ca_dir'], 'crl'), - certificate_authority_path=config['ca_dir'] - ) - - def requestCertificate(self, name): - hash = hashlib.sha512(name).hexdigest() - key = os.path.join(self.ca_private, hash + self.ca_key_ext) - certificate = os.path.join(self.ca_certs, hash + self.ca_crt_ext) - parser = ConfigParser.RawConfigParser() - parser.add_section('certificate') - parser.set('certificate', 'name', name) - parser.set('certificate', 'key_file', key) - parser.set('certificate', 'certificate_file', certificate) - parser.write(open(os.path.join(self.ca_request_dir, hash), 'w')) - return key, certificate - - def installStunnel(self, public_ip, private_ip, public_port, private_port, - ca_certificate, key, ca_crl, ca_path): - """Installs stunnel""" - template_filename = self.getTemplateFilename('stunnel.conf.in') - log = os.path.join(self.log_directory, 'stunnel.log') - pid_file = os.path.join(self.run_directory, 'stunnel.pid') - stunnel_conf = dict( - public_ip=public_ip, - private_ip=private_ip, - public_port=public_port, - pid_file=pid_file, - log=log, - cert = ca_certificate, - key = key, - ca_crl = ca_crl, - ca_path = ca_path, - private_port = private_port, - ) - stunnel_conf_path = self.createConfigurationFile("stunnel.conf", - self.substituteTemplate(template_filename, - stunnel_conf)) - wrapper = zc.buildout.easy_install.scripts([('stunnel', - 'slapos.recipe.librecipe.execute', 'execute')], self.ws, sys.executable, - self.wrapper_directory, arguments=[ - self.options['stunnel_binary'].strip(), stunnel_conf_path] - )[0] - self.path_list.append(wrapper) - return stunnel_conf - - def installPulse2(self, ip, port, ldap_host, ldap_port): - """Installs both mmc_core and pulse2""" - config = dict( - ldap_host=ldap_host, - ldap_port=ldap_port, - memcached_port=port, - ldap_logfile_path= os.path.join(self.log_directory, 'ldap.log'), - mmc_core_binary=self.options['mmc_core_binary'] - ) - - #TODO write function that takes all templates in subdir and creates conf - # files, keeping same dir structure. - mmc_conf_path = self.createConfigurationFile(os.path.join("mmc", - "agent", "config.ini"), self.substituteTemplate( - self.getTemplateFilename(os.path.join("mmc_conf", - "agent", "config.ini.in")), config)) - config['mmc_core_config_file'] = mysql_conf_path - - self.path_list.append(self.createRunningWrapper('mmc-core', - self.substituteTemplate(self.getTemplateFilename('mmc-core.in'), - config))) - - - - return dict(memcached_url='%s:%s' % - (config['memcached_ip'], config['memcached_port']), - memcached_ip=config['memcached_ip'], - memcached_port=config['memcached_port']) - - def createHtdocs(self, source, document_root): - source = self.options['source'].strip() - document_root = self.createDataDirectory('htdocs') - for p in os.listdir(document_root): - path = os.path.join(document_root, p) - if os.path.isdir(path): - shutil.rmtree(path) - else: - os.unlink(path) - for p in os.listdir(source): - path = os.path.join(source, p) - if os.path.isdir(path): - shutil.copytree(path, os.path.join(document_root, p)) - else: - shutil.copy2(path, os.path.join(document_root, p)) - - def installApache(self, document_root, ip=None, port=None): - if ip is None: - ip=self.getGlobalIPv6Address() - if port is None: - port = '9080' - apache_config = dict( - pid_file=os.path.join(self.run_directory, 'httpd.pid'), - lock_file=os.path.join(self.run_directory, 'httpd.lock'), - ip=ip, - port=port, - error_log=os.path.join(self.log_directory, 'httpd-error.log'), - access_log=os.path.join(self.log_directory, 'httpd-access.log'), - document_root=document_root, - php_ini_dir=self.etc_directory - ) - config_file = self.createConfigurationFile('httpd.conf', - self.substituteTemplate(pkg_resources.resource_filename(__name__, - 'template/apache.in'), apache_config)) - self.path_list.append(config_file) - self.path_list.append(self.createConfigurationFile('php.ini', - self.substituteTemplate(pkg_resources.resource_filename(__name__, - 'template/php.ini.in'), {}))) - self.path_list.extend(zc.buildout.easy_install.scripts([( - 'httpd', - __name__ + '.apache', 'runApache')], self.ws, - sys.executable, self.wrapper_directory, arguments=[ - dict( - required_path_list=[], - binary=self.options['httpd_binary'], - config=config_file - ) - ])) - return 'http://[%s]:%s' % (ip, port) - - def installMysqlServer(self, ip, port, database='erp5', user='user', - test_database='test_erp5', test_user='test_user', template_filename=None, - parallel_test_database_amount=100, mysql_conf=None): - if mysql_conf is None: - mysql_conf = {} - backup_directory = self.createBackupDirectory('mysql') - if template_filename is None: - template_filename = self.getTemplateFilename('my.cnf.in') - error_log = os.path.join(self.log_directory, 'mysqld.log') - slow_query_log = os.path.join(self.log_directory, 'mysql-slow.log') - mysql_conf.update( - ip=ip, - data_directory=os.path.join(self.data_root_directory, - 'mysql'), - tcp_port=port, - pid_file=os.path.join(self.run_directory, 'mysqld.pid'), - socket=os.path.join(self.run_directory, 'mysqld.sock'), - error_log=error_log, - slow_query_log=slow_query_log, - mysql_database=database, - mysql_user=user, - mysql_password=self.generatePassword(), - mysql_test_password=self.generatePassword(), - mysql_test_database=test_database, - mysql_test_user=test_user, - mysql_parallel_test_dict=[ - ('test_%i' % x,)*2 + (self.generatePassword(),) \ - for x in xrange(0,parallel_test_database_amount)], - ) - self.registerLogRotation('mysql', [error_log, slow_query_log], - '%(mysql_binary)s --no-defaults -B --user=root ' - '--socket=%(mysql_socket)s -e "FLUSH LOGS"' % dict( - mysql_binary=self.options['mysql_binary'], - mysql_socket=mysql_conf['socket'])) - self._createDirectory(mysql_conf['data_directory']) - - mysql_conf_path = self.createConfigurationFile("my.cnf", - self.substituteTemplate(template_filename, - mysql_conf)) - - mysql_script_list = [] - for x_database, x_user, x_password in \ - [(mysql_conf['mysql_database'], - mysql_conf['mysql_user'], - mysql_conf['mysql_password']), - (mysql_conf['mysql_test_database'], - mysql_conf['mysql_test_user'], - mysql_conf['mysql_test_password']), - ] + mysql_conf['mysql_parallel_test_dict']: - mysql_script_list.append(pkg_resources.resource_string(__name__, - 'template/initmysql.sql.in') % { - 'mysql_database': x_database, - 'mysql_user': x_user, - 'mysql_password': x_password}) - mysql_script_list.append('EXIT') - mysql_script = '\n'.join(mysql_script_list) - self.path_list.extend(zc.buildout.easy_install.scripts([('mysql_update', - __name__ + '.mysql', 'updateMysql')], self.ws, - sys.executable, self.wrapper_directory, arguments=[dict( - mysql_script=mysql_script, - mysql_binary=self.options['mysql_binary'].strip(), - mysql_upgrade_binary=self.options['mysql_upgrade_binary'].strip(), - socket=mysql_conf['socket'], - )])) - self.path_list.extend(zc.buildout.easy_install.scripts([('mysqld', - __name__ + '.mysql', 'runMysql')], self.ws, - sys.executable, self.wrapper_directory, arguments=[dict( - mysql_install_binary=self.options['mysql_install_binary'].strip(), - mysqld_binary=self.options['mysqld_binary'].strip(), - data_directory=mysql_conf['data_directory'].strip(), - mysql_binary=self.options['mysql_binary'].strip(), - socket=mysql_conf['socket'].strip(), - configuration_file=mysql_conf_path, - )])) - self.path_list.extend([mysql_conf_path]) - - # backup configuration - backup_directory = self.createBackupDirectory('mysql') - full_backup = os.path.join(backup_directory, 'full') - incremental_backup = os.path.join(backup_directory, 'incremental') - self._createDirectory(full_backup) - self._createDirectory(incremental_backup) - innobackupex_argument_list = [self.options['perl_binary'], - self.options['innobackupex_binary'], - '--defaults-file=%s' % mysql_conf_path, - '--socket=%s' %mysql_conf['socket'].strip(), '--user=root', - '--ibbackup=%s'% self.options['xtrabackup_binary']] - environment = dict(PATH='%s' % self.bin_directory) - innobackupex_incremental = zc.buildout.easy_install.scripts([( - 'innobackupex_incremental','slapos.recipe.librecipe.execute', 'executee')], - self.ws, sys.executable, self.bin_directory, arguments=[ - innobackupex_argument_list + ['--incremental'], - environment])[0] - self.path_list.append(innobackupex_incremental) - innobackupex_full = zc.buildout.easy_install.scripts([('innobackupex_full', - 'slapos.recipe.librecipe.execute', 'executee')], self.ws, - sys.executable, self.bin_directory, arguments=[ - innobackupex_argument_list, - environment])[0] - self.path_list.append(innobackupex_full) - backup_controller = zc.buildout.easy_install.scripts([ - ('innobackupex_controller', __name__ + '.innobackupex', 'controller')], - self.ws, sys.executable, self.bin_directory, - arguments=[innobackupex_incremental, innobackupex_full, full_backup, - incremental_backup])[0] - self.path_list.append(backup_controller) - mysql_backup_cron = os.path.join(self.cron_d, 'mysql_backup') - open(mysql_backup_cron, 'w').write('0 0 * * * ' + backup_controller) - self.path_list.append(mysql_backup_cron) - # The return could be more explicit database, user ... - return mysql_conf - diff --git a/slapos/recipe/pulse2/apache.py b/slapos/recipe/pulse2/apache.py deleted file mode 100644 index 861f787d0..000000000 --- a/slapos/recipe/pulse2/apache.py +++ /dev/null @@ -1,22 +0,0 @@ -import os -import sys -import time - - -def runApache(args): - sleep = 60 - conf = args[0] - while True: - ready = True - for f in conf.get('required_path_list', []): - if not os.path.exists(f): - print 'File %r does not exists, sleeping for %s' % (f, sleep) - ready = False - if ready: - break - time.sleep(sleep) - apache_wrapper_list = [conf['binary'], '-f', conf['config'], '-DFOREGROUND'] - apache_wrapper_list.extend(sys.argv[1:]) - sys.stdout.flush() - sys.stderr.flush() - os.execl(apache_wrapper_list[0], *apache_wrapper_list) diff --git a/slapos/recipe/pulse2/innobackupex.py b/slapos/recipe/pulse2/innobackupex.py deleted file mode 100644 index 246f4174b..000000000 --- a/slapos/recipe/pulse2/innobackupex.py +++ /dev/null @@ -1,25 +0,0 @@ -import os -import glob -def controller(args): - """Creates full or incremental backup - - If no full backup is done, it is created - - If full backup exists incremental backup is done starting with base - - base is the newest (according to date) full or incremental backup - """ - innobackupex_incremental, innobackupex_full, full_backup, incremental_backup \ - = args - if len(os.listdir(full_backup)) == 0: - print 'Doing full backup in %r' % full_backup - os.execv(innobackupex_full, [innobackupex_full, full_backup]) - else: - backup_list = filter(os.path.isdir, glob.glob(full_backup + "/*") + - glob.glob(incremental_backup + "/*")) - backup_list.sort(key=lambda x: os.path.getmtime(x), reverse=True) - base = backup_list[0] - print 'Doing incremental backup in %r using %r as a base' % ( - incremental_backup, base) - os.execv(innobackupex_incremental, [innobackupex_incremental, - '--incremental-basedir=%s'%base, incremental_backup]) diff --git a/slapos/recipe/pulse2/template/apache.in.in b/slapos/recipe/pulse2/template/apache.in.in deleted file mode 100644 index 3a8a8c7f6..000000000 --- a/slapos/recipe/pulse2/template/apache.in.in +++ /dev/null @@ -1,58 +0,0 @@ -# Apache static configuration -# Automatically generated - -# Basic server configuration -PidFile "%(pid_file)s" -LockFile "%(lock_file)s" -Listen %(ip)s:%(port)s -PHPINIDir %(php_ini_dir)s -ServerAdmin someone@email -DefaultType text/plain -TypesConfig conf/mime.types -AddType application/x-compress .Z -AddType application/x-gzip .gz .tgz -AddType application/x-httpd-php .php .phtml .php5 .php4 -AddType application/x-httpd-php-source .phps - -# Log configuration -ErrorLog "%(error_log)s" -LogLevel warn -LogFormat "%%h %%{REMOTE_USER}i %%l %%u %%t \"%%r\" %%>s %%b \"%%{Referer}i\" \"%%{User-Agent}i\"" combined -LogFormat "%%h %%{REMOTE_USER}i %%l %%u %%t \"%%r\" %%>s %%b" common -CustomLog "%(access_log)s" common - -# Directory protection -<Directory /> - Options FollowSymLinks - AllowOverride None - Order deny,allow - Deny from all -</Directory> - -Alias /mmc %(document_root)s -### Allow access to lmc web directory to everyone -<Directory %(document_root)s> - AllowOverride None - Order allow,deny - allow from all - php_flag short_open_tag on - php_flag magic_quotes_gpc on -</Directory> -DocumentRoot %(document_root)s -DirectoryIndex index.html index.php - -# List of modules -LoadModule authz_host_module modules/mod_authz_host.so -LoadModule log_config_module modules/mod_log_config.so -LoadModule setenvif_module modules/mod_setenvif.so -LoadModule version_module modules/mod_version.so -LoadModule proxy_module modules/mod_proxy.so -LoadModule proxy_http_module modules/mod_proxy_http.so -LoadModule mime_module modules/mod_mime.so -LoadModule dav_module modules/mod_dav.so -LoadModule dav_fs_module modules/mod_dav_fs.so -LoadModule negotiation_module modules/mod_negotiation.so -LoadModule rewrite_module modules/mod_rewrite.so -LoadModule headers_module modules/mod_headers.so -LoadModule dir_module modules/mod_dir.so -LoadModule php5_module modules/libphp5.so diff --git a/slapos/recipe/pulse2/template/memcached.in b/slapos/recipe/pulse2/template/memcached.in deleted file mode 100644 index 92dae43a9..000000000 --- a/slapos/recipe/pulse2/template/memcached.in +++ /dev/null @@ -1,2 +0,0 @@ -#!/bin/sh -exec %(memcached_binary)s -p %(memcached_port)s -U %(memcached_port)s -l %(memcached_ip)s diff --git a/slapos/recipe/pulse2/template/mmc-core.in b/slapos/recipe/pulse2/template/mmc-core.in deleted file mode 100644 index 2d29b6a82..000000000 --- a/slapos/recipe/pulse2/template/mmc-core.in +++ /dev/null @@ -1,2 +0,0 @@ -#!/bin/sh -exec %(mmc_core_binary)s -f %(mmc_core_config_file)s diff --git a/slapos/recipe/pulse2/template/mmc_conf/agent/config.ini b/slapos/recipe/pulse2/template/mmc_conf/agent/config.ini deleted file mode 100644 index 65d4535d8..000000000 --- a/slapos/recipe/pulse2/template/mmc_conf/agent/config.ini +++ /dev/null @@ -1,59 +0,0 @@ -[main] -host = %(mmc_host)s -port = %(mmc_port)s -# Credentials for HTTP basic authentication -login = mmc -password = s3cr3t -# RPC Session timeout in seconds. -# If unset default to Twisted hardcoded 900 seconds. -#sessiontimeout = 900 -# Multi-threading support (enabled by default) -#multithreading = 1 -#maxthreads = 20 -# SSL support -enablessl = 1 -localcert = %(ssl_localcert)s -cacert = %(ssl_cacert)s -# Certificate check -# verifypeer = 0 -# Path to the file containing the Certificate Authority (PEM format) -# cacert = -# Path to the file containing the local key and certificate (PEM format) -# localcert = - -[daemon] -user = %(daemon_user)s -group = %(daemon_user)s -umask = 0077 -pidfile= %(daemon_pidfile)s -# user = mmc -# group = mmc -# umask = 0007 -# pidfile= /var/run/mmc-agent.pid - -[loggers] -keys=root - -[handlers] -keys=hand01,hand02 - -[formatters] -keys=form01 - -[logger_root] -level=NOTSET -handlers=hand01 - -[handler_hand01] -class=FileHandler -level=INFO -formatter=form01 -args=("%s" % %(mmc_log)s,) - -[handler_hand02] -class=StreamHandler -level=DEBUG -args=(sys.stderr,) - -[formatter_form01] -format=%(asctime)s #%(thread)d %(levelname)s %(message)s diff --git a/slapos/recipe/pulse2/template/mmc_conf/agent/config.ini.in b/slapos/recipe/pulse2/template/mmc_conf/agent/config.ini.in deleted file mode 100644 index 65d4535d8..000000000 --- a/slapos/recipe/pulse2/template/mmc_conf/agent/config.ini.in +++ /dev/null @@ -1,59 +0,0 @@ -[main] -host = %(mmc_host)s -port = %(mmc_port)s -# Credentials for HTTP basic authentication -login = mmc -password = s3cr3t -# RPC Session timeout in seconds. -# If unset default to Twisted hardcoded 900 seconds. -#sessiontimeout = 900 -# Multi-threading support (enabled by default) -#multithreading = 1 -#maxthreads = 20 -# SSL support -enablessl = 1 -localcert = %(ssl_localcert)s -cacert = %(ssl_cacert)s -# Certificate check -# verifypeer = 0 -# Path to the file containing the Certificate Authority (PEM format) -# cacert = -# Path to the file containing the local key and certificate (PEM format) -# localcert = - -[daemon] -user = %(daemon_user)s -group = %(daemon_user)s -umask = 0077 -pidfile= %(daemon_pidfile)s -# user = mmc -# group = mmc -# umask = 0007 -# pidfile= /var/run/mmc-agent.pid - -[loggers] -keys=root - -[handlers] -keys=hand01,hand02 - -[formatters] -keys=form01 - -[logger_root] -level=NOTSET -handlers=hand01 - -[handler_hand01] -class=FileHandler -level=INFO -formatter=form01 -args=("%s" % %(mmc_log)s,) - -[handler_hand02] -class=StreamHandler -level=DEBUG -args=(sys.stderr,) - -[formatter_form01] -format=%(asctime)s #%(thread)d %(levelname)s %(message)s diff --git a/slapos/recipe/pulse2/template/mmc_conf/mmc.ini.in b/slapos/recipe/pulse2/template/mmc_conf/mmc.ini.in deleted file mode 100644 index 31fb45338..000000000 --- a/slapos/recipe/pulse2/template/mmc_conf/mmc.ini.in +++ /dev/null @@ -1,53 +0,0 @@ -[global] -; RPC backend to use -backend = xmlrpc - -; HTTP basic authentication credentials to use for XMLRPC communication -login = mmc -password = s3cr3t - -; Root URL where the MMC web pages are installed -; root= /mmc/ for http://127.0.0.1/mmc/ -root = /mmc/ - -; Filesystem path where the MMC web modules are installed -rootfsmodules = %(mmc_location)s/modules/ - -; Available pagination steps -pagination = 10 20 50 100 - -; Number of items to display in lists -maxperpage = 10 - -; Declare if this installation is a community version or not -; community can be yes or no -community = yes - -; Debug section -[debug] -; 0 : no information -; 1 : XMLRPC calls and results are displayed by the web interface -level = 0 - -; Login page title -; UTF-8 strings must be used -[logintitle] -; Default page title for English and non-translated languages -C = -; French title -fr_FR = -; Spanish title -es_ES = - -[server_01] -description = localhost -url = https://127.0.0.1:7080 -; Timeout in seconds for all socket I/O operations -; Beware that timeout on a SSL socket only works with PHP >= 5.2.1 -; timeout = 300 -; SSL certificate check support -; verifypeer = 0 -; Path to the file containing the Certificate Authority (PEM format) -; cacert = -; Path to the file containing the local key and certificate (PEM format) -; localcert = diff --git a/slapos/recipe/pulse2/template/mmc_conf/plugins/base.ini b/slapos/recipe/pulse2/template/mmc_conf/plugins/base.ini deleted file mode 100644 index ef41ad690..000000000 --- a/slapos/recipe/pulse2/template/mmc_conf/plugins/base.ini +++ /dev/null @@ -1,190 +0,0 @@ -[ldap] -# LDAP we are connected to -# If ldapurl starts with "ldaps://", use LDAP over SSL on the LDAPS port. -# LDAPS is deprecated, and you should use StartTLS. -# If ldapverifypeer = demand, always use the server hostname instead of its IP -# address in the LDAP URL. This hostname must match the CN field of the server -# certificate. -ldapurl = ldap://%(ldap_host)s:%(ldap_port)s -# Network timeout in seconds for LDAP operations. No default timeout set. -#network_timeout = -# TLS connection parameters when LDAPS is not used: -# off - never use TLS (default value) -# start_tls - Use the LDAPv3 StartTLS extended operation (better) -#start_tls = off -# If start_tls != off or LDAPS, specify check to perform on server certificate: -# never - don't ask certificate -# demand - request certificate. If none or bad certificate provided, stop the -# connection (recommended) -#ldapverifypeer = demand -# Client certicates to use (default are empty) for LDAPS or TLS connections: -# For example: /etc/ssl/certs -#cacertdir = -# For example: /etc/mmc/certs/demoCA/cacert.pem -#cacert = -# For example: /etc/mmc/certs/client.cert -#localcert = -# For example: /etc/mmc/certs/client.key -#localkey = -# Accepted ciphers -# Use this for more security: TLSv1+SHA1+AES+DH:CAMELLIA:!NULL:!ADH -#ciphersuites = TLSv1:!NULL -# LDAP debug level - set this to 255 to debug LDAP connection problems -#ldapdebuglevel = 0 -# LDAP base DN -baseDN = dc=mandriva, dc=com -# Users location in the LDAP -baseUsersDN = ou=Users, %%(basedn)s -# Groups location in the LDAP -baseGroupsDN = ou=Groups, %%(basedn)s -# LDAP manager -rootName = cn=admin, %%(basedn)s -password = secret -# If enabled, the MMC will create/move/delete the home of the users -# Else will do nothing, but only write user informations into LDAP -userHomeAction = 1 -# Skeleton directory to populate a new home directory -skelDir = /etc/skel -# If set, all new users will belong to this group when created -defaultUserGroup = Domain Users -# Default home directory for users -defaultHomeDir = /home -# user uid number start -uidStart = 10000 -# group gid number start -gidStart = 10000 -# LDAP log file path -logfile = %(ldap_logfile_path)s -# FDS log file path -# logfile = /opt/fedora-ds/slapd-hostname/logs/access - -# you can specify here where you can authorized creation of your homedir -# default is your defaultHomeDir -# example: -# authorizedHomeDir = /home, /home2, /mnt/depot/newhome - -# LDAP user password scheme to use -# Possible values are "ssha", "crypt" and "passmod" -# "passmod" uses the LDAP Password Modify Extended Operations to change -# password. The password encryption is done by the LDAP server. -passwordscheme = passmod - -#[backup-tools] -## Path of the backup tools -#path = /usr/lib/mmc/backup-tools -## Where are put the archives -#destpath = /home/archives - -# Computer inventory plugin to use (Pulse 2 related option) -# [computers] -# method = glpi -# method = inventory - -# Audit system configuration -# If commented, the audit module will be disabled -# [audit] -# method = database -# dbhost = localhost -# MySQL and PostgreSQL backends are available -# dbdriver = postgres -# dbport = 5432 -# dbdriver = mysql -# dbport = 3306 -# dbuser = audit -# dbpassword = audit -# dbname = audit - -# User authentication configuration -#[authentication] -# Authenticators chain -#method = baseldap externalldap - -# baseldap authenticator configuration -#[authentication_baseldap] -# Set a list of login that will only be authentified using this authenticator -#authonly = root - -# Externalldap authenticator configuration -#[authentication_externalldap] -# Login list that won't be authenticated with this authenticator. -#exclude = -# If set, only the speficied logins will be authenticated with this -# authenticator. -#authonly = -# Set whether this authenticator is mandatory. If it is mandatory and can't be -# validated during the mmc-agent activation phase, the mmc-agent exits with an -# error. -#mandatory = True -# LDAP server URLs. The LDAP server are selected in the given order when -# authenticating a user. -#ldapurl = ldap://192.168.0.1:389 ldap://192.168.0.2:389 -# LDAP connection timeout in seconds. If the LDAP connection failed after this -# timeout, we try the next LDAP server in the list or give up if it the last. -#network_timeout = -# LDAP suffix where to search for user -#suffix = cn=Users,dc=mandriva,dc=com -# How to bind to the LDAP. Empty if anonymous -#bindname = cn=account, cn=Users, dc=linboxad, dc=com -#bindpasswd = s3cr3t -#bindname = -#bindpasswd = -# User filter -#filter = objectClass=* -# User attribute containing her/his login -#attr = cn - -# User provisioning configuration -#[provisioning] -#method = externalldap - -# externalldap provisioner configuration -#[provisioning_externalldap] -# Login list that won't be provisioned with this provisioner -#exclude = root -# These attributes are mandatory to create a user -#ldap_uid = cn -#ldap_givenName = sn -#ldap_sn = sn -# Other attributes to fill in -#ldap_mail = mail -#... -# We are able to fill the ACL fields the user logs in according to the value of -# an attribute from the external LDAP. -# What is the field name ? -#profile_attr = -# Here we define two profiles: profile1 and profile2 -# profile1 allows the user to log in and change her/his password in the web -# interface -#profile_acl_profile1= :base#users#passwd/ -# profile2 disallows the user to do anything (no ACL defined) -#profile_acl_profile2 = -# ... You can define as much profile_acl_* options as you need -# For each profile, we can create a group of user, and put users with a given -# profile in the corresponding group automatically when they log in. -# Set the next line to True to activate profile to group mapping -#profile_group_mapping = False -# A prefix for the created group can be set -#profile_group_prefix = - -# Example userdefault settings to support Kerberos -# [userdefault] -# objectClass = +krb5KDCEntry,krb5Principal -# krb5KeyVersionNumber = 1 -# krb5KDCFlags = 126 -# krb5PrincipalName = %uid%@DOMAIN - -# Subscription informations -# [subscription] -# product_name = MDS -# vendor_name = Mandriva -# vendor_mail = sales@mandriva.com -# customer_name = -# customer_mail = -# comment = -# users = 0 -# computers = 0 -# # Support informations -# support_mail = customer@customercare.mandriva.com -# support_phone = 0810 LINBOX -# support_comment = - diff --git a/slapos/recipe/pulse2/template/mmc_conf/plugins/base.ini.in b/slapos/recipe/pulse2/template/mmc_conf/plugins/base.ini.in deleted file mode 100644 index ef41ad690..000000000 --- a/slapos/recipe/pulse2/template/mmc_conf/plugins/base.ini.in +++ /dev/null @@ -1,190 +0,0 @@ -[ldap] -# LDAP we are connected to -# If ldapurl starts with "ldaps://", use LDAP over SSL on the LDAPS port. -# LDAPS is deprecated, and you should use StartTLS. -# If ldapverifypeer = demand, always use the server hostname instead of its IP -# address in the LDAP URL. This hostname must match the CN field of the server -# certificate. -ldapurl = ldap://%(ldap_host)s:%(ldap_port)s -# Network timeout in seconds for LDAP operations. No default timeout set. -#network_timeout = -# TLS connection parameters when LDAPS is not used: -# off - never use TLS (default value) -# start_tls - Use the LDAPv3 StartTLS extended operation (better) -#start_tls = off -# If start_tls != off or LDAPS, specify check to perform on server certificate: -# never - don't ask certificate -# demand - request certificate. If none or bad certificate provided, stop the -# connection (recommended) -#ldapverifypeer = demand -# Client certicates to use (default are empty) for LDAPS or TLS connections: -# For example: /etc/ssl/certs -#cacertdir = -# For example: /etc/mmc/certs/demoCA/cacert.pem -#cacert = -# For example: /etc/mmc/certs/client.cert -#localcert = -# For example: /etc/mmc/certs/client.key -#localkey = -# Accepted ciphers -# Use this for more security: TLSv1+SHA1+AES+DH:CAMELLIA:!NULL:!ADH -#ciphersuites = TLSv1:!NULL -# LDAP debug level - set this to 255 to debug LDAP connection problems -#ldapdebuglevel = 0 -# LDAP base DN -baseDN = dc=mandriva, dc=com -# Users location in the LDAP -baseUsersDN = ou=Users, %%(basedn)s -# Groups location in the LDAP -baseGroupsDN = ou=Groups, %%(basedn)s -# LDAP manager -rootName = cn=admin, %%(basedn)s -password = secret -# If enabled, the MMC will create/move/delete the home of the users -# Else will do nothing, but only write user informations into LDAP -userHomeAction = 1 -# Skeleton directory to populate a new home directory -skelDir = /etc/skel -# If set, all new users will belong to this group when created -defaultUserGroup = Domain Users -# Default home directory for users -defaultHomeDir = /home -# user uid number start -uidStart = 10000 -# group gid number start -gidStart = 10000 -# LDAP log file path -logfile = %(ldap_logfile_path)s -# FDS log file path -# logfile = /opt/fedora-ds/slapd-hostname/logs/access - -# you can specify here where you can authorized creation of your homedir -# default is your defaultHomeDir -# example: -# authorizedHomeDir = /home, /home2, /mnt/depot/newhome - -# LDAP user password scheme to use -# Possible values are "ssha", "crypt" and "passmod" -# "passmod" uses the LDAP Password Modify Extended Operations to change -# password. The password encryption is done by the LDAP server. -passwordscheme = passmod - -#[backup-tools] -## Path of the backup tools -#path = /usr/lib/mmc/backup-tools -## Where are put the archives -#destpath = /home/archives - -# Computer inventory plugin to use (Pulse 2 related option) -# [computers] -# method = glpi -# method = inventory - -# Audit system configuration -# If commented, the audit module will be disabled -# [audit] -# method = database -# dbhost = localhost -# MySQL and PostgreSQL backends are available -# dbdriver = postgres -# dbport = 5432 -# dbdriver = mysql -# dbport = 3306 -# dbuser = audit -# dbpassword = audit -# dbname = audit - -# User authentication configuration -#[authentication] -# Authenticators chain -#method = baseldap externalldap - -# baseldap authenticator configuration -#[authentication_baseldap] -# Set a list of login that will only be authentified using this authenticator -#authonly = root - -# Externalldap authenticator configuration -#[authentication_externalldap] -# Login list that won't be authenticated with this authenticator. -#exclude = -# If set, only the speficied logins will be authenticated with this -# authenticator. -#authonly = -# Set whether this authenticator is mandatory. If it is mandatory and can't be -# validated during the mmc-agent activation phase, the mmc-agent exits with an -# error. -#mandatory = True -# LDAP server URLs. The LDAP server are selected in the given order when -# authenticating a user. -#ldapurl = ldap://192.168.0.1:389 ldap://192.168.0.2:389 -# LDAP connection timeout in seconds. If the LDAP connection failed after this -# timeout, we try the next LDAP server in the list or give up if it the last. -#network_timeout = -# LDAP suffix where to search for user -#suffix = cn=Users,dc=mandriva,dc=com -# How to bind to the LDAP. Empty if anonymous -#bindname = cn=account, cn=Users, dc=linboxad, dc=com -#bindpasswd = s3cr3t -#bindname = -#bindpasswd = -# User filter -#filter = objectClass=* -# User attribute containing her/his login -#attr = cn - -# User provisioning configuration -#[provisioning] -#method = externalldap - -# externalldap provisioner configuration -#[provisioning_externalldap] -# Login list that won't be provisioned with this provisioner -#exclude = root -# These attributes are mandatory to create a user -#ldap_uid = cn -#ldap_givenName = sn -#ldap_sn = sn -# Other attributes to fill in -#ldap_mail = mail -#... -# We are able to fill the ACL fields the user logs in according to the value of -# an attribute from the external LDAP. -# What is the field name ? -#profile_attr = -# Here we define two profiles: profile1 and profile2 -# profile1 allows the user to log in and change her/his password in the web -# interface -#profile_acl_profile1= :base#users#passwd/ -# profile2 disallows the user to do anything (no ACL defined) -#profile_acl_profile2 = -# ... You can define as much profile_acl_* options as you need -# For each profile, we can create a group of user, and put users with a given -# profile in the corresponding group automatically when they log in. -# Set the next line to True to activate profile to group mapping -#profile_group_mapping = False -# A prefix for the created group can be set -#profile_group_prefix = - -# Example userdefault settings to support Kerberos -# [userdefault] -# objectClass = +krb5KDCEntry,krb5Principal -# krb5KeyVersionNumber = 1 -# krb5KDCFlags = 126 -# krb5PrincipalName = %uid%@DOMAIN - -# Subscription informations -# [subscription] -# product_name = MDS -# vendor_name = Mandriva -# vendor_mail = sales@mandriva.com -# customer_name = -# customer_mail = -# comment = -# users = 0 -# computers = 0 -# # Support informations -# support_mail = customer@customercare.mandriva.com -# support_phone = 0810 LINBOX -# support_comment = - diff --git a/slapos/recipe/pulse2/template/mmc_conf/plugins/ppolicy.ini.in b/slapos/recipe/pulse2/template/mmc_conf/plugins/ppolicy.ini.in deleted file mode 100644 index ea4a9f8f6..000000000 --- a/slapos/recipe/pulse2/template/mmc_conf/plugins/ppolicy.ini.in +++ /dev/null @@ -1,26 +0,0 @@ -[main] -disable = 1 - -[ppolicy] -# Branch where the password policies are stored -ppolicyDN = ou=Password Policies, %(baseDN)s -# Name of the default password policy -ppolicyDefault = default - -# This options are used only once to create the default password policy entry -# into the LDAP -[ppolicyattributes] -pwdAttribute = userPassword -pwdLockout = True -pwdMaxFailure = 5 -pwdLockoutDuration = 900 -# Password can't be change if it not 7 days old -pwdMinAge = 25200 -# Password expiration is 42 days -pwdMaxAge = 3628800 -pwdMinLength = 8 -pwdInHistory = 5 -pwdMustChange = True -# To check password quality -pwdCheckModule = mmc-check-password.so -pwdCheckQuality = 2 diff --git a/slapos/recipe/pulse2/template/pulse2_conf/plugins/dyngroup.ini.in b/slapos/recipe/pulse2/template/pulse2_conf/plugins/dyngroup.ini.in deleted file mode 100644 index 2d962546a..000000000 --- a/slapos/recipe/pulse2/template/pulse2_conf/plugins/dyngroup.ini.in +++ /dev/null @@ -1,34 +0,0 @@ -[main] -# Is the plugin disable ? -disable = 0 -# Are dynamic group enable ? -dynamic_enable = 1 -# Are profiles enable ? -# profiles_enable = 0 - -# Preselected module in the dynamic group creation page -# default_module = - -# Maximum number of elements in the static group creation list -# max_elements_for_static_list = 2000 - -[database] -dbdriver = mysql -dbhost = %(mysql_host)s -dbport = %(mysql_port)s -dbuser = %(mysql_user)s -dbpasswd = %(mysql_password)s -dbname = dyngroup -# dbsslenable = 0 -# dbsslca = -# dbsslcert = -# dbsslkey = -# Database connection lifetime -# dbpoolrecycle = 60 -# Database connection pool size -# dbpoolsize = 5 - -[querymanager] -# can we query on group names ? -activate = 0 - diff --git a/slapos/recipe/pulse2/template/pulse2_conf/plugins/glpi.ini.in b/slapos/recipe/pulse2/template/pulse2_conf/plugins/glpi.ini.in deleted file mode 100644 index 0e0560560..000000000 --- a/slapos/recipe/pulse2/template/pulse2_conf/plugins/glpi.ini.in +++ /dev/null @@ -1,53 +0,0 @@ -[main] -disable = 0 -dbdriver = mysql -dbhost = %(mysql_host)s -dbport = %(mysql_port)s -dbuser = %(mysql_user)s -dbpasswd = %(mysql_password)s -dbname = glpi -# dbsslenable = 0 -# dbsslca = -# dbsslcert = -# dbsslkey = -# Database connection lifetime -# dbpoolrecycle = 60 -# Database connection pool size -# dbpoolsize = 5 - -# Allow users to filter computers list using an entity selector -localisation = True -# Accepted GLPI profiles. A user must have her/his GLPI profile in this list -# else she/he can't display any computers from the GLPI inventory -# active_profiles = profile1 profile2 profile3 -# Only display computers with the specified state -# filter_on = state=3 - -# Give the uri to link to for a computer inventory -# glpi_computer_uri = -# should be something like that : -# glpi_computer_uri = http://localhost/glpi/front/computer.form.php?ID= - -# Tell whether the query manager of the dyngroup plugin can use this module -[querymanager] -activate = True - -#聽GLPI authentication configuration -#[authentication_glpi] -# URL to connect to the GLPI HTTP interface ? -#baseurl = http://glpi-server/glpi/ - -#聽GLPI provisioning configuration -#[provisioning_glpi] -# Users that will never be provisioned -#exclude = root -#聽Before provisioning, should we perform a GLPI authentication to create or -#聽update the user聽informations in the GLPI database ? -#doauth = 1 -#聽MMC web interface ACLs definition according to the user GLPI profile -#profile_acl_profile1 = :##:base#main#default -#profile_acl_profile2 = -#profile_acl_profile3 = -#聽If the user belong to more than one profile, the first profile of this list -#聽will be used -#profiles_order = profile1 profile2 profile3 diff --git a/slapos/recipe/pulse2/template/pulse2_conf/plugins/imaging.ini.in b/slapos/recipe/pulse2/template/pulse2_conf/plugins/imaging.ini.in deleted file mode 100644 index bd48e36e4..000000000 --- a/slapos/recipe/pulse2/template/pulse2_conf/plugins/imaging.ini.in +++ /dev/null @@ -1,35 +0,0 @@ -[main] -disable = 0 - -[database] -# dbdriver = mysql -# dbhost = localhost -# dbport = 3306 -# dbname = imaging -# dbuser = mmc -# dbpasswd = mmc -# dbsslenable = 0 -# dbsslca = /etc/mmc/pulse2/imaging/cacert.pem -# dbsslcert = /etc/mmc/pulse2/imaging/cert.pem -# dbsslkey = /etc/mmc/pulse2/imaging/key.pem -# Database connection lifetime -# dbpoolrecycle = 60 -# Database connection pool size -# dbpoolsize = 5 - -# [web] -# ##### Interface customization ##### -# user may want to override the way dates are displayed (see http://www.php.net/date for more informations) -# web_def_date_fmt = "%Y-%m-%d %H:%M:%S" -# web_def_default_protocol = nfs -# Menu settings -# web_def_default_menu_name = Menu -# web_def_default_timeout = 60 -# web_def_default_background_uri = -# web_def_default_message = Warning ! Your PC is being backed up or restored. Do not reboot ! -# start options -# web_def_kernel_parameters = quiet -# backup/restore options -# web_def_image_parameters = - - diff --git a/slapos/recipe/pulse2/template/pulse2_conf/plugins/inventory.ini.in b/slapos/recipe/pulse2/template/pulse2_conf/plugins/inventory.ini.in deleted file mode 100644 index 0e90816de..000000000 --- a/slapos/recipe/pulse2/template/pulse2_conf/plugins/inventory.ini.in +++ /dev/null @@ -1,73 +0,0 @@ -[main] -disable = 0 -displayLocalisationBar = 0 -# Example of software filter when querying a computer inventory. -# All softwares containing the KB string will be excluded -# software_filter = %KB% - -[inventory] -dbdriver = mysql -dbhost = %(mysql_host)s -dbport = %(mysql_port)s -dbuser = %(mysql_user)s -dbpasswd = %(mysql_password)s -dbname = inventory -dbsslenable = 0 -dbsslca = %(inventory_ssl_cacert)s -dbsslcert = %(inventory_ssl_cert)s -dbsslkey = %(inventory_ssl_key)s -# Database connection lifetime -# dbpoolrecycle = 60 -# Database connection pool size -# dbpoolsize = 5 - -[computers] -# display = cn::Computer Name||displayName::Description -# content = - -[expert_mode] -Bios = BiosVersion|ChipSerial|BiosVendor|SmbManufacturer|SmbProduct|SmbVersion|SmbSerial|SmbUUID|SmbType|DateFirstSwitchOn -Network = CardType|MIB|Bandwidth|NetworkType|SubnetMask|State -Hardware = Build|Version|ProcessorCount|SwapSpace|User|Date|Workgroup|RegisteredName|RegisteredCompany|OSSerialNumber|Type|OsSerialKey|ProcessorFrequency|Host -Software = ProductPath|Type|Icon|UninstallPath|ExecutableSize|Application -Controller = ExpandedType|HardwareVersion|StandardType -Drive = DriveType|FileCount|FileSystem -Input = StandardDescription|ExpandedDescription|Connector -Memory = ExtendedDescription|SlotCount -Monitor = Stamp|Type|Serial|Manuf -Pci = -Port = Stamp -Printer = -Slot = -Sound = Description -Storage = ExtendedType|VolumeName|Media -VideoCard = - -[graph] -Network = Gateway -Hardware = OperatingSystem|ProcessorType -Memory = Size - -# [querymanager] -# list = Entity/Label||Software/ProductName||Hardware/ProcessorType||Hardware/OperatingSystem||Drive/TotalSpace||Inventory/Date -# double = Software/Products::Software/ProductName##Software/ProductVersion -# halfstatic = Registry/Value/display name::Path##DisplayName -# extended = Inventory/Date||Drive/TotalSpace - -# [provisioning_inventory] -# Users that will never be provisioned -# exclude = root -# A user can be automatically linked to a list of entities according to his -# profile. -# What is the LDAP field name that defines its profile name ? -# profile_attr = -# Here are the possible notations for profile to entities mapping: -# A simple list of the entities names -# profile_entity_profile1 = entityA entityB -# The dot char is the root entity -# profile_entity_profile2 = . -# In this example the content of the multi-valued 'pulse2entity' LDAP attribute -# will be used -# profile_entity_profile3 = %pulse2entity% -# Here the provisioning plugin 'network_to_entity' will be used -# profile_entity_profile4 = plugin:network_to_entity diff --git a/slapos/recipe/pulse2/template/pulse2_conf/plugins/msc.ini.in b/slapos/recipe/pulse2/template/pulse2_conf/plugins/msc.ini.in deleted file mode 100644 index cdb2ed9a2..000000000 --- a/slapos/recipe/pulse2/template/pulse2_conf/plugins/msc.ini.in +++ /dev/null @@ -1,143 +0,0 @@ -[main] -disable = 0 - -[msc] -# repopath = /var/lib/pulse2/packages -# qactionspath = /var/lib/pulse2/qactions -# download_directory_path = /var/lib/pulse2/downloads -# dbdriver = mysql -# dbhost = localhost -# dbport = 3306 -# dbname = msc -# dbuser = mmc -# dbpasswd = mmc -# dbdebug = ERROR -# Database connection lifetime -# dbpoolrecycle = 60 -# Database connection pool size -# dbpoolsize = 5 -# SSL support -# dbsslenable = 0 -# dbsslca = -# dbsslcert = -# dbsslkey = -# Computer's IP addresses filtering -# ignore_non_rfc2780 = 1 -# ignore_non_rfc1918 = 0 -# Comma separated values of excluded or included IP addresses or ranges -# For example: exclude_ipaddr = 192.168.0.1,10.0.0.0/10.255.255.255 -# Included addresses are never filtered. -# exclude_ipaddr = -# include_ipaddr = -# Computer's host name filtering -# ignore_non_fqdn = 0 -# ignore_invalid_hostname = 0 -# Space separated list regexp for rejected or accepted host name -# Host name matching the regexp in include_hostname are always accepted -# For example: exclude_hostname = ^computer[0-9]*$ ^server[0-9]*$ -# exclude_hostname = -# include_hostname = -# Computer's MAC addresses filtering -# wol_macaddr_blacklist = -# default scheduler used by the msc -default_scheduler = scheduler_01 - -[scheduler_api] -host = %(ipv4)s -port = 9990 -username = -password = -enablessl = 1 -# verifypeer = 0 -# cacert = -# localcert = - -[scheduler_01] -host = %(ipv4)s -port = 8000 -username = username -password = password -enablessl = 1 -# verifypeer = 0 -# cacert = -# localcert = - -[web] -# ##### Interface customization ##### -# user may want to override the way dates are displayed (see http://www.php.net/date for more informations) -# web_def_date_fmt = "%Y-%m-%d %H:%M:%S" -# -# ##### Deployment default settings ##### -# pre-check the "awake" checkbox in 'standard' deploy mode -# web_def_awake = 1 -# pre-check the "do inventory" checkbox in 'standard' deploy mode -# web_def_inventory = 1 -# hidden option -# web_show_reboot = 0 -# pre-select the following mode in 'advanced' deploy mode - -# the two available modes are push and push_pull -# web_def_mode = push -# if set to False, the following setting allow the user to toggle between push and push/pull mode in advanced mode -# web_force_mode = True -# web_def_maxbw = 0 -# web_def_delay = 60 -# web_def_attempts = 3 -# web_def_deployment_intervals = -# web_dlpath = -# Max bandwidth for file download in Kbit/s -# web_def_dlmaxbw = 0 -# -# ##### Proxy default settings #### -# May the local proxy system be used ? -# web_allow_local_proxy = False -# default proxy mode, defaut "multiple", other possible value "single" -# web_def_local_proxy_mode = multiple -# Max number of clients per proxy in proxy mode -# web_def_max_clients_per_proxy = 10 -# Number of auto-selected proxy in semi-auto mode -# web_def_proxy_number = 2 -# default mode (semi_auto / manual) -# web_def_proxy_selection_mode = semi_auto -# -# ##### VNC Applet default settings #### -# Here we may define the VNC applet behavior (in some way) -# may the VNC applet used ? (this setting simply (en/dis)able the display of the VNC action button) -# vnc_show_icon = True -# allow user to interact with remote desktop ? -# vnc_view_only = True -# use the following VNC client pre-defined rules, -# currently available profiles: -# fiber: for high speed local networks (low latency, 10 Mb/s per connection) -# lan: for 100 Mb local networks (low latency, 3 Mb/s per connection) -# cable: for high-end broadband links (high latency, 400 kb/s per connection) -# dsl: for low-end broadband links (high latency, 120 kb/s per connection) -# isdn: (high latency, 75 kb/s) -# vnc_network_connectivity = lan -# display applet control to user -# vnc_allow_user_control = False -# the port to use to connect to a VNC -# vnc_port = 5900 - -# -# ##### Client probing behavior #### -# the LED which represents the client status can take four colors: -# black => no probe done -# red => all probe failed -# orange => minimal probe succedeed (ping), maximal probe failed (ssh) -# green => all probe succedeed -# available probes are: none (field is empty), ping, ssh, ping_ssh (ie. both) -# for networks where icmp is not allowed, ping may be disabled: probe_order=ssh -# to speed-up display, ssh may be disabled: probe_order=ping -# to fully disable probe: probe_order= -# default conf: ping_ssh, in other terms: ping = orange, ssh = green -# probe_order=ping_ssh - -[package_api] -# mserver = 127.0.0.1 -# mport = 9990 -# mmountpoint = /rpc -# enablessl = 1 -# verifypeer = 0 -# localcert = -# cacert = diff --git a/slapos/recipe/pulse2/template/pulse2_conf/plugins/pkgs.ini.in b/slapos/recipe/pulse2/template/pulse2_conf/plugins/pkgs.ini.in deleted file mode 100644 index 70f2f44d9..000000000 --- a/slapos/recipe/pulse2/template/pulse2_conf/plugins/pkgs.ini.in +++ /dev/null @@ -1,15 +0,0 @@ -[main] -disable = 0 - -[user_package_api] -server = localhost -port = 9990 -mountpoint = /upaa -username = -password = -enablessl = 1 -# verifypeer = 0 -# cacert = -# localcert = - - diff --git a/slapos/recipe/pulse2/template/pulse2_conf/plugins/pulse2.ini.in b/slapos/recipe/pulse2/template/pulse2_conf/plugins/pulse2.ini.in deleted file mode 100644 index 8be42c1a9..000000000 --- a/slapos/recipe/pulse2/template/pulse2_conf/plugins/pulse2.ini.in +++ /dev/null @@ -1,16 +0,0 @@ -[main] -disable = 0 - -# [database] -# dbdriver = mysql -# dbhost = localhost -# dbport = 3306 -# dbname = pulse2 -# dbuser = mmc -# dbpasswd = mmc -# dbsslenable = 0 -# dbsslca = -# dbsslcert = -# dbsslkey = - - diff --git a/slapos/recipe/pulse2/template/pulse2_conf/pulse2/atftpd/pcre.conf.in b/slapos/recipe/pulse2/template/pulse2_conf/pulse2/atftpd/pcre.conf.in deleted file mode 100644 index 8065552c8..000000000 --- a/slapos/recipe/pulse2/template/pulse2_conf/pulse2/atftpd/pcre.conf.in +++ /dev/null @@ -1,14 +0,0 @@ -^/tftpboot/revoboot/bin/revoboot.pxe$ bootloader/pxe_boot -^/bootloader/pxe_boot$ bootloader/pxe_boot -^/bootloader/bootsplash.xpm$ bootloader/bootsplash.xpm -^/bootmenus/default bootmenus/default -^/bootmenus/([0-9A-F]{12}) bootmenus/$1 -^/bootmenus/([0-9A-F]{8}) bootmenus/$1 -^/custom/(.+) custom/$1 -^/diskless/kernel$ diskless/kernel -^/diskless/initrd$ diskless/initrd -^/diskless/memtest$ diskless/memtest -^/tools/memtest$ diskless/memtest -^/masters/(.+) masters/$1 -^/(.*)$ ? -.* ? diff --git a/slapos/recipe/pulse2/template/pulse2_conf/pulse2/imaging-server/imaging-server.ini.in b/slapos/recipe/pulse2/template/pulse2_conf/pulse2/imaging-server/imaging-server.ini.in deleted file mode 100644 index e4b2c379b..000000000 --- a/slapos/recipe/pulse2/template/pulse2_conf/pulse2/imaging-server/imaging-server.ini.in +++ /dev/null @@ -1,116 +0,0 @@ -[main] -# We will bind on this address ... -# host = 0.0.0.0 -# ... and this UDP port -# port = 1001 -# required password to record a client, not checked if empty -# adminpass = - -[daemon] -# as we are a service, we need some info to be run, such as: -# - the identity we will run into -# user = root -# group = root -# - our umask -# umask = 0077 -# and where to record our PID -# pidfile= /var/run/pulse2-imaging-server.pid - -[package-server] -# here are described how to talk to our referent package server -# -# host = 127.0.0.1 -# port = 9990 -# mount_point = /imaging_api -# enablessl = True -# username = username -# password = password -# cacert = /etc/mmc/pulse2/imaging-server/keys/cacert.pem -# localcert = /etc/mmc/pulse2/imaging-server/keys/privkey.pem -# verifypeer = False - -[hooks] -# hooks_dir = /usr/lib/pulse2/imaging-server/hooks -# -# 0xAD => "I'm new" action : menu creation request, triggered by the bootloader -# arg[1] = source MAC (short) -# arg[2] = given ID (short) -# arg[3] = given PASSWORD (optionnal) -# exit 0 on success -# create_client_path = create_client -# -# 0xAA => "I just booted" action : menu update request + inventory processing request, triggered by the bootloader -# arg[1] = source MAC (short) -# boot_client_path = boot_client -# arg[1] = source MAC (short) -# arg[2] = where the inventory is temporaly stored -# process_inventory_path = process_inventory -# -# 0xEC => "I just started a backup" : start a backup request, triggered by revoinc -# arg[1] = source MAC (short) -# arg[2] = kind of backup (L = image, B = Master) -# exit 0 on success -# start_image_path = start_image -# -# 0xED => "I just finished a backup" : end a backup request, triggered by revodoneimage -# end_image_path = end_image -# -# 0xCD => "Change my default menu" => change default menu request, triggered by revodefault -# arg[1] = source MAC (short) -# arg[2] = item to use -# exit 0 on success -# change_default_path = change_default -# -# 0x4C => log stuff -# arg[1] = source MAC (short) -# arg[2] = action : -# 0 => booted -# 1 => took item arg[3] -# 2 => starting restoration (more info in arg[3]) -# 3 => finished restoration (more info in arg[3]) -# 4 => starting backup (more info in arg[3]) -# 5 => finished backup (more info in arg[3]) -# 6 => started postinst -# 7 => finished postinst -# 8 => critical error -# arg[3] = optional, see upper -# exit 0 on success -# log_action_path = log_action -# -# 0x1A => asks for its UUID -# arg[1] = source MAC (short) -# exit 0 on success, UUID is the last line on stdout -# get_uuid_path = get_uuid -# -# 0x1B => asks for its Hostname -# arg[1] = source MAC (short) -# exit 0 on success, hostname is the last line on stdout -# get_hostname_path = get_hostname -# -# 0x54 => ask for time sync (for mtftp) -# arg[1] = source MAC (short) -# arg[2] = computed sync -# exit 0 on success -# mtftp_sync_path = mtftp_sync - -[loggers] -keys = root - -[handlers] -keys = hand01 - -[formatters] -keys = form01 - -[logger_root] -level = NOTSET -handlers = hand01 - -[handler_hand01] -class = FileHandler -level = INFO -formatter = form01 -args = ("/var/log/mmc/pulse2-imaging-server.log",) - -[formatter_form01] -format = %(asctime)s %(levelname)s %(message)s diff --git a/slapos/recipe/pulse2/template/pulse2_conf/pulse2/inventory-server/inventory-server.ini.in b/slapos/recipe/pulse2/template/pulse2_conf/pulse2/inventory-server/inventory-server.ini.in deleted file mode 100644 index 0f36a78fb..000000000 --- a/slapos/recipe/pulse2/template/pulse2_conf/pulse2/inventory-server/inventory-server.ini.in +++ /dev/null @@ -1,68 +0,0 @@ -[main] -# host = -# port = 9999 -# ocsmapping = /etc/mmc/pulse2/inventory-server/OcsNGMap.xml -# enablessl = False -# verifypeer = False -# cacert = /etc/mmc/pulse2/inventory-server/keys/cacert.pem -# localcert = /etc/mmc/pulse2/inventory-server/keys/privkey.pem -# to put the data from the registry as hostname -# hostname = Hardware/Host # by default -# default_entity = . -# entities_rules_file = - -[database] -# dbdriver = mysql -# dbhost = localhost -# dbport = 3306 -# dbname = inventory -# dbuser = mmc -# dbpasswd = mmc -# dbpoolrecycle = 60 -# dbsslenable = 0 -# dbsslca = /etc/mmc/pulse2/inventory/cacert.pem -# dbsslcert = /etc/mmc/pulse2/inventory/cert.pem -# dbsslkey = /etc/mmc/pulse2/inventory/key.pem - -[daemon] -# pidfile = /var/run/pulse2-inventory-server.pid -# user = root -# group = root -# umask = 0077 -# Example of non-root execution settings: -# user = mmc -# group = mmc -# umask = 0007 - -# [option_01] -# NAME = REGISTRY -# PARAM_01 = NAME::srvcomment||REGKEY::SYSTEM\CurrentControlSet\Services\lanmanserver\parameters||REGTREE::2##srvcomment -# PARAM_02 = NAME::DisplayName||REGKEY::SYSTEM\CurrentControlSet\Services\lanmanserver||REGTREE::2##DisplayName - -[loggers] -keys=root - -[handlers] -keys=hand01,hand02 - -[formatters] -keys=form01 - -[logger_root] -level=NOTSET -handlers=hand01 - -[handler_hand01] -class=FileHandler -level=INFO -formatter=form01 -args=("/var/log/mmc/pulse2-inventory-server.log",) - -[handler_hand02] -class=StreamHandler -level=DEBUG -args=(sys.stderr,) - -[formatter_form01] -format=%(asctime)s %(levelname)s %(message)s - diff --git a/slapos/recipe/pulse2/template/pulse2_conf/pulse2/launchers/launchers.ini.in b/slapos/recipe/pulse2/template/pulse2_conf/pulse2/launchers/launchers.ini.in deleted file mode 100644 index 71590fec4..000000000 --- a/slapos/recipe/pulse2/template/pulse2_conf/pulse2/launchers/launchers.ini.in +++ /dev/null @@ -1,160 +0,0 @@ -[launchers] -# Pulse2 Launcher path -# launcher_path = /usr/sbin/pulse2-launcher - -## Misc locations ## -# Source directory for push mode -# source_path = /var/lib/pulse2/packages - -## Workflow-related commands ## -# global ping command -# ping_path = /usr/sbin/pulse2-ping -# global inventory command -# inventory_command = export P2SRV=`echo $SSH_CONNECTION | cut -f1 -d\ `; export P2PORT=9999; export http_proxy=""; export ftp_proxy=""; ( [ -x /cygdrive/c/Program\ Files/OCS\ Inventory\ Agent/OCSInventory.exe ] && /cygdrive/c/Program\ Files/OCS\ Inventory\ Agent/OCSInventory.exe /np /server:$P2SRV /pnum:$P2PORT ) || ( [ -x /usr/bin/ocsinventory-agent ] && /usr/bin/ocsinventory-agent --server=http://$P2SRV:$P2PORT ) || ( [ -x /usr/sbin/ocsinventory-agent ] && /usr/sbin/ocsinventory-agent --server=http://$P2SRV:$P2PORT ) || ( [ -x /usr/local/sbin/ocs_mac_agent.php ] && /usr/local/sbin/ocs_mac_agent.php ) -# global reboot command -# reboot_command = /bin/shutdown.exe -f -r 1 || shutdown -r now -# global halt command -# halt_command = /bin/shutdown.exe -f -s 1 || shutdown -h now - -## Target on client ## -# target directory on client -# target_path = /tmp -# temp folder name prefix on client -# temp_folder_prefix = MDVPLS - -## Foll-proofing ## -# Above this amount of seconds the command will automatically be killed. -# max_command_age = 86400 -# Above this amount of seconds a computer will be considered as -# unreachable. -# max_ping_time = 4 -# Above this amount of seconds a computer will be considered as without -# ssh installed -# max_probe_time = 20 - -[daemon] -# the place were we put the daemons's PID files -# pidfile = /var/run/pulse2 -# user = root -# group = root -# umask = 0077 -# Example of non-root execution settings: -# user = mmc -# group = mmc -# umask = 0007 - -[wrapper] -# wrapper path -# path = /usr/sbin/pulse2-output-wrapper -# cap the amount of logs a wrapper can generate (in bytes) -# max_log_size = 512000 -# wrapper will quit it process takes longer to complete (in seconds) -# max_exec_time = 21600 - -[ssh] -# defaultkey is the name of the default SSH key -# default_key = default -# openssl binaries path -# scp_path = /usr/bin/scp -# ssh_path = /usr/bin/ssh -# ssh_agent_path = /usr/bin/ssh-agent -# sshkey_default = /root/.ssh/id_dsa -# sshkey_mysecondkey = /somewhere/my_second_key -# options passed to SSH via "-o" -# ssh_options = LogLevel=ERROR UserKnownHostsFile=/dev/null StrictHostKeyChecking=no Batchmode=yes PasswordAuthentication=no ServerAliveInterval=10 CheckHostIP=no ConnectTimeout=10 -# ssh's keyforwarding control: never, always, or let (aka 'let the scheduler decide') -# forward_key = let - -[wget] -# wget binary path (on client) -# wget_path = /usr/bin/wget -# wget_options = -# check_certs = False -# resume = True - -[rsync] -# rsync_path = /usr/bin/rsync -# resume = True -# set_executable can be yes, no or keep -# set_executable = yes -# set_access can be private, restricted or public -# set_access = private - -[wol] -# Pulse2 WOL Path -# wol_path = /usr/sbin/pulse2-wol -# wol_port = 40000 -# wol_bcast = 255.255.255.255 - -[tcp_sproxy] -# Pulse2 SSH Proxy path -# tcp_sproxy_path = /usr/sbin/pulse2-tcp-sproxy -# The "external" VNC IP adress -# tcp_sproxy_host = -# The TCP range to attribue to the proxy -# tcp_sproxy_port_range = 8100-8200 -# the initial ssh connection to the client timeout -# tcp_sproxy_establish_delay = 20 -# the initial VNC connection to the proxy timeout -# tcp_sproxy_connect_delay = 60 -# the number of seconds a connection will stay open after the initial handshake -# tcp_sproxy_session_lenght = 3600 - -[smart_cleaner] -# Pulse2 Smart Cleaner path (on the target); if empty we do not use it -# smart_cleaner_path = /usr/bin/pulse2-smart-cleaner.sh -# cleaner options, space separated, see doc -# smart_cleaner_options = - -[scheduler_01] -# host = 127.0.0.1 -# port = 8000 -# enablessl = True -# username = username -# password = password -# periodicaly talk to our referent scheduler -# awake_time = 600 -# add some randomness in our wake-ups -# awake_incertitude_factor = .2 -# if set to yes, do no send results directly after a command completion -# defer_results = no - -# Launchers sections, one per launcher -[launcher_01] -# bind = 127.0.0.1 -port = 8001 -# slots = 300 -# username = username -# password = password -# scheduler = scheduler_01 -enablessl = True -cacert = /etc/mmc/pulse2/launchers/keys/cacert.pem -localcert = /etc/mmc/pulse2/launchers/keys/privkey.pem -verifypeer = False -# You can override the logger configuration of this launcher with the -# loggconffile option, else the logger configuration from the current file will -# be used. -# logconffile = /etc/mmc/pulse2/launchers/log_launcher_01.ini - -[loggers] -keys = root - -[handlers] -keys = hand01 - -[formatters] -keys = form01 - -[logger_root] -level = NOTSET -handlers = hand01 - -[handler_hand01] -class = FileHandler -level = INFO -formatter = form01 -args = ("/var/log/mmc/pulse2-launchers.log",) - -[formatter_form01] -format = %(asctime)s %(levelname)s %(message)s - diff --git a/slapos/recipe/pulse2/template/pulse2_conf/pulse2/launchers/log_launcher_01.ini.in b/slapos/recipe/pulse2/template/pulse2_conf/pulse2/launchers/log_launcher_01.ini.in deleted file mode 100644 index 032f43c21..000000000 --- a/slapos/recipe/pulse2/template/pulse2_conf/pulse2/launchers/log_launcher_01.ini.in +++ /dev/null @@ -1,21 +0,0 @@ -[loggers] -keys = root - -[handlers] -keys = hand01 - -[formatters] -keys = form01 - -[logger_root] -level = NOTSET -handlers = hand01 - -[handler_hand01] -class = FileHandler -level = INFO -formatter = form01 -args = ("/var/log/mmc/pulse2-launcher-01.log",) - -[formatter_form01] -format = %(asctime)s %(levelname)s %(message)s diff --git a/slapos/recipe/pulse2/template/pulse2_conf/pulse2/p2ipc-windows.ini.in b/slapos/recipe/pulse2/template/pulse2_conf/pulse2/p2ipc-windows.ini.in deleted file mode 100644 index f8affcdef..000000000 --- a/slapos/recipe/pulse2/template/pulse2_conf/pulse2/p2ipc-windows.ini.in +++ /dev/null @@ -1,58 +0,0 @@ -[main] -server = -port = 9999 -command_name = C:\Program Files\OCS Inventory Agent\OCSInventory.exe -command_attr = /SERVER:127.0.0.1 /PNUM:9999 -enablessl = True -verifypeer = False -cacert = cacert.pem -localcert = privkey.pem - -# [polling] -# activate = 0 -# type = reg -# time = 600 -# path = HKEY_LOCAL_MACHINE\Software\Mandriva\Inventory\Client\do_inventory - -[loggers] -keys = root - -[handlers] -keys = hand01 - -[formatters] -keys = form01 - -[logger_root] -level = NOTSET -handlers = hand01 - -[handler_hand01] -class = handlers.NTEventLogHandler -level = INFO -formatter = form01 -args = ("Pulse 2 Proxy SSL",) - -# [handler_hand01] -# class = handlers.RotatingFileHandler -# level = DEBUG -# formatter = form01 -# args = ("C:\\Program Files\\Mandriva\\Pulse2 Inventory SSL Proxy\\log.txt", "a", 100*1024, 5) - -[formatter_form01] -format = %(asctime)s %(levelname)s %(message)s - -# Xml update add extra information to OCS XML output -[xmlupdate] -# execute the update -enable = False -# keep a local copy of the updated XML -keepxmlupdate = False -# notify software updates -updatedetection = False -# add software icons to XML output -addicon = False - -# add OCS execution debug to OCS XML output -[ocsdebug] -enable = False \ No newline at end of file diff --git a/slapos/recipe/pulse2/template/pulse2_conf/pulse2/p2ipc.ini.in b/slapos/recipe/pulse2/template/pulse2_conf/pulse2/p2ipc.ini.in deleted file mode 100644 index fbc3139e8..000000000 --- a/slapos/recipe/pulse2/template/pulse2_conf/pulse2/p2ipc.ini.in +++ /dev/null @@ -1,11 +0,0 @@ -[main] -# server = -# port = 9999 -# path = / -# tmpdirname = /tmp/Pulse2InventoryProxy -# command_name = /usr/local/bin/ocsinventory-agent -# command_attr = -l /tmp/Pulse2InventoryProxy -# enablessl = True -# key_file = conf/key/privkey.pem -# cert_file = conf/key/cacert.pem - diff --git a/slapos/recipe/pulse2/template/pulse2_conf/pulse2/package-server/package-server.ini.in b/slapos/recipe/pulse2/template/pulse2_conf/pulse2/package-server/package-server.ini.in deleted file mode 100644 index 39e6a109e..000000000 --- a/slapos/recipe/pulse2/template/pulse2_conf/pulse2/package-server/package-server.ini.in +++ /dev/null @@ -1,200 +0,0 @@ -[main] -# ---------- -# NETWORKING -# ---------- -# port = 9990 -# host = -# The public IP send when a client agent is wondering how to reach this package server, set to the "host" parameter value if not defined -# public_ip = -# -# -------- -# PACKAGES -# -------- -# Is package autodetection activated ? -# package_detect_activate = 0 -# Time between two loops of detection -# package_detect_loop = 60 -# methods in none, last_time_modification, check_size -# for more than 1 method, separate with "," -# package_detect_smart_method = none -# package_detect_smart_time = 60 -# Package api can synhronise package data to others servers -# package_mirror_loop = 5 -# package synchronisation targets -# package_mirror_target = -# package synchronisation state file. used only if package_mirror_target is defined -# File where pending sync are written so that they can be finished on package server restart. -# package_mirror_status_file = /var/data/mmc/status -# package synchronisation command to use -# package_mirror_command = /usr/bin/rsync -# package synchronisation command options -# package_mirror_command_options = -ar --delete -# package synchronisation command on only one level options -# package_mirror_level0_command_options = -d --delete -# options passed to SSH via "-o" if specified --rsh is automatically added to package_mirror_command_options -# package_mirror_command_options_ssh_options = -# for example -# package_mirror_command_options_ssh_options = IdentityFile=/root/.ssh/id_dsa StrictHostKeyChecking=no Batchmode=yes PasswordAuthentication=no ServerAliveInterval=10 CheckHostIP=no ConnectTimeout=10 -# loop for the sync of the whole package directory -# can only be activated when package_mirror_target is given -# package_global_mirror_activate = 1 -# package_global_mirror_loop = 3600 -# package_global_mirror_command_options = -ar --delete -# real package deletion -# real_package_deletion = 0 -# -# ---------- -# MISC STUFF -# ---------- -# machine/mirror assign algo -# mm_assign_algo = default -# user/packageput assign algo -# up_assign_algo = default -# tmp_input_dir = /tmp/packages/default - -[daemon] -# the place were we put the daemons's PID files -# pidfile = /var/run/pulse2-package-server.pid -# user = root -# group = root -# umask = 0022 -# Example of non-root execution settings: -# user = mmc -# group = mmc -# umask = 0002 - -[ssl] -# enablessl = 1 -# username = -# password = -# certfile = /etc/mmc/pulse2/package-server/keys/cacert.pem -# privkey = /etc/mmc/pulse2/package-server/keys/privkey.pem -# verifypeer = 0 - -[mmc_agent] -# We sometimes need to talk to our referent agent -# here are some key to speak with it -# host = 127.0.0.1 -# port = 7080 -# username = mmc -# password = s3cr3t -# enablessl = True -# verifypeer = False -# cacert = /etc/mmc/pulse2/package-server/keys/cacert.pem -# localcert = /etc/mmc/pulse2/package-server/keys/privkey.pem - -[mirror_api] -# mount_point = /rpc - -[user_packageapi_api] -# mount_point = /upaa - -[scheduler_api] -# mount_point = /scheduler_api -# schedulers = scheduler_01 - -# [imaging_api] -# mount_point = /imaging_api -# uuid = PLEASE_PUT_A_UUID_FOR_THAT_SERVER -################## -# Some locations # -################## -### main tree -# base_folder = /var/lib/pulse2/imaging -### Bootloaders -# Where bootloader (and bootsplash) is stored, relative to "base_folder" -# bootloader_folder = bootloader # Where bootloader (and bootsplash) is stored, relative to "base_folder" -# pxe_bootloader = pxe_boot # the network bootloader -# cd_bootloader = cd_boot # the cdrom bootloader -# bootsplash_file = bootsplash.xpm # the bootloader splashscreen -### Bootmenus -# Where boot menus are generated / being served, relative to "base_folder" -# bootmenus_folder = bootmenus -### Diskless -# Where kernel, initrd and other official diskless tools are stored, relative to "base_folder" -# diskless_folder = diskless # Where kernel, initrd and other official diskless tools are stored, relative to "base_folder" -# diskless_kernel = kernel # Name of the diskless kernel to run -# diskless_initrd = initrd # Name of the diskless initrd to boot (core) -# diskless_initrdcd = initrdcd # Name of the diskless initrd to boot (addon to boot on CD) -# diskless_memtest = memtest # diskless memtest tool -### Inventories -# Where inventories are stored / retrieved, relative to "base_folder" -# inventories_folder = inventories -### NFS -# Where additionnal material (hdmap, exclude) are stored / retrieved, relative to "base_folder" -# (a.k.a. /revoinfo client side) -# computers_folder = computers -# Where images are stored, relative to "base_folder" -# (a.k.a. /revoinfo client side) -# masters_folder = masters -# Where postinst tools are stored, relative to "base_folder" -# (a.k.a. /opt client side) -# postinst_folder = postinst -# will contain archived computer imaging data -# archives_folder = archives -### ISO images generation -# isos_folder = /var/lib/pulse2/imaging/isos # will contain generated ISO images -# isogen_tool = /usr/bin/mkisofs # tool used to generate ISO file -### RPC offline mode -# RPC replay file name, relative to "base_folder" -# rpc_replay_file = rpc-replay.pck -# RPC replay loop timer in seconds -# rpc_loop_timer = 60 -# RPC to replay at each loop -# rpc_count = 10 -# Interval in seconds between two RPCs -# rpc_interval = 2 -# Our UUID cache *inside* base_folder -# uuid_cache_file = uuid-cache.txt -# Our UUID cache lifetime -# uuid_cache_lifetime = 300 - -[mirror:01] -mount_point = /mirror1 -src = /var/lib/pulse2/packages - -[package_api_put:01] -mount_point = /package_api_get1 -src = /var/lib/pulse2/packages -tmp_input_dir = /tmp/package_tmp/put1 - -# Logger configuration - -[loggers] -keys = root,imaging - -[handlers] -keys = hand01,hand_imaging - -[formatters] -keys = form01,form_imaging - -[logger_root] -level = NOTSET -handlers = hand01 - -[handler_hand01] -class = FileHandler -level = INFO -formatter = form01 -args = ("%s" % %(pulse2_log_file_package_server)s,) - -[formatter_form01] -format = %%(asctime)s %%(levelname)s %%(message)s - -# Imaging API logger configuration - -[logger_imaging] -level = NOTSET -handlers = hand_imaging -propagate = 0 -qualname = imaging - -[handler_hand_imaging] -class = FileHandler -level = INFO -formatter = form_imaging -args = ("%s" % %(pulse2_log_file_package_server)s,) - -[formatter_form_imaging] -format = %%(asctime)s %%(levelname)s Imaging: %%(message)s diff --git a/slapos/recipe/pulse2/template/pulse2_conf/pulse2/package-server/plugin_terminal_type.ini.in b/slapos/recipe/pulse2/template/pulse2_conf/pulse2/package-server/plugin_terminal_type.ini.in deleted file mode 100644 index bb3d957cb..000000000 --- a/slapos/recipe/pulse2/template/pulse2_conf/pulse2/package-server/plugin_terminal_type.ini.in +++ /dev/null @@ -1,21 +0,0 @@ -#[main] -#dbdriver = mysql -#dbhost = localhost -#dbname = inventory -#dbuser = mmc -#dbpasswd = mmc -#dbpoolrecycle = -#dbport = -#dbsslenable = 0 -#dbsslca = -#dbsslcert = -#dbsslkey = - -#[associations:XX] -# the mirror url you want to declare -#mirror = MIRROR_URL -# the type of terminal (SAGEM or ) -#terminal_types = TERMINAL_TYPE -# the type of api it is (package_api or mirror) -#kind = KIND - diff --git a/slapos/recipe/pulse2/template/pulse2_conf/pulse2/scheduler/scheduler.ini.in b/slapos/recipe/pulse2/template/pulse2_conf/pulse2/scheduler/scheduler.ini.in deleted file mode 100644 index f3dfb65a0..000000000 --- a/slapos/recipe/pulse2/template/pulse2_conf/pulse2/scheduler/scheduler.ini.in +++ /dev/null @@ -1,178 +0,0 @@ -[scheduler] -# This scheduler name -id = scheduler_01 - -## MANAGING ## -# scheduler_path = /usr/sbin/pulse2-scheduler - -## NETWORK ## -# port = 8000 -# host = 127.0.0.1 -# username = username -# password = password -# enablessl = True -# If verifypeer is set, the scheduler will also connect to all the launchers -# using the following certificates. -# verifypeer = False -# cacert = /etc/mmc/pulse2/scheduler/keys/cacert.pem -# localcert = /etc/mmc/pulse2/scheduler/keys/privkey.pem - -## SCHEDULING ## -# for some functions below, we add this factor, to prevent load peaks -# incertitude_factor = .2 -# -# initial wait time, in seconds, to make stuff stabilize -# initial_wait = 2 -# -# attempt to start (and stop) commands every n seconds -# awake_time = 600 -# -# preemption settings : preempting every N second, run M commands -# preempt_amount = 50 -# preempt_period = 1 -# -# status settings : check every N second, +/- incertitude_factor % -# checkstatus_period = 900 -# -# health logging : log some stats every N seconds, +/- incertitude_factor % -# loghealth_period = 60 -# -# once per day, hour specified below (HH:MM:SS), the scheduler will -# analyse the database, looking to weird / broken commands; -# you should enable this if you see stalled commands in logs -# in this case, please specify an hour when the scheduler is -# not very used (8 pm can be a good choice: analyse_hour = 20:00:00) -# set to empty by default to disable analysis -# analyse_hour = -# -# attempt to clean states in commands every n seconds -# clean_states_time = 3600 -# clean state that are going to be clean -# (from the launcher point of view, ie : -# * stop -> the command is not running on the launcher but it's state in the db say it is) -# * run -> the command -# possible states : run, stop -# active_clean_states = -# -# default database encoding (used to inject log files) -# dbencoding = utf-8 -# -# scheduler mode, see doc ! -# mode = async -# -# max number of slots to uses, for all launchers -# max_slots = 300 -# -# locking system -# please use with caution: the only reason to activate this feature -# is for systems under heavy load; risk of double-preemption is -# drastically reduce using this, but your system will be even more slow -# lock_processed_commands = False - -## Commands life ## -# Command max default authorized time (for each stage) -# max_command_time = 3600 -# -# Command max upload time (aka 'upload' stage), override the previous one for looooong uploads -# max_upload_time = 21600 -# -# Command max WOL wait-for-completion time: wait this ammount of second before going futher -# max_wol_time = 300 - -## NETWORKING ## -# prefered method to reach a client -# available: -# - fqdn: attempt to perform a DNS query on FQDN -# - hosts: same, no DNS query -# - ip: just try IP address -# - netbios: attempt to do a nmblookup on IP adress -# tests are performed using ping -# resolv_order = fqdn hosts netbios ip - -## CHECKING ## -# in some situations itn may be useful to do some pre-checks on clients -# checks can be done against every information recorded into the "target" table -# the following informations are available: -# target_name => contain the target Hostname -# target_uuid => contain the target UUID -# target_ipaddr => contain the target IP addresses, only the first one is used -# target_macaddr => contain the target MAC adresses, only the first one is used -# The two following options are formated as follow: -# *_check = <data-to-ask>=<expected-value>,... -# for exemple: -# server_check = IP=ipaddr -# client_check = UUID=uuid,HOSTNAME=name -# => will ask to client if its UUID is 'target_uuid', HOSTNAME is 'target_name', -# and tell it to give us it's IP and check the IP's value is 'target_ipaddr' -# While checking things, we may also want to announce what we are currently try to -# do on client, for each stage, for example TRANFERT while transfering something: -# announce_check = transfert=TRANFERT (comma-separated list as for previous options) -# currently available keywords: transfert, execute, delete, inventory -# announce_check = -# server_check = -# client_check = - -## Computer / Group assignment ## -# mg_assign_algo = default - - -[database] -# dbdriver = mysql -# dbhost = localhost -# dbport = 3306 -# dbname = msc -# dbuser = mmc -# dbpasswd = mmc -# dbdebug = ERROR -# dbpoolrecycle = 60 -# dbpooltimeout = 30 -# SSL support -# dbsslenable = 0 -# dbsslca = -# dbsslcert = -# dbsslkey = - -[daemon] -# pidfile = /var/run/pulse2 -# user = root -# group = root -# umask = 0077 -# Example of non-root execution settings: -# user = mmc -# group = mmc -# umask = 0007 -# setrlimit option allows to set process system resources usage. Syntax is: -# setrlimit = limit1 soft1 hard1 limit2 soft2 hard2 ... -# For example: -# setrlimit = RLIMIT_NOFILE 2048 2048 RLIMIT_CORE 0 0 -# setrlimit = - -# Our launchers -[launcher_01] -host=%(ipv4)s -port=8001 -username = username -password = password -enablessl = True - -[loggers] -keys=root - -[handlers] -keys=hand01 - -[formatters] -keys=form01 - -[logger_root] -level=NOTSET -handlers=hand01 - -[handler_hand01] -class=FileHandler -level=INFO -formatter=form01 -args=("%s" % %(pulse2_log_file_scheduler)s,) - -[formatter_form01] -format=%%(asctime)s %%(levelname)s %%(message)s diff --git a/slapos/recipe/pwgen.py b/slapos/recipe/pwgen.py deleted file mode 100644 index e0bef144d..000000000 --- a/slapos/recipe/pwgen.py +++ /dev/null @@ -1,45 +0,0 @@ -############################################################################## -# -# 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 subprocess -import os - -from slapos.recipe.librecipe import GenericBaseRecipe - -class Recipe(GenericBaseRecipe): - - def _options(self, options): - if not os.path.exists(self.options['file']): - password = subprocess.check_output([self.options['pwgen-binary'], '-1']).strip() - with open(self.options['file'], 'w') as password_file: - password_file.write(password) - else: - with open(self.options['file'], 'r') as password_file: - password = password_file.read() - options['password'] = password - - def install(self): - return [] diff --git a/slapos/recipe/request.py b/slapos/recipe/request.py index 46ca4d682..66de7394b 100644 --- a/slapos/recipe/request.py +++ b/slapos/recipe/request.py @@ -25,34 +25,43 @@ # ############################################################################## import logging +import os from slapos import slap as slapmodule class Recipe(object): + def parseMultiValues(self, string): + return dict([ [str(column).strip() for column in line.split('=', 1)] + for line in str(string).splitlines() if '=' in line]) + def __init__(self, buildout, name, options): self.logger = logging.getLogger(name) slap = slapmodule.slap() - self.software_release_url = options['software-url'] + slap_connection = buildout['slap_connection'] + self.software_release_url = slap_connection['software_release_url'] - slap.initializeConnection(options['server-url'], - options.get('key-file'), - options.get('cert-file'), + # XXX: Dirty network interation stuff + slap.initializeConnection(slap_connection['server_url'], + slap_connection.get('key_file'), + slap_connection.get('cert_file'), ) computer_partition = slap.registerComputerPartition( - options['computer-id'], options['partition-id']) + slap_connection['computer_id'], slap_connection['partition_id']) self.request = computer_partition.request - self.isSlave = False - if 'slave' in options: - self.isSlave = options['slave'].lower() in ['y', 'yes', 'true', '1'] + if 'software-url' not in options: + options['software-url'] = self.software_release_url + + if 'name' not in options: + options['name'] = name self.return_parameters = [] if 'return' in options: self.return_parameters = [str(parameter).strip() - for parameter in options['return'].split()] + for parameter in options['return'].splitlines()] else: self.logger.warning("No parameter to return to main instance." "Be careful about that...") @@ -63,31 +72,25 @@ class Recipe(object): filter_kw = {} if 'sla' in options: - for sla_parameter in options['sla'].split(): - filter_kw[sla_parameter] = options['sla-%s' % sla_parameter] + filter_kw = self.parseMultiValues(options['sla']) partition_parameter_kw = {} if 'config' in options: - for config_parameter in options['config'].split(): - partition_parameter_kw[config_parameter] = \ - options['config-%s' % config_parameter] + partition_parameter_kw = self.parseMultiValues(options['config']) instance = self.request(options['software-url'], software_type, - options.get('name', name), partition_parameter_kw=partition_parameter_kw, - filter_kw=filter_kw, shared=self.isSlave) + options['name'], partition_parameter_kw=partition_parameter_kw, + filter_kw=filter_kw) - self.failed = None + result = {} for param in self.return_parameters: - try: - options['connection-%s' % param] = str(instance.getConnectionParameter(param)) - except slapmodule.NotFoundError: - options['connection-%s' % param] = '' - if self.failed is None: - self.failed = param + result[param] = instance.getConnectionParameter(param) + + # Return the connections parameters in options dict + for key, value in result.items(): + options['connection-%s' % key] = value def install(self): - if self.failed is not None: - raise KeyError("Connection parameter %r not found." % self.failed) return [] update = install diff --git a/slapos/recipe/seleniumrunner/ERP5TypeFunctionalTestCase.py b/slapos/recipe/seleniumrunner/ERP5TypeFunctionalTestCase.py deleted file mode 100644 index c4e57b9be..000000000 --- a/slapos/recipe/seleniumrunner/ERP5TypeFunctionalTestCase.py +++ /dev/null @@ -1,356 +0,0 @@ -############################################################################## -# -# Copyright (c) 2011 Nexedi SARL and Contributors. All Rights Reserved. -# Kazuhiko <kazuhiko@nexedi.com> -# Rafael Monnerat <rafael@nexedi.com> -# -# WARNING: This program as such is intended to be used by professional -# programmers who take the whole responsability 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 -# garantees 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 2 -# 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. -# -############################################################################## - -# XXX-Cedric : This is an import of -# http://git.erp5.org/gitweb/erp5.git/blob/HEAD:/product/ERP5Type/tests/ERP5TypeFunctionalTestCase.py -# Modification of the present file should be ported back to this original file. -import os -import time -import signal -import re -from subprocess import Popen, PIPE -import shutil - -#from Products.ERP5Type.tests.ERP5TypeTestCase import ERP5TypeTestCase, \ -# _getConversionServerDict - -# REGEX FOR ZELENIUM TESTS -TEST_PASS_RE = re.compile('<th[^>]*>Tests passed</th>\n\s*<td[^>]*>([^<]*)') -TEST_FAILURE_RE = re.compile('<th[^>]*>Tests failed</th>\n\s*<td[^>]*>([^<]*)') -IMAGE_RE = re.compile('<img[^>]*?>') -TEST_ERROR_TITLE_RE = re.compile('(?:error.gif.*?>|title status_failed"><td[^>]*>)([^>]*?)</td></tr>', re.S) -TEST_RESULT_RE = re.compile('<div style="padding-top: 10px;">\s*<p>\s*' - '<img.*?</div>\s.*?</div>\s*', re.S) - -TEST_ERROR_RESULT_RE = re.compile('.*(?:error.gif|title status_failed).*', re.S) - -ZELENIUM_BASE_URL = "%s/portal_tests/%s/core/TestRunner.html?test=../test_suite_html&auto=on&resultsUrl=%s/portal_tests/postResults&__ac_name=%s&__ac_password=%s" - -tests_framework_home = os.path.dirname(os.path.abspath(__file__)) -# handle 'system global' instance -if tests_framework_home.startswith('/usr/lib'): - real_instance_home = '/var/lib/erp5' -else: - real_instance_home = os.path.sep.join( - tests_framework_home.split(os.path.sep)[:-3]) - -instance_home = os.path.join(real_instance_home, 'unit_test') -bt5_dir_list = ','.join([ - os.path.join(instance_home, 'Products/ERP5/bootstrap'), - os.path.join(instance_home, 'bt5')]) - -class TimeoutError(Exception): - pass - -class Xvfb: - def __init__(self, fbdir, xvfb_location="Xvfb"): - self.display_list = [":%s" % i for i in range(123, 144)] - self.display = None - self.fbdir = fbdir - self.pid = None - self.xvfb_location = xvfb_location - - def _runCommand(self, display): - command = [self.xvfb_location, '-fbdir' , self.fbdir, display] - self.process = Popen(" ".join(command), - stdout=PIPE, - stderr=PIPE, - shell=True, - close_fds=True) - - def run(self): - for display_try in self.display_list: - lock_filepath = '/tmp/.X%s-lock' % display_try.replace(":", "") - if not os.path.exists(lock_filepath): - self._runCommand(display_try) - self.display = display_try - break - - #display = os.environ.get('DISPLAY') - #if display: - # auth = Popen(['xauth', 'list', display], stdout=PIPE).communicate()[0] - # if auth: - # (displayname, protocolname, hexkey) = auth.split() - # Popen(['xauth', 'add', 'localhost/unix:%s' % display, protocolname, hexkey]) - - print 'Xvfb : %d' % self.process.pid - print 'Take screenshots using xwud -in %s/Xvfb_screen0' % self.fbdir - - def quit(self): - if hasattr(self, 'process'): - process_pid = self.process.pid - try: - self.process.terminate() - finally: - if process_pid: - print "Stopping Xvfb on pid: %s" % self.pid - os.kill(process_pid, signal.SIGTERM) - -class Browser: - - use_xvfb = 1 - def __init__(self, profile_dir, host, bin_location=None): - self.bin_location = bin_location - self.profile_dir = profile_dir - self.host = host - self.pid = None - - def quit(self): - if self.pid: - os.kill(self.pid, signal.SIGTERM) - - def _run(self, url, display): - """ This method should be implemented on a subclass """ - raise NotImplementedError - - def _setEnviron(self): - pass - - def run(self, url, display): - self.clean() - self._setEnviron() - self._setDisplay(display) - self._run(url) - print "Browser %s running on pid: %s" % (self.__class__.__name__, self.pid) - - def clean(self): - """ Clean up removing profile dir and recreating it""" - os.system("rm -rf %s" % self.profile_dir) - os.mkdir(self.profile_dir) - - def _createFile(self, filename, content): - file_path = os.path.join(self.profile_dir, filename) - with open(file_path, 'w') as f: - f.write(content) - return file_path - - def _setDisplay(self, display): - if display is None: - try: - shutil.copy2(os.path.expanduser('~/.Xauthority'), '%s/.Xauthority' % self.profile_dir) - except IOError: - pass - else: - os.environ["DISPLAY"] = display - - def _runCommand(self, command_tuple): - print " ".join(list(command_tuple)) - self.pid = os.spawnlp(os.P_NOWAIT, *command_tuple) - -class Firefox(Browser): - """ Use firefox to open run all the tests""" - - def _setEnviron(self): - os.environ['MOZ_NO_REMOTE'] = '1' - os.environ['HOME'] = self.profile_dir - os.environ['LC_ALL'] = 'C' - os.environ["MOZ_CRASHREPORTER_DISABLE"] = "1" - os.environ["NO_EM_RESTART"] = "1" - - def _run(self, url): - # Prepare to run - if not self.bin_location: - self.bin_location = "firefox" - self._createFile('prefs.js', self.getPrefJs()) - self._runCommand((self.bin_location, "firefox", "-no-remote", - "-profile", self.profile_dir, url)) - - os.environ['MOZ_NO_REMOTE'] = '0' - - def getPrefJs(self): - return """ -// Don't ask if we want to switch default browsers -user_pref("browser.shell.checkDefaultBrowser", false); - -// Disable pop-up blocking -user_pref("browser.allowpopups", true); -user_pref("dom.disable_open_during_load", false); - -// Configure us as the local proxy -//user_pref("network.proxy.type", 2); - -// Disable security warnings -user_pref("security.warn_submit_insecure", false); -user_pref("security.warn_submit_insecure.show_once", false); -user_pref("security.warn_entering_secure", false); -user_pref("security.warn_entering_secure.show_once", false); -user_pref("security.warn_entering_weak", false); -user_pref("security.warn_entering_weak.show_once", false); -user_pref("security.warn_leaving_secure", false); -user_pref("security.warn_leaving_secure.show_once", false); -user_pref("security.warn_viewing_mixed", false); -user_pref("security.warn_viewing_mixed.show_once", false); - -// Disable "do you want to remember this password?" -user_pref("signon.rememberSignons", false); - -// increase the timeout before warning of unresponsive script -user_pref("dom.max_script_run_time", 120); - -// this is required to upload files -user_pref("capability.principal.codebase.p1.granted", "UniversalFileRead"); -user_pref("signed.applets.codebase_principal_support", true); -user_pref("capability.principal.codebase.p1.id", "http://%s"); -user_pref("capability.principal.codebase.p1.subjectName", "");""" % \ - (self.host) - -class PhantomJS(Browser): - def _createRunJS(self): - run_js = """ -var page = new WebPage(), - address; - -address = phantom.args[0]; -page.open(address, function (status) { - if (status !== 'success') { - console.log('FAIL to load the address'); - } else { - console.log('SUCCESS load the address'); - } - phantom.exit(); -}); -""" - return self._createFile('run.js', run_js) - - def _run(self, url): - self._runCommand(("phantomjs", "phantomjs", self._createRunJS(), url)) - -class FunctionalTestRunner: - - # There is no test that can take more them 24 hours - timeout = 2.0 * 60 * 60 - - def __init__(self, host, port, portal, run_only='', use_phanthom=False): - self.instance_home = os.environ['INSTANCE_HOME'] - - # Such informations should be automatically loaded - self.user = 'ERP5TypeTestCase' - self.password = '' - self.run_only = run_only - profile_dir = os.path.join(self.instance_home, 'profile') - self.portal = portal - if use_phanthom: - self.browser = PhantomJS(profile_dir, host, int(port)) - else: - self.browser = Firefox(profile_dir, host, int(port)) - - def getStatus(self): - transaction.commit() - return self.portal.portal_tests.TestTool_getResults() - - def _getTestURL(self): - return ZELENIUM_BASE_URL % (self.portal.portal_url(), self.run_only, - self.portal.portal_url(), self.user, self.password) - - def test(self, debug=0): - xvfb = Xvfb(self.instance_home) - try: - start = time.time() - if not debug and self.browser.use_xvfb: - xvfb.run() - self.browser.run(self._getTestURL() , xvfb.display) - while self.getStatus() is None: - time.sleep(10) - if (time.time() - start) > float(self.timeout): - raise TimeoutError("Test took more them %s seconds" % self.timeout) - - finally: - self.browser.quit() - xvfb.quit() - - def processResult(self): - file_content = self.getStatus().encode("utf-8", "replace") - sucess_amount = TEST_PASS_RE.search(file_content).group(1) - failure_amount = TEST_FAILURE_RE.search(file_content).group(1) - error_title_list = [re.compile('\s+').sub(' ', x).strip() - for x in TEST_ERROR_TITLE_RE.findall(file_content)] - - detail = '' - for test_result in TEST_RESULT_RE.findall(file_content): - if TEST_ERROR_RESULT_RE.match(test_result): - detail += test_result - - detail = IMAGE_RE.sub('', detail) - if detail: - detail = IMAGE_RE.sub('', detail) - detail = '''<html> -<head> - <style type="text/css">tr.status_failed { background-color:red };</style> -</head> -<body>%s</body> -</html>''' % detail - - # When return fix output for handle unicode issues. - return detail, int(sucess_amount), int(failure_amount), error_title_list - -class ERP5TypeFunctionalTestCase: - run_only = "" - foreground = 0 - use_phanthom = False - - def getTitle(self): - return "Zelenium" - - def afterSetUp(self): - # create browser_id_manager - if not "browser_id_manager" in self.portal.objectIds(): - self.portal.manage_addProduct['Sessions'].constructBrowserIdManager() - transaction.commit() - self.setSystemPreference() - self.portal.portal_tests.TestTool_cleanUpTestResults() - self.stepTic() - - def setSystemPreference(self): - conversion_dict = _getConversionServerDict() - self.portal.Zuite_setPreference( - working_copy_list=bt5_dir_list, - conversion_server_hostname=conversion_dict['hostname'], - conversion_server_port=conversion_dict['port'] - ) - # XXX Memcached is missing - # XXX Persistent cache setup is missing - - def testFunctionalTestRunner(self): - # first of all, abort to get rid of the mysql participation inn this - # transaction - self.portal._p_jar.sync() - self.runner = FunctionalTestRunner(self.serverhost, self.serverport, - self.portal, self.run_only, self.use_phanthom) - - self.runner.test(debug=self.foreground) - detail, success, failure, error_title_list = self.runner.processResult() - - self.logMessage("-" * 79) - total = success + failure - self.logMessage("%s Functional Tests %s Tests, %s Failures" % \ - (self.getTitle(), total, failure)) - self.logMessage("-" * 79) - self.logMessage(detail) - self.logMessage("-" * 79) - self.assertEquals([], error_title_list) diff --git a/slapos/recipe/seleniumrunner/__init__.py b/slapos/recipe/seleniumrunner/__init__.py deleted file mode 100644 index 813fb0d47..000000000 --- a/slapos/recipe/seleniumrunner/__init__.py +++ /dev/null @@ -1,107 +0,0 @@ -############################################################################## -# -# 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 -import zc.buildout -from slapos.recipe.librecipe import BaseSlapRecipe - -class Recipe(BaseSlapRecipe): - def _install(self): - """Set the connection dictionnary for the computer partition and create a list - of paths to the different wrappers.""" - self.path_list = [] - self.requirements, self.ws = self.egg.working_set() - - self.installTestrunner(self.getDisplay()) - self.linkBinary() - - return self.path_list - - def getDisplay(self): - """Generate display id for the instance.""" - display_list = [":%s" % i for i in range(123,144)] - for display_try in display_list: - lock_filepath = '/tmp/.X%s-lock' % display_try.replace(":", "") - if not os.path.exists(lock_filepath): - display = display_try - break - return display - - def installTestrunner(self, display): - """Instanciate a wrapper for the browser and the test reports.""" - arguments = dict( - xvfb_binary = self.options['xvfb_binary'], - display = display, - suite_name = self.parameter_dict['suite_name'], - base_url = self.parameter_dict['url'], - browser_argument_list = [], - user = self.parameter_dict['user'], - password = self.parameter_dict['password'], - project = self.parameter_dict['project'], - test_report_instance_url = \ - self.parameter_dict['test_report_instance_url'], - etc_directory = self.etc_directory) - - # Check wanted browser XXX-Cedric not yet used but can be useful - #if self.parameter_dict.get('browser', None) is None: - arguments['browser_binary'] = self.options['firefox_binary'] - #elif self.parameter_dict['browser'].strip().lowercase() == 'chrome' or - # self.parameter_dict['browser'].strip().lowercase() == 'chromium': - # arguments['browser_binary'] = self.options['chromium_binary'] - # arguments['browser_argument_list'].extend['--ignore-certificate-errors', - # option_translate = '--disable-translate', - # option_security = '--disable-web-security'] - #elif self.parameter_dict['browser'].strip().lowercase() == 'firefox': - # arguments['browser_binary'] = self.options['firefox_binary'] - - self.path_list.extend(zc.buildout.easy_install.scripts([( - 'testrunner',__name__+'.testrunner', 'run')], self.ws, - sys.executable, self.wrapper_directory, - arguments=[arguments])) - - def linkBinary(self): - """Links binaries to instance's bin directory for easier exposal""" - for linkline in self.options.get('link_binary_list', '').splitlines(): - if not linkline: - continue - target = linkline.split() - if len(target) == 1: - target = target[0] - path, linkname = os.path.split(target) - else: - linkname = target[1] - target = target[0] - link = os.path.join(self.bin_directory, linkname) - if os.path.lexists(link): - if not os.path.islink(link): - raise zc.buildout.UserError( - 'Target link already %r exists but it is not link' % link) - os.unlink(link) - os.symlink(target, link) - self.logger.debug('Created link %r -> %r' % (link, target)) - self.path_list.append(link) diff --git a/slapos/recipe/seleniumrunner/erp5functionaltestreporthandler.py b/slapos/recipe/seleniumrunner/erp5functionaltestreporthandler.py deleted file mode 100644 index 18aa5ccad..000000000 --- a/slapos/recipe/seleniumrunner/erp5functionaltestreporthandler.py +++ /dev/null @@ -1,187 +0,0 @@ -############################################################################## -# -# 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 re -import urlparse -import urllib -import httplib -import mimetools -from random import randint -import tempfile -import os -import stat -import zipfile -import mimetypes -import datetime - -TB_SEP = "============================================================="\ - "=========" - -# REGEX FOR ZELENIUM TESTS -TEST_PASS_RE = re.compile('<th[^>]*>Tests passed</th>\n\s*<td[^>]*>([^<]*)') -TEST_FAILURE_RE = re.compile('<th[^>]*>Tests failed</th>\n\s*<td[^>]*>([^<]*)') -IMAGE_RE = re.compile('<img[^>]*?>') -TEST_ERROR_TITLE_RE = re.compile('(?:error.gif.*?>|title status_failed"><td[^>]*>)([^>]*?)</td></tr>', re.S) -TEST_RESULT_RE = re.compile('<div style="padding-top: 10px;">\s*<p>\s*' - '<img.*?</div>\s.*?</div>\s*', re.S) -DURATION_RE = re.compile('<th[^>]*>Elapsed time \(sec\)</th>\n\s*<td[^>]*>([^<]*)') - -TEST_ERROR_RESULT_RE = re.compile('.*(?:error.gif|title status_failed).*', re.S) - -def get_content_type(f): - return mimetypes.guess_type(f.name)[0] or 'application/octet-stream' - -class ConnectionHelper: - def __init__(self, url): - self.conn = urlparse.urlparse(url) - if self.conn.scheme == 'http': - connection_type = httplib.HTTPConnection - if self.conn.port is None: - self.port = 80 - else: - connection_type = httplib.HTTPSConnection - if self.conn.port is None: - self.port = 443 - self.connection_type = connection_type - - def _connect(self): - self.connection = self.connection_type(self.conn.hostname + ':' + - str(self.conn.port or self.port)) - - def POST(self, path, parameter_dict, file_list=None): - self._connect() - parameter_dict.update(__ac_name=self.conn.username, - __ac_password=self.conn.password) - header_dict = {'Content-type': "application/x-www-form-urlencoded"} - if file_list is None: - body = urllib.urlencode(parameter_dict) - else: - boundary = mimetools.choose_boundary() - header_dict['Content-type'] = 'multipart/form-data; boundary=%s' % ( - boundary,) - body = '' - for k, v in parameter_dict.iteritems(): - body += '--%s\r\n' % boundary - body += 'Content-Disposition: form-data; name="%s"\r\n' % k - body += '\r\n' - body += '%s\r\n' % v - for name, filename in file_list: - f = open(filename, 'r') - body += '--%s\r\n' % boundary - body += 'Content-Disposition: form-data; name="%s"; filename="%s"\r\n'\ - % (name, name) - body += 'Content-Type: %s\r\n' % get_content_type(f) - body += 'Content-Length: %d\r\n' % os.fstat(f.fileno())[stat.ST_SIZE] - body += '\r\n' - body += f.read() - f.close() - body += '\r\n' - self.connection.request("POST", self.conn.path + '/' + path, - body, header_dict) - self.response = self.connection.getresponse() - - -class ERP5TestReportHandler: - def __init__(self, url, suite_name): - # random test id - self.test_id = "%s-%X" % ( - ("%s" % datetime.date.today()).replace("-", ""), - randint(1, 10000000000000000), - ) - self.connection_helper = ConnectionHelper(url) - self.suite_name = suite_name - - def reportStart(self): - # report that test is running - print 'Starting test with id %s' % self.test_id - self.connection_helper.POST('TestResultModule_reportRunning', dict( - test_suite=self.suite_name, - test_report_id=self.test_id, - )) - - def reportFinished(self, out_file): - # make file parsable by erp5_test_results - out_file, success, failure, duration = self.processResult(out_file) - - # XXX-Cedric : make correct display in test_result_module - tempcmd = tempfile.mkstemp()[1] - tempcmd2 = tempfile.mkstemp()[1] - tempout = tempfile.mkstemp()[1] - templog = tempfile.mkstemp()[1] - tl = open(templog, 'w') - tl.write(TB_SEP + '\n') - tl.write(out_file) - - tl.write("----------------------------------------------------------------------\n") - tl.write('Ran 1 test in %.2fs\n' % duration) - if success: - tl.write('OK\n') - else: - tl.write('FAILED (failures=1)\n') - tl.write(TB_SEP + '\n') - tl.close() - open(tempcmd, 'w').write(""" %s""" % self.suite_name) - # create nice zip archive - tempzip = tempfile.mkstemp()[1] - # XXX-Cedric : support multiple tests - zip = zipfile.ZipFile(tempzip, 'w') - zip.write(tempout, '%s/001/stdout' % self.suite_name) - zip.write(templog, '%s/001/stderr' % self.suite_name) - zip.write(tempcmd, '%s/001/cmdline' % self.suite_name) - zip.close() - os.unlink(templog) - os.unlink(tempcmd) - os.unlink(tempout) - os.unlink(tempcmd2) - - # post it to ERP5 - self.connection_helper.POST('TestResultModule_reportCompleted', - dict(test_report_id=self.test_id), file_list=[('filepath', tempzip)]) - os.unlink(tempzip) - - def processResult(self, out_file): - file_content = out_file - sucess_amount = TEST_PASS_RE.search(file_content).group(1) - failure_amount = TEST_FAILURE_RE.search(file_content).group(1) - error_title_list = [re.compile('\s+').sub(' ', x).strip() - for x in TEST_ERROR_TITLE_RE.findall(file_content)] - duration = DURATION_RE.search(file_content).group(1) - detail = '' - for test_result in TEST_RESULT_RE.findall(file_content): - if TEST_ERROR_RESULT_RE.match(test_result): - detail += test_result - - detail = IMAGE_RE.sub('', detail) - if detail: - detail = IMAGE_RE.sub('', detail) - detail = '''<html> -<head> - <style type="text/css">tr.status_failed { background-color:red };</style> -</head> -<body>%s</body> -</html>''' % detail - return detail, int(sucess_amount), int(failure_amount), float(duration) diff --git a/slapos/recipe/seleniumrunner/template/xvfb_run.in b/slapos/recipe/seleniumrunner/template/xvfb_run.in deleted file mode 100644 index 647e99ca5..000000000 --- a/slapos/recipe/seleniumrunner/template/xvfb_run.in +++ /dev/null @@ -1,5 +0,0 @@ -#!/bin/sh -# BEWARE: This file is operated by slapgrid -# BEWARE: It will be overwritten automatically - -%(xvfb_binary) :%(display) -screen %(display) 1024x768x24 \ No newline at end of file diff --git a/slapos/recipe/seleniumrunner/testrunner.py b/slapos/recipe/seleniumrunner/testrunner.py deleted file mode 100644 index 99b95e8d9..000000000 --- a/slapos/recipe/seleniumrunner/testrunner.py +++ /dev/null @@ -1,138 +0,0 @@ -############################################################################## -# -# 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 datetime import datetime -from erp5functionaltestreporthandler import ERP5TestReportHandler -from ERP5TypeFunctionalTestCase import Xvfb, Firefox, TimeoutError -from time import sleep -import time -import os -import urllib2 - -def run(args): - config = args[0] - - test_url = assembleTestUrl(config['base_url'], config['suite_name'], - config['user'], config['password']) - - # There is no test that can take more them 24 hours - timeout = 2.0 * 60 * 60 - - while True: - erp5_report = ERP5TestReportHandler(config['test_report_instance_url'], - config['project'] + '@' + config['suite_name']) - try: - os.environ['DISPLAY'] = config['display'] - xvfb = Xvfb(config['etc_directory'], config['xvfb_binary']) - profile_dir = os.path.join(config['etc_directory'], 'profile') - # XXX-Cedric : change Firefox prefs.js generation so that it can take a - # list of websites supposed to be reached instead of config['base_url'] - browser = Firefox(profile_dir, config['base_url'], config['browser_binary']) - try: - start = time.time() - xvfb.run() - profile_dir = os.path.join(config['etc_directory'], 'profile') - browser.run(test_url , xvfb.display) - erp5_report.reportStart() - while not isTestFinished(config['base_url']): - time.sleep(10) - print("Test not finished yet.") - if (time.time() - start) > float(timeout): - raise TimeoutError("Test took more than %s seconds" % timeout) - except TimeoutError: - continue - finally: - browser.quit() - xvfb.quit() - print("Test has finished and Firefox has been killed.") - - erp5_report.reportFinished(getStatus(config['base_url']).encode("utf-8", - "replace")) - - - print("Test finished and report sent, sleeping.") - except urllib2.URLError, urlError: - print "Error: %s" % urlError.msg - sleep(3600) - -def openUrl(url): - # Send Accept-Charset headers to activate the UnicodeConflictResolver - # (imitating firefox 3.5.9 here) - headers = { 'Accept-Charset' : 'ISO-8859-1,utf-8;q=0.7,*;q=0.7' } - request = urllib2.Request(url, headers=headers) - # Try to use long timeout, this is needed when there is many - # activities runing - try: - f = urllib2.urlopen(request, timeout=3600*4) - except TypeError: - f = urllib2.urlopen(request) - file_content = f.read() - f.close() - return file_content - -def isTestFinished(url): - """Fetch latest report. If report has been created less than 60 seconds ago, - it must be the current one. - Return true if test is finished, else return false. - """ - latest_report = openUrl('%s/portal_tests/TestTool_getLatestReportId/' % url) - if latest_report is '': - return False - latest_report_date = latest_report[7:] - time_delta = datetime.now() - \ - datetime.strptime(latest_report_date, '%Y%m%d_%H%M%S' ) - if time_delta.days is not 0: - return False - if time_delta.seconds < 120: - return True - return False - -def getStatus(url): - try: - # Try 5 times. - for i in range(5): - try: - status = openUrl('%s/portal_tests/TestTool_getResults/' % (url)) - break - except urllib2.URLError, urlError: - if i is 4: raise - print("Warning : %s while getting status" % urlError.msg) - except urllib2.HTTPError, e: - if e.msg == "No Content": - status = "" - else: - raise - return status - -def assembleTestUrl(base_url, suite_name, user, password): - """ - Create the full url to the testrunner - """ - test_url = "%s/%s/core/TestRunner.html?test=../test_suite_html&"\ - "resultsUrl=%s/postResults&auto=on&__ac_name=%s&__ac_password=%s" % ( - base_url, suite_name, base_url, user, password) - return test_url \ No newline at end of file diff --git a/slapos/recipe/shell.py b/slapos/recipe/shell.py deleted file mode 100644 index 4dac87752..000000000 --- a/slapos/recipe/shell.py +++ /dev/null @@ -1,57 +0,0 @@ -############################################################################## -# -# 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 json -from slapos.recipe.librecipe import GenericBaseRecipe - -class Recipe(GenericBaseRecipe): - - def install(self): - env = os.environ.copy() - - path_list = self.options['path'].split('\n') - env.update(PATH=':'.join(path_list)) - env.update(SHELL=self.options['shell']) - env.update(HOME=self.options['home']) - - ps1 = self.options.get('ps1') - if ps1 is not None: - env.update(PS1=str(json.loads(ps1))) - else: - env.update(PS1=env.get('PS1', '> ')) - - wrapper = self.createPythonScript( - self.options['wrapper'], - 'slapos.recipe.librecipe.execute.executee', - [ # Executable - [self.options['shell']], - # Environment - env - ] - ) - - return [wrapper] diff --git a/slapos/recipe/shellinabox.py b/slapos/recipe/shellinabox.py deleted file mode 100644 index 6279cebd3..000000000 --- a/slapos/recipe/shellinabox.py +++ /dev/null @@ -1,106 +0,0 @@ -############################################################################## -# -# 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 getpass import getpass -import pwd -import grp -import os - -from slapos.recipe.librecipe import GenericBaseRecipe - -def login_shell(args): - password = args['password'] - entered_password = getpass() - - if entered_password != password: - return 1 - else: - os.execl(args['shell'], args['shell']) - -def shellinabox(args): - certificate_dir = args['certificate_dir'] - certificate_path = os.path.join(certificate_dir, 'certificate.pem') - with open(certificate_path, 'w') as certificate_file: - with open(args['ssl_key'], 'r') as key_file: - # XXX: Dirty hack in order to make shellinabox work - print >> certificate_file, key_file.read().replace(' PRIVATE ', - ' RSA PRIVATE ') - with open(args['ssl_certificate']) as public_key_file: - print >> certificate_file, public_key_file.read() - - user = pwd.getpwuid(os.getuid()).pw_name - group = grp.getgrgid(os.getgid()).gr_name - service = '/:%(user)s:%(group)s:%(directory)s:%(command)s' % { - 'user': group, - 'group': user, - 'directory': args['directory'], - 'command': args['login_shell'], - } - - command_line = [ - args['shellinabox'], - '-d', - '-c', certificate_dir, - '-s', service, - '--ipv6', args['ipv6'], - '-p', args['port'], - ] - - os.execv(command_line[0], command_line) - - -class Recipe(GenericBaseRecipe): - - def install(self): - path_list = [] - - login_shell = self.createPythonScript( - self.options['login-shell'], - '%s.login_shell' % __name__, - { - 'password': self.options['password'], - 'shell': self.options['shell'] - } - ) - path_list.append(login_shell) - - wrapper = self.createPythonScript( - self.options['wrapper'], - '%s.shellinabox' % __name__, - dict( - certificate_dir=self.options['certificate-directory'], - ssl_key=self.options['key-file'], - ssl_certificate=self.options['cert-file'], - shellinabox=self.options['shellinabox-binary'], - directory=self.options['directory'], - ipv6=self.options['ipv6'], - port=self.options['port'], - login_shell=login_shell, - ) - ) - path_list.append(wrapper) - - return [wrapper] diff --git a/slapos/recipe/simplelogger.py b/slapos/recipe/simplelogger.py index 216f4dd01..494ef81f1 100644 --- a/slapos/recipe/simplelogger.py +++ b/slapos/recipe/simplelogger.py @@ -24,25 +24,31 @@ # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. # ############################################################################## +import shutil +import os import sys import time from slapos.recipe.librecipe import GenericBaseRecipe def log(args): - prefix = time.strftime('%Y-%m-%d.%H:%M.%s:') - with open(args['filename'], 'aw') as logfile: - for line in sys.stdin: - print >> logfile, prefix, line, - print >> logfile, prefix, '------------------------' + directory, suffix = args + filename = time.strftime('%Y-%m-%d.%H:%M.%s') + suffix + with open(os.path.join(directory, filename), 'aw') as logfile: + shutil.copyfileobj(sys.stdin, logfile) class Recipe(GenericBaseRecipe): def install(self): - wrapper = self.options['wrapper'] - log = self.options['log'] + self.logger.info("Simple logger installation") + binary = self.options['binary'] + output = self.options['output'] + suffix = self.options.get('suffix', '.log') + + script = self.createPythonScript(binary, + 'slapos.recipe.simplelogger.log', + arguments=[output, suffix]) + self.logger.debug("Logger script created at : %r", script) + self.logger.info("Simple logger installed.") - script = self.createPythonScript(wrapper, - __name__ + '.log', - arguments=dict(filename=log)) return [script] diff --git a/slapos/recipe/slaprunner/__init__.py b/slapos/recipe/slaprunner/__init__.py index 3c74cb5b2..ecaa4c6a7 100644 --- a/slapos/recipe/slaprunner/__init__.py +++ b/slapos/recipe/slaprunner/__init__.py @@ -62,24 +62,17 @@ class Recipe(BaseSlapRecipe): ipv6_address=ipv6, proxy_host=ipv4, proxy_port=proxy_port, - proxy_database=os.path.join(workdir, 'proxy.db'), - git=self.options['git'], - ssh_client=self.options['ssh_client'], - public_key=self.options['public_key'], - private_key=self.options['private_key'] + proxy_database=os.path.join(workdir, 'proxy.db') ) config_file = self.createConfigurationFile('slapos.cfg', self.substituteTemplate(pkg_resources.resource_filename(__name__, 'template/slapos.cfg.in'), configuration)) self.path_list.append(config_file) - environment = dict( - PATH=os.path.dirname(self.options['git']) + ':' + os.environ['PATH'], - GIT_SSH=self.options['ssh_client'] - ) - launch_args = [self.options['slaprunner'].strip(), config_file, '--debug'] + execute_arguments = dict(path = os.environ['PATH'], + launch_args = [self.options['slaprunner'].strip(), config_file]) self.path_list.extend(zc.buildout.easy_install.scripts([('slaprunner', - 'slapos.recipe.librecipe.execute', 'executee')], self.ws, sys.executable, - self.wrapper_directory, arguments=[launch_args, environment])) + 'slapos.recipe.slaprunner.execute', 'execute')], self.ws, sys.executable, + self.wrapper_directory, arguments=execute_arguments)) self.setConnectionDict(dict(url='http://[%s]:%s' % (ipv6, runner_port))) return self.path_list diff --git a/slapos/recipe/slaprunner/template/slapos.cfg.in b/slapos/recipe/slaprunner/template/slapos.cfg.in index 5dc00060e..af7bc2425 100644 --- a/slapos/recipe/slaprunner/template/slapos.cfg.in +++ b/slapos/recipe/slaprunner/template/slapos.cfg.in @@ -23,11 +23,3 @@ ipv6_address = %(ipv6_address)s host = %(proxy_host)s port = %(proxy_port)s database_uri = %(proxy_database)s - -[sshkeys_authority] -ssh_client = %(ssh_client)s -public_key = %(public_key)s -private_key = %(private_key)s - -[gitclient] -git = %(git)s diff --git a/slapos/recipe/softwaretype.py b/slapos/recipe/softwaretype.py index 43ff451f1..661adfbe1 100644 --- a/slapos/recipe/softwaretype.py +++ b/slapos/recipe/softwaretype.py @@ -29,7 +29,6 @@ import os import sys import copy from ConfigParser import ConfigParser -import json import subprocess import slapos.slap import netaddr @@ -83,33 +82,30 @@ class Recipe: if 'default' in self.options: software_type = 'default' else: - raise zc.buildout.UserError("This software type isn't mapped. And " + raise zc.buildout.UserError("This software type isn't mapped. And" "there's no default software type.") instance_file_path = self.options[software_type] if not os.path.exists(instance_file_path): - raise zc.buildout.UserError("The specified buildout config file %r does " - "not exist." % instance_file_path) + raise zc.buildout.UserError("The specified buildout config file does not" + "exist.") buildout = ConfigParser() with open(instance_file_path) as instance_path: buildout.readfp(instance_path) - buildout.set('buildout', 'installed', '.installed-%s.cfg' % self.name) + buildout.set('buildout', 'installed', + '.installed-%s.cfg' % software_type) - if not buildout.has_section('slap-parameter'): - buildout.add_section('slap-parameter') + buildout.add_section('slap-parameter') for parameter, value in self.parameter_dict.items(): - if isinstance(value, str): - buildout.set('slap-parameter', parameter, value) - else: - buildout.set('slap-parameter', parameter, json.dumps(value)) + buildout.set('slap-parameter', parameter, value) buildout.add_section('slap-network-information') - buildout.set('slap-network-information', 'local-ipv4', + buildout.set('slap-network-information', 'local-ipv4', self.getLocalIPv4Address()) - buildout.set('slap-network-information', 'global-ipv6', + buildout.set('slap-network-information', 'global-ipv6', self.getGlobalIPv6Address()) # Copy/paste slap_connection @@ -121,7 +117,7 @@ class Recipe: work_directory = os.path.abspath(self.buildout['buildout'][ 'directory']) buildout_filename = os.path.join(work_directory, - 'buildout-%s.cfg' % self.name) + 'buildout-%s.cfg' % software_type) with open(buildout_filename, 'w') as buildout_file: buildout.write(buildout_file) diff --git a/slapos/recipe/sphinx/__init__.py b/slapos/recipe/sphinx/__init__.py deleted file mode 100644 index 2dd2eee1f..000000000 --- a/slapos/recipe/sphinx/__init__.py +++ /dev/null @@ -1,58 +0,0 @@ -############################################################################## -# -# Copyright (c) 2011 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 - -class Recipe(GenericBaseRecipe): - - def install(self): - - # Configuration file - config = dict( - data_directory=self.options['data-directory'], - ip_address=self.options['ip'], - port=self.options['sphinx-port'], - sql_port=self.options['sql-port'], - searchd_log=self.options['searchd-log'], - query_log=self.options['query-log'], - pid=self.options['pid'], - ) - sphinx_conf_path = self.createFile( - self.options['configuration-file'], - self.substituteTemplate(self.getTemplateFilename('sphinx.conf.in'), - config) - ) - - # Create init script - wrapper = self.createPythonScript( - self.options['wrapper'], - 'slapos.recipe.librecipe.execute.execute', - [self.options['sphinx-searchd-binary'].strip(), '-c', - sphinx_conf_path, '--nodetach'], - ) - - return [wrapper, sphinx_conf_path] diff --git a/slapos/recipe/sphinx/template/sphinx.conf.in b/slapos/recipe/sphinx/template/sphinx.conf.in deleted file mode 100644 index 3e83ec492..000000000 --- a/slapos/recipe/sphinx/template/sphinx.conf.in +++ /dev/null @@ -1,596 +0,0 @@ -############################################################################# -## index definition -############################################################################# - -# realtime index -# -# you can run INSERT, REPLACE, and DELETE on this index on the fly -# using MySQL protocol (see 'listen' directive below) -index erp5 -{ - # 'rt' index type must be specified to use RT index - type = rt - - # index files path and file name, without extension - # mandatory, path must be writable, extensions will be auto-appended - path = %(data_directory)s/erp5 - - # RAM chunk size limit - # RT index will keep at most this much data in RAM, then flush to disk - # optional, default is 32M - # - # rt_mem_limit = 512M - - # full-text field declaration - # multi-value, mandatory - rt_field = SearchableText - - # unsigned integer attribute declaration - # multi-value (an arbitrary number of attributes is allowed), optional - # declares an unsigned 32-bit attribute - rt_attr_uint = uid - - # RT indexes currently support the following attribute types: - # uint, bigint, float, timestamp, string - # - # rt_attr_bigint = guid - # rt_attr_float = gpa - # rt_attr_timestamp = ts_added - # rt_attr_string = author - - # document attribute values (docinfo) storage mode - # optional, default is 'extern' - # known values are 'none', 'extern' and 'inline' - # docinfo = extern - - # memory locking for cached data (.spa and .spi), to prevent swapping - # optional, default is 0 (do not mlock) - # requires searchd to be run from root - # mlock = 0 - - # a list of morphology preprocessors to apply - # optional, default is empty - # - # builtin preprocessors are 'none', 'stem_en', 'stem_ru', 'stem_enru', - # 'soundex', and 'metaphone'; additional preprocessors available from - # libstemmer are 'libstemmer_XXX', where XXX is algorithm code - # (see libstemmer_c/libstemmer/modules.txt) - # - # morphology = stem_en, stem_ru, soundex - # morphology = libstemmer_german - # morphology = libstemmer_sv - morphology = stem_en - - # minimum word length at which to enable stemming - # optional, default is 1 (stem everything) - # - # min_stemming_len = 1 - - # stopword files list (space separated) - # optional, default is empty - # contents are plain text, charset_table and stemming are both applied - # - # stopwords = %(data_directory)s/erp5/stopwords.txt - - # wordforms file, in "mapfrom > mapto" plain text format - # optional, default is empty - # - # wordforms = %(data_directory)s/erp5/wordforms.txt - - # tokenizing exceptions file - # optional, default is empty - # - # plain text, case sensitive, space insensitive in map-from part - # one "Map Several Words => ToASingleOne" entry per line - # - # exceptions = %(data_directory)s/erp5/exceptions.txt - - # minimum indexed word length - # default is 1 (index everything) - min_word_len = 1 - - # charset encoding type - # optional, default is 'sbcs' - # known types are 'sbcs' (Single Byte CharSet) and 'utf-8' - charset_type = utf-8 - - # charset definition and case folding rules "table" - # optional, default value depends on charset_type - # - # defaults are configured to include English and Russian characters only - # you need to change the table to include additional ones - # this behavior MAY change in future versions - # - # 'sbcs' default value is - # charset_table = 0..9, A..Z->a..z, _, a..z, U+A8->U+B8, U+B8, U+C0..U+DF->U+E0..U+FF, U+E0..U+FF - # - # 'utf-8' default value is - # charset_table = 0..9, A..Z->a..z, _, a..z, U+410..U+42F->U+430..U+44F, U+430..U+44F - charset_table = \ - U+00C0->a, U+00C1->a, U+00C2->a, U+00C3->a, U+00C4->a, U+00C5->a, U+00E0->a, U+00E1->a, U+00E2->a, U+00E3->a, U+00E4->a, U+00E5->a, U+0100->a, U+0101->a, U+0102->a, U+0103->a, U+010300->a, U+0104->a, U+0105->a, U+01CD->a, U+01CE->a, U+01DE->a, U+01DF->a, \ - U+01E0->a, U+01E1->a, U+01FA->a, U+01FB->a, U+0200->a, U+0201->a, U+0202->a, U+0203->a, U+0226->a, U+0227->a, U+023A->a, U+0250->a, U+04D0->a, U+04D1->a, U+1D2C->a, U+1D43->a, U+1D44->a, U+1D8F->a, U+1E00->a, U+1E01->a, U+1E9A->a, U+1EA0->a, U+1EA1->a, \ - U+1EA2->a, U+1EA3->a, U+1EA4->a, U+1EA5->a, U+1EA6->a, U+1EA7->a, U+1EA8->a, U+1EA9->a, U+1EAA->a, U+1EAB->a, U+1EAC->a, U+1EAD->a, U+1EAE->a, U+1EAF->a, U+1EB0->a, U+1EB1->a, U+1EB2->a, U+1EB3->a, U+1EB4->a, U+1EB5->a, U+1EB6->a, U+1EB7->a, U+2090->a, \ - U+2C65->a, U+0180->b, U+0181->b, U+0182->b, U+0183->b, U+0243->b, U+0253->b, U+0299->b, U+16D2->b, U+1D03->b, U+1D2E->b, U+1D2F->b, U+1D47->b, U+1D6C->b, U+1D80->b, U+1E02->b, U+1E03->b, U+1E04->b, U+1E05->b, U+1E06->b, U+1E07->b, U+00C7->c, U+00E7->c, \ - U+0106->c, U+0107->c, U+0108->c, U+0109->c, U+010A->c, U+010B->c, U+010C->c, U+010D->c, U+0187->c, U+0188->c, U+023B->c, U+023C->c, U+0255->c, U+0297->c, U+1D9C->c, U+1D9D->c, U+1E08->c, U+1E09->c, U+212D->c, U+2184->c, U+010E->d, U+010F->d, U+0110->d, \ - U+0111->d, U+0189->d, U+018A->d, U+018B->d, U+018C->d, U+01C5->d, U+01F2->d, U+0221->d, U+0256->d, U+0257->d, U+1D05->d, U+1D30->d, U+1D48->d, U+1D6D->d, U+1D81->d, U+1D91->d, U+1E0A->d, U+1E0B->d, U+1E0C->d, U+1E0D->d, U+1E0E->d, U+1E0F->d, U+1E10->d, \ - U+1E11->d, U+1E12->d, U+1E13->d, U+00C8->e, U+00C9->e, U+00CA->e, U+00CB->e, U+00E8->e, U+00E9->e, U+00EA->e, U+00EB->e, U+0112->e, U+0113->e, U+0114->e, U+0115->e, U+0116->e, U+0117->e, U+0118->e, U+0119->e, U+011A->e, U+011B->e, U+018E->e, U+0190->e, \ - U+01DD->e, U+0204->e, U+0205->e, U+0206->e, U+0207->e, U+0228->e, U+0229->e, U+0246->e, U+0247->e, U+0258->e, U+025B->e, U+025C->e, U+025D->e, U+025E->e, U+029A->e, U+1D07->e, U+1D08->e, U+1D31->e, U+1D32->e, U+1D49->e, U+1D4B->e, U+1D4C->e, U+1D92->e, \ - U+1D93->e, U+1D94->e, U+1D9F->e, U+1E14->e, U+1E15->e, U+1E16->e, U+1E17->e, U+1E18->e, U+1E19->e, U+1E1A->e, U+1E1B->e, U+1E1C->e, U+1E1D->e, U+1EB8->e, U+1EB9->e, U+1EBA->e, U+1EBB->e, U+1EBC->e, U+1EBD->e, U+1EBE->e, U+1EBF->e, U+1EC0->e, U+1EC1->e, \ - U+1EC2->e, U+1EC3->e, U+1EC4->e, U+1EC5->e, U+1EC6->e, U+1EC7->e, U+2091->e, U+0191->f, U+0192->f, U+1D6E->f, U+1D82->f, U+1DA0->f, U+1E1E->f, U+1E1F->f, U+011C->g, U+011D->g, U+011E->g, U+011F->g, U+0120->g, U+0121->g, U+0122->g, U+0123->g, U+0193->g, \ - U+01E4->g, U+01E5->g, U+01E6->g, U+01E7->g, U+01F4->g, U+01F5->g, U+0260->g, U+0261->g, U+0262->g, U+029B->g, U+1D33->g, U+1D4D->g, U+1D77->g, U+1D79->g, U+1D83->g, U+1DA2->g, U+1E20->g, U+1E21->g, U+0124->h, U+0125->h, U+0126->h, U+0127->h, U+021E->h, \ - U+021F->h, U+0265->h, U+0266->h, U+029C->h, U+02AE->h, U+02AF->h, U+02B0->h, U+02B1->h, U+1D34->h, U+1DA3->h, U+1E22->h, U+1E23->h, U+1E24->h, U+1E25->h, U+1E26->h, U+1E27->h, U+1E28->h, U+1E29->h, U+1E2A->h, U+1E2B->h, U+1E96->h, U+210C->h, U+2C67->h, \ - U+2C68->h, U+2C75->h, U+2C76->h, U+00CC->i, U+00CD->i, U+00CE->i, U+00CF->i, U+00EC->i, U+00ED->i, U+00EE->i, U+00EF->i, U+010309->i, U+0128->i, U+0129->i, U+012A->i, U+012B->i, U+012C->i, U+012D->i, U+012E->i, U+012F->i, U+0130->i, U+0131->i, U+0197->i, \ - U+01CF->i, U+01D0->i, U+0208->i, U+0209->i, U+020A->i, U+020B->i, U+0268->i, U+026A->i, U+040D->i, U+0418->i, U+0419->i, U+0438->i, U+0439->i, U+0456->i, U+1D09->i, U+1D35->i, U+1D4E->i, U+1D62->i, U+1D7B->i, U+1D96->i, U+1DA4->i, U+1DA6->i, U+1DA7->i, \ - U+1E2C->i, U+1E2D->i, U+1E2E->i, U+1E2F->i, U+1EC8->i, U+1EC9->i, U+1ECA->i, U+1ECB->i, U+2071->i, U+2111->i, U+0134->j, U+0135->j, U+01C8->j, U+01CB->j, U+01F0->j, U+0237->j, U+0248->j, U+0249->j, U+025F->j, U+0284->j, U+029D->j, U+02B2->j, U+1D0A->j, \ - U+1D36->j, U+1DA1->j, U+1DA8->j, U+0136->k, U+0137->k, U+0198->k, U+0199->k, U+01E8->k, U+01E9->k, U+029E->k, U+1D0B->k, U+1D37->k, U+1D4F->k, U+1D84->k, U+1E30->k, U+1E31->k, U+1E32->k, U+1E33->k, U+1E34->k, U+1E35->k, U+2C69->k, U+2C6A->k, U+0139->l, \ - U+013A->l, U+013B->l, U+013C->l, U+013D->l, U+013E->l, U+013F->l, U+0140->l, U+0141->l, U+0142->l, U+019A->l, U+01C8->l, U+0234->l, U+023D->l, U+026B->l, U+026C->l, U+026D->l, U+029F->l, U+02E1->l, U+1D0C->l, U+1D38->l, U+1D85->l, U+1DA9->l, U+1DAA->l, \ - U+1DAB->l, U+1E36->l, U+1E37->l, U+1E38->l, U+1E39->l, U+1E3A->l, U+1E3B->l, U+1E3C->l, U+1E3D->l, U+2C60->l, U+2C61->l, U+2C62->l, U+019C->m, U+026F->m, U+0270->m, U+0271->m, U+1D0D->m, U+1D1F->m, U+1D39->m, U+1D50->m, U+1D5A->m, U+1D6F->m, U+1D86->m, \ - U+1DAC->m, U+1DAD->m, U+1E3E->m, U+1E3F->m, U+1E40->m, U+1E41->m, U+1E42->m, U+1E43->m, U+00D1->n, U+00F1->n, U+0143->n, U+0144->n, U+0145->n, U+0146->n, U+0147->n, U+0148->n, U+0149->n, U+019D->n, U+019E->n, U+01CB->n, U+01F8->n, U+01F9->n, U+0220->n, \ - U+0235->n, U+0272->n, U+0273->n, U+0274->n, U+1D0E->n, U+1D3A->n, U+1D3B->n, U+1D70->n, U+1D87->n, U+1DAE->n, U+1DAF->n, U+1DB0->n, U+1E44->n, U+1E45->n, U+1E46->n, U+1E47->n, U+1E48->n, U+1E49->n, U+1E4A->n, U+1E4B->n, U+207F->n, U+00D2->o, U+00D3->o, \ - U+00D4->o, U+00D5->o, U+00D6->o, U+00D8->o, U+00F2->o, U+00F3->o, U+00F4->o, U+00F5->o, U+00F6->o, U+00F8->o, U+01030F->o, U+014C->o, U+014D->o, U+014E->o, U+014F->o, U+0150->o, U+0151->o, U+0186->o, U+019F->o, U+01A0->o, U+01A1->o, U+01D1->o, U+01D2->o, \ - U+01EA->o, U+01EB->o, U+01EC->o, U+01ED->o, U+01FE->o, U+01FF->o, U+020C->o, U+020D->o, U+020E->o, U+020F->o, U+022A->o, U+022B->o, U+022C->o, U+022D->o, U+022E->o, U+022F->o, U+0230->o, U+0231->o, U+0254->o, U+0275->o, U+043E->o, U+04E6->o, U+04E7->o, \ - U+04E8->o, U+04E9->o, U+04EA->o, U+04EB->o, U+1D0F->o, U+1D10->o, U+1D11->o, U+1D12->o, U+1D13->o, U+1D16->o, U+1D17->o, U+1D3C->o, U+1D52->o, U+1D53->o, U+1D54->o, U+1D55->o, U+1D97->o, U+1DB1->o, U+1E4C->o, U+1E4D->o, U+1E4E->o, U+1E4F->o, U+1E50->o, \ - U+1E51->o, U+1E52->o, U+1E53->o, U+1ECC->o, U+1ECD->o, U+1ECE->o, U+1ECF->o, U+1ED0->o, U+1ED1->o, U+1ED2->o, U+1ED3->o, U+1ED4->o, U+1ED5->o, U+1ED6->o, U+1ED7->o, U+1ED8->o, U+1ED9->o, U+1EDA->o, U+1EDB->o, U+1EDC->o, U+1EDD->o, U+1EDE->o, U+1EDF->o, \ - U+1EE0->o, U+1EE1->o, U+1EE2->o, U+1EE3->o, U+2092->o, U+2C9E->o, U+2C9F->o, U+01A4->p, U+01A5->p, U+1D18->p, U+1D3E->p, U+1D56->p, U+1D71->p, U+1D7D->p, U+1D88->p, U+1E54->p, U+1E55->p, U+1E56->p, U+1E57->p, U+2C63->p, U+024A->q, U+024B->q, U+02A0->q, \ - U+0154->r, U+0155->r, U+0156->r, U+0157->r, U+0158->r, U+0159->r, U+0210->r, U+0211->r, U+0212->r, U+0213->r, U+024C->r, U+024D->r, U+0279->r, U+027A->r, U+027B->r, U+027C->r, U+027D->r, U+027E->r, U+027F->r, U+0280->r, U+0281->r, U+02B3->r, U+02B4->r, \ - U+02B5->r, U+02B6->r, U+1D19->r, U+1D1A->r, U+1D3F->r, U+1D63->r, U+1D72->r, U+1D73->r, U+1D89->r, U+1DCA->r, U+1E58->r, U+1E59->r, U+1E5A->r, U+1E5B->r, U+1E5C->r, U+1E5D->r, U+1E5E->r, U+1E5F->r, U+211C->r, U+2C64->r, U+00DF->s, U+015A->s, U+015B->s, \ - U+015C->s, U+015D->s, U+015E->s, U+015F->s, U+0160->s, U+0161->s, U+017F->s, U+0218->s, U+0219->s, U+023F->s, U+0282->s, U+02E2->s, U+1D74->s, U+1D8A->s, U+1DB3->s, U+1E60->s, U+1E61->s, U+1E62->s, U+1E63->s, U+1E64->s, U+1E65->s, U+1E66->s, U+1E67->s, \ - U+1E68->s, U+1E69->s, U+1E9B->s, U+0162->t, U+0163->t, U+0164->t, U+0165->t, U+0166->t, U+0167->t, U+01AB->t, U+01AC->t, U+01AD->t, U+01AE->t, U+021A->t, U+021B->t, U+0236->t, U+023E->t, U+0287->t, U+0288->t, U+1D1B->t, U+1D40->t, U+1D57->t, U+1D75->t, \ - U+1DB5->t, U+1E6A->t, U+1E6B->t, U+1E6C->t, U+1E6D->t, U+1E6E->t, U+1E6F->t, U+1E70->t, U+1E71->t, U+1E97->t, U+2C66->t, U+00D9->u, U+00DA->u, U+00DB->u, U+00DC->u, U+00F9->u, U+00FA->u, U+00FB->u, U+00FC->u, U+010316->u, U+0168->u, U+0169->u, U+016A->u, \ - U+016B->u, U+016C->u, U+016D->u, U+016E->u, U+016F->u, U+0170->u, U+0171->u, U+0172->u, U+0173->u, U+01AF->u, U+01B0->u, U+01D3->u, U+01D4->u, U+01D5->u, U+01D6->u, U+01D7->u, U+01D8->u, U+01D9->u, U+01DA->u, U+01DB->u, U+01DC->u, U+0214->u, U+0215->u, \ - U+0216->u, U+0217->u, U+0244->u, U+0289->u, U+1D1C->u, U+1D1D->u, U+1D1E->u, U+1D41->u, U+1D58->u, U+1D59->u, U+1D64->u, U+1D7E->u, U+1D99->u, U+1DB6->u, U+1DB8->u, U+1E72->u, U+1E73->u, U+1E74->u, U+1E75->u, U+1E76->u, U+1E77->u, U+1E78->u, U+1E79->u, \ - U+1E7A->u, U+1E7B->u, U+1EE4->u, U+1EE5->u, U+1EE6->u, U+1EE7->u, U+1EE8->u, U+1EE9->u, U+1EEA->u, U+1EEB->u, U+1EEC->u, U+1EED->u, U+1EEE->u, U+1EEF->u, U+1EF0->u, U+1EF1->u, U+01B2->v, U+0245->v, U+028B->v, U+028C->v, U+1D20->v, U+1D5B->v, U+1D65->v, \ - U+1D8C->v, U+1DB9->v, U+1DBA->v, U+1E7C->v, U+1E7D->v, U+1E7E->v, U+1E7F->v, U+2C74->v, U+0174->w, U+0175->w, U+028D->w, U+02B7->w, U+1D21->w, U+1D42->w, U+1E80->w, U+1E81->w, U+1E82->w, U+1E83->w, U+1E84->w, U+1E85->w, U+1E86->w, U+1E87->w, U+1E88->w, \ - U+1E89->w, U+1E98->w, U+02E3->x, U+1D8D->x, U+1E8A->x, U+1E8B->x, U+1E8C->x, U+1E8D->x, U+2093->x, U+00DD->y, U+00FD->y, U+00FF->y, U+0176->y, U+0177->y, U+0178->y, U+01B3->y, U+01B4->y, U+0232->y, U+0233->y, U+024E->y, U+024F->y, U+028E->y, U+028F->y, \ - U+02B8->y, U+1E8E->y, U+1E8F->y, U+1E99->y, U+1EF2->y, U+1EF3->y, U+1EF4->y, U+1EF5->y, U+1EF6->y, U+1EF7->y, U+1EF8->y, U+1EF9->y, U+0179->z, U+017A->z, U+017B->z, U+017C->z, U+017D->z, U+017E->z, U+01B5->z, U+01B6->z, U+0224->z, U+0225->z, U+0240->z, \ - U+0290->z, U+0291->z, U+1D22->z, U+1D76->z, U+1D8E->z, U+1DBB->z, U+1DBC->z, U+1DBD->z, U+1E90->z, U+1E91->z, U+1E92->z, U+1E93->z, U+1E94->z, U+1E95->z, U+2128->z, U+2C6B->z, U+2C6C->z, U+00C6->U+00E6, U+01E2->U+00E6, U+01E3->U+00E6, U+01FC->U+00E6, \ - U+01FD->U+00E6, U+1D01->U+00E6, U+1D02->U+00E6, U+1D2D->U+00E6, U+1D46->U+00E6, U+00E6, U+0622->U+0627, U+0623->U+0627, U+0624->U+0648, U+0625->U+0627, U+0626->U+064A, U+06C0->U+06D5, U+06C2->U+06C1, U+06D3->U+06D2, U+FB50->U+0671, U+FB51->U+0671, U+FB52->U+067B, \ - U+FB53->U+067B, U+FB54->U+067B, U+FB56->U+067E, U+FB57->U+067E, U+FB58->U+067E, U+FB5A->U+0680, U+FB5B->U+0680, U+FB5C->U+0680, U+FB5E->U+067A, U+FB5F->U+067A, U+FB60->U+067A, U+FB62->U+067F, U+FB63->U+067F, U+FB64->U+067F, U+FB66->U+0679, U+FB67->U+0679, \ - U+FB68->U+0679, U+FB6A->U+06A4, U+FB6B->U+06A4, U+FB6C->U+06A4, U+FB6E->U+06A6, U+FB6F->U+06A6, U+FB70->U+06A6, U+FB72->U+0684, U+FB73->U+0684, U+FB74->U+0684, U+FB76->U+0683, U+FB77->U+0683, U+FB78->U+0683, U+FB7A->U+0686, U+FB7B->U+0686, U+FB7C->U+0686, \ - U+FB7E->U+0687, U+FB7F->U+0687, U+FB80->U+0687, U+FB82->U+068D, U+FB83->U+068D, U+FB84->U+068C, U+FB85->U+068C, U+FB86->U+068E, U+FB87->U+068E, U+FB88->U+0688, U+FB89->U+0688, U+FB8A->U+0698, U+FB8B->U+0698, U+FB8C->U+0691, U+FB8D->U+0691, U+FB8E->U+06A9, \ - U+FB8F->U+06A9, U+FB90->U+06A9, U+FB92->U+06AF, U+FB93->U+06AF, U+FB94->U+06AF, U+FB96->U+06B3, U+FB97->U+06B3, U+FB98->U+06B3, U+FB9A->U+06B1, U+FB9B->U+06B1, U+FB9C->U+06B1, U+FB9E->U+06BA, U+FB9F->U+06BA, U+FBA0->U+06BB, U+FBA1->U+06BB, U+FBA2->U+06BB, \ - U+FBA4->U+06C0, U+FBA5->U+06C0, U+FBA6->U+06C1, U+FBA7->U+06C1, U+FBA8->U+06C1, U+FBAA->U+06BE, U+FBAB->U+06BE, U+FBAC->U+06BE, U+FBAE->U+06D2, U+FBAF->U+06D2, U+FBB0->U+06D3, U+FBB1->U+06D3, U+FBD3->U+06AD, U+FBD4->U+06AD, U+FBD5->U+06AD, U+FBD7->U+06C7, \ - U+FBD8->U+06C7, U+FBD9->U+06C6, U+FBDA->U+06C6, U+FBDB->U+06C8, U+FBDC->U+06C8, U+FBDD->U+0677, U+FBDE->U+06CB, U+FBDF->U+06CB, U+FBE0->U+06C5, U+FBE1->U+06C5, U+FBE2->U+06C9, U+FBE3->U+06C9, U+FBE4->U+06D0, U+FBE5->U+06D0, U+FBE6->U+06D0, U+FBE8->U+0649, \ - U+FBFC->U+06CC, U+FBFD->U+06CC, U+FBFE->U+06CC, U+0621, U+0627..U+063A, U+0641..U+064A, U+0660..U+0669, U+066E, U+066F, U+0671..U+06BF, U+06C1, U+06C3..U+06D2, U+06D5, U+06EE..U+06FC, U+06FF, U+0750..U+076D, U+FB55, U+FB59, U+FB5D, U+FB61, U+FB65, U+FB69, \ - U+FB6D, U+FB71, U+FB75, U+FB79, U+FB7D, U+FB81, U+FB91, U+FB95, U+FB99, U+FB9D, U+FBA3, U+FBA9, U+FBAD, U+FBD6, U+FBE7, U+FBE9, U+FBFF, U+0531..U+0556->U+0561..U+0586, U+0561..U+0586, U+0587, U+09DC->U+09A1, U+09DD->U+09A2, U+09DF->U+09AF, U+09F0->U+09AC, \ - U+09F1->U+09AC, U+0985..U+0990, U+0993..U+09B0, U+09B2, U+09B6..U+09B9, U+09CE, U+09E0, U+09E1, U+09E6..U+09EF, U+F900->U+8C48, U+F901->U+66F4, U+F902->U+8ECA, U+F903->U+8CC8, U+F904->U+6ED1, U+F905->U+4E32, U+F906->U+53E5, U+F907->U+9F9C, U+F908->U+9F9C, \ - U+F909->U+5951, U+F90A->U+91D1, U+F90B->U+5587, U+F90C->U+5948, U+F90D->U+61F6, U+F90E->U+7669, U+F90F->U+7F85, U+F910->U+863F, U+F911->U+87BA, U+F912->U+88F8, U+F913->U+908F, U+F914->U+6A02, U+F915->U+6D1B, U+F916->U+70D9, U+F917->U+73DE, U+F918->U+843D, \ - U+F919->U+916A, U+F91A->U+99F1, U+F91B->U+4E82, U+F91C->U+5375, U+F91D->U+6B04, U+F91E->U+721B, U+F91F->U+862D, U+F920->U+9E1E, U+F921->U+5D50, U+F922->U+6FEB, U+F923->U+85CD, U+F924->U+8964, U+F925->U+62C9, U+F926->U+81D8, U+F927->U+881F, U+F928->U+5ECA, \ - U+F929->U+6717, U+F92A->U+6D6A, U+F92B->U+72FC, U+F92C->U+90CE, U+F92D->U+4F86, U+F92E->U+51B7, U+F92F->U+52DE, U+F930->U+64C4, U+F931->U+6AD3, U+F932->U+7210, U+F933->U+76E7, U+F934->U+8001, U+F935->U+8606, U+F936->U+865C, U+F937->U+8DEF, U+F938->U+9732, \ - U+F939->U+9B6F, U+F93A->U+9DFA, U+F93B->U+788C, U+F93C->U+797F, U+F93D->U+7DA0, U+F93E->U+83C9, U+F93F->U+9304, U+F940->U+9E7F, U+F941->U+8AD6, U+F942->U+58DF, U+F943->U+5F04, U+F944->U+7C60, U+F945->U+807E, U+F946->U+7262, U+F947->U+78CA, U+F948->U+8CC2, \ - U+F949->U+96F7, U+F94A->U+58D8, U+F94B->U+5C62, U+F94C->U+6A13, U+F94D->U+6DDA, U+F94E->U+6F0F, U+F94F->U+7D2F, U+F950->U+7E37, U+F951->U+964B, U+F952->U+52D2, U+F953->U+808B, U+F954->U+51DC, U+F955->U+51CC, U+F956->U+7A1C, U+F957->U+7DBE, U+F958->U+83F1, \ - U+F959->U+9675, U+F95A->U+8B80, U+F95B->U+62CF, U+F95C->U+6A02, U+F95D->U+8AFE, U+F95E->U+4E39, U+F95F->U+5BE7, U+F960->U+6012, U+F961->U+7387, U+F962->U+7570, U+F963->U+5317, U+F964->U+78FB, U+F965->U+4FBF, U+F966->U+5FA9, U+F967->U+4E0D, U+F968->U+6CCC, \ - U+F969->U+6578, U+F96A->U+7D22, U+F96B->U+53C3, U+F96C->U+585E, U+F96D->U+7701, U+F96E->U+8449, U+F96F->U+8AAA, U+F970->U+6BBA, U+F971->U+8FB0, U+F972->U+6C88, U+F973->U+62FE, U+F974->U+82E5, U+F975->U+63A0, U+F976->U+7565, U+F977->U+4EAE, U+F978->U+5169, \ - U+F979->U+51C9, U+F97A->U+6881, U+F97B->U+7CE7, U+F97C->U+826F, U+F97D->U+8AD2, U+F97E->U+91CF, U+F97F->U+52F5, U+F980->U+5442, U+F981->U+5973, U+F982->U+5EEC, U+F983->U+65C5, U+F984->U+6FFE, U+F985->U+792A, U+F986->U+95AD, U+F987->U+9A6A, U+F988->U+9E97, \ - U+F989->U+9ECE, U+F98A->U+529B, U+F98B->U+66C6, U+F98C->U+6B77, U+F98D->U+8F62, U+F98E->U+5E74, U+F98F->U+6190, U+F990->U+6200, U+F991->U+649A, U+F992->U+6F23, U+F993->U+7149, U+F994->U+7489, U+F995->U+79CA, U+F996->U+7DF4, U+F997->U+806F, U+F998->U+8F26, \ - U+F999->U+84EE, U+F99A->U+9023, U+F99B->U+934A, U+F99C->U+5217, U+F99D->U+52A3, U+F99E->U+54BD, U+F99F->U+70C8, U+F9A0->U+88C2, U+F9A1->U+8AAA, U+F9A2->U+5EC9, U+F9A3->U+5FF5, U+F9A4->U+637B, U+F9A5->U+6BAE, U+F9A6->U+7C3E, U+F9A7->U+7375, U+F9A8->U+4EE4, \ - U+F9A9->U+56F9, U+F9AA->U+5BE7, U+F9AB->U+5DBA, U+F9AC->U+601C, U+F9AD->U+73B2, U+F9AE->U+7469, U+F9AF->U+7F9A, U+F9B0->U+8046, U+F9B1->U+9234, U+F9B2->U+96F6, U+F9B3->U+9748, U+F9B4->U+9818, U+F9B5->U+4F8B, U+F9B6->U+79AE, U+F9B7->U+91B4, U+F9B8->U+96B8, \ - U+F9B9->U+60E1, U+F9BA->U+4E86, U+F9BB->U+50DA, U+F9BC->U+5BEE, U+F9BD->U+5C3F, U+F9BE->U+6599, U+F9BF->U+6A02, U+F9C0->U+71CE, U+F9C1->U+7642, U+F9C2->U+84FC, U+F9C3->U+907C, U+F9C4->U+9F8D, U+F9C5->U+6688, U+F9C6->U+962E, U+F9C7->U+5289, U+F9C8->U+677B, \ - U+F9C9->U+67F3, U+F9CA->U+6D41, U+F9CB->U+6E9C, U+F9CC->U+7409, U+F9CD->U+7559, U+F9CE->U+786B, U+F9CF->U+7D10, U+F9D0->U+985E, U+F9D1->U+516D, U+F9D2->U+622E, U+F9D3->U+9678, U+F9D4->U+502B, U+F9D5->U+5D19, U+F9D6->U+6DEA, U+F9D7->U+8F2A, U+F9D8->U+5F8B, \ - U+F9D9->U+6144, U+F9DA->U+6817, U+F9DB->U+7387, U+F9DC->U+9686, U+F9DD->U+5229, U+F9DE->U+540F, U+F9DF->U+5C65, U+F9E0->U+6613, U+F9E1->U+674E, U+F9E2->U+68A8, U+F9E3->U+6CE5, U+F9E4->U+7406, U+F9E5->U+75E2, U+F9E6->U+7F79, U+F9E7->U+88CF, U+F9E8->U+88E1, \ - U+F9E9->U+91CC, U+F9EA->U+96E2, U+F9EB->U+533F, U+F9EC->U+6EBA, U+F9ED->U+541D, U+F9EE->U+71D0, U+F9EF->U+7498, U+F9F0->U+85FA, U+F9F1->U+96A3, U+F9F2->U+9C57, U+F9F3->U+9E9F, U+F9F4->U+6797, U+F9F5->U+6DCB, U+F9F6->U+81E8, U+F9F7->U+7ACB, U+F9F8->U+7B20, \ - U+F9F9->U+7C92, U+F9FA->U+72C0, U+F9FB->U+7099, U+F9FC->U+8B58, U+F9FD->U+4EC0, U+F9FE->U+8336, U+F9FF->U+523A, U+FA00->U+5207, U+FA01->U+5EA6, U+FA02->U+62D3, U+FA03->U+7CD6, U+FA04->U+5B85, U+FA05->U+6D1E, U+FA06->U+66B4, U+FA07->U+8F3B, U+FA08->U+884C, \ - U+FA09->U+964D, U+FA0A->U+898B, U+FA0B->U+5ED3, U+FA0C->U+5140, U+FA0D->U+55C0, U+FA10->U+585A, U+FA12->U+6674, U+FA15->U+51DE, U+FA16->U+732A, U+FA17->U+76CA, U+FA18->U+793C, U+FA19->U+795E, U+FA1A->U+7965, U+FA1B->U+798F, U+FA1C->U+9756, U+FA1D->U+7CBE, \ - U+FA1E->U+7FBD, U+FA20->U+8612, U+FA22->U+8AF8, U+FA25->U+9038, U+FA26->U+90FD, U+FA2A->U+98EF, U+FA2B->U+98FC, U+FA2C->U+9928, U+FA2D->U+9DB4, U+FA30->U+4FAE, U+FA31->U+50E7, U+FA32->U+514D, U+FA33->U+52C9, U+FA34->U+52E4, U+FA35->U+5351, U+FA36->U+559D, \ - U+FA37->U+5606, U+FA38->U+5668, U+FA39->U+5840, U+FA3A->U+58A8, U+FA3B->U+5C64, U+FA3C->U+5C6E, U+FA3D->U+6094, U+FA3E->U+6168, U+FA3F->U+618E, U+FA40->U+61F2, U+FA41->U+654F, U+FA42->U+65E2, U+FA43->U+6691, U+FA44->U+6885, U+FA45->U+6D77, U+FA46->U+6E1A, \ - U+FA47->U+6F22, U+FA48->U+716E, U+FA49->U+722B, U+FA4A->U+7422, U+FA4B->U+7891, U+FA4C->U+793E, U+FA4D->U+7949, U+FA4E->U+7948, U+FA4F->U+7950, U+FA50->U+7956, U+FA51->U+795D, U+FA52->U+798D, U+FA53->U+798E, U+FA54->U+7A40, U+FA55->U+7A81, U+FA56->U+7BC0, \ - U+FA57->U+7DF4, U+FA58->U+7E09, U+FA59->U+7E41, U+FA5A->U+7F72, U+FA5B->U+8005, U+FA5C->U+81ED, U+FA5D->U+8279, U+FA5E->U+8279, U+FA5F->U+8457, U+FA60->U+8910, U+FA61->U+8996, U+FA62->U+8B01, U+FA63->U+8B39, U+FA64->U+8CD3, U+FA65->U+8D08, U+FA66->U+8FB6, \ - U+FA67->U+9038, U+FA68->U+96E3, U+FA69->U+97FF, U+FA6A->U+983B, U+FA70->U+4E26, U+FA71->U+51B5, U+FA72->U+5168, U+FA73->U+4F80, U+FA74->U+5145, U+FA75->U+5180, U+FA76->U+52C7, U+FA77->U+52FA, U+FA78->U+559D, U+FA79->U+5555, U+FA7A->U+5599, U+FA7B->U+55E2, \ - U+FA7C->U+585A, U+FA7D->U+58B3, U+FA7E->U+5944, U+FA7F->U+5954, U+FA80->U+5A62, U+FA81->U+5B28, U+FA82->U+5ED2, U+FA83->U+5ED9, U+FA84->U+5F69, U+FA85->U+5FAD, U+FA86->U+60D8, U+FA87->U+614E, U+FA88->U+6108, U+FA89->U+618E, U+FA8A->U+6160, U+FA8B->U+61F2, \ - U+FA8C->U+6234, U+FA8D->U+63C4, U+FA8E->U+641C, U+FA8F->U+6452, U+FA90->U+6556, U+FA91->U+6674, U+FA92->U+6717, U+FA93->U+671B, U+FA94->U+6756, U+FA95->U+6B79, U+FA96->U+6BBA, U+FA97->U+6D41, U+FA98->U+6EDB, U+FA99->U+6ECB, U+FA9A->U+6F22, U+FA9B->U+701E, \ - U+FA9C->U+716E, U+FA9D->U+77A7, U+FA9E->U+7235, U+FA9F->U+72AF, U+FAA0->U+732A, U+FAA1->U+7471, U+FAA2->U+7506, U+FAA3->U+753B, U+FAA4->U+761D, U+FAA5->U+761F, U+FAA6->U+76CA, U+FAA7->U+76DB, U+FAA8->U+76F4, U+FAA9->U+774A, U+FAAA->U+7740, U+FAAB->U+78CC, \ - U+FAAC->U+7AB1, U+FAAD->U+7BC0, U+FAAE->U+7C7B, U+FAAF->U+7D5B, U+FAB0->U+7DF4, U+FAB1->U+7F3E, U+FAB2->U+8005, U+FAB3->U+8352, U+FAB4->U+83EF, U+FAB5->U+8779, U+FAB6->U+8941, U+FAB7->U+8986, U+FAB8->U+8996, U+FAB9->U+8ABF, U+FABA->U+8AF8, U+FABB->U+8ACB, \ - U+FABC->U+8B01, U+FABD->U+8AFE, U+FABE->U+8AED, U+FABF->U+8B39, U+FAC0->U+8B8A, U+FAC1->U+8D08, U+FAC2->U+8F38, U+FAC3->U+9072, U+FAC4->U+9199, U+FAC5->U+9276, U+FAC6->U+967C, U+FAC7->U+96E3, U+FAC8->U+9756, U+FAC9->U+97DB, U+FACA->U+97FF, U+FACB->U+980B, \ - U+FACC->U+983B, U+FACD->U+9B12, U+FACE->U+9F9C, U+FACF->U+2284A, U+FAD0->U+22844, U+FAD1->U+233D5, U+FAD2->U+3B9D, U+FAD3->U+4018, U+FAD4->U+4039, U+FAD5->U+25249, U+FAD6->U+25CD0, U+FAD7->U+27ED3, U+FAD8->U+9F43, U+FAD9->U+9F8E, U+2F800->U+4E3D, U+2F801->U+4E38, \ - U+2F802->U+4E41, U+2F803->U+20122, U+2F804->U+4F60, U+2F805->U+4FAE, U+2F806->U+4FBB, U+2F807->U+5002, U+2F808->U+507A, U+2F809->U+5099, U+2F80A->U+50E7, U+2F80B->U+50CF, U+2F80C->U+349E, U+2F80D->U+2063A, U+2F80E->U+514D, U+2F80F->U+5154, U+2F810->U+5164, \ - U+2F811->U+5177, U+2F812->U+2051C, U+2F813->U+34B9, U+2F814->U+5167, U+2F815->U+518D, U+2F816->U+2054B, U+2F817->U+5197, U+2F818->U+51A4, U+2F819->U+4ECC, U+2F81A->U+51AC, U+2F81B->U+51B5, U+2F81C->U+291DF, U+2F81D->U+51F5, U+2F81E->U+5203, U+2F81F->U+34DF, \ - U+2F820->U+523B, U+2F821->U+5246, U+2F822->U+5272, U+2F823->U+5277, U+2F824->U+3515, U+2F825->U+52C7, U+2F826->U+52C9, U+2F827->U+52E4, U+2F828->U+52FA, U+2F829->U+5305, U+2F82A->U+5306, U+2F82B->U+5317, U+2F82C->U+5349, U+2F82D->U+5351, U+2F82E->U+535A, \ - U+2F82F->U+5373, U+2F830->U+537D, U+2F831->U+537F, U+2F832->U+537F, U+2F833->U+537F, U+2F834->U+20A2C, U+2F835->U+7070, U+2F836->U+53CA, U+2F837->U+53DF, U+2F838->U+20B63, U+2F839->U+53EB, U+2F83A->U+53F1, U+2F83B->U+5406, U+2F83C->U+549E, U+2F83D->U+5438, \ - U+2F83E->U+5448, U+2F83F->U+5468, U+2F840->U+54A2, U+2F841->U+54F6, U+2F842->U+5510, U+2F843->U+5553, U+2F844->U+5563, U+2F845->U+5584, U+2F846->U+5584, U+2F847->U+5599, U+2F848->U+55AB, U+2F849->U+55B3, U+2F84A->U+55C2, U+2F84B->U+5716, U+2F84C->U+5606, \ - U+2F84D->U+5717, U+2F84E->U+5651, U+2F84F->U+5674, U+2F850->U+5207, U+2F851->U+58EE, U+2F852->U+57CE, U+2F853->U+57F4, U+2F854->U+580D, U+2F855->U+578B, U+2F856->U+5832, U+2F857->U+5831, U+2F858->U+58AC, U+2F859->U+214E4, U+2F85A->U+58F2, U+2F85B->U+58F7, \ - U+2F85C->U+5906, U+2F85D->U+591A, U+2F85E->U+5922, U+2F85F->U+5962, U+2F860->U+216A8, U+2F861->U+216EA, U+2F862->U+59EC, U+2F863->U+5A1B, U+2F864->U+5A27, U+2F865->U+59D8, U+2F866->U+5A66, U+2F867->U+36EE, U+2F868->U+36FC, U+2F869->U+5B08, U+2F86A->U+5B3E, \ - U+2F86B->U+5B3E, U+2F86C->U+219C8, U+2F86D->U+5BC3, U+2F86E->U+5BD8, U+2F86F->U+5BE7, U+2F870->U+5BF3, U+2F871->U+21B18, U+2F872->U+5BFF, U+2F873->U+5C06, U+2F874->U+5F53, U+2F875->U+5C22, U+2F876->U+3781, U+2F877->U+5C60, U+2F878->U+5C6E, U+2F879->U+5CC0, \ - U+2F87A->U+5C8D, U+2F87B->U+21DE4, U+2F87C->U+5D43, U+2F87D->U+21DE6, U+2F87E->U+5D6E, U+2F87F->U+5D6B, U+2F880->U+5D7C, U+2F881->U+5DE1, U+2F882->U+5DE2, U+2F883->U+382F, U+2F884->U+5DFD, U+2F885->U+5E28, U+2F886->U+5E3D, U+2F887->U+5E69, U+2F888->U+3862, \ - U+2F889->U+22183, U+2F88A->U+387C, U+2F88B->U+5EB0, U+2F88C->U+5EB3, U+2F88D->U+5EB6, U+2F88E->U+5ECA, U+2F88F->U+2A392, U+2F890->U+5EFE, U+2F891->U+22331, U+2F892->U+22331, U+2F893->U+8201, U+2F894->U+5F22, U+2F895->U+5F22, U+2F896->U+38C7, U+2F897->U+232B8, \ - U+2F898->U+261DA, U+2F899->U+5F62, U+2F89A->U+5F6B, U+2F89B->U+38E3, U+2F89C->U+5F9A, U+2F89D->U+5FCD, U+2F89E->U+5FD7, U+2F89F->U+5FF9, U+2F8A0->U+6081, U+2F8A1->U+393A, U+2F8A2->U+391C, U+2F8A3->U+6094, U+2F8A4->U+226D4, U+2F8A5->U+60C7, U+2F8A6->U+6148, \ - U+2F8A7->U+614C, U+2F8A8->U+614E, U+2F8A9->U+614C, U+2F8AA->U+617A, U+2F8AB->U+618E, U+2F8AC->U+61B2, U+2F8AD->U+61A4, U+2F8AE->U+61AF, U+2F8AF->U+61DE, U+2F8B0->U+61F2, U+2F8B1->U+61F6, U+2F8B2->U+6210, U+2F8B3->U+621B, U+2F8B4->U+625D, U+2F8B5->U+62B1, \ - U+2F8B6->U+62D4, U+2F8B7->U+6350, U+2F8B8->U+22B0C, U+2F8B9->U+633D, U+2F8BA->U+62FC, U+2F8BB->U+6368, U+2F8BC->U+6383, U+2F8BD->U+63E4, U+2F8BE->U+22BF1, U+2F8BF->U+6422, U+2F8C0->U+63C5, U+2F8C1->U+63A9, U+2F8C2->U+3A2E, U+2F8C3->U+6469, U+2F8C4->U+647E, \ - U+2F8C5->U+649D, U+2F8C6->U+6477, U+2F8C7->U+3A6C, U+2F8C8->U+654F, U+2F8C9->U+656C, U+2F8CA->U+2300A, U+2F8CB->U+65E3, U+2F8CC->U+66F8, U+2F8CD->U+6649, U+2F8CE->U+3B19, U+2F8CF->U+6691, U+2F8D0->U+3B08, U+2F8D1->U+3AE4, U+2F8D2->U+5192, U+2F8D3->U+5195, \ - U+2F8D4->U+6700, U+2F8D5->U+669C, U+2F8D6->U+80AD, U+2F8D7->U+43D9, U+2F8D8->U+6717, U+2F8D9->U+671B, U+2F8DA->U+6721, U+2F8DB->U+675E, U+2F8DC->U+6753, U+2F8DD->U+233C3, U+2F8DE->U+3B49, U+2F8DF->U+67FA, U+2F8E0->U+6785, U+2F8E1->U+6852, U+2F8E2->U+6885, \ - U+2F8E3->U+2346D, U+2F8E4->U+688E, U+2F8E5->U+681F, U+2F8E6->U+6914, U+2F8E7->U+3B9D, U+2F8E8->U+6942, U+2F8E9->U+69A3, U+2F8EA->U+69EA, U+2F8EB->U+6AA8, U+2F8EC->U+236A3, U+2F8ED->U+6ADB, U+2F8EE->U+3C18, U+2F8EF->U+6B21, U+2F8F0->U+238A7, U+2F8F1->U+6B54, \ - U+2F8F2->U+3C4E, U+2F8F3->U+6B72, U+2F8F4->U+6B9F, U+2F8F5->U+6BBA, U+2F8F6->U+6BBB, U+2F8F7->U+23A8D, U+2F8F8->U+21D0B, U+2F8F9->U+23AFA, U+2F8FA->U+6C4E, U+2F8FB->U+23CBC, U+2F8FC->U+6CBF, U+2F8FD->U+6CCD, U+2F8FE->U+6C67, U+2F8FF->U+6D16, U+2F900->U+6D3E, \ - U+2F901->U+6D77, U+2F902->U+6D41, U+2F903->U+6D69, U+2F904->U+6D78, U+2F905->U+6D85, U+2F906->U+23D1E, U+2F907->U+6D34, U+2F908->U+6E2F, U+2F909->U+6E6E, U+2F90A->U+3D33, U+2F90B->U+6ECB, U+2F90C->U+6EC7, U+2F90D->U+23ED1, U+2F90E->U+6DF9, U+2F90F->U+6F6E, \ - U+2F910->U+23F5E, U+2F911->U+23F8E, U+2F912->U+6FC6, U+2F913->U+7039, U+2F914->U+701E, U+2F915->U+701B, U+2F916->U+3D96, U+2F917->U+704A, U+2F918->U+707D, U+2F919->U+7077, U+2F91A->U+70AD, U+2F91B->U+20525, U+2F91C->U+7145, U+2F91D->U+24263, U+2F91E->U+719C, \ - U+2F91F->U+243AB, U+2F920->U+7228, U+2F921->U+7235, U+2F922->U+7250, U+2F923->U+24608, U+2F924->U+7280, U+2F925->U+7295, U+2F926->U+24735, U+2F927->U+24814, U+2F928->U+737A, U+2F929->U+738B, U+2F92A->U+3EAC, U+2F92B->U+73A5, U+2F92C->U+3EB8, U+2F92D->U+3EB8, \ - U+2F92E->U+7447, U+2F92F->U+745C, U+2F930->U+7471, U+2F931->U+7485, U+2F932->U+74CA, U+2F933->U+3F1B, U+2F934->U+7524, U+2F935->U+24C36, U+2F936->U+753E, U+2F937->U+24C92, U+2F938->U+7570, U+2F939->U+2219F, U+2F93A->U+7610, U+2F93B->U+24FA1, U+2F93C->U+24FB8, \ - U+2F93D->U+25044, U+2F93E->U+3FFC, U+2F93F->U+4008, U+2F940->U+76F4, U+2F941->U+250F3, U+2F942->U+250F2, U+2F943->U+25119, U+2F944->U+25133, U+2F945->U+771E, U+2F946->U+771F, U+2F947->U+771F, U+2F948->U+774A, U+2F949->U+4039, U+2F94A->U+778B, U+2F94B->U+4046, \ - U+2F94C->U+4096, U+2F94D->U+2541D, U+2F94E->U+784E, U+2F94F->U+788C, U+2F950->U+78CC, U+2F951->U+40E3, U+2F952->U+25626, U+2F953->U+7956, U+2F954->U+2569A, U+2F955->U+256C5, U+2F956->U+798F, U+2F957->U+79EB, U+2F958->U+412F, U+2F959->U+7A40, U+2F95A->U+7A4A, \ - U+2F95B->U+7A4F, U+2F95C->U+2597C, U+2F95D->U+25AA7, U+2F95E->U+25AA7, U+2F95F->U+7AEE, U+2F960->U+4202, U+2F961->U+25BAB, U+2F962->U+7BC6, U+2F963->U+7BC9, U+2F964->U+4227, U+2F965->U+25C80, U+2F966->U+7CD2, U+2F967->U+42A0, U+2F968->U+7CE8, U+2F969->U+7CE3, \ - U+2F96A->U+7D00, U+2F96B->U+25F86, U+2F96C->U+7D63, U+2F96D->U+4301, U+2F96E->U+7DC7, U+2F96F->U+7E02, U+2F970->U+7E45, U+2F971->U+4334, U+2F972->U+26228, U+2F973->U+26247, U+2F974->U+4359, U+2F975->U+262D9, U+2F976->U+7F7A, U+2F977->U+2633E, U+2F978->U+7F95, \ - U+2F979->U+7FFA, U+2F97A->U+8005, U+2F97B->U+264DA, U+2F97C->U+26523, U+2F97D->U+8060, U+2F97E->U+265A8, U+2F97F->U+8070, U+2F980->U+2335F, U+2F981->U+43D5, U+2F982->U+80B2, U+2F983->U+8103, U+2F984->U+440B, U+2F985->U+813E, U+2F986->U+5AB5, U+2F987->U+267A7, \ - U+2F988->U+267B5, U+2F989->U+23393, U+2F98A->U+2339C, U+2F98B->U+8201, U+2F98C->U+8204, U+2F98D->U+8F9E, U+2F98E->U+446B, U+2F98F->U+8291, U+2F990->U+828B, U+2F991->U+829D, U+2F992->U+52B3, U+2F993->U+82B1, U+2F994->U+82B3, U+2F995->U+82BD, U+2F996->U+82E6, \ - U+2F997->U+26B3C, U+2F998->U+82E5, U+2F999->U+831D, U+2F99A->U+8363, U+2F99B->U+83AD, U+2F99C->U+8323, U+2F99D->U+83BD, U+2F99E->U+83E7, U+2F99F->U+8457, U+2F9A0->U+8353, U+2F9A1->U+83CA, U+2F9A2->U+83CC, U+2F9A3->U+83DC, U+2F9A4->U+26C36, U+2F9A5->U+26D6B, \ - U+2F9A6->U+26CD5, U+2F9A7->U+452B, U+2F9A8->U+84F1, U+2F9A9->U+84F3, U+2F9AA->U+8516, U+2F9AB->U+273CA, U+2F9AC->U+8564, U+2F9AD->U+26F2C, U+2F9AE->U+455D, U+2F9AF->U+4561, U+2F9B0->U+26FB1, U+2F9B1->U+270D2, U+2F9B2->U+456B, U+2F9B3->U+8650, U+2F9B4->U+865C, \ - U+2F9B5->U+8667, U+2F9B6->U+8669, U+2F9B7->U+86A9, U+2F9B8->U+8688, U+2F9B9->U+870E, U+2F9BA->U+86E2, U+2F9BB->U+8779, U+2F9BC->U+8728, U+2F9BD->U+876B, U+2F9BE->U+8786, U+2F9BF->U+45D7, U+2F9C0->U+87E1, U+2F9C1->U+8801, U+2F9C2->U+45F9, U+2F9C3->U+8860, \ - U+2F9C4->U+8863, U+2F9C5->U+27667, U+2F9C6->U+88D7, U+2F9C7->U+88DE, U+2F9C8->U+4635, U+2F9C9->U+88FA, U+2F9CA->U+34BB, U+2F9CB->U+278AE, U+2F9CC->U+27966, U+2F9CD->U+46BE, U+2F9CE->U+46C7, U+2F9CF->U+8AA0, U+2F9D0->U+8AED, U+2F9D1->U+8B8A, U+2F9D2->U+8C55, \ - U+2F9D3->U+27CA8, U+2F9D4->U+8CAB, U+2F9D5->U+8CC1, U+2F9D6->U+8D1B, U+2F9D7->U+8D77, U+2F9D8->U+27F2F, U+2F9D9->U+20804, U+2F9DA->U+8DCB, U+2F9DB->U+8DBC, U+2F9DC->U+8DF0, U+2F9DD->U+208DE, U+2F9DE->U+8ED4, U+2F9DF->U+8F38, U+2F9E0->U+285D2, U+2F9E1->U+285ED, \ - U+2F9E2->U+9094, U+2F9E3->U+90F1, U+2F9E4->U+9111, U+2F9E5->U+2872E, U+2F9E6->U+911B, U+2F9E7->U+9238, U+2F9E8->U+92D7, U+2F9E9->U+92D8, U+2F9EA->U+927C, U+2F9EB->U+93F9, U+2F9EC->U+9415, U+2F9ED->U+28BFA, U+2F9EE->U+958B, U+2F9EF->U+4995, U+2F9F0->U+95B7, \ - U+2F9F1->U+28D77, U+2F9F2->U+49E6, U+2F9F3->U+96C3, U+2F9F4->U+5DB2, U+2F9F5->U+9723, U+2F9F6->U+29145, U+2F9F7->U+2921A, U+2F9F8->U+4A6E, U+2F9F9->U+4A76, U+2F9FA->U+97E0, U+2F9FB->U+2940A, U+2F9FC->U+4AB2, U+2F9FD->U+29496, U+2F9FE->U+980B, U+2F9FF->U+980B, \ - U+2FA00->U+9829, U+2FA01->U+295B6, U+2FA02->U+98E2, U+2FA03->U+4B33, U+2FA04->U+9929, U+2FA05->U+99A7, U+2FA06->U+99C2, U+2FA07->U+99FE, U+2FA08->U+4BCE, U+2FA09->U+29B30, U+2FA0A->U+9B12, U+2FA0B->U+9C40, U+2FA0C->U+9CFD, U+2FA0D->U+4CCE, U+2FA0E->U+4CED, \ - U+2FA0F->U+9D67, U+2FA10->U+2A0CE, U+2FA11->U+4CF8, U+2FA12->U+2A105, U+2FA13->U+2A20E, U+2FA14->U+2A291, U+2FA15->U+9EBB, U+2FA16->U+4D56, U+2FA17->U+9EF9, U+2FA18->U+9EFE, U+2FA19->U+9F05, U+2FA1A->U+9F0F, U+2FA1B->U+9F16, U+2FA1C->U+9F3B, U+2FA1D->U+2A600, \ - U+2F00->U+4E00, U+2F01->U+4E28, U+2F02->U+4E36, U+2F03->U+4E3F, U+2F04->U+4E59, U+2F05->U+4E85, U+2F06->U+4E8C, U+2F07->U+4EA0, U+2F08->U+4EBA, U+2F09->U+513F, U+2F0A->U+5165, U+2F0B->U+516B, U+2F0C->U+5182, U+2F0D->U+5196, U+2F0E->U+51AB, U+2F0F->U+51E0, \ - U+2F10->U+51F5, U+2F11->U+5200, U+2F12->U+529B, U+2F13->U+52F9, U+2F14->U+5315, U+2F15->U+531A, U+2F16->U+5338, U+2F17->U+5341, U+2F18->U+535C, U+2F19->U+5369, U+2F1A->U+5382, U+2F1B->U+53B6, U+2F1C->U+53C8, U+2F1D->U+53E3, U+2F1E->U+56D7, U+2F1F->U+571F, \ - U+2F20->U+58EB, U+2F21->U+5902, U+2F22->U+590A, U+2F23->U+5915, U+2F24->U+5927, U+2F25->U+5973, U+2F26->U+5B50, U+2F27->U+5B80, U+2F28->U+5BF8, U+2F29->U+5C0F, U+2F2A->U+5C22, U+2F2B->U+5C38, U+2F2C->U+5C6E, U+2F2D->U+5C71, U+2F2E->U+5DDB, U+2F2F->U+5DE5, \ - U+2F30->U+5DF1, U+2F31->U+5DFE, U+2F32->U+5E72, U+2F33->U+5E7A, U+2F34->U+5E7F, U+2F35->U+5EF4, U+2F36->U+5EFE, U+2F37->U+5F0B, U+2F38->U+5F13, U+2F39->U+5F50, U+2F3A->U+5F61, U+2F3B->U+5F73, U+2F3C->U+5FC3, U+2F3D->U+6208, U+2F3E->U+6236, U+2F3F->U+624B, \ - U+2F40->U+652F, U+2F41->U+6534, U+2F42->U+6587, U+2F43->U+6597, U+2F44->U+65A4, U+2F45->U+65B9, U+2F46->U+65E0, U+2F47->U+65E5, U+2F48->U+66F0, U+2F49->U+6708, U+2F4A->U+6728, U+2F4B->U+6B20, U+2F4C->U+6B62, U+2F4D->U+6B79, U+2F4E->U+6BB3, U+2F4F->U+6BCB, \ - U+2F50->U+6BD4, U+2F51->U+6BDB, U+2F52->U+6C0F, U+2F53->U+6C14, U+2F54->U+6C34, U+2F55->U+706B, U+2F56->U+722A, U+2F57->U+7236, U+2F58->U+723B, U+2F59->U+723F, U+2F5A->U+7247, U+2F5B->U+7259, U+2F5C->U+725B, U+2F5D->U+72AC, U+2F5E->U+7384, U+2F5F->U+7389, \ - U+2F60->U+74DC, U+2F61->U+74E6, U+2F62->U+7518, U+2F63->U+751F, U+2F64->U+7528, U+2F65->U+7530, U+2F66->U+758B, U+2F67->U+7592, U+2F68->U+7676, U+2F69->U+767D, U+2F6A->U+76AE, U+2F6B->U+76BF, U+2F6C->U+76EE, U+2F6D->U+77DB, U+2F6E->U+77E2, U+2F6F->U+77F3, \ - U+2F70->U+793A, U+2F71->U+79B8, U+2F72->U+79BE, U+2F73->U+7A74, U+2F74->U+7ACB, U+2F75->U+7AF9, U+2F76->U+7C73, U+2F77->U+7CF8, U+2F78->U+7F36, U+2F79->U+7F51, U+2F7A->U+7F8A, U+2F7B->U+7FBD, U+2F7C->U+8001, U+2F7D->U+800C, U+2F7E->U+8012, U+2F7F->U+8033, \ - U+2F80->U+807F, U+2F81->U+8089, U+2F82->U+81E3, U+2F83->U+81EA, U+2F84->U+81F3, U+2F85->U+81FC, U+2F86->U+820C, U+2F87->U+821B, U+2F88->U+821F, U+2F89->U+826E, U+2F8A->U+8272, U+2F8B->U+8278, U+2F8C->U+864D, U+2F8D->U+866B, U+2F8E->U+8840, U+2F8F->U+884C, \ - U+2F90->U+8863, U+2F91->U+897E, U+2F92->U+898B, U+2F93->U+89D2, U+2F94->U+8A00, U+2F95->U+8C37, U+2F96->U+8C46, U+2F97->U+8C55, U+2F98->U+8C78, U+2F99->U+8C9D, U+2F9A->U+8D64, U+2F9B->U+8D70, U+2F9C->U+8DB3, U+2F9D->U+8EAB, U+2F9E->U+8ECA, U+2F9F->U+8F9B, \ - U+2FA0->U+8FB0, U+2FA1->U+8FB5, U+2FA2->U+9091, U+2FA3->U+9149, U+2FA4->U+91C6, U+2FA5->U+91CC, U+2FA6->U+91D1, U+2FA7->U+9577, U+2FA8->U+9580, U+2FA9->U+961C, U+2FAA->U+96B6, U+2FAB->U+96B9, U+2FAC->U+96E8, U+2FAD->U+9751, U+2FAE->U+975E, U+2FAF->U+9762, \ - U+2FB0->U+9769, U+2FB1->U+97CB, U+2FB2->U+97ED, U+2FB3->U+97F3, U+2FB4->U+9801, U+2FB5->U+98A8, U+2FB6->U+98DB, U+2FB7->U+98DF, U+2FB8->U+9996, U+2FB9->U+9999, U+2FBA->U+99AC, U+2FBB->U+9AA8, U+2FBC->U+9AD8, U+2FBD->U+9ADF, U+2FBE->U+9B25, U+2FBF->U+9B2F, \ - U+2FC0->U+9B32, U+2FC1->U+9B3C, U+2FC2->U+9B5A, U+2FC3->U+9CE5, U+2FC4->U+9E75, U+2FC5->U+9E7F, U+2FC6->U+9EA5, U+2FC7->U+9EBB, U+2FC8->U+9EC3, U+2FC9->U+9ECD, U+2FCA->U+9ED1, U+2FCB->U+9EF9, U+2FCC->U+9EFD, U+2FCD->U+9F0E, U+2FCE->U+9F13, U+2FCF->U+9F20, \ - U+2FD0->U+9F3B, U+2FD1->U+9F4A, U+2FD2->U+9F52, U+2FD3->U+9F8D, U+2FD4->U+9F9C, U+2FD5->U+9FA0, U+3042->U+3041, U+3044->U+3043, U+3046->U+3045, U+3048->U+3047, U+304A->U+3049, U+304C->U+304B, U+304E->U+304D, U+3050->U+304F, U+3052->U+3051, U+3054->U+3053, \ - U+3056->U+3055, U+3058->U+3057, U+305A->U+3059, U+305C->U+305B, U+305E->U+305D, U+3060->U+305F, U+3062->U+3061, U+3064->U+3063, U+3065->U+3063, U+3067->U+3066, U+3069->U+3068, U+3070->U+306F, U+3071->U+306F, U+3073->U+3072, U+3074->U+3072, U+3076->U+3075, \ - U+3077->U+3075, U+3079->U+3078, U+307A->U+3078, U+307C->U+307B, U+307D->U+307B, U+3084->U+3083, U+3086->U+3085, U+3088->U+3087, U+308F->U+308E, U+3094->U+3046, U+3095->U+304B, U+3096->U+3051, U+30A2->U+30A1, U+30A4->U+30A3, U+30A6->U+30A5, U+30A8->U+30A7, \ - U+30AA->U+30A9, U+30AC->U+30AB, U+30AE->U+30AD, U+30B0->U+30AF, U+30B2->U+30B1, U+30B4->U+30B3, U+30B6->U+30B5, U+30B8->U+30B7, U+30BA->U+30B9, U+30BC->U+30BB, U+30BE->U+30BD, U+30C0->U+30BF, U+30C2->U+30C1, U+30C5->U+30C4, U+30C7->U+30C6, U+30C9->U+30C8, \ - U+30D0->U+30CF, U+30D1->U+30CF, U+30D3->U+30D2, U+30D4->U+30D2, U+30D6->U+30D5, U+30D7->U+30D5, U+30D9->U+30D8, U+30DA->U+30D8, U+30DC->U+30DB, U+30DD->U+30DB, U+30E4->U+30E3, U+30E6->U+30E5, U+30E8->U+30E7, U+30EF->U+30EE, U+30F4->U+30A6, U+30AB->U+30F5, \ - U+30B1->U+30F6, U+30F7->U+30EF, U+30F8->U+30F0, U+30F9->U+30F1, U+30FA->U+30F2, U+30AF->U+31F0, U+30B7->U+31F1, U+30B9->U+31F2, U+30C8->U+31F3, U+30CC->U+31F4, U+30CF->U+31F5, U+30D2->U+31F6, U+30D5->U+31F7, U+30D8->U+31F8, U+30DB->U+31F9, U+30E0->U+31FA, \ - U+30E9->U+31FB, U+30EA->U+31FC, U+30EB->U+31FD, U+30EC->U+31FE, U+30ED->U+31FF, U+FF66->U+30F2, U+FF67->U+30A1, U+FF68->U+30A3, U+FF69->U+30A5, U+FF6A->U+30A7, U+FF6B->U+30A9, U+FF6C->U+30E3, U+FF6D->U+30E5, U+FF6E->U+30E7, U+FF6F->U+30C3, U+FF71->U+30A1, \ - U+FF72->U+30A3, U+FF73->U+30A5, U+FF74->U+30A7, U+FF75->U+30A9, U+FF76->U+30AB, U+FF77->U+30AD, U+FF78->U+30AF, U+FF79->U+30B1, U+FF7A->U+30B3, U+FF7B->U+30B5, U+FF7C->U+30B7, U+FF7D->U+30B9, U+FF7E->U+30BB, U+FF7F->U+30BD, U+FF80->U+30BF, U+FF81->U+30C1, \ - U+FF82->U+30C3, U+FF83->U+30C6, U+FF84->U+30C8, U+FF85->U+30CA, U+FF86->U+30CB, U+FF87->U+30CC, U+FF88->U+30CD, U+FF89->U+30CE, U+FF8A->U+30CF, U+FF8B->U+30D2, U+FF8C->U+30D5, U+FF8D->U+30D8, U+FF8E->U+30DB, U+FF8F->U+30DE, U+FF90->U+30DF, U+FF91->U+30E0, \ - U+FF92->U+30E1, U+FF93->U+30E2, U+FF94->U+30E3, U+FF95->U+30E5, U+FF96->U+30E7, U+FF97->U+30E9, U+FF98->U+30EA, U+FF99->U+30EB, U+FF9A->U+30EC, U+FF9B->U+30ED, U+FF9C->U+30EF, U+FF9D->U+30F3, U+FFA0->U+3164, U+FFA1->U+3131, U+FFA2->U+3132, U+FFA3->U+3133, \ - U+FFA4->U+3134, U+FFA5->U+3135, U+FFA6->U+3136, U+FFA7->U+3137, U+FFA8->U+3138, U+FFA9->U+3139, U+FFAA->U+313A, U+FFAB->U+313B, U+FFAC->U+313C, U+FFAD->U+313D, U+FFAE->U+313E, U+FFAF->U+313F, U+FFB0->U+3140, U+FFB1->U+3141, U+FFB2->U+3142, U+FFB3->U+3143, \ - U+FFB4->U+3144, U+FFB5->U+3145, U+FFB6->U+3146, U+FFB7->U+3147, U+FFB8->U+3148, U+FFB9->U+3149, U+FFBA->U+314A, U+FFBB->U+314B, U+FFBC->U+314C, U+FFBD->U+314D, U+FFBE->U+314E, U+FFC2->U+314F, U+FFC3->U+3150, U+FFC4->U+3151, U+FFC5->U+3152, U+FFC6->U+3153, \ - U+FFC7->U+3154, U+FFCA->U+3155, U+FFCB->U+3156, U+FFCC->U+3157, U+FFCD->U+3158, U+FFCE->U+3159, U+FFCF->U+315A, U+FFD2->U+315B, U+FFD3->U+315C, U+FFD4->U+315D, U+FFD5->U+315E, U+FFD6->U+315F, U+FFD7->U+3160, U+FFDA->U+3161, U+FFDB->U+3162, U+FFDC->U+3163, \ - U+3131->U+1100, U+3132->U+1101, U+3133->U+11AA, U+3134->U+1102, U+3135->U+11AC, U+3136->U+11AD, U+3137->U+1103, U+3138->U+1104, U+3139->U+1105, U+313A->U+11B0, U+313B->U+11B1, U+313C->U+11B2, U+313D->U+11B3, U+313E->U+11B4, U+313F->U+11B5, U+3140->U+111A, \ - U+3141->U+1106, U+3142->U+1107, U+3143->U+1108, U+3144->U+1121, U+3145->U+1109, U+3146->U+110A, U+3147->U+110B, U+3148->U+110C, U+3149->U+110D, U+314A->U+110E, U+314B->U+110F, U+314C->U+1110, U+314D->U+1111, U+314E->U+1112, U+314F->U+1161, U+3150->U+1162, \ - U+3151->U+1163, U+3152->U+1164, U+3153->U+1165, U+3154->U+1166, U+3155->U+1167, U+3156->U+1168, U+3157->U+1169, U+3158->U+116A, U+3159->U+116B, U+315A->U+116C, U+315B->U+116D, U+315C->U+116E, U+315D->U+116F, U+315E->U+1170, U+315F->U+1171, U+3160->U+1172, \ - U+3161->U+1173, U+3162->U+1174, U+3163->U+1175, U+3165->U+1114, U+3166->U+1115, U+3167->U+11C7, U+3168->U+11C8, U+3169->U+11CC, U+316A->U+11CE, U+316B->U+11D3, U+316C->U+11D7, U+316D->U+11D9, U+316E->U+111C, U+316F->U+11DD, U+3170->U+11DF, U+3171->U+111D, \ - U+3172->U+111E, U+3173->U+1120, U+3174->U+1122, U+3175->U+1123, U+3176->U+1127, U+3177->U+1129, U+3178->U+112B, U+3179->U+112C, U+317A->U+112D, U+317B->U+112E, U+317C->U+112F, U+317D->U+1132, U+317E->U+1136, U+317F->U+1140, U+3180->U+1147, U+3181->U+114C, \ - U+3182->U+11F1, U+3183->U+11F2, U+3184->U+1157, U+3185->U+1158, U+3186->U+1159, U+3187->U+1184, U+3188->U+1185, U+3189->U+1188, U+318A->U+1191, U+318B->U+1192, U+318C->U+1194, U+318D->U+119E, U+318E->U+11A1, U+A490->U+A408, U+A491->U+A1B9, U+4E00..U+9FBB, \ - U+3400..U+4DB5, U+20000..U+2A6D6, U+FA0E, U+FA0F, U+FA11, U+FA13, U+FA14, U+FA1F, U+FA21, U+FA23, U+FA24, U+FA27, U+FA28, U+FA29, U+3105..U+312C, U+31A0..U+31B7, U+3041, U+3043, U+3045, U+3047, U+3049, U+304B, U+304D, U+304F, U+3051, U+3053, U+3055, U+3057, \ - U+3059, U+305B, U+305D, U+305F, U+3061, U+3063, U+3066, U+3068, U+306A..U+306F, U+3072, U+3075, U+3078, U+307B, U+307E..U+3083, U+3085, U+3087, U+3089..U+308E, U+3090..U+3093, U+30A1, U+30A3, U+30A5, U+30A7, U+30A9, U+30AD, U+30AF, U+30B3, U+30B5, U+30BB, \ - U+30BD, U+30BF, U+30C1, U+30C3, U+30C4, U+30C6, U+30CA, U+30CB, U+30CD, U+30CE, U+30DE, U+30DF, U+30E1, U+30E2, U+30E3, U+30E5, U+30E7, U+30EE, U+30F0..U+30F3, U+30F5, U+30F6, U+31F0, U+31F1, U+31F2, U+31F3, U+31F4, U+31F5, U+31F6, U+31F7, U+31F8, U+31F9, \ - U+31FA, U+31FB, U+31FC, U+31FD, U+31FE, U+31FF, U+AC00..U+D7A3, U+1100..U+1159, U+1161..U+11A2, U+11A8..U+11F9, U+A000..U+A48C, U+A492..U+A4C6, U+2C80->U+2C81, U+2C81, U+2C82->U+2C83, U+2C83, U+2C84->U+2C85, U+2C85, U+2C86->U+2C87, U+2C87, U+2C88->U+2C89, \ - U+2C89, U+2C8A->U+2C8B, U+2C8B, U+2C8C->U+2C8D, U+2C8D, U+2C8E->U+2C8F, U+2C8F, U+2C90->U+2C91, U+2C91, U+2C92->U+2C93, U+2C93, U+2C94->U+2C95, U+2C95, U+2C96->U+2C97, U+2C97, U+2C98->U+2C99, U+2C99, U+2C9A->U+2C9B, U+2C9B, U+2C9C->U+2C9D, U+2C9D, U+2C9E->U+2C9F, \ - U+2C9F, U+2CA0->U+2CA1, U+2CA1, U+2CA2->U+2CA3, U+2CA3, U+2CA4->U+2CA5, U+2CA5, U+2CA6->U+2CA7, U+2CA7, U+2CA8->U+2CA9, U+2CA9, U+2CAA->U+2CAB, U+2CAB, U+2CAC->U+2CAD, U+2CAD, U+2CAE->U+2CAF, U+2CAF, U+2CB0->U+2CB1, U+2CB1, U+2CB2->U+2CB3, U+2CB3, U+2CB4->U+2CB5, \ - U+2CB5, U+2CB6->U+2CB7, U+2CB7, U+2CB8->U+2CB9, U+2CB9, U+2CBA->U+2CBB, U+2CBB, U+2CBC->U+2CBD, U+2CBD, U+2CBE->U+2CBF, U+2CBF, U+2CC0->U+2CC1, U+2CC1, U+2CC2->U+2CC3, U+2CC3, U+2CC4->U+2CC5, U+2CC5, U+2CC6->U+2CC7, U+2CC7, U+2CC8->U+2CC9, U+2CC9, U+2CCA->U+2CCB, \ - U+2CCB, U+2CCC->U+2CCD, U+2CCD, U+2CCE->U+2CCF, U+2CCF, U+2CD0->U+2CD1, U+2CD1, U+2CD2->U+2CD3, U+2CD3, U+2CD4->U+2CD5, U+2CD5, U+2CD6->U+2CD7, U+2CD7, U+2CD8->U+2CD9, U+2CD9, U+2CDA->U+2CDB, U+2CDB, U+2CDC->U+2CDD, U+2CDD, U+2CDE->U+2CDF, U+2CDF, U+2CE0->U+2CE1, \ - U+2CE1, U+2CE2->U+2CE3, U+2CE3, U+0400->U+0435, U+0401->U+0435, U+0402->U+0452, U+0452, U+0403->U+0433, U+0404->U+0454, U+0454, U+0405->U+0455, U+0455, U+0406->U+0456, U+0407->U+0456, U+0457->U+0456, U+0456, U+0408..U+040B->U+0458..U+045B, U+0458..U+045B, \ - U+040C->U+043A, U+040D->U+0438, U+040E->U+0443, U+040F->U+045F, U+045F, U+0450->U+0435, U+0451->U+0435, U+0453->U+0433, U+045C->U+043A, U+045D->U+0438, U+045E->U+0443, U+0460->U+0461, U+0461, U+0462->U+0463, U+0463, U+0464->U+0465, U+0465, U+0466->U+0467, \ - U+0467, U+0468->U+0469, U+0469, U+046A->U+046B, U+046B, U+046C->U+046D, U+046D, U+046E->U+046F, U+046F, U+0470->U+0471, U+0471, U+0472->U+0473, U+0473, U+0474->U+0475, U+0476->U+0475, U+0477->U+0475, U+0475, U+0478->U+0479, U+0479, U+047A->U+047B, U+047B, \ - U+047C->U+047D, U+047D, U+047E->U+047F, U+047F, U+0480->U+0481, U+0481, U+048A->U+0438, U+048B->U+0438, U+048C->U+044C, U+048D->U+044C, U+048E->U+0440, U+048F->U+0440, U+0490->U+0433, U+0491->U+0433, U+0490->U+0433, U+0491->U+0433, U+0492->U+0433, U+0493->U+0433, \ - U+0494->U+0433, U+0495->U+0433, U+0496->U+0436, U+0497->U+0436, U+0498->U+0437, U+0499->U+0437, U+049A->U+043A, U+049B->U+043A, U+049C->U+043A, U+049D->U+043A, U+049E->U+043A, U+049F->U+043A, U+04A0->U+043A, U+04A1->U+043A, U+04A2->U+043D, U+04A3->U+043D, \ - U+04A4->U+043D, U+04A5->U+043D, U+04A6->U+043F, U+04A7->U+043F, U+04A8->U+04A9, U+04A9, U+04AA->U+0441, U+04AB->U+0441, U+04AC->U+0442, U+04AD->U+0442, U+04AE->U+0443, U+04AF->U+0443, U+04B0->U+0443, U+04B1->U+0443, U+04B2->U+0445, U+04B3->U+0445, U+04B4->U+04B5, \ - U+04B5, U+04B6->U+0447, U+04B7->U+0447, U+04B8->U+0447, U+04B9->U+0447, U+04BA->U+04BB, U+04BB, U+04BC->U+04BD, U+04BE->U+04BD, U+04BF->U+04BD, U+04BD, U+04C0->U+04CF, U+04CF, U+04C1->U+0436, U+04C2->U+0436, U+04C3->U+043A, U+04C4->U+043A, U+04C5->U+043B, \ - U+04C6->U+043B, U+04C7->U+043D, U+04C8->U+043D, U+04C9->U+043D, U+04CA->U+043D, U+04CB->U+0447, U+04CC->U+0447, U+04CD->U+043C, U+04CE->U+043C, U+04D0->U+0430, U+04D1->U+0430, U+04D2->U+0430, U+04D3->U+0430, U+04D4->U+00E6, U+04D5->U+00E6, U+04D6->U+0435, \ - U+04D7->U+0435, U+04D8->U+04D9, U+04DA->U+04D9, U+04DB->U+04D9, U+04D9, U+04DC->U+0436, U+04DD->U+0436, U+04DE->U+0437, U+04DF->U+0437, U+04E0->U+04E1, U+04E1, U+04E2->U+0438, U+04E3->U+0438, U+04E4->U+0438, U+04E5->U+0438, U+04E6->U+043E, U+04E7->U+043E, \ - U+04E8->U+043E, U+04E9->U+043E, U+04EA->U+043E, U+04EB->U+043E, U+04EC->U+044D, U+04ED->U+044D, U+04EE->U+0443, U+04EF->U+0443, U+04F0->U+0443, U+04F1->U+0443, U+04F2->U+0443, U+04F3->U+0443, U+04F4->U+0447, U+04F5->U+0447, U+04F6->U+0433, U+04F7->U+0433, \ - U+04F8->U+044B, U+04F9->U+044B, U+04FA->U+0433, U+04FB->U+0433, U+04FC->U+0445, U+04FD->U+0445, U+04FE->U+0445, U+04FF->U+0445, U+0410..U+0418->U+0430..U+0438, U+0419->U+0438, U+0430..U+0438, U+041A..U+042F->U+043A..U+044F, U+043A..U+044F, U+0929->U+0928, \ - U+0931->U+0930, U+0934->U+0933, U+0958->U+0915, U+0959->U+0916, U+095A->U+0917, U+095B->U+091C, U+095C->U+0921, U+095D->U+0922, U+095E->U+092B, U+095F->U+092F, U+0904..U+0928, U+092A..U+0930, U+0932, U+0933, U+0935..U+0939, U+0960, U+0961, U+0966..U+096F, \ - U+097B..U+097F, U+10FC->U+10DC, U+10D0..U+10FA, U+10A0..U+10C5->U+2D00..U+2D25, U+2D00..U+2D25, U+0386->U+03B1, U+0388->U+03B5, U+0389->U+03B7, U+038A->U+03B9, U+038C->U+03BF, U+038E->U+03C5, U+038F->U+03C9, U+0390->U+03B9, U+03AA->U+03B9, U+03AB->U+03C5, \ - U+03AC->U+03B1, U+03AD->U+03B5, U+03AE->U+03B7, U+03AF->U+03B9, U+03B0->U+03C5, U+03CA->U+03B9, U+03CB->U+03C5, U+03CC->U+03BF, U+03CD->U+03C5, U+03CE->U+03C9, U+03D0->U+03B2, U+03D1->U+03B8, U+03D2->U+03C5, U+03D3->U+03C5, U+03D4->U+03C5, U+03D5->U+03C6, \ - U+03D6->U+03C0, U+03D8->U+03D9, U+03DA->U+03DB, U+03DC->U+03DD, U+03DE->U+03DF, U+03E0->U+03E1, U+03E2->U+03E3, U+03E4->U+03E5, U+03E6->U+03E7, U+03E8->U+03E9, U+03EA->U+03EB, U+03EC->U+03ED, U+03EE->U+03EF, U+03F0->U+03BA, U+03F1->U+03C1, U+03F2->U+03C3, \ - U+03F4->U+03B8, U+03F5->U+03B5, U+03F6->U+03B5, U+03F7->U+03F8, U+03F9->U+03C3, U+03FA->U+03FB, U+1F00->U+03B1, U+1F01->U+03B1, U+1F02->U+03B1, U+1F03->U+03B1, U+1F04->U+03B1, U+1F05->U+03B1, U+1F06->U+03B1, U+1F07->U+03B1, U+1F08->U+03B1, U+1F09->U+03B1, \ - U+1F0A->U+03B1, U+1F0B->U+03B1, U+1F0C->U+03B1, U+1F0D->U+03B1, U+1F0E->U+03B1, U+1F0F->U+03B1, U+1F10->U+03B5, U+1F11->U+03B5, U+1F12->U+03B5, U+1F13->U+03B5, U+1F14->U+03B5, U+1F15->U+03B5, U+1F18->U+03B5, U+1F19->U+03B5, U+1F1A->U+03B5, U+1F1B->U+03B5, \ - U+1F1C->U+03B5, U+1F1D->U+03B5, U+1F20->U+03B7, U+1F21->U+03B7, U+1F22->U+03B7, U+1F23->U+03B7, U+1F24->U+03B7, U+1F25->U+03B7, U+1F26->U+03B7, U+1F27->U+03B7, U+1F28->U+03B7, U+1F29->U+03B7, U+1F2A->U+03B7, U+1F2B->U+03B7, U+1F2C->U+03B7, U+1F2D->U+03B7, \ - U+1F2E->U+03B7, U+1F2F->U+03B7, U+1F30->U+03B9, U+1F31->U+03B9, U+1F32->U+03B9, U+1F33->U+03B9, U+1F34->U+03B9, U+1F35->U+03B9, U+1F36->U+03B9, U+1F37->U+03B9, U+1F38->U+03B9, U+1F39->U+03B9, U+1F3A->U+03B9, U+1F3B->U+03B9, U+1F3C->U+03B9, U+1F3D->U+03B9, \ - U+1F3E->U+03B9, U+1F3F->U+03B9, U+1F40->U+03BF, U+1F41->U+03BF, U+1F42->U+03BF, U+1F43->U+03BF, U+1F44->U+03BF, U+1F45->U+03BF, U+1F48->U+03BF, U+1F49->U+03BF, U+1F4A->U+03BF, U+1F4B->U+03BF, U+1F4C->U+03BF, U+1F4D->U+03BF, U+1F50->U+03C5, U+1F51->U+03C5, \ - U+1F52->U+03C5, U+1F53->U+03C5, U+1F54->U+03C5, U+1F55->U+03C5, U+1F56->U+03C5, U+1F57->U+03C5, U+1F59->U+03C5, U+1F5B->U+03C5, U+1F5D->U+03C5, U+1F5F->U+03C5, U+1F60->U+03C9, U+1F61->U+03C9, U+1F62->U+03C9, U+1F63->U+03C9, U+1F64->U+03C9, U+1F65->U+03C9, \ - U+1F66->U+03C9, U+1F67->U+03C9, U+1F68->U+03C9, U+1F69->U+03C9, U+1F6A->U+03C9, U+1F6B->U+03C9, U+1F6C->U+03C9, U+1F6D->U+03C9, U+1F6E->U+03C9, U+1F6F->U+03C9, U+1F70->U+03B1, U+1F71->U+03B1, U+1F72->U+03B5, U+1F73->U+03B5, U+1F74->U+03B7, U+1F75->U+03B7, \ - U+1F76->U+03B9, U+1F77->U+03B9, U+1F78->U+03BF, U+1F79->U+03BF, U+1F7A->U+03C5, U+1F7B->U+03C5, U+1F7C->U+03C9, U+1F7D->U+03C9, U+1F80->U+03B1, U+1F81->U+03B1, U+1F82->U+03B1, U+1F83->U+03B1, U+1F84->U+03B1, U+1F85->U+03B1, U+1F86->U+03B1, U+1F87->U+03B1, \ - U+1F88->U+03B1, U+1F89->U+03B1, U+1F8A->U+03B1, U+1F8B->U+03B1, U+1F8C->U+03B1, U+1F8D->U+03B1, U+1F8E->U+03B1, U+1F8F->U+03B1, U+1F90->U+03B7, U+1F91->U+03B7, U+1F92->U+03B7, U+1F93->U+03B7, U+1F94->U+03B7, U+1F95->U+03B7, U+1F96->U+03B7, U+1F97->U+03B7, \ - U+1F98->U+03B7, U+1F99->U+03B7, U+1F9A->U+03B7, U+1F9B->U+03B7, U+1F9C->U+03B7, U+1F9D->U+03B7, U+1F9E->U+03B7, U+1F9F->U+03B7, U+1FA0->U+03C9, U+1FA1->U+03C9, U+1FA2->U+03C9, U+1FA3->U+03C9, U+1FA4->U+03C9, U+1FA5->U+03C9, U+1FA6->U+03C9, U+1FA7->U+03C9, \ - U+1FA8->U+03C9, U+1FA9->U+03C9, U+1FAA->U+03C9, U+1FAB->U+03C9, U+1FAC->U+03C9, U+1FAD->U+03C9, U+1FAE->U+03C9, U+1FAF->U+03C9, U+1FB0->U+03B1, U+1FB1->U+03B1, U+1FB2->U+03B1, U+1FB3->U+03B1, U+1FB4->U+03B1, U+1FB6->U+03B1, U+1FB7->U+03B1, U+1FB8->U+03B1, \ - U+1FB9->U+03B1, U+1FBA->U+03B1, U+1FBB->U+03B1, U+1FBC->U+03B1, U+1FC2->U+03B7, U+1FC3->U+03B7, U+1FC4->U+03B7, U+1FC6->U+03B7, U+1FC7->U+03B7, U+1FC8->U+03B5, U+1FC9->U+03B5, U+1FCA->U+03B7, U+1FCB->U+03B7, U+1FCC->U+03B7, U+1FD0->U+03B9, U+1FD1->U+03B9, \ - U+1FD2->U+03B9, U+1FD3->U+03B9, U+1FD6->U+03B9, U+1FD7->U+03B9, U+1FD8->U+03B9, U+1FD9->U+03B9, U+1FDA->U+03B9, U+1FDB->U+03B9, U+1FE0->U+03C5, U+1FE1->U+03C5, U+1FE2->U+03C5, U+1FE3->U+03C5, U+1FE4->U+03C1, U+1FE5->U+03C1, U+1FE6->U+03C5, U+1FE7->U+03C5, \ - U+1FE8->U+03C5, U+1FE9->U+03C5, U+1FEA->U+03C5, U+1FEB->U+03C5, U+1FEC->U+03C1, U+1FF2->U+03C9, U+1FF3->U+03C9, U+1FF4->U+03C9, U+1FF6->U+03C9, U+1FF7->U+03C9, U+1FF8->U+03BF, U+1FF9->U+03BF, U+1FFA->U+03C9, U+1FFB->U+03C9, U+1FFC->U+03C9, U+0391..U+03A1->U+03B1..U+03C1, \ - U+03B1..U+03C1, U+03A3..U+03A9->U+03C3..U+03C9, U+03C3..U+03C9, U+03C2, U+03D9, U+03DB, U+03DD, U+03DF, U+03E1, U+03E3, U+03E5, U+03E7, U+03E9, U+03EB, U+03ED, U+03EF, U+03F3, U+03F8, U+03FB, U+0A85..U+0A8C, U+0A8F, U+0A90, U+0A93..U+0AB0, U+0AB2, U+0AB3, \ - U+0AB5..U+0AB9, U+0AE0, U+0AE1, U+0AE6..U+0AEF, U+0A33->U+0A32, U+0A36->U+0A38, U+0A59->U+0A16, U+0A5A->U+0A17, U+0A5B->U+0A1C, U+0A5E->U+0A2B, U+0A05..U+0A0A, U+0A0F, U+0A10, U+0A13..U+0A28, U+0A2A..U+0A30, U+0A32, U+0A35, U+0A38, U+0A39, U+0A5C, U+0A66..U+0A6F, \ - U+FB1D->U+05D9, U+FB1F->U+05F2, U+FB20->U+05E2, U+FB21->U+05D0, U+FB22->U+05D3, U+FB23->U+05D4, U+FB24->U+05DB, U+FB25->U+05DC, U+FB26->U+05DD, U+FB27->U+05E8, U+FB28->U+05EA, U+FB2A->U+05E9, U+FB2B->U+05E9, U+FB2C->U+05E9, U+FB2D->U+05E9, U+FB2E->U+05D0, \ - U+FB2F->U+05D0, U+FB30->U+05D0, U+FB31->U+05D1, U+FB32->U+05D2, U+FB33->U+05D3, U+FB34->U+05D4, U+FB35->U+05D5, U+FB36->U+05D6, U+FB38->U+05D8, U+FB39->U+05D9, U+FB3A->U+05DA, U+FB3B->U+05DB, U+FB3C->U+05DC, U+FB3E->U+05DE, U+FB40->U+05E0, U+FB41->U+05E1, \ - U+FB43->U+05E3, U+FB44->U+05E4, U+FB46->U+05E6, U+FB47->U+05E7, U+FB48->U+05E8, U+FB49->U+05E9, U+FB4A->U+05EA, U+FB4B->U+05D5, U+FB4C->U+05D1, U+FB4D->U+05DB, U+FB4E->U+05E4, U+FB4F->U+05D0, U+05D0..U+05F2, U+0C85..U+0C8C, U+0C8E..U+0C90, U+0C92..U+0CA8, \ - U+0CAA..U+0CB3, U+0CB5..U+0CB9, U+0CE0, U+0CE1, U+0CE6..U+0CEF, U+1900..U+191C, U+1930..U+1938, U+1946..U+194F, U+0D05..U+0D0C, U+0D0E..U+0D10, U+0D12..U+0D28, U+0D2A..U+0D39, U+0D60, U+0D61, U+0D66..U+0D6F, U+0B94->U+0B92, U+0B85..U+0B8A, U+0B8E..U+0B90, \ - U+0B92, U+0B93, U+0B95, U+0B99, U+0B9A, U+0B9C, U+0B9E, U+0B9F, U+0BA3, U+0BA4, U+0BA8..U+0BAA, U+0BAE..U+0BB9, U+0BE6..U+0BEF, U+0E01..U+0E30, U+0E32, U+0E33, U+0E40..U+0E46, U+0E50..U+0E5B, U+FF10..U+FF19->0..9, U+FF21..U+FF3A->a..z, U+FF41..U+FF5A->a..z, \ - 0..9, A..Z->a..z, a..z - - # ignored characters list - # optional, default value is empty - # - # ignore_chars = U+00AD - - # minimum word prefix length to index - # optional, default is 0 (do not index prefixes) - # - # min_prefix_len = 0 - - # minimum word infix length to index - # optional, default is 0 (do not index infixes) - # - # min_infix_len = 0 - - # list of fields to limit prefix/infix indexing to - # optional, default value is empty (index all fields in prefix/infix mode) - # - # prefix_fields = filename - # infix_fields = url, domain - - # enable star-syntax (wildcards) when searching prefix/infix indexes - # search-time only, does not affect indexing, can be 0 or 1 - # optional, default is 0 (do not use wildcard syntax) - # - # enable_star = 1 - - # expand keywords with exact forms and/or stars when searching fit indexes - # search-time only, does not affect indexing, can be 0 or 1 - # optional, default is 0 (do not expand keywords) - # - # expand_keywords = 1 - - # n-gram length to index, for CJK indexing - # only supports 0 and 1 for now, other lengths to be implemented - # optional, default is 0 (disable n-grams) - # - ngram_len = 1 - - # n-gram characters list, for CJK indexing - # optional, default is empty - # - ngram_chars = U+4E00..U+9FBB, U+3400..U+4DB5, U+20000..U+2A6D6, U+FA0E, U+FA0F, U+FA11, U+FA13, U+FA14, U+FA1F, U+FA21, U+FA23, U+FA24, U+FA27, U+FA28, U+FA29, U+3105..U+312C, U+31A0..U+31B7, U+3041, U+3043, U+3045, U+3047, U+3049, U+304B, U+304D, U+304F, U+3051, U+3053, U+3055, U+3057, U+3059, U+305B, U+305D, U+305F, U+3061, U+3063, U+3066, U+3068, U+306A..U+306F, U+3072, U+3075, U+3078, U+307B, U+307E..U+3083, U+3085, U+3087, U+3089..U+308E, U+3090..U+3093, U+30A1, U+30A3, U+30A5, U+30A7, U+30A9, U+30AD, U+30AF, U+30B3, U+30B5, U+30BB, U+30BD, U+30BF, U+30C1, U+30C3, U+30C4, U+30C6, U+30CA, U+30CB, U+30CD, U+30CE, U+30DE, U+30DF, U+30E1, U+30E2, U+30E3, U+30E5, U+30E7, U+30EE, U+30F0..U+30F3, U+30F5, U+30F6, U+31F0, U+31F1, U+31F2, U+31F3, U+31F4, U+31F5, U+31F6, U+31F7, U+31F8, U+31F9, U+31FA, U+31FB, U+31FC, U+31FD, U+31FE, U+31FF, U+AC00..U+D7A3, U+1100..U+1159, U+1161..U+11A2, U+11A8..U+11F9, U+A000..U+A48C, U+A492..U+A4C6 - - # phrase boundary characters list - # optional, default is empty - # - # phrase_boundary = ., ?, !, U+2026 # horizontal ellipsis - - # phrase boundary word position increment - # optional, default is 0 - # - # phrase_boundary_step = 100 - - # blended characters list - # blended chars are indexed both as separators and valid characters - # for instance, AT&T will results in 3 tokens ("at", "t", and "at&t") - # optional, default is empty - # - # blend_chars = +, &, U+23 - - # blended token indexing mode - # a comma separated list of blended token indexing variants - # known variants are trim_none, trim_head, trim_tail, trim_both, skip_pure - # optional, default is trim_none - # - # blend_mode = trim_tail, skip_pure - - # whether to strip HTML tags from incoming documents - # known values are 0 (do not strip) and 1 (do strip) - # optional, default is 0 - html_strip = 0 - - # what HTML attributes to index if stripping HTML - # optional, default is empty (do not index anything) - # - # html_index_attrs = img=alt,title; a=title; - - # what HTML elements contents to strip - # optional, default is empty (do not strip element contents) - # - # html_remove_elements = style, script - - # whether to preopen index data files on startup - # optional, default is 0 (do not preopen), searchd-only - # - # preopen = 1 - - # whether to keep dictionary (.spi) on disk, or cache it in RAM - # optional, default is 0 (cache in RAM), searchd-only - # - # ondisk_dict = 1 - - # whether to enable in-place inversion (2x less disk, 90-95%% speed) - # optional, default is 0 (use separate temporary files), indexer-only - # - # inplace_enable = 1 - - # in-place fine-tuning options - # optional, defaults are listed below - # - # inplace_hit_gap = 0 # preallocated hitlist gap size - # inplace_docinfo_gap = 0 # preallocated docinfo gap size - # inplace_reloc_factor = 0.1 # relocation buffer size within arena - # inplace_write_factor = 0.1 # write buffer size within arena - - # whether to index original keywords along with stemmed versions - # enables "=exactform" operator to work - # optional, default is 0 - # - # index_exact_words = 1 - - # position increment on overshort (less that min_word_len) words - # optional, allowed values are 0 and 1, default is 1 - # - # overshort_step = 1 - - # position increment on stopword - # optional, allowed values are 0 and 1, default is 1 - # - # stopword_step = 1 - - # hitless words list - # positions for these keywords will not be stored in the index - # optional, allowed values are 'all', or a list file name - # - # hitless_words = all - # hitless_words = hitless.txt - - # detect and index sentence and paragraph boundaries - # required for the SENTENCE and PARAGRAPH operators to work - # optional, allowed values are 0 and 1, default is 0 - # - # index_sp = 1 - - # index zones, delimited by HTML/XML tags - # a comma separated list of tags and wildcards - # required for the ZONE operator to work - # optional, default is empty string (do not index zones) - # - # index_zones = title, h*, th -} - -############################################################################# -## searchd settings -############################################################################# - -searchd -{ - # [hostname:]port[:protocol], or /unix/socket/path to listen on - # known protocols are 'sphinx' (SphinxAPI) and 'mysql41' (SphinxQL) - # - # multi-value, multiple listen points are allowed - # optional, defaults are 9312:sphinx and 9306:mysql41, as below - # - # listen = 127.0.0.1 - # listen = 192.168.0.1:9312 - # listen = 9312 - # listen = /var/run/searchd.sock - listen = %(ip_address)s:%(port)s:sphinx - listen = %(ip_address)s:%(sql_port)s:mysql41 - - # log file, searchd run info is logged here - # optional, default is 'searchd.log' - log = %(searchd_log)s - - # query log file, all search queries are logged here - # optional, default is empty (do not log queries) - query_log = %(query_log)s - - # client read timeout, seconds - # optional, default is 5 - read_timeout = 5 - - # request timeout, seconds - # optional, default is 5 minutes - client_timeout = 300 - - # maximum amount of children to fork (concurrent searches to run) - # optional, default is 0 (unlimited) - max_children = 30 - - # PID file, searchd process ID file name - # mandatory - pid_file = %(pid)s - - # max amount of matches the daemon ever keeps in RAM, per-index - # WARNING, THERE'S ALSO PER-QUERY LIMIT, SEE SetLimits() API CALL - # default is 1000 (just like Google) - max_matches = 1000 - - # seamless rotate, prevents rotate stalls if precaching huge datasets - # optional, default is 1 - seamless_rotate = 1 - - # whether to forcibly preopen all indexes on startup - # optional, default is 0 (do not preopen) - preopen_indexes = 0 - - # whether to unlink .old index copies on succesful rotation. - # optional, default is 1 (do unlink) - unlink_old = 1 - - # attribute updates periodic flush timeout, seconds - # updates will be automatically dumped to disk this frequently - # optional, default is 0 (disable periodic flush) - # - # attr_flush_period = 900 - - # instance-wide ondisk_dict defaults (per-index value take precedence) - # optional, default is 0 (precache all dictionaries in RAM) - # - # ondisk_dict_default = 1 - - # MVA updates pool size - # shared between all instances of searchd, disables attr flushes! - # optional, default size is 1M - mva_updates_pool = 1M - - # max allowed network packet size - # limits both query packets from clients, and responses from agents - # optional, default size is 8M - max_packet_size = 8M - - # crash log path - # searchd will (try to) log crashed query to 'crash_log_path.PID' file - # optional, default is empty (do not create crash logs) - # - # crash_log_path = (log_directory) - - # max allowed per-query filter count - # optional, default is 256 - max_filters = 256 - - # max allowed per-filter values count - # optional, default is 4096 - max_filter_values = 4096 - - # socket listen queue length - # optional, default is 5 - # - # listen_backlog = 5 - - # per-keyword read buffer size - # optional, default is 256K - # - # read_buffer = 256K - - # unhinted read size (currently used when reading hits) - # optional, default is 32K - # - # read_unhinted = 32K - - # max allowed per-batch query count (aka multi-query count) - # optional, default is 32 - max_batch_queries = 32 - - # max common subtree document cache size, per-query - # optional, default is 0 (disable subtree optimization) - # - # subtree_docs_cache = 4M - - # max common subtree hit cache size, per-query - # optional, default is 0 (disable subtree optimization) - # - # subtree_hits_cache = 8M - - # multi-processing mode (MPM) - # known values are none, fork, prefork, and threads - # optional, default is fork - # - workers = threads # for RT to work - - # max threads to create for searching local parts of a distributed index - # optional, default is 0, which means disable multi-threaded searching - # should work with all MPMs (ie. does NOT require workers=threads) - # - # dist_threads = 4 - - # binlog files path; use empty string to disable binlog - # optional, default is build-time configured data directory - # - binlog_path = # disable logging - # binlog_path = %(data_directory)s # binlog.001 etc will be created there - - # binlog flush/sync mode - # 0 means flush and sync every second - # 1 means flush and sync every transaction - # 2 means flush every transaction, sync every second - # optional, default is 2 - # - # binlog_flush = 2 - - # binlog per-file size limit - # optional, default is 128M, 0 means no limit - # - # binlog_max_log_size = 256M -} diff --git a/slapos/recipe/sshkeys_authority.py b/slapos/recipe/sshkeys_authority.py deleted file mode 100644 index 6d3951c2c..000000000 --- a/slapos/recipe/sshkeys_authority.py +++ /dev/null @@ -1,160 +0,0 @@ -############################################################################## -# -# 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 json -import hashlib -import os -import subprocess -import re - -from slapos.recipe.librecipe import GenericBaseRecipe -from slapos.recipe.librecipe.inotify import subfiles - -# This authority only works with dropbear sshkey generator -def sshkeys_authority(args): - requests_directory = args['requests'] - keygen_binary = args['sshkeygen'] - - for request_filename in subfiles(requests_directory): - - with open(request_filename) as request_file: - request = json.load(request_file) - - key_type = request.get('type', 'rsa') - size = str(request.get('size', 2048)) - try: - private_key = request['private_key'] - public_key = request['public_key'] - except KeyError: - break - - if not os.path.exists(private_key): - if os.path.exists(public_key): - os.unlink(public_key) - keygen_cmd = [keygen_binary, '-t', key_type, '-f', private_key, - '-s', size] - # If the keygeneration return an non-zero status, it means there's a - # big problem. Let's exit in this case - subprocess.check_call(keygen_cmd, env=os.environ.copy()) - - if not os.path.exists(public_key): - keygen_cmd = [keygen_binary, '-f', private_key, '-y'] - - keygen = subprocess.Popen(keygen_cmd, stdout=subprocess.PIPE, - stdin=subprocess.PIPE, - stderr=subprocess.STDOUT, - env=os.environ.copy()) - keygen.stdin.flush() - keygen.stdin.close() - - # If the keygeneration return an non-zero status, it means there's a - # big problem. Let's exit in this case - if keygen.wait() != 0: - raise subprocess.CalledProcessError("%r returned a non-zero status" % \ - ' '.join(keygen_cmd)) - public_key_value = '' - for line in keygen.stdout: - # Perl programming ! - # Don't worry, just regex to detect the ssh public key line - matchresult = re.match(r'ssh-.*?=+', line) - if matchresult: - public_key_value = matchresult.group(0) - break - - with open(public_key, 'w') as public_key_file: - public_key_file.write(public_key_value) - - - -class Recipe(GenericBaseRecipe): - - def install(self): - args = dict( - requests=self.options['request-directory'], - sshkeygen=self.options['keygen-binary'], - ) - - wrapper = self.createPythonScript(self.options['wrapper'], - __name__ + '.sshkeys_authority', args) - return [wrapper] - -class Request(GenericBaseRecipe): - - def _options(self, options): - if 'name' not in options: - options['name'] = self.name - - keys_directory = options['keys-directory'] - - self.private_key = os.path.join(keys_directory, - hashlib.sha256(options['name']).hexdigest()) - self.public_key = self.private_key + '.pub' - - if os.path.exists(self.public_key): - with open(self.public_key) as key: - options['public-key-value'] = key.read() - else: - options['public-key-value'] = '' - - def install(self): - requests_directory = self.options['request-directory'] - request_file = os.path.join(requests_directory, self.options['name']) - - request = dict( - private_key=self.private_key, - public_key=self.public_key, - ) - if 'size' in self.options: - request.update(size=int(self.options['size'], 10)) - if 'type' in self.options: - request.update(type=self.options['type']) - - with open(request_file, 'w') as file_: - json.dump(request, file_) - - public_key_link, private_key_link = (self.options['public-key'], - self.options['private-key'], - ) - # XXX: Copy and past from certificate_authority/__init__.py:Request - # We should factorize that - for link in [public_key_link, private_key_link]: - if os.path.islink(link): - os.unlink(link) - elif os.path.exists(link): - raise OSError("%r should be a symbolic link." % link) - - os.symlink(self.public_key, public_key_link) - os.symlink(self.private_key, private_key_link) - # end-XXX - - wrapper = self.createPythonScript( - self.options['wrapper'], - 'slapos.recipe.librecipe.execute.execute_wait', - [ [self.options['executable']], - [self.private_key, self.public_key] ]) - - - return [request_file, wrapper, public_key_link, private_key_link] diff --git a/slapos/recipe/stunnel/__init__.py b/slapos/recipe/stunnel/__init__.py index f62f358f2..06bad67a2 100644 --- a/slapos/recipe/stunnel/__init__.py +++ b/slapos/recipe/stunnel/__init__.py @@ -24,24 +24,22 @@ # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. # ############################################################################## -import os -import signal -import errno +import itertools -from slapos.recipe.librecipe import GenericBaseRecipe - -def post_rotate(args): - pid_file = args['pid_file'] +import zc.buildout - if os.path.exist(pid_file): - with open(pid_file, 'r') as file_: - pid = file_.read().strip() - os.kill(pid, signal.SIGUSR1) +from slapos.recipe.librecipe import GenericBaseRecipe class Recipe(GenericBaseRecipe): - def install(self): - path_list = [] + def _options(self, options): + self.types = ['local', 'remote'] + self.datas = ['address', 'port'] + for type_ in self.types: + for data in self.datas: + opt = '%s-%s' % (type_, data) + if opt not in options: + raise zc.buildout.UserError("No %s for %s connections." % (data, type_)) self.isClient = self.optionIsTrue('client', default=False) if self.isClient: @@ -49,15 +47,25 @@ class Recipe(GenericBaseRecipe): else: self.logger.info("Server mode") + if 'name' not in options: + options['name'] = self.name + + + def install(self): + path_list = [] conf = {} - for type_ in ['remote', 'local']: - for data in ['host', 'port']: - confkey, opt = ['%s%s%s' % (type_, i, data) for i in ['_', '-']] - conf[confkey] = self.options[opt] + gathered_options = ['%s-%s' % option + for option in itertools.product(self.types, + self.datas)] + for option in gathered_options: + # XXX: Because the options are using dash and the template uses + # underscore + conf[option.replace('-', '_')] = self.options[option] pid_file = self.options['pid-file'] conf.update(pid_file=pid_file) + path_list.append(pid_file) log_file = self.options['log-file'] conf.update(log=log_file) @@ -83,21 +91,4 @@ class Recipe(GenericBaseRecipe): ) path_list.append(wrapper) - if os.path.exists(pid_file): - with open(pid_file, 'r') as file_: - pid = file_.read().strip() - # Reload configuration - try: - os.kill(int(pid, 10), signal.SIGHUP) - except OSError, e: - if e.errno == errno.ESRCH: # No such process - os.unlink(pid_file) - else: - raise e - - if 'post-rotate-script' in self.options: - self.createPythonScript(self.options['post-rotate-script'], - __name__ + 'post_rotate', - dict(pid_file=pid_file)) - return path_list diff --git a/slapos/recipe/stunnel/template/server.conf.in b/slapos/recipe/stunnel/template/server.conf.in index 48bfa7a74..e53bbc5c1 100644 --- a/slapos/recipe/stunnel/template/server.conf.in +++ b/slapos/recipe/stunnel/template/server.conf.in @@ -6,5 +6,5 @@ key = %(key)s cert = %(cert)s [service] -accept = %(remote_host)s:%(remote_port)s -connect = %(local_host)s:%(local_port)s +accept = %(remote_address)s:%(remote_port)s +connect = %(local_address)s:%(local_port)s diff --git a/slapos/recipe/tidstorage/__init__.py b/slapos/recipe/tidstorage/__init__.py deleted file mode 100644 index a5e33741d..000000000 --- a/slapos/recipe/tidstorage/__init__.py +++ /dev/null @@ -1,41 +0,0 @@ -############################################################################## -# -# Copyright (c) 2011 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 -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) - - return path_list diff --git a/slapos/recipe/tidstorage/template/tidstorage.py.in b/slapos/recipe/tidstorage/template/tidstorage.py.in deleted file mode 100644 index 819e58d3b..000000000 --- a/slapos/recipe/tidstorage/template/tidstorage.py.in +++ /dev/null @@ -1,15 +0,0 @@ -known_tid_storage_identifier_dict = %(known-tid-storage-identifier-dict)s -base_url = '%(base-url)s' -address = '%(ip)s' -port = %(port)s - -#fork = False -#setuid = None -#setgid = None -burst_period = 30 -full_dump_period = 300 - -timestamp_file_path = '%(timestamp-file-path)s' -logfile_name = '%(logfile-name)s' -pidfile_name = '%(pidfile-name)s' -status_file = '%(status-file)s' diff --git a/slapos/recipe/vifib.py b/slapos/recipe/vifib.py index 7bd11b6ba..55ec2243b 100644 --- a/slapos/recipe/vifib.py +++ b/slapos/recipe/vifib.py @@ -147,10 +147,7 @@ class Recipe(slapos.recipe.erp5.Recipe): conversion_server_conf, # as installERP5Site is not trusted (yet) and this recipe is production # ready expose more information - # XXX Use socket access to prevent unwanted connections to original MySQL - # server when cloning an existing ERP5 instance. - # TCP will be required if MySQL is in a different partition/server. - mysql_url='%(mysql_database)s %(mysql_user)s %(mysql_password)s %(socket)s' % mysql_conf, + mysql_url='%(mysql_database)s@%(ip)s:%(tcp_port)s %(mysql_user)s %(mysql_password)s' % mysql_conf, )) return self.path_list @@ -203,10 +200,7 @@ class Recipe(slapos.recipe.erp5.Recipe): conversion_server_conf, # as installERP5Site is not trusted (yet) and this recipe is production # ready expose more information - # XXX Use socket access to prevent unwanted connections to original MySQL - # server when cloning an existing ERP5 instance. - # TCP will be required if MySQL is in a different partition/server. - mysql_url='%(mysql_database)s %(mysql_user)s %(mysql_password)s %(socket)s' % mysql_conf, + mysql_url='%(mysql_database)s@%(ip)s:%(tcp_port)s %(mysql_user)s %(mysql_password)s' % mysql_conf, )) return self.path_list diff --git a/slapos/recipe/waitfor.py b/slapos/recipe/waitfor.py deleted file mode 100644 index 80706f672..000000000 --- a/slapos/recipe/waitfor.py +++ /dev/null @@ -1,42 +0,0 @@ -############################################################################## -# -# 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 shlex - -from slapos.recipe.librecipe import GenericBaseRecipe - -class Recipe(GenericBaseRecipe): - - def install(self): - files = [f for f in self.options['files'].split('\n') if f] - command_line = shlex.split(self.options['command-line']) - wrapper = self.createPythonScript( - self.options['wrapper'], - 'slapos.recipe.librecipe.execute.execute_wait', - [ command_line, - files ], - ) - return [wrapper] diff --git a/slapos/recipe/xwiki/template/.svn/all-wcprops b/slapos/recipe/xwiki/template/.svn/all-wcprops new file mode 100644 index 000000000..d00ca2e34 --- /dev/null +++ b/slapos/recipe/xwiki/template/.svn/all-wcprops @@ -0,0 +1,35 @@ +K 25 +svn:wc:ra_dav:version-url +V 101 +/repos/public/!svn/ver/45235/slapos/trunk/recipe/slapos.recipe.xwiki/src/slapos/recipe/xwiki/template +END +my.cnf.in +K 25 +svn:wc:ra_dav:version-url +V 111 +/repos/public/!svn/ver/45235/slapos/trunk/recipe/slapos.recipe.xwiki/src/slapos/recipe/xwiki/template/my.cnf.in +END +tomcat-server.xml.in +K 25 +svn:wc:ra_dav:version-url +V 122 +/repos/public/!svn/ver/45235/slapos/trunk/recipe/slapos.recipe.xwiki/src/slapos/recipe/xwiki/template/tomcat-server.xml.in +END +mysqld.bin +K 25 +svn:wc:ra_dav:version-url +V 112 +/repos/public/!svn/ver/45235/slapos/trunk/recipe/slapos.recipe.xwiki/src/slapos/recipe/xwiki/template/mysqld.bin +END +hibernate.cfg.xml.in +K 25 +svn:wc:ra_dav:version-url +V 122 +/repos/public/!svn/ver/45235/slapos/trunk/recipe/slapos.recipe.xwiki/src/slapos/recipe/xwiki/template/hibernate.cfg.xml.in +END +initmysql.sql.in +K 25 +svn:wc:ra_dav:version-url +V 118 +/repos/public/!svn/ver/45235/slapos/trunk/recipe/slapos.recipe.xwiki/src/slapos/recipe/xwiki/template/initmysql.sql.in +END diff --git a/slapos/recipe/xwiki/template/.svn/entries b/slapos/recipe/xwiki/template/.svn/entries new file mode 100644 index 000000000..2a434d1ab --- /dev/null +++ b/slapos/recipe/xwiki/template/.svn/entries @@ -0,0 +1,198 @@ +10 + +dir +45492 +https://svn.erp5.org/repos/public/slapos/trunk/recipe/slapos.recipe.xwiki/src/slapos/recipe/xwiki/template +https://svn.erp5.org/repos/public + + + +2011-04-08T10:52:53.516084Z +45235 +luke + + + + + + + + + + + + + + +20353a03-c40f-0410-a6d1-a30d3c3de9de + +my.cnf.in +file + + + + +2011-04-15T12:07:28.105799Z +4e14aadbd4cc702f79be73d30e43910a +2011-04-08T10:52:53.516084Z +45235 +luke + + + + + + + + + + + + + + + + + + + + + +1748 + +tomcat-server.xml.in +file + + + + +2011-04-15T12:07:28.106799Z +e2f38e13d03651be5e315648486d5037 +2011-04-08T10:52:53.516084Z +45235 +luke + + + + + + + + + + + + + + + + + + + + + +6832 + +mysqld.bin +file + + + + +2011-04-15T12:07:28.106799Z +c8d25b8de5d48ec743ef96765510295c +2011-04-08T10:52:53.516084Z +45235 +luke + + + + + + + + + + + + + + + + + + + + + +70 + +hibernate.cfg.xml.in +file + + + + +2011-04-15T12:07:28.106799Z +6b232131d3aa1cf19c9b1bf07db98aaf +2011-04-08T10:52:53.516084Z +45235 +luke + + + + + + + + + + + + + + + + + + + + + +7107 + +initmysql.sql.in +file + + + + +2011-04-15T12:07:28.106799Z +0b2a21fe9fb6578bfa7756978cabd26e +2011-04-08T10:52:53.516084Z +45235 +luke + + + + + + + + + + + + + + + + + + + + + +129 + diff --git a/slapos/recipe/xwiki/template/.svn/text-base/hibernate.cfg.xml.in.svn-base b/slapos/recipe/xwiki/template/.svn/text-base/hibernate.cfg.xml.in.svn-base new file mode 100644 index 000000000..91196e74a --- /dev/null +++ b/slapos/recipe/xwiki/template/.svn/text-base/hibernate.cfg.xml.in.svn-base @@ -0,0 +1,128 @@ +<?xml version='1.0' encoding='utf-8'?> +<!DOCTYPE hibernate-configuration PUBLIC "-//Hibernate/Hibernate Configuration DTD//EN" + "http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd"> +<hibernate-configuration> + <session-factory> + + <!-- Please refer to the installation guide on + http://platform.xwiki.org/xwiki/bin/view/AdminGuide/Installation for configuring your + database. You'll need to do 2 things: + 1) Copy your database driver JAR in WEB-INF/lib or in some shared lib directory + 2) Uncomment the properties below for your specific DB (and comment the default + database configuration if it doesn't match your DB) + --> + + <!-- Generic parameters common to all Databases --> + + <property name="show_sql">false</property> + <property name="use_outer_join">true</property> + + <property name="dbcp.defaultAutoCommit">false</property> + <property name="dbcp.maxActive">50</property> + <property name="dbcp.maxIdle">5</property> + <property name="dbcp.maxWait">30000</property> + <property name="dbcp.whenExhaustedAction">1</property> + <property name="dbcp.ps.whenExhaustedAction">1</property> + <property name="dbcp.ps.maxActive">20</property> + <property name="dbcp.ps.maxWait">120000</property> + <property name="dbcp.ps.maxIdle">20</property> + <!-- Without it, some queries fail in MS SQL. XWiki doesn't need scrollable result sets, anyway. --> + <property name="jdbc.use_scrollable_resultset">false</property> + + <!-- Configuration for the default database. + Comment out this section and uncomment other sections below if you want to use another database. + Note that the database tables will be created automatically if they don't already exist. + <property name="connection.url">jdbc:hsqldb:file:database/xwiki_db;shutdown=true</property> + <property name="connection.username">sa</property> + <property name="connection.password"></property> + <property name="connection.driver_class">org.hsqldb.jdbcDriver</property> + <property name="dialect">org.hibernate.dialect.HSQLDialect</property> + <property name="connection.provider_class">com.xpn.xwiki.store.DBCPConnectionProvider</property> + <property name="connection.pool_size">2</property> + <property name="statement_cache.size">2</property> + <mapping resource="xwiki.hbm.xml"/> + <mapping resource="feeds.hbm.xml"/> + <mapping resource="activitystream.hbm.xml"/> + --> + + <!-- MySQL configuration. + Uncomment if you want to use MySQL and comment out other database configurations. + We need to set the sql_mode to a less strict value, see XWIKI-1945 + --> + <property name="connection.url">jdbc:mysql://%(mysql_ip)s:%(mysql_port)s/xwiki?useServerPrepStmts=false&useUnicode=true&characterEncoding=UTF-8&sessionVariables=sql_mode=''</property> + <property name="connection.username">xwiki</property> + <property name="connection.password">xwiki</property> + <property name="connection.driver_class">com.mysql.jdbc.Driver</property> + <property name="dialect">org.hibernate.dialect.MySQLDialect</property> + <property name="connection.provider_class">com.xpn.xwiki.store.DBCPConnectionProvider</property> + <property name="connection.pool_size">2</property> + <property name="statement_cache.size">2</property> + <mapping resource="xwiki.hbm.xml"/> + <mapping resource="feeds.hbm.xml"/> + <mapping resource="activitystream.hbm.xml"/> + + <!-- HSQLDB configuration. + Uncomment if you want to use HSQLDB and comment out other database configurations. + <property name="connection.url">jdbc:hsqldb:file:/some/path/xwikidb;shutdown=true</property> + <property name="connection.username">sa</property> + <property name="connection.password"></property> + <property name="connection.driver_class">org.hsqldb.jdbcDriver</property> + <property name="dialect">org.hibernate.dialect.HSQLDialect</property> + <property name="connection.provider_class">com.xpn.xwiki.store.DBCPConnectionProvider</property> + <property name="connection.pool_size">2</property> + <property name="statement_cache.size">2</property> + <mapping resource="xwiki.hbm.xml"/> + <mapping resource="feeds.hbm.xml"/> + <mapping resource="activitystream.hbm.xml"/> + --> + + <!-- PostgreSQL configuration. + Uncomment if you want to use PostgreSQL and comment out other database configurations. + <property name="connection.url">jdbc:postgresql:xwiki</property> + <property name="connection.username">xwiki</property> + <property name="connection.password">xwiki</property> + <property name="connection.driver_class">org.postgresql.Driver</property> + <property name="dialect">org.hibernate.dialect.PostgreSQLDialect</property> + <property name="connection.provider_class">com.xpn.xwiki.store.DBCPConnectionProvider</property> + <property name="connection.pool_size">2</property> + <property name="statement_cache.size">2</property> + <mapping resource="xwiki.hbm.xml"/> + <mapping resource="feeds.hbm.xml"/> + <mapping resource="activitystream.hbm.xml"/> + --> + + <!-- Oracle configuration. + Uncomment if you want to use Oracle and comment out other database configurations. + Note: the 2 properties named "hibernate.connection.SetBigStringTryClob" and + "hibernate.jdbc.batch_size". They are required to tell Oracle to allow CLOBs larger than + 32K. + <property name="connection.url">jdbc:oracle:thin:@localhost:1521:XE</property> + <property name="connection.username">xwiki</property> + <property name="connection.password">xwiki</property> + <property name="connection.driver_class">oracle.jdbc.driver.OracleDriver</property> + <property name="dialect">org.hibernate.dialect.Oracle10gDialect</property> + <property name="connection.provider_class">com.xpn.xwiki.store.DBCPConnectionProvider</property> + <property name="connection.pool_size">2</property> + <property name="statement_cache.size">2</property> + <property name="hibernate.connection.SetBigStringTryClob">true</property> + <property name="hibernate.jdbc.batch_size">0</property> + <mapping resource="xwiki.oracle.hbm.xml"/> + <mapping resource="feeds.oracle.hbm.xml"/> + <mapping resource="activitystream.hbm.xml"/> + --> + + <!-- Derby configuration. + Uncomment if you want to use Derby and comment out other database configurations. + <property name="connection.url">jdbc:derby:/some/path/xwikidb;create=true</property> + <property name="connection.driver_class">org.apache.derby.jdbc.EmbeddedDriver</property> + <property name="dialect">org.hibernate.dialect.DerbyDialect</property> + <property name="connection.provider_class">com.xpn.xwiki.store.DBCPConnectionProvider</property> + <property name="connection.pool_size">2</property> + <property name="statement_cache.size">2</property> + <mapping resource="xwiki.derby.hbm.xml"/> + <mapping resource="feeds.hbm.xml"/> + <mapping resource="activitystream.hbm.xml"/> + --> + + </session-factory> +</hibernate-configuration> diff --git a/slapos/recipe/xwiki/template/.svn/text-base/initmysql.sql.in.svn-base b/slapos/recipe/xwiki/template/.svn/text-base/initmysql.sql.in.svn-base new file mode 100644 index 000000000..365eb9550 --- /dev/null +++ b/slapos/recipe/xwiki/template/.svn/text-base/initmysql.sql.in.svn-base @@ -0,0 +1,4 @@ +CREATE DATABASE IF NOT EXISTS xwiki; +GRANT ALL PRIVILEGES ON %(database)s.* TO %(user)s@'%%' IDENTIFIED BY '%(password)s'; +EXIT + diff --git a/slapos/recipe/xwiki/template/.svn/text-base/my.cnf.in.svn-base b/slapos/recipe/xwiki/template/.svn/text-base/my.cnf.in.svn-base new file mode 100644 index 000000000..5e2742175 --- /dev/null +++ b/slapos/recipe/xwiki/template/.svn/text-base/my.cnf.in.svn-base @@ -0,0 +1,75 @@ +# ERP5 buildout my.cnf template based on my-huge.cnf shipped with mysql +# The MySQL server +[mysqld] +# ERP5 by default requires InnoDB storage. MySQL by default fallbacks to using +# different engine, like MyISAM. Such behaviour generates problems only, when +# tables requested as InnoDB are silently created with MyISAM engine. +# +# Loud fail is really required in such case. +sql-mode="NO_ENGINE_SUBSTITUTION" + +skip-show-database +port = %(tcp_port)s +bind-address = %(ip)s +socket = %(socket)s +datadir = %(data_directory)s +pid-file = %(pid_file)s +log-error = %(error_log)s +log-slow-queries = %(slow_query_log)s +long_query_time = 5 +skip-locking +key_buffer = 384M +max_allowed_packet = 128M +table_cache = 512 +sort_buffer_size = 2M +read_buffer_size = 2M +read_rnd_buffer_size = 8M +myisam_sort_buffer_size = 64M +thread_cache_size = 8 +query_cache_size = 32M +# Try number of CPU's*2 for thread_concurrency +thread_concurrency = 8 + +# Disable Federated by default +skip-federated + +# Replication Master Server (default) +# binary logging is required for replication +log-bin=mysql-bin + +# required unique id between 1 and 2^32 - 1 +# defaults to 1 if master-host is not set +# but will not function as a master if omitted +server-id = 1 + +# Force utf8 usage +collation_server = utf8_unicode_ci +character_set_server = utf8 +default-character-set = utf8 +skip-character-set-client-handshake + +[mysqldump] +quick +max_allowed_packet = 16M + +[mysql] +no-auto-rehash +# Remove the next comment character if you are not familiar with SQL +#safe-updates +socket = %(socket)s + +[isamchk] +key_buffer = 256M +sort_buffer_size = 256M +read_buffer = 2M +write_buffer = 2M + +[myisamchk] +key_buffer = 256M +sort_buffer_size = 256M +read_buffer = 2M +write_buffer = 2M + +[mysqlhotcopy] +interactive-timeout + diff --git a/slapos/recipe/xwiki/template/.svn/text-base/mysqld.bin.svn-base b/slapos/recipe/xwiki/template/.svn/text-base/mysqld.bin.svn-base new file mode 100644 index 000000000..f0ed08dd1 --- /dev/null +++ b/slapos/recipe/xwiki/template/.svn/text-base/mysqld.bin.svn-base @@ -0,0 +1,2 @@ +#!/bin/sh +exec %(real_binary)s --defaults-file=%(configuration_file)s diff --git a/slapos/recipe/xwiki/template/.svn/text-base/tomcat-server.xml.in.svn-base b/slapos/recipe/xwiki/template/.svn/text-base/tomcat-server.xml.in.svn-base new file mode 100644 index 000000000..811201984 --- /dev/null +++ b/slapos/recipe/xwiki/template/.svn/text-base/tomcat-server.xml.in.svn-base @@ -0,0 +1,148 @@ +<?xml version='1.0' encoding='utf-8'?> +<!-- + Licensed to the Apache Software Foundation (ASF) under one or more + contributor license agreements. See the NOTICE file distributed with + this work for additional information regarding copyright ownership. + The ASF licenses this file to You under the Apache License, Version 2.0 + (the "License"); you may not use this file except in compliance with + the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +--> +<!-- Note: A "Server" is not itself a "Container", so you may not + define subcomponents such as "Valves" at this level. + Documentation at /docs/config/server.html + --> +<Server port="-1" shutdown="SHUTDOWN"> + + <!--APR library loader. Documentation at /docs/apr.html --> + <Listener className="org.apache.catalina.core.AprLifecycleListener" SSLEngine="on" /> + <!--Initialize Jasper prior to webapps are loaded. Documentation at /docs/jasper-howto.html --> + <Listener className="org.apache.catalina.core.JasperListener" /> + <!-- Prevent memory leaks due to use of particular java/javax APIs--> + <Listener className="org.apache.catalina.core.JreMemoryLeakPreventionListener" /> + <!-- JMX Support for the Tomcat server. Documentation at /docs/non-existent.html --> + <Listener className="org.apache.catalina.mbeans.ServerLifecycleListener" /> + <Listener className="org.apache.catalina.mbeans.GlobalResourcesLifecycleListener" /> + + <!-- Global JNDI resources + Documentation at /docs/jndi-resources-howto.html + --> + <GlobalNamingResources> + <!-- Editable user database that can also be used by + UserDatabaseRealm to authenticate users + --> + <Resource name="UserDatabase" auth="Container" + type="org.apache.catalina.UserDatabase" + description="User database that can be updated and saved" + factory="org.apache.catalina.users.MemoryUserDatabaseFactory" + pathname="conf/tomcat-users.xml" /> + </GlobalNamingResources> + + <!-- A "Service" is a collection of one or more "Connectors" that share + a single "Container" Note: A "Service" is not itself a "Container", + so you may not define subcomponents such as "Valves" at this level. + Documentation at /docs/config/service.html + --> + <Service name="Catalina"> + + <!--The connectors can use a shared executor, you can define one or more named thread pools--> + <!-- + <Executor name="tomcatThreadPool" namePrefix="catalina-exec-" + maxThreads="150" minSpareThreads="4"/> + --> + + + <!-- A "Connector" represents an endpoint by which requests are received + and responses are returned. Documentation at : + Java HTTP Connector: /docs/config/http.html (blocking & non-blocking) + Java AJP Connector: /docs/config/ajp.html + APR (HTTP/AJP) Connector: /docs/apr.html + Define a non-SSL HTTP/1.1 Connector on port 8080 + --> + <Connector address="%(http_address)s" port="%(http_port)s" protocol="HTTP/1.1" + connectionTimeout="20000" + redirectPort="8443" /> + <!-- A "Connector" using the shared thread pool--> + <!-- + <Connector executor="tomcatThreadPool" + port="8080" protocol="HTTP/1.1" + connectionTimeout="20000" + redirectPort="8443" /> + --> + <!-- Define a SSL HTTP/1.1 Connector on port 8443 + This connector uses the JSSE configuration, when using APR, the + connector should be using the OpenSSL style configuration + described in the APR documentation --> + <!-- + <Connector port="8443" protocol="HTTP/1.1" SSLEnabled="true" + maxThreads="150" scheme="https" secure="true" + clientAuth="false" sslProtocol="TLS" /> + --> + + <!-- Define an AJP 1.3 Connector on port 8009 --> + <Connector address="%(ajp_address)s" port="%(ajp_port)s" protocol="AJP/1.3" redirectPort="8443" /> + + + <!-- An Engine represents the entry point (within Catalina) that processes + every request. The Engine implementation for Tomcat stand alone + analyzes the HTTP headers included with the request, and passes them + on to the appropriate Host (virtual host). + Documentation at /docs/config/engine.html --> + + <!-- You should set jvmRoute to support load-balancing via AJP ie : + <Engine name="Catalina" defaultHost="localhost" jvmRoute="jvm1"> + --> + <Engine name="Catalina" defaultHost="localhost"> + + <!--For clustering, please take a look at documentation at: + /docs/cluster-howto.html (simple how to) + /docs/config/cluster.html (reference documentation) --> + <!-- + <Cluster className="org.apache.catalina.ha.tcp.SimpleTcpCluster"/> + --> + + <!-- The request dumper valve dumps useful debugging information about + the request and response data received and sent by Tomcat. + Documentation at: /docs/config/valve.html --> + <!-- + <Valve className="org.apache.catalina.valves.RequestDumperValve"/> + --> + + <!-- This Realm uses the UserDatabase configured in the global JNDI + resources under the key "UserDatabase". Any edits + that are performed against this UserDatabase are immediately + available for use by the Realm. --> + <Realm className="org.apache.catalina.realm.UserDatabaseRealm" + resourceName="UserDatabase"/> + + <!-- Define the default virtual host + Note: XML Schema validation will not work with Xerces 2.2. + --> + <Host name="localhost" appBase="webapps" + unpackWARs="true" autoDeploy="true" + xmlValidation="false" xmlNamespaceAware="false"> + + <!-- SingleSignOn valve, share authentication between web applications + Documentation at: /docs/config/valve.html --> + <!-- + <Valve className="org.apache.catalina.authenticator.SingleSignOn" /> + --> + + <!-- Access log processes all example. + Documentation at: /docs/config/valve.html --> + <!-- + <Valve className="org.apache.catalina.valves.AccessLogValve" directory="logs" + prefix="localhost_access_log." suffix=".txt" pattern="common" resolveHosts="false"/> + --> + + </Host> + </Engine> + </Service> +</Server> diff --git a/slapos/recipe/xwiki/template/my.cnf.in b/slapos/recipe/xwiki/template/my.cnf.in index 00eb28023..09171fb6d 100644 --- a/slapos/recipe/xwiki/template/my.cnf.in +++ b/slapos/recipe/xwiki/template/my.cnf.in @@ -15,39 +15,58 @@ socket = %(socket)s datadir = %(data_directory)s pid-file = %(pid_file)s log-error = %(error_log)s -slow_query_log -slow_query_log_file = %(slow_query_log)s +log-slow-queries = %(slow_query_log)s long_query_time = 5 +skip-locking +key_buffer = 384M max_allowed_packet = 128M +table_cache = 512 +sort_buffer_size = 2M +read_buffer_size = 2M +read_rnd_buffer_size = 8M +myisam_sort_buffer_size = 64M +thread_cache_size = 8 query_cache_size = 32M +# Try number of CPU's*2 for thread_concurrency +thread_concurrency = 8 -plugin-load = ha_groonga.so;ha_sphinx.so +# Replication Master Server (default) +# binary logging is required for replication +log-bin=mysql-bin -# The following are important to configure and depend a lot on to the size of -# your database and the available resources. -#innodb_buffer_pool_size = 4G -#innodb_log_file_size = 256M -#innodb_log_buffer_size = 8M - -# Some dangerous settings you may want to uncomment if you only want -# performance or less disk access. Useful for unit tests. -#innodb_flush_log_at_trx_commit = 0 -#innodb_flush_method = nosync -#innodb_doublewrite = 0 -#sync_frm = 0 - -# Uncomment the following if you need binary logging, which is recommended -# on production instances (either for replication or incremental backups). -#log-bin=mysql-bin +# required unique id between 1 and 2^32 - 1 +# defaults to 1 if master-host is not set +# but will not function as a master if omitted +server-id = 1 # Force utf8 usage collation_server = utf8_unicode_ci character_set_server = utf8 +default-character-set = utf8 skip-character-set-client-handshake +[mysqldump] +quick +max_allowed_packet = 16M + [mysql] no-auto-rehash +# Remove the next comment character if you are not familiar with SQL +#safe-updates socket = %(socket)s +[isamchk] +key_buffer = 256M +sort_buffer_size = 256M +read_buffer = 2M +write_buffer = 2M + +[myisamchk] +key_buffer = 256M +sort_buffer_size = 256M +read_buffer = 2M +write_buffer = 2M + [mysqlhotcopy] interactive-timeout + diff --git a/slapos/recipe/zeo/__init__.py b/slapos/recipe/zeo/__init__.py deleted file mode 100644 index 45b0ab090..000000000 --- a/slapos/recipe/zeo/__init__.py +++ /dev/null @@ -1,92 +0,0 @@ -############################################################################## -# -# Copyright (c) 2011 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 os - -class Recipe(GenericBaseRecipe): - """ - ZEO instance configuration. - - wrapper-path -- location of the init script to generate - - binary-path -- location of the runzeo command - - ip -- ip of the zeo server - - port -- port of the zeo server - - log-path -- location of the log file - - pid-path -- location of the pid file - - conf-path -- location of the configuration file - - zodb-path -- location of the zodb directory (which contains all storage) - - storage -- string with list of all resquested storage - Example: event_module person_module - """ - - def install(self): - snippet_filename = self.getTemplateFilename( - 'zeo-filestorage-snippet.conf.in') - # Prepare all filestorages - filestorage_snippet = "" - for storage_definition in self.options['storage'].splitlines(): - storage_definition = storage_definition.strip() - if not storage_definition: - continue - for q in storage_definition.split(): - if 'storage-name' in q: - storage_name = q.split('=')[1].strip() - if 'zodb-path' in q: - zodb_path = q.split('=')[1].strip() - filestorage_snippet += self.substituteTemplate( - snippet_filename, dict(storage_name=storage_name, path=zodb_path)) - - config = dict( - zeo_ip=self.options['ip'], - zeo_port=self.options['port'], - zeo_event_log=self.options['log-path'], - zeo_pid=self.options['pid-path'], - zeo_filestorage_snippet=filestorage_snippet, - ) - - # Create configuration file - template_filename = self.getTemplateFilename('zeo.conf.in') - configuration_path = self.createFile( - self.options['conf-path'], - self.substituteTemplate(template_filename, config)) - - # Create running wrapper - wrapper_path = self.createPythonScript( - self.options['wrapper-path'], - 'slapos.recipe.librecipe.execute.execute', - arguments=[self.options['binary-path'].strip(), '-C', - self.options['conf-path']],) - - return [configuration_path, wrapper_path] diff --git a/slapos/recipe/zeo/template/zeo-filestorage-snippet.conf.in b/slapos/recipe/zeo/template/zeo-filestorage-snippet.conf.in deleted file mode 100644 index 39c5337f8..000000000 --- a/slapos/recipe/zeo/template/zeo-filestorage-snippet.conf.in +++ /dev/null @@ -1,4 +0,0 @@ -<filestorage %(storage_name)s> - path %(path)s -</filestorage> - diff --git a/software/MediaWiki/instance.cfg b/software/MediaWiki/instance.cfg deleted file mode 100644 index 9495bde7e..000000000 --- a/software/MediaWiki/instance.cfg +++ /dev/null @@ -1,15 +0,0 @@ -[buildout] -eggs-directory = ${buildout:eggs-directory} -develop-eggs-directory = ${buildout:develop-eggs-directory} - -parts = instance - -[instance] -recipe = ${instance-recipe:egg}:${instance-recipe:module} -source = ${application:location} - -httpd_binary = ${apache:location}/bin/httpd -mysql_binary = ${mariadb:location}/bin/mysql -mysql_install_binary = ${mariadb:location}/bin/mysql_install_db -mysql_upgrade_binary = ${mariadb:location}/bin/mysql_upgrade -mysqld_binary = ${mariadb:location}/libexec/mysqld diff --git a/software/MediaWiki/patch/mediawiki-1.17.0.config.patch b/software/MediaWiki/patch/mediawiki-1.17.0.config.patch deleted file mode 100644 index 1dfb65c42..000000000 --- a/software/MediaWiki/patch/mediawiki-1.17.0.config.patch +++ /dev/null @@ -1,10 +0,0 @@ ---- old/includes/installer/WebInstaller.php 2011-10-11 11:36:29.173220293 +0100 -+++ new/includes/installer/WebInstaller.php 2011-10-11 11:34:32.000000000 +0100 -@@ -152,6 +152,7 @@ - $ls->setGroupRights( $group, $rightsArr ); - } - echo $ls->getText(); -+ file_put_contents(realpath(".") . "/LocalSettings.php", $ls->getText()); - return $this->session; - } - diff --git a/software/MediaWiki/software.cfg b/software/MediaWiki/software.cfg deleted file mode 100644 index 59d4dc147..000000000 --- a/software/MediaWiki/software.cfg +++ /dev/null @@ -1,146 +0,0 @@ -[buildout] -versions = versions - -parts = - template - apache-php - mariadb - eggs - instance-recipe-egg - downloadcache-workaround - mediawiki-patch - patch - - -extends = - ../../stack/lamp.cfg - ../../stack/shacache-client.cfg - -[mediawiki-patch] -recipe = slapos.recipe.download -url = ${:_profile_base_location_}/patch/mediawiki-1.17.0.config.patch -md5sum = fd606666ac9fc54cb84cda8cf08edef4 -location = ${buildout:parts-directory}/${:_buildout_section_name_} -filename = mediawiki-1.17.0.config.patch - -[application] -recipe = slapos.recipe.build:download-unpacked -url = http://download.wikimedia.org/mediawiki/1.17/mediawiki-1.17.0.tar.gz -md5sum = 871a00a8eb6dcae1b7b654ae635af7cd - -[patch] -recipe = iw.recipe.cmd -on_install = true -on_update = true -cmds= patch -d ${application:location} -p1 < ${mediawiki-patch:location}/${mediawiki-patch:filename} - -[instance-recipe] -egg = slapos.cookbook -module = lamp.simple - -[template] -# Default template for the instance. -recipe = slapos.recipe.template -url = ${:_profile_base_location_}/instance.cfg -#md5sum = Student shall put md5 of instance.cfg here -output = ${buildout:directory}/template.cfg -mode = 0644 - -[instance-recipe-egg] -recipe = zc.recipe.egg -eggs = ${instance-recipe:egg} - -[versions] -# Use SlapOS patched zc.buildout -zc.buildout = 1.5.3-dev-SlapOS-010 - -Jinja2 = 2.6 -MySQL-python = 1.2.3 -Werkzeug = 0.8.1 -apache-libcloud = 0.5.2 -buildout-versions = 1.7 -hexagonit.recipe.cmmi = 1.5.0 -meld3 = 0.6.7 -plone.recipe.command = 1.1 -slapos.cookbook = 0.34 -slapos.recipe.build = 0.7 -slapos.recipe.download = 1.0.dev-r4053 -slapos.recipe.template = 2.2 -slapos.toolbox = 0.10 - -# Required by: -# slapos.core==0.18 -# slapos.toolbox==0.10 -Flask = 0.8 - -# Required by: -# slapos.cookbook==0.34 -PyXML = 0.8.4 - -# Required by: -# hexagonit.recipe.cmmi==1.5.0 -hexagonit.recipe.download = 1.5.0 - -# Required by: -# slapos.cookbook==0.34 -# slapos.core==0.18 -# slapos.toolbox==0.10 -# xml-marshaller==0.9.7 -lxml = 2.3.1 - -# Required by: -# slapos.cookbook==0.34 -netaddr = 0.7.6 - -# Required by: -# slapos.core==0.18 -netifaces = 0.5 - -# Required by: -# slapos.toolbox==0.10 -paramiko = 1.7.7.1 - -# Required by: -# slapos.toolbox==0.10 -psutil = 0.3.0 - -# Required by: -# slapos.cookbook==0.34 -# slapos.core==0.18 -# slapos.toolbox==0.10 -setuptools = 0.6c12dev-r88846 - -# Required by: -# slapos.cookbook==0.34 -# slapos.toolbox==0.10 -slapos.core = 0.18 - -# Required by: -# slapos.core==0.18 -supervisor = 3.0a10 - -# Required by: -# slapos.cookbook==0.34 -# slapos.toolbox==0.10 -xml-marshaller = 0.9.7 - -# Required by: -# slapos.cookbook==0.34 -zc.recipe.egg = 1.3.2 - -# Required by: -# slapos.core==0.18 -zope.interface = 3.8.0 - -[downloadcache-workaround] -# workaround irritating problem of hexagonit.recipe.cmmi which automatically -# creates download cache, which in turn switches builout to "semi-offline" mode -recipe = plone.recipe.command -# in hexagonit.recipe.cmmi if there is no ${buildout:download-cache} set it resolves -# to ${buildout:directory}/downloads but this variable is available late, that's -# why it is hardcoded only for required case -download-cache = ${buildout:directory}/downloads -command = [ -d ${:download-cache} ] && rm -fr ${:download-cache}/* || exit 0 -update-command = ${:command} -stop-on-error = True - diff --git a/software/SilverStripe/instance.cfg b/software/SilverStripe/instance.cfg deleted file mode 100644 index 9495bde7e..000000000 --- a/software/SilverStripe/instance.cfg +++ /dev/null @@ -1,15 +0,0 @@ -[buildout] -eggs-directory = ${buildout:eggs-directory} -develop-eggs-directory = ${buildout:develop-eggs-directory} - -parts = instance - -[instance] -recipe = ${instance-recipe:egg}:${instance-recipe:module} -source = ${application:location} - -httpd_binary = ${apache:location}/bin/httpd -mysql_binary = ${mariadb:location}/bin/mysql -mysql_install_binary = ${mariadb:location}/bin/mysql_install_db -mysql_upgrade_binary = ${mariadb:location}/bin/mysql_upgrade -mysqld_binary = ${mariadb:location}/libexec/mysqld diff --git a/software/SilverStripe/software.cfg b/software/SilverStripe/software.cfg deleted file mode 100644 index 5d6ce23cc..000000000 --- a/software/SilverStripe/software.cfg +++ /dev/null @@ -1,130 +0,0 @@ -[buildout] -versions = versions - -parts = - template - apache-php - mariadb - eggs - instance-recipe-egg - downloadcache-workaround - -extends = - ../../stack/lamp.cfg - ../../stack/shacache-client.cfg - -[application] -recipe = slapos.recipe.build:download-unpacked -url = http://www.silverstripe.org/assets/downloads/SilverStripe-v2.4.5.tar.gz -md5sum = de6ab0146c27bbc72287670e0697e2ba - -[instance-recipe] -egg = slapos.cookbook -module = lamp.simple - -[template] -# Default template for the instance. -recipe = slapos.recipe.template -url = ${:_profile_base_location_}/instance.cfg -#md5sum = Student shall put md5 of instance.cfg here -output = ${buildout:directory}/template.cfg -mode = 0644 - -[instance-recipe-egg] -recipe = zc.recipe.egg -eggs = ${instance-recipe:egg} - -[versions] -# Use SlapOS patched zc.buildout -zc.buildout = 1.5.3-dev-SlapOS-010 - -Jinja2 = 2.6 -MySQL-python = 1.2.3 -Werkzeug = 0.8.1 -apache-libcloud = 0.5.2 -buildout-versions = 1.7 -hexagonit.recipe.cmmi = 1.5.0 -meld3 = 0.6.7 -plone.recipe.command = 1.1 -slapos.cookbook = 0.34 -slapos.recipe.build = 0.7 -slapos.recipe.download = 1.0.dev-r4053 -slapos.recipe.template = 2.2 -slapos.toolbox = 0.10 - -# Required by: -# slapos.core==0.18 -# slapos.toolbox==0.10 -Flask = 0.8 - -# Required by: -# slapos.cookbook==0.34 -PyXML = 0.8.4 - -# Required by: -# hexagonit.recipe.cmmi==1.5.0 -hexagonit.recipe.download = 1.5.0 - -# Required by: -# slapos.cookbook==0.34 -# slapos.core==0.18 -# slapos.toolbox==0.10 -# xml-marshaller==0.9.7 -lxml = 2.3.1 - -# Required by: -# slapos.cookbook==0.34 -netaddr = 0.7.6 - -# Required by: -# slapos.core==0.18 -netifaces = 0.5 - -# Required by: -# slapos.toolbox==0.10 -paramiko = 1.7.7.1 - -# Required by: -# slapos.toolbox==0.10 -psutil = 0.3.0 - -# Required by: -# slapos.cookbook==0.34 -# slapos.core==0.18 -# slapos.toolbox==0.10 -setuptools = 0.6c12dev-r88846 - -# Required by: -# slapos.cookbook==0.34 -# slapos.toolbox==0.10 -slapos.core = 0.18 - -# Required by: -# slapos.core==0.18 -supervisor = 3.0a10 - -# Required by: -# slapos.cookbook==0.34 -# slapos.toolbox==0.10 -xml-marshaller = 0.9.7 - -# Required by: -# slapos.cookbook==0.34 -zc.recipe.egg = 1.3.2 - -# Required by: -# slapos.core==0.18 -zope.interface = 3.8.0 - -[downloadcache-workaround] -# workaround irritating problem of hexagonit.recipe.cmmi which automatically -# creates download cache, which in turn switches builout to "semi-offline" mode -recipe = plone.recipe.command -# in hexagonit.recipe.cmmi if there is no ${buildout:download-cache} set it resolves -# to ${buildout:directory}/downloads but this variable is available late, that's -# why it is hardcoded only for required case -download-cache = ${buildout:directory}/downloads -command = [ -d ${:download-cache} ] && rm -fr ${:download-cache}/* || exit 0 -update-command = ${:command} -stop-on-error = True - diff --git a/software/apache-frontend/instance.cfg b/software/apache-frontend/instance.cfg deleted file mode 100644 index fecc536dd..000000000 --- a/software/apache-frontend/instance.cfg +++ /dev/null @@ -1,18 +0,0 @@ -[buildout] -parts = - instance - -eggs-directory = ${buildout:eggs-directory} -develop-eggs-directory = ${buildout:develop-eggs-directory} - -[instance] -recipe = ${instance-recipe:egg}:${instance-recipe:module} -httpd_binary = ${apache:location}/bin/httpd -logrotate_binary = ${logrotate:location}/usr/sbin/logrotate -openssl_binary = ${openssl:location}/bin/openssl -dcrond_binary = ${dcron:location}/sbin/crond -varnishd_binary = ${varnish-2.1:location}/sbin/varnishd -stunnel_binary = ${stunnel:location}/bin/stunnel -rdiff_backup_binary = ${buildout:bin-directory}/rdiff-backup -gcc_binary = ${gcc-java-minimal:location}/bin/gcc -binutils_directory = ${binutils:location}/bin/ diff --git a/software/apache-frontend/software.cfg b/software/apache-frontend/software.cfg deleted file mode 100644 index 90df60953..000000000 --- a/software/apache-frontend/software.cfg +++ /dev/null @@ -1,141 +0,0 @@ -[buildout] -versions = versions - -extends = - ../../component/binutils/buildout.cfg - ../../component/gcc/buildout.cfg - ../../component/lxml-python/buildout.cfg - ../../component/apache/buildout.cfg - ../../component/stunnel/buildout.cfg - ../../component/varnish/buildout.cfg - ../../component/dcron/buildout.cfg - ../../component/logrotate/buildout.cfg - ../../component/rdiff-backup/buildout.cfg - ../../stack/slapos.cfg - -parts = - template - binutils - gcc-java-minimal - apache - apache-antiloris - - stunnel - varnish-2.1 - - dcron - logrotate - rdiff-backup - -# Buildoutish - eggs - instance-recipe-egg - -[instance-recipe] -# Note: In case if specific instantiation recipe is used this is the place to -# put its name -egg = slapos.cookbook -module = apache.frontend - -[instance-recipe-egg] -recipe = zc.recipe.egg -eggs = ${instance-recipe:egg} - -[eggs] -recipe = zc.recipe.egg -eggs = - ${lxml-python:egg} - -[template] -# Default template for apache instance. -recipe = slapos.recipe.template -url = ${:_profile_base_location_}/instance.cfg -md5sum = 17180caef7d1c477fbb037d28b705e8b -output = ${buildout:directory}/template.cfg -mode = 0644 - -[versions] -# Use SlapOS patched zc.buildout -zc.buildout = 1.6.0-dev-SlapOS-004 -Jinja2 = 2.6 -Werkzeug = 0.8.3 -buildout-versions = 1.7 -hexagonit.recipe.cmmi = 1.5.0 -meld3 = 0.6.8 -rdiff-backup = 1.0.5 -slapos.recipe.template = 2.2 -slapos.cookbook = 0.40.1 - -# Required by: -# slapos.core==0.23 -Flask = 0.8 - -# Required by: -# slapos.cookbook==0.40.1 -PyXML = 0.8.4 - -# Required by: -# hexagonit.recipe.cmmi==1.5.0 -hexagonit.recipe.download = 1.5.0 - -# Required by: -# slapos.cookbook==0.40.1 -inotifyx = 0.2.0 - -# Required by: -# slapos.cookbook==0.40.1 -# slapos.core==0.23 -# xml-marshaller==0.9.7 -lxml = 2.3.3 - -# Required by: -# slapos.cookbook==0.40.1 -netaddr = 0.7.6 - -# Required by: -# slapos.core==0.23 -netifaces = 0.8 - -# Required by: -# slapos.cookbook==0.40.1 -# slapos.core==0.23 -# zc.buildout==1.6.0-dev-SlapOS-004 -# zc.recipe.egg==1.3.2 -setuptools = 0.6c12dev-r88846 - -# Required by: -# slapos.cookbook==0.40.1 -slapos.core = 0.23 - -# Required by: -# slapos.core==0.23 -supervisor = 3.0a12 - -# Required by: -# slapos.cookbook==0.40.1 -xml-marshaller = 0.9.7 - -# Required by: -# slapos.cookbook==0.40.1 -zc.recipe.egg = 1.3.2 - -# Required by: -# slapos.core==0.23 -zope.interface = 3.8.0 - -[networkcache] -# Cedric de Saint Martin signature certificate -signature-certificate-list = - -----BEGIN CERTIFICATE----- - MIIB9jCCAV+gAwIBAgIJAO4V/jiMoICoMA0GCSqGSIb3DQEBBQUAMBMxETAPBgNV - BAMMCENPTVAtMjMyMCAXDTEyMDIxNjExMTAyM1oYDzIxMTIwMTIzMTExMDIzWjAT - MREwDwYDVQQDDAhDT01QLTIzMjCBnzANBgkqhkiG9w0BAQEFAAOBjQAwgYkCgYEA - wi/3Z8W9pUiegUXIk/AiFDQ0UJ4JFAwjqr+HSRUirlUsHHT+8DzH/hfcTDX1I5BB - D1ADk+ydXjMm3OZrQcXjn29OUfM5C+g+oqeMnYQImN0DDQIOcUyr7AJc4xhvuXQ1 - P2pJ5NOd3tbd0kexETa1LVhR6EgBC25LyRBRae76qosCAwEAAaNQME4wHQYDVR0O - BBYEFMDmW9aFy1sKTfCpcRkYnP6zUd1cMB8GA1UdIwQYMBaAFMDmW9aFy1sKTfCp - cRkYnP6zUd1cMAwGA1UdEwQFMAMBAf8wDQYJKoZIhvcNAQEFBQADgYEAskbFizHr - b6d3iIyN+wffxz/V9epbKIZVEGJd/6LrTdLiUfJPec7FaxVCWNyKBlCpINBM7cEV - Gn9t8mdVQflNqOlAMkOlUv1ZugCt9rXYQOV7rrEYJBWirn43BOMn9Flp2nibblby - If1a2ZoqHRxoNo2yTmm7TSYRORWVS+vvfjY= - -----END CERTIFICATE----- diff --git a/software/b2evolution/instance.cfg b/software/b2evolution/instance.cfg deleted file mode 100644 index 9495bde7e..000000000 --- a/software/b2evolution/instance.cfg +++ /dev/null @@ -1,15 +0,0 @@ -[buildout] -eggs-directory = ${buildout:eggs-directory} -develop-eggs-directory = ${buildout:develop-eggs-directory} - -parts = instance - -[instance] -recipe = ${instance-recipe:egg}:${instance-recipe:module} -source = ${application:location} - -httpd_binary = ${apache:location}/bin/httpd -mysql_binary = ${mariadb:location}/bin/mysql -mysql_install_binary = ${mariadb:location}/bin/mysql_install_db -mysql_upgrade_binary = ${mariadb:location}/bin/mysql_upgrade -mysqld_binary = ${mariadb:location}/libexec/mysqld diff --git a/software/b2evolution/software.cfg b/software/b2evolution/software.cfg deleted file mode 100644 index eba431358..000000000 --- a/software/b2evolution/software.cfg +++ /dev/null @@ -1,131 +0,0 @@ -[buildout] -versions = versions - -parts = - template - apache-php - mariadb - eggs - instance-recipe-egg - downloadcache-workaround - -extends = - ../../stack/lamp.cfg - ../../stack/shacache-client.cfg - -[application] -recipe = slapos.recipe.build:download-unpacked -url = http://freefr.dl.sourceforge.net/project/evocms/b2evolution/b2evo%204.1.1-stable/b2evolution-4.1.1-stable-2011-10-03.zip -md5sum = 63c771f43f0c40ff822fe80234be42e1 -extract-directory = blogs - -[instance-recipe] -egg = slapos.cookbook -module = lamp.simple - -[template] -# Default template for the instance. -recipe = slapos.recipe.template -url = ${:_profile_base_location_}/instance.cfg -#md5sum = Student shall put md5 of instance.cfg here -output = ${buildout:directory}/template.cfg -mode = 0644 - -[instance-recipe-egg] -recipe = zc.recipe.egg -eggs = ${instance-recipe:egg} - -[versions] -# Use SlapOS patched zc.buildout -zc.buildout = 1.5.3-dev-SlapOS-010 - -Jinja2 = 2.6 -MySQL-python = 1.2.3 -Werkzeug = 0.8.1 -apache-libcloud = 0.5.2 -buildout-versions = 1.7 -hexagonit.recipe.cmmi = 1.5.0 -meld3 = 0.6.7 -plone.recipe.command = 1.1 -slapos.cookbook = 0.34 -slapos.recipe.build = 0.7 -slapos.recipe.download = 1.0.dev-r4053 -slapos.recipe.template = 2.2 -slapos.toolbox = 0.10 - -# Required by: -# slapos.core==0.18 -# slapos.toolbox==0.10 -Flask = 0.8 - -# Required by: -# slapos.cookbook==0.34 -PyXML = 0.8.4 - -# Required by: -# hexagonit.recipe.cmmi==1.5.0 -hexagonit.recipe.download = 1.5.0 - -# Required by: -# slapos.cookbook==0.34 -# slapos.core==0.18 -# slapos.toolbox==0.10 -# xml-marshaller==0.9.7 -lxml = 2.3.1 - -# Required by: -# slapos.cookbook==0.34 -netaddr = 0.7.6 - -# Required by: -# slapos.core==0.18 -netifaces = 0.6 - -# Required by: -# slapos.toolbox==0.10 -paramiko = 1.7.7.1 - -# Required by: -# slapos.toolbox==0.10 -psutil = 0.3.0 - -# Required by: -# slapos.cookbook==0.34 -# slapos.core==0.18 -# slapos.toolbox==0.10 -setuptools = 0.6c12dev-r88846 - -# Required by: -# slapos.cookbook==0.34 -# slapos.toolbox==0.10 -slapos.core = 0.18 - -# Required by: -# slapos.core==0.18 -supervisor = 3.0a10 - -# Required by: -# slapos.cookbook==0.34 -# slapos.toolbox==0.10 -xml-marshaller = 0.9.7 - -# Required by: -# slapos.cookbook==0.34 -zc.recipe.egg = 1.3.2 - -# Required by: -# slapos.core==0.18 -zope.interface = 3.8.0 - -[downloadcache-workaround] -# workaround irritating problem of hexagonit.recipe.cmmi which automatically -# creates download cache, which in turn switches builout to "semi-offline" mode -recipe = plone.recipe.command -# in hexagonit.recipe.cmmi if there is no ${buildout:download-cache} set it resolves -# to ${buildout:directory}/downloads but this variable is available late, that's -# why it is hardcoded only for required case -download-cache = ${buildout:directory}/downloads -command = [ -d ${:download-cache} ] && rm -fr ${:download-cache}/* || exit 0 -update-command = ${:command} -stop-on-error = True - diff --git a/software/cloudooo/instance.cfg b/software/cloudooo/instance.cfg index 4bdbbee62..3de43bc3a 100755 --- a/software/cloudooo/instance.cfg +++ b/software/cloudooo/instance.cfg @@ -28,4 +28,4 @@ link_binary_list = ${pdftk:location}/bin/pdftk environment = - LD_LIBRARY_PATH = ${file:location}/lib:${fontconfig:location}/lib:${freetype:location}/lib:${libICE:location}/lib:${libSM:location}/lib:${libX11:location}/lib:${libXau:location}/lib:${libXdmcp:location}/lib:${libXext:location}/lib:${libXinerama:location}/lib:${libxcb:location}/lib:${zlib:location}/lib + LD_LIBRARY_PATH = ${file:location}/lib:${zlib:location}/lib:${freetype:location}/lib:${libXext:location}/lib:${libXau:location}/lib:${libX11:location}/lib:${libXdmcp:location}/lib:${libxcb:location}/lib diff --git a/software/cmsmadesimple/instance.cfg b/software/cmsmadesimple/instance.cfg deleted file mode 100644 index 9495bde7e..000000000 --- a/software/cmsmadesimple/instance.cfg +++ /dev/null @@ -1,15 +0,0 @@ -[buildout] -eggs-directory = ${buildout:eggs-directory} -develop-eggs-directory = ${buildout:develop-eggs-directory} - -parts = instance - -[instance] -recipe = ${instance-recipe:egg}:${instance-recipe:module} -source = ${application:location} - -httpd_binary = ${apache:location}/bin/httpd -mysql_binary = ${mariadb:location}/bin/mysql -mysql_install_binary = ${mariadb:location}/bin/mysql_install_db -mysql_upgrade_binary = ${mariadb:location}/bin/mysql_upgrade -mysqld_binary = ${mariadb:location}/libexec/mysqld diff --git a/software/cmsmadesimple/software.cfg b/software/cmsmadesimple/software.cfg deleted file mode 100644 index 58fa98a12..000000000 --- a/software/cmsmadesimple/software.cfg +++ /dev/null @@ -1,129 +0,0 @@ -[buildout] -versions = versions - -parts = - template - apache-php - mariadb - eggs - instance-recipe-egg - downloadcache-workaround - -extends = - ../../stack/lamp.cfg - ../../stack/shacache-client.cfg - -[application] -recipe = slapos.recipe.build:download-unpacked -url = http://s3.amazonaws.com/cmsms/downloads/7908/cmsmadesimple-1.9.4.3-english.tar.gz -md5sum = b018842f195a20e50359b18c585f4d64 - -[instance-recipe] -egg = slapos.cookbook -module = lamp.simple - -[template] -# Default template for the instance. -recipe = slapos.recipe.template -url = ${:_profile_base_location_}/instance.cfg -#md5sum = Student shall put md5 of instance.cfg here -output = ${buildout:directory}/template.cfg -mode = 0644 - -[instance-recipe-egg] -recipe = zc.recipe.egg -eggs = ${instance-recipe:egg} - -[versions] -# Use SlapOS patched zc.buildout -zc.buildout = 1.5.3-dev-SlapOS-010 - -Jinja2 = 2.6 -MySQL-python = 1.2.3 -Werkzeug = 0.8.1 -apache-libcloud = 0.5.2 -buildout-versions = 1.7 -hexagonit.recipe.cmmi = 1.5.0 -meld3 = 0.6.7 -plone.recipe.command = 1.1 -slapos.cookbook = 0.34 -slapos.recipe.build = 0.7 -slapos.recipe.download = 1.0.dev-r4053 -slapos.recipe.template = 2.2 -slapos.toolbox = 0.10 - -# Required by: -# slapos.core==0.18 -# slapos.toolbox==0.10 -Flask = 0.8 - -# Required by: -# slapos.cookbook==0.34 -PyXML = 0.8.4 - -# Required by: -# hexagonit.recipe.cmmi==1.5.0 -hexagonit.recipe.download = 1.5.0 - -# Required by: -# slapos.cookbook==0.34 -# slapos.core==0.18 -# slapos.toolbox==0.10 -# xml-marshaller==0.9.7 -lxml = 2.3.1 - -# Required by: -# slapos.cookbook==0.34 -netaddr = 0.7.6 - -# Required by: -# slapos.core==0.18 -netifaces = 0.5 - -# Required by: -# slapos.toolbox==0.10 -paramiko = 1.7.7.1 - -# Required by: -# slapos.toolbox==0.10 -psutil = 0.3.0 - -# Required by: -# slapos.cookbook==0.34 -# slapos.core==0.18 -# slapos.toolbox==0.10 -setuptools = 0.6c12dev-r88846 - -# Required by: -# slapos.cookbook==0.34 -# slapos.toolbox==0.10 -slapos.core = 0.18 - -# Required by: -# slapos.core==0.18 -supervisor = 3.0a10 - -# Required by: -# slapos.cookbook==0.34 -# slapos.toolbox==0.10 -xml-marshaller = 0.9.7 - -# Required by: -# slapos.cookbook==0.34 -zc.recipe.egg = 1.3.2 - -# Required by: -# slapos.core==0.18 -zope.interface = 3.8.0 - -[downloadcache-workaround] -# workaround irritating problem of hexagonit.recipe.cmmi which automatically -# creates download cache, which in turn switches builout to "semi-offline" mode -recipe = plone.recipe.command -# in hexagonit.recipe.cmmi if there is no ${buildout:download-cache} set it resolves -# to ${buildout:directory}/downloads but this variable is available late, that's -# why it is hardcoded only for required case -download-cache = ${buildout:directory}/downloads -command = [ -d ${:download-cache} ] && rm -fr ${:download-cache}/* || exit 0 -update-command = ${:command} -stop-on-error = True \ No newline at end of file diff --git a/software/coppermine/software.cfg b/software/coppermine/software.cfg deleted file mode 100644 index 7a1293bba..000000000 --- a/software/coppermine/software.cfg +++ /dev/null @@ -1,140 +0,0 @@ -[buildout] -versions = versions - -parts = - template - apache-php - mariadb - eggs - instance-recipe-egg - downloadcache-workaround - -extends = - ../../stack/lamp.cfg - ../../stack/shacache-client.cfg - -[application] -recipe = slapos.recipe.build:download-unpacked -url = http://freefr.dl.sourceforge.net/project/coppermine/Coppermine/1.5.x/cpg1.5.16.zip -md5sum = 76402aea7821aaaf67c571869373186e - -[application-template] -recipe = slapos.recipe.download -url = ${:_profile_base_location_}/template/coppermine.inc.php.in -md5sum = c97345b7f3c060b825e1925e2be3c2c1 -filename = template.in -mode = 0644 -location = ${buildout:parts-directory}/${:_buildout_section_name_} - -[application-configuration] -location = config.inc.php - -[instance-recipe] -egg = slapos.cookbook -module = lamp.simple - -[template] -# Default template for the instance. -recipe = slapos.recipe.template -url = ${:_profile_base_location_}/instance.cfg -#md5sum = Student shall put md5 of instance.cfg here -output = ${buildout:directory}/template.cfg -mode = 0644 - -[instance-recipe-egg] -recipe = zc.recipe.egg -eggs = ${instance-recipe:egg} - -[versions] -# Use SlapOS patched zc.buildout -zc.buildout = 1.5.3-dev-SlapOS-010 - -Jinja2 = 2.6 -MySQL-python = 1.2.3 -Werkzeug = 0.8.1 -apache-libcloud = 0.5.2 -buildout-versions = 1.7 -hexagonit.recipe.cmmi = 1.5.0 -meld3 = 0.6.7 -plone.recipe.command = 1.1 -slapos.cookbook = 0.34 -slapos.recipe.build = 0.7 -slapos.recipe.download = 1.0.dev-r4053 -slapos.recipe.template = 2.2 -slapos.toolbox = 0.10 - -# Required by: -# slapos.core==0.18 -# slapos.toolbox==0.10 -Flask = 0.8 - -# Required by: -# slapos.cookbook==0.34 -PyXML = 0.8.4 - -# Required by: -# hexagonit.recipe.cmmi==1.5.0 -hexagonit.recipe.download = 1.5.0 - -# Required by: -# slapos.cookbook==0.34 -# slapos.core==0.18 -# slapos.toolbox==0.10 -# xml-marshaller==0.9.7 -lxml = 2.3.1 - -# Required by: -# slapos.cookbook==0.34 -netaddr = 0.7.6 - -# Required by: -# slapos.core==0.18 -netifaces = 0.5 - -# Required by: -# slapos.toolbox==0.10 -paramiko = 1.7.7.1 - -# Required by: -# slapos.toolbox==0.10 -psutil = 0.3.0 - -# Required by: -# slapos.cookbook==0.34 -# slapos.core==0.18 -# slapos.toolbox==0.10 -setuptools = 0.6c12dev-r88846 - -# Required by: -# slapos.cookbook==0.34 -# slapos.toolbox==0.10 -slapos.core = 0.18 - -# Required by: -# slapos.core==0.18 -supervisor = 3.0a10 - -# Required by: -# slapos.cookbook==0.34 -# slapos.toolbox==0.10 -xml-marshaller = 0.9.7 - -# Required by: -# slapos.cookbook==0.34 -zc.recipe.egg = 1.3.2 - -# Required by: -# slapos.core==0.18 -zope.interface = 3.8.0 - -[downloadcache-workaround] -# workaround irritating problem of hexagonit.recipe.cmmi which automatically -# creates download cache, which in turn switches builout to "semi-offline" mode -recipe = plone.recipe.command -# in hexagonit.recipe.cmmi if there is no ${buildout:download-cache} set it resolves -# to ${buildout:directory}/downloads but this variable is available late, that's -# why it is hardcoded only for required case -download-cache = ${buildout:directory}/downloads -command = [ -d ${:download-cache} ] && rm -fr ${:download-cache}/* || exit 0 -update-command = ${:command} -stop-on-error = True diff --git a/software/coppermine/template/coppermine.inc.php.in b/software/coppermine/template/coppermine.inc.php.in deleted file mode 100644 index 0c39feef3..000000000 --- a/software/coppermine/template/coppermine.inc.php.in +++ /dev/null @@ -1,25 +0,0 @@ -<?php -$cfg['blowfish_secret'] = ''; /* YOU MUST FILL IN THIS FOR COOKIE AUTH! */ -$i = 0; -$i++; -/* Server parameters */ -$cfg['Servers'][$i]['host'] = 'Put here mysql host template key'; -$cfg['Servers'][$i]['port'] = 'Put here mysql port template key'; -/* Authentication type */ -$cfg['Servers'][$i]['auth_type'] = 'cookie'; -$cfg['Servers'][$i]['user'] = ''; -$cfg['Servers'][$i]['connect_type'] = 'tcp'; -$cfg['Servers'][$i]['compress'] = false; -/* Select mysqli if your server has it */ -$cfg['Servers'][$i]['extension'] = 'mysql'; -$cfg['Servers'][$i]['AllowNoPassword'] = false; - -/* rajk - for blobstreaming */ -$cfg['Servers'][$i]['bs_garbage_threshold'] = 50; -$cfg['Servers'][$i]['bs_repository_threshold'] = '32M'; -$cfg['Servers'][$i]['bs_temp_blob_timeout'] = 600; -$cfg['Servers'][$i]['bs_temp_log_threshold'] = '32M'; -$cfg['UploadDir'] = ''; -$cfg['SaveDir'] = ''; - -?> diff --git a/software/davstorage/instance-davstorage.cfg b/software/davstorage/instance-davstorage.cfg deleted file mode 100644 index dbb2e9a90..000000000 --- a/software/davstorage/instance-davstorage.cfg +++ /dev/null @@ -1,151 +0,0 @@ -[buildout] -parts = - davstorage - url - certificate-authority - ca-davstorage - cron - cron-entry-logrotate - logrotate - logrotate-entry-davstorage - -eggs-directory = ${buildout:eggs-directory} -develop-eggs-directory = ${buildout:develop-eggs-directory} -offline = true - -[url] -recipe = slapos.cookbook:publishurl -scheme = webdavs -user = $${davstorage:user} -port = $${davstorage:port} -host = $${davstorage:ip} -password = $${davstorage:password} - -[davstorage] -recipe = slapos.cookbook:davstorage -user = user -port = 8080 -ip = $${slap-network-information:global-ipv6} - -# Path -wrapper = $${rootdirectory:bin}/davstorage -error-log = $${directory:davstorage-log}/error.log -access-log = $${directory:davstorage-log}/access.log -pid-file = $${basedirectory:run}/davstorage.pid -lock-file = $${basedirectory:run}/davstorage.lock -davdb-lock = $${basedirectory:run}/davdb.lock -key-file = $${ca-davstorage:key-file} -cert-file = $${ca-davstorage:cert-file} -conf-file = $${directory:davstorage-conf}/davstorage.conf -htdocs = $${directory:htdocs} -root = $${buildout:directory} -email-address = admin+davstorage@vifib.net -htpasswd-file = $${directory:davstorage-conf}/davstorage.htpasswd -promise = $${basedirectory:promises}/davstorage - -# Binaries -apache-binary = ${apache:location}/bin/httpd -apache-modules-dir = ${apache:location}/modules/ -apache-mime-file = ${apache:location}/conf/mime.types -apache-htpasswd = ${apache:location}/bin/htpasswd - -[certificate-authority] -recipe = slapos.cookbook:certificate_authority -openssl-binary = ${openssl:location}/bin/openssl -ca-dir = $${directory:ca-dir} -requests-directory = $${cadirectory:requests} -wrapper = $${basedirectory:services}/certificate_authority -ca-private = $${cadirectory:private} -ca-certs = $${cadirectory:certs} -ca-newcerts = $${cadirectory:newcerts} -ca-crl = $${cadirectory:crl} - -[cron] -recipe = slapos.cookbook:cron -dcrond-binary = ${dcron:location}/sbin/crond -cron-entries = $${directory:cron-entries} -crontabs = $${directory:crontabs} -cronstamps = $${directory:cronstamps} -catcher = $${cron-simplelogger:binary} -binary = $${basedirectory:services}/crond - -[logrotate] -recipe = slapos.cookbook:logrotate -# Binaries -logrotate-binary = ${logrotate:location}/usr/sbin/logrotate -gzip-binary = ${gzip:location}/bin/gzip -gunzip-binary = ${gzip:location}/bin/gunzip -# Directories -wrapper = $${rootdirectory:bin}/logrotate -conf = $${rootdirectory:etc}/logrotate.conf -logrotate-entries = $${directory:logrotate-entries} -backup = $${directory:logrotate-backup} -state-file = $${rootdirectory:srv}/logrotate.status - -[cron-entry-logrotate] -<= cron -recipe = slapos.cookbook:cron.d -name = logrotate -frequency = 0 0 * * * -command = $${logrotate:wrapper} - -[cron-simplelogger] -recipe = slapos.cookbook:simplelogger -binary = $${rootdirectory:bin}/cron_simplelogger -output = $${directory:cronoutput} - - -[logrotate-entry-davstorage] -<= logrotate -recipe = slapos.cookbook:logrotate.d -name = davstorage -log = $${davstorage:error-log} $${davstorage:access-log} -frequency = daily -rotate-num = 30 -sharedscripts = true -notifempty = true -create = true - -[cadirectory] -recipe = slapos.cookbook:mkdirectory -requests = $${directory:ca-dir}/requests/ -private = $${directory:ca-dir}/private/ -certs = $${directory:ca-dir}/certs/ -newcerts = $${directory:ca-dir}/newcerts/ -crl = $${directory:ca-dir}/crl/ - -[ca-davstorage] -<= certificate-authority -recipe = slapos.cookbook:certificate_authority.request -key-file = $${directory:davstorage-conf}/davstorage.key -cert-file = $${directory:davstorage-conf}/davstorage.crt -executable = $${davstorage:wrapper} -wrapper = $${basedirectory:services}/davstorage - -[rootdirectory] -recipe = slapos.cookbook:mkdirectory -etc = $${buildout:directory}/etc/ -var = $${buildout:directory}/var/ -srv = $${buildout:directory}/srv/ -bin = $${buildout:directory}/bin/ - -[basedirectory] -recipe = slapos.cookbook:mkdirectory -log = $${rootdirectory:var}/log/ -services = $${rootdirectory:etc}/run/ -run = $${rootdirectory:var}/run/ -backup = $${rootdirectory:srv}/backup/ -promises = $${rootdirectory:etc}/promise/ - -[directory] -recipe = slapos.cookbook:mkdirectory -htdocs = $${rootdirectory:srv}/www/ -davstorage-log = $${basedirectory:log}/davstorage/ -logrotate-backup = $${basedirectory:backup}/logrotate/ -logrotate-entries = $${rootdirectory:etc}/logrotate.d/ -davstorage-conf = $${rootdirectory:etc}/davstorage/ -ca-dir = $${rootdirectory:srv}/ssl/ -cron-entries = $${rootdirectory:etc}/cron.d/ -crontabs = $${rootdirectory:etc}/crontabs/ -cronstamps = $${rootdirectory:etc}/cronstamps/ -cronoutput = $${basedirectory:log}/cron/ diff --git a/software/davstorage/instance.cfg b/software/davstorage/instance.cfg deleted file mode 100644 index e77fc85a1..000000000 --- a/software/davstorage/instance.cfg +++ /dev/null @@ -1,12 +0,0 @@ -[buildout] - -parts = - switch_softwaretype - -eggs-directory = ${buildout:eggs-directory} -develop-eggs-directory = ${buildout:develop-eggs-directory} -offline = true - -[switch_softwaretype] -recipe = slapos.cookbook:softwaretype -default = ${instance-davstorage:output} diff --git a/software/davstorage/software.cfg b/software/davstorage/software.cfg deleted file mode 100644 index 93a3ef8a3..000000000 --- a/software/davstorage/software.cfg +++ /dev/null @@ -1,135 +0,0 @@ -[buildout] - -find-links += - http://www.nexedi.org/static/packages/source/slapos.buildout/ - -versions = versions - -extends = - ../../component/apache/buildout.cfg - ../../component/dcron/buildout.cfg - ../../component/logrotate/buildout.cfg - ../../stack/shacache-client.cfg - ../../component/lxml-python/buildout.cfg - ../../component/python-2.7/buildout.cfg - ../../component/gzip/buildout.cfg - -# Use only quite well working sites. -allow-hosts = - *.nexedi.org - *.python.org - *.sourceforge.net - dist.repoze.org - effbot.org - github.com - peak.telecommunity.com - psutil.googlecode.com - www.dabeaz.com - alastairs-place.net - - -parts = - template - lxml-python - apache - logrotate - dcron - eggs - gzip - instance-recipe-egg - -unzip= true - -[eggs] -recipe = zc.recipe.egg -eggs = - -[instance-recipe] -egg = slapos.cookbook -module = davstorage - -[instance-recipe-egg] -recipe = zc.recipe.egg -python = python2.7 -eggs = ${instance-recipe:egg} - -[template] -# Default template for the instance. -recipe = slapos.recipe.template -url = ${:_profile_base_location_}/instance.cfg -md5sum = bed788dee6daf05349c4577e7a7f1299 -output = ${buildout:directory}/template.cfg -mode = 0644 - -[instance-davstorage] -recipe = slapos.recipe.template -url = ${:_profile_base_location_}/instance-davstorage.cfg -md5sum = 49c8e049a78e233d3a553e64c8914592 -output = ${buildout:directory}/template-davstorage.cfg -mode = 0644 - -[lxml-python] -python = python2.7 - -[versions] -zc.buildout = 1.6.0-dev-SlapOS-002 -Jinja2 = 2.6 -Werkzeug = 0.7.1 -buildout-versions = 1.6 -hexagonit.recipe.cmmi = 1.5.0 -hexagonit.recipe.download = 1.5.0 -meld3 = 0.6.7 -slapos.cookbook = 0.26 - -# Required by: -# slapos.core==0.14 -Flask = 0.7.2 - -# Required by: -# slapos.cookbook==0.24 -PyXML = 0.8.4 - -# Required by: -# slapos.recipe.template==1.1 -collective.recipe.template = 1.9 - -# Required by: -# slapos.cookbook==0.24 -# slapos.core==0.14 -# xml-marshaller==0.9.7 -lxml = 2.3 - -# Required by: -# slapos.cookbook==0.24 -netaddr = 0.7.6 - -# Required by: -# slapos.core==0.14 -#netifaces = 0.4 - -# Required by: -# slapos.cookbook==0.24 -# slapos.core==0.14 -# zc.buildout==1.5.3-dev-SlapOS-009 -# zc.recipe.egg==1.3.2 -setuptools = 0.6c12dev-r88846 - -# Required by: -# slapos.cookbook==0.24 -slapos.core = 0.14 - -# Required by: -# slapos.core==0.14 -supervisor = 3.0a10 - -# Required by: -# slapos.cookbook==0.24 -xml-marshaller = 0.9.7 - -# Required by: -# slapos.cookbook==0.24 -zc.recipe.egg = 1.3.2 - -# Required by: -# slapos.core==0.14 -zope.interface = 3.7.0 diff --git a/software/dotclear/instance.cfg b/software/dotclear/instance.cfg deleted file mode 100644 index fffebea8f..000000000 --- a/software/dotclear/instance.cfg +++ /dev/null @@ -1,17 +0,0 @@ -[buildout] -eggs-directory = ${buildout:eggs-directory} -develop-eggs-directory = ${buildout:develop-eggs-directory} - -parts = instance - -[instance] -recipe = ${instance-recipe:egg}:${instance-recipe:module} -source = ${application:location} -template = ${application-template:location}/${application-template:filename} -configuration = ${application-configuration:location} - -httpd_binary = ${apache:location}/bin/httpd -mysql_binary = ${mariadb:location}/bin/mysql -mysql_install_binary = ${mariadb:location}/bin/mysql_install_db -mysql_upgrade_binary = ${mariadb:location}/bin/mysql_upgrade -mysqld_binary = ${mariadb:location}/libexec/mysqld diff --git a/software/dotclear/software.cfg b/software/dotclear/software.cfg deleted file mode 100644 index d8cfcc20f..000000000 --- a/software/dotclear/software.cfg +++ /dev/null @@ -1,141 +0,0 @@ -[buildout] -versions = versions - -parts = - template - apache-php - mariadb - eggs - instance-recipe-egg - downloadcache-workaround - -extends = - ../../stack/lamp.cfg - ../../stack/shacache-client.cfg - -[application] -recipe = slapos.recipe.build:download-unpacked -url = http://download.dotclear.net/latest-2.0.tar.gz -md5sum = 98263b4734f93b7c54d3ab436bf344e3 - -[application-template] -recipe = slapos.recipe.download -url = ${:_profile_base_location_}/template/dotclear.inc.php.in -md5sum = c97345b7f3c060b825e1925e2be3c2c1 -filename = template.in -mode = 0644 -location = ${buildout:parts-directory}/${:_buildout_section_name_} - -[application-configuration] -location = config.inc.php - -[instance-recipe] -egg = slapos.cookbook -module = lamp.simple - -[template] -# Default template for the instance. -recipe = slapos.recipe.template -url = ${:_profile_base_location_}/instance.cfg -#md5sum = Student shall put md5 of instance.cfg here -output = ${buildout:directory}/template.cfg -mode = 0644 - -[instance-recipe-egg] -recipe = zc.recipe.egg -eggs = ${instance-recipe:egg} - -[versions] -# Use SlapOS patched zc.buildout -zc.buildout = 1.5.3-dev-SlapOS-010 - -Jinja2 = 2.6 -MySQL-python = 1.2.3 -Werkzeug = 0.8.1 -apache-libcloud = 0.5.2 -buildout-versions = 1.7 -hexagonit.recipe.cmmi = 1.5.0 -meld3 = 0.6.7 -plone.recipe.command = 1.1 -slapos.cookbook = 0.34 -slapos.recipe.build = 0.7 -slapos.recipe.download = 1.0.dev-r4053 -slapos.recipe.template = 2.2 -slapos.toolbox = 0.10 - -# Required by: -# slapos.core==0.18 -# slapos.toolbox==0.10 -Flask = 0.8 - -# Required by: -# slapos.cookbook==0.34 -PyXML = 0.8.4 - -# Required by: -# hexagonit.recipe.cmmi==1.5.0 -hexagonit.recipe.download = 1.5.0 - -# Required by: -# slapos.cookbook==0.34 -# slapos.core==0.18 -# slapos.toolbox==0.10 -# xml-marshaller==0.9.7 -lxml = 2.3.1 - -# Required by: -# slapos.cookbook==0.34 -netaddr = 0.7.6 - -# Required by: -# slapos.core==0.18 -netifaces = 0.5 - -# Required by: -# slapos.toolbox==0.10 -paramiko = 1.7.7.1 - -# Required by: -# slapos.toolbox==0.10 -psutil = 0.3.0 - -# Required by: -# slapos.cookbook==0.34 -# slapos.core==0.18 -# slapos.toolbox==0.10 -setuptools = 0.6c12dev-r88846 - -# Required by: -# slapos.cookbook==0.34 -# slapos.toolbox==0.10 -slapos.core = 0.18 - -# Required by: -# slapos.core==0.18 -supervisor = 3.0a10 - -# Required by: -# slapos.cookbook==0.34 -# slapos.toolbox==0.10 -xml-marshaller = 0.9.7 - -# Required by: -# slapos.cookbook==0.34 -zc.recipe.egg = 1.3.2 - -# Required by: -# slapos.core==0.18 -zope.interface = 3.8.0 - -[downloadcache-workaround] -# workaround irritating problem of hexagonit.recipe.cmmi which automatically -# creates download cache, which in turn switches builout to "semi-offline" mode -recipe = plone.recipe.command -# in hexagonit.recipe.cmmi if there is no ${buildout:download-cache} set it resolves -# to ${buildout:directory}/downloads but this variable is available late, that's -# why it is hardcoded only for required case -download-cache = ${buildout:directory}/downloads -command = [ -d ${:download-cache} ] && rm -fr ${:download-cache}/* || exit 0 -update-command = ${:command} -stop-on-error = True - diff --git a/software/dotclear/template/dotclear.inc.php.in b/software/dotclear/template/dotclear.inc.php.in deleted file mode 100644 index 0c39feef3..000000000 --- a/software/dotclear/template/dotclear.inc.php.in +++ /dev/null @@ -1,25 +0,0 @@ -<?php -$cfg['blowfish_secret'] = ''; /* YOU MUST FILL IN THIS FOR COOKIE AUTH! */ -$i = 0; -$i++; -/* Server parameters */ -$cfg['Servers'][$i]['host'] = 'Put here mysql host template key'; -$cfg['Servers'][$i]['port'] = 'Put here mysql port template key'; -/* Authentication type */ -$cfg['Servers'][$i]['auth_type'] = 'cookie'; -$cfg['Servers'][$i]['user'] = ''; -$cfg['Servers'][$i]['connect_type'] = 'tcp'; -$cfg['Servers'][$i]['compress'] = false; -/* Select mysqli if your server has it */ -$cfg['Servers'][$i]['extension'] = 'mysql'; -$cfg['Servers'][$i]['AllowNoPassword'] = false; - -/* rajk - for blobstreaming */ -$cfg['Servers'][$i]['bs_garbage_threshold'] = 50; -$cfg['Servers'][$i]['bs_repository_threshold'] = '32M'; -$cfg['Servers'][$i]['bs_temp_blob_timeout'] = 600; -$cfg['Servers'][$i]['bs_temp_log_threshold'] = '32M'; -$cfg['UploadDir'] = ''; -$cfg['SaveDir'] = ''; - -?> diff --git a/software/dotproject/instance.cfg b/software/dotproject/instance.cfg deleted file mode 100644 index fffebea8f..000000000 --- a/software/dotproject/instance.cfg +++ /dev/null @@ -1,17 +0,0 @@ -[buildout] -eggs-directory = ${buildout:eggs-directory} -develop-eggs-directory = ${buildout:develop-eggs-directory} - -parts = instance - -[instance] -recipe = ${instance-recipe:egg}:${instance-recipe:module} -source = ${application:location} -template = ${application-template:location}/${application-template:filename} -configuration = ${application-configuration:location} - -httpd_binary = ${apache:location}/bin/httpd -mysql_binary = ${mariadb:location}/bin/mysql -mysql_install_binary = ${mariadb:location}/bin/mysql_install_db -mysql_upgrade_binary = ${mariadb:location}/bin/mysql_upgrade -mysqld_binary = ${mariadb:location}/libexec/mysqld diff --git a/software/dotproject/software.cfg b/software/dotproject/software.cfg deleted file mode 100644 index ea6a5aa31..000000000 --- a/software/dotproject/software.cfg +++ /dev/null @@ -1,140 +0,0 @@ -[buildout] -versions = versions - -parts = - template - apache-php - mariadb - eggs - instance-recipe-egg - downloadcache-workaround - -extends = - ../../stack/lamp.cfg - ../../stack/shacache-client.cfg - -[application] -recipe = slapos.recipe.build:download-unpacked -url = http://downloads.sourceforge.net/project/dotproject/dotproject/dotProject%20Version%202.1.5/dotproject-2.1.5.tar.gz?r=http%3A%2F%2Fsourceforge.net%2Fprojects%2Fdotproject%2F&ts=1315317307&use_mirror=freefr -md5sum = d283fad3fc541e7ffda07151efc64bf8 - -[application-template] -recipe = slapos.recipe.download -url = ${:_profile_base_location_}/template/config.inc.php.in -md5sum = b78545a6928978c5990021ac68e26be0 -filename = template.in -mode = 0644 -location = ${buildout:parts-directory}/${:_buildout_section_name_} - -[application-configuration] -location = config.php - -[instance-recipe] -egg = slapos.cookbook -module = lamp.simple - -[template] -# Default template for the instance. -recipe = slapos.recipe.template -url = ${:_profile_base_location_}/instance.cfg -#md5sum = Student shall put md5 of instance.cfg here -output = ${buildout:directory}/template.cfg -mode = 0644 - -[instance-recipe-egg] -recipe = zc.recipe.egg -eggs = ${instance-recipe:egg} - -[versions] -# Use SlapOS patched zc.buildout -zc.buildout = 1.5.3-dev-SlapOS-010 - -Jinja2 = 2.6 -MySQL-python = 1.2.3 -Werkzeug = 0.8.1 -apache-libcloud = 0.5.2 -buildout-versions = 1.7 -hexagonit.recipe.cmmi = 1.5.0 -meld3 = 0.6.7 -plone.recipe.command = 1.1 -slapos.cookbook = 0.34 -slapos.recipe.build = 0.7 -slapos.recipe.download = 1.0.dev-r4053 -slapos.recipe.template = 2.2 -slapos.toolbox = 0.10 - -# Required by: -# slapos.core==0.18 -# slapos.toolbox==0.10 -Flask = 0.8 - -# Required by: -# slapos.cookbook==0.34 -PyXML = 0.8.4 - -# Required by: -# hexagonit.recipe.cmmi==1.5.0 -hexagonit.recipe.download = 1.5.0 - -# Required by: -# slapos.cookbook==0.34 -# slapos.core==0.18 -# slapos.toolbox==0.10 -# xml-marshaller==0.9.7 -lxml = 2.3.1 - -# Required by: -# slapos.cookbook==0.34 -netaddr = 0.7.6 - -# Required by: -# slapos.core==0.18 -netifaces = 0.5 - -# Required by: -# slapos.toolbox==0.10 -paramiko = 1.7.7.1 - -# Required by: -# slapos.toolbox==0.10 -psutil = 0.3.0 - -# Required by: -# slapos.cookbook==0.34 -# slapos.core==0.18 -# slapos.toolbox==0.10 -setuptools = 0.6c12dev-r88846 - -# Required by: -# slapos.cookbook==0.34 -# slapos.toolbox==0.10 -slapos.core = 0.18 - -# Required by: -# slapos.core==0.18 -supervisor = 3.0a10 - -# Required by: -# slapos.cookbook==0.34 -# slapos.toolbox==0.10 -xml-marshaller = 0.9.7 - -# Required by: -# slapos.cookbook==0.34 -zc.recipe.egg = 1.3.2 - -# Required by: -# slapos.core==0.18 -zope.interface = 3.8.0 - -[downloadcache-workaround] -# workaround irritating problem of hexagonit.recipe.cmmi which automatically -# creates download cache, which in turn switches builout to "semi-offline" mode -recipe = plone.recipe.command -# in hexagonit.recipe.cmmi if there is no ${buildout:download-cache} set it resolves -# to ${buildout:directory}/downloads but this variable is available late, that's -# why it is hardcoded only for required case -download-cache = ${buildout:directory}/downloads -command = [ -d ${:download-cache} ] && rm -fr ${:download-cache}/* || exit 0 -update-command = ${:command} -stop-on-error = True diff --git a/software/dotproject/template/config.inc.php.in b/software/dotproject/template/config.inc.php.in deleted file mode 100644 index eac1c4b9e..000000000 --- a/software/dotproject/template/config.inc.php.in +++ /dev/null @@ -1,25 +0,0 @@ -<?php -$cfg['blowfish_secret'] = ''; /* YOU MUST FILL IN THIS FOR COOKIE AUTH! */ -$i = 0; -$i++; -/* Server parameters */ -$cfg['Servers'][$i]['host'] = '%(mysql_host)s'; -$cfg['Servers'][$i]['port'] = '%(mysql_port)s'; -/* Authentication type */ -$cfg['Servers'][$i]['auth_type'] = 'cookie'; -$cfg['Servers'][$i]['user'] = ''; -$cfg['Servers'][$i]['connect_type'] = 'tcp'; -$cfg['Servers'][$i]['compress'] = false; -/* Select mysqli if your server has it */ -$cfg['Servers'][$i]['extension'] = 'mysql'; -$cfg['Servers'][$i]['AllowNoPassword'] = false; - -/* rajk - for blobstreaming */ -$cfg['Servers'][$i]['bs_garbage_threshold'] = 50; -$cfg['Servers'][$i]['bs_repository_threshold'] = '32M'; -$cfg['Servers'][$i]['bs_temp_blob_timeout'] = 600; -$cfg['Servers'][$i]['bs_temp_log_threshold'] = '32M'; -$cfg['UploadDir'] = ''; -$cfg['SaveDir'] = ''; - -?> diff --git a/software/drupal/instance.cfg b/software/drupal/instance.cfg deleted file mode 100644 index 9495bde7e..000000000 --- a/software/drupal/instance.cfg +++ /dev/null @@ -1,15 +0,0 @@ -[buildout] -eggs-directory = ${buildout:eggs-directory} -develop-eggs-directory = ${buildout:develop-eggs-directory} - -parts = instance - -[instance] -recipe = ${instance-recipe:egg}:${instance-recipe:module} -source = ${application:location} - -httpd_binary = ${apache:location}/bin/httpd -mysql_binary = ${mariadb:location}/bin/mysql -mysql_install_binary = ${mariadb:location}/bin/mysql_install_db -mysql_upgrade_binary = ${mariadb:location}/bin/mysql_upgrade -mysqld_binary = ${mariadb:location}/libexec/mysqld diff --git a/software/drupal/software.cfg b/software/drupal/software.cfg deleted file mode 100644 index 7c48e25aa..000000000 --- a/software/drupal/software.cfg +++ /dev/null @@ -1,129 +0,0 @@ -[buildout] -versions = versions - -parts = - template - apache-php - mariadb - eggs - instance-recipe-egg - downloadcache-workaround - -extends = - ../../stack/lamp.cfg - ../../stack/shacache-client.cfg - -[application] -recipe = slapos.recipe.build:download-unpacked -url = http://ftp.drupal.org/files/projects/drupal-7.8.tar.gz -md5sum = e0226b56e8d5c57c6b126e8ed5866b1f - -[instance-recipe] -egg = slapos.cookbook -module = lamp.simple - -[template] -# Default template for the instance. -recipe = slapos.recipe.template -url = ${:_profile_base_location_}/instance.cfg -#md5sum = Student shall put md5 of instance.cfg here -output = ${buildout:directory}/template.cfg -mode = 0644 - -[instance-recipe-egg] -recipe = zc.recipe.egg -eggs = ${instance-recipe:egg} - -[versions] -# Use SlapOS patched zc.buildout -zc.buildout = 1.5.3-dev-SlapOS-010 - -Jinja2 = 2.6 -MySQL-python = 1.2.3 -Werkzeug = 0.8.1 -apache-libcloud = 0.5.2 -buildout-versions = 1.7 -hexagonit.recipe.cmmi = 1.5.0 -meld3 = 0.6.7 -plone.recipe.command = 1.1 -slapos.cookbook = 0.34 -slapos.recipe.build = 0.7 -slapos.recipe.download = 1.0.dev-r4053 -slapos.recipe.template = 2.2 -slapos.toolbox = 0.10 - -# Required by: -# slapos.core==0.18 -# slapos.toolbox==0.10 -Flask = 0.8 - -# Required by: -# slapos.cookbook==0.34 -PyXML = 0.8.4 - -# Required by: -# hexagonit.recipe.cmmi==1.5.0 -hexagonit.recipe.download = 1.5.0 - -# Required by: -# slapos.cookbook==0.34 -# slapos.core==0.18 -# slapos.toolbox==0.10 -# xml-marshaller==0.9.7 -lxml = 2.3.1 - -# Required by: -# slapos.cookbook==0.34 -netaddr = 0.7.6 - -# Required by: -# slapos.core==0.18 -netifaces = 0.5 - -# Required by: -# slapos.toolbox==0.10 -paramiko = 1.7.7.1 - -# Required by: -# slapos.toolbox==0.10 -psutil = 0.3.0 - -# Required by: -# slapos.cookbook==0.34 -# slapos.core==0.18 -# slapos.toolbox==0.10 -setuptools = 0.6c12dev-r88846 - -# Required by: -# slapos.cookbook==0.34 -# slapos.toolbox==0.10 -slapos.core = 0.18 - -# Required by: -# slapos.core==0.18 -supervisor = 3.0a10 - -# Required by: -# slapos.cookbook==0.34 -# slapos.toolbox==0.10 -xml-marshaller = 0.9.7 - -# Required by: -# slapos.cookbook==0.34 -zc.recipe.egg = 1.3.2 - -# Required by: -# slapos.core==0.18 -zope.interface = 3.8.0 - -[downloadcache-workaround] -# workaround irritating problem of hexagonit.recipe.cmmi which automatically -# creates download cache, which in turn switches builout to "semi-offline" mode -recipe = plone.recipe.command -# in hexagonit.recipe.cmmi if there is no ${buildout:download-cache} set it resolves -# to ${buildout:directory}/downloads but this variable is available late, that's -# why it is hardcoded only for required case -download-cache = ${buildout:directory}/downloads -command = [ -d ${:download-cache} ] && rm -fr ${:download-cache}/* || exit 0 -update-command = ${:command} -stop-on-error = True diff --git a/software/eSKUeL/instance.cfg b/software/eSKUeL/instance.cfg deleted file mode 100644 index 9495bde7e..000000000 --- a/software/eSKUeL/instance.cfg +++ /dev/null @@ -1,15 +0,0 @@ -[buildout] -eggs-directory = ${buildout:eggs-directory} -develop-eggs-directory = ${buildout:develop-eggs-directory} - -parts = instance - -[instance] -recipe = ${instance-recipe:egg}:${instance-recipe:module} -source = ${application:location} - -httpd_binary = ${apache:location}/bin/httpd -mysql_binary = ${mariadb:location}/bin/mysql -mysql_install_binary = ${mariadb:location}/bin/mysql_install_db -mysql_upgrade_binary = ${mariadb:location}/bin/mysql_upgrade -mysqld_binary = ${mariadb:location}/libexec/mysqld diff --git a/software/eSKUeL/software.cfg b/software/eSKUeL/software.cfg deleted file mode 100644 index 5d34b4c56..000000000 --- a/software/eSKUeL/software.cfg +++ /dev/null @@ -1,130 +0,0 @@ -[buildout] -versions = versions - -parts = - template - apache-php - mariadb - eggs - instance-recipe-egg - downloadcache-workaround - -extends = - ../../stack/lamp.cfg - ../../stack/shacache-client.cfg - -[application] -recipe = slapos.recipe.build:download-unpacked -url = http://www.phptools4u.com/generated_content/download/eskuel.zip -md5sum = c91f6f238be715f303911dd00f281b78 - -[instance-recipe] -egg = slapos.cookbook -module = lamp.simple - -[template] -# Default template for the instance. -recipe = slapos.recipe.template -url = ${:_profile_base_location_}/instance.cfg -#md5sum = Student shall put md5 of instance.cfg here -output = ${buildout:directory}/template.cfg -mode = 0644 - -[instance-recipe-egg] -recipe = zc.recipe.egg -eggs = ${instance-recipe:egg} - -[versions] -# Use SlapOS patched zc.buildout -zc.buildout = 1.5.3-dev-SlapOS-010 - -Jinja2 = 2.6 -MySQL-python = 1.2.3 -Werkzeug = 0.8.1 -apache-libcloud = 0.5.2 -buildout-versions = 1.7 -hexagonit.recipe.cmmi = 1.5.0 -meld3 = 0.6.7 -plone.recipe.command = 1.1 -slapos.cookbook = 0.34 -slapos.recipe.build = 0.7 -slapos.recipe.download = 1.0.dev-r4053 -slapos.recipe.template = 2.2 -slapos.toolbox = 0.10 - -# Required by: -# slapos.core==0.18 -# slapos.toolbox==0.10 -Flask = 0.8 - -# Required by: -# slapos.cookbook==0.34 -PyXML = 0.8.4 - -# Required by: -# hexagonit.recipe.cmmi==1.5.0 -hexagonit.recipe.download = 1.5.0 - -# Required by: -# slapos.cookbook==0.34 -# slapos.core==0.18 -# slapos.toolbox==0.10 -# xml-marshaller==0.9.7 -lxml = 2.3.1 - -# Required by: -# slapos.cookbook==0.34 -netaddr = 0.7.6 - -# Required by: -# slapos.core==0.18 -netifaces = 0.6 - -# Required by: -# slapos.toolbox==0.10 -paramiko = 1.7.7.1 - -# Required by: -# slapos.toolbox==0.10 -psutil = 0.3.0 - -# Required by: -# slapos.cookbook==0.34 -# slapos.core==0.18 -# slapos.toolbox==0.10 -setuptools = 0.6c12dev-r88846 - -# Required by: -# slapos.cookbook==0.34 -# slapos.toolbox==0.10 -slapos.core = 0.18 - -# Required by: -# slapos.core==0.18 -supervisor = 3.0a10 - -# Required by: -# slapos.cookbook==0.34 -# slapos.toolbox==0.10 -xml-marshaller = 0.9.7 - -# Required by: -# slapos.cookbook==0.34 -zc.recipe.egg = 1.3.2 - -# Required by: -# slapos.core==0.18 -zope.interface = 3.8.0 - -[downloadcache-workaround] -# workaround irritating problem of hexagonit.recipe.cmmi which automatically -# creates download cache, which in turn switches builout to "semi-offline" mode -recipe = plone.recipe.command -# in hexagonit.recipe.cmmi if there is no ${buildout:download-cache} set it resolves -# to ${buildout:directory}/downloads but this variable is available late, that's -# why it is hardcoded only for required case -download-cache = ${buildout:directory}/downloads -command = [ -d ${:download-cache} ] && rm -fr ${:download-cache}/* || exit 0 -update-command = ${:command} -stop-on-error = True - diff --git a/software/erp5/instance-cloudooo.cfg b/software/erp5/instance-cloudooo.cfg deleted file mode 100644 index 894530fed..000000000 --- a/software/erp5/instance-cloudooo.cfg +++ /dev/null @@ -1,61 +0,0 @@ -[buildout] -parts = - publish-cloudooo-connection-information - cloudooo-instance - -eggs-directory = ${buildout:eggs-directory} -develop-eggs-directory = ${buildout:develop-eggs-directory} -offline = true - -[publish-cloudooo-connection-information] -recipe = slapos.cookbook:publishurl -url = cloudooo://$${cloudooo-instance:ip}:$${cloudooo-instance:port}/ - -[cloudooo-instance] -recipe = slapos.cookbook:generic.cloudooo - -# Network options -ip = $${slap-network-information:local-ipv4} -port = 23000 -openoffice-port = 23060 - -# Paths -configuration-file = $${rootdirectory:etc}/cloudooo.cfg -wrapper = $${basedirectory:services}/cloudooo - -# Paths: Data -data-directory = $${directory:cloudooo-data} - -environment = - LD_LIBRARY_PATH = ${file:location}/lib:${fontconfig:location}/lib:${freetype:location}/lib:${libICE:location}/lib:${libSM:location}/lib:${libX11:location}/lib:${libXau:location}/lib:${libXdmcp:location}/lib:${libXext:location}/lib:${libXinerama:location}/lib:${libxcb:location}/lib:${zlib:location}/lib - FONTCONFIG_FILE = $${fontconfig-instance:conf-path} - -# Binary information -# cloudooo specific configuration -ooo-binary-path = ${libreoffice-bin:location}/program -ooo-paster = ${buildout:bin-directory}/cloudooo_paster -ooo-uno-path = ${libreoffice-bin:location}/basis-link/program - -[fontconfig-instance] -recipe = slapos.cookbook:fontconfig -conf-path = $${rootdirectory:etc}/font.conf -font-system-folder = ${fonts:location} -font-folder = $${directory:font} -url-list = $${dynamic-fontconfig-instance:url-list} -service-folder = $${basedirectory:services} -onetimedownload_path = ${buildout:bin-directory}/onetimedownload - -# rest of parts are candidates for some generic stuff -[basedirectory] -recipe = slapos.cookbook:mkdirectory -services = $${rootdirectory:etc}/run - -[directory] -recipe = slapos.cookbook:mkdirectory -cloudooo-data = $${rootdirectory:srv}/cloudooo -font = $${rootdirectory:srv}/font - -[rootdirectory] -recipe = slapos.cookbook:mkdirectory -etc = $${buildout:directory}/etc -srv = $${buildout:directory}/srv diff --git a/software/erp5/instance-erp5-development.cfg b/software/erp5/instance-erp5-development.cfg deleted file mode 100644 index 605342eb6..000000000 --- a/software/erp5/instance-erp5-development.cfg +++ /dev/null @@ -1,129 +0,0 @@ -############################# -# -# Request erp5 development environnment -# -############################# -[buildout] - -extends = ${template-zope:output} -parts += - request-mariadb - request-cloudooo - request-memcached - request-kumofs - basedirectory - erp5-update - test-runner - -eggs-directory = ${buildout:eggs-directory} -develop-eggs-directory = ${buildout:develop-eggs-directory} -offline = true - -[slap-parameter] -# default site id -site-id = erp5 -cloudooo-json = - -[test-runner] -recipe = slapos.cookbook:erp5.test -certificate-authority-path = $${test-certificate-authority:ca-dir} -mysql-url = $${request-mariadb:connection-url} -kumofs-url = $${request-kumofs:connection-url} -memcached-url = $${request-memcached:connection-url} -cloudooo-url = $${request-cloudooo:connection-url} -test-instance-path = $${directory:unit-test-path} - -prepend-path = $${buildout:bin-directory} -run-unit-test = $${buildout:bin-directory}/runUnitTest -run-test-suite = $${buildout:bin-directory}/runTestSuite - -openssl-binary = $${test-certificate-authority:openssl-binary} -run-unit-test-binary = ${buildout:bin-directory}/runUnitTest -run-test-suite-binary = ${buildout:bin-directory}/runTestSuite - -[test-certificate-authority] -recipe = slapos.cookbook:certificate_authority -openssl-binary = ${openssl:location}/bin/openssl -ca-dir = $${directory:test-ca-dir} -requests-directory = $${test-cadirectory:requests} -wrapper = $${basedirectory:services}/test-ca -ca-private = $${test-cadirectory:private} -ca-certs = $${test-cadirectory:certs} -ca-newcerts = $${test-cadirectory:newcerts} -ca-crl = $${test-cadirectory:crl} - -[test-cadirectory] -recipe = slapos.cookbook:mkdirectory -requests = $${directory:test-ca-dir}/requests/ -private = $${directory:test-ca-dir}/private/ -certs = $${directory:test-ca-dir}/certs/ -newcerts = $${directory:test-ca-dir}/newcerts/ -crl = $${directory:test-ca-dir}/crl/ - -[erp5-update] -recipe = slapos.cookbook:erp5.update - -# Configuration -url = http://$${zope-instance:user}:$${zope-instance:password}@$${zope-instance:ip}:$${zope-instance:port}/ -mysql-url = $${request-mariadb:connection-url} -kumofs-url = $${request-kumofs:connection-url} -memcached-url = $${request-memcached:connection-url} -cloudooo-url = $${request-cloudooo:connection-url} -site-id = $${slap-parameter:site-id} -openssl-binary = ${openssl:location}/bin/openssl -cadir-path = $${erp5-certificate-authority:ca-dir} - -# Paths -update-wrapper = $${basedirectory:services}/erp5-update - -# Defaults -configurator-bt5-list = erp5_full_text_myisam_catalog erp5_configurator_standard erp5_configurator_maxma_demo erp5_configurator_ung erp5_configurator_ung erp5_configurator_run_my_doc -bt5-repository-list = $${zope-instance:bt5-repository-list} - -[request-common] -recipe = slapos.cookbook:request -software-url = $${slap-connection:software-release-url} -sla = computer_guid -sla-computer_guid = $${slap-connection:computer-id} -return = url -server-url = $${slap-connection:server-url} -key-file = $${slap-connection:key-file} -cert-file = $${slap-connection:cert-file} -computer-id = $${slap-connection:computer-id} -partition-id = $${slap-connection:partition-id} - -[request-mariadb] -<=request-common -name = MariaDB DataBase -software-type = mariadb - -[request-cloudooo] -<=request-common -name = Cloudooo -config = cloudooo-json -config-cloudooo-json = $${slap-parameter:cloudooo-json} -software-type = cloudooo - -[request-memcached] -<=request-common -name = Memcached -software-type = memcached - -[request-kumofs] -<=request-common -name = KumoFS -software-type = kumofs - -# rest of parts are candidates for some generic stuff -[basedirectory] -recipe = slapos.cookbook:mkdirectory -services = $${rootdirectory:etc}/run/ - -[rootdirectory] -recipe = slapos.cookbook:mkdirectory -etc = $${buildout:directory}/etc/ - -[directory] -test-ca-dir = $${rootdirectory:srv}/test-ca/ -test-instance-path = $${rootdirectory:srv}/test-instance/ -unit-test-path = $${:test-instance-path}/unit_test/ diff --git a/software/erp5/instance-erp5-production.cfg b/software/erp5/instance-erp5-production.cfg deleted file mode 100644 index 5922f4460..000000000 --- a/software/erp5/instance-erp5-production.cfg +++ /dev/null @@ -1,93 +0,0 @@ -############################# -# -# Request erp5 production environnment -# -############################# -[buildout] - -parts = - request-mariadb - request-sphinx - request-cloudooo - request-memcached - request-kumofs - request-tidstorage - basedirectory - -eggs-directory = ${buildout:eggs-directory} -develop-eggs-directory = ${buildout:develop-eggs-directory} -offline = true - -[request-common] -recipe = slapos.cookbook:request -software-url = $${slap-connection:software-release-url} -sla = computer_guid -return = url -server-url = $${slap-connection:server-url} -key-file = $${slap-connection:key-file} -cert-file = $${slap-connection:cert-file} -computer-id = $${slap-connection:computer-id} -partition-id = $${slap-connection:partition-id} - -[request-sphinx] -<=request-common -name = Sphinx Search Engine -software-type = sphinx -sla-computer_guid = $${slap-parameter:sphinx-computer-guid} - -[request-mariadb] -<=request-common -name = MariaDB DataBase -software-type = mariadb -sla-computer_guid = $${slap-parameter:mariadb-computer-guid} - -[request-cloudooo] -<=request-common -name = Cloudooo -config = cloudooo-json -config-cloudooo-json = $${slap-parameter:cloudooo-json} -software-type = cloudooo -sla-computer_guid = $${slap-parameter:cloudooo-computer-guid} - -[request-memcached] -<=request-common -name = Memcached -software-type = memcached -sla-computer_guid = $${slap-parameter:memcached-computer-guid} - -[request-kumofs] -<=request-common -name = KumoFS -software-type = kumofs -sla-computer_guid = $${slap-parameter:kumofs-computer-guid} - -[request-tidstorage] -<=request-common -name = TidStorage -return = url-login -config = json mysql-url memcached-url cloudooo-url kumofs-url -config-json = $${slap-parameter:json} -config-mysql-url = $${request-mariadb:connection-url} -config-memcached-url = $${request-memcached:connection-url} -config-cloudooo-url = $${request-cloudooo:connection-url} -config-kumofs-url = $${request-kumofs:connection-url} -software-type = tidstorage -sla-computer_guid = $${slap-parameter:tidstorage-computer-guid} - -[slap-parameter] -# Default value if no computer_guid is specified for each type -sphinx-computer-guid = $${slap-connection:computer-id} -mariadb-computer-guid = $${slap-connection:computer-id} -cloudooo-computer-guid = $${slap-connection:computer-id} -memcached-computer-guid = $${slap-connection:computer-id} -kumofs-computer-guid = $${slap-connection:computer-id} -tidstorage-computer-guid = $${slap-connection:computer-id} - -# rest of parts are candidates for some generic stuff -[basedirectory] -recipe = slapos.cookbook:mkdirectory -services = $${rootdirectory:etc}/run - -[rootdirectory] -recipe = slapos.cookbook:mkdirectory -etc = $${buildout:directory}/etc diff --git a/software/erp5/instance-kumofs.cfg b/software/erp5/instance-kumofs.cfg deleted file mode 100644 index b8b49dd4a..000000000 --- a/software/erp5/instance-kumofs.cfg +++ /dev/null @@ -1,111 +0,0 @@ -[buildout] -parts = - publish-kumofs-connection-information - kumofs-instance - logrotate - logrotate-entry-kumofs - cron - cron-entry-logrotate - -eggs-directory = ${buildout:eggs-directory} -develop-eggs-directory = ${buildout:develop-eggs-directory} -offline = true - -[publish-kumofs-connection-information] -recipe = slapos.cookbook:publishurl -url = memcached://$${kumofs-instance:ip}:$${kumofs-instance:gateway-port}/ - -[kumofs-instance] -recipe = slapos.cookbook:generic.kumofs - -# Network options -ip = $${slap-network-information:local-ipv4} -manager-port = 13101 -server-port = 13201 -server-listen-port = 13202 -gateway-port = 13301 - -# Paths: Running wrappers -gateway-wrapper = $${basedirectory:services}/kumofs_gateway -manager-wrapper = $${basedirectory:services}/kumofs_manager -server-wrapper = $${basedirectory:services}/kumofs_server - -# Paths: Data -data-directory = $${directory:kumofs-data} - -# Paths: Logs -kumo-gateway-log = $${basedirectory:log}/kumo-gateway.log -kumo-manager-log = $${basedirectory:log}/kumo-manager.log -kumo-server-log = $${basedirectory:log}/kumo-server.log - -# Binary information -kumo-gateway-binary = ${kumo:location}/bin/kumo-gateway -kumo-manager-binary = ${kumo:location}/bin/kumo-manager -kumo-server-binary = ${kumo:location}/bin/kumo-server - -[logrotate-entry-kumofs] -<= logrotate -recipe = slapos.cookbook:logrotate.d -name = kumofs -log = $${kumofs-instance:kumo-gateway-log} $${kumofs-instance:kumo-manager-log} - $${kumofs-instance:kumo-server-log} - -# rest of parts are candidates for some generic stuff - -[logrotate] -recipe = slapos.cookbook:logrotate -# Binaries -logrotate-binary = ${logrotate:location}/usr/sbin/logrotate -gzip-binary = ${gzip:location}/bin/gzip -gunzip-binary = ${gzip:location}/bin/gunzip -# Directories -wrapper = $${rootdirectory:bin}/logrotate -conf = $${rootdirectory:etc}/logrotate.conf -logrotate-entries = $${directory:logrotate-entries} -backup = $${directory:logrotate-backup} -state-file = $${rootdirectory:srv}/logrotate.status - -[basedirectory] -recipe = slapos.cookbook:mkdirectory -log = $${rootdirectory:var}/log -services = $${rootdirectory:etc}/run -run = $${rootdirectory:var}/run -backup = $${rootdirectory:srv}/backup - -[directory] -recipe = slapos.cookbook:mkdirectory -cron-entries = $${rootdirectory:etc}/cron.d -crontabs = $${rootdirectory:etc}/crontabs -cronstamps = $${rootdirectory:etc}/cronstamps -cronoutput = $${basedirectory:log}/cron -logrotate-backup = $${basedirectory:backup}/logrotate -logrotate-entries = $${rootdirectory:etc}/logrotate.d -kumofs-data = $${rootdirectory:srv}/kumofs - -[rootdirectory] -recipe = slapos.cookbook:mkdirectory -etc = $${buildout:directory}/etc -var = $${buildout:directory}/var -srv = $${buildout:directory}/srv -bin = $${buildout:directory}/bin - -[cron] -recipe = slapos.cookbook:cron -dcrond-binary = ${dcron:location}/sbin/crond -cron-entries = $${directory:cron-entries} -crontabs = $${directory:crontabs} -cronstamps = $${directory:cronstamps} -catcher = $${cron-simplelogger:binary} -binary = $${basedirectory:services}/crond - -[cron-simplelogger] -recipe = slapos.cookbook:simplelogger -binary = $${rootdirectory:bin}/cron_simplelogger -output = $${directory:cronoutput} - -[cron-entry-logrotate] -<= cron -recipe = slapos.cookbook:cron.d -name = logrotate -frequency = 0 0 * * * -command = $${logrotate:wrapper} diff --git a/software/erp5/instance-mariadb.cfg b/software/erp5/instance-mariadb.cfg deleted file mode 100644 index 119f13885..000000000 --- a/software/erp5/instance-mariadb.cfg +++ /dev/null @@ -1,174 +0,0 @@ -[buildout] -parts = - publish-mariadb-url - mariadb-instance - logrotate - logrotate-entry-mariadb - cron - cron-entry-logrotate - cron-entry-mariadb-backup - binary-link - -eggs-directory = ${buildout:eggs-directory} -develop-eggs-directory = ${buildout:develop-eggs-directory} -offline = true - -[publish-mariadb-url] -recipe = slapos.cookbook:publishurl -url = mysql://$${mariadb-instance:user}:$${mariadb-instance:password}@$${mariadb-instance:ip}:$${mariadb-instance:port}/$${mariadb-instance:database} - -[cron-entry-mariadb-backup] -<= cron -recipe = slapos.cookbook:cron.d -name = mariadb-backup -frequency = 0 0 * * * -command = $${mariadb-instance:backup-script} - -[mariadb-instance] -recipe = slapos.cookbook:generic.mysql - -# Options -user = user -parallel-test-database-amount = 100 -port = 45678 -ip = $${slap-network-information:local-ipv4} -database = erp5 -test-user = erp5_test -test-database = erp5_test -mysql-test-database-base = testdb -mysql-test-user-base = testuser - -# Paths -wrapper = $${basedirectory:services}/mariadb -update-wrapper = $${basedirectory:services}/mariadb_update -backup-script = $${rootdirectory:bin}/innobackupex-controller -full-backup-directory = $${directory:mariadb-backup-full} -incremental-backup-directory = $${directory:mariadb-backup-incremental} -data-directory = $${directory:mariadb-data} -pid-file = $${basedirectory:run}/mariadb.pid -socket = $${basedirectory:run}/mariadb.sock -error-log = $${basedirectory:log}/mariadb_error.log -slow-query-log = $${basedirectory:log}/mariadb_slowquery.log -conf-file = $${rootdirectory:etc}/mariadb.cnf -dumpname = dump.sql.gz -bin-directory = $${rootdirectory:bin} -innobackupex-incremental = $${rootdirectory:bin}/innobackupex-incremental -innobackupex-full = $${rootdirectory:bin}/innobackupex-full - -# Binary information -innobackupex-binary = ${xtrabackup:location}/bin/innobackupex -mysql-binary = ${mariadb:location}/bin/mysql -mysql-install-binary = ${mariadb:location}/bin/mysql_install_db -mysql-upgrade-binary = ${mariadb:location}/bin/mysql_upgrade -mysqld-binary = ${mariadb:location}/libexec/mysqld -pt-archiver-binary = ${perl:siteprefix}/bin/pt-archiver -pt-config-diff-binary = ${perl:siteprefix}/bin/pt-config-diff -pt-deadlock-logger-binary = ${perl:siteprefix}/bin/pt-deadlock-logger -pt-duplicate-key-checker-binary = ${perl:siteprefix}/bin/pt-duplicate-key-checker -pt-fifo-split-binary = ${perl:siteprefix}/bin/pt-fifo-split -pt-find-binary = ${perl:siteprefix}/bin/pt-find -pt-fk-error-logger-binary = ${perl:siteprefix}/bin/pt-fk-error-logger -pt-heartbeat-binary = ${perl:siteprefix}/bin/pt-heartbeat -pt-index-usage-binary = ${perl:siteprefix}/bin/pt-index-usage -pt-kill-binary = ${perl:siteprefix}/bin/pt-kill -pt-log-player-binary = ${perl:siteprefix}/bin/pt-log-player -pt-online-schema-change-binary = ${perl:siteprefix}/bin/pt-online-schema-change -pt-query-advisor-binary = ${perl:siteprefix}/bin/pt-query-advisor -pt-query-digest-binary = ${perl:siteprefix}/bin/pt-query-digest -pt-show-grants-binary = ${perl:siteprefix}/bin/pt-show-grants -pt-slave-delay-binary = ${perl:siteprefix}/bin/pt-slave-delay -pt-slave-find-binary = ${perl:siteprefix}/bin/pt-slave-find -pt-slave-restart-binary = ${perl:siteprefix}/bin/pt-slave-restart -pt-table-checksum-binary = ${perl:siteprefix}/bin/pt-table-checksum -pt-table-sync-binary = ${perl:siteprefix}/bin/pt-table-sync -pt-tcp-model-binary = ${perl:siteprefix}/bin/pt-tcp-model -pt-trend-binary = ${perl:siteprefix}/bin/pt-trend -pt-upgrade-binary = ${perl:siteprefix}/bin/pt-upgrade -pt-variable-advisor-binary = ${perl:siteprefix}/bin/pt-variable-advisor -pt-visual-explain-binary = ${perl:siteprefix}/bin/pt-visual-explain -xtrabackup-binary = ${xtrabackup:location}/bin/xtrabackup_51 -perl-binary = ${perl:location}/bin/perl - -[logrotate] -recipe = slapos.cookbook:logrotate -# Binaries -logrotate-binary = ${logrotate:location}/usr/sbin/logrotate -gzip-binary = ${gzip:location}/bin/gzip -gunzip-binary = ${gzip:location}/bin/gunzip -# Directories -wrapper = $${rootdirectory:bin}/logrotate -conf = $${rootdirectory:etc}/logrotate.conf -logrotate-entries = $${directory:logrotate-entries} -backup = $${directory:logrotate-backup} -state-file = $${rootdirectory:srv}/logrotate.status - -[logrotate-entry-mariadb] -<= logrotate -recipe = slapos.cookbook:logrotate.d -name = mariadb -log = $${mariadb-instance:error-log} $${mariadb-instance:slow-query-log} -post = $${mariadb-instance:mysql-binary} --no-defaults -B --socket=$${mariadb-instance:socket} -e "FLUSH LOGS" - -[cron] -recipe = slapos.cookbook:cron -dcrond-binary = ${dcron:location}/sbin/crond -cron-entries = $${directory:cron-entries} -crontabs = $${directory:crontabs} -cronstamps = $${directory:cronstamps} -catcher = $${cron-simplelogger:binary} -binary = $${basedirectory:services}/crond - -[cron-simplelogger] -recipe = slapos.cookbook:simplelogger -binary = $${rootdirectory:bin}/cron_simplelogger -output = $${directory:cronoutput} - -[cron-entry-logrotate] -<= cron -recipe = slapos.cookbook:cron.d -name = logrotate -frequency = 0 0 * * * -command = $${logrotate:wrapper} - -[binary-link] -recipe = slapos.cookbook:symbolic.link -target-directory = $${rootdirectory:bin} -link-binary = - ${coreutils:location}/bin/basename - ${coreutils:location}/bin/cat - ${coreutils:location}/bin/cp - ${coreutils:location}/bin/ls - ${coreutils:location}/bin/tr - ${coreutils:location}/bin/uname - ${gettext:location}/lib/gettext/hostname - ${grep:location}/bin/grep - ${sed:location}/bin/sed - ${mariadb:location}/bin/mysql - -[rootdirectory] -recipe = slapos.cookbook:mkdirectory -etc = $${buildout:directory}/etc -var = $${buildout:directory}/var -srv = $${buildout:directory}/srv -bin = $${buildout:directory}/bin - -[basedirectory] -recipe = slapos.cookbook:mkdirectory -log = $${rootdirectory:var}/log -services = $${rootdirectory:etc}/run -run = $${rootdirectory:var}/run -backup = $${rootdirectory:srv}/backup - -[directory] -recipe = slapos.cookbook:mkdirectory -cron-entries = $${rootdirectory:etc}/cron.d -crontabs = $${rootdirectory:etc}/crontabs -cronstamps = $${rootdirectory:etc}/cronstamps -cronoutput = $${basedirectory:log}/cron -ca-dir = $${rootdirectory:srv}/ssl -mariadb-backup-full = $${basedirectory:backup}/mariadb-full -mariadb-backup-incremental = $${basedirectory:backup}/mariadb-incremental -mariadb-data = $${rootdirectory:srv}/mariadb -logrotate-backup = $${basedirectory:backup}/logrotate -logrotate-entries = $${rootdirectory:etc}/logrotate.d - diff --git a/software/erp5/instance-memcached.cfg b/software/erp5/instance-memcached.cfg deleted file mode 100644 index 4ec3390f9..000000000 --- a/software/erp5/instance-memcached.cfg +++ /dev/null @@ -1,35 +0,0 @@ -############################# -# -# Instanciate memcached -# -# No slapos parameter needed -# -############################# -[buildout] -parts = - memcached-instance - publish-memcached-connection-information - -eggs-directory = ${buildout:eggs-directory} -develop-eggs-directory = ${buildout:develop-eggs-directory} -offline = true - -[rootdirectory] -recipe = slapos.cookbook:mkdirectory -etc = $${buildout:directory}/etc -bin = $${buildout:directory}/bin - -[basedirectory] -recipe = slapos.cookbook:mkdirectory -services = $${rootdirectory:etc}/run - -[memcached-instance] -recipe = slapos.cookbook:generic.memcached -wrapper_path = $${basedirectory:services}/memcached -binary_path = ${memcached:location}/bin/memcached -ip = $${slap-network-information:local-ipv4} -port = 11000 - -[publish-memcached-connection-information] -recipe = slapos.cookbook:publishurl -url = memcached://$${memcached-instance:ip}:$${memcached-instance:port}/ diff --git a/software/erp5/instance-sphinx.cfg b/software/erp5/instance-sphinx.cfg deleted file mode 100644 index 8fefcd653..000000000 --- a/software/erp5/instance-sphinx.cfg +++ /dev/null @@ -1,43 +0,0 @@ -[buildout] -parts = - publish-sphinx-url - sphinxd-instance - -eggs-directory = ${buildout:eggs-directory} -develop-eggs-directory = ${buildout:develop-eggs-directory} -offline = true - -[publish-sphinx-url] -recipe = slapos.cookbook:publish -url-sphinx = sphinx://$${sphinxd-instance:ip}:$${sphinxd-instance:sphinx-port} -url-sphinx-sql = mysql://$${sphinxd-instance:ip}:$${sphinxd-instance:sql-port} - -[sphinxd-instance] -recipe = slapos.cookbook:sphinx -data-directory = $${directory:sphinx-data} -configuration-file = $${rootdirectory:etc}/sphinx.conf -searchd-log = $${basedirectory:log}/sphinx-searchd.log -query-log = $${basedirectory:log}/sphinx-query.log -pid = $${basedirectory:run}/sphinx-searchd.pid -ip = $${slap-network-information:local-ipv4} -sphinx-port = 9312 -sql-port = 9306 -wrapper = $${basedirectory:services}/sphinxd -sphinx-searchd-binary = ${sphinx:location}/bin/searchd - -[rootdirectory] -recipe = slapos.cookbook:mkdirectory -etc = $${buildout:directory}/etc -var = $${buildout:directory}/var -srv = $${buildout:directory}/srv -bin = $${buildout:directory}/bin - -[basedirectory] -recipe = slapos.cookbook:mkdirectory -log = $${rootdirectory:var}/log -services = $${rootdirectory:etc}/run -run = $${rootdirectory:var}/run - -[directory] -recipe = slapos.cookbook:mkdirectory -sphinx-data = $${rootdirectory:srv}/sphinx diff --git a/software/erp5/instance-zope.cfg b/software/erp5/instance-zope.cfg deleted file mode 100644 index 9a71a931d..000000000 --- a/software/erp5/instance-zope.cfg +++ /dev/null @@ -1,258 +0,0 @@ -[buildout] -parts = - certificate-authority - publish-apache-zope-backend-connection-string - zope-instance - apache-zope-backend-instance - ca-apache-zope-backend - logrotate - erp5-certificate-authority - logrotate-entry-zope - cron - cron-entry-logrotate - binary-link - bt5-erp5-link - -eggs-directory = ${buildout:eggs-directory} -develop-eggs-directory = ${buildout:develop-eggs-directory} -offline = true - -[slap-parameter] -# By default backend disallows the access -access-control-string = none - -[publish-apache-zope-backend-connection-string] -recipe = slapos.cookbook:publish -url = https://$${zope-instance:user}:$${zope-instance:password}@[$${apache-zope-backend-instance:ip}]:$${apache-zope-backend-instance:port} -url-deadlock = $${:url}/$${zope-instance:deadlock-path}?$${zope-instance:deadlock-password} - -[apache-zope-backend-instance] -recipe = slapos.cookbook:apache.zope.backend -backend = http://$${zope-instance:ip}:$${zope-instance:port}/ -ip = $${slap-network-information:global-ipv6} -port = 16001 -wrapper = $${rootdirectory:bin}/apache -key-file = $${directory:apache-conf}/apache.key -cert-file = $${directory:apache-conf}/apache.crt -configuration-file = $${directory:apache-conf}/apache.conf -access-control-string = $${slap-parameter:access-control-string} -pid-file = $${basedirectory:run}/apache.pid -lock-file = $${basedirectory:run}/apache.lock -error-log = $${basedirectory:log}/apache-error.log -access-log = $${basedirectory:log}/apache-access.log -apache-binary = ${apache:location}/bin/httpd - -[ca-apache-zope-backend] -<= certificate-authority -recipe = slapos.cookbook:certificate_authority.request -key-file = $${apache-zope-backend-instance:key-file} -cert-file = $${apache-zope-backend-instance:cert-file} -executable = $${apache-zope-backend-instance:wrapper} -wrapper = $${basedirectory:services}/apache - -[zope-instance] -recipe = slapos.cookbook:generic.zope - -# XXX: products won't be needed as soon as all ERP5 (and products-deps) -# products will be eggified so then it will be possible to use them thanks to -# availability in software's eggs -products = ${products:list} - -# Options -user = zope -port = 12001 -ip = $${slap-network-information:local-ipv4} -zodb-cache-size = 5000 -thread-amount = 4 -zodb-path = $${directory:zodb}/main.fs -deadlock-path = /manage_debug_threads - -# Paths -wrapper = $${basedirectory:services}/zope-development -instance-path = $${directory:instance} -instance-etc = $${directory:instance-etc} -instance-products = $${directory:instance-products} -bt5-repository = $${rootdirectory:var}/bt5_repository -tmp-path = $${rootdirectory:tmp} -bin-path = $${rootdirectory:bin} -site-zcml = $${:instance-etc}/site.zcml -logrotate-post = $${rootdirectory:bin}/zope-post-logrotate -pid-file = $${basedirectory:run}/zope.pid -lock-file = $${basedirectory:run}/zope.lock -event-log = $${basedirectory:log}/zope-event.log -z2-log = $${basedirectory:log}/zope-Z2.log -configuration-file = $${rootdirectory:etc}/zope.conf -inituser = $${:instance-path}/inituser -# Binary information -runzope-binary = ${buildout:bin-directory}/runzope - -# Defaults -bt5-repository-list = - -[logrotate] -recipe = slapos.cookbook:logrotate -# Binaries -logrotate-binary = ${logrotate:location}/usr/sbin/logrotate -gzip-binary = ${gzip:location}/bin/gzip -gunzip-binary = ${gzip:location}/bin/gunzip -# Directories -wrapper = $${rootdirectory:bin}/logrotate -conf = $${rootdirectory:etc}/logrotate.conf -logrotate-entries = $${directory:logrotate-entries} -backup = $${directory:logrotate-backup} -state-file = $${rootdirectory:srv}/logrotate.status - -[logrotate-entry-zope] -<= logrotate -recipe = slapos.cookbook:logrotate.d -name = zope -log = $${zope-instance:event-log} $${zope-instance:z2-log} -frequency = daily -rotate-num = 30 -post = ${buildout:bin-directory}/killpidfromfile $${zope-instance:pid-file} SIGUSR2 -sharedscripts = true -notifempty = true -create = true - -[logrotate-entry-apache-zope-backend] -<= logrotate -recipe = slapos.cookbook:logrotate.d -name = zope -log = $${apache-zope-backend-instance:error-log} $${apache-zope-backend-instance:access-log} -frequency = daily -rotate-num = 30 -post = ${buildout:bin-directory}/killpidfromfile $${apache-zope-backend-instance:pid-file} SIGUSR1 -sharedscripts = true -notifempty = true -create = true - -[cron] -recipe = slapos.cookbook:cron -dcrond-binary = ${dcron:location}/sbin/crond -cron-entries = $${directory:cron-entries} -crontabs = $${directory:crontabs} -cronstamps = $${directory:cronstamps} -catcher = $${cron-simplelogger:binary} -binary = $${basedirectory:services}/crond - -[cron-simplelogger] -recipe = slapos.cookbook:simplelogger -binary = $${rootdirectory:bin}/cron_simplelogger -output = $${directory:cronoutput} - -[cron-entry-logrotate] -<= cron -recipe = slapos.cookbook:cron.d -name = logrotate -frequency = 0 0 * * * -command = $${logrotate:wrapper} - -[binary-link] -recipe = slapos.cookbook:symbolic.link -target-directory = $${rootdirectory:bin} -link-binary = - ${coreutils:location}/bin/basename - ${coreutils:location}/bin/cat - ${coreutils:location}/bin/cp - ${coreutils:location}/bin/ls - ${coreutils:location}/bin/tr - ${coreutils:location}/bin/uname - ${git:location}/bin/git - ${graphviz:location}/bin/dot - ${grep:location}/bin/grep - ${imagemagick:location}/bin/convert - ${imagemagick:location}/bin/identify - ${mariadb:location}/bin/mysql - ${mariadb:location}/bin/mysqldump - ${pdftk:location}/bin/pdftk - ${sed:location}/bin/sed - ${tesseract:location}/bin/tesseract - ${w3m:location}/bin/w3m - ${poppler:location}/bin/pdfinfo - ${poppler:location}/bin/pdftotext - ${poppler:location}/bin/pdftohtml -[certificate-authority] -recipe = slapos.cookbook:certificate_authority -openssl-binary = ${openssl:location}/bin/openssl -ca-dir = $${directory:ca-dir} -requests-directory = $${cadirectory:requests} -wrapper = $${basedirectory:services}/ca -ca-private = $${cadirectory:private} -ca-certs = $${cadirectory:certs} -ca-newcerts = $${cadirectory:newcerts} -ca-crl = $${cadirectory:crl} - -[bt5-erp5-link] -recipe = slapos.cookbook:symbolic.link -target-directory = $${basedirectory:bt5-erp5} -link-binary = - ${erp5:location}/product/ERP5/bootstrap - ${erp5:location}/bt5 - -[cadirectory] -recipe = slapos.cookbook:mkdirectory -requests = $${directory:ca-dir}/requests -private = $${directory:ca-dir}/private -certs = $${directory:ca-dir}/certs -newcerts = $${directory:ca-dir}/newcerts -crl = $${directory:ca-dir}/crl - -[rootdirectory] -recipe = slapos.cookbook:mkdirectory -etc = $${buildout:directory}/etc -var = $${buildout:directory}/var -srv = $${buildout:directory}/srv -bin = $${buildout:directory}/bin -tmp = $${buildout:directory}/tmp - -[basedirectory] -recipe = slapos.cookbook:mkdirectory -log = $${rootdirectory:var}/log -services = $${rootdirectory:etc}/run -run = $${rootdirectory:var}/run -backup = $${rootdirectory:srv}/backup -bt5-erp5 = $${rootdirectory:var}/bt5_erp5 - -[erp5-certificate-authority] -recipe = slapos.cookbook:certificate_authority -openssl-binary = ${openssl:location}/bin/openssl -ca-dir = $${directory:erp5-ca-dir} -requests-directory = $${erp5-cadirectory:requests} -wrapper = $${basedirectory:services}/erp5-ca -ca-private = $${erp5-cadirectory:private} -ca-certs = $${erp5-cadirectory:certs} -ca-newcerts = $${erp5-cadirectory:newcerts} -ca-crl = $${erp5-cadirectory:crl} - -[erp5-cadirectory] -recipe = slapos.cookbook:mkdirectory -requests = $${directory:erp5-ca-dir}/requests/ -private = $${directory:erp5-ca-dir}/private/ -certs = $${directory:erp5-ca-dir}/certs/ -newcerts = $${directory:erp5-ca-dir}/newcerts/ -crl = $${directory:erp5-ca-dir}/crl/ - -[directory] -recipe = slapos.cookbook:mkdirectory -zodb = $${rootdirectory:srv}/zodb -instance = $${rootdirectory:srv}/erp5shared -instance-etc = $${:instance}/etc -apache-conf = $${rootdirectory:etc}/apache -instance-etc-package-include = $${:instance}/etc/package-include -# because of bug in slapos.recipe.template keys are lowercased -instance-document = $${:instance}/Document -instance-propertysheet = $${:instance}/PropertySheet -instance-products = $${:instance}/Products -instance-extensions = $${:instance}/Extensions -instance-constraint = $${:instance}/Constraint -instance-import = $${:instance}/import -instance-lib = $${:instance}/lib -instance-tests = $${:instance}/tests -erp5-ca-dir = $${rootdirectory:srv}/erp5-ca/ -ca-dir = $${rootdirectory:srv}/ssl -cron-entries = $${rootdirectory:etc}/cron.d -crontabs = $${rootdirectory:etc}/crontabs -cronstamps = $${rootdirectory:etc}/cronstamps -cronoutput = $${basedirectory:log}/cron -logrotate-backup = $${basedirectory:backup}/logrotate -logrotate-entries = $${rootdirectory:etc}/logrotate.d diff --git a/software/erp5/instance.cfg b/software/erp5/instance.cfg index 8abb090d5..b3e2d8929 100644 --- a/software/erp5/instance.cfg +++ b/software/erp5/instance.cfg @@ -1,44 +1,81 @@ -[instance] -rdiff_backup_binary = ${buildout:bin-directory}/rdiff-backup - [buildout] - parts = - switch-softwaretype + instance eggs-directory = ${buildout:eggs-directory} develop-eggs-directory = ${buildout:develop-eggs-directory} -offline = true -[dynamic-template-tidstorage] -recipe = slapos.cookbook:generate.erp5.tidstorage -snippet-zeo = ${template-snippet-zeo:output} -snippet-zope = ${template-snippet-zope:output} -snippet-master = ${template-snippet-master:output} -snippet-backend = ${template-snippet-backend:output} +[instance] +recipe = ${instance-recipe:egg}:${instance-recipe:module} +dcrond_binary = ${dcron:location}/sbin/crond +haproxy_binary = ${haproxy:location}/sbin/haproxy +gzip_binary = ${gzip:location}/bin/gzip +httpd_binary = ${apache:location}/bin/httpd +innobackupex_binary = ${xtrabackup:location}/bin/innobackupex +kumo_gateway_binary = ${kumo:location}/bin/kumo-gateway +kumo_manager_binary = ${kumo:location}/bin/kumo-manager +kumo_server_binary = ${kumo:location}/bin/kumo-server +logrotate_binary = ${logrotate:location}/usr/sbin/logrotate +memcached_binary = ${memcached:location}/bin/memcached +mysql_binary = ${mariadb:location}/bin/mysql +mysql_install_binary = ${mariadb:location}/bin/mysql_install_db +mysql_upgrade_binary = ${mariadb:location}/bin/mysql_upgrade +mysqld_binary = ${mariadb:location}/libexec/mysqld +openssl_binary = ${openssl:location}/bin/openssl +perl_binary = ${perl:location}/bin/perl +rdiff_backup_binary = ${buildout:bin-directory}/rdiff-backup +repozo_binary = ${buildout:bin-directory}/repozo +runTestSuite_binary = ${buildout:bin-directory}/runTestSuite +runUnitTest_binary = ${buildout:bin-directory}/runUnitTest +runzeo_binary = ${buildout:bin-directory}/runzeo +runzope_binary = ${buildout:bin-directory}/runzope +tidstorage_repozo_binary = ${buildout:bin-directory}/tidstorage_repozo +tidstoraged_binary = ${buildout:bin-directory}/tidstoraged +xtrabackup_binary = ${xtrabackup:location}/bin/xtrabackup_51 +zabbix_agent_binary = ${zabbix-agent:location}/sbin/zabbix_agent +mk-variable-advisor_binary = ${perl:siteprefix}/bin/mk-variable-advisor +mk-table-usage_binary = ${perl:siteprefix}/bin/mk-table-usage +mk-visual-explain_binary = ${perl:siteprefix}/bin/mk-visual-explain +mk-config-diff_binary = ${perl:siteprefix}/bin/mk-config-diff +mk-deadlock-logger_binary = ${perl:siteprefix}/bin/mk-deadlock-logger +mk-error-log_binary = ${perl:siteprefix}/bin/mk-error-log +mk-index-usage_binary = ${perl:siteprefix}/bin/mk-index-usage +mk-query-advisor_binary = ${perl:siteprefix}/bin/mk-query-advisor + +# cloudooo specific configuration +ooo_binary_path = ${libreoffice-bin:location}/program +ooo_paster = ${buildout:bin-directory}/cloudooo_paster +ooo_uno_path = ${libreoffice-bin:location}/basis-link/program + +link_binary_list = + ${coreutils:location}/bin/basename + ${coreutils:location}/bin/cat + ${coreutils:location}/bin/cp + ${coreutils:location}/bin/ls + ${coreutils:location}/bin/tr + ${coreutils:location}/bin/uname + ${git:location}/bin/git + ${graphviz:location}/bin/dot + ${grep:location}/bin/grep + ${imagemagick:location}/bin/convert + ${imagemagick:location}/bin/identify + ${mariadb:location}/bin/mysql + ${mariadb:location}/bin/mysqldump + ${pdftk:location}/bin/pdftk + ${sed:location}/bin/sed + ${tesseract:location}/bin/tesseract + ${w3m:location}/bin/w3m + ${poppler:location}/bin/pdfinfo + ${poppler:location}/bin/pdftotext + ${poppler:location}/bin/pdftohtml -[dynamic-template-cloudooo] -recipe = slapos.cookbook:generate.cloudooo -template = ${template-cloudooo:output} -snippet-fontconfig = ${template-snippet-fontconfig:output} +# XXX: products won't be needed as soon as all ERP5 (and products-deps) +# products will be eggified so then it will be possible to use them thanks to +# availability in software's eggs +products = ${products:list} +environment = + LD_LIBRARY_PATH = ${file:location}/lib:${zlib:location}/lib:${freetype:location}/lib:${libXext:location}/lib:${libXau:location}/lib:${libX11:location}/lib:${libXdmcp:location}/lib:${libxcb:location}/lib -[switch-softwaretype] -recipe = slapos.cookbook:softwaretype -default = ${template-erp5-development:output} -production = ${template-erp5-production:output} -kumofs = ${template-kumofs:output} -memcached = ${template-memcached:output} -cloudooo = $${dynamic-template-cloudooo:output} -zope = ${template-zope:output} -mariadb = ${template-mariadb:output} -sphinx = ${template-sphinx:output} -tidstorage = $${dynamic-template-tidstorage:output} +bt5_repository_list = ${bt5-repository:list} -[slap-connection] -# part to migrate to new - separated words -computer-id = $${slap_connection:computer_id} -partition-id = $${slap_connection:partition_id} -server-url = $${slap_connection:server_url} -software-release-url = $${slap_connection:software_release_url} -key-file = $${slap_connection:key_file} -cert-file = $${slap_connection:cert_file} +configurator_bt5_list = ${instance-recipe:configurator_bt5_list} diff --git a/software/erp5/snippet-backend.cfg b/software/erp5/snippet-backend.cfg deleted file mode 100644 index b18a7f208..000000000 --- a/software/erp5/snippet-backend.cfg +++ /dev/null @@ -1,42 +0,0 @@ -[apache-%(backend_name)s] -recipe = slapos.cookbook:apache.zope.backend -backend = http://$${haproxy-%(backend_name)s:ip}:$${haproxy-%(backend_name)s:port}/ -ip = $${slap-network-information:global-ipv6} -port = %(apache_port)s -wrapper = $${rootdirectory:bin}/apache-%(backend_name)s -key-file = $${directory:apache-conf}/apache-%(backend_name)s.key -cert-file = $${directory:apache-conf}/apache-%(backend_name)s.crt -configuration-file = $${directory:apache-conf}/apache-%(backend_name)s.conf -access-control-string = %(access_control_string)s -pid-file = $${basedirectory:run}/apache-%(backend_name)s.pid -lock-file = $${basedirectory:run}/apache-%(backend_name)s.lock -error-log = $${basedirectory:log}/apache-%(backend_name)s-error.log -access-log = $${basedirectory:log}/apache-%(backend_name)s-access.log -apache-binary = ${apache:location}/bin/httpd - -[ca-apache-%(backend_name)s] -<= certificate-authority -recipe = slapos.cookbook:certificate_authority.request -key-file = $${apache-%(backend_name)s:key-file} -cert-file = $${apache-%(backend_name)s:cert-file} -executable = $${apache-%(backend_name)s:wrapper} -wrapper = $${basedirectory:services}/apache-%(backend_name)s - -[logrotate-entry-apache-%(backend_name)s] -<= logrotate -recipe = slapos.cookbook:logrotate.d -name = apache-%(backend_name)s -log = $${apache-%(backend_name)s:error-log} $${apache-%(backend_name)s:access-log} -post = ${buildout:bin-directory}/killpidfromfile $${apache-%(backend_name)s:pid-file} SIGUSR1 - -[haproxy-%(backend_name)s] -recipe = slapos.cookbook:haproxy -name = %(backend_name)s -conf-path = $${rootdirectory:etc}/haproxy-%(backend_name)s.cfg -ip = $${slap-network-information:local-ipv4} -port = %(haproxy_port)s -maxconn = %(maxconn)s -server-check-path = %(server_check_path)s -wrapper-path = $${basedirectory:services}/haproxy-%(backend_name)s -binary-path = ${haproxy:location}/sbin/haproxy -backend-list = %(haproxy_backend_list)s diff --git a/software/erp5/snippet-fontconfig.cfg b/software/erp5/snippet-fontconfig.cfg deleted file mode 100644 index 7d99ce0c7..000000000 --- a/software/erp5/snippet-fontconfig.cfg +++ /dev/null @@ -1,2 +0,0 @@ -[dynamic-fontconfig-instance] -url-list = %(font_url_list)s diff --git a/software/erp5/snippet-master.cfg b/software/erp5/snippet-master.cfg deleted file mode 100644 index 8c44deb8e..000000000 --- a/software/erp5/snippet-master.cfg +++ /dev/null @@ -1,235 +0,0 @@ -############################# -# -# Instanciate zeo -# -# zeo-id -- local id of the requested zeo (1,2,3,...) -# -# zeo-port -- ip port to use to run the process -# -# storage_list -- string with list of all resquested storage -# Example: event_module person_module -# -############################# -[buildout] -parts = - logrotate - cron - cron-entry-logrotate - certificate-authority - erp5-certificate-authority - tidstorage - cron-entry-tidstorage-backup - logrotate-entry-tidstorage - binary-link - erp5-update - %(part_list)s - -eggs-directory = ${buildout:eggs-directory} -develop-eggs-directory = ${buildout:develop-eggs-directory} -offline = true - -[tidstorage] -recipe = slapos.cookbook:tidstorage -known-tid-storage-identifier-dict = %(known_tid_storage_identifier_dict)s -base-url = http://$${%(haproxy_section)s:ip}:$${%(haproxy_section)s:port}/%%s/serialize -configuration-path = $${rootdirectory:etc}/tidstorage.py -ip = $${slap-network-information:local-ipv4} -port = 6001 -timestamp-file-path = $${directory:tidstorage}/repozo_tidstorage_timestamp.log -logfile-name = $${basedirectory:log}/tidstorage.log -pidfile-name = $${basedirectory:run}/tidstorage.pid -status-file = $${directory:tidstorage}/tidstorage.tid -tidstorage-repozo-binary = ${buildout:bin-directory}/tidstorage_repozo -tidstoraged-binary = ${buildout:bin-directory}/tidstoraged -repozo-binary = ${buildout:bin-directory}/repozo -tidstorage-wrapper = $${basedirectory:services}/tidstoraged -repozo-wrapper = $${buildout:bin-directory}/tidstorage-repozo - -[cron-entry-tidstorage-backup] -<= cron -recipe = slapos.cookbook:cron.d -name = tidstorage -frequency = 0 0 * * * -command = $${tidstorage:repozo-wrapper} - -[logrotate-entry-tidstorage] -<= logrotate -recipe = slapos.cookbook:logrotate.d -name = tidstorage -log = $${tidstorage:logfile-name} -post = ${buildout:bin-directory}/killpidfromfile $${tidstorage:pidfile-name} SIGHUP - -[directory] -recipe = slapos.cookbook:mkdirectory -cron-entries = $${rootdirectory:etc}/cron.d/ -crontabs = $${rootdirectory:etc}/crontabs/ -cronstamps = $${rootdirectory:etc}/cronstamps/ -cronoutput = $${basedirectory:log}/cron/ -logrotate-backup = $${basedirectory:backup}/logrotate/ -logrotate-entries = $${rootdirectory:etc}/logrotate.d/ - -[cron] -recipe = slapos.cookbook:cron -dcrond-binary = ${dcron:location}/sbin/crond -cron-entries = $${directory:cron-entries} -crontabs = $${directory:crontabs} -cronstamps = $${directory:cronstamps} -catcher = $${cron-simplelogger:binary} -binary = $${basedirectory:services}/crond - -[cron-simplelogger] -recipe = slapos.cookbook:simplelogger -binary = $${rootdirectory:bin}/cron_simplelogger -output = $${directory:cronoutput} - -[cron-entry-logrotate] -<= cron -recipe = slapos.cookbook:cron.d -name = logrotate -frequency = 0 0 * * * -command = $${logrotate:wrapper} - -# rest of parts are candidates for some generic stuff - -[logrotate] -recipe = slapos.cookbook:logrotate -# Binaries -logrotate-binary = ${logrotate:location}/usr/sbin/logrotate -gzip-binary = ${gzip:location}/bin/gzip -gunzip-binary = ${gzip:location}/bin/gunzip -# Directories -wrapper = $${rootdirectory:bin}/logrotate -conf = $${rootdirectory:etc}/logrotate.conf -logrotate-entries = $${directory:logrotate-entries} -backup = $${directory:logrotate-backup} -state-file = $${rootdirectory:srv}/logrotate.status - -[zeo-instance-entry-common] -recipe = slapos.cookbook:zeo -ip = $${slap-network-information:local-ipv4} -binary-path = ${buildout:bin-directory}/runzeo - -[erp5-certificate-authority] -recipe = slapos.cookbook:certificate_authority -openssl-binary = ${openssl:location}/bin/openssl -ca-dir = $${directory:erp5-ca-dir} -requests-directory = $${erp5-cadirectory:requests} -wrapper = $${basedirectory:services}/erp5-ca -ca-private = $${erp5-cadirectory:private} -ca-certs = $${erp5-cadirectory:certs} -ca-newcerts = $${erp5-cadirectory:newcerts} -ca-crl = $${erp5-cadirectory:crl} - -[erp5-cadirectory] -recipe = slapos.cookbook:mkdirectory -requests = $${directory:erp5-ca-dir}/requests/ -private = $${directory:erp5-ca-dir}/private/ -certs = $${directory:erp5-ca-dir}/certs/ -newcerts = $${directory:erp5-ca-dir}/newcerts/ -crl = $${directory:erp5-ca-dir}/crl/ - -[certificate-authority] -recipe = slapos.cookbook:certificate_authority -openssl-binary = ${openssl:location}/bin/openssl -ca-dir = $${directory:ca-dir} -requests-directory = $${cadirectory:requests} -wrapper = $${basedirectory:services}/ca -ca-private = $${cadirectory:private} -ca-certs = $${cadirectory:certs} -ca-newcerts = $${cadirectory:newcerts} -ca-crl = $${cadirectory:crl} - -[cadirectory] -recipe = slapos.cookbook:mkdirectory -requests = $${directory:ca-dir}/requests/ -private = $${directory:ca-dir}/private/ -certs = $${directory:ca-dir}/certs/ -newcerts = $${directory:ca-dir}/newcerts/ -crl = $${directory:ca-dir}/crl/ - -[rootdirectory] -recipe = slapos.cookbook:mkdirectory -etc = $${buildout:directory}/etc/ -var = $${buildout:directory}/var/ -srv = $${buildout:directory}/srv/ -bin = $${buildout:directory}/bin/ -tmp = $${buildout:directory}/tmp/ - -[basedirectory] -recipe = slapos.cookbook:mkdirectory -log = $${rootdirectory:var}/log/ -services = $${rootdirectory:etc}/run/ -run = $${rootdirectory:var}/run/ -backup = $${rootdirectory:srv}/backup/ - -[directory] -recipe = slapos.cookbook:mkdirectory -tidstorage = $${rootdirectory:srv}/tidstorage/ -zodb = $${rootdirectory:srv}/zodb/ -zodb-backup = $${basedirectory:backup}/zodb -instance = $${rootdirectory:srv}/erp5shared/ -instance-etc = $${:instance}/etc -apache-conf = $${rootdirectory:etc}/apache -instance-etc-package-include = $${:instance}/etc/package-include -# because of bug in slapos.recipe.template keys are lowercased -instance-document = $${:instance}/Document -instance-propertysheet = $${:instance}/PropertySheet -instance-products = $${:instance}/Products -instance-extensions = $${:instance}/Extensions -instance-constraint = $${:instance}/Constraint -instance-import = $${:instance}/import -instance-lib = $${:instance}/lib -instance-tests = $${:instance}/tests -erp5-ca-dir = $${rootdirectory:srv}/erp5-ssl/ -ca-dir = $${rootdirectory:srv}/ssl/ -cron-entries = $${rootdirectory:etc}/cron.d/ -crontabs = $${rootdirectory:etc}/crontabs/ -cronstamps = $${rootdirectory:etc}/cronstamps/ -cronoutput = $${basedirectory:log}/cron/ -logrotate-backup = $${basedirectory:backup}/logrotate/ -logrotate-entries = $${rootdirectory:etc}/logrotate.d/ - -[binary-link] -recipe = slapos.cookbook:symbolic.link -target-directory = $${rootdirectory:bin} -link-binary = - ${coreutils:location}/bin/basename - ${coreutils:location}/bin/cat - ${coreutils:location}/bin/cp - ${coreutils:location}/bin/ls - ${coreutils:location}/bin/tr - ${coreutils:location}/bin/uname - ${git:location}/bin/git - ${graphviz:location}/bin/dot - ${grep:location}/bin/grep - ${imagemagick:location}/bin/convert - ${imagemagick:location}/bin/identify - ${mariadb:location}/bin/mysql - ${mariadb:location}/bin/mysqldump - ${pdftk:location}/bin/pdftk - ${sed:location}/bin/sed - ${tesseract:location}/bin/tesseract - ${w3m:location}/bin/w3m - ${poppler:location}/bin/pdfinfo - ${poppler:location}/bin/pdftotext - ${poppler:location}/bin/pdftohtml - -[erp5-update] -recipe = slapos.cookbook:erp5.update - -# Configuration -url = http://$${%(zope_section)s:user}:$${%(zope_section)s:password}@$${%(zope_section)s:ip}:$${%(zope_section)s:port}/ -mysql-url = %(mysql-url)s -kumofs-url = %(kumofs-url)s -memcached-url = %(memcached-url)s -cloudooo-url = %(cloudooo-url)s -site-id = %(site_id)s -openssl-binary = ${openssl:location}/bin/openssl -cadir-path = $${erp5-certificate-authority:ca-dir} - -# Paths -update-wrapper = $${basedirectory:services}/erp5-update - -# Defaults -configurator-bt5-list = erp5_full_text_myisam_catalog erp5_configurator_standard erp5_configurator_maxma_demo erp5_configurator_ung erp5_configurator_ung erp5_configurator_run_my_doc -bt5-repository-list = $${%(zope_section)s:bt5-repository-list} diff --git a/software/erp5/snippet-zeo.cfg b/software/erp5/snippet-zeo.cfg deleted file mode 100644 index 2af5fd083..000000000 --- a/software/erp5/snippet-zeo.cfg +++ /dev/null @@ -1,16 +0,0 @@ -[zeo-instance-%(zeo_id)s] -<= zeo-instance-entry-common -log-path = $${basedirectory:log}/zeo-%(zeo_id)s.log -pid-path = $${basedirectory:run}/zeo-%(zeo_id)s.pid -conf-path = $${rootdirectory:etc}/zeo-%(zeo_id)s.conf -port = %(zeo_port)s -storage = - %(storage_list)s -wrapper-path = $${basedirectory:services}/zeo-%(zeo_id)s - -[logrotate-entry-zeo-%(zeo_id)s] -<= logrotate -recipe = slapos.cookbook:logrotate.d -name = zeo-%(zeo_id)s -log = $${zeo-instance-%(zeo_id)s:log-path} -post = ${buildout:bin-directory}/killpidfromfile $${zeo-instance-%(zeo_id)s:pid-path} SIGUSR2 diff --git a/software/erp5/snippet-zope.cfg b/software/erp5/snippet-zope.cfg deleted file mode 100644 index a4a9c581c..000000000 --- a/software/erp5/snippet-zope.cfg +++ /dev/null @@ -1,52 +0,0 @@ -[%(zope_id)s] -recipe = slapos.cookbook:generic.zope.zeo.client - -# XXX: products won't be needed as soon as all ERP5 (and products-deps) -# products will be eggified so then it will be possible to use them thanks to -# availability in software's eggs -products = ${products:list} - -# Options -user = zope -port = %(zope_port)s -ip = $${slap-network-information:local-ipv4} -thread-amount = %(zope_thread_amount)s -deadlock-path = /manage_debug_threads -timezone = %(timezone)s -zeo-connection-string = - %(zeo_connection_string)s - -timeserver = %(zope_timeserver)s - -# long request -longrequest-logger-file = %(longrequest_logger_file)s -longrequest-logger-timeout = %(longrequest_logger_timeout)s -longrequest-logger-interval = %(longrequest_logger_interval)s - -# Paths -wrapper = $${basedirectory:services}/%(zope_id)s -instance-path = $${directory:instance} -instance-etc = $${directory:instance-etc} -instance-products = $${directory:instance-products} -bt5-repository = $${rootdirectory:var}/bt5_repository -tmp-path = $${rootdirectory:tmp} -bin-path = $${rootdirectory:bin} -site-zcml = $${:instance-etc}/site.zcml -pid-file = $${basedirectory:run}/%(zope_id)s.pid -lock-file = $${basedirectory:run}/%(zope_id)s.lock -event-log = $${basedirectory:log}/%(zope_id)s-event.log -z2-log = $${basedirectory:log}/%(zope_id)s-Z2.log -configuration-file = $${rootdirectory:etc}/%(zope_id)s.conf -inituser = $${:instance-path}/inituser -# Binary information -runzope-binary = ${buildout:bin-directory}/runzope - -# BT5 Configuration -bt5-repository-list = - -[logrotate-entry-%(zope_id)s] -<= logrotate -recipe = slapos.cookbook:logrotate.d -name = %(zope_id)s -log = $${%(zope_id)s:event-log} $${%(zope_id)s:z2-log} -post = ${buildout:bin-directory}/killpidfromfile $${%(zope_id)s:pid-file} SIGUSR2 diff --git a/software/erp5/software.cfg b/software/erp5/software.cfg index 7f4eade21..2ce9f56cc 100644 --- a/software/erp5/software.cfg +++ b/software/erp5/software.cfg @@ -5,14 +5,7 @@ extends = versions = versions -# Local development -develop = - ${:parts-directory}/slapos.cookbook-repository parts += -# Local development - slapos.cookbook-repository - check-recipe - slapos.cookbook-python2.6 # Create instance template template validator @@ -22,177 +15,168 @@ parts += # development / fast switching environment for whole software unzip = true -# Local development -[slapos.cookbook-repository] -recipe = plone.recipe.command -stop-on-error = true -location = ${buildout:parts-directory}/${:_buildout_section_name_} -command = ${git:location}/bin/git clone --branch erp5 --quiet http://git.erp5.org/repos/slapos.git ${:location} -update-command = cd ${:location} && ${git:location}/bin/git pull --quiet - -[check-recipe] -recipe = plone.recipe.command -stop-on-error = true -update-command = ${:command} -command = grep parts ${buildout:develop-eggs-directory}/slapos.cookbook.egg-link - -[slapos.cookbook-python2.6] -recipe = zc.recipe.egg -eggs = slapos.cookbook -scripts = -python = python2.6 - -[template-mariadb] -recipe = slapos.recipe.template -url = ${:_profile_base_location_}/instance-mariadb.cfg -md5sum = 3225a2ba7337505bdeb95867f5028891 -output = ${buildout:directory}/template-mariadb.cfg -mode = 0644 - -[template-sphinx] -recipe = slapos.recipe.template -url = ${:_profile_base_location_}/instance-sphinx.cfg -md5sum = b6d196fb9014222dacef13a0d12a445d -output = ${buildout:directory}/template-sphinx.cfg -mode = 0644 - -[template-zope] -recipe = slapos.recipe.template -url = ${:_profile_base_location_}/instance-zope.cfg -md5sum = 769a7ba8e8c5865637e374376be8cbcd -output = ${buildout:directory}/template-zope.cfg -mode = 0644 - -[template-cloudooo] -recipe = slapos.recipe.template -url = ${:_profile_base_location_}/instance-cloudooo.cfg -md5sum = 8ea2839e951f26af2bc74b9a8c0fa5c2 -output = ${buildout:directory}/template-cloudooo.cfg -mode = 0644 - -[template-snippet-fontconfig] -recipe = slapos.recipe.template -url = ${:_profile_base_location_}/snippet-fontconfig.cfg -md5sum = 76c5d4cd1c8d48648684d9873f1ffed3 -output = ${buildout:directory}/template-snippet-fontconfig.cfg -mode = 0644 - -[template-kumofs] -recipe = slapos.recipe.template -url = ${:_profile_base_location_}/instance-kumofs.cfg -md5sum = c12d8dc1925d16a75247971086734aa8 -output = ${buildout:directory}/template-kumofs.cfg -mode = 0644 +[instance-recipe] +# Note: In case if specific instantiation recipe is used this is the place to +# put its name +egg = slapos.cookbook +module = erp5 # Additional Configuration configurator_bt5_list = erp5_core_proxy_field_legacy erp5_full_text_myisam_catalog erp5_base erp5_workflow erp5_configurator erp5_configurator_standard erp5_configurator_maxma_demo erp5_configurator_ung [template] +# Default template for erp5 instance. recipe = slapos.recipe.template url = ${:_profile_base_location_}/instance.cfg -md5sum = 961d404f5726fce7c4d8b34d7e120077 +md5sum = 77062d472e88aca0fe632bdee4f9bb21 output = ${buildout:directory}/template.cfg mode = 0644 -[template-memcached] -recipe = slapos.recipe.template -url = ${:_profile_base_location_}/instance-memcached.cfg -md5sum = 9a1462f3e34b99f384ae47b48a3a733c -output = ${buildout:directory}/template-memcached.cfg -mode = 0644 - -[template-erp5-development] -recipe = slapos.recipe.template -url = ${:_profile_base_location_}/instance-erp5-development.cfg -md5sum = 9af9db6f1220ffe42e030c81f9072669 -output = ${buildout:directory}/template-erp5-development.cfg -mode = 0644 - -[template-erp5-production] -recipe = slapos.recipe.template -url = ${:_profile_base_location_}/instance-erp5-production.cfg -md5sum = 32f6537110bbc29e7cc5613695863096 -output = ${buildout:directory}/template-erp5-production.cfg -mode = 0644 - -[template-snippet-zeo] -recipe = slapos.recipe.template -url = ${:_profile_base_location_}/snippet-zeo.cfg -md5sum = ca9ee3825ff90c5c894ff1da8c601552 -output = ${buildout:directory}/template-snippet-zeo.cfg -mode = 0644 - -[template-snippet-master] -recipe = slapos.recipe.template -url = ${:_profile_base_location_}/snippet-master.cfg -md5sum = c9bea484c2827954b9f9f728ce0342fb -output = ${buildout:directory}/template-snippet-master.cfg -mode = 0644 - -[template-snippet-zope] -recipe = slapos.recipe.template -url = ${:_profile_base_location_}/snippet-zope.cfg -md5sum = 99fcce6aa6120787870522898650800d -output = ${buildout:directory}/template-snippet-zope.cfg -mode = 0644 - -[template-snippet-backend] -recipe = slapos.recipe.template -url = ${:_profile_base_location_}/snippet-backend.cfg -md5sum = e2b26547ba1435ec1b8e8cd1de89e2c6 -output = ${buildout:directory}/template-snippet-backend.cfg -mode = 0644 - [validator] # Default json schema for instance parameters. recipe = slapos.recipe.template url = ${:_profile_base_location_}/configuration.json -md5sum = cbe1d75339c6cb20e1aef818797face1 +md5sum = cbe1d75339c6cb20e1aef818797face1 output = ${buildout:directory}/schema.json mode = 0644 -[networkcache] -# signature certificates of the following uploaders. -# Romain Courteaud -# Sebastien Robin -# Kazuhiko Shiozaki -signature-certificate-list = - -----BEGIN CERTIFICATE----- - MIIB4DCCAUkCADANBgkqhkiG9w0BAQsFADA5MQswCQYDVQQGEwJGUjEZMBcGA1UE - CBMQRGVmYXVsdCBQcm92aW5jZTEPMA0GA1UEChMGTmV4ZWRpMB4XDTExMDkxNTA5 - MDAwMloXDTEyMDkxNTA5MDAwMlowOTELMAkGA1UEBhMCRlIxGTAXBgNVBAgTEERl - ZmF1bHQgUHJvdmluY2UxDzANBgNVBAoTBk5leGVkaTCBnzANBgkqhkiG9w0BAQEF - AAOBjQAwgYkCgYEApYZv6OstoqNzxG1KI6iE5U4Ts2Xx9lgLeUGAMyfJLyMmRLhw - boKOyJ9Xke4dncoBAyNPokUR6iWOcnPHtMvNOsBFZ2f7VA28em3+E1JRYdeNUEtX - Z0s3HjcouaNAnPfjFTXHYj4um1wOw2cURSPuU5dpzKBbV+/QCb5DLheynisCAwEA - ATANBgkqhkiG9w0BAQsFAAOBgQBCZLbTVdrw3RZlVVMFezSHrhBYKAukTwZrNmJX - mHqi2tN8tNo6FX+wmxUUAf3e8R2Ymbdbn2bfbPpcKQ2fG7PuKGvhwMG3BlF9paEC - q7jdfWO18Zp/BG7tagz0jmmC4y/8akzHsVlruo2+2du2freE8dK746uoMlXlP93g - QUUGLQ== - -----END CERTIFICATE----- - -----BEGIN CERTIFICATE----- - MIIB8jCCAVugAwIBAgIJAPu2zchZ2BxoMA0GCSqGSIb3DQEBBQUAMBIxEDAOBgNV - BAMMB3RzeGRldjMwHhcNMTExMDE0MTIxNjIzWhcNMTIxMDEzMTIxNjIzWjASMRAw - DgYDVQQDDAd0c3hkZXYzMIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCrPbh+ - YGmo6mWmhVb1vTqX0BbeU0jCTB8TK3i6ep3tzSw2rkUGSx3niXn9LNTFNcIn3MZN - XHqbb4AS2Zxyk/2tr3939qqOrS4YRCtXBwTCuFY6r+a7pZsjiTNddPsEhuj4lEnR - L8Ax5mmzoi9nE+hiPSwqjRwWRU1+182rzXmN4QIDAQABo1AwTjAdBgNVHQ4EFgQU - /4XXREzqBbBNJvX5gU8tLWxZaeQwHwYDVR0jBBgwFoAU/4XXREzqBbBNJvX5gU8t - LWxZaeQwDAYDVR0TBAUwAwEB/zANBgkqhkiG9w0BAQUFAAOBgQA07q/rKoE7fAda - FED57/SR00OvY9wLlFEF2QJ5OLu+O33YUXDDbGpfUSF9R8l0g9dix1JbWK9nQ6Yd - R/KCo6D0sw0ZgeQv1aUXbl/xJ9k4jlTxmWbPeiiPZEqU1W9wN5lkGuLxV4CEGTKU - hJA/yXa1wbwIPGvX3tVKdOEWPRXZLg== - -----END CERTIFICATE----- - -----BEGIN CERTIFICATE----- - MIIB7jCCAVegAwIBAgIJAJWA0jQ4o9DGMA0GCSqGSIb3DQEBBQUAMA8xDTALBgNV - BAMMBHg2MXMwIBcNMTExMTI0MTAyNDQzWhgPMjExMTEwMzExMDI0NDNaMA8xDTAL - BgNVBAMMBHg2MXMwgZ8wDQYJKoZIhvcNAQEBBQADgY0AMIGJAoGBANdJNiFsRlkH - vq2kHP2zdxEyzPAWZH3CQ3Myb3F8hERXTIFSUqntPXDKXDb7Y/laqjMXdj+vptKk - 3Q36J+8VnJbSwjGwmEG6tym9qMSGIPPNw1JXY1R29eF3o4aj21o7DHAkhuNc5Tso - 67fUSKgvyVnyH4G6ShQUAtghPaAwS0KvAgMBAAGjUDBOMB0GA1UdDgQWBBSjxFUE - RfnTvABRLAa34Ytkhz5vPzAfBgNVHSMEGDAWgBSjxFUERfnTvABRLAa34Ytkhz5v - PzAMBgNVHRMEBTADAQH/MA0GCSqGSIb3DQEBBQUAA4GBAFLDS7zNhlrQYSQO5KIj - z2RJe3fj4rLPklo3TmP5KLvendG+LErE2cbKPqnhQ2oVoj6u9tWVwo/g03PMrrnL - KrDm39slYD/1KoE5kB4l/p6KVOdeJ4I6xcgu9rnkqqHzDwI4v7e8/D3WZbpiFUsY - vaZhjNYKWQf79l6zXfOvphzJ - -----END CERTIFICATE----- +[versions] +MySQL-python = 1.2.3 +Paste = 1.7.5.1 +PasteScript = 1.7.3 +Products.CMFActionIcons = 2.1.3 +Products.CMFCalendar = 2.2.2 +Products.CMFCore = 2.2.4 +Products.CMFDefault = 2.2.2 +Products.CMFTopic = 2.2.1 +Products.CMFUid = 2.2.1 +Products.DCWorkflowGraph = 0.4nxd001 +Products.ExternalEditor = 1.1.0 +Products.GenericSetup = 1.6.3 +Products.MimetypesRegistry = 2.0.2 +Products.PluggableAuthService = 1.7.5 +Products.PluginRegistry = 1.3b1 +Products.TIDStorage = 5.4.7.dev-r45842 +Products.Zelenium = 1.0.3 +StructuredText = 2.11.1 +Werkzeug = 0.6.2 +buildout-versions = 1.6 +cElementTree = 1.0.5-20051216 +chardet = 1.0.1 +cloudooo = 1.2.3 +cloudooo.handler.ffmpeg = 0.1 +cloudooo.handler.imagemagick = 0.1 +cloudooo.handler.ooo = 0.2 +cloudooo.handler.pdf = 0.1 +csp-eventlet = 0.6.0 +elementtree = 1.2.7-20070827-preview +erp5.conflictresolver = 0.3 +erp5.recipe.cmmiforcei686 = 0.1.3 +erp5diff = 0.8.1.3 +eventlet = 0.9.16 +feedparser = 5.0.1 +five.localsitemanager = 2.0.5 +greenlet = 0.3.1 +hexagonit.recipe.cmmi = 1.5.0 +hexagonit.recipe.download = 1.5.0 +http-parser = 0.6.2 +ipdb = 0.4 +meld3 = 0.6.7 +mr.developer = 1.17 +ordereddict = 1.1 +paramiko = 1.7.7.1 +plone.recipe.command = 1.1 +ply = 3.4 +psutil = 0.3.0 +pycrypto = 2.3 +python-ldap = 2.4.1 +python-memcached = 1.45 +restkit = 3.3.0 +rtjp-eventlet = 0.3.2 +slapos.cookbook = 0.16 +slapos.recipe.template = 1.1 +threadframe = 0.2 +timerserver = 2.0.2 +urlnorm = 1.1.2 +uuid = 1.30 +validictory = 0.7.1 +xupdate-processor = 0.4 + +# Required by: +# slapos.core==0.12 +Flask = 0.7.2 + +# Required by: +# PasteScript==1.7.3 +# cloudooo==1.2.3 +PasteDeploy = 1.5.0 + +# Required by: +# cloudooo==1.2.3 +WSGIUtils = 0.7 + +# Required by: +# cloudooo==1.2.3 +# slapos.core==0.12 +argparse = 1.1 + +# Required by: +# slapos.recipe.template==1.1 +collective.recipe.template = 1.8 + +# Required by: +# SOAPpy==0.12.0nxd001 +fpconst = 0.7.2 + +# Required by: +# ipdb==0.4 +ipython = 0.10.2 + +# Required by: +# slapos.cookbook==0.16 +netaddr = 0.7.5 + +# Required by: +# slapos.core==0.12 +netifaces = 0.4 + +# Required by: +# cloudooo==1.2.3 +python-magic = 0.4.0.1 + +# Required by: +# Products.CMFActionIcons==2.1.3 +# Products.CMFCalendar==2.2.2 +# Products.CMFCore==2.2.4 +# Products.CMFDefault==2.2.2 +# Products.CMFTopic==2.2.1 +# Products.CMFUid==2.2.1 +# Products.DCWorkflow==2.2.3nxd002 +# Products.DCWorkflowGraph==0.4nxd001 +# Products.ExternalEditor==1.1.0 +# Products.GenericSetup==1.6.3 +# Products.MimetypesRegistry==2.0.2 +# Products.PluggableAuthService==1.7.5 +# Products.PluginRegistry==1.3b1 +# Products.TIDStorage==5.4.7.dev-r45842 +# Products.Zelenium==1.0.3 +# Zope2==2.12.19 +# five.localsitemanager==2.0.5 +# mr.developer==1.17 +# python-ldap==2.4.1 +# zc.buildout==1.5.3-dev-SlapOS-005 +# zope.deprecation==3.4.0 +# zope.structuredtext==3.4.0 +setuptools = 0.6c12dev-r88846 + +# Required by: +# slapos.cookbook==0.16 +slapos.core = 0.12 + +# Required by: +# slapos.core==0.12 +supervisor = 3.0a10 + +# Required by: +# slapos.cookbook==0.16 +xml-marshaller = 0.9.7 diff --git a/software/erp5scalabilitytestbed/instance.cfg b/software/erp5scalabilitytestbed/instance.cfg deleted file mode 100644 index 72a5f553e..000000000 --- a/software/erp5scalabilitytestbed/instance.cfg +++ /dev/null @@ -1,13 +0,0 @@ -[buildout] -parts = - erp5-scalability-testbed-instance - -eggs-directory = ${buildout:eggs-directory} -develop-eggs-directory = ${buildout:develop-eggs-directory} - -[erp5-scalability-testbed-instance] -<= slap_connection -recipe = slapos.cookbook:erp5scalabilitytestbed -scalability_tester_binary = ${buildout:bin-directory}/scalability_tester_erp5 -scalability_tester_manager_binary = ${buildout:bin-directory}/nosqltester_manager -benchmark_suite_path = ${scalability-test-suite:location} diff --git a/software/erp5scalabilitytestbed/software.cfg b/software/erp5scalabilitytestbed/software.cfg deleted file mode 100644 index 1211dea45..000000000 --- a/software/erp5scalabilitytestbed/software.cfg +++ /dev/null @@ -1,60 +0,0 @@ -[buildout] -recipe_location = ${:parts-directory}/slapos.cookbook -develop = ${:recipe_location} - -extends = - http://git.erp5.org/gitweb/slapos.git/blob_plain/refs/heads/erp5scalabilitytestbed:/component/lxml-python/buildout.cfg - -find-links = - http://www.nexedi.org/static/packages/source/slapos.buildout/ - http://www.nexedi.org/static/packages/source/ - -parts = - template - eggs - checkrecipe - scalability-test-suite - -versions = versions - -[checkrecipe] -recipe = plone.recipe.command -stop-on-error = true -update-command = ${:command} -command = grep parts ${buildout:develop-eggs-directory}/slapos.cookbook.egg-link - -[slapos.cookbook] -recipe = plone.recipe.command -stop-on-error = true -location = ${buildout:parts-directory}/${:_buildout_section_name_} -command = git clone -b erp5scalabilitytestbed --quiet http://git.erp5.org/repos/slapos.git ${:location} -update-command = cd ${:location} && git pull --quiet - -[eggs] -dummy = ${slapos.cookbook:location} -recipe = zc.recipe.egg -eggs = - collective.recipe.template - slapos.core - slapos.cookbook - slapos.tool.nosqltester - slapos.tool.nosqltester_manager - slapos.tool.nosqltester_manager.plugin.erp5 - erp5.utils.benchmark - -[scalability-test-suite] -recipe = plone.recipe.command -location = ${buildout:parts-directory}/${:_buildout_section_name_} -command = tar -C ${buildout:parts-directory} -zxf /var/tmp/erp5_scalability_test_suite.tar.gz -update-command = ${:command} - -[template] -recipe = slapos.recipe.template -url = ${:_profile_base_location_}/instance.cfg -md5sum = 843d97aa6439610ec2d53475e2606581 -output = ${buildout:directory}/template.cfg -mode = 0644 - -[versions] -# Use SlapOS patched zc.buildout -zc.buildout = 1.5.3-dev-SlapOS-001 diff --git a/software/erp5testnode/instance-default.cfg b/software/erp5testnode/instance-default.cfg deleted file mode 100644 index 61d7e8506..000000000 --- a/software/erp5testnode/instance-default.cfg +++ /dev/null @@ -1,150 +0,0 @@ -[buildout] - -eggs-directory = ${buildout:eggs-directory} -develop-eggs-directory = ${buildout:develop-eggs-directory} -offline = true - -parts = - connection-dict - testnode - pwgen - shell - shellinabox - certificate-authority - ca-shellinabox - -[connection-dict] -recipe = slapos.cookbook:publish -url = http://[$${shellinabox:ipv6}]:$${shellinabox:port}/ -password = $${pwgen:password} - -[pwgen] -recipe = slapos.cookbook:pwgen -file = $${buildout:directory}/.password -pwgen-binary = ${pwgen:location}/bin/pwgen - -[testnode] -recipe = slapos.cookbook:erp5testnode - -slapos-directory = $${directory:slapos} -working-directory = $${directory:testnode} -test-suite-directory = $${directory:test-suite} -proxy-host = $${slap-network-information:global-ipv6} -proxy-port = 5000 -log-directory = $${directory:log} -run-directory = $${directory:run} -test-suite-title = $${slap-parameter:test-suite-title} -test-node-title = $${slap-parameter:test-node-title} -test-suite = $${slap-parameter:test-suite} -node-quantity = $${slap-parameter:node-quantity} -project-title = $${slap-parameter:project-title} -ipv4-address = $${slap-network-information:local-ipv4} -ipv6-address = $${slap-network-information:global-ipv6} -test-suite-master-url = $${slap-parameter:test-suite-master-url} -bt5-path = $${slap-parameter:additional-bt5-repository-id} -instance-dict = $${slap-parameter:instance-dict} -repository-list = $${slap-parameter:vcs-repository-list} - -git-binary = ${git:location}/bin/git -slapgrid-partition-binary = ${buildout:bin-directory}/slapgrid-cp -slapgrid-software-binary = ${buildout:bin-directory}/slapgrid-sr -slapproxy-binary = ${buildout:bin-directory}/slapproxy -svn-binary = ${subversion:location}/bin/svn -svnversion-binary = ${subversion:location}/bin/svnversion -testnode = ${buildout:bin-directory}/testnode -zip-binary = ${zip:location}/bin/zip - -configuration-file = $${rootdirectory:etc}/erp5testnode.cfg -log-file = $${basedirectory:log}/erp5testnode.log -wrapper = $${basedirectory:services}/erp5testnode - -[shell] -recipe = slapos.cookbook:shell -wrapper = $${rootdirectory:bin}/sh -shell = ${busybox:location}/bin/sh -home = $${buildout:directory} -ps1 = "\\w> " -path = - ${busybox:location}/bin/ - ${busybox:location}/usr/bin/ - ${git:location}/bin/ - ${subversion:location}/bin/ - ${perl:location}/bin/ - ${python2.7:location}/bin/ - ${buildout:bin-directory}/ - ${busybox:location}/sbin/ - ${busybox:location}/usr/sbin/ - -[shellinabox] -recipe = slapos.cookbook:shellinabox -ipv6 = $${slap-network-information:global-ipv6} -port = 8080 -shell = $${shell:wrapper} -wrapper = $${rootdirectory:bin}/shellinaboxd -shellinabox-binary = ${shellinabox:location}/bin/shellinaboxd -password = $${pwgen:password} -directory = $${buildout:directory}/ -login-shell = $${rootdirectory:bin}/login -certificate-directory = $${directory:shellinabox} -cert-file = $${directory:shellinabox}/public.crt -key-file = $${directory:shellinabox}/private.key - -[certificate-authority] -recipe = slapos.cookbook:certificate_authority -openssl-binary = ${openssl:location}/bin/openssl -ca-dir = $${directory:ca-dir} -requests-directory = $${cadirectory:requests} -wrapper = $${basedirectory:services}/ca -ca-private = $${cadirectory:private} -ca-certs = $${cadirectory:certs} -ca-newcerts = $${cadirectory:newcerts} -ca-crl = $${cadirectory:crl} - -[cadirectory] -recipe = slapos.cookbook:mkdirectory -requests = $${directory:ca-dir}/requests/ -private = $${directory:ca-dir}/private/ -certs = $${directory:ca-dir}/certs/ -newcerts = $${directory:ca-dir}/newcerts/ -crl = $${directory:ca-dir}/crl/ - -[ca-shellinabox] -<= certificate-authority -recipe = slapos.cookbook:certificate_authority.request -executable = $${shellinabox:wrapper} -wrapper = $${basedirectory:services}/shellinaboxd -key-file = $${shellinabox:key-file} -cert-file = $${shellinabox:cert-file} - -[rootdirectory] -recipe = slapos.cookbook:mkdirectory -etc = $${buildout:directory}/etc/ -var = $${buildout:directory}/var/ -srv = $${buildout:directory}/srv/ -bin = $${buildout:directory}/bin/ -tmp = $${buildout:directory}/tmp/ - -[basedirectory] -recipe = slapos.cookbook:mkdirectory -log = $${rootdirectory:var}/log/ -services = $${rootdirectory:etc}/run/ -run = $${rootdirectory:var}/run/ -promises = $${rootdirectory:etc}/promise/ - -[directory] -recipe = slapos.cookbook:mkdirectory -slapos = $${rootdirectory:srv}/slapos/ -testnode = $${rootdirectory:srv}/testnode/ -test-suite = $${rootdirectory:srv}/test_suite/ -log = $${basedirectory:log}/testnode/ -run = $${basedirectory:run}/testnode/ -shellinabox = $${rootdirectory:srv}/shellinabox/ -ca-dir = $${rootdirectory:srv}/ca/ - -[slap-parameter] -node-quantity = 1 -test-suite-master-url = -additional-bt5-repository-id = -instance-dict = -vcs-repository-list = [] -test-suite-title = $${:test-suite} diff --git a/software/erp5testnode/instance.cfg b/software/erp5testnode/instance.cfg index 10063c454..2b0c31841 100644 --- a/software/erp5testnode/instance.cfg +++ b/software/erp5testnode/instance.cfg @@ -1,11 +1,18 @@ [buildout] parts = - switch_softwaretype + testnode eggs-directory = ${buildout:eggs-directory} develop-eggs-directory = ${buildout:develop-eggs-directory} -offline = true -[switch_softwaretype] -recipe = slapos.cookbook:softwaretype -default = ${template-default:output} +[testnode] +recipe = slapos.cookbook:erp5testnode + +buildbot_binary = ${buildout:bin-directory}/buildbot +slapgrid_partition_binary = ${buildout:bin-directory}/slapgrid-cp +slapgrid_software_binary = ${buildout:bin-directory}/slapgrid-sr +slapproxy_binary = ${buildout:bin-directory}/slapproxy +svn_binary = ${subversion:location}/bin/svn +git_binary = ${git:location}/bin/git +svnversion_binary = ${subversion:location}/bin/svnversion +zip_binary = ${zip:location}/bin/zip diff --git a/software/erp5testnode/software.cfg b/software/erp5testnode/software.cfg index 2492dbef6..3fdec1ac6 100644 --- a/software/erp5testnode/software.cfg +++ b/software/erp5testnode/software.cfg @@ -1,4 +1,8 @@ [buildout] +extensions = + slapos.rebootstrap + slapos.zcbworkarounds + mr.developer find-links = http://www.nexedi.org/static/packages/source/slapos.buildout/ http://dist.repoze.org @@ -10,204 +14,48 @@ include-site-packages = false exec-sitecustomize = false versions = versions +rebootstrap-section = python2.6 extends = - ../../stack/shacache-client.cfg - ../../component/python-2.7/buildout.cfg + ../../component/python-2.6/buildout.cfg ../../component/subversion/buildout.cfg ../../component/git/buildout.cfg ../../component/lxml-python/buildout.cfg ../../component/zip/buildout.cfg - ../../component/busybox/buildout.cfg - ../../component/shellinabox/buildout.cfg - ../../component/pwgen/buildout.cfg -# Local development -develop = - ${:parts-directory}/slapos.cookbook-repository parts = -# Local development - slapos.cookbook-repository - check-recipe template - lxml-python + bootstrap eggs subversion zip git -# Separate from site eggs -allowed-eggs-from-site-packages = -include-site-packages = false -exec-sitecustomize = false - -# Use only quite well working sites. -allow-hosts = - *.nexedi.org - *.python.org - *.sourceforge.net - dist.repoze.org - effbot.org - github.com - peak.telecommunity.com - psutil.googlecode.com - www.dabeaz.com - launchpad.net - - -# XXX: Workaround of SlapOS limitation -# Unzippig of eggs is required, as SlapOS do not yet provide nicely working -# development / fast switching environment for whole software -unzip = true +[bootstrap] +recipe = zc.recipe.egg +eggs = zc.buildout +suffix = +scripts = + buildout=bootstrap2.6 +arguments = sys.argv[1:] + ["bootstrap"] -# Local development -[slapos.cookbook-repository] -recipe = plone.recipe.command -stop-on-error = true -location = ${buildout:parts-directory}/${:_buildout_section_name_} -command = ${git:location}/bin/git clone --quiet http://git.erp5.org/repos/slapos.git ${:location} -update-command = cd ${:location} && ${git:location}/bin/git pull --quiet +[rebootstrap] +section = python2.6 +version = 1 -[check-recipe] -recipe = plone.recipe.command -stop-on-error = true -update-command = ${:command} -command = grep parts ${buildout:develop-eggs-directory}/slapos.cookbook.egg-link +[versions] +# Use SlapOS patched zc.buildout +zc.buildout = 1.5.3-dev-SlapOS-001 [eggs] recipe = zc.recipe.egg eggs = ${lxml-python:egg} - zc.buildout - slapos.libnetworkcache slapos.core - inotifyx slapos.cookbook - erp5.util[testnode] - -scripts = - testnode = erp5.util.testnode:main - slapgrid-cp = slapos.grid.slapgrid:runComputerPartition - slapgrid-sr = slapos.grid.slapgrid:runSoftwareRelease - slapproxy = slapos.proxy:main - -python = python2.7 - -[lxml-python] -python = python2.7 [template] recipe = slapos.recipe.template url = ${:_profile_base_location_}/instance.cfg output = ${buildout:directory}/template.cfg mode = 0644 -md5sum = 307663d73ef3ef94b02567ecd322252e - -[template-default] -recipe = slapos.recipe.template -url = ${:_profile_base_location_}/instance-default.cfg -output = ${buildout:directory}/template-default.cfg -mode = 0644 -md5sum = 2349e62d4fa46fc88e05d855f49b7c38 - -[networkcache] -# Romain Courteaud + Sebastien Robin + Antoine Catton signature certificate -signature-certificate-list = - -----BEGIN CERTIFICATE----- - MIIB4DCCAUkCADANBgkqhkiG9w0BAQsFADA5MQswCQYDVQQGEwJGUjEZMBcGA1UE - CBMQRGVmYXVsdCBQcm92aW5jZTEPMA0GA1UEChMGTmV4ZWRpMB4XDTExMDkxNTA5 - MDAwMloXDTEyMDkxNTA5MDAwMlowOTELMAkGA1UEBhMCRlIxGTAXBgNVBAgTEERl - ZmF1bHQgUHJvdmluY2UxDzANBgNVBAoTBk5leGVkaTCBnzANBgkqhkiG9w0BAQEF - AAOBjQAwgYkCgYEApYZv6OstoqNzxG1KI6iE5U4Ts2Xx9lgLeUGAMyfJLyMmRLhw - boKOyJ9Xke4dncoBAyNPokUR6iWOcnPHtMvNOsBFZ2f7VA28em3+E1JRYdeNUEtX - Z0s3HjcouaNAnPfjFTXHYj4um1wOw2cURSPuU5dpzKBbV+/QCb5DLheynisCAwEA - ATANBgkqhkiG9w0BAQsFAAOBgQBCZLbTVdrw3RZlVVMFezSHrhBYKAukTwZrNmJX - mHqi2tN8tNo6FX+wmxUUAf3e8R2Ymbdbn2bfbPpcKQ2fG7PuKGvhwMG3BlF9paEC - q7jdfWO18Zp/BG7tagz0jmmC4y/8akzHsVlruo2+2du2freE8dK746uoMlXlP93g - QUUGLQ== - -----END CERTIFICATE----- - -----BEGIN CERTIFICATE----- - MIIB8jCCAVugAwIBAgIJAPu2zchZ2BxoMA0GCSqGSIb3DQEBBQUAMBIxEDAOBgNV - BAMMB3RzeGRldjMwHhcNMTExMDE0MTIxNjIzWhcNMTIxMDEzMTIxNjIzWjASMRAw - DgYDVQQDDAd0c3hkZXYzMIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCrPbh+ - YGmo6mWmhVb1vTqX0BbeU0jCTB8TK3i6ep3tzSw2rkUGSx3niXn9LNTFNcIn3MZN - XHqbb4AS2Zxyk/2tr3939qqOrS4YRCtXBwTCuFY6r+a7pZsjiTNddPsEhuj4lEnR - L8Ax5mmzoi9nE+hiPSwqjRwWRU1+182rzXmN4QIDAQABo1AwTjAdBgNVHQ4EFgQU - /4XXREzqBbBNJvX5gU8tLWxZaeQwHwYDVR0jBBgwFoAU/4XXREzqBbBNJvX5gU8t - LWxZaeQwDAYDVR0TBAUwAwEB/zANBgkqhkiG9w0BAQUFAAOBgQA07q/rKoE7fAda - FED57/SR00OvY9wLlFEF2QJ5OLu+O33YUXDDbGpfUSF9R8l0g9dix1JbWK9nQ6Yd - R/KCo6D0sw0ZgeQv1aUXbl/xJ9k4jlTxmWbPeiiPZEqU1W9wN5lkGuLxV4CEGTKU - hJA/yXa1wbwIPGvX3tVKdOEWPRXZLg== - -----END CERTIFICATE----- - -----BEGIN CERTIFICATE----- - MIIB8DCCAVmgAwIBAgIJAJ5iKK7w6AQVMA0GCSqGSIb3DQEBBQUAMBExDzANBgNV - BAMMBkNPTVAtMTAeFw0xMTExMjkxNjU1NDZaFw0xMjExMjgxNjU1NDZaMBExDzAN - BgNVBAMMBkNPTVAtMTCBnzANBgkqhkiG9w0BAQEFAAOBjQAwgYkCgYEA6IBOEnQP - qT1KPBT8xQnYe6ECxXkfV9zhuVwolB/2wHM1Qk0TRoOPRRHfOvzkLQUVkD9on6Dj - mJsYhrukqaidv0Y9n7c5JKM8DfFh41UP3wG6rJpPJ9VZ0ZzFjk+yzCSYrI6rf3Yd - vRhNbKHfBO+23DJJqeEiobxsOQc6eE9Gt78CAwEAAaNQME4wHQYDVR0OBBYEFDLf - TAc8fEZjGWNA62Tld7iSrgKgMB8GA1UdIwQYMBaAFDLfTAc8fEZjGWNA62Tld7iS - rgKgMAwGA1UdEwQFMAMBAf8wDQYJKoZIhvcNAQEFBQADgYEA28CQAN/jC3X+5lOh - wYO0+HvXSa6TNy6k+xAXQHEezOSgA7QMjXGVPHNzZRxhI4k6mdGImmPlKfV/GgcA - T3XATu8g033m2pCtNXW6Awp4V2Mft+w5Hx4Y3iT0Uccxc/699PU/MGroBKVCphwB - /SvdKJ6l9YsKUKhJlMRQxc9QHdU= - -----END CERTIFICATE----- - -[versions] -# Use SlapOS patched zc.buildout -zc.buildout = 1.6.0-dev-SlapOS-003 - -Jinja2 = 2.6 -Werkzeug = 0.8.2 -erp5.util = 0.3 -hexagonit.recipe.cmmi = 1.5.0 -lxml = 2.3.2 -meld3 = 0.6.7 -slapos.cookbook = 0.38 -slapos.core = 0.21 -slapos.libnetworkcache = 0.11 -slapos.recipe.template = 2.2 - -# Required by: -# slapos.core==0.21 -Flask = 0.8 - -# Required by: -# slapos.cookbook==0.38 -PyXML = 0.8.5 - -# Required by: -# hexagonit.recipe.cmmi==1.5.0 -hexagonit.recipe.download = 1.5.0 - -# Required by: -# slapos.cookbook==0.38 -netaddr = 0.7.6 - -# Required by: -# slapos.core==0.21 -netifaces = 0.6 - -# Required by: -# erp5.util==0.3 -# slapos.cookbook==0.38 -# slapos.core==0.21 -# slapos.libnetworkcache==0.11 -# zc.buildout==1.6.0-dev-SlapOS-003 -setuptools = 0.6c12dev-r88846 - -# Required by: -# slapos.core==0.21 -supervisor = 3.0a12 - -# Required by: -# slapos.cookbook==0.38 -xml-marshaller = 0.9.7 - -# Required by: -# slapos.cookbook==0.38 -zc.recipe.egg = 1.3.2 - -# Required by: -# slapos.core==0.21 -zope.interface = 3.8.0 diff --git a/software/ezpublish/instance.cfg b/software/ezpublish/instance.cfg deleted file mode 100644 index 9495bde7e..000000000 --- a/software/ezpublish/instance.cfg +++ /dev/null @@ -1,15 +0,0 @@ -[buildout] -eggs-directory = ${buildout:eggs-directory} -develop-eggs-directory = ${buildout:develop-eggs-directory} - -parts = instance - -[instance] -recipe = ${instance-recipe:egg}:${instance-recipe:module} -source = ${application:location} - -httpd_binary = ${apache:location}/bin/httpd -mysql_binary = ${mariadb:location}/bin/mysql -mysql_install_binary = ${mariadb:location}/bin/mysql_install_db -mysql_upgrade_binary = ${mariadb:location}/bin/mysql_upgrade -mysqld_binary = ${mariadb:location}/libexec/mysqld diff --git a/software/ezpublish/software.cfg b/software/ezpublish/software.cfg deleted file mode 100644 index ab338b094..000000000 --- a/software/ezpublish/software.cfg +++ /dev/null @@ -1,129 +0,0 @@ -[buildout] -versions = versions - -parts = - template - apache-php - mariadb - eggs - instance-recipe-egg - downloadcache-workaround - -extends = - ../../stack/lamp.cfg - ../../stack/shacache-client.cfg - -[application] -recipe = slapos.recipe.build:download-unpacked -url = http://share.ez.no/content/download/118008/553423/version/3/file/ezpublish_community_project-2011.8-with_ezc.tar.bz2 -md5sum = 76ea4e1de7a3f91c8d24ef3a221e0777 - -[instance-recipe] -egg = slapos.cookbook -module = lamp.simple - -[template] -# Default template for the instance. -recipe = slapos.recipe.template -url = ${:_profile_base_location_}/instance.cfg -#md5sum = Student shall put md5 of instance.cfg here -output = ${buildout:directory}/template.cfg -mode = 0644 - -[instance-recipe-egg] -recipe = zc.recipe.egg -eggs = ${instance-recipe:egg} - -[versions] -# Use SlapOS patched zc.buildout -zc.buildout = 1.5.3-dev-SlapOS-010 - -Jinja2 = 2.6 -MySQL-python = 1.2.3 -Werkzeug = 0.8.1 -apache-libcloud = 0.5.2 -buildout-versions = 1.7 -hexagonit.recipe.cmmi = 1.5.0 -meld3 = 0.6.7 -plone.recipe.command = 1.1 -slapos.cookbook = 0.34 -slapos.recipe.build = 0.7 -slapos.recipe.download = 1.0.dev-r4053 -slapos.recipe.template = 2.2 -slapos.toolbox = 0.10 - -# Required by: -# slapos.core==0.18 -# slapos.toolbox==0.10 -Flask = 0.8 - -# Required by: -# slapos.cookbook==0.34 -PyXML = 0.8.4 - -# Required by: -# hexagonit.recipe.cmmi==1.5.0 -hexagonit.recipe.download = 1.5.0 - -# Required by: -# slapos.cookbook==0.34 -# slapos.core==0.18 -# slapos.toolbox==0.10 -# xml-marshaller==0.9.7 -lxml = 2.3.1 - -# Required by: -# slapos.cookbook==0.34 -netaddr = 0.7.6 - -# Required by: -# slapos.core==0.18 -netifaces = 0.6 - -# Required by: -# slapos.toolbox==0.10 -paramiko = 1.7.7.1 - -# Required by: -# slapos.toolbox==0.10 -psutil = 0.3.0 - -# Required by: -# slapos.cookbook==0.34 -# slapos.core==0.18 -# slapos.toolbox==0.10 -setuptools = 0.6c12dev-r88846 - -# Required by: -# slapos.cookbook==0.34 -# slapos.toolbox==0.10 -slapos.core = 0.18 - -# Required by: -# slapos.core==0.18 -supervisor = 3.0a10 - -# Required by: -# slapos.cookbook==0.34 -# slapos.toolbox==0.10 -xml-marshaller = 0.9.7 - -# Required by: -# slapos.cookbook==0.34 -zc.recipe.egg = 1.3.2 - -# Required by: -# slapos.core==0.18 -zope.interface = 3.8.0 - -[downloadcache-workaround] -# workaround irritating problem of hexagonit.recipe.cmmi which automatically -# creates download cache, which in turn switches builout to "semi-offline" mode -recipe = plone.recipe.command -# in hexagonit.recipe.cmmi if there is no ${buildout:download-cache} set it resolves -# to ${buildout:directory}/downloads but this variable is available late, that's -# why it is hardcoded only for required case -download-cache = ${buildout:directory}/downloads -command = [ -d ${:download-cache} ] && rm -fr ${:download-cache}/* || exit 0 -update-command = ${:command} -stop-on-error = True diff --git a/software/joomla/instance.cfg b/software/joomla/instance.cfg deleted file mode 100644 index 9495bde7e..000000000 --- a/software/joomla/instance.cfg +++ /dev/null @@ -1,15 +0,0 @@ -[buildout] -eggs-directory = ${buildout:eggs-directory} -develop-eggs-directory = ${buildout:develop-eggs-directory} - -parts = instance - -[instance] -recipe = ${instance-recipe:egg}:${instance-recipe:module} -source = ${application:location} - -httpd_binary = ${apache:location}/bin/httpd -mysql_binary = ${mariadb:location}/bin/mysql -mysql_install_binary = ${mariadb:location}/bin/mysql_install_db -mysql_upgrade_binary = ${mariadb:location}/bin/mysql_upgrade -mysqld_binary = ${mariadb:location}/libexec/mysqld diff --git a/software/joomla/software.cfg b/software/joomla/software.cfg deleted file mode 100644 index b75357bda..000000000 --- a/software/joomla/software.cfg +++ /dev/null @@ -1,130 +0,0 @@ -[buildout] -versions = versions - -parts = - template - apache-php - mariadb - eggs - instance-recipe-egg - downloadcache-workaround - -extends = - ../../stack/lamp.cfg - ../../stack/shacache-client.cfg - -[application] -recipe = slapos.recipe.build:download-unpacked -url = http://joomlacode.org/gf/download/frsrelease/15278/66554/Joomla_1.7.0-Stable-Full_Package.tar.gz -md5sum = 19451c0352e4c72d871cc8817126286a - -[instance-recipe] -egg = slapos.cookbook -module = lamp.simple - -[template] -# Default template for the instance. -recipe = slapos.recipe.template -url = ${:_profile_base_location_}/instance.cfg -#${:_profile_base_location_}/instance.cfg -#md5sum = Student shall put md5 of instance.cfg here -output = ${buildout:directory}/template.cfg -mode = 0644 - -[instance-recipe-egg] -recipe = zc.recipe.egg -eggs = ${instance-recipe:egg} - -[versions] -# Use SlapOS patched zc.buildout -zc.buildout = 1.5.3-dev-SlapOS-010 - -Jinja2 = 2.6 -MySQL-python = 1.2.3 -Werkzeug = 0.8.1 -apache-libcloud = 0.5.2 -buildout-versions = 1.7 -hexagonit.recipe.cmmi = 1.5.0 -meld3 = 0.6.7 -plone.recipe.command = 1.1 -slapos.cookbook = 0.34 -slapos.recipe.build = 0.7 -slapos.recipe.download = 1.0.dev-r4053 -slapos.recipe.template = 2.2 -slapos.toolbox = 0.10 - -# Required by: -# slapos.core==0.18 -# slapos.toolbox==0.10 -Flask = 0.8 - -# Required by: -# slapos.cookbook==0.34 -PyXML = 0.8.4 - -# Required by: -# hexagonit.recipe.cmmi==1.5.0 -hexagonit.recipe.download = 1.5.0 - -# Required by: -# slapos.cookbook==0.34 -# slapos.core==0.18 -# slapos.toolbox==0.10 -# xml-marshaller==0.9.7 -lxml = 2.3.1 - -# Required by: -# slapos.cookbook==0.34 -netaddr = 0.7.6 - -# Required by: -# slapos.core==0.18 -netifaces = 0.6 - -# Required by: -# slapos.toolbox==0.10 -paramiko = 1.7.7.1 - -# Required by: -# slapos.toolbox==0.10 -psutil = 0.3.0 - -# Required by: -# slapos.cookbook==0.34 -# slapos.core==0.18 -# slapos.toolbox==0.10 -setuptools = 0.6c12dev-r88846 - -# Required by: -# slapos.cookbook==0.34 -# slapos.toolbox==0.10 -slapos.core = 0.18 - -# Required by: -# slapos.core==0.18 -supervisor = 3.0a10 - -# Required by: -# slapos.cookbook==0.34 -# slapos.toolbox==0.10 -xml-marshaller = 0.9.7 - -# Required by: -# slapos.cookbook==0.34 -zc.recipe.egg = 1.3.2 - -# Required by: -# slapos.core==0.18 -zope.interface = 3.8.0 - -[downloadcache-workaround] -# workaround irritating problem of hexagonit.recipe.cmmi which automatically -# creates download cache, which in turn switches builout to "semi-offline" mode -recipe = plone.recipe.command -# in hexagonit.recipe.cmmi if there is no ${buildout:download-cache} set it resolves -# to ${buildout:directory}/downloads but this variable is available late, that's -# why it is hardcoded only for required case -download-cache = ${buildout:directory}/downloads -command = [ -d ${:download-cache} ] && rm -fr ${:download-cache}/* || exit 0 -update-command = ${:command} -stop-on-error = True diff --git a/software/kumofs/software.cfg b/software/kumofs/software.cfg index e4bdecad9..131f44c42 100644 --- a/software/kumofs/software.cfg +++ b/software/kumofs/software.cfg @@ -1,12 +1,11 @@ [buildout] -extensions = - buildout-versions - find-links += http://www.nexedi.org/static/packages/source/slapos.buildout/ extends = + ../../component/git/buildout.cfg ../../component/kumo/buildout.cfg + ../../component/python-2.7/buildout.cfg ../../component/dcron/buildout.cfg ../../component/stunnel/buildout.cfg ../../component/rdiff-backup/buildout.cfg @@ -18,24 +17,20 @@ allow-hosts = *.nexedi.org *.python.org *.sourceforge.net - alastairs-place.net dist.repoze.org effbot.org github.com peak.telecommunity.com psutil.googlecode.com www.dabeaz.com - www.owlfish.com versions = versions -parts = +parts += # Create instance template +#TODO : list here all parts. template - rdiff-backup - dcron - kumo - stunnel + libxslt eggs instance-recipe-egg @@ -50,10 +45,12 @@ module = kumofs [instance-recipe-egg] recipe = zc.recipe.egg +python = python2.7 eggs = ${instance-recipe:egg} [eggs] recipe = zc.recipe.egg +python = python2.7 eggs = ${lxml-python:egg} @@ -66,86 +63,18 @@ output = ${buildout:directory}/template.cfg mode = 0644 [versions] -# Use SlapOS patched zc.buildout -zc.buildout = 1.6.0-dev-SlapOS-003 +slapos.cookbook = 0.13 -Jinja2 = 2.6 -Werkzeug = 0.8.2 -buildout-versions = 1.7 -erp5.recipe.cmmiforcei686 = 0.1.3 +erp5.recipe.cmmiforcei686 = 0.1.1 hexagonit.recipe.cmmi = 1.5.0 -meld3 = 0.6.8 -rdiff-backup = 1.0.5 -slapos.cookbook = 0.38 -slapos.recipe.template = 2.2 - -# Required by: -# slapos.core==0.21 -Flask = 0.8 - -# Required by: -# slapos.cookbook==0.38 -PyXML = 0.8.5 - -# Required by: -# hexagonit.recipe.cmmi==1.5.0 hexagonit.recipe.download = 1.5.0 -# Required by: -# slapos.cookbook==0.38 -# slapos.core==0.21 -# xml-marshaller==0.9.7 -lxml = 2.3.3 - -# Required by: -# slapos.cookbook==0.38 -netaddr = 0.7.6 - -# Required by: -# slapos.core==0.21 -netifaces = 0.6 - -# Required by: -# slapos.cookbook==0.38 -# slapos.core==0.21 -# zc.buildout==1.6.0-dev-SlapOS-003 -# zc.recipe.egg==1.3.2 -setuptools = 0.6c12dev-r88846 - -# Required by: -# slapos.cookbook==0.38 -slapos.core = 0.21 - -# Required by: -# slapos.core==0.21 -supervisor = 3.0a12 - -# Required by: -# slapos.cookbook==0.38 +# Required by slapos.cookbook==0.13 +slapos.core = 0.2 +collective.recipe.template = 1.8 +netaddr = 0.7.5 xml-marshaller = 0.9.7 +setuptools = 0.6c12dev-r88795 -# Required by: -# erp5.recipe.cmmiforcei686==0.1.3 -# slapos.cookbook==0.38 -zc.recipe.egg = 1.3.2 - -# Required by: -# slapos.core==0.21 -zope.interface = 3.8.0 - -[networkcache] -# Cedric de Saint Martin signature certificate -signature-certificate-list = - -----BEGIN CERTIFICATE----- - MIIB9jCCAV+gAwIBAgIJAO4V/jiMoICoMA0GCSqGSIb3DQEBBQUAMBMxETAPBgNV - BAMMCENPTVAtMjMyMCAXDTEyMDIxNjExMTAyM1oYDzIxMTIwMTIzMTExMDIzWjAT - MREwDwYDVQQDDAhDT01QLTIzMjCBnzANBgkqhkiG9w0BAQEFAAOBjQAwgYkCgYEA - wi/3Z8W9pUiegUXIk/AiFDQ0UJ4JFAwjqr+HSRUirlUsHHT+8DzH/hfcTDX1I5BB - D1ADk+ydXjMm3OZrQcXjn29OUfM5C+g+oqeMnYQImN0DDQIOcUyr7AJc4xhvuXQ1 - P2pJ5NOd3tbd0kexETa1LVhR6EgBC25LyRBRae76qosCAwEAAaNQME4wHQYDVR0O - BBYEFMDmW9aFy1sKTfCpcRkYnP6zUd1cMB8GA1UdIwQYMBaAFMDmW9aFy1sKTfCp - cRkYnP6zUd1cMAwGA1UdEwQFMAMBAf8wDQYJKoZIhvcNAQEFBQADgYEAskbFizHr - b6d3iIyN+wffxz/V9epbKIZVEGJd/6LrTdLiUfJPec7FaxVCWNyKBlCpINBM7cEV - Gn9t8mdVQflNqOlAMkOlUv1ZugCt9rXYQOV7rrEYJBWirn43BOMn9Flp2nibblby - If1a2ZoqHRxoNo2yTmm7TSYRORWVS+vvfjY= - -----END CERTIFICATE----- +# Use SlapOS patched zc.buildout +zc.buildout = 1.5.3-dev-SlapOS-005 diff --git a/software/kvm/instance.cfg b/software/kvm/instance.cfg index 65041a3f9..92692ed82 100644 --- a/software/kvm/instance.cfg +++ b/software/kvm/instance.cfg @@ -11,7 +11,7 @@ qemu_path = ${kvm:location}/bin/qemu-system-x86_64 qemu_img_path = ${kvm:location}/bin/qemu-img #slapmonitor_path = ${buildout:bin-directory}/slapmonitor #slapreport_path = ${buildout:bin-directory}/slapreport -websockify = ${buildout:directory}/bin/websockify +websockify_path = ${noVNC:location}/utils/wsproxy.py noVNC_location = ${noVNC:location} openssl_binary = ${openssl:location}/bin/openssl rdiff_backup_binary = ${buildout:bin-directory}/rdiff-backup diff --git a/software/kvm/software.cfg b/software/kvm/software.cfg index 007d9f487..1d9273b3f 100644 --- a/software/kvm/software.cfg +++ b/software/kvm/software.cfg @@ -1,183 +1,77 @@ [buildout] -extensions = - buildout-versions - extends = - ../../component/dcron/buildout.cfg - ../../component/git/buildout.cfg - ../../component/gnutls/buildout.cfg - ../../component/libpng/buildout.cfg - ../../component/libuuid/buildout.cfg - ../../component/lxml-python/buildout.cfg - ../../component/noVNC/buildout.cfg - ../../component/openssl/buildout.cfg - ../../component/python-2.7/buildout.cfg - ../../component/rdiff-backup/buildout.cfg - ../../stack/shacache-client.cfg + ../../stack/kvm.cfg -develop = - ${:parts-directory}/websockify - -parts = - template - kvm - eggs - check-local-eggs - -find-links += - http://www.nexedi.org/static/packages/source/slapos.buildout/ - -versions = versions - -# Use only quite well working sites. -allow-hosts = - *.nexedi.org - *.python.org - *.sourceforge.net - alastairs-place.net - dist.repoze.org - effbot.org - github.com - peak.telecommunity.com - psutil.googlecode.com - www.dabeaz.com - www.owlfish.com - -#XXX-Cedric : Currently, one can only access to KVM using noVNC. -# Ideally one should be able to access KVM by using either NoVNC or VNC. -# Problem is : no native crypto support in web browsers. So we have to disable ssl -# In qemu builtin vnc server, and make it available only for localhost -# so that only novnc can listen to it. - -#XXX-Cedric: Check status of https://github.com/kanaka/noVNC/issues/13 to see -# When qemu has builtin support for websockets in vnc server to get rid of -# Websockify (socket <-> websocket proxy server) when it is ready. -# May solve previous XXX depending on the implementation. - -#XXX-Cedric: Check status of -# https://www.tiolive.com/nexedi/bug_module/20110819-11F4F70 for -# Chrome >= 14 and Firefox >=7 can access to noVNC. (should be solved) - -#XXX-Cedric : add list of keyboard layouts (azerty/us querty/...) parameter to qemu - -[kvm] -recipe = hexagonit.recipe.cmmi -url = http://downloads.sourceforge.net/project/kvm/qemu-kvm/0.15.1/qemu-kvm-0.15.1.tar.gz -md5sum = 8800a7d6b3aa4a168ea7f78dc66c0320 -configure-options = - --disable-sdl - --disable-xen - --enable-vnc-tls - --disable-vnc-sasl - --disable-curses - --disable-curl - --enable-kvm - --disable-docs - --enable-vnc-png - --disable-vnc-jpeg - --extra-cflags="-I${gnutls:location}/include -I${libuuid:location}/include -I${zlib:location}/include -I${libpng:location}/include" - --extra-ldflags="-Wl,-rpath -Wl,${glib:location}/lib -L${glib:location}/lib -Wl,-rpath -Wl,${gnutls:location}/lib -L${gnutls:location}/lib -L${gettext:location}/lib -Wl,-rpath -Wl,${gettext:location}/lib -Wl,-rpath -Wl,${libpng:location}/lib -L${libpng:location}/lib -L${libuuid:location}/lib -Wl,-rpath -Wl,${libuuid:location}/lib -L${zlib:location}/lib -Wl,-rpath -Wl,${zlib:location}/lib -lpng -lz -lgnutls" - --disable-werror -environment = - PATH=${pkgconfig:location}/bin:%(PATH)s - PKG_CONFIG_PATH=${gnutls:location}/lib/pkgconfig:${glib:location}/lib/pkgconfig - -[websockify] -# XXX-Cedric : use official egg from pypi when it is released -recipe = plone.recipe.command -stop-on-error = true -commit = e7363f43443deb9982bdb5c3db50eec475584b06 -repository = https://github.com/desaintmartin/websockify.git -location = ${buildout:parts-directory}/${:_buildout_section_name_} -git-binary = ${git:location}/bin/git -command = export GIT_SSL_NO_VERIFY=true; (${:git-binary} clone --quiet ${:repository} ${:location} && cd ${:location} && ${:git-binary} reset --hard ${:commit}) || (rm -fr ${:location}; exit 1) -update-command = - -[check-local-eggs] -recipe = plone.recipe.command -stop-on-error = true -update-command = ${:command} -command = grep parts ${buildout:develop-eggs-directory}/websockify.egg-link -depends = ${eggs:dummy} - -[eggs] -python = python2.7 -recipe = z3c.recipe.scripts -dummy = - ${websockify:location} -eggs = - ${lxml-python:egg} - slapos.cookbook - websockify - [template] recipe = slapos.recipe.template url = ${:_profile_base_location_}/instance.cfg -md5sum = 298b146e4efce41bfd58b3f85d064ff1 +md5sum = d899f2111aab18ad25776f35ed49a91b output = ${buildout:directory}/template.cfg mode = 0644 -[versions] -zc.buildout = 1.5.3-dev-SlapOS-010 +[kvmsource] +command = + (${git:location}/bin/git clone --quiet http://git.erp5.org/repos/slapos.kvm.git ${:location} && cd ${:location} && ${git:location}/bin/git reset --hard 94ee45cc02e69798cac8209d2296fd1751125018) || (rm -fr ${:location} ; exit 1) +update-command = -slapos.cookbook = 0.37 -Jinja2 = 2.6 -Werkzeug = 0.8.1 -buildout-versions = 1.7 +[versions] +Jinja2 = 2.5.5 +Werkzeug = 0.6.2 hexagonit.recipe.cmmi = 1.5.0 -lxml = 2.3.2 +lxml = 2.3 meld3 = 0.6.7 plone.recipe.command = 1.1 -slapos.recipe.template = 2.2 +slapos.cookbook = 0.15 +slapos.recipe.template = 1.1 z3c.recipe.scripts = 1.0.1 # Required by: -# slapos.core==0.20 -Flask = 0.8 +# slapos.core==0.9 +Flask = 0.7.2 # Required by: -# slapos.cookbook==0.37 +# slapos.cookbook==0.15 PyXML = 0.8.4 # Required by: -# hexagonit.recipe.cmmi==1.5.0 -hexagonit.recipe.download = 1.5.0 +# slapos.recipe.template==1.1 +collective.recipe.template = 1.8 # Required by: -# slapos.cookbook==0.37 -netaddr = 0.7.6 +# hexagonit.recipe.cmmi==1.5.0 +hexagonit.recipe.download = 1.5.0 # Required by: -# slapos.core==0.20 -netifaces = 0.6 +# slapos.cookbook==0.15 +netaddr = 0.7.5 # Required by: -# websockify==0.1-dev -numpy = 1.6.1 +# slapos.core==0.9 +netifaces = 0.5 # Required by: -# slapos.cookbook==0.37 -# slapos.core==0.20 -# zc.buildout==1.5.3-dev-SlapOS-010 +# slapos.cookbook==0.15 +# slapos.core==0.9 +# zc.buildout==1.5.3-dev-SlapOS-005 # zc.recipe.egg==1.3.2 setuptools = 0.6c12dev-r88846 # Required by: -# slapos.cookbook==0.37 -slapos.core = 0.20 +# slapos.cookbook==0.15 +slapos.core = 0.9 # Required by: -# slapos.core==0.20 +# slapos.core==0.9 supervisor = 3.0a10 # Required by: -# slapos.cookbook==0.37 +# slapos.cookbook==0.15 xml-marshaller = 0.9.7 # Required by: -# slapos.cookbook==0.37 +# slapos.cookbook==0.15 zc.recipe.egg = 1.3.2 # Required by: -# slapos.core==0.20 -zope.interface = 3.8.0 +# slapos.core==0.9 +zope.interface = 3.6.4 diff --git a/software/lamp-template-static/instance.cfg b/software/lamp-template-static/instance.cfg deleted file mode 100644 index f97a3007e..000000000 --- a/software/lamp-template-static/instance.cfg +++ /dev/null @@ -1,10 +0,0 @@ -[buildout] -eggs-directory = ${buildout:eggs-directory} -develop-eggs-directory = ${buildout:develop-eggs-directory} - -parts = instance - -[instance] -recipe = ${instance-recipe:egg}:${instance-recipe:module} -source = ${application:location} -httpd_binary = ${apache:location}/bin/httpd diff --git a/software/lamp-template-static/software.cfg b/software/lamp-template-static/software.cfg deleted file mode 100644 index 52954352e..000000000 --- a/software/lamp-template-static/software.cfg +++ /dev/null @@ -1,114 +0,0 @@ -[buildout] -extensions += buildout-versions - -versions = versions - -parts = - template - apache - eggs - instance-recipe-egg - downloadcache-workaround - -extends = - ../../stack/lamp.cfg - -[application] -recipe = hexagonit.recipe.download -url = Student shall put here url of zipped or tarballed web page or application -#md5sum = Student may put here md5sum of this file, this is good idea -#If provided tarball does not contain top directory, option shall be changed to false -#strip-top-level-dir = true - -[instance-recipe] -egg = slapos.cookbook -module = lamp.static - -[template] -# Default template for the instance. -recipe = slapos.recipe.template -url = ${:_profile_base_location_}/instance.cfg -#md5sum = Student shall put md5 of instance.cfg here -output = ${buildout:directory}/template.cfg -mode = 0644 - -[instance-recipe-egg] -recipe = zc.recipe.egg -eggs = ${instance-recipe:egg} - -[versions] -# Use SlapOS patched zc.buildout -zc.buildout = 1.6.0-dev-SlapOS-003 -slapos.cookbook = 0.20 - -# Generated by buildout-versions -Jinja2 = 2.6 -Werkzeug = 0.8.2 -buildout-versions = 1.7 -hexagonit.recipe.cmmi = 1.5.0 -hexagonit.recipe.download = 1.5.0 -meld3 = 0.6.8 -plone.recipe.command = 1.1 -slapos.recipe.template = 2.2 - -# Required by: -# slapos.core==0.21 -Flask = 0.8 - -# Required by: -# slapos.cookbook==0.20 -PyXML = 0.8.4 - -# Required by: -# slapos.cookbook==0.20 -# slapos.core==0.21 -# xml-marshaller==0.9.7 -lxml = 2.3.3 - -# Required by: -# slapos.cookbook==0.20 -netaddr = 0.7.6 - -# Required by: -# slapos.core==0.21 -netifaces = 0.6 - -# Required by: -# slapos.cookbook==0.20 -# slapos.core==0.21 -# zc.buildout==1.6.0-dev-SlapOS-003 -# zc.recipe.egg==1.3.2 -setuptools = 0.6c12dev-r88846 - -# Required by: -# slapos.cookbook==0.20 -slapos.core = 0.21 - -# Required by: -# slapos.core==0.21 -supervisor = 3.0a12 - -# Required by: -# slapos.cookbook==0.20 -xml-marshaller = 0.9.7 - -# Required by: -# slapos.cookbook==0.20 -zc.recipe.egg = 1.3.2 - -# Required by: -# slapos.core==0.21 -zope.interface = 3.8.0 - -[downloadcache-workaround] -# workaround irritating problem of hexagonit.recipe.cmmi which automatically -# creates download cache, which in turn switches builout to "semi-offline" mode -recipe = plone.recipe.command -# in hexagonit.recipe.cmmi if there is no ${buildout:download-cache} set it resolves -# to ${buildout:directory}/downloads but this variable is available late, that's -# why it is hardcoded only for required case -download-cache = ${buildout:directory}/downloads -command = [ -d ${:download-cache} ] && rm -fr ${:download-cache}/* || exit 0 -update-command = ${:command} -stop-on-error = True - diff --git a/software/lamp-template/instance.cfg b/software/lamp-template/instance.cfg deleted file mode 100644 index fffebea8f..000000000 --- a/software/lamp-template/instance.cfg +++ /dev/null @@ -1,17 +0,0 @@ -[buildout] -eggs-directory = ${buildout:eggs-directory} -develop-eggs-directory = ${buildout:develop-eggs-directory} - -parts = instance - -[instance] -recipe = ${instance-recipe:egg}:${instance-recipe:module} -source = ${application:location} -template = ${application-template:location}/${application-template:filename} -configuration = ${application-configuration:location} - -httpd_binary = ${apache:location}/bin/httpd -mysql_binary = ${mariadb:location}/bin/mysql -mysql_install_binary = ${mariadb:location}/bin/mysql_install_db -mysql_upgrade_binary = ${mariadb:location}/bin/mysql_upgrade -mysqld_binary = ${mariadb:location}/libexec/mysqld diff --git a/software/lamp-template/software.cfg b/software/lamp-template/software.cfg deleted file mode 100644 index a27faf278..000000000 --- a/software/lamp-template/software.cfg +++ /dev/null @@ -1,133 +0,0 @@ -[buildout] -versions = versions - -parts = - template - apache-php - mariadb - eggs - instance-recipe-egg - downloadcache-workaround - -extends = - ../../stack/lamp.cfg - -[application] -recipe = slapos.recipe.build:download-unpacked -url = Student shall put here url of zipped or tarballed web page or application -md5sum = Student may put here md5sum of this file, this is good idea -#If provided tarball does not contain top directory, option shall be changed to false -strip-top-level-dir = true -#extract-directory = - -[application-template] -recipe = slapos.recipe.download -url = ${:_profile_base_location_}/template/REPLACE_ME_BY_APPLICATION_TEMPLATE_NAME -#md5sum = Student may put here md5sum of this file, this is good idea -filename = template.in -mode = 0644 -location = ${buildout:parts-directory}/${:_buildout_section_name_} - -[application-configuration] -location = Student shall put here relative path to application top level directory where configuration shall be created - -[instance-recipe] -egg = slapos.cookbook -module = lamp.simple - -[template] -# Default template for the instance. -recipe = slapos.recipe.template -url = ${:_profile_base_location_}/instance.cfg -#md5sum = Student shall put md5 of instance.cfg here -output = ${buildout:directory}/template.cfg -mode = 0644 - -[mariadb] -keep-compile-dir = false - -[instance-recipe-egg] -recipe = zc.recipe.egg -eggs = - ${instance-recipe:egg} - -[versions] -# Use SlapOS patched zc.buildout -zc.buildout = 1.6.0-dev-SlapOS-003 -# Generated by buildout-versions -Jinja2 = 2.6 -Werkzeug = 0.8.2 -buildout-versions = 1.7 -hexagonit.recipe.cmmi = 1.5.0 -meld3 = 0.6.8 -plone.recipe.command = 1.1 -slapos.cookbook = 0.20 -slapos.recipe.build = 0.7 -slapos.recipe.download = 1.0.dev-r4053 -slapos.recipe.template = 2.2 - -# Required by: -# slapos.core==0.21 -Flask = 0.8 - -# Required by: -# slapos.cookbook==0.38 -PyXML = 0.8.4 - -# Required by: -# hexagonit.recipe.cmmi==1.5.0 -hexagonit.recipe.download = 1.5.0 - -# Required by: -# slapos.cookbook==0.38 -# slapos.core==0.21 -# xml-marshaller==0.9.7 -lxml = 2.3.3 - -# Required by: -# slapos.cookbook==0.38 -netaddr = 0.7.6 - -# Required by: -# slapos.core==0.21 -netifaces = 0.6 - -# Required by: -# slapos.cookbook==0.38 -# slapos.core==0.21 -# zc.buildout==1.6.0-dev-SlapOS-003 -# zc.recipe.egg==1.3.2 -setuptools = 0.6c12dev-r88846 - -# Required by: -# slapos.cookbook==0.38 -slapos.core = 0.21 - -# Required by: -# slapos.core==0.21 -supervisor = 3.0a12 - -# Required by: -# slapos.cookbook==0.38 -xml-marshaller = 0.9.7 - -# Required by: -# slapos.cookbook==0.38 -zc.recipe.egg = 1.3.2 - -# Required by: -# slapos.core==0.21 -zope.interface = 3.8.0 - -[downloadcache-workaround] -# workaround irritating problem of hexagonit.recipe.cmmi which automatically -# creates download cache, which in turn switches builout to "semi-offline" mode -recipe = plone.recipe.command -# in hexagonit.recipe.cmmi if there is no ${buildout:download-cache} set it resolves -# to ${buildout:directory}/downloads but this variable is available late, that's -# why it is hardcoded only for required case -download-cache = ${buildout:directory}/downloads -command = [ -d ${:download-cache} ] && rm -fr ${:download-cache}/* || exit 0 -update-command = ${:command} -stop-on-error = True - diff --git a/software/lamp-template/template/php.ini.in b/software/lamp-template/template/php.ini.in deleted file mode 100644 index 76dfd3a88..000000000 --- a/software/lamp-template/template/php.ini.in +++ /dev/null @@ -1,18 +0,0 @@ -[PHP] -engine = On -safe_mode = Off -expose_php = Off -error_reporting = E_ALL & ~(E_DEPRECATED|E_NOTICE|E_WARNING) -display_errors = On -display_startup_errors = Off -log_errors = On -log_errors_max_len = 1024 -ignore_repeated_errors = Off -ignore_repeated_source = Off -session.save_path = "%(tmp_directory)s" -session.auto_start = 0 -date.timezone = Europe/Paris -file_uploads = On -upload_max_filesize = 16M -post_max_size = 16M -magic_quotes_gpc=Off diff --git a/software/lamp-template/template/phpmyadmin.inc.php.in b/software/lamp-template/template/phpmyadmin.inc.php.in deleted file mode 100644 index 0b2354f35..000000000 --- a/software/lamp-template/template/phpmyadmin.inc.php.in +++ /dev/null @@ -1,25 +0,0 @@ -<?php -$cfg['blowfish_secret'] = ''; /* YOU MUST FILL IN THIS FOR COOKIE AUTH! */ -$i = 1; - -/* Server parameters */ -$cfg['Servers'][$i]['host'] = 'Put here mysql host template key'; -$cfg['Servers'][$i]['port'] = 'Put here mysql port template key'; -/* Authentication type */ -$cfg['Servers'][$i]['auth_type'] = 'cookie'; -$cfg['Servers'][$i]['user'] = ''; -$cfg['Servers'][$i]['connect_type'] = 'tcp'; -$cfg['Servers'][$i]['compress'] = false; -/* Select mysqli if your server has it */ -$cfg['Servers'][$i]['extension'] = 'mysql'; -$cfg['Servers'][$i]['AllowNoPassword'] = false; - -/* rajk - for blobstreaming */ -$cfg['Servers'][$i]['bs_garbage_threshold'] = 50; -$cfg['Servers'][$i]['bs_repository_threshold'] = '32M'; -$cfg['Servers'][$i]['bs_temp_blob_timeout'] = 600; -$cfg['Servers'][$i]['bs_temp_log_threshold'] = '32M'; -$cfg['UploadDir'] = ''; -$cfg['SaveDir'] = ''; - -?> diff --git a/software/lamp-template/template/wp-config.php.in b/software/lamp-template/template/wp-config.php.in deleted file mode 100644 index 217ef3acd..000000000 --- a/software/lamp-template/template/wp-config.php.in +++ /dev/null @@ -1,90 +0,0 @@ -<?php -/** - * The base configurations of the WordPress. - * - * This file has the following configurations: MySQL settings, Table Prefix, - * Secret Keys, WordPress Language, and ABSPATH. You can find more information - * by visiting {@link http://codex.wordpress.org/Editing_wp-config.php Editing - * wp-config.php} Codex page. You can get the MySQL settings from your web host. - * - * This file is used by the wp-config.php creation script during the - * installation. You don't have to use the web site, you can just copy this file - * to "wp-config.php" and fill in the values. - * - * @package WordPress - */ - -// ** MySQL settings - You can get this info from your web host ** // -/** The name of the database for WordPress */ -define('DB_NAME', 'Put here mysql database name template key'); - -/** MySQL database username */ -define('DB_USER', 'Put here mysql user template key'); - -/** MySQL database password */ -define('DB_PASSWORD', 'Put here mysql password template key'); - -/** MySQL hostname */ -define('DB_HOST', 'Put here mysql host template key'); - -/** Database Charset to use in creating database tables. */ -define('DB_CHARSET', 'utf8'); - -/** The Database Collate type. Don't change this if in doubt. */ -define('DB_COLLATE', ''); - -/**#@+ - * Authentication Unique Keys and Salts. - * - * Change these to different unique phrases! - * You can generate these using the {@link https://api.wordpress.org/secret-key/1.1/salt/ WordPress.org secret-key service} - * You can change these at any point in time to invalidate all existing cookies. This will force all users to have to log in again. - * - * @since 2.6.0 - */ -define('AUTH_KEY', 'put your unique phrase here'); -define('SECURE_AUTH_KEY', 'put your unique phrase here'); -define('LOGGED_IN_KEY', 'put your unique phrase here'); -define('NONCE_KEY', 'put your unique phrase here'); -define('AUTH_SALT', 'put your unique phrase here'); -define('SECURE_AUTH_SALT', 'put your unique phrase here'); -define('LOGGED_IN_SALT', 'put your unique phrase here'); -define('NONCE_SALT', 'put your unique phrase here'); - -/**#@-*/ - -/** - * WordPress Database Table prefix. - * - * You can have multiple installations in one database if you give each a unique - * prefix. Only numbers, letters, and underscores please! - */ -$table_prefix = 'wp_'; - -/** - * WordPress Localized Language, defaults to English. - * - * Change this to localize WordPress. A corresponding MO file for the chosen - * language must be installed to wp-content/languages. For example, install - * de_DE.mo to wp-content/languages and set WPLANG to 'de_DE' to enable German - * language support. - */ -define('WPLANG', ''); - -/** - * For developers: WordPress debugging mode. - * - * Change this to true to enable the display of notices during development. - * It is strongly recommended that plugin and theme developers use WP_DEBUG - * in their development environments. - */ -define('WP_DEBUG', false); - -/* That's all, stop editing! Happy blogging. */ - -/** Absolute path to the WordPress directory. */ -if ( !defined('ABSPATH') ) - define('ABSPATH', dirname(__FILE__) . '/'); - -/** Sets up WordPress vars and included files. */ -require_once(ABSPATH . 'wp-settings.php'); diff --git a/software/libcloud-requester/instance.cfg b/software/libcloud-requester/instance.cfg deleted file mode 100644 index 0648b3d3d..000000000 --- a/software/libcloud-requester/instance.cfg +++ /dev/null @@ -1,19 +0,0 @@ -# Version: 0.0.1 -[buildout] -parts = - libcloud-requester - -# instance shall be offline -offline = true -eggs-directory = ${software_definition:software_home}/eggs -develop-eggs-directory = ${software_definition:software_home}/develop-eggs - -[libcloud-requester] -# slap connection information -slap_computer_id = ${slap_computer_id} -slap_computer_partition_id = ${slap_computer_partition_id} -slap_server_url = ${slap_server_url} -slap_software_release_url = ${slap_software_release_url} - -# select recipe -recipe = slapos.recipe.libcloudrequest diff --git a/software/libcloud-requester/software.cfg b/software/libcloud-requester/software.cfg deleted file mode 100644 index ef2cde1ca..000000000 --- a/software/libcloud-requester/software.cfg +++ /dev/null @@ -1,31 +0,0 @@ -# Version: 0.0.1 -[buildout] -parts = - workaround-downloadcache - libcloudrequestertemplate - eggs - -find-links = - http://www.nexedi.org/static/packages/source/slapos.buildout/ - -versions = versions -[workaround-downloadcache] -recipe = plone.recipe.command -command = - rm -rf ${buildout:directory}/downloads -update-command = ${:command} - -[libcloudrequestertemplate] -recipe = slapos.recipe.hrdownload -url = ${:_profile_base_location_}/instance.cfg -filename = template.cfg -destination = ${buildout:directory} -download-only = true - -[eggs] -recipe = zc.recipe.egg -eggs = - slapos.recipe.libcloudrequest - -[versions] -zc.buildout = 1.5.3-dev-SlapOS-001 diff --git a/software/libcloud/instance.cfg b/software/libcloud/instance.cfg deleted file mode 100644 index 2831faed1..000000000 --- a/software/libcloud/instance.cfg +++ /dev/null @@ -1,21 +0,0 @@ -# Version: 0.0.4dev -[buildout] -parts = - libcloud-instance - -# instance shall be offline -offline = true -eggs-directory = ${software_definition:software_home}/eggs -develop-eggs-directory = ${software_definition:software_home}/develop-eggs - -[libcloud-instance] -# slap connection information -slap_computer_id = ${slap_computer_id} -slap_computer_partition_id = ${slap_computer_partition_id} -slap_server_url = ${slap_server_url} -slap_software_release_url = ${slap_software_release_url} - -# select recipe -recipe = slapos.recipe.libcloud - -server_binary = ${software_definition:software_home}/bin/cloudmgr diff --git a/software/libcloud/software.cfg b/software/libcloud/software.cfg deleted file mode 100644 index b6e428c23..000000000 --- a/software/libcloud/software.cfg +++ /dev/null @@ -1,43 +0,0 @@ -# Version: 0.0.5dev -[buildout] -parts = - workaround-downloadcache - libcloudtemplate - paramiko-wrokaround-dependency - paramiko-wrokaround - eggs - -versions = paramiko-workaround-versions - -[paramiko-workaround-versions] -paramiko = 1.7.6 - -[paramiko-wrokaround-dependency] -recipe = zc.recipe.egg -eggs = - pycrypto - -[paramiko-wrokaround] -recipe = zc.recipe.egg -index = -eggs = - paramiko - -[workaround-downloadcache] -recipe = plone.recipe.command -command = - rm -rf ${buildout:directory}/downloads -update-command = ${:command} - -[libcloudtemplate] -recipe = slapos.recipe.hrdownload -url = -filename = template.cfg -destination = ${buildout:directory} -download-only = true - -[eggs] -recipe = zc.recipe.egg -eggs = - slapos.tool.cloudmgr - slapos.recipe.libcloud diff --git a/software/magento/instance.cfg b/software/magento/instance.cfg deleted file mode 100644 index 9495bde7e..000000000 --- a/software/magento/instance.cfg +++ /dev/null @@ -1,15 +0,0 @@ -[buildout] -eggs-directory = ${buildout:eggs-directory} -develop-eggs-directory = ${buildout:develop-eggs-directory} - -parts = instance - -[instance] -recipe = ${instance-recipe:egg}:${instance-recipe:module} -source = ${application:location} - -httpd_binary = ${apache:location}/bin/httpd -mysql_binary = ${mariadb:location}/bin/mysql -mysql_install_binary = ${mariadb:location}/bin/mysql_install_db -mysql_upgrade_binary = ${mariadb:location}/bin/mysql_upgrade -mysqld_binary = ${mariadb:location}/libexec/mysqld diff --git a/software/magento/software.cfg b/software/magento/software.cfg deleted file mode 100644 index c7f459c1f..000000000 --- a/software/magento/software.cfg +++ /dev/null @@ -1,129 +0,0 @@ -[buildout] -versions = versions - -parts = - template - mariadb - eggs - instance-recipe-egg - downloadcache-workaround - -extends = - ../../stack/lamp.cfg - ../../stack/shacache-client.cfg - -[application] -recipe = slapos.recipe.build:download-unpacked -url = http://www.magentocommerce.com/downloads/assets/1.6.0.0/magento-1.6.0.0.tar.gz -md5sum = 7415eb1c70b7694ab632326d9fcc850a - -[instance-recipe] -egg = slapos.cookbook -module = lamp.simple - -[template] -# Default template for the instance. -recipe = slapos.recipe.template -url = ${:_profile_base_location_}/instance.cfg -#md5sum = Student shall put md5 of instance.cfg here -output = ${buildout:directory}/template.cfg -mode = 0644 - -[instance-recipe-egg] -recipe = zc.recipe.egg -eggs = ${instance-recipe:egg} - -[versions] -# Use SlapOS patched zc.buildout -zc.buildout = 1.5.3-dev-SlapOS-010 - -Jinja2 = 2.6 -MySQL-python = 1.2.3 -Werkzeug = 0.8.1 -apache-libcloud = 0.5.2 -buildout-versions = 1.7 -hexagonit.recipe.cmmi = 1.5.0 -meld3 = 0.6.7 -plone.recipe.command = 1.1 -slapos.cookbook = 0.34 -slapos.recipe.build = 0.7 -slapos.recipe.download = 1.0.dev-r4053 -slapos.recipe.template = 2.2 -slapos.toolbox = 0.10 - -# Required by: -# slapos.core==0.18 -# slapos.toolbox==0.10 -Flask = 0.8 - -# Required by: -# slapos.cookbook==0.34 -PyXML = 0.8.4 - -# Required by: -# hexagonit.recipe.cmmi==1.5.0 -hexagonit.recipe.download = 1.5.0 - -# Required by: -# slapos.cookbook==0.34 -# slapos.core==0.18 -# slapos.toolbox==0.10 -# xml-marshaller==0.9.7 -lxml = 2.3.1 - -# Required by: -# slapos.cookbook==0.34 -netaddr = 0.7.6 - -# Required by: -# slapos.core==0.18 -netifaces = 0.6 - -# Required by: -# slapos.toolbox==0.10 -paramiko = 1.7.7.1 - -# Required by: -# slapos.toolbox==0.10 -psutil = 0.3.0 - -# Required by: -# slapos.cookbook==0.34 -# slapos.core==0.18 -# slapos.toolbox==0.10 -setuptools = 0.6c12dev-r88846 - -# Required by: -# slapos.cookbook==0.34 -# slapos.toolbox==0.10 -slapos.core = 0.18 - -# Required by: -# slapos.core==0.18 -supervisor = 3.0a10 - -# Required by: -# slapos.cookbook==0.34 -# slapos.toolbox==0.10 -xml-marshaller = 0.9.7 - -# Required by: -# slapos.cookbook==0.34 -zc.recipe.egg = 1.3.2 - -# Required by: -# slapos.core==0.18 -zope.interface = 3.8.0 - -[downloadcache-workaround] -# workaround irritating problem of hexagonit.recipe.cmmi which automatically -# creates download cache, which in turn switches builout to "semi-offline" mode -recipe = plone.recipe.command -# in hexagonit.recipe.cmmi if there is no ${buildout:download-cache} set it resolves -# to ${buildout:directory}/downloads but this variable is available late, that's -# why it is hardcoded only for required case -download-cache = ${buildout:directory}/downloads -command = [ -d ${:download-cache} ] && rm -fr ${:download-cache}/* || exit 0 -update-command = ${:command} -stop-on-error = True - diff --git a/software/mariadb/instance-mariadb.cfg b/software/mariadb/instance-mariadb.cfg deleted file mode 100644 index 6ef3a5e5d..000000000 --- a/software/mariadb/instance-mariadb.cfg +++ /dev/null @@ -1,179 +0,0 @@ -[buildout] -parts = - url - mariadb - stunnel - certificate-authority - logrotate - logrotate-entry-mariadb - cron - cron-entry-logrotate - cron-entry-mariadb-backup - -gzip-binary = ${gzip:location}/bin/gzip - -eggs-directory = ${buildout:eggs-directory} -develop-eggs-directory = ${buildout:develop-eggs-directory} -offline = true - -[url] -recipe = slapos.cookbook:publishurl -url = mysqls://$${mariadb:user}:$${mariadb:password}@[$${stunnel:remote-address}]:$${stunnel:remote-port}/$${mariadb:database} - -[mariadb] -recipe = slapos.cookbook:mysql - -# Options -recovering = false -user = user -port = 3306 -ip = $${slap-network-information:local-ipv4} -database = db - -# Paths -wrapper = $${basedirectory:services}/mariadb -update-wrapper = $${basedirectory:services}/mariadb_update -backup-script = $${rootdirectory:bin}/mariadb_backup -logrotate-post = $${rootdirectory:bin}/mariadb_post_logrotate -backup-directory = $${directory:mariadb-backup} -data-directory = $${directory:mariadb-data} -pid-file = $${basedirectory:run}/mariadb.pid -socket = $${basedirectory:run}/mariadb.sock -error-log = $${basedirectory:log}/mariadb_error.log -slow-query-log = $${basedirectory:log}/mariadb_slowquery.log -conf-file = $${rootdirectory:etc}/mariadb.cnf -backup-pending-directory = $${directory:mariadb-backup-pending} -dumpname = dump.sql.gz - -# Binary information -mysql-binary = ${mariadb:location}/bin/mysql -mysql-install-binary = ${mariadb:location}/bin/mysql_install_db -mysql-upgrade-binary = ${mariadb:location}/bin/mysql_upgrade -mysqld-binary = ${mariadb:location}/libexec/mysqld -mysqldump-binary = ${mariadb:location}/bin/mysqldump -gzip-binary = $${buildout:gzip-binary} -zcat-binary = ${gzip:location}/bin/zcat - - -[certificate-authority] -recipe = slapos.cookbook:certificate_authority -openssl-binary = ${openssl:location}/bin/openssl -ca-dir = $${directory:ca-dir} -requests-directory = $${cadirectory:requests} -wrapper = $${basedirectory:services}/ca -ca-private = $${cadirectory:private} -ca-certs = $${cadirectory:certs} -ca-newcerts = $${cadirectory:newcerts} -ca-crl = $${cadirectory:crl} - -[cadirectory] -recipe = slapos.cookbook:mkdirectory -requests = $${directory:ca-dir}/requests/ -private = $${directory:ca-dir}/private/ -certs = $${directory:ca-dir}/certs/ -newcerts = $${directory:ca-dir}/newcerts/ -crl = $${directory:ca-dir}/crl/ - -[ca-stunnel] -<= certificate-authority -recipe = slapos.cookbook:certificate_authority.request -key-file = $${directory:stunnel-conf}/stunnel.key -cert-file = $${directory:stunnel-conf}/stunnel.crt -executable = $${stunnel:wrapper} -wrapper = $${basedirectory:services}/stunnel - -[stunnel] -recipe = slapos.cookbook:stunnel -stunnel-binary = ${stunnel:location}/bin/stunnel -wrapper = $${rootdirectory:bin}/stunnel -log-file = $${basedirectory:log}/stunnel.log -config-file = $${rootdirectory:etc}/stunnel.conf -key-file = $${ca-stunnel:key-file} -cert-file = $${ca-stunnel:cert-file} -pid-file = $${basedirectory:run}/stunnel.pid -local-port = $${mariadb:port} -local-address = $${mariadb:ip} -remote-address = $${slap-network-information:global-ipv6} -remote-port = 6446 -client = false - -[logrotate] -recipe = slapos.cookbook:logrotate -# Binaries -logrotate-binary = ${logrotate:location}/usr/sbin/logrotate -gzip-binary = $${buildout:gzip-binary} -gunzip-binary = ${gzip:location}/bin/gunzip -# Directories -wrapper = $${rootdirectory:bin}/logrotate -conf = $${rootdirectory:etc}/logrotate.conf -logrotate-entries = $${directory:logrotate-entries} -backup = $${directory:logrotate-backup} -state-file = $${rootdirectory:srv}/logrotate.status - -[logrotate-entry-mariadb] -<= logrotate -recipe = slapos.cookbook:logrotate.d -name = mariadb -log = $${mariadb:error-log} $${mariadb:slow-query-log} -frequency = daily -rotate-num = 30 -post = $${mariadb:logrotate-post} -sharedscripts = true -notifempty = true -create = true - -[cron] -recipe = slapos.cookbook:cron -dcrond-binary = ${dcron:location}/sbin/crond -cron-entries = $${directory:cron-entries} -crontabs = $${directory:crontabs} -cronstamps = $${directory:cronstamps} -catcher = $${cron-simplelogger:binary} -binary = $${basedirectory:services}/crond - -[cron-simplelogger] -recipe = slapos.cookbook:simplelogger -binary = $${rootdirectory:bin}/cron_simplelogger -output = $${directory:cronoutput} - -[cron-entry-logrotate] -<= cron -recipe = slapos.cookbook:cron.d -name = logrotate -frequency = 0 0 * * * -command = $${logrotate:wrapper} - -[cron-entry-mariadb-backup] -<= cron -recipe = slapos.cookbook:cron.d -name = mariadb-backup -frequency = 0 0 * * * -command = $${mariadb:backup-script} - -[rootdirectory] -recipe = slapos.cookbook:mkdirectory -etc = $${buildout:directory}/etc/ -var = $${buildout:directory}/var/ -srv = $${buildout:directory}/srv/ -bin = $${buildout:directory}/bin/ - -[basedirectory] -recipe = slapos.cookbook:mkdirectory -log = $${rootdirectory:var}/log/ -services = $${rootdirectory:etc}/run/ -run = $${rootdirectory:var}/run/ -backup = $${rootdirectory:srv}/backup/ - -[directory] -recipe = slapos.cookbook:mkdirectory -cron-entries = $${rootdirectory:etc}/cron.d/ -crontabs = $${rootdirectory:etc}/crontabs/ -cronstamps = $${rootdirectory:etc}/cronstamps/ -cronoutput = $${basedirectory:log}/cron/ -ca-dir = $${rootdirectory:srv}/ssl/ -mariadb-backup = $${basedirectory:backup}/mariadb/ -mariadb-backup-pending = $${basedirectory:backup}/mariadb-pending/ -mariadb-data = $${rootdirectory:srv}/mariadb/ -logrotate-backup = $${basedirectory:backup}/logrotate/ -stunnel-conf = $${rootdirectory:etc}/stunnel/ -logrotate-entries = $${rootdirectory:etc}/logrotate.d/ diff --git a/software/mariadb/instance-recover.cfg b/software/mariadb/instance-recover.cfg deleted file mode 100644 index fffbe463d..000000000 --- a/software/mariadb/instance-recover.cfg +++ /dev/null @@ -1,7 +0,0 @@ -[buildout] -extends = - ${instance-remotebackuped:output} - -[mariadb] -recovering = true -recovering-wrapper = $${basedirectory:services}/mariadb_recover diff --git a/software/mariadb/instance-remotebackuped.cfg b/software/mariadb/instance-remotebackuped.cfg deleted file mode 100644 index 4385aa183..000000000 --- a/software/mariadb/instance-remotebackuped.cfg +++ /dev/null @@ -1,31 +0,0 @@ -[buildout] -extends = - ${instance-mariadb:output} - -parts = - url - mariadb - duplicity - stunnel - certificate-authority - logrotate - logrotate-entry-mariadb - cron - cron-entry-logrotate - cron-entry-mariadb-backup - cron-entry-duplicity - -[duplicity] -recipe = slapos.cookbook:duplicity -remote_backup = $${slap-parameter:remote-backup} -directory = $${mariadb:backup-directory} -duplicity_binary = ${buildout:bin-directory}/duplicity -wrapper = $${rootdirectory:bin}/duplicity -recover = false - -[cron-entry-duplicity] -<= cron -recipe = slapos.cookbook:cron.d -name = mariadb_remotebackup -frequency = 0 1 * * * -command = $${duplicity:wrapper} diff --git a/software/mariadb/instance.cfg b/software/mariadb/instance.cfg index 84deef001..74c5a4c1e 100644 --- a/software/mariadb/instance.cfg +++ b/software/mariadb/instance.cfg @@ -1,14 +1,20 @@ [buildout] - parts = - switch-softwaretype + instance eggs-directory = ${buildout:eggs-directory} develop-eggs-directory = ${buildout:develop-eggs-directory} -offline = true -[switch-softwaretype] -recipe = slapos.cookbook:softwaretype -default = ${instance-mariadb:output} -backuped = ${instance-remotebackuped:output} -recover = ${instance-recover:output} +[instance] +recipe = ${instance-recipe:egg}:${instance-recipe:module} +dcrond_binary = ${dcron:location}/sbin/crond +innobackupex_binary = ${xtrabackup:location}/bin/innobackupex +logrotate_binary = ${logrotate:location}/usr/sbin/logrotate +mysql_binary = ${mariadb:location}/bin/mysql +mysql_install_binary = ${mariadb:location}/bin/mysql_install_db +mysql_upgrade_binary = ${mariadb:location}/bin/mysql_upgrade +mysqld_binary = ${mariadb:location}/libexec/mysqld +openssl_binary = ${openssl:location}/bin/openssl +perl_binary = ${perl:location}/bin/perl +rdiff_backup_binary = ${buildout:bin-directory}/rdiff-backup +stunnel_binary = ${stunnel:location}/bin/stunnel diff --git a/software/mariadb/software.cfg b/software/mariadb/software.cfg index 017c06e22..9dff5d33a 100644 --- a/software/mariadb/software.cfg +++ b/software/mariadb/software.cfg @@ -2,6 +2,7 @@ extensions = slapos.zcbworkarounds + slapos.rebootstrap find-links += http://www.nexedi.org/static/packages/source/slapos.buildout/ @@ -12,9 +13,10 @@ extends = ../../component/logrotate/buildout.cfg ../../component/stunnel/buildout.cfg ../../component/python-2.7/buildout.cfg + ../../component/perl/buildout.cfg + ../../component/xtrabackup/buildout.cfg + ../../component/rdiff-backup/buildout.cfg ../../component/lxml-python/buildout.cfg - ../../component/gzip/buildout.cfg - ../../component/duplicity/buildout.cfg ../../stack/shacache-client.cfg # Use only quite well working sites. @@ -29,26 +31,15 @@ allow-hosts = psutil.googlecode.com www.dabeaz.com -# XXX: This is dirty, recipe trick shall be used. -develop = - /opt/slapdev - versions = versions -parts = +parts += # Create instance template #TODO : list here all parts. template - instance-remotebackuped - instance-mariadb - instance-recover libxslt eggs - gzip instance-recipe-egg - duplicity - mariadb - stunnel # XXX: Workaround of SlapOS limitation # Unzippig of eggs is required, as SlapOS do not yet provide nicely working @@ -79,35 +70,14 @@ eggs = # Default template for the instance. recipe = slapos.recipe.template url = ${:_profile_base_location_}/instance.cfg -md5sum = 3e1ea477d48080e9bdb98579f7f28be6 +md5sum = 69c32a67c5640d36ee042d2cfc35843d output = ${buildout:directory}/template.cfg mode = 0644 -[instance-mariadb] -recipe = slapos.recipe.template -url = ${:_profile_base_location_}/instance-mariadb.cfg -md5sum = 737a6d2f1ea9938b8d76e2d35e18e482 -output = ${buildout:directory}/template-mariadb.cfg -mode = 0644 - -[instance-remotebackuped] -recipe = slapos.recipe.template -url = ${:_profile_base_location_}/instance-remotebackuped.cfg -md5sum = bf9e5aa9d63bda9c4aa87d9527fec3e8 -output = ${buildout:directory}/template-backuped.cfg -mode = 0644 - -[instance-recover] -recipe = slapos.recipe.template -url = ${:_profile_base_location_}/instance-recover.cfg -md5sum = a8df936b6abf82d0d798b83ddfebdc8a -output = ${buildout:directory}/template-recover.cfg -mode = 0644 - [versions] -slapos.cookbook = +slapos.cookbook = 0.9 -# Required by slapos.cookbook==0.25 +# Required by slapos.cookbook==0.9 slapos.core = 0.4 collective.recipe.template = 1.8 netaddr = 0.7.5 @@ -119,4 +89,4 @@ hexagonit.recipe.download = 1.5.0 plone.recipe.command = 1.1 # Use SlapOS patched zc.buildout -zc.buildout = 1.6.0-dev-SlapOS-002 +zc.buildout = 1.5.3-dev-SlapOS-005 diff --git a/software/memcached/software.cfg b/software/memcached/software.cfg index 894a54c52..41cfb5163 100644 --- a/software/memcached/software.cfg +++ b/software/memcached/software.cfg @@ -86,4 +86,4 @@ hexagonit.recipe.download = 1.5.0 plone.recipe.command = 1.1 # Use SlapOS patched zc.buildout -zc.buildout = 1.5.3-dev-SlapOS-009 +zc.buildout = 1.5.3-dev-SlapOS-005 diff --git a/software/mysql-5.1/software.cfg b/software/mysql-5.1/software.cfg index 30a7b97a4..7b977c415 100644 --- a/software/mysql-5.1/software.cfg +++ b/software/mysql-5.1/software.cfg @@ -1,18 +1,17 @@ [buildout] -extensions = - buildout-versions find-links += http://www.nexedi.org/static/packages/source/slapos.buildout/ extends = + ../../component/mysql-5.1/buildout.cfg ../../component/dcron/buildout.cfg ../../component/logrotate/buildout.cfg - ../../component/lxml-python/buildout.cfg - ../../component/mysql-5.1/buildout.cfg - ../../component/perl/buildout.cfg - ../../component/rdiff-backup/buildout.cfg ../../component/stunnel/buildout.cfg + ../../component/python-2.7/buildout.cfg + ../../component/perl/buildout.cfg ../../component/xtrabackup/buildout.cfg + ../../component/rdiff-backup/buildout.cfg + ../../component/lxml-python/buildout.cfg ../../stack/shacache-client.cfg # Use only quite well working sites. @@ -20,27 +19,23 @@ allow-hosts = *.nexedi.org *.python.org *.sourceforge.net - alastairs-place.net dist.repoze.org effbot.org github.com peak.telecommunity.com psutil.googlecode.com www.dabeaz.com - www.owlfish.com versions = versions -parts = +parts += +#TODO : list here all parts. +# Create instance template template - rdiff-backup - stunnel - logrotate - xtrabackup - dcron - mysql-5.1 + libxslt eggs instance-recipe-egg + rdiff-backup # XXX: Workaround of SlapOS limitation # Unzippig of eggs is required, as SlapOS do not yet provide nicely working @@ -53,10 +48,12 @@ module = mysql [instance-recipe-egg] recipe = zc.recipe.egg +python = python2.7 eggs = ${instance-recipe:egg} [eggs] recipe = zc.recipe.egg +python = python2.7 eggs = ${lxml-python:egg} @@ -69,81 +66,18 @@ output = ${buildout:directory}/template.cfg mode = 0644 [versions] -zc.buildout = 1.6.0-dev-SlapOS-003 -# Use old cookbook version slapos.cookbook = 0.13 -Jinja2 = 2.6 -Werkzeug = 0.8.2 -buildout-versions = 1.7 -hexagonit.recipe.cmmi = 1.5.0 -hexagonit.recipe.download = 1.5.0 -meld3 = 0.6.8 -rdiff-backup = 1.0.5 -slapos.recipe.template = 2.2 - -# Required by: -# slapos.core==0.21 -Flask = 0.8 - -# Required by: -# slapos.cookbook==0.13 -PyXML = 0.8.4 - -# Required by: -# slapos.cookbook==0.13 -# slapos.core==0.21 -# xml-marshaller==0.9.7 -lxml = 2.3.3 - -# Required by: -# slapos.cookbook==0.13 -netaddr = 0.7.6 - -# Required by: -# slapos.core==0.21 -netifaces = 0.6 - -# Required by: -# slapos.cookbook==0.13 -# slapos.core==0.21 -# zc.buildout==1.6.0-dev-SlapOS-003 -# zc.recipe.egg==1.3.2 -setuptools = 0.6c12dev-r88846 - -# Required by: -# slapos.cookbook==0.13 -slapos.core = 0.21 - -# Required by: -# slapos.core==0.21 -supervisor = 3.0a12 - -# Required by: -# slapos.cookbook==0.13 +# Required by slapos.cookbook==0.13 +slapos.core = 0.4 +collective.recipe.template = 1.8 +netaddr = 0.7.5 xml-marshaller = 0.9.7 +setuptools = 0.6c12dev-r88795 -# Required by: -# slapos.cookbook==0.13 -zc.recipe.egg = 1.3.2 - -# Required by: -# slapos.core==0.21 -zope.interface = 3.8.0 +hexagonit.recipe.cmmi = 1.5.0 +hexagonit.recipe.download = 1.5.0 +plone.recipe.command = 1.1 -[networkcache] -# Cedric de Saint Martin signature certificate -signature-certificate-list = - -----BEGIN CERTIFICATE----- - MIIB9jCCAV+gAwIBAgIJAO4V/jiMoICoMA0GCSqGSIb3DQEBBQUAMBMxETAPBgNV - BAMMCENPTVAtMjMyMCAXDTEyMDIxNjExMTAyM1oYDzIxMTIwMTIzMTExMDIzWjAT - MREwDwYDVQQDDAhDT01QLTIzMjCBnzANBgkqhkiG9w0BAQEFAAOBjQAwgYkCgYEA - wi/3Z8W9pUiegUXIk/AiFDQ0UJ4JFAwjqr+HSRUirlUsHHT+8DzH/hfcTDX1I5BB - D1ADk+ydXjMm3OZrQcXjn29OUfM5C+g+oqeMnYQImN0DDQIOcUyr7AJc4xhvuXQ1 - P2pJ5NOd3tbd0kexETa1LVhR6EgBC25LyRBRae76qosCAwEAAaNQME4wHQYDVR0O - BBYEFMDmW9aFy1sKTfCpcRkYnP6zUd1cMB8GA1UdIwQYMBaAFMDmW9aFy1sKTfCp - cRkYnP6zUd1cMAwGA1UdEwQFMAMBAf8wDQYJKoZIhvcNAQEFBQADgYEAskbFizHr - b6d3iIyN+wffxz/V9epbKIZVEGJd/6LrTdLiUfJPec7FaxVCWNyKBlCpINBM7cEV - Gn9t8mdVQflNqOlAMkOlUv1ZugCt9rXYQOV7rrEYJBWirn43BOMn9Flp2nibblby - If1a2ZoqHRxoNo2yTmm7TSYRORWVS+vvfjY= - -----END CERTIFICATE----- +# Use SlapOS patched zc.buildout +zc.buildout = 1.5.3-dev-SlapOS-005 diff --git a/software/nbd/software.cfg b/software/nbd/software.cfg index 2735046e3..f5601bc3f 100644 --- a/software/nbd/software.cfg +++ b/software/nbd/software.cfg @@ -13,8 +13,3 @@ url = ${:_profile_base_location_}/instance.cfg md5sum = 82e948e1c0cb0d5540ef185edeef3ec3 output = ${buildout:directory}/template.cfg mode = 0644 - -[versions] -# XXX-CEDRIC Quick and dirty workaround to avoid m2crypto problems. -# should not be used elsewhere unless for urgent cases. -slapos.libnetworkcache = 0.2 diff --git a/software/net2ftp/configure.py b/software/net2ftp/configure.py deleted file mode 100644 index 2c16f4e3c..000000000 --- a/software/net2ftp/configure.py +++ /dev/null @@ -1,25 +0,0 @@ -import sys -import os -import MySQLdb - -def setup(args): - mysql_port, mysql_host, mysql_user, mysql_password, mysql_database, base_url, htdocs = args - - sql_file = os.path.join(htdocs, "create_tables.sql") - try: - conn = MySQLdb.connect (host = mysql_host, - user = mysql_user, - passwd = mysql_password, - db = mysql_database) - cursor = conn.cursor () - with open(sql_file, 'r') as f: - sql_script = f.readline() - while sql_script != "": - cursor.execute(sql_script) - sql_script = f.readline() - conn.close() - except: - return - -if __name__ == '__main__': - setup(sys.argv[1:]) \ No newline at end of file diff --git a/software/net2ftp/instance.cfg b/software/net2ftp/instance.cfg deleted file mode 100644 index 6939e38b9..000000000 --- a/software/net2ftp/instance.cfg +++ /dev/null @@ -1,25 +0,0 @@ -[buildout] -eggs-directory = ${buildout:eggs-directory} -develop-eggs-directory = ${buildout:develop-eggs-directory} - -parts = instance - -[instance] -recipe = ${instance-recipe:egg}:${instance-recipe:module} -source = ${application:location} -template = ${application-template:location}/${application-template:filename} -configuration = ${application-configuration:location} -lampconfigure_directory = ${buildout:bin-directory}/lampconfigure - -httpd_binary = ${apache:location}/bin/httpd -mysql_binary = ${mariadb:location}/bin/mysql -mysql_install_binary = ${mariadb:location}/bin/mysql_install_db -mysql_upgrade_binary = ${mariadb:location}/bin/mysql_upgrade -mysqld_binary = ${mariadb:location}/libexec/mysqld - -#delete = -#rename = -#file_token = name of file who will be created at the end of installation -table_name = ** -constraint = 1 -script = ${configure-script:location}/${configure-script:filename} \ No newline at end of file diff --git a/software/net2ftp/software.cfg b/software/net2ftp/software.cfg deleted file mode 100644 index 9d2dc3520..000000000 --- a/software/net2ftp/software.cfg +++ /dev/null @@ -1,154 +0,0 @@ -[buildout] -versions = versions - -parts = - template - apache-php - mariadb - eggs - instance-recipe-egg - downloadcache-workaround - configure-script - -extends = - ../../stack/lamp.cfg - ../../stack/shacache-client.cfg - -[application] -recipe = slapos.recipe.build:download-unpacked -url = http://www.net2ftp.com/download/net2ftp_v0.98.zip -md5sum = 5a2741b5881f3f229a788958dc6cdf10 -extract-directory = files_to_upload - -[configure-script] -recipe = slapos.recipe.download -location = ${buildout:parts-directory}/${:_buildout_section_name_} -url = ${:_profile_base_location_}/configure.py -md5sum = f7e1766468f7a8d51d311541164c3ff4 -filename = configure.py -mode = 0744 - -[application-template] -recipe = slapos.recipe.download -url = ${:_profile_base_location_}/template/net2ftp.inc.php.in -md5sum = 5ad3b2b42affd83229f0666c480b90cb -filename = template.in -mode = 0644 -location = ${buildout:parts-directory}/${:_buildout_section_name_} - -[application-configuration] -location = settings.inc.php - -[instance-recipe] -egg = slapos.cookbook -module = lamp.simple - -[template] -# Default template for the instance. -recipe = slapos.recipe.template -url = ${:_profile_base_location_}/instance.cfg -#md5sum = Student shall put md5 of instance.cfg here -output = ${buildout:directory}/template.cfg -mode = 0644 - -[instance-recipe-egg] -recipe = zc.recipe.egg -eggs = - ${mysql-python:egg} - ${instance-recipe:egg} - slapos.toolbox[lampconfigure] - -[versions] -# Use SlapOS patched zc.buildout -zc.buildout = 1.5.3-dev-SlapOS-010 - -Jinja2 = 2.6 -MySQL-python = 1.2.3 -Werkzeug = 0.8.1 -apache-libcloud = 0.5.2 -buildout-versions = 1.7 -hexagonit.recipe.cmmi = 1.5.0 -meld3 = 0.6.7 -plone.recipe.command = 1.1 -slapos.cookbook = 0.34 -slapos.recipe.build = 0.7 -slapos.recipe.download = 1.0.dev-r4053 -slapos.recipe.template = 2.2 -slapos.toolbox = 0.10 - -# Required by: -# slapos.core==0.18 -# slapos.toolbox==0.10 -Flask = 0.8 - -# Required by: -# slapos.cookbook==0.34 -PyXML = 0.8.4 - -# Required by: -# hexagonit.recipe.cmmi==1.5.0 -hexagonit.recipe.download = 1.5.0 - -# Required by: -# slapos.cookbook==0.34 -# slapos.core==0.18 -# slapos.toolbox==0.10 -# xml-marshaller==0.9.7 -lxml = 2.3.1 - -# Required by: -# slapos.cookbook==0.34 -netaddr = 0.7.6 - -# Required by: -# slapos.core==0.18 -netifaces = 0.6 - -# Required by: -# slapos.toolbox==0.10 -paramiko = 1.7.7.1 - -# Required by: -# slapos.toolbox==0.10 -psutil = 0.3.0 - -# Required by: -# slapos.cookbook==0.34 -# slapos.core==0.18 -# slapos.toolbox==0.10 -setuptools = 0.6c12dev-r88846 - -# Required by: -# slapos.cookbook==0.34 -# slapos.toolbox==0.10 -slapos.core = 0.18 - -# Required by: -# slapos.core==0.18 -supervisor = 3.0a10 - -# Required by: -# slapos.cookbook==0.34 -# slapos.toolbox==0.10 -xml-marshaller = 0.9.7 - -# Required by: -# slapos.cookbook==0.34 -zc.recipe.egg = 1.3.2 - -# Required by: -# slapos.core==0.18 -zope.interface = 3.8.0 - -[downloadcache-workaround] -# workaround irritating problem of hexagonit.recipe.cmmi which automatically -# creates download cache, which in turn switches builout to "semi-offline" mode -recipe = plone.recipe.command -# in hexagonit.recipe.cmmi if there is no ${buildout:download-cache} set it resolves -# to ${buildout:directory}/downloads but this variable is available late, that's -# why it is hardcoded only for required case -download-cache = ${buildout:directory}/downloads -command = [ -d ${:download-cache} ] && rm -fr ${:download-cache}/* || exit 0 -update-command = ${:command} -stop-on-error = True - diff --git a/software/net2ftp/template/net2ftp.inc.php.in b/software/net2ftp/template/net2ftp.inc.php.in deleted file mode 100644 index 2f7271d8c..000000000 --- a/software/net2ftp/template/net2ftp.inc.php.in +++ /dev/null @@ -1,147 +0,0 @@ -<?php - -// ------------------------------------------------------------------------------- -// | net2ftp: a web based FTP client | -// | Copyright (c) 2003-2009 by David Gartner | -// | | -// ------------------------------------------------------------------------------- -// | | -// | Enter your settings and preferences below. | -// | | -// | The structure of each line is like this: | -// | $net2ftp_settings["setting_name"] = "setting_value"; | -// | | -// | BE CAREFUL WHEN EDITING THE FILE: ONLY EDIT THE setting_value, AND DO NOT | -// | ERASE THE " OR THE ; CHARACTERS. | -// ------------------------------------------------------------------------------- - - -// ---------------------------------------------------------------------------------- -// Basic settings -// ---------------------------------------------------------------------------------- - -// Enter your email address -// This is used as "from" address when sending files in attachment -$net2ftp_settings["email_feedback"] = "webmaster@enter-your-domain-here.com"; - -// Default language and skin (look in /languages and /skins to see which are available) -$net2ftp_settings["default_language"] = "en"; -$net2ftp_settings["default_skin"] = "blue"; - -// Enter the address of your help pages, support forum or ticket system -// This will add a link in the footer; leave empty if you don't have this -$net2ftp_settings["help_text"] = ""; -$net2ftp_settings["help_link"] = ""; - -// PHP error reporting -//$net2ftp_settings["error_reporting"] = "NONE"; -$net2ftp_settings["error_reporting"] = "standard"; -//$net2ftp_settings["error_reporting"] = "ALL"; - -// Fix transparent PNG images in IE -$net2ftp_settings["fix_png"] = "yes"; - -// MD5 salt and encryption string (change them to improve security) -$net2ftp_settings["encryption_string"] = "462E16CB7C3F369BD9F4DBEE0A926F8F14FFB3"; - - -// ---------------------------------------------------------------------------------- -// Admin Panel username and password -// If no password is set, the Admin panel will not be accessible by anyone -// ---------------------------------------------------------------------------------- - -$net2ftp_settings["admin_username"] = "%(mysql_user)s"; -$net2ftp_settings["admin_password"] = "%(mysql_password)s"; - - -// ---------------------------------------------------------------------------------- -// Message on Browse screen -// ---------------------------------------------------------------------------------- - -$net2ftp_settings["message_browse"] = ""; - - -// ---------------------------------------------------------------------------------- -// A MySQL database is optional. It can be used for: logging the users, -// checking the consumption of network and server resources (data transfer -// volume and script execution time), and checking the user's home directory -// ---------------------------------------------------------------------------------- - -// MASTER SETTING that overrides the other settings below: use a database? -$net2ftp_settings["use_database"] = "yes"; // "yes" or "no" - -// Enter your MySQL settings -$net2ftp_settings["dbusername"] = "%(mysql_user)s"; -$net2ftp_settings["dbpassword"] = "%(mysql_password)s"; -$net2ftp_settings["dbname"] = "%(mysql_database)s"; -$net2ftp_settings["dbserver"] = "%(mysql_host)s"; // on many configurations, this is "localhost" - -// Switch different types of logs on or off -$net2ftp_settings["log_access"] = "yes"; -$net2ftp_settings["log_error"] = "yes"; - -// Delete logs which are older than X days automatically -$net2ftp_settings["log_length_days"] = 31; // number of days - - -// ---------------------------------------------------------------------------------- -// Logging to the system logger -// ---------------------------------------------------------------------------------- - -$net2ftp_settings["use_syslog"] = "no"; -$net2ftp_settings["syslog_priority"] = LOG_NOTICE; -$net2ftp_settings["syslog_facility"] = LOG_MAIL; -$net2ftp_settings["syslog_ident"] = "net2ftp"; - - -// ---------------------------------------------------------------------------------- -// Files bigger than this limit will be excluded from: -// upload, download, copy, move, search, view, edit -// ---------------------------------------------------------------------------------- - -$net2ftp_settings["max_filesize"] = "10000000"; // in Bytes, default 10 MB - -// Note: IF YOU WANT TO ALLOW LARGE FILE UPLOADS, YOU MAY HAVE TO ADJUST -// THE FOLLOWING PARAMETERS: -// 1 - in the file php.ini: upload_max_filesize, post_max_size, -// max_execution_time, memory_limit -// 2 - in the file php.conf: LimitRequestBody - - -// ---------------------------------------------------------------------------------- -// Server resource consumption settings -// ---------------------------------------------------------------------------------- - -// Switch consumption checking on or off -$net2ftp_settings["check_consumption"] = "yes"; - -// Maximum data transfer volume per day (in Bytes) -$net2ftp_settings["max_consumption_ipaddress_datatransfer"] = 50000000; // per IP address -$net2ftp_settings["max_consumption_ftpserver_datatransfer"] = 50000000; // per FTP server - -// Maximum script execution time per day (in seconds) -$net2ftp_settings["max_consumption_ipaddress_executiontime"] = 1500; // per IP address -$net2ftp_settings["max_consumption_ftpserver_executiontime"] = 1500; // per FTP server - -// Maximum number of FTP servers that can be accessed per day -$net2ftp_settings["max_consumption_ipaddress_nr_of_ftpservers"] = 50; // per IP address - -// Check the user's home directory? -$net2ftp_settings["check_homedirectory"] = "yes"; - - -// ---------------------------------------------------------------------------------- -// DO NOT CHANGE ANYTHING BELOW THIS LINE -// ---------------------------------------------------------------------------------- - -$net2ftp_settings["application_version"] = "0.98"; -$net2ftp_settings["application_build_nr"] = "45"; - -// Is this net2ftp.com, or a net2ftp installation elsewhere -$net2ftp_settings["net2ftpdotcom"] = "no"; - -// Google Adsense advertisements -// Not shown when using HTTPS to avoid warnings on each pageload -$net2ftp_settings["show_google_ads"] = "no"; - -?> diff --git a/software/nosqltestbed/instance.cfg b/software/nosqltestbed/instance.cfg deleted file mode 100644 index 40da2d1fe..000000000 --- a/software/nosqltestbed/instance.cfg +++ /dev/null @@ -1,16 +0,0 @@ -[buildout] -parts = - kumoinstance - -eggs-directory = ${buildout:eggs-directory} -develop-eggs-directory = ${buildout:develop-eggs-directory} - -[kumoinstance] -<=slap_connection -recipe = slapos.cookbook:nosqltestbed -manager_binary = ${kumo:location}/bin/kumo-manager -server_binary = ${kumo:location}/bin/kumo-server -gateway_binary = ${kumo:location}/bin/kumo-gateway -nosqltester_binary = ${buildout:bin-directory}/nosqltester -memstrike_binary = ${memstrike:location}/bin/memstrike -nosqltester_manager_binary = ${buildout:bin-directory}/nosqltester_manager diff --git a/software/nosqltestbed/software.cfg b/software/nosqltestbed/software.cfg deleted file mode 100644 index 7b181e550..000000000 --- a/software/nosqltestbed/software.cfg +++ /dev/null @@ -1,70 +0,0 @@ -[buildout] -recipe_location = ${:parts-directory}/slapos.cookbook -develop = ${:recipe_location} - -extends = - ../../component/kumo/buildout.cfg - ../../component/memstrike/buildout.cfg - ../../component/lxml-python/buildout.cfg - -find-links = - http://www.nexedi.org/static/packages/source/slapos.buildout/ - http://www.nexedi.org/static/packages/source/ - -parts = - template - eggs - kumo - memstrike - checkrecipe - -versions = versions - -# separate from system python -include-site-packages = false -exec-sitecustomize = false -allowed-eggs-from-site-packages = - -[kumo] -environment += CXXFLAGS=-DKUMO_IPV6 - -[checkrecipe] -recipe = plone.recipe.command -stop-on-error = true -update-command = ${:command} -command = grep parts ${buildout:develop-eggs-directory}/slapos.cookbook.egg-link - -[slapos.cookbook] -recipe = plone.recipe.command -stop-on-error = true -location = ${buildout:parts-directory}/${:_buildout_section_name_} -command = ${git:location}/bin/git clone -b nosqltestbed --quiet http://git.erp5.org/repos/slapos.git ${:location} -update-command = cd ${:location} && ${git:location}/bin/git pull --quiet - -[eggs] -dummy = ${slapos.cookbook:location} -recipe = zc.recipe.egg -eggs = - ${lxml-python:egg} - PyXML - Zope2 - collective.recipe.template - netaddr - slapos.core - xml_marshaller - slapos.cookbook - slapos.tool.nosqltester - slapos.tool.nosqltester_manager - slapos.tool.nosqltester_manager.kumo - erp5.utils.benchmark - -[template] -recipe = slapos.recipe.template -url = ${:_profile_base_location_}/instance.cfg -md5sum = 1c1000ea9829f23a897d256373191df6 -output = ${buildout:directory}/template.cfg -mode = 0644 - -[versions] -# Use SlapOS patched zc.buildout -zc.buildout = 1.5.3-dev-SlapOS-001 diff --git a/software/openX/instance.cfg b/software/openX/instance.cfg deleted file mode 100644 index 9495bde7e..000000000 --- a/software/openX/instance.cfg +++ /dev/null @@ -1,15 +0,0 @@ -[buildout] -eggs-directory = ${buildout:eggs-directory} -develop-eggs-directory = ${buildout:develop-eggs-directory} - -parts = instance - -[instance] -recipe = ${instance-recipe:egg}:${instance-recipe:module} -source = ${application:location} - -httpd_binary = ${apache:location}/bin/httpd -mysql_binary = ${mariadb:location}/bin/mysql -mysql_install_binary = ${mariadb:location}/bin/mysql_install_db -mysql_upgrade_binary = ${mariadb:location}/bin/mysql_upgrade -mysqld_binary = ${mariadb:location}/libexec/mysqld diff --git a/software/openX/software.cfg b/software/openX/software.cfg deleted file mode 100644 index 00a0befaa..000000000 --- a/software/openX/software.cfg +++ /dev/null @@ -1,130 +0,0 @@ -[buildout] -versions = versions - -parts = - template - apache-php - mariadb - eggs - instance-recipe-egg - downloadcache-workaround - -extends = - ../../stack/lamp.cfg - ../../stack/shacache-client.cfg - -[application] -recipe = slapos.recipe.build:download-unpacked -url = http://download.openx.org/openx-2.8.7.tar.gz -md5sum = 23fa5052af6d4411e8b84284894ff619 - -[instance-recipe] -egg = slapos.cookbook -module = lamp.simple - -[template] -# Default template for the instance. -recipe = slapos.recipe.template -url = ${:_profile_base_location_}/instance.cfg -#md5sum = Student shall put md5 of instance.cfg here -output = ${buildout:directory}/template.cfg -mode = 0644 - -[instance-recipe-egg] -recipe = zc.recipe.egg -eggs = ${instance-recipe:egg} - -[versions] -# Use SlapOS patched zc.buildout -zc.buildout = 1.5.3-dev-SlapOS-010 - -Jinja2 = 2.6 -MySQL-python = 1.2.3 -Werkzeug = 0.8.1 -apache-libcloud = 0.5.2 -buildout-versions = 1.7 -hexagonit.recipe.cmmi = 1.5.0 -meld3 = 0.6.7 -plone.recipe.command = 1.1 -slapos.cookbook = 0.34 -slapos.recipe.build = 0.7 -slapos.recipe.download = 1.0.dev-r4053 -slapos.recipe.template = 2.2 -slapos.toolbox = 0.10 - -# Required by: -# slapos.core==0.18 -# slapos.toolbox==0.10 -Flask = 0.8 - -# Required by: -# slapos.cookbook==0.34 -PyXML = 0.8.4 - -# Required by: -# hexagonit.recipe.cmmi==1.5.0 -hexagonit.recipe.download = 1.5.0 - -# Required by: -# slapos.cookbook==0.34 -# slapos.core==0.18 -# slapos.toolbox==0.10 -# xml-marshaller==0.9.7 -lxml = 2.3.1 - -# Required by: -# slapos.cookbook==0.34 -netaddr = 0.7.6 - -# Required by: -# slapos.core==0.18 -netifaces = 0.6 - -# Required by: -# slapos.toolbox==0.10 -paramiko = 1.7.7.1 - -# Required by: -# slapos.toolbox==0.10 -psutil = 0.3.0 - -# Required by: -# slapos.cookbook==0.34 -# slapos.core==0.18 -# slapos.toolbox==0.10 -setuptools = 0.6c12dev-r88846 - -# Required by: -# slapos.cookbook==0.34 -# slapos.toolbox==0.10 -slapos.core = 0.18 - -# Required by: -# slapos.core==0.18 -supervisor = 3.0a10 - -# Required by: -# slapos.cookbook==0.34 -# slapos.toolbox==0.10 -xml-marshaller = 0.9.7 - -# Required by: -# slapos.cookbook==0.34 -zc.recipe.egg = 1.3.2 - -# Required by: -# slapos.core==0.18 -zope.interface = 3.8.0 - -[downloadcache-workaround] -# workaround irritating problem of hexagonit.recipe.cmmi which automatically -# creates download cache, which in turn switches builout to "semi-offline" mode -recipe = plone.recipe.command -# in hexagonit.recipe.cmmi if there is no ${buildout:download-cache} set it resolves -# to ${buildout:directory}/downloads but this variable is available late, that's -# why it is hardcoded only for required case -download-cache = ${buildout:directory}/downloads -command = [ -d ${:download-cache} ] && rm -fr ${:download-cache}/* || exit 0 -update-command = ${:command} -stop-on-error = True - diff --git a/software/os-commerce/instance.cfg b/software/os-commerce/instance.cfg deleted file mode 100644 index 9495bde7e..000000000 --- a/software/os-commerce/instance.cfg +++ /dev/null @@ -1,15 +0,0 @@ -[buildout] -eggs-directory = ${buildout:eggs-directory} -develop-eggs-directory = ${buildout:develop-eggs-directory} - -parts = instance - -[instance] -recipe = ${instance-recipe:egg}:${instance-recipe:module} -source = ${application:location} - -httpd_binary = ${apache:location}/bin/httpd -mysql_binary = ${mariadb:location}/bin/mysql -mysql_install_binary = ${mariadb:location}/bin/mysql_install_db -mysql_upgrade_binary = ${mariadb:location}/bin/mysql_upgrade -mysqld_binary = ${mariadb:location}/libexec/mysqld diff --git a/software/os-commerce/software.cfg b/software/os-commerce/software.cfg deleted file mode 100644 index db98c08f1..000000000 --- a/software/os-commerce/software.cfg +++ /dev/null @@ -1,130 +0,0 @@ -[buildout] -versions = versions - -parts = - template - apache-php - mariadb - eggs - instance-recipe-egg - downloadcache-workaround - -extends = - ../../stack/lamp.cfg - ../../stack/shacache-client.cfg - -[application] -recipe = slapos.recipe.build:download-unpacked -url = http://www.oscommerce.com/files/oscommerce-3.0.2.zip -md5sum = 680caf7dde7cf7772a576ef3930970ff -extract-directory = oscommerce - -[instance-recipe] -egg = slapos.cookbook -module = lamp.simple - -[template] -# Default template for the instance. -recipe = slapos.recipe.template -url = ${:_profile_base_location_}/instance.cfg -#md5sum = Student shall put md5 of instance.cfg here -output = ${buildout:directory}/template.cfg -mode = 0644 - -[instance-recipe-egg] -recipe = zc.recipe.egg -eggs = ${instance-recipe:egg} - -[versions] -# Use SlapOS patched zc.buildout -zc.buildout = 1.5.3-dev-SlapOS-010 - -Jinja2 = 2.6 -MySQL-python = 1.2.3 -Werkzeug = 0.8.1 -apache-libcloud = 0.5.2 -buildout-versions = 1.7 -hexagonit.recipe.cmmi = 1.5.0 -meld3 = 0.6.7 -plone.recipe.command = 1.1 -slapos.cookbook = 0.34 -slapos.recipe.build = 0.7 -slapos.recipe.download = 1.0.dev-r4053 -slapos.recipe.template = 2.2 -slapos.toolbox = 0.10 - -# Required by: -# slapos.core==0.18 -# slapos.toolbox==0.10 -Flask = 0.8 - -# Required by: -# slapos.cookbook==0.34 -PyXML = 0.8.4 - -# Required by: -# hexagonit.recipe.cmmi==1.5.0 -hexagonit.recipe.download = 1.5.0 - -# Required by: -# slapos.cookbook==0.34 -# slapos.core==0.18 -# slapos.toolbox==0.10 -# xml-marshaller==0.9.7 -lxml = 2.3.1 - -# Required by: -# slapos.cookbook==0.34 -netaddr = 0.7.6 - -# Required by: -# slapos.core==0.18 -netifaces = 0.6 - -# Required by: -# slapos.toolbox==0.10 -paramiko = 1.7.7.1 - -# Required by: -# slapos.toolbox==0.10 -psutil = 0.3.0 - -# Required by: -# slapos.cookbook==0.34 -# slapos.core==0.18 -# slapos.toolbox==0.10 -setuptools = 0.6c12dev-r88846 - -# Required by: -# slapos.cookbook==0.34 -# slapos.toolbox==0.10 -slapos.core = 0.18 - -# Required by: -# slapos.core==0.18 -supervisor = 3.0a10 - -# Required by: -# slapos.cookbook==0.34 -# slapos.toolbox==0.10 -xml-marshaller = 0.9.7 - -# Required by: -# slapos.cookbook==0.34 -zc.recipe.egg = 1.3.2 - -# Required by: -# slapos.core==0.18 -zope.interface = 3.8.0 - -[downloadcache-workaround] -# workaround irritating problem of hexagonit.recipe.cmmi which automatically -# creates download cache, which in turn switches builout to "semi-offline" mode -recipe = plone.recipe.command -# in hexagonit.recipe.cmmi if there is no ${buildout:download-cache} set it resolves -# to ${buildout:directory}/downloads but this variable is available late, that's -# why it is hardcoded only for required case -download-cache = ${buildout:directory}/downloads -command = [ -d ${:download-cache} ] && rm -fr ${:download-cache}/* || exit 0 -update-command = ${:command} -stop-on-error = True diff --git a/software/phpbb/instance.cfg b/software/phpbb/instance.cfg deleted file mode 100644 index a099e8a10..000000000 --- a/software/phpbb/instance.cfg +++ /dev/null @@ -1,22 +0,0 @@ -[buildout] -eggs-directory = ${buildout:eggs-directory} -develop-eggs-directory = ${buildout:develop-eggs-directory} - -parts = instance - -[instance] -recipe = ${instance-recipe:egg}:${instance-recipe:module} -source = ${application:location} -lampconfigure_directory = ${buildout:bin-directory}/lampconfigure - -httpd_binary = ${apache:location}/bin/httpd -mysql_binary = ${mariadb:location}/bin/mysql -mysql_install_binary = ${mariadb:location}/bin/mysql_install_db -mysql_upgrade_binary = ${mariadb:location}/bin/mysql_upgrade -mysqld_binary = ${mariadb:location}/libexec/mysqld - -delete = install -#rename = -#file_token = name of file who will be created at the end of installation -table_name = modules -constraint = `module_id`>0 \ No newline at end of file diff --git a/software/phpbb/software.cfg b/software/phpbb/software.cfg deleted file mode 100644 index 9c0b861a8..000000000 --- a/software/phpbb/software.cfg +++ /dev/null @@ -1,132 +0,0 @@ -[buildout] -versions = versions - -parts = - template - apache-php - mariadb - eggs - instance-recipe-egg - downloadcache-workaround - -extends = - ../../stack/lamp.cfg - ../../stack/shacache-client.cfg - -[application] -recipe = slapos.recipe.build:download-unpacked -url = http://www.phpbb.com/files/release/phpBB-3.0.9.zip -md5sum = fb8025a51a3c756fe6151a6b0beeefd4 - -[instance-recipe] -egg = slapos.cookbook -module = lamp.simple - -[template] -# Default template for the instance. -recipe = slapos.recipe.template -url = ${:_profile_base_location_}/instance.cfg -#md5sum = Student shall put md5 of instance.cfg here -output = ${buildout:directory}/template.cfg -mode = 0644 - -[instance-recipe-egg] -recipe = zc.recipe.egg -eggs = - ${mysql-python:egg} - ${instance-recipe:egg} - slapos.toolbox[lampconfigure] - -[versions] -# Use SlapOS patched zc.buildout -zc.buildout = 1.5.3-dev-SlapOS-010 - -Jinja2 = 2.6 -MySQL-python = 1.2.3 -Werkzeug = 0.8.1 -apache-libcloud = 0.5.2 -buildout-versions = 1.7 -hexagonit.recipe.cmmi = 1.5.0 -meld3 = 0.6.7 -plone.recipe.command = 1.1 -slapos.cookbook = 0.34 -slapos.recipe.build = 0.7 -slapos.recipe.download = 1.0.dev-r4053 -slapos.recipe.template = 2.2 -slapos.toolbox = 0.10 - -# Required by: -# slapos.core==0.18 -# slapos.toolbox==0.10 -Flask = 0.8 - -# Required by: -# slapos.cookbook==0.34 -PyXML = 0.8.4 - -# Required by: -# hexagonit.recipe.cmmi==1.5.0 -hexagonit.recipe.download = 1.5.0 - -# Required by: -# slapos.cookbook==0.34 -# slapos.core==0.18 -# slapos.toolbox==0.10 -# xml-marshaller==0.9.7 -lxml = 2.3.1 - -# Required by: -# slapos.cookbook==0.34 -netaddr = 0.7.6 - -# Required by: -# slapos.core==0.18 -netifaces = 0.5 - -# Required by: -# slapos.toolbox==0.10 -paramiko = 1.7.7.1 - -# Required by: -# slapos.toolbox==0.10 -psutil = 0.3.0 - -# Required by: -# slapos.cookbook==0.34 -# slapos.core==0.18 -# slapos.toolbox==0.10 -setuptools = 0.6c12dev-r88846 - -# Required by: -# slapos.cookbook==0.34 -# slapos.toolbox==0.10 -slapos.core = 0.18 - -# Required by: -# slapos.core==0.18 -supervisor = 3.0a10 - -# Required by: -# slapos.cookbook==0.34 -# slapos.toolbox==0.10 -xml-marshaller = 0.9.7 - -# Required by: -# slapos.cookbook==0.34 -zc.recipe.egg = 1.3.2 - -# Required by: -# slapos.core==0.18 -zope.interface = 3.8.0 - -[downloadcache-workaround] -# workaround irritating problem of hexagonit.recipe.cmmi which automatically -# creates download cache, which in turn switches builout to "semi-offline" mode -recipe = plone.recipe.command -# in hexagonit.recipe.cmmi if there is no ${buildout:download-cache} set it resolves -# to ${buildout:directory}/downloads but this variable is available late, that's -# why it is hardcoded only for required case -download-cache = ${buildout:directory}/downloads -command = [ -d ${:download-cache} ] && rm -fr ${:download-cache}/* || exit 0 -update-command = ${:command} -stop-on-error = True diff --git a/software/phpmyadmin/software.cfg b/software/phpmyadmin/software.cfg index 67380869d..4791f1270 100644 --- a/software/phpmyadmin/software.cfg +++ b/software/phpmyadmin/software.cfg @@ -21,14 +21,15 @@ output = ${buildout:directory}/template.cfg mode = 0644 [application] -recipe = slapos.recipe.build:download-unpacked +recipe = hexagonit.recipe.download url = http://downloads.sourceforge.net/project/phpmyadmin/phpMyAdmin/3.3.10/phpMyAdmin-3.3.10-all-languages.tar.bz2?r=http%3A%2F%2Fwww.phpmyadmin.net%2Fhome_page%2Fdownloads.php&ts=1300959842&use_mirror=sunet -md5sum = cb7a632fb4f10a180ead15f7f90087f1 +#md5sum = Student may put here md5sum of this file, this is good idea [application-template] recipe = slapos.recipe.download url = ${:_profile_base_location_}/phpmyadmin.inc.php.in md5sum = caab45c34c75661c214f4628ff545bb4 +download-only = True filename = template.in mode = 0644 location = ${buildout:parts-directory}/${:_buildout_section_name_} @@ -38,103 +39,26 @@ location = config.inc.php [instance-recipe] egg = slapos.cookbook -module = lamp.simple - +module = osoeslaptraining.simple [instance-recipe-egg] recipe = zc.recipe.egg +python = python2.7 eggs = ${instance-recipe:egg} [versions] -# Use SlapOS patched zc.buildout -zc.buildout = 1.5.3-dev-SlapOS-010 - -Jinja2 = 2.6 -MySQL-python = 1.2.3 -Werkzeug = 0.8.1 -apache-libcloud = 0.5.2 -buildout-versions = 1.7 -hexagonit.recipe.cmmi = 1.5.0 -meld3 = 0.6.7 -plone.recipe.command = 1.1 -slapos.cookbook = 0.34 -slapos.recipe.build = 0.7 -slapos.recipe.download = 1.0.dev-r4053 -slapos.recipe.template = 2.2 -slapos.toolbox = 0.10 - -# Required by: -# slapos.core==0.18 -# slapos.toolbox==0.10 -Flask = 0.8 - -# Required by: -# slapos.cookbook==0.34 -PyXML = 0.8.4 - -# Required by: -# hexagonit.recipe.cmmi==1.5.0 -hexagonit.recipe.download = 1.5.0 - -# Required by: -# slapos.cookbook==0.34 -# slapos.core==0.18 -# slapos.toolbox==0.10 -# xml-marshaller==0.9.7 -lxml = 2.3.1 - -# Required by: -# slapos.cookbook==0.34 -netaddr = 0.7.6 +slapos.cookbook = 0.12 -# Required by: -# slapos.core==0.18 -netifaces = 0.5 - -# Required by: -# slapos.toolbox==0.10 -paramiko = 1.7.7.1 - -# Required by: -# slapos.toolbox==0.10 -psutil = 0.3.0 - -# Required by: -# slapos.cookbook==0.34 -# slapos.core==0.18 -# slapos.toolbox==0.10 -setuptools = 0.6c12dev-r88846 - -# Required by: -# slapos.cookbook==0.34 -# slapos.toolbox==0.10 -slapos.core = 0.18 - -# Required by: -# slapos.core==0.18 -supervisor = 3.0a10 - -# Required by: -# slapos.cookbook==0.34 -# slapos.toolbox==0.10 +# Required by slapos.cookbook==0.12 +slapos.core = 0.8 +collective.recipe.template = 1.8 +netaddr = 0.7.5 xml-marshaller = 0.9.7 +setuptools = 0.6c12dev-r88795 -# Required by: -# slapos.cookbook==0.34 -zc.recipe.egg = 1.3.2 - -# Required by: -# slapos.core==0.18 -zope.interface = 3.8.0 +hexagonit.recipe.cmmi = 1.5.0 +hexagonit.recipe.download = 1.5.0 +plone.recipe.command = 1.1 -[downloadcache-workaround] -# workaround irritating problem of hexagonit.recipe.cmmi which automatically -# creates download cache, which in turn switches builout to "semi-offline" mode -recipe = plone.recipe.command -# in hexagonit.recipe.cmmi if there is no ${buildout:download-cache} set it resolves -# to ${buildout:directory}/downloads but this variable is available late, that's -# why it is hardcoded only for required case -download-cache = ${buildout:directory}/downloads -command = [ -d ${:download-cache} ] && rm -fr ${:download-cache}/* || exit 0 -update-command = ${:command} -stop-on-error = True +# Use SlapOS patched zc.buildout +zc.buildout = 1.5.3-dev-SlapOS-005 diff --git a/software/phpnuke/instance.cfg b/software/phpnuke/instance.cfg deleted file mode 100644 index fffebea8f..000000000 --- a/software/phpnuke/instance.cfg +++ /dev/null @@ -1,17 +0,0 @@ -[buildout] -eggs-directory = ${buildout:eggs-directory} -develop-eggs-directory = ${buildout:develop-eggs-directory} - -parts = instance - -[instance] -recipe = ${instance-recipe:egg}:${instance-recipe:module} -source = ${application:location} -template = ${application-template:location}/${application-template:filename} -configuration = ${application-configuration:location} - -httpd_binary = ${apache:location}/bin/httpd -mysql_binary = ${mariadb:location}/bin/mysql -mysql_install_binary = ${mariadb:location}/bin/mysql_install_db -mysql_upgrade_binary = ${mariadb:location}/bin/mysql_upgrade -mysqld_binary = ${mariadb:location}/libexec/mysqld diff --git a/software/phpnuke/software.cfg b/software/phpnuke/software.cfg deleted file mode 100644 index 646ffd506..000000000 --- a/software/phpnuke/software.cfg +++ /dev/null @@ -1,142 +0,0 @@ -[buildout] -versions = versions - -parts = - template - apache-php - mariadb - eggs - instance-recipe-egg - downloadcache-workaround - -extends = - ../../stack/lamp.cfg - ../../stack/shacache-client.cfg - -[application] -recipe = slapos.recipe.build:download-unpacked -url = http://phpnuke.org/modules/Release/files/phpnuke-release-8.2.4.tar.gz -md5sum = 0f31895b141f50a5f2e6f083b0222fe2 -extract-directory = html - -[application-template] -recipe = slapos.recipe.download -url = ${:_profile_base_location_}/template/phpnuke.inc.php.in -#md5sum = Student may put here md5sum of this file, this is good idea -filename = template.in -mode = 0644 -location = ${buildout:parts-directory}/${:_buildout_section_name_} - -[application-configuration] -location = config.inc.php - -[instance-recipe] -egg = slapos.cookbook -module = lamp.simple - -[template] -# Default template for the instance. -recipe = slapos.recipe.template -url = ${:_profile_base_location_}/instance.cfg -#md5sum = Student shall put md5 of instance.cfg here -output = ${buildout:directory}/template.cfg -mode = 0644 - -[instance-recipe-egg] -recipe = zc.recipe.egg -eggs = ${instance-recipe:egg} - -[versions] -# Use SlapOS patched zc.buildout -zc.buildout = 1.5.3-dev-SlapOS-010 - -Jinja2 = 2.6 -MySQL-python = 1.2.3 -Werkzeug = 0.8.1 -apache-libcloud = 0.5.2 -buildout-versions = 1.7 -hexagonit.recipe.cmmi = 1.5.0 -meld3 = 0.6.7 -plone.recipe.command = 1.1 -slapos.cookbook = 0.34 -slapos.recipe.build = 0.7 -slapos.recipe.download = 1.0.dev-r4053 -slapos.recipe.template = 2.2 -slapos.toolbox = 0.10 - -# Required by: -# slapos.core==0.18 -# slapos.toolbox==0.10 -Flask = 0.8 - -# Required by: -# slapos.cookbook==0.34 -PyXML = 0.8.4 - -# Required by: -# hexagonit.recipe.cmmi==1.5.0 -hexagonit.recipe.download = 1.5.0 - -# Required by: -# slapos.cookbook==0.34 -# slapos.core==0.18 -# slapos.toolbox==0.10 -# xml-marshaller==0.9.7 -lxml = 2.3.1 - -# Required by: -# slapos.cookbook==0.34 -netaddr = 0.7.6 - -# Required by: -# slapos.core==0.18 -netifaces = 0.5 - -# Required by: -# slapos.toolbox==0.10 -paramiko = 1.7.7.1 - -# Required by: -# slapos.toolbox==0.10 -psutil = 0.3.0 - -# Required by: -# slapos.cookbook==0.34 -# slapos.core==0.18 -# slapos.toolbox==0.10 -setuptools = 0.6c12dev-r88846 - -# Required by: -# slapos.cookbook==0.34 -# slapos.toolbox==0.10 -slapos.core = 0.18 - -# Required by: -# slapos.core==0.18 -supervisor = 3.0a10 - -# Required by: -# slapos.cookbook==0.34 -# slapos.toolbox==0.10 -xml-marshaller = 0.9.7 - -# Required by: -# slapos.cookbook==0.34 -zc.recipe.egg = 1.3.2 - -# Required by: -# slapos.core==0.18 -zope.interface = 3.8.0 - -[downloadcache-workaround] -# workaround irritating problem of hexagonit.recipe.cmmi which automatically -# creates download cache, which in turn switches builout to "semi-offline" mode -recipe = plone.recipe.command -# in hexagonit.recipe.cmmi if there is no ${buildout:download-cache} set it resolves -# to ${buildout:directory}/downloads but this variable is available late, that's -# why it is hardcoded only for required case -download-cache = ${buildout:directory}/downloads -command = [ -d ${:download-cache} ] && rm -fr ${:download-cache}/* || exit 0 -update-command = ${:command} -stop-on-error = True - diff --git a/software/phpnuke/template/phpnuke.inc.php.in b/software/phpnuke/template/phpnuke.inc.php.in deleted file mode 100644 index eac1c4b9e..000000000 --- a/software/phpnuke/template/phpnuke.inc.php.in +++ /dev/null @@ -1,25 +0,0 @@ -<?php -$cfg['blowfish_secret'] = ''; /* YOU MUST FILL IN THIS FOR COOKIE AUTH! */ -$i = 0; -$i++; -/* Server parameters */ -$cfg['Servers'][$i]['host'] = '%(mysql_host)s'; -$cfg['Servers'][$i]['port'] = '%(mysql_port)s'; -/* Authentication type */ -$cfg['Servers'][$i]['auth_type'] = 'cookie'; -$cfg['Servers'][$i]['user'] = ''; -$cfg['Servers'][$i]['connect_type'] = 'tcp'; -$cfg['Servers'][$i]['compress'] = false; -/* Select mysqli if your server has it */ -$cfg['Servers'][$i]['extension'] = 'mysql'; -$cfg['Servers'][$i]['AllowNoPassword'] = false; - -/* rajk - for blobstreaming */ -$cfg['Servers'][$i]['bs_garbage_threshold'] = 50; -$cfg['Servers'][$i]['bs_repository_threshold'] = '32M'; -$cfg['Servers'][$i]['bs_temp_blob_timeout'] = 600; -$cfg['Servers'][$i]['bs_temp_log_threshold'] = '32M'; -$cfg['UploadDir'] = ''; -$cfg['SaveDir'] = ''; - -?> diff --git a/software/pimcore/instance.cfg b/software/pimcore/instance.cfg deleted file mode 100644 index 9495bde7e..000000000 --- a/software/pimcore/instance.cfg +++ /dev/null @@ -1,15 +0,0 @@ -[buildout] -eggs-directory = ${buildout:eggs-directory} -develop-eggs-directory = ${buildout:develop-eggs-directory} - -parts = instance - -[instance] -recipe = ${instance-recipe:egg}:${instance-recipe:module} -source = ${application:location} - -httpd_binary = ${apache:location}/bin/httpd -mysql_binary = ${mariadb:location}/bin/mysql -mysql_install_binary = ${mariadb:location}/bin/mysql_install_db -mysql_upgrade_binary = ${mariadb:location}/bin/mysql_upgrade -mysqld_binary = ${mariadb:location}/libexec/mysqld diff --git a/software/pimcore/software.cfg b/software/pimcore/software.cfg deleted file mode 100644 index 0d4945b0c..000000000 --- a/software/pimcore/software.cfg +++ /dev/null @@ -1,129 +0,0 @@ -[buildout] -versions = versions - -parts = - template - apache-php - mariadb - eggs - instance-recipe-egg - downloadcache-workaround - -extends = - ../../stack/lamp.cfg - ../../stack/shacache-client.cfg - -[application] -recipe = slapos.recipe.build:download-unpacked -url = http://www.pimcore.org/download/pimcore-latest.zip -md5sum = 5cc0351fb01bca93f384071bff69be2e - -[instance-recipe] -egg = slapos.cookbook -module = lamp.simple - -[template] -# Default template for the instance. -recipe = slapos.recipe.template -url = ${:_profile_base_location_}/instance.cfg -#md5sum = Student shall put md5 of instance.cfg here -output = ${buildout:directory}/template.cfg -mode = 0644 - -[instance-recipe-egg] -recipe = zc.recipe.egg -eggs = ${instance-recipe:egg} - -[versions] -# Use SlapOS patched zc.buildout -zc.buildout = 1.5.3-dev-SlapOS-010 - -Jinja2 = 2.6 -MySQL-python = 1.2.3 -Werkzeug = 0.8.1 -apache-libcloud = 0.5.2 -buildout-versions = 1.7 -hexagonit.recipe.cmmi = 1.5.0 -meld3 = 0.6.7 -plone.recipe.command = 1.1 -slapos.cookbook = 0.34 -slapos.recipe.build = 0.7 -slapos.recipe.download = 1.0.dev-r4053 -slapos.recipe.template = 2.2 -slapos.toolbox = 0.10 - -# Required by: -# slapos.core==0.18 -# slapos.toolbox==0.10 -Flask = 0.8 - -# Required by: -# slapos.cookbook==0.34 -PyXML = 0.8.4 - -# Required by: -# hexagonit.recipe.cmmi==1.5.0 -hexagonit.recipe.download = 1.5.0 - -# Required by: -# slapos.cookbook==0.34 -# slapos.core==0.18 -# slapos.toolbox==0.10 -# xml-marshaller==0.9.7 -lxml = 2.3.1 - -# Required by: -# slapos.cookbook==0.34 -netaddr = 0.7.6 - -# Required by: -# slapos.core==0.18 -netifaces = 0.5 - -# Required by: -# slapos.toolbox==0.10 -paramiko = 1.7.7.1 - -# Required by: -# slapos.toolbox==0.10 -psutil = 0.3.0 - -# Required by: -# slapos.cookbook==0.34 -# slapos.core==0.18 -# slapos.toolbox==0.10 -setuptools = 0.6c12dev-r88846 - -# Required by: -# slapos.cookbook==0.34 -# slapos.toolbox==0.10 -slapos.core = 0.18 - -# Required by: -# slapos.core==0.18 -supervisor = 3.0a10 - -# Required by: -# slapos.cookbook==0.34 -# slapos.toolbox==0.10 -xml-marshaller = 0.9.7 - -# Required by: -# slapos.cookbook==0.34 -zc.recipe.egg = 1.3.2 - -# Required by: -# slapos.core==0.18 -zope.interface = 3.8.0 - -[downloadcache-workaround] -# workaround irritating problem of hexagonit.recipe.cmmi which automatically -# creates download cache, which in turn switches builout to "semi-offline" mode -recipe = plone.recipe.command -# in hexagonit.recipe.cmmi if there is no ${buildout:download-cache} set it resolves -# to ${buildout:directory}/downloads but this variable is available late, that's -# why it is hardcoded only for required case -download-cache = ${buildout:directory}/downloads -command = [ -d ${:download-cache} ] && rm -fr ${:download-cache}/* || exit 0 -update-command = ${:command} -stop-on-error = True diff --git a/software/piwigo/instance.cfg b/software/piwigo/instance.cfg deleted file mode 100644 index fffebea8f..000000000 --- a/software/piwigo/instance.cfg +++ /dev/null @@ -1,17 +0,0 @@ -[buildout] -eggs-directory = ${buildout:eggs-directory} -develop-eggs-directory = ${buildout:develop-eggs-directory} - -parts = instance - -[instance] -recipe = ${instance-recipe:egg}:${instance-recipe:module} -source = ${application:location} -template = ${application-template:location}/${application-template:filename} -configuration = ${application-configuration:location} - -httpd_binary = ${apache:location}/bin/httpd -mysql_binary = ${mariadb:location}/bin/mysql -mysql_install_binary = ${mariadb:location}/bin/mysql_install_db -mysql_upgrade_binary = ${mariadb:location}/bin/mysql_upgrade -mysqld_binary = ${mariadb:location}/libexec/mysqld diff --git a/software/piwigo/software.cfg b/software/piwigo/software.cfg deleted file mode 100644 index 73a4040bd..000000000 --- a/software/piwigo/software.cfg +++ /dev/null @@ -1,142 +0,0 @@ -[buildout] -versions = versions - -parts = - template - apache-php - mariadb - eggs - instance-recipe-egg - downloadcache-workaround - -extends = - ../../stack/lamp.cfg - ../../stack/shacache-client.cfg - -[application] -recipe = slapos.recipe.build:download-unpacked -url = http://piwigo.org/download/dlcounter.php?code=latest -md5sum = 13870130dcdda90bf2d2e3c20a49b04f - -[application-template] -recipe = slapos.recipe.download -url = ${:_profile_base_location_}/template/piwigo.inc.php.in -md5sum = 8ca6d1408b468c6836cd0edaf02688e5 -download-only = True -filename = template.in -mode = 0644 -location = ${buildout:parts-directory}/${:_buildout_section_name_} - -[application-configuration] -location = database.inc.php - -[instance-recipe] -egg = slapos.cookbook -module = lamp.simple - -[template] -# Default template for the instance. -recipe = slapos.recipe.template -url = ${:_profile_base_location_}/instance.cfg -#md5sum = Student shall put md5 of instance.cfg here -output = ${buildout:directory}/template.cfg -mode = 0644 - -[instance-recipe-egg] -recipe = zc.recipe.egg -eggs = ${instance-recipe:egg} - -[versions] -# Use SlapOS patched zc.buildout -zc.buildout = 1.5.3-dev-SlapOS-010 - -Jinja2 = 2.6 -MySQL-python = 1.2.3 -Werkzeug = 0.8.1 -apache-libcloud = 0.5.2 -buildout-versions = 1.7 -hexagonit.recipe.cmmi = 1.5.0 -meld3 = 0.6.7 -plone.recipe.command = 1.1 -slapos.cookbook = 0.34 -slapos.recipe.build = 0.7 -slapos.recipe.download = 1.0.dev-r4053 -slapos.recipe.template = 2.2 -slapos.toolbox = 0.10 - -# Required by: -# slapos.core==0.18 -# slapos.toolbox==0.10 -Flask = 0.8 - -# Required by: -# slapos.cookbook==0.34 -PyXML = 0.8.4 - -# Required by: -# hexagonit.recipe.cmmi==1.5.0 -hexagonit.recipe.download = 1.5.0 - -# Required by: -# slapos.cookbook==0.34 -# slapos.core==0.18 -# slapos.toolbox==0.10 -# xml-marshaller==0.9.7 -lxml = 2.3.1 - -# Required by: -# slapos.cookbook==0.34 -netaddr = 0.7.6 - -# Required by: -# slapos.core==0.18 -netifaces = 0.5 - -# Required by: -# slapos.toolbox==0.10 -paramiko = 1.7.7.1 - -# Required by: -# slapos.toolbox==0.10 -psutil = 0.3.0 - -# Required by: -# slapos.cookbook==0.34 -# slapos.core==0.18 -# slapos.toolbox==0.10 -setuptools = 0.6c12dev-r88846 - -# Required by: -# slapos.cookbook==0.34 -# slapos.toolbox==0.10 -slapos.core = 0.18 - -# Required by: -# slapos.core==0.18 -supervisor = 3.0a10 - -# Required by: -# slapos.cookbook==0.34 -# slapos.toolbox==0.10 -xml-marshaller = 0.9.7 - -# Required by: -# slapos.cookbook==0.34 -zc.recipe.egg = 1.3.2 - -# Required by: -# slapos.core==0.18 -zope.interface = 3.8.0 - -[downloadcache-workaround] -# workaround irritating problem of hexagonit.recipe.cmmi which automatically -# creates download cache, which in turn switches builout to "semi-offline" mode -recipe = plone.recipe.command -# in hexagonit.recipe.cmmi if there is no ${buildout:download-cache} set it resolves -# to ${buildout:directory}/downloads but this variable is available late, that's -# why it is hardcoded only for required case -download-cache = ${buildout:directory}/downloads -command = [ -d ${:download-cache} ] && rm -fr ${:download-cache}/* || exit 0 -update-command = ${:command} -stop-on-error = True - diff --git a/software/piwigo/template/piwigo.inc.php.in b/software/piwigo/template/piwigo.inc.php.in deleted file mode 100644 index 086ca0a54..000000000 --- a/software/piwigo/template/piwigo.inc.php.in +++ /dev/null @@ -1,15 +0,0 @@ -<?php -$conf['dblayer'] = 'mysql'; -$conf['db_base'] = '%(mysql_database)s'; -$conf['db_user'] = '%(mysql_user)s'; -$conf['db_password'] = '%(mysql_password)s'; -$conf['db_host'] = '%(mysql_host)s'; - -$prefixeTable = 'piwigo_'; - -define('PHPWG_INSTALLED', true); -define('PWG_CHARSET', 'utf-8'); -define('DB_CHARSET', 'utf8'); -define('DB_COLLATE', ''); - -?> diff --git a/software/piwik/instance.cfg b/software/piwik/instance.cfg deleted file mode 100644 index 9495bde7e..000000000 --- a/software/piwik/instance.cfg +++ /dev/null @@ -1,15 +0,0 @@ -[buildout] -eggs-directory = ${buildout:eggs-directory} -develop-eggs-directory = ${buildout:develop-eggs-directory} - -parts = instance - -[instance] -recipe = ${instance-recipe:egg}:${instance-recipe:module} -source = ${application:location} - -httpd_binary = ${apache:location}/bin/httpd -mysql_binary = ${mariadb:location}/bin/mysql -mysql_install_binary = ${mariadb:location}/bin/mysql_install_db -mysql_upgrade_binary = ${mariadb:location}/bin/mysql_upgrade -mysqld_binary = ${mariadb:location}/libexec/mysqld diff --git a/software/piwik/software.cfg b/software/piwik/software.cfg deleted file mode 100644 index e8376b144..000000000 --- a/software/piwik/software.cfg +++ /dev/null @@ -1,131 +0,0 @@ -[buildout] -versions = versions - -parts = - template - apache-php - mariadb - eggs - instance-recipe-egg - downloadcache-workaround - -extends = - ../../stack/lamp.cfg - ../../stack/shacache-client.cfg - - -[application] -recipe = slapos.recipe.build:download-unpacked -url = http://piwik.org/latest.zip -md5sum = 04c5dc7f595adce4d68be9f94bbb140c -extract-directory = piwik - -[instance-recipe] -egg = slapos.cookbook -module = lamp.simple - -[template] -# Default template for the instance. -recipe = slapos.recipe.template -url = ${:_profile_base_location_}/instance.cfg -#md5sum = Student shall put md5 of instance.cfg here -output = ${buildout:directory}/template.cfg -mode = 0644 - -[instance-recipe-egg] -recipe = zc.recipe.egg -eggs = ${instance-recipe:egg} - -[versions] -# Use SlapOS patched zc.buildout -zc.buildout = 1.5.3-dev-SlapOS-010 - -Jinja2 = 2.6 -MySQL-python = 1.2.3 -Werkzeug = 0.8.1 -apache-libcloud = 0.5.2 -buildout-versions = 1.7 -hexagonit.recipe.cmmi = 1.5.0 -meld3 = 0.6.7 -plone.recipe.command = 1.1 -slapos.cookbook = 0.34 -slapos.recipe.build = 0.7 -slapos.recipe.download = 1.0.dev-r4053 -slapos.recipe.template = 2.2 -slapos.toolbox = 0.10 - -# Required by: -# slapos.core==0.18 -# slapos.toolbox==0.10 -Flask = 0.8 - -# Required by: -# slapos.cookbook==0.34 -PyXML = 0.8.4 - -# Required by: -# hexagonit.recipe.cmmi==1.5.0 -hexagonit.recipe.download = 1.5.0 - -# Required by: -# slapos.cookbook==0.34 -# slapos.core==0.18 -# slapos.toolbox==0.10 -# xml-marshaller==0.9.7 -lxml = 2.3.1 - -# Required by: -# slapos.cookbook==0.34 -netaddr = 0.7.6 - -# Required by: -# slapos.core==0.18 -netifaces = 0.5 - -# Required by: -# slapos.toolbox==0.10 -paramiko = 1.7.7.1 - -# Required by: -# slapos.toolbox==0.10 -psutil = 0.3.0 - -# Required by: -# slapos.cookbook==0.34 -# slapos.core==0.18 -# slapos.toolbox==0.10 -setuptools = 0.6c12dev-r88846 - -# Required by: -# slapos.cookbook==0.34 -# slapos.toolbox==0.10 -slapos.core = 0.18 - -# Required by: -# slapos.core==0.18 -supervisor = 3.0a10 - -# Required by: -# slapos.cookbook==0.34 -# slapos.toolbox==0.10 -xml-marshaller = 0.9.7 - -# Required by: -# slapos.cookbook==0.34 -zc.recipe.egg = 1.3.2 - -# Required by: -# slapos.core==0.18 -zope.interface = 3.8.0 - -[downloadcache-workaround] -# workaround irritating problem of hexagonit.recipe.cmmi which automatically -# creates download cache, which in turn switches builout to "semi-offline" mode -recipe = plone.recipe.command -# in hexagonit.recipe.cmmi if there is no ${buildout:download-cache} set it resolves -# to ${buildout:directory}/downloads but this variable is available late, that's -# why it is hardcoded only for required case -download-cache = ${buildout:directory}/downloads -command = [ -d ${:download-cache} ] && rm -fr ${:download-cache}/* || exit 0 -update-command = ${:command} -stop-on-error = True diff --git a/software/prestashop/instance.cfg b/software/prestashop/instance.cfg deleted file mode 100644 index 6f59ff887..000000000 --- a/software/prestashop/instance.cfg +++ /dev/null @@ -1,22 +0,0 @@ -[buildout] -eggs-directory = ${buildout:eggs-directory} -develop-eggs-directory = ${buildout:develop-eggs-directory} - -parts = instance - -[instance] -recipe = ${instance-recipe:egg}:${instance-recipe:module} -source = ${application:location} -lampconfigure_directory = ${buildout:bin-directory}/lampconfigure - -httpd_binary = ${apache:location}/bin/httpd -mysql_binary = ${mariadb:location}/bin/mysql -mysql_install_binary = ${mariadb:location}/bin/mysql_install_db -mysql_upgrade_binary = ${mariadb:location}/bin/mysql_upgrade -mysqld_binary = ${mariadb:location}/libexec/mysqld - -delete = install -rename = admin -#file_token = name of file who will be created at the end of installation -table_name = configuration -constraint = `name`='PS_SHOP_NAME' \ No newline at end of file diff --git a/software/prestashop/software.cfg b/software/prestashop/software.cfg deleted file mode 100644 index 72ddd787c..000000000 --- a/software/prestashop/software.cfg +++ /dev/null @@ -1,132 +0,0 @@ -[buildout] -versions = versions - -parts = - template - apache-php - mariadb - eggs - instance-recipe-egg - downloadcache-workaround - -extends = - ../../stack/lamp.cfg - ../../stack/shacache-client.cfg - -[application] -recipe = slapos.recipe.build:download-unpacked -url = http://www.prestashop.com/download/prestashop_1.4.5.1.zip -md5sum = 3d19305d728f7e8a19f81f9f326b9383 - -[instance-recipe] -egg = slapos.cookbook -module = lamp.simple - -[template] -# Default template for the instance. -recipe = slapos.recipe.template -url = ${:_profile_base_location_}/instance.cfg -#md5sum = Student shall put md5 of instance.cfg here -output = ${buildout:directory}/template.cfg -mode = 0644 - -[instance-recipe-egg] -recipe = zc.recipe.egg -eggs = - ${mysql-python:egg} - ${instance-recipe:egg} - slapos.toolbox[lampconfigure] - -[versions] -# Use SlapOS patched zc.buildout -zc.buildout = 1.5.3-dev-SlapOS-010 - -Jinja2 = 2.6 -MySQL-python = 1.2.3 -Werkzeug = 0.8.1 -apache-libcloud = 0.5.2 -buildout-versions = 1.7 -hexagonit.recipe.cmmi = 1.5.0 -meld3 = 0.6.7 -plone.recipe.command = 1.1 -slapos.cookbook = 0.34 -slapos.recipe.build = 0.7 -slapos.recipe.download = 1.0.dev-r4053 -slapos.recipe.template = 2.2 -slapos.toolbox = 0.10 - -# Required by: -# slapos.core==0.18 -# slapos.toolbox==0.10 -Flask = 0.8 - -# Required by: -# slapos.cookbook==0.34 -PyXML = 0.8.4 - -# Required by: -# hexagonit.recipe.cmmi==1.5.0 -hexagonit.recipe.download = 1.5.0 - -# Required by: -# slapos.cookbook==0.34 -# slapos.core==0.18 -# slapos.toolbox==0.10 -# xml-marshaller==0.9.7 -lxml = 2.3.1 - -# Required by: -# slapos.cookbook==0.34 -netaddr = 0.7.6 - -# Required by: -# slapos.core==0.18 -netifaces = 0.5 - -# Required by: -# slapos.toolbox==0.10 -paramiko = 1.7.7.1 - -# Required by: -# slapos.toolbox==0.10 -psutil = 0.3.0 - -# Required by: -# slapos.cookbook==0.34 -# slapos.core==0.18 -# slapos.toolbox==0.10 -setuptools = 0.6c12dev-r88846 - -# Required by: -# slapos.cookbook==0.34 -# slapos.toolbox==0.10 -slapos.core = 0.18 - -# Required by: -# slapos.core==0.18 -supervisor = 3.0a10 - -# Required by: -# slapos.cookbook==0.34 -# slapos.toolbox==0.10 -xml-marshaller = 0.9.7 - -# Required by: -# slapos.cookbook==0.34 -zc.recipe.egg = 1.3.2 - -# Required by: -# slapos.core==0.18 -zope.interface = 3.8.0 - -[downloadcache-workaround] -# workaround irritating problem of hexagonit.recipe.cmmi which automatically -# creates download cache, which in turn switches builout to "semi-offline" mode -recipe = plone.recipe.command -# in hexagonit.recipe.cmmi if there is no ${buildout:download-cache} set it resolves -# to ${buildout:directory}/downloads but this variable is available late, that's -# why it is hardcoded only for required case -download-cache = ${buildout:directory}/downloads -command = [ -d ${:download-cache} ] && rm -fr ${:download-cache}/* || exit 0 -update-command = ${:command} -stop-on-error = True diff --git a/software/proactive/instance.cfg b/software/proactive/instance.cfg deleted file mode 100644 index e88c74f08..000000000 --- a/software/proactive/instance.cfg +++ /dev/null @@ -1,13 +0,0 @@ -[buildout] -parts = - proactive - -eggs-directory = ${buildout:eggs-directory} -develop-eggs-directory = ${buildout:develop-eggs-directory} - - -[proactive] -recipe = slapos.recipe.proactive - -proactive_location = ${proactive:location} -java_home = ${java:location} diff --git a/software/proactive/software.cfg b/software/proactive/software.cfg deleted file mode 100644 index d1f6a4a9c..000000000 --- a/software/proactive/software.cfg +++ /dev/null @@ -1,51 +0,0 @@ -[buildout] -versions = versions -# Should we use a local version of java.cfg before we change git structure? -extends = ../java/software.cfg - -find-links += http://www.nexedi.org/static/packages/source/slapos.buildout/ - -parts = - template - eggs - proactive - java - -unzip = true - -[versions] -zc.buildout = 1.5.3-dev-SlapOS-001 - -[proactive] -recipe = hexagonit.recipe.download -url = http://www-sop.inria.fr/oasis/amedro/public/PABundle.tar.gz -#url = http://www.activeeon.com/public_content/releases/ProActive/Scheduling/3.0.3/ProActiveScheduling-3.0.3_server.tar.gz -#md5sum = 776f78e9058d4b5dc86351bf45305c45 - -#[java-download] -#recipe = slapos.recipe.download -## 64bit self extracting -##url = http://javadl.sun.com/webapps/download/AutoDL?BundleId=43875 -##md5sum = e4143387e31838a51df76774d102f49a -## This is jre1.6.0_25 32 bits self-extracting -#url = http://javadl.sun.com/webapps/download/AutoDL?BundleId=48334 -#md5sum = 377456da9fa4d867d4bdf4c655a16dce -# -#[java] -#recipe = plone.recipe.command -#location = ${buildout:parts-directory}/${:_buildout_section_name_} -#command = rm -fr ${:location} && mkdir -p ${:location} && cd ${:location} && /bin/sh ${java-download:target} -#update-command = ${:command} - -[eggs] -recipe = zc.recipe.egg -eggs = - slapos.recipe.proactive - -[template] -recipe = slapos.recipe.template -url = ${:_profile_base_location_}/instance.cfg -#md5sum = 88fe7e2d1e04618b1b4fcafde683d75a -output = ${buildout:directory}/template.cfg -mode = 0644 - diff --git a/software/pulse/instance.cfg b/software/pulse/instance.cfg deleted file mode 100644 index c4cea4ec3..000000000 --- a/software/pulse/instance.cfg +++ /dev/null @@ -1,21 +0,0 @@ -[buildout] -parts = - instance - -eggs-directory = ${buildout:eggs-directory} -develop-eggs-directory = ${buildout:develop-eggs-directory} - -[instance] -recipe = ${instance-recipe:egg}:${instance-recipe:module} -dcrond_binary = ${dcron:location}/sbin/crond -httpd_binary = ${apache:location}/bin/httpd -innobackupex_binary = ${xtrabackup:location}/bin/innobackupex -mmc_agent_binary = ${mmc_core:location}/bin/mmc-agent -mysql_binary = ${mysql-5.1:location}/bin/mysql -mysql_install_binary = ${mysql-5.1:location}/bin/mysql_install_db -mysql_upgrade_binary = ${mysql-5.1:location}/bin/mysql_upgrade -mysqld_binary = ${mysql-5.1:location}/libexec/mysqld -openssl_binary = ${openssl:location}/bin/openssl -rdiff_backup_binary = ${buildout:bin-directory}/rdiff-backup -stunnel_binary = ${stunnel:location}/bin/stunnel -xtrabackup_binary = ${xtrabackup:location}/bin/xtrabackup_51 \ No newline at end of file diff --git a/software/pulse/software.cfg b/software/pulse/software.cfg deleted file mode 100644 index bbf849a3c..000000000 --- a/software/pulse/software.cfg +++ /dev/null @@ -1,145 +0,0 @@ -[buildout] -slaposcookbook_recipe_location = ${:parts-directory}/slaposcookbook -develop = - ${:slaposcookbook_recipe_location} - -extensions = - slapos.zcbworkarounds - slapos.rebootstrap - -find-links += - http://www.nexedi.org/static/packages/source/slapos.buildout/ - -extends = - ../../component/git/buildout.cfg - ../../component/openssl/buildout.cfg - ../../component/openldap/buildout.cfg - ../../component/mysql-5.1/buildout.cfg - ../../component/dcron/buildout.cfg - ../../component/stunnel/buildout.cfg - ../../component/rdiff-backup/buildout.cfg - ../../component/lxml-python/buildout.cfg - ../../component/apache-php/buildout.cfg - ../../component/python-2.7/buildout.cfg - ../../component/python-ldap-python/buildout.cfg - ../../component/mysql-python/buildout.cfg - ../../component/xtrabackup/buildout.cfg - -#TODO add twisted - -# Use only quite well working sites. -allow-hosts = - *.nexedi.org - *.python.org - *.sourceforge.net - dist.repoze.org - effbot.org - github.com - peak.telecommunity.com - psutil.googlecode.com - www.dabeaz.com - -versions = versions - -parts = -# Create instance template -#TODO : list here all parts. - template - libxslt - eggs - instance-recipe-egg - mmc_core - pulse2 - -# XXX: Workaround of SlapOS limitation -# Unzippig of eggs is required, as SlapOS do not yet provide nicely working -# development / fast switching environment for whole software -unzip = true - -[rebootstrap] -# Default first version of rebootstrapped python -version = 2 -section = python2.7 - -[instance-recipe] -# Just so buildout executes [slaposcookbook] before [eggs], as -# - [eggs] references [slaposcookbook] -# - [instance-recipe] needs [slaposcookbook] to be finished -# - we cannot rely on anything else being executed before [instance-recipe] -slaposcookbook_dummy = ${slaposcookbook:location} -egg = slapos.cookbook -module = pulse2 - -[mmc_core] -recipe = hexagonit.recipe.cmmi -url = http://jean.parpaillon.free.fr/pulse2/mmc-3.0.2.tar.gz -#md5sum = 832f96a6ec4b8fc7cf49b9efd4e89060 -#configure-options = -#environment = -# PATH=${pkgconfig:location}/bin:%(PATH)s -# PKG_CONFIG_PATH=${openssl:location}/lib/pkgconfig -# CPPFLAGS =-I${libuuid:location}/include -# LDFLAGS =-Wl,-rpath=${zlib:location}/lib -Wl,-rpath=${openssl:location}/lib -L${libuuid:location}/lib -Wl,-rpath=${libuuid:location}/lib -Wl,-rpath=${libexpat:location}/lib -Wl,-rpath=${pcre:location}/lib -Wl,-rpath=${sqlite3:location}/lib -Wl,-rpath=${gdbm:location}/lib - -[pulse2] -recipe = hexagonit.recipe.cmmi -url = http://jean.parpaillon.free.fr/pulse2/pulse2-1.3.1-78-gde4801e.tar.gz -#md5sum = 832f96a6ec4b8fc7cf49b9efd4e89060 -#configure-options = --with-ldap-confdir -#environment = -# PATH=${pkgconfig:location}/bin:%(PATH)s -# PKG_CONFIG_PATH=${openssl:location}/lib/pkgconfig -# CPPFLAGS =-I${libuuid:location}/include -# LDFLAGS =-Wl,-rpath=${zlib:location}/lib -Wl,-rpath=${openssl:location}/lib -L${libuuid:location}/lib -Wl,-rpath=${libuuid:location}/lib -Wl,-rpath=${libexpat:location}/lib -Wl,-rpath=${pcre:location}/lib -Wl,-rpath=${sqlite3:location}/lib -Wl,-rpath=${gdbm:location}/lib - -[slaposcookbook] -recipe = plone.recipe.command -git_param =--quiet -b pulse -git = ${git:location}/bin/git -location = ${buildout:parts-directory}/${:_buildout_section_name_} -stop-on-error = true -command = ${:git} clone ${:git_param} http://git.erp5.org/repos/slapos.git ${:location} || exit 1; -update-command = cd ${:location} && ${git:location}/bin/git pull --quiet - -[instance-recipe-egg] -recipe = zc.recipe.egg -python = python2.7 -eggs = ${instance-recipe:egg} - -[eggs] -recipe = zc.recipe.egg -python = python2.7 -eggs = - ${lxml-python:egg} - ${mysql-python:egg} - ${python-ldap-python:egg} - Twisted - SQLAlchemy - pyOpenSSL - -[template] -# Default template for the instance. -recipe = slapos.recipe.template -url = ${:_profile_base_location_}/instance.cfg -#md5sum = 837caf9897332a5f70c72438f1dc5bae -output = ${buildout:directory}/template.cfg -mode = 0644 - -[versions] -# Required by Pulse2 -SQLAlchemy = 0.6.0 -#slapos.cookbook = 0.4 - -# Required by slapos.cookbook==0.4 -#slapos.core = 0.2 -collective.recipe.template = 1.8 -netaddr = 0.7.5 -xml-marshaller = 0.9.7 -setuptools = 0.6c12dev-r88795 - -hexagonit.recipe.cmmi = 1.5.0 -hexagonit.recipe.download = 1.5.0 -plone.recipe.command = 1.1 - -# Use SlapOS patched zc.buildout -zc.buildout = 1.5.3-dev-SlapOS-001 diff --git a/software/punbb/instance.cfg b/software/punbb/instance.cfg deleted file mode 100644 index fffebea8f..000000000 --- a/software/punbb/instance.cfg +++ /dev/null @@ -1,17 +0,0 @@ -[buildout] -eggs-directory = ${buildout:eggs-directory} -develop-eggs-directory = ${buildout:develop-eggs-directory} - -parts = instance - -[instance] -recipe = ${instance-recipe:egg}:${instance-recipe:module} -source = ${application:location} -template = ${application-template:location}/${application-template:filename} -configuration = ${application-configuration:location} - -httpd_binary = ${apache:location}/bin/httpd -mysql_binary = ${mariadb:location}/bin/mysql -mysql_install_binary = ${mariadb:location}/bin/mysql_install_db -mysql_upgrade_binary = ${mariadb:location}/bin/mysql_upgrade -mysqld_binary = ${mariadb:location}/libexec/mysqld diff --git a/software/punbb/software.cfg b/software/punbb/software.cfg deleted file mode 100644 index e3e413afb..000000000 --- a/software/punbb/software.cfg +++ /dev/null @@ -1,141 +0,0 @@ -[buildout] -versions = versions - -parts = - template - apache-php - mariadb - eggs - instance-recipe-egg - downloadcache-workaround - -extends = - ../../stack/lamp.cfg - ../../stack/shacache-client.cfg - -[application] -recipe = slapos.recipe.build:download-unpacked -url = http://punbb.informer.com/download/punbb-1.3.6.tar.gz -md5sum = 9454ef78101028fd5acf2731f77545c2 - -[application-template] -recipe = slapos.recipe.download -url = ${:_profile_base_location_}/template/punbb.inc.php.in -#md5sum = Student may put here md5sum of this file, this is good idea -filename = template.in -mode = 0644 -location = ${buildout:parts-directory}/${:_buildout_section_name_} - -[application-configuration] -location = config.inc.php - -[instance-recipe] -egg = slapos.cookbook -module = lamp.simple - -[template] -# Default template for the instance. -recipe = slapos.recipe.template -url = ${:_profile_base_location_}/instance.cfg -#md5sum = Student shall put md5 of instance.cfg here -output = ${buildout:directory}/template.cfg -mode = 0644 - -[instance-recipe-egg] -recipe = zc.recipe.egg -eggs = ${instance-recipe:egg} - -[versions] -# Use SlapOS patched zc.buildout -zc.buildout = 1.5.3-dev-SlapOS-010 - -Jinja2 = 2.6 -MySQL-python = 1.2.3 -Werkzeug = 0.8.1 -apache-libcloud = 0.5.2 -buildout-versions = 1.7 -hexagonit.recipe.cmmi = 1.5.0 -meld3 = 0.6.7 -plone.recipe.command = 1.1 -slapos.cookbook = 0.34 -slapos.recipe.build = 0.7 -slapos.recipe.download = 1.0.dev-r4053 -slapos.recipe.template = 2.2 -slapos.toolbox = 0.10 - -# Required by: -# slapos.core==0.18 -# slapos.toolbox==0.10 -Flask = 0.8 - -# Required by: -# slapos.cookbook==0.34 -PyXML = 0.8.4 - -# Required by: -# hexagonit.recipe.cmmi==1.5.0 -hexagonit.recipe.download = 1.5.0 - -# Required by: -# slapos.cookbook==0.34 -# slapos.core==0.18 -# slapos.toolbox==0.10 -# xml-marshaller==0.9.7 -lxml = 2.3.1 - -# Required by: -# slapos.cookbook==0.34 -netaddr = 0.7.6 - -# Required by: -# slapos.core==0.18 -netifaces = 0.5 - -# Required by: -# slapos.toolbox==0.10 -paramiko = 1.7.7.1 - -# Required by: -# slapos.toolbox==0.10 -psutil = 0.3.0 - -# Required by: -# slapos.cookbook==0.34 -# slapos.core==0.18 -# slapos.toolbox==0.10 -setuptools = 0.6c12dev-r88846 - -# Required by: -# slapos.cookbook==0.34 -# slapos.toolbox==0.10 -slapos.core = 0.18 - -# Required by: -# slapos.core==0.18 -supervisor = 3.0a10 - -# Required by: -# slapos.cookbook==0.34 -# slapos.toolbox==0.10 -xml-marshaller = 0.9.7 - -# Required by: -# slapos.cookbook==0.34 -zc.recipe.egg = 1.3.2 - -# Required by: -# slapos.core==0.18 -zope.interface = 3.8.0 - -[downloadcache-workaround] -# workaround irritating problem of hexagonit.recipe.cmmi which automatically -# creates download cache, which in turn switches builout to "semi-offline" mode -recipe = plone.recipe.command -# in hexagonit.recipe.cmmi if there is no ${buildout:download-cache} set it resolves -# to ${buildout:directory}/downloads but this variable is available late, that's -# why it is hardcoded only for required case -download-cache = ${buildout:directory}/downloads -command = [ -d ${:download-cache} ] && rm -fr ${:download-cache}/* || exit 0 -update-command = ${:command} -stop-on-error = True - diff --git a/software/punbb/template/punbb.inc.php.in b/software/punbb/template/punbb.inc.php.in deleted file mode 100644 index c05779b29..000000000 --- a/software/punbb/template/punbb.inc.php.in +++ /dev/null @@ -1,18 +0,0 @@ -<?php - -$db_type = 'mysqli'; -$db_host = '%(mysql_host)s'; -$db_name = '%(mysql_database)s'; -$db_username = '%(mysql_user)s'; -$db_password = '%(mysql_password)s'; -$db_prefix = 'pbb_'; -$p_connect = false; - -$base_url = 'http://webrunner:9080'; - -$cookie_name = 'forum_cookie_173f50'; -$cookie_domain = ''; -$cookie_path = '/'; -$cookie_secure = 0; - -define('FORUM', 1); diff --git a/software/seleniumrunner/instance.cfg b/software/seleniumrunner/instance.cfg deleted file mode 100644 index 23d6d4683..000000000 --- a/software/seleniumrunner/instance.cfg +++ /dev/null @@ -1,11 +0,0 @@ -[buildout] -parts = - seleniuminstance - -eggs-directory = ${buildout:eggs-directory} -develop-eggs-directory = ${buildout:develop-eggs-directory} - -[seleniuminstance] -recipe = ${instance-recipe:egg}:${instance-recipe:module} -xvfb_binary = ${xserver:location}/bin/Xvfb -firefox_binary = ${firefox:location}/firefox-slapos \ No newline at end of file diff --git a/software/seleniumrunner/software.cfg b/software/seleniumrunner/software.cfg deleted file mode 100644 index c2333a1a1..000000000 --- a/software/seleniumrunner/software.cfg +++ /dev/null @@ -1,52 +0,0 @@ -[buildout] -extensions = buildout-versions - -extends = - ../../component/xorg/buildout.cfg - ../../component/lxml-python/buildout.cfg - ../../component/python-2.7/buildout.cfg - ../../component/firefox/buildout.cfg - ../../stack/shacache-client.cfg - -versions = versions - -find-links += - http://www.nexedi.org/static/packages/source/slapos.buildout/ - -parts = - template - eggs - instance-recipe-egg - xserver - firefox - -versions = versions - -unzip = true - -[instance-recipe] -egg = slapos.cookbook -module = seleniumrunner - -[instance-recipe-egg] -recipe = zc.recipe.egg -python = python2.7 -eggs = ${instance-recipe:egg} - -[eggs] -recipe = zc.recipe.egg -python = python2.7 -eggs = - ${lxml-python:egg} - -[template] -# Default template for the instance. -recipe = slapos.recipe.template -url = ${:_profile_base_location_}/instance.cfg -md5sum = 5fc198144831525a196d7394e4b15f80 -output = ${buildout:directory}/template.cfg -mode = 0644 - -[versions] -# Use SlapOS patched zc.buildout -zc.buildout = 1.5.3-dev-SlapOS-010 diff --git a/software/sheepdogtestbed/instance.cfg b/software/sheepdogtestbed/instance.cfg deleted file mode 100644 index 83a5b1509..000000000 --- a/software/sheepdogtestbed/instance.cfg +++ /dev/null @@ -1,13 +0,0 @@ -[buildout] -parts = - sheepstrikeinstance - -eggs-directory = ${buildout:eggs-directory} -develop-eggs-directory = ${buildout:develop-eggs-directory} - -[sheepstrikeinstance] -<=slap_connection -recipe = slapos.recipe.sheepdogtestbed -nosqltester_binary = ${buildout:bin-directory}/nosqltester -sheepstrike_binary = ${sheepstrike:location}/bin/sheepstrike -nosqltester_manager_binary = ${buildout:bin-directory}/nosqltester_manager diff --git a/software/sheepdogtestbed/software.cfg b/software/sheepdogtestbed/software.cfg deleted file mode 100644 index b2c7b707b..000000000 --- a/software/sheepdogtestbed/software.cfg +++ /dev/null @@ -1,20 +0,0 @@ -[buildout] -extends = ../../stack/sheepdogtestbed.cfg - -parts += - template - -find-links = - http://www.nexedi.org/static/packages/source/slapos.buildout/ - -versions = versions - -[template] -recipe = slapos.recipe.template -url = ${:_profile_base_location_}/instance.cfg -md5sum = f58328139c7fbaea13a89efc8e6810c1 -output = ${buildout:directory}/template.cfg -mode = 0644 - -[versions] -zc.buildout = 1.5.3-dev-SlapOS-001 diff --git a/software/simpleMachineForum/instance.cfg b/software/simpleMachineForum/instance.cfg deleted file mode 100644 index 9495bde7e..000000000 --- a/software/simpleMachineForum/instance.cfg +++ /dev/null @@ -1,15 +0,0 @@ -[buildout] -eggs-directory = ${buildout:eggs-directory} -develop-eggs-directory = ${buildout:develop-eggs-directory} - -parts = instance - -[instance] -recipe = ${instance-recipe:egg}:${instance-recipe:module} -source = ${application:location} - -httpd_binary = ${apache:location}/bin/httpd -mysql_binary = ${mariadb:location}/bin/mysql -mysql_install_binary = ${mariadb:location}/bin/mysql_install_db -mysql_upgrade_binary = ${mariadb:location}/bin/mysql_upgrade -mysqld_binary = ${mariadb:location}/libexec/mysqld diff --git a/software/simpleMachineForum/software.cfg b/software/simpleMachineForum/software.cfg deleted file mode 100644 index 8fc541683..000000000 --- a/software/simpleMachineForum/software.cfg +++ /dev/null @@ -1,131 +0,0 @@ -[buildout] -versions = versions - -parts = - template - apache-php - mariadb - eggs - instance-recipe-egg - downloadcache-workaround - - -extends = - ../../stack/lamp.cfg - ../../stack/shacache-client.cfg - -[application] -recipe = slapos.recipe.build:download-unpacked -url = http://mirror.ord.simplemachines.org/downloads/smf_2-0-1_install.tar.gz -md5sum = 76817fc9f4620765bba4232bbf8b6b2b - -[instance-recipe] -egg = slapos.cookbook -module = lamp.simple - -[template] -# Default template for the instance. -recipe = slapos.recipe.template -url = ${:_profile_base_location_}/instance.cfg -#md5sum = Student shall put md5 of instance.cfg here -output = ${buildout:directory}/template.cfg -mode = 0644 - -[instance-recipe-egg] -recipe = zc.recipe.egg -eggs = ${instance-recipe:egg} - -[versions] -# Use SlapOS patched zc.buildout -zc.buildout = 1.5.3-dev-SlapOS-010 - -Jinja2 = 2.6 -MySQL-python = 1.2.3 -Werkzeug = 0.8.1 -apache-libcloud = 0.5.2 -buildout-versions = 1.7 -hexagonit.recipe.cmmi = 1.5.0 -meld3 = 0.6.7 -plone.recipe.command = 1.1 -slapos.cookbook = 0.34 -slapos.recipe.build = 0.7 -slapos.recipe.download = 1.0.dev-r4053 -slapos.recipe.template = 2.2 -slapos.toolbox = 0.10 - -# Required by: -# slapos.core==0.18 -# slapos.toolbox==0.10 -Flask = 0.8 - -# Required by: -# slapos.cookbook==0.34 -PyXML = 0.8.4 - -# Required by: -# hexagonit.recipe.cmmi==1.5.0 -hexagonit.recipe.download = 1.5.0 - -# Required by: -# slapos.cookbook==0.34 -# slapos.core==0.18 -# slapos.toolbox==0.10 -# xml-marshaller==0.9.7 -lxml = 2.3.1 - -# Required by: -# slapos.cookbook==0.34 -netaddr = 0.7.6 - -# Required by: -# slapos.core==0.18 -netifaces = 0.5 - -# Required by: -# slapos.toolbox==0.10 -paramiko = 1.7.7.1 - -# Required by: -# slapos.toolbox==0.10 -psutil = 0.3.0 - -# Required by: -# slapos.cookbook==0.34 -# slapos.core==0.18 -# slapos.toolbox==0.10 -setuptools = 0.6c12dev-r88846 - -# Required by: -# slapos.cookbook==0.34 -# slapos.toolbox==0.10 -slapos.core = 0.18 - -# Required by: -# slapos.core==0.18 -supervisor = 3.0a10 - -# Required by: -# slapos.cookbook==0.34 -# slapos.toolbox==0.10 -xml-marshaller = 0.9.7 - -# Required by: -# slapos.cookbook==0.34 -zc.recipe.egg = 1.3.2 - -# Required by: -# slapos.core==0.18 -zope.interface = 3.8.0 - -[downloadcache-workaround] -# workaround irritating problem of hexagonit.recipe.cmmi which automatically -# creates download cache, which in turn switches builout to "semi-offline" mode -recipe = plone.recipe.command -# in hexagonit.recipe.cmmi if there is no ${buildout:download-cache} set it resolves -# to ${buildout:directory}/downloads but this variable is available late, that's -# why it is hardcoded only for required case -download-cache = ${buildout:directory}/downloads -command = [ -d ${:download-cache} ] && rm -fr ${:download-cache}/* || exit 0 -update-command = ${:command} -stop-on-error = True - diff --git a/software/slaprunner/instance.cfg b/software/slaprunner/instance.cfg index f9427ba5b..bed9cc3b7 100644 --- a/software/slaprunner/instance.cfg +++ b/software/slaprunner/instance.cfg @@ -1,9 +1,6 @@ [buildout] parts = instance - sshkeys-authority - sshkeys-dropbear - dropbear-client eggs-directory = ${buildout:eggs-directory} develop-eggs-directory = ${buildout:develop-eggs-directory} @@ -15,51 +12,4 @@ slapgrid_sr = ${buildout:directory}/bin/slapgrid-sr slapgrid_cp = ${buildout:directory}/bin/slapgrid-cp slapproxy = ${buildout:directory}/bin/slapproxy supervisor = ${buildout:directory}/bin/slapgrid-supervisorctl -git = ${git:location}/bin/git -ssh_client = $${sshkeys-dropbear:wrapper} -public_key = $${sshkeys-dropbear:public-key} -private_key = $${sshkeys-dropbear:private-key} - -[sshkeys-directory] -recipe = slapos.cookbook:mkdirectory -requests = $${directory:sshkeys}/requests/ -keys = $${directory:sshkeys}/keys/ - -[sshkeys-authority] -recipe = slapos.cookbook:sshkeys_authority -request-directory = $${sshkeys-directory:requests} -keys-directory = $${sshkeys-directory:keys} -wrapper = $${directory:services}/sshkeys_authority -keygen-binary = ${dropbear:location}/bin/dropbearkey - -[sshkeys-dropbear] -<= sshkeys-authority -recipe = slapos.cookbook:sshkeys_authority.request -name = dropbear -type = rsa -executable = $${dropbear-client:wrapper} -public-key = $${dropbear-client:identity-file}.pub -private-key = $${dropbear-client:identity-file} -wrapper = $${rootdirectory:bin}/dbclient - -[dropbear-client] -recipe = slapos.cookbook:dropbear.client -dbclient-binary = ${dropbear:location}/bin/dbclient -identity-file = $${directory:ssh}/id_rsa -wrapper = $${rootdirectory:bin}/dbclient_raw -home = $${rootdirectory:etc}/ssh/ -force-host-key = True - -[rootdirectory] -recipe = slapos.cookbook:mkdirectory -etc = $${buildout:directory}/etc/ -var = $${buildout:directory}/var/ -srv = $${buildout:directory}/srv/ -bin = $${buildout:directory}/bin/ - -[directory] -recipe = slapos.cookbook:mkdirectory -sshkeys = $${rootdirectory:srv}/sshkeys -services = $${rootdirectory:etc}/run/ -ssh = $${rootdirectory:etc}/ssh/ diff --git a/software/slaprunner/software.cfg b/software/slaprunner/software.cfg index 8a2e90bb7..d8506a69a 100644 --- a/software/slaprunner/software.cfg +++ b/software/slaprunner/software.cfg @@ -1,19 +1,15 @@ [buildout] -extensions = - buildout-versions - extends = - ../../stack/slapos.cfg ../../stack/flask.cfg ../../stack/shacache-client.cfg - ../../component/dropbear/buildout.cfg - ../../component/git/buildout.cfg parts = template eggs instance-recipe-egg - dropbear + +find-links += + http://www.nexedi.org/static/packages/source/slapos.buildout/ versions = versions @@ -31,7 +27,7 @@ recipe = slapos.recipe.template url = ${:_profile_base_location_}/instance.cfg output = ${buildout:directory}/template.cfg mode = 0644 -md5sum = cd69efd5c3a7e9adca7387b9a401590a +md5sum = e2cbd8fe7b8e4c7e92a19cd775de0aa6 [eggs] eggs += @@ -39,119 +35,20 @@ eggs += slapos.toolbox slapos.core -[networkcache] -# signature certificates of the following uploaders. -# Cedric de Saint Martin -signature-certificate-list = - -----BEGIN CERTIFICATE----- - MIIB9jCCAV+gAwIBAgIJAO4V/jiMoICoMA0GCSqGSIb3DQEBBQUAMBMxETAPBgNV - BAMMCENPTVAtMjMyMCAXDTEyMDIxNjExMTAyM1oYDzIxMTIwMTIzMTExMDIzWjAT - MREwDwYDVQQDDAhDT01QLTIzMjCBnzANBgkqhkiG9w0BAQEFAAOBjQAwgYkCgYEA - wi/3Z8W9pUiegUXIk/AiFDQ0UJ4JFAwjqr+HSRUirlUsHHT+8DzH/hfcTDX1I5BB - D1ADk+ydXjMm3OZrQcXjn29OUfM5C+g+oqeMnYQImN0DDQIOcUyr7AJc4xhvuXQ1 - P2pJ5NOd3tbd0kexETa1LVhR6EgBC25LyRBRae76qosCAwEAAaNQME4wHQYDVR0O - BBYEFMDmW9aFy1sKTfCpcRkYnP6zUd1cMB8GA1UdIwQYMBaAFMDmW9aFy1sKTfCp - cRkYnP6zUd1cMAwGA1UdEwQFMAMBAf8wDQYJKoZIhvcNAQEFBQADgYEAskbFizHr - b6d3iIyN+wffxz/V9epbKIZVEGJd/6LrTdLiUfJPec7FaxVCWNyKBlCpINBM7cEV - Gn9t8mdVQflNqOlAMkOlUv1ZugCt9rXYQOV7rrEYJBWirn43BOMn9Flp2nibblby - If1a2ZoqHRxoNo2yTmm7TSYRORWVS+vvfjY= - -----END CERTIFICATE----- - [versions] -# Use SlapOS patched zc.buildout -zc.buildout = 1.6.0-dev-SlapOS-003 -Jinja2 = 2.6 -Werkzeug = 0.8.3 -apache-libcloud = 0.8.0 -async = 0.6.1 -buildout-versions = 1.7 -gitdb = 0.5.4 -hexagonit.recipe.cmmi = 1.5.0 -meld3 = 0.6.8 -pycrypto = 2.5 -slapos.cookbook = 0.39 -slapos.libnetworkcache = 0.12 -slapos.recipe.template = 2.2 -slapos.toolbox = 0.18 -smmap = 0.8.2 - -# Required by: -# slapos.core==0.22 -Flask = 0.8 - -# Required by: -# slapos.toolbox==0.18 -GitPython = 0.3.2.RC1 - -# Required by: -# slapos.cookbook==0.39 -PyXML = 0.8.4 - -# Required by: -# slapos.toolbox==0.18 -atomize = 0.1.1 - -# Required by: -# slapos.toolbox==0.18 -feedparser = 5.1 - -# Required by: -# hexagonit.recipe.cmmi==1.5.0 -hexagonit.recipe.download = 1.5.0 +slapos.cookbook = 0.12 -# Required by: -# slapos.cookbook==0.39 -inotifyx = 0.2.0 - -# Required by: -# slapos.cookbook==0.39 -# slapos.core==0.22 -# xml-marshaller==0.9.7 -lxml = 2.3.3 - -# Required by: -# slapos.cookbook==0.39 -netaddr = 0.7.6 - -# Required by: -# slapos.core==0.22 -netifaces = 0.8 - -# Required by: -# slapos.toolbox==0.18 -paramiko = 1.7.7.1 - -# Required by: -# slapos.toolbox==0.18 -psutil = 0.4.1 - -# Required by: -# slapos.cookbook==0.39 -# slapos.core==0.22 -# slapos.libnetworkcache==0.12 -# slapos.toolbox==0.18 -# supervisor==3.0a12 -# zc.buildout==1.6.0-dev-SlapOS-003 -# zc.recipe.egg==1.3.2 -# zope.interface==3.8.0 -setuptools = 0.6c12dev-r88846 - -# Required by: -# slapos.cookbook==0.39 -slapos.core = 0.22 - -# Required by: -# slapos.core==0.22 -supervisor = 3.0a12 - -# Required by: -# slapos.cookbook==0.39 +# Required by slapos.cookbook==0.12 +slapos.core = 0.8 +collective.recipe.template = 1.8 +netaddr = 0.7.5 xml-marshaller = 0.9.7 +setuptools = 0.6c12dev-r88795 -# Required by: -# slapos.cookbook==0.39 -zc.recipe.egg = 1.3.2 +hexagonit.recipe.cmmi = 1.5.0 +hexagonit.recipe.download = 1.5.0 +plone.recipe.command = 1.1 +slapos.libnetworkcache = 0.2 -# Required by: -# slapos.core==0.22 -zope.interface = 3.8.0 +# Use SlapOS patched zc.buildout +zc.buildout = 1.5.3-dev-SlapOS-005 diff --git a/software/spip/instance.cfg b/software/spip/instance.cfg deleted file mode 100644 index 9495bde7e..000000000 --- a/software/spip/instance.cfg +++ /dev/null @@ -1,15 +0,0 @@ -[buildout] -eggs-directory = ${buildout:eggs-directory} -develop-eggs-directory = ${buildout:develop-eggs-directory} - -parts = instance - -[instance] -recipe = ${instance-recipe:egg}:${instance-recipe:module} -source = ${application:location} - -httpd_binary = ${apache:location}/bin/httpd -mysql_binary = ${mariadb:location}/bin/mysql -mysql_install_binary = ${mariadb:location}/bin/mysql_install_db -mysql_upgrade_binary = ${mariadb:location}/bin/mysql_upgrade -mysqld_binary = ${mariadb:location}/libexec/mysqld diff --git a/software/spip/software.cfg b/software/spip/software.cfg deleted file mode 100644 index c701c38c6..000000000 --- a/software/spip/software.cfg +++ /dev/null @@ -1,129 +0,0 @@ -[buildout] -versions = versions - -parts = - template - apache-php - mariadb - eggs - instance-recipe-egg - downloadcache-workaround - -extends = - ../../stack/lamp.cfg - ../../stack/shacache-client.cfg - -[application] -recipe = slapos.recipe.build:download-unpacked -url = http://files.spip.org/spip/stable/spip.zip?1316156624 -md5sum = 4500c283b464161da6fced7dce12ae0a - -[instance-recipe] -egg = slapos.cookbook -module = lamp.simple - -[template] -# Default template for the instance. -recipe = slapos.recipe.template -url = ${:_profile_base_location_}/instance.cfg -#md5sum = Student shall put md5 of instance.cfg here -output = ${buildout:directory}/template.cfg -mode = 0644 - -[instance-recipe-egg] -recipe = zc.recipe.egg -eggs = ${instance-recipe:egg} - -[versions] -# Use SlapOS patched zc.buildout -zc.buildout = 1.5.3-dev-SlapOS-010 - -Jinja2 = 2.6 -MySQL-python = 1.2.3 -Werkzeug = 0.8.1 -apache-libcloud = 0.5.2 -buildout-versions = 1.7 -hexagonit.recipe.cmmi = 1.5.0 -meld3 = 0.6.7 -plone.recipe.command = 1.1 -slapos.cookbook = 0.34 -slapos.recipe.build = 0.7 -slapos.recipe.download = 1.0.dev-r4053 -slapos.recipe.template = 2.2 -slapos.toolbox = 0.10 - -# Required by: -# slapos.core==0.18 -# slapos.toolbox==0.10 -Flask = 0.8 - -# Required by: -# slapos.cookbook==0.34 -PyXML = 0.8.4 - -# Required by: -# hexagonit.recipe.cmmi==1.5.0 -hexagonit.recipe.download = 1.5.0 - -# Required by: -# slapos.cookbook==0.34 -# slapos.core==0.18 -# slapos.toolbox==0.10 -# xml-marshaller==0.9.7 -lxml = 2.3.1 - -# Required by: -# slapos.cookbook==0.34 -netaddr = 0.7.6 - -# Required by: -# slapos.core==0.18 -netifaces = 0.5 - -# Required by: -# slapos.toolbox==0.10 -paramiko = 1.7.7.1 - -# Required by: -# slapos.toolbox==0.10 -psutil = 0.3.0 - -# Required by: -# slapos.cookbook==0.34 -# slapos.core==0.18 -# slapos.toolbox==0.10 -setuptools = 0.6c12dev-r88846 - -# Required by: -# slapos.cookbook==0.34 -# slapos.toolbox==0.10 -slapos.core = 0.18 - -# Required by: -# slapos.core==0.18 -supervisor = 3.0a10 - -# Required by: -# slapos.cookbook==0.34 -# slapos.toolbox==0.10 -xml-marshaller = 0.9.7 - -# Required by: -# slapos.cookbook==0.34 -zc.recipe.egg = 1.3.2 - -# Required by: -# slapos.core==0.18 -zope.interface = 3.8.0 - -[downloadcache-workaround] -# workaround irritating problem of hexagonit.recipe.cmmi which automatically -# creates download cache, which in turn switches builout to "semi-offline" mode -recipe = plone.recipe.command -# in hexagonit.recipe.cmmi if there is no ${buildout:download-cache} set it resolves -# to ${buildout:directory}/downloads but this variable is available late, that's -# why it is hardcoded only for required case -download-cache = ${buildout:directory}/downloads -command = [ -d ${:download-cache} ] && rm -fr ${:download-cache}/* || exit 0 -update-command = ${:command} -stop-on-error = True diff --git a/software/statusnet/instance.cfg b/software/statusnet/instance.cfg deleted file mode 100644 index 9495bde7e..000000000 --- a/software/statusnet/instance.cfg +++ /dev/null @@ -1,15 +0,0 @@ -[buildout] -eggs-directory = ${buildout:eggs-directory} -develop-eggs-directory = ${buildout:develop-eggs-directory} - -parts = instance - -[instance] -recipe = ${instance-recipe:egg}:${instance-recipe:module} -source = ${application:location} - -httpd_binary = ${apache:location}/bin/httpd -mysql_binary = ${mariadb:location}/bin/mysql -mysql_install_binary = ${mariadb:location}/bin/mysql_install_db -mysql_upgrade_binary = ${mariadb:location}/bin/mysql_upgrade -mysqld_binary = ${mariadb:location}/libexec/mysqld diff --git a/software/statusnet/software.cfg b/software/statusnet/software.cfg deleted file mode 100644 index 6b31dbc6c..000000000 --- a/software/statusnet/software.cfg +++ /dev/null @@ -1,130 +0,0 @@ -[buildout] -versions = versions - -parts = - template - apache-php - mariadb - eggs - instance-recipe-egg - downloadcache-workaround - -extends = - ../../stack/lamp.cfg - ../../stack/shacache-client.cfg - -[application] -recipe = slapos.recipe.build:download-unpacked -url = http://status.net/statusnet-1.0.1.tar.gz -md5sum = 727a7cfe7e9531b732739dabd295bcb9 - -[instance-recipe] -egg = slapos.cookbook -module = lamp.simple - -[template] -# Default template for the instance. -recipe = slapos.recipe.template -url = ${:_profile_base_location_}/instance.cfg -#md5sum = Student shall put md5 of instance.cfg here -output = ${buildout:directory}/template.cfg -mode = 0644 - -[instance-recipe-egg] -recipe = zc.recipe.egg -eggs = ${instance-recipe:egg} - -[versions] -# Use SlapOS patched zc.buildout -zc.buildout = 1.5.3-dev-SlapOS-010 - -Jinja2 = 2.6 -MySQL-python = 1.2.3 -Werkzeug = 0.8.1 -apache-libcloud = 0.5.2 -buildout-versions = 1.7 -hexagonit.recipe.cmmi = 1.5.0 -meld3 = 0.6.7 -plone.recipe.command = 1.1 -slapos.cookbook = 0.34 -slapos.recipe.build = 0.7 -slapos.recipe.download = 1.0.dev-r4053 -slapos.recipe.template = 2.2 -slapos.toolbox = 0.10 - -# Required by: -# slapos.core==0.18 -# slapos.toolbox==0.10 -Flask = 0.8 - -# Required by: -# slapos.cookbook==0.34 -PyXML = 0.8.4 - -# Required by: -# hexagonit.recipe.cmmi==1.5.0 -hexagonit.recipe.download = 1.5.0 - -# Required by: -# slapos.cookbook==0.34 -# slapos.core==0.18 -# slapos.toolbox==0.10 -# xml-marshaller==0.9.7 -lxml = 2.3.1 - -# Required by: -# slapos.cookbook==0.34 -netaddr = 0.7.6 - -# Required by: -# slapos.core==0.18 -netifaces = 0.5 - -# Required by: -# slapos.toolbox==0.10 -paramiko = 1.7.7.1 - -# Required by: -# slapos.toolbox==0.10 -psutil = 0.3.0 - -# Required by: -# slapos.cookbook==0.34 -# slapos.core==0.18 -# slapos.toolbox==0.10 -setuptools = 0.6c12dev-r88846 - -# Required by: -# slapos.cookbook==0.34 -# slapos.toolbox==0.10 -slapos.core = 0.18 - -# Required by: -# slapos.core==0.18 -supervisor = 3.0a10 - -# Required by: -# slapos.cookbook==0.34 -# slapos.toolbox==0.10 -xml-marshaller = 0.9.7 - -# Required by: -# slapos.cookbook==0.34 -zc.recipe.egg = 1.3.2 - -# Required by: -# slapos.core==0.18 -zope.interface = 3.8.0 - -[downloadcache-workaround] -# workaround irritating problem of hexagonit.recipe.cmmi which automatically -# creates download cache, which in turn switches builout to "semi-offline" mode -recipe = plone.recipe.command -# in hexagonit.recipe.cmmi if there is no ${buildout:download-cache} set it resolves -# to ${buildout:directory}/downloads but this variable is available late, that's -# why it is hardcoded only for required case -download-cache = ${buildout:directory}/downloads -command = [ -d ${:download-cache} ] && rm -fr ${:download-cache}/* || exit 0 -update-command = ${:command} -stop-on-error = True - diff --git a/software/sugar-crm/instance.cfg b/software/sugar-crm/instance.cfg deleted file mode 100644 index 9495bde7e..000000000 --- a/software/sugar-crm/instance.cfg +++ /dev/null @@ -1,15 +0,0 @@ -[buildout] -eggs-directory = ${buildout:eggs-directory} -develop-eggs-directory = ${buildout:develop-eggs-directory} - -parts = instance - -[instance] -recipe = ${instance-recipe:egg}:${instance-recipe:module} -source = ${application:location} - -httpd_binary = ${apache:location}/bin/httpd -mysql_binary = ${mariadb:location}/bin/mysql -mysql_install_binary = ${mariadb:location}/bin/mysql_install_db -mysql_upgrade_binary = ${mariadb:location}/bin/mysql_upgrade -mysqld_binary = ${mariadb:location}/libexec/mysqld diff --git a/software/sugar-crm/software.cfg b/software/sugar-crm/software.cfg deleted file mode 100644 index 0b3934332..000000000 --- a/software/sugar-crm/software.cfg +++ /dev/null @@ -1,129 +0,0 @@ -[buildout] -versions = versions - -parts = - template - apache-php - mariadb - eggs - instance-recipe-egg - downloadcache-workaround - -extends = - ../../stack/lamp.cfg - ../../stack/shacache-client.cfg - -[application] -recipe = slapos.recipe.build:download-unpacked -url = http://www.sugarforge.org/frs/download.php/8558/SugarCE-6.3.0RC3.zip -md5sum = ff4cf7c6f673f9f3f6e082c62736f628 - -[instance-recipe] -egg = slapos.cookbook -module = lamp.simple - -[template] -# Default template for the instance. -recipe = slapos.recipe.template -url = ${:_profile_base_location_}/instance.cfg -#md5sum = Student shall put md5 of instance.cfg here -output = ${buildout:directory}/template.cfg -mode = 0644 - -[instance-recipe-egg] -recipe = zc.recipe.egg -eggs = ${instance-recipe:egg} - -[versions] -# Use SlapOS patched zc.buildout -zc.buildout = 1.5.3-dev-SlapOS-010 - -Jinja2 = 2.6 -MySQL-python = 1.2.3 -Werkzeug = 0.8.1 -apache-libcloud = 0.5.2 -buildout-versions = 1.7 -hexagonit.recipe.cmmi = 1.5.0 -meld3 = 0.6.7 -plone.recipe.command = 1.1 -slapos.cookbook = 0.34 -slapos.recipe.build = 0.7 -slapos.recipe.download = 1.0.dev-r4053 -slapos.recipe.template = 2.2 -slapos.toolbox = 0.10 - -# Required by: -# slapos.core==0.18 -# slapos.toolbox==0.10 -Flask = 0.8 - -# Required by: -# slapos.cookbook==0.34 -PyXML = 0.8.4 - -# Required by: -# hexagonit.recipe.cmmi==1.5.0 -hexagonit.recipe.download = 1.5.0 - -# Required by: -# slapos.cookbook==0.34 -# slapos.core==0.18 -# slapos.toolbox==0.10 -# xml-marshaller==0.9.7 -lxml = 2.3.1 - -# Required by: -# slapos.cookbook==0.34 -netaddr = 0.7.6 - -# Required by: -# slapos.core==0.18 -netifaces = 0.5 - -# Required by: -# slapos.toolbox==0.10 -paramiko = 1.7.7.1 - -# Required by: -# slapos.toolbox==0.10 -psutil = 0.3.0 - -# Required by: -# slapos.cookbook==0.34 -# slapos.core==0.18 -# slapos.toolbox==0.10 -setuptools = 0.6c12dev-r88846 - -# Required by: -# slapos.cookbook==0.34 -# slapos.toolbox==0.10 -slapos.core = 0.18 - -# Required by: -# slapos.core==0.18 -supervisor = 3.0a10 - -# Required by: -# slapos.cookbook==0.34 -# slapos.toolbox==0.10 -xml-marshaller = 0.9.7 - -# Required by: -# slapos.cookbook==0.34 -zc.recipe.egg = 1.3.2 - -# Required by: -# slapos.core==0.18 -zope.interface = 3.8.0 - -[downloadcache-workaround] -# workaround irritating problem of hexagonit.recipe.cmmi which automatically -# creates download cache, which in turn switches builout to "semi-offline" mode -recipe = plone.recipe.command -# in hexagonit.recipe.cmmi if there is no ${buildout:download-cache} set it resolves -# to ${buildout:directory}/downloads but this variable is available late, that's -# why it is hardcoded only for required case -download-cache = ${buildout:directory}/downloads -command = [ -d ${:download-cache} ] && rm -fr ${:download-cache}/* || exit 0 -update-command = ${:command} -stop-on-error = True diff --git a/software/testnode/instance.cfg b/software/testnode/instance.cfg deleted file mode 100644 index 6b6f79da9..000000000 --- a/software/testnode/instance.cfg +++ /dev/null @@ -1,18 +0,0 @@ -[buildout] -parts = - testnode - -eggs-directory = ${buildout:eggs-directory} -develop-eggs-directory = ${buildout:develop-eggs-directory} - -[testnode] -recipe = slapos.cookbook:testnode - -buildbot_binary = ${buildout:bin-directory}/buildbot -git_binary = ${git:location}/bin/git -slapgrid_partition_binary = ${buildout:bin-directory}/slapgrid-cp -slapgrid_software_binary = ${buildout:bin-directory}/slapgrid-sr -slapproxy_binary = ${buildout:bin-directory}/slapproxy -svn_binary = ${subversion:location}/bin/svn -svnversion_binary = ${subversion:location}/bin/svnversion -zip_binary = ${zip:location}/bin/zip diff --git a/software/testnode/software.cfg b/software/testnode/software.cfg deleted file mode 100644 index 05ef7e54a..000000000 --- a/software/testnode/software.cfg +++ /dev/null @@ -1,82 +0,0 @@ -[buildout] -recipe_location = ${:parts-directory}/slapos.cookbook -develop = ${:recipe_location} -versions = versions -extensions = slapos.rebootstrap -rebootstrap-section = python2.6 -extends = - ../../component/python-2.6/buildout.cfg - ../../component/subversion/buildout.cfg - ../../component/lxml-python/buildout.cfg - ../../component/git/buildout.cfg - ../../component/zip/buildout.cfg - -parts = - template - bootstrap - eggs - subversion - git - zip - checkrecipe - -find-links += - http://www.nexedi.org/static/packages/source/slapos.buildout/ - http://www.nexedi.org/static/packages/source/ - -[checkrecipe] -recipe = plone.recipe.command -stop-on-error = true -update-command = ${:command} -command = grep parts ${buildout:develop-eggs-directory}/slapos.cookbook.egg-link - -[slapos.cookbook] -recipe = plone.recipe.command -stop-on-error = true -location = ${buildout:parts-directory}/${:_buildout_section_name_} -command = ${git:location}/bin/git clone -b testnode --quiet http://git.erp5.org/repos/slapos.git ${:location} -update-command = cd ${:location} && ${git:location}/bin/git pull --quiet - -[template] -recipe = slapos.recipe.template -url = ${:_profile_base_location_}/instance.cfg -md5sum = 03451596826e487dc97d81e27a1e7a73 -output = ${buildout:directory}/template.cfg -mode = 0644 - -[bootstrap] -recipe = zc.recipe.egg -eggs = zc.buildout -suffix = -scripts = - buildout=bootstrap2.6 -arguments = sys.argv[1:] + ["bootstrap"] - -[rebootstrap] -section = python2.6 -version = 1 - -[eggs] -dummy = ${slapos.cookbook:location} -recipe = zc.recipe.egg -eggs = - ${lxml-python:egg} - Zope2 - collective.recipe.template - netaddr - slapos.slap - xml_marshaller - PyXML - slapos.core - slapos.cookbook - buildbot - Twisted -entry-points = buildbot=buildbot.scripts.runner:run - -[versions] -zc.buildout = 1.5.3-dev-SlapOS-001 -# only those buildout with Twisted are known to work -buildbot = 0.7.12 -Twisted = 8.2.0 -# locally fixed PyXML which supports python 2.6 -PyXML = 0.8.4nxd001 diff --git a/software/tiki/instance.cfg b/software/tiki/instance.cfg deleted file mode 100644 index 9495bde7e..000000000 --- a/software/tiki/instance.cfg +++ /dev/null @@ -1,15 +0,0 @@ -[buildout] -eggs-directory = ${buildout:eggs-directory} -develop-eggs-directory = ${buildout:develop-eggs-directory} - -parts = instance - -[instance] -recipe = ${instance-recipe:egg}:${instance-recipe:module} -source = ${application:location} - -httpd_binary = ${apache:location}/bin/httpd -mysql_binary = ${mariadb:location}/bin/mysql -mysql_install_binary = ${mariadb:location}/bin/mysql_install_db -mysql_upgrade_binary = ${mariadb:location}/bin/mysql_upgrade -mysqld_binary = ${mariadb:location}/libexec/mysqld diff --git a/software/tiki/software.cfg b/software/tiki/software.cfg deleted file mode 100644 index 75976a6c0..000000000 --- a/software/tiki/software.cfg +++ /dev/null @@ -1,129 +0,0 @@ -[buildout] -versions = versions - -parts = - template - apache-php - mariadb - eggs - instance-recipe-egg - downloadcache-workaround - -extends = - ../../stack/lamp.cfg - ../../stack/shacache-client.cfg - -[application] -recipe = slapos.recipe.build:download-unpacked -url = http://freefr.dl.sourceforge.net/project/tikiwiki/Tiki_7.x_Electra/7.1/tiki-7.1.tar.gz -md5sum = 02c832eaaa107cd7c76f9d94f400eaf5 - -[instance-recipe] -egg = slapos.cookbook -module = lamp.simple - -[template] -# Default template for the instance. -recipe = slapos.recipe.template -url = ${:_profile_base_location_}/instance.cfg -#md5sum = Student shall put md5 of instance.cfg here -output = ${buildout:directory}/template.cfg -mode = 0644 - -[instance-recipe-egg] -recipe = zc.recipe.egg -eggs = ${instance-recipe:egg} - -[versions] -# Use SlapOS patched zc.buildout -zc.buildout = 1.5.3-dev-SlapOS-010 - -Jinja2 = 2.6 -MySQL-python = 1.2.3 -Werkzeug = 0.8.1 -apache-libcloud = 0.5.2 -buildout-versions = 1.7 -hexagonit.recipe.cmmi = 1.5.0 -meld3 = 0.6.7 -plone.recipe.command = 1.1 -slapos.cookbook = 0.34 -slapos.recipe.build = 0.7 -slapos.recipe.download = 1.0.dev-r4053 -slapos.recipe.template = 2.2 -slapos.toolbox = 0.10 - -# Required by: -# slapos.core==0.18 -# slapos.toolbox==0.10 -Flask = 0.8 - -# Required by: -# slapos.cookbook==0.34 -PyXML = 0.8.4 - -# Required by: -# hexagonit.recipe.cmmi==1.5.0 -hexagonit.recipe.download = 1.5.0 - -# Required by: -# slapos.cookbook==0.34 -# slapos.core==0.18 -# slapos.toolbox==0.10 -# xml-marshaller==0.9.7 -lxml = 2.3.1 - -# Required by: -# slapos.cookbook==0.34 -netaddr = 0.7.6 - -# Required by: -# slapos.core==0.18 -netifaces = 0.5 - -# Required by: -# slapos.toolbox==0.10 -paramiko = 1.7.7.1 - -# Required by: -# slapos.toolbox==0.10 -psutil = 0.3.0 - -# Required by: -# slapos.cookbook==0.34 -# slapos.core==0.18 -# slapos.toolbox==0.10 -setuptools = 0.6c12dev-r88846 - -# Required by: -# slapos.cookbook==0.34 -# slapos.toolbox==0.10 -slapos.core = 0.18 - -# Required by: -# slapos.core==0.18 -supervisor = 3.0a10 - -# Required by: -# slapos.cookbook==0.34 -# slapos.toolbox==0.10 -xml-marshaller = 0.9.7 - -# Required by: -# slapos.cookbook==0.34 -zc.recipe.egg = 1.3.2 - -# Required by: -# slapos.core==0.18 -zope.interface = 3.8.0 - -[downloadcache-workaround] -# workaround irritating problem of hexagonit.recipe.cmmi which automatically -# creates download cache, which in turn switches builout to "semi-offline" mode -recipe = plone.recipe.command -# in hexagonit.recipe.cmmi if there is no ${buildout:download-cache} set it resolves -# to ${buildout:directory}/downloads but this variable is available late, that's -# why it is hardcoded only for required case -download-cache = ${buildout:directory}/downloads -command = [ -d ${:download-cache} ] && rm -fr ${:download-cache}/* || exit 0 -update-command = ${:command} -stop-on-error = True diff --git a/software/vifib/software.cfg b/software/vifib/software.cfg index a4c0e306d..93e921393 100644 --- a/software/vifib/software.cfg +++ b/software/vifib/software.cfg @@ -4,23 +4,9 @@ extends = parts += vifib - check-slapos.core - -develop += - ${:parts-directory}/vifib - -[check-slapos.core] -recipe = plone.recipe.command -stop-on-error = true -update-command = ${:command} -command = grep parts ${buildout:develop-eggs-directory}/slapos.core.egg-link [eggs] -dummy = - ${vifib:location} -eggs += - suds - slapos.core +eggs += slapos.core [instance-recipe] module = vifib @@ -34,7 +20,7 @@ repository_id_list += vifib/master [vifib] <= erp5 repository = http://git.erp5.org/repos/slapos.core.git -revision = +revision = 3f766ab93c5312c75b7315a60238c1c5b3e4170d [local-bt5-repository] # XXX: workaround for zc.buildout bug, as list += ends up with adding new entry diff --git a/software/coppermine/instance.cfg b/software/wordpress/instance.cfg similarity index 100% rename from software/coppermine/instance.cfg rename to software/wordpress/instance.cfg diff --git a/software/wordpress/software.cfg b/software/wordpress/software.cfg index 3f9633776..3a68fa504 100644 --- a/software/wordpress/software.cfg +++ b/software/wordpress/software.cfg @@ -1,10 +1,16 @@ [buildout] versions = versions +parts = + template + apache-php + mariadb + eggs + instance-recipe-egg extends = - ../../stack/lamp/buildout.cfg - + ../../stack/lamp.cfg + ../../stack/shacache-client.cfg [application] url = http://wordpress.org/latest.tar.gz @@ -13,7 +19,7 @@ url = http://wordpress.org/latest.tar.gz [application-template] recipe = slapos.recipe.download url = ${:_profile_base_location_}/wp-config.php.in -md5sum = ${application-configuration:md5sum} +#md5sum = ${application-configuration:md5sum} download-only = True filename = template.in mode = 0644 @@ -21,8 +27,37 @@ location = ${buildout:parts-directory}/${:_buildout_section_name_} [application-configuration] location = wp-config.php -md5sum = 3859841a4ad6ed23744d6bc5a01321e0 +[instance-recipe] +egg = slapos.cookbook +module = osoeslaptraining.request + +[instance-recipe-egg] +recipe = zc.recipe.egg +python = python2.7 +eggs = ${instance-recipe:egg} + +[template] +# Default template for the instance. +recipe = slapos.recipe.template +url = ${:_profile_base_location_}/instance.cfg +md5sum = efdb8509f40c86b1b73924fc1ce92f13 +output = ${buildout:directory}/template.cfg +mode = 0644 + [versions] +slapos.cookbook = 0.12 + +# Required by slapos.cookbook==0.12 +slapos.core = 0.8 +collective.recipe.template = 1.8 +netaddr = 0.7.5 +xml-marshaller = 0.9.7 +setuptools = 0.6c12dev-r88795 + +hexagonit.recipe.cmmi = 1.5.0 +hexagonit.recipe.download = 1.5.0 +plone.recipe.command = 1.1 + # Use SlapOS patched zc.buildout -zc.buildout = 1.6.0-dev-SlapOS-003 +zc.buildout = 1.5.3-dev-SlapOS-005 diff --git a/software/wordpress/wp-config.php.in b/software/wordpress/wp-config.php.in index c96b2d3be..808b341b4 100644 --- a/software/wordpress/wp-config.php.in +++ b/software/wordpress/wp-config.php.in @@ -42,14 +42,14 @@ define('DB_COLLATE', ''); * * @since 2.6.0 */ -define('AUTH_KEY', '%(secret_key)s'); -define('SECURE_AUTH_KEY', '%(secret_key)s'); -define('LOGGED_IN_KEY', '%(secret_key)s'); -define('NONCE_KEY', '%(secret_key)s'); -define('AUTH_SALT', '%(secret_key)s'); -define('SECURE_AUTH_SALT', '%(secret_key)s'); -define('LOGGED_IN_SALT', '%(secret_key)s'); -define('NONCE_SALT', '%(secret_key)s'); +define('AUTH_KEY', 'put your unique phrase here'); +define('SECURE_AUTH_KEY', 'put your unique phrase here'); +define('LOGGED_IN_KEY', 'put your unique phrase here'); +define('NONCE_KEY', 'put your unique phrase here'); +define('AUTH_SALT', 'put your unique phrase here'); +define('SECURE_AUTH_SALT', 'put your unique phrase here'); +define('LOGGED_IN_SALT', 'put your unique phrase here'); +define('NONCE_SALT', 'put your unique phrase here'); /**#@-*/ diff --git a/software/xoops/instance.cfg b/software/xoops/instance.cfg deleted file mode 100644 index 9495bde7e..000000000 --- a/software/xoops/instance.cfg +++ /dev/null @@ -1,15 +0,0 @@ -[buildout] -eggs-directory = ${buildout:eggs-directory} -develop-eggs-directory = ${buildout:develop-eggs-directory} - -parts = instance - -[instance] -recipe = ${instance-recipe:egg}:${instance-recipe:module} -source = ${application:location} - -httpd_binary = ${apache:location}/bin/httpd -mysql_binary = ${mariadb:location}/bin/mysql -mysql_install_binary = ${mariadb:location}/bin/mysql_install_db -mysql_upgrade_binary = ${mariadb:location}/bin/mysql_upgrade -mysqld_binary = ${mariadb:location}/libexec/mysqld diff --git a/software/xoops/software.cfg b/software/xoops/software.cfg deleted file mode 100644 index fd9e7c8f7..000000000 --- a/software/xoops/software.cfg +++ /dev/null @@ -1,130 +0,0 @@ -[buildout] -versions = versions - -parts = - template - apache-php - mariadb - eggs - instance-recipe-egg - downloadcache-workaround - -extends = - ../../stack/lamp.cfg - ../../stack/shacache-client.cfg - -[application] -recipe = slapos.recipe.build:download-unpacked -url = http://freefr.dl.sourceforge.net/project/xoops/XOOPS%20Core%20(stable%20releases)/XOOPS%202.5.1/xoops-2.5.1a.zip -md5sum = 616f06443ae1a2dcea7191069492ccd2 -extract-directory = htdocs - -[instance-recipe] -egg = slapos.cookbook -module = lamp.simple - -[template] -# Default template for the instance. -recipe = slapos.recipe.template -url = ${:_profile_base_location_}/instance.cfg -#md5sum = Student shall put md5 of instance.cfg here -output = ${buildout:directory}/template.cfg -mode = 0644 - -[instance-recipe-egg] -recipe = zc.recipe.egg -eggs = ${instance-recipe:egg} - -[versions] -# Use SlapOS patched zc.buildout -zc.buildout = 1.5.3-dev-SlapOS-010 - -Jinja2 = 2.6 -MySQL-python = 1.2.3 -Werkzeug = 0.8.1 -apache-libcloud = 0.5.2 -buildout-versions = 1.7 -hexagonit.recipe.cmmi = 1.5.0 -meld3 = 0.6.7 -plone.recipe.command = 1.1 -slapos.cookbook = 0.34 -slapos.recipe.build = 0.7 -slapos.recipe.download = 1.0.dev-r4053 -slapos.recipe.template = 2.2 -slapos.toolbox = 0.10 - -# Required by: -# slapos.core==0.18 -# slapos.toolbox==0.10 -Flask = 0.8 - -# Required by: -# slapos.cookbook==0.34 -PyXML = 0.8.4 - -# Required by: -# hexagonit.recipe.cmmi==1.5.0 -hexagonit.recipe.download = 1.5.0 - -# Required by: -# slapos.cookbook==0.34 -# slapos.core==0.18 -# slapos.toolbox==0.10 -# xml-marshaller==0.9.7 -lxml = 2.3.1 - -# Required by: -# slapos.cookbook==0.34 -netaddr = 0.7.6 - -# Required by: -# slapos.core==0.18 -netifaces = 0.5 - -# Required by: -# slapos.toolbox==0.10 -paramiko = 1.7.7.1 - -# Required by: -# slapos.toolbox==0.10 -psutil = 0.3.0 - -# Required by: -# slapos.cookbook==0.34 -# slapos.core==0.18 -# slapos.toolbox==0.10 -setuptools = 0.6c12dev-r88846 - -# Required by: -# slapos.cookbook==0.34 -# slapos.toolbox==0.10 -slapos.core = 0.18 - -# Required by: -# slapos.core==0.18 -supervisor = 3.0a10 - -# Required by: -# slapos.cookbook==0.34 -# slapos.toolbox==0.10 -xml-marshaller = 0.9.7 - -# Required by: -# slapos.cookbook==0.34 -zc.recipe.egg = 1.3.2 - -# Required by: -# slapos.core==0.18 -zope.interface = 3.8.0 - -[downloadcache-workaround] -# workaround irritating problem of hexagonit.recipe.cmmi which automatically -# creates download cache, which in turn switches builout to "semi-offline" mode -recipe = plone.recipe.command -# in hexagonit.recipe.cmmi if there is no ${buildout:download-cache} set it resolves -# to ${buildout:directory}/downloads but this variable is available late, that's -# why it is hardcoded only for required case -download-cache = ${buildout:directory}/downloads -command = [ -d ${:download-cache} ] && rm -fr ${:download-cache}/* || exit 0 -update-command = ${:command} -stop-on-error = True diff --git a/software/xwiki/instance.cfg b/software/xwiki/instance.cfg deleted file mode 100644 index 772d94446..000000000 --- a/software/xwiki/instance.cfg +++ /dev/null @@ -1,15 +0,0 @@ -[buildout] -eggs-directory = ${buildout:eggs-directory} -develop-eggs-directory = ${buildout:develop-eggs-directory} - -parts = instance - -[instance] -recipe = ${instance-recipe:egg}:${instance-recipe:module} -jdbc_location = ${jdbc:location}/mysql-connector-java-5.1.17/mysql-connector-java-5.1.17-bin.jar -tomcat_location = ${tomcat:location} -xwiki_location = ${xwiki:location} -java_home = ${java:location} -mysqld_binary = ${mysql-5.1:location}/libexec/mysqld -mysql_binary = ${mysql-5.1:location}/bin/mysql -mysql_install_binary = ${mysql-5.1:location}/bin/mysql_install_db diff --git a/software/xwiki/software.cfg b/software/xwiki/software.cfg deleted file mode 100644 index 35ddf268b..000000000 --- a/software/xwiki/software.cfg +++ /dev/null @@ -1,47 +0,0 @@ -[buildout] -extends = - ../../stack/tomcat.cfg - -find-links = - http://www.nexedi.org/static/packages/source/slapos.buildout/ - -versions = versions - -[instance-recipe] -egg = slapos.cookbook -module = xwiki - -[instance-recipe-egg] -recipe = zc.recipe.egg -python = python2.7 -eggs = ${instance-recipe:egg} - -[template] -# Default template for the instance. -recipe = slapos.recipe.template -url = ${:_profile_base_location_}/instance.cfg -md5sum = dbdc297502f0258c85fe7dfbddc8e501 -output = ${buildout:directory}/template.cfg -mode = 0644 - -[xwiki] -recipe = hexagonit.recipe.download -url = http://download.forge.objectweb.org/xwiki/xwiki-enterprise-web-2.7.war -md5sum = c56e2cde96d28c5899a16a8270b6ff88 - -[versions] -slapos.cookbook = 0.18 - -# Required by slapos.cookbook==0.18 -slapos.core = 0.13 -collective.recipe.template = 1.8 -netaddr = 0.7.5 -xml-marshaller = 0.9.7 -setuptools = 0.6c12dev-r88846 - -hexagonit.recipe.cmmi = 1.5.0 -hexagonit.recipe.download = 1.5.0 -plone.recipe.command = 1.1 - -# Use SlapOS patched zc.buildout -zc.buildout = 1.5.3-dev-SlapOS-009 diff --git a/software/zencart/configure.py b/software/zencart/configure.py deleted file mode 100644 index 1f6eb6a92..000000000 --- a/software/zencart/configure.py +++ /dev/null @@ -1,20 +0,0 @@ -import sys -import os -import fileinput - -def setup(args): - mysql_port, mysql_host, mysql_user, mysql_password, mysql_database, base_url, htdocs = args - - admin_dir = "admin-" + mysql_user - admin_include_file = os.path.join(htdocs, admin_dir + "/includes/configure.php") - searchPattern = "/admin" - replacePattern = "/" + admin_dir - os.chmod(admin_include_file, 0744) - for line in fileinput.input(admin_include_file, inplace=1): - if searchPattern in line: - line = line.replace(searchPattern, replacePattern) - sys.stdout.write(line) - os.chmod(admin_include_file, 0444) - -if __name__ == '__main__': - setup(sys.argv[1:]) \ No newline at end of file diff --git a/software/zencart/instance.cfg b/software/zencart/instance.cfg deleted file mode 100644 index a29b488b1..000000000 --- a/software/zencart/instance.cfg +++ /dev/null @@ -1,23 +0,0 @@ -[buildout] -eggs-directory = ${buildout:eggs-directory} -develop-eggs-directory = ${buildout:develop-eggs-directory} - -parts = instance - -[instance] -recipe = ${instance-recipe:egg}:${instance-recipe:module} -source = ${application:location} -lampconfigure_directory = ${buildout:bin-directory}/lampconfigure - -httpd_binary = ${apache:location}/bin/httpd -mysql_binary = ${mariadb:location}/bin/mysql -mysql_install_binary = ${mariadb:location}/bin/mysql_install_db -mysql_upgrade_binary = ${mariadb:location}/bin/mysql_upgrade -mysqld_binary = ${mariadb:location}/libexec/mysqld - -delete = zc_install -rename = admin -#file_token = name of file who will be created at the end of installation -table_name = admin -constraint = `admin_id`=1 AND (`admin_name`<>'Admin' OR `admin_email`<>'admin@localhost') -script = ${configure-script:location}/${configure-script:filename} \ No newline at end of file diff --git a/software/zencart/software.cfg b/software/zencart/software.cfg deleted file mode 100644 index ce7f05a04..000000000 --- a/software/zencart/software.cfg +++ /dev/null @@ -1,143 +0,0 @@ -[buildout] -versions = versions - -parts = - template - apache-php - mariadb - eggs - instance-recipe-egg - downloadcache-workaround - configure-script - -extends = - ../../stack/lamp.cfg - ../../stack/shacache-client.cfg - -[application] -recipe = slapos.recipe.build:download-unpacked -url = http://heanet.dl.sourceforge.net/project/zencart/CURRENT_%20Zen%20Cart%201.3.x%20Series/Zen%20Cart%20v1.3.9%20-%20Full%20Release/zen-cart-v1.3.9h-full-fileset-10262010.zip -md5sum = e0a5fb39078321ced7f5a9c193f30927 -#If provided tarball does not contain top directory, option shall be changed to false -strip-top-level-dir = true - -[configure-script] -recipe = slapos.recipe.download -location = ${buildout:parts-directory}/${:_buildout_section_name_} -url = ${:_profile_base_location_}/configure.py -filename = configure.py -mode = 0744 - -[instance-recipe] -egg = slapos.cookbook -module = lamp.simple - -[template] -# Default template for the instance. -recipe = slapos.recipe.template -url = ${:_profile_base_location_}/instance.cfg -#md5sum = Student shall put md5 of instance.cfg here -output = ${buildout:directory}/template.cfg -mode = 0644 - -[instance-recipe-egg] -recipe = zc.recipe.egg -eggs = - ${mysql-python:egg} - ${instance-recipe:egg} - slapos.toolbox[lampconfigure] - -[versions] -# Use SlapOS patched zc.buildout -zc.buildout = 1.5.3-dev-SlapOS-010 - -Jinja2 = 2.6 -MySQL-python = 1.2.3 -Werkzeug = 0.8.1 -apache-libcloud = 0.5.2 -buildout-versions = 1.7 -hexagonit.recipe.cmmi = 1.5.0 -meld3 = 0.6.7 -plone.recipe.command = 1.1 -slapos.cookbook = 0.34 -slapos.recipe.build = 0.7 -slapos.recipe.download = 1.0.dev-r4053 -slapos.recipe.template = 2.2 -slapos.toolbox = 0.10 - -# Required by: -# slapos.core==0.18 -# slapos.toolbox==0.10 -Flask = 0.8 - -# Required by: -# slapos.cookbook==0.34 -PyXML = 0.8.4 - -# Required by: -# hexagonit.recipe.cmmi==1.5.0 -hexagonit.recipe.download = 1.5.0 - -# Required by: -# slapos.cookbook==0.34 -# slapos.core==0.18 -# slapos.toolbox==0.10 -# xml-marshaller==0.9.7 -lxml = 2.3.1 - -# Required by: -# slapos.cookbook==0.34 -netaddr = 0.7.6 - -# Required by: -# slapos.core==0.18 -netifaces = 0.6 - -# Required by: -# slapos.toolbox==0.10 -paramiko = 1.7.7.1 - -# Required by: -# slapos.toolbox==0.10 -psutil = 0.3.0 - -# Required by: -# slapos.cookbook==0.34 -# slapos.core==0.18 -# slapos.toolbox==0.10 -setuptools = 0.6c12dev-r88846 - -# Required by: -# slapos.cookbook==0.34 -# slapos.toolbox==0.10 -slapos.core = 0.18 - -# Required by: -# slapos.core==0.18 -supervisor = 3.0a10 - -# Required by: -# slapos.cookbook==0.34 -# slapos.toolbox==0.10 -xml-marshaller = 0.9.7 - -# Required by: -# slapos.cookbook==0.34 -zc.recipe.egg = 1.3.2 - -# Required by: -# slapos.core==0.18 -zope.interface = 3.8.0 - -[downloadcache-workaround] -# workaround irritating problem of hexagonit.recipe.cmmi which automatically -# creates download cache, which in turn switches builout to "semi-offline" mode -recipe = plone.recipe.command -# in hexagonit.recipe.cmmi if there is no ${buildout:download-cache} set it resolves -# to ${buildout:directory}/downloads but this variable is available late, that's -# why it is hardcoded only for required case -download-cache = ${buildout:directory}/downloads -command = [ -d ${:download-cache} ] && rm -fr ${:download-cache}/* || exit 0 -update-command = ${:command} -stop-on-error = True - diff --git a/stack/cloudooo.cfg b/stack/cloudooo.cfg index 0db8eae89..5c854069d 100755 --- a/stack/cloudooo.cfg +++ b/stack/cloudooo.cfg @@ -11,7 +11,7 @@ find-links = http://www.owlfish.com/software/wsgiutils/download.html extends = - ../component/openoffice-bin/buildout.cfg + ../component/libreoffice-bin/buildout.cfg ../component/lxml-python/buildout.cfg ../component/python-2.6/buildout.cfg ../component/python-2.7/buildout.cfg @@ -39,8 +39,7 @@ parts = libXdmcp libXext libXau - libXinerama - libSM + libX11 # fonts liberation-fonts diff --git a/stack/erp5.cfg b/stack/erp5.cfg index 67a53a4e8..fac58b185 100644 --- a/stack/erp5.cfg +++ b/stack/erp5.cfg @@ -3,6 +3,7 @@ extensions = slapos.rebootstrap slapos.zcbworkarounds buildout-versions + mr.developer find-links = http://www.nexedi.org/static/packages/source/slapos.buildout/ @@ -20,7 +21,6 @@ allow-hosts = *.nexedi.org *.python.org *.sourceforge.net - alastairs-place.net dist.repoze.org effbot.org github.com @@ -31,7 +31,7 @@ allow-hosts = extends = # Exact version of Zope - http://svn.zope.org/repos/main/Zope/tags/2.12.21/versions.cfg + http://svn.zope.org/repos/main/Zope/tags/2.12.19/versions.cfg ../component/logrotate/buildout.cfg ../component/dcron/buildout.cfg ../component/file/buildout.cfg @@ -47,12 +47,11 @@ extends = ../component/kumo/buildout.cfg ../component/libreoffice-bin/buildout.cfg ../component/lxml-python/buildout.cfg - ../component/percona-toolkit/buildout.cfg + ../component/maatkit/buildout.cfg ../component/mariadb/buildout.cfg ../component/memcached/buildout.cfg ../component/mysql-python/buildout.cfg ../component/pdftk/buildout.cfg - ../component/pycrypto-python/buildout.cfg ../component/pysvn-python/buildout.cfg ../component/python-2.6/buildout.cfg ../component/python-2.7/buildout.cfg @@ -91,7 +90,6 @@ parts = libpng ghostscript mariadb - mroonga-mariadb sphinx imagemagick kumo @@ -101,15 +99,13 @@ parts = tesseract hookbox bootstrap2.6 - perl-DBD-mariadb - perl-DBI - percona-toolkit zabbix-agent pdftk dcron # Buildoutish eggs + instance-recipe-egg testrunner test_suite_runner @@ -117,8 +113,7 @@ parts = libXdmcp libXext libXau - libXinerama - libSM + libX11 # fonts liberation-fonts @@ -134,12 +129,6 @@ parts = erp5 genbt5list -# fix products path (Zeo needs ERP5 Products to be available for -# conflict resolution) - fix-products-paths -# some additional utils - slapos-toolbox - [bt5-repository] # Format: # <url or path> [...] @@ -209,8 +198,14 @@ svn_param =--trust-server-cert --non-interactive --quiet location = ${buildout:parts-directory}/${:_buildout_section_name_} stop-on-error = true command = - ${subversion:location}/bin/svn checkout -r 98997 ${:svn_param} https://svn.plone.org/svn/collective/ExtFile/trunk ${:location}/ExtFile && - ${git:location}/bin/git clone --quiet git://git.hforge.org/Localizer.git ${:location}/Localizer && cd ${:location}/Localizer && ${git:location}/bin/git reset --quiet --hard dacb6ba0ae559cd9bdb8822812d24a12a21e9e37 + ${subversion:location}/bin/svn checkout ${:svn_param} https://svn.plone.org/svn/collective/ExtFile/trunk ${:location}/ExtFile && + ${git:location}/bin/git clone --quiet git://git.hforge.org/Localizer.git ${:location}/Localizer +update-command = + if ${buildout:newest}; then + ${subversion:location}/bin/svn checkout ${:svn_param} https://svn.plone.org/svn/collective/ExtFile/trunk ${:location}/ExtFile && + cd ${:location}/Localizer && + ${git:location}/bin/git pull --quiet + fi [erp5_repository_list] repository_id_list = erp5 @@ -225,22 +220,14 @@ location = ${buildout:parts-directory}/${:_buildout_section_name_} stop-on-error = true repository = http://git.erp5.org/repos/erp5.git branch = master -revision = -command = ${git:location}/bin/git clone --quiet -b ${:branch} ${:repository} ${:location} && if [ -n "${:revision}" ]; then cd ${:location} && ${git:location}/bin/git reset --quiet --hard ${:revision} ; fi -update-command = cd ${:location} && ${git:location}/bin/git pull --quiet && if [ -n "${:revision}" ]; then cd ${:location} && ${git:location}/bin/git reset --quiet --hard ${:revision} ; fi +revision = dd36cf064495e04f2ad0eaa9c527a2c3246e9ecb +command = ${git:location}/bin/git clone --quiet -b ${:branch} ${:repository} ${:location} && if [ -n ${:revision} ]; then cd ${:location} && ${git:location}/bin/git reset --quiet --hard ${:revision} ; fi +update-command = cd ${:location} && ${git:location}/bin/git pull --quiet && if [ -n ${:revision} ]; then cd ${:location} && ${git:location}/bin/git reset --quiet --hard ${:revision} ; fi [products] # XXX: ERP5 related products are not defined as python distributions, so it is # required to configure them in declarative manner -list = - -[fix-products-paths] -recipe = plone.recipe.command -stop-on-error = true -command = - for DIR in "${products-deps:location}"; do cd "$DIR"; rm -f Products ; ln -s . Products; touch __init__.py; done - for DIR in "${erp5:location}"; do cd "$DIR"; rm -f Products ; ln -s product Products; touch product/__init__.py; done -update-command = ${:command} +list = ${products-deps:location} ${buildout:parts-directory}/erp5/product [testrunner] # XXX: Workaround for fact ERP5Type is not an distribution and does not @@ -250,29 +237,28 @@ python = python2.6 eggs = ${eggs:eggs} extra-paths = ${eggs:extra-paths} entry-points = - runUnitTest=runUnitTest:main + runUnitTest=Products.ERP5Type.tests.runUnitTest:main scripts = runUnitTest initialization = - import glob, imp, os, sys - import App # prevent Testing from importing Zope2.App instead of App + import os + import sys import Products - Products.__path__[:0] = filter(None, - os.getenv('INSERT_PRODUCTS_PATH', '').split(os.pathsep)) + [Products.__path__.insert(0, p) for p in reversed(os.environ.get('INSERT_PRODUCTS_PATH', '').split(':')) if p] Products.__path__.extend(reversed('''${products:list}'''.split())) - os.environ['SOFTWARE_HOME'] = os.path.abspath(imp.find_module('Zope2')[1]) + import Zope2 + os.environ['SOFTWARE_HOME'] = os.path.abspath(os.path.dirname(os.path.dirname(Zope2.__file__))) os.environ['ZOPE_SCRIPTS'] = '' parts_directory = '''${buildout:parts-directory}''' - repository_id_list = \ - '''${erp5_repository_list:repository_id_list}'''.split()[::-1] - os.environ['erp5_tests_bt5_path'] = ','.join(sum(( - [bt5_path, os.path.join(bt5_path, '*')] - for bt5_path in (os.path.join(parts_directory, x, 'bt5') - for x in repository_id_list)), [])) - sys.path[:0] = [os.path.join(parts_directory, x, 'tests') - for x in repository_id_list] - sys.path[:0] = sum(( - glob.glob(os.path.join(parts_directory, x, 'product', '*', 'tests')) - for x in repository_id_list), []) + repository_id_list = list(reversed('''${erp5_repository_list:repository_id_list}'''.split())) + temp_bt5_path_list = ['/'.join([parts_directory, x, 'bt5']) for x in repository_id_list] + bt5_path_list = [] + [bt5_path_list.extend([bt5_path, '%s/*' % bt5_path]) for bt5_path in temp_bt5_path_list] + os.environ['erp5_tests_bt5_path'] = ','.join(bt5_path_list) + sys.path[0:0] = ['/'.join([parts_directory, x, 'tests']) for x in repository_id_list] + import glob + product_test_path_list = [] + [product_test_path_list.extend(glob.glob('/'.join([parts_directory, x, 'product/*/tests']))) for x in repository_id_list] + sys.path[0:0] = product_test_path_list [test_suite_runner] # XXX: Workaround for fact ERP5Type is not an distribution and does not @@ -296,6 +282,14 @@ initialization = repository_id_list = list(reversed('''${erp5_repository_list:repository_id_list}'''.split())) sys.path[0:0] = ['/'.join(['''${buildout:parts-directory}''', x]) for x in repository_id_list] +[instance-recipe-egg] +recipe = zc.recipe.egg +python = python2.6 +eggs = +# instantiation egg + ${instance-recipe:egg} + erp5.conflictresolver + [eggs] recipe = zc.recipe.egg python = python2.6 @@ -304,12 +298,11 @@ eggs = ${lxml-python:egg} ${python-ldap-python:egg} ${pysvn-python:egg} - ${pycrypto-python:egg} + pycrypto PyXML SOAPpy cElementTree chardet - coverage elementtree erp5diff ipdb @@ -376,8 +369,6 @@ scripts = extra-paths = ${itools:location}/lib - ${products-deps:location} - ${erp5:location} [mysql-python] python = python2.6 @@ -391,17 +382,6 @@ python = python2.6 [pysvn-python] python = python2.6 -[slapos-toolbox] -recipe = zc.recipe.egg -python = ${eggs:python} -eggs = - ${lxml-python:egg} - slapos.toolbox - -scripts = - killpidfromfile = slapos.systool:killpidfromfile - onetimedownload = slapos.toolbox:onetimedownload - [cloudooo] recipe = zc.recipe.egg python = python2.6 @@ -418,7 +398,7 @@ scripts = [versions] # Use SlapOS patched zc.buildout -zc.buildout = 1.6.0-dev-SlapOS-003 +zc.buildout = 1.5.3-dev-SlapOS-005 # pin Acquisition and Products.DCWorkflow to Nexedi flavour of eggs Acquisition = 2.13.7nxd001 diff --git a/stack/kvm.cfg b/stack/kvm.cfg new file mode 100644 index 000000000..329727c0b --- /dev/null +++ b/stack/kvm.cfg @@ -0,0 +1,92 @@ +[buildout] +extends = + shacache-client.cfg + ../component/python-2.7/buildout.cfg + ../component/lxml-python/buildout.cfg + ../component/git/buildout.cfg + ../component/zlib/buildout.cfg + ../component/readline/buildout.cfg + ../component/ncurses/buildout.cfg + ../component/libuuid/buildout.cfg + ../component/noVNC/buildout.cfg + ../component/openssl/buildout.cfg + ../component/rdiff-backup/buildout.cfg + ../component/dcron/buildout.cfg + ../component/libpng/buildout.cfg + +parts = + template + gnutls + kvm + eggs + +find-links += + http://www.nexedi.org/static/packages/source/slapos.buildout/ + +versions = versions + +[gpg-error] +recipe = hexagonit.recipe.cmmi +url = ftp://ftp.gnupg.org/gcrypt/libgpg-error/libgpg-error-1.10.tar.gz +md5sum = 7c2710ef439f82ac429b88fec88e9a4c + +[gcrypt] +recipe = hexagonit.recipe.cmmi +url = ftp://ftp.gnupg.org/gcrypt/libgcrypt/libgcrypt-1.4.6.tar.gz +md5sum = bfd45922eefb8a24d598af77366220d4 +configure-options = + --with-gpg-error-prefix=${gpg-error:location} +environment = + CPPFLAGS=-I${gpg-error:location}/include + LDFLAGS=-Wl,-rpath -Wl,${gpg-error:location}/lib -Wl,${gpg-error:location}/lib/libgpg-error.so.0 + +[gnutls] +recipe = hexagonit.recipe.cmmi +url = ftp://ftp.gnupg.org/gcrypt/gnutls/gnutls-2.8.6.tar.bz2 +md5sum = eb0a6d7d3cb9ac684d971c14f9f6d3ba +configure-options = + --with-libgcrypt-prefix=${gcrypt:location} +environment = + CPPFLAGS=-I${zlib:location}/include -I${readline:location}/include -I${ncurses:location}/include -I${ncurses:location}/include/ncursesw -I${gcrypt:location}/include -I${gpg-error:location}/include + LDFLAGS=-L${readline:location}/lib -L${ncurses:location}/lib -L${gcrypt:location}/lib -Wl,-rpath -Wl,${zlib:location}/lib -Wl,-rpath -Wl,${readline:location}/lib -Wl,-rpath -Wl,${ncurses:location}/lib -Wl,-rpath -Wl,${gcrypt:location}/lib -Wl,-rpath -Wl,${gpg-error:location}/lib -Wl,${gcrypt:location}/lib/libgcrypt.so.11 + PKG_CONFIG=${zlib:location}/lib/pkgconfig + +[kvm] +recipe = hexagonit.recipe.cmmi +path = ${kvmsource:location}/ +configure-options = + --disable-sdl + --disable-xen + --enable-vnc-tls + --disable-vnc-sasl + --disable-curses + --disable-curl + --enable-kvm + --disable-docs + --enable-vnc-png + --disable-vnc-jpeg + --extra-cflags="-I${gnutls:location}/include -I${libuuid:location}/include -I${zlib:location}/include -I${libpng:location}/include" + --extra-ldflags="-Wl,-rpath -Wl,${gnutls:location}/lib -L${gnutls:location}/lib -Wl,-rpath -Wl,${libpng:location}/lib -L${libpng:location}/lib -L${libuuid:location}/lib -Wl,-rpath -Wl,${libuuid:location}/lib -L${zlib:location}/lib -Wl,-rpath -Wl,${zlib:location}/lib -lpng -lz -lgnutls" + --disable-werror +environment = + PKG_CONFIG_PATH=${gnutls:location}/lib/pkgconfig + +[kvmsource] +recipe=plone.recipe.command +location = ${buildout:parts-directory}/${:_buildout_section_name_} +stop-on-error = true +#tag = slapos-v0.1 +command = + (${git:location}/bin/git clone --quiet http://git.erp5.org/repos/slapos.kvm.git ${:location} ) || (rm -fr ${:location} ; exit 1) +update-command = + cd ${:location} && ${git:location}/bin/git pull --quiet origin master + +[eggs] +python = python2.7 +recipe = z3c.recipe.scripts +eggs = + ${lxml-python:egg} + slapos.cookbook + +[versions] +zc.buildout = 1.5.3-dev-SlapOS-005 diff --git a/stack/lamp.cfg b/stack/lamp.cfg index 4545904a4..fea66112d 100644 --- a/stack/lamp.cfg +++ b/stack/lamp.cfg @@ -1,6 +1,4 @@ [buildout] -extensions = buildout-versions - find-links += http://www.nexedi.org/static/packages/source/slapos.buildout/ @@ -9,11 +7,9 @@ allow-hosts = *.nexedi.org *.python.org *.sourceforge.net - alastairs-place.net dist.repoze.org effbot.org github.com - launchpad.net peak.telecommunity.com psutil.googlecode.com www.dabeaz.com @@ -33,72 +29,20 @@ extends = ../component/git/buildout.cfg ../component/glib/buildout.cfg ../component/logrotate/buildout.cfg + ../component/python-2.7/buildout.cfg + ../component/perl/buildout.cfg + ../component/sqlite3/buildout.cfg + ../component/xtrabackup/buildout.cfg + ../component/rdiff-backup/buildout.cfg ../component/lxml-python/buildout.cfg ../component/zlib/buildout.cfg - ../component/stunnel/buildout.cfg - ../component/pycrypto-python/buildout.cfg - ../component/mysql-python/buildout.cfg - shacache-client.cfg - ../component/python-2.7/buildout.cfg -# python-2.7 component is here only for compatibility with old software.cfg. -# It is not needed and should not be used in LAMP-based software.cfg + +[application] +recipe = hexagonit.recipe.download +#If provided tarball does not containt top directory this option shall be changed to false +strip-top-level-dir = true [eggs] recipe = zc.recipe.egg eggs = ${lxml-python:egg} - ${pycrypto-python:egg} - -[mariadb] -keep-compile-dir = false - -[application] -#XXX-Cedric : ugly hack to work around h.r.cmmi unrespectful behavior, so that -# a cmmi Executes before application but after template downloading. -# Useful when [application] uses slapos.recipe.build or -# slapos.recipe.download rather than h.r.download. -depends = ${apache-php:location} - - -[networkcache] -# Romain Courteaud + Sebastien Robin + Alain Takoudjou signature certificate -signature-certificate-list = - -----BEGIN CERTIFICATE----- - MIIB4DCCAUkCADANBgkqhkiG9w0BAQsFADA5MQswCQYDVQQGEwJGUjEZMBcGA1UE - CBMQRGVmYXVsdCBQcm92aW5jZTEPMA0GA1UEChMGTmV4ZWRpMB4XDTExMDkxNTA5 - MDAwMloXDTEyMDkxNTA5MDAwMlowOTELMAkGA1UEBhMCRlIxGTAXBgNVBAgTEERl - ZmF1bHQgUHJvdmluY2UxDzANBgNVBAoTBk5leGVkaTCBnzANBgkqhkiG9w0BAQEF - AAOBjQAwgYkCgYEApYZv6OstoqNzxG1KI6iE5U4Ts2Xx9lgLeUGAMyfJLyMmRLhw - boKOyJ9Xke4dncoBAyNPokUR6iWOcnPHtMvNOsBFZ2f7VA28em3+E1JRYdeNUEtX - Z0s3HjcouaNAnPfjFTXHYj4um1wOw2cURSPuU5dpzKBbV+/QCb5DLheynisCAwEA - ATANBgkqhkiG9w0BAQsFAAOBgQBCZLbTVdrw3RZlVVMFezSHrhBYKAukTwZrNmJX - mHqi2tN8tNo6FX+wmxUUAf3e8R2Ymbdbn2bfbPpcKQ2fG7PuKGvhwMG3BlF9paEC - q7jdfWO18Zp/BG7tagz0jmmC4y/8akzHsVlruo2+2du2freE8dK746uoMlXlP93g - QUUGLQ== - -----END CERTIFICATE----- - -----BEGIN CERTIFICATE----- - MIIB8jCCAVugAwIBAgIJAPu2zchZ2BxoMA0GCSqGSIb3DQEBBQUAMBIxEDAOBgNV - BAMMB3RzeGRldjMwHhcNMTExMDE0MTIxNjIzWhcNMTIxMDEzMTIxNjIzWjASMRAw - DgYDVQQDDAd0c3hkZXYzMIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCrPbh+ - YGmo6mWmhVb1vTqX0BbeU0jCTB8TK3i6ep3tzSw2rkUGSx3niXn9LNTFNcIn3MZN - XHqbb4AS2Zxyk/2tr3939qqOrS4YRCtXBwTCuFY6r+a7pZsjiTNddPsEhuj4lEnR - L8Ax5mmzoi9nE+hiPSwqjRwWRU1+182rzXmN4QIDAQABo1AwTjAdBgNVHQ4EFgQU - /4XXREzqBbBNJvX5gU8tLWxZaeQwHwYDVR0jBBgwFoAU/4XXREzqBbBNJvX5gU8t - LWxZaeQwDAYDVR0TBAUwAwEB/zANBgkqhkiG9w0BAQUFAAOBgQA07q/rKoE7fAda - FED57/SR00OvY9wLlFEF2QJ5OLu+O33YUXDDbGpfUSF9R8l0g9dix1JbWK9nQ6Yd - R/KCo6D0sw0ZgeQv1aUXbl/xJ9k4jlTxmWbPeiiPZEqU1W9wN5lkGuLxV4CEGTKU - hJA/yXa1wbwIPGvX3tVKdOEWPRXZLg== - -----END CERTIFICATE----- - -----BEGIN CERTIFICATE----- - MIIB9DCCAV2gAwIBAgIJAL392bEdqpFQMA0GCSqGSIb3DQEBBQUAMBMxETAPBgNV - BAMMCENPTVAtMjM0MB4XDTExMTEwOTE1MzA0M1oXDTEyMTEwODE1MzA0M1owEzER - MA8GA1UEAwwIQ09NUC0yMzQwgZ8wDQYJKoZIhvcNAQEBBQADgY0AMIGJAoGBAMRR - T0cacZKztie/DaRRjq3mgcqfPKoGXu6zXmeRQI+6Y4bnzjf8h/jAuPzR552P0xK5 - psxhavXA8hOGRLFDtvDMQLepVHWfwqtFtcp5vNf2+KWqOYy0OxHfVIlnatvCqTZN - NG1vRsSOAQ+v7QNFHh6NBbiSrjBBfg4vkfzqnsUvAgMBAAGjUDBOMB0GA1UdDgQW - BBTGGw+ASoDi9kqPElDkC0Q5RtAfRjAfBgNVHSMEGDAWgBTGGw+ASoDi9kqPElDk - C0Q5RtAfRjAMBgNVHRMEBTADAQH/MA0GCSqGSIb3DQEBBQUAA4GBAIOuR1OqXLke - LLzH0kRnlIOe60dYJvRya53wDx5x2g4/qkXZPLx2RcbaUrX/SCbL70vfr+apUPss - dOSJ86sf/PQHW3/1fhTTE+Vck1MiiAq0aIx6WnKnz4+ZcQctB7b0DCsTcQnmbpi2 - n9MuhWaT21VOYhIGzJFPw5XW47/RrwhR - -----END CERTIFICATE----- diff --git a/stack/lamp/buildout.cfg b/stack/lamp/buildout.cfg deleted file mode 100644 index b17f8a7b3..000000000 --- a/stack/lamp/buildout.cfg +++ /dev/null @@ -1,142 +0,0 @@ -[buildout] -find-links += - http://www.nexedi.org/static/packages/source/slapos.buildout/ - -parts = - apache-php - mariadb - mydumper - mysql-python - rdiff-backup - dropbear - eggs - instance-recipe-egg - template - template-apache-php - template-mariadb - template-mariadb-pbsready - template-mariadb-pbsready-import - template-mariadb-pbsready-export - -allow-hosts = - *.nexedi.org - *.python.org - *.sourceforge.net - alastairs-place.net - dist.repoze.org - effbot.org - github.com - peak.telecommunity.com - psutil.googlecode.com - www.dabeaz.com - launchpad.net - -extends = - ../shacache-client.cfg - ../../component/mariadb/buildout.cfg - ../../component/apache/buildout.cfg - ../../component/apache-php/buildout.cfg - ../../component/dcron/buildout.cfg - ../../component/git/buildout.cfg - ../../component/glib/buildout.cfg - ../../component/logrotate/buildout.cfg - ../../component/python-2.7/buildout.cfg - ../../component/perl/buildout.cfg - ../../component/sqlite3/buildout.cfg - ../../component/lxml-python/buildout.cfg - ../../component/zlib/buildout.cfg - ../../component/rdiff-backup/buildout.cfg - ../../component/gzip/buildout.cfg - ../../component/stunnel/buildout.cfg - ../../component/mydumper/buildout.cfg - ../../component/mysql-python/buildout.cfg - ../../component/dropbear/buildout.cfg - -versions = versions - -[mariadb] -# Compile dir is for plugins, there's no plugin in LAMP -keep-compile-dir = false - -[instance-recipe] -egg = slapos.cookbook -module = lamp.request - -[instance-recipe-egg] -recipe = zc.recipe.egg -#python = python2.7 -eggs = ${instance-recipe:egg} - -[application] -recipe = hexagonit.recipe.download -#If provided tarball does not containt top directory this option shall be changed to false -strip-top-level-dir = true - -[template] -recipe = slapos.recipe.template -url = ${:_profile_base_location_}/instance.cfg -output = ${buildout:directory}/template.cfg -md5sum = 8117f10e814a13c5376af4c01e6546d4 -mode = 0644 - -[template-apache-php] -recipe = slapos.recipe.template -url = ${:_profile_base_location_}/instance-apache-php.cfg -output = ${buildout:directory}/template-apache-php.cfg -md5sum = 45bc82dc468e7f418d95c846d1a33d74 -mode = 0644 - -[template-apache-backup] -recipe = slapos.recipe.template -url = ${:_profile_base_location_}/instance-apache-backup.cfg -output = ${buildout:directory}/template-apache-backup.cfg -md5sum = cfb77ac8785e0d125a785f69a5339014 -mode = 0644 - -[template-backuped] -recipe = slapos.recipe.template -url = ${:_profile_base_location_}/instance-backuped.cfg -output = ${buildout:directory}/template-backuped.cfg -md5sum = f43d1c6412ea8dc83b75573dc00daf9e -mode = 0644 - -[template-mariadb] -recipe = slapos.recipe.template -url = ${:_profile_base_location_}/instance-mariadb.cfg -output = ${buildout:directory}/template-mariadb.cfg -md5sum = 70ab558c2e925c3627c39fbc20a7501c -mode = 0644 - -[template-mariadb-pbsready] -recipe = slapos.recipe.template -url = ${:_profile_base_location_}/instance-mariadb-pbsready.cfg -output = ${buildout:directory}/template-mariadb-pbsready.cfg -md5sum = d2a580dcd7efdd528be45c5ffadfe760 -mode = 0644 - -[template-mariadb-pbsready-import] -recipe = slapos.recipe.template -url = ${:_profile_base_location_}/instance-mariadb-pbsready-import.cfg -output = ${buildout:directory}/template-mariadb-pbsready-import.cfg -md5sum = 4a96ff02da3898fef7077fa8baec81ac -mode = 0644 - -[template-mariadb-pbsready-export] -recipe = slapos.recipe.template -url = ${:_profile_base_location_}/instance-mariadb-pbsready-export.cfg -output = ${buildout:directory}/template-mariadb-pbsready-export.cfg -md5sum = 11a9e45e8bc590bc11bfdd304b07a4a5 -mode = 0644 - -[template-pull-backup] -recipe = slapos.recipe.template -url = ${:_profile_base_location_}/instance-pull-backup.cfg -output = ${buildout:directory}/template-pull-backup.cfg -md5sum = 9aab30ba5aa23a37d4b507e7c414be00 -mode = 0644 - -[eggs] -recipe = zc.recipe.egg -eggs = - ${lxml-python:egg} - slapos.toolbox diff --git a/stack/lamp/instance-apache-backup.cfg b/stack/lamp/instance-apache-backup.cfg deleted file mode 100644 index 69f14c2fa..000000000 --- a/stack/lamp/instance-apache-backup.cfg +++ /dev/null @@ -1,156 +0,0 @@ -[buildout] - -parts = - urls - apache-proxy - logrotate - logrotate-entry-apache - cron - cron-entry-logrotate - sshkeys-authority - sshkeys-dropbear - dropbear-server - dropbear-server-pbs-authorized-key - -eggs-directory = ${buildout:eggs-directory} -develop-eggs-directory = ${buildout:develop-eggs-directory} -offline = true - -[urls] -recipe = slapos.cookbook:publish -url = http://[$${apache-proxy:ip}]:$${apache-proxy:port}/ -ssh-public-key = $${sshkeys-dropbear:public-key-value} -ssh-url = ssh://nobody@[$${dropbear-server:host}]:$${dropbear-server:port}/$${rdiff-backup-server:path} - -[apache-proxy] -recipe = slapos.cookbook:apacheproxy -url = $${slap-parameter:proxy-url} -pid-file = $${basedirectory:run}/apache.pid -lock-file = $${basedirectory:run}/apache.lock -ip = $${slap-network-information:global-ipv6} -port = 8080 -error-log = $${directory:httpd-log}/error.log -access-log = $${directory:httpd-log}/access.log -httpd-conf = $${rootdirectory:etc}/apache.conf -wrapper = $${basedirectory:services}/apache - -promise = $${basedirectory:promises}/apache - -httpd-binary = ${apache:location}/bin/httpd - -[sshkeys-directory] -recipe = slapos.cookbook:mkdirectory -requests = $${directory:sshkeys}/requests/ -keys = $${directory:sshkeys}/keys/ - -[sshkeys-authority] -recipe = slapos.cookbook:sshkeys_authority -request-directory = $${sshkeys-directory:requests} -keys-directory = $${sshkeys-directory:keys} -wrapper = $${basedirectory:services}/sshkeys_authority -keygen-binary = ${dropbear:location}/bin/dropbearkey - -[sshkeys-dropbear] -<= sshkeys-authority -recipe = slapos.cookbook:sshkeys_authority.request -name = dropbear -type = rsa -executable = $${dropbear-server:wrapper} -public-key = $${dropbear-server:rsa-keyfile}.pub -private-key = $${dropbear-server:rsa-keyfile} -wrapper = $${basedirectory:services}/sshd - -[dropbear-server] -recipe = slapos.cookbook:dropbear -host = $${slap-network-information:global-ipv6} -port = 2222 -home = $${directory:ssh} -wrapper = $${rootdirectory:bin}/raw_sshd -shell = $${rdiff-backup-server:wrapper} -rsa-keyfile = $${directory:ssh}/server_key.rsa -dropbear-binary = ${dropbear:location}/sbin/dropbear - -[dropbear-server-pbs-authorized-key] -<= dropbear-server -recipe = slapos.cookbook:dropbear.add_authorized_key -key = $${slap-parameter:authorized-key} - -[rdiff-backup-server] -recipe = slapos.cookbook:pbs -client = false -path = $${directory:htdocs} -wrapper = $${rootdirectory:bin}/rdiffbackup-server -rdiffbackup-binary = ${buildout:bin-directory}/rdiff-backup - -[logrotate] -recipe = slapos.cookbook:logrotate -# Binaries -logrotate-binary = ${logrotate:location}/usr/sbin/logrotate -gzip-binary = ${gzip:location}/bin/gzip -gunzip-binary = ${gzip:location}/bin/gunzip -# Directories -wrapper = $${rootdirectory:bin}/logrotate -conf = $${rootdirectory:etc}/logrotate.conf -logrotate-entries = $${directory:logrotate-entries} -backup = $${directory:logrotate-backup} -state-file = $${rootdirectory:srv}/logrotate.status - -[logrotate-entry-apache] -<= logrotate -recipe = slapos.cookbook:logrotate.d -name = apache -log = $${apache-proxy:error-log} $${apache-proxy:access-log} -frequency = daily -rotate-num = 30 -sharedscripts = true -notifempty = true -create = true - -[cron] -recipe = slapos.cookbook:cron -dcrond-binary = ${dcron:location}/sbin/crond -cron-entries = $${directory:cron-entries} -crontabs = $${directory:crontabs} -cronstamps = $${directory:cronstamps} -catcher = $${cron-simplelogger:wrapper} -binary = $${basedirectory:services}/crond - -[cron-simplelogger] -recipe = slapos.cookbook:simplelogger -wrapper = $${rootdirectory:bin}/cron_simplelogger -log = $${basedirectory:log}/crond.log - -[cron-entry-logrotate] -<= cron -recipe = slapos.cookbook:cron.d -name = logrotate -frequency = 0 0 * * * -command = $${logrotate:wrapper} - -[rootdirectory] -recipe = slapos.cookbook:mkdirectory -etc = $${buildout:directory}/etc/ -var = $${buildout:directory}/var/ -srv = $${buildout:directory}/srv/ -bin = $${buildout:directory}/bin/ -tmp = $${buildout:directory}/tmp/ - -[basedirectory] -recipe = slapos.cookbook:mkdirectory -log = $${rootdirectory:var}/log/ -services = $${rootdirectory:etc}/run/ -run = $${rootdirectory:var}/run/ -backup = $${rootdirectory:srv}/backup/ -promises = $${rootdirectory:etc}/promise/ - -[directory] -recipe = slapos.cookbook:mkdirectory -htdocs = $${rootdirectory:srv}/www/ -logrotate-entries = $${rootdirectory:etc}/logrotate.d/ -logrotate-backup = $${basedirectory:backup}/logrotate/ -cronstamps = $${rootdirectory:etc}/cronstamps/ -cron-entries = $${rootdirectory:etc}/cron.d/ -crontabs = $${rootdirectory:etc}/crontabs/ -ssh = $${rootdirectory:etc}/ssh/ -sshkeys = $${rootdirectory:srv}/sshkeys -httpd-log = $${basedirectory:log}/apache/ diff --git a/stack/lamp/instance-apache-php.cfg b/stack/lamp/instance-apache-php.cfg deleted file mode 100644 index 77e266f21..000000000 --- a/stack/lamp/instance-apache-php.cfg +++ /dev/null @@ -1,191 +0,0 @@ -[buildout] - -parts = - url - request-mariadb - apache-php - stunnel - certificate-authority - ca-stunnel - logrotate - logrotate-entry-apache - logrotate-entry-stunnel - cron - cron-entry-logrotate - -eggs-directory = ${buildout:eggs-directory} -develop-eggs-directory = ${buildout:develop-eggs-directory} -offline = true - -[url] -recipe = slapos.cookbook:publishurl -url = http://[$${apache-php:ip}]:$${apache-php:port}/ - -[mariadb-urlparse] -recipe = slapos.cookbook:urlparse -url = $${request-mariadb:connection-url} - -[apache-php] -recipe = slapos.cookbook:apachephp -source = ${application:location} -template = ${application-template:location}/${application-template:filename} -configuration = ${application-configuration:location} - -htdocs = $${directory:htdocs} -pid-file = $${basedirectory:run}/apache.pid -lock-file = $${basedirectory:run}/apache.lock -ip = $${slap-network-information:global-ipv6} -port = 8080 -error-log = $${directory:httpd-log}/error.log -access-log = $${directory:httpd-log}/access.log -php-ini-dir = $${directory:php-ini-dir} -tmp-dir = $${directory:tmp-php} -httpd-conf = $${rootdirectory:etc}/apache.conf -wrapper = $${basedirectory:services}/apache - -promise = $${basedirectory:promises}/apache - -httpd-binary = ${apache:location}/bin/httpd - -mysql-username = $${mariadb-urlparse:username} -mysql-password = $${mariadb-urlparse:password} -mysql-database = $${mariadb-urlparse:path} -mysql-host = $${stunnel:local-host} -mysql-port = $${stunnel:local-port} - -[certificate-authority] -recipe = slapos.cookbook:certificate_authority -openssl-binary = ${openssl:location}/bin/openssl -ca-dir = $${directory:ca-dir} -requests-directory = $${cadirectory:requests} -wrapper = $${basedirectory:services}/ca -ca-private = $${cadirectory:private} -ca-certs = $${cadirectory:certs} -ca-newcerts = $${cadirectory:newcerts} -ca-crl = $${cadirectory:crl} - -[cadirectory] -recipe = slapos.cookbook:mkdirectory -requests = $${directory:ca-dir}/requests/ -private = $${directory:ca-dir}/private/ -certs = $${directory:ca-dir}/certs/ -newcerts = $${directory:ca-dir}/newcerts/ -crl = $${directory:ca-dir}/crl/ - -[ca-stunnel] -<= certificate-authority -recipe = slapos.cookbook:certificate_authority.request -executable = $${stunnel:wrapper} -wrapper = $${basedirectory:services}/stunnel -key-file = $${stunnel:key-file} -cert-file = $${stunnel:cert-file} - -[stunnel] -recipe = slapos.cookbook:stunnel -client = true -stunnel-binary = ${stunnel:location}/bin/stunnel -remote-host = $${mariadb-urlparse:host} -remote-port = $${mariadb-urlparse:port} -local-host = $${slap-network-information:local-ipv4} -local-port = 3306 -log-file = $${basedirectory:log}/stunnel.log -config-file = $${directory:stunnel-conf}/stunnel.conf -key-file = $${directory:stunnel-conf}/stunnel.key -cert-file = $${directory:stunnel-conf}/stunnel.crt -pid-file = $${basedirectory:run}/stunnel.pid -wrapper = $${rootdirectory:bin}/raw_stunnel -post-rotate-script = $${rootdirectory:bin}/stunnel_post_rotate - -[request-mariadb] -<= slap-connection -recipe = slapos.cookbook:request -name = MariaDB -software-url = $${slap-connection:software-release-url} -software-type = mariadb -return = url - -[logrotate] -recipe = slapos.cookbook:logrotate -# Binaries -logrotate-binary = ${logrotate:location}/usr/sbin/logrotate -gzip-binary = ${gzip:location}/bin/gzip -gunzip-binary = ${gzip:location}/bin/gunzip -# Directories -wrapper = $${rootdirectory:bin}/logrotate -conf = $${rootdirectory:etc}/logrotate.conf -logrotate-entries = $${directory:logrotate-entries} -backup = $${directory:logrotate-backup} -state-file = $${rootdirectory:srv}/logrotate.status - -[logrotate-entry-apache] -<= logrotate -recipe = slapos.cookbook:logrotate.d -name = apache -log = $${apache-php:error-log} $${apache-php:access-log} -frequency = daily -rotate-num = 30 -sharedscripts = true -notifempty = true -create = true - -[logrotate-entry-stunnel] -<= logrotate -recipe = slapos.cookbook:logrotate.d -name = stunnel -log = $${stunnel:log-file} -frequency = daily -rotate-num = 30 -notifempty = true -create = true -post = $${stunnel:post-rotate-script} - -[cron] -recipe = slapos.cookbook:cron -dcrond-binary = ${dcron:location}/sbin/crond -cron-entries = $${directory:cron-entries} -crontabs = $${directory:crontabs} -cronstamps = $${directory:cronstamps} -catcher = $${cron-simplelogger:wrapper} -binary = $${basedirectory:services}/crond - -[cron-simplelogger] -recipe = slapos.cookbook:simplelogger -wrapper = $${rootdirectory:bin}/cron_simplelogger -log = $${basedirectory:log}/crond.log - -[cron-entry-logrotate] -<= cron -recipe = slapos.cookbook:cron.d -name = logrotate -frequency = 0 0 * * * -command = $${logrotate:wrapper} - -[rootdirectory] -recipe = slapos.cookbook:mkdirectory -etc = $${buildout:directory}/etc/ -var = $${buildout:directory}/var/ -srv = $${buildout:directory}/srv/ -bin = $${buildout:directory}/bin/ -tmp = $${buildout:directory}/tmp/ - -[basedirectory] -recipe = slapos.cookbook:mkdirectory -log = $${rootdirectory:var}/log/ -services = $${rootdirectory:etc}/run/ -run = $${rootdirectory:var}/run/ -backup = $${rootdirectory:srv}/backup/ -promises = $${rootdirectory:etc}/promise/ - -[directory] -recipe = slapos.cookbook:mkdirectory -ca-dir = $${rootdirectory:srv}/ssl/ -htdocs = $${rootdirectory:srv}/www/ -httpd-log = $${basedirectory:log}/apache/ -php-ini-dir = $${rootdirectory:etc}/php/ -tmp-php = $${rootdirectory:tmp}/php/ -logrotate-entries = $${rootdirectory:etc}/logrotate.d/ -logrotate-backup = $${basedirectory:backup}/logrotate/ -stunnel-conf = $${rootdirectory:etc}/stunnel/ -cronstamps = $${rootdirectory:etc}/cronstamps/ -cron-entries = $${rootdirectory:etc}/cron.d/ -crontabs = $${rootdirectory:etc}/crontabs/ diff --git a/stack/lamp/instance-backuped.cfg b/stack/lamp/instance-backuped.cfg deleted file mode 100644 index e31b36e05..000000000 --- a/stack/lamp/instance-backuped.cfg +++ /dev/null @@ -1,174 +0,0 @@ -[buildout] - -extends = - ${template-apache-php:output} - -parts = - request-mariadb - request-mariadb-pseudo-replicating - request-apache-backup - request-pull-backup-server - request-pull-backup-server-mariadb - request-pull-backup-server-mariadb-backup - request-pull-backup-server-apache - request-pull-backup-server-apache-backup - url - apache-php - stunnel - certificate-authority - ca-stunnel - logrotate - logrotate-entry-apache - logrotate-entry-stunnel - cron - cron-entry-logrotate - dropbear-server - sshkeys-authority - dropbear-server-pbs-authorized-key - -[sshkeys-directory] -recipe = slapos.cookbook:mkdirectory -requests = $${directory:sshkeys}/requests/ -keys = $${directory:sshkeys}/keys/ - -[sshkeys-authority] -recipe = slapos.cookbook:sshkeys_authority -request-directory = $${sshkeys-directory:requests} -keys-directory = $${sshkeys-directory:keys} -wrapper = $${basedirectory:services}/sshkeys_authority -keygen-binary = ${dropbear:location}/bin/dropbearkey - -[sshkeys-dropbear] -<= sshkeys-authority -recipe = slapos.cookbook:sshkeys_authority.request -name = dropbear -type = rsa -executable = $${dropbear-server:wrapper} -public-key = $${dropbear-server:rsa-keyfile}.pub -private-key = $${dropbear-server:rsa-keyfile} -wrapper = $${basedirectory:services}/sshd - -[dropbear-server] -recipe = slapos.cookbook:dropbear -host = $${slap-network-information:global-ipv6} -port = 2222 -home = $${directory:ssh} -wrapper = $${rootdirectory:bin}/raw_sshd -shell = $${rdiff-backup-server:wrapper} -rsa-keyfile = $${directory:ssh}/server_key.rsa -dropbear-binary = ${dropbear:location}/sbin/dropbear - -[dropbear-server-pbs-authorized-key] -<= dropbear-server -recipe = slapos.cookbook:dropbear.add_authorized_key -key = $${request-pull-backup-server:connection-ssh-key} - -[rdiff-backup-server] -recipe = slapos.cookbook:pbs -client = false -path = $${directory:htdocs} -wrapper = $${rootdirectory:bin}/rdiffbackup-server -rdiffbackup-binary = ${buildout:bin-directory}/rdiff-backup - -[request-pull-backup-server] -<= slap-connection -recipe = slapos.cookbook:request -name = PBS (Pull Backup Server) -software-url = $${slap-connection:software-release-url} -software-type = pull-backup -return = ssh-key notification-url feeds-url -slave = false - -[request-mariadb] -software-type = mariadb-pbsready-export -config = authorized-key notify -config-authorized-key = $${request-pull-backup-server:connection-ssh-key} -config-notify = $${request-pull-backup-server:connection-notification-url} -return = url ssh-public-key ssh-url notification-id - -[request-mariadb-pseudo-replicating] -<= slap-connection -recipe = slapos.cookbook:request -name = MariaDB Backup -software-url = $${slap-connection:software-release-url} -software-type = mariadb-pbsready-import -return = url ssh-public-key ssh-url notification-url -config = authorized-key on-notification -config-authorized-key = $${request-pull-backup-server:connection-ssh-key} -pbs-notification-id = $${slap-connection:computer-id}-$${slap-connection:partition-id}-mariadb-push -config-on-notification = $${request-pull-backup-server:connection-feeds-url}$${:pbs-notification-id} - -[request-apache-backup] -<= slap-connection -recipe = slapos.cookbook:request -name = Apache Backup -software-url = $${slap-connection:software-release-url} -software-type = apache-backup -return = url ssh-url ssh-public-key -config = authorized-key proxy-url -config-authorized-key = $${request-pull-backup-server:connection-ssh-key} -config-proxy-url = $${url:url} - -[request-pull-backup-server-apache] -<= request-pull-backup-server - slap-connection -recipe = slapos.cookbook:request -name = PBS pulling from Apache -software-url = $${slap-connection:software-release-url} -config = url name type server-key notify notification-id frequency -config-url = ssh://nobody@[$${dropbear-server:host}]:$${dropbear-server:port}/$${rdiff-backup-server:path} -config-name = $${slap-connection:computer-id}-$${slap-connection:partition-id}-apache -config-type = pull -config-server-key = $${sshkeys-dropbear:public-key-value} -config-notify = $${request-pull-backup-server:connection-notification-url} -config-notification-id = $${slap-connection:computer-id}-$${slap-connection:partition-id}-apache-pull -config-frequency = 30 * * * * -slave = true - -[request-pull-backup-server-apache-backup] -<= request-pull-backup-server - slap-connection -recipe = slapos.cookbook:request -name = PBS pushing to $${request-apache-backup:name} -software-url = $${slap-connection:software-release-url} -config = url name type server-key on-notification -config-url = $${request-apache-backup:connection-ssh-url} -config-name = $${request-pull-backup-server-apache:config-name} -config-type = push -config-server-key = $${request-apache-backup:connection-ssh-public-key} -config-on-notification = $${request-pull-backup-server:connection-feeds-url}$${request-pull-backup-server-apache:config-notification-id} -slave = true - -[request-pull-backup-server-mariadb] -<= request-pull-backup-server - slap-connection -name = PBS pulling from $${request-mariadb:name} -config = url name type server-key on-notification notify notification-id title -config-url = $${request-mariadb:connection-ssh-url} -config-name = $${slap-connection:computer-id}-$${slap-connection:partition-id}-mariadb -config-type = pull -config-server-key = $${request-mariadb:connection-ssh-public-key} -config-on-notification = $${request-mariadb:connection-notification-id} -config-notify = $${request-pull-backup-server:connection-notification-url} -config-notification-id = $${slap-connection:computer-id}-$${slap-connection:partition-id}-mariadb-pull -config-title = Pulling from MariaDB -slave = true - -[request-pull-backup-server-mariadb-backup] -<= request-pull-backup-server - slap-connection -name = PBS pushing on $${request-mariadb-pseudo-replicating:name} -config = url name type server-key on-notification notify notification-id title -config-url = $${request-mariadb-pseudo-replicating:connection-ssh-url} -config-name = $${request-pull-backup-server-mariadb:config-name} -config-type = push -config-server-key = $${request-mariadb-pseudo-replicating:connection-ssh-public-key} -config-on-notification = $${request-pull-backup-server:connection-feeds-url}$${request-pull-backup-server-mariadb:config-notification-id} -config-notify = $${request-mariadb-pseudo-replicating:connection-notification-url} -config-notification-id = $${request-mariadb-pseudo-replicating:pbs-notification-id} -config-title = Pushing to MariaDB backup -slave = true - -[directory] -ssh = $${rootdirectory:etc}/ssh/ -sshkeys = $${rootdirectory:srv}/sshkeys diff --git a/stack/lamp/instance-mariadb-pbsready-export.cfg b/stack/lamp/instance-mariadb-pbsready-export.cfg deleted file mode 100644 index 95a8e674b..000000000 --- a/stack/lamp/instance-mariadb-pbsready-export.cfg +++ /dev/null @@ -1,33 +0,0 @@ -[buildout] -extends = ${template-mariadb-pbsready:output} - -parts += cron-entry-mariadb-backup - -[urls] -notification-id = http://[$${notifier:host}]:$${notifier:port}/get/$${notifier-mydumper:name} - -[mydumper] -recipe = slapos.cookbook:mydumper -wrapper = $${rootdirectory:bin}/raw_mydumper -backup-directory = $${directory:mariadb-backup} -socket = $${mariadb:socket} -user = root -mydumper-binary = ${mydumper:location}/bin/mydumper -database = $${mariadb:database} -import = false - -[notifier-mydumper] -<= notifier -recipe = slapos.cookbook:notifier.notify -name = mydumper -title = Dumping MariaDB Database -executable = $${mydumper:wrapper} -wrapper = $${rootdirectory:bin}/mydumper -notify = $${slap-parameter:notify} - -[cron-entry-mariadb-backup] -<= cron -recipe = slapos.cookbook:cron.d -name = backup -frequency = 0 * * * * -command = $${notifier-mydumper:wrapper} diff --git a/stack/lamp/instance-mariadb-pbsready-import.cfg b/stack/lamp/instance-mariadb-pbsready-import.cfg deleted file mode 100644 index 90906f63b..000000000 --- a/stack/lamp/instance-mariadb-pbsready-import.cfg +++ /dev/null @@ -1,24 +0,0 @@ -[buildout] - -extends = ${template-mariadb-pbsready:output} - -parts += mariadb-import-on-notification - -[urls] -notification-url = http://[$${notifier:host}]:$${notifier:port}/notify - -[mydumper-import] -recipe = slapos.cookbook:mydumper -wrapper = $${rootdirectory:bin}/myloader -backup-directory = $${directory:mariadb-backup} -socket = $${mariadb:socket} -user = root -myloader-binary = ${mydumper:location}/bin/myloader -database = $${mariadb:database} -import = true - -[mariadb-import-on-notification] -<= notifier -recipe = slapos.cookbook:notifier.callback -on-notification-id = $${slap-parameter:on-notification} -callback = $${mydumper-import:wrapper} diff --git a/stack/lamp/instance-mariadb-pbsready.cfg b/stack/lamp/instance-mariadb-pbsready.cfg deleted file mode 100644 index 1a2eeea74..000000000 --- a/stack/lamp/instance-mariadb-pbsready.cfg +++ /dev/null @@ -1,110 +0,0 @@ -[buildout] - -extends = ${template-mariadb:output} - -parts = - urls - mariadb - stunnel - certificate-authority - ca-stunnel - logrotate - logrotate-entry-mariadb - logrotate-entry-stunnel - logrotate-entry-cron - logrotate-entry-equeue - cron - cron-entry-logrotate - sshkeys-authority - dropbear-server - sshkeys-dropbear - dropbear-server-pbs-authorized-key - notifier - -[urls] -ssh-public-key = $${sshkeys-dropbear:public-key-value} -ssh-url = ssh://nobody@[$${dropbear-server:host}]:$${dropbear-server:port}/$${rdiff-backup-server:path} - -[sshkeys-directory] -recipe = slapos.cookbook:mkdirectory -requests = $${directory:sshkeys}/requests/ -keys = $${directory:sshkeys}/keys/ - -[sshkeys-authority] -recipe = slapos.cookbook:sshkeys_authority -request-directory = $${sshkeys-directory:requests} -keys-directory = $${sshkeys-directory:keys} -wrapper = $${basedirectory:services}/sshkeys_authority -keygen-binary = ${dropbear:location}/bin/dropbearkey - -[sshkeys-dropbear] -<= sshkeys-authority -recipe = slapos.cookbook:sshkeys_authority.request -name = dropbear -type = rsa -executable = $${dropbear-server:wrapper} -public-key = $${dropbear-server:rsa-keyfile}.pub -private-key = $${dropbear-server:rsa-keyfile} -wrapper = $${basedirectory:services}/sshd - -[dropbear-server] -recipe = slapos.cookbook:dropbear -host = $${slap-network-information:global-ipv6} -port = 2222 -home = $${directory:ssh} -wrapper = $${rootdirectory:bin}/raw_sshd -shell = $${rdiff-backup-server:wrapper} -rsa-keyfile = $${directory:ssh}/server_key.rsa -dropbear-binary = ${dropbear:location}/sbin/dropbear - -[dropbear-server-pbs-authorized-key] -<= dropbear-server -recipe = slapos.cookbook:dropbear.add_authorized_key -key = $${slap-parameter:authorized-key} - -[rdiff-backup-server] -recipe = slapos.cookbook:pbs -client = false -path = $${directory:mariadb-backup} -wrapper = $${rootdirectory:bin}/rdiffbackup-server -rdiffbackup-binary = ${buildout:bin-directory}/rdiff-backup - -[logrotate-entry-equeue] -<= logrotate -recipe = slapos.cookbook:logrotate.d -name = equeue -log = $${equeue:log} -frequency = daily -rotate-num = 30 - -[equeue] -recipe = slapos.cookbook:equeue -socket = $${basedirectory:run}/equeue.sock -log = $${basedirectory:log}/equeue.log -database = $${rootdirectory:srv}/equeue.db -wrapper = $${basedirectory:services}/equeue -equeue-binary = ${buildout:bin-directory}/equeue - -[notifier] -recipe = slapos.cookbook:notifier -feeds = $${directory:notifier-feeds} -callbacks = $${directory:notifier-callbacks} -id-file = $${rootdirectory:etc}/notifier.id -equeue-socket = $${equeue:socket} -host = $${slap-network-information:global-ipv6} -port = 8080 -wrapper = $${basedirectory:services}/notifier -server-binary = ${buildout:bin-directory}/pubsubserver -notifier-binary = ${buildout:bin-directory}/pubsubnotifier - - -[basedirectory] -cache = $${rootdirectory:var}/cache/ -notifier = $${rootdirectory:etc}/notifier/ - -[directory] -mariadb-backup = $${basedirectory:backup}/mariadb/ -ssh = $${rootdirectory:etc}/ssh/ -sshkeys = $${rootdirectory:srv}/sshkeys -notifier-feeds = $${basedirectory:notifier}/feeds/ -notifier-callbacks = $${basedirectory:notifier}/callbacks/ diff --git a/stack/lamp/instance-mariadb.cfg b/stack/lamp/instance-mariadb.cfg deleted file mode 100644 index 6c4a8f0fb..000000000 --- a/stack/lamp/instance-mariadb.cfg +++ /dev/null @@ -1,187 +0,0 @@ -[buildout] -parts = - urls - mariadb - stunnel - certificate-authority - ca-stunnel - logrotate - logrotate-entry-mariadb - logrotate-entry-stunnel - logrotate-entry-cron - cron - cron-entry-logrotate - -gzip-binary = ${gzip:location}/bin/gzip - -eggs-directory = ${buildout:eggs-directory} -develop-eggs-directory = ${buildout:develop-eggs-directory} -offline = true - -[urls] -recipe = slapos.cookbook:publish -url = mysqls://$${mariadb:user}:$${mariadb:password}@[$${stunnel:remote-host}]:$${stunnel:remote-port}/$${mariadb:database} - -[mariadb] -recipe = slapos.cookbook:mysql - -# Options -recovering = false -user = user -port = 3306 -ip = $${slap-network-information:local-ipv4} -database = db - -# Paths -wrapper = $${basedirectory:services}/mariadb -update-wrapper = $${basedirectory:services}/mariadb_update -logrotate-post = $${rootdirectory:bin}/mariadb_post_logrotate -data-directory = $${directory:mariadb-data} -pid-file = $${basedirectory:run}/mariadb.pid -socket = $${basedirectory:run}/mariadb.sock -error-log = $${basedirectory:log}/mariadb_error.log -conf-file = $${rootdirectory:etc}/mariadb.cnf -promise = $${basedirectory:promises}/mysql - -# Binary information -mysql-binary = ${mariadb:location}/bin/mysql -mysql-install-binary = ${mariadb:location}/bin/mysql_install_db -mysql-upgrade-binary = ${mariadb:location}/bin/mysql_upgrade -mysqld-binary = ${mariadb:location}/libexec/mysqld - - -[certificate-authority] -recipe = slapos.cookbook:certificate_authority -openssl-binary = ${openssl:location}/bin/openssl -ca-dir = $${directory:ca-dir} -requests-directory = $${cadirectory:requests} -wrapper = $${basedirectory:services}/ca -ca-private = $${cadirectory:private} -ca-certs = $${cadirectory:certs} -ca-newcerts = $${cadirectory:newcerts} -ca-crl = $${cadirectory:crl} - -[cadirectory] -recipe = slapos.cookbook:mkdirectory -requests = $${directory:ca-dir}/requests/ -private = $${directory:ca-dir}/private/ -certs = $${directory:ca-dir}/certs/ -newcerts = $${directory:ca-dir}/newcerts/ -crl = $${directory:ca-dir}/crl/ - -[ca-stunnel] -<= certificate-authority -recipe = slapos.cookbook:certificate_authority.request -executable = $${stunnel:wrapper} -wrapper = $${basedirectory:services}/stunnel -key-file = $${stunnel:key-file} -cert-file = $${stunnel:cert-file} - -[stunnel] -recipe = slapos.cookbook:stunnel -stunnel-binary = ${stunnel:location}/bin/stunnel -wrapper = $${rootdirectory:bin}/stunnel -log-file = $${basedirectory:log}/stunnel.log -config-file = $${directory:stunnel-conf}/stunnel.conf -key-file = $${directory:stunnel-conf}/stunnel.key -cert-file = $${directory:stunnel-conf}/stunnel.crt -pid-file = $${basedirectory:run}/stunnel.pid -local-host = $${mariadb:ip} -local-port = $${mariadb:port} -remote-host = $${slap-network-information:global-ipv6} -remote-port = 6446 -client = false -post-rotate-script = $${rootdirectory:bin}/stunnel_post_rotate - -[logrotate] -recipe = slapos.cookbook:logrotate -# Binaries -logrotate-binary = ${logrotate:location}/usr/sbin/logrotate -gzip-binary = $${buildout:gzip-binary} -gunzip-binary = ${gzip:location}/bin/gunzip -# Directories -wrapper = $${rootdirectory:bin}/logrotate -conf = $${rootdirectory:etc}/logrotate.conf -logrotate-entries = $${directory:logrotate-entries} -backup = $${directory:logrotate-backup} -state-file = $${rootdirectory:srv}/logrotate.status - -[logrotate-entry-mariadb] -<= logrotate -recipe = slapos.cookbook:logrotate.d -name = mariadb -log = $${mariadb:error-log} -frequency = daily -rotate-num = 30 -post = $${mariadb:logrotate-post} -sharedscripts = true -notifempty = true -create = true - -[logrotate-entry-stunnel] -<= logrotate -recipe = slapos.cookbook:logrotate.d -name = stunnel -log = $${stunnel:log-file} -frequency = daily -rotate-num = 30 -notifempty = true -create = true -post = $${stunnel:post-rotate-script} - -[logrotate-entry-cron] -<= logrotate -recipe =slapos.cookbook:logrotate.d -name = crond -log = $${cron-simplelogger:log} -frequency = daily -rotate-num = 30 -notifempty = true -create = true - -[cron] -recipe = slapos.cookbook:cron -dcrond-binary = ${dcron:location}/sbin/crond -cron-entries = $${directory:cron-entries} -crontabs = $${directory:crontabs} -cronstamps = $${directory:cronstamps} -catcher = $${cron-simplelogger:wrapper} -binary = $${basedirectory:services}/crond - -[cron-simplelogger] -recipe = slapos.cookbook:simplelogger -wrapper = $${rootdirectory:bin}/cron_simplelogger -log = $${basedirectory:log}/crond.log - -[cron-entry-logrotate] -<= cron -recipe = slapos.cookbook:cron.d -name = logrotate -frequency = 0 0 * * * -command = $${logrotate:wrapper} - -[rootdirectory] -recipe = slapos.cookbook:mkdirectory -etc = $${buildout:directory}/etc/ -var = $${buildout:directory}/var/ -srv = $${buildout:directory}/srv/ -bin = $${buildout:directory}/bin/ - -[basedirectory] -recipe = slapos.cookbook:mkdirectory -log = $${rootdirectory:var}/log/ -services = $${rootdirectory:etc}/run/ -run = $${rootdirectory:var}/run/ -backup = $${rootdirectory:srv}/backup/ -promises = $${rootdirectory:etc}/promise/ - -[directory] -recipe = slapos.cookbook:mkdirectory -cron-entries = $${rootdirectory:etc}/cron.d/ -crontabs = $${rootdirectory:etc}/crontabs/ -cronstamps = $${rootdirectory:etc}/cronstamps/ -ca-dir = $${rootdirectory:srv}/ssl/ -mariadb-data = $${rootdirectory:srv}/mariadb/ -logrotate-backup = $${basedirectory:backup}/logrotate/ -stunnel-conf = $${rootdirectory:etc}/stunnel/ -logrotate-entries = $${rootdirectory:etc}/logrotate.d/ diff --git a/stack/lamp/instance-pull-backup.cfg b/stack/lamp/instance-pull-backup.cfg deleted file mode 100644 index 558f976ae..000000000 --- a/stack/lamp/instance-pull-backup.cfg +++ /dev/null @@ -1,172 +0,0 @@ -[buildout] - -parts = - connection-dict - pbs - cron - cron-entry-logrotate - logrotate - sshkeys-authority - sshkeys-dropbear - -eggs-directory = ${buildout:eggs-directory} -develop-eggs-directory = ${buildout:develop-eggs-directory} -offline = true - -[connection-dict] -recipe = slapos.cookbook:publish -ssh-key = $${sshkeys-dropbear:public-key-value} -notification-url = http://[$${notifier:host}]:$${notifier:port}/notify -feeds-url = http://[$${notifier:host}]:$${notifier:port}/get/ - -[equeue] -recipe = slapos.cookbook:equeue -socket = $${basedirectory:run}/equeue.sock -log = $${basedirectory:log}/equeue.log -database = $${rootdirectory:srv}/equeue.db -wrapper = $${basedirectory:services}/equeue -equeue-binary = ${buildout:bin-directory}/equeue - -[notifier] -recipe = slapos.cookbook:notifier -feeds = $${directory:notifier-feeds} -callbacks = $${directory:notifier-callbacks} -id-file = $${rootdirectory:etc}/notifier.id -equeue-socket = $${equeue:socket} -host = $${slap-network-information:global-ipv6} -port = 8080 -wrapper = $${basedirectory:services}/notifier -server-binary = ${buildout:bin-directory}/pubsubserver -notifier-binary = ${buildout:bin-directory}/pubsubnotifier - -[dropbear-client] -recipe = slapos.cookbook:dropbear.client -dbclient-binary = ${dropbear:location}/bin/dbclient -wrapper = $${rootdirectory:bin}/ssh -home = $${basedirectory:ssh-home} -identity-file = $${basedirectory:ssh-home}/id_rsa - -[sshkeys-directory] -recipe = slapos.cookbook:mkdirectory -requests = $${directory:sshkeys}/requests/ -keys = $${directory:sshkeys}/keys/ - -[sshkeys-authority] -recipe = slapos.cookbook:sshkeys_authority -request-directory = $${sshkeys-directory:requests} -keys-directory = $${sshkeys-directory:keys} -keygen-binary = ${dropbear:location}/bin/dropbearkey -wrapper = $${basedirectory:services}/sshkeys_authority - -[sshkeys-dropbear] -<= sshkeys-authority -recipe = slapos.cookbook:sshkeys_authority.request -name = pbs -type = rsa -executable = $${dropbear-client:wrapper} -public-key = $${dropbear-client:identity-file}.pub -private-key = $${dropbear-client:identity-file} -wrapper = $${rootdirectory:bin}/do_backup - -[pbs] -<= notifier -recipe = slapos.cookbook:pbs -client = true -rdiffbackup-binary = ${buildout:bin-directory}/rdiff-backup -sshclient-binary = $${dropbear-client:wrapper} -known-hosts = $${directory:dot-ssh}/known_hosts -promises-directory = $${basedirectory:promises} -directory = $${directory:pbs-backup} -cron-entries = $${cron:cron-entries} -wrappers-directory = $${directory:pbs-wrappers} -notifier-url = http://[$${notifier:host}]:$${notifier:port}/ -slave-instance-list = $${slap-parameter:slave_instance_list} - -[cron-simplelogger] -recipe = slapos.cookbook:simplelogger -wrapper = $${rootdirectory:bin}/cron_simplelogger -log = $${basedirectory:log}/crond.log - -[cron] -recipe = slapos.cookbook:cron -dcrond-binary = ${dcron:location}/sbin/crond -cron-entries = $${directory:cron-entries} -crontabs = $${directory:crontabs} -cronstamps = $${directory:cronstamps} -catcher = $${cron-simplelogger:wrapper} -binary = $${basedirectory:services}/crond - -[cron-entry-logrotate] -<= cron -recipe = slapos.cookbook:cron.d -name = logrotate -frequency = 0 0 * * * -command = $${logrotate:wrapper} - -[logrotate] -recipe = slapos.cookbook:logrotate -# Binaries -logrotate-binary = ${logrotate:location}/sbin/logrotate -gzip-binary = ${gzip:location}/bin/gzip -gunzip-binary = ${gzip:location}/bin/gunzip -# Directories -wrapper = $${rootdirectory:bin}/logrotate -conf = $${rootdirectory:etc}/logrotate.conf -logrotate-entries = $${directory:logrotate-entries} -backup = $${directory:logrotate-backup} -state-file = $${rootdirectory:srv}/logrotate.status - -[logrotate-entry-equeue] -<= logrotate -recipe = slapos.cookbook:logrotate.d -name = equeue -log = $${equeue:log} -frequency = daily -rotate-num = 30 - -[logrotate-entry-equeue] -<= logrotate -recipe = slapos.cookbook:logrotate.d -name = cron -log = $${cron-simplelogger:log} -frequency = daily -rotate-num = 30 - - -[rootdirectory] -recipe = slapos.cookbook:mkdirectory -etc = $${buildout:directory}/etc/ -var = $${buildout:directory}/var/ -srv = $${buildout:directory}/srv/ -bin = $${buildout:directory}/bin/ -tmp = $${buildout:directory}/tmp/ - -[basedirectory] -recipe = slapos.cookbook:mkdirectory -log = $${rootdirectory:var}/log/ -services = $${rootdirectory:etc}/run/ -run = $${rootdirectory:var}/run/ -backup = $${rootdirectory:srv}/backup/ -promises = $${rootdirectory:etc}/promise/ - -[directory] -recipe = slapos.cookbook:mkdirectory -cronstamps = $${rootdirectory:etc}/cronstamps/ -cron-entries = $${rootdirectory:etc}/cron.d/ -crontabs = $${rootdirectory:etc}/crontabs/ -cronoutput = $${basedirectory:log}/cron-ouput/ -pbs-backup = $${basedirectory:backup}/pbs/ -logrotate-entries = $${rootdirectory:etc}/logrotate.d/ -logrotate-backup = $${basedirectory:backup}/logrotate/ -sshkeys = $${rootdirectory:srv}/sshkeys -pbs-wrappers = $${rootdirectory:bin}/pbs/ -dot-ssh = $${basedirectory:ssh-home}/.ssh/ -notifier-feeds = $${basedirectory:notifier}/feeds/ -notifier-callbacks = $${basedirectory:notifier}/callbacks/ - -[basedirectory] -ssh-home = $${rootdirectory:home}/ssh -notifier = $${rootdirectory:etc}/notifier/ - -[rootdirectory] -home = $${buildout:directory}/home/ diff --git a/stack/lamp/instance.cfg b/stack/lamp/instance.cfg deleted file mode 100644 index be6cc34ff..000000000 --- a/stack/lamp/instance.cfg +++ /dev/null @@ -1,17 +0,0 @@ -[buildout] -parts = - switch_softwaretype - -eggs-directory = ${buildout:eggs-directory} -develop-eggs-directory = ${buildout:develop-eggs-directory} -offline = true - -[switch_softwaretype] -recipe = slapos.cookbook:softwaretype -default = ${template-apache-php:output} -backuped = ${template-backuped:output} -mariadb = ${template-mariadb:output} -mariadb-pbsready-import = ${template-mariadb-pbsready-import:output} -mariadb-pbsready-export = ${template-mariadb-pbsready-export:output} -pull-backup = ${template-pull-backup:output} -apache-backup = ${template-apache-backup:output} diff --git a/stack/nbd.cfg b/stack/nbd.cfg index 5dde4b493..ba6b33bf7 100644 --- a/stack/nbd.cfg +++ b/stack/nbd.cfg @@ -37,8 +37,6 @@ version = 3 eggs = slapos.libnetworkcache [nbdserver] -# XXX-Cedric : use official tarball from kvm website -# (new kvm code does not seem to need special patch) recipe = hexagonit.recipe.cmmi path = ${nbdserversource:location}/ configure-options = @@ -64,7 +62,6 @@ module = nbdserver [eggs] recipe = zc.recipe.egg eggs = - ${lxml-python:egg} slapos.toolbox slapos.cookbook pyOpenSSL diff --git a/stack/sheepdogtestbed.cfg b/stack/sheepdogtestbed.cfg deleted file mode 100644 index 7a9a507b4..000000000 --- a/stack/sheepdogtestbed.cfg +++ /dev/null @@ -1,17 +0,0 @@ -[buildout] -extends = - ../component/lxml-python/buildout.cfg - ../component/sheepstrike/buildout.cfg - -parts = - eggs - sheepstrike - -[eggs] -recipe = zc.recipe.egg -eggs = - ${lxml-python:egg} - slapos.recipe.sheepdogtestbed - slapos.tool.nosqltester - slapos.tool.nosqltester_manager - slapos.tool.nosqltester_manager.sheepdog diff --git a/stack/slapos.cfg b/stack/slapos.cfg deleted file mode 100644 index 83267a377..000000000 --- a/stack/slapos.cfg +++ /dev/null @@ -1,40 +0,0 @@ -# This stack list all parameters used in every Software Release or other stack. -# Software Releases or Stacks can safely extend this stack. - -[buildout] -# Generate list of automatically chosen eggs version -extensions += - buildout-versions - -# Use shacache -extends = - shacache-client.cfg - -# Separate from site eggs -allowed-eggs-from-site-packages = -include-site-packages = false -exec-sitecustomize = false - -# Add location for modified non-official slapos.buildout -find-links += - http://www.nexedi.org/static/packages/source/slapos.buildout/ - -# Use only quite well working sites. -allow-hosts += - *.nexedi.org - *.python.org - *.sourceforge.net - alastairs-place.net - dist.repoze.org - effbot.org - github.com - peak.telecommunity.com - psutil.googlecode.com - www.dabeaz.com - www.owlfish.com - launchpad.net - -# XXX: Workaround of SlapOS limitation -# Unzippig of eggs is required, as SlapOS do not yet provide nicely working -# development / fast switching environment for whole software -unzip = true diff --git a/stack/tomcat.cfg b/stack/tomcat.cfg deleted file mode 100644 index ee714f3a3..000000000 --- a/stack/tomcat.cfg +++ /dev/null @@ -1,56 +0,0 @@ -[buildout] -extends = - ../component/lxml-python/buildout.cfg - ../component/java/buildout.cfg - ../component/mysql-5.1/buildout.cfg - ../component/python-2.7/buildout.cfg - ../stack/shacache-client.cfg - -find-links += - http://www.nexedi.org/static/packages/source/slapos.buildout/ - -# Use only quite well working sites. -allow-hosts = - *.nexedi.org - *.python.org - *.sourceforge.net - dist.repoze.org - effbot.org - github.com - peak.telecommunity.com - psutil.googlecode.com - www.dabeaz.com - -parts = - template - libxslt - eggs - instance-recipe-egg - tomcat - java - hsql - jdbc - mysql-5.1 - -[hsql] -recipe = hexagonit.recipe.download -url = http://hsqldb.org/support/hsqldb_16.zip -md5sum = 80db09c75053085dad198590daf0785c - -[jdbc] -recipe = hexagonit.recipe.download -url = http://download.softagency.net/mysql/Downloads/Connector-J/mysql-connector-java-5.1.17.zip -md5sum = 22e1aff6104bb9006f8744a02bf73124 - -[tomcat] -recipe = hexagonit.recipe.download -strip-top-level-dir = true -url = http://apache.multidist.com/tomcat/tomcat-6/v6.0.32/bin/apache-tomcat-6.0.32.zip -md5sum = 082a0707985b6c029920d4d6d5ec11cd - -[eggs] -recipe = zc.recipe.egg -python = python2.7 -eggs = - ${lxml-python:egg} - slapos.cookbook -- 2.30.9