Take over openai-codex-desktop from the AUR
OpenAI ships the ChatGPT desktop app several times a week and the AUR packaging trails it -- as of this commit by a full version, 26.803.81509 against 26.810.52044. Every sync we took from there was a sync we could have taken from OpenAI directly. So track OpenAI's own Debian repository instead. Its per-architecture package index carries the version and SHA256 of every deb, which makes an update two small HTTP requests rather than a 750 MB download, and the pool keeps old versions, so the URLs pinned here stay resolvable after the next release. Omarchy now maintains the package outright: the max-zstd patch is simply part of the PKGBUILD, chatgpt-launcher.sh is ours, and the Arch REUSE files are gone -- they annotated packaging paths (.SRCINFO, keys/**, .nvchecker.toml) that do not exist here. The app's own license still ships; package() installs upstream's copyright file. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
1 parent
01a566f01a
commit
1a61278911
8 files changed
+91
-98
No files matched your search
@@ -1,5 +1,4 @@
|
||||
{
|
||||
"source": "aur",
|
||||
"release_ring": "fast",
|
||||
"upstream_commit": "05f12e3c51ce07efb996698d4fae94327f45f03b"
|
||||
"source": "local",
|
||||
"release_ring": "fast"
|
||||
}
|
||||
@@ -1,15 +0,0 @@
|
||||
--- a/PKGBUILD
|
||||
+++ b/PKGBUILD
|
||||
@@ -55,6 +55,12 @@
|
||||
conflicts=('chatgpt')
|
||||
options=('!debug' '!strip')
|
||||
|
||||
+# Omarchy: the build image compresses with zstd at its default level, which
|
||||
+# leaves this 1.3 GB Electron tree at 447 MB. Maximum zstd takes it to 322 MB
|
||||
+# for ~4 extra minutes of build time -- worth it for a package this large that
|
||||
+# every user re-downloads on each of OpenAI's frequent releases.
|
||||
+COMPRESSZST=(zstd -c -z -q --ultra -22 --threads=0 -)
|
||||
+
|
||||
_deb_x86_64="chatgpt_${pkgver}_amd64.deb"
|
||||
_deb_aarch64="chatgpt_${pkgver}_arm64.deb"
|
||||
source=('chatgpt-launcher.sh')
|
||||
+55
@@ -0,0 +1,55 @@
|
||||
#!/bin/bash
|
||||
# OpenAI ships the ChatGPT desktop app from its own Debian repository. The
|
||||
# per-architecture package index carries both the version and the SHA256 of
|
||||
# every deb, so an update costs two small HTTP requests instead of a 750 MB
|
||||
# download, and the pool keeps old versions, so the URLs pinned in the PKGBUILD
|
||||
# stay resolvable after the next release.
|
||||
set -euo pipefail
|
||||
|
||||
BASE_URL="https://persistent.oaistatic.com/codex-app-prod/linux/deb"
|
||||
declare -A DEB_ARCHES=([x86_64]=amd64 [aarch64]=arm64)
|
||||
|
||||
# Print "<version> <sha256>" for the newest stanza in a Packages index.
|
||||
newest_release() {
|
||||
local index="$1"
|
||||
|
||||
awk '
|
||||
{ sub(/\r$/, "") }
|
||||
/^Version:/ { version = $2 }
|
||||
/^SHA256:/ { sha256 = $2 }
|
||||
/^$/ { if (version && sha256) print version, sha256; version = sha256 = "" }
|
||||
END { if (version && sha256) print version, sha256 }
|
||||
' <<<"$index" | sort -V | tail -n 1
|
||||
}
|
||||
|
||||
versions=()
|
||||
declare -A checksums=()
|
||||
|
||||
for arch in "${!DEB_ARCHES[@]}"; do
|
||||
index=$(curl -fsSL "$BASE_URL/dists/stable/main/binary-${DEB_ARCHES[$arch]}/Packages")
|
||||
|
||||
read -r version sha256 <<<"$(newest_release "$index")"
|
||||
if [[ -z "${version:-}" || -z "${sha256:-}" ]]; then
|
||||
echo "No usable release found for $arch in the upstream package index" >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
versions+=("$version")
|
||||
checksums[$arch]="$sha256"
|
||||
done
|
||||
|
||||
# A release lands one architecture at a time, and a single pkgver has to cover
|
||||
# both. Report no update until they agree; the next run picks it up.
|
||||
for version in "${versions[@]}"; do
|
||||
if [[ "$version" != "${versions[0]}" ]]; then
|
||||
echo "Upstream architectures are mid-release (${versions[*]}); skipping" >&2
|
||||
echo '{}'
|
||||
exit 0
|
||||
fi
|
||||
done
|
||||
|
||||
jq -n \
|
||||
--arg pkgver "${versions[0]}" \
|
||||
--arg x86_64 "${checksums[x86_64]}" \
|
||||
--arg aarch64 "${checksums[aarch64]}" \
|
||||
'{pkgver: $pkgver, sha256sums: {x86_64: [$x86_64], aarch64: [$aarch64]}}'
|
||||
Reference in new issue
Block a user