[Dbconfig-common-changes] [dbconfig-common] r394 - in trunk: debian internal
Sean Finney
seanius at alioth.debian.org
Sun May 13 12:53:59 UTC 2007
tags 406127 pending
thanks
Author: seanius
Date: 2007-05-13 12:53:59 +0000 (Sun, 13 May 2007)
New Revision: 394
Added:
trunk/debian/dbconfig-common.logrotate
trunk/debian/dbconfig-common.preinst
Modified:
trunk/debian/changelog
trunk/debian/dirs
trunk/debian/rules
trunk/internal/common
Log:
final bits for new logging support
Modified: trunk/debian/changelog
===================================================================
--- trunk/debian/changelog 2007-05-13 12:44:48 UTC (rev 393)
+++ trunk/debian/changelog 2007-05-13 12:53:59 UTC (rev 394)
@@ -1,8 +1,16 @@
dbconfig-common (1.8.33) UNRELEASED; urgency=low
* NOT RELEASED YET
+ * include a long-neglected fix from Adam Lebsack, which seems to fix the
+ problems prevents dbconfig-common from working with dash (closes: #406127).
+ * remove some straggler bashisms, and use printf instead of echo
+ for the dbc_log functions
+ * change function names for some internal debugging/logging functions.
+ * now dbc defaults to logging to /var/log/dbconfig-common/dbc.log, which
+ can perhaps make it a bit easier to get debugging info from folks who
+ experience bugs.
- -- sean finney <seanius at debian.org> Sat, 12 May 2007 15:22:42 +0200
+ -- sean finney <seanius at debian.org> Sun, 13 May 2007 14:53:31 +0200
dbconfig-common (1.8.32) unstable; urgency=low
Added: trunk/debian/dbconfig-common.logrotate
===================================================================
--- trunk/debian/dbconfig-common.logrotate (rev 0)
+++ trunk/debian/dbconfig-common.logrotate 2007-05-13 12:53:59 UTC (rev 394)
@@ -0,0 +1,7 @@
+/var/log/dbconfig-common/dbc.log {
+ monthly
+ rotate 12
+ missingok
+ notifempty
+ create 600 root root
+}
Added: trunk/debian/dbconfig-common.preinst
===================================================================
--- trunk/debian/dbconfig-common.preinst (rev 0)
+++ trunk/debian/dbconfig-common.preinst 2007-05-13 12:53:59 UTC (rev 394)
@@ -0,0 +1,13 @@
+#!/bin/sh
+
+set -e
+
+# rather sensitive data can go here, so let's create the logfile
+# ahead of time with safer permissions.
+if [ ! -d /var/log/dbconfig-common ]; then
+ mkdir /var/log/dbconfig-common
+ touch /var/log/dbconfig-common/dbc.log
+ chown 600 /var/log/dbconfig-common/dbc.log
+fi
+
+#DEBHELPER#
Modified: trunk/debian/dirs
===================================================================
--- trunk/debian/dirs 2007-05-13 12:44:48 UTC (rev 393)
+++ trunk/debian/dirs 2007-05-13 12:53:59 UTC (rev 394)
@@ -4,3 +4,4 @@
usr/share/dbconfig-common/data
var/cache/dbconfig-common/backups
usr/share/doc/dbconfig-common
+var/log/dbconfig-common
Modified: trunk/debian/rules
===================================================================
--- trunk/debian/rules 2007-05-13 12:44:48 UTC (rev 393)
+++ trunk/debian/rules 2007-05-13 12:53:59 UTC (rev 394)
@@ -41,17 +41,16 @@
dh_installdirs
if test -z "$$dbc_debug"; then dh_installdocs; fi
debian/credit-xlators > ${DOC}/TRANSLATORS
- install -m 644 AFL debian/dbconfig-common/usr/share/doc/dbconfig-common/
- mkdir -p debian/dbconfig-common/etc/dbconfig-common
- cp -Pr dpkg debian/dbconfig-common/usr/share/dbconfig-common/
- cp -Pr internal debian/dbconfig-common/usr/share/dbconfig-common/
- cp -P dbconfig-generate-include debian/dbconfig-common/usr/sbin/
- cp -P dbconfig-load-include debian/dbconfig-common/usr/sbin/
- mkdir -p debian/dbconfig-common/usr/share/lintian/overrides
+ install -m 644 AFL ${TMPDIR}/usr/share/doc/dbconfig-common/
+ mkdir -p ${TMPDIR}/etc/dbconfig-common
+ cp -Pr dpkg ${TMPDIR}/usr/share/dbconfig-common/
+ cp -Pr internal ${TMPDIR}/usr/share/dbconfig-common/
+ cp -P dbconfig-generate-include ${TMPDIR}/usr/sbin/
+ cp -P dbconfig-load-include ${TMPDIR}/usr/sbin/
+ mkdir -p ${TMPDIR}/usr/share/lintian/overrides
cp -a debian/dbconfig-common.lintian \
- debian/dbconfig-common/usr/share/lintian/overrides/dbconfig-common
+ ${TMPDIR}/usr/share/lintian/overrides/dbconfig-common
-
# Build architecture-independent files here.
binary-indep: build install
Modified: trunk/internal/common
===================================================================
--- trunk/internal/common 2007-05-13 12:44:48 UTC (rev 393)
+++ trunk/internal/common 2007-05-13 12:53:59 UTC (rev 394)
@@ -9,36 +9,22 @@
## dbc_logpart: log interal messages (without newline)
##
dbc_logpart(){
- # for the time being, at least, let's default to verbose
- #if [ "$dbc_debug" ]; then
- echo -ne "$@ " >&2
- #fi
- if [ "$dbc_log" ]; then
- dbc_log="$dbc_log $@"
- else
- dbc_log="$@ "
- fi
+ printf "$@ " >&2
+ printf "$@ " >> /var/log/dbconfig-common/dbc.log
}
##
## dbc_logline: log interal messages
##
dbc_logline(){
- # for the time being, at least, let's default to verbose
- #if [ "$dbc_debug" ]; then
- echo -e "$@." >&2
- #fi
- if [ "$dbc_log" ]; then
- dbc_log="$dbc_log $@."
- else
- dbc_log="$@."
- fi
+ printf "$@.\n" >&2
+ printf "$@.\n" >> /var/log/dbconfig-common/dbc.log
}
###
### simple debugging function
###
-dbc_debug(){
+_dbc_debug(){
if [ "$dbc_debug" ]; then
dbc_logline $@
fi
More information about the Dbconfig-common-changes
mailing list