Skip to content

Commit

Permalink
v9.10
Browse files Browse the repository at this point in the history
- DietPi-Software | Disable Java and Java applications on ARMv6: #6919
  • Loading branch information
MichaIng committed Jan 7, 2025
1 parent 609e9b2 commit a1e82a5
Show file tree
Hide file tree
Showing 3 changed files with 37 additions and 53 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/dietpi-software.bash
Original file line number Diff line number Diff line change
Expand Up @@ -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|181|206) Process_Software 196;;
8|33|53|80|131|133|164|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;;
Expand Down
3 changes: 2 additions & 1 deletion CHANGELOG.txt
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@ Bug fixes:
- 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 | Komga: Resolved an issue where the service start on fresh installs failed, since the latest version does not auto-generate the needed .komga sub directory anymore.
- 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.
- 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.
- DietPi-Software | Java: Since the Java 8 package from Raspbian cannot be successfully installed anymore, due to a dependency conflict, and there is no other functional Java version for ARMv6, Java and all Java applications have been finally disabled for this architecture (RPi 1 and Zero). You can still uninstall related applications via dietpi-software, but not install or reinstall them. We are sorry for this step, but our related bug report at Raspbian did not get any traction, and also on Raspberry Pi forum the issue did not really come up since the year it exists. Java applications on Linux anyway consume a lot of resources (for the runtime) and are slow, hence the interest running such on old RPi 1 and Zero (1) models seems to be minimal, and it had limitations due to Java 8 only. We hence close this chapter. If anyone is seriously interested, please push the existing Raspbian bug report, as a fix at Raspbian side is theoretically very simple: https://bugs.launchpad.net/raspbian/+bug/2087632

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

