Re: postgres intallation failed

1998-06-29 Thread Jeff Noxon
On Sat, Jun 27, 1998 at 11:14:19AM +0200, Networking Wizard wrote:
 After Shared PostgreSQL library intsallation (libpgsql 6.3.2-8)
 i've been trying to inttall postgresql (6.3.2-8) severl times,
 but i did not succeed; dpkg terminates because of unspecified errors.
 Here is the log:
 
  Unpacking replacement postgresql ...
  Setting up postgresql (6.3.2-8) ...
  Now installing the PostgreSQL database files in /var/postgres/data
  su - postgres -c 
  PATH=/usr/uxs:/root/uxs:/root/bin:/sbin:/usr/sbin:/usr/local/sbin:/bin:/usr/bin:/usr/local/bin:/usr/X11R6/bin:/usr/lib/postgresql/bin:/usr/lib/postgresql/bin;
   initdb -l /usr/lib/postgresql/lib -r /var/postgres/data -u postgres
  dpkg: error processing postgresql (--install):

[snip]

I think the bug is in base-passwd.

You need to edit /etc/passwd so that the shell is /bin/sh or similar.  I
filed a bug report on base-passwd about this.

Jeff


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


Re: postgres intallation failed

1998-06-29 Thread Oliver Elphick
Jeff Noxon wrote:
  On Sat, Jun 27, 1998 at 11:14:19AM +0200, Networking Wizard wrote:
   After Shared PostgreSQL library intsallation (libpgsql 6.3.2-8)
   i've been trying to inttall postgresql (6.3.2-8) severl times,
   but i did not succeed; dpkg terminates because of unspecified errors.
   Here is the log:
   
Unpacking replacement postgresql ...
Setting up postgresql (6.3.2-8) ...
Now installing the PostgreSQL database files in /var/postgres/data
su - postgres -c PATH=/usr/uxs:/root/uxs:/root/bin:/sbin:/usr/sbin:/usr/
  local/sbin:/bin:/usr/bin:/usr/local/bin:/usr/X11R6/bin:/usr/lib/postgres
  ql/bin:/usr/lib/postgresql/bin; initdb -l /usr/lib/postgresql/lib -r /va
  r/postgres/data -u postgres
dpkg: error processing postgresql (--install):
  
  [snip]
  
  I think the bug is in base-passwd.
  
  You need to edit /etc/passwd so that the shell is /bin/sh or similar.  I
  filed a bug report on base-passwd about this.

The bug is not in base-passwd but in postgresql.  I used adduser to create
the account if it did't exist, but I had not noticed that `adduser --system'
assigns /bin/false as the shell.  I have changed postgresql-6.3.2-11
to use useradd instead.  This is bug#24036.

-- 
Oliver Elphick[EMAIL PROTECTED]
Isle of Wight  http://www.lfix.co.uk/oliver
   PGP key from public servers; key ID 32B8FAA1
 
 For I am not ashamed of the gospel of Christ; for it 
  is the power of God unto salvation to every one that 
  believeth; to the Jew first, and also to the Greek.  
 Romans 1:16 



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


Re: postgres intallation failed

1998-06-29 Thread Jeff Noxon
On Mon, Jun 29, 1998 at 06:29:17AM +0200, Oliver Elphick wrote:
 The bug is not in base-passwd but in postgresql.  I used adduser to create
 the account if it did't exist, but I had not noticed that `adduser --system'
 assigns /bin/false as the shell.  I have changed postgresql-6.3.2-11
 to use useradd instead.  This is bug#24036.

If you don't use --system, will the uid still be 1000?  And shouldn't this
uid be consistent across multiple Debian installations?

Has someone already closed the base-passwd bug, or should I?

Jeff


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


Re: postgres intallation failed

1998-06-28 Thread Networking Wizard
On Jun 27 1998 , Oliver Elphick wrote:
 To find out what is going wrong with initdb:
 Edit /usr/lib/postgresql/bin/initdb and add the line `set +x' after the 
 first line.  Then become root and run the initialisation command (this
 is all one line):
  su - postgres -c PATH=$PATH:/usr/lib/postgresql/bin; initdb -l 
 /usr/lib/postgresql/lib -r /var/postgres/data -u postgres
 

Entering the initialization command, as you suggested,

%% su - postgres -c path=$path:/usr/lib/postgresql/bin; initdb -l  
/usr/lib/postgresql/lib -r /var/postgres/data -u postgres

yields no output, even after adding 'set +x' at the second line of initdb 
script. 
The command executes silently, but, as a result, postgres server was not 
running. 

To make initdb talk, i assigned postgres a password and bash shell, then 
su postgres and entered the initialization line:

%% su postgres 
$ PATH=/bin:/sbin/:/usr/bin/:usr/sbin:/usr/lib/postgresql/bin
$ initdb -l /usr/lib/postgresql/lib -r /var/postgres/data -u postgres   

initdb: using /usr/lib/postgresql/lib/local1_template1.bki.source as \
input to create the template database.
initdb: using /usr/lib/postgresql/lib/global1.bki.source as input to \
create the global classes.
initdb: using /usr/lib/postgresql/lib/pg_hba.conf.sample as the \
host-based authentication control file.

We are initializing the database system with username postgres (uid=100).
This user will own all the files and must also own the server process.

rm: /var/postgres/data/base/template1: Permission denied
mkdir: cannot make directory `/var/postgres/data/base/template1': \
Permission denied
initdb: creating template database in /var/postgres/data/base/template1
Running: postgres -boot -C -F -D/var/postgres/data -Q template1
ERROR:  cannot create pg_proc
ERROR:  cannot create pg_proc
/usr/lib/postgresql/bin/initdb: line 269: 15069 Broken pipe  \
   cat $TEMPLATE
 15070   | sed -e s/postgres \
