Date: Saturday, February 26, 2022 @ 05:11:17 Author: foutrelis Revision: 438155
archrelease: copy trunk to extra-any Added: geoip-database/repos/extra-any/PKGBUILD (from rev 438154, geoip-database/trunk/PKGBUILD) geoip-database/repos/extra-any/update.sh (from rev 438154, 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 2022-02-26 05:11:12 UTC (rev 438154) +++ PKGBUILD 2022-02-26 05:11:17 UTC (rev 438155) @@ -1,82 +0,0 @@ -# Maintainer: Evangelos Foutras <evange...@foutrelis.com> - -pkgname=('geoip-database' 'geoip-database-extra') -pkgver=20220125 -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=('6184d6e50bb58f0e79f24b98707bc929d72af3c698383d58c7da53425f861c58' - '53beefabfb95879b9abf100f8274544973c997cc195d2942454e199378a6a5db' - '991a56807682313bd4de9e07c4b9efb135d85555f762127f4501f0b0a03908fc' - 'cd2bc7978e235c0c4477384fc769aa0df159836db086e2374c59bd5ae8e3a463' - 'a12c6e427091c69c7e346b2023f975140522fdaa2d45bdb15e25f2b20e1c3d08' - 'e08f96ef50461f881e10d5f8021c6703cb04a44fefe5590ccc1b8268c1372528') - -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 438154, geoip-database/trunk/PKGBUILD) =================================================================== --- PKGBUILD (rev 0) +++ PKGBUILD 2022-02-26 05:11:17 UTC (rev 438155) @@ -0,0 +1,82 @@ +# Maintainer: Evangelos Foutras <evange...@foutrelis.com> + +pkgname=('geoip-database' 'geoip-database-extra') +pkgver=20220222 +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=('e0133aafa62accfe57dea6d454c02f22a65aaba7775cbb4539f2a271da097db5' + 'e5745bdf59be2c2be5bc4f1d97306158b0e74db971540319dcfd40c59ab71739' + 'd4ac6997a838a51e83ebae824558fa768a07986afb5793afa8dc146dd5f8ad88' + 'faf1d4f2bfaddcacfb195ecb10dce4b02d1c7cf6e23d1dd849a4a8baa8e4299b' + '3c2262cc641d1f9eae272973c211e89b3771feb5123747ab1f38d2a0518acb9a' + 'ad98a4e2ab55c7d93df4188b8b55c8aa9587415a2e5b7f713f067b46aab26f89') + +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 2022-02-26 05:11:12 UTC (rev 438154) +++ update.sh 2022-02-26 05:11:17 UTC (rev 438155) @@ -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 438154, geoip-database/trunk/update.sh) =================================================================== --- update.sh (rev 0) +++ update.sh 2022-02-26 05:11:17 UTC (rev 438155) @@ -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