Date: Friday, August 27, 2021 @ 21:57:35 Author: foutrelis Revision: 422614
archrelease: copy trunk to extra-any Added: geoip-database/repos/extra-any/PKGBUILD (from rev 422613, geoip-database/trunk/PKGBUILD) geoip-database/repos/extra-any/update.sh (from rev 422613, geoip-database/trunk/update.sh) Deleted: geoip-database/repos/extra-any/PKGBUILD geoip-database/repos/extra-any/update.sh -----------+ PKGBUILD | 164 ++++++++++++++++++++++++++++++------------------------------ update.sh | 56 ++++++++++---------- 2 files changed, 110 insertions(+), 110 deletions(-) Deleted: PKGBUILD =================================================================== --- PKGBUILD 2021-08-27 21:57:30 UTC (rev 422613) +++ PKGBUILD 2021-08-27 21:57:35 UTC (rev 422614) @@ -1,82 +0,0 @@ -# Maintainer: Evangelos Foutras <evange...@foutrelis.com> - -pkgname=('geoip-database' 'geoip-database-extra') -pkgver=20210727 -pkgrel=1 -arch=('any') -url="https://mailfud.org/geoip-legacy/" -license=('CCPL:by-sa') -makedepends=('util-linux') -checkdepends=('geoip') -_source_base=https://sources.archlinux.org/other/packages/$pkgname/$pkgver -source=(GeoIP-$pkgver.dat.gz::$_source_base/GeoIP.dat.gz - GeoIPv6-$pkgver.dat.gz::$_source_base/GeoIPv6.dat.gz - GeoIPCity-$pkgver.dat.gz::$_source_base/GeoIPCity.dat.gz - GeoIPCityv6-$pkgver.dat.gz::$_source_base/GeoIPCityv6.dat.gz - GeoIPASNum-$pkgver.dat.gz::$_source_base/GeoIPASNum.dat.gz - GeoIPASNumv6-$pkgver.dat.gz::$_source_base/GeoIPASNumv6.dat.gz) -sha256sums=('4bb2af7fa72500e372c1307f33e1320dac5ed19784dfb01b57dad46c545fe9f2' - '4180c3e0ae0e5cb70f606e402a7470c40b684d63a09e1ea89be141f097485211' - '6be197b26e23b4c164178245842e61dec5eedef018e45e064589091ffe3d94ff' - '0b95b8f0305789227e6cc20b74395e08c2ffd1a6d545911207241202a918da87' - 'b813569441604f2cebf824aa7c964523c0d1890e13dd95c10f744a8610ab9594' - '38093796ec287923e2b7afee6b470c7ade68165a5f33db1a9fae0fe53cc8980d') - -prepare() { - cd "$srcdir" - rename -v -- "-$pkgver" '' *.dat -} - -check() { - cd "$srcdir" - - if [[ $(geoiplookup -f GeoIP.dat 8.8.8.8) != *'US, United States' ]]; then - echo >&2 'Unable to resolve IPv4 address to country.' - return 1 - fi - - if [[ $(geoiplookup6 -f GeoIPv6.dat 2001:4860:4860::8888) != *'US, United States' ]]; then - echo >&2 'Unable to resolve IPv6 address to country.' - return 1 - fi - - if [[ $(geoiplookup -f GeoIPCity.dat 8.8.8.8) != *'US, 00, N/A, N/A'* ]]; then - echo >&2 'Unable to resolve IPv4 address to city.' - return 1 - fi - - if [[ $(geoiplookup6 -f GeoIPCityv6.dat 2001:4860:4860::8888) != *'US, 00, N/A, N/A'* ]]; then - echo >&2 'Unable to resolve IPv6 address to city.' - return 1 - fi - - if [[ $(geoiplookup -f GeoIPASNum.dat 8.8.8.8) != *'AS15169 GOOGLE' ]]; then - echo >&2 'Unable to resolve IPv4 address to ASN.' - return 1 - fi - - if [[ $(geoiplookup6 -f GeoIPASNumv6.dat 2001:4860:4860::8888) != *'AS15169 GOOGLE' ]]; then - echo >&2 'Unable to resolve IPv6 address to ASN.' - return 1 - fi -} - -package_geoip-database() { - pkgdesc="GeoIP legacy country database (based on GeoLite2 data created by MaxMind)" - - cd "$srcdir" - - install -d "$pkgdir/usr/share/GeoIP" - install -m644 -t "$pkgdir/usr/share/GeoIP" GeoIP{,v6}.dat -} - -package_geoip-database-extra() { - pkgdesc="GeoIP legacy city/ASN databases (based on GeoLite2 data created by MaxMind)" - - cd "$srcdir" - - install -d "$pkgdir/usr/share/GeoIP" - install -m644 -t "$pkgdir/usr/share/GeoIP" GeoIPCity{,v6}.dat GeoIPASNum{,v6}.dat -} - -# vim:set ts=2 sw=2 et: Copied: geoip-database/repos/extra-any/PKGBUILD (from rev 422613, geoip-database/trunk/PKGBUILD) =================================================================== --- PKGBUILD (rev 0) +++ PKGBUILD 2021-08-27 21:57:35 UTC (rev 422614) @@ -0,0 +1,82 @@ +# Maintainer: Evangelos Foutras <evange...@foutrelis.com> + +pkgname=('geoip-database' 'geoip-database-extra') +pkgver=20210824 +pkgrel=1 +arch=('any') +url="https://mailfud.org/geoip-legacy/" +license=('CCPL:by-sa') +makedepends=('util-linux') +checkdepends=('geoip') +_source_base=https://sources.archlinux.org/other/packages/$pkgname/$pkgver +source=(GeoIP-$pkgver.dat.gz::$_source_base/GeoIP.dat.gz + GeoIPv6-$pkgver.dat.gz::$_source_base/GeoIPv6.dat.gz + GeoIPCity-$pkgver.dat.gz::$_source_base/GeoIPCity.dat.gz + GeoIPCityv6-$pkgver.dat.gz::$_source_base/GeoIPCityv6.dat.gz + GeoIPASNum-$pkgver.dat.gz::$_source_base/GeoIPASNum.dat.gz + GeoIPASNumv6-$pkgver.dat.gz::$_source_base/GeoIPASNumv6.dat.gz) +sha256sums=('ce515b3a1a724b4c4875a04490a7ae1caecfde1176d2fa1a742c67c7cf00721a' + '06d9855d513702ad6607c772e3522930c8d034ed82d67d89294a4cca30fa3b70' + '9d11f5bafaaf7d864519cf9492d25bf9b17255df274fe7fddd91a1ead23e966f' + '345e812809dbbd50a2286e89fe9a97ab6bea79e88d0888481da1e9ad3329d0bb' + 'cf1e42143d54387d4fb156e5fa1fe4a7686bdc8abe8b2e8a568a34c08f8e5f27' + '474ca8514a880488ea67d3066f1445528e5c6d35bd7edf8e30912d17d027f670') + +prepare() { + cd "$srcdir" + rename -v -- "-$pkgver" '' *.dat +} + +check() { + cd "$srcdir" + + if [[ $(geoiplookup -f GeoIP.dat 8.8.8.8) != *'US, United States' ]]; then + echo >&2 'Unable to resolve IPv4 address to country.' + return 1 + fi + + if [[ $(geoiplookup6 -f GeoIPv6.dat 2001:4860:4860::8888) != *'US, United States' ]]; then + echo >&2 'Unable to resolve IPv6 address to country.' + return 1 + fi + + if [[ $(geoiplookup -f GeoIPCity.dat 8.8.8.8) != *'US, 00, N/A, N/A'* ]]; then + echo >&2 'Unable to resolve IPv4 address to city.' + return 1 + fi + + if [[ $(geoiplookup6 -f GeoIPCityv6.dat 2001:4860:4860::8888) != *'US, 00, N/A, N/A'* ]]; then + echo >&2 'Unable to resolve IPv6 address to city.' + return 1 + fi + + if [[ $(geoiplookup -f GeoIPASNum.dat 8.8.8.8) != *'AS15169 GOOGLE' ]]; then + echo >&2 'Unable to resolve IPv4 address to ASN.' + return 1 + fi + + if [[ $(geoiplookup6 -f GeoIPASNumv6.dat 2001:4860:4860::8888) != *'AS15169 GOOGLE' ]]; then + echo >&2 'Unable to resolve IPv6 address to ASN.' + return 1 + fi +} + +package_geoip-database() { + pkgdesc="GeoIP legacy country database (based on GeoLite2 data created by MaxMind)" + + cd "$srcdir" + + install -d "$pkgdir/usr/share/GeoIP" + install -m644 -t "$pkgdir/usr/share/GeoIP" GeoIP{,v6}.dat +} + +package_geoip-database-extra() { + pkgdesc="GeoIP legacy city/ASN databases (based on GeoLite2 data created by MaxMind)" + + cd "$srcdir" + + install -d "$pkgdir/usr/share/GeoIP" + install -m644 -t "$pkgdir/usr/share/GeoIP" GeoIPCity{,v6}.dat GeoIPASNum{,v6}.dat +} + +# vim:set ts=2 sw=2 et: Deleted: update.sh =================================================================== --- update.sh 2021-08-27 21:57:30 UTC (rev 422613) +++ update.sh 2021-08-27 21:57:35 UTC (rev 422614) @@ -1,28 +0,0 @@ -#!/bin/bash - -set -eo pipefail - -readonly upstream=https://mailfud.org/geoip-legacy/ - -version=$(curl -s "$upstream/build.log" | grep -Po 'CSV_\K[0-9]{8}' | - sort -n | tail -1) - -if [[ ${#version} != 8 ]]; then - echo >&2 'Unable to determine upstream database version' - exit 1 -fi - -pkgver=$(. PKGBUILD; echo $pkgver) - -if ((pkgver >= version)); then - echo >&2 "Already at version $pkgver (>= $version upstream)" - exit 1 -fi - -ssh -T sources.archlinux.org <<-EOF - mkdir -p /srv/sources/other/packages/geoip-database/$version && - cd /srv/sources/other/packages/geoip-database/$version && - wget -nc $upstream/GeoIP{,City,ASNum}{,v6}.dat.gz -EOF - -sed -i -e "/^pkgver=/c pkgver=$version" -e "/^pkgrel=/c pkgrel=1" PKGBUILD Copied: geoip-database/repos/extra-any/update.sh (from rev 422613, geoip-database/trunk/update.sh) =================================================================== --- update.sh (rev 0) +++ update.sh 2021-08-27 21:57:35 UTC (rev 422614) @@ -0,0 +1,28 @@ +#!/bin/bash + +set -eo pipefail + +readonly upstream=https://mailfud.org/geoip-legacy/ + +version=$(curl -s "$upstream/build.log" | grep -Po 'CSV_\K[0-9]{8}' | + sort -n | tail -1) + +if [[ ${#version} != 8 ]]; then + echo >&2 'Unable to determine upstream database version' + exit 1 +fi + +pkgver=$(. PKGBUILD; echo $pkgver) + +if ((pkgver >= version)); then + echo >&2 "Already at version $pkgver (>= $version upstream)" + exit 1 +fi + +ssh -T sources.archlinux.org <<-EOF + mkdir -p /srv/sources/other/packages/geoip-database/$version && + cd /srv/sources/other/packages/geoip-database/$version && + wget -nc $upstream/GeoIP{,City,ASNum}{,v6}.dat.gz +EOF + +sed -i -e "/^pkgver=/c pkgver=$version" -e "/^pkgrel=/c pkgrel=1" PKGBUILD