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

zerotierone fails to build #192056

Closed
wegank opened this issue Sep 20, 2022 · 6 comments · Fixed by #193093
Closed

zerotierone fails to build #192056

wegank opened this issue Sep 20, 2022 · 6 comments · Fixed by #193093
Labels
0.kind: build failure A package fails to build

Comments

@wegank
Copy link
Member

wegank commented Sep 20, 2022

Steps To Reproduce

Steps to reproduce the behavior:

  1. build zerotierone
$ nix store gc
$ NIXPKGS_ALLOW_UNFREE=1 nix build nixpkgs#zerotierone --impure --rebuild

Build log

error: builder for '/nix/store/mpfgs3pwvqxb1hf87vz3l5mj6far10x5-zerotierone-1.10.1-vendor.tar.gz.drv' failed with exit code 101;
       last 10 log lines:
       >     Updating git repository `https://github.com/glimberg/rust-jwt`
       > error: failed to sync
       >
       > Caused by:
       >   failed to load pkg lockfile
       >
       > Caused by:
       >   no matching package named `base64` found
       >   location searched: registry `crates-io`
       >   required by package `zeroidc v0.1.0 (/build/zeroidc)`
       For full logs, run 'nix log /nix/store/mpfgs3pwvqxb1hf87vz3l5mj6far10x5-zerotierone-1.10.1-vendor.tar.gz.drv'.
error: 1 dependencies of derivation '/nix/store/r14sjssizanrzys1mkfj3ky5j3dx8hc5-zerotierone-1.10.1.drv' failed to build

Additional context

The issue may not be reproducible before the garbage collection.

Notify maintainers

@sjmackenzie @zimbatm @ehmry @obadz @danielfullmer

Metadata

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

[user@system:~]$ nix-shell -p nix-info --run "nix-info -m"
 - system: `"aarch64-linux"`
 - host os: `Linux 5.19.5, NixOS, 22.11 (Raccoon)`
 - multi-user?: `yes`
 - sandbox: `yes`
 - version: `nix-env (Nix) 2.11.0`
 - channels(root): `"nixos-22.05pre347261.6d8215281b2"`
 - channels(weijia): `""`
 - nixpkgs: `/nix/var/nix/profiles/per-user/root/channels/nixos`
@wegank wegank added the 0.kind: build failure A package fails to build label Sep 20, 2022
@zimbatm
Copy link
Member

zimbatm commented Sep 20, 2022

I'm not able to reproduce this on 6d82152 or on master ( 078c649 )

@IvarWithoutBones
Copy link
Member

IvarWithoutBones commented Sep 21, 2022

I can reproduce this on the latest nixpkgs commit with a x86_64-linux system:

~ > NIXPKGS_ALLOW_UNFREE=1 nix build --impure -L "github:nixos/nixpkgs?rev=24f881299bf9e0eb74591f82a44629ca1eab471f#zerotierone.cargoDeps"
zerotierone> unpacking sources
zerotierone> unpacking source archive /nix/store/0ibhg7flgb8z669r4xan84flsvsiziq1-source/zeroidc
zerotierone> source root is zeroidc
zerotierone> patching sources
zerotierone> configuring
zerotierone> no configure script, doing nothing
zerotierone> building
zerotierone>     Updating git repository `https://github.com/glimberg/rust-jwt`
zerotierone> error: failed to sync
zerotierone> Caused by:
zerotierone>   failed to load pkg lockfile
zerotierone> Caused by:
zerotierone>   no matching package named `base64` found
zerotierone>   location searched: registry `crates-io`
zerotierone>   required by package `zeroidc v0.1.0 (/build/zeroidc)`
error: builder for '/nix/store/b5rmj2570i8f3qax0arx7b7k88h57vrc-zerotierone-1.10.1-vendor.tar.gz.drv' failed with exit code 101;
       last 10 log lines:
       >     Updating git repository `https://github.com/glimberg/rust-jwt`
       > error: failed to sync
       >
       > Caused by:
       >   failed to load pkg lockfile
       >
       > Caused by:
       >   no matching package named `base64` found
       >   location searched: registry `crates-io`
       >   required by package `zeroidc v0.1.0 (/build/zeroidc)`
       For full logs, run 'nix log /nix/store/b5rmj2570i8f3qax0arx7b7k88h57vrc-zerotierone-1.10.1-vendor.tar.gz.drv'.

@wegank
Copy link
Member Author

wegank commented Sep 22, 2022

The checksum of jwt has been removed in zerotier/ZeroTierOne@1300cf2 just before the release of 1.10.1. I think that's the culprit. To get around this, I set

{
  services.zerotierone = {
    enable = true;
    package = with pkgs; zerotierone.overrideAttrs (old: {
      cargoDeps = rustPlatform.importCargoLock {
        lockFile = fetchurl {
          url = "https://raw.githubusercontent.com/zerotier/ZeroTierOne/${old.version}/zeroidc/Cargo.lock";
          sha256 = "sha256-pn7t7udZ8A72WC9svaIrmqXMBiU2meFIXv/GRDPYloc=";
        };
        outputHashes = {
          "jwt-0.16.0" = "sha256-P5aJnNlcLe9sBtXZzfqHdRvxNfm6DPBcfcKOVeLZxcM=";
        };
      };
    });
  };
}

@anna328p
Copy link
Member

blocking rebuilds for me

@zimbatm
Copy link
Member

zimbatm commented Sep 26, 2022

Ok, I can reproduce as well. It looks like upstream is blocked on mikkyang/rust-jwt#86 before they can upgrade on their side.

@JustTNE
Copy link
Contributor

JustTNE commented Sep 26, 2022

I submitted a PR here that fixes this issue and also makes it not download the already vendored dependencies again: #193093

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
0.kind: build failure A package fails to build
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants