Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs/upstream-sources.md
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,7 @@ in `origin` and has no effect on release selection.

## Existing manual holds

`grok-bot`, `libfprint-git`, `libretro-cap32-git`, `libretro-database-git`, `libretro-fbneo-git`, `libretro-uae-git`, `libretro-vice-git`, `quickshell-git`, `supergfxctl`.
`libfprint-git`, `libretro-cap32-git`, `libretro-database-git`, `libretro-fbneo-git`, `libretro-uae-git`, `libretro-vice-git`, `quickshell-git`, `supergfxctl`.

These packages were already excluded from automatic AUR updates. The migration preserves that policy.

Expand Down
2 changes: 1 addition & 1 deletion pkgbuilds/grok-bot/.omarchy/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"source": "local",
"sync": false,
"release_ring": "fast",
"origin": {
"aur": "grok-bot",
"commit": "05eb78fca06b482affda28b26223cbf249d4bbcd"
Expand Down
77 changes: 77 additions & 0 deletions pkgbuilds/grok-bot/.omarchy/upstream.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
#!/usr/bin/env bash
# Cursor's Debian indexes provide version and SHA256 metadata for both
# architectures, so sync does not need to download the application binaries.
set -euo pipefail

BASE_URL="https://downloads.cursor.com/aptrepo/dists/grok-bot/main"
declare -A DEBIAN_ARCHES=([x86_64]=amd64 [aarch64]=arm64)
declare -A VERSIONS=() CHECKSUMS=()

newest_release() {
local package_index="$1" package_arch="$2"
local best_version="" best_checksum="" best_filename=""
local version checksum filename

while IFS=$'\t' read -r version checksum filename; do
[[ "$version" =~ ^[A-Za-z0-9][A-Za-z0-9._+]*$ ]] || continue
[[ "$checksum" =~ ^[0-9a-f]{64}$ ]] || continue

if [[ -z "$best_version" ]] || [[ "$(vercmp "$version" "$best_version")" -gt 0 ]]; then
best_version="$version"
best_checksum="$checksum"
best_filename="$filename"
fi
done < <(awk -v target="grok-bot" '
BEGIN { RS = ""; FS = "\n" }
{
package = version = checksum = filename = ""
for (i = 1; i <= NF; i++) {
sub(/\r$/, "", $i)
if ($i ~ /^Package: /) package = substr($i, 10)
if ($i ~ /^Version: /) version = substr($i, 10)
if ($i ~ /^SHA256: /) checksum = substr($i, 9)
if ($i ~ /^Filename: /) filename = substr($i, 11)
}
if (package == target && version != "" && checksum != "" && filename != "") {
print version "\t" checksum "\t" filename
}
}
' <<<"$package_index")

[[ -n "$best_version" ]] || return 1

local expected_filename="pool/grok-bot/g/gr/grok-bot_${best_version}_${package_arch}.deb"
[[ "$best_filename" == "$expected_filename" ]] || {
echo "Unexpected Grok Bot package path for ${package_arch}: ${best_filename}" >&2
return 1
}

printf '%s\t%s\n' "$best_version" "$best_checksum"
}

for arch in x86_64 aarch64; do
index_url="${BASE_URL}/binary-${DEBIAN_ARCHES[$arch]}/Packages"
package_index="$(curl -fsSL --retry 3 "$index_url")"
package_index="${package_index//$'\r'/}"

if ! release="$(newest_release "$package_index" "${DEBIAN_ARCHES[$arch]}")"; then
echo "No usable Grok Bot release found for ${arch} in ${index_url}" >&2
exit 1
fi

IFS=$'\t' read -r version checksum <<<"$release"
VERSIONS[$arch]="$version"
CHECKSUMS[$arch]="$checksum"
done

if [[ "${VERSIONS[x86_64]}" != "${VERSIONS[aarch64]}" ]]; then
echo "Grok Bot architectures are mid-release (${VERSIONS[x86_64]} vs ${VERSIONS[aarch64]}); skipping" >&2
echo '{}'
exit 0
fi

jq -cn \
--arg pkgver "${VERSIONS[x86_64]}" \
--arg x86_64 "${CHECKSUMS[x86_64]}" \
--arg aarch64 "${CHECKSUMS[aarch64]}" \
'{pkgver: $pkgver, sha256sums: {x86_64: [$x86_64], aarch64: [$aarch64]}}'
11 changes: 5 additions & 6 deletions pkgbuilds/grok-bot/PKGBUILD
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,8 @@
# Contributor: Omarchy

pkgname=grok-bot
pkgver=0.47.0
pkgver=0.68.1
pkgrel=1
_commit=c1e7d7a46549956d25f53e9c0b9f59666e03aa3a
pkgdesc='Grok Bot desktop agent'
arch=('x86_64' 'aarch64')
url='https://x.ai/bot'
Expand Down Expand Up @@ -35,15 +34,15 @@ source=(
'grok-bot.desktop'
)
source_x86_64=(
"${_deb_x86_64}::https://downloads.cursor.com/grokbot/stable/${_commit}/linux/x64/${_deb_x86_64}"
"${_deb_x86_64}::https://downloads.cursor.com/aptrepo/pool/grok-bot/g/gr/${_deb_x86_64}"
)
source_aarch64=(
"${_deb_aarch64}::https://downloads.cursor.com/grokbot/stable/${_commit}/linux/arm64/${_deb_aarch64}"
"${_deb_aarch64}::https://downloads.cursor.com/aptrepo/pool/grok-bot/g/gr/${_deb_aarch64}"
)
sha256sums=('6dfa6c305941afa6cbaefbeaae06d05ab5a88f31630005d25a819a160c20c7a3'
'3e2a2461ea58d17ac1777616be9ba660f7cb9ceefa9292016e36c55758bf78dd')
sha256sums_x86_64=('11ca0f51a535b97af51a352adf9c0f9ecd2e1b0430a69ae9451b688a7a065808')
sha256sums_aarch64=('836f8d19d3826c6573c31ac45c7a9b797abc73381ae0d2b1e7a8dae5410e7e46')
sha256sums_x86_64=('b2be8106d2b3eae07d983d5f1ca77b657accde666dc440db2a409421ecff3359')
sha256sums_aarch64=('3f85fbe2ba3c1d122aa16f8be672076bc19146e07e9d431f37a93b85fa75a93f')
noextract=("${_deb_x86_64}" "${_deb_aarch64}")

package() {
Expand Down
49 changes: 0 additions & 49 deletions pkgbuilds/grok-bot/update-pkgver.sh

This file was deleted.