Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[ebuild & help] OpenERP (server, client, web)
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Unsupported Software
View previous topic :: View next topic  
Author Message
snake111
Tux's lil' helper
Tux's lil' helper


Joined: 18 Dec 2004
Posts: 117

PostPosted: Sat May 30, 2009 2:10 pm    Post subject: [ebuild & help] OpenERP (server, client, web) Reply with quote

Hi all, I'm spending some time trying to update the openerp ebuilds on bugzilla, but I need help to fix two of them...

SERVER
I've already posted the server one, updated to the last openerp version (bug 267886) but I've problems with openerp-client and openerp-web ebuilds... (mostly because I'm quite a noob in bash and ebuild writing... :()


CLIENT
To install the client I followed this ebuild schema: https://bugs.gentoo.org/attachment.cgi?id=155685 (which is the last client ebuild I could find). I made some changes to fetch the last version of openerp-client, and updated dependencies following the official install guide at http://doc.openerp.com/install/linux/client/index.html

The "sunrise" overlay is needed because x11-libs/hippo-canvas dependency package is not in the official tree. Follow this guide to get sunrise overlay up and running on your box: http://overlays.gentoo.org/proj/sunrise .


The openerp-client ebuild [app-office/openerp-client/openerp-client-5.0.1.ebuild]:
Code:

# Copyright 1999-2008 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header:

inherit distutils eutils

REV="-0"

DESCRIPTION="Open Source ERP & CRM client"
HOMEPAGE="http://openerp.com/"
SRC_URI="http://www.openerp.com/download/stable/source/${P}${REV}.tar.gz"

LICENSE="GPL-2"
SLOT="0"
KEYWORDS="~amd64 ~x86"
IUSE=""

DEPEND=">=dev-lang/python-2.4
        >=dev-python/pygtk-2.10
        gnome-base/libglade
        dev-python/pyxml
        dev-python/matplotlib
        dev-python/pytz
        >=dev-python/psycopg-2.0.10[mxdatetime]
"

src_unpack() {
        unpack ${A}
        cd "${S}"

        sed -i -e "s/^\(check_modules()\).*/#\1/" \
                setup.py

        sed -i -e "s@\('path.share':\).*@\1 '/usr/share/openerp-client/',@" \
                -e "s@\('path.pixmaps':\).*@\1 '/usr/share/pixmaps/openerp-client/',@" \
                bin/options.py
}

src_install() {
        distutils_src_install

        keepdir /usr/share/${PN}/themes
}


Whit the above ebuild I get the following error:

Code:

>>> Emerging (4 of 4) app-office/openerp-client-5.0.1 from unknown repo
 * openerp-client-5.0.1-0.tar.gz RMD160 SHA1 SHA256 size ;-) ...                           [ ok ]
 * checking ebuild checksums ;-) ...                                                       [ ok ]
 * checking auxfile checksums ;-) ...                                                      [ ok ]
 * checking miscfile checksums ;-) ...                                                     [ ok ]
>>> Unpacking source...
>>> Unpacking openerp-client-5.0.1-0.tar.gz to /var/tmp/portage/app-office/openerp-client-5.0.1/work
/var/tmp/portage/app-office/openerp-client-5.0.1/temp/environment: line 2450: cd: /var/tmp/portage/app-office/openerp-client-5.0.1/work/openerp-client-5.0.1: No such file or directory
sed: can't read setup.py: No such file or directory
sed: can't read bin/options.py: No such file or directory
>>> Source unpacked in /var/tmp/portage/app-office/openerp-client-5.0.1/work
>>> Compiling source in /var/tmp/portage/app-office/openerp-client-5.0.1/work ...
python: can't open file 'setup.py': [Errno 2] No such file or directory
 *
 * ERROR: app-office/openerp-client-5.0.1 failed.
 * Call stack:
 *               ebuild.sh, line   48:  Called src_compile
 *             environment, line 2447:  Called distutils_src_compile
 *             environment, line  684:  Called die
 * The specific snippet of code:
 *       ${python} setup.py build "$@" || die "compilation failed"
 *  The die message:
 *   compilation failed
 *
 * If you need support, post the topmost build error, and the call stack if relevant.
 * A complete build log is located at '/var/tmp/portage/app-office/openerp-client-5.0.1/temp/build.log'.
 * The ebuild environment file is located at '/var/tmp/portage/app-office/openerp-client-5.0.1/temp/environment'.
 * This ebuild is from an overlay: '/usr/local/portage/'
 *



These are the install instructions from the officiale site documentation:

Code:

tar -xzf openerp-client-5.0.0.tar.gz
cd openerp-client-5.0.0
sudo python setup.py install


