go.mod: upgrade nfpm to v2 (#8786)

Upgrade the nfpm package to the latest version to pick up
https://github.com/goreleaser/nfpm/commit/24a43c5ad7cfc549e8a4ec930521a97a30f26cc8.
The upgrade is from v0 to v2, so there was some breakage to fix.
Generated packages should have the same contents as before.

Updates https://github.com/tailscale/tailscale/issues/1882

Signed-off-by: Andrew Lytvynov <awly@tailscale.com>
This commit is contained in:
Andrew Lytvynov
2023-08-03 13:00:45 -07:00
committed by GitHub
parent 37925b3e7a
commit eb6883bb5a
6 changed files with 167 additions and 427 deletions
+6 -2
View File
@@ -15,8 +15,8 @@ import (
"testing"
"github.com/google/go-cmp/cmp"
"github.com/goreleaser/nfpm"
_ "github.com/goreleaser/nfpm/deb"
"github.com/goreleaser/nfpm/v2"
_ "github.com/goreleaser/nfpm/v2/deb"
)
func TestDebInfo(t *testing.T) {
@@ -38,6 +38,7 @@ func TestDebInfo(t *testing.T) {
"Section", "net",
"Priority", "extra",
"Architecture", "amd64",
"Maintainer", "Tail Scalar",
"Installed-Size", "0",
"Description", "test package"),
},
@@ -54,6 +55,7 @@ func TestDebInfo(t *testing.T) {
"Section", "net",
"Priority", "extra",
"Architecture", "arm64",
"Maintainer", "Tail Scalar",
"Installed-Size", "0",
"Description", "test package"),
},
@@ -70,6 +72,7 @@ func TestDebInfo(t *testing.T) {
"Section", "net",
"Priority", "extra",
"Architecture", "amd64",
"Maintainer", "Tail Scalar",
"Installed-Size", "0",
"Description", "test package"),
},
@@ -167,6 +170,7 @@ func mkTestDeb(version, arch string) []byte {
Version: version,
Section: "net",
Priority: "extra",
Maintainer: "Tail Scalar",
})
pkg, err := nfpm.Get("deb")