[Pkg-roundcube-maintainers] Bug#988264: roundcube-core: Configure script does not set unix socket mysql connection and manually setting it breaks the script

Kurt Fitzner kurt at va1der.ca
Sun May 9 05:48:16 BST 2021


Package: roundcube
Version: 1.4.11+dfsg.1-3
Severity: normal

Background:

When roundcube is installed, the configuration script at that time only asks
what password you want for the roundcube mysql database user.  This then
causes a default database connection settings file to be created as
/etc/roundcube/debian-db.php through dbconfig-common.  The "correct" ways to
alter the connection settings are then given (through comments in the above file
and in /etc/roundcobe/config.inc.php) as to either use dpkg-reconfigure
or to edit /etc/dbconfig-common/roundcube.conf and regenerate.

Both ways fail.


Problem 1:

If you manually run dpkg-reconfigure roundcube-core, then the full installation
script is run and you are asked to specify the connection method.  The default
method purports to be by unix socket (though you can also select tcp/ip).  Setting
this to unix socket, though, has no effect anywhere.  It does not make any changes
to either /etc/dbconfig-common/roundcube.conf or /etc/roundcube/debian-db.php.


Problem 2:

The next "correct" way given in the comments to make changes to debian-db.php is
to manually edit /etc/dbconfig-common/roundcube.conf.  If you do edit it manually,
the way to speficy unix sockets is below:

# dbc_dbserver: database host.
#	leave unset to use localhost (or a more efficient local method
#	if it exists).
#dbc_dbserver='localhost'
dbc_dbserver='unix(/var/run/mysqld/mysqld.sock)'

If you use the above setting you can then generate a config file with:

$ /usr/sbin/dbconfig-generate-include /etc/dbconfig-common/roundcube.conf

The generated connection settings from this will cause roundcube to correctly
log in with unix sockets.  However, if dpkg-reconfigure is subsequently run:
$ dpkg-reconfigure roiundcube-core

then it will itself fail with a connection error when it tries to connect to
mysql.

The above setting for dbc_dbserver was crafted to give a correct connection
string when it is parsed by /etc/roundcube/debian-db-roundcube.php.


So the issue is, there is no way with the given tools to make persistent
configuration files that will employ unix sockets.  The automated way does
nothing and the manual way either creates a connection string that dbconfig
can use, or that /etc/roundcube/debian-db-roundcube.php can use, but not one
that will work in both.


-- System Information:
Debian Release: bullseye/sid
  APT prefers testing
  APT policy: (500, 'testing')
Architecture: amd64 (x86_64)

Kernel: Linux 5.10.0-6-amd64 (SMP w/2 CPU threads)
Locale: LANG=en_CA.UTF-8, LC_CTYPE=en_CA.UTF-8 (charmap=UTF-8), LANGUAGE not set
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled

Versions of packages roundcube-core depends on:
ii  dbconfig-common                 2.0.19
ii  debconf [debconf-2.0]           1.5.75
ii  dpkg                            1.20.9
ii  libjs-bootstrap4                4.5.2+dfsg1-6
ii  libjs-codemirror                5.59.2+~cs0.23.109-1
ii  libjs-jquery                    3.5.1+dfsg+~3.5.5-7
ii  libjs-jquery-minicolors         2.2.6+dfsg-4
ii  libjs-jquery-ui                 1.12.1+dfsg-8
ii  libjs-jstimezonedetect          1.0.6-5
ii  libmagic1                       1:5.39-3
ii  php                             2:7.4+76
ii  php-auth-sasl                   1.1.0-1
ii  php-cli                         2:7.4+76
ii  php-common                      2:76
ii  php-intl                        2:7.4+76
ii  php-mail-mime                   1.10.10-1
ii  php-masterminds-html5           2.7.4+dfsg-2
ii  php-mbstring                    2:7.4+76
ii  php-net-sieve                   1.4.4-2
ii  php-net-smtp                    1.9.0-1
ii  php-net-socket                  1.2.2-2
ii  php-pear                        1:1.10.12+submodules+notgz+20210212-1
ii  php7.4 [php]                    7.4.15-5+deb11u1
ii  php7.4-cli [php-cli]            7.4.15-5+deb11u1
ii  php7.4-intl [php-intl]          7.4.15-5+deb11u1
ii  php7.4-json [php-json]          7.4.15-5+deb11u1
ii  php7.4-mbstring [php-mbstring]  7.4.15-5+deb11u1
ii  roundcube-mysql                 1.4.11+dfsg.1-3
ii  ucf                             3.0043

Versions of packages roundcube-core recommends:
ii  lighttpd [httpd-cgi]        1.4.59-1
ii  php-fpm                     2:7.4+76
ii  php-gd                      2:7.4+76
ii  php-pspell                  2:7.4+76
ii  php7.4-fpm [php-fpm]        7.4.15-5+deb11u1
ii  php7.4-gd [php-gd]          7.4.15-5+deb11u1
ii  php7.4-pspell [php-pspell]  7.4.15-5+deb11u1
ii  spawn-fcgi                  1.6.4-2

Versions of packages roundcube-core suggests:
pn  php-crypt-gpg             <none>
pn  php-mkopinsky-zxcvbn-php  <none>
pn  php-net-ldap3             <none>
ic  roundcube-plugins         1.4.11+dfsg.1-3

-- debconf information excluded



More information about the Pkg-roundcube-maintainers mailing list