Skip to content

Arch linux support#53

Open
bpoteet wants to merge 8 commits intosunfounder:mainfrom
bpoteet:arch-linux-support
Open

Arch linux support#53
bpoteet wants to merge 8 commits intosunfounder:mainfrom
bpoteet:arch-linux-support

Conversation

@bpoteet
Copy link

@bpoteet bpoteet commented Feb 27, 2026

Summary

The pironman5 installer unconditionally uses apt-get, which is not available on
Arch-based systems (Arch Linux ARM, Manjaro ARM, EndeavourOS ARM). This PR adds
distro detection and pacman-based installation paths so pironman5 can be installed
on Arch/Manjaro alongside the existing Debian/Ubuntu support.

Changes

  • tools/sf_installer.py — Add get_pkg_manager() detection method,
    PACMAN_DEPENDENCIES and PACMAN_DEP_MAP class attributes, and branch
    install_build_dep() and install_apt_dep() on distro
  • scripts/install_lgpio.sh — Add pacman build dependency path; skip apt
    fast-path on Arch (no pre-built package available); register /usr/local/lib
    with dynamic linker so liblgpio.so.1 is findable at runtime
  • scripts/setup_influxdb.sh — Skip Debian APT repo/GPG key setup on Arch;
    influxdb is available directly via pacman -S influxdb
  • pironman5/init.py — Branch influxdb purge on distro; use
    pacman -Rns --noconfirm as equivalent of apt-get purge
  • README.md — Add Arch/Manjaro prerequisites section alongside existing
    Debian/Ubuntu instructions

Test Environment

  • Hardware: Raspberry Pi 5 with NVMe SSD (Pironman5 case)
  • OS: Arch Linux ARM aarch64 (vanilla, not Manjaro)
  • Kernel: linux-rpi 6.18.x

Test Results

  • ✅ Full install — all packages installed cleanly via pacman
  • ✅ Service starts and runs — screen, LEDs, fan control working
  • ✅ Dashboard removal — pacman -Rns influxdb works correctly
  • ✅ Full uninstall — clean removal

Notes

  • python3-gpiozero has no official Arch repo equivalent (AUR only); skipped
    with warning since gpiozero is installed via pip into the venv
  • python3-dev is bundled in Arch's python package; skipped with warning
  • Package name mappings are maintained in PACMAN_DEP_MAP in
    tools/sf_installer.py — update this dict if dependencies change
  • wait_for_dpkg.sh requires no changes — it exits cleanly on Arch since dpkg
    lock files do not exist

- Add get_pkg_manager() method using shutil.which()
- Add PACMAN_DEPENDENCIES and PACMAN_DEP_MAP class attributes
- Branch install_build_dep() and install_apt_dep() on pkg manager
- Map apt package names to pacman equivalents
- Skip unmapped packages with warning on Arch
- Add package manager detection (apt-get vs pacman)
- Skip apt fast-path on Arch (no pacman equivalent for liblgpio-dev)
- Add pacman build dependency path for source compilation
- python3-dev bundled in python, python3-setuptools -> python-setuptools
- Source compilation path unchanged (distro-agnostic)
- Add package manager detection (apt-get vs pacman)
- Wrap entire Debian APT repo/GPG key setup in apt branch
- Skip repo setup on Arch — influxdb available directly via pacman
- Add comments explaining why the skip is safe
- Import shutil alongside existing os import
- Branch apt-get purge on distro detection
- Use pacman -Rns as equivalent of apt-get purge on Arch
- -Rns: remove package, drop config files, remove unneeded deps
- Label existing apt block as Debian/Ubuntu for clarity
- Add Arch/Manjaro prerequisites block with pacman commands
- Note base-devel and swig required for lgpio source compilation
python-gpiozero is not in official Arch repos (AUR only).
gpiozero is installed via pip into the venv so the system
package is not required on Arch. Falls through to skip-with-warning.
/usr/local/lib is not in Arch's default linker search path unlike
Debian. Add /etc/ld.so.conf.d/lgpio.conf before ldconfig so
liblgpio.so.1 is findable at runtime after source compilation.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant