Bug 166534

Summary: finance/openerp-server, finance/openerp-web: OpenERP misconfiguration
Product: Ports & Packages Reporter: Franck PORCHER <franck.porcher>
Component: Individual Port(s)Assignee: Michael Scheidell <scheidell>
Status: Closed FIXED    
Severity: Affects Only Me    
Priority: Normal    
Version: Latest   
Hardware: Any   
OS: Any   
Attachments:
Description Flags
file.txt
none
openerp-server.diff none

Description Franck PORCHER 2012-03-31 08:00:28 UTC
OpenERP :

The two following ports have stock misconfiguration issues that prevent the associated services from starting after the ports are
installed.

1) finance/openerp-server (6.0.3)
---------------------------------
* openerp-server will not start from scratch because of some postgresql-server requirements not being met, namely :
  - postgresql <openerp role> (user) not created
  - postgresql <openerp database> not created

* Once that corrected, there still remains a few issues with openerp-server rc script (/usr/local/etc/rc.d/openerpd) bearing discrepencies with main openerp-server configuration file (/usr/local/etc/openerp-server.conf) regarding pid and logs.

 2) finance/openerp-web (5.0.11)
 -------------------------------
    * openerp-web (a web-server front-end proxy to openerp-server, allowing clients to connect thru a simple web-browser) will not start mainly because of a python library mismatch regarding py-cherrypy (needs to downgrade to cherrypy 3.1.2) and similar issues with pid and logs

Fix: (See attached file)

I may suggest that a www/py-cherrypy-321 port be temporarily added using CherryPy-3.1.2.tar.gz until the problem with openerp-web.py is solved.

distinfo :
SHA256 (CherryPy-3.1.2.tar.gz) = 0dfd65507b047d54c09849e7a4b8bdd3616fa8776a5dbff7697cbf6ea1559bf6
SIZE (CherryPy-3.1.2.tar.gz) = 319196

In the meantime, please see the attached file for some workarounds regarding both openerp-server and openerp-web.

Not being a seasoned port maintainer, I will leave it up to the official maintainer to review and install these patches into the concerned mainstream ports.

The proposed patches have been extensively tested. They are reliable and they work perfectly for me in this (standard) FreeBSD configuration.

Please do not hesitate to contact me for more informations regarding this work.

Cheers,

Dr. Franck Porcher, Ph.D


Patch attached with submission follows:
How-To-Repeat: Install finance/openerp-server (6.0.3) and finance/openerp-web (5.0.11) from (stock) ports.

Then (as root), try :
 
 # /usr/local/etc/rc.d/openerpd    start
 # /usr/local/etc/rc.d/openerp-web start

Check that these services did not start with :
 # ps -auxww | grep python
Comment 1 Edwin Groothuis freebsd_committer freebsd_triage 2012-03-31 08:52:37 UTC
Maintainer of finance/openerp-server,

Please note that PR ports/166534 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/166534

-- 
Edwin Groothuis via the GNATS Auto Assign Tool
edwin@FreeBSD.org
Comment 2 Edwin Groothuis freebsd_committer freebsd_triage 2012-03-31 08:52:39 UTC
State Changed
From-To: open->feedback

Awaiting maintainers feedback (via the GNATS Auto Assign Tool)
Comment 3 Michael Scheidell freebsd_committer freebsd_triage 2012-04-15 14:19:17 UTC
State Changed
From-To: feedback->open

Maintainer Timeout +14 days
Comment 4 Michael Scheidell freebsd_committer freebsd_triage 2012-04-16 17:52:28 UTC
State Changed
From-To: open->feedback

