cordial-git
LOW
maintainer taxin
0 votes
scanned 2026-09-20 13:33:19.261973
Why flagged
Uploaded within the last 14 days with 2 or fewer community votes — little peer review so far.
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.
PKGBUILD
1
# Maintainer: taxin-404 <taxin404@duck.com>
2
#
3
# Cordial vendors no Roblox code, and fetches the engine rather than shipping
4
# it -- signature-checked, from a mirror, since v0.9.0. The engine is Roblox's
5
# official Android x86-64 build, which comes from Google Play and which the
6
# user supplies -- see the pkgdesc, the .install note and README section 1.
7
# Every other line here follows from packaging/io.github.luohoa97.Cordial.yml,
8
# which is the manifest that demonstrably builds.
9
10
_pkgname=cordial
11
pkgname=cordial-git
12
pkgver=0.17.0.r0.g5412f88
13
pkgrel=1
14
pkgdesc="Roblox's official Android build, run natively on Linux -- Cordial ships no Roblox code and fetches a signature-verified one"
15
arch=('x86_64')
16
url="https://github.com/luohoa97/cordial"
17
license=('GPL-3.0-or-later')
18
depends=(
19
# Linked, via the -sys crates' pkg-config probes.
20
'gtk4'
21
'libadwaita'
22
# The in-experience web window. Built in below with the same feature pair the
23
# Flatpak manifest uses; without both crates' `webview` the binary links no
24
# WebKit at all and account settings silently do nothing.
25
'webkitgtk-6.0'
26
'zlib'
27
# Named because namcap named them: these are the libraries the two binaries
28
# actually record in DT_NEEDED, and every one of them is reachable today only
29
# through gtk4 or webkitgtk-6.0. Listing them means a transitive dependency
30
# dropped upstream turns into a resolvable version bump rather than a package
31
# that installs and then cannot start.
32
'glib2'
33
'pango'
34
'graphene'
35
'libsoup3'
36
# `libgcc` and `libstdc++` rather than `gcc-libs`: Arch has split that package
37
# and /usr/lib/libstdc++.so.6 is owned by `libstdc++` on a current install.
38
# `gcc-libs` still resolves, so this is right rather than merely working.
39
'libgcc'
40
'libstdc++'
41
'glibc'
42
# dlopen'd at run time rather than linked, so namcap will not see them and
43
# dropping one produces a missing feature rather than a link error. That is
44
# exactly why they are listed by hand: `libvulkan.so.1` in the presenter,
45
# `libwayland-client.so.0`/`libwayland-egl.so.1` in the hand-rolled Wayland
46
# code, `libxkbcommon.so.0` in the keyboard path, `libEGL`/`libGLESv2` for
47
# the engine's GLES2 renderer.
48
'vulkan-icd-loader'
49
'wayland'
50
'libxkbcommon'
51
'libglvnd'
52
# `native/pipewire_backend.cpp` dlopens libpipewire-0.3.so.0. Without it
53
# there is no sound and nothing says so.
54
'pipewire'
55
'hicolor-icon-theme'
56
# Plugins are Deno programs (ADR-008) and Cordial bundles no runtime -- it
57
# execs `deno` off PATH. Without it every plugin fails to spawn: the system
58
# installs, lists in Settings, grants permissions and cannot run a line,
59
# which is what an Arch user reported on 2026-09-02.
60
#
61
# A hard dependency because a plugin that cannot start is not a degraded
62
# feature, and three first-party plugins ship enabled. **Arch is the only
63
# format where this line is possible**: `deno` is in `extra` here, and
64
# `dnf5 list deno` on Fedora 44 returns nothing, so the rpm and the deb
65
# cannot name a package that exists and say so in their own comments.
66
'deno'
67
)
68
makedepends=(
69
'git'
70
'cargo'
71
'cmake'
72
# Not a preference. AOSP bionic uses C11 _Atomic inside C++ headers, which
73
# GCC rejects with 144 errors; native/CMakeLists.txt refuses a non-Clang
74
# compiler outright rather than letting it fail deep in a *-sys build script
75
# naming neither the tool nor the cause.
76
'clang'
77
'pkgconf'
78
# Headers only, for the three audio backends. Both libraries are dlopen'd and
79
# neither is linked, so these add nothing to `depends` -- but leaving either
80
# out silently compiles the "unavailable" arm of that backend instead of
81
# failing the build, which is a loss of audio nobody would attribute to
82
# packaging. ADR-023 has the reasoning.
83
'libpipewire'
84
'libpulse'
85
'alsa-lib'
86
)
87
optdepends=(
88
# `bwrap` is genuinely optional: sandbox.rs only ever *subtracts* from what
89
# Cordial already holds, so without it a plugin still runs with zero Deno
90
# permissions and the broker still mediates every effect. Recommended, not
91
# required.
92
'bubblewrap: kernel sandbox under the plugin runtime'
93
# ADR-011 makes Wayland the backend Cordial targets. The X11 path still
94
# starts and window.rs dlopens these for it; CORDIAL_MONITOR needs Xinerama.
95
'libx11: X11 session fallback'
96
'libxinerama: CORDIAL_MONITOR monitor selection under X11'
97
# Roblox's own Android build, unpacked by Sober, is the copy Cordial looks
98
# for first. It is a suggestion and not a dependency because a user-supplied
99
# APK works just as well and neither one comes from this package.
100
'sober: a Roblox build for Cordial to run (Cordial ships none)'
101
)
102
provides=("$_pkgname")
103
conflicts=("$_pkgname" 'cordial-bin')
104
install="$pkgname.install"
105
options=('!lto')
106
source=(
107
"$_pkgname::git+https://github.com/luohoa97/cordial.git"
108
# The two submodules, and mcpelauncher-linker's own two, declared here rather
109
# than fetched by a `git submodule update --init --recursive` in prepare().
110
# Same reasoning as the Flatpak manifest's `git` sources: what the build
111
# compiles is then pinned by the gitlinks in the checkout, and `makepkg
112
# --nobuild` is enough to prove the whole tree resolves.
113
"mcpelauncher-linker::git+https://github.com/minecraft-linux/mcpelauncher-linker.git"
114
"android_bionic::git+https://github.com/minecraft-linux/android_bionic.git"
115
"android_core::git+https://github.com/minecraft-linux/android_core.git"
116
"libjnivm::git+https://github.com/ChristopherHX/libjnivm.git"
117
)
118
sha256sums=('SKIP' 'SKIP' 'SKIP' 'SKIP' 'SKIP')
119
120
prepare() {
121
cd "$srcdir/$_pkgname"
122
123
# Point each submodule at the clone makepkg already made, so nothing in
124
# prepare() or build() touches the network. `protocol.file.allow=always` is
125
# required from git 2.38 on: the fix for CVE-2022-39253 blocks the `file`
126
# transport for submodules, and without it `submodule update` refuses a local
127
# path with "transport 'file' not allowed" -- which reads like a bad URL.
128
git submodule init
129
git config submodule."third_party/mcpelauncher-linker".url "$srcdir/mcpelauncher-linker"
130
git config submodule."third_party/libjnivm".url "$srcdir/libjnivm"
131
git -c protocol.file.allow=always submodule update
132
133
cd third_party/mcpelauncher-linker
134
git submodule init
135
git config submodule.bionic.url "$srcdir/android_bionic"
136
git config submodule.core.url "$srcdir/android_core"
137
git -c protocol.file.allow=always submodule update
138
139
cd "$srcdir/$_pkgname"
140
export RUSTUP_TOOLCHAIN=stable
141
cargo fetch --locked --target "$(rustc -vV | sed -n 's/host: //p')"
142
}
143
144
pkgver() {
145
cd "$srcdir/$_pkgname"
146
# `git describe --tags` and nothing else, because the window title is
147
# `git describe --tags --always --dirty` stamped by
148
# crates/cordial-shell/build.rs -- so a package whose version came from
149
# anywhere else would disagree with the string the running client prints,
150
# and a tagless build shows a bare hash that sorts below everything.
151
git describe --long --tags --abbrev=7 | sed 's/^v//;s/\([^-]*-g\)/r\1/;s/-/./g'
152
}
153
154
build() {
155
cd "$srcdir/$_pkgname"
156
export RUSTUP_TOOLCHAIN=stable
157
export CARGO_TARGET_DIR=target
158
# See makedepends. cmake-rs passes these through to the native subtree.
159
export CC=clang CXX=clang++
160
# Both crates' `webview` features, and that is not optional: the shell holds
161
# the WebKit window and cordial-runtime holds the presenter that calls it, so
162
# one without the other leaves the caller cfg'd out and the feature silently
163
# absent. The Flatpak shipped that way once and it was reported as "webview
164
# doesnt work in cordial flatpak".
165
cargo build --frozen --release \
166
--features cordial-shell/webview,cordial-runtime/webview
167
}
168
169
check() {
170
cd "$srcdir/$_pkgname"
171
export RUSTUP_TOOLCHAIN=stable
172
export CARGO_TARGET_DIR=target
173
export CC=clang CXX=clang++
174
# **The same --features as build(), and leaving them off is not a tidy-up.**
175
# `cargo test --workspace` without them resolves cordial-runtime with no
176
# features, rebuilds `cordial-run` from that resolution, and hardlinks the
177
# result over `target/release/cordial-run` -- so package() then installs a
178
# binary with no web view in it. Caught here by `readelf -d
179
# target/release/cordial-run | grep -i webkit` returning nothing after a
180
# green check(), which is the same check the Flatpak manifest names and the
181
# same failure it records ("webview doesnt work in cordial flatpak").
182
#
183
# --release for the ordinary reason as well: it reuses build()'s artefacts
184
# rather than compiling the whole workspace again in the debug profile.
185
#
186
# The two skips are the only ones, and they are not a convenience. Both tests
187
# talk to the *builder's own* org.freedesktop.secrets -- they save an item
188
# into whatever keyring is on the session bus, read it back and erase it.
189
# They guard themselves with `usable()` and skip cleanly where there is no
190
# session bus, which is why a clean chroot never sees this; a plain `makepkg`
191
# on a desktop does, and then a package build is writing to the user's login
192
# keyring, which no package build should.
193
#
194
# Measured here rather than assumed. On the first full run in an Arch toolbox
195
# that inherits the host session bus, both failed with "the secret service did
196
# not answer within 5 seconds" while the build was still loading the machine.
197
# Re-run afterwards the same test binary passed three times out of three, and
198
# with DBUS_SESSION_BUS_ADDRESS unset both printed "skipped: there is no
199
# session bus" and passed. So it is flaky under load rather than broken --
200
# which is the worse of the two, because it fails a package build for a reason
201
# that has nothing to do with the package.
202
# The third skip is a different animal and is a finding rather than a
203
# nuisance. `deep_link.rs` calls that test a tripwire on GIO's URI reshaping
204
# and says in as many words that a failure is a finding; what it is actually
205
# measuring is **gvfs**, not GLib. Measured here with a control, one test
206
# binary, one machine, glib 2.88.3 throughout:
207
#
208
# no gvfs FAILED
209
# gvfs installed ok
210
# gvfs installed, no session bus FAILED
211
#
212
# So it needs `libgvfsdbus.so` in /usr/lib/gio/modules *and* a session bus to
213
# talk to. A clean chroot has neither, and neither is a dependency of
214
# Cordial, so gating a package build on it would make the package unbuildable
215
# for a reason that has nothing to do with the package. Reported upstream
216
# rather than papered over: the comment in deep_link.rs attributes the
217
# reshaping to GIO when it belongs to gvfs.
218
cargo test --frozen --release --workspace \
219
--features cordial-shell/webview,cordial-runtime/webview -- \
220
--skip secrets::tests::a_session_survives_the_round_trip_through_the_service \
221
--skip secrets::tests::a_plaintext_store_is_adopted_and_destroyed \
222
--skip deep_link::tests::gio_reshapes_a_roblox_link_and_is_therefore_not_where_the_string_comes_from
223
}
224
225
package() {
226
cd "$srcdir/$_pkgname"
227
228
# A tripwire, because this has already shipped wrong once in the Flatpak and
229
# the symptom is silence: with the `webview` feature missing from either
230
# crate the linker collects `webview::open`, the binary links no WebKit, and
231
# account settings simply do nothing. Cheaper to fail the package here than
232
# to have a user report it.
233
readelf -d target/release/cordial-run | grep -qi webkit || {
234
echo "cordial-run linked no WebKitGTK; the webview features did not take" >&2
235
return 1
236
}
237
238
# Both binaries, side by side. launch.rs looks for the loader as the sibling
239
# of current_exe and nowhere else -- there is no baked-in path and nothing to
240
# configure -- so a shell installed without cordial-run beside it is a
241
# launcher whose Launch button cannot find anything to launch.
242
install -Dm755 target/release/cordial-shell "$pkgdir/usr/bin/cordial-shell"
243
# See packaging/aur/cordial/PKGBUILD: `cordial` is the command and
244
# `cordial-shell` is the file. cordial-run gets no alias on purpose.
245
ln -sf cordial-shell "$pkgdir/usr/bin/cordial"
246
# First-party plugins, read-only beside the binary.
247
# Until the native packages existed nothing installed these anywhere, so the settings window listed no built-in plugins for anybody -- including Flatpak users, whose /app/share/cordial/plugins the code has looked in from the start and which has never existed.
248
for plugin in plugins/*/; do
249
id=$(basename "$plugin")
250
[ -f "$plugin/plugin.json" ] || continue
251
install -Dm644 "$plugin/plugin.json" "$pkgdir/usr/share/cordial/plugins/$id/plugin.json"
252
install -Dm644 "$plugin/main.ts" "$pkgdir/usr/share/cordial/plugins/$id/main.ts"
253
done
254
255
install -Dm755 target/release/cordial-run "$pkgdir/usr/bin/cordial-run"
256
257
# The square icons under packaging/icons/hicolor/. Both of them: Frostbite is
258
# the twice-a-year name in crates/cordial-shell/src/branding.rs, and a
259
# missing one is a blank icon in the task switcher on the one day nobody is
260
# watching for it. A test in that file asserts both exist and are square.
261
local _icons="usr/share/icons/hicolor/scalable/apps"
262
install -Dm644 "packaging/icons/hicolor/scalable/apps/io.github.luohoa97.Cordial.svg" \
263
"$pkgdir/$_icons/io.github.luohoa97.Cordial.svg"
264
install -Dm644 "packaging/icons/hicolor/scalable/apps/io.github.luohoa97.Cordial.Frostbite.svg" \
265
"$pkgdir/$_icons/io.github.luohoa97.Cordial.Frostbite.svg"
266
267
# Exec=cordial-shell %u, and the %u is not decorative: the entry registers
268
# x-scheme-handler/roblox-player, which is how a Play button on the website
269
# reaches a client at all.
270
install -Dm644 "packaging/io.github.luohoa97.Cordial.desktop" \
271
"$pkgdir/usr/share/applications/io.github.luohoa97.Cordial.desktop"
272
install -Dm644 "packaging/io.github.luohoa97.Cordial.metainfo.xml" \
273
"$pkgdir/usr/share/metainfo/io.github.luohoa97.Cordial.metainfo.xml"
274
275
# MIT requires its notice in "all copies or substantial portions" and
276
# Apache-2.0 section 4(d) requires NOTICE to travel with derivative works.
277
# Both apply to a binary package, not only to a source tree.
278
install -Dm644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
279
install -Dm644 THIRD-PARTY-NOTICES.md \
280
"$pkgdir/usr/share/licenses/$pkgname/THIRD-PARTY-NOTICES.md"
281
install -Dm644 third_party/libbadcpu/LICENSE.upstream \
282
"$pkgdir/usr/share/licenses/$pkgname/libbadcpu-MIT.txt"
283
install -Dm644 third_party/mcpelauncher-linker/LICENSE \
284
"$pkgdir/usr/share/licenses/$pkgname/mcpelauncher-linker-MIT.txt"
285
install -Dm644 third_party/mcpelauncher-linker/core/NOTICE \
286
"$pkgdir/usr/share/licenses/$pkgname/aosp-NOTICE.txt"
287
install -Dm644 third_party/libjnivm/LICENSE \
288
"$pkgdir/usr/share/licenses/$pkgname/libjnivm-MIT.txt"
289
# The comment above already named this obligation for mocktail-webview too;
290
# these two lines were the ones missing to meet it. third_party/mocktail-webview/
291
# is Apache-2.0 material -- mocktail's implementation of Roblox's
292
# in-experience web window, taken as the basis for Cordial's own -- and
293
# NOTICE at the repository root is the section 4(d) attribution for it.
294
# Found while giving packaging/aur/cordial/PKGBUILD a licence list to copy
295
# from this one; the Flatpak manifest and packaging/rpm/cordial.spec had the
296
# same gap and are fixed alongside this.
297
install -Dm644 NOTICE "$pkgdir/usr/share/licenses/$pkgname/NOTICE"
298
install -Dm644 third_party/mocktail-webview/LICENSE \
299
"$pkgdir/usr/share/licenses/$pkgname/mocktail-webview-Apache-2.0.txt"
300
}
301
Scan history
| Scanned at (UTC) | Severity | Rules |
|---|---|---|
| 2026-09-20 13:33:19 | Low | 1 |