-
Notifications
You must be signed in to change notification settings - Fork 3.6k
chore(arch): bump openhuman-bin to v0.63.7 + add auto-bump pkgver() #5631
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,7 +1,8 @@ | ||
| # Maintainer: OpenHuman <hello@tinyhumans.ai> | ||
| # Contributed-by: Luu Khoa Hoc <lkhoc200443@gmail.com> | ||
|
|
||
| pkgname=openhuman-bin | ||
| pkgver=0.54.0 | ||
| pkgver=0.63.7 | ||
| pkgrel=1 | ||
| pkgdesc='Personal AI desktop assistant for communities' | ||
| arch=('x86_64') | ||
|
|
@@ -15,21 +16,58 @@ optdepends=( | |
| provides=('openhuman') | ||
| conflicts=('openhuman') | ||
| options=('!strip') | ||
| makedepends=('python') | ||
| source=( | ||
| "OpenHuman_${pkgver}_amd64.AppImage::https://github.com/tinyhumansai/openhuman/releases/download/v${pkgver}/OpenHuman_${pkgver}_amd64.AppImage" | ||
| 'openhuman' | ||
| 'openhuman.desktop' | ||
| 'openhuman.svg' | ||
| ) | ||
| # AppImage checksum is verified at build time against the upstream-published | ||
| # digest (prepare()), so it is intentionally SKIP here. The three local files | ||
| # are static and pinned. | ||
| sha256sums=( | ||
| '2f76bc5b6f3a0e6cf2765f414a82b26903337720d190b4f9b26a5d7e2508abab' | ||
| 'SKIP' | ||
| 'dbd46b85be9d551363b44ec19613a5fb5df4a08f5b618cb38ffe8891a0f31eeb' | ||
| 'e357a666334449273047c02740a3e3fa34c58ff00304af8b3ec1a080a9574e99' | ||
| '7892979a084a5e2bbc73c32fe0f447918aa9b458c50bf0bb856469c837e6401c' | ||
| ) | ||
|
|
||
| # Auto-resolve the latest stable release tag from GitHub. | ||
| pkgver() { | ||
| curl -fsSL "https://api.github.com/repos/tinyhumansai/openhuman/releases/latest" \ | ||
| | python3 -c "import json,sys; print(json.load(sys.stdin)['tag_name'].lstrip('v'))" | ||
|
coderabbitai[bot] marked this conversation as resolved.
|
||
| } | ||
|
Comment on lines
+36
to
+40
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🗄️ Data Integrity & Integration | 🟠 Major | 🏗️ Heavy lift 🧩 Analysis chain🏁 Script executed: #!/bin/bash
set -euo pipefail
pkgbuild='packages/arch/openhuman-bin/PKGBUILD'
# Static inspection only. Do not source the PKGBUILD.
rg -n -C 2 'pkgver=|source=\(|releases/latest|releases/download|^pkgver\(\)' "$pkgbuild"
# Expected after the fix: no pkgver() call changes metadata independently of
# the release artifact selected by source=().Repository: tinyhumansai/openhuman Length of output: 793 🏁 Script executed: #!/bin/bash
set -euo pipefail
pkgbuild='packages/arch/openhuman-bin/PKGBUILD'
printf '%s\n' '--- PKGBUILD ---'
cat -n "$pkgbuild"
printf '%s\n' '--- repository references ---'
rg -n -C 3 'makepkg|pkgver\(\)|pkgver=|prepare\(\)|source=' \
--glob '!.git/**' --glob '!node_modules/**' .Repository: tinyhumansai/openhuman Length of output: 50381 🌐 Web query:
💡 Result: When running makepkg, the process follows a specific sequence regarding source management and build function execution [1][2][3]. 1. Source Download and Extraction: Before any custom functions are executed, makepkg identifies all files listed in the source array [4]. It verifies their existence or downloads them if they are remote URLs, and subsequently extracts compressed archives into the $srcdir [1][2][5]. 2. Prepare Function: If defined in the PKGBUILD, the prepare function is executed next [1][2]. This function is intended for tasks such as patching sources and runs after source extraction [1][3]. If the user skips extraction (e.g., using makepkg --noextract), the prepare function is skipped as well [1][3]. 3. Pkgver Function: The pkgver function is executed after the sources have been downloaded, extracted, and the prepare function (if present) has completed [1][2][3]. Because it runs at this stage, the pkgver function can access the extracted source files to dynamically determine and output the new version string [1][3]. In summary, the execution order is: Source Download/Extraction -> prepare -> pkgver -> build -> check -> package [1][2][3]. Note that if prepare is not defined, makepkg proceeds directly from extraction to the pkgver function [1][2]. Citations:
Keep 🤖 Prompt for AI Agents |
||
|
|
||
| prepare() { | ||
| cd "${srcdir}" | ||
|
|
||
| # Verify the downloaded AppImage against the digest published by upstream | ||
| # for this exact version (sha256:<hex> in the release asset metadata). | ||
| local expected | ||
| expected=$(curl -fsSL "https://api.github.com/repos/tinyhumansai/openhuman/releases/tags/v${pkgver}" \ | ||
| | python3 -c " | ||
| import json, sys, re | ||
| d = json.load(sys.stdin) | ||
| for a in d.get('assets'): | ||
| if re.search(r'amd64\.AppImage$', a.get('name', '')): | ||
| print((a.get('digest') or '').replace('sha256:', '')) | ||
| break | ||
| ") | ||
| local actual | ||
| actual=$(sha256sum "OpenHuman_${pkgver}_amd64.AppImage" | cut -d' ' -f1) | ||
| if [ -z "${expected}" ]; then | ||
| echo "ERROR: Could not retrieve upstream digest for v${pkgver}." >&2 | ||
| echo " Cannot verify AppImage integrity; refusing to install unverified binary." >&2 | ||
| exit 1 | ||
| fi | ||
| if [ "${expected}" != "${actual}" ]; then | ||
| echo "ERROR: AppImage sha256 mismatch for v${pkgver}" >&2 | ||
| echo " expected: ${expected}" >&2 | ||
| echo " actual: ${actual}" >&2 | ||
| exit 1 | ||
| fi | ||
|
|
||
| rm -rf squashfs-root | ||
| chmod +x "OpenHuman_${pkgver}_amd64.AppImage" | ||
| "./OpenHuman_${pkgver}_amd64.AppImage" --appimage-extract >/dev/null | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🔒 Security & Privacy | 🟠 Major | ⚡ Quick win
🧩 Analysis chain
🏁 Script executed:
Repository: tinyhumansai/openhuman
Length of output: 1575
🏁 Script executed:
Repository: tinyhumansai/openhuman
Length of output: 1849
Other (CWE-354)
Reachability: External
Reject AppImage builds when the upstream digest is missing or malformed.
At
prepare()line 58, an emptyexpectedvalue skips verification. Line 67 then executes the unverified AppImage. Require a valid 64-character SHA-256 digest before comparing it withactual.🤖 Prompt for AI Agents