Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build failing on caddyserver.com #19

Closed
jimafisk opened this issue Feb 14, 2023 · 10 comments · Fixed by zuohuadong/caddy-git#1 · May be fixed by #20
Closed

Build failing on caddyserver.com #19

jimafisk opened this issue Feb 14, 2023 · 10 comments · Fixed by zuohuadong/caddy-git#1 · May be fixed by #20
Assignees

Comments

@jimafisk
Copy link

Describe the issue

When I try to download Caddy with this plugin built in it hangs for a long time and ultimately fails: https://caddyserver.com/download?package=github.com%2Fgreenpau%2Fcaddy-git

Running a build with another plugin downloads a binary rather quickly without issue.

Is there a chance that this plugin isn't compatible with the latest version of Caddy? Do we have to build from source with a particular dependency that they can't provide through the website?

Configuration

N/A

Version Information

N/A

Expected behavior

I expect the binary with the plugin included to download.

Additional context

N/A

@greenpau
Copy link
Owner

@jimafisk , have you tried specifying the version in your download URL?

@greenpau
Copy link
Owner

@jimafisk , just tried downloading from caddyserver.com and it worked fine.

@jimafisk
Copy link
Author

That's odd, I've tried on a couple of different computers and get the same thing each time:

Screenshot of failed build

build_failed

I just tried setting version 1.0.7 but that didn't seem to work either unfortunately.

@gedw99
Copy link

gedw99 commented Feb 15, 2023

i got the same problem i think ...

i am guessing that the version of xcaddy has to match the version of the this repo in some way ???

go install github.com/caddyserver/xcaddy/cmd/xcaddy@latest

xcaddy build --with github.com/greenpau/[email protected]
2023/02/15 18:44:14 [INFO] Temporary folder: /Users/apple/workspace/go/src/github.com/gedw99/charty-gui/install/exp/caddy/git/buildenv_2023-02-15-1844.2888214292
2023/02/15 18:44:14 [INFO] Writing main module: /Users/apple/workspace/go/src/github.com/gedw99/charty-gui/install/exp/caddy/git/buildenv_2023-02-15-1844.2888214292/main.go
package main

import (
        caddycmd "github.com/caddyserver/caddy/v2/cmd"

        // plug in Caddy modules here
        _ "github.com/caddyserver/caddy/v2/modules/standard"
        _ "github.com/greenpau/caddy-git"
)

func main() {
        caddycmd.Main()
}
2023/02/15 18:44:14 [INFO] Initializing Go module
2023/02/15 18:44:14 [INFO] exec (timeout=10s): /usr/local/opt/go/libexec/bin/go mod init caddy 
go: creating new go.mod: module caddy
go: to add module requirements and sums:
        go mod tidy
2023/02/15 18:44:14 [INFO] Pinning versions
2023/02/15 18:44:14 [INFO] exec (timeout=0s): /usr/local/opt/go/libexec/bin/go get -d -v github.com/caddyserver/caddy/v2 
go: added github.com/beorn7/perks v1.0.1
go: added github.com/caddyserver/caddy/v2 v2.6.4
go: added github.com/caddyserver/certmagic v0.17.2
go: added github.com/cespare/xxhash/v2 v2.1.2
go: added github.com/go-task/slim-sprig v0.0.0-20210107165309-348f09dbbbc0
go: added github.com/golang/mock v1.6.0
go: added github.com/golang/protobuf v1.5.2
go: added github.com/google/pprof v0.0.0-20210407192527-94a9f03dee38
go: added github.com/google/uuid v1.3.0
go: added github.com/klauspost/cpuid/v2 v2.2.3
go: added github.com/libdns/libdns v0.2.1
go: added github.com/matttproud/golang_protobuf_extensions v1.0.1
go: added github.com/mholt/acmez v1.1.0
go: added github.com/miekg/dns v1.1.50
go: added github.com/onsi/ginkgo/v2 v2.2.0
go: added github.com/prometheus/client_golang v1.14.0
go: added github.com/prometheus/client_model v0.3.0
go: added github.com/prometheus/common v0.37.0
go: added github.com/prometheus/procfs v0.8.0
go: added github.com/quic-go/qpack v0.4.0
go: added github.com/quic-go/qtls-go1-18 v0.2.0
go: added github.com/quic-go/qtls-go1-19 v0.2.0
go: added github.com/quic-go/qtls-go1-20 v0.1.0
go: added github.com/quic-go/quic-go v0.32.0
go: added go.uber.org/atomic v1.9.0
go: added go.uber.org/multierr v1.6.0
go: added go.uber.org/zap v1.24.0
go: added golang.org/x/crypto v0.5.0
go: added golang.org/x/exp v0.0.0-20221205204356-47842c84f3db
go: added golang.org/x/mod v0.6.0
go: added golang.org/x/net v0.7.0
go: added golang.org/x/sys v0.5.0
go: added golang.org/x/term v0.5.0
go: added golang.org/x/text v0.7.0
go: added golang.org/x/tools v0.2.0
go: added google.golang.org/protobuf v1.28.1
2023/02/15 18:44:16 [INFO] exec (timeout=0s): /usr/local/opt/go/libexec/bin/go get -d -v github.com/greenpau/[email protected] github.com/caddyserver/caddy/v2 
panic: internal error: can't find reason for requirement on github.com/google/[email protected]

