[Erp5-report] r33986 luke - /erp5/trunk/utils/rpmgen/templates/

nobody at svn.erp5.org nobody at svn.erp5.org
Tue Mar 23 10:47:13 CET 2010


Author: luke
Date: Tue Mar 23 10:47:10 2010
New Revision: 33986

URL: http://svn.erp5.org?rev=33986&view=rev
Log:
 - move tiolive.application part to specific spec template

Added:
    erp5/trunk/utils/rpmgen/templates/tiolive-application-buildout-mandriva2010.spec.in
      - copied, changed from r33985, erp5/trunk/utils/rpmgen/templates/erp5-official-buildout-mandriva2010.spec.in
Modified:
    erp5/trunk/utils/rpmgen/templates/erp5-official-buildout-mandriva2010.spec.in

Modified: erp5/trunk/utils/rpmgen/templates/erp5-official-buildout-mandriva2010.spec.in
URL: http://svn.erp5.org/erp5/trunk/utils/rpmgen/templates/erp5-official-buildout-mandriva2010.spec.in?rev=33986&r1=33985&r2=33986&view=diff
==============================================================================
--- erp5/trunk/utils/rpmgen/templates/erp5-official-buildout-mandriva2010.spec.in [utf8] (original)
+++ erp5/trunk/utils/rpmgen/templates/erp5-official-buildout-mandriva2010.spec.in [utf8] Tue Mar 23 10:47:10 2010
@@ -3,7 +3,6 @@
 %define release ${:release}
 # XXX: instancehome might be controlled by caller or buildout
 %define instancehome /var/lib/erp5
-%define erp5user erp5
 # We do not actually use /usr/local/bin/python
 %define _requires_exceptions \\(/usr/local/bin/python\\|/usr/bin/python2.4\\|libodbc.so\\)
 %define fullname %{name}-%{version}
@@ -29,12 +28,6 @@
 %description
 %{summary}
 
-%pre
-getent passwd %{erp5user} >/dev/null || \
-  useradd -r -d %{instancehome} -s /sbin/nologin \
-      -c "ERP5 Official Buildout user" %{erp5user}
-exit 0
-
 %build
 cd %{installdir}
 python bootstrap/bootstrap.py
@@ -44,32 +37,15 @@
 find %{installdir} -name '*.pyc' -print0 | xargs -0 %{__rm} -rf
 # tmp-storage created by openoffice build
 %{__rm} -rf tmp-storage
-mkdir -p %{instancehome}
-cd %{instancehome}
-svn co https://svn.erp5.org/repos/public/erp5/trunk/buildout/ .
-echo "[software_definition]" >> timmy-base.cfg
-echo "software_home = %{installdir}" >> timmy-base.cfg
-%{installdir}/bin/python2.4 bootstrap/bootstrap.py -c timmy-base.cfg
-bin/buildout -c timmy-base.cfg
-
-%post
-crontab -u erp5 -l > erp5.crontab
-grep bin/timmy erp5.crontab || echo '*/5 * * * * %{instancehome}/bin/timmy -k %{instancehome}/server.key -s https://www.tiolive.com/grid/ -b %{instancehome}/timmy-base.cfg -t %{instancehome}/local-eggs/erp5.timmy/src/erp5/timmy/examples/ -o %{instancehome}/timmy-controller.cfg -d %{instancehome}/timmy-instances -r %{instancehome}/bin/buildout -p %{instancehome}/timmy.pid' >> erp5.crontab
-crontab -u erp5 erp5.crontab
-rm -f erp5.crontab
-%{instancehome}/bin/timmy-keygen -k %{instancehome}/server.key
-chown erp5 %{instancehome}/server.key
 
 %install
 %{__rm} -rf %{buildroot}
 %{__mkdir_p} %{buildroot}
 %{__cp} -ar --parents %{installdir} %{buildroot}
-%{__cp} -ar --parents %{instancehome} %{buildroot}
 
 %files
 %defattr(-, root, root, 0755)
 %{installdir}
-%attr(0755, erp5, erp5) /var/lib/erp5
 
 %clean
-%{__rm} -rf %{buildroot} %{installdir} %{instancehome}
+%{__rm} -rf %{buildroot} %{installdir}

