diff --git a/.github/workflows/dietpi-software.bash b/.github/workflows/dietpi-software.bash index de03ad2f69..58d10d2d33 100644 --- a/.github/workflows/dietpi-software.bash +++ b/.github/workflows/dietpi-software.bash @@ -223,6 +223,7 @@ Process_Software() #207) Moonlight (CLI), "moonlight" command #208) Moonlight (GUI), "moonlight-qt" command 209) aCOMMANDS[i]='restic version';; + 211) aCOMMANDS[i]='hb-service status' aSERVICES[i]='homebridge' aTCP[i]='8581'; (( $arch < 10 )) && aDELAY[i]=30; (( $arch == 3 )) && aDELAY[i]=120;; *) :;; esac done @@ -322,11 +323,12 @@ for i in $SOFTWARE; do G_CONFIG_INJECT "AUTO_SETUP_INSTALL_SOFTWARE_ID=$i" "AUTO # Workaround for "Could not execute systemctl: at /usr/bin/deb-systemd-invoke line 145." during Apache2 DEB postinst in 32-bit ARM Bookworm container: https://lists.ubuntu.com/archives/foundations-bugs/2022-January/467253.html G_CONFIG_INJECT 'AUTO_SETUP_WEB_SERVER_INDEX=' 'AUTO_SETUP_WEB_SERVER_INDEX=-2' rootfs/boot/dietpi.txt -# Workaround for failing Redis, Raspotify and Navidrome as PrivateUsers=true leads to "Failed to set up user namespacing" on QEMU-emulated 32-bit ARM containers -G_EXEC mkdir rootfs/etc/systemd/system/{redis-server,raspotify,navidrome}.service.d +# Workaround for failing servkces as PrivateUsers=true leads to "Failed to set up user namespacing" on QEMU-emulated 32-bit ARM containers, and AmbientCapabilities to "Failed to apply ambient capabilities (before UID change): Operation not permitted" +G_EXEC mkdir rootfs/etc/systemd/system/{redis-server,raspotify,navidrome,homebridge}.service.d G_EXEC eval 'echo -e '\''[Service]\nPrivateUsers=0'\'' > rootfs/etc/systemd/system/redis-server.service.d/dietpi-container.conf' G_EXEC eval 'echo -e '\''[Service]\nPrivateUsers=0'\'' > rootfs/etc/systemd/system/raspotify.service.d/dietpi-container.conf' G_EXEC eval 'echo -e '\''[Service]\nPrivateUsers=0'\'' > rootfs/etc/systemd/system/navidrome.service.d/dietpi-container.conf' +G_EXEC eval 'echo -e '\''[Service]\nAmbientCapabilities='\'' > rootfs/etc/systemd/system/homebridge.service.d/dietpi-container.conf' # Workarounds for failing MariaDB install on Buster within GitHub Actions runner (both cannot be replicated on my test systems with and without QEMU): # - mysqld does not have write access if our symlink is in place, even that directory permissions are correct. @@ -384,7 +386,7 @@ _EOF_ done # Check commands [[ ${aCOMMANDS[i]} ]] && cat << _EOF_ >> rootfs/boot/Automation_Custom_Script.sh -echo '\e[33m[ INFO ] Testing command ${aCOMMANDS[i]}:\e[0m' +echo '\e[33m[ INFO ] Testing command "${aCOMMANDS[i]}":\e[0m' ${aCOMMANDS[i]} || { echo '\e[31m[FAILED] Command returned error code\e[0m'; exit_code=1; } _EOF_ G_EXEC eval 'echo fi >> rootfs/boot/Automation_Custom_Script.sh' diff --git a/.meta/dietpi-survey_report b/.meta/dietpi-survey_report index 6a974d0d90..9b913ce29b 100755 --- a/.meta/dietpi-survey_report +++ b/.meta/dietpi-survey_report @@ -679,6 +679,7 @@ shopt -s extglob do aSOFTWARE_NAME8_20[i]=${aSOFTWARE_NAME8_19[i]} done + aSOFTWARE_NAME8_20[211]='Homebridge' # Pre-create software counter array so that we can see also software (available in newest version) with 0 installs for i in "${aSOFTWARE_NAME8_20[@]}" diff --git a/CHANGELOG.txt b/CHANGELOG.txt index 6567d378a8..a620bb268b 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -1,6 +1,9 @@ v8.20 (2023-07-29) +New software: +- Homebridge | Bringing HomeKit support where there is none. Many thanks to @Zer0x00 for implementing it: https://github.com/MichaIng/DietPi/pull/6493 + Enhancements: - DietPi-LetsEncrypt | Updated the Lighttpd SSL config syntax and options according to latest Mozilla SSL config generator recommendation with intermediate client compatibility. Many thanks to @JappeHallunken for implementing this enhancement: https://github.com/MichaIng/DietPi/pull/6481 - DietPi-Software | WiFi Hotspot: The default DHCP server settings have been cleaned up and enhanced, with the default lease time increased from 10 minutes to 12 hours, the max lease time increased from 2 hours to 1 day, and the IP range extended up to 192.168.42.250. diff --git a/README.md b/README.md index 2bd5b6aaea..a30c71f33d 100644 --- a/README.md +++ b/README.md @@ -336,6 +336,7 @@ Links to hardware and software manufacturers, sources and build instructions use - [Moonlight (GUI)](https://github.com/moonlight-stream/moonlight-qt) - [Restic](https://github.com/restic/restic) - [MediaWiki](https://github.com/wikimedia/mediawiki) +- [Homebridge](https://github.com/homebridge/homebridge) --- diff --git a/dietpi/dietpi-services b/dietpi/dietpi-services index ab7d828a8d..d8e5f558b5 100755 --- a/dietpi/dietpi-services +++ b/dietpi/dietpi-services @@ -243,6 +243,7 @@ _EOF_ 'home-assistant' 'domoticz' 'openhab' + 'homebridge' # - Network 'noip2' diff --git a/dietpi/dietpi-software b/dietpi/dietpi-software index 35d4b8ff79..5e28d7d88f 100755 --- a/dietpi/dietpi-software +++ b/dietpi/dietpi-software @@ -1545,6 +1545,15 @@ Available commands: aSOFTWARE_DEPS[$software_id]='196' # - ARMv6: Requires at least Java 11 aSOFTWARE_AVAIL_G_HW_ARCH[$software_id,1]=0 + #------------------ + software_id=211 + aSOFTWARE_NAME[$software_id]='Homebridge' + aSOFTWARE_DESC[$software_id]='Bringing HomeKit support where there is none' + aSOFTWARE_CATX[$software_id]=17 + aSOFTWARE_DOCS[$software_id]='https://dietpi.com/docs/software/home_automation/#homebridge' + # - RISC-V: Missing packages: https://repo.homebridge.io/dists/stable/Release + aSOFTWARE_AVAIL_G_HW_ARCH[$software_id,11]=0 + #------------------ # Printing #-------------------------------------------------------------------------------- @@ -11707,6 +11716,20 @@ _EOF_ G_EXEC mv mediawiki-* /var/www/wiki fi + if To_Install 211 homebridge # Homebridge + then + # APT key + local url='https://repo.homebridge.io/KEY.gpg' + G_CHECK_URL "$url" + G_EXEC eval "curl -sSfL '$url' | gpg --dearmor -o /etc/apt/trusted.gpg.d/dietpi-homebridge.gpg --yes" + + # APT list + G_EXEC eval 'echo '\''deb https://repo.homebridge.io stable main'\'' > /etc/apt/sources.list.d/dietpi-homebridge.list' + G_AGUP + + G_AGI homebridge + fi + if To_Install 205 # Homer then # Download the latest release @@ -14123,6 +14146,15 @@ _EOF_ Remove_Database mediawiki fi + if To_Uninstall 211 # Homebridge + then + Remove_Service homebridge + G_AGP homebridge + + [[ -f '/etc/apt/sources.list.d/dietpi-homebridge.list' ]] && G_EXEC rm /etc/apt/sources.list.d/dietpi-homebridge.list + [[ -f '/etc/apt/trusted.gpg.d/dietpi-homebridge.gpg' ]] && G_EXEC rm /etc/apt/trusted.gpg.d/dietpi-homebridge.gpg + fi + if To_Uninstall 198 # File Browser then Remove_Service filebrowser 1