Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package geoipupdate for openSUSE:Factory 
checked in at 2023-03-21 17:43:45
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/geoipupdate (Old)
 and      /work/SRC/openSUSE:Factory/.geoipupdate.new.31432 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "geoipupdate"

Tue Mar 21 17:43:45 2023 rev:21 rq:1073473 version:4.11.1

Changes:
--------
--- /work/SRC/openSUSE:Factory/geoipupdate/geoipupdate.changes  2022-11-09 
12:58:34.212731759 +0100
+++ /work/SRC/openSUSE:Factory/.geoipupdate.new.31432/geoipupdate.changes       
2023-03-21 17:44:30.154683876 +0100
@@ -1,0 +2,11 @@
+Tue Mar 21 07:56:45 UTC 2023 - Paolo Stivanin <i...@paolostivanin.com>
+
+- Update to 4.11.1:
+  * github.com/pkg/errors is no longer used to wrap errors.
+  * Docker secrets are now supported for the MaxMind account ID and license 
key. 
+  * The Dockerfile now has a Healthcheck that makes sure the modification date 
of
+    the database directory is within the update period.
+  * Removed extra underscore in script variables preventing the Docker secret
+    support added in 4.11.0 from working as expected.
+
+-------------------------------------------------------------------

Old:
----
  geoipupdate-4.10.0.tar.gz

New:
----
  geoipupdate-4.11.1.tar.gz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ geoipupdate.spec ++++++
--- /var/tmp/diff_new_pack.CxqF1X/_old  2023-03-21 17:44:31.034688085 +0100
+++ /var/tmp/diff_new_pack.CxqF1X/_new  2023-03-21 17:44:31.050688162 +0100
@@ -1,7 +1,7 @@
 #
 # spec file for package geoipupdate
 #
-# Copyright (c) 2022 SUSE LLC
+# Copyright (c) 2023 SUSE LLC
 #
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed
@@ -18,7 +18,7 @@
 
 # Common info
 Name:           geoipupdate
-Version:        4.10.0
+Version:        4.11.1
 Release:        0
 Summary:        GeoIP update client code
 License:        Apache-2.0 OR MIT
@@ -55,6 +55,7 @@
 
 
 
+
 
 # Preparation step (unpackung and patching if necessary)
 

++++++ _service ++++++
--- /var/tmp/diff_new_pack.CxqF1X/_old  2023-03-21 17:44:31.102688411 +0100
+++ /var/tmp/diff_new_pack.CxqF1X/_new  2023-03-21 17:44:31.106688430 +0100
@@ -2,7 +2,7 @@
     <service name="tar_scm" mode="disabled">
         <param name="scm">git</param>
         <param name="url">https://github.com/maxmind/geoipupdate</param>
-        <param name="revision">v4.10.0</param>
+        <param name="revision">v4.11.1</param>
         <param name="exclude">.git</param>
         <param name="versionformat">@PARENT_TAG@</param>
         <param name="changesgenerate">enable</param>

++++++ _servicedata ++++++
--- /var/tmp/diff_new_pack.CxqF1X/_old  2023-03-21 17:44:31.130688545 +0100
+++ /var/tmp/diff_new_pack.CxqF1X/_new  2023-03-21 17:44:31.134688564 +0100
@@ -1,7 +1,7 @@
 <servicedata>
     <service name="tar_scm">
         <param name="url">https://github.com/maxmind/geoipupdate</param>
-        <param 
name="changesrevision">03df2c14edddf7bb33b16443b3d66c86161c6ac6</param>
+        <param 
name="changesrevision">f3dc698e8f17f48bdd77060fa35939297945613f</param>
     </service>
 </servicedata>
 

++++++ geoipupdate-4.10.0.tar.gz -> geoipupdate-4.11.1.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/geoipupdate-4.10.0/.github/workflows/go.yml 
new/geoipupdate-4.11.1/.github/workflows/go.yml
--- old/geoipupdate-4.10.0/.github/workflows/go.yml     2022-09-26 
20:12:11.000000000 +0200
+++ new/geoipupdate-4.11.1/.github/workflows/go.yml     2023-03-16 
16:15:11.000000000 +0100
@@ -18,7 +18,7 @@
     name: "Build ${{ matrix.go-version }} test on ${{ matrix.platform }}"
     steps:
       - name: Set up Go 1.x
-        uses: actions/setup-go@v3
+        uses: actions/setup-go@v4
         with:
           go-version: ${{ matrix.go-version }}
         id: go
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/geoipupdate-4.10.0/.golangci.toml 
new/geoipupdate-4.11.1/.golangci.toml
--- old/geoipupdate-4.10.0/.golangci.toml       2022-09-26 20:12:11.000000000 
+0200
+++ new/geoipupdate-4.11.1/.golangci.toml       2023-03-16 16:15:11.000000000 
+0100
@@ -1,26 +1,36 @@
 [run]
   deadline = "10m"
-
   tests = true
 
 [linters]
   disable-all = true
   enable = [
+    "asasalint",
     "asciicheck",
     "bidichk",
     "bodyclose",
     "containedctx",
-    "contextcheck",
+    # Although this is useful, it complains about quite a few reasonable 
things,
+    # e.g., using the request context. We should reevaluate in the future.
+    # "contextcheck",
     "depguard",
+    # This is probably worthwhile, but there are a number of false positives
+    # that would need to be addressed.
+    # "dupword",
     "durationcheck",
     "errcheck",
     "errchkjson",
     "errname",
     "errorlint",
+    # This doesn't seem to know about CTEs or DELETEs with RETURNING
+    # "execinquery",
     "exhaustive",
+    # We often don't initialize all of the struct fields. This is fine
+    # generally
+    # "exhaustruct",
     "exportloopref",
     "forbidigo",
-    # We tried this liner but most places we do forced type asserts are
+    # We tried this linter but most places we do forced type asserts are
     # pretty safe, e.g., an atomic.Value when everything is encapsulated
     # in a small package.
     # "forcetypeassert",
@@ -46,10 +56,16 @@
     "nilerr",
     "noctx",
     "nolintlint",
+    # We occasionally use named returns for documentation, which is helpful.
+    # Named returns are only really a problem when used in conjunction with
+    # a bare return statement. I _think_ Revive's bare-return covers that
+    # case.
+    # "nonamedreturns",
     "nosprintfhostport",
     "predeclared",
     "revive",
-    "rowserrcheck",
+    # XXX - disabled due to lack of 1.18 support.
+    # "rowserrcheck",
     # https://github.com/golangci/golangci-lint/issues/287
     # "safesql",
     "sqlclosecheck",
@@ -61,22 +77,31 @@
     "unconvert",
     "unparam",
     "unused",
+    "usestdlibvars",
     "vetshadow",
-    "wastedassign",
+    # XXX - disabled due to lack of 1.18 support.
+    # "wastedassign",
     "wrapcheck",
   ]
 
