Skip to content
This repository has been archived by the owner on May 14, 2024. It is now read-only.

Update Vintage Story egg for prerelease support #2181

Merged
merged 4 commits into from
Mar 9, 2023

Conversation

Kamisoi
Copy link
Contributor

@Kamisoi Kamisoi commented Mar 8, 2023

Description

Update of Vintage Story egg to support unstable and pre release branches, mainly due to v1.18 prereleases being available (sadly, their API endpoints do not yet have that updated, as seen under respective URLs for API endpoints)
Change of README to reflect accessibility of unstable and pre file branches.

Checklist for all submissions

  • Have you followed the guidelines in our Contributing document?
  • Have you checked to ensure there aren't other open Pull Requests for the same update/change?
  • Have you tested and reviewed your changes with confidence that everything works?
  • Did you branch your changes and PR from that branch and not from your master branch?
    • If not, why?:
  • You verify that the start command applied does not use a shell script
    • If some script is needed then it is part of a current yolk or a PR to add one
  • The egg was exported from the panel

game_eggs/vintage_story/egg-vintage-story.json Outdated Show resolved Hide resolved
game_eggs/vintage_story/egg-vintage-story.json Outdated Show resolved Hide resolved
game_eggs/vintage_story/egg-vintage-story.json Outdated Show resolved Hide resolved
@Kamisoi Kamisoi requested a review from QuintenQVD0 March 8, 2023 21:54
@QuintenQVD0
Copy link
Collaborator

Please try setting the install script to this:
and then test if it still works

#!/bin/bash
# Vintage Story Installation Script
#
# Server Files: /mnt/server
apt update
apt -y install wget curl jq

BRANCH="${FILES_BRANCH}"

# Fetching latest stable server release
if [ -z "${RELEASE_VERSION}" ] || [ "${RELEASE_VERSION}" == "latest" ]; then
 case "${BRANCH}" in
 "stable")
 API_URL="http://api.vintagestory.at/stable.json"
 ;;
 "unstable")
 API_URL="http://api.vintagestory.at/unstable.json"
 ;;
 "pre")
 API_URL="http://api.vintagestory.at/pre.json"
 ;;
 *)
 echo "Invalid stage; fallback to stable"
 API_URL="http://api.vintagestory.at/stable.json"
 ;;
 esac
 DOWNLOAD_URL=$(curl -SsL "$API_URL" | jq -r 'if ([.[]] | .[0].server.urls.cdn) != null then [.[]] | .[0].server.urls.cdn else [.[]] | .[0].server.urls.local end');
# Use specified server release
else
 case "${BRANCH}" in
 "stable")
 DOWNLOAD_URL=https://cdn.vintagestory.at/gamefiles/stable/vs_server_${RELEASE_VERSION}.tar.gz
 ;;
 "unstable")
 DOWNLOAD_URL=https://account.vintagestory.at/files/unstable/vs_server_${RELEASE_VERSION}.tar.gz
 ;;
 "pre")
 DOWNLOAD_URL=https://cdn.vintagestory.at/gamefiles/pre/vs_server_${RELEASE_VERSION}.tar.gz
 ;;
 *)
 echo "Invalid stage; fallback to stable"
 DOWNLOAD_URL=https://cdn.vintagestory.at/gamefiles/stable/vs_server_${RELEASE_VERSION}.tar.gz
 ;;
 esac
fi

cd /mnt/server/ || exit

curl -o vs_server.tar.gz "${DOWNLOAD_URL}"
tar -xzf vs_server.tar.gz

rm vs_server.tar.gz

echo "-----------------------------------------"
echo "Installation completed..."
echo "-----------------------------------------"

@Kamisoi
Copy link
Contributor Author

Kamisoi commented Mar 9, 2023

Please try setting the install script to this: and then test if it still works

Works fine, although there are still logs than can be easily mitigated by keeping DEBIAN_NONINTERACTIVE flag for package installation part

debconf: unable to initialize frontend: Dialog
debconf: (No usable dialog-like program is installed, so the dialog based frontend cannot be used. at /usr/share/perl5/Debconf/FrontEnd/Dialog.pm line 78.)
debconf: falling back to frontend: Readline
debconf: unable to initialize frontend: Readline
debconf: (Can't locate Term/ReadLine.pm in @INC (you may need to install the Term::ReadLine module) (@INC contains: /etc/perl /usr/local/lib/x86_64-linux-gnu/perl/5.28.1 /usr/local/share/perl/5.28.1 /usr/lib/x86_64-linux-gnu/perl5/5.28 /usr/share/perl5 /usr/lib/x86_64-linux-gnu/perl/5.28 /usr/share/perl/5.28 /usr/local/lib/site_perl /usr/lib/x86_64-linux-gnu/perl-base) at /usr/share/perl5/Debconf/FrontEnd/Readline.pm line 7.)
debconf: falling back to frontend: Teletype

@QuintenQVD0
Copy link
Collaborator

Please try setting the install script to this: and then test if it still works

Works fine, although there are still logs than can be easily mitigated by keeping DEBIAN_NONINTERACTIVE flag for package installation part

debconf: unable to initialize frontend: Dialog
debconf: (No usable dialog-like program is installed, so the dialog based frontend cannot be used. at /usr/share/perl5/Debconf/FrontEnd/Dialog.pm line 78.)
debconf: falling back to frontend: Readline
debconf: unable to initialize frontend: Readline
debconf: (Can't locate Term/ReadLine.pm in @INC (you may need to install the Term::ReadLine module) (@INC contains: /etc/perl /usr/local/lib/x86_64-linux-gnu/perl/5.28.1 /usr/local/share/perl/5.28.1 /usr/lib/x86_64-linux-gnu/perl5/5.28 /usr/share/perl5 /usr/lib/x86_64-linux-gnu/perl/5.28 /usr/share/perl/5.28 /usr/local/lib/site_perl /usr/lib/x86_64-linux-gnu/perl-base) at /usr/share/perl5/Debconf/FrontEnd/Readline.pm line 7.)
debconf: falling back to frontend: Teletype

End user can not see the install proces so that is fine.

@Kamisoi
Copy link
Contributor Author

Kamisoi commented Mar 9, 2023

Removed DEBIAN_NONINTERACTIVE alltogether, hopefully now is all good ^^

Copy link
Collaborator

@QuintenQVD0 QuintenQVD0 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! thank you

@QuintenQVD0 QuintenQVD0 merged commit f23a5d6 into pelican-eggs:master Mar 9, 2023
@QuintenQVD0
Copy link
Collaborator

I just cleaned up some left over that is not more used as of panel v1 and update the install image to debian 11

@Kamisoi Kamisoi deleted the update/vintage-story branch March 9, 2023 18:44
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants