Github messages for voidlinux
 help / color / mirror / Atom feed
* [PR PATCH] [WIP] srcpkgs/: most Go packages shouldn't have git in hostmakedepends.
@ 2021-02-18 22:20 ericonr
  2021-02-19  2:27 ` [PR PATCH] [Updated] " ericonr
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: ericonr @ 2021-02-18 22:20 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 883 bytes --]

There is a new pull request by ericonr against master on the void-packages repository

https://github.com/ericonr/void-packages goclean
https://github.com/void-linux/void-packages/pull/28863

[WIP] srcpkgs/: most Go packages shouldn't have git in hostmakedepends.
Depending on git for building can sometimes happen due to issue #27690,
where instead of using the unpacked tarball, Go clones the package's
repository itself, since the tarball we provided doesn't contain the
go_import_path we pass to it in the command line.

Since we should require as few dependencies as possible, and this
measure can help catch issues of building the wrong version of a Go
package, we remove git from hostmakedepends where possible.

I'm still pulling in packages that do this, will take a while.

A patch file from https://github.com/void-linux/void-packages/pull/28863.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-goclean-28863.patch --]
[-- Type: text/x-diff, Size: 27002 bytes --]

From ba6be94da861854f238bba946e5ddaa7261ffb61 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=C3=89rico=20Rolim?= <erico.erc@gmail.com>
Date: Thu, 18 Feb 2021 19:16:24 -0300
Subject: [PATCH] srcpkgs/: most Go packages shouldn't have git in
 hostmakedepends.

Depending on git for building can sometimes happen due to issue #27690,
where instead of using the unpacked tarball, Go clones the package's
repository itself, since the tarball we provided doesn't contain the
go_import_path we pass to it in the command line.

Since we should require as few dependencies as possible, and this
measure can help catch issues of building the wrong version of a Go
package, we remove git from hostmakedepends where possible.
---
 srcpkgs/NetAuth-ldap/template       | 1 -
 srcpkgs/NetAuth-localizer/template  | 1 -
 srcpkgs/NetAuth-nsscache/template   | 1 -
 srcpkgs/NetAuth-pam-helper/template | 1 -
 srcpkgs/NetKeys/template            | 1 -
 srcpkgs/PopCorn/template            | 2 +-
 srcpkgs/TerraState/template         | 1 -
 srcpkgs/aerc/template               | 2 +-
 srcpkgs/antibody/template           | 3 +--
 srcpkgs/browserpass/template        | 1 -
 srcpkgs/caddy/template              | 2 +-
 srcpkgs/cdetect/template            | 1 -
 srcpkgs/chezmoi/template            | 3 +--
 srcpkgs/chroma/template             | 1 -
 srcpkgs/clipman/template            | 1 -
 srcpkgs/consul-template/template    | 3 +--
 srcpkgs/consul/template             | 5 ++---
 srcpkgs/coredns/template            | 2 +-
 srcpkgs/crane/template              | 3 +--
 srcpkgs/croc/template               | 1 -
 srcpkgs/dht-node/template           | 1 -
 srcpkgs/dive/template               | 1 -
 srcpkgs/dlayer/template             | 1 -
 srcpkgs/dnote-cli/template          | 1 +
 srcpkgs/elfinfo/template            | 1 -
 srcpkgs/ensure-access/template      | 1 -
 srcpkgs/exercism/template           | 1 -
 srcpkgs/flint/template              | 3 +--
 srcpkgs/forego/template             | 3 +--
 srcpkgs/fzf/template                | 1 -
 srcpkgs/gendesk/template            | 3 +--
 srcpkgs/ghq/template                | 1 -
 srcpkgs/git-lfs/template            | 4 ++--
 srcpkgs/gitbatch/template           | 1 -
 srcpkgs/gitea/template              | 2 +-
 srcpkgs/glide/template              | 1 -
 srcpkgs/glider/template             | 1 -
 srcpkgs/go-ipfs/template            | 6 +++---
 srcpkgs/go-review/template          | 1 -
 srcpkgs/gogs/template               | 1 -
 srcpkgs/gomatrix/template           | 1 -
 srcpkgs/gotop/template              | 1 -
 srcpkgs/gotty/template              | 1 -
 srcpkgs/gucci/template              | 1 -
 srcpkgs/gx-go/template              | 1 -
 srcpkgs/gx/template                 | 1 -
 srcpkgs/hcloud/template             | 1 -
 47 files changed, 20 insertions(+), 58 deletions(-)

diff --git a/srcpkgs/NetAuth-ldap/template b/srcpkgs/NetAuth-ldap/template
index 425ccf49079..c3b11bd6e39 100644
--- a/srcpkgs/NetAuth-ldap/template
+++ b/srcpkgs/NetAuth-ldap/template
@@ -6,7 +6,6 @@ wrksrc=ldap-$version
 build_style=go
 go_import_path=github.com/netauth/ldap
 go_ldflags="-X github.com/netauth/ldap/internal/buildinfo.Version=${version}"
-hostmakedepends="git"
 short_desc="LDAP Proxy for NetAuth"
 maintainer="Michael Aldridge <maldridge@netauth.org>"
 license="MIT"
diff --git a/srcpkgs/NetAuth-localizer/template b/srcpkgs/NetAuth-localizer/template
index 4c97fb966b0..0b8a17fc178 100644
--- a/srcpkgs/NetAuth-localizer/template
+++ b/srcpkgs/NetAuth-localizer/template
@@ -6,7 +6,6 @@ wrksrc=localizer-$version
 build_style=go
 go_import_path=github.com/netauth/localizer
 go_package=${go_import_path}/cmd/localize
-hostmakedepends="git"
 depends="snooze"
 short_desc="Make NetAuth accounts local in Linux"
 maintainer="Michael Aldridge <maldridge@netauth.org>"
diff --git a/srcpkgs/NetAuth-nsscache/template b/srcpkgs/NetAuth-nsscache/template
index a8aabcd5964..b67749be2f8 100644
--- a/srcpkgs/NetAuth-nsscache/template
+++ b/srcpkgs/NetAuth-nsscache/template
@@ -5,7 +5,6 @@ revision=1
 wrksrc="nsscache-$version"
 build_style=go
 go_import_path="github.com/netauth/nsscache"
-hostmakedepends="git"
 short_desc="NetAuth nsscache implementation"
 maintainer="Michael Aldridge <maldridge@netauth.org>"
 license="MIT"
diff --git a/srcpkgs/NetAuth-pam-helper/template b/srcpkgs/NetAuth-pam-helper/template
index 80f362a228e..c8c467d795e 100644
--- a/srcpkgs/NetAuth-pam-helper/template
+++ b/srcpkgs/NetAuth-pam-helper/template
@@ -5,7 +5,6 @@ revision=1
 wrksrc=pam-helper-$version
 build_style=go
 go_import_path="github.com/netauth/pam-helper"
-hostmakedepends="git"
 short_desc="A helper executable to use with pam_exec"
 maintainer="Michael Aldridge <maldridge@VoidLinux.org>"
 license="MIT"
diff --git a/srcpkgs/NetKeys/template b/srcpkgs/NetKeys/template
index 950d26850c4..2ed06b5d127 100644
--- a/srcpkgs/NetKeys/template
+++ b/srcpkgs/NetKeys/template
@@ -5,7 +5,6 @@ revision=1
 wrksrc=netkeys-$version
 build_style=go
 go_import_path="github.com/netauth/netkeys"
-hostmakedepends="git"
 short_desc="Key retrieval daemon for NetAuth"
 maintainer="Michael Aldridge <maldridge@netauth.org>"
 license="MIT"
diff --git a/srcpkgs/PopCorn/template b/srcpkgs/PopCorn/template
index da4bfa9deac..a3cd3893b2b 100644
--- a/srcpkgs/PopCorn/template
+++ b/srcpkgs/PopCorn/template
@@ -8,7 +8,7 @@ go_package="${go_import_path}/cmd/popcorn
  ${go_import_path}/cmd/popcornctl
  ${go_import_path}/cmd/statrepo
  ${go_import_path}/cmd/pqueryd"
-hostmakedepends="git gcc-go-tools"
+hostmakedepends="gcc-go-tools"
 depends="snooze"
 short_desc="Package statistics system"
 maintainer="Michael Aldridge <maldridge@voidlinux.org>"
diff --git a/srcpkgs/TerraState/template b/srcpkgs/TerraState/template
index b4a7b9e6097..599058a6bfa 100644
--- a/srcpkgs/TerraState/template
+++ b/srcpkgs/TerraState/template
@@ -7,7 +7,6 @@ make_dirs="/var/lib/terrastate 0750 _terrastate _terrastate"
 build_style=go
 go_import_path="github.com/the-maldridge/terrastate"
 go_package="${go_import_path}/cmd/terrastate"
-hostmakedepends="git"
 short_desc="Remote state for Terraform"
 maintainer="Michael Aldridge <maldridge@voidlinux.org>"
 license="MIT"
diff --git a/srcpkgs/aerc/template b/srcpkgs/aerc/template
index 08c81ef0d4e..d5ee785e3b2 100644
--- a/srcpkgs/aerc/template
+++ b/srcpkgs/aerc/template
@@ -3,7 +3,7 @@ pkgname=aerc
 version=0.5.2
 revision=1
 build_style=go
-hostmakedepends="scdoc git"
+hostmakedepends="scdoc"
 makedepends="libnotmuch-devel"
 short_desc="Terminal email client"
 maintainer="shtayerc <david.murko@mailbox.org>"
diff --git a/srcpkgs/antibody/template b/srcpkgs/antibody/template
index 7071501830c..df466c33a9c 100644
--- a/srcpkgs/antibody/template
+++ b/srcpkgs/antibody/template
@@ -4,12 +4,11 @@ version=6.1.1
 revision=1
 build_style=go
 go_import_path=github.com/getantibody/antibody
-hostmakedepends="git"
 short_desc="Fast and lightweight shell plugin manager"
 maintainer="SolitudeSF <solitudesf@protonmail.com>"
 license="MIT"
 homepage="https://getantibody.github.io/"
-distfiles="https://${go_import_path}/archive/v${version}.tar.gz"
+distfiles="https://github.com/getantibody/antibody/archive/v${version}.tar.gz"
 checksum=87bced5fba8cf5d587ea803d33dda72e8bcbd4e4c9991a9b40b2de4babbfc24f
 
 post_install() {
diff --git a/srcpkgs/browserpass/template b/srcpkgs/browserpass/template
index b6426a24975..63537def3f4 100644
--- a/srcpkgs/browserpass/template
+++ b/srcpkgs/browserpass/template
@@ -5,7 +5,6 @@ revision=1
 wrksrc="browserpass-native-${version}"
 build_style=go
 go_import_path=github.com/browserpass/browserpass-native
-hostmakedepends="git"
 short_desc="Browser extension for pass"
 maintainer="John <me@johnnynator.dev>"
 license="MIT"
diff --git a/srcpkgs/caddy/template b/srcpkgs/caddy/template
index dbae7057566..c1a2aad2a26 100644
--- a/srcpkgs/caddy/template
+++ b/srcpkgs/caddy/template
@@ -3,9 +3,9 @@ pkgname=caddy
 version=1.0.5
 revision=1
 build_style=go
+# XXX: use caddy/v2 when updating
 go_import_path=github.com/caddyserver/caddy
 go_package="${go_import_path}/caddy"
-hostmakedepends="git"
 short_desc="Fast, cross-platform HTTP/2 web server with automatic HTTPS"
 maintainer="Dominic Monroe <monroef4@googlemail.com>"
 license="Apache-2.0"
diff --git a/srcpkgs/cdetect/template b/srcpkgs/cdetect/template
index b02df3a496e..e859340a9cb 100644
--- a/srcpkgs/cdetect/template
+++ b/srcpkgs/cdetect/template
@@ -4,7 +4,6 @@ version=0.5.4
 revision=1
 build_style=go
 go_import_path=github.com/xyproto/cdetect
-hostmakedepends="git"
 short_desc="Detects the compiler (and version) used to compile an ELF binary"
 maintainer="Orphaned <orphan@voidlinux.org>"
 license="MIT"
diff --git a/srcpkgs/chezmoi/template b/srcpkgs/chezmoi/template
index 5c6d47e5abc..b361ec8b4cf 100644
--- a/srcpkgs/chezmoi/template
+++ b/srcpkgs/chezmoi/template
@@ -7,12 +7,11 @@ go_import_path="github.com/twpayne/chezmoi"
 go_build_tags="noembeddocs noupgrade"
 go_ldflags="-X main.version=${version} -X main.commit=v${version} -X main.builtBy=xbps
  -X github.com/twpayne/chezmoi/cmd.DocsDir=/usr/share/doc/chezmoi"
-hostmakedepends="git"
 short_desc="Manage your dotfiles across multiple machines, securely"
 maintainer="Abigail G <dev@kb6.ee>"
 license="MIT"
 homepage="https://chezmoi.io/"
-distfiles="https://github.com/twpayne/${pkgname}/archive/v${version}.tar.gz"
+distfiles="https://github.com/twpayne/chezmoi/archive/v${version}.tar.gz"
 checksum=23515591028202aaf7af908e38972f156ee08022f535bc74aaa9244b82da2fa1
 
 post_install() {
diff --git a/srcpkgs/chroma/template b/srcpkgs/chroma/template
index 8215a0ac027..38bcbe9c735 100644
--- a/srcpkgs/chroma/template
+++ b/srcpkgs/chroma/template
@@ -6,7 +6,6 @@ build_style=go
 go_import_path="github.com/alecthomas/${pkgname}"
 go_package="${go_import_path}/cmd/chroma"
 go_ldflags="-X main.version=${version} -X main.date=$(date +%Y.%m.%d)"
-hostmakedepends="git"
 short_desc="General purpose syntax highlighter"
 maintainer="Daniel Lewan <vision360.daniel@gmail.com>"
 license="MIT"
diff --git a/srcpkgs/clipman/template b/srcpkgs/clipman/template
index a48999a5004..697655d014f 100644
--- a/srcpkgs/clipman/template
+++ b/srcpkgs/clipman/template
@@ -4,7 +4,6 @@ version=1.5.2
 revision=1
 build_style=go
 go_import_path=github.com/yory8/clipman
-hostmakedepends="git"
 depends="wl-clipboard"
 short_desc="Simple clipboard manager for Wayland"
 maintainer="travankor <travankor@tuta.io>"
diff --git a/srcpkgs/consul-template/template b/srcpkgs/consul-template/template
index 3d490804ba2..874ba30a996 100644
--- a/srcpkgs/consul-template/template
+++ b/srcpkgs/consul-template/template
@@ -3,8 +3,7 @@ pkgname=consul-template
 version=0.25.1
 revision=1
 build_style=go
-go_import_path="github.com/hashicorp/$pkgname"
-hostmakedepends="git"
+go_import_path="github.com/hashicorp/consul-template"
 short_desc="Template rendering, notifier, and supervisor for Consul and Vault data"
 maintainer="Noel Cower <ncower@nil.dev>"
 license="MPL-2.0"
diff --git a/srcpkgs/consul/template b/srcpkgs/consul/template
index e55c4d587fd..9cca1e79827 100644
--- a/srcpkgs/consul/template
+++ b/srcpkgs/consul/template
@@ -3,18 +3,17 @@ pkgname=consul
 version=1.8.4
 revision=1
 build_style=go
-go_import_path="github.com/hashicorp/${pkgname}"
+go_import_path="github.com/hashicorp/consul"
 _git_commit=9ea1a204d832cfd4d8c5cba9df56876a526a4531
 go_ldflags="-X ${go_import_path}/version.GitCommit=${_git_commit} -X ${go_import_path}/version.GitDescribe=v${version}"
 # consul has a vendor directory, but relies on replace statements in go.mod, so
 # force default non-vendor behavior.
 go_mod_mode=default
-hostmakedepends="git"
 short_desc="Distributed solution to connect and configure applications"
 maintainer="iaroki <iaroki@protonmail.com>"
 license="MPL-2.0"
 homepage="https://www.consul.io/"
-distfiles="https://${go_import_path}/archive/v${version}.tar.gz"
+distfiles="https://github.com/hashicorp/consul/archive/v${version}.tar.gz"
 checksum=77d1dfa93da66ccb222049bd892e46f8ddb11516589311fbdc24bd658d64b372
 
 post_install() {
diff --git a/srcpkgs/coredns/template b/srcpkgs/coredns/template
index ebd7f2ce2af..15793229e0e 100644
--- a/srcpkgs/coredns/template
+++ b/srcpkgs/coredns/template
@@ -4,7 +4,7 @@ version=1.7.1
 revision=1
 build_style=go
 go_import_path=github.com/coredns/coredns
-hostmakedepends="git make mmark"
+hostmakedepends="make mmark"
 short_desc="CoreDNS is a DNS server that chains plugins"
 maintainer="Noel Cower <ncower@nil.dev>"
 license="Apache-2.0"
diff --git a/srcpkgs/crane/template b/srcpkgs/crane/template
index 0a19c2a68a8..5a304a9faf7 100644
--- a/srcpkgs/crane/template
+++ b/srcpkgs/crane/template
@@ -3,12 +3,11 @@ pkgname=crane
 version=3.6.0
 revision=1
 build_style=go
-hostmakedepends="git"
 short_desc="Lift containers with ease"
 maintainer="Andrea Brancaleoni <abc@pompel.me>"
 license="MIT"
 go_import_path="github.com/michaelsauter/crane"
-homepage="https://${go_import_path}"
+homepage="https://github.com/michaelsauter/crane"
 distfiles="${homepage}/archive/v${version}.tar.gz"
 checksum=00f202783ae2ef3a2d0e02fba0454defe53e823b4c99e2e3b5af734dc870906e
 
diff --git a/srcpkgs/croc/template b/srcpkgs/croc/template
index 1844acf62e9..acd54bf63b7 100644
--- a/srcpkgs/croc/template
+++ b/srcpkgs/croc/template
@@ -4,7 +4,6 @@ version=8.6.7
 revision=1
 build_style=go
 go_import_path=github.com/schollz/croc/v${version%%.*}
-hostmakedepends="git"
 short_desc="Easily and securely send things from one computer to another"
 maintainer="Benjamín Albiñana <benalb@gmail.com>"
 license="MIT"
diff --git a/srcpkgs/dht-node/template b/srcpkgs/dht-node/template
index 7ae65c38731..981cad27b9e 100644
--- a/srcpkgs/dht-node/template
+++ b/srcpkgs/dht-node/template
@@ -5,7 +5,6 @@ revision=3
 build_style=go
 go_import_path="github.com/ipfs/dht-node"
 go_build_tags="netgo"
-hostmakedepends="git"
 short_desc="IPFS dht node"
 maintainer="lemmi <lemmi@nerd2nerd.org>"
 license="MIT"
diff --git a/srcpkgs/dive/template b/srcpkgs/dive/template
index 9144579660a..488801ff9bb 100644
--- a/srcpkgs/dive/template
+++ b/srcpkgs/dive/template
@@ -4,7 +4,6 @@ version=0.9.2
 revision=1
 build_style=go
 go_import_path="github.com/wagoodman/dive"
-hostmakedepends="git"
 short_desc="Container image exploration tool"
 maintainer="Cameron Nemo <cnemo@tutanota.com>"
 license="MIT"
diff --git a/srcpkgs/dlayer/template b/srcpkgs/dlayer/template
index e754ee8e676..ac5b0a9fd9d 100644
--- a/srcpkgs/dlayer/template
+++ b/srcpkgs/dlayer/template
@@ -4,7 +4,6 @@ version=0.2.4
 revision=1
 build_style=go
 go_import_path=github.com/orisano/dlayer
-hostmakedepends="git"
 short_desc="Dlayer is a docker layer analyzer"
 maintainer="Mate GABRI <iam@theguy.io>"
 license="MIT"
diff --git a/srcpkgs/dnote-cli/template b/srcpkgs/dnote-cli/template
index 309bee7649b..a8b05806bd1 100644
--- a/srcpkgs/dnote-cli/template
+++ b/srcpkgs/dnote-cli/template
@@ -6,6 +6,7 @@ wrksrc="cli-${version}"
 build_style=go
 go_import_path=github.com/dnote-io/cli
 go_build_tags="fts5"
+# XXX: update should switch to Go modules and allow complete removal of these deps
 hostmakedepends="git dep"
 short_desc="Capture what you learn as you code without leaving the command line"
 maintainer="Toyam Cox <Vaelatern@voidlinux.org>"
diff --git a/srcpkgs/elfinfo/template b/srcpkgs/elfinfo/template
index 189d842b001..b354ced06d8 100644
--- a/srcpkgs/elfinfo/template
+++ b/srcpkgs/elfinfo/template
@@ -4,7 +4,6 @@ version=1.1.0
 revision=1
 build_style=go
 go_import_path=github.com/xyproto/elfinfo
-hostmakedepends="git"
 short_desc="Emit basic information about an ELF file"
 maintainer="Alexander F. Rødseth <xyproto@archlinux.org>"
 license="MIT"
diff --git a/srcpkgs/ensure-access/template b/srcpkgs/ensure-access/template
index b5187c8bb4f..9d3abe47630 100644
--- a/srcpkgs/ensure-access/template
+++ b/srcpkgs/ensure-access/template
@@ -4,7 +4,6 @@ version=0.1.0
 revision=1
 build_style=go
 go_import_path=github.com/Noah-Huppert/ensure-access
-hostmakedepends="git"
 short_desc="Tool which ensures permissions exists for files and directories"
 maintainer="Noah Huppert <contact@noahh.io>"
 license="MIT"
diff --git a/srcpkgs/exercism/template b/srcpkgs/exercism/template
index eb696027500..5869f87dbce 100644
--- a/srcpkgs/exercism/template
+++ b/srcpkgs/exercism/template
@@ -6,7 +6,6 @@ wrksrc="cli-${version}"
 build_style=go
 go_import_path="github.com/exercism/cli"
 go_package="${go_import_path}/exercism"
-hostmakedepends="git"
 short_desc="Command line tool for exercism.io"
 maintainer="SolitudeSF <solitudesf@protonmail.com>"
 license="MIT"
diff --git a/srcpkgs/flint/template b/srcpkgs/flint/template
index 1b8ae9d964c..a04ca9e022d 100644
--- a/srcpkgs/flint/template
+++ b/srcpkgs/flint/template
@@ -3,12 +3,11 @@ pkgname=flint
 version=0.1.0
 revision=9
 build_style=go
-hostmakedepends="git"
 short_desc="Check your project for common sources of contributor friction"
 maintainer="Andrea Brancaleoni <abc@pompel.me>"
 license="MIT"
 go_import_path="github.com/pengwynn/flint"
-homepage="https://${go_import_path}"
+homepage="https://github.com/pengwynn/flint"
 distfiles="${homepage}/archive/v${version}.tar.gz"
 checksum=ec865ec5cad191c7fc9c7c6d5007754372696a708825627383913367f3ef8b7f
 
diff --git a/srcpkgs/forego/template b/srcpkgs/forego/template
index 6f239f15efc..ff43b86fd7c 100644
--- a/srcpkgs/forego/template
+++ b/srcpkgs/forego/template
@@ -3,11 +3,10 @@ pkgname=forego
 version=20180216151118
 revision=5
 build_style=go
-hostmakedepends="git mercurial"
 short_desc="A process supervisor in Go"
 maintainer="Andrea Brancaleoni <abc@pompel.me>"
 license="Apache-2.0"
 go_import_path="github.com/ddollar/forego"
-homepage="https://$go_import_path"
+homepage="https://github.com/ddollar/forego"
 distfiles="$homepage/archive/$version.tar.gz"
 checksum=23119550cc0e45191495823aebe28b42291db6de89932442326340042359b43d
diff --git a/srcpkgs/fzf/template b/srcpkgs/fzf/template
index b0b841a7a6a..eb02c545f5e 100644
--- a/srcpkgs/fzf/template
+++ b/srcpkgs/fzf/template
@@ -4,7 +4,6 @@ version=0.25.1
 revision=1
 build_style=go
 go_import_path="github.com/junegunn/fzf"
-hostmakedepends="git"
 makedepends="ncurses-devel"
 short_desc="Command-line fuzzy finder"
 maintainer="Leah Neukirchen <leah@vuxu.org>"
diff --git a/srcpkgs/gendesk/template b/srcpkgs/gendesk/template
index 1c2d600d23d..3ba71439b59 100644
--- a/srcpkgs/gendesk/template
+++ b/srcpkgs/gendesk/template
@@ -5,12 +5,11 @@ revision=1
 build_style=go
 go_import_path=github.com/xyproto/gendesk
 go_mod_mode=default
-hostmakedepends="git"
 short_desc="Utility to generate .desktop files and download icons"
 maintainer="Benjamín Albiñana <benalb@gmail.com>"
 license="MIT"
 homepage="http://roboticoverlords.org/gendesk/"
-distfiles="https://github.com/xyproto/${pkgname}/archive/${version}.tar.gz
+distfiles="https://github.com/xyproto/gendesk/archive/${version}.tar.gz
  http://roboticoverlords.org/images/default.png"
 checksum="924606ca1c15a140b70f363c4a0ac46fb3ad4d05bc39db400d0b0e41dd4456bb
  4d96eded48e536d02e35727c36dc20844c2e44654e81baf78e10aee4eb48e837"
diff --git a/srcpkgs/ghq/template b/srcpkgs/ghq/template
index 029cc3fbf9f..3ede66246fd 100644
--- a/srcpkgs/ghq/template
+++ b/srcpkgs/ghq/template
@@ -5,7 +5,6 @@ revision=1
 build_style=go
 go_import_path=github.com/x-motemen/ghq
 go_package="$go_import_path"
-hostmakedepends="git"
 depends="git"
 short_desc="Remote repository management made easy"
 maintainer="Dominic Monroe <monroef4@googlemail.com>"
diff --git a/srcpkgs/git-lfs/template b/srcpkgs/git-lfs/template
index 588d7fe9aa3..4a603a6bd5d 100644
--- a/srcpkgs/git-lfs/template
+++ b/srcpkgs/git-lfs/template
@@ -4,12 +4,12 @@ version=2.12.1
 revision=1
 build_style=go
 go_import_path="github.com/git-lfs/git-lfs"
-hostmakedepends="git ruby-ronn"
+hostmakedepends="ruby-ronn"
 short_desc="Git extension for versioning large files"
 maintainer="Michael Aldridge <maldridge@voidlinux.org>"
 license="MIT"
 homepage="https://git-lfs.github.com/"
-distfiles="https://github.com/git-lfs/${pkgname}/archive/v${version}.tar.gz"
+distfiles="https://github.com/git-lfs/git-lfs/archive/v${version}.tar.gz"
 checksum=2b2e70f1233f7efe9a010771510391a07527ec7c0af721ecf8edabac5d60f62b
 
 post_build() {
diff --git a/srcpkgs/gitbatch/template b/srcpkgs/gitbatch/template
index 4464729f2b8..df26ed89b19 100644
--- a/srcpkgs/gitbatch/template
+++ b/srcpkgs/gitbatch/template
@@ -4,7 +4,6 @@ version=0.5.0
 revision=1
 build_style=go
 go_import_path=github.com/isacikgoz/gitbatch
-hostmakedepends="git"
 short_desc="Command line tool to manage your git repositories in one place"
 maintainer="0x0f0f0f <sudo-woodo3@protonmail.com>"
 license="MIT"
diff --git a/srcpkgs/gitea/template b/srcpkgs/gitea/template
index ed6d4e9ce10..250488c99fd 100644
--- a/srcpkgs/gitea/template
+++ b/srcpkgs/gitea/template
@@ -23,7 +23,7 @@ go_ldflags=" -X main.Version=${version}"
 #     rather not use SQLite3 for some reason.  It is also potentially
 #     more resiliant to corrupted writes.
 go_build_tags="bindata sqlite pam tidb"
-hostmakedepends="go-bindata git"
+hostmakedepends="go-bindata"
 makedepends="sqlite-devel pam-devel"
 depends="git bash"
 short_desc="Git with a cup of Tea"
diff --git a/srcpkgs/glide/template b/srcpkgs/glide/template
index 635084f7098..15948753606 100644
--- a/srcpkgs/glide/template
+++ b/srcpkgs/glide/template
@@ -4,7 +4,6 @@ version=0.13.3
 revision=1
 build_style=go
 go_import_path="github.com/Masterminds/glide"
-hostmakedepends="git"
 depends="go git"
 short_desc="Vendor package management for golang"
 maintainer="ananteris <ananteris@protonmail.ch>"
diff --git a/srcpkgs/glider/template b/srcpkgs/glider/template
index e132cfda4b7..36282560269 100644
--- a/srcpkgs/glider/template
+++ b/srcpkgs/glider/template
@@ -4,7 +4,6 @@ version=0.13.0
 revision=1
 build_style=go
 go_import_path=github.com/nadoo/glider
-hostmakedepends="git"
 short_desc="Forward proxy with multiple protocols support"
 maintainer="whoami <whoami@systemli.org>"
 license="GPL-3.0-or-later"
diff --git a/srcpkgs/go-ipfs/template b/srcpkgs/go-ipfs/template
index 4f0a7e98403..088a5d520ab 100644
--- a/srcpkgs/go-ipfs/template
+++ b/srcpkgs/go-ipfs/template
@@ -3,16 +3,15 @@ pkgname=go-ipfs
 version=0.7.0
 revision=2
 build_style=go
-go_import_path="github.com/ipfs/${pkgname}"
+go_import_path="github.com/ipfs/go-ipfs"
 go_package="${go_import_path}/cmd/ipfs"
-hostmakedepends="git"
 depends="fs-repo-migrations>=1.6.4"
 short_desc="Global versioned P2P merkle DAG file system"
 maintainer="Christopher Brannon <chris@the-brannons.com>"
 license="MIT, Apache-2.0"
 homepage="https://ipfs.io"
 changelog="https://github.com/ipfs/go-ipfs/blob/master/CHANGELOG.md"
-distfiles="https://${go_import_path}/archive/v${version}.tar.gz"
+distfiles="https://github.com/ipfs/go-ipfs/archive/v${version}.tar.gz"
 checksum=152986ebb30657ab706bee708fbe929114f5e8c39fbe602e3bbec93fe74c9123
 
 system_accounts="_ipfs"
@@ -20,6 +19,7 @@ make_dirs="/var/lib/ipfs 0700 _ipfs _ipfs"
 _ipfs_homedir="/var/lib/ipfs"
 
 pre_build() {
+	# XXX: try to use buildmode=pie instead
 	if [ "$CROSS_BUILD" ]; then
 		export CGO_ENABLED=0
 	fi
diff --git a/srcpkgs/go-review/template b/srcpkgs/go-review/template
index b352545bedb..907a214d401 100644
--- a/srcpkgs/go-review/template
+++ b/srcpkgs/go-review/template
@@ -5,7 +5,6 @@ revision=1
 build_style=go
 go_import_path="github.com/heppu/go-review"
 go_package="${go_import_path}/cmd/${pkgname}"
-hostmakedepends="git"
 short_desc="Publish reports from different Go linters as gerrit reviews"
 maintainer="Renato Aguiar <renato@renatoaguiar.net>"
 license="MIT"
diff --git a/srcpkgs/gogs/template b/srcpkgs/gogs/template
index 3dc6ebdb674..616e33c1c89 100644
--- a/srcpkgs/gogs/template
+++ b/srcpkgs/gogs/template
@@ -5,7 +5,6 @@ revision=1
 build_style=go
 go_import_path=gogs.io/gogs
 go_build_tags="sqlite pam cert"
-hostmakedepends="git curl"
 makedepends="pam-devel"
 depends="git"
 short_desc="Self-hosted Git Service in Go"
diff --git a/srcpkgs/gomatrix/template b/srcpkgs/gomatrix/template
index fae7a4343ed..eb9d6e7beda 100644
--- a/srcpkgs/gomatrix/template
+++ b/srcpkgs/gomatrix/template
@@ -4,7 +4,6 @@ version=101.0.0
 revision=1
 build_style=go
 go_import_path=github.com/GeertJohan/gomatrix
-hostmakedepends="git"
 short_desc="Terminal Matrix display in golang"
 maintainer="Alex Childs <misuchiru03+void@gmail.com>"
 license="BSD-2-Clause"
diff --git a/srcpkgs/gotop/template b/srcpkgs/gotop/template
index 3566a8d9a78..1b744987057 100644
--- a/srcpkgs/gotop/template
+++ b/srcpkgs/gotop/template
@@ -6,7 +6,6 @@ build_style=go
 go_ldflags="-X main.Version=v${version}"
 go_import_path="github.com/xxxserxxx/gotop/v4"
 go_package="$go_import_path/cmd/gotop"
-hostmakedepends="git"
 short_desc="Terminal based graphical activity monitor"
 maintainer="SolitudeSF <solitudesf@protonmail.com>"
 license="MIT"
diff --git a/srcpkgs/gotty/template b/srcpkgs/gotty/template
index 0e5d268e992..58fc0572197 100644
--- a/srcpkgs/gotty/template
+++ b/srcpkgs/gotty/template
@@ -4,7 +4,6 @@ version=1.0.1
 revision=8
 build_style=go
 go_import_path="github.com/yudai/gotty"
-hostmakedepends="git"
 short_desc="Share your terminal as a web application"
 maintainer="Diogo Leal <diogo@diogoleal.com>"
 license="MIT"
diff --git a/srcpkgs/gucci/template b/srcpkgs/gucci/template
index fb10a6ca866..15023fe603c 100644
--- a/srcpkgs/gucci/template
+++ b/srcpkgs/gucci/template
@@ -4,7 +4,6 @@ version=1.2.4
 revision=1
 build_style=go
 go_import_path="github.com/noqcks/gucci"
-hostmakedepends="git"
 short_desc="Simple CLI templating tool written in Go"
 maintainer="Leah Neukirchen <leah@vuxu.org>"
 license="MIT"
diff --git a/srcpkgs/gx-go/template b/srcpkgs/gx-go/template
index b06ced23433..9294a2f143f 100644
--- a/srcpkgs/gx-go/template
+++ b/srcpkgs/gx-go/template
@@ -4,7 +4,6 @@ version=1.9.0
 revision=1
 build_style=go
 go_import_path="github.com/whyrusleeping/gx-go"
-hostmakedepends="git"
 depends="gx"
 short_desc="A subtool for the gx package manager for packages written in go"
 maintainer="lemmi <lemmi@nerd2nerd.org>"
diff --git a/srcpkgs/gx/template b/srcpkgs/gx/template
index ff3ea0267c8..7414b6bab10 100644
--- a/srcpkgs/gx/template
+++ b/srcpkgs/gx/template
@@ -4,7 +4,6 @@ version=0.14.3
 revision=1
 build_style=go
 go_import_path="github.com/whyrusleeping/gx"
-hostmakedepends="git"
 short_desc="Language-agnostic, universal package manager around IPFS"
 maintainer="lemmi <lemmi@nerd2nerd.org>"
 license="MIT"
diff --git a/srcpkgs/hcloud/template b/srcpkgs/hcloud/template
index 8a7aecc2504..628dbf69a14 100644
--- a/srcpkgs/hcloud/template
+++ b/srcpkgs/hcloud/template
@@ -7,7 +7,6 @@ build_style=go
 go_import_path=github.com/hetznercloud/cli
 go_package=github.com/hetznercloud/cli/cmd/hcloud
 go_ldflags="-X github.com/hetznercloud/cli.Version=${version}"
-hostmakedepends="git"
 short_desc="Command-line interface for Hetzner Cloud"
 maintainer="Gerardo Di Iorio <arete74@gmail.com>"
 license="MIT"

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PR PATCH] [Updated] [WIP] srcpkgs/: most Go packages shouldn't have git in hostmakedepends.
  2021-02-18 22:20 [PR PATCH] [WIP] srcpkgs/: most Go packages shouldn't have git in hostmakedepends ericonr
@ 2021-02-19  2:27 ` ericonr
  2021-02-19  3:34 ` ericonr
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: ericonr @ 2021-02-19  2:27 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 888 bytes --]

There is an updated pull request by ericonr against master on the void-packages repository

https://github.com/ericonr/void-packages goclean
https://github.com/void-linux/void-packages/pull/28863

[WIP] srcpkgs/: most Go packages shouldn't have git in hostmakedepends.
Depending on git for building can sometimes happen due to issue #27690,
where instead of using the unpacked tarball, Go clones the package's
repository itself, since the tarball we provided doesn't contain the
go_import_path we pass to it in the command line.

Since we should require as few dependencies as possible, and this
measure can help catch issues of building the wrong version of a Go
package, we remove git from hostmakedepends where possible.

I'm still pulling in packages that do this, will take a while.

A patch file from https://github.com/void-linux/void-packages/pull/28863.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-goclean-28863.patch --]
[-- Type: text/x-diff, Size: 28036 bytes --]

From ba6be94da861854f238bba946e5ddaa7261ffb61 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=C3=89rico=20Rolim?= <erico.erc@gmail.com>
Date: Thu, 18 Feb 2021 19:16:24 -0300
Subject: [PATCH 1/2] srcpkgs/: most Go packages shouldn't have git in
 hostmakedepends.

Depending on git for building can sometimes happen due to issue #27690,
where instead of using the unpacked tarball, Go clones the package's
repository itself, since the tarball we provided doesn't contain the
go_import_path we pass to it in the command line.

Since we should require as few dependencies as possible, and this
measure can help catch issues of building the wrong version of a Go
package, we remove git from hostmakedepends where possible.
---
 srcpkgs/NetAuth-ldap/template       | 1 -
 srcpkgs/NetAuth-localizer/template  | 1 -
 srcpkgs/NetAuth-nsscache/template   | 1 -
 srcpkgs/NetAuth-pam-helper/template | 1 -
 srcpkgs/NetKeys/template            | 1 -
 srcpkgs/PopCorn/template            | 2 +-
 srcpkgs/TerraState/template         | 1 -
 srcpkgs/aerc/template               | 2 +-
 srcpkgs/antibody/template           | 3 +--
 srcpkgs/browserpass/template        | 1 -
 srcpkgs/caddy/template              | 2 +-
 srcpkgs/cdetect/template            | 1 -
 srcpkgs/chezmoi/template            | 3 +--
 srcpkgs/chroma/template             | 1 -
 srcpkgs/clipman/template            | 1 -
 srcpkgs/consul-template/template    | 3 +--
 srcpkgs/consul/template             | 5 ++---
 srcpkgs/coredns/template            | 2 +-
 srcpkgs/crane/template              | 3 +--
 srcpkgs/croc/template               | 1 -
 srcpkgs/dht-node/template           | 1 -
 srcpkgs/dive/template               | 1 -
 srcpkgs/dlayer/template             | 1 -
 srcpkgs/dnote-cli/template          | 1 +
 srcpkgs/elfinfo/template            | 1 -
 srcpkgs/ensure-access/template      | 1 -
 srcpkgs/exercism/template           | 1 -
 srcpkgs/flint/template              | 3 +--
 srcpkgs/forego/template             | 3 +--
 srcpkgs/fzf/template                | 1 -
 srcpkgs/gendesk/template            | 3 +--
 srcpkgs/ghq/template                | 1 -
 srcpkgs/git-lfs/template            | 4 ++--
 srcpkgs/gitbatch/template           | 1 -
 srcpkgs/gitea/template              | 2 +-
 srcpkgs/glide/template              | 1 -
 srcpkgs/glider/template             | 1 -
 srcpkgs/go-ipfs/template            | 6 +++---
 srcpkgs/go-review/template          | 1 -
 srcpkgs/gogs/template               | 1 -
 srcpkgs/gomatrix/template           | 1 -
 srcpkgs/gotop/template              | 1 -
 srcpkgs/gotty/template              | 1 -
 srcpkgs/gucci/template              | 1 -
 srcpkgs/gx-go/template              | 1 -
 srcpkgs/gx/template                 | 1 -
 srcpkgs/hcloud/template             | 1 -
 47 files changed, 20 insertions(+), 58 deletions(-)

diff --git a/srcpkgs/NetAuth-ldap/template b/srcpkgs/NetAuth-ldap/template
index 425ccf49079..c3b11bd6e39 100644
--- a/srcpkgs/NetAuth-ldap/template
+++ b/srcpkgs/NetAuth-ldap/template
@@ -6,7 +6,6 @@ wrksrc=ldap-$version
 build_style=go
 go_import_path=github.com/netauth/ldap
 go_ldflags="-X github.com/netauth/ldap/internal/buildinfo.Version=${version}"
-hostmakedepends="git"
 short_desc="LDAP Proxy for NetAuth"
 maintainer="Michael Aldridge <maldridge@netauth.org>"
 license="MIT"
diff --git a/srcpkgs/NetAuth-localizer/template b/srcpkgs/NetAuth-localizer/template
index 4c97fb966b0..0b8a17fc178 100644
--- a/srcpkgs/NetAuth-localizer/template
+++ b/srcpkgs/NetAuth-localizer/template
@@ -6,7 +6,6 @@ wrksrc=localizer-$version
 build_style=go
 go_import_path=github.com/netauth/localizer
 go_package=${go_import_path}/cmd/localize
-hostmakedepends="git"
 depends="snooze"
 short_desc="Make NetAuth accounts local in Linux"
 maintainer="Michael Aldridge <maldridge@netauth.org>"
diff --git a/srcpkgs/NetAuth-nsscache/template b/srcpkgs/NetAuth-nsscache/template
index a8aabcd5964..b67749be2f8 100644
--- a/srcpkgs/NetAuth-nsscache/template
+++ b/srcpkgs/NetAuth-nsscache/template
@@ -5,7 +5,6 @@ revision=1
 wrksrc="nsscache-$version"
 build_style=go
 go_import_path="github.com/netauth/nsscache"
-hostmakedepends="git"
 short_desc="NetAuth nsscache implementation"
 maintainer="Michael Aldridge <maldridge@netauth.org>"
 license="MIT"
diff --git a/srcpkgs/NetAuth-pam-helper/template b/srcpkgs/NetAuth-pam-helper/template
index 80f362a228e..c8c467d795e 100644
--- a/srcpkgs/NetAuth-pam-helper/template
+++ b/srcpkgs/NetAuth-pam-helper/template
@@ -5,7 +5,6 @@ revision=1
 wrksrc=pam-helper-$version
 build_style=go
 go_import_path="github.com/netauth/pam-helper"
-hostmakedepends="git"
 short_desc="A helper executable to use with pam_exec"
 maintainer="Michael Aldridge <maldridge@VoidLinux.org>"
 license="MIT"
diff --git a/srcpkgs/NetKeys/template b/srcpkgs/NetKeys/template
index 950d26850c4..2ed06b5d127 100644
--- a/srcpkgs/NetKeys/template
+++ b/srcpkgs/NetKeys/template
@@ -5,7 +5,6 @@ revision=1
 wrksrc=netkeys-$version
 build_style=go
 go_import_path="github.com/netauth/netkeys"
-hostmakedepends="git"
 short_desc="Key retrieval daemon for NetAuth"
 maintainer="Michael Aldridge <maldridge@netauth.org>"
 license="MIT"
diff --git a/srcpkgs/PopCorn/template b/srcpkgs/PopCorn/template
index da4bfa9deac..a3cd3893b2b 100644
--- a/srcpkgs/PopCorn/template
+++ b/srcpkgs/PopCorn/template
@@ -8,7 +8,7 @@ go_package="${go_import_path}/cmd/popcorn
  ${go_import_path}/cmd/popcornctl
  ${go_import_path}/cmd/statrepo
  ${go_import_path}/cmd/pqueryd"
-hostmakedepends="git gcc-go-tools"
+hostmakedepends="gcc-go-tools"
 depends="snooze"
 short_desc="Package statistics system"
 maintainer="Michael Aldridge <maldridge@voidlinux.org>"
diff --git a/srcpkgs/TerraState/template b/srcpkgs/TerraState/template
index b4a7b9e6097..599058a6bfa 100644
--- a/srcpkgs/TerraState/template
+++ b/srcpkgs/TerraState/template
@@ -7,7 +7,6 @@ make_dirs="/var/lib/terrastate 0750 _terrastate _terrastate"
 build_style=go
 go_import_path="github.com/the-maldridge/terrastate"
 go_package="${go_import_path}/cmd/terrastate"
-hostmakedepends="git"
 short_desc="Remote state for Terraform"
 maintainer="Michael Aldridge <maldridge@voidlinux.org>"
 license="MIT"
diff --git a/srcpkgs/aerc/template b/srcpkgs/aerc/template
index 08c81ef0d4e..d5ee785e3b2 100644
--- a/srcpkgs/aerc/template
+++ b/srcpkgs/aerc/template
@@ -3,7 +3,7 @@ pkgname=aerc
 version=0.5.2
 revision=1
 build_style=go
-hostmakedepends="scdoc git"
+hostmakedepends="scdoc"
 makedepends="libnotmuch-devel"
 short_desc="Terminal email client"
 maintainer="shtayerc <david.murko@mailbox.org>"
diff --git a/srcpkgs/antibody/template b/srcpkgs/antibody/template
index 7071501830c..df466c33a9c 100644
--- a/srcpkgs/antibody/template
+++ b/srcpkgs/antibody/template
@@ -4,12 +4,11 @@ version=6.1.1
 revision=1
 build_style=go
 go_import_path=github.com/getantibody/antibody
-hostmakedepends="git"
 short_desc="Fast and lightweight shell plugin manager"
 maintainer="SolitudeSF <solitudesf@protonmail.com>"
 license="MIT"
 homepage="https://getantibody.github.io/"
-distfiles="https://${go_import_path}/archive/v${version}.tar.gz"
+distfiles="https://github.com/getantibody/antibody/archive/v${version}.tar.gz"
 checksum=87bced5fba8cf5d587ea803d33dda72e8bcbd4e4c9991a9b40b2de4babbfc24f
 
 post_install() {
diff --git a/srcpkgs/browserpass/template b/srcpkgs/browserpass/template
index b6426a24975..63537def3f4 100644
--- a/srcpkgs/browserpass/template
+++ b/srcpkgs/browserpass/template
@@ -5,7 +5,6 @@ revision=1
 wrksrc="browserpass-native-${version}"
 build_style=go
 go_import_path=github.com/browserpass/browserpass-native
-hostmakedepends="git"
 short_desc="Browser extension for pass"
 maintainer="John <me@johnnynator.dev>"
 license="MIT"
diff --git a/srcpkgs/caddy/template b/srcpkgs/caddy/template
index dbae7057566..c1a2aad2a26 100644
--- a/srcpkgs/caddy/template
+++ b/srcpkgs/caddy/template
@@ -3,9 +3,9 @@ pkgname=caddy
 version=1.0.5
 revision=1
 build_style=go
+# XXX: use caddy/v2 when updating
 go_import_path=github.com/caddyserver/caddy
 go_package="${go_import_path}/caddy"
-hostmakedepends="git"
 short_desc="Fast, cross-platform HTTP/2 web server with automatic HTTPS"
 maintainer="Dominic Monroe <monroef4@googlemail.com>"
 license="Apache-2.0"
diff --git a/srcpkgs/cdetect/template b/srcpkgs/cdetect/template
index b02df3a496e..e859340a9cb 100644
--- a/srcpkgs/cdetect/template
+++ b/srcpkgs/cdetect/template
@@ -4,7 +4,6 @@ version=0.5.4
 revision=1
 build_style=go
 go_import_path=github.com/xyproto/cdetect
-hostmakedepends="git"
 short_desc="Detects the compiler (and version) used to compile an ELF binary"
 maintainer="Orphaned <orphan@voidlinux.org>"
 license="MIT"
diff --git a/srcpkgs/chezmoi/template b/srcpkgs/chezmoi/template
index 5c6d47e5abc..b361ec8b4cf 100644
--- a/srcpkgs/chezmoi/template
+++ b/srcpkgs/chezmoi/template
@@ -7,12 +7,11 @@ go_import_path="github.com/twpayne/chezmoi"
 go_build_tags="noembeddocs noupgrade"
 go_ldflags="-X main.version=${version} -X main.commit=v${version} -X main.builtBy=xbps
  -X github.com/twpayne/chezmoi/cmd.DocsDir=/usr/share/doc/chezmoi"
-hostmakedepends="git"
 short_desc="Manage your dotfiles across multiple machines, securely"
 maintainer="Abigail G <dev@kb6.ee>"
 license="MIT"
 homepage="https://chezmoi.io/"
-distfiles="https://github.com/twpayne/${pkgname}/archive/v${version}.tar.gz"
+distfiles="https://github.com/twpayne/chezmoi/archive/v${version}.tar.gz"
 checksum=23515591028202aaf7af908e38972f156ee08022f535bc74aaa9244b82da2fa1
 
 post_install() {
diff --git a/srcpkgs/chroma/template b/srcpkgs/chroma/template
index 8215a0ac027..38bcbe9c735 100644
--- a/srcpkgs/chroma/template
+++ b/srcpkgs/chroma/template
@@ -6,7 +6,6 @@ build_style=go
 go_import_path="github.com/alecthomas/${pkgname}"
 go_package="${go_import_path}/cmd/chroma"
 go_ldflags="-X main.version=${version} -X main.date=$(date +%Y.%m.%d)"
-hostmakedepends="git"
 short_desc="General purpose syntax highlighter"
 maintainer="Daniel Lewan <vision360.daniel@gmail.com>"
 license="MIT"
diff --git a/srcpkgs/clipman/template b/srcpkgs/clipman/template
index a48999a5004..697655d014f 100644
--- a/srcpkgs/clipman/template
+++ b/srcpkgs/clipman/template
@@ -4,7 +4,6 @@ version=1.5.2
 revision=1
 build_style=go
 go_import_path=github.com/yory8/clipman
-hostmakedepends="git"
 depends="wl-clipboard"
 short_desc="Simple clipboard manager for Wayland"
 maintainer="travankor <travankor@tuta.io>"
diff --git a/srcpkgs/consul-template/template b/srcpkgs/consul-template/template
index 3d490804ba2..874ba30a996 100644
--- a/srcpkgs/consul-template/template
+++ b/srcpkgs/consul-template/template
@@ -3,8 +3,7 @@ pkgname=consul-template
 version=0.25.1
 revision=1
 build_style=go
-go_import_path="github.com/hashicorp/$pkgname"
-hostmakedepends="git"
+go_import_path="github.com/hashicorp/consul-template"
 short_desc="Template rendering, notifier, and supervisor for Consul and Vault data"
 maintainer="Noel Cower <ncower@nil.dev>"
 license="MPL-2.0"
diff --git a/srcpkgs/consul/template b/srcpkgs/consul/template
index e55c4d587fd..9cca1e79827 100644
--- a/srcpkgs/consul/template
+++ b/srcpkgs/consul/template
@@ -3,18 +3,17 @@ pkgname=consul
 version=1.8.4
 revision=1
 build_style=go
-go_import_path="github.com/hashicorp/${pkgname}"
+go_import_path="github.com/hashicorp/consul"
 _git_commit=9ea1a204d832cfd4d8c5cba9df56876a526a4531
 go_ldflags="-X ${go_import_path}/version.GitCommit=${_git_commit} -X ${go_import_path}/version.GitDescribe=v${version}"
 # consul has a vendor directory, but relies on replace statements in go.mod, so
 # force default non-vendor behavior.
 go_mod_mode=default
-hostmakedepends="git"
 short_desc="Distributed solution to connect and configure applications"
 maintainer="iaroki <iaroki@protonmail.com>"
 license="MPL-2.0"
 homepage="https://www.consul.io/"
-distfiles="https://${go_import_path}/archive/v${version}.tar.gz"
+distfiles="https://github.com/hashicorp/consul/archive/v${version}.tar.gz"
 checksum=77d1dfa93da66ccb222049bd892e46f8ddb11516589311fbdc24bd658d64b372
 
 post_install() {
diff --git a/srcpkgs/coredns/template b/srcpkgs/coredns/template
index ebd7f2ce2af..15793229e0e 100644
--- a/srcpkgs/coredns/template
+++ b/srcpkgs/coredns/template
@@ -4,7 +4,7 @@ version=1.7.1
 revision=1
 build_style=go
 go_import_path=github.com/coredns/coredns
-hostmakedepends="git make mmark"
+hostmakedepends="make mmark"
 short_desc="CoreDNS is a DNS server that chains plugins"
 maintainer="Noel Cower <ncower@nil.dev>"
 license="Apache-2.0"
diff --git a/srcpkgs/crane/template b/srcpkgs/crane/template
index 0a19c2a68a8..5a304a9faf7 100644
--- a/srcpkgs/crane/template
+++ b/srcpkgs/crane/template
@@ -3,12 +3,11 @@ pkgname=crane
 version=3.6.0
 revision=1
 build_style=go
-hostmakedepends="git"
 short_desc="Lift containers with ease"
 maintainer="Andrea Brancaleoni <abc@pompel.me>"
 license="MIT"
 go_import_path="github.com/michaelsauter/crane"
-homepage="https://${go_import_path}"
+homepage="https://github.com/michaelsauter/crane"
 distfiles="${homepage}/archive/v${version}.tar.gz"
 checksum=00f202783ae2ef3a2d0e02fba0454defe53e823b4c99e2e3b5af734dc870906e
 
diff --git a/srcpkgs/croc/template b/srcpkgs/croc/template
index 1844acf62e9..acd54bf63b7 100644
--- a/srcpkgs/croc/template
+++ b/srcpkgs/croc/template
@@ -4,7 +4,6 @@ version=8.6.7
 revision=1
 build_style=go
 go_import_path=github.com/schollz/croc/v${version%%.*}
-hostmakedepends="git"
 short_desc="Easily and securely send things from one computer to another"
 maintainer="Benjamín Albiñana <benalb@gmail.com>"
 license="MIT"
diff --git a/srcpkgs/dht-node/template b/srcpkgs/dht-node/template
index 7ae65c38731..981cad27b9e 100644
--- a/srcpkgs/dht-node/template
+++ b/srcpkgs/dht-node/template
@@ -5,7 +5,6 @@ revision=3
 build_style=go
 go_import_path="github.com/ipfs/dht-node"
 go_build_tags="netgo"
-hostmakedepends="git"
 short_desc="IPFS dht node"
 maintainer="lemmi <lemmi@nerd2nerd.org>"
 license="MIT"
diff --git a/srcpkgs/dive/template b/srcpkgs/dive/template
index 9144579660a..488801ff9bb 100644
--- a/srcpkgs/dive/template
+++ b/srcpkgs/dive/template
@@ -4,7 +4,6 @@ version=0.9.2
 revision=1
 build_style=go
 go_import_path="github.com/wagoodman/dive"
-hostmakedepends="git"
 short_desc="Container image exploration tool"
 maintainer="Cameron Nemo <cnemo@tutanota.com>"
 license="MIT"
diff --git a/srcpkgs/dlayer/template b/srcpkgs/dlayer/template
index e754ee8e676..ac5b0a9fd9d 100644
--- a/srcpkgs/dlayer/template
+++ b/srcpkgs/dlayer/template
@@ -4,7 +4,6 @@ version=0.2.4
 revision=1
 build_style=go
 go_import_path=github.com/orisano/dlayer
-hostmakedepends="git"
 short_desc="Dlayer is a docker layer analyzer"
 maintainer="Mate GABRI <iam@theguy.io>"
 license="MIT"
diff --git a/srcpkgs/dnote-cli/template b/srcpkgs/dnote-cli/template
index 309bee7649b..a8b05806bd1 100644
--- a/srcpkgs/dnote-cli/template
+++ b/srcpkgs/dnote-cli/template
@@ -6,6 +6,7 @@ wrksrc="cli-${version}"
 build_style=go
 go_import_path=github.com/dnote-io/cli
 go_build_tags="fts5"
+# XXX: update should switch to Go modules and allow complete removal of these deps
 hostmakedepends="git dep"
 short_desc="Capture what you learn as you code without leaving the command line"
 maintainer="Toyam Cox <Vaelatern@voidlinux.org>"
diff --git a/srcpkgs/elfinfo/template b/srcpkgs/elfinfo/template
index 189d842b001..b354ced06d8 100644
--- a/srcpkgs/elfinfo/template
+++ b/srcpkgs/elfinfo/template
@@ -4,7 +4,6 @@ version=1.1.0
 revision=1
 build_style=go
 go_import_path=github.com/xyproto/elfinfo
-hostmakedepends="git"
 short_desc="Emit basic information about an ELF file"
 maintainer="Alexander F. Rødseth <xyproto@archlinux.org>"
 license="MIT"
diff --git a/srcpkgs/ensure-access/template b/srcpkgs/ensure-access/template
index b5187c8bb4f..9d3abe47630 100644
--- a/srcpkgs/ensure-access/template
+++ b/srcpkgs/ensure-access/template
@@ -4,7 +4,6 @@ version=0.1.0
 revision=1
 build_style=go
 go_import_path=github.com/Noah-Huppert/ensure-access
-hostmakedepends="git"
 short_desc="Tool which ensures permissions exists for files and directories"
 maintainer="Noah Huppert <contact@noahh.io>"
 license="MIT"
diff --git a/srcpkgs/exercism/template b/srcpkgs/exercism/template
index eb696027500..5869f87dbce 100644
--- a/srcpkgs/exercism/template
+++ b/srcpkgs/exercism/template
@@ -6,7 +6,6 @@ wrksrc="cli-${version}"
 build_style=go
 go_import_path="github.com/exercism/cli"
 go_package="${go_import_path}/exercism"
-hostmakedepends="git"
 short_desc="Command line tool for exercism.io"
 maintainer="SolitudeSF <solitudesf@protonmail.com>"
 license="MIT"
diff --git a/srcpkgs/flint/template b/srcpkgs/flint/template
index 1b8ae9d964c..a04ca9e022d 100644
--- a/srcpkgs/flint/template
+++ b/srcpkgs/flint/template
@@ -3,12 +3,11 @@ pkgname=flint
 version=0.1.0
 revision=9
 build_style=go
-hostmakedepends="git"
 short_desc="Check your project for common sources of contributor friction"
 maintainer="Andrea Brancaleoni <abc@pompel.me>"
 license="MIT"
 go_import_path="github.com/pengwynn/flint"
-homepage="https://${go_import_path}"
+homepage="https://github.com/pengwynn/flint"
 distfiles="${homepage}/archive/v${version}.tar.gz"
 checksum=ec865ec5cad191c7fc9c7c6d5007754372696a708825627383913367f3ef8b7f
 
diff --git a/srcpkgs/forego/template b/srcpkgs/forego/template
index 6f239f15efc..ff43b86fd7c 100644
--- a/srcpkgs/forego/template
+++ b/srcpkgs/forego/template
@@ -3,11 +3,10 @@ pkgname=forego
 version=20180216151118
 revision=5
 build_style=go
-hostmakedepends="git mercurial"
 short_desc="A process supervisor in Go"
 maintainer="Andrea Brancaleoni <abc@pompel.me>"
 license="Apache-2.0"
 go_import_path="github.com/ddollar/forego"
-homepage="https://$go_import_path"
+homepage="https://github.com/ddollar/forego"
 distfiles="$homepage/archive/$version.tar.gz"
 checksum=23119550cc0e45191495823aebe28b42291db6de89932442326340042359b43d
diff --git a/srcpkgs/fzf/template b/srcpkgs/fzf/template
index b0b841a7a6a..eb02c545f5e 100644
--- a/srcpkgs/fzf/template
+++ b/srcpkgs/fzf/template
@@ -4,7 +4,6 @@ version=0.25.1
 revision=1
 build_style=go
 go_import_path="github.com/junegunn/fzf"
-hostmakedepends="git"
 makedepends="ncurses-devel"
 short_desc="Command-line fuzzy finder"
 maintainer="Leah Neukirchen <leah@vuxu.org>"
diff --git a/srcpkgs/gendesk/template b/srcpkgs/gendesk/template
index 1c2d600d23d..3ba71439b59 100644
--- a/srcpkgs/gendesk/template
+++ b/srcpkgs/gendesk/template
@@ -5,12 +5,11 @@ revision=1
 build_style=go
 go_import_path=github.com/xyproto/gendesk
 go_mod_mode=default
-hostmakedepends="git"
 short_desc="Utility to generate .desktop files and download icons"
 maintainer="Benjamín Albiñana <benalb@gmail.com>"
 license="MIT"
 homepage="http://roboticoverlords.org/gendesk/"
-distfiles="https://github.com/xyproto/${pkgname}/archive/${version}.tar.gz
+distfiles="https://github.com/xyproto/gendesk/archive/${version}.tar.gz
  http://roboticoverlords.org/images/default.png"
 checksum="924606ca1c15a140b70f363c4a0ac46fb3ad4d05bc39db400d0b0e41dd4456bb
  4d96eded48e536d02e35727c36dc20844c2e44654e81baf78e10aee4eb48e837"
diff --git a/srcpkgs/ghq/template b/srcpkgs/ghq/template
index 029cc3fbf9f..3ede66246fd 100644
--- a/srcpkgs/ghq/template
+++ b/srcpkgs/ghq/template
@@ -5,7 +5,6 @@ revision=1
 build_style=go
 go_import_path=github.com/x-motemen/ghq
 go_package="$go_import_path"
-hostmakedepends="git"
 depends="git"
 short_desc="Remote repository management made easy"
 maintainer="Dominic Monroe <monroef4@googlemail.com>"
diff --git a/srcpkgs/git-lfs/template b/srcpkgs/git-lfs/template
index 588d7fe9aa3..4a603a6bd5d 100644
--- a/srcpkgs/git-lfs/template
+++ b/srcpkgs/git-lfs/template
@@ -4,12 +4,12 @@ version=2.12.1
 revision=1
 build_style=go
 go_import_path="github.com/git-lfs/git-lfs"
-hostmakedepends="git ruby-ronn"
+hostmakedepends="ruby-ronn"
 short_desc="Git extension for versioning large files"
 maintainer="Michael Aldridge <maldridge@voidlinux.org>"
 license="MIT"
 homepage="https://git-lfs.github.com/"
-distfiles="https://github.com/git-lfs/${pkgname}/archive/v${version}.tar.gz"
+distfiles="https://github.com/git-lfs/git-lfs/archive/v${version}.tar.gz"
 checksum=2b2e70f1233f7efe9a010771510391a07527ec7c0af721ecf8edabac5d60f62b
 
 post_build() {
diff --git a/srcpkgs/gitbatch/template b/srcpkgs/gitbatch/template
index 4464729f2b8..df26ed89b19 100644
--- a/srcpkgs/gitbatch/template
+++ b/srcpkgs/gitbatch/template
@@ -4,7 +4,6 @@ version=0.5.0
 revision=1
 build_style=go
 go_import_path=github.com/isacikgoz/gitbatch
-hostmakedepends="git"
 short_desc="Command line tool to manage your git repositories in one place"
 maintainer="0x0f0f0f <sudo-woodo3@protonmail.com>"
 license="MIT"
diff --git a/srcpkgs/gitea/template b/srcpkgs/gitea/template
index ed6d4e9ce10..250488c99fd 100644
--- a/srcpkgs/gitea/template
+++ b/srcpkgs/gitea/template
@@ -23,7 +23,7 @@ go_ldflags=" -X main.Version=${version}"
 #     rather not use SQLite3 for some reason.  It is also potentially
 #     more resiliant to corrupted writes.
 go_build_tags="bindata sqlite pam tidb"
-hostmakedepends="go-bindata git"
+hostmakedepends="go-bindata"
 makedepends="sqlite-devel pam-devel"
 depends="git bash"
 short_desc="Git with a cup of Tea"
diff --git a/srcpkgs/glide/template b/srcpkgs/glide/template
index 635084f7098..15948753606 100644
--- a/srcpkgs/glide/template
+++ b/srcpkgs/glide/template
@@ -4,7 +4,6 @@ version=0.13.3
 revision=1
 build_style=go
 go_import_path="github.com/Masterminds/glide"
-hostmakedepends="git"
 depends="go git"
 short_desc="Vendor package management for golang"
 maintainer="ananteris <ananteris@protonmail.ch>"
diff --git a/srcpkgs/glider/template b/srcpkgs/glider/template
index e132cfda4b7..36282560269 100644
--- a/srcpkgs/glider/template
+++ b/srcpkgs/glider/template
@@ -4,7 +4,6 @@ version=0.13.0
 revision=1
 build_style=go
 go_import_path=github.com/nadoo/glider
-hostmakedepends="git"
 short_desc="Forward proxy with multiple protocols support"
 maintainer="whoami <whoami@systemli.org>"
 license="GPL-3.0-or-later"
diff --git a/srcpkgs/go-ipfs/template b/srcpkgs/go-ipfs/template
index 4f0a7e98403..088a5d520ab 100644
--- a/srcpkgs/go-ipfs/template
+++ b/srcpkgs/go-ipfs/template
@@ -3,16 +3,15 @@ pkgname=go-ipfs
 version=0.7.0
 revision=2
 build_style=go
-go_import_path="github.com/ipfs/${pkgname}"
+go_import_path="github.com/ipfs/go-ipfs"
 go_package="${go_import_path}/cmd/ipfs"
-hostmakedepends="git"
 depends="fs-repo-migrations>=1.6.4"
 short_desc="Global versioned P2P merkle DAG file system"
 maintainer="Christopher Brannon <chris@the-brannons.com>"
 license="MIT, Apache-2.0"
 homepage="https://ipfs.io"
 changelog="https://github.com/ipfs/go-ipfs/blob/master/CHANGELOG.md"
-distfiles="https://${go_import_path}/archive/v${version}.tar.gz"
+distfiles="https://github.com/ipfs/go-ipfs/archive/v${version}.tar.gz"
 checksum=152986ebb30657ab706bee708fbe929114f5e8c39fbe602e3bbec93fe74c9123
 
 system_accounts="_ipfs"
@@ -20,6 +19,7 @@ make_dirs="/var/lib/ipfs 0700 _ipfs _ipfs"
 _ipfs_homedir="/var/lib/ipfs"
 
 pre_build() {
+	# XXX: try to use buildmode=pie instead
 	if [ "$CROSS_BUILD" ]; then
 		export CGO_ENABLED=0
 	fi
diff --git a/srcpkgs/go-review/template b/srcpkgs/go-review/template
index b352545bedb..907a214d401 100644
--- a/srcpkgs/go-review/template
+++ b/srcpkgs/go-review/template
@@ -5,7 +5,6 @@ revision=1
 build_style=go
 go_import_path="github.com/heppu/go-review"
 go_package="${go_import_path}/cmd/${pkgname}"
-hostmakedepends="git"
 short_desc="Publish reports from different Go linters as gerrit reviews"
 maintainer="Renato Aguiar <renato@renatoaguiar.net>"
 license="MIT"
diff --git a/srcpkgs/gogs/template b/srcpkgs/gogs/template
index 3dc6ebdb674..616e33c1c89 100644
--- a/srcpkgs/gogs/template
+++ b/srcpkgs/gogs/template
@@ -5,7 +5,6 @@ revision=1
 build_style=go
 go_import_path=gogs.io/gogs
 go_build_tags="sqlite pam cert"
-hostmakedepends="git curl"
 makedepends="pam-devel"
 depends="git"
 short_desc="Self-hosted Git Service in Go"
diff --git a/srcpkgs/gomatrix/template b/srcpkgs/gomatrix/template
index fae7a4343ed..eb9d6e7beda 100644
--- a/srcpkgs/gomatrix/template
+++ b/srcpkgs/gomatrix/template
@@ -4,7 +4,6 @@ version=101.0.0
 revision=1
 build_style=go
 go_import_path=github.com/GeertJohan/gomatrix
-hostmakedepends="git"
 short_desc="Terminal Matrix display in golang"
 maintainer="Alex Childs <misuchiru03+void@gmail.com>"
 license="BSD-2-Clause"
diff --git a/srcpkgs/gotop/template b/srcpkgs/gotop/template
index 3566a8d9a78..1b744987057 100644
--- a/srcpkgs/gotop/template
+++ b/srcpkgs/gotop/template
@@ -6,7 +6,6 @@ build_style=go
 go_ldflags="-X main.Version=v${version}"
 go_import_path="github.com/xxxserxxx/gotop/v4"
 go_package="$go_import_path/cmd/gotop"
-hostmakedepends="git"
 short_desc="Terminal based graphical activity monitor"
 maintainer="SolitudeSF <solitudesf@protonmail.com>"
 license="MIT"
diff --git a/srcpkgs/gotty/template b/srcpkgs/gotty/template
index 0e5d268e992..58fc0572197 100644
--- a/srcpkgs/gotty/template
+++ b/srcpkgs/gotty/template
@@ -4,7 +4,6 @@ version=1.0.1
 revision=8
 build_style=go
 go_import_path="github.com/yudai/gotty"
-hostmakedepends="git"
 short_desc="Share your terminal as a web application"
 maintainer="Diogo Leal <diogo@diogoleal.com>"
 license="MIT"
diff --git a/srcpkgs/gucci/template b/srcpkgs/gucci/template
index fb10a6ca866..15023fe603c 100644
--- a/srcpkgs/gucci/template
+++ b/srcpkgs/gucci/template
@@ -4,7 +4,6 @@ version=1.2.4
 revision=1
 build_style=go
 go_import_path="github.com/noqcks/gucci"
-hostmakedepends="git"
 short_desc="Simple CLI templating tool written in Go"
 maintainer="Leah Neukirchen <leah@vuxu.org>"
 license="MIT"
diff --git a/srcpkgs/gx-go/template b/srcpkgs/gx-go/template
index b06ced23433..9294a2f143f 100644
--- a/srcpkgs/gx-go/template
+++ b/srcpkgs/gx-go/template
@@ -4,7 +4,6 @@ version=1.9.0
 revision=1
 build_style=go
 go_import_path="github.com/whyrusleeping/gx-go"
-hostmakedepends="git"
 depends="gx"
 short_desc="A subtool for the gx package manager for packages written in go"
 maintainer="lemmi <lemmi@nerd2nerd.org>"
diff --git a/srcpkgs/gx/template b/srcpkgs/gx/template
index ff3ea0267c8..7414b6bab10 100644
--- a/srcpkgs/gx/template
+++ b/srcpkgs/gx/template
@@ -4,7 +4,6 @@ version=0.14.3
 revision=1
 build_style=go
 go_import_path="github.com/whyrusleeping/gx"
-hostmakedepends="git"
 short_desc="Language-agnostic, universal package manager around IPFS"
 maintainer="lemmi <lemmi@nerd2nerd.org>"
 license="MIT"
diff --git a/srcpkgs/hcloud/template b/srcpkgs/hcloud/template
index 8a7aecc2504..628dbf69a14 100644
--- a/srcpkgs/hcloud/template
+++ b/srcpkgs/hcloud/template
@@ -7,7 +7,6 @@ build_style=go
 go_import_path=github.com/hetznercloud/cli
 go_package=github.com/hetznercloud/cli/cmd/hcloud
 go_ldflags="-X github.com/hetznercloud/cli.Version=${version}"
-hostmakedepends="git"
 short_desc="Command-line interface for Hetzner Cloud"
 maintainer="Gerardo Di Iorio <arete74@gmail.com>"
 license="MIT"

From a5b749c68d17fd7cddb50a8b4c2425f852d8ee1e Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=C3=89rico=20Rolim?= <erico.erc@gmail.com>
Date: Thu, 18 Feb 2021 23:25:27 -0300
Subject: [PATCH 2/2] gucci: fix checksum.

Upstream force pushed the same tag, so checksum for the tarball changed.
Only changes were timestamps for files and some small differences in
their .travis.yml file, which doesn't affect the build.
---
 srcpkgs/gucci/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/gucci/template b/srcpkgs/gucci/template
index 15023fe603c..78d69033db7 100644
--- a/srcpkgs/gucci/template
+++ b/srcpkgs/gucci/template
@@ -9,7 +9,7 @@ maintainer="Leah Neukirchen <leah@vuxu.org>"
 license="MIT"
 homepage="https://github.com/noqcks/gucci"
 distfiles="https://github.com/noqcks/gucci/archive/${version}.tar.gz"
-checksum=7ce8967cb83eddb8db6878a9f00a96996f7503fb0a5ee01fa9e1947d2444ead8
+checksum=50d9d513fff97128bbd92685af5b244cbc1453e79010fb2b1aea51c84d478855
 
 post_install() {
 	vlicense LICENSE

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PR PATCH] [Updated] [WIP] srcpkgs/: most Go packages shouldn't have git in hostmakedepends.
  2021-02-18 22:20 [PR PATCH] [WIP] srcpkgs/: most Go packages shouldn't have git in hostmakedepends ericonr
  2021-02-19  2:27 ` [PR PATCH] [Updated] " ericonr