-# Please note that we only use depguard for stdlib as gomodguard only
-# supports modules currently. See 
https://github.com/ryancurrah/gomodguard/issues/12
-[linters-settings.depguard]
-  list-type = "blacklist"
-  include-go-root = true
-  packages = [
-    # We should use github.com/pkg/errors instead
-    "errors",
-  ]
-
 [linters-settings.errcheck]
+    # Don't allow setting of error to the blank identifier. If there is a 
legitimate
+    # reason, there should be a nolint with an explanation.
+    check-blank = true
+
+    exclude-functions = [
+        # If we are rolling back a transaction, we are often already in an 
error
+        # state.
+        '(*database/sql.Tx).Rollback',
+
+        # It is reasonable to ignore errors if Cleanup fails in most cases.
+        '(*github.com/google/renameio/v2.PendingFile).Cleanup',
+
+        # We often don't care if removing a file failed (e.g., it doesn't 
exist)
+        'os.Remove',
+        'os.RemoveAll',
+    ]
+
     # Ignoring Close so that we don't have to have a bunch of
     # `defer func() { _ = r.Close() }()` constructs when we
     # don't actually care about the error.
@@ -90,6 +115,20 @@
 [linters-settings.exhaustive]
     default-signifies-exhaustive = true
 
+[linters-settings.forbidigo]
+    # Forbid the following identifiers
+    forbid = [
+        "^minFraud*",
+        "^maxMind*",
+        "^hubSpot*",
+
+        # use netip.ParsePrefix unless you really need a *net.IPNet
+        "^net.ParseCIDR",
+
+        # use netip.ParseAddr unless you really need a net.IP
+        "^net.ParseIP",
+    ]
+
 [linters-settings.gocritic]
     enabled-checks = [
         "appendAssign",
@@ -137,10 +176,17 @@
         "flagDeref",
         "flagName",
         "hexLiteral",
+        # This seems like it could be good, but we would need to update current
+        # uses. It supports "--fix", but the fixing is a bit broken.
+        # "httpNoBody",
+        # This might be good, but we would have to revist a lot of code.
+        # "hugeParam",
         "ifElseChain",
         "importShadow",
         "indexAlloc",
         "initClause",
+        # We still support ancient Go versions for our Ubuntu packages.
+        # "ioutilDeprecated",
         "mapKey",
         "methodExprCall",
         "nestingReduce",
@@ -163,19 +209,19 @@
         # This might be good, but I don't think we want to encourage
         # significant changes to regexes as we port stuff from Perl.
         # "regexpSimplify",
-        "ruleguard",
+        "returnAfterHttpError",
         "singleCaseSwitch",
         "sliceClear",
         "sloppyLen",
         # This seems like it might also be good, but a lot of existing code
         # fails.
         # "sloppyReassign",
-        "returnAfterHttpError",
         "sloppyTypeAssert",
         "sortSlice",
         "sprintfQuotedString",
         "sqlQuery",
         "stringsCompare",
+        "stringConcatSimplify",
         "stringXbytes",
         "switchTrue",
         "syncMapLoadAndDelete",
@@ -198,17 +244,15 @@
         "unslice",
         "valSwap",
         "weakCond",
+        # Covered by nolintlint
+        # "whyNoLint"
         "wrapperFunc",
         "yodaStyleExpr",
-        # This requires explanations for "nolint" directives. This would be
-        # nice for gosec ones, but I am not sure we want it generally unless
-        # we can get the false positive rate lower.
-        # "whyNoLint"
     ]
 
 [linters-settings.gofumpt]
     extra-rules = true
-    lang-version = "1.17"
+    lang-version = "1.18"
 
 [linters-settings.gomodguard]
   [[linters-settings.gomodguard.blocked.modules]]
@@ -243,6 +287,10 @@
   [linters-settings.gomodguard.blocked.modules."github.com/pariz/gountries"]
     reason = "This library's data is not actively maintained. Use GeoInfo 
data."
 
+  [linters-settings.gomodguard.blocked.modules."github.com/pkg/errors"]
+    recommendations = ["github.maxmind.com/maxmind/mm_website/go/pkg/mmerrors"]
+    reason = "pkg/errors is no longer maintained."
+
   [[linters-settings.gomodguard.blocked.modules]]
   [linters-settings.gomodguard.blocked.modules."github.com/RackSec/srslog"]
     recommendations = ["github.com/RackSec/srslog"]
@@ -258,10 +306,38 @@
     recommendations = ["encoding/json", "github.com/mailru/easyjson"]
     reason = "This library is poorly maintained. We should default to using 
encoding/json and use easyjson where performance really matters."
 
+  [[linters-settings.gomodguard.blocked.modules]]
+  [linters-settings.gomodguard.blocked.modules."io/ioutil"]
+
+  [[linters-settings.gomodguard.blocked.versions]]
+  [linters-settings.gomodguard.blocked.versions."github.com/jackc/pgconn"]
+    reason = "Use github.com/jackc/pgx/v5"
+
+  [[linters-settings.gomodguard.blocked.versions]]
+  [linters-settings.gomodguard.blocked.versions."github.com/jackc/pgtype"]
+    reason = "Use github.com/jackc/pgx/v5"
+
   [[linters-settings.gomodguard.blocked.versions]]
   [linters-settings.gomodguard.blocked.versions."github.com/jackc/pgx"]
-    version = "< 4.0.0"
-    reason = "Use github.com/jackc/pgx/v4"
+    version = "< 5.0.0"
+    reason = "Use github.com/jackc/pgx/v5"
+
+  [[linters-settings.gomodguard.blocked.modules]]
+  [linters-settings.gomodguard.blocked.modules."inet.af/netaddr"]
+    recommendations = ["go4.org/netipx"]
+    reason = "inet.af/netaddr has been deprecated."
+
+[linters-settings.gosec]
+    excludes = [
+        # G104 - "Audit errors not checked." We use errcheck for this.
+        "G104",
+
+        # G306 - "Expect WriteFile permissions to be 0600 or less".
+        "G306",
+
+        # Prohibits defer (*os.File).Close, which we allow when reading from 
file.
+        "G307",
+    ]
 
 [linters-settings.govet]
     "enable-all" = true
@@ -307,6 +383,13 @@
     # [[linters-settings.revive.rules]]
     # name = "cognitive-complexity"
 
+    # This interacts poorly with gofumpt, which seems to convert
+    # "//   " to "//<tab>". That is probably a bug in gofumpt, but there
+    # isn't much we can do about it right now.
+    # [[linters-settings.revive.rules]]
+    # name = "comment-spacings"
+    # arguments = ["easyjson", "nolint"]
+
     # Probably a good rule, but we have a lot of names that
     # only have case differences.
     # [[linters-settings.revive.rules]]
@@ -328,6 +411,9 @@
     # name = "cyclomatic"
 
     [[linters-settings.revive.rules]]
+    name = "datarace"
+
+    [[linters-settings.revive.rules]]
     name = "deep-exit"
 
     [[linters-settings.revive.rules]]
