Bug 284027 - databases/luadbi: default database driver swap breaking POLA
Summary: databases/luadbi: default database driver swap breaking POLA
Status: New
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Many People
Assignee: freebsd-ports-bugs (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2025-01-13 09:11 UTC by km
Modified: 2025-01-14 17:04 UTC (History)
2 users (show)

See Also:
bugzilla: maintainer-feedback? (olexander.v.melnyk)


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description km 2025-01-13 09:11:43 UTC
This follows up on #270844.

It seems the luadbi is swapping default database drivers, which are getting installed along with luadbi when using packages, back and forth, most recently from SQLite3 to MySQL in https://cgit.freebsd.org/ports/commit/databases/luadbi?id=b43fee0213d3ff81106cbccd08765564e55cbf30

The effect of such change is that upon package upgrade, the existing database driver is removed from the system, and a new one is installed. This could be considered warranted when default driver becomes broken (as apparently was the case when going from MySQL to SQLite3), but just swapping defaults without any strong reason is breaking POLA.

In my case this broke Prosody configuration, which relied on SQLite.

Now that subpackage infrastructure is in place, it seems individual database drivers are rather good candidates for getting subpackaged?
Comment 1 László Károlyi 2025-01-13 15:31:31 UTC
I'm all for dissecting luadbi into flavors, will use the mysql/mariadb one if done.

All we need now is a working patch.
Comment 2 km 2025-01-13 15:47:21 UTC
(In reply to László Károlyi from comment #1)

Sounds great! Maybe packages would be a better option, though?

Flavor: One port is built multiple time with variations, each variation creating a separate package.

Subpackage: Build the port once and create multiple packages.
Comment 3 km 2025-01-14 17:04:48 UTC
(In reply to km from comment #2)

> Sounds great! Maybe packages would be a better option, though?

subpackages...