@ 2021-02-19  3:34 ` ericonr
  2021-02-19  4:32 ` ericonr
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: ericonr @ 2021-02-19  3:34 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 888 bytes --]

There is an updated pull request by ericonr against master on the void-packages repository

https://github.com/ericonr/void-packages goclean
https://github.com/void-linux/void-packages/pull/28863

[WIP] srcpkgs/: most Go packages shouldn't have git in hostmakedepends.
Depending on git for building can sometimes happen due to issue #27690,
where instead of using the unpacked tarball, Go clones the package's
repository itself, since the tarball we provided doesn't contain the
go_import_path we pass to it in the command line.

Since we should require as few dependencies as possible, and this
measure can help catch issues of building the wrong version of a Go
package, we remove git from hostmakedepends where possible.

I'm still pulling in packages that do this, will take a while.

A patch file from https://github.com/void-linux/void-packages/pull/28863.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-goclean-28863.patch --]
[-- Type: text/x-diff, Size: 39688 bytes --]

From 7970a5fde955a28bf45f5c8a1acae53192493bc8 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=C3=89rico=20Rolim?= <erico.erc@gmail.com>
Date: Thu, 18 Feb 2021 23:25:27 -0300
Subject: [PATCH 1/5] gucci: fix checksum.

Upstream force pushed the same tag, so checksum for the tarball changed.
Only changes were timestamps for files and some small differences in
their .travis.yml file, which doesn't affect the build.
---
 srcpkgs/gucci/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/gucci/template b/srcpkgs/gucci/template
