Package: dbconfig-common Version: 1.8.46 Severity: important Tags: patch
Hello, As a mysql user, I have some local settings in my ".my.cnf" file(login=XXX and password). This file breaks dbconfig-common package. In fact, the mysql part of dbconfig-common uses '--defaults-extra-file' commandline option to pass authentification data to mysql client. But, as the mysql manual[1] says, the user dot file is read *after* this file. So, personal configuration options are used instead of those supplied via debconf. The attached patch fix the issue (merely replacing "--defaults-extra-file" option by "--defaults-file"). Moreover, I set the severity to important because this bug may render dbconfig-common unusable on some hosts. Please, downgrade the severity if you think it's to high. 1: http://dev.mysql.com/doc/refman/5.1/en/option-files.html#option_general_defaults-extra-file -- System Information: Debian Release: squeeze/sid APT prefers unstable APT policy: (990, 'unstable'), (500, 'testing'), (1, 'experimental') Architecture: amd64 (x86_64) Kernel: Linux 2.6.33-2-amd64 (SMP w/2 CPU cores) Locale: LANG=fr_FR.UTF-8, LC_CTYPE=fr_FR.UTF-8 (charmap=UTF-8) Shell: /bin/sh linked to /bin/bash Versions of packages dbconfig-common depends on: ii debconf [debconf-2.0] 1.5.30 Debian configuration management sy ii ucf 3.0025 Update Configuration File: preserv dbconfig-common recommends no packages. Versions of packages dbconfig-common suggests: ii mysql-client-5.1 [virtual-mys 5.1.45-1 MySQL database client binaries ii postgresql-client-8.3 [postgr 8.3.9-1 front-end programs for PostgreSQL -- debconf information: dbconfig-common/remote-questions-default: false dbconfig-common/pgsql/revertconf: false dbconfig-common/internal/skip-preseed: false dbconfig-common/db/dbname: dbconfig-common/pgsql/manualconf: dbconfig-common/dbconfig-remove: true dbconfig-common/mysql/method: unix socket dbconfig-common/upgrade-backup: true dbconfig-common/pgsql/authmethod-admin: ident dbconfig-common/upgrade-error: abort dbconfig-common/purge: false dbconfig-common/db/basepath: dbconfig-common/install-error: abort dbconfig-common/pgsql/no-empty-passwords: dbconfig-common/pgsql/admin-user: postgres dbconfig-common/dbconfig-install: true dbconfig-common/dbconfig-reinstall: false dbconfig-common/remote/host: dbconfig-common/pgsql/changeconf: false dbconfig-common/remote/newhost: dbconfig-common/missing-db-package-error: abort dbconfig-common/dbconfig-upgrade: true dbconfig-common/pgsql/no-user-choose-other-method: dbconfig-common/internal/reconfiguring: false dbconfig-common/passwords-do-not-match: dbconfig-common/remove-error: abort dbconfig-common/remember-admin-pass: false dbconfig-common/mysql/admin-user: root dbconfig-common/pgsql/method: unix socket dbconfig-common/pgsql/authmethod-user: dbconfig-common/database-type: dbconfig-common/db/app-user: dbconfig-common/remote/port:
--- internal/mysql.ori 2010-04-05 14:27:36.000000000 +0200 +++ internal/mysql 2010-04-05 14:50:14.000000000 +0200 @@ -48,7 +48,7 @@ _dbc_mysql_check_connect(){ local constat mycnf constat="bad" mycnf=`_dbc_generate_mycnf` - dbc_error=`mysql --defaults-extra-file="$mycnf" </dev/null 2>&1` && constat=good + dbc_error=`mysql --defaults-file="$mycnf" </dev/null 2>&1` && constat=good rm -f "$mycnf" if [ "$constat" = "bad" ]; then dbc_logline "$dbc_error" @@ -86,7 +86,7 @@ dbc_mysql_exec_file(){ fi mycnf=`_dbc_generate_mycnf` - if ! mysql --defaults-extra-file="$mycnf" $l_dbname 2>"$l_errfile" <"$l_sqlfile"; then + if ! mysql --defaults-file="$mycnf" $l_dbname 2>"$l_errfile" <"$l_sqlfile"; then l_retval=1 dbc_error="mysql said: `cat \"$l_errfile\"`" fi