Skip to content

Build failure: bash #429953

Closed
Closed

Description

@yehorb

Nixpkgs version

  • Unstable (25.11)

Steps to reproduce

user@host:~/.config/dotfiles/home-manager$ nix build nixpkgs#bash --no-substitute --print-build-logs --rebuild
bash>
bash> trying https://ftpmirror.gnu.org/bash/bash-5.3.tar.gz
bash>   % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
bash>                                  Dload  Upload   Total   Spent    Left  Speed
bash>   0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
bash> 100 10.8M  100 10.8M    0     0  3514k      0  0:00:03  0:00:03 --:--:-- 5636k
error: hash mismatch in fixed-output derivation '/nix/store/phg0qkl545h3jilmf17xgp3gjw43xzfl-bash-5.3.tar.gz.drv':
         specified: sha256-Yt1JxEw5ntGz9/cx6Hp4IzTYNPCOCYo18sh1R9Xbsmk=
            got:    sha256-DVzYaWX4aaJs9k9Lcb57lvkKO6iz104n6OnZ1VUPMbo=
error: 1 dependencies of derivation '/nix/store/fw5vnxnkaj9j0pr6x3nl33d46a5kh93j-bash-interactive-5.3p0.drv' failed to build

Can Hydra reproduce this build failure?

No, Hydra cannot reproduce this build failure.

Link to Hydra build job

https://hydra.nixos.org/build/303710495

Relevant log output

user@host:~/.config/dotfiles/home-manager$ nix build nixpkgs#bash --no-substitute --print-build-logs --rebuild
bash>
bash> trying https://ftpmirror.gnu.org/bash/bash-5.3.tar.gz
bash>   % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
bash>                                  Dload  Upload   Total   Spent    Left  Speed
bash>   0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
bash> 100 10.8M  100 10.8M    0     0  3514k      0  0:00:03  0:00:03 --:--:-- 5636k
error: hash mismatch in fixed-output derivation '/nix/store/phg0qkl545h3jilmf17xgp3gjw43xzfl-bash-5.3.tar.gz.drv':
         specified: sha256-Yt1JxEw5ntGz9/cx6Hp4IzTYNPCOCYo18sh1R9Xbsmk=
            got:    sha256-DVzYaWX4aaJs9k9Lcb57lvkKO6iz104n6OnZ1VUPMbo=
error: 1 dependencies of derivation '/nix/store/fw5vnxnkaj9j0pr6x3nl33d46a5kh93j-bash-interactive-5.3p0.drv' failed to build

Additional context

It looks like the file bash-5.3.tar.gz was updated on 2025-07-30 10:07, which is after the package was updated in nixpkgs. The updated file has the different hash sha256-DVzYaWX4aaJs9k9Lcb57lvkKO6iz104n6OnZ1VUPMbo= compared to the one currently in master. The last Hydra build (as of now) occurred at 2025-07-28 13:06:23 (before the file was updated) and completed successfully. The issue only arises with --no-substitute, otherwise the cached build is fetched correctly.

System metadata

  • system: "x86_64-linux"
  • host os: Linux 6.8.0-64-generic, Ubuntu, 22.04.5 LTS (Jammy Jellyfish), nobuild
  • multi-user?: yes
  • sandbox: yes
  • version: nix-env (Nix) 2.28.3
  • channels(root): "nixpkgs"
  • nixpkgs: /nix/store/pblssrhzwbh37byhw2m5kj51afp5ygvr-nixpkgs/nixpkgs

Notify maintainers


