Skip to content

Commit

Permalink
rpm: Build fixes for v2.4.0
Browse files Browse the repository at this point in the history
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.

golang/go#44129
  • Loading branch information
carlwgeorge committed May 12, 2021
1 parent c06aeef commit 9d4ad1a
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion rpm/caddy.spec
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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 \
Expand Down

0 comments on commit 9d4ad1a

Please sign in to comment.