caddy-dns / gandi

Caddy module: dns.providers.gandi
MIT License
12 stars 4 forks source link

Can't build version 1.0.1 of plugin #1

Closed mgraupner closed 3 years ago

mgraupner commented 3 years ago

I'm trying to build the current Caddy version with the Gandi Plugin but it fails.

docker file:

FROM caddy:2.2.1-builder AS builder

RUN xcaddy build v2.2.1 \
    --with github.com/caddy-dns/gandi

FROM caddy:2.2.1

COPY --from=builder /usr/bin/caddy /usr/bin/caddy

Getting the following error message during build process:

Building web
Step 1/4 : FROM caddy:2.2.1-builder AS builder
 ---> 7fdc765c6443
Step 2/4 : RUN xcaddy build v2.2.1     --with github.com/caddy-dns/gandi
 ---> Running in ab3fbf199fe9
2020/11/17 15:40:09 [INFO] Temporary folder: /tmp/buildenv_2020-11-17-1540.327276530
2020/11/17 15:40:09 [INFO] Writing main module: /tmp/buildenv_2020-11-17-1540.327276530/main.go
2020/11/17 15:40:09 [INFO] Initializing Go module
2020/11/17 15:40:09 [INFO] exec (timeout=10s): /usr/local/go/bin/go mod init caddy 
go: creating new go.mod: module caddy
2020/11/17 15:40:09 [INFO] Pinning versions
2020/11/17 15:40:09 [INFO] exec (timeout=0s): /usr/local/go/bin/go get -d -v github.com/caddyserver/caddy/v2@v2.2.1 
go: downloading github.com/caddyserver/caddy/v2 v2.2.1
go: downloading golang.org/x/crypto v0.0.0-20200728195943-123391ffb6de
go: downloading github.com/caddyserver/certmagic v0.12.0
go: downloading go.uber.org/zap v1.15.0
go: downloading github.com/prometheus/client_golang v1.7.1
go: downloading go.uber.org/multierr v1.5.0
go: downloading go.uber.org/atomic v1.6.0
go: downloading github.com/golang/protobuf v1.4.2
go: downloading github.com/prometheus/procfs v0.1.3
go: downloading github.com/prometheus/common v0.10.0
go: downloading github.com/beorn7/perks v1.0.1
go: downloading github.com/prometheus/client_model v0.2.0
go: downloading github.com/klauspost/cpuid v1.2.5
go: downloading github.com/mholt/acmez v0.1.1
go: downloading github.com/miekg/dns v1.1.30
go: downloading github.com/cespare/xxhash v1.1.0
go: downloading google.golang.org/protobuf v1.24.0
go: downloading golang.org/x/sys v0.0.0-20200615200032-f1bc736245b1
go: downloading github.com/cespare/xxhash/v2 v2.1.1
go: downloading golang.org/x/net v0.0.0-20200707034311-ab3426394381
go: downloading github.com/libdns/libdns v0.1.0
go: downloading github.com/matttproud/golang_protobuf_extensions v1.0.1
go: downloading golang.org/x/text v0.3.2
2020/11/17 15:40:13 [INFO] exec (timeout=0s): /usr/local/go/bin/go get -d -v github.com/caddy-dns/gandi 
go: downloading github.com/caddy-dns/gandi v1.0.1
go get github.com/caddy-dns/gandi: github.com/caddy-dns/gandi@v1.0.1: verifying module: checksum mismatch
    downloaded: h1:oF64bX3y8St1KDvqDNHHKlsKSPfCcsjjlrAOY/6ochU=
    sum.golang.org: h1:LtTcFXwVqasaOQbJCd2WIQehTw0WPA8DrgKdievSMgU=

SECURITY ERROR
This download does NOT match the one reported by the checksum server.
The bits may have been replaced on the origin server, or an attacker may
have intercepted the download attempt.

For more information, see 'go help module-auth'.
2020/11/17 15:40:15 [FATAL] exit status 1
obynio commented 3 years ago

Yes, it seems I messed up something with the checksums. As there is no easy way to update the checksum submitted to sum.golang.org I released a new version v1.0.2 to force the refresh of the checksum. Now it should work fine.

mgraupner commented 3 years ago

Thank you very much, first thing I will try tomorrow morning.

mholt commented 3 years ago

That problem has bit me before, too (on other repos) -- thanks for the fix!

mgraupner commented 3 years ago

Great, compilation of the Plugin and the server passed without any problems.

Again, thank you very much for your support @obynio.

Xumeiquer commented 2 years ago

The issue seem to persist on 1.0.2

verifying github.com/libdns/gandi@v1.0.2/go.mod: checksum mismatch
    downloaded: h1:VN+Lh8Teq6nYszNsPSLKdIv24hOCcQu0rJWHQa2jPZc=
    go.sum:     h1:hxpbQKcQFgQrTS5lV4tAgn6QoL6HcCnoBJaW5nOW4Sk=

Got the issue after calling go clean -modcache and then go mod tidy.