From 9d4ad1a4565a71a447195704707232baf32ba1a8 Mon Sep 17 00:00:00 2001 From: Carl George Date: Tue, 11 May 2021 22:11:36 -0500 Subject: [PATCH] rpm: Build fixes for v2.4.0 golang 1.16 changed behavior and now requires running `go mod tidy` after modifying go.mod. Running that works on golang 1.15 too, so we'll just run it everywhere. This also sets the minimum required version of golang. https://github.com/golang/go/issues/44129 --- rpm/caddy.spec | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/rpm/caddy.spec b/rpm/caddy.spec index ecc4581..a9d6643 100644 --- a/rpm/caddy.spec +++ b/rpm/caddy.spec @@ -31,7 +31,7 @@ Source6: https://raw.githubusercontent.com/caddyserver/dist/master/script Source10: https://raw.githubusercontent.com/caddyserver/caddy/%{tag}/LICENSE # https://github.com/caddyserver/caddy/commit/e4ec08e977bcc9c798a2fca324c7105040990bcf -BuildRequires: golang >= 1.14 +BuildRequires: golang >= 1.15 BuildRequires: git-core %if 0%{?rhel} && 0%{?rhel} < 8 BuildRequires: systemd @@ -63,6 +63,7 @@ export GOPROXY='https://proxy.golang.org,direct' go mod init caddy echo "require github.com/caddyserver/caddy/v2 %{tag}" >> go.mod +go mod tidy go build \ -buildmode pie \ -compiler gc \