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:
David Heinemeier Hansson
2026-08-15 08:18:54 -07:00
co-authored by Claude Opus 5
parent 01a566f01a
commit 1a61278911
8 changed files with 91 additions and 98 deletions
@@ -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
View File
@@ -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]}}'
-12
View File
@@ -1,12 +0,0 @@
Copyright Arch Linux Contributors
Permission to use, copy, modify, and/or distribute this software for
any purpose with or without fee is hereby granted.
THE SOFTWARE IS PROVIDED “AS IS” AND THE AUTHOR DISCLAIMS ALL
WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES
OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE
FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY
DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
@@ -1 +0,0 @@
../LICENSE
+13 -14
View File
@@ -1,10 +1,12 @@
# Maintainer: Parsiad Azimzadeh <parsiad.azimzadeh at gmail dot com>
# Maintainer: mothran
# Official downloads: https://chatgpt.com/codex/
# Maintainer: David Heinemeier Hansson <david@hey.com>
# Omarchy tracks OpenAI's own Debian repository rather than the AUR, which lags
# behind releases that ship several times a week. .omarchy/upstream.sh rewrites
# the version and checksums below from that repository's package index.
pkgname=openai-codex-desktop
pkgver=26.803.81509
pkgrel=8.1
pkgver=26.810.52044
pkgrel=1
pkgdesc="Official ChatGPT desktop app with Codex"
arch=('x86_64' 'aarch64')
url="https://chatgpt.com/codex/"
@@ -64,16 +66,13 @@ 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')
source_x86_64=(
"${_deb_x86_64}::https://persistent.oaistatic.com/codex-app-prod/linux/deb/latest/chatgpt_amd64.deb"
)
source_aarch64=(
"${_deb_aarch64}::https://persistent.oaistatic.com/codex-app-prod/linux/deb/latest/chatgpt_arm64.deb"
)
_pool="https://persistent.oaistatic.com/codex-app-prod/linux/deb/pool/main/c/chatgpt"
source_x86_64=("${_deb_x86_64}::${_pool}/${_deb_x86_64}")
source_aarch64=("${_deb_aarch64}::${_pool}/${_deb_aarch64}")
noextract=("${_deb_x86_64}" "${_deb_aarch64}")
sha256sums=('4e3ca9302600bed268f8fd3ba2c9ac2f1ceb99da139ed71c50db0289b118d06f')
sha256sums_x86_64=('a9bf91a368f9f7c4eea38082a9fb8fb46b8d005b719a6d7715d2e5a1982c38eb')
sha256sums_aarch64=('f38fcc194eca9ab0327dc10c92340681eae77c5d75164df700384ce2adaccbc1')
sha256sums=('fc70527cd961f3a660e2a9d0a2d62b1e3f7a61d8482ee1935a6b25307da278eb')
sha256sums_x86_64=('708a15a1bb76e2bb7f0e376e5145391fa277ad3a64057c1d32537bdc2a1b4e6e')
sha256sums_aarch64=('6ebea681b1e494d218a199f638b4bc886e94e1458dd61079b1e390a6fb98fdd2')
package() {
cd "${srcdir}"
-25
View File
@@ -1,25 +0,0 @@
version = 1
[[annotations]]
path = [
"PKGBUILD",
"README.md",
"keys/**",
".SRCINFO",
".gitignore",
".nvchecker.toml",
"*.install",
"*.sysusers",
"*sysusers.conf",
"*.tmpfiles",
"*tmpfiles.conf",
"*.logrotate",
"*.pam",
"*.service",
"*.socket",
"*.timer",
"*.desktop",
"*.hook",
]
SPDX-FileCopyrightText = "Arch Linux contributors"
SPDX-License-Identifier = "0BSD"
+21 -28
View File
@@ -1,37 +1,30 @@
#!/bin/bash
# SPDX-FileCopyrightText: 2026 Arch Linux Contributors
# SPDX-License-Identifier: 0BSD
set -euo pipefail
user_flags=()
ozone_flags=()
flags_file="${XDG_CONFIG_HOME:-${HOME:-}/.config}/codex-flags.conf"
config_home="${XDG_CONFIG_HOME:-}"
if [[ -z "${config_home}" && -n "${HOME:-}" ]]; then
config_home="${HOME}/.config"
if [[ -r "$flags_file" ]]; then
while IFS= read -r line || [[ -n "$line" ]]; do
line="${line%%#*}"
[[ -n "${line//[[:space:]]/}" ]] || continue
read -r -a flags <<<"$line"
user_flags+=("${flags[@]}")
done <"$flags_file"
fi
if [[ -n "${config_home}" && -f "${config_home}/codex-flags.conf" ]]; then
while IFS= read -r flag_line || [[ -n "${flag_line}" ]]; do
flag_line="${flag_line%%#*}"
read -r -a flag_parts <<<"${flag_line}"
user_flags+=("${flag_parts[@]}")
done <"${config_home}/codex-flags.conf"
# Chromium's own Ozone detection falls back to XWayland often enough to matter,
# and the result is a blurry window on every scaled display. Ask for Wayland
# directly, unless the user has already picked a platform themselves.
platform_flags=()
if [[ -n "${WAYLAND_DISPLAY:-}" || "${XDG_SESSION_TYPE:-}" == wayland ]]; then
platform_flags=(--ozone-platform=wayland)
for flag in "${user_flags[@]}" "$@"; do
case "$flag" in
--ozone-platform=* | --ozone-platform-hint=*) platform_flags=() ;;
esac
done
fi
# Use native Wayland rendering in Wayland sessions. Chromium's automatic Ozone
# selection can fall back to XWayland, which produces a blurry UI on scaled
# displays. An explicit platform argument from the user always takes precedence.
if [[ "${XDG_SESSION_TYPE:-}" == wayland || -n "${WAYLAND_DISPLAY:-}" ]]; then
ozone_flags=(--ozone-platform=wayland)
fi
# A platform selected in the flags file or on the command line overrides the
# native Wayland default.
for flag in "${user_flags[@]}" "$@"; do
case "${flag}" in
--ozone-platform=*|--ozone-platform-hint=*) ozone_flags=() ;;
esac
done
exec /usr/lib/chatgpt/ChatGPT "${ozone_flags[@]}" "${user_flags[@]}" "$@"
exec /usr/lib/chatgpt/ChatGPT "${platform_flags[@]}" "${user_flags[@]}" "$@"