Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

poly2tri-c: updated github repo source location to another mirror #109812

Merged
merged 1 commit into from Jan 18, 2021

Conversation

nickfraser
Copy link
Contributor

Motivation for this change

Old mirror no longer exists - returns 404 error. Other mirrors also exist on github which could also be used.

Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS linux)
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Determined the impact on package closure size (by running nix path-info -S before and after)
  • Ensured that relevant documentation is up to date
  • Fits CONTRIBUTING.md.

@nickfraser
Copy link
Contributor Author

This breaks the current release (20.09) too, so should be backported if it's accepted.

@SuperSandro2000 SuperSandro2000 added the 9.needs: port to stable A PR needs a backport to the stable release. label Jan 18, 2021
@SuperSandro2000
Copy link
Member

@nickfraser did you check if the hash changed?

@nickfraser
Copy link
Contributor Author

@SuperSandro2000, I did not, but it does build. I assumed it would fail if the hash didn't match the one provided. How do I calculate the hash? I tried the following:

$ wget https://github.com/Mattey40/poly2tri-c/archive/p2tc-0.1.0.tar.gz
$ sha256sum p2tc-0.1.0.tar.gz
ecbc8918b0784624e634bb407d67a14599c21235ad87786ee6a4735d0c015078  p2tc-0.1.0.tar.gz

which is different from the hash provided in default.nix, which had: sha256 = "158vm3wqfxs22b74kqc4prlvjny38qqm3kz5wrgasmx0qciwh0g8";. Am I calculating it correctly? Should I try different mirrors to see if I can find one with a matching hash?

@SuperSandro2000
Copy link
Member

I used this command and got the same hash:

nix-prefetch-url --unpack https://github.com/Mattey40/poly2tri-c/archive/p2tc-0.1.0.tar.gz

@SuperSandro2000 SuperSandro2000 changed the title poly2tri-c: Updated github repo source location to another mirror. poly2tri-c: updated github repo source location to another mirror Jan 18, 2021
@SuperSandro2000 SuperSandro2000 merged commit dea94c2 into NixOS:master Jan 18, 2021
@erictapen
Copy link
Member

@SuperSandro2000 @nickfraser The way the sources were swapped here is problematic imo. The new GitHub repo isn't just a mirror, but a new upstream, which could author malicious releases in the future. There seems not to be any trust relationship between the original project and the new repo here.

Given that the project seems to be not under development anymore I'd suggest to

  • use either the Google code archive zip file, as this is where meta.homepage points to. Don't know anything about stability of Google code archives though.
  • or to add a comment to the fetchFromGitHub invocation, stating that the repo is not trusted for future releases.

I'm aware that we can't provide very strong guarantees about authorship in Nixpkgs. But just changing src to an untrusted repo should not just happen.

Also pinging the Nixpkgs maintainer @jtojnar here.

@jtojnar
Copy link
Contributor

jtojnar commented Jan 24, 2021

The new repo does not look active either. It just contains the same stuff google code exporter spat out.

And I would not particularly trust the original repo either (even if it was owned by the original author) – people do get hacked occasionally. If it is updated in the future, hopefully ofborg will ping me and I will do at least a brief code audit.

Or maybe GEGL will move on to a maintained library before then.

Upstream issue related to this: https://gitlab.gnome.org/GNOME/gegl/-/issues/214#note_1002908

@erictapen
Copy link
Member

And I would not particularly trust the original repo either (even if it was owned by the original author) – people do get hacked occasionally.

The author being hacked and having a PR with malicious code submitted (no offense nickfraser, its just for the sake of the argument) are very different thread models. We can't do anything about the first one.

As you already made a fork on gitlab.gnome.org, maybe we could just use that one?

@nickfraser
Copy link
Contributor Author

The author being hacked and having a PR with malicious code submitted (no offense nickfraser, its just for the sake of the argument) are very different thread models. We can't do anything about the first one.

No offense taken.

@SuperSandro2000 @nickfraser The way the sources were swapped here is problematic imo. The new GitHub repo isn't just a mirror, but a new upstream, which could author malicious releases in the future. There seems not to be any trust relationship between the original project and the new repo here.

That applied to the previous repository as well. My goal was to merely put this library back into a working state, with the hash the same to ensure the PR didn't introduce any new breaking changes. I agree with all the points made above.

@erictapen
Copy link
Member

@nickfraser Yeah I also somewhat expected that the old repo wasn't trusted as well. Nice to have a working src again. I opened another PR to use @jtojnar's fork.

Backported in 2132156.

@erictapen erictapen added 8.has: port to stable A PR already has a backport to the stable release. and removed 9.needs: port to stable A PR needs a backport to the stable release. labels Jan 25, 2021
erictapen added a commit that referenced this pull request Jan 25, 2021
@nickfraser nickfraser deleted the polytri2-c-url-fix branch April 15, 2021 21:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
8.has: port to stable A PR already has a backport to the stable release. 10.rebuild-darwin: 0 10.rebuild-linux: 0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants