Date: Wednesday, December 22, 2021 @ 06:16:01 Author: foutrelis Revision: 432894
archrelease: copy trunk to extra-any Added: geoip-database/repos/extra-any/PKGBUILD (from rev 432893, geoip-database/trunk/PKGBUILD) geoip-database/repos/extra-any/update.sh (from rev 432893, 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-12-22 06:15:56 UTC (rev 432893) +++ PKGBUILD 2021-12-22 06:16:01 UTC (rev 432894) @@ -1,82 +0,0 @@ -# Maintainer: Evangelos Foutras <evange...@foutrelis.com> - -pkgname=('geoip-database' 'geoip-database-extra') -pkgver=20211123 -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=('17cc005ce719b846a46d2248005136ff105d0a36bbde9c03f58a1ba4de0b274b' - '5777bb21f864e485cce44aed3a540b36757564adf6c53cb41bbad46d178e0528' - 'a77f82e60506279bd1af23beca838fee8dcedc1754929cd776382cf8df3606d4' - '78e99bf1dcd75e625250c7baa71dfb07cff0705f6ca3d68c06a0c5d212bd9499' - 'fb7869cb8a24d8bbbf60d156ee69c2c9d14681020f2c5b61f6fc1ae39aed9dde' - 'a5fb4d75c6ea693d6defff598aa268c78b8c7765075bcaa60c7052458729e35d') - -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 432893, geoip-database/trunk/PKGBUILD) =================================================================== --- PKGBUILD (rev 0) +++ PKGBUILD 2021-12-22 06:16:01 UTC (rev 432894) @@ -0,0 +1,82 @@ +# Maintainer: Evangelos Foutras <evange...@foutrelis.com> + +pkgname=('geoip-database' 'geoip-database-extra') +pkgver=20211221 +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=('3407037cf5c7ac8657b574a201929ddfd761b064a185e8fa0dddc83d672662fe' + 'abf2eef0e1d80cf405f38d3231f2f7e5bb2e758ff2d9a6d32ccbcc299e2ddf84' + '0c4faa45f18dbe7c76d0c8d8b6a7d84800e9c573030df6317a53b4ff2ed523ac' + '16f9aac1fca6ee5b0588b90ed4c556d8dc47dd23fff70fe1acbc366d9046f923' + '4a2e958cc54611e4900d1db7cafbc7d51b4ce008ac60d9d1adab649b4ab49909' + 'e55baf12ef9a25fcb22376c64316cc24b3f947b5e10a638b84f0090e3063d000') + +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-12-22 06:15:56 UTC (rev 432893) +++ update.sh 2021-12-22 06:16:01 UTC (rev 432894) @@ -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 && - curl --remote-name-all $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 432893, geoip-database/trunk/update.sh) =================================================================== --- update.sh (rev 0) +++ update.sh 2021-12-22 06:16:01 UTC (rev 432894) @@ -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 && + curl --remote-name-all $upstream/GeoIP{,City,ASNum}{,v6}.dat.gz +EOF + +sed -i -e "/^pkgver=/c pkgver=$version" -e "/^pkgrel=/c pkgrel=1" PKGBUILD