On Fri, Sep 23, 2005 at 01:36:05AM -0400, sean finney wrote:
> do you also have this problem in 1.8.4?  i've never seen this problem
> before, so i'm going to guess that it exists in both versions, but would
> be good to know for sure.
Yes, it is there with 1.8.4
The good news is I have found the problem.

> okay, there's obviously something braindead going on there.  it may
> in fact be related though.  can you try hardcoding your package to
> only work with pgsql and see if you still get errors?
db-test-pgsql also fails to install.

Have a look at this from a typescript
++ su postgres -c 'env HOME='\''/tmp/dbconfig-common.psql_home.pyK3Ao'\'' 
PGSSLMODE='\''prefer'\'' psql --set ON_ERROR_STOP=1 -q  -U '\''postgres'\'' -U 
'\''postgres'\'' template1'^M
+ dbc_error=^M
+ retval=1^M

and this:
fozzie:~# su postgres
fozzie:~# id
uid=0(root) gid=0(root) groups=0(root)
fozzie:~# grep postgres /etc/passwd
postgres:x:108:108:PostgreSQL administrator,,,:/var/lib/postgresql:/bin/false

/bin/false means you need to su -s /bin/sh

postgresql-common.postinst creates the postgres system user:
if [ "$1" = configure ]; then
    # Make sure the administrative user exists
    if ! getent passwd postgres > /dev/null; then
        adduser --system --quiet --no-create-home --home /var/lib/postgresql 
--group --gecos "PostgreSQL administrator" postgres
    fi

adduser(8) states:
       A home directory is created by the same rules as for normal users.  The
       new system user will have the shell /bin/false (unless overridden with

Therefore dbconfig-common will not work with postgresql using that 
database in its default setup.  

Fortunately the solution is trivial, make su use specify a shell.

That fixes the first set of bugs.
Now, a chown problem, I'm using db-test-pgsql.

Why does this happen? From the typescript again with the su fixed.
+ chown -R dbtestpgsql /tmp/dbconfig-common.psql_home.5tU57X^M
chown: `dbtestpgsql': invalid user^M

Indeed! it is an invalid user, its not a unix user but a postgresql
user.

> also, could you post your source package online somewhere so i could
> take a look at it and use it to try and flush out the bug?
I can do that, but db-test-pgsql is a decent enough test for now.

 - Craig

-- 
Craig Small      GnuPG:1C1B D893 1418 2AF4 45EE  95CB C76C E5AC 12CA DFA5
Eye-Net Consulting http://www.enc.com.au/   MIEE         Debian developer
csmall at : enc.com.au                      ieee.org           debian.org


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to