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

Multiple Mismatched Checksums #241

Open
jeff-hykin opened this issue Jan 30, 2023 · 5 comments
Open

Multiple Mismatched Checksums #241

jeff-hykin opened this issue Jan 30, 2023 · 5 comments

Comments

@jeff-hykin
Copy link

For almost all of the packages I'm getting something like the following:

trying https://github.com/ROBOTIS-GIT-release/turtlebot3-release/archive/release/noetic/turtlebot3_description/1.2.5-1.tar.gz
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
100 6609k    0 6609k    0     0  2679k      0 --:--:--  0:00:02 --:--:-- 4201k
error: hash mismatch in fixed-output derivation '/nix/store/kda2h88qffxarhizkx1qzqwwas3d7fss-1.2.5-1.tar.gz.drv':
         specified: sha256-tCIoOVLRiPSrvfgzCeVAA/P2LSvvvCEWQduFoyZWlgs=
            got:    sha256-EmXI+RGeY9SfMyjADcaUI+YHpEdlxPrvFUxmY2osw94=
error: 1 dependencies of derivation '/nix/store/cwcmvkrig1dhqqd2gj1ds2gwil63vk0s-ros-noetic-turtlebot3-descript

I created a fork and patched some of the hashes, but after about 7 of them I realized something bigger is probably wrong for this to be happening

@lopsided98
Copy link
Owner

lopsided98 commented Jan 30, 2023

Yeah, its this: https://github.blog/changelog/2023-01-30-git-archive-checksums-may-change/, although I don't know why its still happening even though they apparently reverted it (maybe caching).

It is really my fault though, as you are supposed to use fetchFromGitHub to avoid this exact problem, but it was a bit more difficult to properly generate the code for it with superflore so I never implemented it.

@lopsided98
Copy link
Owner

I'm going to leave things as they are for now, since the change is being reverted. When I get a chance I'll try to implement fetchFromGitHub, but no guarantees on when that will happen.

@jeff-hykin
Copy link
Author

jeff-hykin commented Jan 31, 2023

When I get a chance I'll try to implement fetchFromGitHub, but no guarantees on when that will happen.

No worries, I might be able to. Although I'm not sure how the current nix files are being generated. I see the superflore-gen-nix but I have no idea where the source code from that command is coming from since the superflore repo doesn't mention anything like fetchurl or superflore-gen-nix.

https://github.blog/changelog/2023-01-30-git-archive-checksums-may-change/

Wow I'm honeslty suprised more of the nixpkgs stuff I use isnt breaking. I always grab straight from tar files.

I've updated hashes for ~600 files using a script, but that was before I knew tar files were the problem here (I did get the nix-shell command from the readme working though). I can probably just use the same script to switch them all to fetchFromGithub. If you're generating the files though, the script I made is a pretty hacky solution so I doubt it would work long term.

@lopsided98
Copy link
Owner

The entry point is here: https://github.com/lopsided98/superflore/blob/nixos-support/superflore/generators/nix/run.py

@jeff-hykin
Copy link
Author

Thanks! I went ahead and made a fork that adds fetchFromGithub when its possible to, but otherwise keeps the old functionality. It does depend on nix-prefetch, which is the only reliably way I know to get the sha256 for fetchFromGithub.

I did some dryrun's and everything seems to be working (at least as much as it was before); I confirmed the outputs include fetchFromGithub and work. The generator is skipping a lot of packages though, so I wonder if I need to force a reevaluation of all packages.

I'm not sure about the AUTH token stuff, it seems to me like the dry run is good enough for me to generate nix-ros-overlay.

hacker1024 referenced this issue in git/git Feb 1, 2023
Drop the dependency on gzip(1) and use our internal implementation to
create tar.gz and tgz files.

Signed-off-by: René Scharfe <[email protected]>
Signed-off-by: Junio C Hamano <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants