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 HanssonandClaude Opus 5 committed 2026-08-15 08:18:54 -07:00
1 parent 01a566f01a
commit 1a61278911
8 files changed
+91 -98

No files matched your search

+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[@]}" "$@"