go.sum: Fix checksum mismatch #131

Closed
jtojnar wants to merge 1 commits from fix-hash into master
Contributor

Description

It produced an error for me:

$ go mod download
[…]
verifying github.com/go-xorm/tests@v0.5.6: checksum mismatch
        downloaded: h1:T2xw6s+shmSXqNjEPMCMOG6V0vYhJNgjpgmtNzgetuI=
        go.sum:     h1:E4nmVkKfHQAm+i2/pmOJ5JUej6sORVcvwl6/LQybif4=

SECURITY ERROR
This download does NOT match an earlier download recorded in go.sum.
The bits may have been replaced on the origin server, or an attacker may
have intercepted the download attempt.

Checklist

  • I added or improved tests
  • I pushed new or updated dependencies to the repo using go mod vendor
  • I added or improved docs for my feature
    • Swagger (including make do-the-swag)
    • Error codes
    • New config options
# Description It produced an error for me: ``` $ go mod download […] verifying github.com/go-xorm/tests@v0.5.6: checksum mismatch downloaded: h1:T2xw6s+shmSXqNjEPMCMOG6V0vYhJNgjpgmtNzgetuI= go.sum: h1:E4nmVkKfHQAm+i2/pmOJ5JUej6sORVcvwl6/LQybif4= SECURITY ERROR This download does NOT match an earlier download recorded in go.sum. The bits may have been replaced on the origin server, or an attacker may have intercepted the download attempt. ``` # Checklist * [ ] I added or improved tests * [ ] I pushed new or updated dependencies to the repo using `go mod vendor` * [ ] I added or improved docs for my feature * [ ] Swagger (including `make do-the-swag`) * [ ] Error codes * [ ] New config options
Collaborator

I'm a bit confused where the mismatch comes from. Do we have both file trees of that dependency and can do a diff check?

I'm a bit confused where the mismatch comes from. Do we have both file trees of that dependency and can do a diff check?
Owner

This seems to be an issue with the module itself, it also fails when creating a new project and go geting github.com/go-xorm/tests. I'll try to check this with the creator of the package.

If you only want to build the api, you should be able to use the committed dependencies in the vendor/ folder with the -mod=vendor flag. Alternatively, you can use the Makefile, take a look at the makefile docs

This seems to be an issue with the module itself, it also fails when creating a new project and `go get`ing `github.com/go-xorm/tests`. I'll try to check this with the creator of the package. If you only want to build the api, you should be able to use the committed dependencies in the `vendor/` folder with the `-mod=vendor` flag. Alternatively, you can use the Makefile, take a look at [the makefile docs](https://vikunja.io/docs/makefile/)
Owner

I'm a bit confused where the mismatch comes from. Do we have both file trees of that dependency and can do a diff check?

@shilch Yes, they are located in vendor/.

> I'm a bit confused where the mismatch comes from. Do we have both file trees of that dependency and can do a diff check? @shilch Yes, they are located in `vendor/`.
Author
Contributor

I'm a bit confused where the mismatch comes from. Do we have both file trees of that dependency and can do a diff check?

I do not see github.com/go-xorm/tests in the vendor directory so I am not sure with what I should diff it.

If you only want to build the api, you should be able to use the committed dependencies in the vendor/ folder with the -mod=vendor flag. Alternatively, you can use the Makefile, take a look at the makefile docs

I am trying to package Vikunja for NixOS distro and using vendored dependencies is discouraged in our policies.

> I'm a bit confused where the mismatch comes from. Do we have both file trees of that dependency and can do a diff check? I do not see `github.com/go-xorm/tests` in the vendor directory so I am not sure with what I should diff it. > If you only want to build the api, you should be able to use the committed dependencies in the `vendor/` folder with the `-mod=vendor` flag. Alternatively, you can use the Makefile, take a look at the makefile docs I am trying to package Vikunja for NixOS distro and using vendored dependencies is discouraged in our policies.
Owner

It seems like the original repo has been archived since, but we don't even have that in vendor... i wonder why it even appears in the go.sum file.

It seems like the original repo has been archived since, but we don't even have that in vendor... i wonder why it even appears in the `go.sum` file.
Owner

I am trying to package Vikunja for NixOS distro and using vendored dependencies is discouraged in our policies.

Yeah, I can see all the disatavanteges it brings, and it most certainly is not a solution. The committed dependencies are back from when there was no such thing as GOPROXY to backup dependencies.

Packaging Vikunja for nixos is great! I'm also using nix as my main distro, you can ping me once you have the pr ready and I'll take a look :)

> I am trying to package Vikunja for NixOS distro and using vendored dependencies is discouraged in our policies. Yeah, I can see all the disatavanteges it brings, and it most certainly is not a solution. The committed dependencies are back from when there was no such thing as `GOPROXY` to backup dependencies. Packaging Vikunja for nixos is great! I'm also using nix as my main distro, you can ping me once you have the pr ready and I'll take a look :)
Owner

It seems like the xorm path has been moved and updated since the version I've put in Vikunja has been released. I'll update xorm in a seperate PR, maybe that also fixes the issue here.

It seems like the xorm path has been moved and updated since the version I've put in Vikunja has been released. I'll update xorm in a seperate PR, maybe that also fixes the issue here.
Owner

I've updated xorm, can you pull and try again?

I've updated xorm, can you pull and try again?
Author
Contributor

Fixed by vikunja/api#133

Fixed by https://kolaente.dev/vikunja/api/pulls/133
jtojnar closed this pull request 2020-02-14 22:31:46 +00:00
jtojnar deleted branch fix-hash 2020-02-14 22:31:54 +00:00
All checks were successful
continuous-integration/drone/pr Build is passing

Pull request closed

Sign in to join this conversation.
No reviewers
No Milestone
No Assignees
3 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: vikunja/vikunja#131
No description provided.