The owner's choice of 2026-11-02 after T-551's check found the tag: the update now, patch 0060 (the roots, byte-identical upstream) dropped, special attention to the certificate and HTTPS changes. - update-engine.sh RB_20261027 / --finish: the 72 patches on the tag (0060 fell away as already applied), jihad/uxp-RB_20261027 at 52ad9ab66e in third_party/uxp, the queue rewritten and renumbered from 0060, the pins (engine-version.env, the OE recipe, .gitmodules, the UA and the three start pages: UXP/6b18be9), JIHAD_APP_BUILD_ID 20261103000000; patch-queue.sh --check, check-engine-pins.sh and check-engine-api.py (baseline rewritten, unchanged) agree. - docs/ENGINE-SOURCE.md: the base, the dropped 0060, the renumbering, and the range's 12 commits each with its disposition — the two NSS certificate commits (emSign removed after the eMudhra compromise; certdata to Sept 2026) were on the device since the roots of 2026-10-25 and are the base's now; no PSM, TLS protocol, HSTS or certificate-UI change in the range; the memory-safety fixes (the JS OOB array copy, the jar: flag, feTile, the layout frame table, the mutation observer's strong ref, SQLite 3.54.1) taken with the base. - audit-roots.py against the fetched release certdata and the CCADB report: identical set and trust, none removed, RESULT OK (docs/rounds/certs-2026-11-03). - Desktop: the full build clean; 14 of 18 tests pass, the four left are the desktop GTK path's known read-back limit. ARM: libxul, the daemon, the bundle, the three packages; full pushes to all three variants; default-check x3 faults 0; the daemon's start line 28 of 29 optional exports as before. The areas the commits touch, on the device (tools/device/engine-checks.sh, new): about:settings, about:personas and about:addons through jar: under the flag change, cookies through the new SQLite, an SVG filter page with feTile and its overflow case (render/goanna/test/jihad-svg-filter.html, new), a long press's selection; faults 0. The certificate kit's checks (tools/device/cert-checks.sh): the TLS 1.0 refusal, the clean loads, expired / wrong.host / self-signed / untrusted-root with the SSL confirm's right flags, OCSP revocation enforced on grc.com, ssl.com and DigiCert's demos, revoked.badssl.com's CRL-only case invisible as before: nothing changed with the base. Records: docs/rounds/engine-rb27-2026-11-03/notes.txt. - tools/device/cert-checks.sh and t502/enyo-restore-job.sh (new): the certificate kit's device checks under a hand-started daemon, and the Enyo job put back after any spike round. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
204 lines
13 KiB
BlitzBasic
204 lines
13 KiB
BlitzBasic
# Jihad Browser — Goanna/UXP engine for webOS 3 ARMv7 (OpenEmbedded recipe).
|
|
# The heavy recipe: cross-compiles UXP with the embedding config against the
|
|
# device sysroot. Replaces the isis webkit-webos + qt4-webos engine deps.
|
|
#
|
|
# STATUS (re-read 2026-08-10, T-115): "skeleton … gated on the device sysroot" was STALE. The body
|
|
# below is a full cross-build (mach configure/build under ${JIHAD_TC} against ${JIHAD_ARM_SYSROOT},
|
|
# staged as jihad-engine-dist), and both prerequisites it named exist: the crosstool-NG toolchain
|
|
# (R1, on-device verified) and the Jessie armel sysroot — both are declared prebuilt inputs, see
|
|
# R3's prebuilt-inputs carve-out. CODE READ ONLY: not bitbake-run since 2026-07-29.
|
|
# See ../../../docs/DEVICE-BUILD.md and ../../mozconfig.goanna-arm.
|
|
|
|
SUMMARY = "Goanna (UXP) web engine, embedding build for Jihad Browser"
|
|
HOMEPAGE = "https://repo.palemoon.org/MoonchildProductions/UXP"
|
|
LICENSE = "MPL-2.0"
|
|
|
|
require ../jihad-common.inc
|
|
|
|
# Both TouchPad models (TouchPad = topaz/tenderloin, TouchPad Go = opal) share ONE
|
|
# APQ8060 ARMv7 softfp libxul — there is no per-model engine variance (device-build R6).
|
|
# The machine confs (../../conf/machine/{tenderloin,opal}.conf) both resolve to
|
|
# DEFAULTTUNE "armv7a-neon" (softfp), which is exactly the mozconfig.goanna-arm target,
|
|
# so the same libxul.so installs on both. Model differences are UI-side DPI only, not
|
|
# compiled into the engine. Captured difference: none — shared ARMv7 softfp binary.
|
|
COMPATIBLE_MACHINE = "(tenderloin|opal)"
|
|
|
|
# UXP source. Clones the engine commit from the in-repo submodule (third_party/uxp, bound in the
|
|
# chroot): upstream UXP at the release tag UXP_TAG plus Jihad's commits, the head of branch
|
|
# jihad/uxp-<UXP_TAG> (build/engine/engine-version.env; docs/ENGINE.md §1). It IS the exact tree the
|
|
# host build (build-goanna-arm.sh) compiles, so the OE clone builds identical source. nobranch=1:
|
|
# SRCREV alone pins the checkout (a file:// mirror need not track a branch); update-engine.sh
|
|
# --finish/--pins rewrites SRCREV and check-engine-pins.sh checks it. The patch queue
|
|
# (do_apply_jihad_patches) is already in this commit, so its dry-run gate skips every patch.
|
|
# For a pristine upstream base instead, clone the release tag from palemoon and let the queue apply
|
|
# for real (build/engine/patch-queue.sh --check proves it reproduces SRCREV's tree):
|
|
# SRC_URI = "git://repo.palemoon.org/MoonchildProductions/UXP.git;protocol=https;tag=<UXP_TAG>"
|
|
SRC_URI = "git://${JIHAD_REPO}/third_party/uxp;protocol=file;nobranch=1"
|
|
SRCREV = "52ad9ab66ebbc1c28133a330ee2f35819565d61e"
|
|
S = "${WORKDIR}/git"
|
|
|
|
# Modern C++14 toolchain (device-build R1) — the stock dylan/device gcc cannot build UXP.
|
|
# GTK/X/cairo/pango/nspr/nss are NOT taken from OE — they come from the Jessie armel sysroot
|
|
# (${JIHAD_ARM_SYSROOT}) via PKG_CONFIG_SYSROOT_DIR, exactly as the direct cross-build does.
|
|
DEPENDS = "jihad-cross-toolchain-native"
|
|
|
|
# The Jihad engine mods (patch queue) + the ARM mozconfig are build-control files that live
|
|
# in the repo, not upstream sources — reference them directly from ${JIHAD_REPO} (bound in the
|
|
# chroot) rather than via SRC_URI, so there is nothing to fetch/checksum for them.
|
|
JIHAD_PATCHES = "${JIHAD_REPO}/build/desktop/patches"
|
|
JIHAD_MOZCONFIG_TMPL = "${JIHAD_REPO}/build/webos-oe/mozconfig.goanna-arm"
|
|
|
|
# review #8: because those files are NOT in SRC_URI, nothing would invalidate sstate when they
|
|
# change — declare them in the signature of each task that reads them (mechanics + the
|
|
# JIHAD_*_SIG identity sets are documented in ../jihad-common.inc). The UXP tree itself IS a
|
|
# SRC_URI (git, SRCREV-pinned) so it is already covered by do_fetch.
|
|
# apply_jihad_patches the patch queue (glob: adding/removing/editing a patch moves the hash).
|
|
# configure the mozconfig template + the toolchain + the Jessie sysroot it retargets.
|
|
# compile the toolchain + sysroot used in place by mach.
|
|
# install the toolchain (its `strip` shrinks the staged libxul).
|
|
# NOTE: apply_jihad_patches re-runs on the EXISTING ${S} when the queue changes; `patch --forward`
|
|
# skips already-applied hunks, so the re-run is safe (a full re-unpack still needs cleansstate).
|
|
do_apply_jihad_patches[file-checksums] = "${JIHAD_PATCHES}/*.patch"
|
|
do_configure[file-checksums] = "${JIHAD_MOZCONFIG_TMPL} ${JIHAD_TC_SIG} ${JIHAD_SYS_SIG}"
|
|
do_compile[file-checksums] = "${JIHAD_TC_SIG} ${JIHAD_SYS_SIG}"
|
|
# Wipe + recreate the mozilla objdir before every configure so each build starts clean. A
|
|
# do_configure that failed AFTER `mach configure` (e.g. the do_qa_configure LIC check) leaves a
|
|
# populated objdir; on the next build `mach build`'s AUTOCLOBBER then chokes on it with
|
|
# `rm: cannot remove 'dist/bin': Directory not empty`. A fresh objdir means AUTOCLOBBER never has a
|
|
# stale tree to clobber. (The host dev-loop build-goanna-arm.sh keeps its objdir for incremental
|
|
# rebuilds; the OE recipe does a clean build, which is the OE norm anyway.) 2026-08-15, T-154.
|
|
do_configure[cleandirs] = "${MOZ_OBJDIR}"
|
|
do_install[file-checksums] = "${JIHAD_TC_SIG}"
|
|
|
|
# The cross env for mach (mirrors build-goanna-arm.sh). Exported to every task shell. The
|
|
# toolchain + Jessie sysroot are used in place from the repo; GTK/X/nspr/nss come from the
|
|
# sysroot via pkg-config, NOT from OE. CC/CXX are exported so in-tree gyp probes (e.g. NSS
|
|
# freebl __SOFTFP__) use the cross compiler, not the host cc.
|
|
export CC = "${JIHAD_TC}/bin/arm-webos-linux-gnueabi-gcc"
|
|
export CXX = "${JIHAD_TC}/bin/arm-webos-linux-gnueabi-g++"
|
|
export AR = "${JIHAD_TC}/bin/arm-webos-linux-gnueabi-ar"
|
|
export RANLIB = "${JIHAD_TC}/bin/arm-webos-linux-gnueabi-ranlib"
|
|
export STRIP = "${JIHAD_TC}/bin/arm-webos-linux-gnueabi-strip"
|
|
# OE force-exports LD as "arm-webos-linux-gnueabi-ld --sysroot=<OE target sysroot>", which
|
|
# moz.configure's linker check then tries and fails ("Cannot find link"). Point LD at our
|
|
# toolchain's own ld (no OE sysroot); mach links via CC against the Jessie sysroot anyway.
|
|
export LD = "${JIHAD_TC}/bin/arm-webos-linux-gnueabi-ld"
|
|
export AS = "${JIHAD_TC}/bin/arm-webos-linux-gnueabi-as"
|
|
export NM = "${JIHAD_TC}/bin/arm-webos-linux-gnueabi-nm"
|
|
# UXP needs a HOST compiler >= GCC 9.1 for its host tools; the rootfs default is 4.8, so use
|
|
# the gcc-9/g++-9 installed from the toolchain PPA (OE natives still use 4.8).
|
|
export HOST_CC = "gcc-9"
|
|
export HOST_CXX = "g++-9"
|
|
export PKG_CONFIG = "pkg-config"
|
|
export PKG_CONFIG_SYSROOT_DIR = "${JIHAD_ARM_SYSROOT}"
|
|
export PKG_CONFIG_LIBDIR = "${JIHAD_ARM_SYSROOT}/usr/lib/arm-linux-gnueabi/pkgconfig:${JIHAD_ARM_SYSROOT}/usr/share/pkgconfig:${JIHAD_ARM_SYSROOT}/usr/lib/pkgconfig"
|
|
export PKG_CONFIG_PATH = "${PKG_CONFIG_LIBDIR}"
|
|
export MOZCONFIG = "${B}/mozconfig.goanna-arm"
|
|
export MOZ_OBJDIR = "${B}/obj-jihad-goanna-arm"
|
|
# This UXP pin builds under PYTHON 3 (mach re-execs under python3; config/pythonpath.py is py3
|
|
# syntax). The real trap is the LOCALE: OE forces LC_ALL=C in tasks, so python3's open().read()
|
|
# on the UTF-8 .idl files dies ("UnicodeDecodeError: 'ascii' codec"). Pin python3 + a UTF-8 locale.
|
|
export PYTHON = "python3"
|
|
export LANG = "en_US.UTF-8"
|
|
export LC_ALL = "en_US.UTF-8"
|
|
|
|
# Generate the OE mozconfig from the repo template, retargeting the direct-build's fixed mount
|
|
# points (/tc, /sysroot, /out) at the real in-chroot paths + this recipe's object dir.
|
|
jihad_gen_mozconfig() {
|
|
sed -e "s#/tc/#${JIHAD_TC}/#g" \
|
|
-e "s#/sysroot#${JIHAD_ARM_SYSROOT}#g" \
|
|
-e "s#/out/obj-jihad-goanna-arm#${MOZ_OBJDIR}#g" \
|
|
-e 's#HOST_CC="gcc"#HOST_CC="gcc-9"#' \
|
|
-e 's#HOST_CXX="g++"#HOST_CXX="g++-9"#' \
|
|
"${JIHAD_MOZCONFIG_TMPL}" > "${MOZCONFIG}"
|
|
}
|
|
|
|
# Apply the Jihad patch queue in its OWN task after do_patch (which is a python task — can't
|
|
# append shell to it) and before do_configure. The SRCREV commit already has the whole queue
|
|
# baked in, so every patch is already applied here; the dry-run gate (mirroring the host build's
|
|
# build-goanna-arm.sh loop) skips a patch that does not apply cleanly instead of half-applying its
|
|
# hunks with `|| true`. A stale/partially-drifted patch therefore leaves the baked-in source
|
|
# untouched rather than corrupting it. If SRCREV is ever swapped to the pristine release tag, this
|
|
# same loop applies the queue for real.
|
|
do_apply_jihad_patches() {
|
|
cd ${S}
|
|
for p in ${JIHAD_PATCHES}/*.patch; do
|
|
if patch -p1 --forward --dry-run < "$p" >/dev/null 2>&1; then
|
|
patch -p1 --forward < "$p" || true
|
|
fi
|
|
done
|
|
}
|
|
addtask apply_jihad_patches after do_patch before do_configure
|
|
|
|
do_configure() {
|
|
jihad_gen_mozconfig
|
|
export PATH="${JIHAD_TC}/bin:${PATH}"
|
|
cd ${S} && ./mach configure
|
|
}
|
|
|
|
do_compile() {
|
|
export PATH="${JIHAD_TC}/bin:${PATH}"
|
|
cd ${S} && ./mach build
|
|
}
|
|
|
|
do_install() {
|
|
# Stage the WHOLE engine dist to ONE datadir location — the daemon links against it AND the
|
|
# jihad-deviceroot bundler walks its .so closure + GRE files. Under datadir (not libdir)
|
|
# because OE libdir sysroot-staging drops static .a and would split the dist; datadir
|
|
# plain-staging keeps the tree intact. -L/-aL dereference the objdir symlinks (incl. RELATIVE
|
|
# ones like xpcom-config.h) so nothing dangles once staged.
|
|
# bin/ libxul + NSS suite (libnss3/nssutil3/smime3/ssl3/softokn3/freebl*/nssckbi) +
|
|
# sqlite (libmozsqlite3) + nspr + liblgpllibs + libhunspell + GRE files
|
|
# (goanna.js, omni.ja, dependentlibs.list, platform.ini, icu*.dat)
|
|
# sdk/lib/ static glue (libxpcomglue_s.a, libmozglue.a)
|
|
# include/ frozen embedding headers
|
|
ED=${D}${datadir}/jihad-engine-dist
|
|
install -d ${ED}/bin ${ED}/sdk/lib ${ED}/include
|
|
# ONLY the .so closure + GRE files from dist/bin — NOT the x86 host build tools (nsinstall,
|
|
# xpcshell, …) which would break OE's ARM objcopy during do_package.
|
|
cp -aL ${MOZ_OBJDIR}/dist/bin/*.so ${ED}/bin/
|
|
# plugin-container is the OOP NPAPI host executable (the ONLY path in UXP that renders a
|
|
# windowless plugin like Flash out of process) — an ARM binary, not a .so/.dat, so the globs
|
|
# above miss it. The jihad-deviceroot bundler hard-requires it (device-build/addons R7) and
|
|
# aborts do_compile without it. Named explicitly, exactly as make-device-bundle.sh stages it.
|
|
for f in goanna.js omni.ja dependentlibs.list platform.ini greprefs.js plugin-container; do
|
|
[ -e ${MOZ_OBJDIR}/dist/bin/$f ] && cp -L ${MOZ_OBJDIR}/dist/bin/$f ${ED}/bin/ || true
|
|
done
|
|
for f in ${MOZ_OBJDIR}/dist/bin/*.dat; do [ -e "$f" ] && cp -L "$f" ${ED}/bin/ || true; done
|
|
# Loose GRE resource dirs (chrome/components/defaults/modules/res/…). A mach build links these
|
|
# back to the source tree, so dist/bin/<d> is a real dir full of symlinks into the git checkout
|
|
# under ${WORKDIR} — which resolve HERE inside the build (unlike on the host, where the same dist
|
|
# dangles). Dereference them (-L) into real files so the deviceroot bundler ships chrome; without
|
|
# them XPCOM registration fails and the daemon aborts on every start (u_init/XPCOMInit). The stray
|
|
# genuinely-dangling build artifact is tolerated and swept.
|
|
for d in chrome components defaults dictionaries hyphenation modules res; do
|
|
[ -d ${MOZ_OBJDIR}/dist/bin/$d ] || continue
|
|
cp -rL ${MOZ_OBJDIR}/dist/bin/$d ${ED}/bin/$d 2>/dev/null || true
|
|
find ${ED}/bin/$d -name '.mkdir.done' -delete 2>/dev/null || true
|
|
find ${ED}/bin/$d -xtype l -delete 2>/dev/null || true
|
|
find ${ED}/bin/$d -type d -empty -delete 2>/dev/null || true
|
|
done
|
|
[ -e ${MOZ_OBJDIR}/dist/bin/chrome.manifest ] && cp -L ${MOZ_OBJDIR}/dist/bin/chrome.manifest ${ED}/bin/ || true
|
|
cp -aL ${MOZ_OBJDIR}/dist/sdk/lib/*.a ${ED}/sdk/lib/
|
|
cp -rL ${MOZ_OBJDIR}/dist/include/. ${ED}/include/
|
|
# Strip the ~1.1G debug libxul to device size (dynsym kept so the daemon still links).
|
|
${JIHAD_TC}/bin/arm-webos-linux-gnueabi-strip --strip-debug ${ED}/bin/libxul.so
|
|
# plugin-container ships stripped too (~1.4M debug -> small); it dlopens nothing of its own.
|
|
[ -e ${ED}/bin/plugin-container ] && ${JIHAD_TC}/bin/arm-webos-linux-gnueabi-strip ${ED}/bin/plugin-container || true
|
|
}
|
|
# The engine libs are already built/stripped by us — don't let OE re-strip/split-debug them
|
|
# (it would run objcopy over the whole prebuilt dist).
|
|
INHIBIT_PACKAGE_STRIP = "1"
|
|
INHIBIT_PACKAGE_DEBUG_SPLIT = "1"
|
|
|
|
# Build-INPUT recipe: stages the engine dist to the sysroot for the daemon + deviceroot; emits no
|
|
# .ipk of its own (only the THREE UI products are packages — Mojo stopped being a skeleton on
|
|
# 2026-08-05, cavekit-mojo-ui.md). populate_sysroot still runs.
|
|
do_package[noexec] = "1"
|
|
do_packagedata[noexec] = "1"
|
|
do_package_qa[noexec] = "1"
|
|
do_package_write_ipk[noexec] = "1"
|
|
|
|
FILES_${PN} = "${datadir}/jihad-engine-dist"
|
|
INSANE_SKIP_${PN} = "already-stripped dev-so staticdev arch ldflags libdir"
|