marcindulak / minishift-rpm-centos7

[DISCOURAGED] [DO NOT USE] Packaging minishift https://lists.centos.org/pipermail/centos-devel/2017-March/015723.html
MIT License
1 stars 1 forks source link

golang-github-minishift-minishift - Fedora packages github.com/cheggaaa/pb but minishift requires gopkg.in/cheggaaa/pb.v1 #5

Open marcindulak opened 7 years ago

marcindulak commented 7 years ago

The release of cheggaaa/pb required by minishift is https://github.com/cheggaaa/pb/releases/tag/v1.0.7 (see https://github.com/minishift/minishift/blob/a0a53180478ec02b3b4811560f2fc0168c298298/glide.lock)

while Fedora 25 currently provides:

dnf provides "golang(github.com/cheggaaa/pb)"
#golang-github-cheggaaa-pb-devel-0-0.3.gitda1f27a.fc25.noarch : Console progress bar for Golang

go testfails:

+ go test -compiler gc -ldflags '' github.com/minishift/minishift/cmd/minishift/cmd
../../BUILDROOT/golang-github-minishift-minishift-1.0.0-0.1.gite05dbec.fc25.x86_64/usr/share/gocode/src/github.com/minishift/minishift/pkg/minikube/cluster/cluster.go:42:2: cannot find package "gopkg.in/cheggaaa/pb.v1" in any of:
    /usr/lib/golang/src/gopkg.in/cheggaaa/pb.v1 (from $GOROOT)
    /root/rpmbuild/BUILDROOT/golang-github-minishift-minishift-1.0.0-0.1.gite05dbec.fc25.x86_64/usr/share/gocode/src/gopkg.in/cheggaaa/pb.v1 (from $GOPATH)
    /usr/share/gocode/src/gopkg.in/cheggaaa/pb.v1

Suggested solution requires either:

1A. use github.com/cheggaaa/pb instead of gopkg.in/cheggaaa/pb.v1 in minishift 1B. update golang-github-cheggaaa-pb in Fedora/EPEL7 to version at least 1.0.7 (preferably the latest available)

or:

2A. package gopkg.in/cheggaaa/pb.v1 in Fedora in addition to github.com/cheggaaa/pb

ingvagabund commented 7 years ago

golang-github-cheggaaa-pb should be extended with the new import path prefix instead of creating a new package.

marcindulak commented 7 years ago

You mean something like providing the link gopkg.in/cheggaaa/pb.v1 to github.com/cheggaaa/pb under /usr/share/gocode/src/?

rpm -qf /usr/share/gocode/src/gopkg.in
file /usr/share/gocode/src/gopkg.in is not owned by any package

What will happen when gopkg.in/cheggaaa/pb.v2 is released, and we still want to keep gopkg.in/cheggaaa/pb.v1?

ingvagabund commented 7 years ago

You can check spec file at [1] to see how it handles both v1 and v2 versions.

[1] http://pkgs.fedoraproject.org/cgit/rpms/golang-gopkg-yaml.git/tree/golang-gopkg-yaml.spec#n41