Copied: erp5/trunk/utils/rpmgen/templates/tiolive-application-buildout-mandriva2010.spec.in (from r33985, erp5/trunk/utils/rpmgen/templates/erp5-official-buildout-mandriva2010.spec.in)
URL: http://svn.erp5.org/erp5/trunk/utils/rpmgen/templates/tiolive-application-buildout-mandriva2010.spec.in?p2=erp5/trunk/utils/rpmgen/templates/tiolive-application-buildout-mandriva2010.spec.in&p1=erp5/trunk/utils/rpmgen/templates/erp5-official-buildout-mandriva2010.spec.in&r1=33985&r2=33986&rev=33986&view=diff
==============================================================================
--- erp5/trunk/utils/rpmgen/templates/erp5-official-buildout-mandriva2010.spec.in [utf8] (original)
+++ erp5/trunk/utils/rpmgen/templates/tiolive-application-buildout-mandriva2010.spec.in [utf8] Tue Mar 23 10:47:10 2010
@@ -1,13 +1,11 @@
 %define version ${:version}
 %define name ${:name}
 %define release ${:release}
-# XXX: instancehome might be controlled by caller or buildout
-%define instancehome /var/lib/erp5
 %define erp5user erp5
 # We do not actually use /usr/local/bin/python
 %define _requires_exceptions \\(/usr/local/bin/python\\|/usr/bin/python2.4\\|libodbc.so\\)
 %define fullname %{name}-%{version}
-%define installdir /opt/erp5/%{version}
+%define installdir /var/lib/erp5
 %define __find_provides ${:find_provides}
 
 Name: %{name}
@@ -17,7 +15,7 @@
 URL: http://www.erp5.org
 License: GPL
 Vendor: Nexedi
-Packager: Nicolas Dumazet <nicolas.dumazet at nexedi.com>
+Packager: Lukasz Nowak <luke at nexedi.com>
 Group: Databases
 
 Requires: libodbc.so.1
@@ -31,21 +29,12 @@
 
 %pre
 getent passwd %{erp5user} >/dev/null || \
-  useradd -r -d %{instancehome} -s /sbin/nologin \
+  useradd -r -d %{installdir} -s /sbin/nologin \
       -c "ERP5 Official Buildout user" %{erp5user}
 exit 0
 
 %build
 cd %{installdir}
-python bootstrap/bootstrap.py
-bin/buildout
-# cleanup .svn and .pyc files
-find %{installdir} -name .svn -print0 | xargs -0 %{__rm} -rf
-find %{installdir} -name '*.pyc' -print0 | xargs -0 %{__rm} -rf
-# tmp-storage created by openoffice build
-%{__rm} -rf tmp-storage
-mkdir -p %{instancehome}
-cd %{instancehome}
 svn co https://svn.erp5.org/repos/public/erp5/trunk/buildout/ .
 echo "[software_definition]" >> timmy-base.cfg
 echo "software_home = %{installdir}" >> timmy-base.cfg
@@ -54,22 +43,21 @@
 
 %post
 crontab -u erp5 -l > erp5.crontab
-grep bin/timmy erp5.crontab || echo '*/5 * * * * %{instancehome}/bin/timmy -k %{instancehome}/server.key -s https://www.tiolive.com/grid/ -b %{instancehome}/timmy-base.cfg -t %{instancehome}/local-eggs/erp5.timmy/src/erp5/timmy/examples/ -o %{instancehome}/timmy-controller.cfg -d %{instancehome}/timmy-instances -r %{instancehome}/bin/buildout -p %{instancehome}/timmy.pid' >> erp5.crontab
+grep bin/timmy erp5.crontab || echo '*/5 * * * * bin/timmy -k server.key -s https://www.tiolive.com/grid/ -b timmy-base.cfg -t local-eggs/erp5.timmy/src/erp5/timmy/examples/ -o timmy-controller.cfg -d timmy-instances -r bin/buildout -p timmy.pid' >> erp5.crontab
 crontab -u erp5 erp5.crontab
 rm -f erp5.crontab
-%{instancehome}/bin/timmy-keygen -k %{instancehome}/server.key
-chown erp5 %{instancehome}/server.key
+cd %{installdir}
+bin/timmy-keygen -k server.key
+chown erp5 server.key
 
 %install
 %{__rm} -rf %{buildroot}
 %{__mkdir_p} %{buildroot}
 %{__cp} -ar --parents %{installdir} %{buildroot}
-%{__cp} -ar --parents %{instancehome} %{buildroot}
 
 %files
-%defattr(-, root, root, 0755)
+%defattr(-, erp5, erp5, 0755)
 %{installdir}
-%attr(0755, erp5, erp5) /var/lib/erp5
 
 %clean
-%{__rm} -rf %{buildroot} %{installdir} %{instancehome}
+%{__rm} -rf %{buildroot} %{installdir}




More information about the Erp5-report mailing list