From 191317eb1f5fc92ceac771e1cbe1cee9147d2d55 Mon Sep 17 00:00:00 2001 From: Storm Dragon Date: Sat, 1 Aug 2026 04:33:49 -0400 Subject: [PATCH] PKGBUILD work in preparation for release. --- .gitignore | 8 ++-- AGENTS.md | 7 ++++ .../Arch-Linux/cthulhu-git/PKGBUILD | 4 +- .../cthulhu-wine-access-git/PKGBUILD | 1 + .../Arch-Linux/cthulhu-wine-access/PKGBUILD | 37 ---------------- distro-packages/Arch-Linux/cthulhu/PKGBUILD | 7 +--- tests/test_arch_pkgbuild_optional_wine.py | 42 ++++++++++++++++--- 7 files changed, 54 insertions(+), 52 deletions(-) delete mode 100644 distro-packages/Arch-Linux/cthulhu-wine-access/PKGBUILD diff --git a/.gitignore b/.gitignore index 9618e76..c493f16 100644 --- a/.gitignore +++ b/.gitignore @@ -74,9 +74,11 @@ debug.log # Package artifacts *.pkg.tar.zst -distro-packages/*/cthulhu/ -distro-packages/*/cthulhu-git/ -distro-packages/*/pkg/ +distro-packages/**/.SRCINFO +distro-packages/**/*.log +distro-packages/*/*/cthulhu/ +distro-packages/*/*/cthulhu-git/ +distro-packages/*/*/pkg/ # Generated makefiles (should not be committed) Makefile diff --git a/AGENTS.md b/AGENTS.md index 38f1021..54c782e 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -125,5 +125,12 @@ Run the narrowest relevant checks first, then broaden testing based on the affec - In particular, update both Arch Linux `PKGBUILD` files and, when relevant, Slint's `cthulhu-info` and `README`. Review the Slackware and Slint build files for any corresponding build-dependency changes. - Preserve the distinction between required, optional, and build-only dependencies so package builds install what Cthulhu actually needs without forcing optional features on every user. +## Arch package verification +- After changing an Arch Linux `PKGBUILD`, build every affected recipe in a clean chroot before considering the packaging work complete. Use `pkgctl build --clean` from the `devtools` package; a normal `makepkg` or `yay` build is not a substitute for this check. +- Validate both stable and `-git` recipes when a shared packaging change affects both. +- Build dependency packages first. When a split helper depends on a locally built package that is unavailable in the configured repositories, pass that package artifact to the helper build with `pkgctl build --clean -I /path/to/package.pkg.tar.zst`. +- Run `bash -n`, `shellcheck`, and `makepkg --printsrcinfo` on each changed recipe before the clean-chroot build. +- Report which recipes completed clean-chroot builds. If sudo access, network access, or an unavailable dependency prevents a build, state that explicitly instead of describing the package as verified. + ## Common Cthulhu agent mistakes - Do not edit or diagnose a stale installed copy under `~/.local/...`; update the repo and rebuild with `./build-local.sh`. diff --git a/distro-packages/Arch-Linux/cthulhu-git/PKGBUILD b/distro-packages/Arch-Linux/cthulhu-git/PKGBUILD index 82aa2ea..9e9de4f 100644 --- a/distro-packages/Arch-Linux/cthulhu-git/PKGBUILD +++ b/distro-packages/Arch-Linux/cthulhu-git/PKGBUILD @@ -65,8 +65,8 @@ optdepends=( 'python-pillow: Image processing for OCR' 'python-pytesseract: Python wrapper for Tesseract OCR engine' 'tesseract: OCR engine for text recognition' -) -optdepends_x86_64=( + + # The helper is x86_64-only, but this package is architecture-independent. 'cthulhu-wine-access-git: Wine, Proton, NVDA Controller, and Tolk integration' ) makedepends=( diff --git a/distro-packages/Arch-Linux/cthulhu-wine-access-git/PKGBUILD b/distro-packages/Arch-Linux/cthulhu-wine-access-git/PKGBUILD index a7ae5fa..1fd358e 100644 --- a/distro-packages/Arch-Linux/cthulhu-wine-access-git/PKGBUILD +++ b/distro-packages/Arch-Linux/cthulhu-wine-access-git/PKGBUILD @@ -23,6 +23,7 @@ provides=(cthulhu-wine-access) conflicts=(cthulhu-wine-access) source=("${_pkgname}::git+https://git.stormux.org/storm/${_pkgname}.git#branch=master") sha512sums=('SKIP') +options=(!lto) pkgver() { cd "${_pkgname}" diff --git a/distro-packages/Arch-Linux/cthulhu-wine-access/PKGBUILD b/distro-packages/Arch-Linux/cthulhu-wine-access/PKGBUILD deleted file mode 100644 index 57f854e..0000000 --- a/distro-packages/Arch-Linux/cthulhu-wine-access/PKGBUILD +++ /dev/null @@ -1,37 +0,0 @@ -# Maintainer: Storm Dragon -# shellcheck shell=bash disable=SC2034,SC2154,SC2164 - -pkgname=cthulhu-wine-access -pkgver=2026.07.18 -pkgrel=1 -pkgdesc="Optional Wine and Proton accessibility bridge for Cthulhu" -url="https://git.stormux.org/storm/cthulhu" -arch=(x86_64) -license=(LGPL-2.1-or-later) -depends=( - "cthulhu=${pkgver}" - glib2 - wine -) -makedepends=( - cmake - meson -) -source=("git+https://git.stormux.org/storm/cthulhu.git#tag=${pkgver}") -sha512sums=('SKIP') - -build() { - cd cthulhu - arch-meson _build -Dwine-access=enabled - meson compile -C _build -} - -package() { - cd cthulhu - install -Dm755 _build/cthulhu-wine-access.exe \ - "$pkgdir/usr/libexec/cthulhu/wine/cthulhu-wine-access.exe" - install -Dm755 _build/cthulhu-wine-access.exe.so \ - "$pkgdir/usr/libexec/cthulhu/wine/cthulhu-wine-access.exe.so" -} - -# vim:set sw=2 sts=-1 et: diff --git a/distro-packages/Arch-Linux/cthulhu/PKGBUILD b/distro-packages/Arch-Linux/cthulhu/PKGBUILD index 67983b1..fcf8181 100644 --- a/distro-packages/Arch-Linux/cthulhu/PKGBUILD +++ b/distro-packages/Arch-Linux/cthulhu/PKGBUILD @@ -3,7 +3,7 @@ pkgbase=cthulhu pkgname=cthulhu -pkgver=2026.07.18 +pkgver=2026.05.25 pkgrel=1 pkgdesc="Desktop-agnostic screen reader with plugin system, forked from Orca" url="https://git.stormux.org/storm/cthulhu" @@ -63,9 +63,6 @@ optdepends=( 'python-pytesseract: Python wrapper for Tesseract OCR engine' 'tesseract: OCR engine for text recognition' ) -optdepends_x86_64=( - 'cthulhu-wine-access: Wine, Proton, NVDA Controller, and Tolk integration' -) makedepends=( git meson @@ -75,7 +72,7 @@ sha512sums=('SKIP') build() { cd cthulhu - arch-meson _build -Dwine-access=disabled + arch-meson _build meson compile -C _build } diff --git a/tests/test_arch_pkgbuild_optional_wine.py b/tests/test_arch_pkgbuild_optional_wine.py index bbd76a1..bde7168 100644 --- a/tests/test_arch_pkgbuild_optional_wine.py +++ b/tests/test_arch_pkgbuild_optional_wine.py @@ -12,14 +12,15 @@ class ArchPkgbuildOptionalWineTests(unittest.TestCase): ] cls.helperPkgbuilds = [ repository / "distro-packages" / "Arch-Linux" / name / "PKGBUILD" - for name in ("cthulhu-wine-access", "cthulhu-wine-access-git") + for name in ("cthulhu-wine-access-git",) ] def test_main_packages_disable_wine_helper_build(self): - for pkgbuild in self.pkgbuilds: - with self.subTest(pkgbuild=pkgbuild): - contents = pkgbuild.read_text(encoding="utf-8") - self.assertIn("-Dwine-access=disabled", contents) + stableContents = self.pkgbuilds[0].read_text(encoding="utf-8") + self.assertNotIn("wine-access", stableContents) + + gitContents = self.pkgbuilds[1].read_text(encoding="utf-8") + self.assertIn("-Dwine-access=disabled", gitContents) def test_main_packages_do_not_depend_on_wine(self): for pkgbuild in self.pkgbuilds: @@ -33,6 +34,21 @@ class ArchPkgbuildOptionalWineTests(unittest.TestCase): } self.assertNotIn("wine", dependencyLines) + def test_main_packages_advertise_matching_optional_helper(self): + stableContents = self.pkgbuilds[0].read_text(encoding="utf-8") + self.assertNotIn("cthulhu-wine-access", stableContents) + + gitContents = self.pkgbuilds[1].read_text(encoding="utf-8") + self.assertIn( + "'cthulhu-wine-access-git: Wine, Proton, NVDA Controller, and Tolk integration'", + gitContents, + ) + self.assertNotIn("optdepends_x86_64", gitContents) + + def test_stable_packages_use_current_release_version(self): + contents = self.pkgbuilds[0].read_text(encoding="utf-8") + self.assertRegex(contents, r"(?m)^pkgver=2026\.05\.25$") + def test_optional_helper_packages_own_the_wine_dependency(self): for pkgbuild in self.helperPkgbuilds: with self.subTest(pkgbuild=pkgbuild): @@ -40,6 +56,22 @@ class ArchPkgbuildOptionalWineTests(unittest.TestCase): self.assertIn("-Dwine-access=enabled", contents) self.assertRegex(contents, r"(?m)^ wine$") + def test_optional_helper_packages_disable_lto(self): + for pkgbuild in self.helperPkgbuilds: + with self.subTest(pkgbuild=pkgbuild): + contents = pkgbuild.read_text(encoding="utf-8") + self.assertRegex(contents, r"(?m)^options=\(!lto\)$") + + def test_git_sources_declare_git_as_a_build_dependency(self): + for pkgbuild in self.pkgbuilds + self.helperPkgbuilds: + with self.subTest(pkgbuild=pkgbuild): + contents = pkgbuild.read_text(encoding="utf-8") + self.assertIn("git+", contents) + makeDependencies = contents.split("makedepends=(", 1)[1].split( + ")", 1 + )[0] + self.assertRegex(makeDependencies, r"(?m)^ git$") + if __name__ == "__main__": unittest.main()