@@ -442,6 +528,9 @@
     name = "superfluous-else"
 
     [[linters-settings.revive.rules]]
+    name = "time-equal"
+
+    [[linters-settings.revive.rules]]
     name = "time-naming"
 
     [[linters-settings.revive.rules]]
@@ -473,6 +562,9 @@
     # name = "unused-receiver"
 
     [[linters-settings.revive.rules]]
+    name = "use-any"
+
+    [[linters-settings.revive.rules]]
     name = "useless-break"
 
     [[linters-settings.revive.rules]]
@@ -487,21 +579,6 @@
 [linters-settings.unparam]
     check-exported = true
 
-[linters-settings.wrapcheck]
-    "ignoreSigs" = [
-        ".Errorf(",
-        "errgroup.NewMultiError(",
-        "errors.New(",
-        ".Wait(",
-        ".WithMessage(",
-        ".WithMessagef(",
-        ".WithStack(",
-        ".Wrap(",
-        ".Wrapf(",
-        "v4.Retry(",
-        "v4.RetryNotify(",
-    ]
-
 [issues]
 exclude-use-default = false
 
@@ -512,27 +589,11 @@
 
   [[issues.exclude-rules]]
   linters = [
-    "gocritic"
+    "bodyclose"
   ]
-  # For some reason the imports stuff in ruleguard doesn't work in 
golangci-lint.
-  # Perhaps it has an outdated version or something
+  # This rule doesn't really make sense for tests where we don't have an open
+  # connection and we might be passing around the response for other reasons.
   path = "_test.go"
