Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 348712 - app-office/openerp-server-5.0.6 - createuser: unrecognized option '--quiet'
Summary: app-office/openerp-server-5.0.6 - createuser: unrecognized option '--quiet'
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Jean-Noël Rivasseau (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-12-14 13:39 UTC by Bjoern Olausson
Modified: 2011-01-14 11:04 UTC (History)
3 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
openerp-server.cfg (openerp-server.cfg,1.13 KB, text/plain)
2010-12-14 17:33 UTC, Bjoern Olausson
Details
openerp-web.cfg (openerp-web.cfg,1.69 KB, text/plain)
2010-12-14 17:33 UTC, Bjoern Olausson
Details
/etc/logrotate.d/openerp-server (openerp-server,219 bytes, text/plain)
2010-12-14 18:03 UTC, Bjoern Olausson
Details
/etc/logrotate.d/openerp-web (openerp-web,254 bytes, text/plain)
2010-12-14 18:03 UTC, Bjoern Olausson
Details
openerp-server-5.0.15.ebuild (openerp-server-5.0.15.ebuild,1.83 KB, text/plain)
2010-12-25 23:38 UTC, INODE64 Sistemas
Details
openerp-server (openerp-server,668 bytes, text/plain)
2010-12-25 23:39 UTC, INODE64 Sistemas
Details
openerp-server-confd (openerp-server-confd,91 bytes, text/plain)
2010-12-25 23:40 UTC, INODE64 Sistemas
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Bjoern Olausson 2010-12-14 13:39:21 UTC
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:
Comment 1 Bjoern Olausson 2010-12-14 14:47:29 UTC
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
Comment 2 Bjoern Olausson 2010-12-14 17:32:39 UTC
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
Comment 3 Bjoern Olausson 2010-12-14 17:33:33 UTC
Created attachment 257155 [details]
openerp-server.cfg
Comment 4 Bjoern Olausson 2010-12-14 17:33:49 UTC
Created attachment 257157 [details]
openerp-web.cfg
Comment 5 Bjoern Olausson 2010-12-14 18:03:26 UTC
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
Comment 6 Bjoern Olausson 2010-12-14 18:03:45 UTC
Created attachment 257164 [details]
/etc/logrotate.d/openerp-web
Comment 7 Jean-Noël Rivasseau (RETIRED) gentoo-dev 2010-12-15 20:11:19 UTC
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.
Comment 8 Bjoern Olausson 2010-12-15 20:24:41 UTC
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
Comment 9 Jean-Noël Rivasseau (RETIRED) gentoo-dev 2010-12-15 20:32:33 UTC
> 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.
Comment 10 Bjoern Olausson 2010-12-15 22:01:19 UTC
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
Comment 11 Bjoern Olausson 2010-12-16 08:41:00 UTC
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
Comment 12 INODE64 Sistemas 2010-12-25 23:38:11 UTC
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
Comment 13 INODE64 Sistemas 2010-12-25 23:39:53 UTC
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
Comment 14 INODE64 Sistemas 2010-12-25 23:40:11 UTC
Created attachment 258061 [details]
openerp-server-confd

remove user, not used
Comment 15 Jelco Huijser 2011-01-05 23:48:07 UTC
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
Comment 16 Jean-Noël Rivasseau (RETIRED) gentoo-dev 2011-01-14 10:33:23 UTC
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.
Comment 17 Bjoern Olausson 2011-01-14 11:04:29 UTC
Thanks! Looks promising!

Kind regards,
Bjoern