tensorrt

LOW
maintainer dbermond 21 votes scanned 2026-09-17 00:27:14.276658
View on AUR
Why flagged

The package downloads a source tarball from NVIDIA's official developer domain, which is a legitimate and expected source for TensorRT, despite not being on the analyzer's whitelist; the rest of the sources are from well-known and appropriate repositories like GitHub, and the build process uses them to compile the software normally.

Triggered rules

Low AI review downgraded a static finding llm_review

The static rules flagged this MEDIUM, but an AI model (qwen/qwen3-235b-a22b-2507) reviewed the full PKGBUILD and judged it LOW (confidence 95%): The package downloads a source tarball from NVIDIA's official developer domain, which is a legitimate and expected source for TensorRT, despite not being on the analyzer's whitelist; the rest of the sources are from well-known and appropriate repositories like GitHub, and the build process uses them to compile the software normally.

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:34 source=("https://developer.nvidia.com/downloads/compute/machine-learning/tensorrt/${pkgver%.*}/tars/TensorRT-Enterprise-${pkgver}-Linux-${CARCH}-cuda-${_cudaver}-Release-external.tar.zst"

PKGBUILD

1 offending line(s) highlighted
1# Maintainer: Daniel Bermond <dbermond@archlinux.org>
2
3pkgbase=tensorrt
4pkgname=(
5 'tensorrt'
6 'tensorrt-cross-builder-libs'
7 'python-tensorrt')
8pkgver=11.2.1.2
9_cudaver=13.3
10_protobuf_ver=3.20.3 # https://github.com/NVIDIA/TensorRT/blob/v11.2/CMakeLists.txt#L321
11_onnx_graphsurgeon_ver=0.6.2
12_polygraphy_ver=0.49.27
13_tensorflow_quantization_ver=0.2.0
14pkgrel=1
15pkgdesc='A platform for high-performance deep learning inference on NVIDIA hardware'
16arch=('x86_64')
17url='https://developer.nvidia.com/tensorrt/'
18license=('Apache-2.0 AND LicenseRef-TensorRT-LICENSE-AGREEMENT')
19makedepends=(
20 'cmake'
21 'cuda'
22 'cudnn'
23 'git'
24 'nvidia-utils' # for satisfying namcap
25 'python'
26 'python-build'
27 'python-installer'
28 'python-ml-dtypes'
29 'python-onnx'
30 'python-pip'
31 'python-setuptools'
32 'python-typing_extensions'
33 'python-wheel')
34source=("https://developer.nvidia.com/downloads/compute/machine-learning/tensorrt/${pkgver%.*}/tars/TensorRT-Enterprise-${pkgver}-Linux-${CARCH}-cuda-${_cudaver}-Release-external.tar.zst"
35 "git+https://github.com/NVIDIA/TensorRT.git#tag=v$(grep -oE '[0-9]+\.[0-9]+' <<< "$pkgver" | head -n1)"
36 'git+https://github.com/protocolbuffers/protobuf.git'
37 'cub-nvlabs'::'git+https://github.com/NVlabs/cub.git'
38 'git+https://github.com/onnx/onnx-tensorrt.git'
39 'git+https://github.com/onnx/onnx.git'
40 "https://github.com/google/protobuf/releases/download/v${_protobuf_ver}/protobuf-cpp-${_protobuf_ver}.tar.gz"
41 'git+https://github.com/pybind/pybind11.git'
42 '010-tensorrt-use-local-protobuf-sources.patch'
43 '020-tensorrt-use-local-pybind11-sources.patch'
44 'TensorRT-LICENSE-AGREEMENT.txt')
45noextract=("protobuf-cpp-${_protobuf_ver}.tar.gz")
46sha256sums=('1db0fc9f3d04dae4b9262f4dfb10a19616d88577eec7f2535ac7be01a470e807'
47 '3cda5fcb6b1f7384506bc519d24e0c0ca6c4ad93bd0623e674a096cdfb366443'
48 'SKIP'
49 'SKIP'
50 'SKIP'
51 'SKIP'
52 'e51cc8fc496f893e2a48beb417730ab6cbcb251142ad8b2cd1951faa5c76fe3d'
53 'SKIP'
54 'ba94c0685216fe9566f7989df98b372e72a8da04b66d64380024107f2f7f4a8f'
55 '34e9eeb150e9682bd42bebd31aef8b66b1150b6a8774c488687ea38273a9b409'
56 '64907f271b91655a28f3c9f3555a3c645b23d878f41063192a9d2a67f752205a')
57
58prepare() {
59 # tensorrt git submodules
60 git -C TensorRT submodule init
61 git -C TensorRT config --local submodule.parsers/onnx.url "${srcdir}/onnx-tensorrt"
62 git -C TensorRT config --local submodule.third_party/protobuf.url "${srcdir}/protobuf"
63 git -C TensorRT config --local submodule.third_party/cub.url "${srcdir}/cub-nvlabs"
64 git -C TensorRT -c protocol.file.allow='always' submodule update
65
66 # onnx-tensorrt git submodule
67 git -C TensorRT/parsers/onnx submodule init
68 git -C TensorRT/parsers/onnx config --local submodule.third_party/onnx.url "${srcdir}/onnx"
69 git -C TensorRT/parsers/onnx -c protocol.file.allow='always' submodule update
70
71 # protobuf
72 mkdir -p build/third_party.protobuf/src
73 cp -af "protobuf-cpp-${_protobuf_ver}.tar.gz" build/third_party.protobuf/src
74
75 patch -d TensorRT -Np1 -i "${srcdir}/010-tensorrt-use-local-protobuf-sources.patch"
76 patch -d TensorRT -Np1 -i "${srcdir}/020-tensorrt-use-local-pybind11-sources.patch"
77}
78
79build() {
80 local _cudnnver
81 _cudnnver="$(LC_ALL='C' pacman -Qi 'cudnn' | awk '/^Version/ { print $3 }' | grep -oE '^[0-9]+\.[0-9]+')"
82
83 export CXXFLAGS+=' -ffat-lto-objects'
84 cmake -B build -S TensorRT \
85 -G 'Unix Makefiles' \
86 -DBUILD_PYTHON:BOOL='ON' \
87 -DBUILD_SAMPLES:BOOL='OFF' \
88 -DCMAKE_BUILD_TYPE:STRING='None' \
89 -DCMAKE_CUDA_ARCHITECTURES:STRING='75;80;86;87;89;90;100;103;110;120;121' \
90 -DCMAKE_INSTALL_PREFIX:PATH='/usr' \
91 -DCUDA_INCLUDE_DIR:STRING='/opt/cuda/include' \
92 -DCUDNN_VERSION:STRING="$_cudnnver" \
93 -DONNX_BUILD_PYTHON:BOOL='ON' \
94 -DPROTOBUF_VERSION:STRING="$_protobuf_ver" \
95 -DTRT_LIB_DIR:STRING="${srcdir}/TensorRT-${pkgver}/lib" \
96 -Wno-author
97 cmake --build build
98
99 # python tools
100 local _dir
101 for _dir in Polygraphy tensorflow-quantization onnx-graphsurgeon
102 do
103 cd "${srcdir}/TensorRT/tools/${_dir}"
104 python -m build --wheel --no-isolation
105 done
106}
107
108_package_license() {
109 install -D -m644 TensorRT/NOTICE -t "${1}/usr/share/licenses/${2}"
110 install -D -m644 TensorRT-LICENSE-AGREEMENT.txt "${1}/usr/share/licenses/${2}/TensorRT-LICENSE-AGREEMENT"
111 install -D -m644 "TensorRT-${pkgver}/doc/Acknowledgements.txt" "${1}/usr/share/licenses/${2}/ACKNOWLEDGEMENTS"
112}
113
114package_tensorrt() {
115 depends=(
116 'cuda'
117 'cudnn'
118 'glibc'
119 'libgcc'
120 'libstdc++'
121 'nvidia-utils')
122 optdepends=(
123 'tensorrt-cross-builder-libs: for cross building engine files')
124
125 DESTDIR="$pkgdir" cmake --install build
126 install -D -m755 "TensorRT-${pkgver}/bin"/* -t "${pkgdir}/usr/bin"
127 cp -dr --no-preserve='ownership' "TensorRT-${pkgver}/include" "${pkgdir}/usr"
128 cp -dr --no-preserve='ownership' "TensorRT-${pkgver}/lib"/lib{nvinfer{,_dispatch,_lean},tensorrt_shim}.so* "${pkgdir}/usr/lib"
129
130 local _arch
131 for _arch in ptx sm{75,80,86,89,90,100,120}
132 do
133 install -D -m644 "TensorRT-${pkgver}/lib/libnvinfer_builder_resource_${_arch}.so.${pkgver%.*}" -t "${pkgdir}/usr/lib"
134 ln -s "libnvinfer_builder_resource_${_arch}.so.${pkgver%.*}" "${pkgdir}/usr/lib/libnvinfer_builder_resource_${_arch}.so.${pkgver%%.*}"
135 ln -s "libnvinfer_builder_resource_${_arch}.so.${pkgver%%.*}" "${pkgdir}/usr/lib/libnvinfer_builder_resource_${_arch}.so"
136 done
137
138 mv -f "${pkgdir}/usr/python" "$srcdir"
139
140 _package_license "$pkgdir" "$pkgname"
141}
142
143package_tensorrt-cross-builder-libs() {
144 pkgdesc='Additional TensorRT libraries for cross building engine files'
145 license=('LicenseRef-TensorRT-LICENSE-AGREEMENT')
146 depends=(
147 'glibc'
148 'libgcc'
149 'libstdc++')
150 options=('!strip')
151
152 local _arch
153 for _arch in ptx sm{75,80,86,89,90,100,120}
154 do
155 install -D -m644 "TensorRT-${pkgver}/lib/libnvinfer_builder_resource_win_${_arch}.so.${pkgver%.*}" -t "${pkgdir}/usr/lib"
156 ln -s "libnvinfer_builder_resource_win_${_arch}.so.${pkgver%.*}" "${pkgdir}/usr/lib/libnvinfer_builder_resource_win_${_arch}.so.${pkgver%%.*}"
157 ln -s "libnvinfer_builder_resource_win_${_arch}.so.${pkgver%%.*}" "${pkgdir}/usr/lib/libnvinfer_builder_resource_win_${_arch}.so"
158 done
159
160 _package_license "$pkgdir" "$pkgname"
161}
162
163package_python-tensorrt() {
164 pkgdesc+=' (python bindings and tools)'
165 license=("${license[0]} AND LicenseRef-Python-TensorRT-LICENSE-AGREEMENT")
166 depends=(
167 'glibc'
168 'libgcc'
169 'libstdc++'
170 'python'
171 'python-numpy'
172 'tensorrt')
173 optdepends=(
174 'python-colored: for onnx_graphsurgeon and polygraphy python modules'
175 'python-ml-dtypes: for onnx_graphsurgeon python module'
176 'python-onnx: for onnx_graphsurgeon python module'
177 'python-onnxruntime: for onnx_graphsurgeon python module'
178 'python-protobuf: for polygraphy python module'
179 'python-pytorch: for polygraphy python module'
180 'python-tensorflow-cuda: for polygraphy and tensorflow-quantization python modules'
181 'python-tf2onnx: for tensorflow-quantization python module')
182 provides=(
183 "python-onnx-graphsurgeon=${_onnx_graphsurgeon_ver}"
184 "python-polygraphy=${_polygraphy_ver}"
185 "python-tensorflow-quantization=${_tensorflow_quantization_ver}")
186
187 python -m installer --destdir="$pkgdir" python/*.whl
188
189 local _dir
190 for _dir in Polygraphy tensorflow-quantization onnx-graphsurgeon
191 do
192 python -m installer --destdir="$pkgdir" "TensorRT/tools/${_dir}/dist"/*.whl
193 done
194
195 _package_license "$pkgdir" "$pkgname"
196
197 local _sitepkgs
198 _sitepkgs="$(python -c 'import site; print(site.getsitepackages()[0])')"
199 ln -sr "${pkgdir}${_sitepkgs}/tensorrt-${pkgver}.dist-info/licenses/LICENSE.txt" \
200 "${pkgdir}/usr/share/licenses/${pkgname}/Python-TensorRT-LICENSE-AGREEMENT"
201}
202

Scan history

Scanned at (UTC)SeverityRules
2026-09-17 00:27:14 Low 2
2026-09-16 00:03:17 Low 2
2026-09-15 00:25:31 Low 2
2026-09-14 00:27:57 Low 2
2026-09-13 00:19:54 Low 2
2026-09-12 00:25:17 Low 2
2026-09-11 00:19:22 Low 2
2026-09-10 00:22:44 Low 2
2026-09-09 00:04:09 Low 2
2026-09-08 00:18:08 Low 2
2026-09-07 00:30:15 Low 2
2026-09-06 00:17:06 Low 2
2026-09-05 00:16:27 Low 2
2026-09-04 00:03:13 Low 2
2026-09-03 00:15:47 Low 2
2026-09-02 00:02:31 Low 2
2026-09-01 00:11:19 Low 2
2026-08-31 00:19:57 Low 2
2026-08-30 00:04:14 Low 2
2026-08-29 00:29:17 Low 2

Report a package

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

0 / 4000
Your suggestion