[Pkg-roundcube-maintainers] Bug#870479: Installation of roundcube fails with Maria DB

Paul Gevers elbrus at debian.org
Tue Aug 22 18:57:29 UTC 2017


On 08/21/17 18:41, Sandro Knauß wrote:
> if [ -f /usr/share/dbconfig-common/dpkg/postinst ]; then 
> fi

Generally, I really recommend against this for two reasons:
1) in case of installations issues with the database, dbconfig-common
asks the admin what to do: ignore/abort/retry. When you get here, the
answer will be either ignore or abort, but you'll just force it to
ignore, overruling the administrator answer.
2) shell is hell to program in. With this use, "set -e" does not apply
to the dbconfig-common code. I am aware of this issue, so I (hopefully)
finish every line that may fail with "| return $?", but if I missed a
line, you are exposed to bugs most packages are not exposed to.

> @Paul Gevers: the problem is that there are some annoying questions about 
> user/password for mariadb instead of just using the unix socket. Maybe you can 
> check, that roundcube is using dbconfig correctly :) I'm a little bit lost 
> because dbconfig was just working :)

I'll check (not done yet), but dbconfig-common should try to use the
credentials in /etc/mysql/debian.cnf, if those fail, it'll ask for
credentials. With MariaDB, the content of that file are by default:

paul at testavoira ~ $ sudo cat /etc/mysql/debian.cnf
# Automatically generated for Debian scripts. DO NOT TOUCH!
host     = localhost
user     = root
password =
socket   = /var/run/mysqld/mysqld.sock
host     = localhost
user     = root
password =
socket   = /var/run/mysqld/mysqld.sock
basedir  = /usr


-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: OpenPGP digital signature
URL: <http://lists.alioth.debian.org/pipermail/pkg-roundcube-maintainers/attachments/20170822/7528bbb5/attachment.sig>

More information about the Pkg-roundcube-maintainers mailing list