From Fedora Project Wiki
(Submitting the change)
(→‎Release Notes: fix typo in command)
Line 96: Line 96:


== Release Notes ==
== Release Notes ==
The bogofilter package switched its database engine from Berkeley DB (libdb) to SQLite because Fedora deprecated libdb. Users can migrate their word lists manually with `bogomigrate-berkeley ~/.bogofiler/wordlist.db`.
The bogofilter package switched its database engine from Berkeley DB (libdb) to SQLite because Fedora deprecated libdb. Users can migrate their word lists manually with `bogomigrate-berkeley ~/.bogofilter/wordlist.db`.

Revision as of 15:58, 5 November 2023

Switch bogofilter to use SQLite

Important.png
This is a proposed Change for Fedora Linux.
This document represents a proposed Change. As part of the Changes process, proposals are publicly announced in order to receive community feedback. This proposal will only be implemented if approved by the Fedora Engineering Steering Committee.

Summary

Switch bogofilter to use SQLite as its database engine, rather than Berkeley DB (libdb).

Owner

Current status

Detailed Description

Switch bogofilter to use SQLite as its database engine, rather than Berkeley DB (libdb). Another change (https://fedoraproject.org/wiki/Changes/Libdb_deprecated) marked libdb as deprecated, and that change lists bogofilter as a dependency. Thus this change fixes another application to avoid the deprecated libdb.

Benefit to Fedora

Fedora will have one less dependency on the deprecated libdb package. Additionally, other distributions have already migrated to SQLite, and this will allow sharing word lists with those distributions. For example, perhaps a workstation running Fedora generates wordlist.db before installing it on another computer running Alpine and acting as a server.

Scope

  • Proposal owners:

Merge pull request https://src.fedoraproject.org/rpms/bogofilter/pull-request/2. This makes the database backend conditional, with SQLite being the default. Support for libdb can be conditionally compiled to create a migration tool capable of migrating existing libdb databases to SQLite.

  • Other developers: N/A (not needed for this Change)
  • Release engineering: N/A (not needed for this Change)
  • Policies and guidelines: N/A (not needed for this Change)
  • Trademark approval: N/A (not needed for this Change)
  • Alignment with Community Initiatives: Support Mark libdb as deprecated

Upgrade/compatibility impact

Bogofilter can support only one database backend at a time, and thus a new SQLite bogofilter package will be unable to process libdb data. Thus the new package provides a migration script.

How To Test

This test generates a word list and migrates it to work with the new SQLite backend. Install original bogofilter and add at least one word to its database, for example with:

  echo abc | bogofilter --bogofilter-dir=/tmp/bftest/ --register-spam

Bogofilter will create the directory /tmp/bftest/, and it will contain a wordslist.db file. To verify the word had been added run:

  bogoutil -d /tmp/bftest/wordlist.db

Install the updated bogofilter and migrate the existing libdb database with:

  bogomigrate-berkeley /tmp/bftest/wordlist.db

This tool will print whether the migration succeeded. Verify the "abc" word is present in the newly created SQLite database with:

  bogoutil -d /tmp/bftest/wordlist.db

User Experience

Dependencies

N/A (not needed for this Change)

Contingency Plan

  • Contingency mechanism: N/A (not a System Wide Change)
  • Contingency deadline: N/A (not a System Wide Change)
  • Blocks release? No

Documentation

N/A (not a System Wide Change)

Release Notes

The bogofilter package switched its database engine from Berkeley DB (libdb) to SQLite because Fedora deprecated libdb. Users can migrate their word lists manually with bogomigrate-berkeley ~/.bogofilter/wordlist.db.