Expand Down
85 changes: 34 additions & 51 deletions dietpi/dietpi-software
Original file line number Diff line number Diff line change
Expand Up @@ -359,6 +359,8 @@ Available commands:
aSOFTWARE_CATX[$software_id]=2
aSOFTWARE_DOCS[$software_id]='https://dietpi.com/docs/software/media/#airsonic'
aSOFTWARE_DEPS[$software_id]='5 7 196'
# - ARMv6: No functional Java Available
aSOFTWARE_AVAIL_G_HW_ARCH[$software_id,1]=0
#------------------
software_id=35
aSOFTWARE_NAME[$software_id]='Lyrion Music Server'
Expand Down Expand Up @@ -529,6 +531,8 @@ Available commands:
aSOFTWARE_CATX[$software_id]=2
aSOFTWARE_DOCS[$software_id]='https://dietpi.com/docs/software/media/#ubooquity'
aSOFTWARE_DEPS[$software_id]='196'
# - ARMv6: No functional Java Available
aSOFTWARE_AVAIL_G_HW_ARCH[$software_id,1]=0
#------------------
software_id=179
aSOFTWARE_NAME[$software_id]='Komga'
Expand All @@ -538,6 +542,8 @@ Available commands:
aSOFTWARE_DEPS[$software_id]='196'
# - RISC-V: An embedded Java library has no RISC-V support yet: "Caused by: java.lang.Exception: No native library found for os.name=Linux, os.arch=riscv64"
#aSOFTWARE_AVAIL_G_HW_ARCH[$software_id,11]=0
# - ARMv6: No functional Java Available
aSOFTWARE_AVAIL_G_HW_ARCH[$software_id,1]=0
#------------------
software_id=86
aSOFTWARE_NAME[$software_id]='Roon Extension Manager'
Expand Down Expand Up @@ -919,6 +925,8 @@ Available commands:
aSOFTWARE_CATX[$software_id]=5
aSOFTWARE_DOCS[$software_id]='https://dietpi.com/docs/software/gaming/#mineos'
aSOFTWARE_DEPS[$software_id]='9 17 196'
# - ARMv6: No functional Java Available
aSOFTWARE_AVAIL_G_HW_ARCH[$software_id,1]=0
#------------------
software_id=156
aSOFTWARE_NAME[$software_id]='Steam'
Expand All @@ -939,13 +947,17 @@ Available commands:
aSOFTWARE_CATX[$software_id]=5
aSOFTWARE_DOCS[$software_id]='https://dietpi.com/docs/software/gaming/#nukkit'
aSOFTWARE_DEPS[$software_id]='196'
# - ARMv6: No functional Java Available
aSOFTWARE_AVAIL_G_HW_ARCH[$software_id,1]=0
#------------------
software_id=181
aSOFTWARE_NAME[$software_id]='PaperMC'
aSOFTWARE_DESC[$software_id]='Highly optimised Minecraft server with plugins, written in Java'
aSOFTWARE_CATX[$software_id]=5
aSOFTWARE_DOCS[$software_id]='https://dietpi.com/docs/software/gaming/#papermc'
aSOFTWARE_DEPS[$software_id]='196'
# - ARMv6: No functional Java Available
aSOFTWARE_AVAIL_G_HW_ARCH[$software_id,1]=0
ls -l /mnt/dietpi_userdata
df
[[ -f '/mnt/dietpi_userdata/papermc/eula.txt' ]] || aSOFTWARE_INTERACTIVE[$software_id]=1
Expand Down Expand Up @@ -1257,6 +1269,8 @@ Available commands:
aSOFTWARE_CATX[$software_id]=10
aSOFTWARE_DOCS[$software_id]='https://dietpi.com/docs/software/hardware_projects/#blynk-server'
aSOFTWARE_DEPS[$software_id]='196 9'
# - ARMv6: No functional Java Available
aSOFTWARE_AVAIL_G_HW_ARCH[$software_id,1]=0
#------------------
software_id=166
aSOFTWARE_NAME[$software_id]='Audiophonics PI-SPC'
Expand Down Expand Up @@ -1538,7 +1552,7 @@ Available commands:
aSOFTWARE_CATX[$software_id]=17
aSOFTWARE_DOCS[$software_id]='https://dietpi.com/docs/software/home_automation/#openhab'
aSOFTWARE_DEPS[$software_id]='196'
# - ARMv6: Requires at least Java 11
# - ARMv6: No functional Java Available
aSOFTWARE_AVAIL_G_HW_ARCH[$software_id,1]=0
#------------------
software_id=211
Expand Down Expand Up @@ -1584,6 +1598,8 @@ Available commands:
aSOFTWARE_CATX[$software_id]=19
aSOFTWARE_DOCS[$software_id]='https://dietpi.com/docs/software/distributed_projects/#yacy'
aSOFTWARE_DEPS[$software_id]='196'
# - ARMv6: No functional Java Available
aSOFTWARE_AVAIL_G_HW_ARCH[$software_id,1]=0
#------------------
software_id=141
aSOFTWARE_NAME[$software_id]='ADS-B Feeder'
Expand Down Expand Up @@ -1774,12 +1790,16 @@ Available commands:
aSOFTWARE_CATX[$software_id]=26
aSOFTWARE_DOCS[$software_id]='https://dietpi.com/docs/software/programming/#java'
aSOFTWARE_DEPS[$software_id]='196'
# - ARMv6: No functional Java Available
aSOFTWARE_AVAIL_G_HW_ARCH[$software_id,1]=0
#------------------
software_id=196
aSOFTWARE_NAME[$software_id]='Java JRE'
aSOFTWARE_DESC[$software_id]='OpenJDK Runtime Environment'
aSOFTWARE_CATX[$software_id]=26
aSOFTWARE_DOCS[$software_id]='https://dietpi.com/docs/software/programming/#java'
# - ARMv6: No functional Java Available
aSOFTWARE_AVAIL_G_HW_ARCH[$software_id,1]=0
#------------------
software_id=9
aSOFTWARE_NAME[$software_id]='Node.js'
Expand Down Expand Up @@ -2962,13 +2982,8 @@ unix_socket_directories = '/run/postgresql'" > "$i/00dietpi.conf"

if To_Install 196 # Java JRE
then
# ARMv6
if (( $G_HW_ARCH == 1 ))
then
local version=8

# Trixie without openHAB
elif (( $G_DISTRO > 7 && ${aSOFTWARE_INSTALL_STATE[206]} < 1 ))
if (( $G_DISTRO > 7 && ${aSOFTWARE_INSTALL_STATE[206]} < 1 ))
then
local version=21

Expand All @@ -2983,13 +2998,8 @@ unix_socket_directories = '/run/postgresql'" > "$i/00dietpi.conf"

if To_Install 8 # Java JDK
then
# ARMv6
if (( $G_HW_ARCH == 1 ))
then
local version=8

# Trixie without openHAB
elif (( $G_DISTRO > 7 && ${aSOFTWARE_INSTALL_STATE[206]} < 1 ))
if (( $G_DISTRO > 7 && ${aSOFTWARE_INSTALL_STATE[206]} < 1 ))
then
local version=21

Expand Down Expand Up @@ -4117,13 +4127,8 @@ _EOF_
if To_Install 133 yacy # YaCy
then
# Get latest download
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
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"; }

Download_Install "https://download.yacy.net/$file" /etc

Expand Down Expand Up @@ -6168,15 +6173,9 @@ _EOF_

