Skip to content

packaging: add Arch Linux binary package and AUR publishing - #41

Merged
melonamin merged 11 commits into
melonamin:linux-portfrom
Gnu-Gorets:aur-agterm-linux-bin
Nov 8, 2026
Merged

melonamin merged 11 commits into
melonamin:linux-portfrom
Gnu-Gorets:aur-agterm-linux-bin

Conversation

@Gnu-Gorets

@Gnu-Gorets Gnu-Gorets commented Sep 4, 2026 •

Copy link
Copy Markdown

Adds a validated Arch binary package and optional AUR updates after successful Linux release publication. The package installs the official x86_64 payload under /usr/lib/agterm-linux, exposes agterm-linux and agtermctl, and installs desktop integration and the MIT license. The checked-in template targets the current published v0.40.0 release.

Packaging

  • Declare WebKitGTK 6.0, Python, librsvg, and WebP loader dependencies alongside GTK/libadwaita.
  • Preserve bundled Swift binaries and provide/conflict with agterm-linux, matching the existing AUR package's installation semantics.
  • Keep zmx private to the bundled runtime; install no global zmx executable.
  • Generate .SRCINFO from PKGBUILD and compare it during validation.

Publication

The Linux release workflow calls the reusable publisher after GitHub publication. Stable versions and +linux.N revisions are eligible; prereleases are excluded. The publisher validates exact manifest entries and checksums, uses the tagged license, serializes updates, avoids duplicate commits, and refuses to downgrade AUR when an older tag is rebuilt.

Package tooling comes from the maintained workflow revision, so rebuilding a tag that predates this PR does not require AUR scripts in that old tag. The SSH host key remains pinned and was checked against the current AUR endpoint.

A missing AUR_SSH_PRIVATE_KEY produces a notice and skips AUR publication. The existing agterm-linux-bin AUR package has another maintainer; enabling automation requires an SSH key authorized for that package, stored as this repository secret. No live AUR push was performed during validation.

Validation

  • Ran the exact CI entry point, scripts/test-aur-package.sh, in disposable clean Arch using the downloaded v0.40.0 release.
  • Source checksums, makepkg build, generated .SRCINFO comparison, package installation, desktop-file validation, and installed agtermctl all passed.
  • The installed GTK app passed the real v0.40 scenario under isolated Xvfb/D-Bus/HOME/state/socket, covering messages/events, sidebar expiry, images, and Markdown/WebKit pages.
  • All 10 tag/metadata/publication tests passed, including real pushes to a temporary bare Git repository, idempotency, mismatched metadata rejection, and downgrade protection.
  • Namcap reported no errors. Warnings remain for the prebuilt Swift bundle's stripping/RELRO properties and transitively provided libraries.
  • Strict SwiftLint 0.65.0, Actionlint, ShellCheck, Python syntax checks, core-boundary and CLI-drift checks passed locally.
  • The new Arch gate exposed an abort fixture racing the host core collector. The fixture now preserves the same PID and SIGABRT status without generating a core; all 17 exit-status tests pass on Arch and Ubuntu, with assertions and timeout unchanged.

All six checks passed on f5cd4a0 in CI run 42431178774, including clean Arch validation, core tests, strict lint, 631 Linux-package tests, and all 70 GTK scenarios. Authenticated AUR publication requires the separately configured key.

@Gnu-Gorets Gnu-Gorets changed the title packaging: add Arch Linux binary package packaging: add and publish Arch Linux binary package Sep 4, 2026
Comment thread packaging/aur/PKGBUILD Resolved
Comment thread packaging/aur/PKGBUILD Resolved
Comment thread .github/workflows/publish-aur.yml Resolved
@n2tr2

n2tr2 commented Sep 4, 2026

Copy link
Copy Markdown

hey! sorry to jump in, but I have a private repo with the same goal of updating agterm-linux on my arch, so I decided to leave a couple of comments.

@Gnu-Gorets
Gnu-Gorets force-pushed the aur-agterm-linux-bin branch 7 times, most recently from 8109aa4 to 8ace8d1 Compare September 4, 2026 23:05
@Gnu-Gorets Gnu-Gorets changed the title packaging: add and publish Arch Linux binary package packaging: add Arch Linux binary package and AUR publishing Sep 4, 2026
@Gnu-Gorets
Gnu-Gorets force-pushed the aur-agterm-linux-bin branch from d0d9cac to dba9899 Compare October 6, 2026 20:05
@Gnu-Gorets
Gnu-Gorets force-pushed the aur-agterm-linux-bin branch 2 times, most recently from eecd4a7 to d3fb36c Compare November 3, 2026 17:52

@melonamin melonamin left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changes are needed before this can publish current Linux releases:

  1. The normal release path will not trigger this publisher. release-linux.yml publishes through softprops/action-gh-release using the default github.token, and GitHub suppresses downstream release: published workflow runs for events generated by GITHUB_TOKEN. Invoke publication explicitly after the release step, or use an explicit dispatch/reusable-workflow design.

  2. PKGBUILD still declares the pre-WebKit dependency set. The current app links WebKitGTK 6.0, and bundled Codex hooks require Python. Refresh the dependencies against packaging/linux/nfpm.yml, including the image-loader requirements, then validate the current release in a clean Arch environment.

  3. Every linux-v* tag is accepted, but the stripped version is assigned directly to Arch pkgver. Hyphenated prereleases such as 0.40.0-rc.1 are invalid in pkgver; makepkg --printsrcinfo does not validate that rule. Exclude prereleases from the stable channel or separate the original release tag from the Arch version. +linux.N revisions are valid and can remain supported.

