From 9fd21e5b9a6b218a69b22a32be36079aa323beb5 Mon Sep 17 00:00:00 2001 From: fwillo <37631375+fwillo@users.noreply.github.com> Date: Sun, 19 Jul 2026 16:10:10 +0200 Subject: [PATCH] fix(mods): BepInEx_Valheim prevents startup on systems with newer glibc (#4788) * fix(mods): BepInEx_Valheim prevents startup on systems with newer glibc Load the libdoorstop_x64.so solely for the dedicated server executable and not for the whole startup routine, which causes errors in startup or not loading the mods at all. (see #4149 and #4491) * chore(prettier): format code --------- Co-authored-by: Daniel Gibbs Co-authored-by: dgibbs64 --- .../scripts/details-check-generate-matrix.sh | 16 ++-- .github/scripts/sync-game-labels.sh | 76 +++++++++---------- lgsm/modules/fix_vh.sh | 2 +- 3 files changed, 47 insertions(+), 47 deletions(-) diff --git a/.github/scripts/details-check-generate-matrix.sh b/.github/scripts/details-check-generate-matrix.sh index eff7d5416..cf37b528c 100755 --- a/.github/scripts/details-check-generate-matrix.sh +++ b/.github/scripts/details-check-generate-matrix.sh @@ -23,11 +23,11 @@ while read -r line; do export distro # Legacy servers that require older Ubuntu/Debian versions due to glibc compatibility case "${shortname}" in - bfv|bf1942) + bfv | bf1942) # Requires Ubuntu <= 22.04 or Debian <= 12 (glibc 2.31 compatible) runner="ubuntu-22.04" ;; - btl|onset) + btl | onset) # Requires Ubuntu <= 20.04 or Debian <= 11 (glibc 2.31 compatible) runner="ubuntu-20.04" ;; @@ -36,12 +36,12 @@ while read -r line; do ;; esac { - echo -n "{"; - echo -n "\"shortname\":"; - echo -n "\"${shortname}\""; - echo -n ",\"runner\":"; - echo -n "\"${runner}\""; - echo -n "},"; + echo -n "{" + echo -n "\"shortname\":" + echo -n "\"${shortname}\"" + echo -n ",\"runner\":" + echo -n "\"${runner}\"" + echo -n "}," } >> "shortnamearray.json" done < <(tail -n +2 serverlist.csv) sed -i '$ s/.$//' "shortnamearray.json" diff --git a/.github/scripts/sync-game-labels.sh b/.github/scripts/sync-game-labels.sh index 737ec5b74..2914f3d80 100644 --- a/.github/scripts/sync-game-labels.sh +++ b/.github/scripts/sync-game-labels.sh @@ -20,8 +20,8 @@ normalize_label() { } if [[ ! -f "${SERVERLIST}" ]]; then - echo "ERROR: ${SERVERLIST} not found. Run from the repository root." - exit 1 + echo "ERROR: ${SERVERLIST} not found. Run from the repository root." + exit 1 fi declare -A EXISTING_COLORS=() @@ -31,20 +31,20 @@ declare -A EXISTING_NAMES=() # Fetch all existing game label metadata once (up to 1000) and cache locally. echo "Fetching existing labels..." while IFS=$'\t' read -r NAME COLOR DESCRIPTION; do - [[ -n "${NAME}" ]] || continue - EXISTING_COLORS["${NAME}"]="${COLOR}" - EXISTING_DESCRIPTIONS["${NAME}"]="${DESCRIPTION}" - EXISTING_NAMES["$(normalize_label "${NAME}")"]="${NAME}" + [[ -n "${NAME}" ]] || continue + EXISTING_COLORS["${NAME}"]="${COLOR}" + EXISTING_DESCRIPTIONS["${NAME}"]="${DESCRIPTION}" + EXISTING_NAMES["$(normalize_label "${NAME}")"]="${NAME}" done < <( - gh label list --limit 1000 --json name,color,description ${REPO:+--repo "$REPO"} \ - | jq -r '.[] | select(.name | startswith("game: ")) | [.name, .color, (.description // "")] | @tsv' + gh label list --limit 1000 --json name,color,description ${REPO:+--repo "$REPO"} \ + | jq -r '.[] | select(.name | startswith("game: ")) | [.name, .color, (.description // "")] | @tsv' ) # Parse unique game names from the CSV (column 3, skip header). mapfile -t GAMES < <( - tail -n +2 "${SERVERLIST}" \ - | cut -d',' -f3 \ - | sort -u + tail -n +2 "${SERVERLIST}" \ + | cut -d',' -f3 \ + | sort -u ) CREATED=0 @@ -52,35 +52,35 @@ UPDATED=0 UNCHANGED=0 for GAME in "${GAMES[@]}"; do - LABEL="${LABEL_PREFIX}${GAME}" - DESCRIPTION="Issues related to ${GAME}" - NORMALIZED_LABEL="$(normalize_label "${LABEL}")" + LABEL="${LABEL_PREFIX}${GAME}" + DESCRIPTION="Issues related to ${GAME}" + NORMALIZED_LABEL="$(normalize_label "${LABEL}")" - if [[ -v EXISTING_NAMES["${NORMALIZED_LABEL}"] ]]; then - CURRENT_LABEL="${EXISTING_NAMES["${NORMALIZED_LABEL}"]}" - CURRENT_COLOR="${EXISTING_COLORS["${CURRENT_LABEL}"]}" - CURRENT_DESCRIPTION="${EXISTING_DESCRIPTIONS["${CURRENT_LABEL}"]}" + if [[ -v EXISTING_NAMES["${NORMALIZED_LABEL}"] ]]; then + CURRENT_LABEL="${EXISTING_NAMES["${NORMALIZED_LABEL}"]}" + CURRENT_COLOR="${EXISTING_COLORS["${CURRENT_LABEL}"]}" + CURRENT_DESCRIPTION="${EXISTING_DESCRIPTIONS["${CURRENT_LABEL}"]}" - if [[ "${CURRENT_LABEL}" != "${LABEL}" || "${CURRENT_COLOR}" != "${LABEL_COLOR}" || "${CURRENT_DESCRIPTION}" != "${DESCRIPTION}" ]]; then - echo " update ${LABEL}" - gh label edit "${CURRENT_LABEL}" \ - --name "${LABEL}" \ - --color "${LABEL_COLOR}" \ - --description "${DESCRIPTION}" \ - ${REPO:+--repo "$REPO"} - (( UPDATED++ )) || true - else - echo " ok ${LABEL}" - (( UNCHANGED++ )) || true - fi - else - echo " create ${LABEL}" - gh label create "${LABEL}" \ - --color "${LABEL_COLOR}" \ - --description "${DESCRIPTION}" \ - ${REPO:+--repo "$REPO"} - (( CREATED++ )) || true - fi + if [[ "${CURRENT_LABEL}" != "${LABEL}" || "${CURRENT_COLOR}" != "${LABEL_COLOR}" || "${CURRENT_DESCRIPTION}" != "${DESCRIPTION}" ]]; then + echo " update ${LABEL}" + gh label edit "${CURRENT_LABEL}" \ + --name "${LABEL}" \ + --color "${LABEL_COLOR}" \ + --description "${DESCRIPTION}" \ + ${REPO:+--repo "$REPO"} + ((UPDATED++)) || true + else + echo " ok ${LABEL}" + ((UNCHANGED++)) || true + fi + else + echo " create ${LABEL}" + gh label create "${LABEL}" \ + --color "${LABEL_COLOR}" \ + --description "${DESCRIPTION}" \ + ${REPO:+--repo "$REPO"} + ((CREATED++)) || true + fi done echo "" diff --git a/lgsm/modules/fix_vh.sh b/lgsm/modules/fix_vh.sh index 7d09af677..600988be6 100755 --- a/lgsm/modules/fix_vh.sh +++ b/lgsm/modules/fix_vh.sh @@ -33,7 +33,7 @@ if [ -f "${modsinstalledlistfullpath}" ]; then export DOORSTOP_TARGET_ASSEMBLY=./BepInEx/core/BepInEx.Preloader.dll export LD_LIBRARY_PATH="./doorstop_libs:${LD_LIBRARY_PATH}" - export LD_PRELOAD="libdoorstop_x64.so:${LD_PRELOAD}" + preexecutable="LD_PRELOAD=\"libdoorstop_x64.so:${LD_PRELOAD}\" ${preexecutable}" export SteamAppId=892970 fi