From: Stuart Henderson Subject: Re: What am I doing wrong with MODULES mariadb? To: ports@openbsd.org Date: Thu, 17 Sep 2026 18:33:35 +0100 On 2026/09/17 10:15, Andrew Hewus Fresh wrote: > On Wed, Sep 16, 2026 at 05:20:28PM -0700, Andrew Hewus Fresh wrote: > > In databases/p5-DBIx-Class (and similar) I have added > > MODULES += databases/mariadb > > > > https://cvsweb.openbsd.org/ports/databases/p5-DBIx-Class > > > > Last time I updated the port, it worked fine, but something has changed > > in the way this should be set up and now mariadb fails to initialize. > > This seems to fix the startup. > > What's the right way to find this file? I think I'd have the module write it to e.g. ${WRKDIR}/module-server-my.cnf, perhaps by copying from ${FILESDIR}/module-server-my.cnf if it present (i.e. coming from the port which includes the module, allowing per-port overrides) and otherwise just printf'ing the default values if not to avoid awkward constructs to find the path to mariadb? > What are good values? Your proposed 512m seems reasonable. The default datasize-cur for pbuild class is at least 1G on all archs except m88k and landisk (where I don't think anyone is likely to run these anyway, if mariadb can even compile). > (the open_files_limit is just to avoid the warning) I'd go a bit higher, if some test uses a bunch of tables it might need it, 400 would fit in datasize-cur with some spare (pbuild defers to default for this, which sets it to 512). > > Index: mariadb.port.mk > =================================================================== > RCS file: /cvs/ports/databases/mariadb/mariadb.port.mk,v > diff -u -p -r1.6 mariadb.port.mk > --- mariadb.port.mk 11 Mar 2022 18:31:22 -0000 1.6 > +++ mariadb.port.mk 17 Sep 2026 17:13:58 -0000 > @@ -6,16 +6,17 @@ MODMARIADB_TEST_CMD ?= \ > MODMARIADB_TEST_DBNAME ?= > MODMARIADB_TEST_SOCKET = ${WRKDIR}/mariadb.sock > _MODMARIADB_TEST_DATA_DIR = ${WRKDIR}/testdb-mariadb > +MODMARIADB_SERVER_MY_CFG != perl -MFile::Basename=dirname -E 'say dirname($$ARGV[-1])."/files/module-server-my.cnf"' ${MAKEFILE_LIST:QL} > > MODMARIADB_SERVER_ARGS = \ > - --no-defaults \ > + --defaults-file=${MODMARIADB_SERVER_MY_CFG} \ > --datadir=${_MODMARIADB_TEST_DATA_DIR} \ > --skip-grant-tables \ > --skip-networking \ > --socket=${MODMARIADB_TEST_SOCKET} > > MODMARIADB_ADMIN_ARGS = \ > - --no-defaults \ > + --defaults-file=${MODMARIADB_SERVER_MY_CFG} \ > --host=localhost \ > --protocol=socket \ > --socket=${MODMARIADB_TEST_SOCKET} > Index: files/module-server-my.cnf > =================================================================== > RCS file: files/module-server-my.cnf > diff -N files/module-server-my.cnf > --- /dev/null 1 Jan 1970 00:00:00 -0000 > +++ files/module-server-my.cnf 17 Sep 2026 17:13:58 -0000 > @@ -0,0 +1,3 @@ > +[mysqld] > +innodb_buffer_pool_size_max=512m > +open_files_limit=256 >