Compare commits
1 Commits
master
..
db3e974563
| Author | SHA1 | Date | |
|---|---|---|---|
| db3e974563 |
@@ -1,6 +1,6 @@
|
||||
pkgbase = grok-bot-bin
|
||||
pkgdesc = Grok Bot desktop agent (official .deb repackaged)
|
||||
pkgver = 0.44.0
|
||||
pkgver = 0.43.0
|
||||
pkgrel = 1
|
||||
url = https://cursor.com/download/bot
|
||||
arch = x86_64
|
||||
@@ -27,14 +27,12 @@ pkgbase = grok-bot-bin
|
||||
replaces = sand
|
||||
options = !strip
|
||||
options = !debug
|
||||
source = https://downloads.cursor.com/grokbot/stable/12dcfa973ef51585fd1b35df6839fc9d1d7fd6aa/linux/x64/grok-bot_0.44.0_amd64.deb
|
||||
source = https://downloads.cursor.com/grokbot/stable/dd6e1fd3efb029e94e3c9d5c4d3e66510a917395/linux/x64/grok-bot_0.43.0_amd64.deb
|
||||
source = grok-bot-launch.sh
|
||||
source = pkexec-pacman-u
|
||||
source = com.s1d3sw1ped.grok-bot-bin.policy
|
||||
noextract = grok-bot_0.44.0_amd64.deb
|
||||
sha256sums = dded18b2d3d44b1c32d6b9f63446d2b27bca68b3de7a2aa028ce7956e9694164
|
||||
noextract = grok-bot_0.43.0_amd64.deb
|
||||
sha256sums = 451ecae8fcbda48a7c75dfc74a0da8f1d6452f6063b72330cbbaad29f3455380
|
||||
sha256sums = 36e1c522f7a3920a850a6235263d82ad5990611612979447c1e9eff92548ac1e
|
||||
sha256sums = e92ea4534d864d7f302a082a8717a52af9675195af41092d18f15094f74fed45
|
||||
sha256sums = a9533dfe4d31332ac1505d2e582eff27771dd0107108a5f6289d0d3839431a74
|
||||
|
||||
pkgname = grok-bot-bin
|
||||
|
||||
@@ -8,8 +8,8 @@
|
||||
# https://downloads.cursor.com/grokbot/stable/<commit>/linux/x64/grok-bot_<pkgver>_amd64.deb
|
||||
|
||||
pkgname=grok-bot-bin
|
||||
pkgver=0.44.0
|
||||
_commit=12dcfa973ef51585fd1b35df6839fc9d1d7fd6aa
|
||||
pkgver=0.43.0
|
||||
_commit=dd6e1fd3efb029e94e3c9d5c4d3e66510a917395
|
||||
pkgrel=1
|
||||
pkgdesc="Grok Bot desktop agent (official .deb repackaged)"
|
||||
arch=('x86_64')
|
||||
@@ -46,10 +46,8 @@ source=(
|
||||
)
|
||||
noextract=("grok-bot_${pkgver}_amd64.deb")
|
||||
sha256sums=(
|
||||
'dded18b2d3d44b1c32d6b9f63446d2b27bca68b3de7a2aa028ce7956e9694164'
|
||||
'451ecae8fcbda48a7c75dfc74a0da8f1d6452f6063b72330cbbaad29f3455380'
|
||||
'36e1c522f7a3920a850a6235263d82ad5990611612979447c1e9eff92548ac1e'
|
||||
'e92ea4534d864d7f302a082a8717a52af9675195af41092d18f15094f74fed45'
|
||||
'a9533dfe4d31332ac1505d2e582eff27771dd0107108a5f6289d0d3839431a74'
|
||||
)
|
||||
|
||||
package() {
|
||||
|
||||
+14
-32
@@ -97,16 +97,10 @@ fi
|
||||
|
||||
deb_sha=$(sha256sum "$tmp" | cut -d' ' -f1)
|
||||
shim_sha=$(sha256sum grok-bot-launch.sh | cut -d' ' -f1)
|
||||
pkexec_sha=$(sha256sum pkexec-pacman-u | cut -d' ' -f1)
|
||||
policy_sha=$(sha256sum com.s1d3sw1ped.grok-bot-bin.policy | cut -d' ' -f1)
|
||||
for label in deb_sha:$deb_sha shim_sha:$shim_sha pkexec_sha:$pkexec_sha policy_sha:$policy_sha; do
|
||||
name=${label%%:*}
|
||||
val=${label#*:}
|
||||
if [[ ! "$val" =~ ^[0-9a-f]{64}$ ]]; then
|
||||
echo "error: sha256sum failed ($name=$val)" >&2
|
||||
exit 1
|
||||
fi
|
||||
done
|
||||
if [[ ! "$deb_sha" =~ ^[0-9a-f]{64}$ || ! "$shim_sha" =~ ^[0-9a-f]{64}$ ]]; then
|
||||
echo "error: sha256sum failed (deb=$deb_sha shim=$shim_sha)" >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Reset pkgrel on upstream version bumps.
|
||||
sed -i \
|
||||
@@ -123,32 +117,24 @@ if [[ "$newver" != "$version" || "$newcommit" != "$commit" || "$newrel" != "1" ]
|
||||
exit 1
|
||||
fi
|
||||
|
||||
python3 - "$deb_sha" "$shim_sha" "$pkexec_sha" "$policy_sha" <<'PY2'
|
||||
python3 - "$deb_sha" "$shim_sha" <<'PY'
|
||||
import pathlib, re, sys
|
||||
deb_sha, shim_sha, pkexec_sha, policy_sha = sys.argv[1:5]
|
||||
deb_sha, shim_sha = sys.argv[1], sys.argv[2]
|
||||
p = pathlib.Path("PKGBUILD")
|
||||
text = p.read_text()
|
||||
block = (
|
||||
"sha256sums=(\n"
|
||||
f" '{deb_sha}'\n"
|
||||
f" '{shim_sha}'\n"
|
||||
f" '{pkexec_sha}'\n"
|
||||
f" '{policy_sha}'\n"
|
||||
")"
|
||||
)
|
||||
block = f"sha256sums=(\n '{deb_sha}'\n '{shim_sha}'\n)"
|
||||
text2, n = re.subn(r"sha256sums=\([^\)]*\)", block, text, count=1, flags=re.S)
|
||||
if n != 1:
|
||||
raise SystemExit(f"sha256sums replace failed (n={n})")
|
||||
p.write_text(text2)
|
||||
PY2
|
||||
PY
|
||||
|
||||
python3 - "$version" "$commit" "$deb_sha" "$shim_sha" "$pkexec_sha" "$policy_sha" <<'PY2'
|
||||
python3 - "$version" "$commit" "$deb_sha" "$shim_sha" <<'PY'
|
||||
import pathlib, sys
|
||||
version, commit, deb_sha, shim_sha, pkexec_sha, policy_sha = sys.argv[1:7]
|
||||
version, commit, deb_sha, shim_sha = sys.argv[1:5]
|
||||
p = pathlib.Path(".SRCINFO")
|
||||
if not p.is_file():
|
||||
raise SystemExit(".SRCINFO missing")
|
||||
shas = [deb_sha, shim_sha, pkexec_sha, policy_sha]
|
||||
lines = []
|
||||
saw_sha = False
|
||||
saw_pkgver = saw_pkgrel = saw_source = saw_noextract = False
|
||||
@@ -169,8 +155,8 @@ for line in p.read_text().splitlines(True):
|
||||
continue
|
||||
if line.startswith("\tsha256sums ="):
|
||||
if not saw_sha:
|
||||
for s in shas:
|
||||
lines.append(f"\tsha256sums = {s}\n")
|
||||
lines.append(f"\tsha256sums = {deb_sha}\n")
|
||||
lines.append(f"\tsha256sums = {shim_sha}\n")
|
||||
saw_sha = True
|
||||
continue
|
||||
lines.append(line)
|
||||
@@ -183,11 +169,7 @@ missing = [n for n, ok in (
|
||||
) if not ok]
|
||||
if missing:
|
||||
raise SystemExit(f".SRCINFO rewrite missed fields: {', '.join(missing)}")
|
||||
# Ensure four sha lines present
|
||||
sha_lines = [l for l in lines if l.startswith("\tsha256sums =")]
|
||||
if len(sha_lines) != 4:
|
||||
raise SystemExit(f".SRCINFO expected 4 sha256sums lines, got {len(sha_lines)}")
|
||||
p.write_text("".join(lines))
|
||||
PY2
|
||||
PY
|
||||
|
||||
echo "Updated PKGBUILD and .SRCINFO to ${version} deb_sha=${deb_sha} shim_sha=${shim_sha} pkexec_sha=${pkexec_sha} policy_sha=${policy_sha}"
|
||||
echo "Updated PKGBUILD and .SRCINFO to ${version} deb_sha=${deb_sha} shim_sha=${shim_sha}"
|
||||
|
||||
Reference in New Issue
Block a user