Consolidate dedicated server release notices

Source licenses, attribution, provenance, and font notices from the pinned game checkout while retaining installer compatibility with earlier manifest formats.
This commit is contained in:
Alexander Sellite 2026-08-12 22:12:16 -04:00
parent 0f1d931a7b
commit 220cfd2354
8 changed files with 92 additions and 421 deletions

View file

@ -91,12 +91,39 @@ for filename in NETfishingServer.x86_64 NETfishingServer.pck BUILD_INFO SHA256SU
exit 1
fi
done
for filename in \
GPL-3.0-or-later.txt \
ASSET-LICENSE.md \
THIRD-PARTY-NOTICES.md \
TRADEMARKS.md \
CREDITS.md; do
manifest_value() {
local key="$1"
awk -F= -v key="${key}" '$1 == key {sub(/^[^=]*=/, ""); print; exit}' \
"${payload_dir}/BUILD_INFO"
}
manifest_version="$(manifest_value manifest_version)"
case "${manifest_version}" in
1|2)
required_notice_files=(
GPL-3.0-or-later.txt
ASSET-LICENSE.md
THIRD-PARTY-NOTICES.md
TRADEMARKS.md
CREDITS.md
)
;;
3)
required_notice_files=(
GPL-3.0-or-later.txt
ASSET-LICENSE.md
ATTRIBUTION.md
TRADEMARKS.md
Tuffy-LICENSE.txt
Seattle-Avenue-LICENSE.txt
)
;;
*)
echo "Unsupported BUILD_INFO format." >&2
exit 1
;;
esac
for filename in "${required_notice_files[@]}"; do
if [[ ! -f "${payload_dir}/licenses/${filename}" ]]; then
echo "Archive is missing required notice licenses/${filename}." >&2
exit 1
@ -108,20 +135,10 @@ if [[ ! -f "${payload_dir}/SOURCE-CODE.md" ]]; then
fi
(cd -- "${payload_dir}" && sha256sum -c SHA256SUMS)
manifest_value() {
local key="$1"
awk -F= -v key="${key}" '$1 == key {sub(/^[^=]*=/, ""); print; exit}' \
"${payload_dir}/BUILD_INFO"
}
manifest_version="$(manifest_value manifest_version)"
game_version="$(manifest_value game_version)"
game_commit="$(manifest_value game_commit)"
packaging_commit="$(manifest_value packaging_commit)"
platform="$(manifest_value platform)"
if [[ "${manifest_version}" != "1" && "${manifest_version}" != "2" ]]; then
echo "Unsupported BUILD_INFO format." >&2
exit 1
fi
if [[ ! "${game_version}" =~ ^[A-Za-z0-9][A-Za-z0-9._-]*$ ]]; then
echo "Invalid game version in BUILD_INFO." >&2
exit 1
@ -130,7 +147,7 @@ if [[ ! "${game_commit}" =~ ^[0-9a-f]{40}$ ]]; then
echo "Invalid game commit in BUILD_INFO." >&2
exit 1
fi
if [[ "${manifest_version}" == "2" \
if [[ "${manifest_version}" != "1" \
&& ! "${packaging_commit}" =~ ^[0-9a-f]{40}$ ]]; then
echo "Invalid packaging commit in BUILD_INFO." >&2
exit 1
@ -158,12 +175,7 @@ else
install -m 0444 "${payload_dir}/SHA256SUMS" "${release_stage}/"
install -m 0444 "${payload_dir}/SOURCE-CODE.md" "${release_stage}/"
install -d -m 0755 "${release_stage}/licenses"
for filename in \
GPL-3.0-or-later.txt \
ASSET-LICENSE.md \
THIRD-PARTY-NOTICES.md \
TRADEMARKS.md \
CREDITS.md; do
for filename in "${required_notice_files[@]}"; do
install -m 0444 "${payload_dir}/licenses/${filename}" \
"${release_stage}/licenses/${filename}"
done

View file

@ -38,9 +38,10 @@ done
for filename in \
GPL-3.0-or-later.txt \
ASSET-LICENSE.md \
THIRD-PARTY-NOTICES.md \
ATTRIBUTION.md \
TRADEMARKS.md \
CREDITS.md; do
Tuffy-LICENSE.txt \
Seattle-Avenue-LICENSE.txt; do
if [[ ! -f "${dist_dir}/licenses/${filename}" ]]; then
echo "Staged build is missing licenses/${filename}." >&2
exit 1
@ -50,6 +51,10 @@ if ! grep -Fxq "game_version=${version}" "${dist_dir}/BUILD_INFO"; then
echo "Staged BUILD_INFO does not match package version ${version}." >&2
exit 1
fi
if ! grep -Fxq "manifest_version=3" "${dist_dir}/BUILD_INFO"; then
echo "Staged BUILD_INFO does not use the current manifest format." >&2
exit 1
fi
packaging_commit="$(
awk -F= '$1 == "packaging_commit" {print tolower($2); exit}' \
"${dist_dir}/BUILD_INFO"
@ -91,9 +96,10 @@ install -d "${staging_dir}/${package_name}/licenses"
for filename in \
GPL-3.0-or-later.txt \
ASSET-LICENSE.md \
THIRD-PARTY-NOTICES.md \
ATTRIBUTION.md \
TRADEMARKS.md \
CREDITS.md; do
Tuffy-LICENSE.txt \
Seattle-Avenue-LICENSE.txt; do
install -m 0644 "${dist_dir}/licenses/${filename}" \
"${staging_dir}/${package_name}/licenses/${filename}"
done

View file

@ -1,14 +1,15 @@
#!/usr/bin/env bash
set -euo pipefail
if [[ $# -ne 3 ]]; then
echo "Usage: $0 /path/to/server-linux-x86_64 GAME_VERSION GAME_COMMIT" >&2
if [[ $# -ne 4 ]]; then
echo "Usage: $0 /path/to/server-linux-x86_64 GAME_VERSION GAME_COMMIT /path/to/netfishing" >&2
exit 2
fi
source_dir="${1%/}"
game_version="$2"
game_commit="${3,,}"
game_repository="${4%/}"
repository_dir="$(cd -- "$(dirname -- "${BASH_SOURCE[0]}")/.." && pwd)"
destination_dir="${repository_dir}/dist"
licenses_dir="${destination_dir}/licenses"
@ -28,6 +29,20 @@ if [[ ! "${game_commit}" =~ ^[0-9a-f]{40}$ ]]; then
echo "GAME_COMMIT must be the full 40-character Git commit." >&2
exit 2
fi
if [[ ! -f "${game_repository}/project.godot" ]]; then
echo "The NETfishing game repository was not found: ${game_repository}" >&2
exit 2
fi
resolved_game_commit="$(git -C "${game_repository}" rev-parse HEAD)"
if [[ "${resolved_game_commit}" != "${game_commit}" ]]; then
echo "The NETfishing repository HEAD does not match GAME_COMMIT." >&2
exit 2
fi
if ! git -C "${game_repository}" diff --quiet \
|| ! git -C "${game_repository}" diff --cached --quiet; then
echo "The NETfishing repository must be clean before staging notices." >&2
exit 1
fi
if [[ ! "${packaging_commit}" =~ ^[0-9a-f]{40}$ ]]; then
echo "Could not resolve the dedicated packaging Git commit." >&2
exit 2
@ -40,22 +55,25 @@ for filename in NETfishingServer.x86_64 NETfishingServer.pck; do
fi
done
install -d -m 0755 "${destination_dir}"
install -m 0755 "${source_dir}/NETfishingServer.x86_64" \
"${destination_dir}/NETfishingServer.x86_64"
install -m 0644 "${source_dir}/NETfishingServer.pck" \
"${destination_dir}/NETfishingServer.pck"
rm -rf -- "${licenses_dir}"
install -d -m 0755 "${licenses_dir}"
install -m 0644 "${repository_dir}/LICENSE" \
install -m 0644 "${game_repository}/LICENSE" \
"${licenses_dir}/GPL-3.0-or-later.txt"
install -m 0644 "${repository_dir}/ASSET-LICENSE.md" \
install -m 0644 "${game_repository}/ASSET-LICENSE.md" \
"${licenses_dir}/ASSET-LICENSE.md"
install -m 0644 "${repository_dir}/THIRD-PARTY-NOTICES.md" \
"${licenses_dir}/THIRD-PARTY-NOTICES.md"
install -m 0644 "${repository_dir}/TRADEMARKS.md" \
install -m 0644 "${game_repository}/docs/ATTRIBUTION.md" \
"${licenses_dir}/ATTRIBUTION.md"
install -m 0644 "${game_repository}/TRADEMARKS.md" \
"${licenses_dir}/TRADEMARKS.md"
install -m 0644 "${repository_dir}/CREDITS.md" \
"${licenses_dir}/CREDITS.md"
install -m 0644 "${game_repository}/ui/fonts/Tuffy-LICENSE.txt" \
"${licenses_dir}/Tuffy-LICENSE.txt"
install -m 0644 "${game_repository}/ui/fonts/Seattle-Avenue-LICENSE.txt" \
"${licenses_dir}/Seattle-Avenue-LICENSE.txt"
cd -- "${destination_dir}"
executable_sha256="$(sha256sum NETfishingServer.x86_64 | awk '{print $1}')"
@ -64,7 +82,7 @@ pck_sha256="$(sha256sum NETfishingServer.pck | awk '{print $1}')"
apply_umask="$(umask)"
umask 022
printf '%s\n' \
"manifest_version=2" \
"manifest_version=3" \
"game_version=${game_version}" \
"game_commit=${game_commit}" \
"packaging_commit=${packaging_commit}" \
@ -93,8 +111,9 @@ sha256sum \
SOURCE-CODE.md \
licenses/GPL-3.0-or-later.txt \
licenses/ASSET-LICENSE.md \
licenses/THIRD-PARTY-NOTICES.md \
licenses/ATTRIBUTION.md \
licenses/TRADEMARKS.md \
licenses/CREDITS.md \
licenses/Tuffy-LICENSE.txt \
licenses/Seattle-Avenue-LICENSE.txt \
> SHA256SUMS
echo "Staged dedicated server build in ${destination_dir}"