Skip to content
Permalink
Browse files

Fix GeoIP2 database file extraction (#764)

  • Loading branch information
Arkshine committed Oct 17, 2019
1 parent 5e48c9b commit 6fb27a03a7c4bbc560f0ccff972f780a95bd0319
Showing with 5 additions and 7 deletions.
  1. +5 −7 support/buildbot/package.pl
@@ -7,7 +7,7 @@
use File::stat;
use File::Temp qw/ tempfile :seekable/;
use Net::FTP;
use IO::Uncompress::Gunzip qw(gunzip $GunzipError);
use Archive::Tar;
use Time::localtime;

my ($ftp_file, $ftp_host, $ftp_user, $ftp_pass, $ftp_path);
@@ -72,12 +72,10 @@
unlink($geoIPfile);
}

open(my $fh, ">", $geoIPfile)
or die "cannot open $geoIPfile for writing: $!";
binmode($fh);
gunzip '../GeoLite2-Country.tar.gz' => $fh
or die "gunzip failed: $GunzipError\n";
close($fh);
my $next = Archive::Tar->iter('../GeoLite2-Country.tar.gz', 1, {filter => qr/\.mmdb$/});
while (my $file = $next->()) {
$file->extract($geoIPfile) or warn "Extraction failed";
}

my (@packages,@mac_exclude);
@packages = ('base', 'cstrike', 'dod', 'esf', 'ns', 'tfc', 'ts');

0 comments on commit 6fb27a0

Please sign in to comment.
You can’t perform that action at this time.