On 7/19/22 16:19, Mark E. Fuller wrote:
see https://copr.fedorainfracloud.org/coprs/fuller/test-builds/build/4642384/ https://copr.fedorainfracloud.org/coprs/fuller/test-builds/build/4642384/
Thanks
Mark E. Fuller, Ph.D. HaShikma 19, Apt. 24 Nesher 3681219, Israel +972 (0)53-872-6579 mark.e.fuller@gmail.com mailto:mark.e.fuller@gmail.com fuller@fedoraproject.org mailto:fuller@fedoraproject.org @fuller:one.ems.host
Ok, so the issue is, you don't have the correct default import path, you should check it in go.mod if you have a doubt, it starts with:
module oras.land/oras-go
go 1.17
So you must use that import path when you create your SPEC:
go2rpm -C -r oras.land/oras-go -f https://github.com/oras-project/oras-go
You must specify the forge so the package can be downloaded correctly.
Please note that the next version is a version 2 with a new import path: oras.land/oras-go/v2 You should then create a new package for this version specifically.
But, the package still won't build because of Docker/Moby shenanigans:
oras.land/oras-go/pkg/auth/docker # github.com/docker/docker/registry /usr/share/gocode/src/github.com/docker/docker/registry/auth.go:144:51: cannot use challengeManager (variable of type "github.com/docker/distribution/registry/client/auth/challenge".Manager) as type "github.com/distribution/distribution/v3/registry/client/auth/challenge".Manager in argument to auth.NewAuthorizer: "github.com/docker/distribution/registry/client/auth/challenge".Manager does not implement "github.com/distribution/distribution/v3/registry/client/auth/challenge".Manager (wrong type for GetChallenges method) have GetChallenges(endpoint url.URL) ([]"github.com/docker/distribution/registry/client/auth/challenge".Challenge, error) want GetChallenges(endpoint url.URL) ([]"github.com/distribution/distribution/v3/registry/client/auth/challenge".Challenge, error) FAIL oras.land/oras-go/pkg/auth/docker [build failed]
Here the full list of Docker related dependencies according to go.mod:
github.com/docker/cli v20.10.17+incompatible github.com/docker/distribution v2.7.1+incompatible github.com/docker/docker v20.10.17+incompatible github.com/docker/go-connections v0.4.0
I haven't checked Docker in a while. I think gotmax did a ticket on it for the next meeting. I'll have a look.
Best regards,
Robert-André
golang@lists.fedoraproject.org