Skip to content

SuwayomiServer: Bump Java to v21, code formating #3987

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

tremor021
Copy link
Member

✍️ Description

  • Replace OpenJDK 17 with Temurin 21
  • Code formating

🔗 Related PR / Issue

Link: #3983

✅ Prerequisites (X in brackets)

  • Self-review completed – Code follows project standards.
  • Tested thoroughly – Changes work as expected.
  • No security risks – No hardcoded secrets, unnecessary privilege escalations, or permission issues.

🛠️ Type of Change (X in brackets)

  • 🐞 Bug fix – Resolves an issue without breaking functionality.
  • New feature – Adds new, non-breaking functionality.
  • 💥 Breaking change – Alters existing functionality in a way that may require updates.
  • 🆕 New script – A fully functional and tested script or script set.
  • 🌍 Website update – Changes to website-related JSON files or metadata.
  • 🔧 Refactoring / Code Cleanup – Improves readability or maintainability without changing functionality.
  • 📝 Documentation update – Changes to README, AppName.md, CONTRIBUTING.md, or other docs.
@tremor021 tremor021 requested a review from a team as a code owner April 22, 2025 20:00
@tremor021 tremor021 linked an issue Apr 22, 2025 that may be closed by this pull request
2 tasks
@tremor021 tremor021 self-assigned this Apr 22, 2025
@github-actions github-actions bot added bugfix refactor update script A change that updates a script labels Apr 22, 2025
@ralphocdol
Copy link

ralphocdol commented Apr 23, 2025

Odd, I tested this by copying the update_script() (removing the things that are not needed) but the suwayomi-server keeps looking for openjdk-21-jre even with temurin-21-jre installed. Had to do the equivs magic to get around it.

update_script()

#!/bin/bash

if dpkg -l | grep -q "openjdk-17-jre"; then
    apt-get remove -y openjdk-17-jre
    mkdir -p /etc/apt/keyrings
    curl -fsSL "https://packages.adoptium.net/artifactory/api/gpg/key/public" | gpg --dearmor >/etc/apt/trusted.gpg.d/adoptium.gpg
    echo "deb https://packages.adoptium.net/artifactory/deb $(awk -F= '/^VERSION_CODENAME/{print$2}' /etc/os-release) main" >/etc/apt/sources.list.d/adoptium.list
    apt-get update
    apt-get install -y temurin-21-jre
fi
RELEASE=$(curl -fsSL https://api.github.com/repos/Suwayomi/Suwayomi-Server/releases/latest | grep "tag_name" | awk '{print substr($2, 2, length($2)-3) }')
if [[ "${RELEASE}" != "$(cat /opt/suwayomi-server_version.txt)" ]] || [[ ! -f /opt/suwayomi-server_version.txt ]]; then
    systemctl stop suwayomi-server
    cd /tmp
    URL=$(curl -fsSL https://api.github.com/repos/Suwayomi/Suwayomi-Server/releases/latest | grep "browser_download_url" | awk '{print substr($2, 2, length($2)-2) }' | tail -n+2 | head -n 1)
    curl -fsSL "$URL" -o $(basename "$URL")
    dpkg -i /tmp/*.deb
    systemctl start suwayomi-server
    rm -f *.deb
    echo "${RELEASE}" >/opt/suwayomi-server_version.txt.txt
fi

adding dummy openjdk-21-jre

apt-get install -y equivs
mkdir -p /tmp/fakejdk && cd /tmp/fakejdk
equivs-control openjdk-21-jre
nano openjdk-21-jre

nano openjdk-21-jre then update to match

Section: misc
Priority: optional
Standards-Version: 3.9.2

Package: openjdk-21-jre
Depends: temurin-21-jre
Version: 21.0.0
Maintainer: Your Name <you@example.com>
Provides: openjdk-21-jre
Description: Dummy package for temurin-21-jre
 This package satisfies dependencies requiring openjdk-21-jre by pointing to temurin-21-jre.

then

equivs-build openjdk-21-jre
dpkg -i openjdk-21-jre_*.deb

Did I miss something?

@MickLesk
Copy link
Member

Look this Script really for an fixed package? Dumb. Maybe we need to create an issue there. Jdk21 is jdk21, what an bullshit ^^

@tremor021
Copy link
Member Author

Yea, thats really weird

@tremor021 tremor021 closed this Apr 25, 2025
@tremor021 tremor021 deleted the suwa branch April 25, 2025 06:23
@tremor021 tremor021 restored the suwa branch April 25, 2025 06:47
@tremor021 tremor021 reopened this Apr 25, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bugfix refactor update script A change that updates a script
4 participants