diff --git a/_service b/_service index 9f0e1e5..539e77c 100644 --- a/_service +++ b/_service @@ -1,8 +1,20 @@ + + https://github.com/caddyserver/caddy.git + git + caddy + @PARENT_TAG@ + v(.*) + v2.8.4 + enable + + + + + *.tar + gz + - ./ - ./ - diff --git a/caddy-2.8.4.tar.gz b/caddy-2.8.4.tar.gz index 5eb010a..e4167cf 100644 --- a/caddy-2.8.4.tar.gz +++ b/caddy-2.8.4.tar.gz @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:9e2125dda6200fc997d3965578e7b526e042857f2305261c02853775c04e1cf6 -size 10306476 +oid sha256:687ce74e4ccca742148e4352085f82f1fe1885a6fbee26dbde84618c44012518 +size 678881 diff --git a/caddy.changes b/caddy.changes index 8406c77..fb73226 100644 --- a/caddy.changes +++ b/caddy.changes @@ -1,3 +1,10 @@ +------------------------------------------------------------------- +Wed Jun 19 13:40:22 UTC 2024 - Alexandre Vicenzi + +- Revert buildable-artifact change, fetch tarball with tar_scm +- Downgrade golang(API) version to match go.mod +- Override Caddy version during build time as suggested in caddy.go + ------------------------------------------------------------------- Fri Jun 14 10:21:50 UTC 2024 - Enrico Belleri diff --git a/caddy.spec b/caddy.spec index 4c83768..839a275 100644 --- a/caddy.spec +++ b/caddy.spec @@ -23,8 +23,7 @@ Summary: Fast, multi-platform web server with automatic HTTPS License: Apache-2.0 Group: Productivity/Networking/Web/Proxy URL: https://caddyserver.com/ -# bug https://github.com/golang/go/issues/29228 -Source0: https://github.com/caddyserver/%{name}/releases/download/v%{version}/%{name}_%{version}_buildable-artifact.tar.gz#/%{name}-%{version}.tar.gz +Source0: %{name}-%{version}.tar.gz Source1: vendor.tar.gz Source2: https://github.com/caddyserver/dist/raw/v%{version}/config/Caddyfile Source3: caddy.service @@ -32,7 +31,7 @@ Source4: https://github.com/caddyserver/dist/raw/v%{version}/welcome/inde Source5: caddy.sysusers BuildRequires: systemd-rpm-macros BuildRequires: sysuser-tools -BuildRequires: golang(API) >= 1.22 +BuildRequires: golang(API) >= 1.21 %{?systemd_requires} %{sysusers_requires} @@ -69,14 +68,15 @@ BuildArch: noarch Fish shell completion script for %{name}, generated during the build. %prep -%autosetup -a 1 -c +%autosetup -a 1 %build # Build the binary. %ifnarch ppc64 export GOFLAGS="-buildmode=pie" %endif -go build -v -x +# overrides caddy reported version (see caddy.go for explanations why this is needed). +go build -ldflags '-X github.com/caddyserver/caddy/v2.CustomVersion=v%{version}' ./cmd/%{name} %check # Execute binary and check version diff --git a/vendor.tar.gz b/vendor.tar.gz index 92aaa33..d5d6f63 100644 --- a/vendor.tar.gz +++ b/vendor.tar.gz @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:4b6de27cc755b38ce0fbb1bb41ad566de9c7d8aa3a5cd13ef3e670f4ff939bba -size 10210785 +oid sha256:618d45c1f5bb905923f1da6f2f1ef921d1c1f1b488c3af723b0e79606ad33825 +size 9782891