diff --git a/.goreleaser-packages.yml b/.goreleaser-packages.yml index 5a786195..4048672c 100644 --- a/.goreleaser-packages.yml +++ b/.goreleaser-packages.yml @@ -24,28 +24,28 @@ builds: - '-s -w -X main.version={{.Version}} -X main.defaultConfigFile=/etc/GeoIP.conf -X main.defaultDatabaseDirectory=/usr/share/GeoIP' checksum: name_template: 'checksums-dpkg-rpm.txt' -nfpm: - vendor: 'MaxMind, Inc.' - homepage: https://www.maxmind.com/ - maintainer: 'MaxMind, Inc. ' - description: Program to perform automatic updates of GeoIP2 and GeoIP Legacy binary databases. - license: Apache 2.0 or MIT - formats: - - deb - - rpm - bindir: /usr/bin - empty_folders: - - /usr/share/GeoIP - files: - 'CHANGELOG.md': '/usr/share/doc/geoipupdate/CHANGELOG.md' - 'LICENSE-APACHE': '/usr/share/doc/geoipupdate/LICENSE-APACHE' - 'LICENSE-MIT': '/usr/share/doc/geoipupdate/LICENSE-MIT' - 'README.md': '/usr/share/doc/geoipupdate/README.md' - 'GeoIP.conf': '/usr/share/doc/geoipupdate/GeoIP.conf' - 'GeoIP.conf.md': '/usr/share/doc/geoipupdate/GeoIP.conf.md' - 'geoipupdate.md': '/usr/share/doc/geoipupdate/geoipupdate.md' - config_files: - 'GeoIP.conf': '/etc/GeoIP.conf' +nfpms: + - vendor: 'MaxMind, Inc.' + homepage: https://www.maxmind.com/ + maintainer: 'MaxMind, Inc. ' + description: Program to perform automatic updates of GeoIP2 and GeoIP Legacy binary databases. + license: Apache 2.0 or MIT + formats: + - deb + - rpm + bindir: /usr/bin + empty_folders: + - /usr/share/GeoIP + files: + 'CHANGELOG.md': '/usr/share/doc/geoipupdate/CHANGELOG.md' + 'LICENSE-APACHE': '/usr/share/doc/geoipupdate/LICENSE-APACHE' + 'LICENSE-MIT': '/usr/share/doc/geoipupdate/LICENSE-MIT' + 'README.md': '/usr/share/doc/geoipupdate/README.md' + 'GeoIP.conf': '/usr/share/doc/geoipupdate/GeoIP.conf' + 'GeoIP.conf.md': '/usr/share/doc/geoipupdate/GeoIP.conf.md' + 'geoipupdate.md': '/usr/share/doc/geoipupdate/geoipupdate.md' + config_files: + 'GeoIP.conf': '/etc/GeoIP.conf' release: # We disable the release as there is no way to disable the creation of # the archive version and we don't want to upload those. We also can diff --git a/CHANGELOG.md b/CHANGELOG.md index 27b89cc8..f924714c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,10 @@ # CHANGELOG +## 4.2.0 (2020-02-20) + +* The major version of the module is now included at the end of the module + path. Previously, it was not possible to import the module in projects that + were using Go modules. Reported by Roman Glushko. GitHub #81. * The minimum Go version is now 1.13. * A valid account ID and license key combination is now required for database downloads, so those configuration options are now required. @@ -7,6 +12,10 @@ ignore errors and, upon upgrading to `github.com/pkg/errors` 0.9.0, would fail to ignore expected errors. Reported by Ilya Skrypitsa and pgnd. GitHub #69 and #70. +* The RPM release was previously lacking the correct owner and group on files + and directories. Among other things, this caused the package to conflict with + the `GeoIP` package in CentOS 7 and `GeoIP-GeoLite-data` in CentOS 8. The + files are now owned by `root`. Reported by neonknight. GitHub #76. ## 4.1.5 (2019-11-08) diff --git a/README.md b/README.md index 445bcd62..74beef4c 100644 --- a/README.md +++ b/README.md @@ -109,7 +109,7 @@ website](https://golang.org). The easiest way is via `go get`: - $ go get -u github.com/maxmind/geoipupdate/cmd/geoipupdate + $ go get -u github.com/maxmind/geoipupdate/v4/cmd/geoipupdate This installs `geoipupdate` to `$GOPATH/bin/geoipupdate`. @@ -139,7 +139,7 @@ https://github.com/maxmind/geoipupdate/issues # Copyright and License -This software is Copyright (c) 2018 - 2019 by MaxMind, Inc. +This software is Copyright (c) 2018 - 2020 by MaxMind, Inc. This is free software, licensed under the [Apache License, Version 2.0](LICENSE-APACHE) or the [MIT License](LICENSE-MIT), at your option. diff --git a/cmd/geoipupdate/end_to_end_test.go b/cmd/geoipupdate/end_to_end_test.go index 8d8cdaaf..d7258ddb 100644 --- a/cmd/geoipupdate/end_to_end_test.go +++ b/cmd/geoipupdate/end_to_end_test.go @@ -16,7 +16,7 @@ import ( "testing" "time" - "github.com/maxmind/geoipupdate/pkg/geoipupdate" + "github.com/maxmind/geoipupdate/v4/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 cd9e197f..be27c0ab 100644 --- a/cmd/geoipupdate/main.go +++ b/cmd/geoipupdate/main.go @@ -7,8 +7,8 @@ import ( "os" "path/filepath" - "github.com/maxmind/geoipupdate/pkg/geoipupdate" - "github.com/maxmind/geoipupdate/pkg/geoipupdate/database" + "github.com/maxmind/geoipupdate/v4/pkg/geoipupdate" + "github.com/maxmind/geoipupdate/v4/pkg/geoipupdate/database" "github.com/pkg/errors" ) diff --git a/doc/geoipupdate.md b/doc/geoipupdate.md index eff54ed5..24d67c9c 100644 --- a/doc/geoipupdate.md +++ b/doc/geoipupdate.md @@ -76,7 +76,7 @@ Report bugs to [support@maxmind.com](mailto:support@maxmind.com). Written by William Storey. -This software is Copyright (c) 2018-2019 by MaxMind, Inc. +This software is Copyright (c) 2018-2020 by MaxMind, Inc. This is free software, licensed under the Apache License, Version 2.0 or the MIT License, at your option. diff --git a/go.mod b/go.mod index 288adf08..9dfd5a1c 100644 --- a/go.mod +++ b/go.mod @@ -1,4 +1,4 @@ -module github.com/maxmind/geoipupdate +module github.com/maxmind/geoipupdate/v4 go 1.13 diff --git a/go.sum b/go.sum index 7599a7f2..6e191c20 100644 --- a/go.sum +++ b/go.sum @@ -8,6 +8,7 @@ github.com/kr/pretty v0.2.0/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfn github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= github.com/kr/text v0.1.0 h1:45sCR5RtlFHMR4UwH9sdQ5TC8v0qDQCHnXt+kaKSTVE= github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= +github.com/maxmind/geoipupdate v4.0.2+incompatible h1:G1tXaGXl3kfFUYE9/pyico4J6OKWFL79i0XVUdbMebk= github.com/pkg/errors v0.9.0 h1:J8lpUdobwIeCI7OiSxHqEwJUKvJwicL5+3v1oe2Yb4k= github.com/pkg/errors v0.9.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= diff --git a/pkg/geoipupdate/database/http_reader.go b/pkg/geoipupdate/database/http_reader.go index 503e22bb..b2b1428c 100644 --- a/pkg/geoipupdate/database/http_reader.go +++ b/pkg/geoipupdate/database/http_reader.go @@ -10,7 +10,7 @@ import ( "net/url" "time" - "github.com/maxmind/geoipupdate/pkg/geoipupdate" + "github.com/maxmind/geoipupdate/v4/pkg/geoipupdate" "github.com/pkg/errors" ) diff --git a/pkg/geoipupdate/database/http_reader_test.go b/pkg/geoipupdate/database/http_reader_test.go index c65b09eb..c8dba12a 100644 --- a/pkg/geoipupdate/database/http_reader_test.go +++ b/pkg/geoipupdate/database/http_reader_test.go @@ -15,7 +15,7 @@ import ( "testing" "time" - "github.com/maxmind/geoipupdate/pkg/geoipupdate" + "github.com/maxmind/geoipupdate/v4/pkg/geoipupdate" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" )