svn commit: r790024 - in /ofbiz/trunk/debian: ofbiz-applications.postinst ofbiz-applications.prerm ofbiz-framework.config ofbiz-framework.postinst ofbiz-specialpurpose.postinst ofbiz-specialpurpose.prerm po/templates.pot

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

svn commit: r790024 - in /ofbiz/trunk/debian: ofbiz-applications.postinst ofbiz-applications.prerm ofbiz-framework.config ofbiz-framework.postinst ofbiz-specialpurpose.postinst ofbiz-specialpurpose.prerm po/templates.pot

doogie-3
Author: doogie
Date: Wed Jul  1 02:27:18 2009
New Revision: 790024

URL: http://svn.apache.org/viewvc?rev=790024&view=rev
Log:
Major reworking; applications and specialpurpose now trigger
framework.  Start working on supporting the new postgres field type
mapping.  A few other minor improvements.

At this point, the 3 packages can be installed separately, or
together, and you'll get just what you want.  Yes, this means that
ofbiz-framework is stand-alone now.

Added:
    ofbiz/trunk/debian/ofbiz-specialpurpose.postinst
    ofbiz/trunk/debian/ofbiz-specialpurpose.prerm
Modified:
    ofbiz/trunk/debian/ofbiz-applications.postinst
    ofbiz/trunk/debian/ofbiz-applications.prerm
    ofbiz/trunk/debian/ofbiz-framework.config
    ofbiz/trunk/debian/ofbiz-framework.postinst
    ofbiz/trunk/debian/po/templates.pot

Modified: ofbiz/trunk/debian/ofbiz-applications.postinst
URL: http://svn.apache.org/viewvc/ofbiz/trunk/debian/ofbiz-applications.postinst?rev=790024&r1=790023&r2=790024&view=diff
==============================================================================
--- ofbiz/trunk/debian/ofbiz-applications.postinst (original)
+++ ofbiz/trunk/debian/ofbiz-applications.postinst Wed Jul  1 02:27:18 2009
@@ -1,4 +1,5 @@
 #!/bin/sh
+set -e
 
 . /usr/share/debconf/confmodule
 ofbiz_init_invoke() {

Modified: ofbiz/trunk/debian/ofbiz-applications.prerm
URL: http://svn.apache.org/viewvc/ofbiz/trunk/debian/ofbiz-applications.prerm?rev=790024&r1=790023&r2=790024&view=diff
==============================================================================
--- ofbiz/trunk/debian/ofbiz-applications.prerm (original)
+++ ofbiz/trunk/debian/ofbiz-applications.prerm Wed Jul  1 02:27:18 2009
@@ -1,4 +1,5 @@
 #!/bin/sh
+set -e
 
 . /usr/share/debconf/confmodule
 if [ -x "/etc/init.d/ofbiz" ]; then

Modified: ofbiz/trunk/debian/ofbiz-framework.config
URL: http://svn.apache.org/viewvc/ofbiz/trunk/debian/ofbiz-framework.config?rev=790024&r1=790023&r2=790024&view=diff
==============================================================================
--- ofbiz/trunk/debian/ofbiz-framework.config (original)
+++ ofbiz/trunk/debian/ofbiz-framework.config Wed Jul  1 02:27:18 2009
@@ -61,6 +61,23 @@
  echo $chars
  )
 }
+get() {
+ var_name="$1"
+ debconf_name="$2"
+ shift 2
+ if db_get "$debconf_name"; then
+ if eval ! [ "\"\$$var_name\" = \"\$RET\"" ]; then
+ while [ $# -gt 0 ]; do
+ eval $1=1
+ shift
+ done
+ eval $var_name=\"\$RET\"
+ fi
+ else
+ echo "Couldn't fetch '$debconf_name' from debconf!"
+ exit 1
+ fi
+}
 if [ -r "/etc/ofbiz/debconf.cfg" ]; then
  eval `sed -n 's/^ofbiz\.admin\.\(port\|key\)=\(.*\)/ofbiz_admin_\1=\2;/p' "/etc/ofbiz/debconf.cfg" `
 fi
@@ -71,6 +88,10 @@
 #db_set ofbiz/admin-password ofbiz || true
 set_if ofbiz/admin-user "$ofbiz_admin_user" || true
 set_if ofbiz/admin-port "$ofbiz_admin_port" || true
+cmd="$1"
+shift
+version="$2"
+shift || true
 
 ofb_dc_admin_user() {
  db_input high ofbiz/admin-user || true
@@ -78,15 +99,22 @@
 ofb_dc_admin_port() {
  db_input low ofbiz/admin-port || true
 }
+ofb_dc_get_dbcc() {
+ . /etc/dbconfig-common/ofbiz.conf
+}
+ofb_dc_postgresql_fieldtype() {
+ if [ "$dbc_dbtype" = "pgsql" ]; then
+ db_input low ofbiz/fieldtype/postgres || true
+ fi
+}
 declare -a ofb_dc_list
 ofb_dc_list=(
  ofb_dc_admin_user
  ofb_dc_admin_port
+# ofb_dc_get_dbcc
+ ofb_dc_postgresql_fieldtype
 )
 
-cmd="$1"
-shift
-
 case "$cmd" in
  (configure|reconfigure)
  STATE=0
@@ -102,7 +130,9 @@
  done
  ;;
 esac
+get ofbiz_admin_port ofbiz/admin-port
 db_stop
+
 if [ "z" = "z$ofbiz_admin_port" ]; then
  ofbiz_admin_port="10523"
 fi

Modified: ofbiz/trunk/debian/ofbiz-framework.postinst
URL: http://svn.apache.org/viewvc/ofbiz/trunk/debian/ofbiz-framework.postinst?rev=790024&r1=790023&r2=790024&view=diff
==============================================================================
--- ofbiz/trunk/debian/ofbiz-framework.postinst (original)
+++ ofbiz/trunk/debian/ofbiz-framework.postinst Wed Jul  1 02:27:18 2009
@@ -41,9 +41,11 @@
  case "$source" in
  (framework/entity/config/entityengine.xml)
  . /etc/dbconfig-common/ofbiz.conf
+ get pg_fieldtype ofbiz/fieldtype/postgres
  xalan \
  -xsl "$OFBIZ_HOME/support/entityengine.xslt" \
  -in "$OFBIZ_HOME/ucf/$source" \
+ -param pgfieldtype "'$pg_fieldtype'" \
  -param dbtype "'$dbc_dbtype'" \
  -param dbuser "'$dbc_dbuser'" \
  -param dbpass "'$dbc_dbpass'" \
@@ -67,22 +69,6 @@
  eval /etc/init.d/ofbiz install $extra
  rm -rf "/var/lib/ofbiz/import"
 }
-get_random_chars() {
- (
- LANG=C
- LC_ALL=C
- length="$1"
- chars=""
- while :; do
- needed_length=$((${length} - ${#chars}))
- chars="$chars$(dd if=/dev/urandom count="${needed_length}" bs=1 2>/dev/null | sed -n -e 's/[^[:alnum:]]//g;p;q')"
- if [ "${#chars}" -ge "$length" ]; then
- break
- fi
- done
- echo $chars
- )
-}
 get() {
  var_name="$1"
  debconf_name="$2"
@@ -115,11 +101,7 @@
 dbc_generate_include=sh:/etc/ofbiz/dbc-debconf.cfg
 [ "$1" != "triggered" ] && dbc_go ofbiz "$@"
 if [ -e /etc/ofbiz/dbc-debconf.cfg ]; then
- ofbiz_admin_key=""
  . /etc/ofbiz/dbc-debconf.cfg
-else
- ofbiz_admin_key="$(get_random_chars 32)"
- ofbiz_readers=""
 fi
 if [ -r "/etc/ofbiz/debconf.cfg" ]; then
  chown root:ofbiz "/etc/ofbiz/debconf.cfg"

Added: ofbiz/trunk/debian/ofbiz-specialpurpose.postinst
URL: http://svn.apache.org/viewvc/ofbiz/trunk/debian/ofbiz-specialpurpose.postinst?rev=790024&view=auto
==============================================================================
--- ofbiz/trunk/debian/ofbiz-specialpurpose.postinst (added)
+++ ofbiz/trunk/debian/ofbiz-specialpurpose.postinst Wed Jul  1 02:27:18 2009
@@ -0,0 +1,21 @@
+#!/bin/sh
+set -e
+
+. /usr/share/debconf/confmodule
+ofbiz_init_invoke() {
+ if [ -x "/etc/init.d/ofbiz" ]; then
+ if [ -x "`which invoke-rc.d 2>/dev/null`" ]; then
+ invoke-rc.d ofbiz $1 || exit $?
+ else
+ /etc/init.d/ofbiz $1 || exit $?
+ fi
+ fi
+}
+case "$1" in
+ (configure|reconfigure)
+ ofbiz_init_invoke stop
+ dpkg-trigger --no-await ofbiz-install
+ ;;
+esac
+#DEBHELPER#
+db_stop

Added: ofbiz/trunk/debian/ofbiz-specialpurpose.prerm
URL: http://svn.apache.org/viewvc/ofbiz/trunk/debian/ofbiz-specialpurpose.prerm?rev=790024&view=auto
==============================================================================
--- ofbiz/trunk/debian/ofbiz-specialpurpose.prerm (added)
+++ ofbiz/trunk/debian/ofbiz-specialpurpose.prerm Wed Jul  1 02:27:18 2009
@@ -0,0 +1,13 @@
+#!/bin/sh
+set -e
+
+. /usr/share/debconf/confmodule
+if [ -x "/etc/init.d/ofbiz" ]; then
+ if [ -x "`which invoke-rc.d 2>/dev/null`" ]; then
+ invoke-rc.d ofbiz stop || exit $?
+ else
+ /etc/init.d/ofbiz stop || exit $?
+ fi
+fi
+#DEBHELPER#
+db_stop

Modified: ofbiz/trunk/debian/po/templates.pot
URL: http://svn.apache.org/viewvc/ofbiz/trunk/debian/po/templates.pot?rev=790024&r1=790023&r2=790024&view=diff
==============================================================================
--- ofbiz/trunk/debian/po/templates.pot (original)
+++ ofbiz/trunk/debian/po/templates.pot Wed Jul  1 02:27:18 2009
@@ -8,7 +8,7 @@
 msgstr ""
 "Project-Id-Version: PACKAGE VERSION\n"
 "Report-Msgid-Bugs-To: [hidden email]\n"
-"POT-Creation-Date: 2008-11-18 10:54-0600\n"
+"POT-Creation-Date: 2009-05-28 11:47-0500\n"
 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
 "Language-Team: LANGUAGE <[hidden email]>\n"
@@ -16,93 +16,47 @@
 "Content-Type: text/plain; charset=CHARSET\n"
 "Content-Transfer-Encoding: 8bit\n"
 
-#. Type: password
+#. Type: string
 #. Description
 #: ../ofbiz-framework.templates:1001
-msgid "Enter the password for ofbiz admin accounts:"
+msgid "Enter the username for ofbiz admin account:"
 msgstr ""
 
-#. Type: password
+#. Type: string
 #. Description
 #: ../ofbiz-framework.templates:1001
 msgid ""
 "If this is the first time installing ofbiz, you can leave this blank, and "
-"the default of 'ofbiz' will be choosen."
-msgstr ""
-
-#. Type: password
-#. Description
-#: ../ofbiz-framework.templates:2001
-msgid "Password confirmation:"
-msgstr ""
-
-#. Type: password
-#. Description
-#: ../ofbiz-framework.templates:3001
-msgid "for internal use"
-msgstr ""
-
-#. Type: note
-#. Description
-#: ../ofbiz-framework.templates:4001
-msgid "passwords do not match"
-msgstr ""
-
-#. Type: note
-#. Description
-#: ../ofbiz-framework.templates:4001
-msgid "The passwords you have entered do not match."
-msgstr ""
-
-#. Type: note
-#. Description
-#: ../ofbiz-framework.templates:5001
-msgid "empty password is not allowed"
-msgstr ""
-
-#. Type: note
-#. Description
-#: ../ofbiz-framework.templates:5001
-msgid "The password you have entered is empty.  This is not allowed."
+"the default of 'admin' will be choosen.  The initial password will be "
+"'ofbiz', and you will be prompted to change it after you log in the first "
+"time."
 msgstr ""
 
 #. Type: string
 #. Description
-#: ../ofbiz-framework.templates:6001
+#: ../ofbiz-framework.templates:2001
 msgid "Admin port for status queries:"
 msgstr ""
 
 #. Type: string
 #. Description
-#: ../ofbiz-framework.templates:6001
+#: ../ofbiz-framework.templates:2001
 msgid ""
 "This is the port used to communicate with a running ofbiz instance, to see "
 "if it is starting, running, or stopping."
 msgstr ""
 
-#. Type: multiselect
+#. Type: select
 #. Description
-#: ../ofbiz-framework.templates:7001
-msgid "Important additional data?"
+#: ../ofbiz-framework.templates:3001
+msgid "Which field type mapping to use?"
 msgstr ""
 
-#. Type: multiselect
+#. Type: select
 #. Description
-#: ../ofbiz-framework.templates:7001
+#: ../ofbiz-framework.templates:3001
 msgid ""
-"OfBiz comes with lots of example data, showing products/categories/users "
-"etc.  If this is your first time working with ofbiz, you may want to import "
-"this extra data to see how to better use it."
-msgstr ""
-
-#. Type: boolean
-#. Description
-#: ../ofbiz-framework.templates:8001
-msgid "Reimport data?"
-msgstr ""
-
-#. Type: boolean
-#. Description
-#: ../ofbiz-framework.templates:8001
-msgid "Whether data should be reimported on upgrade."
+"Postgresql 8.1 or later has no speed differences when using TEXT, or using a "
+"blank-padded field type mapping.  New installs should prefer the TEXT "
+"variant."
 msgstr ""