[Dbconfig-common-changes] [dbconfig-common] r301 - in
branches/sqlite: . debian debian/po doc dpkg
examples/db-test-multidbtype-2.0/debian
examples/db-test-mysql-2.0/debian examples/db-test-mysql-2.1/debian
examples/db-test-mysql-frontend-2.0/debian
examples/db-test-mysql-perl-2.0/debian
examples/db-test-pgsql-2.0/debian
examples/db-test-pgsql-migration-2.0/debian
examples/db-test-sqlite-2.0/debian
Matt Brown
mattb-guest at costa.debian.org
Tue Aug 15 10:41:16 CEST 2006
Author: mattb-guest
Date: 2006-08-15 08:41:15 +0000 (Tue, 15 Aug 2006)
New Revision: 301
Modified:
branches/sqlite/dbconfig-generate-include
branches/sqlite/debian/changelog
branches/sqlite/debian/control
branches/sqlite/debian/po/es.po
branches/sqlite/doc/dbconfig-common.sgml
branches/sqlite/dpkg/common
branches/sqlite/dpkg/postrm
branches/sqlite/examples/db-test-multidbtype-2.0/debian/postrm
branches/sqlite/examples/db-test-mysql-2.0/debian/postrm
branches/sqlite/examples/db-test-mysql-2.1/debian/postrm
branches/sqlite/examples/db-test-mysql-frontend-2.0/debian/postrm
branches/sqlite/examples/db-test-mysql-perl-2.0/debian/postrm
branches/sqlite/examples/db-test-pgsql-2.0/debian/postrm
branches/sqlite/examples/db-test-pgsql-migration-2.0/debian/postrm
branches/sqlite/examples/db-test-sqlite-2.0/debian/postrm
Log:
Merge changes from trunk (292:299) in the SQLite branch.
Modified: branches/sqlite/dbconfig-generate-include
===================================================================
--- branches/sqlite/dbconfig-generate-include 2006-08-15 08:02:14 UTC (rev 300)
+++ branches/sqlite/dbconfig-generate-include 2006-08-15 08:41:15 UTC (rev 301)
@@ -58,6 +58,15 @@
EOF
}
+check_permissions(){
+ local line
+ if dpkg-statoverride --list "$outputfile" >/dev/null; then
+ line=`dpkg-statoverride --list "$outputfile"`
+ owner=`echo $line | cut -d' ' -f1,2 | tr ' ' ':'`
+ perms=`echo $line | cut -d' ' -f3`
+ fi
+}
+
TEMP=`getopt -o af:hb::d::m:o:p::u::s::t::C::O:P::Uv --long help,dbuser::,dbname::,dbpass::,dbport::,dbserver::,dbtype::,basepath::,output:,format:,options:,comment::,owner:,mode:,ucf,version -n $0 -- "$@"`
if [ $? != 0 ] ; then usage >&2 ; exit 1 ; fi
@@ -366,9 +375,11 @@
if [ "$outputfile" ]; then
if [ "$do_ucf" ]; then
ucf "$tmpout" "$outputfile"
+ rm -f "$tmpout"
else
mv "$tmpout" "$outputfile"
fi
+ check_permissions
[ "$owner" ] && chown $owner $outputfile
[ "$perms" ] && chmod $perms $outputfile
fi
Modified: branches/sqlite/debian/changelog
===================================================================
--- branches/sqlite/debian/changelog 2006-08-15 08:02:14 UTC (rev 300)
+++ branches/sqlite/debian/changelog 2006-08-15 08:41:15 UTC (rev 301)
@@ -1,6 +1,15 @@
-dbconfig-common (1.8.19) UNRELEASED; urgency=low
+dbconfig-common (1.8.20) UNRELEASED; urgency=low
+ -- sean finney <sean at localhost> Tue, 15 Aug 2006 08:57:34 +0200
+
+dbconfig-common (1.8.19) unstable; urgency=high
+
[ sean finney ]
+ * dbconfig-common and the documentation/examples were not policy complaint
+ wrt the postrm script hooks. thanks to Anthony DeRobertis for catching
+ this before it was too late. this fixes an RC bug report with
+ dbconfig-common, so urgency=high. bugs may need to be filed
+ seperately against packages that used the examples verbatim.
* incorporate the "frontend" feature for read-only packages, where
someone may want to ask the questions but not take the actions.
see docs for details. thanks to Thomas Huriaux and Michael
@@ -9,8 +18,17 @@
if there are upgrades to be applied. thanks to Michael Ablassmeier
for pointing this out. closes: #379730.
* merge debian/TODO and TODO into just TODO.
+ * dbconfig-generate-include was using tempfiles without removing
+ them afterwards. thanks to Thijs Kinkhorst for pointing this out.
+ * change dbconfig-generate-include to respect permissions that are
+ locally modified via dpkg-statoverride. thanks to Thijs Kinkhorst
+ and Matt Brown for realizing this.
+ * no longer depend on pwgen(1) for generating random passwords, and
+ instead use sed and cut from /dev/urandom.
+ * new spanish debconf translation from Javier Fernández-Sanguino Peña
+ closes: #382969.
- -- sean finney <seanius at debian.org> Fri, 04 Aug 2006 23:01:01 -0700
+ -- sean finney <seanius at debian.org> Tue, 15 Aug 2006 08:27:04 +0200
dbconfig-common (1.8.18) unstable; urgency=low
Modified: branches/sqlite/debian/control
===================================================================
--- branches/sqlite/debian/control 2006-08-15 08:02:14 UTC (rev 300)
+++ branches/sqlite/debian/control 2006-08-15 08:41:15 UTC (rev 301)
@@ -7,7 +7,7 @@
Package: dbconfig-common
Architecture: all
-Depends: ucf, pwgen, ${misc:Depends}
+Depends: ucf, ${misc:Depends}
Suggests: virtual-mysql-client | mysql-client | postgresql-client
Description: common framework for packaging database applications
dbconfig-common presents a policy and implementation for
Modified: branches/sqlite/debian/po/es.po
===================================================================
--- branches/sqlite/debian/po/es.po 2006-08-15 08:02:14 UTC (rev 300)
+++ branches/sqlite/debian/po/es.po 2006-08-15 08:41:15 UTC (rev 301)
@@ -7,6 +7,8 @@
# Changes:
# - Initial translation
# Javier Fernández-Sanguino, 2005
+# - Revision
+# Javier Fernandez-Sanguino, 2006
#
#
# Traductores, si no conoce el formato PO, merece la pena leer la
@@ -17,7 +19,7 @@
#
# Equipo de traducción al español, por favor lean antes de traducir
# los siguientes documentos:
-#
+#
# - El proyecto de traducción de Debian al español
# http://www.debian.org/intl/spanish/coordinacion
# especialmente las notas y normas de traducción en
@@ -36,7 +38,7 @@
"Project-Id-Version: dbconfig-common\n"
"Report-Msgid-Bugs-To: seanius at debian.org\n"
"POT-Creation-Date: 2006-08-10 00:40+1200\n"
-"PO-Revision-Date: 2006-06-10 23:46+0200\n"
+"PO-Revision-Date: 2006-08-14 13:56+0200\n"
"Last-Translator: Javier Fernandez-Sanguino <jfs at debian.org>\n"
"Language-Team: Debian Spanish <debian-l10n-spanish at lists.debian.org>\n"
"MIME-Version: 1.0\n"
@@ -47,7 +49,7 @@
#. Description
#: ../dbconfig-common.templates:1001
msgid "Will this server be used to access remote databases?"
-msgstr ""
+msgstr "¿Se utilizará este servidor para acceder a bases de datos remotas?"
#. Type: boolean
#. Description
@@ -57,7 +59,7 @@
"configuring databases on remote systems. When installing a package's "
"database via dbconfig-common, the questions related to remote configuration "
"are asked with a priority such that they are skipped for most systems."
-msgstr ""
+msgstr "Dbconfig-common dispone de soporte para la configuración de bases de datos en sistemas remotos para aquellos tipos de bases de datos que lo soportan. Las preguntas relacionadas con la configuración de sistemas remotos se preguntarán con una prioridad tal que se omitirán en la mayoría de los sistemas cuando instale un base de datos a través de dbconfig-common."
#. Type: boolean
#. Description
@@ -66,14 +68,13 @@
"If you select this option, the default behaviour will be to prompt you with "
"questions related to remote database configuration when you install new "
"packages."
-msgstr ""
+msgstr "El comportamiento por omisión será realizar las preguntas relacionados a la configuración de bases de datos en sistemas remotos cuando instale nuevos paquetes si selecciona esta opción."
#. Type: boolean
#. Description
#: ../dbconfig-common.templates:1001
-#, fuzzy
msgid "If you are unsure, you should not select this option."
-msgstr "En cualquier otro caso debería seleccionar esta opción."
+msgstr "No debería seleccionar esta opción si no está seguro."
#. Type: boolean
#. Description
Modified: branches/sqlite/doc/dbconfig-common.sgml
===================================================================
--- branches/sqlite/doc/dbconfig-common.sgml 2006-08-15 08:02:14 UTC (rev 300)
+++ branches/sqlite/doc/dbconfig-common.sgml 2006-08-15 08:41:15 UTC (rev 301)
@@ -104,6 +104,26 @@
# ... rest of your code ...
</example>
+ <p>
+ <em>NOTE</em>: to stay compliant with Policy 7.2, you need
+ to do something slightly different in your <var>postrm</var>
+ script:
+ <example>
+#!/bin/sh
+# postrm maintainer script for foo-mysql
+
+# source debconf stuff
+if [ -f /usr/share/debconf/confmodule ]; then
+ . /usr/share/debconf/confmodule
+fi
+# source dbconfig-common stuff
+if [ -f /usr/share/dbconfig-common/dpkg/postrm.mysql ]; then
+ . /usr/share/dbconfig-common/dpkg/postrm.mysql
+ dbc_go foo-mysql $@
+fi
+
+# ... rest of your code ...
+ </example>
<p>
<var>dbc_go</var> is a function defined in
every maintainer script hook to execute the
Modified: branches/sqlite/dpkg/common
===================================================================
--- branches/sqlite/dpkg/common 2006-08-15 08:02:14 UTC (rev 300)
+++ branches/sqlite/dpkg/common 2006-08-15 08:41:15 UTC (rev 301)
@@ -738,7 +738,7 @@
done
if [ ! "$dbc_dbpass" ]; then
- dbc_dbpass=`pwgen -cn -N1 -s 12`
+ dbc_dbpass=`env LANG=C sed -n -e 's/[^[:alnum:]]//g;p;q' < /dev/urandom | cut -b1-12`
db_set $dbc_package/$dbc_dbtype/app-pass "$dbc_dbpass"
db_set $dbc_package/app-password-confirm "$dbc_dbpass"
fi
Modified: branches/sqlite/dpkg/postrm
===================================================================
--- branches/sqlite/dpkg/postrm 2006-08-15 08:02:14 UTC (rev 300)
+++ branches/sqlite/dpkg/postrm 2006-08-15 08:41:15 UTC (rev 301)
@@ -12,7 +12,9 @@
elif [ "$dbc_command" = "purge" ]; then
# remove the dbc configuration file
rm -f /etc/dbconfig-common/$dbc_package.conf || true
- ucf -p "/etc/dbconfig-common/$dbc_package.conf" || true
+ if which ucf >/dev/null 2>&1; then
+ ucf -p "/etc/dbconfig-common/$dbc_package.conf" || true
+ fi
# forget everything we ever new related to debconf+dbc
for t in $dbc_register_templates; do
db_unregister $dbc_package/$t || true
Modified: branches/sqlite/examples/db-test-multidbtype-2.0/debian/postrm
===================================================================
--- branches/sqlite/examples/db-test-multidbtype-2.0/debian/postrm 2006-08-15 08:02:14 UTC (rev 300)
+++ branches/sqlite/examples/db-test-multidbtype-2.0/debian/postrm 2006-08-15 08:41:15 UTC (rev 301)
@@ -3,8 +3,12 @@
set -e
#set -x
-. /usr/share/debconf/confmodule
-. /usr/share/dbconfig-common/dpkg/postrm
-dbc_go db-test-multidbtype $@
+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 db-test-multidbtype $@
+fi
#DEBHELPER#
Modified: branches/sqlite/examples/db-test-mysql-2.0/debian/postrm
===================================================================
--- branches/sqlite/examples/db-test-mysql-2.0/debian/postrm 2006-08-15 08:02:14 UTC (rev 300)
+++ branches/sqlite/examples/db-test-mysql-2.0/debian/postrm 2006-08-15 08:41:15 UTC (rev 301)
@@ -3,13 +3,20 @@
set -e
#set -x
-. /usr/share/debconf/confmodule
-. /usr/share/dbconfig-common/dpkg/postrm.mysql
-dbc_go db-test-mysql $@
+if [ -f /usr/share/debconf/confmodule ]; then
+ . /usr/share/debconf/confmodule
+fi
+if [ -f /usr/share/dbconfig-common/dpkg/postrm.mysql ]; then
+ . /usr/share/dbconfig-common/dpkg/postrm.mysql
+ dbc_go db-test-mysql $@
+fi
+
if [ "$1" = "purge" ]; then
rm -f /etc/db-test-mysql/debian-db.php
- ucf --purge /etc/db-test-mysql/debian-db.php
+ if which ucf >/dev/null 2>&1; then
+ ucf --purge /etc/db-test-mysql/debian-db.php
+ fi
fi
#DEBHELPER#
Modified: branches/sqlite/examples/db-test-mysql-2.1/debian/postrm
===================================================================
--- branches/sqlite/examples/db-test-mysql-2.1/debian/postrm 2006-08-15 08:02:14 UTC (rev 300)
+++ branches/sqlite/examples/db-test-mysql-2.1/debian/postrm 2006-08-15 08:41:15 UTC (rev 301)
@@ -3,13 +3,20 @@
set -e
#set -x
-. /usr/share/debconf/confmodule
-. /usr/share/dbconfig-common/dpkg/postrm.mysql
-dbc_go db-test-mysql $@
+if [ -f /usr/share/debconf/confmodule ]; then
+ . /usr/share/debconf/confmodule
+fi
+if [ -f /usr/share/dbconfig-common/dpkg/postrm.mysql ]; then
+ . /usr/share/dbconfig-common/dpkg/postrm.mysql
+ dbc_go db-test-mysql $@
+fi
+
if [ "$1" = "purge" ]; then
rm -f /etc/db-test-mysql/debian-db.php
- ucf --purge /etc/db-test-mysql/debian-db.php
+ if which ucf >/dev/null 2>&1; then
+ ucf --purge /etc/db-test-mysql/debian-db.php
+ fi
fi
#DEBHELPER#
Modified: branches/sqlite/examples/db-test-mysql-frontend-2.0/debian/postrm
===================================================================
--- branches/sqlite/examples/db-test-mysql-frontend-2.0/debian/postrm 2006-08-15 08:02:14 UTC (rev 300)
+++ branches/sqlite/examples/db-test-mysql-frontend-2.0/debian/postrm 2006-08-15 08:41:15 UTC (rev 301)
@@ -3,13 +3,19 @@
set -e
#set -x
-. /usr/share/debconf/confmodule
-. /usr/share/dbconfig-common/dpkg/frontend.postrm.mysql
-dbc_go db-test-mysql-frontend $@
+if [ -f /usr/share/debconf/confmodule ]; then
+ . /usr/share/debconf/confmodule
+fi
+if [ -f /usr/share/dbconfig-common/dpkg/frontend.postrm.mysql ]; then
+ . /usr/share/dbconfig-common/dpkg/frontend.postrm.mysql
+ dbc_go db-test-mysql-frontend $@
+fi
if [ "$1" = "purge" ]; then
rm -f /etc/db-test-mysql-frontend/debian-db.php
- ucf --purge /etc/db-test-mysql-frontend/debian-db.php
+ if which ucf >/dev/null 2>&1; then
+ ucf --purge /etc/db-test-mysql-frontend/debian-db.php
+ fi
fi
#DEBHELPER#
Modified: branches/sqlite/examples/db-test-mysql-perl-2.0/debian/postrm
===================================================================
--- branches/sqlite/examples/db-test-mysql-perl-2.0/debian/postrm 2006-08-15 08:02:14 UTC (rev 300)
+++ branches/sqlite/examples/db-test-mysql-perl-2.0/debian/postrm 2006-08-15 08:41:15 UTC (rev 301)
@@ -3,12 +3,19 @@
set -e
#set -x
-. /usr/share/debconf/confmodule
-. /usr/share/dbconfig-common/dpkg/postrm.mysql
-dbc_go db-test-mysql-perl $@
+if [ -f /usr/share/debconf/confmodule ]; then
+ . /usr/share/debconf/confmodule
+fi
+if [ -f /usr/share/dbconfig-common/dpkg/postrm.mysql ]; then
+ . /usr/share/dbconfig-common/dpkg/postrm.mysql
+ dbc_go db-test-mysql-perl $@
+fi
if [ "$1" = "purge" ]; then
rm -f /etc/db-test-mysql-perl/debian-db.pm
+ if which ucf >/dev/null 2>&1; then
+ ucf -p /etc/db-test-mysql-perl/debian-db.pm
+ fi
fi
#DEBHELPER#
Modified: branches/sqlite/examples/db-test-pgsql-2.0/debian/postrm
===================================================================
--- branches/sqlite/examples/db-test-pgsql-2.0/debian/postrm 2006-08-15 08:02:14 UTC (rev 300)
+++ branches/sqlite/examples/db-test-pgsql-2.0/debian/postrm 2006-08-15 08:41:15 UTC (rev 301)
@@ -3,8 +3,12 @@
set -e
#set -x
-. /usr/share/debconf/confmodule
-. /usr/share/dbconfig-common/dpkg/postrm.pgsql
+if [ -f /usr/share/debconf/confmodule ]; then
+ . /usr/share/debconf/confmodule
+fi
+if [ -f /usr/share/dbconfig-common/dpkg/postrm.pgsql ]; then
+ . /usr/share/dbconfig-common/dpkg/postrm.pgsql
+fi
dbc_go db-test-pgsql $@
#DEBHELPER#
Modified: branches/sqlite/examples/db-test-pgsql-migration-2.0/debian/postrm
===================================================================
--- branches/sqlite/examples/db-test-pgsql-migration-2.0/debian/postrm 2006-08-15 08:02:14 UTC (rev 300)
+++ branches/sqlite/examples/db-test-pgsql-migration-2.0/debian/postrm 2006-08-15 08:41:15 UTC (rev 301)
@@ -3,8 +3,12 @@
set -e
#set -x
-. /usr/share/debconf/confmodule
-. /usr/share/dbconfig-common/dpkg/postrm.pgsql
+if [ -f /usr/share/debconf/confmodule ]; then
+ . /usr/share/debconf/confmodule
+fi
+if [ -f /usr/share/dbconfig-common/dpkg/postrm.pgsql ]; then
+ . /usr/share/dbconfig-common/dpkg/postrm.pgsql
+fi
dbc_go db-test-pgsql-migration $@
#DEBHELPER#
Modified: branches/sqlite/examples/db-test-sqlite-2.0/debian/postrm
===================================================================
--- branches/sqlite/examples/db-test-sqlite-2.0/debian/postrm 2006-08-15 08:02:14 UTC (rev 300)
+++ branches/sqlite/examples/db-test-sqlite-2.0/debian/postrm 2006-08-15 08:41:15 UTC (rev 301)
@@ -3,9 +3,13 @@
set -e
#set -x
-. /usr/share/debconf/confmodule
-. /usr/share/dbconfig-common/dpkg/postrm.sqlite
-dbc_go db-test-sqlite $@
+if [ -f /usr/share/debconf/confmodule ]; then
+ . /usr/share/debconf/confmodule
+fi
+if [ -f /usr/share/dbconfig-common/dpkg/postrm.mysql ]; then
+ . /usr/share/dbconfig-common/dpkg/postrm.mysql
+ dbc_go db-test-mysql $@
+fi
if [ "$1" = "purge" ]; then
rm -f /etc/db-test-sqlite/debian-db.php
More information about the Dbconfig-common-changes
mailing list