Skip to content

Commit

Permalink
v6.20
Browse files Browse the repository at this point in the history
+ DietPi-Software | Java: "ca-certificates-java" is now dependency of "openjdk-8-jre-headless" on all distro versions, so do not manually install
+ DietPi-Software | Java: "ca-certificates-java" dependencies now allow Java 8 only on all distro versions, Java 9+10 have been dropped mostly, so we don't require reinstall workaround anymore
+ DietPi-Software | Java: Install headless packages on Jessie as well
+ DietPi-Software | Java: Add all Java related packages to backports priority pin on Jessie, to allow automated APT upgrades for all of them
  • Loading branch information
MichaIng authored Jan 13, 2019
1 parent 2234222 commit 6490e6d
Showing 1 changed file with 12 additions and 16 deletions.
28 changes: 12 additions & 16 deletions dietpi/dietpi-software
Original file line number Diff line number Diff line change
Expand Up @@ -4338,8 +4338,7 @@ _EOF_

fi

#PIHOLE
software_id=93
software_id=93 # Pi-hole
if (( ${aSOFTWARE_INSTALL_STATE[$software_id]} == 1 )); then

Banner_Installing
Expand Down Expand Up @@ -6859,7 +6858,7 @@ Pin-Priority: -1' > /etc/apt/preferences.d/dietpi-docker_fix

fi

software_id=8
software_id=8 # Java
if (( ${aSOFTWARE_INSTALL_STATE[$software_id]} == 1 )); then

Banner_Installing
Expand All @@ -6868,19 +6867,16 @@ Pin-Priority: -1' > /etc/apt/preferences.d/dietpi-docker_fix
if (( $G_DISTRO == 3 )); then

cat << _EOF_ > /etc/apt/preferences.d/99-dietpi-openjdk-8-jdk
Package: openjdk-8-jdk
Package: ca-certificates-java java-common openjdk-8-*
Pin: release a=jessie-backports
Pin-Priority: 990
_EOF_

G_AGI openjdk-8-jdk -t jessie-backports
G_AGI openjdk-8-jre-headless openjdk-8-jdk-headless -t jessie-backports

else

# - Workaround to allow install: https://github.com/Fourdee/DietPi/issues/1340#issuecomment-389902031
local packages='ca-certificates-java openjdk-8-jre-headless openjdk-8-jdk-headless'
apt-get install -y -qq $packages
G_AGI $packages
G_AGI openjdk-8-jre-headless openjdk-8-jdk-headless

fi

Expand Down Expand Up @@ -9323,7 +9319,7 @@ ExecStart=$(which java) -Xmx$airsonic_memory_max -Dairsonic.home=$G_FP_DIETPI_US
WantedBy=multi-user.target
_EOF_

#Symlink ffmpeg to subsonic transcoder
#Symlink FFmpeg to Airsonic transcoder
ln -sf $(which ffmpeg) $G_FP_DIETPI_USERDATA/airsonic/transcode

#Grab our test media for user
Expand All @@ -9346,15 +9342,15 @@ _EOF_

cat << _EOF_ > /etc/default/subsonic
SUBSONIC_USER=root
SUBSONIC_ARGS="--quiet --pidfile=/run/subsonic.pid --max-memory=$subsonic_memory_max --default-music-folder=$G_FP_DIETPI_USERDATA/$FOLDER_MUSIC --default-podcast-folder=$G_FP_DIETPI_USERDATA/$FOLDER_MUSIC --default-playlist-folder=$G_FP_DIETPI_USERDATA/$FOLDER_MUSIC"
SUBSONIC_ARGS='--quiet --pidfile=/run/subsonic.pid --max-memory=$subsonic_memory_max --default-music-folder=$G_FP_DIETPI_USERDATA/$FOLDER_MUSIC --default-podcast-folder=$G_FP_DIETPI_USERDATA/$FOLDER_MUSIC --default-playlist-folder=$G_FP_DIETPI_USERDATA/$FOLDER_MUSIC'
_EOF_

#Symlink FFmpeg to Subsonic transcoder
ln -fs $(which ffmpeg) /var/subsonic/transcode

#Grab our test media for user
Download_Test_Media

#Symlink ffmpeg to subsonic transcoder
ln -fs $(which ffmpeg) /var/subsonic/transcode

fi

#WEBIOPI
Expand Down Expand Up @@ -14651,8 +14647,8 @@ _EOF_

Banner_Uninstalling

apt-mark auto $(dpkg --get-selections default-jre* default-jdk* openjdk-8-jre* openjdk-8-jdk* | awk '{print $1}') ca-certificates-java
rm /etc/apt/preferences.d/99-dietpi-openjdk-8-jdk &> /dev/null
apt-mark auto $(dpkg --get-selections default-jre* default-jdk* openjdk-* | awk '{print $1}') ca-certificates-java
[[ -f /etc/apt/preferences.d/99-dietpi-openjdk-8-jdk ]] && rm /etc/apt/preferences.d/99-dietpi-openjdk-8-jdk

fi

Expand Down

0 comments on commit 6490e6d

Please sign in to comment.