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