goroutine 1 [running]:
cmd/go/internal/modget.(*resolver).updateBuildList.func1({{0xc0009542b8?, 0xc000884588?}, {0xc0000d0c60?, 0xc000b1e5c8?}})
        /usr/local/Cellar/go/1.19.6/libexec/src/cmd/go/internal/modget/get.go:1760 +0x114
cmd/go/internal/modget.(*resolver).updateBuildList(0xc000556900, {0x1732870, 0xc0000a8000}, {0xc001278d00, 0x1, 0x1})
        /usr/local/Cellar/go/1.19.6/libexec/src/cmd/go/internal/modget/get.go:1765 +0x597
cmd/go/internal/modget.(*resolver).applyUpgrades(0xc000556900, {0x1732870, 0xc0000a8000}, {0xc000482240?, 0x1?, 0x1071c85?})
        /usr/local/Cellar/go/1.19.6/libexec/src/cmd/go/internal/modget/get.go:1312 +0x105
cmd/go/internal/modget.runGet({0x1732870, 0xc0000a8000}, 0xc0000c62b8?, {0xc0000bc160, 0x2, 0x2})
        /usr/local/Cellar/go/1.19.6/libexec/src/cmd/go/internal/modget/get.go:351 +0x45e
main.invoke(0x1a37120, {0xc0000bc130, 0x5, 0x5})
        /usr/local/Cellar/go/1.19.6/libexec/src/cmd/go/main.go:225 +0x34e
main.main()
        /usr/local/Cellar/go/1.19.6/libexec/src/cmd/go/main.go:179 +0x7d1
2023/02/15 18:44:17 [FATAL] exit status 2

@gedw99
Copy link

gedw99 commented Feb 15, 2023

i tried the 2 latest tagged versions of xcaddy at https://github.com/caddyserver/xcaddy/releases/tag/
XCADDY_VER=v0.3.2
XCADDY_VER=v0.3.1

both versions got the same error.

@gedw99
Copy link

gedw99 commented Feb 15, 2023

i also tried the ''' make all ''' with the latest xcaddy just like the make file does.

also fails...

@greenpau
Copy link
Owner

@jimafisk , @gedw99 , there is some issue with Go. What is the go version you are compiling with?

@polds
Copy link

polds commented Feb 23, 2023

I get the same error as @gedw99 using Docker:

FROM caddy:2.6.4-builder AS builder

RUN xcaddy build \
    --with github.com/greenpau/[email protected]

FROM caddy:2.6.4

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

Throws the same error above.

bastianccm added a commit to bastianccm/caddy-git that referenced this issue Feb 24, 2023
go-git stays at v5.4.2 due to backwards-incompatible
breaking change.
goimports is run to reformat the code.
fixes greenpau#19

Co-authored-by: Thorsten Essig <[email protected]>
@zuohuadong
Copy link

@gedw99

see:

https://github.com/zuohuadong/caddy-git

run:

./xcaddy build     --with github.com/greenpau/caddy-git=github.com/zuohuadong/[email protected]

@greenpau
Copy link
Owner

Upgraded to the latest: https://github.com/greenpau/caddy-git/releases/tag/v1.0.8

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment