pkgbuild: Bump grok-bot-bin to 0.36.0 (#8)
pkgbuild: Bump grok-bot-bin to 0.36.0 Stay-current path: fail-closed update.sh/workflow, README Updating for cron + manual force. Closes #7.
This commit was merged in pull request #8.
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
pkgbase = grok-bot-bin
|
||||
pkgdesc = Grok Bot desktop agent (official .deb repackaged)
|
||||
pkgver = 0.35.0
|
||||
pkgrel = 2
|
||||
pkgver = 0.36.0
|
||||
pkgrel = 1
|
||||
url = https://cursor.com/download/bot
|
||||
arch = x86_64
|
||||
license = LicenseRef-proprietary
|
||||
@@ -26,10 +26,10 @@ pkgbase = grok-bot-bin
|
||||
replaces = sand
|
||||
options = !strip
|
||||
options = !debug
|
||||
source = https://downloads.cursor.com/grokbot/stable/1c5a6ceb364c4dd53f0069f72cc4239220ed471e/linux/x64/grok-bot_0.35.0_amd64.deb
|
||||
source = https://downloads.cursor.com/grokbot/stable/9465f3ae75550511296fabbb7a4b6fc8afe9e408/linux/x64/grok-bot_0.36.0_amd64.deb
|
||||
source = grok-bot-launch.sh
|
||||
noextract = grok-bot_0.35.0_amd64.deb
|
||||
sha256sums = ed254e819d0f0419a1df9771009363074f65f80d8175d2ee0fc62900087ebd99
|
||||
noextract = grok-bot_0.36.0_amd64.deb
|
||||
sha256sums = 948b4177667d9a03915c1aee497e7c5438705393da8083a6af0177288512d07e
|
||||
sha256sums = 1c5a3599db15816caa839fc9e088ba9798757e44fec89c066ef5f6f3c0972aee
|
||||
|
||||
pkgname = grok-bot-bin
|
||||
|
||||
@@ -13,12 +13,19 @@ jobs:
|
||||
run: |
|
||||
set -euo pipefail
|
||||
sudo apt-get update -qq
|
||||
sudo apt-get install -y -qq jq curl
|
||||
sudo apt-get install -y -qq jq curl python3
|
||||
for cmd in jq curl python3; do
|
||||
command -v "$cmd" >/dev/null || { echo "error: missing $cmd" >&2; exit 1; }
|
||||
done
|
||||
before=$(sed -n 's/^pkgver=//p' PKGBUILD)
|
||||
./scripts/update.sh
|
||||
after=$(sed -n 's/^pkgver=//p' PKGBUILD)
|
||||
if [[ -z "$after" ]]; then
|
||||
echo "error: could not read pkgver after update.sh" >&2
|
||||
exit 1
|
||||
fi
|
||||
if [[ "$before" == "$after" ]]; then
|
||||
echo "No bump"
|
||||
echo "No bump (still $after)"
|
||||
exit 0
|
||||
fi
|
||||
git config user.name 's1d3sw1ped_bot'
|
||||
|
||||
@@ -8,9 +8,9 @@
|
||||
# https://downloads.cursor.com/grokbot/stable/<commit>/linux/x64/grok-bot_<pkgver>_amd64.deb
|
||||
|
||||
pkgname=grok-bot-bin
|
||||
pkgver=0.35.0
|
||||
_commit=1c5a6ceb364c4dd53f0069f72cc4239220ed471e
|
||||
pkgrel=2
|
||||
pkgver=0.36.0
|
||||
_commit=9465f3ae75550511296fabbb7a4b6fc8afe9e408
|
||||
pkgrel=1
|
||||
pkgdesc="Grok Bot desktop agent (official .deb repackaged)"
|
||||
arch=('x86_64')
|
||||
url="https://cursor.com/download/bot"
|
||||
@@ -43,7 +43,7 @@ source=(
|
||||
)
|
||||
noextract=("grok-bot_${pkgver}_amd64.deb")
|
||||
sha256sums=(
|
||||
'ed254e819d0f0419a1df9771009363074f65f80d8175d2ee0fc62900087ebd99'
|
||||
'948b4177667d9a03915c1aee497e7c5438705393da8083a6af0177288512d07e'
|
||||
'1c5a3599db15816caa839fc9e088ba9798757e44fec89c066ef5f6f3c0972aee'
|
||||
)
|
||||
|
||||
|
||||
@@ -6,6 +6,8 @@ Not affiliated with Cursor / SpaceXAI. The app binary is unchanged; this only re
|
||||
|
||||
## Install (build locally)
|
||||
|
||||
This tree packages **0.36.0** (`pkgver` / `pkgrel=1` in `PKGBUILD`). `makepkg -si` from git tip builds that version even before a release tag exists.
|
||||
|
||||
```bash
|
||||
git clone https://git.s1d3sw1ped.com/s1d3sw1ped/grok-bot-bin.git
|
||||
cd grok-bot-bin
|
||||
@@ -28,11 +30,11 @@ makepkg -si
|
||||
|
||||
## Install from a release package
|
||||
|
||||
When CI has published a `.pkg.tar.zst` on the [Releases](https://git.s1d3sw1ped.com/s1d3sw1ped/grok-bot-bin/releases) page:
|
||||
`pacman -U` installs whatever `.pkg.tar.zst` is attached on [Releases](https://git.s1d3sw1ped.com/s1d3sw1ped/grok-bot-bin/releases), which lags git tip until someone **tags** the bump (see Updating). After `v0.36.0` is pushed, CI (`build.yml`) attaches `grok-bot-bin-0.36.0-1-x86_64.pkg.tar.zst`. Until that asset exists, use `makepkg -si` for 0.36.0; the newest published asset may still be `v0.35.0-2`.
|
||||
|
||||
```bash
|
||||
curl -LO 'https://git.s1d3sw1ped.com/s1d3sw1ped/grok-bot-bin/releases/download/v0.35.0-2/grok-bot-bin-0.35.0-2-x86_64.pkg.tar.zst'
|
||||
sudo pacman -U grok-bot-bin-0.35.0-2-x86_64.pkg.tar.zst
|
||||
curl -LO 'https://git.s1d3sw1ped.com/s1d3sw1ped/grok-bot-bin/releases/download/v0.36.0/grok-bot-bin-0.36.0-1-x86_64.pkg.tar.zst'
|
||||
sudo pacman -U grok-bot-bin-0.36.0-1-x86_64.pkg.tar.zst
|
||||
```
|
||||
|
||||
Download first, then `pacman -U` the local file (`LocalFileSigLevel = Optional`). Do not pass the remote URL straight to pacman if signatures are required.
|
||||
@@ -51,13 +53,49 @@ Exact `Server=` URL may change once the first repo DB lands; `makepkg -si` works
|
||||
|
||||
## Updating
|
||||
|
||||
`./scripts/update.sh` reads Cursor's linux-x64 update feed, downloads the matching `.deb`, and bumps `pkgver` / `_commit` / `sha256sums` in `PKGBUILD` and `.SRCINFO`.
|
||||
Stay-current path when Cursor's linux-x64 Grok Bot feed moves. `PKGBUILD` is currently **0.36.0** (pkgrel 1). One updater: `./scripts/update.sh`.
|
||||
|
||||
Scheduled Gitea Actions will do the same and build a release package.
|
||||
### Scheduled bump (Gitea Actions)
|
||||
|
||||
`.gitea/workflows/update.yml` runs daily (`cron: '17 6 * * *'`) and on `workflow_dispatch`. It:
|
||||
|
||||
1. Runs `./scripts/update.sh` against the live Cursor linux-x64 feed.
|
||||
2. If `pkgver` changed, commits `PKGBUILD` and `.SRCINFO`.
|
||||
3. Tags `v$pkgver` (an upstream bump resets `pkgrel` to 1, so 0.36.0 → tag `v0.36.0`).
|
||||
4. Pushes the branch and tag.
|
||||
|
||||
The tag triggers `.gitea/workflows/build.yml`, which builds the Arch package and attaches `grok-bot-bin-$pkgver-$pkgrel-x86_64.pkg.tar.zst` to the Gitea release.
|
||||
|
||||
Actions **can** push and tag on this forge. [Run 1190](https://git.s1d3sw1ped.com/s1d3sw1ped/grok-bot-bin/actions/runs/1190) (schedule on `master`) bumped 0.30.0 → 0.35.0 and pushed `master` plus tag `v0.35.0`.
|
||||
|
||||
If the script cannot parse the feed, or `curl` / `jq` / `python3` is missing, the job fails. A no-op is only “already at this `pkgver`”.
|
||||
|
||||
### Manual force path
|
||||
|
||||
When you do not want to wait for cron, or you are landing a bump on `develop`:
|
||||
|
||||
```bash
|
||||
# requires curl, jq, python3
|
||||
./scripts/update.sh
|
||||
```
|
||||
|
||||
If the feed is newer, that rewrites `PKGBUILD` and `.SRCINFO`. Then commit, tag, and push (or open a PR into `develop`):
|
||||
|
||||
```bash
|
||||
git add PKGBUILD .SRCINFO
|
||||
git commit -m "pkgbuild: Bump grok-bot-bin to <pkgver>"
|
||||
git push origin HEAD:develop # or open a PR into develop
|
||||
# After it should cut a release:
|
||||
git tag "v<pkgver>" # e.g. v0.36.0
|
||||
git push origin "v<pkgver>"
|
||||
makepkg -si # install from this tree without waiting for the release asset
|
||||
```
|
||||
|
||||
Install the new version with `makepkg -si`, or (once CI publishes the asset) `pacman -U` from Releases as in the example above.
|
||||
|
||||
## Notes
|
||||
|
||||
- `/usr/bin/grok-bot` (and `sand`) is a launch shim: unless `GROK_BOT_NO_UPDATE=1`, it checks the latest Gitea release and may `pacman -U` a newer `.pkg.tar.zst` before exec'ing `/opt/Grok Bot/…`. Network/API failures still launch the installed binary.
|
||||
- If the app menu still launches an old binary without updating, run `/usr/bin/grok-bot` once from a terminal, or `sudo pacman -U` the newer `.pkg.tar.zst` from Releases — the menu must call the PATH shim, not `/opt/Grok Bot/…`.
|
||||
- Upstream Linux builds still have no in-app updater for the Electron app itself; `scripts/update.sh` bumps the PKGBUILD from Cursor's feed when packaging a new upstream version.
|
||||
- Upstream Linux builds still have no in-app updater for the Electron app itself; `scripts/update.sh` (cron or manual) is the packaging bump from Cursor's feed.
|
||||
- `chrome-sandbox` is left non-setuid because the install path contains a space; user namespaces cover sandboxing on CachyOS.
|
||||
|
||||
+15
-1
@@ -3,6 +3,10 @@
|
||||
set -euo pipefail
|
||||
cd "$(dirname "$0")/.."
|
||||
|
||||
for cmd in curl jq python3 sha256sum; do
|
||||
command -v "$cmd" >/dev/null || { echo "error: missing required command: $cmd" >&2; exit 1; }
|
||||
done
|
||||
|
||||
FEED='https://api2.cursor.sh/updates/api/update/linux-x64/sand/0.0.0/00000000-0000-0000-0000-000000000000/stable'
|
||||
resp=$(curl -fsSL "$FEED")
|
||||
version=$(jq -r .version <<<"$resp")
|
||||
@@ -10,7 +14,11 @@ commit=$(jq -r .url <<<"$resp" | sed -E 's#.*/stable/([^/]+)/.*#\1#')
|
||||
current=$(sed -n 's/^pkgver=//p' PKGBUILD)
|
||||
|
||||
if [[ -z "$version" || "$version" == "null" || ! "$commit" =~ ^[0-9a-f]{40}$ ]]; then
|
||||
echo "Could not parse update feed: $resp" >&2
|
||||
echo "error: could not parse update feed: $resp" >&2
|
||||
exit 1
|
||||
fi
|
||||
if [[ -z "$current" ]]; then
|
||||
echo "error: could not read pkgver from PKGBUILD" >&2
|
||||
exit 1
|
||||
fi
|
||||
if [[ "$version" == "$current" ]]; then
|
||||
@@ -33,6 +41,12 @@ sed -i \
|
||||
-e "s/^pkgrel=.*/pkgrel=1/" \
|
||||
PKGBUILD
|
||||
|
||||
newver=$(sed -n 's/^pkgver=//p' PKGBUILD)
|
||||
if [[ "$newver" != "$version" ]]; then
|
||||
echo "error: PKGBUILD pkgver rewrite failed (got ${newver@Q}, expected ${version@Q})" >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
python3 - "$deb_sha" "$shim_sha" <<'PY'
|
||||
import pathlib, re, sys
|
||||
deb_sha, shim_sha = sys.argv[1], sys.argv[2]
|
||||
|
||||
Reference in New Issue
Block a user