cronet

LOW
maintainer the-k 0 votes scanned 2026-09-17 00:27:14.276658
View on AUR
Why flagged

The package downloads a source tarball from Google's official storage, which is plausibly the project's own release infrastructure; building from this source is normal for AUR packages and the checksum is verified, making the risk low despite the host not being whitelisted.

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 Google's official storage, which is plausibly the project's own release infrastructure; building from this source is normal for AUR packages and the checksum is verified, making the risk low despite the host not being whitelisted.

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:44 source=("https://commondatastorage.googleapis.com/chromium-browser-official/chromium-$pkgver-lite.tar.xz"

PKGBUILD

1 offending line(s) highlighted
1#!/bin/bash -e
2#
3# Based on https://github.com/lubo/archlinux-chromium.
4# Maintainer: Ľubomír 'the-k' Kučera <lubomir.kucera.jr at gmail.com>
5
6pkgname=cronet
7pkgver=144.0.7559.262
8pkgrel=1
9epoch=1
10_manual_clone=1
11# The following error occures on Abseil 20250512.0:
12# Protoc has returned non-zero status: -4
13_system_abseil=0
14_system_clang=1
15# ../../net/cookies/cookie_util.cc:819:31: error: no viable conversion from 'const_iterator' (aka 'const char *') to 'std::string::const_iterator' (aka '__normal_iterator<const char *, std::basic_string<char, std::char_traits<char>, std::allocator<char>>>')
16_system_stdlib=
17pkgdesc="The networking stack of Chromium put into a library"
18arch=('x86_64')
19url="https://chromium.googlesource.com/chromium/src/+/refs/tags/${pkgver}/components/cronet"
20license=('BSD-3-Clause')
21depends=(
22 glibc
23 nspr
24 nss
25)
26makedepends=(
27 at-spi2-core
28 clang
29 compiler-rt
30 gn
31 gtk3
32 libcups
33 libffi
34 libva
35 libxkbcommon
36 lld
37 ninja
38 pango
39 python
40 rust
41 rust-bindgen
42)
43options=('!lto') # Chromium adds its own flags for ThinLTO
44source=("https://commondatastorage.googleapis.com/chromium-browser-official/chromium-$pkgver-lite.tar.xz"
45 compiler-rt-adjust-paths.patch
46 increase-fortify-level.patch
47 abseil-fix-missing-algorithm.patch
48 abseil-remove-unused-targets.patch
49 disable-logging.patch
50 fix-no-matching-strcat.patch
51 fix-trust-store-segfault.patch
52 fix-undeclared-identifiers.patch
53)
54sha256sums=('653ac5ddbbb09d22fafe133c81eab28b89570c934d9f01bada892a135cdad2f7'
55 'ec8e49b7114e2fa2d359155c9ef722ff1ba5fe2c518fa48e30863d71d3b82863'
56 'd634d2ce1fc63da7ac41f432b1e84c59b7cceabf19d510848a7cff40c8025342'
57 'f7888650e5bea3dd5aad6f6b57453e5b38db5dccb9d8f870b208bd94be625495'
58 'ec6b7a8c7ed4eeb30195e9b83b65cf8d17c7289f02eeb5149bb674cb7561495b'
59 'b11ff1f8364c51c7d18fbb65fc76e25ca8a2095cece50c32452c0f25f03e270e'
60 '2c5ecc12109ce41f9799dcac5c270684a433f8806816971b41cbae8b55adc586'
61 'c88d778c462503b9cdd903668d977d1e9bbddd691d8207c98211882f57ab435d'
62 '062919e45df0154b9f198f3686fd58c4598b229549f7ad1bc20d3f53798749f1')
63
64if (( _manual_clone )); then
65 source[0]=fetch-chromium-release
66 sha256sums[0]=SKIP
67 makedepends+=('git' 'python-httplib2' 'python-pyparsing' 'python-six')
68fi
69
70declare -gA _depends=(
71 [glib2]="libgio-2.0.so libglib-2.0.so libgobject-2.0.so"
72 [libgcc]="libgcc_s.so"
73)
74
75_ABSEIL_PKG="abseil-cpp>=20240722.0"
76declare -gA _MAKE_TO_RUNTIME_DEPENDS=(
77 ["${_ABSEIL_PKG}"]="${_ABSEIL_PKG}"
78 [brotli]="libbrotlidec.so"
79 [double-conversion]="double-conversion"
80 [icu]="libicui18n.so libicuuc.so"
81 [re2]="libre2.so"
82 [zlib]="libz.so"
83 [zstd]="libzstd.so"
84)
85
86# Possible replacements are listed in build/linux/unbundle/replace_gn_files.py
87# Keys are the names in the above script; values are the dependencies in Arch
88declare -gA _system_libs=(
89 [brotli]=brotli
90 [double-conversion]=double-conversion
91 [icu]=icu
92 [zlib]=zlib
93 [zstd]=zstd
94)
95declare -gA _system_make_libs=(
96 [jsoncpp]=jsoncpp
97 [simdutf]=simdutf
98)
99_unwanted_bundled_libs=(
100 third_party/brotli
101 third_party/crc32c
102 third_party/dav1d
103 base/third_party/double_conversion
104 third_party/ffmpeg
105 third_party/flac
106 third_party/flatbuffers
107 third_party/fontconfig
108 build/config/freetype
109 third_party/harfbuzz-ng
110 third_party/highway
111 third_party/icu
112 third_party/jsoncpp
113 third_party/libaom
114 third_party/libdrm
115 third_party/libjpeg_turbo
116 third_party/libpng
117 third_party/libsecret
118 third_party/libusb
119 third_party/libvpx
120 third_party/libwebp
121 third_party/libxml
122 third_party/angle/src/third_party/libXNVCtrl
123 third_party/libxslt
124 third_party/libyuv
125 third_party/openh264
126 third_party/opus
127 third_party/simdutf
128 third_party/snappy
129 third_party/swiftshader/third_party/SPIRV-Headers
130 third_party/swiftshader/third_party/SPIRV-Tools
131 third_party/spirv-headers/src
132 third_party/spirv-tools/src
133 third_party/vulkan_memory_allocator
134 third_party/woff2
135 third_party/zlib
136 third_party/zstd
137
138 third_party/node
139 third_party/jdk
140)
141
142# System Abseil needs libstdc++.
143# https://stackoverflow.com/q/12542971
144if [[ "${_system_stdlib}" != libstdc++ ]]; then
145 _system_abseil=0
146fi
147if (( _system_abseil )); then
148 # shellcheck disable=SC2192
149 _system_libs+=(
150 [absl_algorithm]=
151 [absl_base]="${_ABSEIL_PKG}"
152 [absl_cleanup]=
153 [absl_container]=
154 [absl_crc]=
155 [absl_debugging]=
156 [absl_flags]=
157 [absl_functional]=
158 [absl_hash]=
159 [absl_log]=
160 [absl_log_internal]=
161 [absl_memory]=
162 [absl_meta]=
163 [absl_numeric]=
164 [absl_random]=
165 [absl_status]=
166 [absl_strings]=
167 [absl_synchronization]=
168 [absl_time]=
169 [absl_types]=
170 [absl_utility]=
171 )
172 _unwanted_bundled_libs+=(
173 third_party/abseil-cpp/absl/algorithm
174 third_party/abseil-cpp/absl/base
175 third_party/abseil-cpp/absl/cleanup
176 third_party/abseil-cpp/absl/container
177 third_party/abseil-cpp/absl/crc
178 third_party/abseil-cpp/absl/debugging
179 third_party/abseil-cpp/absl/flags
180 third_party/abseil-cpp/absl/functional
181 third_party/abseil-cpp/absl/hash
182 third_party/abseil-cpp/absl/log
183 third_party/abseil-cpp/absl/log/internal
184 third_party/abseil-cpp/absl/memory
185 third_party/abseil-cpp/absl/meta
186 third_party/abseil-cpp/absl/numeric
187 third_party/abseil-cpp/absl/random
188 third_party/abseil-cpp/absl/status
189 third_party/abseil-cpp/absl/strings
190 third_party/abseil-cpp/absl/synchronization
191 third_party/abseil-cpp/absl/time
192 third_party/abseil-cpp/absl/types
193 third_party/abseil-cpp/absl/utility
194 )
195fi
196
197case "${_system_stdlib}" in
198"")
199 ;;
200*)
201 _unwanted_bundled_libs+=(
202 third_party/libc++
203 third_party/libc++abi
204 )
205 ;;&
206libc++)
207 depends+=(
208 libc++
209 )
210 ;;
211libstdc++)
212 _depends+=(
213 [libstdc++]="libstdc++.so"
214 )
215 _system_libs+=(
216 [re2]=re2
217 )
218 _unwanted_bundled_libs+=(
219 third_party/re2
220 )
221 ;;
222esac
223
224# shellcheck disable=SC2068
225for _make_pkg in ${_system_libs[@]}; do
226 _runtime_pkg="${_MAKE_TO_RUNTIME_DEPENDS["${_make_pkg}"]}"
227
228 if [[ "${_make_pkg}" = "${_runtime_pkg}" ]]; then
229 depends+=("${_runtime_pkg}")
230 else
231 _depends["${_make_pkg}"]="${_runtime_pkg}"
232 fi
233done
234
235makedepends+=(
236 "${!_depends[@]}"
237 "${_system_make_libs[@]}"
238)
239
240prepare() {
241 if (( _manual_clone )); then
242 ./fetch-chromium-release $pkgver
243 fi
244 cd chromium-$pkgver
245
246 # Allow building against system libraries in official builds
247 sed -i 's/OFFICIAL_BUILD/GOOGLE_CHROME_BUILD/' \
248 tools/generate_shim_headers/generate_shim_headers.py
249
250 # Upstream fixes
251
252 if (( _system_clang )); then
253 # Allow libclang_rt.builtins from compiler-rt >= 16 to be used
254 patch -Np1 -i ../compiler-rt-adjust-paths.patch
255 fi
256
257 # Increase _FORTIFY_SOURCE level to match Arch's default flags
258 patch -Np1 -i ../increase-fortify-level.patch
259
260 # Fixes the build crashing with the following errors:
261 # ../../base/debug/proc_maps_linux.cc:202:18: error: use of undeclared identifier 'strlen'
262 # ../../components/cronet/native/engine.cc:155:8: error: use of undeclared identifier 'isnan'
263 # implicit instantiation of undefined template 'std::numeric_limits<unsigned long>'
264 # ../../net/third_party/quiche/src/quiche/common/quiche_buffer_allocator.h:94:5: error: use of undeclared identifier 'memcpy'
265 patch -p0 -i ../fix-undeclared-identifiers.patch
266
267 # Disables logging as it's unconfigurable, which is undesired in a library
268 patch -p0 -i ../disable-logging.patch
269
270 if (( _system_abseil )); then
271 # Fixes building with system Abseil
272 patch -p0 -i ../abseil-fix-missing-algorithm.patch
273 patch -p0 -i ../abseil-remove-unused-targets.patch
274 fi
275
276 # Fixes the following error:
277 # ../../net/third_party/quiche/src/quiche/web_transport/encapsulated/encapsulated_web_transport.cc:351:16: error: no matching function for call to 'StrCat'
278 patch -p0 -i ../fix-no-matching-strcat.patch
279
280 # Fixes segfault caused by `command_line` being null
281 patch -p0 -i ../fix-trust-store-segfault.patch
282
283 if (( !_system_clang )); then
284 # Use prebuilt rust as system rust cannot be used due to the error:
285 # error: the option `Z` is only accepted on the nightly compiler
286 ./tools/rust/update_rust.py
287
288 # To link to rust libraries we need to compile with prebuilt clang
289 ./tools/clang/scripts/update.py
290 else
291 # To use correct libadler2 lib
292 # See also: https://github.com/ungoogled-software/ungoogled-chromium/pull/3598
293 sed -i 's/rustc_nightly_capability = use_chromium_rust_toolchain/rustc_nightly_capability = true/' \
294 build/config/rust.gni
295 fi
296
297 # Remove bundled libraries for which we will use the system copies; this
298 # *should* do what the remove_bundled_libraries.py script does, with the
299 # added benefit of not having to list all the remaining libraries
300 local _lib
301 for _lib in "${_unwanted_bundled_libs[@]}"; do
302 find "$_lib" -type f \
303 \! -path "$_lib/chromium/*" \
304 \! -path "$_lib/google/*" \
305 \! -path "third_party/abseil-cpp/absl/base/internal/raw_logging.h" \
306 \! -regex '.*\.\(gn\|gni\|isolate\)' \
307 -delete
308 done
309
310 ./build/linux/unbundle/replace_gn_files.py \
311 --system-libraries "${!_system_libs[@]}" "${!_system_make_libs[@]}"
312}
313
314build() {
315 cd chromium-$pkgver
316
317 if (( _system_clang )); then
318 export CC=clang
319 export CXX=clang++
320 export AR=ar
321 export NM=nm
322 else
323 local _clang_path="$PWD/third_party/llvm-build/Release+Asserts/bin"
324 export CC=$_clang_path/clang
325 export CXX=$_clang_path/clang++
326 export AR=$_clang_path/llvm-ar
327 export NM=$_clang_path/llvm-nm
328 fi
329
330 local _flags=(
331 'custom_toolchain="//build/toolchain/linux/unbundle:default"'
332 'host_toolchain="//build/toolchain/linux/unbundle:default"'
333 'is_official_build=true' # implies is_cfi=true on x86_64
334 'symbol_level=0' # sufficient for backtraces on x86(_64)
335 'treat_warnings_as_errors=false'
336 'fatal_linker_warnings=false'
337 'disable_fieldtrial_testing_config=true'
338 'use_sysroot=false'
339 'use_system_libffi=true'
340 'use_clang_modules=false'
341 )
342
343 if [[ -n ${_system_libs[icu]+set} ]]; then
344 _flags+=('icu_use_data_file=false')
345 fi
346
347 if (( _system_clang )); then
348 local _clang_version
349 _clang_version=$(
350 clang --version | grep -m1 version | sed 's/.* \([0-9]\+\).*/\1/')
351
352 _flags+=(
353 'clang_base_path="/usr"'
354 'clang_use_chrome_plugins=false'
355 "clang_version=\"$_clang_version\""
356 'chrome_pgo_phase=0' # needs newer clang to read the bundled PGO profile
357 )
358
359 # Allow the use of nightly features with stable Rust compiler
360 # https://github.com/ungoogled-software/ungoogled-chromium/pull/2696#issuecomment-1918173198
361 export RUSTC_BOOTSTRAP=1
362
363 _flags+=(
364 'rust_sysroot_absolute="/usr"'
365 'rust_bindgen_root="/usr"'
366 "rustc_version=\"$(rustc --version)\""
367 )
368 fi
369
370 case "${_system_stdlib}" in
371 libc++)
372 CXXFLAGS+=' -stdlib=libc++'
373 LDFLAGS+=' -stdlib=libc++'
374 ;&
375 libstdc++)
376 _flags+=(
377 'use_custom_libcxx=false'
378 )
379 ;;
380 esac
381
382 if (( _system_abseil )); then
383 # Fixes https://github.com/abseil/abseil-cpp/issues/1747
384 # ld.lld: error: undefined symbol: absl::lts_20250127::log_internal::LogMessage& absl::lts_20250127::log_internal::LogMessage::operator<<<unsigned long, 0>(unsigned long const&)
385 CXXFLAGS+=' -fclang-abi-compat=17'
386 fi
387
388 # Facilitate deterministic builds (taken from build/config/compiler/BUILD.gn)
389 CFLAGS+=' -Wno-builtin-macro-redefined'
390 CXXFLAGS+=' -Wno-builtin-macro-redefined'
391 CPPFLAGS+=' -D__DATE__= -D__TIME__= -D__TIMESTAMP__='
392
393 # Do not warn about unknown warning options
394 CFLAGS+=' -Wno-unknown-warning-option'
395 CXXFLAGS+=' -Wno-unknown-warning-option'
396
397 # Let Chromium set its own symbol level
398 CFLAGS=${CFLAGS/-g }
399 CXXFLAGS=${CXXFLAGS/-g }
400
401 # https://github.com/ungoogled-software/ungoogled-chromium-archlinux/issues/123
402 CFLAGS=${CFLAGS/-fexceptions}
403 CFLAGS=${CFLAGS/-fcf-protection}
404 CXXFLAGS=${CXXFLAGS/-fexceptions}
405 CXXFLAGS=${CXXFLAGS/-fcf-protection}
406
407 # This appears to cause random segfaults when combined with ThinLTO
408 # https://bugs.archlinux.org/task/73518
409 CFLAGS=${CFLAGS/-fstack-clash-protection}
410 CXXFLAGS=${CXXFLAGS/-fstack-clash-protection}
411
412 # https://crbug.com/957519#c122
413 CXXFLAGS=${CXXFLAGS/-Wp,-D_GLIBCXX_ASSERTIONS}
414
415 if [[ $CARCH == aarch64 ]] || [[ $CARCH == riscv64 ]]; then
416 # On aarch64 and riscv64, certain files (e.g. in libvpx and libyuv) needs to
417 # be compiled with additional arch features (e.g. dotprod, sve, sme, rvv)
418 # Having an arch setting in the C(XX)FLAGS overrides those
419 # and causes compilation failure
420 CFLAGS="${CFLAGS/-march=*([^ ]) }"
421 CXXFLAGS="${CXXFLAGS/-march=*([^ ]) }"
422 fi
423
424 gn gen out/Release --args="${_flags[*]}"
425 ninja -C out/Release cronet_package
426}
427
428check() {
429 cd "chromium-${pkgver}"
430
431 # cronet_tests isn't linked against the shared object.
432 ninja -C out/Release cronet_sample
433
434 ./out/Release/cronet_sample
435}
436
437package() {
438 # shellcheck disable=SC2206
439 depends+=(
440 ${_depends[@]}
441 )
442
443 : "${pkgdir:?}"
444
445 cd chromium-$pkgver/out/Release/cronet
446
447 install -D "libcronet.${pkgver}.so" "${pkgdir}/usr/lib/libcronet.${pkgver}.so"
448 ln -s "libcronet.${pkgver}.so" "${pkgdir}/usr/lib/libcronet.so"
449
450 cp -r include "${pkgdir}/usr"
451
452 install -Dvm644 LICENSE "${pkgdir}/usr/share/licenses/cronet/LICENSE"
453}
454
455: "${arch[@]}"
456: "${depends[@]}"
457: "${epoch}"
458: "${license[@]}"
459: "${options[@]}"
460: "${sha256sums[@]}"
461: "${source[@]}"
462: "${pkgdesc}"
463: "${pkgname}"
464: "${pkgrel}"
465: "${url}"
466
467# vim:set ts=2 sw=2 et:
468

Changes since previous scan

--- PKGBUILD @ 2026-09-11 00:19
+++ PKGBUILD @ 2026-09-17 00:27
@@ -4,7 +4,7 @@
# Maintainer: Ľubomír 'the-k' Kučera <lubomir.kucera.jr at gmail.com>
pkgname=cronet
-pkgver=144.0.7559.259
+pkgver=144.0.7559.262
pkgrel=1
epoch=1
_manual_clone=1

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 13:22:32 Medium 1
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

Report a package

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

0 / 4000
Your suggestion