Repository navigation
Build an Arch Linux package from the x64 .deb (ADR-0069, needs owner approval) - #110
Conversation
Arch Linux users had only the AppImage, which should be the last choice. A new arch-package release job repackages the x64 .deb as a .pkg.tar.zst in the pinned archlinux:base-devel image that check.yml uses. The package holds the .deb's files unchanged, and the job fails if they differ, if pacman cannot install it, or if a linked library comes from a package that depends does not list. tools/release.py arch-pkgbuild writes the PKGBUILD from tools/arch/PKGBUILD.in with the .deb's name and SHA-256. version and check-tag now refuse pre-releases that pacman would sort after the release, such as 0.1.0-7. checksums collects the package, so SHA256SUMS, the signatures and the attestations cover it, and latest publishes it. The release notes, the README and docs/release.md name the AppImage as the last choice. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 40 seconds. View limit details
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. |
James-Chapman
left a comment
There was a problem hiding this comment.
Verdict: No blocking defects. Merge once the owner approves the decisions in ADR-0069. The most serious finding is a [P4]: the file-identity check compares contents but not modes or ownership.
Scope: all 11 files at 7d74b22 (base b45a06a, merge-base b45a06a), +610/-16. Languages: GitHub Actions YAML, Bash, Python, PKGBUILD, Markdown.
What was checked: the pacman vercmp ordering of the mapped pre-release versions against SemVer. Pre-releases made of one word and dot-separated numbers sort the same in both, and the refused forms would sort wrongly. Also checked: that checksums, SHA256SUMS, the signatures, the attestation and release/latest pick up the .pkg.tar.zst; the SUFFIX/WORK env use; the image pin test; and the .deb name, SHA-256 and placeholder guards in arch_pkgbuild.
Owner decision: because checksums now needs arch-package, Arch's rolling repositories on release day can block every platform's release. Examples are a mirror outage, an outdated archlinux-keyring in the pinned image, or a library moving to another package. The ADR accepts this on purpose. Flagging it so the approval covers it.
Verification: read-only, static review. There were no [P1]/[P2] findings, so each finding was self-checked against the code. Tests and the workflow were not run.
3 inline comments: 1 × [P4], 2 × [P5].
benandez
left a comment
There was a problem hiding this comment.
Verdict: Request changes. The only blocker is a SonarCloud failure that this PR introduces. The job itself works: I reproduced it.
Head: 7d74b22, mergeable on main b45a06a. Check jobs that ran (ubuntu-latest, windows) and Coverage pass. SonarCloud Code Analysis fails with 2 new high-severity alerts. It passed on #103 and #105.
Blocking
tools/release.py:415and:422: SonarCloud reports "path traversal via CLI arguments" inarch_pkgbuild().--deband--outputare used without any limit on where they point. The real risk is low, because the release job supplies both paths and has no secrets. The repo already has a fix for this pattern:_inside_localintools/matrix_restart.pyresolves the path and checksis_relative_to(ROOT/.local). Please apply the same check to both arguments (the workflow already uses.local/release/arch) and move the test files underroot/.local.
Non-blocking (P3)
- The check that the package holds the
.deb's files compares contents and symlinks, but not file modes, so a lost executable bit on a non-program file would pass. The docs' "byte for byte" claim holds for contents only. - The docs give the file name as
persephone-<version>-1-x86_64.pkg.tar.zst. For a pre-release it is the pkgver, without the hyphen (0.1.0alpha.1), and main and dry-run builds add-unsigned. pacman -Syuon the pinned image means an Arch mirror or keyring failure blocks both tag releases andlatest. check.yml'sarchjob already has the same risk, and ADR-0069 accepts it.
Reproduced
- Ran the six
runsteps ofarch-packagefromrelease.ymlin the pinnedarchlinux:base-develimage, using thelatest0.3.0.debchecked againstSHA256SUMS. All steps passed: the package's files equal the.deb's, it installs, and every NEEDED library comes from a package independs. The renamed-unsignedfile also installs in a clean container. vercmpagrees with Semantic Versioning ordering for alpha < beta < rc < release, rc.9 < rc.10, RC < alpha (ASCII order) and alpha.1 < alpha.1.2. It also shows0.1.07>0.1.0, which justifies refusing0.1.0-7.gnome-keyring,kwalletandkeepassxcall provideorg.freedesktop.secrets.tests.tools.test_releaseandtests.tools.test_workflows: 60 pass. 15 were skipped because PyYAML isn't installed here, so the new pin-equality test was skipped.
Axes
- Keyed state: the artifact name is unique and no cache is involved.
- Guards:
collectgets anarch-x64pattern.SHA256SUMSand the attestation cover all ofdist, andreleaseandlatestuploaddist/*. - Pre-existing state: a re-run gets a fresh container. An existing output directory is overwritten, and the copy step skips when source and target are the same file.
- Our check vs the real consumer: checked against
vercmpand real makepkg. - Loosened predicates: none. Versions are narrowed, and the existing tag v0.0.1 still passes.
- Sibling branches: both tag and
-unsigned.debnames match. arm64 is left out deliberately and documented. - Hostile input: the
.debcomes from our own artifact, and its name is checked against a regex before it goes into the PKGBUILD. - Other actors, captured once, replaced path, security fix: not applicable.
Not checked: the job on GitHub Actions, and starting the app on Arch with a display.
Review of the arch-package job: - The files check now also compares each file's type, mode, owner, group and link target, not only its contents. A mode or owner change in package() fails the job. - options sets each makepkg option that changes files (!zipman, !purge, docs, emptydirs, libtool, staticlibs as well as !strip and !debug), so makepkg.conf cannot change the .deb's files. - docs/release.md no longer shows the release version in the Arch file name: a pre-release's pkgver has no hyphen, and latest files end in -unsigned. Sonar S8707 (path injection through command-line arguments): - arch-pkgbuild takes no file arguments, as append-notice does. It reads the one .deb in .local/release/arch/in and writes .local/release/arch/build, the folders the job already used. It refuses no .deb or two .debs. - A workflow test keeps the job's folders equal to the command's. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
All four points are covered in d605b1c. Sonar S8707: rather than 🤖 Addressed by Claude Code |
|
#10) * Review the gates a change must pass and the history of what it touches A review of OMG-Software/Persephone#110 said "no blocking defects" while SonarCloud failed the quality gate on pythonsecurity:S8707: a new release.py subcommand took file paths as CLI arguments. The same file's history (db7f3d7) had already removed file arguments from append-notice for that rule. The review had run before SonarCloud reported, never read the PR's checks, and would have ranked the low real risk below blocking. - SKILL.md step 1: read gh pr checks and the open code-scanning alerts at the pinned head; a running check is not a pass. - SKILL.md step 3: learn the analysers the project keeps green, and read the recent git log of each touched file for rules applied to siblings. - reporting.md: a change that fails a gate the project enforces is at least [P2], with the real risk stated apart; the verdict is never "Ready to merge" while a gating check fails. - review-angles.md: CLI arguments and environment of CI or agent tools count as input for path traversal; follow rules from sibling commits. - evals: sibling-rule-paths case, expecting a [P2]. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * Review feedback: both alert refs, API history, conditional verdicts - SKILL.md step 1: read code-scanning alerts for the PR head and merge refs, paginated; tie each to the reviewed revision through its commit_sha, and re-pin if headRefOid moved while reading them. - SKILL.md step 3: read file history through the commits API when the reviewed head is not local; apply a sibling's rule only where its reason covers the new code. - reporting.md: Ready to merge only once every gating check has passed; while one runs, the verdict names it and is conditional on it. - review-angles.md: the sibling-rule check names when a rule does not carry over. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * Review feedback: gate facts reach the verifier; narrower path input - verification.md: a gate finding rests on the rule firing and the gate being enforced, not on reachability. New load-bearing fact, a false-positive row and a line in the verifier brief, so a verifier can't drop a gate finding as "trusted input" and reopen the PR 110 miss. - reporting.md: define an enforced gate (a required check, or a quality gate the docs or recent history show is kept passing); word gate claims as the gate failing. - review-angles.md: CI and agent tool arguments count as path input only when they can carry less-trusted data or an enforced analyser flags them. - SKILL.md: on a 403 or 404 from code scanning, read the analyser's check-run annotations or its own API; otherwise list alerts as unreadable, never as zero. - evals: cli-output-trusted, a clean case with no analyser. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>



Summary
Each release build now makes an Arch Linux x86_64 package (
.pkg.tar.zst) next to the AppImage,.deband.rpm. Arch Linux users can install it withsudo pacman -U, so the AppImage is only the last choice. ADR-0069 records the design. It is proposed and needs the owner's approval.What changed
release.ymlhas a newarch-packagejob. It repackages the x64.debwithmakepkginarchlinux:base-devel, pinned to the same digest ascheck.yml'sarchjob. The job fails if:.deb's, in contents or in type, mode, owner, group or link target;pacman -Ucannot install it;dependsdoes not list;lddcannot find a library.tools/release.py arch-pkgbuildtakes the one.debin.local/release/arch/inand writes.local/release/arch/build/PKGBUILDfromtools/arch/PKGBUILD.in, with the version and the.deb's name and SHA-256. Likeappend-notice, it takes no file arguments (Sonar S8707). The PKGBUILD'soptionsturns off each makepkg option that changes files.versionandcheck-tagnow refuse pre-releases that pacman would sort after the release, such as0.1.0-7.alpha.1andrc.2still work.checksumscollects the package.SHA256SUMS, the signatures and the attestations cover it, andlatestpublishes it.checksumsnow needsarch-package, so an Arch job failure blocks the release, as a failure on any other platform does.latestnotes, the README,docs/release.md,docs/development.mdand.github/AGENTS.mdare updated. On Linux, they tell users to choose the.deb,.rpmor.pkg.tar.zstfirst, and the AppImage only when none of these fits.Why it changed
Arch Linux users had only the AppImage. The AppImage bundles its own GTK and WebKitGTK, and these do not get Arch's security updates. A repackaged
.debuses the same programs as the other Linux packages and Arch's own system libraries. The considered options were to build from source on Arch, to publish an AUR PKGBUILD only, or to make no package. ADR-0069 explains why it chose the repackaged.debinstead.Decisions for the owner to review in ADR-0069:
org.freedesktop.secretsis a hard dependency. The core cannot open a profile without a Secret Service.SHA256SUMSand its signatures cover it.claude/video-effectsbranch already uses 0068.Tests
Checks that were run:
d605b1c. It used thelatest0.3.0.deb, checked against itsSHA256SUMS. All steps passed. All 27 entries of the.debare owned by root.pacman -Ualso installed the file under its published-unsignedname.d605b1c: the files check failed whenpackage()changed the.desktopfile's mode to 0666 or its owner to 1:1. The library check failed whenlibsoup3was removed fromdepends.python -m unittest tests.tools.test_release tests.tools.test_workflowswithPERSEPHONE_WORKFLOW_TESTS=required: 62 tests pass.tests/toolsrun: 146 of 150 tests pass. The 4 errors aretest_matrix_capabilitiesloopback tests that fail on the Windows host with WinError 10048 (3 to 8 of them per run). This change does not touch that code.queue: max, which was already in the workflow.Not run:
arch-packagejob on GitHub Actions. It runs only inrelease.yml, on pushes tomain, on tags and on manual runs.Updated
None
New
tests/tools/test_workflows.py:test_the_arch_package_uses_the_checked_arch_imagechecks that thearch-packageimage is pinned by digest and equalscheck.yml'sarchimage.tests/tools/test_workflows.py:test_the_arch_package_job_uses_the_folders_of_arch_pkgbuildchecks that the job downloads into the folder thatarch-pkgbuildreads and runs makepkg in the folder that it writes.tests/tools/test_release.py,ArchVersionTests:versionandcheck-tagexit with code 2 and change no files.tests/tools/test_release.py,ArchPkgbuildTests:.debnames are refused;.debor two.debfiles is refused;.debthat is not a regular file is refused;🤖 Generated with Claude Code