From 9538776fe3f2c5b4c327443bda256cfdbb36b354 Mon Sep 17 00:00:00 2001 From: Storm Dragon Date: Sat, 31 Oct 2026 11:03:48 -0400 Subject: [PATCH] Publish helper test output atomically and patch the release package --- distro-packages/Arch-Linux/cthulhu/.SRCINFO | 4 +++- distro-packages/Arch-Linux/cthulhu/PKGBUILD | 13 ++++++++++--- .../cthulhu/helper-environment-test.patch | 14 ++++++++++++++ internal/wine/manager_test.go | 3 ++- 4 files changed, 29 insertions(+), 5 deletions(-) create mode 100644 distro-packages/Arch-Linux/cthulhu/helper-environment-test.patch diff --git a/distro-packages/Arch-Linux/cthulhu/.SRCINFO b/distro-packages/Arch-Linux/cthulhu/.SRCINFO index 665fe0b..357deb3 100644 --- a/distro-packages/Arch-Linux/cthulhu/.SRCINFO +++ b/distro-packages/Arch-Linux/cthulhu/.SRCINFO @@ -1,7 +1,7 @@ pkgbase = cthulhu pkgdesc = Desktop-agnostic screen reader with speech, Braille, and Tentacle support pkgver = 2026.10.31 - pkgrel = 1 + pkgrel = 2 url = https://git.stormux.org/storm/cthulhu arch = x86_64 arch = aarch64 @@ -35,7 +35,9 @@ pkgbase = cthulhu options = !debug options = !lto source = cthulhu::git+https://git.stormux.org/storm/cthulhu.git#tag=2026.10.31 + source = helper-environment-test.patch sha512sums = SKIP + sha512sums = 219debca6195ff9cc79f464beed67baa7847bb84075ee3796401f2be9cfb34fac437ac3065e16fdaa30d2456f6d04da93a84f24e4dd27338463e166e445ec4a1 optdepends_x86_64 = wine-access: Wine, Proton, NVDA Controller, and Tolk integration pkgname = cthulhu diff --git a/distro-packages/Arch-Linux/cthulhu/PKGBUILD b/distro-packages/Arch-Linux/cthulhu/PKGBUILD index 9a7e960..0444f33 100644 --- a/distro-packages/Arch-Linux/cthulhu/PKGBUILD +++ b/distro-packages/Arch-Linux/cthulhu/PKGBUILD @@ -3,7 +3,7 @@ pkgname=cthulhu pkgver=2026.10.31 -pkgrel=1 +pkgrel=2 pkgdesc="Desktop-agnostic screen reader with speech, Braille, and Tentacle support" url="https://git.stormux.org/storm/cthulhu" arch=(x86_64 aarch64 armv7h) @@ -53,8 +53,15 @@ makedepends=( ) options=(!debug !lto) # The release tag must exist upstream before makepkg can fetch this source. -source=("${pkgname}::git+https://git.stormux.org/storm/${pkgname}.git#tag=${pkgver}") -sha512sums=('SKIP') +source=("${pkgname}::git+https://git.stormux.org/storm/${pkgname}.git#tag=${pkgver}" + "helper-environment-test.patch") +sha512sums=('SKIP' + '219debca6195ff9cc79f464beed67baa7847bb84075ee3796401f2be9cfb34fac437ac3065e16fdaa30d2456f6d04da93a84f24e4dd27338463e166e445ec4a1') + +prepare() { + cd "${pkgname}" + patch -Np1 -i "${srcdir}/helper-environment-test.patch" +} build() { cd "${pkgname}" diff --git a/distro-packages/Arch-Linux/cthulhu/helper-environment-test.patch b/distro-packages/Arch-Linux/cthulhu/helper-environment-test.patch new file mode 100644 index 0000000..e352be7 --- /dev/null +++ b/distro-packages/Arch-Linux/cthulhu/helper-environment-test.patch @@ -0,0 +1,14 @@ +diff --git a/internal/wine/manager_test.go b/internal/wine/manager_test.go +index 438fe26..0a5a0bb 100644 +--- a/internal/wine/manager_test.go ++++ b/internal/wine/manager_test.go +@@ -226,7 +226,8 @@ func TestManagerLaunchesAndStopsHelperForActivePrefix(t *testing.T) { + t.Setenv("CTHULHU_TEST_WINE_OUTPUT", output) + t.Setenv("DBUS_SESSION_BUS_ADDRESS", "unix:path=/reader-bus") + helper := filepath.Join(root, "helper") +- script := "#!/bin/sh\nprintf '%s\\n' \"$WINEPREFIX\" \"$CTHULHU_WINE_ACCESS_MANAGED\" \"$DBUS_SESSION_BUS_ADDRESS\" \"$DISPLAY\" > \"$CTHULHU_TEST_WINE_OUTPUT\"\nexec sleep 30\n" ++ // Publish the complete environment atomically; printf can issue multiple writes. ++ script := "#!/bin/sh\nprintf '%s\\n' \"$WINEPREFIX\" \"$CTHULHU_WINE_ACCESS_MANAGED\" \"$DBUS_SESSION_BUS_ADDRESS\" \"$DISPLAY\" > \"$CTHULHU_TEST_WINE_OUTPUT.tmp\"\nmv \"$CTHULHU_TEST_WINE_OUTPUT.tmp\" \"$CTHULHU_TEST_WINE_OUTPUT\"\nexec sleep 30\n" + if err := os.WriteFile(helper, []byte(script), 0700); err != nil { + t.Fatal(err) + } diff --git a/internal/wine/manager_test.go b/internal/wine/manager_test.go index 438fe26..0a5a0bb 100644 --- a/internal/wine/manager_test.go +++ b/internal/wine/manager_test.go @@ -226,7 +226,8 @@ func TestManagerLaunchesAndStopsHelperForActivePrefix(t *testing.T) { t.Setenv("CTHULHU_TEST_WINE_OUTPUT", output) t.Setenv("DBUS_SESSION_BUS_ADDRESS", "unix:path=/reader-bus") helper := filepath.Join(root, "helper") - script := "#!/bin/sh\nprintf '%s\\n' \"$WINEPREFIX\" \"$CTHULHU_WINE_ACCESS_MANAGED\" \"$DBUS_SESSION_BUS_ADDRESS\" \"$DISPLAY\" > \"$CTHULHU_TEST_WINE_OUTPUT\"\nexec sleep 30\n" + // Publish the complete environment atomically; printf can issue multiple writes. + script := "#!/bin/sh\nprintf '%s\\n' \"$WINEPREFIX\" \"$CTHULHU_WINE_ACCESS_MANAGED\" \"$DBUS_SESSION_BUS_ADDRESS\" \"$DISPLAY\" > \"$CTHULHU_TEST_WINE_OUTPUT.tmp\"\nmv \"$CTHULHU_TEST_WINE_OUTPUT.tmp\" \"$CTHULHU_TEST_WINE_OUTPUT\"\nexec sleep 30\n" if err := os.WriteFile(helper, []byte(script), 0700); err != nil { t.Fatal(err) }