[Pkg-roundcube-maintainers] Bug#961765: Bug#961765: roundcube-core: package needs work for sqlite
Guilhem Moulin
guilhem at debian.org
Fri May 29 13:02:12 BST 2020
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.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <http://alioth-lists.debian.net/pipermail/pkg-roundcube-maintainers/attachments/20200529/04804dfe/attachment.sig>
More information about the Pkg-roundcube-maintainers
mailing list