[Midnightbsd-cvs] [MidnightBSD/mports] b2dfe6: mail/bogofilter-bdb: update to 1.3.0.rc1 (#732)
Lucas Holt
noreply at github.com
Sun Aug 9 16:30:22 EDT 2026
Branch: refs/heads/master
Home: https://github.com/MidnightBSD/mports
Commit: b2dfe6218678dc05e35e37d0f4cf44fa83c8b82f
https://github.com/MidnightBSD/mports/commit/b2dfe6218678dc05e35e37d0f4cf44fa83c8b82f
Author: Lucas Holt <luke at foolishgames.com>
Date: 2026-08-09 (Sun, 09 Aug 2026)
Changed paths:
M mail/bogofilter-bdb/Makefile
M mail/bogofilter-bdb/distinfo
R mail/bogofilter-bdb/files/patch-configure
M mail/bogofilter-bdb/files/patch-contrib__trainbogo.sh
A mail/bogofilter-bdb/files/patch-src_datastore.c
A mail/bogofilter-bdb/files/patch-src_datastore__lmdb.c
M mail/bogofilter/Makefile
Log Message:
-----------
mail/bogofilter-bdb: update to 1.3.0.rc1 (#732)
Update `mail/bogofilter-bdb` (master) and its `mail/bogofilter` slave
from 1.2.5 to 1.3.0.rc1, matching FreeBSD.
## The real bug this bump exposed
**bogofilter 1.3.0 changed configure's default backend from `db` to
`sqlite3`** (`WITH_DB_ENGINE=sqlite3` at `configure:9554`). The mports
master never passed `--with-database` — it relied on the 1.2.5 default.
The first master build therefore produced a **SQLite** binary that still
linked `libdb-5.3` via `BF_LIBS` and **passed its entire test suite**.
Only `bogofilter -V` reporting `bogofilter-sqlite … Database: SQLite
3.50.4` caught it. Fixed with an explicit `--with-database=db` inside
the master's `.if MASTERDIR == .CURDIR` guard; it now reports `Database:
Berkeley DB 5.3.28`.
FreeBSD is immune because their master states `--with-database=lmdb`
explicitly.
Confirmed the guard doesn't leak into the slave: `bmake -V
CONFIGURE_ARGS` yields `--with-database=lmdb …` in the slave and
`--with-database=db …` in the master.
## Master/slave mapping
The layout is **inverted** between the trees. FreeBSD *deleted*
`mail/bogofilter-bdb`; their `mail/bogofilter` is the master (LMDB 0.9 /
`databases/lmdb0`) with `-kc`, `-lmdb1`, `-sqlite` slaves. mports keeps
BDB as master with `bogofilter` (LMDB) as its only slave.
FreeBSD's master Makefile was treated as the **shared body**, with
backend-specific bits kept on the correct side of the mports guard:
`USES+=bdb:5` and the new `--with-database=db` in the mports master;
`--with-database=lmdb` plus the LMDB `LIB_DEPENDS` in the slave.
FreeBSD's `BF_LIBS?=`/`BF_CPPFLAGS?=` empty defaults were deliberately
**not** imported — the mports master must keep
`-l${BDB_LIB_NAME}`/`-I${BDB_INCLUDE_DIR}` as defaults for the slave to
override.
## Patch set
- **Deleted** `patch-configure` — the clang/`gcc4` block it targeted no
longer exists in 1.3.0's configure (verified by grep, not assumed).
- **Re-anchored** `patch-contrib__trainbogo.sh` to FreeBSD's 2025
version (hunk moved 181 → 178).
- **Added** `patch-src_datastore.c` (misaligned-access fix) and
`patch-src_datastore__lmdb.c` (LMDB 1.0 `mdb_env_get_maxkeysize()`
ordering) from FreeBSD. The latter is inert against lmdb 0.9 but kept
for parity, and harmless to the BDB build since the file isn't compiled.
## Dependencies — nothing missing, despite appearances
mports `databases/lmdb` is 0.9.33 and ships `liblmdb.so.0` — exactly
what FreeBSD's `databases/lmdb0` provides. The slave's existing
`liblmdb.so:databases/lmdb` is already equivalent to FreeBSD's
`liblmdb.so.0:databases/lmdb0`. **There is no `databases/lmdb0` in
mports and none is needed.**
## Verification — both backends
| | makesum | patch | build | fake | package | `make check` |
|---|---|---|---|---|---|---|
| bogofilter-bdb (BDB 5) | ✅ | ✅ | ✅ | ✅ | ✅ | **63 PASS / 2 SKIP / 0
FAIL** |
| bogofilter (LMDB 0.9) | — | ✅ | ✅ | ✅ | ✅ | **62 PASS / 3 SKIP / 0
FAIL** |
distinfo SHA256 matches FreeBSD byte-for-byte. Slave verified:
`bogofilter -V` → `bogofilter-lmdb … LMDB 0.9.33`, linked against
`liblmdb.so.0`. The PASS/SKIP split differs by backend — those are
backend-dependent skips, not a regression. pkg-plist unchanged and still
byte-identical to FreeBSD's; both staged trees match it exactly.
**On the RC:** 1.3.0.rc1 is an upstream release *candidate* (latest
stable is 1.2.5), adopted to follow FreeBSD. It looks suitable — full
`make check` passes on both backends with zero failures, nothing
disabled, no `NO_TEST` added, and the distfile hash matches FreeBSD's,
so upstream hasn't withdrawn it.
## Flagged, not changed
- **LICENSE:** mports declares `gpl2`, FreeBSD `GPLv2+`, and 1.3.0.rc1's
`COPYING` now opens with a note that parts may be **GPLv3**, shipping
`gpl-3.0.txt` (referenced in `Makefile.am`). Maintainer call, so left
alone.
- The `post-patch` seds **work only by luck**. Upstream grew the strings
to `INTEGRITY_TESTS = t.lock1 t.lock3 t.valgrind t.u_strl` and
`ENVIRON_TESTS = t.abort t.env t.ctype …`; the existing patterns still
match as substrings. `REINPLACE_CMD` no-ops silently, so this will fail
quietly one day.
- Master's `EXPIRATION_DATE=2025-06-30` is 13 months past. mports only
warns (no `IGNORE` — grep-verified in `Mk/bsd.mport.mk`), so it didn't
block. Not extended.
- `CONFLICTS_INSTALL` on both ports names
`bogofilter-kc`/`bogofilter-sqlite`, which don't exist in mports.
Harmless.
amd64 only.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
## Summary by Sourcery
Update bogofilter-bdb and its bogofilter slave to the 1.3.0.rc1 release
while keeping Berkeley DB as the master backend and LMDB as the slave
backend, aligning with the current FreeBSD ports layout.
New Features:
- Switch bogofilter-bdb to the 1.3.0.rc1 upstream release and adjust
distfile sources accordingly.
Bug Fixes:
- Force the master bogofilter-bdb port to build against Berkeley DB by
explicitly selecting the db backend instead of configure's new sqlite3
default.
- Fix potential misaligned memory access when converting datastore
records.
- Ensure LMDB datastore initialization queries the maximum key size
after opening the environment to avoid ignoring the database under newer
LMDB versions.
Enhancements:
- Refresh the contrib trainbogo.sh patch against the latest upstream
script version.
- Trim obsolete or unused documentation installs from the bogofilter-bdb
port's post-install target.
Signed-off-by: Lucas Holt <luke at foolishgames.com>
To unsubscribe from these emails, change your notification settings at https://github.com/MidnightBSD/mports/settings/notifications
More information about the Midnightbsd-cvs
mailing list