ohos-sdk

LOW
maintainer legendt 0 votes scanned 2026-08-31 09:46:55.360985
View on AUR
Why flagged

Downloads a prebuilt SDK tarball from Huawei's official OpenHarmony mirror (mirrors.huaweicloud.com) with a sha256 checksum; the source is the project's own official distribution infrastructure, not a personal/swappable host, so this is a normal prebuilt-SDK packaging scenario with low risk.

Triggered rules

Low Few votes, recently uploaded zero_votes_recent

Uploaded within the last 14 days with 2 or fewer community votes — little peer review so far.

Low AI review downgraded a static finding llm_review

The static rules flagged this MEDIUM, but an AI model (anthropic/claude-sonnet-4.6) reviewed the full PKGBUILD and judged it LOW (confidence 80%): Downloads a prebuilt SDK tarball from Huawei's official OpenHarmony mirror (mirrors.huaweicloud.com) with a sha256 checksum; the source is the project's own official distribution infrastructure, not a personal/swappable host, so this is a normal prebuilt-SDK packaging scenario with low risk.

1 higher static finding superseded - not the current verdict (shown for transparency)
Medium source=() URL on a non-standard host source_untrusted_domain

One or more source=() URLs point to a host outside the trusted allowlist (github.com, gitlab.com, codeberg.org, pypi.org, …).

  • PKGBUILD:20 source=("ohos-sdk-${pkgver}.tar.gz::https://mirrors.huaweicloud.com/openharmony/os/7.0-Release/ohos-sdk-windows_linux-public.tar.gz")

PKGBUILD

1 offending line(s) highlighted
1# Maintainer: Wensheng Tang <sp3478 at gmail dot com>
2pkgname=ohos-sdk
3pkgver=26.0.0.38
4_api=26
5pkgrel=1
6pkgdesc="OpenHarmony SDK (Linux x86_64):native 交叉工具链(OHOS clang 15/LLVM+musl sysroot)、toolchains、ets/js/previewer 整包"
7arch=('x86_64')
8url="https://gitcode.com/openharmony/manifest"
9license=('Apache-2.0' 'custom')
10depends=('gcc-libs' 'zlib')
11optdepends=(
12 'libusb: hdc 设备连接'
13 'nodejs: ohpm / hvigor 及 js/ets 工具链'
14 'qt5-base: previewer 预览器'
15 'fontconfig: previewer 字体'
16)
17options=('!strip' 'staticlibs' '!debug' '!emptydirs')
18# 上游只提供预编译 SDK(华为云 OpenHarmony 发布镜像),无从源码构建流程。
19# 合包内含 windows/ohos 侧组件,本包只取 linux 侧。
20source=("ohos-sdk-${pkgver}.tar.gz::https://mirrors.huaweicloud.com/openharmony/os/7.0-Release/ohos-sdk-windows_linux-public.tar.gz")
21sha256sums=('130a438cbcddd46a2a5b09ee9925339cddf4cca99223329b860f96a5c72f338f')
22noextract=("ohos-sdk-${pkgver}.tar.gz")
23
24_prefix="/opt/ohos-sdk"
25
26package() {
27 cd "${srcdir}"
28 # 只从合包里取 linux 侧组件 zip(丢弃 windows/ 与 ohos/)
29 bsdtar -xf "ohos-sdk-${pkgver}.tar.gz" ohos-sdk/linux manifest_tag.xml
30
31 install -dm755 "${pkgdir}${_prefix}/${_api}"
32 local _z
33 for _z in ohos-sdk/linux/*.zip; do
34 msg2 "解压 $(basename "${_z}") ..."
35 bsdtar -xf "${_z}" -C "${pkgdir}${_prefix}/${_api}"
36 done
37
38 # 归一化权限:真实二进制多为 0755,个别 0644/0700,补齐 group/other 读+条件执行
39 chmod -R u+rwX,go+rX "${pkgdir}${_prefix}"
40
41 install -Dm644 "${srcdir}/manifest_tag.xml" "${pkgdir}${_prefix}/${_api}/manifest_tag.xml"
42
43 # 环境脚本(clang 含 RPATH \$ORIGIN/../lib,仅需 PATH)
44 install -Dm644 /dev/stdin "${pkgdir}${_prefix}/env.sh" <<EOF
45# source 本文件以使用 OpenHarmony SDK ${pkgver}(API ${_api})
46export OHOS_SDK_HOME="${_prefix}"
47export OHOS_NDK_HOME="${_prefix}/${_api}/native"
48export PATH="${_prefix}/${_api}/native/llvm/bin:${_prefix}/${_api}/toolchains:\${PATH}"
49# 交叉编译示例:
50# clang --target=aarch64-linux-ohos --sysroot=\${OHOS_NDK_HOME}/sysroot hello.c -o hello
51EOF
52
53 # 许可证
54 local _lic
55 _lic=$(find "${pkgdir}${_prefix}/${_api}" -maxdepth 3 -iname 'NOTICE*' -o -iname 'License*' 2>/dev/null | head -1)
56 if [ -n "${_lic}" ]; then
57 install -Dm644 "${_lic}" "${pkgdir}/usr/share/licenses/${pkgname}/$(basename "${_lic}")"
58 fi
59}
60

Scan history

Scanned at (UTC)SeverityRules
2026-08-31 09:46:55 Low 3
2026-08-31 09:44:49 Medium 2

Report a package

Reports go to the AURWatch maintainer (one person) and are read by hand. No login required.

0 / 4000
Your suggestion