index fb10a6ca866..fd3f94cdf7e 100644
--- a/srcpkgs/gucci/template
+++ b/srcpkgs/gucci/template
@@ -10,7 +10,7 @@ maintainer="Leah Neukirchen <leah@vuxu.org>"
 license="MIT"
 homepage="https://github.com/noqcks/gucci"
 distfiles="https://github.com/noqcks/gucci/archive/${version}.tar.gz"
-checksum=7ce8967cb83eddb8db6878a9f00a96996f7503fb0a5ee01fa9e1947d2444ead8
+checksum=50d9d513fff97128bbd92685af5b244cbc1453e79010fb2b1aea51c84d478855
 
 post_install() {
 	vlicense LICENSE

From c95fc0a3d0a27f2e5e3664a818eb2d4ed4c3d970 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=C3=89rico=20Rolim?= <erico.erc@gmail.com>
Date: Thu, 18 Feb 2021 23:57:10 -0300
Subject: [PATCH 2/5] hydroxide: set correct go_import_path and use go_package.

---
 srcpkgs/hydroxide/template | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/hydroxide/template b/srcpkgs/hydroxide/template
index 86cc09417aa..b3011181386 100644
--- a/srcpkgs/hydroxide/template
+++ b/srcpkgs/hydroxide/template
@@ -3,8 +3,8 @@ pkgname=hydroxide
 version=0.2.17
 revision=1
 build_style=go
-go_import_path=github.com/emersion/hydroxide/cmd/hydroxide
-hostmakedepends="git"
+go_import_path=github.com/emersion/hydroxide
+go_package=$go_import_path/cmd/hydroxide
 short_desc="Third-party, open-source ProtonMail CardDAV, IMAP and SMTP bridge"
 maintainer="DirectorX <void.directorx@protonmail.com>"
 license="MIT"

From ac3f4baef812ef7f4c6ae9769326c271b9d27481 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=C3=89rico=20Rolim?= <erico.erc@gmail.com>
Date: Thu, 18 Feb 2021 23:59:56 -0300
Subject: [PATCH 3/5] ipfs-cluster: clean up unnecessary hostmakedepends

At least gx-go seems to have been forgotten in commit
31effcb4a1a21b4b0e209ba2618365ef17c0cc41, which removed the commands
using gx from pre_build.
---
 srcpkgs/ipfs-cluster/template | 1 -
 1 file changed, 1 deletion(-)

diff --git a/srcpkgs/ipfs-cluster/template b/srcpkgs/ipfs-cluster/template
index 281a5d1239e..27e6d6aad94 100644
--- a/srcpkgs/ipfs-cluster/template
+++ b/srcpkgs/ipfs-cluster/template
@@ -5,7 +5,6 @@ revision=1
 build_style=go
 go_import_path="github.com/ipfs/ipfs-cluster"
 go_package="${go_import_path}/cmd/ipfs-cluster-ctl ${go_import_path}/cmd/ipfs-cluster-service"
-hostmakedepends="git wget gx-go"
 depends="go-ipfs"
 short_desc="Collective pinning and composition for IPFS"
 maintainer="Toyam Cox <Vaelatern@voidlinux.org>"

From 53f48c16f5a19d07f527c5d802cf7ae5ac017eba Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=C3=89rico=20Rolim?= <erico.erc@gmail.com>
Date: Fri, 19 Feb 2021 00:22:05 -0300
Subject: [PATCH 4/5] miniflux: use correct go_import_path.

Also use ChangeLog from master and fix homepage.
---
 srcpkgs/miniflux/template | 10 ++++------
 1 file changed, 4 insertions(+), 6 deletions(-)

diff --git a/srcpkgs/miniflux/template b/srcpkgs/miniflux/template
index aa50315ece7..0bef52b6dc3 100644
--- a/srcpkgs/miniflux/template
+++ b/srcpkgs/miniflux/template
@@ -1,18 +1,16 @@
 # Template file for 'miniflux'
 pkgname=miniflux
 version=2.0.27
-revision=1
+revision=2
 wrksrc="v2-${version}"
 build_style=go
-go_import_path="github.com/miniflux/miniflux"
-go_package="miniflux.app"
-hostmakedepends="git"
+go_import_path="miniflux.app"
 short_desc="Minimalist and opinionated feed reader written in Go"
 maintainer="Frank Steinborn <steinex@nognu.de>"
 license="Apache-2.0"
 homepage="https://miniflux.app"
-changelog="https://raw.githubusercontent.com/miniflux/miniflux/${version}/ChangeLog"
-distfiles="https://github.com/miniflux/miniflux/archive/${version}.tar.gz"
+changelog="https://raw.githubusercontent.com/miniflux/v2/master/ChangeLog"
+distfiles="https://github.com/miniflux/v2/archive/${version}.tar.gz"
 checksum=ec6696b1cf41ef50b76d02d1179838e03d9c3bcb3dce48febe2b5f4ecc450473
 system_accounts="_miniflux"
 

From c0c4abf3126646505bd0563be397d95034126a67 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=C3=89rico=20Rolim?= <erico.erc@gmail.com>
Date: Thu, 18 Feb 2021 19:16:24 -0300
Subject: [PATCH 5/5] srcpkgs/: most Go packages shouldn't have git in
 hostmakedepends.

Depending on git for building can sometimes happen due to issue #27690,
where instead of using the unpacked tarball, Go clones the package's
repository itself, since the tarball we provided doesn't contain the
go_import_path we pass to it in the command line.

Since we should require as few dependencies as possible, and this
measure can help catch issues of building the wrong version of a Go
package, we remove git from hostmakedepends where possible.

Also fix small discrepancies in homepage, expand some variables and fix
some inconsequential typos.
---
 srcpkgs/NetAuth-ldap/template       | 1 -
 srcpkgs/NetAuth-localizer/template  | 1 -
 srcpkgs/NetAuth-nsscache/template   | 1 -
 srcpkgs/NetAuth-pam-helper/template | 1 -
 srcpkgs/NetKeys/template            | 1 -
 srcpkgs/PopCorn/template            | 2 +-
 srcpkgs/TerraState/template         | 1 -
 srcpkgs/aerc/template               | 2 +-
 srcpkgs/antibody/template           | 3 +--
 srcpkgs/browserpass/template        | 1 -
 srcpkgs/caddy/template              | 2 +-
 srcpkgs/cdetect/template            | 1 -
 srcpkgs/chezmoi/template            | 3 +--
 srcpkgs/chroma/template             | 1 -
 srcpkgs/clipman/template            | 1 -
 srcpkgs/consul-template/template    | 3 +--
 srcpkgs/consul/template             | 5 ++---
 srcpkgs/coredns/template            | 2 +-
 srcpkgs/crane/template              | 3 +--
 srcpkgs/croc/template               | 1 -
 srcpkgs/dht-node/template           | 1 -
 srcpkgs/dive/template               | 1 -
 srcpkgs/dlayer/template             | 1 -
 srcpkgs/elfinfo/template            | 1 -
 srcpkgs/ensure-access/template      | 1 -
 srcpkgs/exercism/template           | 1 -
 srcpkgs/flint/template              | 3 +--
 srcpkgs/forego/template             | 3 +--
 srcpkgs/fzf/template                | 1 -
 srcpkgs/gendesk/template            | 3 +--
 srcpkgs/ghq/template                | 1 -
 srcpkgs/git-lfs/template            | 4 ++--
 srcpkgs/gitbatch/template           | 1 -
 srcpkgs/gitea/template              | 2 +-
 srcpkgs/glide/template              | 1 -
 srcpkgs/glider/template             | 1 -
 srcpkgs/go-ipfs/template            | 6 +++---
 srcpkgs/go-review/template          | 1 -
 srcpkgs/gogs/template               | 1 -
 srcpkgs/gomatrix/template           | 1 -
 srcpkgs/gotop/template              | 1 -
 srcpkgs/gotty/template              | 1 -
 srcpkgs/gucci/template              | 1 -
 srcpkgs/gx-go/template              | 1 -
 srcpkgs/gx/template                 | 1 -
 srcpkgs/hcloud/template             | 1 -
 srcpkgs/hey/template                | 1 -
 srcpkgs/hooktftp/template           | 1 -
 srcpkgs/hugo/template               | 5 ++---
 srcpkgs/jid/template                | 1 -
 srcpkgs/jj/template                 | 1 -
 srcpkgs/joker/template              | 1 -
 srcpkgs/jump/template               | 1 -
 srcpkgs/keybase/template            | 1 -
 srcpkgs/lazygit/template            | 1 -
 srcpkgs/lego/template               | 5 ++---
 srcpkgs/licensechecker/template     | 1 +
 srcpkgs/lxd/template                | 2 +-
 srcpkgs/massren/template            | 4 ++--
 srcpkgs/micro/template              | 3 +--
 srcpkgs/minio/template              | 1 -
 srcpkgs/mmark/template              | 1 -
 62 files changed, 28 insertions(+), 79 deletions(-)

diff --git a/srcpkgs/NetAuth-ldap/template b/srcpkgs/NetAuth-ldap/template
index 425ccf49079..c3b11bd6e39 100644
--- a/srcpkgs/NetAuth-ldap/template
+++ b/srcpkgs/NetAuth-ldap/template
@@ -6,7 +6,6 @@ wrksrc=ldap-$version
 build_style=go
 go_import_path=github.com/netauth/ldap
 go_ldflags="-X github.com/netauth/ldap/internal/buildinfo.Version=${version}"
-hostmakedepends="git"
 short_desc="LDAP Proxy for NetAuth"
 maintainer="Michael Aldridge <maldridge@netauth.org>"
 license="MIT"
diff --git a/srcpkgs/NetAuth-localizer/template b/srcpkgs/NetAuth-localizer/template
index 4c97fb966b0..0b8a17fc178 100644
--- a/srcpkgs/NetAuth-localizer/template
+++ b/srcpkgs/NetAuth-localizer/template
@@ -6,7 +6,6 @@ wrksrc=localizer-$version
 build_style=go
 go_import_path=github.com/netauth/localizer
 go_package=${go_import_path}/cmd/localize
-hostmakedepends="git"
 depends="snooze"
 short_desc="Make NetAuth accounts local in Linux"
 maintainer="Michael Aldridge <maldridge@netauth.org>"
diff --git a/srcpkgs/NetAuth-nsscache/template b/srcpkgs/NetAuth-nsscache/template
index a8aabcd5964..b67749be2f8 100644
--- a/srcpkgs/NetAuth-nsscache/template
+++ b/srcpkgs/NetAuth-nsscache/template
@@ -5,7 +5,6 @@ revision=1
 wrksrc="nsscache-$version"
 build_style=go
 go_import_path="github.com/netauth/nsscache"
-hostmakedepends="git"
 short_desc="NetAuth nsscache implementation"
 maintainer="Michael Aldridge <maldridge@netauth.org>"
 license="MIT"
diff --git a/srcpkgs/NetAuth-pam-helper/template b/srcpkgs/NetAuth-pam-helper/template
index 80f362a228e..c8c467d795e 100644
--- a/srcpkgs/NetAuth-pam-helper/template
+++ b/srcpkgs/NetAuth-pam-helper/template
@@ -5,7 +5,6 @@ revision=1
 wrksrc=pam-helper-$version
 build_style=go
 go_import_path="github.com/netauth/pam-helper"
-hostmakedepends="git"
 short_desc="A helper executable to use with pam_exec"
 maintainer="Michael Aldridge <maldridge@VoidLinux.org>"
 license="MIT"
diff --git a/srcpkgs/NetKeys/template b/srcpkgs/NetKeys/template
index 950d26850c4..2ed06b5d127 100644
--- a/srcpkgs/NetKeys/template
+++ b/srcpkgs/NetKeys/template
@@ -5,7 +5,6 @@ revision=1
 wrksrc=netkeys-$version
 build_style=go
 go_import_path="github.com/netauth/netkeys"
-hostmakedepends="git"
 short_desc="Key retrieval daemon for NetAuth"
 maintainer="Michael Aldridge <maldridge@netauth.org>"
 license="MIT"
diff --git a/srcpkgs/PopCorn/template b/srcpkgs/PopCorn/template
index da4bfa9deac..a3cd3893b2b 100644
--- a/srcpkgs/PopCorn/template
+++ b/srcpkgs/PopCorn/template
@@ -8,7 +8,7 @@ go_package="${go_import_path}/cmd/popcorn
  ${go_import_path}/cmd/popcornctl
  ${go_import_path}/cmd/statrepo
  ${go_import_path}/cmd/pqueryd"
-hostmakedepends="git gcc-go-tools"
+hostmakedepends="gcc-go-tools"
 depends="snooze"
 short_desc="Package statistics system"
 maintainer="Michael Aldridge <maldridge@voidlinux.org>"
diff --git a/srcpkgs/TerraState/template b/srcpkgs/TerraState/template
index b4a7b9e6097..599058a6bfa 100644
--- a/srcpkgs/TerraState/template
+++ b/srcpkgs/TerraState/template
@@ -7,7 +7,6 @@ make_dirs="/var/lib/terrastate 0750 _terrastate _terrastate"
 build_style=go
 go_import_path="github.com/the-maldridge/terrastate"
 go_package="${go_import_path}/cmd/terrastate"
-hostmakedepends="git"
 short_desc="Remote state for Terraform"
 maintainer="Michael Aldridge <maldridge@voidlinux.org>"
 license="MIT"
diff --git a/srcpkgs/aerc/template b/srcpkgs/aerc/template
index 08c81ef0d4e..d5ee785e3b2 100644
--- a/srcpkgs/aerc/template
+++ b/srcpkgs/aerc/template
@@ -3,7 +3,7 @@ pkgname=aerc
 version=0.5.2
 revision=1
 build_style=go
-hostmakedepends="scdoc git"
+hostmakedepends="scdoc"
 makedepends="libnotmuch-devel"
 short_desc="Terminal email client"
 maintainer="shtayerc <david.murko@mailbox.org>"
diff --git a/srcpkgs/antibody/template b/srcpkgs/antibody/template
index 7071501830c..df466c33a9c 100644
--- a/srcpkgs/antibody/template
+++ b/srcpkgs/antibody/template
@@ -4,12 +4,11 @@ version=6.1.1
 revision=1
 build_style=go
 go_import_path=github.com/getantibody/antibody
-hostmakedepends="git"
 short_desc="Fast and lightweight shell plugin manager"
 maintainer="SolitudeSF <solitudesf@protonmail.com>"
 license="MIT"
 homepage="https://getantibody.github.io/"
-distfiles="https://${go_import_path}/archive/v${version}.tar.gz"
+distfiles="https://github.com/getantibody/antibody/archive/v${version}.tar.gz"
 checksum=87bced5fba8cf5d587ea803d33dda72e8bcbd4e4c9991a9b40b2de4babbfc24f
 
 post_install() {
diff --git a/srcpkgs/browserpass/template b/srcpkgs/browserpass/template
index b6426a24975..63537def3f4 100644
--- a/srcpkgs/browserpass/template
+++ b/srcpkgs/browserpass/template
@@ -5,7 +5,6 @@ revision=1
 wrksrc="browserpass-native-${version}"
 build_style=go
 go_import_path=github.com/browserpass/browserpass-native
-hostmakedepends="git"
 short_desc="Browser extension for pass"
 maintainer="John <me@johnnynator.dev>"
 license="MIT"
diff --git a/srcpkgs/caddy/template b/srcpkgs/caddy/template
index dbae7057566..c1a2aad2a26 100644
--- a/srcpkgs/caddy/template
+++ b/srcpkgs/caddy/template
@@ -3,9 +3,9 @@ pkgname=caddy
 version=1.0.5
 revision=1
 build_style=go
+# XXX: use caddy/v2 when updating
 go_import_path=github.com/caddyserver/caddy
 go_package="${go_import_path}/caddy"
-hostmakedepends="git"
 short_desc="Fast, cross-platform HTTP/2 web server with automatic HTTPS"
 maintainer="Dominic Monroe <monroef4@googlemail.com>"
 license="Apache-2.0"
diff --git a/srcpkgs/cdetect/template b/srcpkgs/cdetect/template
index b02df3a496e..e859340a9cb 100644
--- a/srcpkgs/cdetect/template
+++ b/srcpkgs/cdetect/template
@@ -4,7 +4,6 @@ version=0.5.4
 revision=1
 build_style=go
 go_import_path=github.com/xyproto/cdetect
-hostmakedepends="git"
 short_desc="Detects the compiler (and version) used to compile an ELF binary"
 maintainer="Orphaned <orphan@voidlinux.org>"
 license="MIT"
diff --git a/srcpkgs/chezmoi/template b/srcpkgs/chezmoi/template
index 5c6d47e5abc..b361ec8b4cf 100644
--- a/srcpkgs/chezmoi/template
+++ b/srcpkgs/chezmoi/template
@@ -7,12 +7,11 @@ go_import_path="github.com/twpayne/chezmoi"
 go_build_tags="noembeddocs noupgrade"
 go_ldflags="-X main.version=${version} -X main.commit=v${version} -X main.builtBy=xbps
  -X github.com/twpayne/chezmoi/cmd.DocsDir=/usr/share/doc/chezmoi"
-hostmakedepends="git"
 short_desc="Manage your dotfiles across multiple machines, securely"
 maintainer="Abigail G <dev@kb6.ee>"
 license="MIT"
 homepage="https://chezmoi.io/"
-distfiles="https://github.com/twpayne/${pkgname}/archive/v${version}.tar.gz"
+distfiles="https://github.com/twpayne/chezmoi/archive/v${version}.tar.gz"
 checksum=23515591028202aaf7af908e38972f156ee08022f535bc74aaa9244b82da2fa1
 
 post_install() {
diff --git a/srcpkgs/chroma/template b/srcpkgs/chroma/template
index 8215a0ac027..38bcbe9c735 100644
--- a/srcpkgs/chroma/template
+++ b/srcpkgs/chroma/template
@@ -6,7 +6,6 @@ build_style=go
 go_import_path="github.com/alecthomas/${pkgname}"
 go_package="${go_import_path}/cmd/chroma"
 go_ldflags="-X main.version=${version} -X main.date=$(date +%Y.%m.%d)"
-hostmakedepends="git"
 short_desc="General purpose syntax highlighter"
 maintainer="Daniel Lewan <vision360.daniel@gmail.com>"
 license="MIT"
diff --git a/srcpkgs/clipman/template b/srcpkgs/clipman/template
index a48999a5004..697655d014f 100644
--- a/srcpkgs/clipman/template
+++ b/srcpkgs/clipman/template
@@ -4,7 +4,6 @@ version=1.5.2
 revision=1
 build_style=go
 go_import_path=github.com/yory8/clipman
-hostmakedepends="git"
 depends="wl-clipboard"
 short_desc="Simple clipboard manager for Wayland"
 maintainer="travankor <travankor@tuta.io>"
diff --git a/srcpkgs/consul-template/template b/srcpkgs/consul-template/template
index 3d490804ba2..874ba30a996 100644
--- a/srcpkgs/consul-template/template
+++ b/srcpkgs/consul-template/template
@@ -3,8 +3,7 @@ pkgname=consul-template
 version=0.25.1
 revision=1
 build_style=go
-go_import_path="github.com/hashicorp/$pkgname"
-hostmakedepends="git"
+go_import_path="github.com/hashicorp/consul-template"
 short_desc="Template rendering, notifier, and supervisor for Consul and Vault data"
 maintainer="Noel Cower <ncower@nil.dev>"
 license="MPL-2.0"
diff --git a/srcpkgs/consul/template b/srcpkgs/consul/template
index e55c4d587fd..9cca1e79827 100644
--- a/srcpkgs/consul/template
+++ b/srcpkgs/consul/template
@@ -3,18 +3,17 @@ pkgname=consul
 version=1.8.4
 revision=1
 build_style=go
-go_import_path="github.com/hashicorp/${pkgname}"
+go_import_path="github.com/hashicorp/consul"
 _git_commit=9ea1a204d832cfd4d8c5cba9df56876a526a4531
 go_ldflags="-X ${go_import_path}/version.GitCommit=${_git_commit} -X ${go_import_path}/version.GitDescribe=v${version}"
 # consul has a vendor directory, but relies on replace statements in go.mod, so
 # force default non-vendor behavior.
 go_mod_mode=default
-hostmakedepends="git"
 short_desc="Distributed solution to connect and configure applications"
 maintainer="iaroki <iaroki@protonmail.com>"
 license="MPL-2.0"
 homepage="https://www.consul.io/"
-distfiles="https://${go_import_path}/archive/v${version}.tar.gz"
+distfiles="https://github.com/hashicorp/consul/archive/v${version}.tar.gz"
 checksum=77d1dfa93da66ccb222049bd892e46f8ddb11516589311fbdc24bd658d64b372
 
 post_install() {
diff --git a/srcpkgs/coredns/template b/srcpkgs/coredns/template
index ebd7f2ce2af..15793229e0e 100644
--- a/srcpkgs/coredns/template
+++ b/srcpkgs/coredns/template
@@ -4,7 +4,7 @@ version=1.7.1
 revision=1
 build_style=go
 go_import_path=github.com/coredns/coredns
-hostmakedepends="git make mmark"
+hostmakedepends="make mmark"
 short_desc="CoreDNS is a DNS server that chains plugins"
 maintainer="Noel Cower <ncower@nil.dev>"
 license="Apache-2.0"
diff --git a/srcpkgs/crane/template b/srcpkgs/crane/template
index 0a19c2a68a8..5a304a9faf7 100644
--- a/srcpkgs/crane/template
+++ b/srcpkgs/crane/template
@@ -3,12 +3,11 @@ pkgname=crane
 version=3.6.0
 revision=1
 build_style=go
-hostmakedepends="git"
 short_desc="Lift containers with ease"
 maintainer="Andrea Brancaleoni <abc@pompel.me>"
 license="MIT"
 go_import_path="github.com/michaelsauter/crane"
-homepage="https://${go_import_path}"
+homepage="https://github.com/michaelsauter/crane"
 distfiles="${homepage}/archive/v${version}.tar.gz"
 checksum=00f202783ae2ef3a2d0e02fba0454defe53e823b4c99e2e3b5af734dc870906e
 
diff --git a/srcpkgs/croc/template b/srcpkgs/croc/template
index 1844acf62e9..acd54bf63b7 100644
--- a/srcpkgs/croc/template
+++ b/srcpkgs/croc/template
@@ -4,7 +4,6 @@ version=8.6.7
 revision=1
 build_style=go
 go_import_path=github.com/schollz/croc/v${version%%.*}
-hostmakedepends="git"
 short_desc="Easily and securely send things from one computer to another"
 maintainer="Benjamín Albiñana <benalb@gmail.com>"
 license="MIT"
diff --git a/srcpkgs/dht-node/template b/srcpkgs/dht-node/template
index 7ae65c38731..981cad27b9e 100644
--- a/srcpkgs/dht-node/template
+++ b/srcpkgs/dht-node/template
@@ -5,7 +5,6 @@ revision=3
 build_style=go
 go_import_path="github.com/ipfs/dht-node"
 go_build_tags="netgo"
-hostmakedepends="git"
 short_desc="IPFS dht node"
 maintainer="lemmi <lemmi@nerd2nerd.org>"
 license="MIT"
diff --git a/srcpkgs/dive/template b/srcpkgs/dive/template
index 9144579660a..488801ff9bb 100644
--- a/srcpkgs/dive/template
+++ b/srcpkgs/dive/template
@@ -4,7 +4,6 @@ version=0.9.2
 revision=1
 build_style=go
 go_import_path="github.com/wagoodman/dive"
-hostmakedepends="git"
 short_desc="Container image exploration tool"
 maintainer="Cameron Nemo <cnemo@tutanota.com>"
 license="MIT"
diff --git a/srcpkgs/dlayer/template b/srcpkgs/dlayer/template
index e754ee8e676..ac5b0a9fd9d 100644
--- a/srcpkgs/dlayer/template
+++ b/srcpkgs/dlayer/template
@@ -4,7 +4,6 @@ version=0.2.4
 revision=1
 build_style=go
 go_import_path=github.com/orisano/dlayer
-hostmakedepends="git"
 short_desc="Dlayer is a docker layer analyzer"
 maintainer="Mate GABRI <iam@theguy.io>"
 license="MIT"
diff --git a/srcpkgs/elfinfo/template b/srcpkgs/elfinfo/template
index 189d842b001..b354ced06d8 100644
--- a/srcpkgs/elfinfo/template
+++ b/srcpkgs/elfinfo/template
@@ -4,7 +4,6 @@ version=1.1.0
 revision=1
 build_style=go
 go_import_path=github.com/xyproto/elfinfo
-hostmakedepends="git"
 short_desc="Emit basic information about an ELF file"
 maintainer="Alexander F. Rødseth <xyproto@archlinux.org>"
 license="MIT"
diff --git a/srcpkgs/ensure-access/template b/srcpkgs/ensure-access/template
index b5187c8bb4f..9d3abe47630 100644
--- a/srcpkgs/ensure-access/template
+++ b/srcpkgs/ensure-access/template
@@ -4,7 +4,6 @@ version=0.1.0
 revision=1
 build_style=go
 go_import_path=github.com/Noah-Huppert/ensure-access
-hostmakedepends="git"
 short_desc="Tool which ensures permissions exists for files and directories"
 maintainer="Noah Huppert <contact@noahh.io>"
 license="MIT"
diff --git a/srcpkgs/exercism/template b/srcpkgs/exercism/template
index eb696027500..5869f87dbce 100644
--- a/srcpkgs/exercism/template
+++ b/srcpkgs/exercism/template
@@ -6,7 +6,6 @@ wrksrc="cli-${version}"
 build_style=go
 go_import_path="github.com/exercism/cli"
 go_package="${go_import_path}/exercism"
-hostmakedepends="git"
 short_desc="Command line tool for exercism.io"
 maintainer="SolitudeSF <solitudesf@protonmail.com>"
 license="MIT"
diff --git a/srcpkgs/flint/template b/srcpkgs/flint/template
index 1b8ae9d964c..a04ca9e022d 100644
--- a/srcpkgs/flint/template
+++ b/srcpkgs/flint/template
@@ -3,12 +3,11 @@ pkgname=flint
 version=0.1.0
 revision=9
 build_style=go
-hostmakedepends="git"
 short_desc="Check your project for common sources of contributor friction"
 maintainer="Andrea Brancaleoni <abc@pompel.me>"
 license="MIT"
 go_import_path="github.com/pengwynn/flint"
-homepage="https://${go_import_path}"
+homepage="https://github.com/pengwynn/flint"
 distfiles="${homepage}/archive/v${version}.tar.gz"
 checksum=ec865ec5cad191c7fc9c7c6d5007754372696a708825627383913367f3ef8b7f
 
diff --git a/srcpkgs/forego/template b/srcpkgs/forego/template
index 6f239f15efc..ff43b86fd7c 100644
--- a/srcpkgs/forego/template
+++ b/srcpkgs/forego/template
@@ -3,11 +3,10 @@ pkgname=forego
 version=20180216151118
 revision=5
 build_style=go
-hostmakedepends="git mercurial"
 short_desc="A process supervisor in Go"
 maintainer="Andrea Brancaleoni <abc@pompel.me>"
 license="Apache-2.0"
 go_import_path="github.com/ddollar/forego"
-homepage="https://$go_import_path"
+homepage="https://github.com/ddollar/forego"
 distfiles="$homepage/archive/$version.tar.gz"
 checksum=23119550cc0e45191495823aebe28b42291db6de89932442326340042359b43d
diff --git a/srcpkgs/fzf/template b/srcpkgs/fzf/template
index b0b841a7a6a..eb02c545f5e 100644
--- a/srcpkgs/fzf/template
+++ b/srcpkgs/fzf/template
@@ -4,7 +4,6 @@ version=0.25.1
 revision=1
 build_style=go
 go_import_path="github.com/junegunn/fzf"
-hostmakedepends="git"
 makedepends="ncurses-devel"
 short_desc="Command-line fuzzy finder"
 maintainer="Leah Neukirchen <leah@vuxu.org>"
diff --git a/srcpkgs/gendesk/template b/srcpkgs/gendesk/template
index 1c2d600d23d..3ba71439b59 100644
--- a/srcpkgs/gendesk/template
+++ b/srcpkgs/gendesk/template
@@ -5,12 +5,11 @@ revision=1
 build_style=go
 go_import_path=github.com/xyproto/gendesk
 go_mod_mode=default
-hostmakedepends="git"
 short_desc="Utility to generate .desktop files and download icons"
 maintainer="Benjamín Albiñana <benalb@gmail.com>"
 license="MIT"
 homepage="http://roboticoverlords.org/gendesk/"
-distfiles="https://github.com/xyproto/${pkgname}/archive/${version}.tar.gz
+distfiles="https://github.com/xyproto/gendesk/archive/${version}.tar.gz
  http://roboticoverlords.org/images/default.png"
 checksum="924606ca1c15a140b70f363c4a0ac46fb3ad4d05bc39db400d0b0e41dd4456bb
  4d96eded48e536d02e35727c36dc20844c2e44654e81baf78e10aee4eb48e837"
diff --git a/srcpkgs/ghq/template b/srcpkgs/ghq/template
index 029cc3fbf9f..3ede66246fd 100644
--- a/srcpkgs/ghq/template
+++ b/srcpkgs/ghq/template
@@ -5,7 +5,6 @@ revision=1
 build_style=go
 go_import_path=github.com/x-motemen/ghq
 go_package="$go_import_path"
-hostmakedepends="git"
 depends="git"
 short_desc="Remote repository management made easy"
 maintainer="Dominic Monroe <monroef4@googlemail.com>"
diff --git a/srcpkgs/git-lfs/template b/srcpkgs/git-lfs/template
index 588d7fe9aa3..4a603a6bd5d 100644
--- a/srcpkgs/git-lfs/template
+++ b/srcpkgs/git-lfs/template
@@ -4,12 +4,12 @@ version=2.12.1
 revision=1
 build_style=go
 go_import_path="github.com/git-lfs/git-lfs"
-hostmakedepends="git ruby-ronn"
+hostmakedepends="ruby-ronn"
 short_desc="Git extension for versioning large files"
 maintainer="Michael Aldridge <maldridge@voidlinux.org>"
 license="MIT"
 homepage="https://git-lfs.github.com/"
-distfiles="https://github.com/git-lfs/${pkgname}/archive/v${version}.tar.gz"
+distfiles="https://github.com/git-lfs/git-lfs/archive/v${version}.tar.gz"
 checksum=2b2e70f1233f7efe9a010771510391a07527ec7c0af721ecf8edabac5d60f62b
 
 post_build() {
diff --git a/srcpkgs/gitbatch/template b/srcpkgs/gitbatch/template
index 4464729f2b8..df26ed89b19 100644
--- a/srcpkgs/gitbatch/template
+++ b/srcpkgs/gitbatch/template
@@ -4,7 +4,6 @@ version=0.5.0
 revision=1
 build_style=go
 go_import_path=github.com/isacikgoz/gitbatch
-hostmakedepends="git"
 short_desc="Command line tool to manage your git repositories in one place"
 maintainer="0x0f0f0f <sudo-woodo3@protonmail.com>"
 license="MIT"
diff --git a/srcpkgs/gitea/template b/srcpkgs/gitea/template
index ed6d4e9ce10..250488c99fd 100644
--- a/srcpkgs/gitea/template
+++ b/srcpkgs/gitea/template
@@ -23,7 +23,7 @@ go_ldflags=" -X main.Version=${version}"
 #     rather not use SQLite3 for some reason.  It is also potentially
 #     more resiliant to corrupted writes.
 go_build_tags="bindata sqlite pam tidb"
-hostmakedepends="go-bindata git"
+hostmakedepends="go-bindata"
 makedepends="sqlite-devel pam-devel"
 depends="git bash"
 short_desc="Git with a cup of Tea"
diff --git a/srcpkgs/glide/template b/srcpkgs/glide/template
index 635084f7098..15948753606 100644
--- a/srcpkgs/glide/template
+++ b/srcpkgs/glide/template
@@ -4,7 +4,6 @@ version=0.13.3
 revision=1
 build_style=go
 go_import_path="github.com/Masterminds/glide"
-hostmakedepends="git"
 depends="go git"
 short_desc="Vendor package management for golang"
 maintainer="ananteris <ananteris@protonmail.ch>"
diff --git a/srcpkgs/glider/template b/srcpkgs/glider/template
index e132cfda4b7..36282560269 100644
--- a/srcpkgs/glider/template
+++ b/srcpkgs/glider/template
@@ -4,7 +4,6 @@ version=0.13.0
 revision=1
 build_style=go
 go_import_path=github.com/nadoo/glider
-hostmakedepends="git"
 short_desc="Forward proxy with multiple protocols support"
 maintainer="whoami <whoami@systemli.org>"
 license="GPL-3.0-or-later"
diff --git a/srcpkgs/go-ipfs/template b/srcpkgs/go-ipfs/template
index 4f0a7e98403..088a5d520ab 100644
--- a/srcpkgs/go-ipfs/template
+++ b/srcpkgs/go-ipfs/template
@@ -3,16 +3,15 @@ pkgname=go-ipfs
 version=0.7.0
 revision=2
 build_style=go
-go_import_path="github.com/ipfs/${pkgname}"
+go_import_path="github.com/ipfs/go-ipfs"
 go_package="${go_import_path}/cmd/ipfs"
-hostmakedepends="git"
 depends="fs-repo-migrations>=1.6.4"
 short_desc="Global versioned P2P merkle DAG file system"
 maintainer="Christopher Brannon <chris@the-brannons.com>"
 license="MIT, Apache-2.0"
 homepage="https://ipfs.io"
 changelog="https://github.com/ipfs/go-ipfs/blob/master/CHANGELOG.md"
-distfiles="https://${go_import_path}/archive/v${version}.tar.gz"
+distfiles="https://github.com/ipfs/go-ipfs/archive/v${version}.tar.gz"
 checksum=152986ebb30657ab706bee708fbe929114f5e8c39fbe602e3bbec93fe74c9123
 
 system_accounts="_ipfs"
@@ -20,6 +19,7 @@ make_dirs="/var/lib/ipfs 0700 _ipfs _ipfs"
 _ipfs_homedir="/var/lib/ipfs"
 
 pre_build() {
+	# XXX: try to use buildmode=pie instead
 	if [ "$CROSS_BUILD" ]; then
 		export CGO_ENABLED=0
 	fi
diff --git a/srcpkgs/go-review/template b/srcpkgs/go-review/template
index b352545bedb..907a214d401 100644
--- a/srcpkgs/go-review/template
+++ b/srcpkgs/go-review/template
@@ -5,7 +5,6 @@ revision=1
 build_style=go
 go_import_path="github.com/heppu/go-review"
 go_package="${go_import_path}/cmd/${pkgname}"
-hostmakedepends="git"
 short_desc="Publish reports from different Go linters as gerrit reviews"
 maintainer="Renato Aguiar <renato@renatoaguiar.net>"
 license="MIT"
diff --git a/srcpkgs/gogs/template b/srcpkgs/gogs/template
index 3dc6ebdb674..616e33c1c89 100644
--- a/srcpkgs/gogs/template
+++ b/srcpkgs/gogs/template
@@ -5,7 +5,6 @@ revision=1
 build_style=go
 go_import_path=gogs.io/gogs
 go_build_tags="sqlite pam cert"
-hostmakedepends="git curl"
 makedepends="pam-devel"
 depends="git"
 short_desc="Self-hosted Git Service in Go"
diff --git a/srcpkgs/gomatrix/template b/srcpkgs/gomatrix/template
index fae7a4343ed..eb9d6e7beda 100644
--- a/srcpkgs/gomatrix/template
+++ b/srcpkgs/gomatrix/template
@@ -4,7 +4,6 @@ version=101.0.0
 revision=1
 build_style=go
 go_import_path=github.com/GeertJohan/gomatrix
-hostmakedepends="git"
 short_desc="Terminal Matrix display in golang"
 maintainer="Alex Childs <misuchiru03+void@gmail.com>"
 license="BSD-2-Clause"
diff --git a/srcpkgs/gotop/template b/srcpkgs/gotop/template
index 3566a8d9a78..1b744987057 100644
--- a/srcpkgs/gotop/template
+++ b/srcpkgs/gotop/template
@@ -6,7 +6,6 @@ build_style=go
 go_ldflags="-X main.Version=v${version}"
 go_import_path="github.com/xxxserxxx/gotop/v4"
 go_package="$go_import_path/cmd/gotop"
-hostmakedepends="git"
 short_desc="Terminal based graphical activity monitor"
 maintainer="SolitudeSF <solitudesf@protonmail.com>"
 license="MIT"
diff --git a/srcpkgs/gotty/template b/srcpkgs/gotty/template
index 0e5d268e992..58fc0572197 100644
--- a/srcpkgs/gotty/template
+++ b/srcpkgs/gotty/template
@@ -4,7 +4,6 @@ version=1.0.1
 revision=8
 build_style=go
 go_import_path="github.com/yudai/gotty"
-hostmakedepends="git"
 short_desc="Share your terminal as a web application"
 maintainer="Diogo Leal <diogo@diogoleal.com>"
 license="MIT"
diff --git a/srcpkgs/gucci/template b/srcpkgs/gucci/template
index fd3f94cdf7e..78d69033db7 100644
--- a/srcpkgs/gucci/template
+++ b/srcpkgs/gucci/template
@@ -4,7 +4,6 @@ version=1.2.4
 revision=1
 build_style=go
 go_import_path="github.com/noqcks/gucci"
-hostmakedepends="git"
 short_desc="Simple CLI templating tool written in Go"
 maintainer="Leah Neukirchen <leah@vuxu.org>"
 license="MIT"
diff --git a/srcpkgs/gx-go/template b/srcpkgs/gx-go/template
index b06ced23433..9294a2f143f 100644
--- a/srcpkgs/gx-go/template
+++ b/srcpkgs/gx-go/template
@@ -4,7 +4,6 @@ version=1.9.0
 revision=1
 build_style=go
 go_import_path="github.com/whyrusleeping/gx-go"
-hostmakedepends="git"
 depends="gx"
 short_desc="A subtool for the gx package manager for packages written in go"
 maintainer="lemmi <lemmi@nerd2nerd.org>"
diff --git a/srcpkgs/gx/template b/srcpkgs/gx/template
index ff3ea0267c8..7414b6bab10 100644
--- a/srcpkgs/gx/template
+++ b/srcpkgs/gx/template
@@ -4,7 +4,6 @@ version=0.14.3
 revision=1
 build_style=go
 go_import_path="github.com/whyrusleeping/gx"
-hostmakedepends="git"
 short_desc="Language-agnostic, universal package manager around IPFS"
 maintainer="lemmi <lemmi@nerd2nerd.org>"
 license="MIT"
diff --git a/srcpkgs/hcloud/template b/srcpkgs/hcloud/template
index 8a7aecc2504..628dbf69a14 100644
--- a/srcpkgs/hcloud/template
+++ b/srcpkgs/hcloud/template
@@ -7,7 +7,6 @@ build_style=go
 go_import_path=github.com/hetznercloud/cli
 go_package=github.com/hetznercloud/cli/cmd/hcloud
 go_ldflags="-X github.com/hetznercloud/cli.Version=${version}"
-hostmakedepends="git"
 short_desc="Command-line interface for Hetzner Cloud"
 maintainer="Gerardo Di Iorio <arete74@gmail.com>"
 license="MIT"
diff --git a/srcpkgs/hey/template b/srcpkgs/hey/template
index 84954e36b76..52427108dc6 100644
--- a/srcpkgs/hey/template
+++ b/srcpkgs/hey/template
@@ -4,7 +4,6 @@ version=0.1.4
 revision=1
 build_style=go
 go_import_path=github.com/rakyll/hey
-hostmakedepends="git"
 short_desc="HTTP load generator"
 maintainer="Orphaned <orphan@voidlinux.org>"
 license="Apache-2.0"
diff --git a/srcpkgs/hooktftp/template b/srcpkgs/hooktftp/template
index 2cba14aec60..d9482c378c7 100644
--- a/srcpkgs/hooktftp/template
+++ b/srcpkgs/hooktftp/template
@@ -5,7 +5,6 @@ revision=1
 build_style=go
 go_import_path="github.com/tftp-go-team/hooktftp"
 go_package="github.com/tftp-go-team/hooktftp/cmd/hooktftp"
-hostmakedepends="git"
 short_desc="Hook based tftp server"
 maintainer="Toyam Cox <Vaelatern@voidlinux.org>"
 license="MIT"
diff --git a/srcpkgs/hugo/template b/srcpkgs/hugo/template
index 9b4818c6467..e1f8d14e91e 100644
--- a/srcpkgs/hugo/template
+++ b/srcpkgs/hugo/template
@@ -3,15 +3,14 @@ pkgname=hugo
 version=0.80.0
 revision=1
 build_style=go
-go_import_path="github.com/gohugoio/${pkgname}"
+go_import_path="github.com/gohugoio/hugo"
 go_build_tags="$(vopt_if extended extended)"
-hostmakedepends="git"
 depends="$(vopt_if pygments python-Pygments)"
 short_desc="Fast & Modern Static Website Engine"
 maintainer="Andrea Brancaleoni <abc@pompel.me>"
 license="Apache-2.0"
 homepage="https://gohugo.io"
-distfiles="https://${go_import_path}/archive/v${version}.tar.gz"
+distfiles="https://github.com/gohugoio/hugo/archive/v${version}.tar.gz"
 checksum=4ddcd6ebea21e5fd4067db4a481ab7810e34496d5991a3520169c8f5ee1d38bb
 
 build_options="pygments extended"
diff --git a/srcpkgs/jid/template b/srcpkgs/jid/template
index abce00a8353..52055ab9f9e 100644
--- a/srcpkgs/jid/template
+++ b/srcpkgs/jid/template
@@ -5,7 +5,6 @@ revision=1
 build_style=go
 go_import_path=github.com/simeji/jid
 go_package=github.com/simeji/jid/cmd/jid
-hostmakedepends="git"
 short_desc="Drill down JSON interactively by using filtering queries"
 maintainer="Orphaned <orphan@voidlinux.org>"
 license="MIT"
diff --git a/srcpkgs/jj/template b/srcpkgs/jj/template
index c05dc5e436d..d421418f96e 100644
--- a/srcpkgs/jj/template
+++ b/srcpkgs/jj/template
@@ -5,7 +5,6 @@ revision=1
 build_style=go
 go_import_path="github.com/tidwall/jj"
 go_package="${go_import_path}/cmd/jj"
-hostmakedepends="git"
 short_desc="JSON Stream Editor"
 maintainer="SolitudeSF <solitudesf@protonmail.com>"
 license="MIT"
diff --git a/srcpkgs/joker/template b/srcpkgs/joker/template
index a66fffbab25..2682f33a5df 100644
--- a/srcpkgs/joker/template
+++ b/srcpkgs/joker/template
@@ -4,7 +4,6 @@ version=0.14.1
 revision=1
 build_style=go
 go_import_path=github.com/candid82/joker
-hostmakedepends="git"
 short_desc="Interpreted dialect of Clojure written in Go and Clojure(Script) linter"
 maintainer="Dominic Monroe <monroef4@googlemail.com>"
 license="EPL-1.0"
diff --git a/srcpkgs/jump/template b/srcpkgs/jump/template
index 1995b839290..15a171e4300 100644
--- a/srcpkgs/jump/template
+++ b/srcpkgs/jump/template
@@ -4,7 +4,6 @@ version=0.30.1
 revision=1
 build_style=go
 go_import_path=github.com/gsamokovarov/jump
-hostmakedepends="git"
 short_desc="Fuzzy directory jumper that learns your habits"
 maintainer="Arthur Weagel <arthur.contrib@gmail.com>"
 license="MIT"
diff --git a/srcpkgs/keybase/template b/srcpkgs/keybase/template
index 8fc5882b513..29674992c56 100644
--- a/srcpkgs/keybase/template
+++ b/srcpkgs/keybase/template
@@ -10,7 +10,6 @@ ${go_import_path}/go/kbfs/kbfsfuse
 ${go_import_path}/go/kbfs/kbfsgit/git-remote-keybase
 ${go_import_path}/go/kbfs/kbfstool ${go_import_path}/go/kbfs/redirector"
 go_build_tags="production"
-hostmakedepends="git"
 depends="gnupg2"
 short_desc="Client for keybase.io"
 maintainer="Toyam Cox <Vaelatern@voidlinux.org>"
diff --git a/srcpkgs/lazygit/template b/srcpkgs/lazygit/template
index fe368000d02..1798760a299 100644
--- a/srcpkgs/lazygit/template
+++ b/srcpkgs/lazygit/template
@@ -4,7 +4,6 @@ version=0.24.2
 revision=1
 build_style=go
 go_import_path=github.com/jesseduffield/lazygit
-hostmakedepends="git"
 depends="git"
 short_desc="Simple terminal UI for git commands"
 maintainer="Nathan Owens <ndowens@artixlinux.org>"
diff --git a/srcpkgs/lego/template b/srcpkgs/lego/template
index a71ffb026e3..fce664e3539 100644
--- a/srcpkgs/lego/template
+++ b/srcpkgs/lego/template
@@ -3,9 +3,8 @@ pkgname=lego
 version=4.0.1
 revision=1
 build_style=go
-go_import_path="github.com/go-acme/${pkgname}/v4"
-go_package="${go_import_path}/cmd/${pkgname}"
-hostmakedepends="git"
+go_import_path="github.com/go-acme/lego/v4"
+go_package="${go_import_path}/cmd/lego"
 short_desc="Let's Encrypt client and ACME library written in Go"
 maintainer="Anachron <gith@cron.world>"
 license="MIT"
diff --git a/srcpkgs/licensechecker/template b/srcpkgs/licensechecker/template
index ec09ba9751f..910c7c74472 100644
--- a/srcpkgs/licensechecker/template
+++ b/srcpkgs/licensechecker/template
@@ -5,6 +5,7 @@ revision=5
 wrksrc="lc-${version}"
 build_style=go
 go_import_path=github.com/boyter/lc
+# XXX: next update should move to modules, so remove hostmakedepends
 hostmakedepends="git"
 short_desc="Identify software licenses used on a source tree"
 maintainer="Orphaned <orphan@voidlinux.org>"
diff --git a/srcpkgs/lxd/template b/srcpkgs/lxd/template
index 57121aa3554..e3a3819ab50 100644
--- a/srcpkgs/lxd/template
+++ b/srcpkgs/lxd/template
@@ -7,7 +7,7 @@ go_import_path=github.com/lxc/lxd
 go_build_tags=libsqlite3
 go_package="${go_import_path}/lxd ${go_import_path}/lxc
  ${go_import_path}/lxd-p2c ${go_import_path}/fuidshift"
-hostmakedepends="pkg-config git"
+hostmakedepends="pkg-config"
 makedepends="lxc-devel acl-devel dqlite-devel eudev-libudev-devel"
 depends="lxc acl acl-progs rsync squashfs-tools xz dnsmasq iptables"
 short_desc="Next generation system container manager"
diff --git a/srcpkgs/massren/template b/srcpkgs/massren/template
index db3941c7170..d3f4250b2ec 100644
--- a/srcpkgs/massren/template
+++ b/srcpkgs/massren/template
@@ -7,8 +7,8 @@ hostmakedepends="git"
 short_desc="Massive renamer from command line"
 maintainer="Andrea Brancaleoni <abc@pompel.me>"
 license="MIT"
-go_import_path="github.com/laurent22/${pkgname}"
-homepage="https://${go_import_path}"
+go_import_path="github.com/laurent22/massren"
+homepage="https://github.com/laurent22/massren"
 distfiles="$homepage/archive/v$version.tar.gz"
 checksum=7a728d96a9e627c3609d147db64bba60ced33c407c75e9512147a5c83ba94f56
 
diff --git a/srcpkgs/micro/template b/srcpkgs/micro/template
index 27b87e22b7f..d4dbd041a88 100644
--- a/srcpkgs/micro/template
+++ b/srcpkgs/micro/template
@@ -6,9 +6,8 @@ build_style=go
 go_import_path="github.com/zyedidia/micro/v2"
 go_package="${go_import_path}/cmd/micro"
 go_ldflags="-X github.com/zyedidia/micro/v2/internal/util.Version=${version}"
-# Adding CompuileDate is bad reproducibility and adding CommitHash
+# Adding CompileDate is bad for reproducibility and adding CommitHash
 # is redundant as we use a tag to build the package.
-hostmakedepends="git"
 short_desc="Modern and intuitive terminal-based text editor"
 maintainer="Diogo Leal <diogo@diogoleal.com>"
 license="MIT"
diff --git a/srcpkgs/minio/template b/srcpkgs/minio/template
index bc78bbf6b84..37396015ea6 100644
--- a/srcpkgs/minio/template
+++ b/srcpkgs/minio/template
@@ -7,7 +7,6 @@ wrksrc=${pkgname}-RELEASE.${_version}
 build_style=go
 go_import_path="github.com/minio/minio"
 conf_files="/etc/default/minio /etc/minio/config.json"
-hostmakedepends="git"
 short_desc="Object storage server compatible with Amazon S3"
 maintainer="Gerardo Di Iorio <arete74@gmail.com>"
 license="Apache-2.0"
diff --git a/srcpkgs/mmark/template b/srcpkgs/mmark/template
index 0c6bb341dd5..b8c3b2ee7be 100644
--- a/srcpkgs/mmark/template
+++ b/srcpkgs/mmark/template
@@ -4,7 +4,6 @@ version=2.2.10
 revision=1
 build_style=go
 go_import_path=github.com/mmarkdown/mmark
-hostmakedepends="git"
 short_desc="Powerful markdown processor geared towards the IETF"
 maintainer="Robert Lowry <bobertlo@gmail.com>"
 license="BSD-2-Clause"

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PR PATCH] [Updated] [WIP] srcpkgs/: most Go packages shouldn't have git in hostmakedepends.
  2021-02-18 22:20 [PR PATCH] [WIP] srcpkgs/: most Go packages shouldn't have git in hostmakedepends ericonr
  2021-02-19  2:27 ` [PR PATCH] [Updated] " ericonr
  2021-02-19  3:34 ` ericonr
@ 2021-02-19  4:32 ` ericonr
  2021-02-19 15:07 ` [PR PATCH] [Updated] srcpkgs/: clean up lots of Go packages ericonr
  2021-02-19 15:07 ` [PR PATCH] [Merged]: " ericonr
  4 siblings, 0 replies; 6+ messages in thread
From: ericonr @ 2021-02-19  4:32 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 888 bytes --]

There is an updated pull request by ericonr against master on the void-packages repository

https://github.com/ericonr/void-packages goclean
https://github.com/void-linux/void-packages/pull/28863

[WIP] srcpkgs/: most Go packages shouldn't have git in hostmakedepends.
Depending on git for building can sometimes happen due to issue #27690,
where instead of using the unpacked tarball, Go clones the package's
repository itself, since the tarball we provided doesn't contain the
go_import_path we pass to it in the command line.

Since we should require as few dependencies as possible, and this
measure can help catch issues of building the wrong version of a Go
package, we remove git from hostmakedepends where possible.

I'm still pulling in packages that do this, will take a while.

A patch file from https://github.com/void-linux/void-packages/pull/28863.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-goclean-28863.patch --]
[-- Type: text/x-diff, Size: 24179 bytes --]

From 01ee0f99300f8d952879e846fc90e7eb1fbfab16 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=C3=89rico=20Rolim?= <erico.erc@gmail.com>
Date: Fri, 19 Feb 2021 00:55:24 -0300
Subject: [PATCH 1/7] srcpkgs/: clean up Go packages.

Fix small typos, expand some variables, leave comments for updates.
---
 srcpkgs/antibody/template        | 2 +-
 srcpkgs/caddy/template           | 1 +
 srcpkgs/chezmoi/template         | 2 +-
 srcpkgs/consul-template/template | 2 +-
 srcpkgs/consul/template          | 2 +-
 srcpkgs/crane/template           | 2 +-
 srcpkgs/dep/template             | 2 +-
 srcpkgs/docker-gen/template      | 2 +-
 srcpkgs/flint/template           | 2 +-
 srcpkgs/forego/template          | 2 +-
 srcpkgs/gendesk/template         | 2 +-
 srcpkgs/git-lfs/template         | 2 +-
 srcpkgs/gkill/template           | 2 +-
 srcpkgs/glock/template           | 2 +-
 srcpkgs/go-ipfs/template         | 4 ++--
 srcpkgs/hugo/template            | 4 ++--
 srcpkgs/lego/template            | 4 ++--
 srcpkgs/massren/template         | 4 ++--
 srcpkgs/micro/template           | 2 +-
 srcpkgs/nomad/template           | 4 ++--
 srcpkgs/peco/template            | 2 +-
 srcpkgs/sift/template            | 2 +-
 srcpkgs/tag/template             | 4 ++--
 srcpkgs/terragrunt/template      | 2 +-
 srcpkgs/vault/template           | 4 ++--
 srcpkgs/webcat/template          | 2 +-
 srcpkgs/websocketd/template      | 2 +-
 27 files changed, 34 insertions(+), 33 deletions(-)

diff --git a/srcpkgs/antibody/template b/srcpkgs/antibody/template
index 7071501830c..cb109f0b183 100644
--- a/srcpkgs/antibody/template
+++ b/srcpkgs/antibody/template
@@ -9,7 +9,7 @@ short_desc="Fast and lightweight shell plugin manager"
 maintainer="SolitudeSF <solitudesf@protonmail.com>"
 license="MIT"
 homepage="https://getantibody.github.io/"
-distfiles="https://${go_import_path}/archive/v${version}.tar.gz"
+distfiles="https://github.com/getantibody/antibody/archive/v${version}.tar.gz"
 checksum=87bced5fba8cf5d587ea803d33dda72e8bcbd4e4c9991a9b40b2de4babbfc24f
 
 post_install() {
diff --git a/srcpkgs/caddy/template b/srcpkgs/caddy/template
index dbae7057566..6fe986419c9 100644
--- a/srcpkgs/caddy/template
+++ b/srcpkgs/caddy/template
@@ -3,6 +3,7 @@ pkgname=caddy
 version=1.0.5
 revision=1
 build_style=go
+# XXX: use caddy/v2 when updating
 go_import_path=github.com/caddyserver/caddy
 go_package="${go_import_path}/caddy"
 hostmakedepends="git"
diff --git a/srcpkgs/chezmoi/template b/srcpkgs/chezmoi/template
index 5c6d47e5abc..64326d00b13 100644
--- a/srcpkgs/chezmoi/template
+++ b/srcpkgs/chezmoi/template
@@ -12,7 +12,7 @@ short_desc="Manage your dotfiles across multiple machines, securely"
 maintainer="Abigail G <dev@kb6.ee>"
 license="MIT"
 homepage="https://chezmoi.io/"
-distfiles="https://github.com/twpayne/${pkgname}/archive/v${version}.tar.gz"
+distfiles="https://github.com/twpayne/chezmoi/archive/v${version}.tar.gz"
 checksum=23515591028202aaf7af908e38972f156ee08022f535bc74aaa9244b82da2fa1
 
 post_install() {
diff --git a/srcpkgs/consul-template/template b/srcpkgs/consul-template/template
index 3d490804ba2..00cd77f3416 100644
--- a/srcpkgs/consul-template/template
+++ b/srcpkgs/consul-template/template
@@ -3,7 +3,7 @@ pkgname=consul-template
 version=0.25.1
 revision=1
 build_style=go
-go_import_path="github.com/hashicorp/$pkgname"
+go_import_path="github.com/hashicorp/consul-template"
 hostmakedepends="git"
 short_desc="Template rendering, notifier, and supervisor for Consul and Vault data"
 maintainer="Noel Cower <ncower@nil.dev>"
diff --git a/srcpkgs/consul/template b/srcpkgs/consul/template
index e55c4d587fd..b6fd558b9c3 100644
--- a/srcpkgs/consul/template
+++ b/srcpkgs/consul/template
@@ -3,7 +3,7 @@ pkgname=consul
 version=1.8.4
 revision=1
 build_style=go
-go_import_path="github.com/hashicorp/${pkgname}"
+go_import_path="github.com/hashicorp/consul"
 _git_commit=9ea1a204d832cfd4d8c5cba9df56876a526a4531
 go_ldflags="-X ${go_import_path}/version.GitCommit=${_git_commit} -X ${go_import_path}/version.GitDescribe=v${version}"
 # consul has a vendor directory, but relies on replace statements in go.mod, so
diff --git a/srcpkgs/crane/template b/srcpkgs/crane/template
index 0a19c2a68a8..edb04e896ae 100644
--- a/srcpkgs/crane/template
+++ b/srcpkgs/crane/template
@@ -8,7 +8,7 @@ short_desc="Lift containers with ease"
 maintainer="Andrea Brancaleoni <abc@pompel.me>"
 license="MIT"
 go_import_path="github.com/michaelsauter/crane"
-homepage="https://${go_import_path}"
+homepage="https://github.com/michaelsauter/crane"
 distfiles="${homepage}/archive/v${version}.tar.gz"
 checksum=00f202783ae2ef3a2d0e02fba0454defe53e823b4c99e2e3b5af734dc870906e
 
diff --git a/srcpkgs/dep/template b/srcpkgs/dep/template
index f2a886bc66a..79cce541059 100644
--- a/srcpkgs/dep/template
+++ b/srcpkgs/dep/template
@@ -11,7 +11,7 @@ depends="git go"
 short_desc="Go dependency management tool"
 maintainer="Andrea Brancaleoni <abc@pompel.me>"
 license="BSD-3-Clause"
-homepage="https://${go_import_path}"
+homepage="https://github.com/golang/dep"
 distfiles="${homepage}/archive/v${version}.tar.gz"
 checksum=929c8f759838f98323211ba408a831ea80d93b75beda8584b6d950f393a3298a
 
diff --git a/srcpkgs/docker-gen/template b/srcpkgs/docker-gen/template
index 9256fde323a..8a1ab6c3381 100644
--- a/srcpkgs/docker-gen/template
+++ b/srcpkgs/docker-gen/template
@@ -9,7 +9,7 @@ go_import_path="github.com/jwilder/docker-gen"
 go_package="${go_import_path}/cmd/docker-gen"
 maintainer="Andrea Brancaleoni <abc@pompel.me>"
 license="MIT"
-homepage="https://$go_import_path"
+homepage="https://github.com/jwilder/docker-gen"
 distfiles="$homepage/archive/$version.tar.gz"
 checksum=7951b63684e4ace9eab4f87f0c5625648f8add2559fa7779fabdb141a8a83908
 
diff --git a/srcpkgs/flint/template b/srcpkgs/flint/template
index 1b8ae9d964c..9a6b0d8c0aa 100644
--- a/srcpkgs/flint/template
+++ b/srcpkgs/flint/template
@@ -8,7 +8,7 @@ short_desc="Check your project for common sources of contributor friction"
 maintainer="Andrea Brancaleoni <abc@pompel.me>"
 license="MIT"
 go_import_path="github.com/pengwynn/flint"
-homepage="https://${go_import_path}"
+homepage="https://github.com/pengwynn/flint"
 distfiles="${homepage}/archive/v${version}.tar.gz"
 checksum=ec865ec5cad191c7fc9c7c6d5007754372696a708825627383913367f3ef8b7f
 
diff --git a/srcpkgs/forego/template b/srcpkgs/forego/template
index 6f239f15efc..315153aef00 100644
--- a/srcpkgs/forego/template
+++ b/srcpkgs/forego/template
@@ -8,6 +8,6 @@ short_desc="A process supervisor in Go"
 maintainer="Andrea Brancaleoni <abc@pompel.me>"
 license="Apache-2.0"
 go_import_path="github.com/ddollar/forego"
-homepage="https://$go_import_path"
+homepage="https://github.com/ddollar/forego"
 distfiles="$homepage/archive/$version.tar.gz"
 checksum=23119550cc0e45191495823aebe28b42291db6de89932442326340042359b43d
diff --git a/srcpkgs/gendesk/template b/srcpkgs/gendesk/template
index 1c2d600d23d..51904d9d14d 100644
--- a/srcpkgs/gendesk/template
+++ b/srcpkgs/gendesk/template
@@ -10,7 +10,7 @@ short_desc="Utility to generate .desktop files and download icons"
 maintainer="Benjamín Albiñana <benalb@gmail.com>"
 license="MIT"
 homepage="http://roboticoverlords.org/gendesk/"
-distfiles="https://github.com/xyproto/${pkgname}/archive/${version}.tar.gz
+distfiles="https://github.com/xyproto/gendesk/archive/${version}.tar.gz
  http://roboticoverlords.org/images/default.png"
 checksum="924606ca1c15a140b70f363c4a0ac46fb3ad4d05bc39db400d0b0e41dd4456bb
  4d96eded48e536d02e35727c36dc20844c2e44654e81baf78e10aee4eb48e837"
diff --git a/srcpkgs/git-lfs/template b/srcpkgs/git-lfs/template
index 588d7fe9aa3..81f99bef217 100644
--- a/srcpkgs/git-lfs/template
+++ b/srcpkgs/git-lfs/template
@@ -9,7 +9,7 @@ short_desc="Git extension for versioning large files"
 maintainer="Michael Aldridge <maldridge@voidlinux.org>"
 license="MIT"
 homepage="https://git-lfs.github.com/"
-distfiles="https://github.com/git-lfs/${pkgname}/archive/v${version}.tar.gz"
+distfiles="https://github.com/git-lfs/git-lfs/archive/v${version}.tar.gz"
 checksum=2b2e70f1233f7efe9a010771510391a07527ec7c0af721ecf8edabac5d60f62b
 
 post_build() {
diff --git a/srcpkgs/gkill/template b/srcpkgs/gkill/template
index f2b9ae64a20..6c9d5adafa4 100644
--- a/srcpkgs/gkill/template
+++ b/srcpkgs/gkill/template
@@ -8,7 +8,7 @@ short_desc="Easy Process Killer"
 maintainer="Andrea Brancaleoni <abc@pompel.me>"
 license="MIT"
 go_import_path="github.com/heppu/gkill"
-homepage="https://$go_import_path"
+homepage="https://github.com/heppu/gkill"
 distfiles="$homepage/archive/v$version.tar.gz"
 checksum=aee86f1e18a88ecd3024c6deb3dbd6a2e385961ad8365046dc2b64596bdbb84b
 
diff --git a/srcpkgs/glock/template b/srcpkgs/glock/template
index 6cd6cc4c5d8..3d5eb4ea734 100644
--- a/srcpkgs/glock/template
+++ b/srcpkgs/glock/template
@@ -11,6 +11,6 @@ go_import_path="github.com/robfig/glock"
 go_package="${go_import_path}"
 maintainer="Andrea Brancaleoni <abc@pompel.me>"
 license="Public Domain"
-homepage="https://$go_import_path"
+homepage="https://github.com/robfig/glock"
 distfiles="$homepage/archive/$_commit.tar.gz"
 checksum=b8fea16ccdfa4a927a8590753d44ca5bb610561f3b9e09cc1e501ef5c9351dc9
diff --git a/srcpkgs/go-ipfs/template b/srcpkgs/go-ipfs/template
index 4f0a7e98403..321d7015598 100644
--- a/srcpkgs/go-ipfs/template
+++ b/srcpkgs/go-ipfs/template
@@ -3,7 +3,7 @@ pkgname=go-ipfs
 version=0.7.0
 revision=2
 build_style=go
-go_import_path="github.com/ipfs/${pkgname}"
+go_import_path="github.com/ipfs/go-ipfs"
 go_package="${go_import_path}/cmd/ipfs"
 hostmakedepends="git"
 depends="fs-repo-migrations>=1.6.4"
@@ -12,7 +12,7 @@ maintainer="Christopher Brannon <chris@the-brannons.com>"
 license="MIT, Apache-2.0"
 homepage="https://ipfs.io"
 changelog="https://github.com/ipfs/go-ipfs/blob/master/CHANGELOG.md"
-distfiles="https://${go_import_path}/archive/v${version}.tar.gz"
+distfiles="https://github.com/ipfs/go-ipfs/archive/v${version}.tar.gz"
 checksum=152986ebb30657ab706bee708fbe929114f5e8c39fbe602e3bbec93fe74c9123
 
 system_accounts="_ipfs"
diff --git a/srcpkgs/hugo/template b/srcpkgs/hugo/template
index 9b4818c6467..8abec86a971 100644
--- a/srcpkgs/hugo/template
+++ b/srcpkgs/hugo/template
@@ -3,7 +3,7 @@ pkgname=hugo
 version=0.80.0
 revision=1
 build_style=go
-go_import_path="github.com/gohugoio/${pkgname}"
+go_import_path="github.com/gohugoio/hugo"
 go_build_tags="$(vopt_if extended extended)"
 hostmakedepends="git"
 depends="$(vopt_if pygments python-Pygments)"
@@ -11,7 +11,7 @@ short_desc="Fast & Modern Static Website Engine"
 maintainer="Andrea Brancaleoni <abc@pompel.me>"
 license="Apache-2.0"
 homepage="https://gohugo.io"
-distfiles="https://${go_import_path}/archive/v${version}.tar.gz"
+distfiles="https://github.com/gohugoio/hugo/archive/v${version}.tar.gz"
 checksum=4ddcd6ebea21e5fd4067db4a481ab7810e34496d5991a3520169c8f5ee1d38bb
 
 build_options="pygments extended"
diff --git a/srcpkgs/lego/template b/srcpkgs/lego/template
index a71ffb026e3..573dbdf943b 100644
--- a/srcpkgs/lego/template
+++ b/srcpkgs/lego/template
@@ -3,8 +3,8 @@ pkgname=lego
 version=4.0.1
 revision=1
 build_style=go
-go_import_path="github.com/go-acme/${pkgname}/v4"
-go_package="${go_import_path}/cmd/${pkgname}"
+go_import_path="github.com/go-acme/lego/v4"
+go_package="${go_import_path}/cmd/lego"
 hostmakedepends="git"
 short_desc="Let's Encrypt client and ACME library written in Go"
 maintainer="Anachron <gith@cron.world>"
diff --git a/srcpkgs/massren/template b/srcpkgs/massren/template
index db3941c7170..d3f4250b2ec 100644
--- a/srcpkgs/massren/template
+++ b/srcpkgs/massren/template
@@ -7,8 +7,8 @@ hostmakedepends="git"
 short_desc="Massive renamer from command line"
 maintainer="Andrea Brancaleoni <abc@pompel.me>"
 license="MIT"
-go_import_path="github.com/laurent22/${pkgname}"
-homepage="https://${go_import_path}"
+go_import_path="github.com/laurent22/massren"
+homepage="https://github.com/laurent22/massren"
 distfiles="$homepage/archive/v$version.tar.gz"
 checksum=7a728d96a9e627c3609d147db64bba60ced33c407c75e9512147a5c83ba94f56
 
diff --git a/srcpkgs/micro/template b/srcpkgs/micro/template
index 27b87e22b7f..c0a2842eb85 100644
--- a/srcpkgs/micro/template
+++ b/srcpkgs/micro/template
@@ -6,7 +6,7 @@ build_style=go
 go_import_path="github.com/zyedidia/micro/v2"
 go_package="${go_import_path}/cmd/micro"
 go_ldflags="-X github.com/zyedidia/micro/v2/internal/util.Version=${version}"
-# Adding CompuileDate is bad reproducibility and adding CommitHash
+# Adding CompileDate is bad for reproducibility and adding CommitHash
 # is redundant as we use a tag to build the package.
 hostmakedepends="git"
 short_desc="Modern and intuitive terminal-based text editor"
diff --git a/srcpkgs/nomad/template b/srcpkgs/nomad/template
index 9ed33f12a0a..ddaf4f6b78e 100644
--- a/srcpkgs/nomad/template
+++ b/srcpkgs/nomad/template
@@ -3,7 +3,7 @@ pkgname=nomad
 version=1.0.1
 revision=1
 build_style=go
-go_import_path="github.com/hashicorp/${pkgname}"
+go_import_path="github.com/hashicorp/nomad"
 go_build_tags="ui release"
 _git_commit=a480eed0815c54612856d9115a34bb1d1a773e8c
 go_ldflags="-X ${go_import_path}/version.GitCommit=${_git_commit}"
@@ -12,7 +12,7 @@ short_desc="Cluster scheduler designed to easily integrate into existing workflo
 maintainer="Michael Aldridge <maldridge@voidlinux.org>"
 license="MPL-2.0"
 homepage="https://www.nomadproject.io/"
-distfiles="https://${go_import_path}/archive/v${version}.tar.gz"
+distfiles="https://github.com/hashicorp/nomad/archive/v${version}.tar.gz"
 checksum=1dca9ebb1636fc8ef005d9c6eed8cf10fbfc3d7c9ff7307606454142d858f419
 patch_args="-Np1"
 
diff --git a/srcpkgs/peco/template b/srcpkgs/peco/template
index 44c50774ed2..182c2e5ecdc 100644
--- a/srcpkgs/peco/template
+++ b/srcpkgs/peco/template
@@ -10,7 +10,7 @@ short_desc="Simplistic interactive filtering tool"
 maintainer="Leah Neukirchen <leah@vuxu.org>"
 license="MIT"
 homepage="https://github.com/peco/peco"
-distfiles="https://github.com/${pkgname}/${pkgname}/archive/v${version}.tar.gz"
+distfiles="https://github.com/peco/peco/archive/v${version}.tar.gz"
 checksum=90d87503265c12f8583f5c6bc19c83eba7a2e15219a6339d5041628aa48c4705
 
 post_install() {
diff --git a/srcpkgs/sift/template b/srcpkgs/sift/template
index adf4b95b79f..22a9698bf44 100644
--- a/srcpkgs/sift/template
+++ b/srcpkgs/sift/template
@@ -8,6 +8,6 @@ short_desc="A fast and powerful open source alternative to grep"
 maintainer="Andrea Brancaleoni <abc@pompel.me>"
 license="GPL-3"
 go_import_path="github.com/svent/sift"
-homepage="https://$go_import_path"
+homepage="https://github.com/svent/sift"
 distfiles="$homepage/archive/v$version.tar.gz"
 checksum=bbbd5c472c36b78896cd7ae673749d3943621a6d5523d47973ed2fc6800ae4c8
diff --git a/srcpkgs/tag/template b/srcpkgs/tag/template
index 1363f7118a8..7cd64a2e240 100644
--- a/srcpkgs/tag/template
+++ b/srcpkgs/tag/template
@@ -4,12 +4,12 @@ version=1.4.0
 revision=7
 build_style=go
 hostmakedepends="git mercurial"
-go_import_path="github.com/aykamko/${pkgname}"
+go_import_path="github.com/aykamko/tag"
 short_desc="Instantly jump to your ag matches"
 maintainer="Andrea Brancaleoni <abc@pompel.me>"
 license="MIT"
 homepage="https://github.com/aykamko/tag"
-distfiles="https://${go_import_path}/archive/v${version}.tar.gz"
+distfiles="${homepage}/archive/v${version}.tar.gz"
 checksum=d3a02466e600634cf0ffff9ad8c5f70eba97e44758edf35cc4efbda9cbfdff9a
 
 post_install() {
diff --git a/srcpkgs/terragrunt/template b/srcpkgs/terragrunt/template
index f907bacb02e..f8fb232a5c3 100644
--- a/srcpkgs/terragrunt/template
+++ b/srcpkgs/terragrunt/template
@@ -3,7 +3,7 @@ pkgname=terragrunt
 version=0.28.4
 revision=1
 build_style=go
-go_import_path="github.com/gruntwork-io/$pkgname"
+go_import_path="github.com/gruntwork-io/terragrunt"
 hostmakedepends="git"
 depends="terraform"
 short_desc="Thin wrapper for Terraform that provides extra tools"
diff --git a/srcpkgs/vault/template b/srcpkgs/vault/template
index edfa5c95a91..85fc439ba9c 100644
--- a/srcpkgs/vault/template
+++ b/srcpkgs/vault/template
@@ -3,7 +3,7 @@ pkgname=vault
 version=1.6.1
 revision=1
 build_style=go
-go_import_path="github.com/hashicorp/${pkgname}"
+go_import_path="github.com/hashicorp/vault"
 go_build_tags="release"
 _git_commit=6d2db3f033e02e70202bef9ec896360062b88b03
 go_ldflags="-X ${go_import_path}/sdk/version.GitCommit=${_git_commit}"
@@ -12,7 +12,7 @@ short_desc="Manage Secrets and Protect Sensitive Data"
 maintainer="Michael Aldridge <maldridge@voidlinux.org>"
 license="MPL-2.0"
 homepage="https://www.vaultproject.io/"
-distfiles="https://github.com/hashicorp/${pkgname}/archive/v${version}.tar.gz"
+distfiles="https://github.com/hashicorp/vault/archive/v${version}.tar.gz"
 checksum=fb5d96e682a48bfd421b13cdfffd710da0238dbded1988aab822dd5aae75b4c4
 system_accounts="_vault"
 make_dirs="/var/lib/vault 0700 _vault _vault
diff --git a/srcpkgs/webcat/template b/srcpkgs/webcat/template
index c1cb0b678a5..5d6c459dd93 100644
--- a/srcpkgs/webcat/template
+++ b/srcpkgs/webcat/template
@@ -9,5 +9,5 @@ short_desc="WebSocket Netcat"
 maintainer="Andrea Brancaleoni <abc@pompel.me>"
 license="GPL-3"
 homepage="https://github.com/thypon/webcat"
-distfiles="https://github.com/thypon/${pkgname}/archive/v${version}.tar.gz"
+distfiles="https://github.com/thypon/webcat/archive/v${version}.tar.gz"
 checksum=5b3be1cb8deb08f144d674a0bf23f97a692ebb601666d3a38df6e80b2e68d0b7
diff --git a/srcpkgs/websocketd/template b/srcpkgs/websocketd/template
index e0eba0cdb59..80857258f37 100644
--- a/srcpkgs/websocketd/template
+++ b/srcpkgs/websocketd/template
@@ -8,6 +8,6 @@ short_desc="Turn any program that uses STDIN/STDOUT into a WebSocket server"
 maintainer="Andrea Brancaleoni <abc@pompel.me>"
 license="BSD"
 go_import_path="github.com/joewalnes/websocketd"
-homepage="https://$go_import_path"
+homepage="https://github.com/joewalnes/websocketd"
 distfiles="$homepage/archive/v$version.tar.gz"
 checksum=6b8fe0fad586d794e002340ee597059b2cfc734ba7579933263aef4743138fe5

From 1aaee8fceabbb3ce5b79a4fc87c0504cf9e93abd Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=C3=89rico=20Rolim?= <erico.erc@gmail.com>
Date: Thu, 18 Feb 2021 23:25:27 -0300
Subject: [PATCH 2/7] gucci: fix checksum.

Upstream force pushed the same tag, so checksum for the tarball changed.
Only changes were timestamps for files and some small differences in
their .travis.yml file, which doesn't affect the build.
---
 srcpkgs/gucci/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/gucci/template b/srcpkgs/gucci/template
index fb10a6ca866..fd3f94cdf7e 100644
--- a/srcpkgs/gucci/template
+++ b/srcpkgs/gucci/template
@@ -10,7 +10,7 @@ maintainer="Leah Neukirchen <leah@vuxu.org>"
 license="MIT"
 homepage="https://github.com/noqcks/gucci"
 distfiles="https://github.com/noqcks/gucci/archive/${version}.tar.gz"
-checksum=7ce8967cb83eddb8db6878a9f00a96996f7503fb0a5ee01fa9e1947d2444ead8
+checksum=50d9d513fff97128bbd92685af5b244cbc1453e79010fb2b1aea51c84d478855
 
 post_install() {
 	vlicense LICENSE

From 2ea68da88167d38f1568f57a93d5ae1208784264 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=C3=89rico=20Rolim?= <erico.erc@gmail.com>
Date: Thu, 18 Feb 2021 23:57:10 -0300
Subject: [PATCH 3/7] hydroxide: set correct go_import_path and use go_package.

---
 srcpkgs/hydroxide/template | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/hydroxide/template b/srcpkgs/hydroxide/template
index 86cc09417aa..b3011181386 100644
--- a/srcpkgs/hydroxide/template
+++ b/srcpkgs/hydroxide/template
@@ -3,8 +3,8 @@ pkgname=hydroxide
 version=0.2.17
 revision=1
 build_style=go
-go_import_path=github.com/emersion/hydroxide/cmd/hydroxide
-hostmakedepends="git"
+go_import_path=github.com/emersion/hydroxide
+go_package=$go_import_path/cmd/hydroxide
 short_desc="Third-party, open-source ProtonMail CardDAV, IMAP and SMTP bridge"
 maintainer="DirectorX <void.directorx@protonmail.com>"
 license="MIT"

From 1fdd0dafb4664448c7e9fa03477ccbaaa5a1518e Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=C3=89rico=20Rolim?= <erico.erc@gmail.com>
Date: Thu, 18 Feb 2021 23:59:56 -0300
Subject: [PATCH 4/7] ipfs-cluster: clean up unnecessary hostmakedepends

At least gx-go seems to have been forgotten in commit
31effcb4a1a21b4b0e209ba2618365ef17c0cc41, which removed the commands
using gx from pre_build.
---
 srcpkgs/ipfs-cluster/template | 1 -
 1 file changed, 1 deletion(-)

diff --git a/srcpkgs/ipfs-cluster/template b/srcpkgs/ipfs-cluster/template
index 281a5d1239e..27e6d6aad94 100644
--- a/srcpkgs/ipfs-cluster/template
+++ b/srcpkgs/ipfs-cluster/template
@@ -5,7 +5,6 @@ revision=1
 build_style=go
 go_import_path="github.com/ipfs/ipfs-cluster"
 go_package="${go_import_path}/cmd/ipfs-cluster-ctl ${go_import_path}/cmd/ipfs-cluster-service"
-hostmakedepends="git wget gx-go"
 depends="go-ipfs"
 short_desc="Collective pinning and composition for IPFS"
 maintainer="Toyam Cox <Vaelatern@voidlinux.org>"

From 95e9df9b0b74958e3a7ca9cb6155beac4e0c1774 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=C3=89rico=20Rolim?= <erico.erc@gmail.com>
Date: Fri, 19 Feb 2021 00:22:05 -0300
Subject: [PATCH 5/7] miniflux: use correct go_import_path.

Also use ChangeLog from master and fix homepage.
---
 srcpkgs/miniflux/template | 10 ++++------
 1 file changed, 4 insertions(+), 6 deletions(-)

diff --git a/srcpkgs/miniflux/template b/srcpkgs/miniflux/template
index aa50315ece7..0bef52b6dc3 100644
--- a/srcpkgs/miniflux/template
+++ b/srcpkgs/miniflux/template
@@ -1,18 +1,16 @@
 # Template file for 'miniflux'
 pkgname=miniflux
 version=2.0.27
-revision=1
+revision=2
 wrksrc="v2-${version}"
 build_style=go
-go_import_path="github.com/miniflux/miniflux"
-go_package="miniflux.app"
-hostmakedepends="git"
+go_import_path="miniflux.app"
 short_desc="Minimalist and opinionated feed reader written in Go"
 maintainer="Frank Steinborn <steinex@nognu.de>"
 license="Apache-2.0"
 homepage="https://miniflux.app"
-changelog="https://raw.githubusercontent.com/miniflux/miniflux/${version}/ChangeLog"
-distfiles="https://github.com/miniflux/miniflux/archive/${version}.tar.gz"
+changelog="https://raw.githubusercontent.com/miniflux/v2/master/ChangeLog"
+distfiles="https://github.com/miniflux/v2/archive/${version}.tar.gz"
 checksum=ec6696b1cf41ef50b76d02d1179838e03d9c3bcb3dce48febe2b5f4ecc450473
 system_accounts="_miniflux"
 

From 7e070e821bd8b4dd746bcc164b40541e9f88f0ee Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=C3=89rico=20Rolim?= <erico.erc@gmail.com>
Date: Fri, 19 Feb 2021 01:31:46 -0300
Subject: [PATCH 6/7] termshark: split command path correctly between
 go_import_path and go_package.

---
 srcpkgs/termshark/template | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/srcpkgs/termshark/template b/srcpkgs/termshark/template
index 941c36f66d5..1b9c8765e74 100644
--- a/srcpkgs/termshark/template
+++ b/srcpkgs/termshark/template
@@ -1,10 +1,10 @@
 # Template file for 'termshark'
 pkgname=termshark
 version=2.2.0
-revision=1
+revision=2
 build_style=go
-go_import_path="github.com/gcla/termshark"
-go_package="${go_import_path}/v2/cmd/termshark"
+go_import_path="github.com/gcla/termshark/v2"
+go_package="${go_import_path}/cmd/termshark"
 hostmakedepends="git"
 depends="wireshark"
 short_desc="Terminal UI for tshark, inspired by Wireshark"

From ef74ea16c020758e00675327bf03b1b2a0f5b5f6 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=C3=89rico=20Rolim?= <erico.erc@gmail.com>
Date: Fri, 19 Feb 2021 01:32:18 -0300
Subject: [PATCH 7/7] sops: use correct go_import_path, add go_package.

---
 srcpkgs/sops/template | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/sops/template b/srcpkgs/sops/template
index d8c344b94bc..ca43b4a502d 100644
--- a/srcpkgs/sops/template
+++ b/srcpkgs/sops/template
@@ -1,9 +1,10 @@
 # Template file for 'sops'
 pkgname=sops
 version=3.6.1
-revision=1
+revision=2
 build_style=go
-go_import_path="go.mozilla.org/sops/v3/cmd/sops"
+go_import_path="go.mozilla.org/sops/v3"
+go_package="${go_import_path}/cmd/sops"
 hostmakedepends="git"
 short_desc="Simple and flexible tool for managing secrets"
 maintainer="Noel Cower <ncower@nil.dev>"

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PR PATCH] [Updated] srcpkgs/: clean up lots of Go packages
  2021-02-18 22:20 [PR PATCH] [WIP] srcpkgs/: most Go packages shouldn't have git in hostmakedepends ericonr
                   ` (2 preceding siblings ...)
  2021-02-19  4:32 ` ericonr
@ 2021-02-19 15:07 ` ericonr
  2021-02-19 15:07 ` [PR PATCH] [Merged]: " ericonr
  4 siblings, 0 replies; 6+ messages in thread
From: ericonr @ 2021-02-19 15:07 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 855 bytes --]

There is an updated pull request by ericonr against master on the void-packages repository

https://github.com/ericonr/void-packages goclean
https://github.com/void-linux/void-packages/pull/28863

srcpkgs/: clean up lots of Go packages
Depending on git for building can sometimes happen due to issue #27690,
where instead of using the unpacked tarball, Go clones the package's
repository itself, since the tarball we provided doesn't contain the
go_import_path we pass to it in the command line.

Since we should require as few dependencies as possible, and this
measure can help catch issues of building the wrong version of a Go
package, we remove git from hostmakedepends where possible.

I'm still pulling in packages that do this, will take a while.

A patch file from https://github.com/void-linux/void-packages/pull/28863.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-goclean-28863.patch --]
[-- Type: text/x-diff, Size: 24200 bytes --]

From 01ee0f99300f8d952879e846fc90e7eb1fbfab16 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=C3=89rico=20Rolim?= <erico.erc@gmail.com>
Date: Fri, 19 Feb 2021 00:55:24 -0300
Subject: [PATCH 1/7] srcpkgs/: clean up Go packages.

Fix small typos, expand some variables, leave comments for updates.
---
 srcpkgs/antibody/template        | 2 +-
 srcpkgs/caddy/template           | 1 +
 srcpkgs/chezmoi/template         | 2 +-
 srcpkgs/consul-template/template | 2 +-
 srcpkgs/consul/template          | 2 +-
 srcpkgs/crane/template           | 2 +-
 srcpkgs/dep/template             | 2 +-
 srcpkgs/docker-gen/template      | 2 +-
 srcpkgs/flint/template           | 2 +-
 srcpkgs/forego/template          | 2 +-
 srcpkgs/gendesk/template         | 2 +-
 srcpkgs/git-lfs/template         | 2 +-
 srcpkgs/gkill/template           | 2 +-
 srcpkgs/glock/template           | 2 +-
 srcpkgs/go-ipfs/template         | 4 ++--
 srcpkgs/hugo/template            | 4 ++--
 srcpkgs/lego/template            | 4 ++--
 srcpkgs/massren/template         | 4 ++--
 srcpkgs/micro/template           | 2 +-
 srcpkgs/nomad/template           | 4 ++--
 srcpkgs/peco/template            | 2 +-
 srcpkgs/sift/template            | 2 +-
 srcpkgs/tag/template             | 4 ++--
 srcpkgs/terragrunt/template      | 2 +-
 srcpkgs/vault/template           | 4 ++--
 srcpkgs/webcat/template          | 2 +-
 srcpkgs/websocketd/template      | 2 +-
 27 files changed, 34 insertions(+), 33 deletions(-)

diff --git a/srcpkgs/antibody/template b/srcpkgs/antibody/template
index 7071501830c..cb109f0b183 100644
--- a/srcpkgs/antibody/template
+++ b/srcpkgs/antibody/template
@@ -9,7 +9,7 @@ short_desc="Fast and lightweight shell plugin manager"
 maintainer="SolitudeSF <solitudesf@protonmail.com>"
 license="MIT"
 homepage="https://getantibody.github.io/"
-distfiles="https://${go_import_path}/archive/v${version}.tar.gz"
+distfiles="https://github.com/getantibody/antibody/archive/v${version}.tar.gz"
 checksum=87bced5fba8cf5d587ea803d33dda72e8bcbd4e4c9991a9b40b2de4babbfc24f
 
 post_install() {
diff --git a/srcpkgs/caddy/template b/srcpkgs/caddy/template
index dbae7057566..6fe986419c9 100644
--- a/srcpkgs/caddy/template
+++ b/srcpkgs/caddy/template
@@ -3,6 +3,7 @@ pkgname=caddy
 version=1.0.5
 revision=1
 build_style=go
+# XXX: use caddy/v2 when updating
 go_import_path=github.com/caddyserver/caddy
 go_package="${go_import_path}/caddy"
 hostmakedepends="git"
diff --git a/srcpkgs/chezmoi/template b/srcpkgs/chezmoi/template
index 5c6d47e5abc..64326d00b13 100644
--- a/srcpkgs/chezmoi/template
+++ b/srcpkgs/chezmoi/template
@@ -12,7 +12,7 @@ short_desc="Manage your dotfiles across multiple machines, securely"
 maintainer="Abigail G <dev@kb6.ee>"
 license="MIT"
 homepage="https://chezmoi.io/"
-distfiles="https://github.com/twpayne/${pkgname}/archive/v${version}.tar.gz"
+distfiles="https://github.com/twpayne/chezmoi/archive/v${version}.tar.gz"
 checksum=23515591028202aaf7af908e38972f156ee08022f535bc74aaa9244b82da2fa1
 
 post_install() {
diff --git a/srcpkgs/consul-template/template b/srcpkgs/consul-template/template
index 3d490804ba2..00cd77f3416 100644
--- a/srcpkgs/consul-template/template
+++ b/srcpkgs/consul-template/template
@@ -3,7 +3,7 @@ pkgname=consul-template
 version=0.25.1
 revision=1
 build_style=go
-go_import_path="github.com/hashicorp/$pkgname"
+go_import_path="github.com/hashicorp/consul-template"
 hostmakedepends="git"
 short_desc="Template rendering, notifier, and supervisor for Consul and Vault data"
 maintainer="Noel Cower <ncower@nil.dev>"
diff --git a/srcpkgs/consul/template b/srcpkgs/consul/template
index e55c4d587fd..b6fd558b9c3 100644
--- a/srcpkgs/consul/template
+++ b/srcpkgs/consul/template
@@ -3,7 +3,7 @@ pkgname=consul
 version=1.8.4
 revision=1
 build_style=go
-go_import_path="github.com/hashicorp/${pkgname}"
+go_import_path="github.com/hashicorp/consul"
 _git_commit=9ea1a204d832cfd4d8c5cba9df56876a526a4531
 go_ldflags="-X ${go_import_path}/version.GitCommit=${_git_commit} -X ${go_import_path}/version.GitDescribe=v${version}"
 # consul has a vendor directory, but relies on replace statements in go.mod, so
diff --git a/srcpkgs/crane/template b/srcpkgs/crane/template
index 0a19c2a68a8..edb04e896ae 100644
--- a/srcpkgs/crane/template
+++ b/srcpkgs/crane/template
@@ -8,7 +8,7 @@ short_desc="Lift containers with ease"
 maintainer="Andrea Brancaleoni <abc@pompel.me>"
 license="MIT"
 go_import_path="github.com/michaelsauter/crane"
-homepage="https://${go_import_path}"
+homepage="https://github.com/michaelsauter/crane"
 distfiles="${homepage}/archive/v${version}.tar.gz"
 checksum=00f202783ae2ef3a2d0e02fba0454defe53e823b4c99e2e3b5af734dc870906e
 
diff --git a/srcpkgs/dep/template b/srcpkgs/dep/template
index f2a886bc66a..79cce541059 100644
--- a/srcpkgs/dep/template
+++ b/srcpkgs/dep/template
@@ -11,7 +11,7 @@ depends="git go"
 short_desc="Go dependency management tool"
 maintainer="Andrea Brancaleoni <abc@pompel.me>"
 license="BSD-3-Clause"
-homepage="https://${go_import_path}"
+homepage="https://github.com/golang/dep"
 distfiles="${homepage}/archive/v${version}.tar.gz"
 checksum=929c8f759838f98323211ba408a831ea80d93b75beda8584b6d950f393a3298a
 
diff --git a/srcpkgs/docker-gen/template b/srcpkgs/docker-gen/template
index 9256fde323a..8a1ab6c3381 100644
--- a/srcpkgs/docker-gen/template
+++ b/srcpkgs/docker-gen/template
@@ -9,7 +9,7 @@ go_import_path="github.com/jwilder/docker-gen"
 go_package="${go_import_path}/cmd/docker-gen"
 maintainer="Andrea Brancaleoni <abc@pompel.me>"
 license="MIT"
-homepage="https://$go_import_path"
+homepage="https://github.com/jwilder/docker-gen"
 distfiles="$homepage/archive/$version.tar.gz"
 checksum=7951b63684e4ace9eab4f87f0c5625648f8add2559fa7779fabdb141a8a83908
 
diff --git a/srcpkgs/flint/template b/srcpkgs/flint/template
index 1b8ae9d964c..9a6b0d8c0aa 100644
--- a/srcpkgs/flint/template
+++ b/srcpkgs/flint/template
@@ -8,7 +8,7 @@ short_desc="Check your project for common sources of contributor friction"
 maintainer="Andrea Brancaleoni <abc@pompel.me>"
 license="MIT"
 go_import_path="github.com/pengwynn/flint"
-homepage="https://${go_import_path}"
+homepage="https://github.com/pengwynn/flint"
 distfiles="${homepage}/archive/v${version}.tar.gz"
 checksum=ec865ec5cad191c7fc9c7c6d5007754372696a708825627383913367f3ef8b7f
 
diff --git a/srcpkgs/forego/template b/srcpkgs/forego/template
index 6f239f15efc..315153aef00 100644
--- a/srcpkgs/forego/template
+++ b/srcpkgs/forego/template
@@ -8,6 +8,6 @@ short_desc="A process supervisor in Go"
 maintainer="Andrea Brancaleoni <abc@pompel.me>"
 license="Apache-2.0"
 go_import_path="github.com/ddollar/forego"
-homepage="https://$go_import_path"
+homepage="https://github.com/ddollar/forego"
 distfiles="$homepage/archive/$version.tar.gz"
 checksum=23119550cc0e45191495823aebe28b42291db6de89932442326340042359b43d
diff --git a/srcpkgs/gendesk/template b/srcpkgs/gendesk/template
index 1c2d600d23d..51904d9d14d 100644
--- a/srcpkgs/gendesk/template
+++ b/srcpkgs/gendesk/template
@@ -10,7 +10,7 @@ short_desc="Utility to generate .desktop files and download icons"
 maintainer="Benjamín Albiñana <benalb@gmail.com>"
 license="MIT"
 homepage="http://roboticoverlords.org/gendesk/"
-distfiles="https://github.com/xyproto/${pkgname}/archive/${version}.tar.gz
+distfiles="https://github.com/xyproto/gendesk/archive/${version}.tar.gz
  http://roboticoverlords.org/images/default.png"
 checksum="924606ca1c15a140b70f363c4a0ac46fb3ad4d05bc39db400d0b0e41dd4456bb
  4d96eded48e536d02e35727c36dc20844c2e44654e81baf78e10aee4eb48e837"
diff --git a/srcpkgs/git-lfs/template b/srcpkgs/git-lfs/template
index 588d7fe9aa3..81f99bef217 100644
--- a/srcpkgs/git-lfs/template
+++ b/srcpkgs/git-lfs/template
@@ -9,7 +9,7 @@ short_desc="Git extension for versioning large files"
 maintainer="Michael Aldridge <maldridge@voidlinux.org>"
 license="MIT"
 homepage="https://git-lfs.github.com/"
-distfiles="https://github.com/git-lfs/${pkgname}/archive/v${version}.tar.gz"
+distfiles="https://github.com/git-lfs/git-lfs/archive/v${version}.tar.gz"
 checksum=2b2e70f1233f7efe9a010771510391a07527ec7c0af721ecf8edabac5d60f62b
 
 post_build() {
diff --git a/srcpkgs/gkill/template b/srcpkgs/gkill/template
index f2b9ae64a20..6c9d5adafa4 100644
--- a/srcpkgs/gkill/template
+++ b/srcpkgs/gkill/template
@@ -8,7 +8,7 @@ short_desc="Easy Process Killer"
 maintainer="Andrea Brancaleoni <abc@pompel.me>"
 license="MIT"
 go_import_path="github.com/heppu/gkill"
-homepage="https://$go_import_path"
+homepage="https://github.com/heppu/gkill"
 distfiles="$homepage/archive/v$version.tar.gz"
 checksum=aee86f1e18a88ecd3024c6deb3dbd6a2e385961ad8365046dc2b64596bdbb84b
 
diff --git a/srcpkgs/glock/template b/srcpkgs/glock/template
index 6cd6cc4c5d8..3d5eb4ea734 100644
--- a/srcpkgs/glock/template
+++ b/srcpkgs/glock/template
@@ -11,6 +11,6 @@ go_import_path="github.com/robfig/glock"
 go_package="${go_import_path}"
 maintainer="Andrea Brancaleoni <abc@pompel.me>"
 license="Public Domain"
-homepage="https://$go_import_path"
+homepage="https://github.com/robfig/glock"
 distfiles="$homepage/archive/$_commit.tar.gz"
 checksum=b8fea16ccdfa4a927a8590753d44ca5bb610561f3b9e09cc1e501ef5c9351dc9
diff --git a/srcpkgs/go-ipfs/template b/srcpkgs/go-ipfs/template
index 4f0a7e98403..321d7015598 100644
--- a/srcpkgs/go-ipfs/template
+++ b/srcpkgs/go-ipfs/template
@@ -3,7 +3,7 @@ pkgname=go-ipfs
 version=0.7.0
 revision=2
 build_style=go
-go_import_path="github.com/ipfs/${pkgname}"
+go_import_path="github.com/ipfs/go-ipfs"
 go_package="${go_import_path}/cmd/ipfs"
 hostmakedepends="git"
 depends="fs-repo-migrations>=1.6.4"
@@ -12,7 +12,7 @@ maintainer="Christopher Brannon <chris@the-brannons.com>"
 license="MIT, Apache-2.0"
 homepage="https://ipfs.io"
 changelog="https://github.com/ipfs/go-ipfs/blob/master/CHANGELOG.md"
-distfiles="https://${go_import_path}/archive/v${version}.tar.gz"
+distfiles="https://github.com/ipfs/go-ipfs/archive/v${version}.tar.gz"
 checksum=152986ebb30657ab706bee708fbe929114f5e8c39fbe602e3bbec93fe74c9123
 
 system_accounts="_ipfs"
diff --git a/srcpkgs/hugo/template b/srcpkgs/hugo/template
index 9b4818c6467..8abec86a971 100644
--- a/srcpkgs/hugo/template
+++ b/srcpkgs/hugo/template
@@ -3,7 +3,7 @@ pkgname=hugo
 version=0.80.0
 revision=1
 build_style=go
-go_import_path="github.com/gohugoio/${pkgname}"
+go_import_path="github.com/gohugoio/hugo"
 go_build_tags="$(vopt_if extended extended)"
 hostmakedepends="git"
 depends="$(vopt_if pygments python-Pygments)"
@@ -11,7 +11,7 @@ short_desc="Fast & Modern Static Website Engine"
 maintainer="Andrea Brancaleoni <abc@pompel.me>"
 license="Apache-2.0"
 homepage="https://gohugo.io"
-distfiles="https://${go_import_path}/archive/v${version}.tar.gz"
+distfiles="https://github.com/gohugoio/hugo/archive/v${version}.tar.gz"
 checksum=4ddcd6ebea21e5fd4067db4a481ab7810e34496d5991a3520169c8f5ee1d38bb
 
 build_options="pygments extended"
diff --git a/srcpkgs/lego/template b/srcpkgs/lego/template
index a71ffb026e3..573dbdf943b 100644
--- a/srcpkgs/lego/template
+++ b/srcpkgs/lego/template
@@ -3,8 +3,8 @@ pkgname=lego
 version=4.0.1
 revision=1
 build_style=go
-go_import_path="github.com/go-acme/${pkgname}/v4"
-go_package="${go_import_path}/cmd/${pkgname}"
+go_import_path="github.com/go-acme/lego/v4"
+go_package="${go_import_path}/cmd/lego"
 hostmakedepends="git"
 short_desc="Let's Encrypt client and ACME library written in Go"
 maintainer="Anachron <gith@cron.world>"
diff --git a/srcpkgs/massren/template b/srcpkgs/massren/template
index db3941c7170..d3f4250b2ec 100644
--- a/srcpkgs/massren/template
+++ b/srcpkgs/massren/template
@@ -7,8 +7,8 @@ hostmakedepends="git"
 short_desc="Massive renamer from command line"
 maintainer="Andrea Brancaleoni <abc@pompel.me>"
 license="MIT"
-go_import_path="github.com/laurent22/${pkgname}"
-homepage="https://${go_import_path}"
+go_import_path="github.com/laurent22/massren"
+homepage="https://github.com/laurent22/massren"
 distfiles="$homepage/archive/v$version.tar.gz"
 checksum=7a728d96a9e627c3609d147db64bba60ced33c407c75e9512147a5c83ba94f56
 
diff --git a/srcpkgs/micro/template b/srcpkgs/micro/template
index 27b87e22b7f..c0a2842eb85 100644
--- a/srcpkgs/micro/template
+++ b/srcpkgs/micro/template
@@ -6,7 +6,7 @@ build_style=go
 go_import_path="github.com/zyedidia/micro/v2"
 go_package="${go_import_path}/cmd/micro"
 go_ldflags="-X github.com/zyedidia/micro/v2/internal/util.Version=${version}"
-# Adding CompuileDate is bad reproducibility and adding CommitHash
+# Adding CompileDate is bad for reproducibility and adding CommitHash
 # is redundant as we use a tag to build the package.
 hostmakedepends="git"
 short_desc="Modern and intuitive terminal-based text editor"
diff --git a/srcpkgs/nomad/template b/srcpkgs/nomad/template
index 9ed33f12a0a..ddaf4f6b78e 100644
--- a/srcpkgs/nomad/template
+++ b/srcpkgs/nomad/template
@@ -3,7 +3,7 @@ pkgname=nomad
 version=1.0.1
 revision=1
 build_style=go
-go_import_path="github.com/hashicorp/${pkgname}"
+go_import_path="github.com/hashicorp/nomad"
 go_build_tags="ui release"
 _git_commit=a480eed0815c54612856d9115a34bb1d1a773e8c
 go_ldflags="-X ${go_import_path}/version.GitCommit=${_git_commit}"
@@ -12,7 +12,7 @@ short_desc="Cluster scheduler designed to easily integrate into existing workflo
 maintainer="Michael Aldridge <maldridge@voidlinux.org>"
 license="MPL-2.0"
 homepage="https://www.nomadproject.io/"
-distfiles="https://${go_import_path}/archive/v${version}.tar.gz"
+distfiles="https://github.com/hashicorp/nomad/archive/v${version}.tar.gz"
 checksum=1dca9ebb1636fc8ef005d9c6eed8cf10fbfc3d7c9ff7307606454142d858f419
 patch_args="-Np1"
 
diff --git a/srcpkgs/peco/template b/srcpkgs/peco/template
index 44c50774ed2..182c2e5ecdc 100644
--- a/srcpkgs/peco/template
+++ b/srcpkgs/peco/template
@@ -10,7 +10,7 @@ short_desc="Simplistic interactive filtering tool"
 maintainer="Leah Neukirchen <leah@vuxu.org>"
 license="MIT"
 homepage="https://github.com/peco/peco"
-distfiles="https://github.com/${pkgname}/${pkgname}/archive/v${version}.tar.gz"
+distfiles="https://github.com/peco/peco/archive/v${version}.tar.gz"
 checksum=90d87503265c12f8583f5c6bc19c83eba7a2e15219a6339d5041628aa48c4705
 
 post_install() {
diff --git a/srcpkgs/sift/template b/srcpkgs/sift/template
index adf4b95b79f..22a9698bf44 100644
--- a/srcpkgs/sift/template
+++ b/srcpkgs/sift/template
@@ -8,6 +8,6 @@ short_desc="A fast and powerful open source alternative to grep"
 maintainer="Andrea Brancaleoni <abc@pompel.me>"
 license="GPL-3"
 go_import_path="github.com/svent/sift"
-homepage="https://$go_import_path"
+homepage="https://github.com/svent/sift"
 distfiles="$homepage/archive/v$version.tar.gz"
 checksum=bbbd5c472c36b78896cd7ae673749d3943621a6d5523d47973ed2fc6800ae4c8
diff --git a/srcpkgs/tag/template b/srcpkgs/tag/template
index 1363f7118a8..7cd64a2e240 100644
--- a/srcpkgs/tag/template
+++ b/srcpkgs/tag/template
@@ -4,12 +4,12 @@ version=1.4.0
 revision=7
 build_style=go
 hostmakedepends="git mercurial"
-go_import_path="github.com/aykamko/${pkgname}"
+go_import_path="github.com/aykamko/tag"
 short_desc="Instantly jump to your ag matches"
 maintainer="Andrea Brancaleoni <abc@pompel.me>"
 license="MIT"
 homepage="https://github.com/aykamko/tag"
-distfiles="https://${go_import_path}/archive/v${version}.tar.gz"
+distfiles="${homepage}/archive/v${version}.tar.gz"
 checksum=d3a02466e600634cf0ffff9ad8c5f70eba97e44758edf35cc4efbda9cbfdff9a
 
 post_install() {
diff --git a/srcpkgs/terragrunt/template b/srcpkgs/terragrunt/template
index f907bacb02e..f8fb232a5c3 100644
--- a/srcpkgs/terragrunt/template
+++ b/srcpkgs/terragrunt/template
@@ -3,7 +3,7 @@ pkgname=terragrunt
 version=0.28.4
 revision=1
 build_style=go
-go_import_path="github.com/gruntwork-io/$pkgname"
+go_import_path="github.com/gruntwork-io/terragrunt"
 hostmakedepends="git"
 depends="terraform"
 short_desc="Thin wrapper for Terraform that provides extra tools"
diff --git a/srcpkgs/vault/template b/srcpkgs/vault/template
index edfa5c95a91..85fc439ba9c 100644
--- a/srcpkgs/vault/template
+++ b/srcpkgs/vault/template
@@ -3,7 +3,7 @@ pkgname=vault
 version=1.6.1
 revision=1
 build_style=go
-go_import_path="github.com/hashicorp/${pkgname}"
+go_import_path="github.com/hashicorp/vault"
 go_build_tags="release"
 _git_commit=6d2db3f033e02e70202bef9ec896360062b88b03
 go_ldflags="-X ${go_import_path}/sdk/version.GitCommit=${_git_commit}"
@@ -12,7 +12,7 @@ short_desc="Manage Secrets and Protect Sensitive Data"
 maintainer="Michael Aldridge <maldridge@voidlinux.org>"
 license="MPL-2.0"
 homepage="https://www.vaultproject.io/"
-distfiles="https://github.com/hashicorp/${pkgname}/archive/v${version}.tar.gz"
+distfiles="https://github.com/hashicorp/vault/archive/v${version}.tar.gz"
 checksum=fb5d96e682a48bfd421b13cdfffd710da0238dbded1988aab822dd5aae75b4c4
 system_accounts="_vault"
 make_dirs="/var/lib/vault 0700 _vault _vault
diff --git a/srcpkgs/webcat/template b/srcpkgs/webcat/template
index c1cb0b678a5..5d6c459dd93 100644
--- a/srcpkgs/webcat/template
+++ b/srcpkgs/webcat/template
@@ -9,5 +9,5 @@ short_desc="WebSocket Netcat"
 maintainer="Andrea Brancaleoni <abc@pompel.me>"
 license="GPL-3"
 homepage="https://github.com/thypon/webcat"
-distfiles="https://github.com/thypon/${pkgname}/archive/v${version}.tar.gz"
+distfiles="https://github.com/thypon/webcat/archive/v${version}.tar.gz"
 checksum=5b3be1cb8deb08f144d674a0bf23f97a692ebb601666d3a38df6e80b2e68d0b7
diff --git a/srcpkgs/websocketd/template b/srcpkgs/websocketd/template
index e0eba0cdb59..80857258f37 100644
--- a/srcpkgs/websocketd/template
+++ b/srcpkgs/websocketd/template
@@ -8,6 +8,6 @@ short_desc="Turn any program that uses STDIN/STDOUT into a WebSocket server"
 maintainer="Andrea Brancaleoni <abc@pompel.me>"
 license="BSD"
 go_import_path="github.com/joewalnes/websocketd"
-homepage="https://$go_import_path"
+homepage="https://github.com/joewalnes/websocketd"
 distfiles="$homepage/archive/v$version.tar.gz"
 checksum=6b8fe0fad586d794e002340ee597059b2cfc734ba7579933263aef4743138fe5

From 1aaee8fceabbb3ce5b79a4fc87c0504cf9e93abd Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=C3=89rico=20Rolim?= <erico.erc@gmail.com>
Date: Thu, 18 Feb 2021 23:25:27 -0300
Subject: [PATCH 2/7] gucci: fix checksum.

Upstream force pushed the same tag, so checksum for the tarball changed.
Only changes were timestamps for files and some small differences in
their .travis.yml file, which doesn't affect the build.
---
 srcpkgs/gucci/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/gucci/template b/srcpkgs/gucci/template
index fb10a6ca866..fd3f94cdf7e 100644
--- a/srcpkgs/gucci/template
+++ b/srcpkgs/gucci/template
@@ -10,7 +10,7 @@ maintainer="Leah Neukirchen <leah@vuxu.org>"
 license="MIT"
 homepage="https://github.com/noqcks/gucci"
 distfiles="https://github.com/noqcks/gucci/archive/${version}.tar.gz"
-checksum=7ce8967cb83eddb8db6878a9f00a96996f7503fb0a5ee01fa9e1947d2444ead8
+checksum=50d9d513fff97128bbd92685af5b244cbc1453e79010fb2b1aea51c84d478855
 
 post_install() {
 	vlicense LICENSE

From b8e0bc3a0ccc796a4bdea2990876e74d825833c9 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=C3=89rico=20Rolim?= <erico.erc@gmail.com>
Date: Thu, 18 Feb 2021 23:57:10 -0300
Subject: [PATCH 3/7] hydroxide: set correct go_import_path and use go_package.

---
 srcpkgs/hydroxide/template | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/srcpkgs/hydroxide/template b/srcpkgs/hydroxide/template
index 86cc09417aa..bd4dc1b255e 100644
--- a/srcpkgs/hydroxide/template
+++ b/srcpkgs/hydroxide/template
@@ -3,7 +3,8 @@ pkgname=hydroxide
 version=0.2.17
 revision=1
 build_style=go
-go_import_path=github.com/emersion/hydroxide/cmd/hydroxide
+go_import_path=github.com/emersion/hydroxide
+go_package=$go_import_path/cmd/hydroxide
 hostmakedepends="git"
 short_desc="Third-party, open-source ProtonMail CardDAV, IMAP and SMTP bridge"
 maintainer="DirectorX <void.directorx@protonmail.com>"

From d9eb3cf9e2e732fd634f94cb0e022033b6f5ea29 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=C3=89rico=20Rolim?= <erico.erc@gmail.com>
Date: Thu, 18 Feb 2021 23:59:56 -0300
Subject: [PATCH 4/7] ipfs-cluster: clean up unnecessary hostmakedepends

At least gx-go seems to have been forgotten in commit
31effcb4a1a21b4b0e209ba2618365ef17c0cc41, which removed the commands
using gx from pre_build.
---
 srcpkgs/ipfs-cluster/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/ipfs-cluster/template b/srcpkgs/ipfs-cluster/template
index 281a5d1239e..ebb062d409c 100644
--- a/srcpkgs/ipfs-cluster/template
+++ b/srcpkgs/ipfs-cluster/template
@@ -5,7 +5,7 @@ revision=1
 build_style=go
 go_import_path="github.com/ipfs/ipfs-cluster"
 go_package="${go_import_path}/cmd/ipfs-cluster-ctl ${go_import_path}/cmd/ipfs-cluster-service"
-hostmakedepends="git wget gx-go"
+hostmakedepends="git"
 depends="go-ipfs"
 short_desc="Collective pinning and composition for IPFS"
 maintainer="Toyam Cox <Vaelatern@voidlinux.org>"

From af4d1c0c1a0d5dad32a983f11629876990aa2abb Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=C3=89rico=20Rolim?= <erico.erc@gmail.com>
Date: Fri, 19 Feb 2021 00:22:05 -0300
Subject: [PATCH 5/7] miniflux: use correct go_import_path.

Also use ChangeLog from master and fix homepage.
---
 srcpkgs/miniflux/template | 9 ++++-----
 1 file changed, 4 insertions(+), 5 deletions(-)

diff --git a/srcpkgs/miniflux/template b/srcpkgs/miniflux/template
index aa50315ece7..00515c0a7a4 100644
--- a/srcpkgs/miniflux/template
+++ b/srcpkgs/miniflux/template
@@ -1,18 +1,17 @@
 # Template file for 'miniflux'
 pkgname=miniflux
 version=2.0.27
-revision=1
+revision=2
 wrksrc="v2-${version}"
 build_style=go
-go_import_path="github.com/miniflux/miniflux"
-go_package="miniflux.app"
+go_import_path="miniflux.app"
 hostmakedepends="git"
 short_desc="Minimalist and opinionated feed reader written in Go"
 maintainer="Frank Steinborn <steinex@nognu.de>"
 license="Apache-2.0"
 homepage="https://miniflux.app"
-changelog="https://raw.githubusercontent.com/miniflux/miniflux/${version}/ChangeLog"
-distfiles="https://github.com/miniflux/miniflux/archive/${version}.tar.gz"
+changelog="https://raw.githubusercontent.com/miniflux/v2/master/ChangeLog"
+distfiles="https://github.com/miniflux/v2/archive/${version}.tar.gz"
 checksum=ec6696b1cf41ef50b76d02d1179838e03d9c3bcb3dce48febe2b5f4ecc450473
 system_accounts="_miniflux"
 

From 3b1f9e0dd3db342cf27c615796e256af76350bec Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=C3=89rico=20Rolim?= <erico.erc@gmail.com>
Date: Fri, 19 Feb 2021 01:31:46 -0300
Subject: [PATCH 6/7] termshark: split command path correctly between
 go_import_path and go_package.

---
 srcpkgs/termshark/template | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/srcpkgs/termshark/template b/srcpkgs/termshark/template
index 941c36f66d5..1b9c8765e74 100644
--- a/srcpkgs/termshark/template
+++ b/srcpkgs/termshark/template
@@ -1,10 +1,10 @@
 # Template file for 'termshark'
 pkgname=termshark
 version=2.2.0
-revision=1
+revision=2
 build_style=go
-go_import_path="github.com/gcla/termshark"
-go_package="${go_import_path}/v2/cmd/termshark"
+go_import_path="github.com/gcla/termshark/v2"
+go_package="${go_import_path}/cmd/termshark"
 hostmakedepends="git"
 depends="wireshark"
 short_desc="Terminal UI for tshark, inspired by Wireshark"

From 463b05dd5e31a37900bf01ad80531b444a14ced6 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=C3=89rico=20Rolim?= <erico.erc@gmail.com>
Date: Fri, 19 Feb 2021 01:32:18 -0300
Subject: [PATCH 7/7] sops: use correct go_import_path, add go_package.

---
 srcpkgs/sops/template | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/sops/template b/srcpkgs/sops/template
index d8c344b94bc..ca43b4a502d 100644
--- a/srcpkgs/sops/template
+++ b/srcpkgs/sops/template
@@ -1,9 +1,10 @@
 # Template file for 'sops'
 pkgname=sops
 version=3.6.1
-revision=1
+revision=2
 build_style=go
-go_import_path="go.mozilla.org/sops/v3/cmd/sops"
+go_import_path="go.mozilla.org/sops/v3"
+go_package="${go_import_path}/cmd/sops"
 hostmakedepends="git"
 short_desc="Simple and flexible tool for managing secrets"
 maintainer="Noel Cower <ncower@nil.dev>"

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PR PATCH] [Merged]: srcpkgs/: clean up lots of Go packages
  2021-02-18 22:20 [PR PATCH] [WIP] srcpkgs/: most Go packages shouldn't have git in hostmakedepends ericonr
                   ` (3 preceding siblings ...)
  2021-02-19 15:07 ` [PR PATCH] [Updated] srcpkgs/: clean up lots of Go packages ericonr
@ 2021-02-19 15:07 ` ericonr
  4 siblings, 0 replies; 6+ messages in thread
From: ericonr @ 2021-02-19 15:07 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 699 bytes --]

There's a merged pull request on the void-packages repository

srcpkgs/: clean up lots of Go packages
https://github.com/void-linux/void-packages/pull/28863

Description:
Depending on git for building can sometimes happen due to issue #27690,
where instead of using the unpacked tarball, Go clones the package's
repository itself, since the tarball we provided doesn't contain the
go_import_path we pass to it in the command line.

Since we should require as few dependencies as possible, and this
measure can help catch issues of building the wrong version of a Go
package, we remove git from hostmakedepends where possible.

I'm still pulling in packages that do this, will take a while.

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2021-02-19 15:07 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-02-18 22:20 [PR PATCH] [WIP] srcpkgs/: most Go packages shouldn't have git in hostmakedepends ericonr
2021-02-19  2:27 ` [PR PATCH] [Updated] " ericonr
2021-02-19  3:34 ` ericonr
2021-02-19  4:32 ` ericonr
2021-02-19 15:07 ` [PR PATCH] [Updated] srcpkgs/: clean up lots of Go packages ericonr
2021-02-19 15:07 ` [PR PATCH] [Merged]: " ericonr

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).