Browse Source

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 <[email protected]>
Co-authored-by: dgibbs64 <[email protected]>
pull/4940/head
fwillo 1 day ago
committed by GitHub
parent
commit
9fd21e5b9a
No known key found for this signature in database GPG Key ID: B5690EEEBB952194
  1. 16
      .github/scripts/details-check-generate-matrix.sh
  2. 76
      .github/scripts/sync-game-labels.sh
  3. 2
      lgsm/modules/fix_vh.sh

16
.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"

76
.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 ""

2
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

Loading…
Cancel
Save