From 8fd032726036338db314005cb834602a357468e1 Mon Sep 17 00:00:00 2001 From: MichaIng Date: Mon, 6 Jan 2025 19:54:59 +0700 Subject: [PATCH 1/5] v9.10 - DietPi-Software | PaperMC: Resolved an issue where the installation failed, because the API URL changed. Many thanks to @onkeld for reporting this issue: https://github.com/MichaIng/DietPi/issues/7349 --- CHANGELOG.txt | 1 + dietpi/dietpi-software | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.txt b/CHANGELOG.txt index 6437b7645b..6b2eec68af 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -14,6 +14,7 @@ Bug fixes: - DietPi-Software | Raspotify: Resolved an issue where the service failed to start, if Avahi-Daemon was not installed. librespot has it as new default DNS discovery backend, and official pre-compiled Raspotify binaries are not compiled with the old DNS-SD backend anymore. Avahi-Daemon is hence installed now by DietPi-Software as well. Many thanks to @gergokis for reporting this issue: https://github.com/MichaIng/DietPi/issues/7323 - DietPi-Software | Navidrome: Resolved an issue where the service failed to start, since the latest release archive does not ship with the needed permissions. Many thanks to @nclro for reporting this issue: https://github.com/MichaIng/DietPi/issues/7336 - DietPi-Software | Home Assistant: Worked around an issue where the installation failed on ARMv6 and RISC-V systems, due to an incompatibility between two dependencies. Many thanks to @jankkhvej for reporting this issue: https://github.com/MichaIng/DietPi/issues/7329 +- DietPi-Software | PaperMC: Resolved an issue where the installation failed, because the API URL changed. Many thanks to @onkeld for reporting this issue: https://github.com/MichaIng/DietPi/issues/7349 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/ADDME diff --git a/dietpi/dietpi-software b/dietpi/dietpi-software index 64e6627626..65d68342c2 100755 --- a/dietpi/dietpi-software +++ b/dietpi/dietpi-software @@ -11504,7 +11504,7 @@ _EOF_ if [[ -f '/mnt/dietpi_userdata/papermc/eula.txt' ]] || G_WHIP_BUTTON_OK_TEXT='Yes' G_WHIP_BUTTON_CANCEL_TEXT='Abort' G_WHIP_YESNO 'Do you agree to the Minecraft EULA found at:\n\nhttps://account.mojang.com/documents/minecraft_eula' then # Collect latest version of PaperMC - local url='https://papermc.io/api/v2/projects/paper' + local url='https://api.papermc.io/v2/projects/paper' local version=$(curl -sSfL "$url"); version=${version%\"*} version=${version##*\"} local build=$(curl -sSfL "$url/versions/$version"); build=${build%]*} build=${build##*[,[]} #local file=$(curl -sSfL "$url/versions/$version/builds/$build"); file=${file##*\"name\":\"} file=${file%%\"*} From 52880db7808473c81541d0a2d2b96279ff882ef2 Mon Sep 17 00:00:00 2001 From: MichaIng Date: Mon, 6 Jan 2025 20:37:52 +0700 Subject: [PATCH 2/5] v9.10 - DietPi-Software | PaperMC: Allow unintended reinstalls, if the EULA has been accepted already. Update existing Geyser and Floodgate plugins in this case, but skip installing them otherwise. --- .github/workflows/dietpi-software.bash | 4 ++++ dietpi/dietpi-software | 5 +++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/.github/workflows/dietpi-software.bash b/.github/workflows/dietpi-software.bash index 85d46bbe4c..98ecde4882 100644 --- a/.github/workflows/dietpi-software.bash +++ b/.github/workflows/dietpi-software.bash @@ -390,6 +390,10 @@ G_EXEC rm rootfs/root/.ssh/known_hosts # Apply software IDs to install for i in $SOFTWARE; do G_CONFIG_INJECT "AUTO_SETUP_INSTALL_SOFTWARE_ID=$i" "AUTO_SETUP_INSTALL_SOFTWARE_ID=$i" rootfs/boot/dietpi.txt; done +# Enable unattended PaperMC install +G_EXEC mkdir -p /mnt/dietpi_userdata/papermc +G_EXEC eval 'echo '\''eula=true'\'' > /mnt/dietpi_userdata/papermc/eula.txt' + # Workaround for "Could not execute systemctl: at /usr/bin/deb-systemd-invoke line 145." during Apache2 DEB postinst in 32-bit ARM Bookworm container: https://lists.ubuntu.com/archives/foundations-bugs/2022-January/467253.html G_CONFIG_INJECT 'AUTO_SETUP_WEB_SERVER_INDEX=' 'AUTO_SETUP_WEB_SERVER_INDEX=-2' rootfs/boot/dietpi.txt diff --git a/dietpi/dietpi-software b/dietpi/dietpi-software index 65d68342c2..a40b9ee4dc 100755 --- a/dietpi/dietpi-software +++ b/dietpi/dietpi-software @@ -946,7 +946,7 @@ Available commands: aSOFTWARE_CATX[$software_id]=5 aSOFTWARE_DOCS[$software_id]='https://dietpi.com/docs/software/gaming/#papermc' aSOFTWARE_DEPS[$software_id]='196' - aSOFTWARE_INTERACTIVE[$software_id]=1 + [[ -f '/mnt/dietpi_userdata/papermc/eula.txt' ]] || aSOFTWARE_INTERACTIVE[$software_id]=1 # - ARMv6 as of Java 16+ need aSOFTWARE_AVAIL_G_HW_ARCH[$software_id,1]=0 #------------------ @@ -11511,7 +11511,7 @@ _EOF_ # Download and install PaperMC Download_Install "$url/versions/$version/builds/$build/downloads/paper-$version-$build.jar" /opt/papermc/paperclip.jar G_EXEC mkdir -p /mnt/dietpi_userdata/papermc - G_EXEC eval 'echo "eula=true" > /mnt/dietpi_userdata/papermc/eula.txt' + G_EXEC eval 'echo '\''eula=true'\'' > /mnt/dietpi_userdata/papermc/eula.txt' # User Create_User -d /mnt/dietpi_userdata/papermc papermc @@ -11519,6 +11519,7 @@ _EOF_ # Bedrock compatibility G_WHIP_BUTTON_OK_TEXT='Yes' G_WHIP_BUTTON_CANCEL_TEXT='Skip' + [[ -f '/mnt/dietpi_userdata/papermc/plugins/Geyser-Spigot.jar' ]] && G_WHIP_DEFAULT_ITEM='Yes' if G_WHIP_YESNO 'Would you like to install the Geyser and Floodgate plugins for compatibility with Bedrock Edition?\n\nNote that this may be buggy.' then Download_Install 'https://download.geysermc.org/v2/projects/geyser/versions/latest/builds/latest/downloads/spigot' /mnt/dietpi_userdata/papermc/plugins/Geyser-Spigot.jar From d86953a79e52c6c50c1078bd275e318996b1232b Mon Sep 17 00:00:00 2001 From: MichaIng Date: Mon, 6 Jan 2025 20:41:32 +0700 Subject: [PATCH 3/5] v9.10 - CI | DietPi-Software test: Test Java as well when testing PaperMC --- .github/workflows/dietpi-software.bash | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/dietpi-software.bash b/.github/workflows/dietpi-software.bash index 98ecde4882..2832f36064 100644 --- a/.github/workflows/dietpi-software.bash +++ b/.github/workflows/dietpi-software.bash @@ -254,7 +254,7 @@ do 38|40|48|54|55|57|59|76|79|82|90|160|210) Process_Software 88 89 webserver;; 159) Process_Software 36 37 65 88 89 96 121 124 128 129 152 160 163 webserver;; 47|114|168) Process_Software 88 89 91 webserver;; - 8|33|131|179|206) Process_Software 196;; + 8|33|131|179|181|206) Process_Software 196;; 32|148|119) Process_Software 128;; 129) Process_Software 88 89 128 webserver;; 49|165|177) Process_Software 0 17 88;; From 6bd87f268889e85318aa99c1974daac6c1ac7f81 Mon Sep 17 00:00:00 2001 From: MichaIng Date: Mon, 6 Jan 2025 20:52:20 +0700 Subject: [PATCH 4/5] v9.10 - CI | DietPi-Software test: Fix PaperMC workaround, and test Geyser and Floodgate installs as well --- .github/workflows/dietpi-software.bash | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/dietpi-software.bash b/.github/workflows/dietpi-software.bash index 2832f36064..7836b790a8 100644 --- a/.github/workflows/dietpi-software.bash +++ b/.github/workflows/dietpi-software.bash @@ -391,8 +391,9 @@ G_EXEC rm rootfs/root/.ssh/known_hosts for i in $SOFTWARE; do G_CONFIG_INJECT "AUTO_SETUP_INSTALL_SOFTWARE_ID=$i" "AUTO_SETUP_INSTALL_SOFTWARE_ID=$i" rootfs/boot/dietpi.txt; done # Enable unattended PaperMC install -G_EXEC mkdir -p /mnt/dietpi_userdata/papermc -G_EXEC eval 'echo '\''eula=true'\'' > /mnt/dietpi_userdata/papermc/eula.txt' +G_EXEC mkdir -p rootfs/mnt/dietpi_userdata/papermc/plugins +G_EXEC eval 'echo '\''eula=true'\'' > rootfs/mnt/dietpi_userdata/papermc/eula.txt' +G_EXEC touch rootfs/mnt/dietpi_userdata/papermc/plugins/Geyser-Spigot.jar # Workaround for "Could not execute systemctl: at /usr/bin/deb-systemd-invoke line 145." during Apache2 DEB postinst in 32-bit ARM Bookworm container: https://lists.ubuntu.com/archives/foundations-bugs/2022-January/467253.html G_CONFIG_INJECT 'AUTO_SETUP_WEB_SERVER_INDEX=' 'AUTO_SETUP_WEB_SERVER_INDEX=-2' rootfs/boot/dietpi.txt From e0430a708188d27f645bfafe96e258f2540da154 Mon Sep 17 00:00:00 2001 From: MichaIng Date: Mon, 6 Jan 2025 21:34:42 +0700 Subject: [PATCH 5/5] v9.10 - DietPi-Software | PaperMC: Resolved an issue where the installation failed on Bullseye and Bookworm systems, as Minecraft 1.21 requires Java 21, available on Debian Trixie only. PaperMC 1.20.4 will be installed in those cases now, the latest version which supports Java 17. As a side note: In the same turn, the installation has been re-enabled on ARMv6 systems, using PaperMC 1.16.5, the latest one supporting Java 8. --- CHANGELOG.txt | 1 + dietpi/dietpi-software | 10 ++++++---- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.txt b/CHANGELOG.txt index 6b2eec68af..489f0ceef1 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -15,6 +15,7 @@ Bug fixes: - DietPi-Software | Navidrome: Resolved an issue where the service failed to start, since the latest release archive does not ship with the needed permissions. Many thanks to @nclro for reporting this issue: https://github.com/MichaIng/DietPi/issues/7336 - DietPi-Software | Home Assistant: Worked around an issue where the installation failed on ARMv6 and RISC-V systems, due to an incompatibility between two dependencies. Many thanks to @jankkhvej for reporting this issue: https://github.com/MichaIng/DietPi/issues/7329 - DietPi-Software | PaperMC: Resolved an issue where the installation failed, because the API URL changed. Many thanks to @onkeld for reporting this issue: https://github.com/MichaIng/DietPi/issues/7349 +- DietPi-Software | PaperMC: Resolved an issue where the installation failed on Bullseye and Bookworm systems, as Minecraft 1.21 requires Java 21, available on Debian Trixie only. PaperMC 1.20.4 will be installed in those cases now, the latest version which supports Java 17. As a side note: In the same turn, the installation has been re-enabled on ARMv6 systems, using PaperMC 1.16.5, the latest one supporting Java 8. 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/ADDME diff --git a/dietpi/dietpi-software b/dietpi/dietpi-software index a40b9ee4dc..e73b726022 100755 --- a/dietpi/dietpi-software +++ b/dietpi/dietpi-software @@ -947,8 +947,6 @@ Available commands: aSOFTWARE_DOCS[$software_id]='https://dietpi.com/docs/software/gaming/#papermc' aSOFTWARE_DEPS[$software_id]='196' [[ -f '/mnt/dietpi_userdata/papermc/eula.txt' ]] || aSOFTWARE_INTERACTIVE[$software_id]=1 - # - ARMv6 as of Java 16+ need - aSOFTWARE_AVAIL_G_HW_ARCH[$software_id,1]=0 #------------------ software_id=62 aSOFTWARE_NAME[$software_id]='Box86' @@ -11503,9 +11501,13 @@ _EOF_ # Make sure user agrees to the EULA if [[ -f '/mnt/dietpi_userdata/papermc/eula.txt' ]] || G_WHIP_BUTTON_OK_TEXT='Yes' G_WHIP_BUTTON_CANCEL_TEXT='Abort' G_WHIP_YESNO 'Do you agree to the Minecraft EULA found at:\n\nhttps://account.mojang.com/documents/minecraft_eula' then - # Collect latest version of PaperMC + # Collect latest build of latest supported version of PaperMC local url='https://api.papermc.io/v2/projects/paper' - local version=$(curl -sSfL "$url"); version=${version%\"*} version=${version##*\"} + # - Minecraft 1.20.5 and above requires Java 21: https://minecraft.wiki/w/Java_Edition_1.20.5 + local version='1.20.4' + # - ARMv6: Minecraft 1.17 requires Java 16: https://minecraft.wiki/w/Java_Edition_1.17 + (( $G_HW_ARCH == 1 )) && version='1.16.5' + (( $G_HW_ARCH > 1 && $G_DISTRO > 7 )) && { version=$(curl -sSfL "$url"); version=${version%\"*}; version=${version##*\"}; } local build=$(curl -sSfL "$url/versions/$version"); build=${build%]*} build=${build##*[,[]} #local file=$(curl -sSfL "$url/versions/$version/builds/$build"); file=${file##*\"name\":\"} file=${file%%\"*} # Download and install PaperMC