How thetorproject/lepidopter works
Project type and purpose
• Lepidopter is an open-source image-building tool.
• It automates creation of a Raspberry Pi (armel) Debian Jessie SD-card image pre-configured with OONI Probe and an auto-updater.
File structure
• Top-level “scripts/” and “lepidopter-vmdebootstrap_build.sh” implement the build logic.
• “conf/” (lepidopter-image.conf, tor-pt.conf) defines the build-time configuration.
• “pkglist/” lists OS and Python packages to install.
• “lepidopter-fh/” is a complete filesystem hierarchy template (boot/, etc/, opt/, usr/, var/) used to assemble the rootfs.
• “images/” is where the final .img(.xz) artifacts land.
• Sign-and-release scripts under “scripts/” handle packaging and distribution.
• Build depends on external tool vmdebootstrap and standard Unix tooling (bash, dd, xz, bmaptool).
README for additional insights
• The build is driven by vmdebootstrap + shell wrappers (setup.sh, customize, cleanup).
• Runtime on-device services: Avahi (mDNS), systemd units (ooniprobe, lepidopter-update), cron jobs, logrotate, sshd.
• OONI Probe runs a local web UI on port 80; updater.py (Python) pulls and applies signed updates.
Detail
• Every directory or file group that influences the build (conf/, pkglist/, lepidopter-fh/, customize, cleanup).
• Systemd units and runtime jobs (cron, logrotate, watchdog).
• External dependencies (vmdebootstrap, network, update server).
• Critical config files (e.g., tor-pt.conf for Tor bridges, ooniprobe.conf).