Created attachment 222033 [details] add a force dependency on databases/py-sqlite3. Hi. In recently www/trac-devel(1.5 and after), it's required SQLite3 module. So, to fix dependency error even if we don't want a SQLite3 database, please apply attached a patch. = A error message with trac on uwsgi =================================== *** Operational MODE: threaded *** Traceback (most recent call last): File "/usr/local/lib/python3.7/site-packages/trac/db/sqlite_backend.py", line 37, in <module> import pysqlite2.dbapi2 as sqlite ModuleNotFoundError: No module named 'pysqlite2' During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/usr/local/lib/python3.7/site-packages/trac/web/main.py", line 40, in <module> from trac.env import open_environment File "/usr/local/lib/python3.7/site-packages/trac/env.py", line 42, in <module> from trac.db.convert import copy_tables File "/usr/local/lib/python3.7/site-packages/trac/db/convert.py", line 18, in <module> from trac.db import sqlite_backend File "/usr/local/lib/python3.7/site-packages/trac/db/sqlite_backend.py", line 39, in <module> import sqlite3 as sqlite File "/usr/local/lib/python3.7/sqlite3/__init__.py", line 23, in <module> from sqlite3.dbapi2 import * File "/usr/local/lib/python3.7/sqlite3/dbapi2.py", line 27, in <module> from _sqlite3 import * ModuleNotFoundError: No module named '_sqlite3' unable to load app 0 (mountpoint='') (callable not found or import error)
trac-admin command requires py-sqlite3 backend in trac/db/convert.py. (for convert_db sub command) > from trac.db import sqlite_backend But, this patch does not seem to be able to convert between MySQL and PostgreSQL. Maybe the DB backend should be selectable with checkboxes.
Hi, according to my knowledge it depends on the backend you choosing. So not needed in case of MySQL or PgSQL backends. Please let me know if i am not correct.
Ah, i see. Convert command is kind of specific edge case. I do not want to set dependency on it.
But i see your point. In fact you are right, it should not be radio but checkboxes. As one may serve few trac envs on the same hosts, with a different backends. Let me fix that.
A commit references this bug: Author: samm Date: Sun Jan 31 10:47:03 UTC 2021 New revision: 563484 URL: https://svnweb.freebsd.org/changeset/ports/563484 Log: www/trac-devel: allow to select multiply database backends Trac supports multiply environments with different database backends. Also it enable usage of the "convert" admin command to migrate between backends PR: 253115 Reported by: nork@ninth-nine.com Changes: head/www/trac-devel/Makefile
Fixed in r563484. It is now possible to select > 1 database backend. Thank you for reporting!
Hi Alex, Thank you, but my report's theme is not OPTIONS_RADIO v.s. OPTIONS_MULTI, and No SQLite3 No Trac.
Hi Oleksii, I'm sorry, you are Oleksii not Alex.
Hi, i explained why i dont want to set mandatory dependency on SQLite. Instead i did ability to select > 1 sql backend, so your use-case is covered. Please let me know if you think that its not working for you.