The Flatpak workflow builds and tests bundles for x86_64 and aarch64 (openpu-cli runs, French catalog, icon, metainfo and gtkmm present). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WDASLCiN764v685boRVYar
6.8 KiB
OpenPU
A free and native client to download updates for Peugeot head units (NAC / RCC / AIO / Crony firmware, and navigation maps) and prepare the installation USB stick. It is an alternative to the official "Peugeot Update" application (Windows/macOS only), for Linux (GTK4) and Haiku (Interface Kit).
Independent project, not affiliated with Stellantis or Peugeot. The names mentioned are trademarks of their respective owners.
- Repository: https://github.com/yann64/openpu
- License: MIT
- Release history: CHANGELOG.md
Status
- Analysis of the existing application: see
docs/analysis/ - C++ core: VIN, Majestic API, resumable downloads, license, tar, settings, vehicles
- Linux USB support (UDisks2: listing, MBR + FAT32, mounting, ejecting) and writing the update
openpu-clicommand-line tool- GTK4 UI (Linux): complete workflow, preferences, new-version check
- Versioning (
--version, About dialog,vX.Y.Ztags, GitHub releases) - gettext translations (English, French)
- Haiku: core library, CLI and USB support (Storage Kit), validated in a Haiku R1/beta6 VM
- Haiku UI (Interface Kit): complete workflow, preferences, new-version check
- GitHub Actions continuous integration (Linux x86_64 + arm64)
- Linux packages: Debian package (
cpack -G DEB) and AppImage (tools/appimage.sh) Releaseworkflow:.deb, AppImage andopenpu-clitarball for x86_64 and arm64- Haiku package (
tools/haiku-package.sh) and HaikuPorts recipe template - Flatpak (
packaging/flatpak, bundles built by theFlatpakworkflow) - x86_64 + arm64 binaries attached to every release (from 1.0.0 on)
Architecture
src/core libopenpu: Majestic API, resumable downloads, tar, USB (UDisks2 / Haiku Storage Kit)
src/cli openpu-cli
src/ui-gtk gtkmm-4 user interface
src/ui-haiku BeAPI user interface
po/ translations (gettext)
Building (Linux / WSL)
sudo apt install build-essential cmake ninja-build pkg-config libcurl4-openssl-dev \
libarchive-dev nlohmann-json3-dev doctest-dev libglib2.0-dev libgtkmm-4.0-dev gettext \
valgrind clang-tidy cppcheck
cmake --preset debug -DOPENPU_UI_GTK=ON && cmake --build --preset debug && ctest --preset debug
../build-openpu/debug/src/ui-gtk/openpu # graphical interface
../build-openpu/debug/src/cli/openpu-cli --version
tools/check.sh # tests + ASan/UBSan + valgrind + clang-tidy + cppcheck
# end-to-end USB test on a loop image (packages udisks2 dosfstools mtools)
sudo tools/dev-polkit.sh install # WSL/CI only: polkit without an agent
tools/e2e-usb.sh ../build-openpu/debug/src/cli/openpu-cli --license X.key update.tar
When running from the build tree, OPENPU_LOCALEDIR=../build-openpu/debug/locale lets the
interface find its translations.
Packages (Linux)
cmake -S . -B build -G Ninja -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/usr -DOPENPU_UI_GTK=ON
cmake --build build && (cd build && cpack -G DEB) # build/openpu_<version>_<arch>.deb
tools/appimage.sh # ./OpenPU-<version>-<arch>.AppImage
The Debian package gets its dependencies from dpkg-shlibdeps and recommends udisks2, which
formats and mounts the USB stick. tools/appimage.sh downloads linuxdeploy and its GTK plugin
into ~/.cache/openpu-appimage.
The Release GitHub workflow builds the Debian package, the AppImage and a openpu-cli tarball
for x86_64 and arm64. On a vX.Y.Z tag it attaches them to the release, and a manual run keeps
them as workflow artifacts.
Flatpak: packaging/flatpak/io.github.openpu.OpenPU.yml uses the GNOME 51 runtime and builds the
gtkmm stack. It asks for the network, UDisks2 on the system bus (formatting the stick, through
polkit), the download folder and the stick mount points (/media, /run/media):
flatpak-builder --user --install --force-clean build-flatpak packaging/flatpak/io.github.openpu.OpenPU.yml
flatpak run io.github.openpu.OpenPU
The Flatpak workflow builds .flatpak bundles for x86_64 and aarch64, tests them, and attaches
them to the release of a vX.Y.Z tag. Install a bundle with
flatpak install --user OpenPU-<version>-<arch>.flatpak (the GNOME 51 runtime comes from Flathub).
Building (Haiku)
pkgman install cmake ninja curl_devel libarchive_devel nlohmann_json gettext gettext_libintl_devel
cmake -S . -B build -G Ninja && cmake --build build && build/tests/openpu_tests
OPENPU_LOCALEDIR=build/locale build/src/ui-haiku/OpenPU # graphical interface
build/src/cli/openpu-cli usb-list
Package: tools/haiku-package.sh builds openpu-<version>-1-x86_64.hpkg in the current
directory (application in apps/, openpu-cli in bin/, translations, Deskbar entry); install
it with pkgman install ./openpu-*.hpkg. GitHub has no Haiku runners, so the package is built in
the VM and attached to the release by hand. packaging/haiku/openpu.recipe is the template of the
HaikuPorts recipe, to fill in with the released version and its checksum.
tools/haiku-vm.sh installs and runs a Haiku R1/beta6 VM under QEMU/KVM (from WSL or Linux), with
a virtual USB stick; sync copies the working tree into it and ssh runs commands there.
Versioning
- The reference version is
project(openpu VERSION x.y.z)inCMakeLists.txt. On every build,git describeproduces the displayed description (for example0.2.0+3.g1a2b3c4.dirty). - A published version is an annotated
vX.Y.Ztag with a GitHub release, which the application checks to offer new versions.tools/release.sh X.Y.Zbumps the version, dates the CHANGELOG, commits, tags, pushes to every remote and creates the release.
Translations
Source strings are in English and translations use gettext (po/<language>.po), on Linux and on
Haiku: both interfaces share the same catalogs. On Haiku the default language is the first one of
the Locale preferences. To add a language:
- update the template with
cmake --build <build> --target pot, or withpython3 tools/extract_strings.py po/openpu.pot src/ui-gtk/main_window.cpp src/ui-haiku/main_window.cppif gettext is not installed; - copy
po/openpu.pottopo/<language>.poand translate it; - add the language to
po/LINGUASand to the language list of the Preferences window of both interfaces.
Tools
tools/make_icons.py: generates the application icon (original artwork, MIT like the rest of the project) from a single description:data/icons/openpu.svg, a simplified variant for 16 and 24 px,openpu.hviffor Haiku and PNG files from 16 to 512 px. Standard library only.tools/asar_extract.py: minimal, read-only asar extractor used to study the reference application. Extracted sources stay outside the repository.