Bug 186262 - finance/openerp-server port is non-functional as shipped.
Summary: finance/openerp-server port is non-functional as shipped.
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: Normal Affects Only Me
Assignee: freebsd-ports-bugs (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-01-30 02:10 UTC by Marc Rassbach
Modified: 2014-07-22 16:41 UTC (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Marc Rassbach 2014-01-30 02:10:00 UTC
Short Version:
Various ports are not included.   And once included it ends up dead with:
OperationalError: Unable to use a closed cursor.



Long winded version:

The 1st error was complaining about cairo and as I did not ssh in I don't have something to cut and paste.

Eventually you get to:
/usr/local/bin/openerp-server
Traceback (most recent call last):
......
ImportError: No module named simplejson

So install simplejson and then get to:

After simplejson is installed:
/usr/local/bin/openerp-server
Traceback (most recent call last):
....
ImportError: No module named werkzeug.serving


Now the error log has:
CRITICAL:openerp.modules.module:Couldn't load module web
CRITICAL:openerp.modules.module:No module named unittest2

Later the log says:
CRITICAL:openerp.modules.module:No module named openid

Then:
CRITICAL:openerp.modules.module:No module named docutils

After docutils is installed - the log complaints about web go away and are replaced with:
WARNING:openerp.addons.email_template.email_template:jinja2 not available, templating features will not work!
WARNING:openerp.addons.google_docs.google_docs:Please install latest gdata-python-client from http://code.google.com/p/gdata-python-client/downloads/list


Huzaaa!  In the sense that a web page now exists at http://ipaddress:8069
And now it just bitches about a lack of a database - but if one goes to that page and did the poor security of giving superuser to the openerp login it now bombs with an error in the web browser.

Client Traceback (most recent call last):
  File "/usr/local/openerp/addons/web/http.py", line 204, in dispatch
    response["result"] = method(self, **self.params)
  File "/usr/local/openerp/addons/web/controllers/main.py", line 774, in create
    params['create_admin_pwd'])
  File "/usr/local/openerp/addons/web/session.py", line 30, in proxy_method
    result = self.session.send(self.service_name, method, *args)
  File "/usr/local/openerp/addons/web/session.py", line 103, in send
    raise xmlrpclib.Fault(openerp.tools.ustr(e), formatted_info)


Server Traceback (most recent call last):
  File "/usr/local/openerp/addons/web/session.py", line 89, in send
    return openerp.netsvc.dispatch_rpc(service_name, method, args)
  File "/usr/local/lib/python2.7/site-packages/openerp/netsvc.py", line 292, in dispatch_rpc
    result = ExportService.getService(service_name).dispatch(method, params)
  File "/usr/local/lib/python2.7/site-packages/openerp/service/web_services.py", line 122, in dispatch
    return fn(*params)
  File "/usr/local/lib/python2.7/site-packages/openerp/service/web_services.py", line 168, in exp_create_database
    _initialize_db(self, id, db_name, demo, lang, user_password)
  File "/usr/local/lib/python2.7/site-packages/openerp/service/web_services.py", line 98, in _initialize_db
    cr.close()
  File "/usr/local/lib/python2.7/site-packages/openerp/sql_db.py", line 160, in wrapper
    raise psycopg2.OperationalError(msg)
OperationalError: Unable to use a closed cursor.

Fix: 

Well, doing the "script" gets most of the stuff fixed but it still seems broken.   My time with OpenERP doesn't give me insight if the code/port is bad or if I'm the broken item in the toolchain.  Odds are the not installing PostgreSQL server 1st is a mis-step on my part.  

But now I turn it over to the port maintainer....
How-To-Repeat: Install new FreeBSD 10.0 and run the below script

#! /bin/sh
cd /usr/ports
portsnap fetch
portsnap extract
portsnap fetch
portsnap update
cd /usr/ports/finance/openerp-server
make install BATCH=yes
# blows up with missing  cairo  Do another make install BATCH=yes
make install BATCH=yes
cp /usr/local/etc/openerp-server.conf.sample /usr/local/etc/openerp-server.conf
# the build works now and the instructions included are a far more correct 
# way of being a real DBA VS following the instructions from OpenERP at
# https://doc.openerp.com/install/linux/postgres/
# Now the server isn't actually installed but 9.0 client is.  So go get server 
# installed.   Should prob. pick 9.2 client/server 1st then install openerp-server.
cd /usr/ports/databases/postgresql90-server
make install BATCH=yes
echo 'postgresql_enable="YES"' >> /etc/rc.conf
/usr/local/etc/rc.d/postgresql initdb
/usr/local/etc/rc.d/postgresql start
# now for doing a bad thing - make openerp user WAY too powerful.   
echo 'Gonna ask for a password - insecure ppl just use openerp OK?'
echo 'grep db_password /usr/local/etc/openerp-server.conf'
grep db_password /usr/local/etc/openerp-server.conf
createuser -s -P --username pgsql openerp
# enter in the lousy password of openerp so it matches database options in 
# /usr/local/etc/openerp-server.conf  
# now get ready!  Watch it fail!
/usr/local/etc/rc.d/openerpd onestart
# look - failed to run.  lets watch the logs...no logs unless:
/usr/local/bin/openerp-server
cd /usr/ports/devel/py-simplejson
make install BATCH=yes
/usr/local/bin/openerp-server
cd /usr/ports/www/py-werkzeug
make install BATCH=yes
/usr/local/bin/openerp-server
# Good!   Letting you know you are an idiot to run as root!
# now we get /var/log/message action.   So a tail -f of /var/log/message in another window.
/usr/local/etc/rc.d/openerpd onestart
# trying the web page per the instructions given says:
# No handler found.
cd /usr/ports/devel/py-unittest2
make install BATCH=yes
# Odds are this is wrong and I should modify the openerp-server.conf but that 
# will be next
cd /usr/ports/www/webpy
make install BATCH=yes


# fine - modify the conf file   I could do it with sed but just run vi.
echo 'vi /usr/local/etc/openerp-server.conf and edit the path to include where it is installed /usr/local/openerp OK?'
echo ',/usr/local/openerp to the correct root and addons path'
exit 0

#! /bin/sh
# post vi-ing as I'm not wanting to use sed, m'kay?
/usr/local/etc/rc.d/openerpd onestart
cd /usr/ports/devel/py-mock
make install BATCH=yes
# now one needs to start looking for running version of openerp server and killing 'em.
# Things are looking up!  at least the process stay around now VS dying.
# and now its bright enough to know that the default directory listed is 
# not there.   
# if you keep running /usr/local/etc/rc.d/openerpd onestart eventually you'll 
# perhaps find an openerp bug?   Unless you change to 
# root_path = /usr/local/openerp
# addons_path = /usr/local/openerp/addons
# and be rid of the bad directory you won't see the need for openid
cd /usr/ports/security/py-openid
make install BATCH=yes
cd /usr/ports/textproc/py-docutils
make install BATCH=yes
cd /usr/ports/devel/py-gdata
make install BATCH=yes
cd /usr/ports/devel/py-Jinja2
make install BATCH=yes
#
# And the end of the saga for me as I don't know if it is a port issue or not
#
/usr/local/etc/rc.d/openerpd onestart
Comment 1 Edwin Groothuis freebsd_committer freebsd_triage 2014-01-30 02:10:08 UTC
Maintainer of finance/openerp-server,

Please note that PR ports/186262 has just been submitted.

If it contains a patch for an upgrade, an enhancement or a bug fix
you agree on, reply to this email stating that you approve the patch
and a committer will take care of it.

The full text of the PR can be found at:
    http://www.freebsd.org/cgi/query-pr.cgi?pr=ports/186262

-- 
Edwin Groothuis via the GNATS Auto Assign Tool
edwin@FreeBSD.org
Comment 2 Edwin Groothuis freebsd_committer freebsd_triage 2014-01-30 02:10:09 UTC
State Changed
From-To: open->feedback

Awaiting maintainers feedback (via the GNATS Auto Assign Tool)
Comment 3 John Marino freebsd_committer freebsd_triage 2014-06-19 11:29:54 UTC
Pakhom,
Apparently this PR applies to openerp-server version 7 as this PR comes a week after the port was updated.

Can you evaluate the PR?
Comment 4 commit-hook freebsd_committer freebsd_triage 2014-07-22 16:40:01 UTC
A commit references this bug:

Author: marino
Date: Tue Jul 22 16:39:11 UTC 2014
New revision: 362555
URL: http://svnweb.freebsd.org/changeset/ports/362555

Log:
  Mark finance/openerp-server BROKEN

  According to the PR opened 30 Jan 2014, openerp-server has been broken
  out of the box ever since it was updated to version 7.0.  The maintainer
  has not responded despite being pinged in June.

  PR:		186262
  Submitted by:	Marc (sherpa consulting)
  Action due to:	maintainer timeout (~6 months)

Changes:
  head/finance/openerp-server/Makefile
Comment 5 John Marino freebsd_committer freebsd_triage 2014-07-22 16:41:58 UTC
Sorry, Marc.  I "fixed" this PR by marking the port BROKEN.  The maintainer is just not responding.

You should submit a PR to fix it and maybe take over maintainership.