diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index cf89da9..78a08bd 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -218,7 +218,12 @@ jobs: echo "**Platform:** ${{ matrix.platform }}" >> $GITHUB_STEP_SUMMARY echo "**Base Image:** ${{ matrix.os-image }}" >> $GITHUB_STEP_SUMMARY echo "" >> $GITHUB_STEP_SUMMARY - echo "✓ System packages: python3-gi, python3-dbus, python3-cairo, bluez" >> $GITHUB_STEP_SUMMARY + if [[ "${{ matrix.platform }}" == "linux/arm/v7" ]]; then + echo "✓ System packages: python3-gi, python3-dbus, python3-cairo, bluez, libffi-dev" >> $GITHUB_STEP_SUMMARY + echo "✓ libffi-dev included for 32-bit ARM cffi compilation" >> $GITHUB_STEP_SUMMARY + else + echo "✓ System packages: python3-gi, python3-dbus, python3-cairo, bluez" >> $GITHUB_STEP_SUMMARY + fi echo "✓ Pip packages: bleak==1.1.1, bluezero" >> $GITHUB_STEP_SUMMARY echo "✓ BLE interface files copied" >> $GITHUB_STEP_SUMMARY echo "✓ BlueZ experimental mode configured" >> $GITHUB_STEP_SUMMARY diff --git a/install.sh b/install.sh index afd7e3d..6616468 100755 --- a/install.sh +++ b/install.sh @@ -266,14 +266,28 @@ print_header "Installing System Dependencies" if command -v apt-get &> /dev/null; then # Debian/Ubuntu/Raspberry Pi OS print_info "Detected Debian/Ubuntu-based system" - echo "Installing: python3-pip python3-gi python3-dbus python3-cairo bluez libcap2-bin libffi-dev" + + # Detect architecture for platform-specific dependencies + ARCH=$(dpkg --print-architecture 2>/dev/null || echo "unknown") + PACKAGES="python3-pip python3-gi python3-dbus python3-cairo bluez libcap2-bin" + + # Add libffi-dev only for 32-bit ARM (armhf) - needed for cffi compilation + # x86_64 and arm64 have pre-built cffi wheels available + if [[ "$ARCH" == "armhf" ]]; then + PACKAGES="$PACKAGES libffi-dev" + echo "Installing: $PACKAGES" + print_info "Note: Including libffi-dev for 32-bit ARM cffi compilation" + else + echo "Installing: $PACKAGES" + fi + # Use sudo only if not running as root if [ "$EUID" -eq 0 ]; then apt-get update - apt-get install -y python3-pip python3-gi python3-dbus python3-cairo bluez libcap2-bin libffi-dev + apt-get install -y $PACKAGES else sudo apt-get update - sudo apt-get install -y python3-pip python3-gi python3-dbus python3-cairo bluez libcap2-bin libffi-dev + sudo apt-get install -y $PACKAGES fi print_success "System dependencies installed (using pre-compiled system packages)" elif command -v pacman &> /dev/null; then diff --git a/tests/test_installer.sh b/tests/test_installer.sh index 4030a48..5e5916e 100755 --- a/tests/test_installer.sh +++ b/tests/test_installer.sh @@ -205,7 +205,14 @@ echo "Installation summary:" echo " • install.sh is fully self-contained (handles all prerequisites)" echo " • Reticulum Network Stack: installed via pip" if [ "$OS_TYPE" = "debian" ]; then - echo " • System packages: python3, python3-pip, git, python3-gi, python3-dbus, python3-cairo, bluez, libffi-dev" + # Detect architecture for platform-specific package list + ARCH=$(dpkg --print-architecture 2>/dev/null || echo "unknown") + if [[ "$ARCH" == "armhf" ]]; then + echo " • System packages: python3, python3-pip, git, python3-gi, python3-dbus, python3-cairo, bluez, libffi-dev" + echo " • Note: libffi-dev included for 32-bit ARM cffi compilation" + else + echo " • System packages: python3, python3-pip, git, python3-gi, python3-dbus, python3-cairo, bluez" + fi echo " • Pip packages: rns, bleak, bluezero" echo " • Install method: System packages (no compilation)" echo " • Installation time: < 1 minute"