[Pkg-sql-ledger-commit] r499 - in ledger-smb/branches/dbconfig/debian: . po
pkg-sql-ledger-commit-owner at lists.alioth.debian.org
pkg-sql-ledger-commit-owner at lists.alioth.debian.org
Thu Apr 5 12:41:08 UTC 2012
Author: jame-guest
Date: 2012-04-05 12:41:07 +0000 (Thu, 05 Apr 2012)
New Revision: 499
Added:
ledger-smb/branches/dbconfig/debian/ledgersmb.config
ledger-smb/branches/dbconfig/debian/ledgersmb.prerm
ledger-smb/branches/dbconfig/debian/po/
ledger-smb/branches/dbconfig/debian/po/POTFILES.in
ledger-smb/branches/dbconfig/debian/po/templates.pot
ledger-smb/branches/dbconfig/debian/templates
Modified:
ledger-smb/branches/dbconfig/debian/changelog
ledger-smb/branches/dbconfig/debian/control
ledger-smb/branches/dbconfig/debian/ledgersmb.postinst
ledger-smb/branches/dbconfig/debian/ledgersmb.postrm
Log:
Initial addition of debconf/dbconfig usage to ledgersmb.
Modified: ledger-smb/branches/dbconfig/debian/changelog
===================================================================
--- ledger-smb/branches/dbconfig/debian/changelog 2012-04-04 02:46:47 UTC (rev 498)
+++ ledger-smb/branches/dbconfig/debian/changelog 2012-04-05 12:41:07 UTC (rev 499)
@@ -1,9 +1,10 @@
-ledgersmb (1.3.14-2~1) UNRELEASED; urgency=low
+ledgersmb (1.3.14-2~2) UNRELEASED; urgency=low
+ * Initial addition of debconf/dbconcig to ledgersmb.
* Add patches/20_LedgerSMB-Form-pod.patch to correct spelling error.
* Add lintian override for empty directory ledgersmb/sql/coa/ar/gifi/.
- -- Robert James Clay <jame at rocasa.us> Tue, 03 Apr 2012 22:40:17 -0400
+ -- Robert James Clay <jame at rocasa.us> Thu, 05 Apr 2012 08:20:40 -0400
ledgersmb (1.3.14-1) experimental; urgency=low
Modified: ledger-smb/branches/dbconfig/debian/control
===================================================================
--- ledger-smb/branches/dbconfig/debian/control 2012-04-04 02:46:47 UTC (rev 498)
+++ ledger-smb/branches/dbconfig/debian/control 2012-04-05 12:41:07 UTC (rev 499)
@@ -3,7 +3,7 @@
Priority: optional
Maintainer: Debian LedgerSMB Team <pkg-sql-ledger-discussion at lists.alioth.debian.org>
Uploaders: Robert James Clay <jame at rocasa.us>
-Build-Depends: debhelper (>= 8), libmodule-install-perl
+Build-Depends: debhelper (>= 8), po-debconf, libmodule-install-perl
Standards-Version: 3.9.3
Homepage: http://www.ledgersmb.org/
Vcs-Svn: svn://svn.debian.org/pkg-sql-ledger/ledger-smb/trunk
@@ -16,7 +16,7 @@
liblocale-maketext-lexicon-perl (>= 0.62-1), libtemplate-perl (>=2.14-1),
libhtml-parser-perl, liblog-log4perl-perl, libdatetime-perl, apache2 | httpd-cgi,
libcgi-simple-perl, libfile-mimeinfo-perl, libio-stringy-perl,
- postgresql-client, postgresql-contrib
+ postgresql-client, postgresql-contrib, dbconfig-common
Recommends: default-mta | mail-transport-agent, texlive-latex-recommended, libopenoffice-oodoc-perl,
libmath-bigint-gmp-perl, libparse-recdescent-perl
Suggests: postgresql, lpr, libnet-tclink-perl, latex-cjk-all
Added: ledger-smb/branches/dbconfig/debian/ledgersmb.config
===================================================================
--- ledger-smb/branches/dbconfig/debian/ledgersmb.config (rev 0)
+++ ledger-smb/branches/dbconfig/debian/ledgersmb.config 2012-04-05 12:41:07 UTC (rev 499)
@@ -0,0 +1,31 @@
+#!/bin/sh
+
+set -e
+
+. /usr/share/debconf/confmodule
+
+# need to compare in future version
+dbc_first_version="1.3.14-2"
+
+if [ -f /usr/share/dbconfig-common/dpkg/config ]; then
+ dbc_dbtypes="pgsql"
+ dbc_authmethod_user="password"
+
+ . /usr/share/dbconfig-common/dpkg/config
+fi
+
+db_input high ledgersmb/lsmb_debconf || true
+db_go || true
+
+db_get ledgersmb/lsmb_debconf
+if [ "$RET" = true ];then
+ if [ -f /usr/share/dbconfig-common/dpkg/config ]; then
+ dbc_go ledgersmb $@
+ fi
+
+ db_input high ledgersmb/lsmb_login || true
+ db_input high ledgersmb/lsmb_password || true
+ db_go || true
+fi
+
+exit 0
Modified: ledger-smb/branches/dbconfig/debian/ledgersmb.postinst
===================================================================
--- ledger-smb/branches/dbconfig/debian/ledgersmb.postinst 2012-04-04 02:46:47 UTC (rev 498)
+++ ledger-smb/branches/dbconfig/debian/ledgersmb.postinst 2012-04-05 12:41:07 UTC (rev 499)
@@ -17,6 +17,9 @@
# for details, see http://www.debian.org/doc/debian-policy/ or
# the debian-policy package
+# Set old_version variable for use later in the script.
+old_version=$2
+
# Remove these settings for /etc/ledgersmb/*, as dpkg-statoverride
# is no longer being used in debian/postinst to set it
drop_statoverride() {
@@ -29,12 +32,17 @@
done
}
+dbc_first_version="1.3.14-2"
+dbc_dbtypes="pgsql"
+
+. /usr/share/debconf/confmodule
+
case "$1" in
configure)
# Do Apache related processing if it is present.
if [ -d "/etc/apache2" ]; then
# Only do these if this is the initial install.
- if [ "$2" = "" ]; then
+ if [ -z "$old_version" ]; then
# Enable Apache mod_rewrite
if [ -x "`which a2enmod 2>/dev/null`" ]; then
a2enmod rewrite
@@ -47,9 +55,14 @@
fi
# Remove these settings for /etc/ledgersmb/*, as dpkg-statoverride
# is no longer being used in debian/postinst to set it.
- if dpkg --compare-versions $2 lt 1.3.9-2; then
+ if dpkg --compare-versions $old_version lt 1.3.9-2; then
drop_statoverride
fi
+ # If enabled, do the debconf supported configuration
+ db_get dotclear/lsmb_debconf
+ if [ "$RET" = true ]; then
+ dbc_go ledgersmb $@
+ fi
;;
abort-upgrade|abort-remove|abort-deconfigure)
Modified: ledger-smb/branches/dbconfig/debian/ledgersmb.postrm
===================================================================
--- ledger-smb/branches/dbconfig/debian/ledgersmb.postrm 2012-04-04 02:46:47 UTC (rev 498)
+++ ledger-smb/branches/dbconfig/debian/ledgersmb.postrm 2012-04-05 12:41:07 UTC (rev 499)
@@ -31,6 +31,16 @@
done
}
+if [ -f /usr/share/debconf/confmodule ]; then
+ . /usr/share/debconf/confmodule
+fi
+
+if [ -f /usr/share/dbconfig-common/dpkg/postrm ]; then
+ . /usr/share/dbconfig-common/dpkg/postrm
+
+ dbc_go ledgersmb $@
+fi
+
case "$1" in
upgrade)
# Remove these settings for /etc/ledgersmb/*, as dpkg-statoverride
Added: ledger-smb/branches/dbconfig/debian/ledgersmb.prerm
===================================================================
--- ledger-smb/branches/dbconfig/debian/ledgersmb.prerm (rev 0)
+++ ledger-smb/branches/dbconfig/debian/ledgersmb.prerm 2012-04-05 12:41:07 UTC (rev 499)
@@ -0,0 +1,48 @@
+#!/bin/sh
+# prerm script for ledgersmb
+#
+# see: dh_installdeb(1)
+
+set -e
+
+# summary of how this script can be called:
+# * <prerm> `remove'
+# * <old-prerm> `upgrade' <new-version>
+# * <new-prerm> `failed-upgrade' <old-version>
+# * <conflictor's-prerm> `remove' `in-favour' <package> <new-version>
+# * <deconfigured's-prerm> `deconfigure' `in-favour'
+# <package-being-installed> <version> `removing'
+# <conflicting-package> <version>
+# for details, see http://www.debian.org/doc/debian-policy/ or
+# the debian-policy package
+
+. /usr/share/debconf/confmodule
+
+if [ -f /usr/share/dbconfig-common/dpkg/prerm ]; then
+ . /usr/share/dbconfig-common/dpkg/prerm
+
+ dbc_go ledgersmb $@
+fi
+
+
+case "$1" in
+ remove|upgrade|deconfigure)
+ ;;
+
+ failed-upgrade)
+ ;;
+
+ *)
+ echo "prerm called with unknown argument \`$1'" >&2
+ exit 1
+ ;;
+esac
+
+db_stop
+
+# dh_installdeb will replace this with shell code automatically
+# generated by other debhelper scripts.
+
+#DEBHELPER#
+
+exit 0
Added: ledger-smb/branches/dbconfig/debian/po/POTFILES.in
===================================================================
--- ledger-smb/branches/dbconfig/debian/po/POTFILES.in (rev 0)
+++ ledger-smb/branches/dbconfig/debian/po/POTFILES.in 2012-04-05 12:41:07 UTC (rev 499)
@@ -0,0 +1 @@
+[type: gettext/rfc822deb] templates
Added: ledger-smb/branches/dbconfig/debian/po/templates.pot
===================================================================
--- ledger-smb/branches/dbconfig/debian/po/templates.pot (rev 0)
+++ ledger-smb/branches/dbconfig/debian/po/templates.pot 2012-04-05 12:41:07 UTC (rev 499)
@@ -0,0 +1,61 @@
+# SOME DESCRIPTIVE TITLE.
+# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
+# This file is distributed under the same license as the PACKAGE package.
+# FIRST AUTHOR <EMAIL at ADDRESS>, YEAR.
+#
+#, fuzzy
+msgid ""
+msgstr ""
+"Project-Id-Version: ledgersmb\n"
+"Report-Msgid-Bugs-To: ledgersmb at packages.debian.org\n"
+"POT-Creation-Date: 2012-04-04 12:36-0400\n"
+"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
+"Last-Translator: FULL NAME <EMAIL at ADDRESS>\n"
+"Language-Team: LANGUAGE <LL at li.org>\n"
+"Language: \n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=CHARSET\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#. Type: string
+#. Description
+#: ../templates:1001
+msgid "Login for the Database Administrative user:"
+msgstr ""
+
+#. Type: string
+#. Description
+#: ../templates:1001
+msgid ""
+"Please enter the login of the LedgerSMB Database Administrative user. This "
+"login is needed for, for instance, running setup.pl in the Web Interface."
+msgstr ""
+
+#. Type: password
+#. Description
+#: ../templates:2001
+msgid "Password for the Database Administrative user:"
+msgstr ""
+
+#. Type: password
+#. Description
+#: ../templates:2001
+msgid ""
+"Please enter the password of the LedgerSMB Database Administrative user. "
+"This password is needed for, for instance, running setup.pl in the Web "
+"Interface."
+msgstr ""
+
+#. Type: boolean
+#. Description
+#: ../templates:3001
+msgid "Configure LedgerSMB automatically?"
+msgstr ""
+
+#. Type: boolean
+#. Description
+#: ../templates:3001
+msgid ""
+"The configuration program for the package can automatically configure "
+"LedgerSMB, at least and especially for the LedgerSMB Database User."
+msgstr ""
Added: ledger-smb/branches/dbconfig/debian/templates
===================================================================
--- ledger-smb/branches/dbconfig/debian/templates (rev 0)
+++ ledger-smb/branches/dbconfig/debian/templates 2012-04-05 12:41:07 UTC (rev 499)
@@ -0,0 +1,22 @@
+Template: ledgersmb/lsmb_login
+Type: string
+Default: ledgersmb
+_Description: Login for the Database Administrative user:
+ Please enter the login of the LedgerSMB Database Administrative user. This
+ login is needed for, for instance, running setup.pl in the Web Interface.
+
+Template: ledgersmb/lsmb_password
+Type: password
+Default: LEDGERSMBINITIAL
+_Description: Password for the Database Administrative user:
+ Please enter the password of the LedgerSMB Database Administrative user.
+ This password is needed for, for instance, running setup.pl in the Web
+ Interface.
+
+Template: ledgersmb/lsmb_debconf
+Type: boolean
+Default: true
+_Description: Configure LedgerSMB automatically?
+ The configuration program for the package can automatically configure
+ LedgerSMB, at least and especially for the LedgerSMB Database User.
+
More information about the Pkg-sql-ledger-commit
mailing list