if To_Install 33 airsonic # Airsonic-Advanced
then
# ARMv6: Download latest v10 as v11 does not support Java 8
if (( $G_HW_ARCH == 1 ))
then
Download_Install 'https://github.com/airsonic-advanced/airsonic-advanced/releases/download/v10.6.0/airsonic.war' /mnt/dietpi_userdata/airsonic/airsonic.war
else
# Since v11 is not yet released, pull latest pre-release
local fallback_url='https://github.com/airsonic-advanced/airsonic-advanced/releases/download/11.0.0-SNAPSHOT.20240424015024/airsonic.war'
Download_Install "$(curl -sSfL 'https://api.github.com/repos/airsonic-advanced/airsonic-advanced/releases' | mawk -F\" '/^ *"browser_download_url": ".*\/airsonic\.war"$/{print $4}' | head -1)" /mnt/dietpi_userdata/airsonic/airsonic.war
fi
# Since v11 is not yet released, pull latest pre-release
local fallback_url='https://github.com/airsonic-advanced/airsonic-advanced/releases/download/11.0.0-SNAPSHOT.20240424015024/airsonic.war'
Download_Install "$(curl -sSfL 'https://api.github.com/repos/airsonic-advanced/airsonic-advanced/releases' | mawk -F\" '/^ *"browser_download_url": ".*\/airsonic\.war"$/{print $4}' | head -1)" /mnt/dietpi_userdata/airsonic/airsonic.war

# User
Create_User -g dietpi -G audio -d /mnt/dietpi_userdata/airsonic airsonic
Expand Down Expand Up @@ -6796,15 +6795,7 @@ _EOF_
# RPi: Install build deps for the "onoff" Node module
(( $G_HW_MODEL > 9 )) || aDEPS=('python3' 'make' 'g++')

# ARMv6: Install Java 8 build and apply Log4Shell mitigation as the last Java 8 build does not contain it: https://github.com/Peterkn2001/blynk-server/releases
local log4shell=
if (( $G_HW_ARCH == 1 ))
then
log4shell=' -Dlog4j2.formatMsgNoLookups=true'
Download_Install 'https://github.com/Peterkn2001/blynk-server/releases/download/v0.41.16/server-0.41.16-java8.jar' /mnt/dietpi_userdata/blynk/blynkserver.jar
else
Download_Install 'https://github.com/Peterkn2001/blynk-server/releases/download/v0.41.17/server-0.41.17.jar' /mnt/dietpi_userdata/blynk/blynkserver.jar
fi
Download_Install 'https://github.com/Peterkn2001/blynk-server/releases/download/v0.41.17/server-0.41.17.jar' /mnt/dietpi_userdata/blynk/blynkserver.jar

# RPi: Install "onoff" for GPIO access
(( $G_HW_MODEL > 9 )) || G_EXEC_OUTPUT=1 G_EXEC npm i -g --no-audit onoff@latest
Expand Down Expand Up @@ -6835,7 +6826,7 @@ _EOF_
Create_User -d /mnt/dietpi_userdata/blynk blynk

# Service
cat << _EOF_ > /etc/systemd/system/blynkserver.service
cat << '_EOF_' > /etc/systemd/system/blynkserver.service
[Unit]
Description=Blynk Server (DietPi)
Wants=network-online.target
Expand All @@ -6846,7 +6837,7 @@ SyslogIdentifier=Blynk
User=blynk
LogsDirectory=blynk
WorkingDirectory=/mnt/dietpi_userdata/blynk
ExecStart=/usr/bin/java$log4shell -jar /mnt/dietpi_userdata/blynk/blynkserver.jar
ExecStart=/usr/bin/java -jar /mnt/dietpi_userdata/blynk/blynkserver.jar
SuccessExitStatus=143

# Hardening
Expand Down Expand Up @@ -7493,14 +7484,8 @@ _EOF_

if To_Install 179 komga # Komga
then
# Komga v1 requires Java >=17: https://komga.org/blog/prepare-v1/
if (( $G_HW_ARCH == 1 ))
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.16.0/komga-1.16.0.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
local fallback_url='https://github.com/gotson/komga/releases/download/1.16.0/komga-1.16.0.jar'
Download_Install "$(curl -sSfL 'https://api.github.com/repos/gotson/komga/releases/latest' | mawk -F\" '/^ *"browser_download_url": ".*\/komga-[^"\/]*\.jar"$/{print $4}')" /mnt/dietpi_userdata/komga/komga.jar

# User
Create_User -G dietpi -d /mnt/dietpi_userdata/komga komga
Expand Down Expand Up @@ -11507,9 +11492,7 @@ _EOF_
local url='https://api.papermc.io/v2/projects/paper'
# - 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##*\"}; }
(( $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
Expand Down

0 comments on commit a1e82a5

Please sign in to comment.