diff --git a/.update/version b/.update/version index ca53a28dd3..60f09a586e 100644 --- a/.update/version +++ b/.update/version @@ -1,7 +1,7 @@ # Available DietPi version G_REMOTE_VERSION_CORE=7 G_REMOTE_VERSION_SUB=9 -G_REMOTE_VERSION_RC=1 +G_REMOTE_VERSION_RC=2 # Minimum DietPi version to allow update G_MIN_VERSION_CORE=6 G_MIN_VERSION_SUB=0 diff --git a/CHANGELOG.txt b/CHANGELOG.txt index e2b081c4d0..2ed4d38027 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -18,14 +18,18 @@ Changes: - DietPi-Software | Kodi: On Raspberry Pi Bullseye systems, the new official Raspberry Pi repository build for Kodi 19.3 is now installed. You can apply the upgrade manually by reinstalling Kodi: dietpi-software reinstall 31 - DietPi-Software | Kodi: The addon repository is now installed by default with all Kodi installs, which previously was the case only on RPi and Odroids. When currently missing, it can be manually installed: apt install kodi-repository-kodi - DietPi-Software | Gitea: The service runs now as dedicated user "gitea" with its home directory "/mnt/dietpi_userdata/gitea" to allow easy transfer and usage of SSH keys for remote access. This applies to newly installed or reinstalled Gitea instances. Many thanks to @LilTrublMakr for reporting the related limitation with the previously used "dietpi" user: https://github.com/MichaIng/DietPi/issues/4620 +- DietPi-Software | Chromium: On Raspberry Pi, the chromium-codecs-ffmpeg-extra package is now installed together with Chromium, which adds additional codecs for patented video/audio formats. Many thanks to @Krawei for identifying this Chromium video playback enhancement: https://github.com/MichaIng/DietPi/issues/5013 Fixes: - Raspberry Pi | Resolved an issue in our images where on first boot two serial login consoles on the generic symlinked and actual serial devices could have been started. This doubled inputs and in turn broke successful username and password login via serial console on first boot. Many thanks to @ad7718 for reporting this issue: https://github.com/MichaIng/DietPi/issues/5014 - DietPi-Backup | Resolved an issue where backup and restore failed if a non-default backup location is used, as a wrong log file path was used. This is a v7.8 regression. Many thanks to @Malinka for reporting this issue: https://dietpi.com/phpbb/viewtopic.php?p=39909#p39909 +- DietPi-Config | Resolved an issue where enabling the "odroid-lcd35" LCD panel on Odroids failed as SPI is enabled by default, blocking the same GPIO ports. Many thanks to @MarcProux for reporting this issue: https://github.com/MichaIng/DietPi/issues/4154 - DietPi-Software | Resolved a v7.8 regression where ReadyMedia, Deluge, Sonarr and Jellyfin installs failed with an error on "usermod", since the services were not stopped first. This has been loved via live patches for v7.8 as well. - DietPi-Software | Transmission: Resolved a v7.8 regression where on fresh installs the intended configuration was not deployed. Many thanks to @kannz and @alessandro.psrt for reporting this issue: https://dietpi.com/phpbb/viewtopic.php?t=9567, https://dietpi.com/phpbb/viewtopic.php?t=9683 - DietPi-Software | SABnzbd: Resolved an issue where installs failed on ARMv6 and ARMv7 Stretch systems. Many thanks to @bensp for reporting this issue: https://github.com/MichaIng/DietPi/issues/4997 - DietPi-Software | Deluge: Worked around an issue on Raspberry Pi ARMv6 userland systems where the service failed to start. Deluge has hence been re-enabled for this systems. Many thanks to @themagicbullet for providing the workaround: https://github.com/MichaIng/DietPi/issues/4944 +- DietPi-Software | UnRAR: Resolved an issue on Raspberry Pi 1 an Zero (1) where an incompatible "unrar" binary was installed. "unrar-free" from Raspbian is installed now on these models, but note that it does not fully support all RAR formats and may hence fail to extract archives in some cases. +- DietPi-Software | rTorrent: Resolved an issue where with Apache webserver the /RPC2 proxy to the rTorrent UNIX socket did not work due to invalid syntax. Many thanks to @Camry2731 for reporting this issue. 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/boot_n2.ini b/boot_n2.ini index 7eb8bd5b1c..14fb409691 100644 --- a/boot_n2.ini +++ b/boot_n2.ini @@ -133,7 +133,7 @@ if test "x${max_freq_a53}" != "x"; then setenv a53_freq "max_freq_a53=${max_freq setenv bootlabel "DietPi (64-bit)" # Boot args -setenv bootargs "root=UUID=e139ce78-9841-40fe-8823-96a304a09859 rootwait ro ${condev} ${amlogic} no_console_suspend fsck.repair=yes net.ifnames=0 elevator=noop hdmimode=${hdmimode} cvbsmode=${cvbsmode} maxcpus=${maxcpus} voutmode=${voutmode} disablehpd=${disablehpd} enable_wol=${enable_wol} ${cec_enable} sdrmode=${sdrmode} consoleblank=0 logo=osd0,loaded monitor_onoff=${monitor_onoff} ${hid_quirks} ${cmode} overscan=${overscan} cvbscable=${cvbscable} systemd.unified_cgroup_hierarchy=0 ${a73_freq} ${a53_freq}" +setenv bootargs "root=UUID=e139ce78-9841-40fe-8823-96a304a09859 rootwait ro fsck.repair=yes elevator=noop net.ifnames=0 ${condev} no_console_suspend consoleblank=0 logo=osd0,loaded systemd.unified_cgroup_hierarchy=0 hdmimode=${hdmimode} cvbsmode=${cvbsmode} maxcpus=${maxcpus} voutmode=${voutmode} disablehpd=${disablehpd} enable_wol=${enable_wol} sdrmode=${sdrmode} monitor_onoff=${monitor_onoff} overscan=${overscan} cvbscable=${cvbscable} ${hid_quirks} ${cec_enable} ${cmode} ${amlogic} ${a73_freq} ${a53_freq}" # Set load addresses setenv dtb_loadaddr "0x1000000" diff --git a/dietpi/dietpi-config b/dietpi/dietpi-config index 2a59bdc996..bec03e6af4 100644 --- a/dietpi/dietpi-config +++ b/dietpi/dietpi-config @@ -1151,7 +1151,7 @@ Re-enabling HDMI requires a reboot. If you need emergency HDMI output, edit the fi - (( ${#G_WHIP_MENU_ARRAY[@]} > 2 )) || { G_WHIP_MSG 'No serial/UART devices have been found on your system.'; TARGETMENUID=3; return; } + (( ${#G_WHIP_MENU_ARRAY[@]} > 2 || ( $G_HW_MODEL > 9 && ${#G_WHIP_MENU_ARRAY[@]} ) )) || { G_WHIP_MSG 'No serial/UART devices have been found on your system.'; TARGETMENUID=3; return; } G_WHIP_BUTTON_CANCEL_TEXT='Back' if G_WHIP_MENU "Select an available serial/UART device to toggle a login console on it.$rpi_text"; then @@ -1181,7 +1181,7 @@ Re-enabling HDMI requires a reboot. If you need emergency HDMI output, edit the # TARGETMENUID=3 Menu_AdvancedOptions(){ - TARGETMENUID=0 + TARGETMENUID=0 # Return to main menu # Swap file local swap_size=$(free -m | mawk '/Swap:/ {print $2;exit}') @@ -1289,30 +1289,30 @@ Re-enabling HDMI requires a reboot. If you need emergency HDMI output, edit the fi - if G_WHIP_MENU 'Please select an option:'; then + G_WHIP_MENU 'Please select an option:' || return 0 - TARGETMENUID=3 # Return to this menu + TARGETMENUID=3 # Stay in this menu - if [[ $G_WHIP_RETURNED_VALUE == 'Swap file' ]]; then + if [[ $G_WHIP_RETURNED_VALUE == 'Swap file' ]]; then - G_WHIP_YESNO 'Swapfile control has been moved to DietPi-Drive_Manager, would you like to run the application now? + G_WHIP_YESNO 'Swapfile control has been moved to DietPi-Drive_Manager, would you like to run the application now? \nOnce finished, exit to resume DietPi-Config' && /boot/dietpi/dietpi-drive_manager - elif [[ $G_WHIP_RETURNED_VALUE == 'APT cache' ]]; then + elif [[ $G_WHIP_RETURNED_VALUE == 'APT cache' ]]; then - TARGETMENUID=19 + TARGETMENUID=19 - elif [[ $G_WHIP_RETURNED_VALUE == 'RTC mode' ]]; then + elif [[ $G_WHIP_RETURNED_VALUE == 'RTC mode' ]]; then - G_WHIP_MENU_ARRAY=( + G_WHIP_MENU_ARRAY=( - 'Emulated' ': Use "fake-hwclock" to apply system clock on early boot' - 'Hardware' ': Device has an active hardware RTC, purge "fake-hwclock"' + 'Emulated' ': Use "fake-hwclock" to apply system clock on early boot' + 'Hardware' ': Device has an active hardware RTC, purge "fake-hwclock"' - ) + ) - G_WHIP_DEFAULT_ITEM=$rtc_text - if G_WHIP_MENU 'Before network is available and network time sync can update the system clock, some implementation is required to do this on early boot stage.\n + G_WHIP_DEFAULT_ITEM=$rtc_text + if G_WHIP_MENU 'Before network is available and network time sync can update the system clock, some implementation is required to do this on early boot stage.\n RTC hardware clock: - Most x86 PCs and some SBCs have a hardware clock with battery attached, or, have a socket where it can optionally be attached to. - If active, this hardware clock will apply the correct system time during kernel boot stage.\n @@ -1321,116 +1321,114 @@ fake-hwclock: - This means that the time is outdated if the system was shut down for a while, but without this implementation the system time would be 01/01/1970 until network time sync corrects it.\n Please choose whether your device have an active RTC or requires "fake-hwclock":'; then - if [[ $G_WHIP_RETURNED_VALUE == 'Emulated' ]]; then + if [[ $G_WHIP_RETURNED_VALUE == 'Emulated' ]]; then - G_AGI fake-hwclock - G_EXEC systemctl enable --now fake-hwclock + G_AGI fake-hwclock + G_EXEC systemctl enable --now fake-hwclock - else - - G_AGP fake-hwclock + else - fi + G_AGP fake-hwclock fi - elif [[ $G_WHIP_RETURNED_VALUE == 'Time sync mode' ]]; then + fi - G_WHIP_MENU_ARRAY=( + elif [[ $G_WHIP_RETURNED_VALUE == 'Time sync mode' ]]; then + + G_WHIP_MENU_ARRAY=( - '0' ': Custom' - '1' ': Boot Only' - '2' ': Boot + Daily (Recommended)' - '3' ': Boot + Hourly' - '4' ': Daemon + Drift' + '0' ': Custom' + '1' ': Boot Only' + '2' ': Boot + Daily (Recommended)' + '3' ': Boot + Hourly' + '4' ': Daemon + Drift' - ) + ) - G_WHIP_DEFAULT_ITEM=$ntpd_mode_current - if G_WHIP_MENU 'Here you can adjust the frequency of network time syncs.\n + G_WHIP_DEFAULT_ITEM=$ntpd_mode_current + if G_WHIP_MENU 'Here you can adjust the frequency of network time syncs.\n - Modes 1-3:\nDietPi will launch systemd-timesyncd as a program, rather than a daemon. Once the time has been updated on your system, timesyncd will exit to reduce resource usage.\n - Mode 4:\nsystemd-timesyncd will run as a background daemon/service. Differences in time will be gradually adjusted over time, rather than instantly.\n - Mode 0:\nIf you use a custom time sync method, e.g. the NTP package for high precision demand, select custom mode to avoid systemd-timesyncd interference.'; then - /boot/dietpi/func/dietpi-set_software ntpd-mode "$G_WHIP_RETURNED_VALUE" - # Run time sync only, if not currently running, to avoid concurrent execution if dietpi-config was called from DietPi-Run_NTPD error handler - # - Run non-interactively to avoid its internal error handler allowing to open a concurrent dietpi-config instance - pgrep -cif /dietpi/func/run_ntpd > /dev/null || G_INTERACTIVE=0 MAX_LOOPS_CHECK=10 /boot/dietpi/func/run_ntpd 1 + /boot/dietpi/func/dietpi-set_software ntpd-mode "$G_WHIP_RETURNED_VALUE" + # Run time sync only, if not currently running, to avoid concurrent execution if dietpi-config was called from DietPi-Run_NTPD error handler + # - Run non-interactively to avoid its internal error handler allowing to open a concurrent dietpi-config instance + pgrep -cif /dietpi/func/run_ntpd > /dev/null || G_INTERACTIVE=0 MAX_LOOPS_CHECK=10 /boot/dietpi/func/run_ntpd 1 - fi + fi - elif [[ $G_WHIP_RETURNED_VALUE == 'Update firmware' ]]; then + elif [[ $G_WHIP_RETURNED_VALUE == 'Update firmware' ]]; then - local old_firmware=$(ls /lib/modules/) + local old_firmware=$(ls /lib/modules/) - # Pine A64: Non-ARMbian only - if [[ $G_HW_MODEL == 40 && -f '/usr/local/sbin/pine64_update_uboot.sh' && -f '/usr/local/sbin/pine64_update_kernel.sh' ]]; then + # Pine A64: Non-ARMbian only + if [[ $G_HW_MODEL == 40 && -f '/usr/local/sbin/pine64_update_uboot.sh' && -f '/usr/local/sbin/pine64_update_kernel.sh' ]]; then - if G_WHIP_YESNO "Would you like to update the firmware/kernel for $G_HW_MODEL_NAME? + if G_WHIP_YESNO "Would you like to update the firmware/kernel for $G_HW_MODEL_NAME? - This will run longsleep's update scripts to update the U-Boot and kernel."; then - /usr/local/sbin/pine64_update_uboot.sh - /usr/local/sbin/pine64_update_kernel.sh + /usr/local/sbin/pine64_update_uboot.sh + /usr/local/sbin/pine64_update_kernel.sh - fi + fi - # G_AGDUG based (not all devices support this) - elif G_WHIP_YESNO "Would you like to update the firmware/kernel for $G_HW_MODEL_NAME? + # G_AGDUG based (not all devices support this) + elif G_WHIP_YESNO "Would you like to update the firmware/kernel for $G_HW_MODEL_NAME? - This will run G_AGDUG, a wrapper for 'apt-get dist-upgrade'\n - Most (but not all) devices allow APT based firmware updates \nNB: If requested to overwrite the current kernel, press TAB and then ENTER (to confirm)."; then - G_AGUP - G_AGDUG + G_AGUP + G_AGDUG - fi + fi - # Reboot required only, if firmware got actually updated - [[ $old_firmware != $(ls /lib/modules/) ]] && REBOOT_REQUIRED=1 + # Reboot required only, if firmware got actually updated + [[ $old_firmware != $(ls /lib/modules/) ]] && REBOOT_REQUIRED=1 - elif [[ $G_WHIP_RETURNED_VALUE == 'Update RPi4 EEPROM firmware' ]]; then + elif [[ $G_WHIP_RETURNED_VALUE == 'Update RPi4 EEPROM firmware' ]]; then - G_WHIP_YESNO '[ INFO ] EEPROM firmware update + G_WHIP_YESNO '[ INFO ] EEPROM firmware update \nThis will, if required, install or upgrade the rpi-eeprom APT package and update bootloader and VL805 USB firmware on the RPi4 EEPROM. Further information: https://www.raspberrypi.org/documentation/hardware/raspberrypi/booteeprom.md \nDo you want to continue?' || return - /boot/dietpi/func/dietpi-set_hardware rpi-eeprom + /boot/dietpi/func/dietpi-set_hardware rpi-eeprom - elif [[ $G_WHIP_RETURNED_VALUE == 'I2C state' ]]; then + elif [[ $G_WHIP_RETURNED_VALUE == 'I2C state' ]]; then - /boot/dietpi/func/dietpi-set_hardware i2c $(( ! $rpi_i2c_enabled )) && REBOOT_REQUIRED=1 + /boot/dietpi/func/dietpi-set_hardware i2c $(( ! $rpi_i2c_enabled )) && REBOOT_REQUIRED=1 - elif [[ $G_WHIP_RETURNED_VALUE == 'I2C frequency' ]]; then + elif [[ $G_WHIP_RETURNED_VALUE == 'I2C frequency' ]]; then - # Remove kHz from current - G_WHIP_DEFAULT_ITEM=$rpi_i2c_baudrate - if G_WHIP_INPUTBOX 'Please enter the required I2C baudrate frequency (kHz).' && G_CHECK_VALIDINT "$G_WHIP_RETURNED_VALUE" 0; then + # Remove kHz from current + G_WHIP_DEFAULT_ITEM=$rpi_i2c_baudrate + if G_WHIP_INPUTBOX 'Please enter the required I2C baudrate frequency (kHz).' && G_CHECK_VALIDINT "$G_WHIP_RETURNED_VALUE" 0; then - /boot/dietpi/func/dietpi-set_hardware i2c "$G_WHIP_RETURNED_VALUE" && REBOOT_REQUIRED=1 + /boot/dietpi/func/dietpi-set_hardware i2c "$G_WHIP_RETURNED_VALUE" && REBOOT_REQUIRED=1 - fi + fi - elif [[ $G_WHIP_RETURNED_VALUE == 'SPI state' ]]; then + elif [[ $G_WHIP_RETURNED_VALUE == 'SPI state' ]]; then - /boot/dietpi/func/dietpi-set_hardware spi $(( ! $rpi_spi_enabled )) && REBOOT_REQUIRED=1 + /boot/dietpi/func/dietpi-set_hardware spi $(( ! $rpi_spi_enabled )) && REBOOT_REQUIRED=1 - elif [[ $G_WHIP_RETURNED_VALUE == 'Serial/UART' ]]; then + elif [[ $G_WHIP_RETURNED_VALUE == 'Serial/UART' ]]; then - TARGETMENUID=18 + TARGETMENUID=18 - elif [[ $G_WHIP_RETURNED_VALUE == 'Bluetooth' ]]; then + elif [[ $G_WHIP_RETURNED_VALUE == 'Bluetooth' ]]; then - /boot/dietpi/func/dietpi-set_hardware bluetooth $(( ! $bluetooth_state )) - # On RPi, when enabling onboard Bluetooth, a reboot is required to have the device tree changes taking effect. - (( $bluetooth_state || G_HW_MODEL > 9 )) || (( ! $G_HW_ONBOARD_WIFI )) || REBOOT_REQUIRED=1 + /boot/dietpi/func/dietpi-set_hardware bluetooth $(( ! $bluetooth_state )) + # On RPi, when enabling onboard Bluetooth, a reboot is required to have the device tree changes taking effect. + (( $bluetooth_state || G_HW_MODEL > 9 )) || (( ! $G_HW_ONBOARD_WIFI )) || REBOOT_REQUIRED=1 - elif [[ $G_WHIP_RETURNED_VALUE == 'USB boot support' && $rpi3_usb_boot_bit_enabled == 0 ]] && - G_WHIP_YESNO 'The following will enable the RPi 3 to boot from USB mass storage devices. A hardware bit "17:3020000a" is set on next boot to enable the feature. + elif [[ $G_WHIP_RETURNED_VALUE == 'USB boot support' && $rpi3_usb_boot_bit_enabled == 0 ]] && + G_WHIP_YESNO 'The following will enable the RPi 3 to boot from USB mass storage devices. A hardware bit "17:3020000a" is set on next boot to enable the feature. \nNB:\n - Not all USB mass storage devices are supported.\n - The hardware bit which enables this setting is non-reversible. \nDo you wish to enable USB mass storage boot support?'; then - /boot/dietpi/func/dietpi-set_hardware rpi3_usb_boot enable && REBOOT_REQUIRED=1 - - fi + /boot/dietpi/func/dietpi-set_hardware rpi3_usb_boot enable && REBOOT_REQUIRED=1 fi @@ -1439,7 +1437,7 @@ Further information: https://www.raspberrypi.org/documentation/hardware/raspberr # TARGETMENUID=4 Menu_PerformanceOptions(){ - TARGETMENUID=0 + TARGETMENUID=0 # Return to main menu # All devices local current_cpu_governor='N/A' diff --git a/dietpi/dietpi-software b/dietpi/dietpi-software index 2ef40fe245..e1dbeeb825 100644 --- a/dietpi/dietpi-software +++ b/dietpi/dietpi-software @@ -2971,7 +2971,7 @@ _EOF_ aSTART_SERVICES+=('ssh') # Mark Dropbear for uninstall - grep -q '^dropbear[^[:blank:]]*[[:blank:]]' <<< "$(dpkg --get-selections)" && aSOFTWARE_INSTALL_STATE[104]=-1 + grep -q '^dropbear[^[:blank:]]*[[:blank:]]' < <(dpkg --get-selections) && aSOFTWARE_INSTALL_STATE[104]=-1 fi @@ -3241,8 +3241,8 @@ unix_socket_directories = '/run/postgresql'" > "$i/00dietpi.conf" fi # Get latest version - local file=$(curl -sfL 'https://golang.org/dl/?mode=json' | grep -wom1 "go[0-9.]*\.linux-$arch\.tar\.gz") - [[ $file ]] || { file="go1.16.3.linux-$arch.tar.gz"; G_DIETPI-NOTIFY 1 "Automatic latest ${aSOFTWARE_NAME[$software_id]} version detection failed. \"$file\" will be installed as fallback, but a newer version might be available. Please report this at: https://github.com/MichaIng/DietPi/issues"; } + local file=$(curl -sSfL 'https://golang.org/dl/?mode=json' | grep -wo "go[0-9.]*\.linux-$arch\.tar\.gz" | head -1) + [[ $file ]] || { file="go1.17.4.linux-$arch.tar.gz"; G_DIETPI-NOTIFY 1 "Automatic latest ${aSOFTWARE_NAME[$software_id]} version detection failed. \"$file\" will be installed as fallback, but a newer version might be available. Please report this at: https://github.com/MichaIng/DietPi/issues"; } # Reinstall: Remove previous instance [[ -d '/usr/local/go' ]] && G_EXEC rm -R /usr/local/go @@ -3265,15 +3265,16 @@ _EOF_ Banner_Installing - # On Raspbian, only "unrar-free" is available in repos, but does not support all rar formats, thus we use "unrar" [non-free] from Debian repo: http://raspbian.raspberrypi.org/raspbian/pool/non-free/u/unrar-nonfree/ - if (( $G_HW_MODEL < 10 )) && (( $G_RASPBIAN )); then + # On Raspbian, only "unrar-free" is available which does not support all RAR formats, thus we use "unrar" [non-free] from Debian on ARMv7+ models: http://raspbian.raspberrypi.org/raspbian/pool/non-free/u/unrar-nonfree/ + if (( $G_HW_ARCH == 1 )) + then + G_AGI unrar-free + elif (( $G_HW_MODEL < 10 )) && (( $G_RASPBIAN )) + then Download_Install "https://dietpi.com/downloads/binaries/rpi/unrar-armhf-$G_DISTRO_NAME.deb" - else - G_AGI unrar - fi fi @@ -3914,7 +3915,7 @@ _EOF_ G_EXEC ln -s /mnt/dietpi_userdata/mysql /var/lib/mysql local apackages=('mariadb-server') - # Install PHP module, if PHP was already installed + # Install PHP module if PHP was already installed (( ${aSOFTWARE_INSTALL_STATE[89]} == 2 )) && apackages+=("$PHP_NAME-mysql") G_AGI "${apackages[@]}" G_EXEC systemctl stop mariadb @@ -3944,7 +3945,7 @@ _EOF_ Banner_Installing local apackages=('sqlite3') - # Install PHP module, if PHP was already installed + # Install PHP module if PHP was already installed (( ${aSOFTWARE_INSTALL_STATE[89]} == 2 )) && apackages+=("$PHP_NAME-sqlite3") G_AGI "${apackages[@]}" @@ -3956,12 +3957,12 @@ _EOF_ Banner_Installing local apackages=('redis-server') - # Install PHP module, if PHP was already installed + # Install PHP module if PHP was already installed (( ${aSOFTWARE_INSTALL_STATE[89]} == 2 )) && apackages+=("$PHP_NAME-redis") G_AGI "${apackages[@]}" G_EXEC systemctl stop redis-server - # Enable redis php module, if installed + # Enable Redis php module if installed command -v phpenmod > /dev/null && G_EXEC phpenmod redis # Disable file logging and enable syslog instead, which resolves reported startup issues in cases as well: https://github.com/MichaIng/DietPi/issues/3291 @@ -4054,9 +4055,6 @@ Package: openssl libssl*\nPin: origin packages.sury.org\nPin-Priority: -1' > /et target_php_ini="$FP_PHP_BASE_DIR/mods-available/dietpi.ini" echo -e '; DietPi PHP settings\n; priority=97' > $target_php_ini - # Set UTF-8 - G_CONFIG_INJECT 'default_charset[[:blank:]=]' 'default_charset="UTF-8"' $target_php_ini - # Session files need to be outside of /tmp and /var/tmp due to PrivateTmp=true, else phpsessionclean.service cannot clean sessions G_EXEC mkdir -p /run/php_sessions G_EXEC chmod 1733 /run/php_sessions @@ -4473,7 +4471,7 @@ _EOF_ else - Download_Install 'https://download.phpbb.com/pub/release/3.3/3.3.4/phpBB-3.3.4.tar.bz2' + Download_Install 'https://download.phpbb.com/pub/release/3.3/3.3.5/phpBB-3.3.5.tar.bz2' G_EXEC mv phpBB3 /var/www/phpbb # Files are shipped with strange UID:GID 1000:1000 while for security reasons it should be root:root. G_EXEC chown -R root:root /var/www/phpbb @@ -4590,7 +4588,7 @@ _EOF_ Banner_Installing # Get latest download - local file=$(curl -sfL 'https://download.yacy.net/?C=N;O=D' | grep -wom1 'yacy_v[0-9._]*\.tar\.gz' | head -1) + local file=$(curl -sSfL 'https://download.yacy.net/?C=N;O=D' | grep -wo 'yacy_v[0-9._]*\.tar\.gz' | head -1) [[ $file ]] || { file='yacy_v1.924_20210209_10069.tar.gz'; G_DIETPI-NOTIFY 1 "Automatic latest ${aSOFTWARE_NAME[$software_id]} version detection failed. \"$file\" will be installed as fallback, but a newer version might be available. Please report this at: https://github.com/MichaIng/DietPi/issues"; } Download_Install "https://download.yacy.net/$file" /etc @@ -4634,8 +4632,8 @@ _EOF_ fi # Download latest version - local version=$(curl -sSfL 'https://dist.ipfs.io/go-ipfs/versions' | tail -n 1) - [[ $version ]] || { version='v0.9.0'; G_DIETPI-NOTIFY 1 "Automatic latest ${aSOFTWARE_NAME[$software_id]} version detection failed. Version \"$version\" will be installed as fallback, but a newer version might be available. Please report this at: https://github.com/MichaIng/DietPi/issues"; } + local version=$(curl -sSfL 'https://dist.ipfs.io/go-ipfs/versions' | tail -1) + [[ $version ]] || { version='v0.11.0-rc2'; G_DIETPI-NOTIFY 1 "Automatic latest ${aSOFTWARE_NAME[$software_id]} version detection failed. Version \"$version\" will be installed as fallback, but a newer version might be available. Please report this at: https://github.com/MichaIng/DietPi/issues"; } Download_Install "https://dist.ipfs.io/go-ipfs/$version/go-ipfs_${version}_linux-$arch.tar.gz" # Install @@ -4783,7 +4781,7 @@ _EOF_ local oc_version_major=$(sed -n '/OC_VersionString/{s/^[^0-9]*//;s/\..*$//p;q}' /var/www/owncloud/version.php) [[ $oc_version_major ]] || oc_version_major=10 local oc_version_minor=$(sed -n '/OC_VersionString/{s/^[^.]*\.//;s/\..*$//p;q}' /var/www/owncloud/version.php) - [[ $oc_version_minor ]] || oc_version_minor=3 + [[ $oc_version_minor ]] || oc_version_minor=8 if (( ${aSOFTWARE_INSTALL_STATE[83]} > 0 )); then @@ -5987,19 +5985,19 @@ _EOF_ # ARMv7 local fallback_url="https://hndl.urbackup.org/Server/$latest/urbackup-server_${latest}_armhf.deb" - local file=$(curl -sfL "$url" | grep -m1 'urbackup-server_.*_armhf\.deb' | cut -d \" -f 8) + local file=$(curl -sSfL "$url" | mawk -F\" '/"urbackup-server_.*_armhf\.deb"/{print $8}') # ARMv8 if (( $G_HW_ARCH == 3 )); then fallback_url="https://hndl.urbackup.org/Server/$latest/urbackup-server_${latest}_arm64.deb" - file=$(curl -sfL "$url" | grep -m1 'urbackup-server-.*_arm64\.deb' | cut -d \" -f 8) + file=$(curl -sSfL "$url" | mawk -F\" '/"urbackup-server_.*_arm64\.deb"/{print $8}') # x86_64 elif (( $G_HW_ARCH == 10 )); then fallback_url="https://hndl.urbackup.org/Server/$latest/urbackup-server_${latest}_amd64.deb" - file=$(curl -sfL "$url" | grep -m1 'urbackup-server_.*_amd64\.deb' | cut -d \" -f 8) + file=$(curl -sSfL "$url" | mawk -F\" '/"urbackup-server_.*_amd64\.deb"/{print $8}') fi @@ -6145,12 +6143,8 @@ _EOF_ Banner_Installing - # Raspbian Bullseye workaround: https://github.com/MichaIng/DietPi/issues/4944 - local apackages=() - (( $G_HW_MODEL < 10 )) && (( $G_RASPBIAN )) && apackages=('libatomic1') - # Packages - G_AGI deluged deluge-web deluge-console "${apackages[@]}" + G_AGI deluged deluge-web deluge-console G_EXEC systemctl stop deluged # Remove SysV service leftovers, installed by Debian APT package @@ -6207,9 +6201,6 @@ ExecStart=$(command -v deluged) -d [Install] WantedBy=multi-user.target _EOF_ - # Raspbian Bullseye workaround: https://github.com/MichaIng/DietPi/issues/4944 - (( $G_HW_MODEL < 10 )) && (( $G_RASPBIAN )) && G_CONFIG_INJECT 'Environment=' 'Environment=LD_PRELOAD=/usr/lib/arm-linux-gnueabihf/libatomic.so.1' /etc/systemd/system/deluged.service '\[Service\]' - # https://github.com/deluge-torrent/deluge/blob/develop/packaging/systemd/deluge-web.service # - Bullseye: deluge-web v2 requires the "-d" flag to stay in foreground, but v1 does not understand it yet local flag= @@ -7137,9 +7128,8 @@ _EOF_ fi # Download - local fallback_url="https://github.com/fatedier/frp/releases/download/v0.37.1/frp_0.37.1_linux_$arch.tar.gz" - local pattern="\"browser_download_url\": .*\/frp_[0-9.]*_linux_$arch\.tar\.gz\"" - Download_Install "$(curl -sSfL 'https://api.github.com/repos/fatedier/frp/releases/latest' | mawk -v pat="$pattern" -F\" '$0 ~ pat {print $4}')" + local fallback_url="https://github.com/fatedier/frp/releases/download/v0.38.0/frp_0.38.0_linux_$arch.tar.gz" + Download_Install "$(curl -sSfL 'https://api.github.com/repos/fatedier/frp/releases/latest' | mawk -F\" "/\"browser_download_url\": .*\/frp_[0-9.]*_linux_$arch\.tar\.gz\"/{print \$4}")" G_EXEC cd frp_* @@ -7322,7 +7312,7 @@ _EOF_ # APT key local url='https://repo.mosquitto.org/debian/mosquitto-repo.gpg.key' G_CHECK_URL "$url" - G_EXEC eval "curl -sSLf '$url' | gpg --dearmor -o /etc/apt/trusted.gpg.d/dietpi-mosquitto.gpg --yes" + G_EXEC eval "curl -sSfL '$url' | gpg --dearmor -o /etc/apt/trusted.gpg.d/dietpi-mosquitto.gpg --yes" # APT list G_EXEC eval "echo 'deb https://repo.mosquitto.org/debian/ ${G_DISTRO_NAME/bookworm/bullseye} main' > /etc/apt/sources.list.d/dietpi-mosquitto.list" @@ -7554,7 +7544,7 @@ _EOF_ Banner_Installing - local version='2.4.3' # https://www.haproxy.org/download/ + local version='2.5.0' # https://www.haproxy.org/download/ DEPS_LIST='libpcre3-dev libssl-dev zlib1g-dev libsystemd-dev' Download_Install "https://www.haproxy.org/download/${version%.*}/src/haproxy-$version.tar.gz" @@ -7973,7 +7963,7 @@ _EOF_ # APT key local url='https://repos.influxdata.com/influxdb.key' G_CHECK_URL "$url" - G_EXEC eval "curl -sSLf '$url' | gpg --dearmor -o /etc/apt/trusted.gpg.d/dietpi-influxdb.gpg --yes" + G_EXEC eval "curl -sSfL '$url' | gpg --dearmor -o /etc/apt/trusted.gpg.d/dietpi-influxdb.gpg --yes" # APT list G_EXEC eval "echo 'deb https://repos.influxdata.com/debian/ ${G_DISTRO_NAME/bookworm/bullseye} stable' > /etc/apt/sources.list.d/influxdb.list" @@ -8009,7 +7999,7 @@ _EOF_ # APT key local url='https://packages.grafana.com/gpg.key' G_CHECK_URL "$url" - G_EXEC eval "curl -sSLf '$url' | gpg --dearmor -o /etc/apt/trusted.gpg.d/dietpi-grafana.gpg --yes" + G_EXEC eval "curl -sSfL '$url' | gpg --dearmor -o /etc/apt/trusted.gpg.d/dietpi-grafana.gpg --yes" # APT list G_EXEC eval "echo 'deb https://packages.grafana.com/oss/deb/ stable main' > /etc/apt/sources.list.d/grafana.list" @@ -8124,7 +8114,7 @@ _EOF_ if (( ${aSOFTWARE_INSTALL_STATE[$software_id]} == 1 )); then Banner_Installing - local fallback_url='https://github.com/gotson/komga/releases/download/v0.120.1/komga-0.120.1.jar' + local fallback_url='https://github.com/gotson/komga/releases/download/v0.134.1/komga-0.134.1.jar' Download_Install "$(curl -sSfL 'https://api.github.com/repos/gotson/komga/releases/latest' | mawk -F\" '/"browser_download_url": .*\/komga-[^"\/]*\.jar"/{print $4}')" /mnt/dietpi_userdata/komga/komga.jar # User @@ -8223,7 +8213,7 @@ _EOF_ # Bullseye+ if (( $G_DISTRO > 5 )) then - local fallback_url='https://github.com/ampache/ampache/releases/download/4.4.3/ampache-4.4.3_all.zip' + local fallback_url='https://github.com/ampache/ampache/releases/download/5.1.1/ampache-5.1.1_all.zip' Download_Install "$(curl -sSfL 'https://api.github.com/repos/ampache/ampache/releases/latest' | mawk -F\" '/"browser_download_url": ".*\/ampache-[0-9\.]*_all.zip"/{print $4}')" ampache # Ampache v5 requires PHP7.4, hence pull latest Ampache v4 on Buster and below: https://github.com/ampache/ampache/wiki/Ampache-Next-Changes @@ -9207,7 +9197,7 @@ location = /.well-known/caldav { return 301 /baikal/html/dav.php; }' > /etc/ngi fi - local fallback_url="https://github.com/MediaBrowser/Emby.Releases/releases/download/4.6.4.0/emby-server-deb_4.6.4.0_$arch.deb" + local fallback_url="https://github.com/MediaBrowser/Emby.Releases/releases/download/4.6.7.0/emby-server-deb_4.6.7.0_$arch.deb" Download_Install "$(curl -sSfL 'https://api.github.com/repos/MediaBrowser/Emby.Releases/releases/latest' | mawk -F\" "/\"browser_download_url\": .*\/emby-server-deb_[^\"\/]*_$arch\.deb\"/{print \$4}")" G_EXEC systemctl stop emby-server @@ -9226,7 +9216,7 @@ location = /.well-known/caldav { return 301 /baikal/html/dav.php; }' > /etc/ngi # APT key local url='https://downloads.plex.tv/plex-keys/PlexSign.key' G_CHECK_URL "$url" - G_EXEC eval "curl -sSLf '$url' | gpg --dearmor -o /etc/apt/trusted.gpg.d/dietpi-plexmediaserver.gpg --yes" + G_EXEC eval "curl -sSfL '$url' | gpg --dearmor -o /etc/apt/trusted.gpg.d/dietpi-plexmediaserver.gpg --yes" # APT list G_EXEC eval "echo 'deb https://downloads.plex.tv/repo/deb/ public main' > /etc/apt/sources.list.d/plexmediaserver.list" @@ -9620,7 +9610,7 @@ _EOF_ AuthUserFile "/etc/.rutorrent-htaccess" Require valid-user -ProxyPass "/RPC2" "scgi:///mnt/dietpi_userdata/downloads/.session/rpc.socket" +ProxyPass "/RPC2" "unix:/mnt/dietpi_userdata/downloads/.session/rpc.socket|scgi://127.0.0.1" _EOF_ G_EXEC a2ensite dietpi-rutorrent @@ -9975,7 +9965,7 @@ _EOF_ fi - local fallback_url="https://github.com/syncthing/syncthing/releases/download/v1.18.1/syncthing-linux-$arch-v1.18.1.tar.gz" + local fallback_url="https://github.com/syncthing/syncthing/releases/download/v1.18.5/syncthing-linux-$arch-v1.18.5.tar.gz" Download_Install "$(curl -sSfL 'https://api.github.com/repos/syncthing/syncthing/releases/latest' | mawk -F\" "/\"browser_download_url\": .*\/syncthing-linux-$arch-[^\"\/]*\.tar\.gz\"/{print \$4}")" G_EXEC mv syncthing-* /opt/syncthing @@ -10048,15 +10038,12 @@ _EOF_ then G_AGI chromium - # RPi: Use RPi repo package + # RPi: Use RPi repo package including non-free FFmpeg codecs integration else - # Bullseye workaround: https://github.com/RPi-Distro/chromium-browser/issues/22 - local apackages=('chromium-browser') - (( $G_DISTRO < 6 )) || apackages+=('libgtk-3-0') - G_AGI "${apackages[@]}" + G_AGI chromium-browser chromium-codecs-ffmpeg-extra fi - # Allow root, start maximized and disable sandbox under root (blank screen without) + # Allow root and disable sandbox under root (blank screen without): https://peter.sh/experiments/chromium-command-line-switches/ local export_options="export CHROMIUM_FLAGS=\"\$CHROMIUM_FLAGS \ --test-type \ --no-sandbox \ @@ -10075,7 +10062,7 @@ _EOF_ : # x86_64: OpenGL - elif [[ $G_HW_ARCH == 1 ]] + elif [[ $G_HW_ARCH == 10 ]] then : @@ -10086,7 +10073,7 @@ _EOF_ export_options+='"' - G_EXEC mkdir -p /etc/chromium.d + [[ -d '/etc/chromium.d' ]] || G_EXEC mkdir /etc/chromium.d echo "$export_options" > /etc/chromium.d/custom_flags # Chromium 60+ @@ -10100,14 +10087,14 @@ _EOF_ Create_Desktop_Shortcut chromium-browser fi - # Autostart run script for Kiosk mode, based on @AYapejian https://github.com/MichaIng/DietPi/issues/1737#issue-318697621 + # Autostart run script for kiosk mode, based on @AYapejian: https://github.com/MichaIng/DietPi/issues/1737#issue-318697621 [[ -d '/var/lib/dietpi/dietpi-software/installed' ]] || G_EXEC mkdir -p /var/lib/dietpi/dietpi-software/installed cat << '_EOF_' > /var/lib/dietpi/dietpi-software/installed/chromium-autostart.sh -#!/bin/bash -# Autostart run script for Kiosk mode, based on @AYapejian https://github.com/MichaIng/DietPi/issues/1737#issue-318697621 -# - Please see /root/.chromium-browser.init (and /etc/chromium.d/custom_flags) for additional egl/gl init options +#!/bin/dash +# Autostart run script for kiosk mode, based on @AYapejian: https://github.com/MichaIng/DietPi/issues/1737#issue-318697621 +# - Please see /root/.chromium-browser.init (and /etc/chromium.d/custom_flags) for additional EGL/GL init options -# Command line switches https://peter.sh/experiments/chromium-command-line-switches/ +# Command line switches: https://peter.sh/experiments/chromium-command-line-switches/ # --test-type gets rid of some of the chromium warnings that you may or may not care about in kiosk on a LAN # --pull-to-refresh=1 # --ash-host-window-bounds="400,300" @@ -10117,23 +10104,18 @@ RES_X=$(sed -n '/^[[:blank:]]*SOFTWARE_CHROMIUM_RES_X=/{s/^[^=]*=//p;q}' /boot/d RES_Y=$(sed -n '/^[[:blank:]]*SOFTWARE_CHROMIUM_RES_Y=/{s/^[^=]*=//p;q}' /boot/dietpi.txt) CHROMIUM_OPTS="--kiosk --test-type --window-size=$RES_X,$RES_Y --start-fullscreen --start-maximized --window-position=0,0" + # If you want tablet mode, uncomment the next line. #CHROMIUM_OPTS+=' --force-tablet-mode --tablet-ui' -# Add URL for first run: +# Home page URL=$(sed -n '/^[[:blank:]]*SOFTWARE_CHROMIUM_AUTOSTART_URL=/{s/^[^=]*=//p;q}' /boot/dietpi.txt) -CHROMIUM_OPTS+=" --homepage $URL" -# Find absolute filepath location of Chromium binary. -FP_CHROMIUM=$(command -v chromium) -if [[ ! $FP_CHROMIUM ]]; then +# RPi or Debian Chromium package +FP_CHROMIUM=$(command -v chromium-browser) +[ $FP_CHROMIUM ] || FP_CHROMIUM=$(command -v chromium-browser) - # Assume RPi - FP_CHROMIUM="$(command -v chromium-browser)" - -fi - -xinit $FP_CHROMIUM $CHROMIUM_OPTS +exec xinit "$FP_CHROMIUM" $CHROMIUM_OPTS --homepage "$URL" _EOF_ G_EXEC chmod +x /var/lib/dietpi/dietpi-software/installed/chromium-autostart.sh @@ -10464,7 +10446,7 @@ _EOF_ # Download local version=$(curl -sSfL 'https://api.github.com/repos/dani-garcia/vaultwarden/releases/latest' | mawk -F\" '/"tag_name": /{print $4}') - [[ $version ]] || { version='1.22.2'; G_DIETPI-NOTIFY 1 "Automatic latest ${aSOFTWARE_NAME[$software_id]} version detection failed. Version \"$version\" will be installed as fallback, but a newer version might be available. Please report this at: https://github.com/MichaIng/DietPi/issues"; } + [[ $version ]] || { version='1.23.0'; G_DIETPI-NOTIFY 1 "Automatic latest ${aSOFTWARE_NAME[$software_id]} version detection failed. Version \"$version\" will be installed as fallback, but a newer version might be available. Please report this at: https://github.com/MichaIng/DietPi/issues"; } Download_Install "https://github.com/dani-garcia/vaultwarden/archive/$version.tar.gz" # Replace old instance on reinstall using new project name @@ -10647,7 +10629,7 @@ _EOF_ DEPS_LIST="$PHP_NAME-bcmath $PHP_NAME-json $PHP_NAME-mbstring $PHP_NAME-xml $PHP_NAME-curl $PHP_NAME-sqlite3" # Grab latest release - local fallback_url='https://github.com/koel/koel/releases/download/v5.1.5/koel-v5.1.5.tar.gz' + local fallback_url='https://github.com/koel/koel/releases/download/v5.1.8/koel-v5.1.8.tar.gz' Download_Install "$(curl -sSfL 'https://api.github.com/repos/koel/koel/releases/latest' | mawk -F\" '/"browser_download_url": .*\/koel-[^"\/]*\.tar\.gz"/{print $4}')" # Reinstall: Clear previous install, but keep existing config file @@ -10738,7 +10720,7 @@ _EOF_ Banner_Installing # https://sonarr.tv/#downloads-v3-linux-debian # APT repo key - G_EXEC apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 2009837CBFFD68F45BC180471F4F90DE2A9B4BF8 + G_EXEC apt-key adv --keyserver 'hkp://keyserver.ubuntu.com:80' --recv-keys '2009837CBFFD68F45BC180471F4F90DE2A9B4BF8' # APT repo list G_EXEC eval "echo 'deb https://apt.sonarr.tv/debian/ ${G_DISTRO_NAME/bullseye/buster} main' > /etc/apt/sources.list.d/sonarr.list" @@ -11182,7 +11164,7 @@ _EOF_ # - ARMv6: Requires Mono: https://github.com/Jackett/Jackett#installation-on-linux-armv6-or-below local url=$(curl -sSfL 'https://api.github.com/repos/Jackett/Jackett/releases/latest' | mawk -F\" '/"browser_download_url": .*\/Jackett\.Binaries\.Mono\.tar\.gz"/{print $4}') - local fallback_url='https://github.com/Jackett/Jackett/releases/download/v0.18.636/Jackett.Binaries.Mono.tar.gz' + local fallback_url='https://github.com/Jackett/Jackett/releases/download/v0.20.123/Jackett.Binaries.Mono.tar.gz' # - ARMv7 if (( $G_HW_ARCH == 2 )); then @@ -11590,7 +11572,7 @@ _EOF_ Create_User -d /mnt/dietpi_userdata/minio-data minio-user # Data dir - G_EXEC mkdir -p /mnt/dietpi_userdata/minio-data + [[ -d '/mnt/dietpi_userdata/minio-data' ]] || G_EXEC mkdir /mnt/dietpi_userdata/minio-data G_EXEC chown -R minio-user:minio-user /mnt/dietpi_userdata/minio-data # Config @@ -11949,7 +11931,7 @@ _EOF_ # APT key local url='https://dtcooper.github.io/raspotify/key.asc' G_CHECK_URL "$url" - G_EXEC eval "curl -sSLf '$url' | gpg --dearmor -o /etc/apt/trusted.gpg.d/dietpi-raspotify.gpg --yes" + G_EXEC eval "curl -sSfL '$url' | gpg --dearmor -o /etc/apt/trusted.gpg.d/dietpi-raspotify.gpg --yes" # APT list G_EXEC eval "echo 'deb https://dtcooper.github.io/raspotify/ raspotify main' > /etc/apt/sources.list.d/raspotify.list" @@ -12151,7 +12133,7 @@ _EOF_ # Download local version=$(curl -sSfL 'https://api.github.com/repos/ptitSeb/box86/tags' | mawk -F\" '/"name": /{print $4;exit}') - [[ $version ]] || { version='v0.2.2'; G_DIETPI-NOTIFY 1 "Automatic latest ${aSOFTWARE_NAME[$software_id]} version detection failed. Version \"$version\" will be installed as fallback, but a newer version might be available. Please report this at: https://github.com/MichaIng/DietPi/issues"; } + [[ $version ]] || { version='v0.2.4'; G_DIETPI-NOTIFY 1 "Automatic latest ${aSOFTWARE_NAME[$software_id]} version detection failed. Version \"$version\" will be installed as fallback, but a newer version might be available. Please report this at: https://github.com/MichaIng/DietPi/issues"; } Download_Install "https://github.com/ptitSeb/box86/archive/$version.tar.gz" # Build @@ -12195,7 +12177,7 @@ _EOF_ # Download local version=$(curl -sSfL 'https://api.github.com/repos/ptitSeb/box64/tags' | mawk -F\" '/"name": /{print $4;exit}') - [[ $version ]] || { version='v0.1.4'; G_DIETPI-NOTIFY 1 "Automatic latest ${aSOFTWARE_NAME[$software_id]} version detection failed. Version \"$version\" will be installed as fallback, but a newer version might be available. Please report this at: https://github.com/MichaIng/DietPi/issues"; } + [[ $version ]] || { version='v0.1.6'; G_DIETPI-NOTIFY 1 "Automatic latest ${aSOFTWARE_NAME[$software_id]} version detection failed. Version \"$version\" will be installed as fallback, but a newer version might be available. Please report this at: https://github.com/MichaIng/DietPi/issues"; } Download_Install "https://github.com/ptitSeb/box64/archive/$version.tar.gz" # Build @@ -12302,7 +12284,7 @@ _EOF_ local ha_user='homeassistant' local ha_home="/home/$ha_user" local ha_pyenv_activation=". $ha_home/pyenv-activate.sh" - local ha_python_version='3.9.8' + local ha_python_version='3.9.9' G_DIETPI-NOTIFY 2 "Home Assistant user: $ha_user" G_DIETPI-NOTIFY 2 "Home Assistant home: $ha_home" @@ -12649,7 +12631,7 @@ _EOF_ fi - local fallback_url="https://github.com/filebrowser/filebrowser/releases/download/v2.17.1/linux-$arch-filebrowser.tar.gz" + local fallback_url="https://github.com/filebrowser/filebrowser/releases/download/v2.19.0/linux-$arch-filebrowser.tar.gz" Download_Install "$(curl -sSfL 'https://api.github.com/repos/filebrowser/filebrowser/releases/latest' | mawk -F\" "/\"browser_download_url\": .*\/linux-$arch-filebrowser\.tar\.gz\"/{print \$4}")" ./filebrowser/ # Reinstall @@ -12698,18 +12680,18 @@ _EOF_ Banner_Installing # ARMv6 - local fallback_url='https://github.com/Spotifyd/spotifyd/releases/download/v0.3.2/spotifyd-linux-armv6-slim.tar.gz' + local fallback_url='https://github.com/Spotifyd/spotifyd/releases/download/v0.3.3/spotifyd-linux-armv6-slim.tar.gz' local file='spotifyd-linux-armv6-slim' case $G_HW_ARCH in # ARMv7 2) - fallback_url="https://github.com/Spotifyd/spotifyd/releases/download/v0.3.2/spotifyd-linux-armhf-full.tar.gz" + fallback_url="https://github.com/Spotifyd/spotifyd/releases/download/v0.3.3/spotifyd-linux-armhf-full.tar.gz" file='spotifyd-linux-armhf-full' ;; # x86_64 10) - fallback_url="https://github.com/Spotifyd/spotifyd/releases/download/v0.3.2/spotifyd-linux-full.tar.gz" + fallback_url="https://github.com/Spotifyd/spotifyd/releases/download/v0.3.3/spotifyd-linux-full.tar.gz" file='spotifyd-linux-full' ;; esac @@ -14965,11 +14947,10 @@ _EOF_ G_AGP 'chromium*' # Files [[ -d '/etc/chromium.d' ]] && G_EXEC rm -R /etc/chromium.d - [[ -f '/root/.chromium-browser.init' ]] && G_EXEC rm /root/.chromium-browser.init + G_EXEC rm -f /{root,home/*}/.chromium-browser.init [[ -f '/var/lib/dietpi/dietpi-software/installed/chromium-autostart.sh' ]] && G_EXEC rm /var/lib/dietpi/dietpi-software/installed/chromium-autostart.sh # Autostart index: If currently Chromium, revert to console login [[ -f '/boot/dietpi/.dietpi-autostart_index' && $( /var/lib/dietpi/dietpi-benchmark/results -# ------------------------- -# DietPi-Benchmark -# ------------------------- BENCH_VERSION=2 BENCH_HW_MODEL=$G_HW_MODEL BENCH_CPU='$BENCH_CPU' diff --git a/dietpi/func/dietpi-globals b/dietpi/func/dietpi-globals index 751c749825..7e034a7f19 100644 --- a/dietpi/func/dietpi-globals +++ b/dietpi/func/dietpi-globals @@ -57,7 +57,7 @@ # - Assign defaults/code version as fallback [[ $G_DIETPI_VERSION_CORE ]] || G_DIETPI_VERSION_CORE=7 [[ $G_DIETPI_VERSION_SUB ]] || G_DIETPI_VERSION_SUB=9 - [[ $G_DIETPI_VERSION_RC ]] || G_DIETPI_VERSION_RC=1 + [[ $G_DIETPI_VERSION_RC ]] || G_DIETPI_VERSION_RC=2 [[ $G_GITBRANCH ]] || G_GITBRANCH='master' [[ $G_GITOWNER ]] || G_GITOWNER='MichaIng' # - Save current version and Git branch @@ -79,7 +79,7 @@ G_GITOWNER='$G_GITOWNER'" > /boot/dietpi/.version G_INIT(){ # Set locale to prevent incorrect scraping due to translated command outputs - # Set PATH to expected default to rule out issues due to borken environment, e.g. in combination with "su" or "sudo -E" + # Set PATH to expected default to rule out issues due to broken environment, e.g. in combination with "su" or "sudo -E" export LC_ALL='C.UTF-8' LANG='C.UTF-8' PATH='/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin' # Set G_PROGRAM_NAME to originating script file (or shell executable) name if it was not set by originating script @@ -155,7 +155,7 @@ $(ps f -eo pid,user,tty,cmd | grep -i '[d]ietpi')" && continue # Without an input terminal, there is no point in doing this. [[ -t 0 ]] || return - # Printing terminal height - 1 newlines seems to be the fastes method that is compatible with all terminal types. + # Printing terminal height - 1 newlines seems to be the fastest method that is compatible with all terminal types. local lines=$(stty size) i newlines for ((i=1;i<${lines% *};i++)); do newlines+='\n'; done echo -ne "\e[0m$newlines\e[H" @@ -181,7 +181,7 @@ $(ps f -eo pid,user,tty,cmd | grep -i '[d]ietpi')" && continue G_DIETPI-NOTIFY(){ local i ainput_string=("$@") output_string grey green red reset yellow dietpi_green - # If this is a terminal, it understands ANSI escape sequences, so use colour, always start left-aligned with colour reset and clear screen from cursor til end. + # If this is a terminal, it understands ANSI escape sequences, so use colour, always start left-aligned with colour reset and clear screen from cursor to end. # - Assume if STDIN is a terminal that STDOUT is one as well, e.g. covered by "tee" if [[ -t 0 || -t 1 ]] then @@ -273,7 +273,7 @@ $(ps f -eo pid,user,tty,cmd | grep -i '[d]ietpi')" && continue Print 1 # If redirect to existent PID file fails due to noclobber, don't start processing animation. - # - This method prevents a tiny condition race from checking file existance until creating it, when doing: [[ ! -e file ]] && > file + # - This method prevents a tiny condition race from checking file existence until creating it, when doing: [[ ! -e file ]] && > file set -C if { > /tmp/dietpi-process.pid; } &> /dev/null; then @@ -347,7 +347,7 @@ $(ps f -eo pid,user,tty,cmd | grep -i '[d]ietpi')" && continue elif (( $1 == 2 )); then output_string+="$bracket_l INFO $bracket_r " - # Keep info messages in gray, even if "$G_PROGRAM_NAME | \e[0m" is added: + # Keep info messages in grey, even if "$G_PROGRAM_NAME | \e[0m" is added: ainput_string[1]="$grey${ainput_string[1]}" ainput_string+=('\n') Print 1 @@ -1073,7 +1073,7 @@ $log_content" || break # Exit error handler menu loop on cancel local i waiting_for exit_code - # Wait until all theads finished + # Wait until all threads finished while : do for i in "${!G_THREAD_COMMAND[@]}" @@ -1244,7 +1244,7 @@ $log_content" || break # Exit error handler menu loop on cancel declare -F G_EXEC_PRE_FUNC &> /dev/null && eval "G_EXEC_PRE_FUNC_ORIG()$(declare -f G_EXEC_PRE_FUNC | tail -n +2)" G_EXEC_PRE_FUNC(){ acommand[2]=$G_CHECK_URL_TIMEOUT; declare -F G_EXEC_PRE_FUNC_ORIG &> /dev/null && G_EXEC_PRE_FUNC_ORIG; } - # "--retry" only applies on "a timeout, an FTP 4xx response code or an HTTP 5xx response code", hence we loop outself. + # "--retry" only applies on "a timeout, an FTP 4xx response code or an HTTP 5xx response code", hence we loop ourself. G_EXEC_DESC="Checking URL: $*" G_EXEC curl -ILfvm $G_CHECK_URL_TIMEOUT "$@" local exit_code=$? @@ -1443,7 +1443,7 @@ $log_content" || break # Exit error handler menu loop on cancel fi - # Apply and check permissions support, twice (just incase the current value is already set) + # Apply and check permissions support, twice (just in case the current value is already set) local permissions_failed=0 chmod 600 "$fp_target" @@ -1728,27 +1728,27 @@ $log_content" || break # Exit error handler menu loop on cancel local temp_f=$(( $temp * 9/5 + 32 )) if (( $temp >= 70 )); then - temp="\e[1;31mWARNING: $temp'C : $temp_f'F (Reducing the life of your device)\e[0m" + temp="\e[1;31mWARNING: $temp °C / $temp_f °F : Reducing the life of your device\e[0m" elif (( $temp >= 60 )); then - temp="\e[38;5;202m$temp'C : $temp_f'F \e[90m(Running hot, not recommended)\e[0m" + temp="\e[38;5;202m$temp °C / $temp_f °F \e[90m: Running hot, not recommended\e[0m" elif (( $temp >= 50 )); then - temp="\e[1;33m$temp'C : $temp_f'F \e[90m(Running warm, but safe)\e[0m" + temp="\e[1;33m$temp °C / $temp_f °F \e[90m: Running warm, but safe\e[0m" elif (( $temp >= 40 )); then - temp="\e[1;32m$temp'C : $temp_f'F \e[90m(Optimal temperature)\e[0m" + temp="\e[1;32m$temp °C / $temp_f °F \e[90m: Optimal temperature\e[0m" elif (( $temp >= 30 )); then - temp="\e[1;36m$temp'C : $temp_f'F \e[90m(Cool runnings)\e[0m" + temp="\e[1;36m$temp °C / $temp_f °F \e[90m: Cool runnings\e[0m" else - temp="\e[1;36m$temp'C : $temp_f'F \e[90m(Who put me in the freezer!)\e[0m" + temp="\e[1;36m$temp °C / $temp_f °F \e[90m: Who put me in the freezer!\e[0m" fi @@ -1766,14 +1766,14 @@ $log_content" || break # Exit error handler menu loop on cancel local usage=0 # ps: inaccurate but fast - while read -r line # Aside reasing raw, -r removes leading and trailing white spaces each line + while read -r line # Aside reading raw, -r removes leading and trailing white spaces each line do line=${line/.} # Remove decimal dot ((usage+=${line#0})) # Remove leading zero, if present, then sum up done < <(ps --no-headers -eo %cpu) # Single core usage in xy.z - # ps returns single core usage, so we devide by core count + # ps returns single core usage, so we divide by core count usage=$(printf '%.1f' "$(($usage*10/$G_HW_CPU_CORES+1))e-2") # Divide by 10 to compensate decimal dot removal, re-add decimal dot via printf conversion but assure last digit is rounded correctly echo "$usage" @@ -1819,7 +1819,7 @@ $log_content" || break # Exit error handler menu loop on cancel # $1=input # $2=Optional Min value range # $3=Optional Max value range - # disable_error=1 to disable notify/whiptail invalid value when recieved + # disable_error=1 to disable notify/whiptail invalid value when received # 1=no | scripts killed automatically # 0=yes # Usage = if G_CHECK_VALIDINT input; then @@ -1992,7 +1992,7 @@ $log_content" || break # Exit error handler menu loop on cancel local after=${4//\//\\\/} local error - # Clouring output + # Colouring output local yellow reset [[ -t 0 || -t 1 ]] && yellow='\e[33m' reset='\e[0m' diff --git a/dietpi/func/dietpi-set_hardware b/dietpi/func/dietpi-set_hardware index b44fbe7b98..e084d0866d 100644 --- a/dietpi/func/dietpi-set_hardware +++ b/dietpi/func/dietpi-set_hardware @@ -728,14 +728,6 @@ _EOF_ # Waveshare32 Lcd_Panel_Waveshare32_Enable_X11(){ - cat << '_EOF_' > /etc/X11/xorg.conf.d/99-waveshare32_xorg.conf -Section "Device" - Identifier "Allwinner A10/A13 FBDEV" - Driver "fbdev" - Option "fbdev" "/dev/fb1" - Option "SwapbuffersWait" "true" -EndSection -_EOF_ cat << '_EOF_' > /etc/X11/xorg.conf.d/99-waveshare32_calibration.conf Section "InputClass" Identifier "calibration" @@ -751,17 +743,17 @@ _EOF_ (( $G_HW_MODEL > 19 )) && { Unsupported_Input_Mode; return 1; } # Exit path for non-RPi/non-Odroid - # Disable 1st to reset any existing installations: + # Disable 1st to reset any existing installations Lcd_Panel_Waveshare32_Disable + # X11 + Lcd_Panel_Xorg_All_Enable + Lcd_Panel_Waveshare32_Enable_X11 + # RPi if (( $G_HW_MODEL < 10 )); then - # X11 - Lcd_Panel_Xorg_All_Enable - Lcd_Panel_Waveshare32_Enable_X11 - - G_EXEC curl -sSfL https://github.com/waveshare/LCD-show/raw/master/waveshare32b-overlay.dtb -o /boot/overlays/waveshare32b.dtbo + G_EXEC curl -sSfL 'https://raw.githubusercontent.com/waveshare/LCD-show/master/waveshare32b-overlay.dtb' -o /boot/overlays/waveshare32b.dtbo #consoleblank=0 no effect G_EXEC sed -i 's/rootwait/rootwait fbcon=map:10 fbcon=font:ProFont6x11 logo.nologo/' /boot/cmdline.txt @@ -777,19 +769,21 @@ _EOF_ G_CONFIG_INJECT 'dtoverlay=waveshare32b' 'dtoverlay=waveshare32b:rotate=270' /boot/config.txt - # Swap input axis - G_EXEC sed -i '/"SwapAxes"/c\ Option "SwapAxes" "1"' /etc/X11/xorg.conf.d/99-waveshare32_calibration.conf - # Move fb0 xorg.conf out the way: https://github.com/MichaIng/DietPi/issues/767 [[ -f '/usr/share/X11/xorg.conf.d/99-fbturbo.conf' ]] && G_EXEC mv /usr/share/X11/xorg.conf.d/99-fbturbo.conf /usr/share/X11/99-fbturbo.conf + # X11 + cat << '_EOF_' > /etc/X11/xorg.conf.d/99-waveshare32_xorg.conf +Section "Device" + Identifier "Allwinner A10/A13 FBDEV" + Driver "fbdev" + Option "fbdev" "/dev/fb1" + Option "SwapbuffersWait" "true" +EndSection +_EOF_ # Odroids else - # X11 - Lcd_Panel_Xorg_All_Enable - Lcd_Panel_Waveshare32_Enable_X11 - # con2fbmap, maps console (1) to panel(2). Run during boot. cat << _EOF_ > /etc/systemd/system/con2fbmap.service [Unit] @@ -818,7 +812,6 @@ Section "Device" Identifier "FBDEV" Driver "fbdev" Option "fbdev" "/dev/fb2" - #Option "SwapbuffersWait" "true" EndSection _EOF_ fi @@ -853,12 +846,12 @@ _EOF_ # Odroids elif (( $G_HW_MODEL < 20 )); then - if [[ -f '/etc/systemd/system/con2fbmap.service' ]]; then - + if [[ -f '/etc/systemd/system/con2fbmap.service' ]] + then G_EXEC systemctl disable --now con2fbmap - G_EXEC rm -R /etc/systemd/system/con2fbmap.service* - + G_EXEC rm /etc/systemd/system/con2fbmap.service fi + [[ -d '/etc/systemd/system/con2fbmap.service.d' ]] && G_EXEC rm -R /etc/systemd/system/con2fbmap.service.d [[ -f '/etc/modprobe.d/waveshare32.conf' ]] && G_EXEC rm /etc/modprobe.d/waveshare32.conf G_EXEC sed -i '/^[[:blank:]]*spicc/d' /etc/modules G_EXEC sed -i '/^[[:blank:]]*fbtft_device/d' /etc/modules @@ -867,7 +860,7 @@ _EOF_ } - # Odroid Cloudshell + # Odroid CloudShell Lcd_Panel_Odroidcloudshell_Enable(){ echo 'options fbtft_device name=hktft9340 busnum=1 rotate=270' > /etc/modprobe.d/odroid-cloudshell.conf @@ -896,7 +889,11 @@ _EOF_ Lcd_Panel_Xorg_All_Enable + # SPI needs to be disabled: https://github.com/MichaIng/DietPi/issues/4154 cat << '_EOF_' > /etc/modprobe.d/odroid-lcd35.conf +blacklist spidev +blacklist spi_gpio +blacklist spi_bitbang options fbtft_device name=flexpfb rotate=90 options flexfb chip=ili9488 _EOF_ @@ -912,6 +909,9 @@ _EOF_ G_CONFIG_INJECT "$i" "$i" /etc/modules done + # Rebuild initramfs to exclude SPI modules: https://github.com/MichaIng/DietPi/issues/4154 + G_EXEC update-initramfs -u + # Service # - XU4 if (( $G_HW_MODEL == 11 )); then @@ -990,11 +990,10 @@ _EOF_ [[ -f '/etc/X11/xorg.conf.d/99-calibration.conf' ]] && G_EXEC rm /etc/X11/xorg.conf.d/99-calibration.conf [[ -f '/etc/modprobe.d/odroid-lcd35.conf' ]] && G_EXEC rm /etc/modprobe.d/odroid-lcd35.conf - if [[ -f '/etc/systemd/system/odroid-lcd35.service' ]]; then - + if [[ -f '/etc/systemd/system/odroid-lcd35.service' ]] + then G_EXEC systemctl disable --now odroid-lcd35 G_EXEC rm /etc/systemd/system/odroid-lcd35.service - fi [[ -d '/etc/systemd/system/odroid-lcd35.service.d' ]] && G_EXEC rm -R /etc/systemd/system/odroid-lcd35.service.d [[ -f '/etc/X11/xorg.conf.d/99-odroid-lcd35.conf' ]] && G_EXEC rm /etc/X11/xorg.conf.d/99-odroid-lcd35.conf @@ -1149,7 +1148,6 @@ _EOF_ #///////////////////////////////////////////////////////////////////////////////////// # Bluetooth #///////////////////////////////////////////////////////////////////////////////////// - Bluetooth_Main(){ local aBLUETOOTH_MODULES=( @@ -1271,7 +1269,6 @@ Do you want to continue and disable the serial login console?' || return 1 #///////////////////////////////////////////////////////////////////////////////////// # Network #///////////////////////////////////////////////////////////////////////////////////// - Enable_IPv6(){ if [[ ! -d '/proc/sys/net/ipv6' ]]; then @@ -1467,7 +1464,6 @@ _EOF_ #///////////////////////////////////////////////////////////////////////////////////// # serialconsole #///////////////////////////////////////////////////////////////////////////////////// - Serial_Main(){ #------------------------------------------------------------------------------------- @@ -1567,11 +1563,13 @@ Do you want to continue and DISABLE Bluetooth now?' || return 1 if [[ $INPUT_ADDITIONAL ]]; then G_DIETPI-NOTIFY 2 "Disabling serial-getty on: /dev/$INPUT_ADDITIONAL" + G_EXEC systemctl unmask "serial-getty@$INPUT_ADDITIONAL" # Stop getty only if not currently attached, failsafe estimation in case of symlinks local stop='--now' [[ $(readlink -f "$(tty)") == $(readlink -f "/dev/$INPUT_ADDITIONAL") ]] && stop= # shellcheck disable=SC2086 G_EXEC systemctl disable $stop "serial-getty@$INPUT_ADDITIONAL" + unset -v stop # Place a mask only if device exists [[ -e /dev/$INPUT_ADDITIONAL ]] && G_EXEC systemctl mask "serial-getty@$INPUT_ADDITIONAL"