[InterNetNews/inn] 512134: hissqlite: Initialize a fresh database at install

Kevin Bowling noreply at github.com
Thu Jul 16 20:24:55 UTC 2026


  Branch: refs/heads/main
  Home:   https://github.com/InterNetNews/inn
  Commit: 512134329ecffbeaa5cde2cf53791be08fc5b8e6
      https://github.com/InterNetNews/inn/commit/512134329ecffbeaa5cde2cf53791be08fc5b8e6
  Author: Kevin Bowling <kevin.bowling at kev009.com>
  Date:   2026-07-16 (Thu, 16 Jul 2026)

  Changed paths:
    M doc/pod/hissqlite.pod
    M doc/pod/install.pod
    M site/Makefile

  Log Message:
  -----------
  hissqlite: Initialize a fresh database at install

innd deliberately opens the history without HIS_CREAT (a
missing database at startup is more likely a mount failure than a
fresh install, and auto-creating an empty history would re-accept
everything), so initialization must happen beforehand.  "make install"
only knew the hisv6 procedure (touch history + makedbz -i -o), which
with hismethod set to hissqlite leaves a stray empty hisv6 database and
no .sqlite, and innd then refuses to start.

The initializer is makehistory with no arguments: it opens the
history with HIS_CREAT, and on an empty spool that simply creates an
initialized empty database (the makedbz -i -o equivalent; verified, and
the result opens through the WAL direct-reader path).  A bare "touch
history.sqlite" is not sufficient: a zero-byte file has no schema and
is not in WAL mode, and both innd and the readers refuse it cleanly.

site/Makefile now branches the history-creation recipe on the
configured hismethod: for hissqlite it runs makehistory once, keyed on
history.sqlite being absent so reinstalls stay no-ops; the hisv6 path
is unchanged, and DESTDIR (packaging) installs take the historical
path since the installed binaries and inn.conf are not available to
query.  Document the manual procedure in INSTALL next to the makedbz
instructions and in hissqlite(5).

close #361



To unsubscribe from these emails, change your notification settings at https://github.com/InterNetNews/inn/settings/notifications


More information about the inn-committers mailing list