vole
Site
Clone
Read only, no credentials:
https://rodent.software/vole.git
Write over SSH with a registered key:
git clone ssh://git@rodent.software/vole.git
Self-hosted forge that lives in your Git repo.
Merge release channels into the account database and rename it instance.db
3047be84e9bce79372051c09854ce9b05f12a9bf · Keenan Nemetz · 17d ago · parent 262e516e
Merge release channels into the account database and rename it instance.db The instance keeps four SQLite files instead of five. Release channels were in a file of their own only because they were added beside the derived index; they are authoritative source state, like the roster, so they belong in the file an operator restores. Nothing has to be migrated: channels.db never shipped in a release, so only an instance tracking main can have one. The account database is now data/instance.db. The package comments already called it that; only the filename disagreed. Moving an existing instance is an operator step, by decision: a rename under a live server can lose the -wal file a hook subprocess still has open. Vole refuses to start while data/users.db is still in place, and says what to move, rather than creating an empty database beside it that would look like a successful upgrade. The list of databases now lives in Config.Databases, which TightenSecrets, the hook plumbing, and the admin commands read, so a missed -wal file is no longer a nine-file change. `vole admin account backup <path>` becomes `vole admin db backup <dir>` and covers every authoritative database; `db list` and `db check` answer what to back up and whether it is intact.
server/deployment_modes_test.go +3−3
| @@ -26,7 +26,7 @@ func TestFreshInstanceCreatesNoReadableSecrets(t *testing.T) { | |||
| 26 | 26 | ||
| 27 | 27 | paths := []string{ | |
| 28 | 28 | f.cfg.DataDir, | |
| 29 | f.cfg.UsersDB(), | ||
| 29 | f.cfg.InstanceDB(), | ||
| 30 | 30 | f.cfg.IndexDB(), | |
| 31 | 31 | f.cfg.RunsDB(), | |
| 32 | 32 | f.cfg.SSHHostKey(), | |
| @@ -57,7 +57,7 @@ func TestUpgradedInstanceHasItsSecretsTightened(t *testing.T) { | |||
| 57 | 57 | f := newFixture(t) | |
| 58 | 58 | f.addWriter(t) | |
| 59 | 59 | ||
| 60 | for _, path := range []string{f.cfg.UsersDB(), f.cfg.SSHHostKey(), f.cfg.AuditLog()} { | ||
| 60 | for _, path := range []string{f.cfg.InstanceDB(), f.cfg.SSHHostKey(), f.cfg.AuditLog()} { | ||
| 61 | 61 | if err := os.Chmod(path, 0o644); err != nil { | |
| 62 | 62 | t.Fatal(err) | |
| 63 | 63 | } | |
| @@ -71,7 +71,7 @@ func TestUpgradedInstanceHasItsSecretsTightened(t *testing.T) { | |||
| 71 | 71 | } | |
| 72 | 72 | t.Cleanup(func() { restarted.Close() }) | |
| 73 | 73 | ||
| 74 | for _, path := range []string{f.cfg.UsersDB(), f.cfg.SSHHostKey(), f.cfg.AuditLog()} { | ||
| 74 | for _, path := range []string{f.cfg.InstanceDB(), f.cfg.SSHHostKey(), f.cfg.AuditLog()} { | ||
| 75 | 75 | st, err := os.Stat(path) | |
| 76 | 76 | if err != nil { | |
| 77 | 77 | t.Fatal(err) | |