stayrtr
stayrtr copied to clipboard
Unable to create Debian Package
Hi
I followed the process to build a Debian Package of StayRTR and its not been successful.
I am using go version go1.20.3
:~/stayrtr$ sudo docker-compose -f docker-compose-pkg.yml up
Starting stayrtr_packager_1 ... done
Attaching to stayrtr_packager_1
packager_1 | fatal: detected dubious ownership in repository at '/work'
packager_1 | To add an exception for this directory, call:
packager_1 |
packager_1 | git config --global --add safe.directory /work
packager_1 | mkdir -p dist/
packager_1 | go build -trimpath -ldflags '-X main.version= -X main.buildinfos=(2023-04-14T09:43:13+0000)' -o dist/stayrtr--linux-x86_64 cmd/stayrtr/stayrtr.go
packager_1 | # golang.org/x/crypto/ssh
packager_1 | /root/go/pkg/mod/golang.org/x/[email protected]/ssh/cipher.go:499:13: undefined: io.Discard
packager_1 | /root/go/pkg/mod/golang.org/x/[email protected]/ssh/session.go:508:14: undefined: io.Discard
packager_1 | /root/go/pkg/mod/golang.org/x/[email protected]/ssh/session.go:521:14: undefined: io.Discard
packager_1 | note: module requires Go 1.17
packager_1 | # github.com/bgp/stayrtr/utils
packager_1 | utils/utils.go:167:15: undefined: io.ReadAll
packager_1 | note: module requires Go 1.17
packager_1 | # golang.org/x/sys/unix
packager_1 | /root/go/pkg/mod/golang.org/x/[email protected]/unix/syscall.go:83:16: undefined: unsafe.Slice
packager_1 | /root/go/pkg/mod/golang.org/x/[email protected]/unix/syscall_linux.go:2271:9: undefined: unsafe.Slice
packager_1 | /root/go/pkg/mod/golang.org/x/[email protected]/unix/syscall_unix.go:118:7: undefined: unsafe.Slice
packager_1 | /root/go/pkg/mod/golang.org/x/[email protected]/unix/sysvshm_unix.go:33:7: undefined: unsafe.Slice
packager_1 | note: module requires Go 1.17
packager_1 | make: *** [Makefile:54: build-stayrtr] Error 2
stayrtr_packager_1 exited with code 2
I have followed the instructions to do
packager_1 | git config --global --add safe.directory /work
packager_1 | mkdir -p dist/
packager_1 | go build -trimpath -ldflags '-X main.version= -X main.buildinfos=(2023-04-14T09:43:13+0000)' -o dist/stayrtr--linux-x86_64 cmd/stayrtr/stayrtr.go
but this has not worked. I have also downgraded to Go 1.17 and this still does the same.
Any chance please you can point out if I am doing something wrong or is this a genuine issue ?