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

gnash: fix compilation with libgif 5.2 #73040

Merged
merged 1 commit into from Nov 21, 2019
Merged

Conversation

marius851000
Copy link
Contributor

Motivation for this change

gnash doesn't compile

Things done

Added a patch to gnash that correct the verification for libgif, after it's 5.2 update.

I will try to send the patch upstream.

  • 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 nix-review --run "nix-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.
Notify maintainers

cc @rnhmjoj

Copy link
Contributor

@rnhmjoj rnhmjoj left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Without the hydra notifications I don't have an easy way to track builds failures.
Anyway, it builds and looks all right. Thank you!

@nixos-discourse
Copy link

This pull request has been mentioned on NixOS Discourse. There might be relevant details there:

https://discourse.nixos.org/t/prs-already-reviewed/2617/65

Copy link
Member

@timokau timokau left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please add a short comment that explains why the patch is necessary and ideally also links to an upstream issue.

@marius851000
Copy link
Contributor Author

@timokau There isn't an upstream issue (I will create one), and the patch is mandatory, because the version detection does not work fine.

@timokau
Copy link
Member

timokau commented Nov 12, 2019

Why doesn't it work fine? Are you sure it wasn't intended to check for 5.1?

In any case, please add a comment explaining this (and a link to the upstream issue after creating it) to the file.

@marius851000
Copy link
Contributor Author

@timokau I did that

Copy link
Member

@timokau timokau left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The build fails for me because of a hash mismatch when trying to fetch the patch.

@marius851000
Copy link
Contributor Author

@timokau that work for me:
nix-prefetch-url "https://savannah.gnu.org/patch/download.php?file_id=47859"

[0.0 MiB DL]

path is '/nix/store/zib4ckh512pm5366ab0zg0q2ggp0wc7q-download.php?file_id=47859'

1bwi50qr7wlf8dm3bf7clnly0l69v3nk8gh9h8pdlnhsb52d311j

@d-goldin
Copy link
Contributor

d-goldin commented Nov 19, 2019

Can confirm hash mismatch:

100   426  100   426    0     0    432      0 --:--:-- --:--:-- --:--:--   432
hash mismatch in fixed-output derivation '/nix/store/0av5md9blfybkbb6czsv84kd4rmfhn24-download.php?file_id=47859':
  wanted: sha256:1bwi50qr7wlf8dm3bf7clnly0l69v3nk8gh9h8pdlnhsb52d311j
  got:    sha256:0aimayzgi5065gkcfcr8d5lkd9c0471q7dqmln42hjzq847n6d5y

@marius851000: Keep in mind that if you used nix-prefetch-url or something like that, you'd have a cached version in your store, but fetchpatch normalizes the patch and so the checksum actually turns out to be different.

@rnhmjoj
Copy link
Contributor

rnhmjoj commented Nov 19, 2019

I get the same hash as @marius851000. This is pretty strange.

@d-goldin
Copy link
Contributor

d-goldin commented Nov 19, 2019

I get the same hash as @marius851000. This is pretty strange.

@rnhmjoj: With nix-prefetch-url or actually running it through fetchpatch? See my remark above regarding nix-prefetch-url - its a common pitfall with fetchpatch;

> nix repl '<nixpkgs>'

nix-repl> :b fetchpatch { url = "https://savannah.gnu.org/patch/download.php?file_id=47859"; sha256 = lib.fakeSha256; }
hash mismatch in fixed-output derivation '/nix/store/0av5md9blfybkbb6czsv84kd4rmfhn24-download.php?file_id=47859':
  wanted: sha256:0000000000000000000000000000000000000000000000000000
  got:    sha256:0aimayzgi5065gkcfcr8d5lkd9c0471q7dqmln42hjzq847n6d5y
[0 built (1 failed), 1 copied (0.2 MiB), 0.1 MiB DL]
error: build of '/nix/store/p1nl81nks7943yyr2m61q4kkkcw6g090-download.php?file_id=47859.drv' failed

While with nix-prefetch-url, I get the hash you are expecting - but as outlined, this is the hash before fetchpatch applies its normalizations, but it will still work for you, because nix-prefetch-url adds it to the local store and then fetchpatch never even gets executed;

>  nix-prefetch-url "https://savannah.gnu.org/patch/download.php?file_id=47859"                                                                                 master [ad8c1703ec5] untracked
[0.0 MiB DL]
path is '/nix/store/zib4ckh512pm5366ab0zg0q2ggp0wc7q-download.php?file_id=47859'
1bwi50qr7wlf8dm3bf7clnly0l69v3nk8gh9h8pdlnhsb52d311j

(Edit: added nix-prefetch-url paste, for clarification)

@marius851000
Copy link
Contributor Author

@timokau I fixed that. At least, I now know what fetchpath does.

@rnhmjoj
Copy link
Contributor

rnhmjoj commented Nov 20, 2019

@d-goldin You were right, I was using prefetch-url.

@d-goldin
Copy link
Contributor

@GrahamcOfBorg build gnash

@d-goldin
Copy link
Contributor

@timokau I fixed that. At least, I now know what fetchpath does.

Seems to still be the old/wrong hash and fails the checks: https://github.com/NixOS/nixpkgs/pull/73040/checks?check_run_id=311777285

@marius851000
Copy link
Contributor Author

@timokau You're right, sorry. I just haven't added my change to git.

@timokau
Copy link
Member

timokau commented Nov 21, 2019

Thanks!

@timokau timokau merged commit 51751e1 into NixOS:master Nov 21, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

7 participants