Bug#961765: roundcube-core: package needs work for sqlite
Control: tag -1 + unreproducible On Fri, 29 May 2020 at 11:38:31 +1000, Russell Coker via Pkg-roundcube-maintainers wrote: > specifying sqlite. As sqlite is simpler it should be able to configure all > sqlite stuff if the user selects sqlite as database type. > […] > Next when you go to the web page for roundcube when using sqlite you get a > database connection error. As written earlier the dbconfig-managed SQLite setup works out of the box in a clean sid (or buster) chroot so I'm tagging this accordingly. -- Guilhem. signature.asc Description: PGP signature
Bug#961765: [Pkg-roundcube-maintainers] Bug#961765: roundcube-core: package needs work for sqlite
On Fri, 29 May 2020 at 11:38:31 +1000, Russell Coker via Pkg-roundcube-maintainers wrote: > The package install asks questions about MySQL but there's no option for > specifying sqlite. It now occurs to me that what you're reporting here is the extra work users of the package allegedly have to do for SQLite3-driven Roundcube. (At first I read the Subject: like roundcube-* packaging was “in need of work” which came across as a rather rude thing to say :-/.) As I wrote earlier we're relying on dbconfig-common for database creation and other operations, and the default settings dbc_basepath='/var/lib/dbconfig-common/sqlite3/roundcube' dbc_dbname='roundcube' work out of the box for me. If a single package among roundcube-{mysql,pgsql,sqlite3} is installed dbconfig proceeds with that backend, otherwise it asks which backend to use. dbconfig doesn't ask where to place the SQLite3 database in default priority; it's a fine choice IMHO as long as the path remains in dbconfig's namespace. For MySQL/PostgreSQL dbconfig asks where to find the server and database in default priority, which is also a fine choice IMHO as dbconfig doesn't manage these namespace. Options to use a different basepath/dbname for roundcube-sqlite3 include preseeding the debconf questions, installing under DEBIAN_PRIORITY=low, or doing it later via `dpkg-reconfigure roundcube-core`. If you think the user should be asked basepath/dbname under default priority please file a bug against dbconfig-common. -- Guilhem. signature.asc Description: PGP signature
Bug#961765: [Pkg-roundcube-maintainers] Bug#961765: roundcube-core: package needs work for sqlite
Control: tag -1 moreinfo On Fri, 29 May 2020 at 11:38:31 +1000, Russell Coker via Pkg-roundcube-maintainers wrote: > The package install asks questions about MySQL but there's no option for > specifying sqlite. Making sure Roundcube works out of the box with SQLite3 is part of the manual tests I do before each upload. The below works for me FWIW (this uses the default basepath from dbconfig, namely /var/lib/dbconfig-common/sqlite3/roundcube): ~$ CHROOT="$(schroot -c buster-amd64-sbuild -b)" ~$ sudo schroot -d/ -c "$CHROOT" -r -- apt install -y dialog debconf ~$ sudo schroot -d/ -c "$CHROOT" -r -- apt install -y openssl nginx-light php-fpm php ~$ PHP_VERSION=7.3 ~$ sudo schroot -d/ -c "$CHROOT" -r -- tee /etc/nginx/sites-available/default <<-EOF server { listen 127.0.0.1:8080 default_server; root /var/lib/roundcube; server_name _; client_max_body_size 64m; location = / { index index.php; } location = /index.php { include snippets/fastcgi-php.conf; fastcgi_pass unix:/run/php/php${PHP_VERSION}-fpm.sock; } location /plugins/ {} location /program/js/{} location /program/resources/ {} location /skins/ {} location / { internal; } location ~ /\. { internal; } } EOF ~$ sudo schroot -d/ -c "$CHROOT" -r -- apt install -y roundcube roundcube-core roundcube-plugins roundcube-sqlite3 ~$ sudo schroot -d/ -c "$CHROOT" -r -- install -oroot -groot -m0755 -d /run/php ~$ sudo schroot -d/ -c "$CHROOT" -r -- /usr/sbin/"php-fpm$PHP_VERSION" --fpm-config "/etc/php/$PHP_VERSION/fpm/php-fpm.conf" ~$ sudo schroot -d/ -c "$CHROOT" -r -- nginx > For reference something like the following in /etc/roundcube/debian-db.php is > all that's needed for it: > $dbtype='sqlite'; > $basepath='/var/cache/apache2/roundcube'; We set $config['db_dsnw'] to "sqlite:///$basepath/$dbname?mode=0640" so I'm surprised this works without $dbname. Do you set $config['db_dsnw'] in /etc/roundcube/config.inc.php? Anyway the “safe” way to reconfigure the database is to run `dpkg-reconfigure roundcube-core` and to answer questions from dbconfig. (It appears to be able to create and populate SQLite3 databases under different $basepath too.) Same thing goes for other backends; I didn't try to manually point Roundcube to an empty database on a MySQL server but I doubt it takes care of installing/upgrading schemas on its own (it doesn't necessarily have the permissions for it). We rely on dbconfig for DB creation, re-configuration, schema upgrades, etc. -- Guilhem. signature.asc Description: PGP signature
Bug#961765: roundcube-core: package needs work for sqlite
Package: roundcube Version: 1.3.11+dfsg.1-1~deb10u1 Severity: normal The package install asks questions about MySQL but there's no option for specifying sqlite. As sqlite is simpler it should be able to configure all sqlite stuff if the user selects sqlite as database type. For reference something like the following in /etc/roundcube/debian-db.php is all that's needed for it: $dbtype='sqlite'; $basepath='/var/cache/apache2/roundcube'; Next when you go to the web page for roundcube when using sqlite you get a database connection error. To fix that you need /var/lib/roundcube/SQL to be a symlink to /usr/share/roundcube/SQL . -- System Information: Debian Release: 10.4 APT prefers stable-updates APT policy: (500, 'stable-updates'), (500, 'stable') Architecture: amd64 (x86_64) Kernel: Linux 4.19.0-8-amd64 (SMP w/2 CPU cores) Locale: LANG=en_AU.UTF-8, LC_CTYPE=en_AU.UTF-8 (charmap=UTF-8), LANGUAGE=en_AU.UTF-8 (charmap=UTF-8) Shell: /bin/sh linked to /bin/dash Init: systemd (via /run/systemd/system) LSM: SELinux: enabled - Mode: Permissive - Policy name: default Versions of packages roundcube-core depends on: ii dbconfig-common 2.0.11+deb10u1 ii debconf [debconf-2.0] 1.5.71 ii dpkg1.19.7 ii libapache2-mod-php 2:7.3+69 ii libapache2-mod-php7.0 [libapache2-mod-php] 7.0.33-0+deb9u3 ii libapache2-mod-php7.3 [libapache2-mod-php] 7.3.14-1~deb10u1 ii libmagic1 1:5.35-4+deb10u1 ii php-auth-sasl 1.0.6-3 ii php-common 2:69 ii php-intl2:7.3+69 ii php-mail-mime 1.10.2-0.1 ii php-net-sieve 1.4.1-1 ii php-net-smtp1.8.0-1 ii php-net-socket 1.0.14-2 ii php-pear1:1.10.6+submodules+notgz-1.1 ii php7.0-cli [php-cli]7.0.33-0+deb9u3 ii php7.0-json [php-json] 7.0.33-0+deb9u3 ii php7.3-cli [php-cli]7.3.14-1~deb10u1 ii php7.3-intl [php-intl] 7.3.14-1~deb10u1 ii php7.3-json [php-json] 7.3.14-1~deb10u1 ii roundcube-sqlite3 1.3.11+dfsg.1-1~deb10u1 ii ucf 3.0038+nmu1 Versions of packages roundcube-core recommends: ii apache2 [httpd-cgi] 2.4.38-3+deb10u3 ii php-gd 2:7.3+69 pn php-pspell ii php7.3-gd [php-gd] 7.3.14-1~deb10u1 Versions of packages roundcube-core suggests: pn php-crypt-gpg pn php-net-ldap2 pn php-net-ldap3 pn roundcube-plugins Versions of packages roundcube depends on: ii dpkg 1.19.7 -- debconf information excluded