openSUSE / obs-service-go_modules

OBS Source Service to download, verify, and vendor Go module dependency sources
GNU General Public License v2.0
19 stars 18 forks source link

go: inconsistent vendoring in ... #16

Open matwey opened 2 years ago

matwey commented 2 years ago

Hi,

I am trying to build https://gitlab.com/yawning/obfs4 at https://build.opensuse.org/package/show/home:matwey:obfs4/obfs4

Currently, I see the following issue probably related to obs-service-go_modules package:

[  106s] + go install -v -p 4 -x -buildmode=pie -mod=vendor gitlab.com/yawning/obfs4.git/obfs4proxy
[  106s] go: inconsistent vendoring in /home/abuild/rpmbuild/BUILD/obfs4-0.0.11:
[  106s]    git.schwanenlied.me/yawning/bsaes.git@v0.0.0-20190320102049-26d1add596b6: is marked as explicit in vendor/modules.txt, but not explicitly required in go.mod
[  106s]    github.com/dsnet/compress@v0.0.1: is marked as explicit in vendor/modules.txt, but not explicitly required in go.mod
[  106s]    golang.org/x/sys@v0.0.0-20190329044733-9eb1bfa1ce65: is marked as explicit in vendor/modules.txt, but not explicitly required in go.mod
[  106s]    golang.org/x/text@v0.3.0: is marked as explicit in vendor/modules.txt, but not explicitly required in go.mod
[  106s] 
[  106s]    To ignore the vendor directory, use -mod=readonly or -mod=mod.
[  106s]    To sync the vendor directory, run:
[  106s]        go mod vendor

I've found that executing go mod vendor updates go.mod file in place.

alexandrevicenzi commented 1 year ago

Do you still have issues?

A workaround that I found was that the tarball causes the "inconsistent vendoring", and I fixed it with:

tar -xf %{SOURCE1}