I tried to fix the error (I think is a path error) but no luck :(.


WEB CLIENT

Again using bug 267886 openerp-web ebuild, conf.d and init.d files. After small changes in the ebuild to adapt to the new version I got the following files:

The openerp-web ebuild [app-office/openerp-web/openerp-web-5.0.1.ebuild]:
Code:

# Copyright 1999-2008 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header:

inherit eutils distutils

REV="-0"

DESCRIPTION="Open Source ERP & CRM"
HOMEPAGE="http://www.openerp.com/"
SRC_URI="www.openerp.com/download/stable/source/${P}${REV}.tar.gz"

LICENSE="GPL-2"
SLOT="0"
KEYWORDS="~amd64 ~x86"
IUSE=""

S=${P}${REV}

DEPEND="
        >=dev-python/turbogears-1.0.7
        >=dev-python/pyparsing-1.5.0
        dev-python/pyxml
        "

src_compile() {

        return
}

src_install() {

        cd ${S}

        distutils_src_install

        newinitd "${FILESDIR}"/openerp-web-init.d openerp-web
        newconfd "${FILESDIR}"/openerp-web-conf.d openerp-web

        keepdir /var/run/openerp
        keepdir /var/log/openerp

        insinto /etc/openerp
        rm -rf ${D}/usr/scripts
        mv ${D}/usr/config/default.cfg ${D}/etc/openerp/openerp-web.cfg
        rm -rf ${D}/usr/config
}


The openerp-web-conf.d file:
Code:

# Server configuration file
#SERVER_CONF="/etc/openerp/openerp-web.cfg"


The openerp-web-init.d file:
Code:

#!/sbin/runscript

depend() {
   use net logger
   after openerp
}


start() {
   [ -n "${SERVER_CONF}" ] \
      && SERVER_OPTS="${SERVER_OPTS} ${SERVER_CONF}" \
      || SERVER_OPTS="${SERVER_OPTS} -c /etc/openerp/openerp-web.cfg"
                        
   ebegin "Starting openERP"
   start-stop-daemon --start --background --make-pidfile --pidfile=/var/run/openerp/openerp-web.pid --exec /usr/bin/start-openerp-web -- ${SERVER_OPTS}
   eend $?
}


stop() {
   ebegin "Stopping openERP"
   start-stop-daemon --stop --quiet --pidfile=/var/run/openerp/openerp-web.pid
   eend $?
}


The problem for openerp-web is that even enabling the conf.d file line SERVER_CONF="/etc/openerp/openerp-web.cfg"

openerp-web-conf.d file:
Code:

# Server configuration file
SERVER_CONF="/etc/openerp/openerp-web.cfg"


starting the daemon

Code:
# /etc/init.d/openerp-web start


wont start the service. If i try to start the service manually with

Code:
start-openerp-web


i get the following error:

Code:

Traceback (most recent call last):
  File "/usr/bin/start-openerp-web", line 8, in <module>
    load_entry_point('openerp-web==5.0.1-0', 'console_scripts', 'start-openerp-web')()
  File "/usr/lib/python2.5/site-packages/openerp/commands.py", line 56, in start
    raise ConfigurationError(_("Could not find configuration file: %s") % configfile)
openerp.commands.ConfigurationError: Could not find configuration file: /usr/lib/python2.5/site-packages/config/default.cfg


Seing the last line error above, I tried to copy the /etc/openerp/openerp-web.cfg file to /usr/lib/python2.5/site-packages/config/default.cfg and the service starts fine....
So my question is: why it continues looking for the conf file in /usr/lib/python2.5/site-packages/config/default.cfg while in the daemon conf.d file i put to look for it in /etc/openerp/openerp-web.cfg? Should this behavior be fixed or is better to stay with the conf file in /usr/lib/python2.5/site-packages/config/default.cfg and adapt the ebuild to create that default.cfg? How can I fix it?
Another flaw in the ebuild is that it seems to not protect the configuration files, if I emerge again openerp-web it won't ask to overwrite the conf.d, init.d, or openerp-web.cfg, it simply leaves the old ones.

Thanks for helping, leave a feedback if you try the ebuilds! :)

P.S. I was trying to get the whole thing up and running on ubuntu 8.10 & 9.04 because the packages are in the official tree... but after spending a lot of time fixing version problems for dependencies (and without having neither the server running at the end), I gave up and back to our lovely gentoo! Even without ready-to-install ebuilds I was able to get the server up in a fraction of the ubuntu-wasted time! :D

P.P.S I'm mostly testing on a gentoo vmware VM, so I can quickly switch back to a clean snapshot without openerp installed to test ebuilds.


Last edited by snake111 on Fri Jul 03, 2009 1:40 pm; edited 1 time in total
Back to top
View user's profile Send private message
ok
Guru
Guru


Joined: 11 Jul 2006
Posts: 390
Location: germany

PostPosted: Sun Jun 07, 2009 7:48 pm    Post subject: Reply with quote

Something new about this? I am running OpenERP Server and the GTK - Client, but manually installed. Would be fine if I can get an ebuild.
Did you try running the Server and/or Client with python 2.6? Because I got problems with versions greater than 2.5.
Back to top
View user's profile Send private message
snake111
Tux's lil' helper
Tux's lil' helper


Joined: 18 Dec 2004
Posts: 117

PostPosted: Sun Jun 07, 2009 8:49 pm    Post subject: Reply with quote

Hi, I don't have python 2.6 installed, so I can't help you, but with 2.5 is running everything fine.

At the moment server ebuild is working very well, simply follow the instructions on https://bugs.gentoo.org/267886 and it will work out of the box, at least in my box... If you try it please tell if it works.

The web ebuild is almost good, you only need to move the configuration file after the emerge.

I don't know how to fix the client GTK ebuild, at the moment it's not working.

I've no time to watch at the ebuilds in these days, but I will work on them sooner or later...
Back to top
View user's profile Send private message
fnietzsche
n00b
n00b


Joined: 29 Feb 2008
Posts: 27

PostPosted: Wed Jul 22, 2009 8:05 pm    Post subject: Reply with quote

Sorry to post maybe an off topic question, but where (in which overlay) can I find these ebuilds for openerp. I want to start testing this piece of software also and the only mentioning of the ebuilds are leading back to this forum post. So please can somebody tell where to get the overlay to install the openerp server en web-client on my server also?

Thanks a lot!
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Unsupported Software All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum