[BUGS] BUG #6404: postgres account not created during unattended install

2012-01-20 Thread mark . phillips
The following bug has been logged on the website:

Bug reference:  6404
Logged by:  Mark Phillips
Email address:  mark.phill...@mophilly.com
PostgreSQL version: 9.1.2
Operating system:   Mac OS X 10.7
Description:

for a stand alone app that uses postgres, the app installer invokes the
shell script installbuilder.sh for the "unattended" install of postgres.

The pg installer creates a user "PostgreSQL" that is not hidden, but does
not create a hidden account "postgres". As a result, the invocation of
pg_ctl fails. Error is "unknown login: postgres". 




-- 
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs


[BUGS] BUG #6405: postgres account not created during unattended install

2012-01-20 Thread mark . phillips
The following bug has been logged on the website:

Bug reference:  6405
Logged by:  Mark Phillips
Email address:  mark.phill...@mophilly.com
PostgreSQL version: 9.1.2
Operating system:   Mac OS X 10.7
Description:

for a stand alone app that uses postgres, the app installer invokes the
shell script installbuilder.sh for the "unattended" install of postgres.

The pg installer creates a user "PostgreSQL" that is not hidden, but does
not create a hidden account "postgres". As a result, the invocation of
pg_ctl fails. Error is "unknown login: postgres". 




-- 
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs


Re: [BUGS] BUG #6404: postgres account not created during unattended install

2012-02-03 Thread Mark Phillips
Thank you for the reply. I have spent the better part of this week on this and 
related issues. 

My test procedure is as follows: create VM using Fusion 4.x with a fresh 
install of OS X 10.7. The VM is hosted on a Mac also running 10.7. I create a 
snapshot of this clean image. The first step of each test run is to restore the 
snapshot image. 

With this in mind, the comment about the previous installation does not seem to 
apply to my report. 

After considering your remarks and modifying the app install script, the app 
installation completes normally with a functioning PostgreSQL installation. 
However, the errors reported previous still appear in the logs. 

The unattended mode results in the appearance of a user "PostgreSQL" in the 
User Accounts preferences panel as well as the login window. It is interesting 
to note that a user named "postgres" in any variant does not appear in /Users/ 
directory, nor in the file /etc/passwd/, with the exception of the os x 
standard postgres account.
$ cat /etc/passwd | grep "Postgre"
_postgres:*:216:216:PostgreSQL Server:/var/empty:/usr/bin/false

The "one click" installer does not result in the appearance of the "PostgreSQL" 
user account in the os x GUI.

To recap the questions:
1. are the errors reported in the postgres install log of a type to cause a 
malfunction for end users?
2. how can I suppress the appearance of the user account "PostgreSQL" in the os 
x login window?

Many thanks,

 - Mark

On Jan 30, 2012, at 11:34 PM, Dharmendra Goyal wrote:

> Hi Mark,
> 
> Install log shows that your db installation is successful. The error which 
> you had sent is coming because your earlier installation failed to create 
> 'postgres' user and when you ran the installer again, installer read 
> /etc/postgres-reg.ini file to check any previous installation and found that 
> previous installation was done. Hence installer tries to stop the db server 
> in case it is running using postgres user. This command fails as postgres 
> user was not created in your first installation because of some reason. But 
> in latest installation (for which you have sent the log), postgres user has 
> been created successfully and installation went successfully. You need to 
> check why postgres user was not created in first go by checking logs of that 
> installation.
> 
> You are checking return status of the installbuilder.sh command run which is 
> not 0 hence you are getting error ("install of DBMS failed".) in your script. 
> Can yu please check what is the return value in your script of 
> installbuilder.sh.
> 
> Regards,
> 
> On Tue, Jan 31, 2012 at 5:37 AM, Mark Phillips  
> wrote:
> 
> On Jan 29, 2012, at 11:07 PM, Dharmendra Goyal wrote:
> 
>> On Sat, Jan 21, 2012 at 3:01 AM,  wrote:
>> The following bug has been logged on the website:
>> 
>> Bug reference:  6404
>> Logged by:  Mark Phillips
>> Email address:  mark.phill...@mophilly.com
>> PostgreSQL version: 9.1.2
>> Operating system:   Mac OS X 10.7
>> Description:
>> 
>> for a stand alone app that uses postgres, the app installer invokes the
>> shell script installbuilder.sh for the "unattended" install of postgres.
>> 
>> The pg installer creates a user "PostgreSQL" that is not hidden, but does
>> not create a hidden account "postgres". As a result, the invocation of
>> pg_ctl fails. Error is "unknown login: postgres".
>> pg installer creates "postgres" user which somehow seems to be failing at 
>> your machine. Can you please send installation log which can be found under 
>> /tmp/install-postgresql.log. Also if you can run 
>> installation_path/installer/server/createuser.sh script manually and check 
>> the output, it can be helpful.
>> 
>> Thanks,
>> -- 
>> Dharmendra Goyal
> 
> Thank you for the reply. I apologize for the delay in responding.
> 
> File install-postgresql.log attached.
> 
> Please review the link below to a post in the postgresql forum for a bit more 
> detail about this issue:
> 
>   http://forums.enterprisedb.com/posts/list/3042.page
> 
> I looked into running the createuser.sh script. However, I encountered a bit 
> of new information before I could get that far so I include it here in case 
> it is relevant. 
> 
> Beginning anew with a clean os install, I ran the app installer that invokes 
> the postgresql installer.
> 
> Here is a snippet of the installer script that relates to installing postgres:
> 
>   # adjust current settings to allow the install to execute properly
>   log "adjust current shared memory settings"
>   log &qu