-  text = "ruleguard: Prefer the alternative Context method instead"
-
-  [[issues.exclude-rules]]
-  linters = [
-    "gocritic"
-  ]
-  ## The nolintlint linter behaves oddly with ruleguard rules
-  source = "// *no-ruleguard"
-
-
-  [[issues.exclude-rules]]
-  linters = [
-    "gosec"
-  ]
-  # G306 - "Expect WriteFile permissions to be 0600 or less".
-  text = "G306"
 
   [[issues.exclude-rules]]
   linters = [
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/geoipupdate-4.10.0/.goreleaser.yml 
new/geoipupdate-4.11.1/.goreleaser.yml
--- old/geoipupdate-4.10.0/.goreleaser.yml      2022-09-26 20:12:11.000000000 
+0200
+++ new/geoipupdate-4.11.1/.goreleaser.yml      2023-03-16 16:15:11.000000000 
+0100
@@ -87,6 +87,7 @@
       - 'geoipupdate-unix'
     image_templates:
       - "maxmindinc/geoipupdate:{{ .Tag }}-amd64"
+      - "ghcr.io/maxmind/geoipupdate:{{ .Tag }}-amd64"
     dockerfile: docker/Dockerfile
     use: buildx
     goarch: amd64
@@ -96,6 +97,7 @@
       - "--platform=linux/amd64"
   - image_templates:
       - "maxmindinc/geoipupdate:{{ .Tag }}-arm64"
+      - "ghcr.io/maxmind/geoipupdate:{{ .Tag }}-arm64"
     dockerfile: docker/Dockerfile
     use: buildx
     goarch: arm64
@@ -105,6 +107,7 @@
       - "--platform=linux/arm64"
   - image_templates:
       - "maxmindinc/geoipupdate:{{ .Tag }}-arm-v6"
+      - "ghcr.io/maxmind/geoipupdate:{{ .Tag }}-arm-v6"
     dockerfile: docker/Dockerfile
     use: buildx
     goarch: arm
@@ -134,6 +137,26 @@
       - "maxmindinc/geoipupdate:{{ .Tag }}-amd64"
       - "maxmindinc/geoipupdate:{{ .Tag }}-arm64"
       - "maxmindinc/geoipupdate:{{ .Tag }}-arm-v6"
+  - name_template: "ghcr.io/maxmind/geoipupdate:{{ .Tag }}"
+    image_templates:
+      - "ghcr.io/maxmind/geoipupdate:{{ .Tag }}-amd64"
+      - "ghcr.io/maxmind/geoipupdate:{{ .Tag }}-arm64"
+      - "ghcr.io/maxmind/geoipupdate:{{ .Tag }}-arm-v6"
+  - name_template: "ghcr.io/maxmind/geoipupdate:v{{ .Major }}"
+    image_templates:
+      - "ghcr.io/maxmind/geoipupdate:{{ .Tag }}-amd64"
+      - "ghcr.io/maxmind/geoipupdate:{{ .Tag }}-arm64"
+      - "ghcr.io/maxmind/geoipupdate:{{ .Tag }}-arm-v6"
+  - name_template: "ghcr.io/maxmind/geoipupdate:v{{ .Major }}.{{ .Minor }}"
+    image_templates:
+      - "ghcr.io/maxmind/geoipupdate:{{ .Tag }}-amd64"
+      - "ghcr.io/maxmind/geoipupdate:{{ .Tag }}-arm64"
+      - "ghcr.io/maxmind/geoipupdate:{{ .Tag }}-arm-v6"
+  - name_template: "ghcr.io/maxmind/geoipupdate:latest"
+    image_templates:
+      - "ghcr.io/maxmind/geoipupdate:{{ .Tag }}-amd64"
+      - "ghcr.io/maxmind/geoipupdate:{{ .Tag }}-arm64"
+      - "ghcr.io/maxmind/geoipupdate:{{ .Tag }}-arm-v6"
 nfpms:
   - builds:
       - 'geoipupdate-packages'
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/geoipupdate-4.10.0/CHANGELOG.md 
new/geoipupdate-4.11.1/CHANGELOG.md
--- old/geoipupdate-4.10.0/CHANGELOG.md 2022-09-26 20:12:11.000000000 +0200
+++ new/geoipupdate-4.11.1/CHANGELOG.md 2023-03-16 16:15:11.000000000 +0100
@@ -1,6 +1,16 @@
 # CHANGELOG
 
-## 4.10.0
+## 4.11.0 (2023-03-15)
+
+* `github.com/pkg/errors` is no longer used to wrap errors.
+* Docker secrets are now supported for the MaxMind account ID and
+  license key. Pull request by Matthew Kobayashi. GitHub #197.
+* The Dockerfile now has a Healthcheck that makes sure the modification date
+  of the database directory is within the update period.
+* The Docker images are now published to the GitHub Container Registry,
+  `ghcr.io`. We will likely stop publishing to Docker Hub in the near future.
+
+## 4.10.0 (2022-09-26)
 
 * HTTPS proxies are now supported. Pull request by Jamie Thompson. GitHub
   #172.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/geoipupdate-4.10.0/README.md 
new/geoipupdate-4.11.1/README.md
--- old/geoipupdate-4.10.0/README.md    2022-09-26 20:12:11.000000000 +0200
+++ new/geoipupdate-4.11.1/README.md    2023-03-16 16:15:11.000000000 +0100
@@ -137,7 +137,7 @@
 
 # Copyright and License
 
-This software is Copyright (c) 2018 - 2022 by MaxMind, Inc.
+This software is Copyright (c) 2018 - 2023 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 -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/geoipupdate-4.10.0/cmd/geoipupdate/main.go 
new/geoipupdate-4.11.1/cmd/geoipupdate/main.go
--- old/geoipupdate-4.10.0/cmd/geoipupdate/main.go      2022-09-26 
20:12:11.000000000 +0200
+++ new/geoipupdate-4.11.1/cmd/geoipupdate/main.go      2023-03-16 
16:15:11.000000000 +0100
@@ -10,7 +10,6 @@
 
        "github.com/maxmind/geoipupdate/v4/pkg/geoipupdate"
        "github.com/maxmind/geoipupdate/v4/pkg/geoipupdate/database"
-       "github.com/pkg/errors"
 )
 
 var (
@@ -64,15 +63,15 @@
        for _, editionID := range config.EditionIDs {
                filename, err := geoipupdate.GetFilename(config, editionID, 
client)
                if err != nil {
-                       return errors.Wrapf(err, "error retrieving filename for 
%s", editionID)
+                       return fmt.Errorf("error retrieving filename for %s: 
%w", editionID, err)
                }
                filePath := filepath.Join(config.DatabaseDirectory, filename)
                dbWriter, err := database.NewLocalFileDatabaseWriter(filePath, 
config.LockFile, config.Verbose)
                if err != nil {
-                       return errors.Wrapf(err, "error creating database 
writer for %s", editionID)
+                       return fmt.Errorf("error creating database writer for 
%s: %w", editionID, err)
                }
                if err := dbReader.Get(dbWriter, editionID); err != nil {
-                       return errors.WithMessagef(err, "error while getting 
database for %s", editionID)
+                       return fmt.Errorf("error while getting database for %s: 
%w", editionID, err)
                }
        }
        return nil
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/geoipupdate-4.10.0/doc/docker.md 
new/geoipupdate-4.11.1/doc/docker.md
--- old/geoipupdate-4.10.0/doc/docker.md        2022-09-26 20:12:11.000000000 
+0200
+++ new/geoipupdate-4.11.1/doc/docker.md        2023-03-16 16:15:11.000000000 
+0100
@@ -2,7 +2,7 @@
 
 ## Image information
 
-The image is available on [Docker 
Hub](https://hub.docker.com/r/maxmindinc/geoipupdate).
+The image is available on 
[ghcr.io](https://github.com/maxmind/geoipupdate/pkgs/container/geoipupdate).
 The source code is available on 
[GitHub](https://github.com/maxmind/geoipupdate).
 
 ## Configuring
@@ -18,6 +18,8 @@
 
 The following are optional:
 
+* `GEOIPUPDATE_ACCOUNT_ID_FILE` - The path to a file containing your MaxMind 
account ID. This is intended to be used with Docker secrets (example below).
+* `GEOIPUPDATE_LICENSE_KEY_FILE` - The path to a file containing your 
case-sensitive MaxMind license key. This is intended to be used with Docker 
secrets (example below).
 * `GEOIPUPDATE_FREQUENCY` - The number of hours between `geoipupdate` runs.
   If this is not set or is set to `0`, `geoipupdate` will run once and exit.
 * `GEOIPUPDATE_HOST` - The host name of the server to use. The default is
@@ -48,7 +50,7 @@
 Run the latest image with:
 
 ```sh
-docker run --env-file <file> -v <database directory>:/usr/share/GeoIP 
maxmindinc/geoipupdate
+docker run --env-file <file> -v <database directory>:/usr/share/GeoIP 
ghcr.io/maxmind/geoipupdate
 ```
 
 `<file>` should be the environment variable file with your configuration.
@@ -64,7 +66,7 @@
 services:
   geoipupdate:
     container_name: geoipupdate
-    image: maxmindinc/geoipupdate
+    image: ghcr.io/maxmind/geoipupdate
     restart: unless-stopped
     environment:
       - GEOIPUPDATE_ACCOUNT_ID=XXXXXX
@@ -84,6 +86,42 @@
     driver: local
 ```
 
+You may also pass your MaxMind account ID and license key as secrets, for 
example:
+
+```yaml
+version: '3'
+services:
+  geoipupdate:
+    container_name: geoipupdate
+    image: ghcr.io/maxmind/geoipupdate
+    restart: unless-stopped
+    environment:
+      - 'GEOIPUPDATE_ACCOUNT_ID_FILE=/run/secrets/GEOIPUPDATE_ACCOUNT_ID'
+      - 'GEOIPUPDATE_LICENSE_KEY_FILE=/run/secrets/GEOIPUPDATE_LICENSE_KEY'
+      - 'GEOIPUPDATE_EDITION_IDS=GeoLite2-ASN GeoLite2-City GeoLite2-Country'
+      - GEOIPUPDATE_FREQUENCY=72
+    networks:
+      - geoipupdate
+    volumes:
+      - 'geoipupdate_data:/usr/share/GeoIP'
+    secrets:
+      - GEOIPUPDATE_ACCOUNT_ID
+      - GEOIPUPDATE_LICENSE_KEY
+
+networks:
+  geoipupdate:
+
+volumes:
+  geoipupdate_data:
+    driver: local
+
+secrets:
+  GEOIPUPDATE_ACCOUNT_ID:
+    file: ./secrets/GEOIPUPDATE_ACCOUNT_ID.txt
+  GEOIPUPDATE_LICENSE_KEY:
+    file: ./secrets/GEOIPUPDATE_LICENSE_KEY.txt
+```
+
 Note - When using docker-compose, you need to either:
 
 * set `GEOIPUPDATE_FREQUENCY` equal to something greater than 0 or
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/geoipupdate-4.10.0/doc/geoipupdate.md 
new/geoipupdate-4.11.1/doc/geoipupdate.md
--- old/geoipupdate-4.10.0/doc/geoipupdate.md   2022-09-26 20:12:11.000000000 
+0200
+++ new/geoipupdate-4.11.1/doc/geoipupdate.md   2023-03-16 16:15:11.000000000 
+0100
@@ -76,7 +76,7 @@
 
 Written by William Storey.
 
-This software is Copyright (c) 2018-2022 by MaxMind, Inc.
+This software is Copyright (c) 2018-2023 by MaxMind, Inc.
 
 This is free software, licensed under the Apache License, Version 2.0 or
 the MIT License, at your option.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/geoipupdate-4.10.0/docker/Dockerfile 
new/geoipupdate-4.11.1/docker/Dockerfile
--- old/geoipupdate-4.10.0/docker/Dockerfile    2022-09-26 20:12:11.000000000 
+0200
+++ new/geoipupdate-4.11.1/docker/Dockerfile    2023-03-16 16:15:11.000000000 
+0100
@@ -5,4 +5,12 @@
 
 ENTRYPOINT ["/usr/bin/entry.sh"]
 
+# The health check is done by checking if the database directory is modified 
within the
+# update period minus 1 minute. The 1 minute is a threshold for allowing 
slower starts.
+# Without the LockFile in the database directory, this check is not going to 
be working
+# since database files are not going to be modified when there are no updates.
+HEALTHCHECK --interval=10s --timeout=10s \
+    CMD test $(stat -c %Y /usr/share/GeoIP) -gt $(($(date +%s) - 
$GEOIPUPDATE_FREQUENCY * 60 * 61 )) \
+    || exit 1;
+
 VOLUME [ "/usr/share/GeoIP" ]
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/geoipupdate-4.10.0/docker/entry.sh 
new/geoipupdate-4.11.1/docker/entry.sh
--- old/geoipupdate-4.10.0/docker/entry.sh      2022-09-26 20:12:11.000000000 
+0200
+++ new/geoipupdate-4.11.1/docker/entry.sh      2023-03-16 16:15:11.000000000 
+0100
@@ -27,6 +27,14 @@
   database_dir=$GEOIPUPDATE_DB_DIR
 fi
 
+if [ ! -z "$GEOIPUPDATE_ACCOUNT_ID_FILE" ]; then
+  GEOIPUPDATE_ACCOUNT_ID=$( cat "$GEOIPUPDATE_ACCOUNT_ID_FILE" )
+fi
+
+if [ ! -z "$GEOIPUPDATE_LICENSE_KEY_FILE" ]; then
+  GEOIPUPDATE_LICENSE_KEY=$( cat "$GEOIPUPDATE_LICENSE_KEY_FILE" )
+fi
+
 if [ -z "$GEOIPUPDATE_ACCOUNT_ID" ] || [ -z  "$GEOIPUPDATE_LICENSE_KEY" ] || [ 
-z "$GEOIPUPDATE_EDITION_IDS" ]; then
     echo "ERROR: You must set the environment variables 
GEOIPUPDATE_ACCOUNT_ID, GEOIPUPDATE_LICENSE_KEY, and GEOIPUPDATE_EDITION_IDS!"
     exit 1
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/geoipupdate-4.10.0/go.mod 
new/geoipupdate-4.11.1/go.mod
--- old/geoipupdate-4.10.0/go.mod       2022-09-26 20:12:11.000000000 +0200
+++ new/geoipupdate-4.11.1/go.mod       2023-03-16 16:15:11.000000000 +0100
@@ -6,9 +6,8 @@
        github.com/gofrs/flock v0.8.1
        github.com/kr/text v0.2.0 // indirect
        github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e // 
indirect
-       github.com/pkg/errors v0.9.1
        github.com/spf13/pflag v1.0.5
-       github.com/stretchr/testify v1.8.0
-       golang.org/x/sys v0.0.0-20220128215802-99c3d69c2c27 // indirect
+       github.com/stretchr/testify v1.8.2
+       golang.org/x/sys v0.0.0-20220926163933-8cfa568d3c25 // indirect
        gopkg.in/check.v1 v1.0.0-20200902074654-038fdea0a05b // indirect
 )
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/geoipupdate-4.10.0/go.sum 
new/geoipupdate-4.11.1/go.sum
--- old/geoipupdate-4.10.0/go.sum       2022-09-26 20:12:11.000000000 +0200
+++ new/geoipupdate-4.11.1/go.sum       2023-03-16 16:15:11.000000000 +0100
@@ -10,19 +10,19 @@
 github.com/kr/text v0.2.0/go.mod 
h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE=
 github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e 
h1:fD57ERR4JtEqsWbfPhv4DMiApHyliiK5xCTNVSPiaAs=
 github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e/go.mod 
h1:zD1mROLANZcx1PVRCS0qkT7pwLkGfwJo4zjcN/Tysno=
-github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4=
-github.com/pkg/errors v0.9.1/go.mod 
h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
 github.com/pmezard/go-difflib v1.0.0 
h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
 github.com/pmezard/go-difflib v1.0.0/go.mod 
h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
 github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA=
 github.com/spf13/pflag v1.0.5/go.mod 
h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg=
 github.com/stretchr/objx v0.1.0/go.mod 
h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
 github.com/stretchr/objx v0.4.0/go.mod 
h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw=
+github.com/stretchr/objx v0.5.0/go.mod 
h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo=
 github.com/stretchr/testify v1.7.1/go.mod 
h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
-github.com/stretchr/testify v1.8.0 
h1:pSgiaMZlXftHpm5L7V1+rVB+AZJydKsMxsQBIJw4PKk=
 github.com/stretchr/testify v1.8.0/go.mod 
h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU=
-golang.org/x/sys v0.0.0-20220128215802-99c3d69c2c27 
h1:XDXtA5hveEEV8JB2l7nhMTp3t3cHp9ZpwcdjqyEWLlo=
-golang.org/x/sys v0.0.0-20220128215802-99c3d69c2c27/go.mod 
h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
+github.com/stretchr/testify v1.8.2 
h1:+h33VjcLVPDHtOdpUCuF+7gSuG3yGIftsP1YvFihtJ8=
+github.com/stretchr/testify v1.8.2/go.mod 
h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4=
+golang.org/x/sys v0.0.0-20220926163933-8cfa568d3c25 
h1:nwzwVf0l2Y/lkov/+IYgMMbFyI+QypZDds9RxlSmsFQ=
+golang.org/x/sys v0.0.0-20220926163933-8cfa568d3c25/go.mod 
h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
 gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod 
h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
 gopkg.in/check.v1 v1.0.0-20200902074654-038fdea0a05b 
h1:QRR6H1YWRnHb4Y/HeNFCTJLFVxaq6wH4YuVdsUOr75U=
 gopkg.in/check.v1 v1.0.0-20200902074654-038fdea0a05b/go.mod 
h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/geoipupdate-4.10.0/pkg/geoipupdate/config.go 
new/geoipupdate-4.11.1/pkg/geoipupdate/config.go
--- old/geoipupdate-4.10.0/pkg/geoipupdate/config.go    2022-09-26 
20:12:11.000000000 +0200
+++ new/geoipupdate-4.11.1/pkg/geoipupdate/config.go    2023-03-16 
16:15:11.000000000 +0100
@@ -2,6 +2,8 @@
 
 import (
        "bufio"
+       "errors"
+       "fmt"
        "net/url"
        "os"
        "path/filepath"
@@ -9,8 +11,6 @@
        "strconv"
        "strings"
        "time"
-
-       "github.com/pkg/errors"
 )
 
 // Config is a parsed configuration file.
@@ -36,10 +36,9 @@
 ) (*Config, error) {
        fh, err := os.Open(filepath.Clean(file))
        if err != nil {
-               return nil, errors.Wrap(err, "error opening file")
+               return nil, fmt.Errorf("error opening file: %w", err)
        }
 
-       //nolint: gosec // We don't particularly care if the close fails
        defer fh.Close()
 
        config := &Config{}
@@ -56,13 +55,13 @@
 
                fields := strings.Fields(line)
                if len(fields) < 2 {
-                       return nil, errors.Errorf("invalid format on line %d", 
lineNumber)
+                       return nil, fmt.Errorf("invalid format on line %d", 
lineNumber)
                }
                key := fields[0]
                value := strings.Join(fields[1:], " ")
 
                if _, ok := keysSeen[key]; ok {
-                       return nil, errors.Errorf("`%s' is in the config 
multiple times", key)
+                       return nil, fmt.Errorf("`%s' is in the config multiple 
times", key)
                }
                keysSeen[key] = struct{}{}
 
@@ -70,7 +69,7 @@
                case "AccountID", "UserId":
                        accountID, err := strconv.Atoi(value)
                        if err != nil {
-                               return nil, errors.Wrap(err, "invalid account 
ID format")
+                               return nil, fmt.Errorf("invalid account ID 
format: %w", err)
                        }
                        config.AccountID = accountID
                        keysSeen["AccountID"] = struct{}{}
@@ -103,28 +102,28 @@
                case "RetryFor":
                        dur, err := time.ParseDuration(value)
                        if err != nil || dur < 0 {
-                               return nil, errors.Errorf("'%s' is not a valid 
duration", value)
+                               return nil, fmt.Errorf("'%s' is not a valid 
duration", value)
                        }
                        config.RetryFor = dur
                default:
-                       return nil, errors.Errorf("unknown option on line %d", 
lineNumber)
+                       return nil, fmt.Errorf("unknown option on line %d", 
lineNumber)
                }
        }
 
        if err := scanner.Err(); err != nil {
-               return nil, errors.Wrap(err, "error reading file")
+               return nil, fmt.Errorf("error reading file: %w", err)
        }
 
        if _, ok := keysSeen["EditionIDs"]; !ok {
-               return nil, errors.Errorf("the `EditionIDs` option is required")
+               return nil, fmt.Errorf("the `EditionIDs` option is required")
        }
 
        if _, ok := keysSeen["AccountID"]; !ok {
-               return nil, errors.Errorf("the `AccountID` option is required")
+               return nil, fmt.Errorf("the `AccountID` option is required")
        }
 
        if _, ok := keysSeen["LicenseKey"]; !ok {
-               return nil, errors.Errorf("the `LicenseKey` option is required")
+               return nil, fmt.Errorf("the `LicenseKey` option is required")
        }
 
        // Set defaults & post-process.
@@ -189,14 +188,14 @@
                scheme := strings.ToLower(matches[1])
                // The http package only supports http, https, and socks5.
                if scheme != "http" && scheme != "https" && scheme != "socks5" {
-                       return nil, errors.Errorf("unsupported proxy type: %s", 
scheme)
+                       return nil, fmt.Errorf("unsupported proxy type: %s", 
scheme)
                }
        }
 
        // Now that we have a scheme, we should be able to parse.
        u, err := url.Parse(proxyURL)
        if err != nil {
-               return nil, errors.Wrap(err, "error parsing proxy URL")
+               return nil, fmt.Errorf("error parsing proxy URL: %w", err)
        }
 
        if !strings.Contains(u.Host, ":") {
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/geoipupdate-4.10.0/pkg/geoipupdate/database/http_reader.go 
new/geoipupdate-4.11.1/pkg/geoipupdate/database/http_reader.go
--- old/geoipupdate-4.10.0/pkg/geoipupdate/database/http_reader.go      
2022-09-26 20:12:11.000000000 +0200
+++ new/geoipupdate-4.11.1/pkg/geoipupdate/database/http_reader.go      
2023-03-16 16:15:11.000000000 +0100
@@ -4,6 +4,7 @@
 
 import (
        "compress/gzip"
+       "errors"
        "fmt"
        "io"
        "io/ioutil"
@@ -15,7 +16,6 @@
 
        "github.com/maxmind/geoipupdate/v4/pkg/geoipupdate"
        "github.com/maxmind/geoipupdate/v4/pkg/geoipupdate/internal"
-       "github.com/pkg/errors"
 )
 
 // HTTPDatabaseReader is a Reader that uses an HTTP client to retrieve
@@ -68,7 +68,7 @@
        // future, adding something like Reset() may be desirable.
        tempFile, err := ioutil.TempFile("", "geoipupdate")
        if err != nil {
-               return errors.Wrap(err, "error opening temporary file")
+               return fmt.Errorf("error opening temporary file: %w", err)
        }
        defer func() {
                if err := tempFile.Close(); err != nil {
@@ -104,11 +104,11 @@
        }
 
        if _, err := tempFile.Seek(0, 0); err != nil {
-               return errors.Wrap(err, "error seeking")
+               return fmt.Errorf("error seeking: %w", err)
        }
 
        if _, err = io.Copy(destination, tempFile); err != nil {
-               return errors.Wrap(err, "error writing response")
+               return fmt.Errorf("error writing response: %w", err)
        }
 
        if err := destination.ValidHash(newMD5); err != nil {
@@ -116,13 +116,13 @@
        }
 
        if err := destination.Commit(); err != nil {
-               return errors.Wrap(err, "encountered an issue committing 
database update")
+               return fmt.Errorf("encountered an issue committing database 
update: %w", err)
        }
 
        if reader.preserveFileTimes {
                err = destination.SetFileModificationTime(modificationTime)
                if err != nil {
-                       return errors.Wrap(err, "unable to set modification 
time")
+                       return fmt.Errorf("unable to set modification time: 
%w", err)
                }
        }
 
@@ -137,24 +137,24 @@
        // Prepare a clean slate for this download attempt.
 
        if err := tempFile.Truncate(0); err != nil {
-               return "", time.Time{}, false, errors.Wrap(err, "error 
truncating")
+               return "", time.Time{}, false, fmt.Errorf("error truncating: 
%w", err)
        }
        if _, err := tempFile.Seek(0, 0); err != nil {
-               return "", time.Time{}, false, errors.Wrap(err, "error seeking")
+               return "", time.Time{}, false, fmt.Errorf("error seeking: %w", 
err)
        }
 
        // Perform the download.
        //nolint: noctx // using the context would require an API change
        req, err := http.NewRequest(http.MethodGet, updateURL, nil)
        if err != nil {
-               return "", time.Time{}, false, errors.Wrap(err, "error creating 
request")
+               return "", time.Time{}, false, fmt.Errorf("error creating 
request: %w", err)
        }
        req.Header.Add("User-Agent", "geoipupdate/"+geoipupdate.Version)
        req.SetBasicAuth(fmt.Sprintf("%d", reader.accountID), reader.licenseKey)
 
        response, err := reader.client.Do(req)
        if err != nil {
-               return "", time.Time{}, false, errors.Wrap(err, "error 
performing HTTP request")
+               return "", time.Time{}, false, fmt.Errorf("error performing 
HTTP request: %w", err)
        }
 
        defer response.Body.Close()
@@ -167,23 +167,18 @@
        }
 
        if response.StatusCode != http.StatusOK {
-               buf, err := ioutil.ReadAll(io.LimitReader(response.Body, 256))
-               if err == nil {
-                       err := internal.HTTPError{
-                               Body:       string(buf),
-                               StatusCode: response.StatusCode,
-                       }
-                       return "", time.Time{}, false, errors.Wrap(err, 
"unexpected HTTP status code")
-               }
-               err = internal.HTTPError{
+               //nolint:errcheck // we are already returning an error.
+               buf, _ := ioutil.ReadAll(io.LimitReader(response.Body, 256))
+               httpErr := internal.HTTPError{
+                       Body:       string(buf),
                        StatusCode: response.StatusCode,
                }
-               return "", time.Time{}, false, errors.Wrap(err, "unexpected 
HTTP status code")
+               return "", time.Time{}, false, fmt.Errorf("unexpected HTTP 
status code: %w", httpErr)
        }
 
        gzReader, err := gzip.NewReader(response.Body)
        if err != nil {
-               return "", time.Time{}, false, errors.Wrap(err, "encountered an 
error creating GZIP reader")
+               return "", time.Time{}, false, fmt.Errorf("encountered an error 
creating GZIP reader: %w", err)
        }
        defer func() {
                if err := gzReader.Close(); err != nil {
@@ -193,7 +188,7 @@
 
        //nolint:gosec // A decompression bomb is unlikely here
        if _, err := io.Copy(tempFile, gzReader); err != nil {
-               return "", time.Time{}, false, errors.Wrap(err, "error writing 
response")
+               return "", time.Time{}, false, fmt.Errorf("error writing 
response: %w", err)
        }
 
        newMD5 := response.Header.Get("X-Database-MD5")
@@ -203,7 +198,7 @@
 
        modificationTime, err := 
lastModified(response.Header.Get("Last-Modified"))
        if err != nil {
-               return "", time.Time{}, false, errors.Wrap(err, "unable to get 
last modified time")
+               return "", time.Time{}, false, fmt.Errorf("unable to get last 
modified time: %w", err)
        }
 
        return newMD5, modificationTime, true, nil
@@ -217,7 +212,7 @@
 
        t, err := time.ParseInLocation(time.RFC1123, lastModified, time.UTC)
        if err != nil {
-               return time.Time{}, errors.Wrap(err, "error parsing time")
+               return time.Time{}, fmt.Errorf("error parsing time: %w", err)
        }
 
        return t, nil
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/geoipupdate-4.10.0/pkg/geoipupdate/database/local_file_writer.go 
new/geoipupdate-4.11.1/pkg/geoipupdate/database/local_file_writer.go
--- old/geoipupdate-4.10.0/pkg/geoipupdate/database/local_file_writer.go        
2022-09-26 20:12:11.000000000 +0200
+++ new/geoipupdate-4.11.1/pkg/geoipupdate/database/local_file_writer.go        
2023-03-16 16:15:11.000000000 +0100
@@ -2,6 +2,7 @@
 
 import (
        "crypto/md5"
+       "errors"
        "fmt"
        "hash"
        "io"
@@ -12,7 +13,6 @@
        "time"
 
        "github.com/gofrs/flock"
-       "github.com/pkg/errors"
 )
 
 // LocalFileDatabaseWriter is a database.Writer that stores the database to the
@@ -54,7 +54,7 @@
                0o644,
        )
        if err != nil {
-               return nil, errors.Wrap(err, "error creating temporary file")
+               return nil, fmt.Errorf("error creating temporary file: %w", err)
        }
        dbWriter.md5Writer = md5.New()
        dbWriter.fileWriter = io.MultiWriter(dbWriter.md5Writer, 
dbWriter.temporaryFile)
@@ -69,18 +69,18 @@
                        writer.oldHash = ZeroMD5
                        return nil
                }
-               return errors.Wrap(err, "error opening database")
+               return fmt.Errorf("error opening database: %w", err)
        }
 
        defer func() {
                err := currentDatabaseFile.Close()
                if err != nil {
-                       log.Println(errors.Wrap(err, "error closing database"))
+                       log.Println(fmt.Errorf("error closing database: %w", 
err))
                }
        }()
        oldHash := md5.New()
        if _, err := io.Copy(oldHash, currentDatabaseFile); err != nil {
-               return errors.Wrap(err, "error calculating database hash")
+               return fmt.Errorf("error calculating database hash: %w", err)
        }
        writer.oldHash = fmt.Sprintf("%x", oldHash.Sum(nil))
        if writer.verbose {
@@ -93,7 +93,7 @@
 func (writer *LocalFileDatabaseWriter) Write(p []byte) (int, error) {
        n, err := writer.fileWriter.Write(p)
        if err != nil {
-               return 0, errors.Wrap(err, "error writing")
+               return 0, fmt.Errorf("error writing: %w", err)
        }
        return n, nil
 }
@@ -104,15 +104,15 @@
        if err != nil {
                var perr *os.PathError
                if !errors.As(err, &perr) || !errors.Is(perr.Err, os.ErrClosed) 
{
-                       return errors.Wrap(err, "error closing temporary file")
+                       return fmt.Errorf("error closing temporary file: %w", 
err)
                }
        }
 
        if err := os.Remove(writer.temporaryFile.Name()); err != nil && 
!os.IsNotExist(err) {
-               return errors.Wrap(err, "error removing temporary file")
+               return fmt.Errorf("error removing temporary file: %w", err)
        }
        if err := writer.lock.Unlock(); err != nil {
-               return errors.Wrap(err, "error releasing lock file")
+               return fmt.Errorf("error releasing lock file: %w", err)
        }
        return nil
 }
@@ -121,7 +121,7 @@
 func (writer *LocalFileDatabaseWriter) ValidHash(expectedHash string) error {
        actualHash := fmt.Sprintf("%x", writer.md5Writer.Sum(nil))
        if !strings.EqualFold(actualHash, expectedHash) {
-               return errors.Errorf("md5 of new database (%s) does not match 
expected md5 (%s)", actualHash, expectedHash)
+               return fmt.Errorf("md5 of new database (%s) does not match 
expected md5 (%s)", actualHash, expectedHash)
        }
        return nil
 }
@@ -130,7 +130,7 @@
 // to the given time.
 func (writer *LocalFileDatabaseWriter) SetFileModificationTime(lastModified 
time.Time) error {
        if err := os.Chtimes(writer.filePath, lastModified, lastModified); err 
!= nil {
-               return errors.Wrap(err, "error setting times on file")
+               return fmt.Errorf("error setting times on file: %w", err)
        }
        return nil
 }
@@ -139,27 +139,28 @@
 // the directory.
 func (writer *LocalFileDatabaseWriter) Commit() error {
        if err := writer.temporaryFile.Sync(); err != nil {
-               return errors.Wrap(err, "error syncing temporary file")
+               return fmt.Errorf("error syncing temporary file: %w", err)
        }
        if err := writer.temporaryFile.Close(); err != nil {
-               return errors.Wrap(err, "error closing temporary file")
+               return fmt.Errorf("error closing temporary file: %w", err)
        }
        if err := os.Rename(writer.temporaryFile.Name(), writer.filePath); err 
!= nil {
-               return errors.Wrap(err, "error moving database into place")
+               return fmt.Errorf("error moving database into place: %w", err)
        }
 
        // fsync the directory. http://austingroupbugs.net/view.php?id=672
        dh, err := os.Open(filepath.Dir(writer.filePath))
        if err != nil {
-               return errors.Wrap(err, "error opening database directory")
+               return fmt.Errorf("error opening database directory: %w", err)
        }
 
        // We ignore Sync errors as they primarily happen on file systems that 
do
        // not support sync.
+       //nolint:errcheck // See above.
        _ = dh.Sync()
 
        if err := dh.Close(); err != nil {
-               return errors.Wrap(err, "closing directory")
+               return fmt.Errorf("closing directory: %w", err)
        }
        return nil
 }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/geoipupdate-4.10.0/pkg/geoipupdate/database/writer.go 
new/geoipupdate-4.11.1/pkg/geoipupdate/database/writer.go
--- old/geoipupdate-4.10.0/pkg/geoipupdate/database/writer.go   2022-09-26 
20:12:11.000000000 +0200
+++ new/geoipupdate-4.11.1/pkg/geoipupdate/database/writer.go   2023-03-16 
16:15:11.000000000 +0100
@@ -1,6 +1,8 @@
 package database
 
 import (
+       "errors"
+       "fmt"
        "io"
        "log"
        "os"
@@ -8,7 +10,6 @@
        "time"
 
        "github.com/gofrs/flock"
-       "github.com/pkg/errors"
 )
 
 // ZeroMD5 is the default value provided as an MD5 hash for a non-existent
@@ -30,7 +31,7 @@
 func CreateLockFile(lockFilePath string, verbose bool) (*flock.Flock, error) {
        fi, err := os.Stat(filepath.Dir(lockFilePath))
        if err != nil {
-               return nil, errors.Wrap(err, "database directory is not 
available")
+               return nil, fmt.Errorf("database directory is not available: 
%w", err)
        }
        if !fi.IsDir() {
                return nil, errors.New("database directory is not a directory")
@@ -38,10 +39,10 @@
        lock := flock.New(lockFilePath)
        ok, err := lock.TryLock()
        if err != nil {
-               return nil, errors.Wrap(err, "error acquiring a lock")
+               return nil, fmt.Errorf("error acquiring a lock: %w", err)
        }
        if !ok {
-               return nil, errors.Errorf("could not acquire lock on %s", 
lockFilePath)
+               return nil, fmt.Errorf("could not acquire lock on %s", 
lockFilePath)
        }
        if verbose {
                log.Printf("Acquired lock file lock (%s)", lockFilePath)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/geoipupdate-4.10.0/pkg/geoipupdate/geoip_updater_test.go 
new/geoipupdate-4.11.1/pkg/geoipupdate/geoip_updater_test.go
--- old/geoipupdate-4.10.0/pkg/geoipupdate/geoip_updater_test.go        
2022-09-26 20:12:11.000000000 +0200
+++ new/geoipupdate-4.11.1/pkg/geoipupdate/geoip_updater_test.go        
2023-03-16 16:15:11.000000000 +0100
@@ -4,10 +4,12 @@
        "testing"
 
        "github.com/stretchr/testify/assert"
+       "github.com/stretchr/testify/require"
 )
 
 func TestGetFileName(t *testing.T) {
-       filename, _ := GetFilename(nil, "GeoIP2-City", nil)
+       filename, err := GetFilename(nil, "GeoIP2-City", nil)
+       require.NoError(t, err)
        assert.Equal(
                t,
                "GeoIP2-City.mmdb",
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/geoipupdate-4.10.0/pkg/geoipupdate/internal/retry.go 
new/geoipupdate-4.11.1/pkg/geoipupdate/internal/retry.go
--- old/geoipupdate-4.10.0/pkg/geoipupdate/internal/retry.go    2022-09-26 
20:12:11.000000000 +0200
+++ new/geoipupdate-4.11.1/pkg/geoipupdate/internal/retry.go    2023-03-16 
16:15:11.000000000 +0100
@@ -2,9 +2,8 @@
 package internal
 
 import (
+       "errors"
        "time"
-
-       "github.com/pkg/errors"
 )
 
 // RetryWithBackoff calls the provided function repeatedly until it succeeds or
@@ -21,9 +20,8 @@
                        return nil
                }
 
-               underlyingErr := errors.Cause(err)
                var httpErr HTTPError
-               if errors.As(underlyingErr, &httpErr) &&
+               if errors.As(err, &httpErr) &&
                        httpErr.StatusCode >= 400 &&
                        httpErr.StatusCode < 500 {
                        return err
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/geoipupdate-4.10.0/pkg/geoipupdate/internal/retry_test.go 
new/geoipupdate-4.11.1/pkg/geoipupdate/internal/retry_test.go
--- old/geoipupdate-4.10.0/pkg/geoipupdate/internal/retry_test.go       
2022-09-26 20:12:11.000000000 +0200
+++ new/geoipupdate-4.11.1/pkg/geoipupdate/internal/retry_test.go       
2023-03-16 16:15:11.000000000 +0100
@@ -1,11 +1,12 @@
 package internal
 
 import (
+       "errors"
+       "fmt"
        "net/http"
        "testing"
        "time"
 
-       "github.com/pkg/errors"
        "github.com/stretchr/testify/assert"
 )
 
@@ -48,7 +49,7 @@
                        err := HTTPError{
                                StatusCode: http.StatusBadRequest,
                        }
-                       return errors.Wrap(err, "unexpected HTTP status")
+                       return fmt.Errorf("unexpected HTTP status: %w", err)
                },
                6*time.Second,
        )
@@ -64,7 +65,7 @@
                        err := HTTPError{
                                StatusCode: http.StatusInternalServerError,
                        }
-                       return errors.Wrap(err, "unexpected HTTP status")
+                       return fmt.Errorf("unexpected HTTP status: %w", err)
                },
                6*time.Second,
        )
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/geoipupdate-4.10.0/pkg/geoipupdate/version.go 
new/geoipupdate-4.11.1/pkg/geoipupdate/version.go
--- old/geoipupdate-4.10.0/pkg/geoipupdate/version.go   2022-09-26 
20:12:11.000000000 +0200
+++ new/geoipupdate-4.11.1/pkg/geoipupdate/version.go   2023-03-16 
16:15:11.000000000 +0100
@@ -1,4 +1,4 @@
 package geoipupdate
 
 // Version defines current geoipupdate version.
-const Version = "4.9.0"
+const Version = "4.11.0"

++++++ vendor.tar.gz ++++++
/work/SRC/openSUSE:Factory/geoipupdate/vendor.tar.gz 
/work/SRC/openSUSE:Factory/.geoipupdate.new.31432/vendor.tar.gz differ: char 1, 
line 1

Reply via email to