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

wireshark-qt fails to build from source #296804

Open
sbourdeauducq opened this issue Mar 18, 2024 · 3 comments
Open

wireshark-qt fails to build from source #296804

sbourdeauducq opened this issue Mar 18, 2024 · 3 comments

Comments

@sbourdeauducq
Copy link
Contributor

Describe the bug

Can't build wireshark-qt due to source archive hash mismatch.

error: hash mismatch in fixed-output derivation '/nix/store/f7h76ivw219pz659wxa7ncdmqs3kmg3n-source.drv':
         specified: sha256-ooCJYmSOMOVnA82k3lOMWP4FL7ZHYUBqtl8MprD7rwo=
            got:    sha256-NmxDDsOC3JOsOuOT68H42v0LKBrTJ0XLXDbMVCT3BnQ=
error: 1 dependencies of derivation '/nix/store/2yvdcqxq56m8bbvwn7mwjnsvkg5284sl-wireshark-qt-4.0.12.drv' failed to build

Steps To Reproduce

Steps to reproduce the behavior:

  1. Disable the cache.nixos.org substituter
  2. nix-shell -p wireshark-qt

Additional context

nixpkgs 23.11.5408.8ac30a39abc5

Notify maintainers

@bjornfor @fpletz @paveloom

@bjornfor
Copy link
Contributor

Can reproduce (on release-23.11 @ 5d39f83):

$ nix-build -A wireshark-qt.src --check
this path will be fetched (40.95 MiB download, 281.35 MiB unpacked):
  /nix/store/4lm96g7plsv72504mvwxvy0r8sgya54h-source
copying path '/nix/store/4lm96g7plsv72504mvwxvy0r8sgya54h-source' from 'https://cache.nixos.org'...
copying path '/nix/store/sdwrgzn5rpzkyssapvmp9wzsaimm40jh-glibc-locales-2.38-44' from 'https://cache.nixos.org'...
checking outputs of '/nix/store/f7h76ivw219pz659wxa7ncdmqs3kmg3n-source.drv'...

trying https://gitlab.com/api/v4/projects/wireshark%2Fwireshark/repository/archive.tar.gz?sha=v4.0.12
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100 53.1M    0 53.1M    0     0  7570k      0 --:--:--  0:00:07 --:--:-- 7162k
unpacking source archive /build/archive.tar.gz?sha=v4.0.12
error: hash mismatch in fixed-output derivation '/nix/store/f7h76ivw219pz659wxa7ncdmqs3kmg3n-source.drv':
         specified: sha256-ooCJYmSOMOVnA82k3lOMWP4FL7ZHYUBqtl8MprD7rwo=
            got:    sha256-NmxDDsOC3JOsOuOT68H42v0LKBrTJ0XLXDbMVCT3BnQ=

@bjornfor
Copy link
Contributor

This seems to be the diff:

$ diff -uNr /nix/store/4lm96g7plsv72504mvwxvy0r8sgya54h-source /nix/store/4z0p3bi9hz25sx8zdxk5dh9a8gjgg5bc-source | less
diff -uNr /nix/store/4lm96g7plsv72504mvwxvy0r8sgya54h-source/tools/make-version.py /nix/store/4z0p3bi9hz25sx8zdxk5dh9a8gjgg5bc-source/tools/make-version.py
--- /nix/store/4lm96g7plsv72504mvwxvy0r8sgya54h-source/tools/make-version.py    1970-01-01 01:00:01.000000000 +0100
+++ /nix/store/4z0p3bi9hz25sx8zdxk5dh9a8gjgg5bc-source/tools/make-version.py    1970-01-01 01:00:01.000000000 +0100
@@ -45,7 +45,7 @@
 # git archive did not replace the $Format string, which
 # means that this not a git archive.
 GIT_EXPORT_SUBST_H = 'bf0886019de2cef8cd3e453de9606cbaa4471d3e'
-GIT_EXPORT_SUBST_D = 'tag: wireshark-4.0.12, tag: v4.0.12, refs/merge-requests/13888/head, refs/keep-around/bf0886019de2cef8cd3e453de9606cbaa4471d3e'
+GIT_EXPORT_SUBST_D = 'tag: wireshark-4.0.12, tag: v4.0.12, refs/keep-around/bf0886019de2cef8cd3e453de9606cbaa4471d3e'
 IS_GIT_ARCHIVE = not GIT_EXPORT_SUBST_H.startswith('$Format')

@bjornfor
Copy link
Contributor

It's because of (impure) git archive substitutions: https://github.com/wireshark/wireshark/blob/bf0886019de2cef8cd3e453de9606cbaa4471d3e/tools/make-version.py#L39-L48.

I guess there's little sense in updating the source hash then, because it can change at any time?

Related issue being discussed in Nix (although this is about the nixpkgs fetcher): NixOS/nix#5313 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants