From 0aa913291c1f2580904c7e4619c19dacba0c4148 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=C5=81ukasz=20Nowak?= <luke@nexedi.com>
Date: Fri, 2 Sep 2011 14:39:55 +0200
Subject: [PATCH] Drop M2Crypto and tweak -sr environment.

As slapos.libnetworkcache does not depend on M2Crypto anymore, but on
existence of openssl in PATH drop building of this library and just
tweak slapgrid-sr environment to allow find the openssl in PATH.
---
 component/slapos/buildout.cfg | 18 ++++++++++++------
 1 file changed, 12 insertions(+), 6 deletions(-)

diff --git a/component/slapos/buildout.cfg b/component/slapos/buildout.cfg
index aaaccbfe4..38909d1f8 100644
--- a/component/slapos/buildout.cfg
+++ b/component/slapos/buildout.cfg
@@ -9,7 +9,6 @@ extends =
   ../libxml2/buildout.cfg
   ../libxslt/buildout.cfg
   ../lxml-python/buildout.cfg
-  ../m2crypto/buildout.cfg
   ../m4/buildout.cfg
   ../ncurses/buildout.cfg
   ../openssl/buildout.cfg
@@ -25,6 +24,7 @@ parts =
   slapos
   cfg-environment
   sh-environment
+  slapos-slapgrid-sr
 
 find-links =
   http://www.nexedi.org/static/packages/source/slapos.buildout/
@@ -84,14 +84,10 @@ output = ${buildout:directory}/environment.sh
 [lxml-python]
 python = python2.7
 
-[M2Crypto]
-python = python2.7
-
 [slapos]
 recipe = z3c.recipe.scripts
 python = python2.7
 eggs =
-  ${M2Crypto:egg}
   slapos.libnetworkcache
   zc.buildout
   ${lxml-python:egg}
@@ -104,12 +100,22 @@ scripts =
   slapos-request = slapos.console:request
   slapformat = slapos.format:main
   slapgrid = slapos.grid.slapgrid:run
-  slapgrid-sr = slapos.grid.slapgrid:runSoftwareRelease
   slapgrid-cp = slapos.grid.slapgrid:runComputerPartition
   slapgrid-ur = slapos.grid.slapgrid:runUsageReport
   slapgrid-supervisorctl = slapos.grid.svcbackend:supervisorctl
   slapgrid-supervisord = slapos.grid.svcbackend:supervisord
   slapproxy = slapos.proxy:main
 
+[slapos-slapgrid-sr]
+# install slapgrid-sr script with PATH generated by SlapOS
+recipe = ${slapos:recipe}
+python = ${slapos:python}
+eggs = ${slapos:eggs}
+initialization =
+  import os
+  os.environ['PATH'] = os.path.expandvars('${environment:PATH}')
+scripts =
+  slapgrid-sr = slapos.grid.slapgrid:runSoftwareRelease
+
 [versions]
 zc.buildout = 1.5.3-dev-SlapOS-009
-- 
2.30.9