diff --git a/CHANGELOG.txt b/CHANGELOG.txt index 894e8d1e64..8e932426e5 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -14,6 +14,8 @@ Changes / Improvements / Optimisations: - DietPi-Software | Home Assistant: Vastly reduced Home Assistant dependencies and install complexity. It does not run inside a virtualenv of pyenv anymore, since it has already its unique pyenv Python instance. pyenv is still required due to the large amount of specific module versions, required for HA and its integrations. The alternative would be a venv from a globally installed Python instance, but this requires further thoughts and discussion. The amount of development libraries and tools, installed via APT, has been updated and reduced to a minimum to build Python and Home Assistant inside the pyenv without errors and warnings. There is a slightly increased chance that certain HA components need additional development packages. To cover this, two new settings have been added to dietpi.txt: "SOFTWARE_HOMEASSISTANT_APT_DEPS" and "SOFTWARE_HOMEASSISTANT_PIP_DEPS". Add a space-separated list of APT packages and pip modules respectively, to have those installed automatically with Home Assistant. As well activating the pyenv environment from console is now easier possible via "source /home/homeassistant/pyenv-activate.sh" as user "homeassistant". - DietPi-Software | Node-RED: Access permissions to I2C is now enabled by default on RPi and other SBCs which ship a configured "i2c" group by default. Many thanks to @NastySpill for reporting an underlying issue: https://dietpi.com/phpbb/viewtopic.php?f=11&t=6862 - DietPi-Software | Gitea: The latest version will now be pulled from GitHub automatically. +- DietPi-Software | Amiberry: Updated to v3.0.4, a large update from v2.25 with many improvements, see: https://github.com/midwan/amiberry/releases +- DietPi-Software | Amiberry: Since we ship a tailored SDL2 version, this has now been merged right into the Amiberry download archive and install directory, to not interfere with other system-wide installed SDL2 instances. Bug Fixes: - DietPi-PREP | Resolved an issue, where in rare cases a wrong $PATH variable could break command calls. Many thanks to @dtm2001 for reporting this issue: https://github.com/MichaIng/DietPi/issues/3206 @@ -31,6 +33,7 @@ Bug Fixes: - DietPi-Software | Pi-hole: Resolved an issue where choosing to block public admin panel access on Nginx failed. Many thanks to @anubis-genix for reporting this issue: https://github.com/MichaIng/DietPi/issues/3024#issuecomment-550342684 - DietPi-Software | Java: Resolved an issue where install on ARMv6 RPis (1/Zero) on Buster system failed, since Java 11 is not ARMv6-compatible. On these system, Java 8 is now installed instead. Many thanks to @maartenlangeveld for reporting this issue: https://github.com/MichaIng/DietPi/issues/3182 - DietPi-Software | ruTorrent: Resolved an issue where rTorrent and the webserver didn't have sufficient permissions to read and write ruTorrent web UI settings and data. Many thanks to @notDavid for reporting this issue: https://github.com/MichaIng/DietPi/issues/3244 +- DietPi-Software | Amiberry: Resolved an issue where the binary fails to execute on Odroid XU4. Many thanks to @wasu111 for reporting this issue: https://github.com/MichaIng/DietPi/issues/3181 As always, many smaller code performance and stability improvements, visual and spelling fixes have been done, too much to list all of them here. Check out all code changes of this release on GitHub: https://github.com/MichaIng/DietPi/pull/XXXX diff --git a/dietpi/dietpi-software b/dietpi/dietpi-software index faf37eaaad..379638d56a 100644 --- a/dietpi/dietpi-software +++ b/dietpi/dietpi-software @@ -3745,80 +3745,59 @@ _EOF_ Banner_Installing - # Pre-reqs - DEPS_LIST='libmpg123-0 libxml2' - - # For Stretch, SDL2 was compiled with X11 + libsndio support and dependency - if (( $G_DISTRO < 5 )); then + # Libraries + DEPS_LIST='libxml2 libfreetype6 libflac8 libmpeg2-4 libmpg123-0' # libpng16-16 pulled by libfreetype6 - DEPS_LIST+=' mpeg2dec libsndio6.1' # libmpeg2-4 - - # ARMv6 - if (( $G_HW_ARCH == 1 )); then - - INSTALL_URL_ADDRESS='https://dietpi.com/downloads/binaries/all/sdl2-armv6_stretch.7z' - - # ARMv7 FKMS: ./configure --disable-video-rpi --enable-video-kmsdrm - elif (( $G_HW_ARCH == 2 )); then - - INSTALL_URL_ADDRESS='https://dietpi.com/downloads/binaries/all/sdl2-armv7_stretch.7z' - - # RPi 2/3 Enable fkms OpenGL - (( $G_HW_MODEL < 10 )) && /DietPi/dietpi/func/dietpi-set_hardware rpi-opengl vc4-fkms-v3d - - fi - - Download_Install "$INSTALL_URL_ADDRESS" sdl2 - dpkg -i sdl2/*.deb - rm -R sdl2 - - # For Buster, SDL2 was compiled with minimum dependencies: No X11 required, thus GPU drivers and some libraries need to be installed/enabled separately - else + # Platform and GPU drivers + # - RPi + if (( $G_HW_MODEL < 10 )); then - # Libraries - DEPS_LIST+=' libxml2 libfreetype6 libflac8 libmpeg2-4' # libpng16-16 + local platform='rpi1' # Include ID -1 + 0 + (( $G_HW_MODEL > 1 )) && platform="rpi$G_HW_MODEL" + (( $G_DISTRO > 4 )) && DEPS_LIST+=' libegl1' || DEPS_LIST+=' libegl1-mesa' + /DietPi/dietpi/func/dietpi-set_hardware rpi-opengl vc4-fkms-v3d - # GPU drivers - # - RPi - if (( $G_HW_MODEL < 10 )); then + # - Odroid XU4: http://fuzon.co.uk/meveric/pool/main/s/setup-odroid/ + elif (( $G_HW_MODEL == 11 )); then - DEPS_LIST+=' libegl1' - /DietPi/dietpi/func/dietpi-set_hardware rpi-opengl vc4-fkms-v3d + local platform='xu4' + DEPS_LIST+=' malit628-odroid' - # - Odroid XU4: http://fuzon.co.uk/meveric/pool/main/s/setup-odroid/ - elif (( $G_HW_MODEL == 11 )); then + # - ASUS TB: https://github.com/rockchip-linux/rk-rootfs-build/tree/master/packages/armhf + elif (( $G_HW_MODEL == 52 )); then - DEPS_LIST+=' malit628-odroid' + local platform='RK3288' + # Mali-T760 driver libraries + Download_Install 'https://dietpi.com/downloads/binaries/asus/libmali.deb' + cd /usr/lib/arm-linux-gnueabihf + ln -sf libMali.so libEGL.so.1.1.0 + ln -sf libMali.so libEGL.so + ln -sf libMali.so libEGL.so.1.0.0 + ln -sf libMali.so libEGL.so.1.4 + ln -sf libMali.so libGLESv2.so + ln -sf libMali.so libGLESv2.so.2.0 + ln -sf libMali.so libGLESv2.so.2.0.0 + ln -sf libMali.so libGLESv1_CM.so + ln -sf libMali.so libGLESv1_CM.so.1 + ln -sf libMali.so libGLESv1_CM.so.1.1 + cd /tmp/$G_PROGRAM_NAME - # - ASUS TB: https://github.com/rockchip-linux/rk-rootfs-build/tree/master/packages/armhf - elif (( $G_HW_MODEL == 52 )); then + fi - # Mali-T760 driver libraries - Download_Install 'https://dietpi.com/downloads/binaries/asus/libmali.deb' - cd /usr/lib/arm-linux-gnueabihf - ln -sf libMali.so libEGL.so.1.1.0 - ln -sf libMali.so libEGL.so - ln -sf libMali.so libEGL.so.1.0.0 - ln -sf libMali.so libEGL.so.1.4 - ln -sf libMali.so libGLESv2.so - ln -sf libMali.so libGLESv2.so.2.0 - ln -sf libMali.so libGLESv2.so.2.0.0 - ln -sf libMali.so libGLESv1_CM.so - ln -sf libMali.so libGLESv1_CM.so.1 - ln -sf libMali.so libGLESv1_CM.so.1.1 - cd /tmp/$G_PROGRAM_NAME + # Download Amiberry + Download_Install "https://dietpi.com/downloads/binaries/$G_DISTRO_NAME/amiberry_$platform.tar.bz2" - fi + # Reinstall: Backup old instance + [[ -d $G_FP_DIETPI_USERDATA/amiberry ]] && G_RUN_CMD mv $G_FP_DIETPI_USERDATA/amiberry $G_FP_DIETPI_USERDATA/amiberry_bak - # libSDL2 - Download_Install "https://dietpi.com/downloads/binaries/$G_DISTRO_NAME/libSDL2_$G_HW_ARCH_DESCRIPTION.tar.bz2" /usr/local/lib + # Reinstall: Restore old configs and data + [[ -d $G_FP_DIETPI_USERDATA/amiberry_bak ]] && G_RUN_CMD cp -a $G_FP_DIETPI_USERDATA/amiberry_bak/{conf,kickstarts,savestates,screenshots} amiberry/ - fi + # Move new instance in place + G_RUN_CMD mv amiberry $G_FP_DIETPI_USERDATA/ - # Amiberry - # - Backup existing autostart.uae for user - G_BACKUP_FP $G_FP_DIETPI_USERDATA/amiberry/conf/autostart.uae - Download_Install 'https://dietpi.com/downloads/binaries/all/amiberry_v2.25.7z' $G_FP_DIETPI_USERDATA + # Reinstall: Remove old instance + [[ -d $G_FP_DIETPI_USERDATA/amiberry_bak ]] && rm -R $G_FP_DIETPI_USERDATA/amiberry_bak fi @@ -8402,92 +8381,23 @@ _EOF_ Banner_Configuration - # Assume RPi1/Zero (ARMv6) - local amiberry_filename='amiberry-rpi1-sdl2-dispmanx' - local capsimg_filename='capsimg-rpi.so' - - # ASUS TB - if (( $G_HW_MODEL == 52 )); then - - amiberry_filename='amiberry-tinker' - capsimg_filename='capsimg-tinker.so' - - # XU4 - elif (( $G_HW_MODEL == 11 )); then - - amiberry_filename='amiberry-xu4' - capsimg_filename='capsimg-xu4.so' - - # RPi4 - elif (( $G_HW_MODEL == 4 )); then - - amiberry_filename='amiberry-rpi4-sdl2-dispmanx' - - # RPi3 - elif (( $G_HW_MODEL == 3 )); then - - amiberry_filename='amiberry-rpi3-sdl2-dispmanx' - - # RPi2 - elif (( $G_HW_MODEL == 2 )); then - - amiberry_filename='amiberry-rpi2-sdl2-dispmanx' - - fi - - # Update executable and capsimg.so - mv "$G_FP_DIETPI_USERDATA/amiberry/$amiberry_filename" $G_FP_DIETPI_USERDATA/amiberry/amiberry - mv "$G_FP_DIETPI_USERDATA/amiberry/$capsimg_filename" $G_FP_DIETPI_USERDATA/amiberry/capsimg.so - rm $G_FP_DIETPI_USERDATA/amiberry/{amiberry,capsimg}-* - - # Create additional user media directories - mkdir -p $G_FP_DIETPI_USERDATA/amiberry/{floppy_images,hdf,cd} - - # Remove obsolete and old config file to allow Amiberry recreating it: https://github.com/midwan/amiberry/releases/tag/v2.25 + # Reinstall: Remove obsolete and old config file to allow Amiberry recreating it: https://github.com/midwan/amiberry/releases/tag/v2.25 [[ -f $G_FP_DIETPI_USERDATA/amiberry/conf/adfdir.conf ]] && rm $G_FP_DIETPI_USERDATA/amiberry/conf/adfdir.conf [[ -f $G_FP_DIETPI_USERDATA/amiberry/conf/amiberry.conf ]] && rm $G_FP_DIETPI_USERDATA/amiberry/conf/amiberry.conf - # Uae4arm does not support browsing symlinks: https://github.com/MichaIng/DietPi/issues/474#issuecomment-242973839 - # - So we need to change config file default paths to actual userdata location - if [[ -L $G_FP_DIETPI_USERDATA ]]; then - - local fp_userdata_actual=$(readlink -f $G_FP_DIETPI_USERDATA) - sed -i "s:$G_FP_DIETPI_USERDATA:$fp_userdata_actual:g" $G_FP_DIETPI_USERDATA/amiberry/conf/autostart.uae - - fi - - # Service - # - On Stretch Asus TB we need to start it as X11 session - local xinit_start='' - (( $G_HW_MODEL == 52 && $G_DISTRO < 5 )) && xinit_start="$(command -v xinit) " - cat << _EOF_ > /etc/systemd/system/amiberry.service [Unit] Description=Amiberry Amiga Emulator (DietPi) [Service] -#StandardOutput=tty -#StandardInput=tty -#TTYPath=/dev/tty1 -#TTYReset=yes -#TTYVHangup=yes WorkingDirectory=$G_FP_DIETPI_USERDATA/amiberry -ExecStart=$xinit_start$G_FP_DIETPI_USERDATA/amiberry/amiberry -f $G_FP_DIETPI_USERDATA/amiberry/conf/autostart.uae +Environment=LD_LIBRARY_PATH=$G_FP_DIETPI_USERDATA/amiberry/lib +ExecStart=$G_FP_DIETPI_USERDATA/amiberry/amiberry [Install] WantedBy=local-fs.target _EOF_ - # Start script - cat << _EOF_ > $G_FP_DIETPI_USERDATA/amiberry/run.sh -#!/bin/dash -cd $G_FP_DIETPI_USERDATA/amiberry -./amiberry -f conf/autostart.uae -_EOF_ - - # Execute permissions - chmod +x $G_FP_DIETPI_USERDATA/amiberry/{amiberry,run.sh} - fi software_id=112 # DDX-Rebirth @@ -13903,8 +13813,6 @@ _EOF_ [[ -d $G_FP_DIETPI_USERDATA/amiberry ]] && rm -R $G_FP_DIETPI_USERDATA/amiberry # Autostart index: If currently Amiberry, revert to console login [[ -f '/DietPi/dietpi/.dietpi-autostart_index' && $( /etc/armbian-release @@ -1235,7 +1235,7 @@ _EOF_ fi #------------------------------------------------------------------------------- - #rpi-update drop support info + # rpi-update drop support info if command -v rpi-update &> /dev/null && G_WHIP_YESNO '[INFO] RPi-Update detected\n\nIn our effort to improve system stability, and, offer software installations which build custom modules (eg: WireGuard), we can no longer support systems with non-stock-APT kernel installed (eg: rpi-update).\n\nWould you like to revert to the APT kernel now, ensuring stability and official DietPi system support?'; then local rpi_firmware='raspberrypi-bootloader raspberrypi-kernel libraspberrypi-bin libraspberrypi0' @@ -1246,7 +1246,7 @@ _EOF_ fi #------------------------------------------------------------------------------- - #Apply Nginx vhost patch: https://github.com/MichaIng/DietPi/pull/2327 + # Apply Nginx vhost patch: https://github.com/MichaIng/DietPi/pull/2327 # - Moved from v6.18 => v6.19 patch for users, which update directly from v6.19.5 to v6.20 grep -q 'include /etc/nginx/sites-dietpi/\*\.config;' /etc/nginx/sites-available/default &> /dev/null && G_CONFIG_INJECT 'include /etc/nginx/sites-dietpi/\*\.config;' 'include /etc/nginx/sites-dietpi/*.conf;' /etc/nginx/sites-available/default #------------------------------------------------------------------------------- @@ -1273,12 +1273,12 @@ _EOF_ # NAA Daemon: https://github.com/MichaIng/DietPi/issues/2387#issue-395321320 # MPD: https://github.com/MichaIng/DietPi/issues/2377 # Samba: https://github.com/MichaIng/DietPi/issues/2396#issuecomment-451701569 - # Amiberry 2.24 + # v6.27 Amiberry 2.24 # Shairport Sync: https://github.com/MichaIng/DietPi/issues/2439 # v6.27 Grafana: https://github.com/MichaIng/DietPi/issues/2449 if (( $G_DIETPI_INSTALL_STAGE == 2 )); then - /DietPi/dietpi/dietpi-software reinstall 37 65 108 124 128 131 + /DietPi/dietpi/dietpi-software reinstall 37 65 124 128 131 # Samba: Link disk cache to RAM: https://github.com/MichaIng/DietPi/issues/2396 if grep -q '^aSOFTWARE_INSTALL_STATE\[96\]=2' /DietPi/dietpi/.installed; then @@ -1517,13 +1517,13 @@ Redirect permanent /ocs-provider /nextcloud/ocs-provider' >> /etc/apache2/sites- fi #------------------------------------------------------------------------------- # Reinstalls - # Amiberry 2.25: https://github.com/MichaIng/DietPi/issues/2599 + # v6.27 Amiberry 2.25: https://github.com/MichaIng/DietPi/issues/2599 # Allo GUI v13: https://github.com/sparky-sbc/sparky-test/tree/master/dietpi-gui-usbdebug # Deluge: Patch according to installer rework: https://github.com/MichaIng/DietPi/pull/2594 # rTorrent: https://github.com/MichaIng/DietPi/issues/2629 if (( $G_DIETPI_INSTALL_STAGE == 2 )); then - local reinstall_indices='108 160' + local reinstall_indices='160' if grep -q '^aSOFTWARE_INSTALL_STATE\[107\]=2' /DietPi/dietpi/.installed && [[ -f '/root/.rtorrent.rc' ]]; then @@ -2198,11 +2198,12 @@ Would you like to switch back to the Nginx authentication method now?' && certbo # Remove microcode packages from VM, where they are and must be without effect (( $G_HW_MODEL == 20 )) && G_AGP {intel,amd64}-microcode && G_AGA #------------------------------------------------------------------------------- - # Remove obsolete files that could have remained on older systems - rm -Rf /{DietPi,boot}/dietpi/{server_version*,login} /boot/dietpi/patch_file + G_DIETPI-NOTIFY 2 'Removing obsolete DietPi files that could have remained on older systems...' + rm -vRf /{DietPi,boot}/dietpi/{server_version*,login} /boot/dietpi/patch_file #------------------------------------------------------------------------------- # Mask ARMbian services, which are otherwise re-enabled on related APT package upgrade local packages=$(dpkg-query -Wf '${PACKAGE}\n' linux-*-root-* 2> /dev/null) + [[ $packages ]] && G_DIETPI-NOTIFY 2 'Masking and removing conflicting ARMbian services and files...' for i in $packages do @@ -2213,22 +2214,22 @@ Would you like to switch back to the Nginx authentication method now?' && certbo done # Place DPKG exclude file, especially to skip cron jobs, which are doomed to fail and an unnecessary overhead + syslog spam on DietPi - rm -f /etc/apt/apt.conf.d/*armbian* - rm -f /etc/cron.*/*armbian* - #rm -f /etc/default/*armbian* - rm -f /etc/update-motd.d/*armbian* - rm -f /etc/profile.d/*armbian* - #[[ -d '/usr/lib/armbian' ]] && rm -R /usr/lib/armbian - [[ -d '/usr/share/armbian' ]] && rm -R /usr/share/armbian + rm -vf /etc/apt/apt.conf.d/*armbian* + rm -vf /etc/cron.*/*armbian* + #rm -vf /etc/default/*armbian* + rm -vf /etc/update-motd.d/*armbian* + rm -vf /etc/profile.d/*armbian* + #[[ -d '/usr/lib/armbian' ]] && rm -vR /usr/lib/armbian + [[ -d '/usr/share/armbian' ]] && rm -vR /usr/share/armbian cat << _EOF_ > /etc/dpkg/dpkg.cfg.d/dietpi-no_armbian # Exclude conflicting ARMbian files path-exclude /lib/systemd/system/*armbian* path-exclude /etc/apt/apt.conf.d/*armbian* path-exclude /etc/cron.*/*armbian* -#path-exclude /etc/default/*armbian* # Breaks ARMbain root package upgrade +#path-exclude /etc/default/*armbian* # Breaks ARMbian root package upgrade path-exclude /etc/update-motd.d/*armbian* path-exclude /etc/profile.d/*armbian* -#path-exclude /usr/lib/armbian # Breaks ARMbain root package upgrade +#path-exclude /usr/lib/armbian # Breaks ARMbian root package upgrade path-exclude /usr/share/armbian _EOF_ #------------------------------------------------------------------------------- @@ -2236,6 +2237,7 @@ _EOF_ # Syncthing: https://github.com/MichaIng/DietPi/pull/3202 # Grafana: https://github.com/MichaIng/DietPi/issues/3213 # Jackett: https://github.com/MichaIng/DietPi/issues/2593 + # Amiberry: https://github.com/MichaIng/DietPi/pull/3252 # Home Assistant: No reinstall but inform user about required Python update: https://github.com/MichaIng/DietPi/pull/3220 if (( $G_DIETPI_INSTALL_STAGE == 2 )); then @@ -2270,10 +2272,17 @@ _EOF_ fi if (( $G_HW_ARCH == 1 )) && grep -q '^aSOFTWARE_INSTALL_STATE\[77\]=2' /DietPi/dietpi/.installed; then + G_DIETPI-NOTIFY 2 'Removing obsolete bintray.com APT repo prior to Grafana update...' [[ -f '/etc/apt/sources.list.d/grafana.list' ]] && grep -q 'bintray.com' /etc/apt/sources.list.d/grafana.list && rm /etc/apt/sources.list.d/grafana.list fi - /DietPi/dietpi/dietpi-software reinstall 50 77 147 + if [[ -f '/usr/local/lib/libSDL2.txt' ]] && grep -q '^aSOFTWARE_INSTALL_STATE\[108\]=2' /DietPi/dietpi/.installed; then + + G_DIETPI-NOTIFY 2 'Removing obsolete SDL2 libraries prior to Amiberry update...' + rm -vf /usr/local/lib/libSDL2* + + fi + /DietPi/dietpi/dietpi-software reinstall 50 77 108 147 fi #-------------------------------------------------------------------------------