PGUID/$POSTGRES_SUPERUSERNAME $POSTGRES_SUPERUID/ -e \
s/PGUID/$POSTGRES_SUPERUID/
 15071 Segmentation fault  | postgres $BACKENDARGS template1
initdb: could not create template database
initdb: cleaning up by wiping out /var/postgres/data/base/template1
rm: /var/postgres/data/base/template1: Permission denied

It seemed a write-permission denial in /var/postgres sub-tree. Therefore 
i switched back to root and changed the owner of /var/postgres:

%% chown -R postgres.postgres  /var/postgres  

This time postgres user was able to complete the initiatization script.
I was able to create users allowed to access and change databases, so i think 
postgres is running correctly now.
Yet i had to start postmaster by line command; i noticed that postgres 
directive 
is not contained in  /etc/rc*.d/ directories. Is it a desired feature or is it
due to my non-orthodox installation procedure?

In any case, thank you for your help


Paolo Pumilia


--- cstc - 








-- 


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


Re: postgres intallation failed

1998-06-28 Thread Oliver Elphick
Networking Wizard wrote:
...
  It seemed a write-permission denial in /var/postgres sub-tree. Therefore 
  i switched back to root and changed the owner of /var/postgres:
  
  %% chown -R postgres.postgres  /var/postgres  

I think I'll add this to the postinst script

  
  This time postgres user was able to complete the initiatization script.
  I was able to create users allowed to access and change databases, so i thin
  k 
  postgres is running correctly now.
  Yet i had to start postmaster by line command; i noticed that postgres direc
  tive 
  is not contained in  /etc/rc*.d/ directories. Is it a desired feature or is 
  it
  due to my non-orthodox installation procedure?

It's probably because the postinst script failed.  You should have a 
/etc/init.d/postgresql file, with the following symbolic links to it:

/etc/rc0.d/K20postgresql  /etc/rc3.d/S20postgresql  /etc/rc6.d/K20postgresql
/etc/rc1.d/K20postgresql  /etc/rc4.d/S20postgresql
/etc/rc2.d/S20postgresql  /etc/rc5.d/S20postgresql


-- 
Oliver Elphick[EMAIL PROTECTED]
Isle of Wight  http://www.lfix.co.uk/oliver
   PGP key from public servers; key ID 32B8FAA1
 
 For I am not ashamed of the gospel of Christ; for it 
  is the power of God unto salvation to every one that 
  believeth; to the Jew first, and also to the Greek.  
 Romans 1:16 



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


Re: postgres intallation failed

1998-06-27 Thread Oliver Elphick
Networking Wizard wrote:
  After Shared PostgreSQL library intsallation (libpgsql 6.3.2-8)
  i've been trying to inttall postgresql (6.3.2-8) severl times,
  but i did not succeed; dpkg terminates because of unspecified errors.
  Here is the log:
  
   Unpacking replacement postgresql ...
   Setting up postgresql (6.3.2-8) ...
   Now installing the PostgreSQL database files in /var/postgres/data
   su - postgres -c PATH=/usr/uxs:/root/uxs:/root/bin:/sbin:/usr/sbin:/usr/lo
  cal/sbin:/bin:/usr/bin:/usr/local/bin:/usr/X11R6/bin:/usr/lib/postgresql
  /bin:/usr/lib/postgresql/bin; initdb -l /usr/lib/postgresql/lib -r /var/
  postgres/data -u postgres
   dpkg: error processing postgresql (--install):
subprocess post-installation script returned error exit status 1
   Errors were encountered while processing:
postgresql
  
  Shadow passwords have been installed on machine. Could this error be 
  ascribed to shadow password for 'postgres' postmater account?

I don't think so.  I use shadow passwords and have no problem.

The current state of the package is that it is unpacked and should be present 
on your disk.  If you have never installed it before, it needs to create a
new database - this is the step it has failed on.  However, I see that
this was a 'replacement postgresql': had you created a database with
an earlier version? 

To find out what is going wrong with initdb:
Edit /usr/lib/postgresql/bin/initdb and add the line `set +x' after the 
first line.  Then become root and run the initialisation command (this
is all one line):

 su - postgres -c PATH=$PATH:/usr/lib/postgresql/bin; initdb -l 
/usr/lib/postgresql/lib -r /var/postgres/data -u postgres

It should now be possible to see where failure is occurring - please send
me the screen output.

  By the way, which password will be assigned to postmaster, during the
  installation?

If postgres is installed from base-passwd; it needs (I think) to be
enabled by assigning it a password.  If it does not exist when postgresql's
preinst script runs, it is created with `adduser --disabled-password'.  You
cannot log in as postgres until it is assigned a password (but root can still 
su to it.)

Oliver Elphick
PostgreSQL maintainer for Debian
-- 
Oliver Elphick[EMAIL PROTECTED]
Isle of Wight  http://www.lfix.co.uk/oliver
   PGP key from public servers; key ID 32B8FAA1
 
 For I am not ashamed of the gospel of Christ; for it 
  is the power of God unto salvation to every one that 
  believeth; to the Jew first, and also to the Greek.  
 Romans 1:16 



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