diff --git a/.build/images/Quartz64/quartz64_defconfig b/.build/images/Quartz64/quartz64_defconfig index c2190049f6..d99fec07e1 100644 --- a/.build/images/Quartz64/quartz64_defconfig +++ b/.build/images/Quartz64/quartz64_defconfig @@ -36,6 +36,7 @@ CONFIG_BACKLIGHT_PWM=m CONFIG_BATTERY_SBS=m CONFIG_BCM54140_PHY=m CONFIG_BCM7XXX_PHY=m +CONFIG_BINFMT_MISC=m CONFIG_BLK_CGROUP=y CONFIG_BLK_DEV_DM=m CONFIG_BLK_DEV_LOOP=m @@ -65,7 +66,6 @@ CONFIG_BT_BNEP_MC_FILTER=y CONFIG_BT_BNEP_PROTO_FILTER=y CONFIG_BT_HCIBTSDIO=m CONFIG_BT_HCIBTUSB=m -# CONFIG_BT_HCIBTUSB_BCM is not set CONFIG_BT_HCIUART=m CONFIG_BT_HCIUART_BCM=y CONFIG_BT_HCIUART_LL=y @@ -88,6 +88,7 @@ CONFIG_CGROUP_DEVICE=y CONFIG_CGROUP_FREEZER=y CONFIG_CGROUP_HUGETLB=y CONFIG_CGROUP_MISC=y +CONFIG_CGROUP_NET_PRIO=y CONFIG_CGROUP_PERF=y CONFIG_CGROUP_PIDS=y CONFIG_CHARGER_RK817=y @@ -100,9 +101,7 @@ CONFIG_COMMON_CLK_RK808=y CONFIG_COMMON_CLK_SCMI=y CONFIG_COMMON_CLK_SCPI=y CONFIG_COMPAT_32BIT_TIME=y -# CONFIG_COMPAT_BRK is not set CONFIG_CONSOLE_LOGLEVEL_DEFAULT=15 -# CONFIG_CORE_DUMP_DEFAULT_ELF_HEADERS is not set CONFIG_CPUFREQ_DT=y CONFIG_CPUSETS=y CONFIG_CPU_FREQ=y @@ -137,6 +136,7 @@ CONFIG_CRYPTO_ECDH=y CONFIG_CRYPTO_ECHAINIV=y CONFIG_CRYPTO_GHASH_ARM64_CE=y CONFIG_CRYPTO_MD4=y +CONFIG_CRYPTO_SEQIV=m CONFIG_CRYPTO_SHA1_ARM64_CE=y CONFIG_CRYPTO_SHA2_ARM64_CE=y CONFIG_CRYPTO_SHA3_ARM64=m @@ -190,7 +190,6 @@ CONFIG_DRM_SII902X=m CONFIG_DRM_SIMPLE_BRIDGE=m CONFIG_DRM_THINE_THC63LVD1024=m CONFIG_DRM_TI_SN65DSI86=m -# CONFIG_DVB_NET is not set CONFIG_DWMAC_DWC_QOS_ETH=y CONFIG_DW_DMAC=m CONFIG_DW_DMAC_PCI=m @@ -220,7 +219,6 @@ CONFIG_FANOTIFY_ACCESS_PERMISSIONS=y CONFIG_FB=y CONFIG_FB_SIMPLE=y CONFIG_FM10K=y -# CONFIG_FSL_ERRATUM_A008585 is not set CONFIG_FUNCTION_PROFILER=y CONFIG_FUNCTION_TRACER=y CONFIG_FUSE_FS=y @@ -238,26 +236,18 @@ CONFIG_GPIO_PL061=y CONFIG_GPIO_SYSCON=y CONFIG_GPIO_XGENE=y CONFIG_HIBERNATION=y -# CONFIG_HID_A4TECH is not set -# CONFIG_HID_APPLE is not set +CONFIG_HIDRAW=y CONFIG_HID_BATTERY_STRENGTH=y -# CONFIG_HID_BELKIN is not set -# CONFIG_HID_EZKEY is not set -# CONFIG_HID_ITE is not set -# CONFIG_HID_KENSINGTON is not set CONFIG_HID_LOGITECH_HIDPP=m CONFIG_HID_MICROSOFT=m CONFIG_HID_MONTEREY=m CONFIG_HID_MULTITOUCH=y CONFIG_HID_REDRAGON=m -CONFIG_HIDRAW=y CONFIG_HIGH_RES_TIMERS=y -# CONFIG_HISILICON_ERRATUM_161010101 is not set CONFIG_HOTPLUG_PCI=y CONFIG_HOTPLUG_PCI_ACPI=y CONFIG_HUGETLBFS=y CONFIG_HWSPINLOCK=y -# CONFIG_HW_RANDOM_CN10K is not set CONFIG_I2C_CHARDEV=y CONFIG_I2C_DESIGNWARE_PLATFORM=y CONFIG_I2C_GPIO=m @@ -282,6 +272,7 @@ CONFIG_IKCONFIG=y CONFIG_IKCONFIG_PROC=y CONFIG_INDIRECT_PIO=y CONFIG_INET=y +CONFIG_INET_ESP=m CONFIG_INPUT_EVDEV=y CONFIG_INPUT_FF_MEMLESS=y CONFIG_INPUT_MATRIXKMAP=y @@ -306,12 +297,16 @@ CONFIG_IPMI_HANDLER=m CONFIG_IPMI_SI=m CONFIG_IPV6=y CONFIG_IPV6_SIT=n +CONFIG_IP_ADVANCED_ROUTER=y CONFIG_IP_MULTICAST=y +CONFIG_IP_MULTIPLE_TABLES=y CONFIG_IP_NF_FILTER=m CONFIG_IP_NF_IPTABLES=m CONFIG_IP_NF_MANGLE=m +CONFIG_IP_NF_MATCH_RPFILTER=m CONFIG_IP_NF_NAT=m CONFIG_IP_NF_TARGET_MASQUERADE=m +CONFIG_IP_NF_TARGET_REDIRECT=m CONFIG_IP_NF_TARGET_REJECT=m CONFIG_IP_NF_TARGET_SYNPROXY=m CONFIG_IP_PNP=y @@ -336,6 +331,10 @@ CONFIG_IP_SET_HASH_NETPORTNET=m CONFIG_IP_SET_LIST_SET=m CONFIG_IP_SET_MAX=256 CONFIG_IP_VS=m +CONFIG_IP_VS_NFCT=y +CONFIG_IP_VS_PROTO_TCP=y +CONFIG_IP_VS_PROTO_UDP=y +CONFIG_IP_VS_RR=m CONFIG_IRQ_TIME_ACCOUNTING=y CONFIG_ISCSI_TCP=m CONFIG_IXGB=y @@ -412,7 +411,6 @@ CONFIG_MEMORY_FAILURE=y CONFIG_MEMTEST=y CONFIG_MFD_RK8XX_I2C=y CONFIG_MFD_RK8XX_SPI=y -# CONFIG_MFD_VEXPRESS_SYSREG is not set CONFIG_MHI_WWAN_MBIM=m CONFIG_MICREL_PHY=y CONFIG_MICROSEMI_PHY=y @@ -546,8 +544,9 @@ CONFIG_NET_ACT_GACT=m CONFIG_NET_ACT_GATE=m CONFIG_NET_ACT_MIRRED=m CONFIG_NET_CLS_ACT=y -CONFIG_NET_CLS_BPF=m CONFIG_NET_CLS_BASIC=m +CONFIG_NET_CLS_BPF=m +CONFIG_NET_CLS_CGROUP=m CONFIG_NET_CLS_FLOWER=m CONFIG_NET_DSA=m CONFIG_NET_SCHED=y @@ -556,76 +555,16 @@ CONFIG_NET_SCH_ETF=m CONFIG_NET_SCH_INGRESS=m CONFIG_NET_SCH_MQPRIO=m CONFIG_NET_SCH_TAPRIO=m -# CONFIG_NET_VENDOR_3COM is not set -# CONFIG_NET_VENDOR_ADAPTEC is not set -# CONFIG_NET_VENDOR_AGERE is not set -# CONFIG_NET_VENDOR_ALACRITECH is not set -# CONFIG_NET_VENDOR_ALTEON is not set -# CONFIG_NET_VENDOR_AMAZON is not set -# CONFIG_NET_VENDOR_AMD is not set -# CONFIG_NET_VENDOR_AQUANTIA is not set -# CONFIG_NET_VENDOR_ARC is not set -# CONFIG_NET_VENDOR_ASIX is not set -# CONFIG_NET_VENDOR_ATHEROS is not set -# CONFIG_NET_VENDOR_BROADCOM is not set -# CONFIG_NET_VENDOR_BROCADE is not set -# CONFIG_NET_VENDOR_CADENCE is not set -# CONFIG_NET_VENDOR_CAVIUM is not set -# CONFIG_NET_VENDOR_CHELSIO is not set -# CONFIG_NET_VENDOR_CISCO is not set -# CONFIG_NET_VENDOR_CORTINA is not set -# CONFIG_NET_VENDOR_DEC is not set -# CONFIG_NET_VENDOR_DLINK is not set -# CONFIG_NET_VENDOR_EMULEX is not set -# CONFIG_NET_VENDOR_ENGLEDER is not set -# CONFIG_NET_VENDOR_EZCHIP is not set -# CONFIG_NET_VENDOR_GOOGLE is not set -# CONFIG_NET_VENDOR_HISILICON is not set -# CONFIG_NET_VENDOR_HUAWEI is not set -# CONFIG_NET_VENDOR_LITEX is not set -# CONFIG_NET_VENDOR_MARVELL is not set -# CONFIG_NET_VENDOR_MELLANOX is not set -# CONFIG_NET_VENDOR_MICREL is not set -# CONFIG_NET_VENDOR_MICROCHIP is not set -# CONFIG_NET_VENDOR_MICROSEMI is not set -# CONFIG_NET_VENDOR_MICROSOFT is not set -# CONFIG_NET_VENDOR_MYRI is not set -# CONFIG_NET_VENDOR_NATSEMI is not set -# CONFIG_NET_VENDOR_NETERION is not set -# CONFIG_NET_VENDOR_NETRONOME is not set -# CONFIG_NET_VENDOR_NI is not set -# CONFIG_NET_VENDOR_NVIDIA is not set -# CONFIG_NET_VENDOR_OKI is not set -# CONFIG_NET_VENDOR_PENSANDO is not set -# CONFIG_NET_VENDOR_QLOGIC is not set -# CONFIG_NET_VENDOR_QUALCOMM is not set -# CONFIG_NET_VENDOR_RDC is not set -# CONFIG_NET_VENDOR_RENESAS is not set -# CONFIG_NET_VENDOR_ROCKER is not set -# CONFIG_NET_VENDOR_SAMSUNG is not set -# CONFIG_NET_VENDOR_SEEQ is not set -# CONFIG_NET_VENDOR_SILAN is not set -# CONFIG_NET_VENDOR_SIS is not set -# CONFIG_NET_VENDOR_SMSC is not set -# CONFIG_NET_VENDOR_SOCIONEXT is not set -# CONFIG_NET_VENDOR_SOLARFLARE is not set -# CONFIG_NET_VENDOR_SUN is not set -# CONFIG_NET_VENDOR_TEHUTI is not set -# CONFIG_NET_VENDOR_TI is not set -# CONFIG_NET_VENDOR_VERTEXCOM is not set -# CONFIG_NET_VENDOR_VIA is not set -# CONFIG_NET_VENDOR_WIZNET is not set -# CONFIG_NET_VENDOR_XILINX is not set CONFIG_NEW_LEDS=y CONFIG_NFC=m CONFIG_NFC_NCI=m CONFIG_NFC_S3FWRN5_I2C=m +CONFIG_NFSD=m +CONFIG_NFSD_V4=y CONFIG_NFS_FS=y CONFIG_NFS_V4=y CONFIG_NFS_V4_1=y CONFIG_NFS_V4_2=y -CONFIG_NFSD=m -CONFIG_NFSD_V4=y CONFIG_NFT_BRIDGE_META=m CONFIG_NFT_BRIDGE_REJECT=m CONFIG_NFT_COMPAT=m @@ -656,7 +595,6 @@ CONFIG_NFT_REJECT=m CONFIG_NFT_REJECT_INET=m CONFIG_NFT_REJECT_IPV4=m CONFIG_NFT_REJECT_IPV6=m -# CONFIG_NFT_REJECT_NETDEV is not set CONFIG_NFT_SOCKET=m CONFIG_NFT_SYNPROXY=m CONFIG_NFT_TPROXY=m @@ -733,6 +671,7 @@ CONFIG_NTFS3_LZX_XPRESS=y CONFIG_NUMA=y CONFIG_NUMA_BALANCING=y CONFIG_NVMEM_RMEM=m +CONFIG_NVMEM_ROCKCHIP_EFUSE=y CONFIG_NVME_HWMON=y CONFIG_OF_OVERLAY=y CONFIG_OPTEE=y @@ -803,7 +742,6 @@ CONFIG_REMOTEPROC_CDEV=y CONFIG_RFKILL=y CONFIG_ROCKCHIP_DW_HDMI=y CONFIG_ROCKCHIP_DW_MIPI_DSI=y -CONFIG_NVMEM_ROCKCHIP_EFUSE=y CONFIG_ROCKCHIP_INNO_HDMI=y CONFIG_ROCKCHIP_IODOMAIN=y CONFIG_ROCKCHIP_IOMMU=y @@ -848,13 +786,11 @@ CONFIG_SATA_MV=y CONFIG_SATA_SIL24=y CONFIG_SCHEDSTATS=y CONFIG_SCHED_AUTOGROUP=y -# CONFIG_SCHED_DEBUG is not set CONFIG_SCHED_MC=y CONFIG_SCHED_SMT=y CONFIG_SCSI_HISI_SAS=y CONFIG_SCSI_HISI_SAS_PCI=y CONFIG_SCSI_MPT3SAS=m -# CONFIG_SCSI_PROC_FS is not set CONFIG_SCSI_SAS_ATA=y CONFIG_SCSI_UFSHCD=y CONFIG_SCSI_UFSHCD_PLATFORM=y @@ -870,7 +806,6 @@ CONFIG_SERIAL_8250=y CONFIG_SERIAL_8250_CONSOLE=y CONFIG_SERIAL_8250_DW=y CONFIG_SERIAL_8250_EXTENDED=y -# CONFIG_SERIAL_8250_PERICOM is not set CONFIG_SERIAL_8250_SHARE_IRQ=y CONFIG_SERIAL_AMBA_PL011=y CONFIG_SERIAL_AMBA_PL011_CONSOLE=y @@ -883,8 +818,6 @@ CONFIG_SERIAL_OF_PLATFORM=y CONFIG_SERIAL_XILINX_PS_UART=y CONFIG_SERIAL_XILINX_PS_UART_CONSOLE=y CONFIG_SERIO_AMBAKMI=y -# CONFIG_SERIO_SERPORT is not set -# CONFIG_SLIMBUS is not set CONFIG_SMB_SERVER=m CONFIG_SMB_SERVER_KERBEROS5=y CONFIG_SND=y @@ -958,7 +891,6 @@ CONFIG_SRAM=y CONFIG_STAGING=y CONFIG_STAGING_MEDIA=y CONFIG_STMMAC_ETH=y -# CONFIG_SURFACE_PLATFORMS is not set CONFIG_SYSFB_SIMPLEFB=y CONFIG_SYSVIPC=y CONFIG_TASKSTATS=y @@ -1088,33 +1020,13 @@ CONFIG_WATCHDOG=y CONFIG_WATCHDOG_NOWAYOUT=y CONFIG_WATCHDOG_SYSFS=y CONFIG_WIREGUARD=m -# CONFIG_WIREGUARD_DEBUG is not set -# CONFIG_WLAN_VENDOR_ADMTEK is not set -# CONFIG_WLAN_VENDOR_ATH is not set -# CONFIG_WLAN_VENDOR_ATMEL is not set -# CONFIG_WLAN_VENDOR_CISCO is not set -# CONFIG_WLAN_VENDOR_INTEL is not set -# CONFIG_WLAN_VENDOR_INTERSIL is not set -# CONFIG_WLAN_VENDOR_MARVELL is not set -# CONFIG_WLAN_VENDOR_MEDIATEK is not set -# CONFIG_WLAN_VENDOR_MICROCHIP is not set -# CONFIG_WLAN_VENDOR_QUANTENNA is not set -# CONFIG_WLAN_VENDOR_RALINK is not set -# CONFIG_WLAN_VENDOR_RSI is not set -# CONFIG_WLAN_VENDOR_ST is not set -# CONFIG_WLAN_VENDOR_TI is not set -# CONFIG_WLAN_VENDOR_ZYDAS is not set CONFIG_WQ_POWER_EFFICIENT_DEFAULT=y CONFIG_WQ_WATCHDOG=y CONFIG_XEN=y -# CONFIG_XENFS is not set -# CONFIG_XEN_BACKEND is not set -# CONFIG_XEN_BALLOON is not set -# CONFIG_XEN_DEV_EVTCHN is not set -# CONFIG_XEN_FBDEV_FRONTEND is not set -# CONFIG_XEN_GNTDEV is not set -# CONFIG_XEN_GRANT_DEV_ALLOC is not set -# CONFIG_XEN_SYS_HYPERVISOR is not set +CONFIG_XFRM=y +CONFIG_XFRM_ALGO=m +CONFIG_XFRM_ESP=m +CONFIG_XFRM_USER=m CONFIG_ZRAM=m CONFIG_ZRAM_DEF_COMP_ZSTD=y CONFIG_ZRAM_MEMORY_TRACKING=y diff --git a/.build/images/dietpi-build b/.build/images/dietpi-build index 53ace2c6d5..ddf9b67d94 100755 --- a/.build/images/dietpi-build +++ b/.build/images/dietpi-build @@ -54,6 +54,8 @@ GITBRANCH='master' GITOWNER='MichaIng' EDITION= SUFFIX= +SKIP_ARCHIVE=0 +UPLOAD_SCRIPT= ADD_DOS_PART=1 SIGN_PASS= TEST_KERNEL=0 @@ -72,6 +74,8 @@ do '-o') shift; GITOWNER=$1;; '-e') shift; EDITION=$1;; '-s') shift; SUFFIX=$1;; + '--skip-archive') SKIP_ARCHIVE=1;; + '--upload-script') shift; UPLOAD_SCRIPT=$1;; '--no-dos-part') ADD_DOS_PART=0;; '--sign') shift; SIGN_PASS=$1;; '--test-kernel') TEST_KERNEL=1;; @@ -159,6 +163,7 @@ case $HW_MODEL in 90) iname='RadxaZERO3' HW_ARCH=3 PTTYPE='gpt' partition_start=16 root_size=1100;; 91) iname='OrangePi5Max' HW_ARCH=3 PTTYPE='gpt' partition_start=16 root_size=1100;; 92) iname='NanoPiM6' HW_ARCH=3 PTTYPE='gpt' partition_start=16 root_size=1100;; + 93) iname='OrangePi5Pro' HW_ARCH=3 PTTYPE='gpt' partition_start=16 root_size=1200;; *) G_DIETPI-NOTIFY 1 "Invalid hardware model \"$HW_MODEL\" passed, aborting..."; exit 1;; esac @@ -477,9 +482,11 @@ G_EXEC losetup -d "$FP_LOOP" # DietPi-Imager ########################################## # Do not pack and upload raw VM image if not explicitly requested -[[ $VMTYPE && ! $VMTYPE =~ ^(raw|all)$ ]] && SKIP_ARCHIVE=1 || SKIP_ARCHIVE=0 -export FP_ROOT_DEV CLONING_TOOL OUTPUT_IMG_NAME MOUNT_IT='Off' SKIP_ARCHIVE SKIP_FIRSTBOOT_RESIZE=1 +[[ $VMTYPE && ! $VMTYPE =~ ^(raw|all)$ ]] && SKIP_ARCHIVE=1 UPLOAD_SCRIPT='' +export FP_ROOT_DEV CLONING_TOOL OUTPUT_IMG_NAME MOUNT_IT='Off' SKIP_FIRSTBOOT_RESIZE=1 IMAGER_ARGS=("$OUTPUT_IMG_NAME.img") +(( $SKIP_ARCHIVE )) && IMAGER_ARGS+=('--skip-archive') +[[ $UPLOAD_SCRIPT ]] && IMAGER_ARGS+=('--upload-script' "$UPLOAD_SCRIPT") (( $ADD_DOS_PART )) && IMAGER_ARGS+=('--add-dos-part') [[ $HW_MODEL == [1245] ]] && IMAGER_ARGS+=('--configs-to-boot') [[ $SIGN_PASS ]] && IMAGER_ARGS+=('--sign' "$SIGN_PASS") @@ -713,13 +720,18 @@ fi ########################################## # Virtual machines ########################################## -# NB: LZMA2 ultra compression requires much memory per thread. 1 GiB is not sufficient for >2 threads, hence use "-mmt2" to limit used CPU threads to "2" on 1 GiB devices with more than two cores. -limit_threads=() -(( $(free -m | mawk '/Mem:/{print $2}') < 1750 && $(nproc) > 2 )) && limit_threads=('-T2') - # Since qemu-img does not support VMDK and VHDX resizing, we need to resize the raw .img. It is usually done as sparse file, hence the actual disk usage does not change. G_EXEC qemu-img resize "$OUTPUT_IMG_NAME.img" 8G +####### ISO ############################## +if [[ $VMTYPE == all ]] +then + CLONING_TOOL='Clonezilla' OUTPUT_IMG_NAME="${OUTPUT_IMG_NAME}_Installer" + G_DIETPI-NOTIFY 2 "Running DietPi-Imager for $G_GITOWNER/$G_GITBRANCH" + bash -c "$(curl -sSf "https://raw.githubusercontent.com/$G_GITOWNER/DietPi/$G_GITBRANCH/.build/images/dietpi-imager")" 'DietPi-Imager' "${IMAGER_ARGS[@]}" || exit 1 + CLONING_TOOL='dd' OUTPUT_IMG_NAME=${OUTPUT_IMG_NAME%_Installer} +fi + ####### VMX/VMware/Parallels ############# if [[ $VMTYPE =~ ^(vmx|all)$ ]] then @@ -771,7 +783,7 @@ ethernet0.present = "TRUE" extendedConfigFile = "$image_name.vmxf" floppy0.present = "FALSE" _EOF_ - G_EXEC_DESC='Creating VMware tar.xz archive' XZ_OPT="-9e ${limit_threads[*]}" G_EXEC tar -cJf "$image_name.tar.xz" "$image_name.vmdk" "$image_name.vmx" + G_EXEC_DESC='Creating VMware tar.xz archive' XZ_OPT='-9e -T0 -M75%' G_EXEC tar -cJf "$image_name.tar.xz" "$image_name.vmdk" "$image_name.vmx" G_EXEC rm "$image_name.vmdk" "$image_name.vmx" G_EXEC_DESC='Generating SHA256 hash' G_EXEC eval "sha256sum '$image_name.tar.xz' > '$image_name.tar.xz.sha256'" signature=() @@ -900,7 +912,7 @@ _EOF_ [[ $VMTYPE == 'all' ]] || G_EXEC rm "$image_name.vmdk" G_EXEC rm "$image_name."{ovf,mf} - G_EXEC_DESC='Creating ESXi xz archive' G_EXEC xz -9e "${limit_threads[@]}" "$image_name.ova" + G_EXEC_DESC='Creating ESXi xz archive' G_EXEC xz -9e -T0 -M75% "$image_name.ova" G_EXEC_DESC='Generating SHA256 hash' G_EXEC eval "sha256sum '$image_name.ova.xz' > '$image_name.ova.xz.sha256'" signature=() [[ $SIGN_PASS ]] && { G_DIETPI-NOTIFY 2 'Signing archive ...'; gpg --batch --pinentry-mode loopback --passphrase "$SIGN_PASS" -b --armor "$image_name.ova.xz" || exit 1; signature=("$image_name.ova.xz.asc"); } @@ -1051,7 +1063,7 @@ _EOF_ G_EXEC tar -cf "$image_name.ova" "$image_name."{ovf,vmdk,mf} G_EXEC rm "$image_name."{ovf,vmdk,mf} - G_EXEC_DESC='Creating VirtualBox xz archive' G_EXEC xz -9e "${limit_threads[@]}" "$image_name.ova" + G_EXEC_DESC='Creating VirtualBox xz archive' G_EXEC xz -9e -T0 -M75% "$image_name.ova" G_EXEC_DESC='Generating SHA256 hash' G_EXEC eval "sha256sum '$image_name.ova.xz' > '$image_name.ova.xz.sha256'" signature=() [[ $SIGN_PASS ]] && { G_DIETPI-NOTIFY 2 'Signing archive ...'; gpg --batch --pinentry-mode loopback --passphrase "$SIGN_PASS" -b --armor "$image_name.ova.xz" || exit 1; signature=("$image_name.ova.xz.asc"); } @@ -1065,7 +1077,7 @@ then # Convert raw image to VHDX G_EXEC qemu-img convert -O vhdx "$OUTPUT_IMG_NAME.img" "$image_name.vhdx" - G_EXEC_DESC='Creating Hyper-V xz archive' G_EXEC xz -9e "${limit_threads[@]}" "$image_name.vhdx" + G_EXEC_DESC='Creating Hyper-V xz archive' G_EXEC xz -9e -T0 -M75% "$image_name.vhdx" G_EXEC_DESC='Generating SHA256 hash' G_EXEC eval "sha256sum '$image_name.vhdx.xz' > '$image_name.vhdx.xz.sha256'" signature=() [[ $SIGN_PASS ]] && { G_DIETPI-NOTIFY 2 'Signing archive ...'; gpg --batch --pinentry-mode loopback --passphrase "$SIGN_PASS" -b --armor "$image_name.vhdx.xz" || exit 1; signature=("$image_name.vhdx.xz.asc"); } @@ -1230,7 +1242,7 @@ _EOF_ _EOF_ - G_EXEC_DESC='Creating UTM tar.xz archive' XZ_OPT="-9e ${limit_threads[*]}" G_EXEC tar -cJf "$image_name.tar.xz" "$image_name.utm" + G_EXEC_DESC='Creating UTM tar.xz archive' XZ_OPT='-9e -T0 -M75%' G_EXEC tar -cJf "$image_name.tar.xz" "$image_name.utm" G_EXEC rm -R "$image_name.utm" G_EXEC_DESC='Generating SHA256 hash' G_EXEC eval "sha256sum '$image_name.tar.xz' > '$image_name.tar.xz.sha256'" signature=() @@ -1241,28 +1253,11 @@ fi ####### Proxmox ############################ if [[ $VMTYPE =~ ^(proxmox|all)$ ]] then - # Enable systemd-logind for APCI functionality - # - Create loop device - FP_LOOP=$(losetup -f) - G_EXEC losetup "$FP_LOOP" "$OUTPUT_IMG_NAME.img" - G_EXEC partprobe "$FP_LOOP" - G_EXEC partx -u "$FP_LOOP" - # - Mount and edit dietpi.txt - G_EXEC mkdir rootfs - G_EXEC mount "${FP_LOOP}p1" rootfs - G_CONFIG_INJECT 'AUTO_UNMASK_LOGIND=' 'AUTO_UNMASK_LOGIND=1' rootfs/boot/dietpi.txt - # - Remove loop device - G_EXEC sync - G_EXEC sleep 1 - G_EXEC umount -R rootfs - G_EXEC rmdir rootfs - G_EXEC losetup -d "$FP_LOOP" - # Convert raw image to QCOW2 image_name=${OUTPUT_IMG_NAME/_VM-/_Proxmox-} G_EXEC qemu-img convert -c -O qcow2 "$OUTPUT_IMG_NAME.img" "$image_name.qcow2" - G_EXEC_DESC='Creating Proxmox xz archive' G_EXEC xz -9e "${limit_threads[@]}" "$image_name.qcow2" + G_EXEC_DESC='Creating Proxmox xz archive' G_EXEC xz -9e -T0 -M75% "$image_name.qcow2" G_EXEC_DESC='Generating SHA256 hash' G_EXEC eval "sha256sum '$image_name.qcow2.xz' > '$image_name.qcow2.xz.sha256'" signature=() [[ $SIGN_PASS ]] && { G_DIETPI-NOTIFY 2 'Signing archive ...'; gpg --batch --pinentry-mode loopback --passphrase "$SIGN_PASS" -b --armor "$image_name.qcow2.xz" || exit 1; signature=("$image_name.qcow2.xz.asc"); } diff --git a/.build/images/dietpi-imager b/.build/images/dietpi-imager index 28704f039a..af0885f60c 100755 --- a/.build/images/dietpi-imager +++ b/.build/images/dietpi-imager @@ -70,12 +70,15 @@ [[ $SKIP_FIRSTBOOT_RESIZE == 1 ]] || SKIP_FIRSTBOOT_RESIZE=0 [[ $SHRINK_ONLY == 1 ]] || SHRINK_ONLY=0 [[ $SKIP_ARCHIVE == 1 ]] || SKIP_ARCHIVE=0 + UPLOAD_SCRIPT= ADD_DOS_PART=0 # trailing FAT partition for first boot config files, automatically imported and partition removed on first boot CONFIGS_TO_BOOT=0 # for new RPi kernel/firmware stack where a boot FAT partition exists, but is mounted to /boot/firmware instead of /boot SIGN_PASS= while (( $# )) do case $1 in + '--skip-archive') SKIP_ARCHIVE=1;; + '--upload-script') shift; UPLOAD_SCRIPT=$1;; '--add-dos-part') ADD_DOS_PART=1;; '--configs-to-boot') CONFIGS_TO_BOOT=1;; '--sign') shift; SIGN_PASS=$1;; @@ -319,7 +322,7 @@ G_DIETPI-NOTIFY 0 "Mounted the image ($FP_SOURCE_IMG) as loopback device: $FP_SOURCE" FP_ROOT_DEV="${FP_SOURCE}p${FP_ROOT_DEV: -1}" fi - [[ $CLONING_TOOL == 'dd' ]] && OUTPUT_IMG_EXT='img' || OUTPUT_IMG_EXT='iso' + [[ $CLONING_TOOL == 'dd' ]] && OUTPUT_IMG_EXT='img' || OUTPUT_IMG_EXT='iso' SKIP_ARCHIVE=1 # Flashing tools do not support xz-compressed ISOs G_DIETPI-NOTIFY 0 "\e[0mCreating minified image from: - $SOURCE_TYPE: ${FP_SOURCE_IMG:-$FP_SOURCE} - Root device: $FP_ROOT_DEV @@ -336,6 +339,8 @@ unset -v main_menu_choice fi + FP_FINAL="$FP_ORIGIN/$OUTPUT_IMG_NAME.$OUTPUT_IMG_EXT" + # Detect partition table type, failsafe detection of MBR to debug possibly other/unknown wording/partition table types PART_TABLE_TYPE=$(lsblk -no PTTYPE "$FP_ROOT_DEV") if [[ $PART_TABLE_TYPE == 'dos' ]] @@ -608,7 +613,7 @@ _EOF_ G_EXEC truncate -s "$IMAGE_SIZE" "$FP_SOURCE_IMG" # Rename if source image != output image yet - [[ $(readlink -f "$PWD/$OUTPUT_IMG_NAME.$OUTPUT_IMG_EXT") != "$(readlink -f "$FP_SOURCE_IMG")" ]] && G_EXEC mv "$FP_SOURCE_IMG" "$OUTPUT_IMG_NAME.$OUTPUT_IMG_EXT" + [[ $(readlink -f "$FP_FINAL") != "$(readlink -f "$FP_SOURCE_IMG")" ]] && G_EXEC mv "$FP_SOURCE_IMG" "$FP_FINAL" # Check for sufficient free disk space to store the xz archive with 100 MiB buffer (( $SKIP_ARCHIVE )) || G_CHECK_FREESPACE . $(( $IMAGE_SIZE * 15/100 / 1024**2 + 100 )) || exit 1 @@ -622,7 +627,7 @@ _EOF_ G_CHECK_FREESPACE . $(( $IMAGE_SIZE * $free_space_percent/100 / 1024**2 + 100 )) || exit 1 G_DIETPI-NOTIFY 2 "Creating final image with actually used size: $(( $IMAGE_SIZE / 1024**2 + 1 )) MiB" - G_EXEC_OUTPUT=1 G_EXEC dd if="$FP_SOURCE" of="$OUTPUT_IMG_NAME.$OUTPUT_IMG_EXT" bs=1M status=progress count=$(( $IMAGE_SIZE / 1024**2 + 1 )) + G_EXEC_OUTPUT=1 G_EXEC dd if="$FP_SOURCE" of="$FP_FINAL" bs=1M status=progress count=$(( $IMAGE_SIZE / 1024**2 + 1 )) # Clonezilla target else @@ -741,40 +746,54 @@ _EOF_ (( $REMOVE_IMG )) && G_EXEC rm "$FP_SOURCE_IMG" # Generate ISO file with Clonezilla Live + DietPi image - G_EXEC_DESC="Generating $OUTPUT_IMG_NAME.$OUTPUT_IMG_EXT" G_EXEC_OUTPUT=1 G_EXEC xorriso \ + G_EXEC_DESC="Generating $FP_FINAL" G_EXEC_OUTPUT=1 G_EXEC xorriso \ -as mkisofs -R -r -J -joliet-long -l -iso-level 3 -isohybrid-mbr /usr/lib/ISOLINUX/isohdpfx.bin -partition_offset 16 \ -publisher 'DietPi - Lightweight justice for your SBC; https://dietpi.com/;' -volid 'DIETPI_INSTALLER' \ -A "clonezilla-live-$CLONEZILLA_VERSION-amd64" -b syslinux/isolinux.bin -c syslinux/boot.cat -no-emul-boot -boot-load-size 4 \ -boot-info-table -eltorito-alt-boot --efi-boot boot/grub/efi.img -isohybrid-gpt-basdat -isohybrid-apm-hfsplus \ - -o "$OUTPUT_IMG_NAME.$OUTPUT_IMG_EXT" tmpiso + -o "$FP_FINAL" tmpiso G_EXEC rm -R tmpiso fi # Move GPT backup partition table to end of drive if [[ $CLONING_TOOL != 'Clonezilla' && $PART_TABLE_TYPE == 'gpt' ]] then - G_EXEC_DESC='Re-creating GPT backup partition table and header at end of image' G_EXEC_OUTPUT=1 G_EXEC sgdisk -e "$OUTPUT_IMG_NAME.$OUTPUT_IMG_EXT" + G_EXEC_DESC='Re-creating GPT backup partition table and header at end of image' G_EXEC_OUTPUT=1 G_EXEC sgdisk -e "$FP_FINAL" G_EXEC sync fi - # Exit now when archive shall be skipped - (( $SKIP_ARCHIVE )) && exit 0 + # Generate xz archive if requested + local archive_text='' + if (( ! $SKIP_ARCHIVE )) + then + [[ -f $FP_FINAL.xz ]] && G_EXEC rm "$FP_FINAL.xz" + G_EXEC_DESC='Creating final xz archive' G_EXEC xz -9e -T0 -M75% -k "$FP_FINAL" + FP_FINAL+='.xz' + archive_text="\nxz archive: $FP_FINAL" + fi - # Generate xz archive - [[ -f $OUTPUT_IMG_NAME.$OUTPUT_IMG_EXT.xz ]] && G_EXEC rm "$OUTPUT_IMG_NAME.$OUTPUT_IMG_EXT.xz" - G_EXEC_DESC='Creating final xz archive' G_EXEC xz -9e -T0 -M75% -k "$OUTPUT_IMG_NAME.$OUTPUT_IMG_EXT" - G_EXEC_DESC='Generating SHA256 hash' G_EXEC eval "sha256sum '$OUTPUT_IMG_NAME.$OUTPUT_IMG_EXT.xz' > '$OUTPUT_IMG_NAME.$OUTPUT_IMG_EXT.xz.sha256'" - local signature=() sig_text='' - [[ $SIGN_PASS ]] && { G_DIETPI-NOTIFY 2 'Signing archive ...'; gpg --batch --pinentry-mode loopback --passphrase "$SIGN_PASS" -b --armor "$OUTPUT_IMG_NAME.$OUTPUT_IMG_EXT.xz" || exit 1; signature=("$OUTPUT_IMG_NAME.$OUTPUT_IMG_EXT.xz.asc") sig_text="\nSignature: $PWD/${signature[*]}"; } + # Generate SHA256 hash + G_EXEC_DESC='Generating SHA256 hash' G_EXEC eval "sha256sum '$FP_FINAL' > '$FP_FINAL.sha256'" - G_DIETPI-NOTIFY 0 "DietPi-Imager has successfully finished. -Image file: $PWD/$OUTPUT_IMG_NAME.$OUTPUT_IMG_EXT -xz archive: $PWD/$OUTPUT_IMG_NAME.$OUTPUT_IMG_EXT.xz -SHA256 hash: $PWD/$OUTPUT_IMG_NAME.$OUTPUT_IMG_EXT.xz.sha256$sig_text" + # Generate GPG signature if requested + local sig_text='' signature=() + if [[ $SIGN_PASS ]] + then + G_DIETPI-NOTIFY 2 "Signing $FP_FINAL ..." + gpg --batch --pinentry-mode loopback --passphrase "$SIGN_PASS" -b --armor "$FP_FINAL" || exit 1 + sig_text="\nSignature: $FP_FINAL.asc" signature=("$FP_FINAL.asc") + fi - # Upload archive automatically if there is an upload.sh in the same directory - [[ -x 'upload.sh' ]] && G_EXEC_OUTPUT=1 G_EXEC ./upload.sh "$OUTPUT_IMG_NAME.$OUTPUT_IMG_EXT.xz"{,.sha256} "${signature[@]}" && G_EXEC rm -R "$OUTPUT_IMG_NAME.$OUTPUT_IMG_EXT.xz"{,.sha256} "${signature[@]}" + G_DIETPI-NOTIFY 0 "DietPi-Imager has successfully finished. +Image file: ${FP_FINAL%.xz}$archive_text +SHA256 hash: $FP_FINAL.sha256$sig_text" + # Upload if requested + if [[ $UPLOAD_SCRIPT ]] + then + [[ -x "$UPLOAD_SCRIPT" ]] || { G_DIETPI-NOTIFY 1 "Upload script $UPLOAD_SCRIPT does not exist or is not executable. Aborting ..."; exit 1; } + G_EXEC_OUTPUT=1 G_EXEC ./upload.sh "$FP_FINAL"{,.sha256} "${signature[@]}" && (( ! $SKIP_ARCHIVE )) && G_EXEC rm -R "$FP_FINAL"{,.sha256} "${signature[@]}" + fi } #///////////////////////////////////////////////////////////////////////////////////// diff --git a/.build/images/dietpi-installer b/.build/images/dietpi-installer index 5216874c02..60443c18a4 100755 --- a/.build/images/dietpi-installer +++ b/.build/images/dietpi-installer @@ -115,6 +115,7 @@ _EOF_ 'curl' # Download DietPi-Globals... 'ca-certificates' # ...via HTTPS 'whiptail' # G_WHIP + 'mawk' # lightweight awk implementation used in DietPi ) for i in "${aAPT_PREREQS[@]}" do @@ -428,7 +429,8 @@ _EOF_ '85' ': ROCK 5A' '87' ': Orange Pi 3B' '89' ': Orange Pi 3 LTS' - '80' ': Orange Pi 5' + '80' ': Orange Pi 5/5B' + '93' ': Orange Pi 5 Pro' '82' ': Orange Pi 5 Plus' '91' ': Orange Pi 5 Max' '83' ': Orange Pi Zero 3' @@ -630,7 +632,7 @@ _EOF_ G_EXEC mv "$dir/.build/images/U-Boot/99-dietpi-uboot" /etc/initramfs/post-update.d/99-dietpi-uboot G_EXEC sed --follow-symlinks -i 's/arm64/arm/' /etc/initramfs/post-update.d/99-dietpi-uboot - elif [[ $G_HW_MODEL =~ ^(12|15|16|40|42|43|44|45|46|47|48|52|54|55|56|57|58|59|60|62|63|64|65|66|67|68|72|73|74|76|77|78|79|80|82|83|85|86|87|88|89|90|91|92)$ ]] + elif [[ $G_HW_MODEL =~ ^(12|15|16|40|42|43|44|45|46|47|48|52|54|55|56|57|58|59|60|62|63|64|65|66|67|68|72|73|74|76|77|78|79|80|82|83|85|86|87|88|89|90|91|92|93)$ ]] then armbian_packages=1 G_EXEC mv "$dir/.build/images/U-Boot/boot.cmd" /boot/boot.cmd @@ -671,7 +673,7 @@ setenv rootuuid "true"' /boot/boot.cmd (( $G_HW_MODEL == 15 )) && G_EXEC eval 'echo '\''meson_rng'\'' > /etc/modules-load.d/dietpi-hwrng.conf' # Rockchip 64-bit (configs work with Amlogic OOTB) - elif [[ $G_HW_MODEL =~ ^(42|43|46|47|55|56|58|68|72|73|76|77|78|79|80|82|85|86|87|90|91|92)$ ]] + elif [[ $G_HW_MODEL =~ ^(42|43|46|47|55|56|58|68|72|73|76|77|78|79|80|82|85|86|87|90|91|92|93)$ ]] then G_EXEC sed --follow-symlinks -Ei '/^setenv (kernel|fdt)_addr_r/d' /boot/boot.cmd G_CONFIG_INJECT 'setenv scriptaddr ' 'setenv scriptaddr "0x9000000"' /boot/boot.cmd @@ -704,14 +706,14 @@ setenv rootuuid "true"' /boot/boot.cmd # Overlay prefix case $G_HW_MODEL in 73) G_CONFIG_INJECT 'overlay_prefix=' 'overlay_prefix=rk3308' /boot/dietpiEnv.txt;; - 78|79|80|82|85|91|92) G_CONFIG_INJECT 'overlay_prefix=' 'overlay_prefix=rk3588' /boot/dietpiEnv.txt;; # ToDo: There are multiple other prefixes used in the kernel package, "rock-5b", "rock-5ab", "rockchip" (for fixup), so the boot.cmd need heavy adjustments (eliminate the prefix entirely) to work with all overlays. + 78|79|80|82|85|91|92|93) G_CONFIG_INJECT 'overlay_prefix=' 'overlay_prefix=rk3588' /boot/dietpiEnv.txt;; # ToDo: There are multiple other prefixes used in the kernel package, "rock-5b", "rock-5ab", "rockchip" (for fixup), so the boot.cmd need heavy adjustments (eliminate the prefix entirely) to work with all overlays. *) G_CONFIG_INJECT 'overlay_prefix=' 'overlay_prefix=rockchip' /boot/dietpiEnv.txt;; esac # Console args case $G_HW_MODEL in 73) G_CONFIG_INJECT 'consoleargs=' 'consoleargs=console=ttyS0,1500000' /boot/dietpiEnv.txt;; # headless 47|55|56) G_CONFIG_INJECT 'consoleargs=' 'consoleargs=console=ttyS2,1500000' /boot/dietpiEnv.txt;; # headless - 78|79|80|82|85|91|92) G_EXEC sed --follow-symlinks -i 's/ttyAML0,115200/ttyFIQ0,1500000/' /boot/dietpiEnv.txt;; # RK3588 + 78|79|80|82|85|91|92|93) G_EXEC sed --follow-symlinks -i 's/ttyAML0,115200/ttyFIQ0,1500000/' /boot/dietpiEnv.txt;; # RK3588 *) G_EXEC sed --follow-symlinks -i 's/ttyAML0,115200/ttyS2,1500000/' /boot/dietpiEnv.txt;; esac @@ -1020,6 +1022,8 @@ setenv rootuuid "true"' /boot/boot.cmd then # VM: Install tiny-initramfs with limited features but sufficient and much smaller + faster apackages+=('tiny-initramfs') + # Enable systemd-logind by default for ACPI functionality, required for shutdown/reboot via virtualiser + G_CONFIG_INJECT 'AUTO_UNMASK_LOGIND=' 'AUTO_UNMASK_LOGIND=1' /boot/dietpi.txt else # Install and use zstd for better initramfs compression apackages+=('initramfs-tools' 'zstd') @@ -1144,6 +1148,7 @@ _EOF_ 90) model='radxa-zero3' kernel='rk35xx' branch='legacy';; 91) model='orangepi5-max' kernel='rk35xx' branch='vendor';; 92) model='nanopi-m6' kernel='rk35xx' branch='vendor';; + 93) model='orangepi5pro' kernel='rk35xx' branch='vendor';; *) :;; esac @@ -1171,7 +1176,7 @@ _EOF_ G_AGI initramfs-tools u-boot-tools armbian-firmware "${zstd[@]}" [[ ${zstd[0]} ]] && G_CONFIG_INJECT 'COMPRESS=' 'COMPRESS=zstd' /etc/initramfs-tools/initramfs.conf - # Download and pre-install kernel hosted on dietpi.com where the Armbian APT repo provides a too old version or is not available + # Install testing kernel build if requested if (( $TEST_KERNEL )) then G_EXEC_OUTPUT=1 G_EXEC curl -fo package1.deb "https://dietpi.com/downloads/binaries/testing/linux-image-$branch-$kernel.deb" @@ -1180,7 +1185,7 @@ _EOF_ G_EXEC rm package[12].deb fi - # Download and pre-install U-Boot hosted on dietpi.com where the Armbian APT repo provides a too old version or is not available + # Install testing U-Boot build if requested if (( $TEST_UBOOT )) then G_EXEC_OUTPUT=1 G_EXEC curl -fo package.deb "https://dietpi.com/downloads/binaries/testing/linux-u-boot-$model-$branch.deb" @@ -1304,7 +1309,15 @@ _EOF_ 3) variant='soquartz';; *) variant='quartz64a';; esac - G_AGI "firmware-$variant" + # Install testing kernel build if requested + if (( $TEST_KERNEL )) + then + G_EXEC_OUTPUT=1 G_EXEC curl -fo package.deb "https://dietpi.com/downloads/binaries/testing/firmware-$variant.deb" + G_EXEC_OUTPUT=1 G_EXEC dpkg -i package.deb + G_EXEC rm package.deb + else + G_AGI "firmware-$variant" + fi # NanoPi M2/T2/Fire2 Linux 4.4: Requires dedicated boot partition, starting at 4 MiB for U-Boot, with ext4 filesystem elif [[ $G_HW_MODEL == 61 && $(findmnt -Ufnro FSTYPE -M /boot) == 'ext4' ]] && (( $(sfdisk -qlo Start "$BOOT_DEVICE" | mawk 'NR==2') >= 8192 )) @@ -1520,6 +1533,13 @@ _EOF_ [[ -f '/etc/apt/preferences.d/dietpi-armbian-tmp' ]] && G_EXEC rm /etc/apt/preferences.d/dietpi-armbian-tmp [[ -f '/etc/apt/apt.conf.d/dietpi-armbian' ]] && G_EXEC rm /etc/apt/apt.conf.d/dietpi-armbian + # Workaround for NetworkManager removal, which can leave back a revised /etc/resolv.conf symlink: In case re-create with DietPi default + if [[ ! -f '/etc/resolv.conf' ]] + then + G_EXEC rm -f /etc/resolv.conf + G_EXEC eval 'echo '\''nameserver 9.9.9.9'\'' > /etc/resolv.conf' # Apply generic functional DNS nameserver + fi + #------------------------------------------------------------------------------------------------ G_DIETPI-NOTIFY 3 "$G_PROGRAM_NAME" "[$SETUP_STEP] Applying DietPi tweaks and cleanup"; ((SETUP_STEP++)) #------------------------------------------------------------------------------------------------ @@ -1801,7 +1821,7 @@ _EOF_' G_EXEC systemctl disable --now systemd-networkd (( $G_DISTRO > 6 )) || G_EXEC systemctl disable --now systemd-resolved G_EXEC rm -f /etc/resolv.conf - echo 'nameserver 9.9.9.9' > /etc/resolv.conf # Apply generic functional DNS nameserver, updated on next service start + G_EXEC eval 'echo '\''nameserver 9.9.9.9'\'' > /etc/resolv.conf' # Apply generic functional DNS nameserver # ifupdown starts the daemon outside of systemd, the enabled systemd unit just throws an error on boot due to missing dbus and with dbus might interfere with ifupdown systemctl -q is-enabled wpa_supplicant 2> /dev/null && G_EXEC systemctl disable wpa_supplicant @@ -1966,7 +1986,7 @@ _EOF_' /boot/dietpi/func/dietpi-set_hardware serialconsole enable ttyS1 # Rockchip vendor/legacy: ROCK 5B, NanoPi 6, Orange Pi 5, Orange Pi 5 Plus, ROCK 5A, Radxa ZERO 3 - elif [[ $G_HW_MODEL =~ ^(78|79|80|82|85|90|91|92)$ ]] + elif [[ $G_HW_MODEL =~ ^(78|79|80|82|85|90|91|92|93)$ ]] then /boot/dietpi/func/dietpi-set_hardware serialconsole enable ttyFIQ0 diff --git a/.build/software/Amiberry/build.bash b/.build/software/Amiberry/build.bash index 7db831b63f..254a795ae8 100755 --- a/.build/software/Amiberry/build.bash +++ b/.build/software/Amiberry/build.bash @@ -112,7 +112,8 @@ v_ami=$(curl -sSf 'https://api.github.com/repos/BlitterStudio/amiberry/releases/ [[ $v_ami ]] || { G_DIETPI-NOTIFY 1 'No latest Amiberry version found, aborting ...'; exit 1; } v_ami=${v_ami#v} # - ARMv6: v5.7.2 dropped support for Raspberry Pi 1, hence use v5.7.1 -[[ $PLATFORM == 'rpi1'* ]] && v_ami='5.7.1' +# - Build v5.7.4 until v7.0.0 stable has been released. It requires a major rework, using cmake and no device-specific targets anymore. +[[ $PLATFORM == 'rpi1'* ]] && v_ami='5.7.1' || v_ami='5.7.4' G_DIETPI-NOTIFY 2 "Building Amiberry version \e[33m$v_ami\e[90m for platform: \e[33m$PLATFORM" G_EXEC cd /tmp G_EXEC curl -sSfLO "https://github.com/BlitterStudio/amiberry/archive/v$v_ami.tar.gz" diff --git a/.build/software/shairport-sync/build.bash b/.build/software/shairport-sync/build.bash index 5792ea41e4..d0511597e4 100755 --- a/.build/software/shairport-sync/build.bash +++ b/.build/software/shairport-sync/build.bash @@ -13,11 +13,11 @@ G_AGUP G_AGDUG automake pkg-config make g++ libpopt-dev libconfig-dev libssl-dev libsoxr-dev libavahi-client-dev libasound2-dev libglib2.0-dev libmosquitto-dev avahi-daemon git libplist-dev libsodium-dev libgcrypt20-dev libavformat-dev xxd (( $G_DISTRO == 5 )) && G_EXEC systemctl unmask avahi-daemon adeps=('libc6' 'libasound2' 'libavahi-client3' 'libsoxr0' 'libconfig9' 'libpopt0' 'libglib2.0-0' 'libmosquitto1' 'avahi-daemon') -adeps2=('libplist3' 'libsodium23' 'libgcrypt20') +adeps2=('libsodium23' 'libgcrypt20') case $G_DISTRO in - 5|6) adeps+=('libssl1.1'); adeps2+=('libavcodec58');; - 7) adeps+=('libssl3'); adeps2+=('libavcodec59');; - 8) adeps+=('libssl3'); adeps2+=('libavcodec60');; + 5|6) adeps+=('libssl1.1'); adeps2+=('libavcodec58' 'libplist3');; + 7) adeps+=('libssl3'); adeps2+=('libavcodec59' 'libplist3');; + 8) adeps+=('libssl3'); adeps2+=('libavcodec61' 'libplist-2.0-4');; *) G_DIETPI-NOTIFY 1 "Unsupported distro version: $G_DISTRO_NAME (ID=$G_DISTRO)"; exit 1;; esac for i in "${adeps[@]}" "${adeps2[@]}" @@ -124,6 +124,7 @@ general = // With the range of AirPlay volume being from -30 to 0, doubling the volume from -22.5 to -15 results in an increase of 10 dB. // Similarly, doubling the volume from -15 to 0 results in an increase of 10 dB. // For compatibility with mixers having a restricted attenuation range (e.g. 30 dB), "dasl_tapered" will switch to a flat profile at low AirPlay volumes. + // volume_control_combined_hardware_priority = "no"; // when extending the volume range by combining the built-in software attenuator with the hardware mixer attenuator, set this to "yes" to reduce volume by using the hardware mixer first, then the built-in software attenuator. // default_airplay_volume = -24.0; // this is the suggested volume after a reset or after the high_volume_threshold has been exceed and the high_volume_idle_timeout_in_minutes has passed @@ -178,7 +179,8 @@ sessioncontrol = // run_this_before_play_begins = "/full/path/to/application and args"; // make sure the application has executable permission. If it's a script, include the shebang (#!/bin/...) on the first line // run_this_after_play_ends = "/full/path/to/application and args"; // make sure the application has executable permission. If it's a script, include the shebang (#!/bin/...) on the first line -// run_this_if_an_unfixable_error_is_detected = "/full/path/to/application and args"; // if a problem occurs that can't be cleared by Shairport Sync itself, hook a program on here to deal with it. An error code-string is passed as the last argument. +// run_this_if_an_unfixable_error_is_detected = "/full/path/to/application and args"; // if a problem occurs that can't be cleared by Shairport Sync itself, hook a program on here to deal with it. +// An error code-string is passed as the last argument. // Many of these "unfixable" problems are caused by malfunctioning output devices, and sometimes it is necessary to restart the whole device to clear the problem. // You could hook on a program to do this automatically, but beware -- the device may then power off and restart without warning! // wait_for_completion = "no"; // set to "yes" to get Shairport Sync to wait until the "run_this..." applications have terminated before continuing @@ -187,6 +189,8 @@ sessioncontrol = // session_timeout = 120; // wait for this number of seconds after a source disappears before terminating the session and becoming available again. }; +// Back End Settings + // These are parameters for the "alsa" audio back end. alsa = { @@ -221,6 +225,7 @@ pipe = // There are no configuration file parameters for the "stdout" audio back end. No interpolation is done. // How to deal with metadata, including artwork +// "enabled" and "include_cover_art" are both "yes" by default metadata = { // enabled = "yes"; // set this to yes to get Shairport Sync to solicit metadata from the source and to pass it on via a pipe @@ -237,10 +242,12 @@ metadata = }; // How to enable the MQTT-metadata/remote-service + // Note that, for compatability with many MQTT brokers and applications, // every message that has no extra data is given a // payload consisting of the string "--". // You can change this or you can enable empty payloads -- see below. + mqtt = { // enabled = "no"; // set this to yes to enable the mqtt-metadata-service @@ -256,10 +263,12 @@ mqtt = // publish_raw = "no"; //whether to publish all available metadata under the codes given in the 'metadata' docs. // publish_parsed = "no"; //whether to publish a small (but useful) subset of metadata under human-understandable topics // empty_payload_substitute = "--"; // MQTT messages with empty payloads often are invisible or have special significance to MQTT brokers and readers. -// To avoid empty payload problems, the string here is used instead of any empty payload. Set it to the empty string -- "" -- to leave the payload empty. +// To avoid empty payload problems, the string here is used instead of any empty payload. Set it to the empty string -- "" -- to leave the payload empty. // Currently published topics:artist,album,title,genre,format,songalbum,volume,client_ip, // Additionally, messages at the topics play_start,play_end,play_flush,play_resume are published // publish_cover = "no"; //whether to publish the cover over mqtt in binary form. This may lead to a bit of load on the broker +// enable_autodiscovery = "no"; //whether to publish an autodiscovery message to automatically appear in Home Assistant +// autodiscovery_prefix = "homeassistant"; //string to prepend to autodiscovery topic // enable_remote = "no"; //whether to remote control via MQTT. RC is available under `topic`/remote. // Available commands are "command", "beginff", "beginrew", "mutetoggle", "nextitem", "previtem", "pause", "playpause", "play", "stop", "playresume", "shuffle_songs", "volumedown", "volumeup" }; diff --git a/.build/software/squeezelite/build.bash b/.build/software/squeezelite/build.bash index a21169ae0b..5abcdc5f7b 100755 --- a/.build/software/squeezelite/build.bash +++ b/.build/software/squeezelite/build.bash @@ -11,7 +11,7 @@ adeps=('libc6' 'libasound2' 'libmad0' 'libvorbisfile3' 'libmpg123-0' 'libsoxr0' case $G_DISTRO in 6) adeps+=('libflac8' 'libavformat58' 'libssl1.1');; 7) adeps+=('libflac12' 'libavformat59' 'libssl3');; - 8) adeps+=('libflac12' 'libavformat60' 'libssl3');; + 8) adeps+=('libflac12' 'libavformat61' 'libssl3');; *) G_DIETPI-NOTIFY 1 "Unsupported distro version: $G_DISTRO_NAME (ID=$G_DISTRO)"; exit 1;; esac for i in "${adeps[@]}" diff --git a/.conf/dps_96/conf b/.conf/dps_96/conf index 88da88576f..4f287722f6 100644 --- a/.conf/dps_96/conf +++ b/.conf/dps_96/conf @@ -5,13 +5,11 @@ dns proxy = no log file = /var/log/samba/log.%m max log size = 1000 - syslog only = no - syslog = 0 + logging = syslog@1 panic action = /usr/share/samba/panic-action %d security = user - encrypt passwords = true passdb backend = tdbsam obey pam restrictions = yes unix password sync = yes diff --git a/.github/workflows/dietpi-build.yml b/.github/workflows/dietpi-build.yml index 8ed3cab4cf..af3f1ee8ac 100644 --- a/.github/workflows/dietpi-build.yml +++ b/.github/workflows/dietpi-build.yml @@ -93,7 +93,10 @@ jobs: '"-m 87 -d 6", "-m 87 -d 7", "-m 87 -d 8", '\ '"-m 88 -d 6", "-m 88 -d 7", "-m 88 -d 8", '\ '"-m 89 -d 6", "-m 89 -d 7", "-m 89 -d 8", '\ - '"-m 90 -d 6", "-m 90 -d 7", "-m 90 -d 8"]' >> "$GITHUB_OUTPUT" + '"-m 90 -d 6", "-m 90 -d 7", "-m 90 -d 8", '\ + '"-m 91 -d 6", "-m 91 -d 7", "-m 91 -d 8", '\ + '"-m 92 -d 6", "-m 92 -d 7", "-m 92 -d 8", '\ + '"-m 93 -d 6", "-m 93 -d 7", "-m 93 -d 8"]' >> "$GITHUB_OUTPUT" elif [ "${{ github.event.inputs.buildargs }}" = 'quartz64' ] then echo buildargs=[\ @@ -136,4 +139,4 @@ jobs: ${{ secrets.GPG_KEY }} _EOF_ - name: Run DietPi-Build - run: sudo bash -c "G_GITOWNER=$GITHUB_REPOSITORY_OWNER G_GITBRANCH=$GITHUB_REF_NAME; $(curl -sSf "https://raw.githubusercontent.com/$GITHUB_REPOSITORY_OWNER/DietPi/$GITHUB_REF_NAME/.build/images/dietpi-build")" 'DietPi-Build' ${{ matrix.buildargs }} --sign '${{ secrets.GPG_PASS }}' + run: sudo bash -c "G_GITOWNER=$GITHUB_REPOSITORY_OWNER G_GITBRANCH=$GITHUB_REF_NAME; $(curl -sSf "https://raw.githubusercontent.com/$GITHUB_REPOSITORY_OWNER/DietPi/$GITHUB_REF_NAME/.build/images/dietpi-build")" 'DietPi-Build' ${{ matrix.buildargs }} --sign '${{ secrets.GPG_PASS }}' --upload-script 'upload.sh' diff --git a/.github/workflows/dietpi-software.bash b/.github/workflows/dietpi-software.bash index 1005e15c2a..204f3e118e 100644 --- a/.github/workflows/dietpi-software.bash +++ b/.github/workflows/dietpi-software.bash @@ -105,7 +105,7 @@ Process_Software() 30) aSERVICES[i]='nxserver' aTCP[i]='4000';; 32) aSERVICES[i]='ympd' aTCP[i]='1337';; 33) (( $arch == 10 )) && aSERVICES[i]='airsonic' aTCP[i]='8080' aDELAY[i]=30;; # Fails in QEMU-emulated containers, probably due to missing device access - 35) aSERVICES[i]='logitechmediaserver' aTCP[i]='9000'; (( $arch < 10 )) && aDELAY[i]=60;; + 35) aSERVICES[i]='lyrionmusicserver' aTCP[i]='9000'; (( $arch < 10 )) && aDELAY[i]=60;; 36) aCOMMANDS[i]='squeezelite -t';; # Service listens on random high UDP port and exits if no audio device has been found, which does not exist on GitHub Actions runners, respectively within the containers 37) aSERVICES[i]='shairport-sync' aTCP[i]='5000';; # AirPlay 2 would be TCP port 7000 39) aSERVICES[i]='minidlna' aTCP[i]='8200';; @@ -171,7 +171,7 @@ Process_Software() 128) aSERVICES[i]='mpd' aTCP[i]='6600';; 131) (( $arch == 2 || $arch == 11 )) || aSERVICES[i]='blynkserver' aTCP[i]='9443'; (( $arch == 10 || $arch == 2 || $arch == 11 )) || aDELAY[i]=60;; 132) aSERVICES[i]='aria2' aTCP[i]='6800';; # aTCP[i]+=' 6881-6999';; # Listens on random port - 133) (( $arch == 2 || $arch == 11 )) || aSERVICES[i]='yacy' aTCP[i]='8090'; (( $arch == 10 )) && aDELAY[i]=30; (( $arch == 10 || $arch == 2 || $arch == 11)) || aDELAY[i]=60;; + 133) (( $arch == 2 || $arch == 11 )) || aSERVICES[i]='yacy' aTCP[i]='8090'; (( $arch == 10 )) && aDELAY[i]=30; (( $arch == 10 || $arch == 2 || $arch == 11)) || aDELAY[i]=90;; 134) aCOMMANDS[i]='docker compose version';; 135) aSERVICES[i]='icecast2' aTCP[i]='8000' aCOMMANDS[i]='darkice -h | grep '\''^DarkIce'\';; # darkice service cannot start in container as is requires audio recording device access 136) aSERVICES[i]='motioneye' aTCP[i]='8765';; @@ -204,7 +204,7 @@ Process_Software() 167) (( $arch < 3 )) || aSERVICES[i]='raspotify';; # 32-bit ARM fails with: "arm-binfmt-P: /usr/bin/librespot: Unable to find a guest_base to satisfy all guest address mapping requirements" #169) aSERVICES[i]='voice-recognizer';; "RuntimeError: This module can only be run on a Raspberry Pi!" 170) aCOMMANDS[i]='unrar -V';; - #171) aSERVICES[i]='frps frpc' aTCP[i]='7000 7400 7500';; Interactive install with service and ports depending on server/client/both choice + 171) aSERVICES[i]='frps frpc' aTCP[i]='7000 7400 7500';; 172) aSERVICES[i]='wg-quick@wg0' aUDP[i]='51820';; 174) aCOMMANDS[i]='gimp -v';; 176) aSERVICES[i]='mycroft';; diff --git a/.github/workflows/quartz64.yml b/.github/workflows/quartz64.yml index f9687c86dc..5c2c481011 100644 --- a/.github/workflows/quartz64.yml +++ b/.github/workflows/quartz64.yml @@ -17,11 +17,12 @@ jobs: python-version: '3.x' check-latest: true - name: Build init + # uuid-dev needed only until U-Boot v2025.01: https://github.com/u-boot/u-boot/commit/322c813 run: | # Workaround for runner provider restart: https://github.com/actions/runner-images/pull/9956 sudo apt-get -qq autopurge needrestart { python3 -m pip install --no-cache-dir -U pip setuptools wheel; python3 -m pip install --no-cache-dir -U pyelftools; } & - { sudo apt-get -q update; sudo DEBIAN_FRONTEND=noninteractive apt-get --no-install-recommends -qq install make gcc libc6-dev flex bison gcc-aarch64-linux-gnu bc libssl-dev swig; } & + { sudo apt-get -q update; sudo DEBIAN_FRONTEND=noninteractive apt-get --no-install-recommends -qq install make gcc libc6-dev flex bison gcc-aarch64-linux-gnu bc libssl-dev swig uuid-dev libgnutls28-dev; } & { curl -fO 'https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/snapshot/linux-rolling-stable.tar.gz'; tar xf linux-rolling-stable.tar.gz; rm linux-rolling-stable.tar.gz; } & uboot_version=$(curl -sSf 'https://api.github.com/repos/u-boot/u-boot/tags' | mawk -F\" '/^ *"name": "v[0-9.]*",$/{print $4;exit}') [ "$uboot_version" ] || { echo 'ERROR: Failed to obtain latest U-Boot version'; exit 1; } diff --git a/.meta/dietpi-survey_report b/.meta/dietpi-survey_report index 139bbd161a..45f2b61bcf 100755 --- a/.meta/dietpi-survey_report +++ b/.meta/dietpi-survey_report @@ -97,6 +97,7 @@ shopt -s extglob [90]='Radxa ZERO 3' [91]='Orange Pi 5 Max' [92]='NanoPi M6' + [93]='Orange Pi 5 Pro' ) ## Benchmark data arrays: aBENCH_XX[$HW_MODEL,${aBENCH_XX_INDEX[$HW_MODEL]}] @@ -240,7 +241,7 @@ shopt -s extglob [32]='ympd' [33]='Airsonic-Advanced' [34]='Subsonic' - [35]='Logitech Media Server' + [35]='Lyrion Music Server' [36]='Squeezelite' [37]='Shairport Sync' [38]='FreshRSS' @@ -732,14 +733,16 @@ shopt -s extglob aSOFTWARE_NAME9_7=() aSOFTWARE_NAME9_8=() + aSOFTWARE_NAME9_9=() for i in "${!aSOFTWARE_NAME9_6[@]}" do aSOFTWARE_NAME9_7[i]=${aSOFTWARE_NAME9_6[i]} aSOFTWARE_NAME9_8[i]=${aSOFTWARE_NAME9_7[i]} + aSOFTWARE_NAME9_9[i]=${aSOFTWARE_NAME9_8[i]} done # Pre-create software counter array so that we can see also software (available in newest version) with 0 installs - for i in "${aSOFTWARE_NAME9_8[@]}" + for i in "${aSOFTWARE_NAME9_9[@]}" do aSOFTWARE[$i]=0 done diff --git a/.update/patches b/.update/patches index d33f4e80ac..a3a0ae86c8 100755 --- a/.update/patches +++ b/.update/patches @@ -1453,7 +1453,7 @@ Patch_9_1() # Raspberry Pi if [[ -f '/etc/kernel/postinst.d/dietpi-USBridgeSig' ]] then - G_DIETPI-NOTIFY 2 'Removing obsolete USBridge Sig driver update script, since Allo does not provides those for revent kernel versions anymore' + G_DIETPI-NOTIFY 2 'Removing obsolete USBridge Sig driver update script, since Allo does not provides those for recent kernel versions anymore' G_EXEC rm /etc/kernel/postinst.d/dietpi-USBridgeSig fi @@ -1533,7 +1533,7 @@ Patch_9_2() if grep -q '^[[:blank:]]*aSOFTWARE_INSTALL_STATE\[108\]=2' /boot/dietpi/.installed && dpkg --compare-versions "$(dpkg-query -Wf '${Version}' amiberry 2> /dev/null)" lt 5.6.8-dietpi1 then G_DIETPI-NOTIFY 2 'Preparing Amiberry upgrade to v5.6.8' - echo 108 >> /var/tmp/dietpi/dietpi-update_reinstalls + G_EXEC eval 'echo 108 >> /var/tmp/dietpi/dietpi-update_reinstalls' fi fi } @@ -2030,6 +2030,43 @@ _EOF_ fi } +Patch_9_9() +{ + # Software updates, migrations and patches + if [[ -f '/boot/dietpi/.installed' ]] + then + # InfluxDB + if grep -q '^[[:blank:]]*aSOFTWARE_INSTALL_STATE\[74\]=2' /boot/dietpi/.installed + then + # Recreate symlink deleted with package update: https://dietpi.com/forum/t/influxdb-not-working-after-update/21868 + [[ -e '/var/lib/influxdb' ]] || G_EXEC ln -sf /mnt/dietpi_userdata/influxdb /var/lib/influxdb + # Migrate to now existing Bookworm suite + if [[ -f '/etc/apt/sources.list.d/influxdb.list' ]] + then + (( $G_DISTRO < 7 )) || G_EXEC sed -i 's/bullseye/bookworm/g' /etc/apt/sources.list.d/influxdb.list + G_EXEC mv /etc/apt/sources.list.d/{,dietpi-}influxdb.list + fi + fi + # Mopidy: Migrate to now existing Bookworm suite + if grep -q '^[[:blank:]]*aSOFTWARE_INSTALL_STATE\[118\]=2' /boot/dietpi/.installed && [[ -f '/etc/apt/sources.list.d/mopidy.list' ]] + then + (( $G_DISTRO < 7 )) || G_EXEC sed -i 's/bullseye/bookworm/g' /etc/apt/sources.list.d/mopidy.list + G_EXEC mv /etc/apt/sources.list.d/{,dietpi-}mopidy.list + fi + # Logitech Media Server => Lyrion Music Server: https://github.com/MichaIng/DietPi/issues/7306 + if grep -q '^[[:blank:]]*aSOFTWARE_INSTALL_STATE\[35\]=2' /boot/dietpi/.installed && [[ -f '/lib/systemd/system/logitechmediaserver.service' ]] + then + G_DIETPI-NOTIFY 2 'Preparing Logitech Media Server reinstall to migrate to Lyrion Music Server ...' + G_EXEC systemctl --no-reload unmask logitechmediaserver + G_EXEC systemctl --no-reload disable --now logitechmediaserver + # Avoid that purging the old package removes user, log and data dir which are still in use by the new package + # shellcheck disable=SC2016 + G_EXEC sed -i '/^if \[ "$1" = purge \]; then/,/^fi/d' /var/lib/dpkg/info/logitechmediaserver.postrm + G_EXEC eval 'echo 35 >> /var/tmp/dietpi/dietpi-update_reinstalls' + fi + fi +} + # v6.35 => v7 migration if (( $G_DIETPI_VERSION_CORE == 6 && $G_DIETPI_VERSION_SUB > 34 )) then diff --git a/.update/version b/.update/version index 2cb5377cf2..0f107f5c7b 100644 --- a/.update/version +++ b/.update/version @@ -2,7 +2,7 @@ # shellcheck disable=SC2034 # Available DietPi version G_REMOTE_VERSION_CORE=9 -G_REMOTE_VERSION_SUB=8 +G_REMOTE_VERSION_SUB=9 G_REMOTE_VERSION_RC=0 # Minimum DietPi version to allow update G_MIN_VERSION_CORE=7 diff --git a/CHANGELOG.txt b/CHANGELOG.txt index b36930ce8b..4e5da62e14 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -1,3 +1,40 @@ +v9.9 +(2024-11-23) + +New images: +- Orange Pi 5 Pro | Support for this new variant of the Orange Pi 5 family has been added to DietPi. Compared to the original Orange Pi 5, it features onboard WiFi 5, an eMMC slot, dual HDMI, and supports NVMe SSDs up to 2280 format. +- Orange Pi 5 Max | Support for this new variant of the Orange Pi 5 family has been added to DietPi. Compared to the Orange Pi 5 Pro, it features onboard WiFi 6E and 2.5G Ethernet. +- NanoPi M6 | Support for this FriendlyELEC SBC with RK3588 SoC has been added to DietPi. Compared to the NanoPi R6S/R6C and NanoPC T6, aside of the great onboard features, we observed a significantly lower idle power usage. As usual, the optional metal case keeps it at cool temperatures, and has an LCD display builtin, which can be enabled via device tree overlay in DietPi. A related dietpi-config toggle is added with next release. + +Enhancements: +- Virtual Machines | systemd-logind is now enabled by default on VMs, as it provides ACPI functionality, needed to properly shutdown or reboot the VM from the virtualiser software, usually expected by users. +- DietPi-DDNS | The "IPv6or4" option to update IPv6 only, if supported by server, network and provider, has been replaced with "IPv4and6". A server being reachable via IPv6 only is rarely wanted, as many networks do not support it. Instead, usually one will want to have it reachable via both, IPv4 as well as IPv6, which is now possible when using DietPi-DDNS, and the new default. If, e.g. for security reason, IPv6 only is wanted, this option of course remains available, like before. Many thanks to @LOGIN-TB for doing this suggestion: https://github.com/MichaIng/DietPi/issues/7278 +- DietPi-DDNS | The cron job does now log server response messages and connection errors separately with respective severities. Some DDNS providers do not return an HTTP error code, but an error text embedded into a regular HTTP 200 response. This, as well as success responses can now be seen via "journalctl -t dietpi-ddns". Many thanks to @jtmoon79 for doing this suggestion: https://github.com/MichaIng/DietPi/issues/5954 +- DietPi-Services | "dietpi-services start" will not start disabled services anymore. This aligns with the behaviour of the "restart" command, which as well skips disabled services. The script is used within other DietPi scripts to (re)start services after maintenance operations, and it is unexpected when services, who were not running before, but explicitly disabled, are running afterwards. To manually start/stop individual services from the console, we recommend using "systemctl" directly, like on any other Linux distribution with systemd. Many thanks to @intiplink for reporting this unexpected behaviour while using dietpi-drive_manager: https://github.com/MichaIng/DietPi/issues/7302 +- DietPi-Software | NFS Server: The "fsid=0" option has been removed from the /mnt/dietpi_userdata default export. As it is uncommon and not respected in "showmount -e" export lists, it caused confusion and issues. +- DietPi-Software | YaCy: The latest YaCy version will now be installed, and the global software password will be set as default admin password on fresh installs. +- DietPi-Software | MineOS: As a security enhancement and workaround for a web UI login issue, a dedicated "mineos" user is created again. For new MineOS installs or after reinstall, one can login with this user, and the global software password. It has permissions to install and manage Minecraft instances. +- DietPi-Software | frp: It is now possible to connect the client to a server which has no (an empty) authentication token configured. frp can now be installed non-interactively, where client + server daemons are both installed and configured to work with each other, with respective defaults for all inputs. +- DietPi-Software | frp: Since the ini format for config files has been deprecated, and support will be removed in a future frp release, new installs and reinstalls/updates will generated toml format config files from now on. As of the large amount of config keys, which all changed between those formats, an automated conversion is sadly not possible. When doing a reinstall with existing ini configs, you will be informed about it, the old config(s) will be kept as backup in place, for a manual migration. All config keys for the toml format can be found here: https://github.com/fatedier/frp/tree/dev/conf +- DietPi-Software | Logitech Media Server: LMS has been renamed to Lyrion Music Server. For more details, see their new official website: https://lyrion.org/reference/lyrion-music-server/ +- DietPi-Software | Sonarr: Sonarr v4 will be installed from now on, and a migration to Sonarr v4 is now possible by reinstall it via "dietpi-software reinstall 144". Note that, since Sonarr v4 does not support ARMv6, this is not the case and not possible on RPi 1 and Zero (1). After a migration, once might want to uninstall Mono, which is not required for Sonarr v4 anymore. Note that some settings may be lost as of the database migration. At best create a backup, offered before the reinstall, and inform yourself about possible database migration issues and losses on the Sonarr websites. + +Bug fixes: +- NanoPi M1 Plus | Resolved an issue where Ethernet did not work because of a faulty kernel patch. Many thanks to @InnovoMagicCube and @InnovoDeveloper for reporting this issue: https://github.com/MichaIng/DietPi/issues/6974 +- DietPi-DDNS | Resolved an issue where the YDNS update test failed due to a changed response from the server API. Many thanks to @NatureHog for reporting and solving the issue: https://github.com/MichaIng/DietPi/pull/7262 +- DietPi-Drive_Manager | Resolved an issue where a mounted drive could be mistakenly detected as dietpi_userdata location. +- DietPi-Software | InfluxDB: Resolved an issue where the service did not start up after the recent package upgrade. The package upgrade removes the symlink /var/lib/influxdb => /mnt/dietpi_userdata/influxdb, which is recreated with this DietPi update. Many thanks to @uwjhn for reporting this issue: https://dietpi.com/forum/t/influxdb-not-working-after-update/21868 +- DietPi-Software | Node-RED: Resolved an issue where the service failed on ARMv6 systems, since a dependency module of Node-RED v4 does not support this architecture. Node-RED v3 will now be installed on those old RPi models. Many thanks to @mvanbrab for reporting this issue: https://github.com/MichaIng/DietPi/issues/7252 +- DietPi-Software | Chromium: Resolved an issue where optional Chromium flags via "CHROMIUM_OPTS+=" line in /var/lib/dietpi/dietpi-software/installed/chromium-autostart.sh did not have any effect, as "+=" is bash-only syntax, while the script is executed with dash (bourne shell). Many thanks to @Nurgak for reporting this issue: https://github.com/MichaIng/DietPi/issues/7263#issuecomment-2463626660 +- DietPi-Software | MineOS: Worked around an issue where the install failed on Bookworm systems, as one of the Node.js modules failed to compile for unknown reasons. Many thanks to @mikedebian for reporting this issue: https://github.com/MichaIng/DietPi/issues/7265 +- DietPi-Software | MineOS: Worked around an issue where login into the web interface failed since Bullseye, as MineOS does not support the new default yescrypt password hash algorithm for UNIX users. A new dedicated "mineos" user is now created, and its password set explicitly with SHA512 hash algorithm. Many thanks to @maybaxstv for reporting this issue: https://github.com/MichaIng/DietPi/issues/5759 +- DietPi-Software | Node.js: Resolved an issue where node failed on ARMv7 Bullseye systems, since the latest version for this architecture requires a newer C++ standard library than provided on Bullseye. +- DietPi-Software | frp: Resolved an issue where server address and port inputs for the client config generation were parsed incorrectly. + +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/7313 + +----------------------------------------------------------------------------------------------------------- + v9.8 (2024-10-17) diff --git a/dietpi/dietpi-config b/dietpi/dietpi-config index 020460a39d..a482c2efcc 100755 --- a/dietpi/dietpi-config +++ b/dietpi/dietpi-config @@ -932,8 +932,8 @@ Re-enabling HDMI requires a reboot. If you need emergency HDMI output, edit the G_WHIP_MENU_ARRAY+=('Update RPi EEPROM firmware' ': Install rpi-eeprom APT package') fi - # Odroid N2, ROCK 4, ROCK 5B, Orange Pi 5 (Plus) and Orange Pi 3B: https://dietpi.com/forum/t/orange-pi-5-boot-from-nvme/16457 - elif [[ $G_HW_MODEL =~ ^(15|72|78|80|82|87)$ && -f '/usr/lib/u-boot/platform_install.sh' ]] + # Odroid N2, ROCK 4, ROCK 5B, Orange Pi 5 (Plus/Pro) and Orange Pi 3B: https://dietpi.com/forum/t/orange-pi-5-boot-from-nvme/16457 + elif [[ $G_HW_MODEL =~ ^(15|72|78|80|82|87|93)$ && -f '/usr/lib/u-boot/platform_install.sh' ]] then # Odroid N2/ROCK 4: Device tree overlay required local spidev='/dev/mtdblock0' diff --git a/dietpi/dietpi-ddns b/dietpi/dietpi-ddns index 2b33e6bfd7..8327b8eed9 100755 --- a/dietpi/dietpi-ddns +++ b/dietpi/dietpi-ddns @@ -22,11 +22,9 @@ Available options: -p Password or token, depending on provider In combination with a custom provider, this is used for HTTP authentication. -t Duration between DDNS updates in minutes (optional, defaults to 10) - -4 Force IPv4 usage for the DDNS update (optional, the default) - -6 Force IPv6 usage for the DDNS update (optional) - -6or4 Do not force any IP family for the DDNS update (optional) - IPv6 is then used, if enabled on this server and if the DDNS provider is - reachable via IPv6, else IPv4 is used. + -4and6 Update IPv4 and IPv6 addresses for your DDNS (optional, the default) + -4 Update only the IPv4 address for your DDNS (optional) + -6 Update only the IPv6 address for your DDNS (optional) Available providers: Full URL to update against a custom DDNS provider Use the "-u" and "-p" options if HTTP authentication is required. @@ -73,10 +71,10 @@ Input() '-u') shift; USERNAME=$1;; '-p') shift; PASSWORD=$1;; '-t') shift; TIMESPAN=$1;; - '-'[46]|'-6or4') IPFAMILY=$1;; + '-'[46]|'-4and6') IPFAMILY=$1;; 'apply') COMMAND=$1; shift; PROVIDER=$1;; 'remove') COMMAND=$1;; - *) G_DIETPI-NOTIFY 1 "Invalid input ($1). Aborting...$USAGE"; exit 1;; + *) G_DIETPI-NOTIFY 1 "Invalid input ($1). Aborting ...$USAGE"; exit 1;; esac shift done @@ -144,8 +142,24 @@ Read() fi # IP family - [[ $IPFAMILY ]] || IPFAMILY=${command#curl } IPFAMILY=${IPFAMILY%% *} - [[ $IPFAMILY == '-'[46] ]] || IPFAMILY='-6or4' + if [[ ! $IPFAMILY ]] + then + if grep -q 'curl -4 ' /var/lib/dietpi/dietpi-ddns/update.sh + then + if grep -q 'curl -6 ' /var/lib/dietpi/dietpi-ddns/update.sh + then + IPFAMILY='-4and6' + else + IPFAMILY='-4' + fi + + elif grep -q 'curl -6 ' /var/lib/dietpi/dietpi-ddns/update.sh + then + IPFAMILY='-6' + else + IPFAMILY='-4and6' # Pre-v9.9 + fi + fi # Time span [[ ! $TIMESPAN && -f '/var/spool/cron/crontabs/dietpi-ddns' ]] || return @@ -157,8 +171,8 @@ Read() Apply() { # Generate URL and set HTTP authentication flag based on provider - local url http_auth=1 ipfamily=${IPFAMILY:--4} - [[ $ipfamily == '-6or4' ]] && ipfamily= + local url http_auth=1 + [[ $IPFAMILY ]] || IPFAMILY='-4and6' # - DuckDNS if [[ $PROVIDER == 'DuckDNS' ]] then @@ -200,7 +214,7 @@ Apply() fi # Create DietPi-DDNS group - G_DIETPI-NOTIFY 2 'Preparing unprivileged DietPi-DDNS UNIX group...' + G_DIETPI-NOTIFY 2 'Preparing unprivileged DietPi-DDNS UNIX group ...' if getent group dietpi-ddns > /dev/null then G_EXEC groupmod -p '!' dietpi-ddns @@ -209,7 +223,7 @@ Apply() fi # Create DietPi-DDNS user - G_DIETPI-NOTIFY 2 'Preparing unprivileged DietPi-DDNS UNIX user...' + G_DIETPI-NOTIFY 2 'Preparing unprivileged DietPi-DDNS UNIX user ...' if getent passwd dietpi-ddns > /dev/null then G_EXEC usermod -g 'dietpi-ddns' -G '' -d '/nonexistent' -s '/usr/sbin/nologin' -p '!' dietpi-ddns @@ -218,26 +232,45 @@ Apply() fi # Test DDNS update - G_DIETPI-NOTIFY 2 'Testing DDNS update...' + G_DIETPI-NOTIFY 2 'Testing DDNS update ...' local result # shellcheck disable=SC2086 - if ! result=$(curl $ipfamily -sSfL ${http_auth:+ -u "$USERNAME:$PASSWORD"} "$url" 2>&1) || + if ! result=$(curl "${IPFAMILY%and6}" -sSfL ${http_auth:+ -u "$USERNAME:$PASSWORD"} "$url" 2>&1) || [[ $PROVIDER == 'DuckDNS' && $result == 'KO' ]] || - [[ $PROVIDER == 'YDNS' && $result != 'ok' ]] || + [[ $PROVIDER == 'YDNS' && $result != 'good'* && $result != 'nochg'* ]] || [[ $PROVIDER == 'Dynu' && $result != 'good'* && $result != 'nochg'* ]] then - G_DIETPI-NOTIFY 1 "DDNS update test failed, please check your input${result:+:\n$result}" STATUS="DDNS update test failed, please check your input${result:+:\n$result}" + G_DIETPI-NOTIFY 1 "$STATUS" return 1 else - G_DIETPI-NOTIFY 2 "DDNS update test succeeded${result:+:\n$result}" STATUS="DDNS update test succeeded${result:+:\n$result}" + G_DIETPI-NOTIFY 0 "$STATUS" + + # Test IPv6 as well if both are enabled + if [[ $IPFAMILY == '-4and6' ]] + then + G_DIETPI-NOTIFY 2 'Testing IPv6 DDNS update ...' + local status6 + if ! result=$(curl "${IPFAMILY/4and}" -sSfL ${http_auth:+ -u "$USERNAME:$PASSWORD"} "$url" 2>&1) || + [[ $PROVIDER == 'DuckDNS' && $result == 'KO' ]] || + [[ $PROVIDER == 'YDNS' && $result != 'good'* && $result != 'nochg'* ]] || + [[ $PROVIDER == 'Dynu' && $result != 'good'* && $result != 'nochg'* ]] + then + status6="IPv6 DDNS update test failed. Your server, network or DDNS provider might not support IPv6${result:+:\n$result}" + G_DIETPI-NOTIFY 1 "$status6" + else + status6="IPv6 DDNS update test succeeded${result:+:\n$result}" + G_DIETPI-NOTIFY 0 "$status6" + fi + STATUS+="\n\n$status6" + fi fi # Check and in case remove obsolete No-IP client if command -v noip2 > /dev/null then - G_DIETPI-NOTIFY 2 'Removing obsolete No-IP client from your system...' + G_DIETPI-NOTIFY 2 'Removing obsolete No-IP client from your system ...' if [[ -f '/etc/systemd/system/noip2.service' ]] then G_EXEC systemctl disable --now noip2 @@ -262,10 +295,12 @@ Apply() G_EXEC chown dietpi-ddns:dietpi-ddns /var/lib/dietpi/dietpi-ddns/update.sh # Shellcheck false positive: https://github.com/koalaman/shellcheck/issues/2168 # shellcheck disable=SC2016 - echo "curl${ipfamily:+ $ipfamily} -sSfL${http_auth:+ -u '$USERNAME:$PASSWORD'} '$url' 2>&1 > /dev/null | logger -t dietpi-ddns -p 3" >> /var/lib/dietpi/dietpi-ddns/update.sh + echo "{ curl ${IPFAMILY%and6} -sSfL${http_auth:+ -u '$USERNAME:$PASSWORD'} '$url' | logger -t dietpi-ddns -p 6; } 2>&1 | logger -t dietpi-ddns -p 3" >> /var/lib/dietpi/dietpi-ddns/update.sh + # shellcheck disable=SC2016 + [[ $IPFAMILY == '-4and6' ]] && echo "{ curl ${IPFAMILY/4and} -sSfL${http_auth:+ -u '$USERNAME:$PASSWORD'} '$url' | logger -t dietpi-ddns -p 6; } 2>&1 | logger -t dietpi-ddns -p 3" >> /var/lib/dietpi/dietpi-ddns/update.sh # Apply Cron job - G_DIETPI-NOTIFY 2 'Applying DietPi-DDNS Cron job...' + G_DIETPI-NOTIFY 2 'Applying DietPi-DDNS Cron job ...' crontab -u dietpi-ddns - <<< "*/${TIMESPAN:-10} * * * * /var/lib/dietpi/dietpi-ddns/update.sh" } @@ -372,15 +407,16 @@ Menu_Password() Menu_IPfamily() { G_WHIP_MENU_ARRAY=( - 'IPv4' ': Force IPv4 usage for the DDNS update (best compatibility)' - 'IPv6or4' ': Do not force any IP family for the DDNS update' - 'IPv6' ': Force IPv6 usage for the DDNS update (for modern clients)' + 'IPv4and6' ': Update IPv4 and IPv6 addresses for your DDNS' + 'IPv4' ': Update only the IPv4 address for your DDNS' + 'IPv6' ': Update only the IPv6 address for your DDNS' ) - G_WHIP_DEFAULT_ITEM=${IPFAMILY:--4} G_WHIP_DEFAULT_ITEM=${G_WHIP_DEFAULT_ITEM/-/IPv} - G_WHIP_MENU 'Please select whether you want to force an IP family to associate with your DDNS domain. -\nFor best compatibility with all clients and networks, we recommend to use IPv4. -\nIf you do not force any IP family, IPv6 is used, if enabled on this server and if the DDNS provider is reachable via IPv6, else IPv4 is used. -\nIf IPv6 is used, only clients with IPv6 enabled and connected via networks which support IPv6 can reach your server.' || return 1 + G_WHIP_DEFAULT_ITEM=${IPFAMILY/-/IPv} + G_WHIP_MENU 'Please select which IP family address to associate with your DDNS domain. +\nUsually one would want to update both, the IPv4 and IPv6 address, if your server has one. +\nIf you do not have a public IPv6 address, or want to keep the amount of DDNS requests low, update the IPv4 address only. +\nIf you have a public IPv6 address, want to support only clients with IPv6 enabled, and connected via networks which support IPv6, then you could update the IPv6 address only. +Choosing this could lower requests and attacks from random bots, which almost always try to connect via IPv4. But it can prevent your own/intended clients from being able to connect.' || return 1 IPFAMILY=${G_WHIP_RETURNED_VALUE/IPv/-} } @@ -405,7 +441,7 @@ Menu_Main() [[ $PROVIDER == 'DuckDNS' || $PROVIDER == 'Dynu' || $PROVIDER == 'FreeDNS' || $PROVIDER == 'YDNS' ]] || G_WHIP_MENU_ARRAY+=("$username" ": [$USERNAME]") G_WHIP_MENU_ARRAY+=( "$password" ": [${PASSWORD//?/*}]" - 'IP family' ": [${IPFAMILY:--4}]" + 'IP family' ": [${IPFAMILY/-/IPv}]" 'Timespan' ": [${TIMESPAN:-10} minutes]" '' '●─ Apply ' 'Apply' ': Create or update Cron job with above settings' @@ -447,7 +483,7 @@ then then Remove || exit 1 else - G_DIETPI-NOTIFY 1 "Input found but no command. Aborting...$USAGE" + G_DIETPI-NOTIFY 1 "Input found but no command. Aborting ...$USAGE" exit 1 fi @@ -455,10 +491,11 @@ then else # Read current settings from existing Cron job Read + [[ $IPFAMILY ]] || IPFAMILY='-4and6' # Read status of existing Cron job via last two journal lines: "dietpi-ddns" tag shows curl errors, "cron" tag with "dietpi-ddns" string shows Cron job execution STATUS='Manage DDNS settings to keep your dynamic IP with the static domain provided by your DDNS provider in sync' - [[ $PROVIDER ]] && STATUS="Last DietPi-DDNS logs:\n$(journalctl -r -t dietpi-ddns -t CRON | grep -m2 dietpi-ddns)" + [[ $PROVIDER ]] && STATUS="Last DietPi-DDNS logs:\n$(journalctl -r -t dietpi-ddns -t CRON | grep -m4 dietpi-ddns | sort)" NEXT_MENU_START='Provider' while Menu_Main; do :; done diff --git a/dietpi/dietpi-drive_manager b/dietpi/dietpi-drive_manager index aea801fba4..251c1ef496 100755 --- a/dietpi/dietpi-drive_manager +++ b/dietpi/dietpi-drive_manager @@ -1039,7 +1039,7 @@ Do you wish to ignore this warning, and, mount the drive regardless?" || return G_WHIP_MENU_ARRAY+=('' '●─ Userdata & Swap options ') # User data - if [[ ( $FP_USERDATA_CURRENT == ${aDRIVE_MOUNT_TARGET[$MENU_DRIVE_INDEX]}* && ${aDRIVE_MOUNT_TARGET[$MENU_DRIVE_INDEX]} != '/' ) || ( $FP_USERDATA_CURRENT == '/mnt/dietpi_userdata' && ${aDRIVE_MOUNT_TARGET[$MENU_DRIVE_INDEX]} == '/' ) ]] + if [[ ( ( $FP_USERDATA_CURRENT == "${aDRIVE_MOUNT_TARGET[$MENU_DRIVE_INDEX]}" || $FP_USERDATA_CURRENT == "${aDRIVE_MOUNT_TARGET[$MENU_DRIVE_INDEX]}/"* ) && ${aDRIVE_MOUNT_TARGET[$MENU_DRIVE_INDEX]} != '/' ) || ( $FP_USERDATA_CURRENT == '/mnt/dietpi_userdata' && ${aDRIVE_MOUNT_TARGET[$MENU_DRIVE_INDEX]} == '/' ) ]] then partition_contains_userdata=1 G_WHIP_MENU_ARRAY+=('User data' ": [X] | DietPi user data is currently located on this drive") diff --git a/dietpi/dietpi-services b/dietpi/dietpi-services index 646992a4d5..387ccc3f0b 100755 --- a/dietpi/dietpi-services +++ b/dietpi/dietpi-services @@ -174,7 +174,7 @@ _EOF_ # - Media 'ympd' 'mympd' - 'logitechmediaserver' + 'lyrionmusicserver' 'airsonic' 'mopidy' 'koel' @@ -433,7 +433,8 @@ _EOF_ do # Skip masked services if not to be unmasked [[ $command != 'unmask' && ${aSERVICE_MODE[$i]} == 'masked' ]] && { G_DIETPI-NOTIFY 2 "skip : ${aSERVICE_NAME[$i]} (masked)"; continue; } - [[ $command == 'restart' && ${aSERVICE_MODE[$i]:=$(systemctl is-enabled "${aSERVICE_NAME[$i]}")} == 'disabled' ]] && { G_DIETPI-NOTIFY 2 "skip : ${aSERVICE_NAME[$i]} (disabled)"; continue; } + # Skip (re)start of disabled services + [[ ( $command == 'start' || $command == 'restart' ) && ${aSERVICE_MODE[$i]:=$(systemctl is-enabled "${aSERVICE_NAME[$i]}")} == 'disabled' ]] && { G_DIETPI-NOTIFY 2 "skip : ${aSERVICE_NAME[$i]} (disabled)"; continue; } G_DIETPI-NOTIFY -2 "$command : ${aSERVICE_NAME[$i]}" systemctl -q --no-reload "$command" "${aSERVICE_NAME[$i]}" 2> /dev/null Print_Status "$command" "${aSERVICE_NAME[$i]}" $? diff --git a/dietpi/dietpi-software b/dietpi/dietpi-software index abc50bc214..52992df981 100755 --- a/dietpi/dietpi-software +++ b/dietpi/dietpi-software @@ -361,8 +361,8 @@ Available commands: aSOFTWARE_DEPS[$software_id]='5 7 196' #------------------ software_id=35 - aSOFTWARE_NAME[$software_id]='Logitech Media Server' - aSOFTWARE_DESC[$software_id]='fka. SlimServer, SqueezeboxServer, SliMP3' + aSOFTWARE_NAME[$software_id]='Lyrion Music Server' + aSOFTWARE_DESC[$software_id]='formerly Logitech Media Server and Squeezebox Server' aSOFTWARE_CATX[$software_id]=2 aSOFTWARE_DOCS[$software_id]='https://dietpi.com/docs/software/media/#logitech-media-server' # - RISC-V: No package: https://lms-community.github.io/lms-server-repository/stable.xml @@ -663,7 +663,8 @@ Available commands: aSOFTWARE_DESC[$software_id]='Automatically download TV shows' aSOFTWARE_CATX[$software_id]=3 aSOFTWARE_DOCS[$software_id]='https://dietpi.com/docs/software/bittorrent/#sonarr' - aSOFTWARE_DEPS[$software_id]='87 150' + aSOFTWARE_DEPS[$software_id]='87' + (( $G_HW_ARCH == 1 )) && aSOFTWARE_DEPS[$software_id]+=' 150' # - RISC-V: Missing package aSOFTWARE_AVAIL_G_HW_ARCH[$software_id,11]=0 #------------------ @@ -1509,7 +1510,6 @@ Available commands: aSOFTWARE_DESC[$software_id]='reverse proxy' aSOFTWARE_CATX[$software_id]=16 aSOFTWARE_DOCS[$software_id]='https://dietpi.com/docs/software/advanced_networking/#frp' - aSOFTWARE_INTERACTIVE[$software_id]=1 # Home Automation #-------------------------------------------------------------------------------- @@ -3017,9 +3017,11 @@ unix_socket_directories = '/run/postgresql'" > "$i/00dietpi.conf" G_EXEC chmod +x node-install.sh # ARMv6/RISC-V: Use unofficial builds to get the latest version: https://github.com/MichaIng/nodejs-linux-installer/pull/2, https://github.com/MichaIng/nodejs-linux-installer/commit/cd952fe - local unofficial=() - (( $G_HW_ARCH == 1 || $G_HW_ARCH == 11 )) && unofficial=('-u') - G_EXEC_OUTPUT=1 G_EXEC ./node-install.sh "${unofficial[@]}" + local options=() + (( $G_HW_ARCH == 1 || $G_HW_ARCH == 11 )) && options=('-u') + # ARMv7 Bullseye: node: /usr/lib/arm-linux-gnueabihf/libstdc++.so.6: version `GLIBCXX_3.4.30'/'0/GLIBCXX_3.4.39' not found (required by node) + (( $G_HW_ARCH == 2 && $G_DISTRO < 7 )) && options=('-v' 'v22.11.0') + G_EXEC_OUTPUT=1 G_EXEC ./node-install.sh "${options[@]}" G_EXEC rm node-install.sh fi @@ -3472,7 +3474,7 @@ _EOF_ G_EXEC systemctl stop nfs-server G_EXEC mkdir -p /etc/exports.d - [[ -f '/etc/exports.d/dietpi.exports' ]] || G_EXEC eval 'echo '\''/mnt/dietpi_userdata *(rw,async,no_root_squash,fsid=0,crossmnt,no_subtree_check)'\'' > /etc/exports.d/dietpi.exports' + [[ -f '/etc/exports.d/dietpi.exports' ]] || G_EXEC eval 'echo '\''/mnt/dietpi_userdata *(rw,async,no_root_squash,crossmnt,no_subtree_check)'\'' > /etc/exports.d/dietpi.exports' fi if To_Install 83 apache2 # Apache @@ -4121,8 +4123,13 @@ _EOF_ if To_Install 133 yacy # YaCy then # Get latest download - 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"; } + if (( $G_HW_ARCH == 1 )) + then + local file='yacy_v1.926_202308282208_376bcfd54_last_java_8.tar.gz' + else + local file=$(curl -sSfL 'https://download.yacy.net/?C=N;O=D' | grep -wo 'yacy_v[0-9._a-f]*\.tar\.gz' | head -1) + [[ $file ]] || { file='yacy_v1.940_202405270005_70454654f.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"; } + fi Download_Install "https://download.yacy.net/$file" /etc @@ -4142,6 +4149,12 @@ ExecStop=/etc/yacy/stopYACY.sh [Install] WantedBy=multi-user.target _EOF_ + # Set admin interface passwd: + if [[ ! -f '/etc/yacy/DATA/SETTINGS/yacy.conf' ]] + then + Create_Config /etc/yacy/DATA/SETTINGS/yacy.conf yacy + /etc/yacy/bin/passwd.sh "$GLOBAL_PW" + fi fi if To_Install 186 ipfs # IPFS Node @@ -5053,7 +5066,7 @@ _EOF_ G_EXEC eval "curl -sSfL '$url' | gpg --dearmor -o /etc/apt/trusted.gpg.d/dietpi-mopidy.gpg --yes" # APT list - G_EXEC eval "echo 'deb https://apt.mopidy.com ${G_DISTRO_NAME/bookworm/bullseye} main contrib non-free' > /etc/apt/sources.list.d/mopidy.list" + G_EXEC eval "echo 'deb https://apt.mopidy.com ${G_DISTRO_NAME/trixie/bookworm} main contrib non-free' > /etc/apt/sources.list.d/dietpi-mopidy.list" G_AGUP fi @@ -6214,7 +6227,7 @@ _EOF_ *) local arch='amd64';; esac - local fallback_url="https://github.com/navidrome/navidrome/releases/download/v0.53.3/navidrome_0.53.3_linux_$arch.tar.gz" + local fallback_url="https://github.com/navidrome/navidrome/releases/download/v0.54.2/navidrome_0.54.2_linux_$arch.tar.gz" Download_Install "$(curl -sSfL 'https://api.github.com/repos/navidrome/navidrome/releases/latest' | mawk -F\" "/^ *\"browser_download_url\": \".*\/navidrome_[0-9.]*_linux_$arch\.tar\.gz\"$/{print \$4}")" /opt/navidrome # Data dir @@ -6311,7 +6324,7 @@ _EOF_ *) local arch='x64';; esac - local fallback_url="https://github.com/Kareadita/Kavita/releases/download/v0.8.3.2/kavita-linux-$arch.tar.gz" + local fallback_url="https://github.com/Kareadita/Kavita/releases/download/v0.8.4.2/kavita-linux-$arch.tar.gz" Download_Install "$(curl -sSfL 'https://api.github.com/repos/Kareadita/Kavita/releases/latest' | mawk -F\" "/^ *\"browser_download_url\": \".*\/kavita-linux-$arch\.tar\.gz\"$/{print \$4}")" G_EXEC chmod +x Kavita/Kavita @@ -6512,31 +6525,30 @@ _EOF_ if To_Install 171 # frp then case $G_HW_ARCH in + 1) local arch='arm';; + 2) local arch='arm_hf';; 3) local arch='arm64';; 10) local arch='amd64';; - 11) local arch='riscv64';; - *) local arch='arm_hf';; + *) local arch='riscv64';; esac # Download - local fallback_url="https://github.com/fatedier/frp/releases/download/v0.61.0/frp_0.61.0_linux_$arch.tar.gz" + local fallback_url="https://github.com/fatedier/frp/releases/download/v0.61.1/frp_0.61.1_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_* - local choice_required= - while : - do - G_WHIP_MENU_ARRAY=( - 'Server' ': Use this machine as a server, with a public IP' - 'Client' ': Use this machine as a client, without a public IP' - 'Both' ': Run the reverse proxy only on this machine' - ) + # Mode choice + G_WHIP_MENU_ARRAY=( + 'Server' ': Use this machine as a server, with a public IP' + 'Client' ': Use this machine as a client, without a public IP' + 'Both' ': Run the reverse proxy only on this machine' + ) - G_WHIP_MENU "${choice_required}Please choose how you are going to run frp." && break - choice_required='[ERROR] A choice is required to finish the frp install.\n\n' - done - local mode=$G_WHIP_RETURNED_VALUE + G_WHIP_NOCANCEL=1 + G_WHIP_DEFAULT_ITEM='Both' + G_WHIP_MENU 'Please choose how you are going to run frp:' + local mode=${G_WHIP_RETURNED_VALUE:-Both} G_EXEC mkdir -p /etc/frp Create_User frp -d /etc/frp @@ -6556,28 +6568,41 @@ StartLimitBurst=3 [Service] User=frp AmbientCapabilities=CAP_NET_BIND_SERVICE -ExecStart=/usr/local/bin/frps -c /etc/frp/frps.ini +ExecStart=/usr/local/bin/frps -c /etc/frp/frps.toml Restart=on-failure RestartSec=5s [Install] WantedBy=multi-user.target _EOF_ + # Pre-v9.9: Inform about config file migration + if [[ -f '/etc/frp/frps.ini' ]] + then + G_WHIP_MSG '[WARNING] New toml config file will be generated +\nfrp deprecated the ini format for its config files, hence /etc/frp/frps.toml will be generated and used from now on. +\nAn automated conversion is not possible and hence need to be done manually, if you did changes. A backup of the ini config it kept in place: +- /etc/frp/frps.ini.bak +\nA full overview of all config keys can be found here: +- https://github.com/fatedier/frp/blob/dev/conf/frps_full_example.toml' + G_EXEC mv /etc/frp/frps.ini{,.bak} + fi + # Pre-create config file to turn on dashboard token=$(openssl rand -hex 15) - [[ -f '/etc/frp/frps.ini' ]] || cat << _EOF_ > /etc/frp/frps.ini -[common] -bind_port = 7000 + [[ -f '/etc/frp/frps.toml' ]] || cat << _EOF_ > /etc/frp/frps.toml +bindAddr = "0.0.0.0" +bindPort = 7000 -dashboard_port = 7500 -dashboard_user = admin -dashboard_pwd = $GLOBAL_PW +webServer.addr = "0.0.0.0" +webServer.port = 7500 +webServer.user = "admin" +webServer.password = "$GLOBAL_PW" -authentication_method = token -token = $token +auth.method = "token" +auth.token = "$token" _EOF_ - G_EXEC chmod 0640 /etc/frp/frps.ini - G_EXEC chown root:frp /etc/frp/frps.ini + G_EXEC chmod 0640 /etc/frp/frps.toml + G_EXEC chown root:frp /etc/frp/frps.toml aENABLE_SERVICES+=('frps') fi @@ -6594,58 +6619,62 @@ StartLimitBurst=3 [Service] User=frp -ExecStart=/usr/local/bin/frpc -c /etc/frp/frpc.ini -ExecReload=/usr/local/bin/frpc reload -c /etc/frp/frpc.ini +ExecStart=/usr/local/bin/frpc -c /etc/frp/frpc.toml +ExecReload=/usr/local/bin/frpc reload -c /etc/frp/frpc.toml Restart=on-failure RestartSec=5s [Install] WantedBy=multi-user.target _EOF_ - local server_addr=127.0.0.1 server_port=7000 - if [[ $G_WHIP_RETURNED_VALUE == 'Client' ]] + # Pre-v9.9: Inform about config file migration + if [[ -f '/etc/frp/frpc.ini' ]] then - local invalid_entry= - while : - do - if G_WHIP_INPUTBOX "${invalid_entry}Please enter the IP address of your frp server, including port (default 7000)" && [[ $G_WHIP_RETURNED_VALUE =~ ^[0-9.:]+$ ]] - then - server_addr=${G_WHIP_RETURNED_VALUE#*:} - [[ $G_WHIP_RETURNED_VALUE =~ : ]] && server_port=${G_WHIP_RETURNED_VALUE%:*} - invalid_entry= - break - else - invalid_entry='[FAILED] Please enter a valid IP address\n\n' - fi - done - - while : - do - if G_WHIP_INPUTBOX "${invalid_entry}Please enter the authentication token of your frp server" && [[ $G_WHIP_RETURNED_VALUE =~ ^[0-9.]+$ ]] - then - token=$G_WHIP_RETURNED_VALUE - break - else - invalid_entry='[FAILED] Please enter a token\n\n' - fi - done + G_WHIP_MSG '[WARNING] New toml config file will be generated +\nfrp deprecated the ini format for its config files, hence /etc/frp/frpc.toml will be generated and used from now on. +\nAn automated conversion is not possible and hence need to be done manually, if you did changes. A backup of the ini config it kept in place: +- /etc/frp/frpc.ini.bak +\nA full overview of all config keys can be found here: +- https://github.com/fatedier/frp/blob/dev/conf/frpc_full_example.toml' + G_EXEC mv /etc/frp/frpc.ini{,.bak} fi # Pre-create config file to turn on admin UI - [[ -f '/etc/frp/frpc.ini' ]] || cat << _EOF_ > /etc/frp/frpc.ini -[common] -server_addr = $server_addr -server_port = $server_port + if [[ ! -f '/etc/frp/frpc.toml' ]] + then + local server_addr='127.0.0.1' server_port=7000 + if [[ $G_WHIP_RETURNED_VALUE == 'Client' ]] + then + G_WHIP_NOCANCEL=1 + G_WHIP_DEFAULT_ITEM="$server_addr:$server_port" + G_WHIP_INPUTBOX_REGEX='^[0-9.:]+$' + G_WHIP_INPUTBOX_REGEX_TEXT='be a valid IP address, optionally with appended network port number, like "192.168.1.100:7000"' + G_WHIP_INPUTBOX 'Please enter the IP address of your frp server, optionally including port (default 7000):' + [[ $G_WHIP_RETURNED_VALUE ]] && server_addr=${G_WHIP_RETURNED_VALUE%:*} + [[ $G_WHIP_RETURNED_VALUE =~ : ]] && server_port=${G_WHIP_RETURNED_VALUE##*:} + + G_WHIP_NOCANCEL=1 + G_WHIP_INPUTBOX_REGEX='*' + G_WHIP_INPUTBOX 'Please enter the authentication token of your frp server:' + token=$G_WHIP_RETURNED_VALUE + fi -admin_addr = 0.0.0.0 -admin_port = 7400 -admin_user = admin -admin_pwd = $GLOBAL_PW + cat << _EOF_ > /etc/frp/frpc.toml +serverAddr = "$server_addr" +serverPort = $server_port -token = $token +webServer.addr = "0.0.0.0" +webServer.port = 7400 +webServer.user = "admin" +webServer.password = "$GLOBAL_PW" + +auth.method = "token" +auth.token = "$token" _EOF_ - G_EXEC chmod 0660 /etc/frp/frpc.ini - G_EXEC chown root:frp /etc/frp/frpc.ini + fi + + G_EXEC chmod 0660 /etc/frp/frpc.toml + G_EXEC chown root:frp /etc/frp/frpc.toml aENABLE_SERVICES+=('frpc') fi @@ -6676,7 +6705,10 @@ _EOF_ local cache=$(runuser -u nodered -- mktemp -d) # - Reinstall: Remove all locally installed modules, to work around update issues, but preserve installed plugins from package.json: https://github.com/MichaIng/DietPi/issues/7128 [[ -f 'package.json' ]] && G_EXEC rm -Rf node_modules .npm/_cacache - G_EXEC_OUTPUT=1 G_EXEC runuser -u nodered -- npm i --cache "$cache" --no-audit node-red@latest + # - Install v3 on ARMv6, since the @node-rs/bcrypt dependency does not support it: https://github.com/MichaIng/DietPi/issues/7252 + local version='latest' + (( $G_HW_ARCH == 1 )) && version=3 + G_EXEC_OUTPUT=1 G_EXEC runuser -u nodered -- npm i --cache "$cache" --no-audit "node-red@$version" G_EXEC rm -R "$cache" G_EXEC cd "$G_WORKING_DIR" @@ -7006,17 +7038,17 @@ _EOF_ G_EXEC chmod 0600 /etc/haproxy/haproxy.cfg fi - if To_Install 35 logitechmediaserver # Logitech Media Server + if To_Install 35 lyrionmusicserver # Lyrion Music Server then # Grab architecture local arch='arm' (( $G_HW_ARCH == 10 )) && arch='amd64' # Grab latest package URL - local fallback_url="https://downloads.lms-community.org/nightly/logitechmediaserver_8.5.1~1712473975_$arch.deb" + local fallback_url="https://downloads.lms-community.org/nightly/lyrionmusicserver_9.0.1~1733855934_$arch.deb" Download_Install "$(curl -sSf 'https://raw.githubusercontent.com/LMS-Community/lms-server-repository/master/stable.xml' | grep -om1 "https://[^\"]*_$arch.deb")" - G_EXEC systemctl stop logitechmediaserver - Remove_SysV logitechmediaserver + G_EXEC systemctl stop lyrionmusicserver + Remove_SysV lyrionmusicserver # Grant user write access to DietPi media dirs for creating infobrowser.opml. G_EXEC usermod -aG dietpi squeezeboxserver @@ -7329,7 +7361,7 @@ _EOF_ 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" + G_EXEC eval "echo 'deb https://repos.influxdata.com/debian ${G_DISTRO_NAME/trixie/bookworm} stable' > /etc/apt/sources.list.d/dietpi-influxdb.list" G_AGUP # APT package @@ -7469,7 +7501,7 @@ _EOF_ then Download_Install 'https://github.com/gotson/komga/releases/download/v0.165.0/komga-0.165.0.jar' /mnt/dietpi_userdata/komga/komga.jar else - local fallback_url='https://github.com/gotson/komga/releases/download/1.14.1/komga-1.14.1.jar' + local fallback_url='https://github.com/gotson/komga/releases/download/1.15.1/komga-1.15.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 fi @@ -7565,8 +7597,15 @@ _EOF_ local json=() [[ $PHP_VERSION == 8* ]] || aDEPS+=("php$PHP_VERSION-json") json=('json') - local fallback_url="https://github.com/ampache/ampache/releases/download/6.6.3/ampache-6.6.3_all_php$PHP_VERSION.zip" - Download_Install "$(curl -sSfL 'https://api.github.com/repos/ampache/ampache/releases/latest' | mawk -F\" "/^ *\"browser_download_url\": \".*\/ampache-[0-9\.]*_all_php$PHP_VERSION.zip\"$/{print \$4}")" ampache + # Download: Ampache v7 requires PHP 8.2 + if (( $G_DISTRO > 6 )) + then + local fallback_url="https://github.com/ampache/ampache/releases/download/7.1.1/ampache-7.1.1_all_php$PHP_VERSION.zip" + Download_Install "$(curl -sSfL 'https://api.github.com/repos/ampache/ampache/releases/latest' | mawk -F\" "/^ *\"browser_download_url\": \".*\/ampache-[0-9\.]*_all_php$PHP_VERSION.zip\"$/{print \$4}")" ampache + else + local fallback_url="https://github.com/ampache/ampache/releases/download/6.6.5/ampache-6.6.5_all_php$PHP_VERSION.zip" + Download_Install "$(curl -sSfL 'https://api.github.com/repos/ampache/ampache/releases' | mawk -F\" "/^ *\"browser_download_url\": \".*\/ampache-[0-9\.]*_all_php$PHP_VERSION.zip\"$/{print \$4}")" ampache + fi # Reinstall: Preserve configs from old and new paths [[ -f '/var/www/ampache/config/ampache.cfg.php' ]] && G_EXEC mv /var/www/ampache/config/ampache.cfg.php ampache/config/ @@ -8220,7 +8259,7 @@ _EOF_ # APT deps: https://github.com/sabre-io/Baikal/wiki/Baïkal-dependencies aDEPS=("php$PHP_VERSION-xml" "php$PHP_VERSION-mbstring" "php$PHP_VERSION-mysql") - local fallback_url='https://github.com/sabre-io/Baikal/releases/download/0.9.5/baikal-0.9.5.zip' + local fallback_url='https://github.com/sabre-io/Baikal/releases/download/0.10.1/baikal-0.10.1.zip' Download_Install "$(curl -sSfL 'https://api.github.com/repos/sabre-io/Baikal/releases/latest' | mawk -F\" '/^ *"browser_download_url": ".*\/baikal-[^"\/]*\.zip"$/{print $4}')" # Reinstall: https://sabre.io/baikal/upgrade/ @@ -8412,6 +8451,9 @@ _EOF_ G_EXEC git config core.filemode false G_EXEC chmod +x mineos_console.js webui.js update_webui.sh reset_webui.sh generate-sslcert.sh + # Bookworm: Workaround for failing userid 1.0.0-beta.9 build on weirdly Bookworm only. Latest stable 1.2.5 seems to work well: https://github.com/MichaIng/DietPi/issues/7265 + G_CONFIG_INJECT '"userid"' ' "userid": "1.2.5",' package.json + # Workaround: Node.js posix needs to be installed alone first: https://github.com/MichaIng/DietPi/issues/5181 G_EXEC_OUTPUT=1 G_EXEC npm i --no-audit --no-package-lock posix@latest @@ -8432,7 +8474,7 @@ _EOF_ G_EXEC cd "$G_WORKING_DIR" # Service - cat << _EOF_ > /etc/systemd/system/mineos.service + cat << '_EOF_' > /etc/systemd/system/mineos.service [Unit] Description=MineOS (DietPi) Wants=network-online.target @@ -8442,12 +8484,19 @@ After=network-online.target SyslogIdentifier=MineOS WorkingDirectory=/mnt/dietpi_userdata/mineos/minecraft Environment="SHELL=/bin/bash" "HOME=/root" -ExecStart=$(command -v node) webui.js +ExecStart=/usr/local/bin/node webui.js KillMode=process [Install] WantedBy=multi-user.target _EOF_ + # User and permissions + local new_user=0 + getent passwd mineos &> /dev/null || new_user=1 + Create_User -d /mnt/dietpi_userdata/mineos/serverdata -p "$GLOBAL_PW" mineos + G_EXEC chown -R mineos /mnt/dietpi_userdata/mineos/serverdata + # - Assure SHA512 password hash algorithm, as MineOS does not support yescrypt, default since Bullseye: https://github.com/hexparrot/mineos-node/issues/441 + (( $new_user )) && G_EXEC eval "chpasswd --crypt-method SHA512 <<< 'mineos:$GLOBAL_PW'" fi if To_Install 46 qbittorrent # qBittorrent @@ -8558,8 +8607,8 @@ _EOF_ # Install ruTorrent: Web UI for rTorrent # - Grab current version local version=$(curl -sSfL 'https://api.github.com/repos/Novik/ruTorrent/releases/latest' | mawk -F\" '/^ *"tag_name": "[^"]*",$/{print $4}') - [[ $version ]] || { version='v5.0.0'; G_DIETPI-NOTIFY 1 "Automatic latest ruTorrent 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 == 'v5.'* ]] || version='v5.0.0' + [[ $version ]] || { version='v5.1.5'; G_DIETPI-NOTIFY 1 "Automatic latest ruTorrent 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 == 'v5.'* ]] || version='v5.1.5' Download_Install "https://github.com/Novik/ruTorrent/archive/$version.tar.gz" # - Reinstall freshly with preserved configs and 3rd party plugins @@ -8950,7 +8999,7 @@ _EOF_ *) local arch='arm';; esac - local fallback_url="https://github.com/syncthing/syncthing/releases/download/v1.28.0/syncthing-linux-$arch-v1.28.0.tar.gz" + local fallback_url="https://github.com/syncthing/syncthing/releases/download/v1.28.1/syncthing-linux-$arch-v1.28.1.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 fi @@ -9049,7 +9098,7 @@ RES_Y=$(sed -n '/^[[:blank:]]*SOFTWARE_CHROMIUM_RES_Y=/{s/^[^=]*=//p;q}' /boot/d CHROMIUM_OPTS="--kiosk --window-size=${RES_X:-1280},${RES_Y:-720} --window-position=0,0" # If you want tablet mode, uncomment the next line. -#CHROMIUM_OPTS+=' --force-tablet-mode --tablet-ui' +#CHROMIUM_OPTS="$CHROMIUM_OPTS --force-tablet-mode --tablet-ui" # Home page URL=$(sed -n '/^[[:blank:]]*SOFTWARE_CHROMIUM_AUTOSTART_URL=/{s/^[^=]*=//p;q}' /boot/dietpi.txt) @@ -9364,7 +9413,7 @@ _EOF_ if (( ${PHP_VERSION::1} > 7 )) then aDEPS+=("php$PHP_VERSION-curl") - local fallback_url='https://github.com/koel/koel/releases/download/v7.1.0/koel-v7.1.0.tar.gz' aphp_deps=('curl' 'dom') + local fallback_url='https://github.com/koel/koel/releases/download/v7.2.0/koel-v7.2.0.tar.gz' aphp_deps=('curl' 'dom') Download_Install "$(curl -sSfL 'https://api.github.com/repos/koel/koel/releases/latest' | mawk -F\" '/^ *"browser_download_url": ".*\/koel-[^"\/]*\.tar\.gz"$/{print $4}')" else aDEPS+=("php$PHP_VERSION-json") @@ -9440,23 +9489,71 @@ _EOF_ if To_Install 144 sonarr # Sonarr then - # https://sonarr.tv/#downloads-v3-linux-debian - # APT key - G_EXEC eval 'curl -sSf '\''https://keyserver.ubuntu.com/pks/lookup?search=0x2009837CBFFD68F45BC180471F4F90DE2A9B4BF8&op=get'\'' | gpg --dearmor -o /etc/apt/trusted.gpg.d/dietpi-sonarr.gpg --yes' + # Sonarr v4 does not support ARMv6 + if (( $G_HW_ARCH == 1 )) + then + # https://sonarr.tv/#downloads-v3-linux-debian + # APT key + G_EXEC eval 'curl -sSf '\''https://keyserver.ubuntu.com/pks/lookup?search=0x2009837CBFFD68F45BC180471F4F90DE2A9B4BF8&op=get'\'' | gpg --dearmor -o /etc/apt/trusted.gpg.d/dietpi-sonarr.gpg --yes' - # APT list: Buster is the latest available suite: https://apt.sonarr.tv/debian/dists/ - G_EXEC eval 'echo '\''deb https://apt.sonarr.tv/debian buster main'\'' > /etc/apt/sources.list.d/sonarr.list' + # APT list: Buster is the latest available suite: https://apt.sonarr.tv/debian/dists/ + G_EXEC eval 'echo '\''deb https://apt.sonarr.tv/debian buster main'\'' > /etc/apt/sources.list.d/sonarr.list' - # Update package lists - G_AGUP + # Update package lists + G_AGUP - # Pre-configure DEB package - G_EXEC eval "debconf-set-selections <<< 'sonarr sonarr/owning_group string dietpi'" - G_EXEC eval "debconf-set-selections <<< 'sonarr sonarr/config_directory string /mnt/dietpi_userdata/sonarr'" + # Pre-configure DEB package + G_EXEC eval "debconf-set-selections <<< 'sonarr sonarr/owning_group string dietpi'" + G_EXEC eval "debconf-set-selections <<< 'sonarr sonarr/config_directory string /mnt/dietpi_userdata/sonarr'" - # Install Sonarr and mediainfo - G_AGI sonarr mediainfo - G_EXEC systemctl stop sonarr + # Install Sonarr and mediainfo + G_AGI sonarr mediainfo + G_EXEC systemctl stop sonarr + + local install_dir='/usr/lib/sonarr' + local exe="$(command -v mono) $install_dir/bin/Sonarr.exe" + else + # Pre-v9.9 cleanup + [[ -f '/etc/apt/sources.list.d/sonarr.list' ]] && G_EXEC rm /etc/apt/sources.list.d/sonarr.list + [[ -f '/etc/apt/trusted.gpg.d/dietpi-sonarr.gpg' ]] && G_EXEC rm /etc/apt/trusted.gpg.d/dietpi-sonarr.gpg + if dpkg-query -s 'sonarr' &> /dev/null + then + G_AGP sonarr + # Offer to uninstall Mono + if (( ${aSOFTWARE_INSTALL_STATE[150]} == 2 )) + then + G_WHIP_BUTTON_OK_TEXT='Yes' G_WHIP_BUTTON_CANCEL_TEXT='No' G_WHIP_DEFAULT_ITEM='Yes' + G_WHIP_YESNO '[ INFO ] Mono is no dependency of Sonarr v4 anymore +\nA migration from Sonarr v3 to Sonarr v4 is done, which does not require Mono anymore. If you do not need Mono for something else, it can hence be uninstalled to free up some space. +\nDo you want to uninstall Mono now? It can be done any time later via "dietpi-software".' && aSOFTWARE_INSTALL_STATE[150]=-1 + fi + fi + + # APT dependencies + aDEPS=('mediainfo') + # - .NET: https://github.com/dotnet/docs/blob/main/docs/core/install/linux-debian.md#dependencies + case $G_DISTRO in + 6) aDEPS+=('libicu67');; + *) aDEPS+=('libicu72');; + esac + + # Download + case $G_HW_ARCH in + 2) local arch='arm';; + 3) local arch='arm64';; + *) local arch='x64';; + esac + + local fallback_url="https://github.com/Sonarr/Sonarr/releases/download/v4.0.11.2680/Sonarr.main.4.0.11.2680.linux-$arch.tar.gz" + Download_Install "$(curl -sSfL 'https://api.github.com/repos/Sonarr/Sonarr/releases/latest' | mawk -F\" "/^ *\"browser_download_url\": \".*linux-$arch\.tar\.gz\"$/{print \$4}")" + + # Install: Remove previous instance on reinstall + [[ -d '/opt/sonarr' ]] && G_EXEC rm -R /opt/sonarr + G_EXEC mv Sonarr /opt/sonarr + + local install_dir='/opt/sonarr' + local exe="$install_dir/Sonarr" + fi # Pre-v7.1: Remove Sonarr v2 key, PID file and database backups from DietPi-Arr_to_RAM if [[ -f '/etc/apt/trusted.gpg' && $(apt-key --keyring /etc/apt/trusted.gpg list 'A236C58F409091A18ACA53CBEBFF6B99D9B78493' 2> /dev/null) ]] @@ -9487,7 +9584,7 @@ SyslogIdentifier=Sonarr User=sonarr UMask=002 LogsDirectory=sonarr -ExecStart=$(command -v mono) /usr/lib/sonarr/bin/Sonarr.exe -nobrowser -data=/mnt/dietpi_userdata/sonarr +ExecStart=$exe -nobrowser -data=/mnt/dietpi_userdata/sonarr TimeoutStopSec=20 KillMode=process Restart=on-failure @@ -9511,7 +9608,7 @@ _EOF_ G_EXEC ln -s /var/log/sonarr/logs.db-wal /mnt/dietpi_userdata/sonarr/logs.db-wal # Permissions - G_EXEC chown -R sonarr:dietpi /mnt/dietpi_userdata/sonarr /usr/lib/sonarr + G_EXEC chown -R sonarr:dietpi /mnt/dietpi_userdata/sonarr "$install_dir" fi if To_Install 145 radarr # Radarr @@ -9527,33 +9624,25 @@ _EOF_ esac fi - # Reinstall: Skip download and install, advice to use internal updater from web UI - if [[ -d '/opt/radarr' ]] + # Download + # - ARMv6: Radarr v4 does not support Mono anymore + local url='https://github.com/Radarr/Radarr/releases/download/v3.2.2.5080/Radarr.master.3.2.2.5080.linux.tar.gz' + if (( $G_HW_ARCH != 1 )) then - G_DIETPI-NOTIFY 2 "${aSOFTWARE_NAME[$software_id]} install dir \"/opt/radarr\" already exists. Download and install steps will be skipped. - - If you want to update ${aSOFTWARE_NAME[$software_id]}, please use the internal updater from web UI. - - If you need to reinstall (e.g. broken instance), please manually remove the install dir and rerun \"dietpi-software reinstall $software_id\"." - - G_AGI "${aDEPS[@]}" - aDEPS=() - else - # ARMv6: Radarr v4 does not support Mono anymore - local url='https://github.com/Radarr/Radarr/releases/download/v3.2.2.5080/Radarr.master.3.2.2.5080.linux.tar.gz' - if (( $G_HW_ARCH != 1 )) - then - case $G_HW_ARCH in - 2) local arch='arm';; - 3) local arch='arm64';; - *) local arch='x64';; - esac - - url=$(curl -sSfL 'https://api.github.com/repos/Radarr/Radarr/releases/latest' | mawk -F\" "/^ *\"browser_download_url\": \".*linux-core-$arch\.tar\.gz\"$/{print \$4}") - local fallback_url="https://github.com/Radarr/Radarr/releases/download/v5.12.2.9335/Radarr.master.5.12.2.9335.linux-core-$arch.tar.gz" - fi + case $G_HW_ARCH in + 2) local arch='arm';; + 3) local arch='arm64';; + *) local arch='x64';; + esac - Download_Install "$url" - G_EXEC mv Radarr /opt/radarr + url=$(curl -sSfL 'https://api.github.com/repos/Radarr/Radarr/releases/latest' | mawk -F\" "/^ *\"browser_download_url\": \".*linux-core-$arch\.tar\.gz\"$/{print \$4}") + local fallback_url="https://github.com/Radarr/Radarr/releases/download/v5.16.3.9541/Radarr.master.5.16.3.9541.linux-core-$arch.tar.gz" fi + Download_Install "$url" + + # Install: Remove previous instance on reinstall + [[ -d '/opt/radarr' ]] && G_EXEC rm -R /opt/radarr + G_EXEC mv Radarr /opt/radarr # Radarr v2: Remove old PID file and database backups from DietPi-Arr_to_RAM [[ -f '/mnt/dietpi_userdata/radarr/nzbdrone.pid' ]] && G_EXEC rm /mnt/dietpi_userdata/radarr/nzbdrone.pid @@ -9625,33 +9714,25 @@ _EOF_ # Pre-v7.5 ARMv6: Migrate old install dir [[ -d '/opt/Lidarr' && ! -d '/opt/lidarr' ]] && G_EXEC mv /opt/{L,l}idarr - # Reinstall: Skip download and install, advice to use internal updater from web UI - if [[ -d '/opt/lidarr' ]] + # Download + # - ARMv6: Lidarr v1 does not support Mono anymore + local url='https://github.com/Lidarr/Lidarr/releases/download/v0.8.1.2135/Lidarr.master.0.8.1.2135.linux.tar.gz' + if (( $G_HW_ARCH != 1 )) then - G_DIETPI-NOTIFY 2 "${aSOFTWARE_NAME[$software_id]} install dir \"/opt/lidarr\" already exists. Download and install steps will be skipped. - - If you want to update ${aSOFTWARE_NAME[$software_id]}, please use the internal updater from web UI. - - If you need to reinstall (e.g. broken instance), please manually remove the install dir and rerun \"dietpi-software reinstall $software_id\"." - - G_AGI "${aDEPS[@]}" - aDEPS=() - else - # ARMv6: Lidarr v1 does not support Mono anymore - local url='https://github.com/Lidarr/Lidarr/releases/download/v0.8.1.2135/Lidarr.master.0.8.1.2135.linux.tar.gz' - if (( $G_HW_ARCH != 1 )) - then - case $G_HW_ARCH in - 2) local arch='arm';; - 3) local arch='arm64';; - *) local arch='x64';; - esac - - url=$(curl -sSfL 'https://api.github.com/repos/Lidarr/Lidarr/releases/latest' | mawk -F\" "/^ *\"browser_download_url\": \".*linux-core-$arch\.tar\.gz\"$/{print \$4}") - local fallback_url="https://github.com/Lidarr/Lidarr/releases/download/v2.6.4.4402/Lidarr.master.2.6.4.4402.linux-core-$arch.tar.gz" - fi + case $G_HW_ARCH in + 2) local arch='arm';; + 3) local arch='arm64';; + *) local arch='x64';; + esac - Download_Install "$url" - G_EXEC mv Lidarr /opt/lidarr + url=$(curl -sSfL 'https://api.github.com/repos/Lidarr/Lidarr/releases/latest' | mawk -F\" "/^ *\"browser_download_url\": \".*linux-core-$arch\.tar\.gz\"$/{print \$4}") + local fallback_url="https://github.com/Lidarr/Lidarr/releases/download/v2.8.2.4493/Lidarr.master.2.8.2.4493.linux-core-$arch.tar.gz" fi + Download_Install "$url" + + # Install: Remove previous instance on reinstall + [[ -d '/opt/lidarr' ]] && G_EXEC rm -R /opt/lidarr + G_EXEC mv Lidarr /opt/lidarr # Data dir G_EXEC mkdir -p /mnt/dietpi_userdata/lidarr @@ -9793,22 +9874,16 @@ _EOF_ if To_Install 146 tautulli # Tautulli then - # Reinstall: Skip download and install, advice to use internal updater from web UI - if [[ -d '/opt/tautulli' ]] - then - G_DIETPI-NOTIFY 2 "${aSOFTWARE_NAME[$software_id]} install dir \"/opt/tautulli\" already exists. Download and install steps will be skipped. - - If you want to update ${aSOFTWARE_NAME[$software_id]}, please use the internal updater from web UI. - - If you need to reinstall (e.g. broken instance), please manually remove the install dir and rerun \"dietpi-software reinstall $software_id\"." + # Download + local url='https://github.com/Tautulli/Tautulli.git' + G_CHECK_URL "$url" + G_THREAD_START git clone --depth 1 "$url" + G_AGI python3-pkg-resources + G_THREAD_WAIT - G_AGI python3-pkg-resources - else - local url='https://github.com/Tautulli/Tautulli.git' - G_CHECK_URL "$url" - G_THREAD_START git clone --depth 1 "$url" - G_AGI python3-pkg-resources - G_THREAD_WAIT - G_EXEC mv Tautulli /opt/tautulli - fi + # Install: Remove previous instance on reinstall + [[ -d '/opt/tautulli' ]] && G_EXEC rm -R /opt/tautulli + G_EXEC mv Tautulli /opt/tautulli # User Create_User -d /mnt/dietpi_userdata/tautulli tautulli @@ -9847,13 +9922,13 @@ _EOF_ esac fi + # Download case $G_HW_ARCH in 1) local arch='Mono';; 2) local arch='LinuxARM32';; 3) local arch='LinuxARM64';; *) local arch='LinuxAMDx64';; esac - local fallback_url="https://github.com/Jackett/Jackett/releases/download/v0.21.1138/Jackett.Binaries.$arch.tar.gz" Download_Install "$(curl -sSfL 'https://api.github.com/repos/Jackett/Jackett/releases/latest' | mawk -F\" "/^ *\"browser_download_url\": \".*\/Jackett\.Binaries\.$arch\.tar\.gz\"$/{print \$4}")" @@ -9861,10 +9936,8 @@ _EOF_ [[ -d '/opt/jackett/Jackett' ]] && G_EXEC mv /opt/jackett/Jackett Jackett/ [[ -d '/opt/jackett/.mono' ]] && G_EXEC mv /opt/jackett/.mono Jackett/ - # Remove existing install dir + # Install: Remove previous instance on reinstall [[ -d '/opt/jackett' ]] && G_EXEC rm -R /opt/jackett - - # Move unpacked install dir in place G_EXEC mv Jackett /opt/jackett # User @@ -9915,7 +9988,7 @@ _EOF_ local reinstall=0 [[ -f '/mnt/dietpi_userdata/nzbget/nzbget.conf' ]] && reinstall=1 - local fallback_url='https://github.com/nzbgetcom/nzbget/releases/download/v24.3/nzbget-24.3-bin-linux.run' + local fallback_url='https://github.com/nzbgetcom/nzbget/releases/download/v24.5/nzbget-24.5-bin-linux.run' Download_Install "$(curl -sSfL 'https://api.github.com/repos/nzbgetcom/nzbget/releases/latest' | mawk -F\" '/^ *"browser_download_url": ".*\/nzbget-[^"/]*-bin-linux.run"$/{print $4}')" nzbget.run G_EXEC mkdir -p /mnt/dietpi_userdata/nzbget G_EXEC_OUTPUT=1 G_EXEC dash nzbget.run --destdir /mnt/dietpi_userdata/nzbget @@ -9978,26 +10051,18 @@ _EOF_ *) aDEPS=('libicu72');; esac - # Reinstall: Skip download and install, advice to use internal updater from web UI - if [[ -d '/opt/prowlarr' ]] - then - G_DIETPI-NOTIFY 2 "${aSOFTWARE_NAME[$software_id]} install dir \"/opt/prowlarr\" already exists. Download and install steps will be skipped. - - If you want to update ${aSOFTWARE_NAME[$software_id]}, please use the internal updater from web UI. - - If you need to reinstall (e.g. broken instance), please manually remove the install dir and rerun \"dietpi-software reinstall $software_id\"." - - G_AGI "${aDEPS[@]}" - aDEPS=() - else - case $G_HW_ARCH in - 2) local arch='arm';; - 3) local arch='arm64';; - *) local arch='x64';; - esac + # Download + case $G_HW_ARCH in + 2) local arch='arm';; + 3) local arch='arm64';; + *) local arch='x64';; + esac + local fallback_url="https://github.com/Prowlarr/Prowlarr/releases/download/v1.28.2.4885/Prowlarr.master.1.28.2.4885.linux-core-$arch.tar.gz" + Download_Install "$(curl -sSfL 'https://api.github.com/repos/Prowlarr/Prowlarr/releases/latest' | mawk -F\" "/^ *\"browser_download_url\": \".*linux-core-$arch\.tar\.gz\"$/{print \$4}")" - local fallback_url="https://github.com/Prowlarr/Prowlarr/releases/download/v1.24.3.4754/Prowlarr.master.1.24.3.4754.linux-core-$arch.tar.gz" - Download_Install "$(curl -sSfL 'https://api.github.com/repos/Prowlarr/Prowlarr/releases/latest' | mawk -F\" "/^ *\"browser_download_url\": \".*linux-core-$arch\.tar\.gz\"$/{print \$4}")" - G_EXEC mv Prowlarr /opt/prowlarr - fi + # Install: Remove previous instance on reinstall + [[ -d '/opt/prowlarr' ]] && G_EXEC rm -R /opt/prowlarr + G_EXEC mv Prowlarr /opt/prowlarr # Data dir G_EXEC mkdir -p /mnt/dietpi_userdata/prowlarr @@ -10054,26 +10119,18 @@ _EOF_ *) aDEPS=('libicu72');; esac - # Reinstall: Skip download and install, advice to use internal updater from web UI - if [[ -d '/opt/readarr' ]] - then - G_DIETPI-NOTIFY 2 "${aSOFTWARE_NAME[$software_id]} install dir \"/opt/readarr\" already exists. Download and install steps will be skipped. - - If you want to update ${aSOFTWARE_NAME[$software_id]}, please use the internal updater from web UI. - - If you need to reinstall (e.g. broken instance), please manually remove the install dir and rerun \"dietpi-software reinstall $software_id\"." - - G_AGI "${aDEPS[@]}" - aDEPS=() - else - case $G_HW_ARCH in - 2) local arch='arm';; - 3) local arch='arm64';; - *) local arch='x64';; - esac + # Download + case $G_HW_ARCH in + 2) local arch='arm';; + 3) local arch='arm64';; + *) local arch='x64';; + esac + local fallback_url="https://github.com/Readarr/Readarr/releases/download/v0.4.6.2711/Readarr.develop.0.4.6.2711.linux-core-$arch.tar.gz" + Download_Install "$(curl -sSfL 'https://api.github.com/repos/Readarr/Readarr/releases' | mawk -F\" "/^ *\"browser_download_url\": \".*linux-core-$arch\.tar\.gz\"$/{print \$4}" | head -1)" - local fallback_url="https://github.com/Readarr/Readarr/releases/download/v0.4.0.2634/Readarr.develop.0.4.0.2634.linux-core-$arch.tar.gz" - Download_Install "$(curl -sSfL 'https://api.github.com/repos/Readarr/Readarr/releases' | mawk -F\" "/^ *\"browser_download_url\": \".*linux-core-$arch\.tar\.gz\"$/{print \$4}" | head -1)" - G_EXEC mv Readarr /opt/readarr - fi + # Install: Remove previous instance on reinstall + [[ -d '/opt/readarr' ]] && G_EXEC rm -R /opt/readarr + G_EXEC mv Readarr /opt/readarr # Data dir G_EXEC mkdir -p /mnt/dietpi_userdata/readarr @@ -10295,7 +10352,7 @@ _EOF_ G_EXEC ln -s /var/log/roonserver /mnt/dietpi_userdata/roonserver/RAATServer/Logs # User: Grant sudo permissions to create a mount point and mount SMB shares - Create_User -G audio -d /mnt/dietpi_userdata/roonserver roonserver + Create_User -G dietpi,audio -d /mnt/dietpi_userdata/roonserver roonserver G_EXEC eval 'echo '\''roonserver ALL=NOPASSWD:SETENV: /bin/mkdir -p /mnt/RoonStorage_*, /sbin/mount.cifs'\'' > /etc/sudoers.d/roonserver' # Permissions @@ -10335,7 +10392,7 @@ _EOF_ # x86_64: Install Debian i386 package if [[ $G_HW_ARCH == 10 ]] then - # Add i386 arch: https://packages.debian.org/bullseye/steam + # Add i386 arch: https://packages.debian.org/steam [[ $(dpkg --print-foreign-architectures) == *'i386'* ]] || { G_EXEC dpkg --add-architecture i386; G_AGUP; } G_AGI steam @@ -10584,7 +10641,7 @@ _EOF_ *) local arch='amd64';; esac - local fallback_url="https://github.com/gogs/gogs/releases/download/v0.13.0/gogs_0.13.0_linux_$arch.tar.gz" + local fallback_url="https://github.com/gogs/gogs/releases/download/v0.13.1/gogs_0.13.1_linux_$arch.tar.gz" local url=$(curl -sSfL 'https://api.github.com/repos/gogs/gogs/releases/latest' | mawk -F\" "/^ *\"browser_download_url\": \".*\/gogs_[^\"\/]*_linux_$arch.tar.gz\"$/{print \$4}") fi @@ -10640,7 +10697,7 @@ _EOF_ *) local arch='arm-6';; esac - local fallback_url="https://github.com/go-gitea/gitea/releases/download/v1.22.3/gitea-1.22.3-linux-$arch.xz" + local fallback_url="https://github.com/go-gitea/gitea/releases/download/v1.22.6/gitea-1.22.6-linux-$arch.xz" Download_Install "$(curl -sSfL 'https://api.github.com/repos/go-gitea/gitea/releases/latest' | mawk -F\" "/\"browser_download_url\": \".*\/gitea-[^\"\/]*-linux-$arch\.xz\"/{print \$4}")" /mnt/dietpi_userdata/gitea/gitea # User @@ -11061,7 +11118,7 @@ _EOF_ # Download local version=$(curl -sSfL 'https://api.github.com/repos/ptitSeb/box86/releases/latest' | mawk -F\" '/^ *"tag_name": "[^"]*",$/{print $4}') - [[ $version ]] || { version='v0.3.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"; } + [[ $version ]] || { version='v0.3.8'; 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 for targets: https://github.com/ptitSeb/box86/blob/master/CMakeLists.txt @@ -11079,10 +11136,10 @@ _EOF_ elif (( $G_HW_MODEL == 4 )) then G_EXEC cmake .. -DNOGIT=1 -DCMAKE_BUILD_TYPE=Release -DRPI4=1 - # - Odroids - elif (( $G_HW_MODEL < 20 )) + # - Odroid XU4 + elif (( $G_HW_MODEL == 11 )) then - G_EXEC cmake .. -DNOGIT=1 -DCMAKE_BUILD_TYPE=Release -DODROID=1 + G_EXEC cmake .. -DNOGIT=1 -DCMAKE_BUILD_TYPE=Release -DODROIDXU4=1 # - ASUS Tinker Board elif (( $G_HW_MODEL == 52 )) then @@ -11110,7 +11167,7 @@ _EOF_ # Download local version=$(curl -sSfL 'https://api.github.com/repos/ptitSeb/box64/releases/latest' | mawk -F\" '/^ *"tag_name": "[^"]*",$/{print $4}') - [[ $version ]] || { version='v0.3.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"; } + [[ $version ]] || { version='v0.3.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"; } Download_Install "https://github.com/ptitSeb/box64/archive/$version.tar.gz" # Build for targets: https://github.com/ptitSeb/box64/blob/main/CMakeLists.txt @@ -11224,7 +11281,7 @@ _EOF_ # v3 drops PHP 7.4 support: https://github.com/TasmoAdmin/TasmoAdmin/releases/tag/v3.0.0 if (( $G_DISTRO > 6 )) then - local fallback_url='https://github.com/TasmoAdmin/TasmoAdmin/releases/download/v4.1.3/tasmoadmin_v4.1.3.tar.gz' + local fallback_url='https://github.com/TasmoAdmin/TasmoAdmin/releases/download/v4.2.1/tasmoadmin_v4.2.1.tar.gz' Download_Install "$(curl -sSfL 'https://api.github.com/repos/TasmoAdmin/TasmoAdmin/releases/latest' | mawk -F\" '/^ *"browser_download_url": ".*\/tasmoadmin_v[^"\/]*\.tar\.gz"$/{print $4}')" else Download_Install 'https://github.com/TasmoAdmin/TasmoAdmin/releases/download/v2.4.2/tasmoadmin_v2.4.2.tar.gz' @@ -11321,7 +11378,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.12.7' # https://github.com/pyenv/pyenv/tree/master/plugins/python-build/share/python-build + local ha_python_version='3.13.1' # https://github.com/pyenv/pyenv/tree/master/plugins/python-build/share/python-build G_DIETPI-NOTIFY 2 "Home Assistant user: $ha_user" G_DIETPI-NOTIFY 2 "Home Assistant home: $ha_home" @@ -11681,7 +11738,7 @@ _EOF_ *) local arch='amd64';; esac - local fallback_url="https://github.com/rclone/rclone/releases/download/v1.68.1/rclone-v1.68.1-linux-$arch.deb" + local fallback_url="https://github.com/rclone/rclone/releases/download/v1.68.2/rclone-v1.68.2-linux-$arch.deb" Download_Install "$(curl -sSfL 'https://api.github.com/repos/rclone/rclone/releases/latest' | mawk -F\" "/^ *\"browser_download_url\": \".*\/rclone-v[^\"\/]*-linux-$arch.deb\"$/{print \$4}")" fi fi @@ -11695,7 +11752,7 @@ _EOF_ *) local arch='arm';; esac - local fallback_url="https://github.com/restic/restic/releases/download/v0.17.1/restic_0.17.1_linux_$arch.bz2" + local fallback_url="https://github.com/restic/restic/releases/download/v0.17.3/restic_0.17.3_linux_$arch.bz2" Download_Install "$(curl -sSfL 'https://api.github.com/repos/restic/restic/releases/latest' | mawk -F\" "/^ *\"browser_download_url\": \".*\/restic_[^\"\/]*_linux_$arch\.bz2\"$/{print \$4}")" /usr/local/bin/restic G_EXEC chmod +x /usr/local/bin/restic fi @@ -12875,7 +12932,7 @@ _EOF_ Remove_Service sonarr 1 1 # group for pre-v6.29 G_AGP sonarr nzbdrone # Pre-v7.1 [[ -d '/var/log/sonarr' ]] && G_EXEC rm -R /var/log/sonarr - G_EXEC rm -Rf /mnt/dietpi_userdata/sonarr /opt/NzbDrone # Pre-v7.1 + G_EXEC rm -Rf /opt/sonarr /mnt/dietpi_userdata/sonarr /opt/NzbDrone # Pre-v7.1 [[ -f '/etc/apt/sources.list.d/sonarr.list' ]] && G_EXEC rm /etc/apt/sources.list.d/sonarr.list [[ -f '/etc/apt/trusted.gpg.d/dietpi-sonarr.gpg' ]] && G_EXEC rm /etc/apt/trusted.gpg.d/dietpi-sonarr.gpg # Pre-v7.1: Remove Sonarr v2 key @@ -13071,7 +13128,7 @@ _EOF_ then Remove_Service mopidy G_AGP 'mopidy*' - [[ -f '/etc/apt/sources.list.d/mopidy.list' ]] && G_EXEC rm /etc/apt/sources.list.d/mopidy.list + [[ -f '/etc/apt/sources.list.d/dietpi-mopidy.list' ]] && G_EXEC rm /etc/apt/sources.list.d/dietpi-mopidy.list [[ -f '/etc/apt/trusted.gpg.d/dietpi-mopidy.gpg' ]] && G_EXEC rm /etc/apt/trusted.gpg.d/dietpi-mopidy.gpg command -v pip3 > /dev/null && G_EXEC_OUTPUT=1 G_EXEC pip3 uninstall -y Mopidy-MusicBox-Webclient @@ -13266,11 +13323,11 @@ _EOF_ [[ -d '/usr/local/share/man/man1' ]] && G_EXEC rmdir -p --ignore-fail-on-non-empty /usr/local/share/man/man1 fi - if To_Uninstall 35 # Logitech Media Server + if To_Uninstall 35 # Lyrion Music Server then # Stop systemd service, which is not done by postinst, failing to remove user then - Remove_Service logitechmediaserver - G_AGP logitechmediaserver + Remove_Service lyrionmusicserver + G_AGP lyrionmusicserver [[ -d '/var/lib/squeezeboxserver' ]] && G_EXEC rm -R /var/lib/squeezeboxserver fi @@ -13577,10 +13634,10 @@ _EOF_ if To_Uninstall 53 # MineOS then - Remove_Service mineos 1 1 # User and group for pre-v6.34 + Remove_Service mineos 1 1 [[ -d '/mnt/dietpi_userdata/mineos' ]] && G_EXEC rm -R /mnt/dietpi_userdata/mineos [[ -f '/etc/mineos.conf' ]] && G_EXEC rm /etc/mineos.conf - G_EXEC rm -Rf /var/games/minecraft /usr/local/bin/mineos # Symlinks + G_EXEC rm -Rf /var/games/minecraft /usr/local/bin/mineos /etc/ssl/certs/mineos.* # Symlinks and SSL cert [[ -d '/home/mineos' ]] && G_EXEC rm -R /home/mineos # pre-v6.34 fi @@ -13925,7 +13982,7 @@ _EOF_ then Remove_Service influxdb 1 1 G_AGP influxdb - [[ -f '/etc/apt/sources.list.d/influxdb.list' ]] && G_EXEC rm /etc/apt/sources.list.d/influxdb.list + [[ -f '/etc/apt/sources.list.d/dietpi-influxdb.list' ]] && G_EXEC rm /etc/apt/sources.list.d/dietpi-influxdb.list [[ -f '/etc/apt/trusted.gpg.d/dietpi-influxdb.gpg' ]] && G_EXEC rm /etc/apt/trusted.gpg.d/dietpi-influxdb.gpg G_EXEC rm -Rf /{mnt/dietpi_userdata,var/{lib,log},etc}/influxdb fi diff --git a/dietpi/func/dietpi-globals b/dietpi/func/dietpi-globals index 8a6d02944d..a77d84b5fa 100644 --- a/dietpi/func/dietpi-globals +++ b/dietpi/func/dietpi-globals @@ -54,7 +54,7 @@ [[ -f '/boot/dietpi/.version' ]] && . /boot/dietpi/.version # - Assign defaults/code version as fallback [[ $G_DIETPI_VERSION_CORE ]] || G_DIETPI_VERSION_CORE=9 - [[ $G_DIETPI_VERSION_SUB ]] || G_DIETPI_VERSION_SUB=8 + [[ $G_DIETPI_VERSION_SUB ]] || G_DIETPI_VERSION_SUB=9 [[ $G_DIETPI_VERSION_RC ]] || G_DIETPI_VERSION_RC=0 [[ $G_GITBRANCH ]] || G_GITBRANCH='master' [[ $G_GITOWNER ]] || G_GITOWNER='MichaIng' @@ -483,8 +483,8 @@ $grey───────────────────────── local whip_chars_text=$(( $WHIP_SIZE_X - 4 )) # Due to internal margins, the available width is 4 characters smaller WHIP_SCROLLTEXT= # Add "--scrolltext" automatically if text height exceeds max available - Process_Line(){ - + Process_Line() + { local split line=$1 # Split line by "\n" newline escape sequences, the only one which is interpreted by whiptail, in a strict way: "\\n" still creates a newline, hence the sequence cannot be escaped! @@ -504,27 +504,25 @@ $grey───────────────────────── (( whip_lines_text += 1 + ( ${#line} - 1 ) / $whip_chars_text )) # Stop counting if required size exceeds screen already (( $whip_lines_text <= $WHIP_SIZE_Y )) || return 1 - } # - WHIP_MESSAGE - if [[ $WHIP_ERROR$WHIP_MESSAGE ]]; then - + if [[ $WHIP_ERROR$WHIP_MESSAGE ]] + then while read -r line; do Process_Line "$line" || break; done <<< "$WHIP_ERROR$WHIP_MESSAGE" # - WHIP_TEXTFILE - elif [[ $WHIP_TEXTFILE ]]; then - + elif [[ $WHIP_TEXTFILE ]] + then while read -r line; do Process_Line "$line" || break; done < "$WHIP_TEXTFILE" - fi unset -f Process_Line # Process menu and checklist # - G_WHIP_MENU - if [[ $input_mode == 2 ]]; then - + if [[ $input_mode == 2 ]] + then # Requires 1 additional line for text ((whip_lines_text++)) @@ -554,8 +552,8 @@ $grey───────────────────────── done # - G_WHIP_CHECKLIST - elif [[ $input_mode == 3 ]]; then - + elif [[ $input_mode == 3 ]] + then # Lines required for checklist: ( ${#array} + 2 ) to round up single+double array entries WHIP_SIZE_Z=$(( ( ${#G_WHIP_CHECKLIST_ARRAY[@]} + 2 ) / 3 )) @@ -580,44 +578,37 @@ $grey───────────────────────── G_WHIP_CHECKLIST_ARRAY[$i]+='●' done - fi # Adjust sizes to fit content # - G_WHIP_MENU/G_WHIP_CHECKLIST needs to hold text + selection field (WHIP_SIZE_Z) - if [[ $input_mode == [23] ]]; then - + if [[ $input_mode == [23] ]] + then # If required lines would exceed screen, reduce WHIP_SIZE_Z - if (( $whip_lines_text + $WHIP_SIZE_Z > $WHIP_SIZE_Y )); then - + if (( $whip_lines_text + $WHIP_SIZE_Z > $WHIP_SIZE_Y )) + then WHIP_SIZE_Z=$(( $WHIP_SIZE_Y - $whip_lines_text )) # Assure at least 2 lines to have the selection field scroll bar identifiable - if (( $WHIP_SIZE_Z < 2 )); then - + if (( $WHIP_SIZE_Z < 2 )) + then WHIP_SIZE_Z=2 # Since text is partly hidden now, add text scroll ability and info to backtitle WHIP_SCROLLTEXT='--scrolltext' WHIP_BACKTITLE+=' | Use up/down buttons to scroll text' - fi # else reduce WHIP_SIZE_Y to hold all content else - WHIP_SIZE_Y=$(( $whip_lines_text + $WHIP_SIZE_Z )) - fi # - Everything else needs to hold text only - elif (( $whip_lines_text > $WHIP_SIZE_Y )); then - + elif (( $whip_lines_text > $WHIP_SIZE_Y )) + then WHIP_SCROLLTEXT='--scrolltext' WHIP_BACKTITLE+=' | Use up/down buttons to scroll text' - else - WHIP_SIZE_Y=$whip_lines_text - fi } @@ -627,17 +618,14 @@ $grey───────────────────────── { local WHIP_MESSAGE=$* - if [[ $G_INTERACTIVE == 1 ]]; then - + if [[ $G_INTERACTIVE == 1 ]] + then local WHIP_ERROR WHIP_BACKTITLE WHIP_SCROLLTEXT WHIP_SIZE_X WHIP_SIZE_Y G_WHIP_INIT # shellcheck disable=SC2086 whiptail ${G_PROGRAM_NAME:+--title "$G_PROGRAM_NAME"} --backtitle "$WHIP_BACKTITLE" --msgbox "$WHIP_MESSAGE" --ok-button "$G_WHIP_BUTTON_OK_TEXT" $WHIP_SCROLLTEXT "$WHIP_SIZE_Y" "$WHIP_SIZE_X" - else - G_DIETPI-NOTIFY 2 "$WHIP_MESSAGE" - fi G_WHIP_DESTROY @@ -650,30 +638,26 @@ $grey───────────────────────── { local result=0 - if [[ $G_INTERACTIVE == 1 ]]; then - + if [[ $G_INTERACTIVE == 1 ]] + then local WHIP_ERROR WHIP_MESSAGE WHIP_BACKTITLE WHIP_SCROLLTEXT WHIP_SIZE_X WHIP_SIZE_Y WHIP_TEXTFILE=$1 header='File viewer' [[ $log == 1 ]] && header='Log viewer' - if [[ -f $WHIP_TEXTFILE ]]; then - + if [[ -f $WHIP_TEXTFILE ]] + then G_WHIP_INIT # shellcheck disable=SC2086 whiptail --title "${G_PROGRAM_NAME:+$G_PROGRAM_NAME | }$header" --backtitle "$WHIP_BACKTITLE" --textbox "$WHIP_TEXTFILE" --ok-button "$G_WHIP_BUTTON_OK_TEXT" $WHIP_SCROLLTEXT "$WHIP_SIZE_Y" "$WHIP_SIZE_X" - else - result=1 WHIP_ERROR="[FAILED] File does not exist: $WHIP_TEXTFILE" G_WHIP_INIT # shellcheck disable=SC2086 whiptail --title "${G_PROGRAM_NAME:+$G_PROGRAM_NAME | }$header" --backtitle "$WHIP_BACKTITLE" --msgbox "$WHIP_ERROR" --ok-button "$G_WHIP_BUTTON_OK_TEXT" $WHIP_SCROLLTEXT "$WHIP_SIZE_Y" "$WHIP_SIZE_X" - fi - fi G_WHIP_DESTROY - return "$result" + return "${result:-1}" } # G_WHIP_YESNO "message" @@ -684,18 +668,17 @@ $grey───────────────────────── local result=1 default_no='--defaultno' [[ ${G_WHIP_DEFAULT_ITEM,,} == 'yes' || ${G_WHIP_DEFAULT_ITEM,,} == 'ok' ]] && result=0 default_no= - if [[ $G_INTERACTIVE == 1 ]]; then - + if [[ $G_INTERACTIVE == 1 ]] + then local WHIP_ERROR WHIP_BACKTITLE WHIP_SCROLLTEXT WHIP_SIZE_X WHIP_SIZE_Y WHIP_MESSAGE=$* G_WHIP_INIT # shellcheck disable=SC2086 whiptail ${G_PROGRAM_NAME:+--title "$G_PROGRAM_NAME"} --backtitle "$WHIP_BACKTITLE" --yesno "$WHIP_MESSAGE" --yes-button "$G_WHIP_BUTTON_OK_TEXT" --no-button "$G_WHIP_BUTTON_CANCEL_TEXT" "$default_no" $WHIP_SCROLLTEXT "$WHIP_SIZE_Y" "$WHIP_SIZE_X" result=$? - fi G_WHIP_DESTROY - return "$result" + return "${result:-1}" } # G_WHIP_INPUTBOX "message" @@ -707,26 +690,27 @@ $grey───────────────────────── local result=1 unset -v G_WHIP_RETURNED_VALUE # in case left from last G_WHIP - if [[ $G_INTERACTIVE == 1 ]]; then - + if [[ $G_INTERACTIVE == 1 ]] + then local WHIP_ERROR WHIP_BACKTITLE WHIP_SCROLLTEXT WHIP_SIZE_X WHIP_SIZE_Y WHIP_MESSAGE=$* NOCANCEL=() + G_WHIP_INPUTBOX_REGEX=${G_WHIP_INPUTBOX_REGEX:-'.'} + G_WHIP_INPUTBOX_REGEX_TEXT=${G_WHIP_INPUTBOX_REGEX_TEXT:-'not be empty'} [[ $G_WHIP_NOCANCEL == 1 ]] && NOCANCEL=('--nocancel') while : do G_WHIP_INIT - G_WHIP_INPUTBOX_REGEX=${G_WHIP_INPUTBOX_REGEX:-'.'} - G_WHIP_INPUTBOX_REGEX_TEXT=${G_WHIP_INPUTBOX_REGEX_TEXT:-'not be empty'} # shellcheck disable=SC2086 G_WHIP_RETURNED_VALUE=$(whiptail ${G_PROGRAM_NAME:+--title "$G_PROGRAM_NAME"} --backtitle "$WHIP_BACKTITLE" --inputbox "$WHIP_ERROR$WHIP_MESSAGE" --ok-button "$G_WHIP_BUTTON_OK_TEXT" --cancel-button "$G_WHIP_BUTTON_CANCEL_TEXT" "${NOCANCEL[@]}" $WHIP_SCROLLTEXT "$WHIP_SIZE_Y" "$WHIP_SIZE_X" "$G_WHIP_DEFAULT_ITEM" 3>&1 1>&2 2>&3-; echo $? > /tmp/.G_WHIP_INPUTBOX_RESULT) read -r result < /tmp/.G_WHIP_INPUTBOX_RESULT; rm -f /tmp/.G_WHIP_INPUTBOX_RESULT [[ $result == 0 && ! $G_WHIP_RETURNED_VALUE =~ $G_WHIP_INPUTBOX_REGEX ]] && { WHIP_ERROR="[FAILED] Input must $G_WHIP_INPUTBOX_REGEX_TEXT, please try again ...\n\n"; continue; } break done - + else + G_WHIP_RETURNED_VALUE=$G_WHIP_DEFAULT_ITEM fi G_WHIP_DESTROY - return "$result" + return "${result:-1}" } # G_WHIP_PASSWORD "message" @@ -738,8 +722,8 @@ $grey───────────────────────── local return_value=1 unset -v result # in case left from last call - if [[ $G_INTERACTIVE == 1 ]]; then - + if [[ $G_INTERACTIVE == 1 ]] + then local WHIP_ERROR WHIP_BACKTITLE WHIP_SCROLLTEXT WHIP_SIZE_X WHIP_SIZE_Y WHIP_MESSAGE=$* while : do @@ -753,11 +737,10 @@ $grey───────────────────────── return_value=0 break done - fi G_WHIP_DESTROY - return "$return_value" + return "${return_value:-1}" } # G_WHIP_MENU "message" @@ -768,19 +751,25 @@ $grey───────────────────────── local result=1 unset -v G_WHIP_RETURNED_VALUE # in case left from last call - [[ $G_INTERACTIVE == 1 ]] && until [[ $G_WHIP_RETURNED_VALUE ]] # Stay in menu if empty option was selected (separator line) - do + if [[ $G_INTERACTIVE == 1 ]] + then local WHIP_ERROR WHIP_BACKTITLE WHIP_SCROLLTEXT WHIP_SIZE_X WHIP_SIZE_Y WHIP_SIZE_Z WHIP_MESSAGE=$* NOCANCEL=() [[ $G_WHIP_NOCANCEL == 1 ]] && NOCANCEL=('--nocancel') - G_WHIP_INIT 2 - # shellcheck disable=SC2086 - G_WHIP_RETURNED_VALUE=$(whiptail ${G_PROGRAM_NAME:+--title "$G_PROGRAM_NAME"} --backtitle "$WHIP_BACKTITLE" --menu "$WHIP_MESSAGE" --ok-button "$G_WHIP_BUTTON_OK_TEXT" --cancel-button "$G_WHIP_BUTTON_CANCEL_TEXT" "${NOCANCEL[@]}" --default-item "$G_WHIP_DEFAULT_ITEM" $WHIP_SCROLLTEXT "$WHIP_SIZE_Y" "$WHIP_SIZE_X" "$WHIP_SIZE_Z" -- "${G_WHIP_MENU_ARRAY[@]}" 3>&1 1>&2 2>&3-; echo $? > /tmp/.WHIP_MENU_RESULT) - read -r result < /tmp/.WHIP_MENU_RESULT; rm -f /tmp/.WHIP_MENU_RESULT - [[ ${result:=1} == 0 ]] || break # Exit loop in case of cancel button selection or error or if .WHIP_MENU_RESULT could not be created - done + G_WHIP_BUTTON_OK_TEXT=${G_WHIP_BUTTON_OK_TEXT:-Select} + until [[ $G_WHIP_RETURNED_VALUE ]] # Stay in menu if empty option was selected (separator line) + do + G_WHIP_INIT 2 + # shellcheck disable=SC2086 + G_WHIP_RETURNED_VALUE=$(whiptail ${G_PROGRAM_NAME:+--title "$G_PROGRAM_NAME"} --backtitle "$WHIP_BACKTITLE" --menu "$WHIP_MESSAGE" --ok-button "$G_WHIP_BUTTON_OK_TEXT" --cancel-button "$G_WHIP_BUTTON_CANCEL_TEXT" "${NOCANCEL[@]}" --default-item "$G_WHIP_DEFAULT_ITEM" $WHIP_SCROLLTEXT "$WHIP_SIZE_Y" "$WHIP_SIZE_X" "$WHIP_SIZE_Z" -- "${G_WHIP_MENU_ARRAY[@]}" 3>&1 1>&2 2>&3-; echo $? > /tmp/.WHIP_MENU_RESULT) + read -r result < /tmp/.WHIP_MENU_RESULT; rm -f /tmp/.WHIP_MENU_RESULT + [[ ${result:=1} == 0 ]] || break # Exit loop in case of cancel button selection or error or if .WHIP_MENU_RESULT could not be created + done + else + G_WHIP_RETURNED_VALUE=$G_WHIP_DEFAULT_ITEM + fi G_WHIP_DESTROY - return "$result" + return "${result:-1}" } # G_WHIP_CHECKLIST "message" @@ -795,11 +784,14 @@ $grey───────────────────────── then local WHIP_ERROR WHIP_BACKTITLE WHIP_SCROLLTEXT WHIP_SIZE_X WHIP_SIZE_Y WHIP_SIZE_Z WHIP_MESSAGE=$* NOCANCEL=() [[ $G_WHIP_NOCANCEL == 1 ]] && NOCANCEL=('--nocancel') + G_WHIP_BUTTON_OK_TEXT=${G_WHIP_BUTTON_OK_TEXT:-Confirm} G_WHIP_INIT 3 # shellcheck disable=SC2086 G_WHIP_RETURNED_VALUE=$(whiptail ${G_PROGRAM_NAME:+--title "$G_PROGRAM_NAME"} --backtitle "$WHIP_BACKTITLE | Use spacebar to toggle selection" --checklist "$WHIP_MESSAGE" --separate-output --ok-button "$G_WHIP_BUTTON_OK_TEXT" --cancel-button "$G_WHIP_BUTTON_CANCEL_TEXT" "${NOCANCEL[@]}" --default-item "$G_WHIP_DEFAULT_ITEM" $WHIP_SCROLLTEXT "$WHIP_SIZE_Y" "$WHIP_SIZE_X" "$WHIP_SIZE_Z" -- "${G_WHIP_CHECKLIST_ARRAY[@]}" 3>&1 1>&2 2>&3-; echo $? > /tmp/.WHIP_CHECKLIST_RESULT) G_WHIP_RETURNED_VALUE=$(echo -e "$G_WHIP_RETURNED_VALUE" | tr '\n' ' ') read -r result < /tmp/.WHIP_CHECKLIST_RESULT; rm -f /tmp/.WHIP_CHECKLIST_RESULT + else + G_WHIP_RETURNED_VALUE=$G_WHIP_DEFAULT_ITEM fi G_WHIP_DESTROY diff --git a/dietpi/func/dietpi-obtain_hw_model b/dietpi/func/dietpi-obtain_hw_model index b7876fd05e..1074f57cd3 100755 --- a/dietpi/func/dietpi-obtain_hw_model +++ b/dietpi/func/dietpi-obtain_hw_model @@ -12,6 +12,7 @@ # - Generates /boot/dietpi/.hw_model # - Called from /boot/dietpi/preboot, called by /etc/systemd/system/dietpi-preboot.service # + # G_HW_MODEL 93 Orange Pi 5 Pro # G_HW_MODEL 92 NanoPi M6 # G_HW_MODEL 91 Orange Pi 5 Max # G_HW_MODEL 90 Radxa ZERO 3 @@ -368,7 +369,12 @@ G_HW_MODEL=$(mawk 'NR==1' "$FP_G_HW_MODEL_IDENTIFIER") - if (( $G_HW_MODEL == 92 )); then + if (( $G_HW_MODEL == 93 )); then + + G_HW_MODEL_NAME='Orange Pi 5 Pro' + G_HW_CPUID=11 + + elif (( $G_HW_MODEL == 92 )); then G_HW_MODEL_NAME='NanoPi M6' G_HW_CPUID=11 diff --git a/dietpi/func/dietpi-set_hardware b/dietpi/func/dietpi-set_hardware index 5f48bc73c5..4dc0ad5ff3 100755 --- a/dietpi/func/dietpi-set_hardware +++ b/dietpi/func/dietpi-set_hardware @@ -1524,7 +1524,7 @@ Do you want to continue and disable the serial login console?' || return 1 elif (( $DIETPIENV || $G_HW_MODEL == 49 || $G_HW_MODEL == 76 || $G_HW_MODEL == 79 )) then local baudrate='115200' - if [[ $G_HW_MODEL =~ ^(42|43|46|47|49|55|56|58|68|72|76|77|78|79|80|82|85|87|90|91|92)$ && $INPUT_ADDITIONAL =~ ^('ttyS2'|'ttyFIQ0')$ ]] || [[ $G_HW_MODEL == 73 && $INPUT_ADDITIONAL == 'ttyS'[012] ]] + if [[ $G_HW_MODEL =~ ^(42|43|46|47|49|55|56|58|68|72|76|77|78|79|80|82|85|87|90|91|92|93)$ && $INPUT_ADDITIONAL =~ ^('ttyS2'|'ttyFIQ0')$ ]] || [[ $G_HW_MODEL == 73 && $INPUT_ADDITIONAL == 'ttyS'[012] ]] then baudrate='1500000' [[ -d /etc/systemd/system/serial-getty@$INPUT_ADDITIONAL.service.d ]] || G_EXEC mkdir "/etc/systemd/system/serial-getty@$INPUT_ADDITIONAL.service.d" @@ -1823,14 +1823,14 @@ _EOF_ # An input is required [[ $INPUT_DEVICE_VALUE ]] || Unknown_Input_Mode #----------------------------------------------------------------------------- - # Remove all known audio based packages - if [[ $INPUT_DEVICE_VALUE == 'none' ]] - then - G_AGP alsa-utils libasound2-plugin-equal firmware-intel-sound firmware-sof-signed - # Install base alsa package - else - G_AG_CHECK_INSTALL_PREREQ alsa-utils - fi + # Remove all known audio based packages + if [[ $INPUT_DEVICE_VALUE == 'none' ]] + then + G_AGP alsa-utils libasound2-plugin-equal firmware-intel-sound firmware-sof-signed + # Install base alsa package + else + G_AG_CHECK_INSTALL_PREREQ alsa-utils + fi # Always reset sound cards and revert back to defaults Soundcard_Reset_All # Print info @@ -1907,8 +1907,8 @@ _EOF_ fi ;; - # Intel SST DSP - 'intel-sst-dsp') G_AG_CHECK_INSTALL_PREREQ firmware-intel-sound firmware-sof-signed;; + # Intel SST DSP + 'intel-sst-dsp') G_AG_CHECK_INSTALL_PREREQ firmware-intel-sound firmware-sof-signed;; # --------------- Sparky SBC ------------ # Allo Piano DAC (firmware + module) @@ -2345,7 +2345,7 @@ _EOF_ { (( $G_HW_MODEL == 20 )) || { Unsupported_Input_Name; return 1; } # VM only - [[ $INPUT_DEVICE_VALUE == 'disable' ]] && { G_AGP qemu-guest-agent; return 0; } + [[ $INPUT_DEVICE_VALUE == 'disable' ]] && { G_AGP qemu-guest-agent; return 0; } [[ $INPUT_DEVICE_VALUE == 'enable' ]] || { Unknown_Input_Mode; return 1; } diff --git a/dietpi/func/dietpi-set_software b/dietpi/func/dietpi-set_software index 0a812b7b8e..ac6c45dbc0 100755 --- a/dietpi/func/dietpi-set_software +++ b/dietpi/func/dietpi-set_software @@ -296,6 +296,7 @@ $FP_SCRIPT rpi_kernel_choice Supported on Debian Bookworm or newer on R 90) all_components='radxazero3';; 91) all_components='orangepi5max';; 92) all_components='nanopim6';; + 93) all_components='orangepi5pro';; *) :;; esac G_EXEC eval "echo 'deb https://dietpi.com/apt $G_DISTRO_NAME $components' > /etc/apt/sources.list.d/dietpi.list" diff --git a/rootfs/var/lib/dietpi/services/fs_partition_resize.sh b/rootfs/var/lib/dietpi/services/fs_partition_resize.sh index f806c7f808..9b7586df92 100755 --- a/rootfs/var/lib/dietpi/services/fs_partition_resize.sh +++ b/rootfs/var/lib/dietpi/services/fs_partition_resize.sh @@ -7,7 +7,7 @@ Reboot_to_load_Partition_table() { > /dietpi_skip_partition_resize - systemctl enable dietpi-fs_partition_resize + systemctl --no-reload enable dietpi-fs_partition_resize echo '[ INFO ] Rebooting to load the new partition table' sync reboot @@ -15,7 +15,7 @@ } # Disable this service - ! systemctl is-enabled dietpi-fs_partition_resize > /dev/null || systemctl disable dietpi-fs_partition_resize + ! systemctl is-enabled dietpi-fs_partition_resize > /dev/null || systemctl --no-reload disable dietpi-fs_partition_resize # Detect root device ROOT_DEV=$(findmnt -Ufnro SOURCE -M /)