GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — fix(aur): support ARM64 in stable and nightly packages (#30909) · HNRow/r3code@36d3fcb

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • docs/user
    • install.md
  • packaging/aur
    • README.md
    • scripts
      • release.sh
    • t3code-bin
      • PKGBUILD
    • t3code-nightly-bin
      • PKGBUILD
  • scripts
    • aur-release.test.ts
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎docs/user/install.md‎

Copy file name to clipboardExpand all lines: docs/user/install.md
+1-1Lines changed: 1 addition & 1 deletion
  • Display the source diff
  • Display the rich diff
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ The `.deb` updates itself like the other desktop builds. It asks for your
103103
password to install each update. If your desktop has no password prompt, the
104104
update fails. Download the new `.deb` and install it the same way.
105105

106-
The AUR packages currently support x86_64 only; on ARM64, use the AppImage.
106+
The AUR packages support x86_64 and ARM64.
107107
Update AUR installs with your AUR helper, such as `yay -Syu`, instead of the
108108
in-app updater.
109109

Collapse file

‎packaging/aur/README.md‎

Copy file name to clipboardExpand all lines: packaging/aur/README.md
+4-4Lines changed: 4 additions & 4 deletions
  • Display the source diff
  • Display the rich diff
Original file line numberDiff line numberDiff line change
@@ -2,19 +2,19 @@
22

33
This directory maintains the [`t3code-bin`](https://aur.archlinux.org/packages/t3code-bin) and
44
[`t3code-nightly-bin`](https://aur.archlinux.org/packages/t3code-nightly-bin) packages. Both
5-
repackage the official x86_64 AppImage from GitHub Releases.
5+
repackage the official x86_64 and ARM64 AppImages from GitHub Releases.
66

77
## Publishing
88

99
The release workflow calls `.github/workflows/publish-aur.yml` after publishing a GitHub release;
1010
the workflow can also be run manually for a specific tag. It selects the stable or nightly
11-
package, then updates its version and checksums, builds it, regenerates `.SRCINFO`, and pushes it
12-
to the AUR.
11+
package, then updates its version and both architectures' asset names and checksums, builds it
12+
for the host architecture, regenerates `.SRCINFO`, and pushes it to the AUR.
1313

1414
To validate a release on Arch Linux:
1515

1616
```bash
1717
sudo pacman -Syu --needed base-devel github-cli jq namcap
18-
GH_TOKEN=$(gh auth token) RELEASE_TAG=v0.0.33 \
18+
GH_TOKEN=$(gh auth token) RELEASE_TAG=v0.1.7 \
1919
packaging/aur/scripts/release.sh
2020
```
Collapse file

‎packaging/aur/scripts/release.sh‎

Copy file name to clipboardExpand all lines: packaging/aur/scripts/release.sh
+30-15Lines changed: 30 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,10 @@ pkgrel="${PKGREL:-1}"
88

99
if [[ "$tag" =~ ^v[0-9]+\.[0-9]+\.[0-9]+$ ]]; then
1010
pkgname='t3code-bin'
11-
asset_name='T3-Code-x86_64.AppImage'
11+
asset_prefix='T3-Code'
1212
elif [[ "$tag" =~ ^v[0-9]+\.[0-9]+\.[0-9]+-nightly\.[0-9]{8}\.[0-9]+$ ]]; then
1313
pkgname='t3code-nightly-bin'
14-
asset_name='T3-Code-Nightly-x86_64.AppImage'
14+
asset_prefix='T3-Code-Nightly'
1515
else
1616
echo "Release $tag does not publish an AUR package."
1717
exit 0
@@ -20,19 +20,29 @@ fi
2020
version="${tag#v}"
2121
pkgver="${version//-/_}"
2222
release_json="$(gh api "repos/$repo/releases/tags/$tag")"
23-
# Older releases publish the AppImage under a versioned name.
24-
for asset_name in "$asset_name" "T3-Code-${version}-x86_64.AppImage"; do
25-
asset_digest="$(jq -r --arg name "$asset_name" \
26-
'.assets[] | select(.name == $name) | .digest' <<<"$release_json")"
27-
appimage_sha256="${asset_digest#sha256:}"
28-
[[ "$appimage_sha256" =~ ^[0-9a-f]{64}$ ]] && break
23+
declare -A appimage_names appimage_checksums
24+
for architecture in x86_64 aarch64; do
25+
upstream_arch="${architecture/aarch64/arm64}"
26+
versioned_name="T3-Code-${version}-${upstream_arch}.AppImage"
27+
versionless_name="${asset_prefix}-${upstream_arch}.AppImage"
28+
if ! asset="$(jq -er --arg versioned "$versioned_name" \
29+
--arg versionless "$versionless_name" '
30+
[.assets[] | select(.name == $versioned or .name == $versionless)]
31+
| select(length == 1) | .[0] | [.name, .digest] | @tsv
32+
' <<<"$release_json")"; then
33+
echo "Release $tag must contain exactly one of $versioned_name or $versionless_name." >&2
34+
exit 1
35+
fi
36+
IFS=$'\t' read -r asset_name asset_digest <<<"$asset"
37+
checksum="${asset_digest#sha256:}"
38+
if [[ ! "$checksum" =~ ^[0-9a-f]{64}$ ]]; then
39+
echo "Release $tag is missing the SHA-256 digest for $asset_name." >&2
40+
exit 1
41+
fi
42+
appimage_names[$architecture]="$asset_name"
43+
appimage_checksums[$architecture]="$checksum"
2944
done
3045

31-
if [[ ! "$appimage_sha256" =~ ^[0-9a-f]{64}$ ]]; then
32-
echo "Release $tag is missing its x86_64 AppImage or its SHA-256 digest." >&2
33-
exit 1
34-
fi
35-
3646
work_dir="$(mktemp -d)"
3747
trap 'rm -rf -- "$work_dir"' EXIT
3848
gh api -H 'Accept: application/vnd.github.raw' \
@@ -44,11 +54,16 @@ cd "$package_dir"
4454
sed -Ei \
4555
-e "s/^pkgver=.*/pkgver=$pkgver/" \
4656
-e "s/^pkgrel=.*/pkgrel=$pkgrel/" \
47-
-e "s/^_asset=.*/_asset='$asset_name'/" \
48-
-e "/# AppImage$/s/'[0-9a-f]{64}'/'$appimage_sha256'/" \
4957
-e "/# upstream license$/s/'[0-9a-f]{64}'/'$license_sha256'/" \
5058
PKGBUILD
5159

60+
for architecture in x86_64 aarch64; do
61+
sed -Ei \
62+
-e "s/^_asset_${architecture}=.*/_asset_${architecture}=\"${appimage_names[$architecture]}\"/" \
63+
-e "s/^sha256sums_${architecture}=.*/sha256sums_${architecture}=('${appimage_checksums[$architecture]}')/" \
64+
PKGBUILD
65+
done
66+
5267
run_as_builder() {
5368
if [[ "$(id -u)" == 0 ]]; then
5469
runuser -u builder -- "$@"
Collapse file

‎packaging/aur/t3code-bin/PKGBUILD‎

Copy file name to clipboardExpand all lines: packaging/aur/t3code-bin/PKGBUILD
+11-12Lines changed: 11 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
# Maintainer: maria-rcks <maria at kuuro dot net>
22

33
pkgname=t3code-bin
4-
pkgver=0.0.33
4+
pkgver=0.1.7
55
pkgrel=1
66
pkgdesc='Desktop control surface for local coding agents'
7-
arch=('x86_64')
7+
arch=('x86_64' 'aarch64')
88
url='https://github.com/pingdotgg/t3code'
99
license=('MIT')
1010
depends=(
@@ -43,16 +43,15 @@ provides=("t3code=$pkgver")
4343
conflicts=('t3code')
4444
options=('!debug' '!strip')
4545

46-
_appimage="T3-Code-${pkgver}-x86_64.AppImage"
47-
_asset="$_appimage"
48-
source=(
49-
"$_appimage::https://github.com/pingdotgg/t3code/releases/download/v${pkgver}/$_asset"
50-
"${pkgname}-${pkgver}-LICENSE::https://raw.githubusercontent.com/pingdotgg/t3code/v${pkgver}/LICENSE"
51-
)
52-
sha256sums=(
53-
'415c8648f43c3d22d572f27f2c50fdc8c310ea7fcde9537b903e1e2f1c8775a1' # AppImage
54-
'935d8f2af0c703f9c39517ee57cc4930b19d02d533be930b63f0e82f93614b43' # upstream license
55-
)
46+
_appimage="T3-Code-${pkgver}-${CARCH/aarch64/arm64}.AppImage"
47+
_asset_x86_64="T3-Code-0.1.7-x86_64.AppImage"
48+
_asset_aarch64="T3-Code-0.1.7-arm64.AppImage"
49+
source=("${pkgname}-${pkgver}-LICENSE::https://raw.githubusercontent.com/pingdotgg/t3code/v${pkgver}/LICENSE")
50+
sha256sums=('935d8f2af0c703f9c39517ee57cc4930b19d02d533be930b63f0e82f93614b43') # upstream license
51+
source_x86_64=("T3-Code-${pkgver}-x86_64.AppImage::https://github.com/pingdotgg/t3code/releases/download/v${pkgver}/$_asset_x86_64")
52+
sha256sums_x86_64=('faaee4094dca1276057840a1a45a6b2d00d7418afbf5735f75a7503b774e63d1')
53+
source_aarch64=("T3-Code-${pkgver}-arm64.AppImage::https://github.com/pingdotgg/t3code/releases/download/v${pkgver}/$_asset_aarch64")
54+
sha256sums_aarch64=('4445beffacf96da3be2c81c280222020e3b2623579e3364b10f44e84bfd1e3c2')
5655

5756
prepare() {
5857
chmod +x "$srcdir/$_appimage"
Collapse file

‎packaging/aur/t3code-nightly-bin/PKGBUILD‎

Copy file name to clipboardExpand all lines: packaging/aur/t3code-nightly-bin/PKGBUILD
+11-12Lines changed: 11 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
# Maintainer: maria-rcks <maria at kuuro dot net>
22

33
pkgname=t3code-nightly-bin
4-
pkgver=0.0.34_nightly.20260814.1095
4+
pkgver=0.1.8_nightly.20261104.4179
55
pkgrel=1
66
pkgdesc='Nightly desktop control surface for local coding agents'
7-
arch=('x86_64')
7+
arch=('x86_64' 'aarch64')
88
url='https://github.com/pingdotgg/t3code'
99
license=('MIT')
1010
depends=(
@@ -44,16 +44,15 @@ conflicts=('t3code-nightly' 't3code')
4444
options=('!debug' '!strip')
4545

4646
_upstream_version="${pkgver/_nightly./-nightly.}"
47-
_appimage="T3-Code-${_upstream_version}-x86_64.AppImage"
48-
_asset="$_appimage"
49-
source=(
50-
"$_appimage::https://github.com/pingdotgg/t3code/releases/download/v${_upstream_version}/$_asset"
51-
"${pkgname}-${pkgver}-LICENSE::https://raw.githubusercontent.com/pingdotgg/t3code/v${_upstream_version}/LICENSE"
52-
)
53-
sha256sums=(
54-
'c4dea5bba9ed0b51b2f60f2d4a4867e61d62b57c50ea66f2792a73112e054566' # AppImage
55-
'935d8f2af0c703f9c39517ee57cc4930b19d02d533be930b63f0e82f93614b43' # upstream license
56-
)
47+
_appimage="T3-Code-${_upstream_version}-${CARCH/aarch64/arm64}.AppImage"
48+
_asset_x86_64="T3-Code-0.1.8-nightly.20261104.4179-x86_64.AppImage"
49+
_asset_aarch64="T3-Code-0.1.8-nightly.20261104.4179-arm64.AppImage"
50+
source=("${pkgname}-${pkgver}-LICENSE::https://raw.githubusercontent.com/pingdotgg/t3code/v${_upstream_version}/LICENSE")
51+
sha256sums=('935d8f2af0c703f9c39517ee57cc4930b19d02d533be930b63f0e82f93614b43') # upstream license
52+
source_x86_64=("T3-Code-${_upstream_version}-x86_64.AppImage::https://github.com/pingdotgg/t3code/releases/download/v${_upstream_version}/$_asset_x86_64")
53+
sha256sums_x86_64=('6d145972076801efb21dc9e2a3e0fb2ac55d786bc2df2b0ebbe48ed1c3323046')
54+
source_aarch64=("T3-Code-${_upstream_version}-arm64.AppImage::https://github.com/pingdotgg/t3code/releases/download/v${_upstream_version}/$_asset_aarch64")
55+
sha256sums_aarch64=('b80f1cd55a391caa4da94b94209750ce68586d474f8cc5ee983a2bf6ae6e8be3')
5756

5857
prepare() {
5958
chmod +x "$srcdir/$_appimage"
Collapse file

‎scripts/aur-release.test.ts‎

Copy file name to clipboard
+127Lines changed: 127 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,127 @@
1+
import * as NodeServices from "@effect/platform-node/NodeServices";
2+
import { assert, describe, it } from "@effect/vitest";
3+
import * as HostProcess from "@t3tools/shared/HostProcess";
4+
import * as Effect from "effect/Effect";
5+
import * as FileSystem from "effect/FileSystem";
6+
import * as Path from "effect/Path";
7+
import * as Stream from "effect/Stream";
8+
import { ChildProcess, ChildProcessSpawner } from "effect/process";
9+
10+
const run = Effect.fn("test.aur.run")(function* (
11+
command: string,
12+
args: ReadonlyArray<string>,
13+
cwd: string,
14+
env: Record<string, string | undefined>,
15+
) {
16+
const spawner = yield* ChildProcessSpawner.ChildProcessSpawner;
17+
const child = yield* spawner.spawn(
18+
ChildProcess.make(command, args, { cwd, env, extendEnv: false }),
19+
);
20+
const collect = <E>(stream: Stream.Stream<Uint8Array, E>) =>
21+
stream.pipe(
22+
Stream.decodeText(),
23+
Stream.runFold(
24+
() => "",
25+
(left, right) => left + right,
26+
),
27+
);
28+
const [stdout, stderr, code] = yield* Effect.all(
29+
[collect(child.stdout), collect(child.stderr), child.exitCode],
30+
{ concurrency: "unbounded" },
31+
);
32+
return { stdout, stderr, code };
33+
}, Effect.scoped);
34+
35+
describe.skipIf(HostProcess.Platform.defaultValue() !== "linux")("AUR release", () => {
36+
it.live.each([
37+
{ nightly: false, naming: "versioned", failure: undefined },
38+
{ nightly: true, naming: "versioned", failure: undefined },
39+
{ nightly: false, naming: "versionless", failure: undefined },
40+
{ nightly: true, naming: "versionless", failure: undefined },
41+
{ nightly: false, naming: "versioned", failure: "missing" },
42+
{ nightly: false, naming: "versioned", failure: "digest" },
43+
{ nightly: false, naming: "versioned", failure: "version" },
44+
])("updates architecture-specific sources: %j", ({ nightly, naming, failure }) =>
45+
Effect.gen(function* () {
46+
const fs = yield* FileSystem.FileSystem;
47+
const path = yield* Path.Path;
48+
const inherited = yield* HostProcess.Environment;
49+
const root = yield* fs.makeTempDirectoryScoped({ prefix: "t3-aur-release-" });
50+
const aur = path.join(root, "packaging/aur");
51+
yield* fs.copy(path.join(import.meta.dirname, "../packaging/aur"), aur);
52+
const tools = path.join(root, "tools");
53+
yield* fs.makeDirectory(tools);
54+
for (const [name, source] of Object.entries({
55+
gh: '#!/bin/bash\nif [[ "$*" == *releases/tags/* ]]; then cat "$AUR_FIXTURE_RELEASE"; else echo "fixture license"; fi\n',
56+
id: "#!/bin/sh\necho 1000\n",
57+
namcap: "#!/bin/sh\nexit 0\n",
58+
makepkg: '#!/bin/sh\nif [ "$1" = --packagelist ]; then echo fixture.pkg.tar.zst; fi\n',
59+
})) {
60+
const file = path.join(tools, name);
61+
yield* fs.writeFileString(file, source);
62+
yield* fs.chmod(file, 0o755);
63+
}
64+
const version = nightly ? "1.2.4-nightly.20261104.1" : "1.2.3";
65+
const pkgname = nightly ? "t3code-nightly-bin" : "t3code-bin";
66+
const prefix =
67+
naming === "versioned" ? `T3-Code-${version}` : nightly ? "T3-Code-Nightly" : "T3-Code";
68+
const assets = [
69+
{ name: `${prefix}-x86_64.AppImage`, digest: `sha256:${"a".repeat(64)}` },
70+
...(failure === "missing"
71+
? []
72+
: [
73+
{
74+
name:
75+
failure === "version"
76+
? "T3-Code-1.2.2-arm64.AppImage"
77+
: `${prefix}-arm64.AppImage`,
78+
digest: failure === "digest" ? "invalid" : `sha256:${"b".repeat(64)}`,
79+
},
80+
]),
81+
];
82+
const fixture = path.join(root, "release.json");
83+
yield* fs.writeFileString(fixture, JSON.stringify({ assets }));
84+
const packageDir = path.join(aur, pkgname);
85+
const recipe = path.join(packageDir, "PKGBUILD");
86+
const before = yield* fs.readFileString(recipe);
87+
const env = {
88+
PATH: `${tools}:${inherited.PATH}`,
89+
RELEASE_TAG: `v${version}`,
90+
AUR_FIXTURE_RELEASE: fixture,
91+
AUR_SSH_PRIVATE_KEY: "",
92+
};
93+
const result = yield* run("bash", [path.join(aur, "scripts/release.sh")], root, env);
94+
if (failure) {
95+
assert.notEqual(Number(result.code), 0, result.stdout + result.stderr);
96+
assert.equal(yield* fs.readFileString(recipe), before);
97+
return;
98+
}
99+
assert.equal(Number(result.code), 0, result.stdout + result.stderr);
100+
for (const [arch, upstreamArch, checksum] of [
101+
["x86_64", "x86_64", "a"],
102+
["aarch64", "arm64", "b"],
103+
] as const) {
104+
const selected = yield* run(
105+
"bash",
106+
[
107+
"-c",
108+
`source PKGBUILD
109+
declare -n sources="source_$CARCH" sums="sha256sums_$CARCH"
110+
printf '%s\\n' "$pkgver" "\${arch[*]}" "\${sources[@]}" "\${sums[@]}" "$_appimage"`,
111+
],
112+
packageDir,
113+
{ ...env, CARCH: arch },
114+
);
115+
assert.equal(Number(selected.code), 0, selected.stderr);
116+
const localName = `T3-Code-${version}-${upstreamArch}.AppImage`;
117+
assert.deepEqual(selected.stdout.trim().split("\n"), [
118+
version.replace("-nightly.", "_nightly."),
119+
"x86_64 aarch64",
120+
`${localName}::https://github.com/pingdotgg/t3code/releases/download/v${version}/${prefix}-${upstreamArch}.AppImage`,
121+
checksum.repeat(64),
122+
localName,
123+
]);
124+
}
125+
}).pipe(Effect.scoped, Effect.provide(NodeServices.layer)),
126+
);
127+
});

0 commit comments

Comments
0 (0)
You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.