Also add the job timeout required by the repository's CI guidance and focused validation for package metadata/publication. The current green application jobs do not exercise this workflow.

The earlier zmx symlink, icon-layout, and root makepkg findings are fixed; all three review threads are resolved.

Replace the GITHUB_TOKEN-suppressed release event trigger with a reusable AUR publishing workflow called after successful Linux release publication. Pass the validated tag and AUR secret explicitly, and update the review plan with the implemented first item.
Add WebKitGTK 6.0, Python, librsvg, and WebP pixbuf loader dependencies to the AUR package and regenerate .SRCINFO. Leave the backlog plan uncommitted as requested.
@Gnu-Gorets
Gnu-Gorets force-pushed the aur-agterm-linux-bin branch from 6106ad1 to 701aa70 Compare November 8, 2026 00:14
Gnu-Gorets and others added 2 commits November 8, 2026 01:19
Update the AUR seed package to linux-v0.40.0, skip prerelease publishing, preserve +linux.N versions, and validate package builds and smoke behavior in a disposable Arch container. Match the container builder UID/GID to the runner so temporary files remain removable.
@melonamin

Copy link
Copy Markdown
Owner

Finished the remaining work on top of 2f941e1, preserving the author's new version helper and consolidating validation into one Arch CI gate. Current head is f5cd4a0.

  • Stable releases and +linux.N revisions are eligible; prereleases are skipped before publication.
  • Exact manifest validation, tagged-license checksums, serialized updates, idempotent Git commits, and downgrade protection are covered by tests. Rebuilt old tags use the maintained package tooling.
  • The publisher has a timeout and skips with a notice when AUR_SSH_PRIVATE_KEY is absent, so unconfigured AUR automation cannot break GitHub releases.
  • The package retains official Swift binaries, declares the runtime dependencies, and preserves provides/conflicts without installing a global zmx.

Ran the exact standalone CI script in clean Arch: source verification, makepkg build/install, .SRCINFO comparison, namcap (zero errors), desktop validation, CLI, and the installed GTK/WebKit v0.40 scenario all passed. The smoke explicitly uses /usr/lib/agterm-linux/share/agterm, so Markdown and other resources come from the installed package. All 10 metadata/tag/publication tests and strict SwiftLint, Actionlint, ShellCheck, syntax, core-boundary and CLI-drift checks passed. Real Git publication was exercised against temporary bare repositories. Metadata generation was also checked with the actual published linux-v0.39.1+linux.1 manifest and tagged license.

The new Arch run exposed the exit-status fixture racing a host core collector. The stand-in now preserves its PID and SIGABRT result without generating a core; all 17 assertions pass on Arch and Ubuntu with the same timeout. This does not change app crash diagnostics.

Waiting for CI on the final head before approval and merge. Live AUR publication remains unverified: the existing package requires an authorized key, and this repository currently has no AUR SSH secret configured.

@Gnu-Gorets

Gnu-Gorets commented Nov 8, 2026 •

Copy link
Copy Markdown
Author

@melonamin thank you for feedback, I've added fixes (partially). I see, that you've added fixes too. Do you want to finish PR by yourself. right?

@melonamin

Copy link
Copy Markdown
Owner

Yes, I'll finish it from here. Your latest fixes are included. The Arch package build, installation, GTK/WebKit smoke checks, and lint pass; I'm waiting for the remaining CI before merging. No further changes are needed from your side right now.

@melonamin melonamin left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The requested changes are addressed. All six checks pass on f5cd4a0, including clean Arch package build/install and installed GTK/WebKit resource validation, core tests, strict lint, and the full GTK suite. The publisher handles stable/revision tags, validates metadata, prevents downgrades, and skips cleanly without credentials.

Live AUR publication remains key-gated; it was not tested against the external AUR repository. The publication logic passed real temporary Git-repository tests. Ready to merge.

@melonamin
melonamin merged commit 43043cc into melonamin:linux-port Nov 8, 2026
6 checks passed
@Gnu-Gorets
Gnu-Gorets deleted the aur-agterm-linux-bin branch November 8, 2026 13:03
@melonamin

Copy link
Copy Markdown
Owner

@Gnu-Gorets thanks for the contribution, the reason I didn't merge it before is pretty simple - I don't have an account on AUR and they closed new registrations awhile back...
So practically speaking I still can't publish it 🤷‍♂️

@Gnu-Gorets

Copy link
Copy Markdown
Author

@melonamin don't worry) Thank you, that you've created fork for Gnu/Linux and maintain it)

About AUR, yeah, I know, they had Security issue in past, hackers replaced some of AUR packages, Arch didn't solve problem completely and decided to restrict registration 😄

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants