[Erp5-report] r43389 rafael - in /erp5/trunk/utils/rpmgen: ./ specs/ specs/erp5-official-bu...
nobody at svn.erp5.org
nobody at svn.erp5.org
Wed Feb 16 21:50:33 CET 2011
Author: rafael
Date: Wed Feb 16 21:50:33 2011
New Revision: 43389
URL: http://svn.erp5.org?rev=43389&view=rev
Log:
Use erp5.appliance.test to setup software and instance, we should keep instance creation unified with tests and erp5.com how to.
Modified:
erp5/trunk/utils/rpmgen/Makefile
erp5/trunk/utils/rpmgen/specs/erp5-official-buildout-trunk-deb/debian/rules
erp5/trunk/utils/rpmgen/specs/erp5-official-buildout-trunk.spec
erp5/trunk/utils/rpmgen/specs/erp5-official-instance-trunk.spec
Modified: erp5/trunk/utils/rpmgen/Makefile
URL: http://svn.erp5.org/erp5/trunk/utils/rpmgen/Makefile?rev=43389&r1=43388&r2=43389&view=diff
==============================================================================
--- erp5/trunk/utils/rpmgen/Makefile [utf8] (original)
+++ erp5/trunk/utils/rpmgen/Makefile [utf8] Wed Feb 16 21:50:33 2011
@@ -2,16 +2,21 @@ VERSION=trunk
DEST=/opt/erp5/${VERSION}
debian:
- cd specs/erp5-official-buildout-trunk-deb/; sudo dpkg-buildpackage -b
+ cd specs/erp5-official-buildout-trunk-deb/; sudo dpkg-buildpackage -b
debian-instance:
- cd specs/erp5-official-instance-trunk-deb/; sudo dpkg-buildpackage -b
+ cd specs/erp5-official-instance-trunk-deb/; sudo dpkg-buildpackage -b
clean:
sudo rm -Rf ${DEST}
+build:
+ sudo mkdir -p ${DEST}
+ sudo chmod a+rwx ${DEST}
+ erp5apptest212 -v -s -u -o -l $(DEST)/run.log $(DEST)
+
prepare:
- sudo mkdir -p ${DEST}/{downloads,extends-cache}
+ sudo easy_install erp5.appliance.test
mandriva-dependencies:
sudo urpmi --auto rpm-build
@@ -25,7 +30,7 @@ fedora-dependencies:
centos-dependencies:
sudo yum install -y rpm-build gcc gcc-c++ make
-softwarebuild: prepare
+softwarebuild: prepare build
sudo -E rpmbuild -bb specs/erp5-official-buildout-trunk.spec
instancebuild:
Modified: erp5/trunk/utils/rpmgen/specs/erp5-official-buildout-trunk-deb/debian/rules
URL: http://svn.erp5.org/erp5/trunk/utils/rpmgen/specs/erp5-official-buildout-trunk-deb/debian/rules?rev=43389&r1=43388&r2=43389&view=diff
==============================================================================
--- erp5/trunk/utils/rpmgen/specs/erp5-official-buildout-trunk-deb/debian/rules [utf8] (original)
+++ erp5/trunk/utils/rpmgen/specs/erp5-official-buildout-trunk-deb/debian/rules [utf8] Wed Feb 16 21:50:33 2011
@@ -9,24 +9,17 @@
# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1
-INSTALL_PATH=/opt/erp5/trunk
+INSTALL_PATH=/opt/erp5/trunk/software
configure:
# We have nothing to do.
build:
- mkdir -p $(INSTALL_PATH)/{downloads,extends-cache}
- echo "[buildout]" > $(INSTALL_PATH)/buildout.cfg
- echo "extends = https://svn.erp5.org/repos/public/erp5/trunk/buildout/buildout-2.12.cfg" >> $(INSTALL_PATH)/buildout.cfg
- echo "extends-cache = extends-cache" >> $(INSTALL_PATH)/buildout.cfg
- #unset PYTHONPATH PYTHONSTARTUP PYTHONDONTWRITEBYTECODE
- cd $(INSTALL_PATH) && python -S -c 'import urllib2;print urllib2.urlopen("http://svn.zope.org/*checkout*/zc.buildout/trunk/bootstrap/bootstrap.py").read()' | python -S -
- cd $(INSTALL_PATH) && ./bin/buildout -v -U -O -n
+
clean:
dh_testdir
dh_testroot
- rm -rf $(INSTALL_PATH)
install: build
dh_testdir
Modified: erp5/trunk/utils/rpmgen/specs/erp5-official-buildout-trunk.spec
URL: http://svn.erp5.org/erp5/trunk/utils/rpmgen/specs/erp5-official-buildout-trunk.spec?rev=43389&r1=43388&r2=43389&view=diff
==============================================================================
--- erp5/trunk/utils/rpmgen/specs/erp5-official-buildout-trunk.spec [utf8] (original)
+++ erp5/trunk/utils/rpmgen/specs/erp5-official-buildout-trunk.spec [utf8] Wed Feb 16 21:50:33 2011
@@ -1,7 +1,7 @@
%define version trunk
%define name erp5-official-buildout
%define release r41268
-%define installdir /opt/erp5/%{version}
+%define installdir /opt/erp5/%{version}/software
Name: %{name}
Version: %{version}
@@ -108,18 +108,6 @@ Requires: libz.so.1
%{summary}
%build
-%{__mkdir_p} %{installdir}/{downloads,extends-cache}
-cd %{installdir}
-cat > buildout.cfg <<EOF
-[buildout]
-extends = https://svn.erp5.org/repos/public/erp5/trunk/buildout/buildout-2.12.cfg
-extends-cache = extends-cache
-EOF
-unset PYTHONPATH
-unset PYTHONSTARTUP
-unset PYTHONDONTWRITEBYTECODE
-python -S -c 'import urllib2;print urllib2.urlopen("http://svn.zope.org/*checkout*/zc.buildout/trunk/bootstrap/bootstrap.py").read()' | python -S -
-./bin/buildout -v -U -O -n
%install
%{__rm} -rf %{buildroot}
Modified: 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=43389&r1=43388&r2=43389&view=diff
==============================================================================
--- erp5/trunk/utils/rpmgen/specs/erp5-official-instance-trunk.spec [utf8] (original)
+++ erp5/trunk/utils/rpmgen/specs/erp5-official-instance-trunk.spec [utf8] Wed Feb 16 21:50:33 2011
@@ -2,8 +2,7 @@
%define name erp5-official-instance
%define release r41268
%define erp5user erp5
-%define softwaredir /opt/erp5/%{version}
-%define installdir /var/lib/erp5
+%define installdir /opt/erp5/%{version}/instance
Name: %{name}
Version: %{version}
@@ -12,7 +11,7 @@ Summary: Open Source ERP Solution
URL: http://www.erp5.org
License: GPL
Vendor: Nexedi
-Packager: Lucas Carvalho <lucas at nexedi.com>
+Packager: Nexedi SA <info at nexedi.com>
Group: Databases
AutoReqProv:0
Provides: erp5
@@ -25,41 +24,6 @@ BuildRoot: %{_tmppath}/%{name}-%{version
%_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}
More information about the Erp5-report
mailing list