From 684f550e4583b9fa7d7f8c3c77fa502e4f267e70 Mon Sep 17 00:00:00 2001 From: Naji Obeid Date: Tue, 11 Apr 2023 22:57:11 -0400 Subject: [PATCH] bump major geoipupdate version --- CHANGELOG.md | 12 ++++++++++++ README.md | 12 ++++++------ cmd/geoipupdate/end_to_end_test.go | 2 +- cmd/geoipupdate/main.go | 4 ++-- go.mod | 2 +- pkg/geoipupdate/config.go | 2 +- pkg/geoipupdate/config_test.go | 2 +- pkg/geoipupdate/database/http_reader.go | 4 ++-- pkg/geoipupdate/geoip_updater.go | 4 ++-- pkg/geoipupdate/vars/version.go | 2 +- 10 files changed, 29 insertions(+), 17 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 85d337a9..53035e6e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,17 @@ # CHANGELOG +## 5.0.0 (2023-04-11) + +* Redefined the `Reader` and `Writer` interface apis in + `pkg/geoipupdate/database`. This change aims to to make it easier to + introduce custom implementations of these interfaces. +* Changed the signature of `NewConfig` in `pkg/geoipupdate` to accept + optional parameters. This change allows the introduction of new + flags or config options without making breaking changes to the function's + signature. +* Introduced `Parallelism` as a new flag and config option to enable + concurrent database updates. + ## 4.11.1 (2023-03-16) * Removed extra underscore in script variables preventing the Docker diff --git a/README.md b/README.md index d9e77dd3..146509b4 100644 --- a/README.md +++ b/README.md @@ -19,12 +19,12 @@ guide](https://dev.maxmind.com/geoip/upgrading-geoip-update?lang=en). ### Installing on Linux via the tarball Download and extract the appropriate tarball for your system. You will end -up with a directory named something like `geoipupdate_4.0.0_linux_amd64` +up with a directory named something like `geoipupdate_5.0.0_linux_amd64` depending on the version and architecture. Copy `geoipupdate` to where you want it to live. To install it to `/usr/local/bin/geoipupdate`, run the equivalent of `sudo cp -geoipupdate_4.0.0_linux_amd64/geoipupdate /usr/local/bin`. +geoipupdate_5.0.0_linux_amd64/geoipupdate /usr/local/bin`. `geoipupdate` looks for the config file `/usr/local/etc/GeoIP.conf` by default. @@ -51,7 +51,7 @@ You can also use the tarball. Download the appropriate .deb for your system. -Run `dpkg -i path/to/geoipupdate_4.0.0_linux_amd64.deb` (replacing the +Run `dpkg -i path/to/geoipupdate_5.0.0_linux_amd64.deb` (replacing the version number and architecture as necessary). You will need to be root. For Ubuntu you can prefix the command with `sudo`. This will install `geoipupdate` to `/usr/bin/geoipupdate`. @@ -64,7 +64,7 @@ You can also use the tarball. Download the appropriate .rpm for your system. -Run `rpm -Uvhi path/to/geoipupdate_4.0.0_linux_amd64.rpm` (replacing the +Run `rpm -Uvhi path/to/geoipupdate_5.0.0_linux_amd64.rpm` (replacing the version number and architecture as necessary). You will need to be root. This will install `geoipupdate` to `/usr/bin/geoipupdate`. @@ -87,7 +87,7 @@ $ brew install geoipupdate ### Installing on Windows Download and extract the appropriate zip for your system. You will end up -with a directory named something like `geoipupdate_4.0.0_windows_amd64` +with a directory named something like `geoipupdate_5.0.0_windows_amd64` depending on the version and architecture. Copy `geoipupdate.exe` to where you want it to live. @@ -107,7 +107,7 @@ website](https://golang.org). The easiest way is via `go get`: - $ env GO111MODULE=on go get -u github.com/maxmind/geoipupdate/v4/cmd/geoipupdate + $ env GO111MODULE=on go get -u github.com/maxmind/geoipupdate/v5/cmd/geoipupdate This installs `geoipupdate` to `$GOPATH/bin/geoipupdate`. diff --git a/cmd/geoipupdate/end_to_end_test.go b/cmd/geoipupdate/end_to_end_test.go index fe184d26..3bf8666e 100644 --- a/cmd/geoipupdate/end_to_end_test.go +++ b/cmd/geoipupdate/end_to_end_test.go @@ -17,7 +17,7 @@ import ( "testing" "time" - "github.com/maxmind/geoipupdate/v4/pkg/geoipupdate" + "github.com/maxmind/geoipupdate/v5/pkg/geoipupdate" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" ) diff --git a/cmd/geoipupdate/main.go b/cmd/geoipupdate/main.go index fbfddd92..921ca58f 100644 --- a/cmd/geoipupdate/main.go +++ b/cmd/geoipupdate/main.go @@ -7,8 +7,8 @@ import ( "log" "os" - "github.com/maxmind/geoipupdate/v4/pkg/geoipupdate" - "github.com/maxmind/geoipupdate/v4/pkg/geoipupdate/vars" + "github.com/maxmind/geoipupdate/v5/pkg/geoipupdate" + "github.com/maxmind/geoipupdate/v5/pkg/geoipupdate/vars" ) var ( diff --git a/go.mod b/go.mod index 7e1727d2..5aeca4bb 100644 --- a/go.mod +++ b/go.mod @@ -1,4 +1,4 @@ -module github.com/maxmind/geoipupdate/v4 +module github.com/maxmind/geoipupdate/v5 go 1.13 diff --git a/pkg/geoipupdate/config.go b/pkg/geoipupdate/config.go index 3a701d48..d20ba25b 100644 --- a/pkg/geoipupdate/config.go +++ b/pkg/geoipupdate/config.go @@ -12,7 +12,7 @@ import ( "strings" "time" - "github.com/maxmind/geoipupdate/v4/pkg/geoipupdate/vars" + "github.com/maxmind/geoipupdate/v5/pkg/geoipupdate/vars" ) // Config is a parsed configuration file. diff --git a/pkg/geoipupdate/config_test.go b/pkg/geoipupdate/config_test.go index 98c6224a..9d84441c 100644 --- a/pkg/geoipupdate/config_test.go +++ b/pkg/geoipupdate/config_test.go @@ -9,7 +9,7 @@ import ( "testing" "time" - "github.com/maxmind/geoipupdate/v4/pkg/geoipupdate/vars" + "github.com/maxmind/geoipupdate/v5/pkg/geoipupdate/vars" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" ) diff --git a/pkg/geoipupdate/database/http_reader.go b/pkg/geoipupdate/database/http_reader.go index c7143042..d82cc79a 100644 --- a/pkg/geoipupdate/database/http_reader.go +++ b/pkg/geoipupdate/database/http_reader.go @@ -14,8 +14,8 @@ import ( "net/url" "time" - "github.com/maxmind/geoipupdate/v4/pkg/geoipupdate/internal" - "github.com/maxmind/geoipupdate/v4/pkg/geoipupdate/vars" + "github.com/maxmind/geoipupdate/v5/pkg/geoipupdate/internal" + "github.com/maxmind/geoipupdate/v5/pkg/geoipupdate/vars" ) const urlFormat = "%s/geoip/databases/%s/update?db_md5=%s" diff --git a/pkg/geoipupdate/geoip_updater.go b/pkg/geoipupdate/geoip_updater.go index b4652e0b..d01ecd00 100644 --- a/pkg/geoipupdate/geoip_updater.go +++ b/pkg/geoipupdate/geoip_updater.go @@ -7,8 +7,8 @@ import ( "fmt" "log" - "github.com/maxmind/geoipupdate/v4/pkg/geoipupdate/database" - "github.com/maxmind/geoipupdate/v4/pkg/geoipupdate/internal" + "github.com/maxmind/geoipupdate/v5/pkg/geoipupdate/database" + "github.com/maxmind/geoipupdate/v5/pkg/geoipupdate/internal" ) // Client uses config data to initiate a download or update diff --git a/pkg/geoipupdate/vars/version.go b/pkg/geoipupdate/vars/version.go index 2f834598..2c105f13 100644 --- a/pkg/geoipupdate/vars/version.go +++ b/pkg/geoipupdate/vars/version.go @@ -2,4 +2,4 @@ package vars // Version defines current geoipupdate version. -const Version = "4.11.1" +const Version = "5.0.0"