Bake tippecanoe into the Raspberry Pi image (#537)

The Debian Live image builds tippecanoe at image time, but pi-gen did not,
so a fresh Pi compiled it on first boot/upgrade via install_protomaps.sh --
a multi-minute, CPU-heavy C++ build on the weakest hardware WROLPi targets.
This is the same "Debian bakes it, pi-gen doesn't" gap recently fixed for
the React app build.

Build tippecanoe 2.79.0 in the stage2 chroot, mirroring the Debian hook
(SHA-pinned source tarball, which is arch-independent). Add the two missing
build deps (libsqlite3-dev, zlib1g-dev) to the package list; build-essential
was already present.

With tippecanoe present at the pinned version, install_protomaps.sh's version
guard skips the build on first boot and on upgrades, so the on-device compile
only recurs when the pinned version actually bumps.

Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
lrnselfreliance 2026-07-15 15:48:25 -06:00 • committed by GitHub
parent 944d95c717
commit f621e0bd5c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 20 additions and 0 deletions

View file

@ -42,6 +42,7 @@ libgeos++-dev
libgeos-dev
libicu-dev
libproj-dev
libsqlite3-dev
libssl-dev
libtiff-dev
libtool
@ -73,3 +74,4 @@ vim
vlc
wget
zim-tools
zlib1g-dev

View file

@ -32,6 +32,24 @@ chmod +x /usr/local/bin/deno
rm /tmp/deno.zip
deno --version
# Build and bake in tippecanoe (used to build map search indexes). Without this
# the Pi compiles it on first boot/upgrade via scripts/install_protomaps.sh -- a
# multi-minute, CPU-heavy C++ build on weak hardware. The Debian Live image
# already bakes it in; this brings the Pi image to parity. Build deps
# (build-essential, libsqlite3-dev, zlib1g-dev) come from 01-packages-nr. Hash
# pinned to the source tarball (arch-independent) to detect upstream tampering.
TIPPECANOE_VERSION="2.79.0"
TIPPECANOE_SHA256="b0fd9df49b6efc988288ea48774822c6de19eb48428017f27ee0b3b01d44f05d"
TIPPECANOE_BUILD_DIR=$(mktemp -d)
curl -fsSL "https://github.com/felt/tippecanoe/archive/refs/tags/${TIPPECANOE_VERSION}.tar.gz" \
-o /tmp/tippecanoe.tar.gz
echo "${TIPPECANOE_SHA256} /tmp/tippecanoe.tar.gz" | sha256sum -c -
tar -xz -C "${TIPPECANOE_BUILD_DIR}" --strip-components=1 -f /tmp/tippecanoe.tar.gz
rm /tmp/tippecanoe.tar.gz
(cd "${TIPPECANOE_BUILD_DIR}" && make -j"$(nproc)" && make install)
rm -rf "${TIPPECANOE_BUILD_DIR}"
tippecanoe --version
# Put the latest WROLPi in /opt/wrolpi.
git clone -b "${WROLPI_BRANCH:-release}" https://github.com/lrnselfreliance/wrolpi.git /opt/wrolpi
# `git config --global` needs HOME, which is empty when the build runs under