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
+7 -7
View File
@@ -84,14 +84,14 @@ class TestWaitForModifiersReleased:
def test_disabled_via_env(self, monkeypatch):
inj = _bare_injector()
monkeypatch.setenv("VOCALINUX_INJECT_MODIFIER_WAIT", "0")
monkeypatch.setenv("VOCULINUX_INJECT_MODIFIER_WAIT", "0")
with patch.object(inj, "_held_modifier_keycodes") as held:
inj._wait_for_modifiers_released()
held.assert_not_called()
def test_gives_up_after_timeout(self, monkeypatch):
inj = _bare_injector()
monkeypatch.setenv("VOCALINUX_INJECT_MODIFIER_WAIT", "0.05")
monkeypatch.setenv("VOCULINUX_INJECT_MODIFIER_WAIT", "0.05")
# Always held -> must still return (best-effort) rather than hang.
with patch.object(inj, "_held_modifier_keycodes", return_value={56}), patch("time.sleep"):
inj._wait_for_modifiers_released() # should return within the timeout
@@ -227,30 +227,30 @@ class TestInjectionModifierWaitSeconds:
@pytest.mark.parametrize("raw,expected", [("2.5", 2.5), ("0", 0.0), ("0.5", 0.5)])
def test_valid_values(self, raw, expected, monkeypatch):
inj = _bare_injector()
monkeypatch.setenv("VOCALINUX_INJECT_MODIFIER_WAIT", raw)
monkeypatch.setenv("VOCULINUX_INJECT_MODIFIER_WAIT", raw)
assert inj._injection_modifier_wait_seconds() == expected
@pytest.mark.parametrize("raw", ["inf", "-inf", "nan", "Infinity", "NaN"])
def test_non_finite_falls_back_to_default(self, raw, monkeypatch):
inj = _bare_injector()
monkeypatch.setenv("VOCALINUX_INJECT_MODIFIER_WAIT", raw)
monkeypatch.setenv("VOCULINUX_INJECT_MODIFIER_WAIT", raw)
assert inj._injection_modifier_wait_seconds() == 1.0
def test_non_numeric_falls_back_to_default(self, monkeypatch):
inj = _bare_injector()
monkeypatch.setenv("VOCALINUX_INJECT_MODIFIER_WAIT", "abc")
monkeypatch.setenv("VOCULINUX_INJECT_MODIFIER_WAIT", "abc")
assert inj._injection_modifier_wait_seconds() == 1.0
def test_unset_uses_default(self, monkeypatch):
inj = _bare_injector()
monkeypatch.delenv("VOCALINUX_INJECT_MODIFIER_WAIT", raising=False)
monkeypatch.delenv("VOCULINUX_INJECT_MODIFIER_WAIT", raising=False)
assert inj._injection_modifier_wait_seconds() == 1.0
def test_inf_does_not_block_forever(self, monkeypatch):
# Regression: with 'inf', the wait must still terminate (bounded by the
# finite default) instead of looping forever while a modifier is held.
inj = _bare_injector()
monkeypatch.setenv("VOCALINUX_INJECT_MODIFIER_WAIT", "inf")
monkeypatch.setenv("VOCULINUX_INJECT_MODIFIER_WAIT", "inf")
# Simulate the clock crossing the finite default deadline in a few steps.
clock = iter([0.0, 0.5, 1.5])
monkeypatch.setattr("time.monotonic", lambda: next(clock, 2.0))