Running emerge --config =app-office/openerp-server-5.0.6 fails because /usr/lib64/postgresql-8.4/bin/createuser does not know the option "--quiet" erp portage # emerge --config =app-office/openerp-server-5.0.6 Configuring pkg... * In the following, the 'postgres' user will be used. * Creating database user openerp ... /usr/lib64/postgresql-8.4/bin/createuser: unrecognized option '--quiet' Try "createuser --help" for more information. Cheers Bjoern Reproducible: Always Steps to Reproduce:
While I am on it.... openerp 5.0.6 is _not_ compatible with python 2.6 So either you bump your ebuild to 5.0.15 (what I did andit worked for me) or you have to depend on python 2.5 Cheers, Bjoern
Some more changes: - Create /var/log/openerp/ and chown it to openerp - Add out of the box config files (I added examples) and copy them to /etc/openerp/ (You might want to edit them during emerge --config) - Drop the PID creation from the openerp-server init file - Add openerp user to the postgres group (otherwise the user can't connect) - Assign a random password to "admin_passwd" and echo it during emerge --congif One last thing I could not figure out is how to properly shutdown the openerp-server. STRG-C does not work, start-stop-deamon does not kill the server. Only thing that helps is a "kill -kill `cat /var/run/openerp/openerp-server.pid`" So as a workaround you might simply kill the server... I am not sure if it is required to add a password to the postgres user "openerp" since the default postgres configuration is to trust local connections. So you might set "db_password = {False, None, ""}" (I don't know which one works) Cheers, Bjoern
Created attachment 257155 [details] openerp-server.cfg
Created attachment 257157 [details] openerp-web.cfg
Created attachment 257163 [details] /etc/logrotate.d/openerp-server You might as well add the "logrotate" useflag. Please find attached the logrotate files for server and web
Created attachment 257164 [details] /etc/logrotate.d/openerp-web
Are you sure 5.0.6 is not compatible with Python 2.6? I have this running on a production server with 2.6 and I never had a problem. I will look at the other stuff you pointed out when I get time.
Well, it didn't work on a fres gentoo install with 2.6 and it is mentioned in the official documentation: ~~~~ QUOTE ~~~~ Ubuntu 9.04 comes with python 2.6 and the stable version until 5.0.6 is not compatible with python 2.6. For the latest stable version the above steps are sufficient. Hence following steps must be performed to install openerp server till 5.0.6 on ubuntu 9.04. ~~~~~~~~~~~~~~~ Source: http://doc.openerp.com/install/linux/server/index.html#installing-the-open-erp-server Thanks for looking into the other stuff. It would complete the ebuild ;-) Cheers Bjoern
> and the stable version until 5.0.6 is not compatible with python 2.6 This probably means that starting with 5.0.6 it is compatible with 2.6. As I said for me it works well. On your install it must have been other problems, we'll figure that out.
But why not bump the ebuild to the latest version? With this version the problems where gone and 5.0.15 is the current upstream stable release. So we should not worry too much about this initial problem. 5.0.15 is running stable for me on amd64 Cheers Bjoern
Can you verify that the openerp user must be in the postgres group? I just tried it again and without postgres group, openerp-server can't connect to the DB. Cheers, Bjoern
Created attachment 258057 [details] openerp-server-5.0.15.ebuild new version fix postgres 9.0 create initial configuracion only use user por database, for my the server not up update to 5.0.15
Created attachment 258059 [details] openerp-server fix no create pidfile fix orden in -- sugestion postgres not segure run in same server change need for after postgresql
Created attachment 258061 [details] openerp-server-confd remove user, not used
running the emerge --config =app-office/openerp-server-5.0.6 command I encountered exactly the same error (no suprise). In order to solve the unrecognized --quiet option for createuser I tweaked the script /usr/lib64/eselect-postgresql/binwrapper to hide the '--quiet' command line option. ----- #!/bin/bash [[ -d /etc/eselect/postgresql/active ]] || { echo "Use eselect to set postgresql version"; exit 1; } for src in /etc/eselect/postgresql/active/* ; do [[ -f "${src}" ]] && source $src done bn="$(basename "$0")" bex="${postgres_bindir}/${bn}" if [[ -x "${bex}" ]] ; then testExec="createuser" testOption="--quiet" if [[ "${bn}" == "${testExec}" && "$1" = "${testOption}" ]]; then exec "${bex}" ${@##"${testOption}"} else exec "${bex}" "$@" fi else echo "Program '${bn}' is not installed or not available for" echo "currently selected version of postgresql." echo "Use 'eselect postgresql' command to set different" echo "PostgreSQL version" exit 1 fi
Fixed. Some of the improvements suggested here were added to the latest ebuild, some not. If you have further suggestions etc please open a new bug.
Thanks! Looks promising! Kind regards, Bjoern