[Erp5-report] r43247 rafael - /erp5/trunk/utils/rpmgen/specs/erp5-official-instance-trunk.spec

nobody at svn.erp5.org nobody at svn.erp5.org
Thu Feb 10 05:26:07 CET 2011


Author: rafael
Date: Thu Feb 10 05:26:07 2011
New Revision: 43247

URL: http://svn.erp5.org?rev=43247&view=rev
Log:
Added draft spec for build an erp5 instance from official buildout.

Added:
    erp5/trunk/utils/rpmgen/specs/erp5-official-instance-trunk.spec

Added: erp5/trunk/utils/rpmgen/specs/erp5-official-instance-trunk.spec
URL: http://svn.erp5.org/erp5/trunk/utils/rpmgen/specs/erp5-official-instance-trunk.spec?rev=43247&view=auto
==============================================================================
--- erp5/trunk/utils/rpmgen/specs/erp5-official-instance-trunk.spec (added)
+++ erp5/trunk/utils/rpmgen/specs/erp5-official-instance-trunk.spec [utf8] Thu Feb 10 05:26:07 2011
@@ -0,0 +1,82 @@
+%define version trunk
+%define name erp5-official-instance
+%define release r41268
+%define erp5user erp5
+%define softwaredir /opt/erp5/%{version}
+%define installdir /var/lib/erp5
+
+Name: %{name}
+Version: %{version}
+Release: %{release}
+Summary: Open Source ERP Solution
+URL: http://www.erp5.org
+License: GPL
+Vendor: Nexedi
+Packager: Lucas Carvalho <lucas at nexedi.com>
+Group: Databases
+AutoReqProv:0
+Provides: erp5
+BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-buildroot
+
+%description
+%{summary}
+
+%pre
+%_pre_useradd %{erp5user} %{installdir} /bin/false
+
+%build
+%{__mkdir_p} %{installdir}
+cd %{installdir}
+cat > buildout.cfg <<EOF
+[buildout]
+extends-cache = %{softwaredir}/extends-cache
+offline = true
+extends =
+  https://svn.erp5.org/repos/public/erp5/trunk/buildout/profiles/development-2.12.cfg
+  %{softwaredir}/instance.inc
+
+parts =
+  mysql-instance
+  cloudooo-instance
+  supervisor-instance
+  runUnitTest
+  development-site
+EOF
+unset PYTHONPATH
+unset PYTHONSTARTUP
+unset PYTHONDONTWRITEBYTECODE
+%{softwaredir}/bin/bootstrap2.6
+bin/buildout -v
+chown erp5 -R %{installdir}
+
+sudo -u erp5 %{installdir}/bin/supervisord
+sleep 10
+
+echo "create database development_site;" | var/bin/mysql -h 127.0.0.1 -u root
+echo "grant all privileges on development_site.* to 'development_user'@'localhost' identified by 'development_password';" | var/bin/mysql -h 127.0.0.1 -u root
+echo "grant all privileges on development_site.* to 'development_user'@'127.0.0.1' identified by 'development_password';"| var/bin/mysql -h 127.0.0.1 -u root
+echo "create database test212;"| var/bin/mysql -h 127.0.0.1 -u root
+echo "grant all privileges on test212.* to 'test'@'localhost';"| var/bin/mysql -h 127.0.0.1 -u root
+echo "grant all privileges on test212.* to 'test'@'127.0.0.1';"| var/bin/mysql -h 127.0.0.1 -u root
+
+bin/supervisorctl shutdown
+
+%install
+%{__rm} -rf %{buildroot}
+%{__mkdir_p} %{buildroot}
+# use rsync if possible
+if [ -z "`which rsync >&/dev/null || echo 1`" ]; then
+  mkdir -p %{buildroot}%{installdir}
+  rsync -a %{installdir}/ %{buildroot}%{installdir}/
+else
+  %{__cp} -ar --parents %{installdir} %{buildroot}
+fi
+# post-script strip fails for read-only files
+chmod -R u+w %{buildroot}%{installdir}/*parts
+
+%files
+%defattr(-, root, root, 0755)
+%{installdir}
+
+%clean
+%{__rm} -rf %{buildroot}



More information about the Erp5-report mailing list