[Greater-commits] r405 - in trunk/packaging: . defaultdata
scm-commit@wald.intevation.org
scm-commit at wald.intevation.org
Tue Jul 12 12:14:11 CEST 2011
Author: aheinecke
Date: 2011-07-12 12:14:10 +0200 (Tue, 12 Jul 2011)
New Revision: 405
Modified:
trunk/packaging/README-installer
trunk/packaging/defaultdata/README
trunk/packaging/greater-installer.nsi
Log:
Update readmes, santize postgres and python installation to go into
GREATER's installdir prefix
First version with data packaging
Modified: trunk/packaging/README-installer
===================================================================
--- trunk/packaging/README-installer 2011-07-11 15:18:17 UTC (rev 404)
+++ trunk/packaging/README-installer 2011-07-12 10:14:10 UTC (rev 405)
@@ -40,4 +40,13 @@
The created binary package will be placed in /greater/packaging
+
+Default Settings for the postgres server:
+No shortcuts
+serverport 8890
+serviceaccount greater
+password greater
+prefix $INSTDIR\postgres
+datadir $INSTDIR\GREAT-ER-DB\database
+
Be aware that for distribution you also need to create a source package!
Modified: trunk/packaging/defaultdata/README
===================================================================
--- trunk/packaging/defaultdata/README 2011-07-11 15:18:17 UTC (rev 404)
+++ trunk/packaging/defaultdata/README 2011-07-12 10:14:10 UTC (rev 405)
@@ -3,6 +3,11 @@
This folder contains the default datasets to be installed with GREAT-ER
Server installation.
+There are currently two ways. First is the slow variant using single sql
+statements as they are contianed in the *.sql files the second way which
+will be used by the greater installer is to use a postgresql backup
+file to be imported with pg_restore.
+
Scripts should start with a number indicating the Order in which they
should be executed.
@@ -17,3 +22,7 @@
and then in your editor something like:
%s/^ /Grant all on large object /
%s/$/to greater_standard_role;
+
+Afterwards create a backup dump of the database and put it into the defaultdata
+folder with the name defaultdb.backup
+
Modified: trunk/packaging/greater-installer.nsi
===================================================================
--- trunk/packaging/greater-installer.nsi 2011-07-11 15:18:17 UTC (rev 404)
+++ trunk/packaging/greater-installer.nsi 2011-07-12 10:14:10 UTC (rev 405)
@@ -101,9 +101,30 @@
SetOutPath "$TEMP"
File "postgresql-9.0.4-1-windows.exe" ; Should be more generalized
DetailPrint "Installing PostgreSQL..."
- ExecWait '"$TEMP\postgresql-9.0.4-1-windows.exe" --mode unattended' $0
+ ExecWait '"$TEMP\postgresql-9.0.4-1-windows.exe" --mode unattended --prefix "$INSTDIR\postgres9" \
+ --password greater --serviceaccount greater --serverport 8890 --datadir \
+ "$INSTDIR\GREAT-ER-DB\database" --create_shortcuts 0 --serviceaccount greater-db \
+ --servicepassword greater --servicename greater_postgres_server' $0
Delete "$TEMP\postgresql-9.0.4-1-windows.exe"
banner::destroy
+ ;--------------------------------
+ ; Install default database
+ ; Set the temporary PGPASSWORD variable for this process and it's children
+ System::Call 'Kernel32::SetEnvironmentVariableA(t, t) i("PGPASSWORD", "greater").r0'
+
+ SetOutPath "$TEMP"
+ File "defaultdata\defaultdb.backup"
+ File "defaultdata\10_create_users.sql"
+ File "defaultdata\90_grant_access.sql"
+ DetailPrint "Creating default GREAT-ER datasets"
+ ExecWait '"$INSTDIR\postgres9\bin\pg_restore.exe" -d greater -U greater \
+ "$TEMP\defaultdb.backup"'
+ ExecWait '"$INSTDIR\postgres9\bin\psql" -d greater -U greater \
+ "$TEMP\10_create_users.sql"'
+ ExecWait '"$INSTDIR\postgres9\bin\psql" -d greater -U greater \
+ "$TEMP\90_grant_access.sql"'
+
+ ; Database should now be ready
SectionEnd
Section "Python 2.7.2" SecPython
@@ -111,7 +132,7 @@
SetOutPath "$TEMP"
File "python-2.7.2.msi" ; Should be more generalized
DetailPrint "Installing Python..."
- ExecWait '"msiexec" /i $TEMP\python-2.7.2.msi /quiet' $0
+ ExecWait '"msiexec" /i $TEMP\python-2.7.2.msi /quiet TARGETDIR=$INSTDIR\Python2.7' $0
Delete "$TEMP\python-2.7.2-msi"
banner::destroy
SectionEnd
@@ -175,7 +196,7 @@
;-----------------------------
; Client section
-Section "GREAT-ER Client" client_section_id
+Section "GREAT-ER Desktop" client_section_id
; Include the input files
; package all files, recursively, preserving attributes
; assume files are in the correct places
More information about the Greater-commits
mailing list