Re: [BUGS] BUG #6404: postgres account not created during unattended install

2012-02-04 Thread Mark Phillips
Thank you for your reply.

On Feb 3, 2012, at 9:31 AM, Dharmendra Goyal wrote:

> On Fri, Feb 3, 2012 at 10:37 PM, Mark Phillips  
> wrote:
> After considering your remarks and modifying the app install script, the app 
> installation completes normally with a functioning PostgreSQL installation. 
> However, the errors reported previous still appear in the logs. 
> If erros which you sent last tim appear  even when you run the installation 
> first time, it means that there was an existing installation of postgres. You 
> can confirm same by checking /etc/postgres-reg.ini file.

Immediately after restoration of the vm image, there is no file 
/etc/postgres-reg.ini. Perhaps it is placed elsewhere by the OS X designers. I 
cannot find it with locate enabled and run as root. 

The file is present after I run the postgres installer. 


> To recap the questions:
> 1. are the errors reported in the postgres install log of a type to cause a 
> malfunction for end users?
> Even if the error (postgres user not found) is there in the log, it will not 
> cause any problem to the end user. Error is coming because installer finds a 
> previous installation of PG hence tries to stop the existing pg server if it 
> is running. So even if it is not able to stop any, it is not going to cause 
> any issue as subsequent installation of pg goes fine. 

This is good news. :-)

> 2. how can I suppress the appearance of the user account "PostgreSQL" in the 
> os x login window?
> Please check /etc/postgres-reg.ini file for bindled pg installation.  

Forgive me for being redundant, but I cannot locate a file named 
"postgres-reg.ini" prior to running the installer.

Here is the content from the file /etc/postgres-reg.ini written by the postgres 
installer:

$ cat etc/postgres-reg.ini 
[PostgreSQL/9.1]
Branding=PostgreSQL 9.1
DataDirectory=/Library/PostgreSQL/9.1/data
Description=PostgreSQL 9.1
DisableStackBuilder=0
InstallationDirectory=/Library/PostgreSQL/9.1
Locale=C
Port=5432
Serviceaccount=postgres
ServiceID=postgresql-9.1
Shortcuts=1
Superuser=postgres
Version=9.1.2.1

You thoughts are most welcome.

 - Mark


> 
> Many thanks,
> 
>  - Mark
> 
> On Jan 30, 2012, at 11:34 PM, Dharmendra Goyal wrote:
> 
>> Hi Mark,
>> 
>> Install log shows that your db installation is successful. The error which 
>> you had sent is coming because your earlier installation failed to create 
>> 'postgres' user and when you ran the installer again, installer read 
>> /etc/postgres-reg.ini file to check any previous installation and found that 
>> previous installation was done. Hence installer tries to stop the db server 
>> in case it is running using postgres user. This command fails as postgres 
>> user was not created in your first installation because of some reason. But 
>> in latest installation (for which you have sent the log), postgres user has 
>> been created successfully and installation went successfully. You need to 
>> check why postgres user was not created in first go by checking logs of that 
>> installation.
>> 
>> You are checking return status of the installbuilder.sh command run which is 
>> not 0 hence you are getting error ("install of DBMS failed".) in your 
>> script. Can yu please check what is the return value in your script of 
>> installbuilder.sh.
>> 
>> Regards,
>> 
>> On Tue, Jan 31, 2012 at 5:37 AM, Mark Phillips  
>> wrote:
>> 
>> On Jan 29, 2012, at 11:07 PM, Dharmendra Goyal wrote:
>> 
>>> On Sat, Jan 21, 2012 at 3:01 AM,  wrote:
>>> The following bug has been logged on the website:
>>> 
>>> Bug reference:  6404
>>> Logged by:  Mark Phillips
>>> Email address:  mark.phill...@mophilly.com
>>> PostgreSQL version: 9.1.2
>>> Operating system:   Mac OS X 10.7
>>> Description:
>>> 
>>> for a stand alone app that uses postgres, the app installer invokes the
>>> shell script installbuilder.sh for the "unattended" install of postgres.
>>> 
>>> The pg installer creates a user "PostgreSQL" that is not hidden, but does
>>> not create a hidden account "postgres". As a result, the invocation of
>>> pg_ctl fails. Error is "unknown login: postgres".
>>> pg installer creates "postgres" user which somehow seems to be failing at 
>>> your machine. Can you please send installation log which can be found under 
>>> /tmp/install-postgresql.log. Also if you can run 
>>> installation_path/installer/server/createuser.sh script manually and check 
>>> the output, it can be helpful.
>>> 
>>> Thank