NixOS / nixpkgs

Nix Packages collection & NixOS
MIT License
16.3k stars 12.8k forks source link

Build failure: home-assistant (sigstore-rekor-types) #310122

Closed zoechi closed 1 month ago

zoechi commented 1 month ago

Steps To Reproduce

Steps to reproduce the behavior:

  1. configure Home-Assistant service
  services = {
    home-assistant = {
      enable = true;
      openFirewall = true;
      configWritable = true;
      config = {
        default_config = {};

        http = {
          server_host = [
            "192.168.0.1"
          ];
        };
      };

      extraPackages =
        python3Packages:
          with python3Packages; [
          ];

      extraComponents = [
        "github" # <=== tracked down component that causes the error
      ];
    };
  };

Build log

❯ nixos-rebuild ...
homeassistant
homeassistant
Rebuild homeassistant
warning: Git tree '/home/myself/source/nix-config' is dirty
building the system configuration...
warning: Git tree '/home/myself/source/nix-config' is dirty
error: builder for '/nix/store/1z1pldkalyh8xpvyn29d7zmgap0fd863-python3.12-sigstore-rekor-types-0.0.11.drv' failed with exit code 1;
       last 10 log lines:
       > Creating a wheel...
       > * Getting build dependencies for wheel...
       > * Building wheel...
       > Successfully built sigstore_rekor_types-0.0.11-py3-none-any.whl
       > Finished creating a wheel...
       > Finished executing pypaBuildPhase
       > Running phase: pythonRuntimeDepsCheckHook
       > Executing pythonRuntimeDepsCheck
       > Checking runtime dependencies for sigstore_rekor_types-0.0.11-py3-none-any.whl
       >   - pydantic<3,>=2 not satisfied by version 1.10.14
       For full logs, run 'nix log /nix/store/1z1pldkalyh8xpvyn29d7zmgap0fd863-python3.12-sigstore-rekor-types-0.0.11.drv'.
error (ignored): error: cannot unlink '/var/tmp/nix-daemon/nix-build-homeassistant-2024.5.0.drv-5/source/homeassistant/components': Directory not empty
error: 1 dependencies of derivation '/nix/store/gvqghb01adnaxf6hsl67iqns857i2dwj-unit-home-assistant.service.drv' failed to build
error: 1 dependencies of derivation '/nix/store/0f41z56q3xglmhbjrd7m400f4svwywwa-system-units.drv' failed to build
error: 1 dependencies of derivation '/nix/store/fkjln8jf9cyvj8bpq98wgi3h4viibzn7-etc.drv' failed to build
error: 1 dependencies of derivation '/nix/store/iw807cm29plblwg8kh2mwc9p24sg67dk-nixos-system-homeassistant-host-24.05.20240505.25865a4.drv' failed to build
nix log /nix/store/1z1pldkalyh8xpvyn29d7zmgap0fd863-python3.12-sigstore-rekor-types-0.0.11.drv
warning: The interpretation of store paths arguments ending in `.drv` recently changed. If this command is now failing try again with '/nix/store/1z1pldkalyh8xpvyn29d7zmgap0fd863-python3.12-sigstore-rekor-types-0.0.11.drv^*'
Sourcing python-remove-tests-dir-hook
Sourcing python-catch-conflicts-hook.sh
Sourcing python-remove-bin-bytecode-hook.sh
Sourcing pypa-build-hook
Using pypaBuildPhase
Sourcing python-runtime-deps-check-hook
Using pythonRuntimeDepsCheckHook
Sourcing pypa-install-hook
Using pypaInstallPhase
Sourcing python-imports-check-hook.sh
Using pythonImportsCheckPhase
Sourcing python-namespaces-hook
Sourcing python-catch-conflicts-hook.sh
@nix { "action": "setPhase", "phase": "unpackPhase" }
Running phase: unpackPhase
unpacking source archive /nix/store/bq0vad7dq9s2qgbkp2rjd665jb0ccpxm-source
source root is source
setting SOURCE_DATE_EPOCH to timestamp 315619200 of file source/sigstore_rekor_types/py.typed
@nix { "action": "setPhase", "phase": "patchPhase" }
Running phase: patchPhase
@nix { "action": "setPhase", "phase": "updateAutotoolsGnuConfigScriptsPhase" }
Running phase: updateAutotoolsGnuConfigScriptsPhase
@nix { "action": "setPhase", "phase": "configurePhase" }
Running phase: configurePhase
no configure script, doing nothing
@nix { "action": "setPhase", "phase": "buildPhase" }
Running phase: buildPhase
Executing pypaBuildPhase
Creating a wheel...
* Getting build dependencies for wheel...
* Building wheel...
Successfully built sigstore_rekor_types-0.0.11-py3-none-any.whl
Finished creating a wheel...
Finished executing pypaBuildPhase
@nix { "action": "setPhase", "phase": "pythonRuntimeDepsCheckHook" }
Running phase: pythonRuntimeDepsCheckHook
Executing pythonRuntimeDepsCheck
Checking runtime dependencies for sigstore_rekor_types-0.0.11-py3-none-any.whl
  - pydantic<3,>=2 not satisfied by version 1.10.14

Additional context

It started failing yesterday. It built fine a day before. It looks like for some reason pydantic 1.10.14 is dragged in as dependency event though pydantic 2.6.3 is now the default. I don't know Nix or Python well enough to figure out what exactly goes wrong.

It looks like github it's required for HACS (Home-Assistant Community Store) add-on, probably others as well.

Notify maintainers

Metadata

Please run nix-shell -p nix-info --run "nix-info -m" and paste the result.

 nix-shell -p nix-info --run "nix-info -m"
/nix/store/558iw5j1bk7z6wrg8cp96q2rx03jqj1v-stdenv-linux/setup: line 114: sopsImportKeysHook: command not found
 - system: `"x86_64-linux"`
 - host os: `Linux 6.6.30, NixOS, 24.05 (Uakari), 24.05.20240505.25865a4`
 - multi-user?: `yes`
 - sandbox: `yes`
 - version: `nix-env (Nix) 2.18.2`
 - nixpkgs: `/nix/store/3pif36ks3f56py4wb1dkq6sh0nkf3ygj-source`

Add a :+1: reaction to issues you find important.

arcnmx commented 1 month ago

It looks like for some reason pydantic 1.10.14 is dragged in as dependency event though pydantic 2.6.3 is now the default. I don't know Nix or Python well enough to figure out what exactly goes wrong.

nixpkgs overrides pydantic to pydantic_1. Perhaps it's because hass pins intellifire4py to an ancient version..? I'm not really sure since it does seem to build fine with pydantic 2 here.

eclairevoyant commented 1 month ago

This won't really get maintainer attention unless they are tagged:

$ nix eval --impure --expr 'with import <nixpkgs> {}; map (builtins.getAttr "github") home-assistant.meta.maintainers' 
[ "fabaff" "mweinelt" "Mic92" ]

@fabaff @mweinelt @Mic92

mweinelt commented 1 month ago

aiogithubapi pins sigstore<2, but that was unpinned in 38f34c95cbec82aaf4471731ff926b624f096d2f.