Submitter: if there is a patch attached to your pr, could you resubmit, 
just the patch? Neither the maintainer, nor a committer can easily 
discern exactly what you want done here.
Comment 5 Michael Scheidell freebsd_committer freebsd_triage 2012-04-17 11:58:53 UTC
(didn't make it to gnats, so included here for background)

On 4/16/12 8:42 PM, Franck PORCHER wrote:
> The description of the problems is clearly stated from the pr's 
> description. There should not be any problem with understanding them. 
> Simply install the stock ports, and start the services just to see 
> they do not work and understand why from this description.
>
> Then the PR comes woith a mix of amended/corected/extended code and 
> patch-guidelines (no patches proper you can apply with patch) to help 
> the maintainer test and incorporate them the *way* that suits him best.
>
> I'm not strong into patching ports distribution system and do not have 
> the time right down to delve into it, so to only submit working 
> patches proper.
>
> Nevertheless, I'm very open and willing to discuss both the 
> description of the problem and my fixes with the maintainer to help 
> get these fixes mainstream, but only if he/she wishes.
>
> For this, feel free to contact me on this email address.
>
> With thes fixes, my 2 ports now work perfectly, and it's time they go 
> mainstream before more users "complain".
>
> Cheers,
>
> Franck
>

We do thank you for your time and effort in finding and suggesting some 
fixes to this( these) ports.  Yes, submitting your first set of ports 
patches can be daunting, until you do it a couple of times.

Keep in mind that both the maintainer, and FreeBSD ports committers all 
work on a volunteer basis, and pr's that don't include full patches 
might take a long time to get worked on.

The maintainer has to try to pull your patches and suggestions out of 
the attachment you sent, try it locally, and, maybe a lot of back and 
forth with the pr submitter (you) to make sure they don't mis-understand 
what you were trying to accomplish.

If you do have some free time, you might want to ask some questions to 
the freebsd-ports mailing list.  Look at the FreeBSD porters handbook 
(online)

Depending on what you are doing, as an example:

#########################
PATCHES
AND WORK-AROUND
#########################
I suggest that a www/py-cherrypy-321 port be temporarily added using CherryPy-3.1.2.tar.gz until the problem with openerp-web.py is solved.

you might add this as a 'BUILD_DEPENDS' or 'RUN_DEPENDS' or both, in the openerp* port Makefile.

if you get to the point where your edited port Makefile works in your environment, you would just submit an attachment with a diff -ruN from the old files to the new onws.

As I said, either that or wait for the maintainer to have the time to sort out what you are doing.




-- 
Michael Scheidell, CTO
 >*| * SECNAP Network Security Corporation
d: +1.561.948.2259
w: http://people.freebsd.org/~scheidell
Comment 6 Michael Scheidell freebsd_committer freebsd_triage 2012-04-17 12:01:24 UTC
State Changed
From-To: feedback->open

Feedback Received.
Comment 7 zebigkool 2012-04-21 17:35:49 UTC
I'll try to make the patches quickly.
Thanks to Franck for his work.
Comment 8 Laurent Berthelet 2012-05-07 07:38:14 UTC
Hi,

Here is the patch.
I can't have the submited version to work so I changed the way pidfile 
and logfile
are set up.

For the postgresql part, I have just added a message in pkg-message as it
can be installed on another computer.

Cheers.

Laurent
Comment 9 Laurent Berthelet 2012-06-03 14:50:14 UTC
Hi,

Should I wait for someone to commit this patch, or should I open a new 
pr with the patch only and ask for this one to be closed ?

Cheers.

Laurent
Comment 10 Michael Scheidell freebsd_committer freebsd_triage 2012-06-11 07:34:15 UTC
Responsible Changed
From-To: freebsd-ports-bugs->scheidell

I'll take it.
Comment 11 Michael Scheidell freebsd_committer freebsd_triage 2012-06-11 07:40:14 UTC
Laurent:

you are probably going to want %%PREFIX%% in here for consistency, I 
will take care of it.

+openerpd_config="${openerpd_config-"/usr/local/etc/openerp-server.conf"}"
+openerpd_user="${openerpd_user-"openerpd"}"
+openerpd_pidfile="${openerpd_pidfile:-"$(grep pidfile /usr/local/etc/openerp-server.conf | awk -F "=" ' { print $2 } ' |sed 's/[ ]//g' )"}"
+openerpd_logdir="${openerpd_logdir:-"$(dirname `grep logfile /usr/local/etc/openerp-server.conf | awk -F "=" ' { print $2 } ' `)"}"
+openerpd_flags="${openerpd_flags:-"--config=${openerpd_config}"}"




-- 
Michael Scheidell, CTO
 >*| * SECNAP Network Security Corporation
d: +1.561.948.2259
w: http://people.freebsd.org/~scheidell
Comment 12 Michael Scheidell freebsd_committer freebsd_triage 2012-06-11 08:19:03 UTC
State Changed
From-To: open->analyzed

Patch analyzed, testing in tinderbox now.
Comment 13 Michael Scheidell freebsd_committer freebsd_triage 2012-06-11 08:20:35 UTC
State Changed
From-To: analyzed->open

GNATS bug, (internal notification might be messed up) disregard this email. just used to kick GNATS.
Comment 14 dfilter service freebsd_committer freebsd_triage 2012-06-12 13:57:07 UTC
scheidell    2012-06-12 12:56:54 UTC

  FreeBSD ports repository

  Modified files:
    finance/openerp-server Makefile 
    finance/openerp-server/files openerp-server.conf.in 
                                 openerpd.in pkg-message.in 
  Log:
  - Fix installation problems by changing how pid is checked
  - Add note to pkg-message about postgresql server
  
  PR:             ports/166534
  Submitted by:   Laurent Berthelet <laurent@ospowa.com> (maintainer)
  Reported by:    Franck PORCHER <franck.porcher@gmail.com>
  
  Revision  Changes    Path
  1.23      +2 -15     ports/finance/openerp-server/Makefile
  1.2       +8 -7      ports/finance/openerp-server/files/openerp-server.conf.in
  1.6       +74 -31    ports/finance/openerp-server/files/openerpd.in
  1.2       +9 -0      ports/finance/openerp-server/files/pkg-message.in
_______________________________________________
cvs-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/cvs-all
To unsubscribe, send any mail to "cvs-all-unsubscribe@freebsd.org"
Comment 15 Michael Scheidell freebsd_committer freebsd_triage 2012-06-12 13:57:11 UTC
State Changed
From-To: open->closed

Committed, with minor changes. Thanks!