From d907f66ec9f197a94de11a6462e4b0dfd47964bf Mon Sep 17 00:00:00 2001 From: bones_was_here Date: Sun, 23 Mar 2025 10:40:44 +1000 Subject: [PATCH] rsync: support updating the mappingsupport package, reduce timestamp noise The mappingsupport package has been available via rsync for years but it didn't include the updater and wasn't recognised by it. It also lacked the license (now required by the updater). --- misc/tools/all/release.subr | 12 +++++++----- misc/tools/rsync-updater/update-to-autobuild.sh | 3 +++ 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/misc/tools/all/release.subr b/misc/tools/all/release.subr index 62334a31..e1161e6d 100644 --- a/misc/tools/all/release.subr +++ b/misc/tools/all/release.subr @@ -306,13 +306,13 @@ case "$cmd" in arch=$1 buildpath=$2 targetdir=$3 - verbose mkdir -p "$targetdir" + # TODO: cache the dlls and skip rebuilding them if their package versions are unchanged ( cd "$d0/misc/buildsrc" verbose ./dlls.sh clean "$buildpath" verbose ./dlls.sh all "$buildpath" "$arch" ) - verbose cp -v $buildpath/out/$arch/* "$targetdir" + verbose cp -r --preserve=timestamps -v "$buildpath/out/$arch" "$targetdir" # SDL2 verbose mkdir -p "$d0/misc/builddeps/$arch/" @@ -351,7 +351,7 @@ case "$cmd" in # macOS prefers dylibs be marked executable (this one has no file extension) verbose chmod 755 SDL2/SDL2.framework/Versions/Current/SDL2 ) - cp -R "$d0/misc/builddeps/osx/SDL2/SDL2.framework" Xonotic/Xonotic.app/Contents/Frameworks/ + cp -R --preserve=timestamps "$d0/misc/builddeps/osx/SDL2/SDL2.framework" Xonotic/Xonotic.app/Contents/Frameworks/ ;; release-libs) release_common @@ -671,6 +671,8 @@ case "$cmd" in Xonotic/data/xonotic-$pk3stamp-nexcompat-high.pk3 \ Xonotic/data/xonotic-$pk3stamp-xoncompat-high.pk3 verbose mkzipr Xonotic-$stamp-mappingsupport.zip \ + Xonotic/misc/tools/rsync-updater/ \ + Xonotic/COPYING Xonotic/GPL-2 Xonotic/GPL-3 \ Xonotic/mapping verbose mkzip0 Xonotic-$stamp-mappingsupport.zip \ Xonotic/data/xonotic-$pk3stamp-maps-mapping.pk3 @@ -684,7 +686,7 @@ case "$cmd" in verbose "$d0"/misc/tools/msys2-linux.sh --schroot=sid rsync dash openssl sed targetroot="$PWD/Xonotic" verbose cd "$HOME/msys64" # see msys2-linux.sh - verbose cp --parents \ + verbose cp --parents --preserve=timestamps \ usr/bin/msys-2.0.dll \ usr/bin/msys-crypto-3.dll \ usr/bin/msys-iconv-2.dll \ @@ -699,7 +701,7 @@ case "$cmd" in usr/ssl/cert.pem \ "$targetroot/misc/tools/rsync-updater/" # msys2 sh.exe is currently bash - verbose cp usr/bin/dash.exe "$targetroot/misc/tools/rsync-updater/usr/bin/sh.exe" + verbose cp --preserve=timestamps usr/bin/dash.exe "$targetroot/misc/tools/rsync-updater/usr/bin/sh.exe" ;; release) release_common diff --git a/misc/tools/rsync-updater/update-to-autobuild.sh b/misc/tools/rsync-updater/update-to-autobuild.sh index a14b91f3..0e6ad277 100755 --- a/misc/tools/rsync-updater/update-to-autobuild.sh +++ b/misc/tools/rsync-updater/update-to-autobuild.sh @@ -65,6 +65,9 @@ elif PWD="${PWD%/}" && [ "$PWD" != "${PWD%/misc/tools/rsync-updater}" ]; then package="Xonotic-high" elif [ -f ../../../data/xonotic-*-data.pk3 ]; then echo "Found Xonotic data files" + elif [ -f ../../../data/xonotic-*-maps-mapping.pk3 ]; then + echo "Found Xonotic-mappingsupport files" + package="Xonotic-mappingsupport" else printf "\033[1;31mNOTE: found misc/tools/rsync-updater parent directories but no data files!\033[m\n" fi -- 2.39.5