feat(identity): rename user-visible identity to voculinux with one-time legacy import

The fork takes its own name everywhere a user can see it: binaries
(voculinux, voculinux-gui), desktop entry, autostart, tray, D-Bus
namespace (com.voculinux.Voculinux, no alias for the old name),
config/data/cache dirs, single-instance lock, IBus engine identity,
tray icons, resource prefixes, VOCULINUX_* environment names, and the
update-checker user agent. The internal Python module stays vocalinux
and the distribution metadata keeps the upstream URLs as provenance.

On first run a previous Vocalinux install's config.json, custom
dictionary, and portal restore token are copied once into the new
locations (new config always wins, no merge, no write-back); models
re-resolve through the pinned-checksum download path. An offline
naming-sweep test proves no old-name strings remain on user-visible
surfaces outside the allowlist.

Refs #18
This commit is contained in:
soubarnak
2026-11-06 01:29:39 +05:30
parent c565e6d946
commit ea7be5f111
251 changed files with 2449 additions and 1991 deletions
+8 -8
View File
@@ -11,9 +11,9 @@ class TestXdgHelpers:
with patch.dict(os.environ, {}, clear=True):
assert paths.xdg_config_home() == os.path.expanduser("~/.config")
assert paths.xdg_data_home() == os.path.expanduser("~/.local/share")
assert paths.config_dir() == os.path.expanduser("~/.config/vocalinux")
assert paths.data_dir() == os.path.expanduser("~/.local/share/vocalinux")
assert paths.models_dir() == os.path.expanduser("~/.local/share/vocalinux/models")
assert paths.config_dir() == os.path.expanduser("~/.config/voculinux")
assert paths.data_dir() == os.path.expanduser("~/.local/share/voculinux")
assert paths.models_dir() == os.path.expanduser("~/.local/share/voculinux/models")
def test_honours_xdg_environment(self):
env = {
@@ -21,9 +21,9 @@ class TestXdgHelpers:
"XDG_DATA_HOME": "/run/user/1000/data",
}
with patch.dict(os.environ, env, clear=True):
assert paths.config_dir() == "/run/user/1000/cfg/vocalinux"
assert paths.data_dir() == "/run/user/1000/data/vocalinux"
assert paths.models_dir() == "/run/user/1000/data/vocalinux/models"
assert paths.config_dir() == "/run/user/1000/cfg/voculinux"
assert paths.data_dir() == "/run/user/1000/data/voculinux"
assert paths.models_dir() == "/run/user/1000/data/voculinux/models"
def test_empty_env_falls_back_to_default(self):
# The XDG spec says empty values must be treated as unset.
@@ -33,9 +33,9 @@ class TestXdgHelpers:
def test_flatpak_style_data_home(self):
# Flatpak points XDG_DATA_HOME at ~/.var/app/<app-id>/data.
flatpak_data = "/home/user/.var/app/com.vocalinux.Vocalinux/data"
flatpak_data = "/home/user/.var/app/com.voculinux.Voculinux/data"
with patch.dict(os.environ, {"XDG_DATA_HOME": flatpak_data}, clear=True):
assert paths.models_dir() == os.path.join(flatpak_data, "vocalinux", "models")
assert paths.models_dir() == os.path.join(flatpak_data, "voculinux", "models")
def test_is_within_directory(self, tmp_path):
nested = tmp_path / "models" / "ggml-tiny.bin"