Note for maintainers: Please tag this issue in your pull request description. (i.e. Resolves #ISSUE.)

I assert that this issue is relevant for Nixpkgs

Is this issue important to you?

Add a 👍 reaction to issues you find important.

Activity

  1. added
    0.kind: build failure
    on Jul 31, 2025
  2. jackwilsdon commented on Jul 31, 2025

    @jackwilsdon
    Contributor

    Seems like it's just translation file changes:

    $ curl --output bash-5.3-old.tar.gz --silent https://ftp.fr.openbsd.org/pub/OpenBSD/distfiles/bash/bash-5.3.tar.gz
    $ nix hash file ./bash-5.3-old.tar.gz
    sha256-Yt1JxEw5ntGz9/cx6Hp4IzTYNPCOCYo18sh1R9Xbsmk=
    $ curl --output bash-5.3-new.tar.gz --silent https://mirrors.kernel.org/gnu/bash/bash-5.3.tar.gz
    $ nix hash file ./bash-5.3-new.tar.gz 
    sha256-DVzYaWX4aaJs9k9Lcb57lvkKO6iz104n6OnZ1VUPMbo=
    $ mkdir bash-5.3-old && tar xf bash-5.3-old.tar.gz -C bash-5.3-old
    $ mkdir bash-5.3-new && tar vf bash-5.3-new.tar.gz -C bash-5.3-new
    $ diff -r bash-5.3-old bash-5.3-new
    Binary files bash-5.3-old/bash-5.3/po/ka.gmo and bash-5.3-new/bash-5.3/po/ka.gmo differ
    Only in bash-5.3-new/bash-5.3/po: stamp-po
    
  3. trofi commented on Aug 1, 2025

    @trofi
    Contributor

    Great find! Proposed hash update as:

  4. Sigmanificient commented on Aug 14, 2025

    @Sigmanificient
    Member

    Can this be closed now?

  5. ryand56 commented on Aug 14, 2025

    @ryand56
    Member

    Can this be closed now?

    Fix is not in master yet, still waiting on staging-next PR

  6. carschandler commented on Aug 18, 2025

    @carschandler
    Contributor

    @ryand56 what's required to go from staging-next to master? I'm not super familiar with all the approvals required but my config has been broken for a bit due to this (tried setting up an overlay but couldn't get the flake to actually use it).

  7. ryand56 commented on Aug 18, 2025

    @ryand56
    Member

    @ryand56 what's required to go from staging-next to master? I'm not super familiar with all the approvals required but my config has been broken for a bit due to this (tried setting up an overlay but couldn't get the flake to actually use it).

    It manually gets merged like in #432489

  8. yehorb commented on Aug 23, 2025

    @yehorb
    Author

    It seems that the fix is already in the master branch, merged with the #432489. Should I close the issue now?

  9. shielded-nate commented on Aug 30, 2025

    @shielded-nate

    Seems like it's just translation file changes:

    $ curl --output bash-5.3-old.tar.gz --silent https://ftp.fr.openbsd.org/pub/OpenBSD/distfiles/bash/bash-5.3.tar.gz
    $ nix hash file ./bash-5.3-old.tar.gz
    sha256-Yt1JxEw5ntGz9/cx6Hp4IzTYNPCOCYo18sh1R9Xbsmk=
    $ curl --output bash-5.3-new.tar.gz --silent https://mirrors.kernel.org/gnu/bash/bash-5.3.tar.gz
    $ nix hash file ./bash-5.3-new.tar.gz
    sha256-DVzYaWX4aaJs9k9Lcb57lvkKO6iz104n6OnZ1VUPMbo=

    $ mkdir bash-5.3-old && tar xf bash-5.3-old.tar.gz -C bash-5.3-old
    $ mkdir bash-5.3-new && tar vf bash-5.3-new.tar.gz -C bash-5.3-new
    $ diff -r bash-5.3-old bash-5.3-new
    Binary files bash-5.3-old/bash-5.3/po/ka.gmo and bash-5.3-new/bash-5.3/po/ka.gmo differ
    Only in bash-5.3-new/bash-5.3/po: stamp-po
    

    Hi, I've run into this issue. Before I try updating to latest main, I wanted to learn how you discovered the source of bash-5.3-old.tar.gz so that next time I see a hash check failure I know how to investigate the change.

  10. shielded-nate commented on Aug 30, 2025

    @shielded-nate

    BTW, I get a different hash for the openbsd.org url:

    $ curl --output bash-5.3-old.tar.gz --silent https://ftp.fr.openbsd.org/pub/OpenBSD/distfiles/bash/bash-5.3.tar.gz
    $ nix hash file ./bash-5.3-old.tar.gz
    sha256-Upxayi4hGeOVDphrA4L+Tr9ykSyQaAYn4yTloJWLu30=
    $ curl --output bash-5.3-new.tar.gz --silent https://mirrors.kernel.org/gnu/bash/bash-5.3.tar.gz
    $ nix hash file ./bash-5.3-new.tar.gz
    sha256-DVzYaWX4aaJs9k9Lcb57lvkKO6iz104n6OnZ1VUPMbo=
    
  11. shielded-nate commented on Aug 30, 2025

    @shielded-nate

    Ah, here's why my hash is different:

    $ cat ./bash-5.3-old.tar.gz
    <!DOCTYPE html>
    <html>
    <head>
    <meta charset="utf-8">
    <title>404 Not Found</title>
    <style type="text/css"><!--
    body { background-color: white; color: black; font-family: 'Comic Sans MS', 'Chalkboard SE', 'Comic Neue', sans-serif; }
    hr { border: 0; border-bottom: 1px dashed; }
    @media (prefers-color-scheme: dark) {
    body { background-color: #1E1F21; color: #EEEFF1; }
    a { color: #BAD7FF; }
    }
    --></style>
    </head>
    <body>
    <h1>404 Not Found</h1>
    <hr>
    <address>OpenBSD httpd</address>
    </body>
    </html>
    

    So did @jackwilsdon just fetch a different mirror's URL and luck out on timing that it hadn't received the bash dev's new push? -and then I missed that timing window?

    I'd really like to learn more of this after-the-fact forensics on hash failures, because I'm highly allergic to software in my supply chain getting silently patched and I want to leverage nix to protect me from that to some degree.

    BTW- a nix flake update has moved me past that hash failure (to my own flake issues) so just pointing out the updated hash has rolled out to github:NixOS/nixpkgs/nixpkgs-unstable, so I believe this ticket is resolved.

  12. carschandler commented on Aug 30, 2025

    @carschandler
    Contributor

    It seems that the fix is already in the master branch, merged with the #432489. Should I close the issue now?

    Yes

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    0.kind: build failure

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions