Remove automatic GeoIP download from the build scripts.

The database file is now locked behind an account login.

https://blog.maxmind.com/2019/12/18/significant-changes-to-accessing-and-using-geolite2-databases/
This commit is contained in:
Paul Chote
2019-12-31 12:37:09 +00:00
committed by abcdefg30
parent 9d7ecdbc2c
commit e063e13ff4
4 changed files with 5 additions and 39 deletions

View File

@@ -173,30 +173,26 @@ cli-dependencies:
@ $(CP_R) thirdparty/download/*.dll.config . @ $(CP_R) thirdparty/download/*.dll.config .
@ test -f OpenRA.Game/obj/project.assets.json || $(MSBUILD) -t:restore @ test -f OpenRA.Game/obj/project.assets.json || $(MSBUILD) -t:restore
linux-dependencies: cli-dependencies geoip-dependencies linux-native-dependencies linux-dependencies: cli-dependencies linux-native-dependencies
linux-native-dependencies: linux-native-dependencies:
@./thirdparty/configure-native-deps.sh @./thirdparty/configure-native-deps.sh
windows-dependencies: cli-dependencies geoip-dependencies windows-dependencies: cli-dependencies
ifeq ($(WIN32), $(filter $(WIN32),true yes y on 1)) ifeq ($(WIN32), $(filter $(WIN32),true yes y on 1))
@./thirdparty/fetch-thirdparty-deps-windows.sh x86 @./thirdparty/fetch-thirdparty-deps-windows.sh x86
else else
@./thirdparty/fetch-thirdparty-deps-windows.sh x64 @./thirdparty/fetch-thirdparty-deps-windows.sh x64
endif endif
osx-dependencies: cli-dependencies geoip-dependencies osx-dependencies: cli-dependencies
@./thirdparty/fetch-thirdparty-deps-osx.sh @./thirdparty/fetch-thirdparty-deps-osx.sh
@ $(CP_R) thirdparty/download/osx/*.dylib . @ $(CP_R) thirdparty/download/osx/*.dylib .
@ $(CP_R) thirdparty/download/osx/*.dll.config . @ $(CP_R) thirdparty/download/osx/*.dll.config .
geoip-dependencies:
@./thirdparty/fetch-geoip-db.sh
@ $(CP) thirdparty/download/GeoLite2-Country.mmdb.gz .
dependencies: $(os-dependencies) dependencies: $(os-dependencies)
all-dependencies: cli-dependencies windows-dependencies osx-dependencies geoip-dependencies all-dependencies: cli-dependencies windows-dependencies osx-dependencies
version: VERSION mods/ra/mod.yaml mods/cnc/mod.yaml mods/d2k/mod.yaml mods/ts/mod.yaml mods/modcontent/mod.yaml mods/all/mod.yaml version: VERSION mods/ra/mod.yaml mods/cnc/mod.yaml mods/d2k/mod.yaml mods/ts/mod.yaml mods/modcontent/mod.yaml mods/all/mod.yaml
@echo "$(VERSION)" > VERSION @echo "$(VERSION)" > VERSION
@@ -387,4 +383,4 @@ help:
.SUFFIXES: .SUFFIXES:
.PHONY: check-scripts check nunit test all core clean distclean cli-dependencies linux-dependencies linux-native-dependencies windows-dependencies osx-dependencies geoip-dependencies dependencies all-dependencies version install install-linux-shortcuts install-engine install-common-mod-files install-default-mods install-core install-linux-icons install-linux-desktop install-linux-mime install-linux-appdata install-man-page install-linux-scripts uninstall help .PHONY: check-scripts check nunit test all core clean distclean cli-dependencies linux-dependencies linux-native-dependencies windows-dependencies osx-dependencies dependencies all-dependencies version install install-linux-shortcuts install-engine install-common-mod-files install-default-mods install-core install-linux-icons install-linux-desktop install-linux-mime install-linux-appdata install-man-page install-linux-scripts uninstall help

View File

@@ -99,7 +99,6 @@ function Dependencies-Command
cd thirdparty cd thirdparty
./fetch-thirdparty-deps.ps1 ./fetch-thirdparty-deps.ps1
cp download/*.dll .. cp download/*.dll ..
cp download/GeoLite2-Country.mmdb.gz ..
cp download/windows/*.dll .. cp download/windows/*.dll ..
cd .. cd ..
Write-Host "Dependencies copied." -ForegroundColor Cyan Write-Host "Dependencies copied." -ForegroundColor Cyan

View File

@@ -1,22 +0,0 @@
#!/bin/sh
# Die on any error for Travis CI to automatically retry:
set -e
download_dir="${0%/*}/download"
mkdir -p "${download_dir}"
cd "${download_dir}" || exit 1
filename="GeoLite2-Country.mmdb.gz"
# Database does not exist or is older than 30 days.
if [ ! -e $filename ] || [ -n "$(find . -name $filename -mtime +30 -print)" ]; then
rm -f $filename
echo "Updating GeoIP country database from MaxMind."
if command -v curl >/dev/null 2>&1; then
curl -s -L -O http://geolite.maxmind.com/download/geoip/database/$filename
else
wget -cq http://geolite.maxmind.com/download/geoip/database/$filename
fi
fi

View File

@@ -104,13 +104,6 @@ if (!(Test-Path "rix0rrr.BeaconLib.dll"))
rmdir rix0rrr.BeaconLib -Recurse rmdir rix0rrr.BeaconLib -Recurse
} }
if (!(Test-Path "GeoLite2-Country.mmdb.gz") -Or (((get-date) - (get-item "GeoLite2-Country.mmdb.gz").LastWriteTime) -gt (new-timespan -days 30)))
{
echo "Updating GeoIP country database from MaxMind."
$target = Join-Path $pwd.ToString() "GeoLite2-Country.mmdb.gz"
(New-Object System.Net.WebClient).DownloadFile("http://geolite.maxmind.com/download/geoip/database/GeoLite2-Country.mmdb.gz", $target)
}
[Net.ServicePointManager]::SecurityProtocol = 'Tls12' [Net.ServicePointManager]::SecurityProtocol = 'Tls12'
if (!(Test-Path "SDL2-CS.dll")) if (!(Test-Path "SDL2-CS.dll"))