NixOS / nixpkgs

Nix Packages collection & NixOS
MIT License
18.07k stars 14.13k forks source link

`runInLinuxImage` seems broken with newer Fedora distros #116046

Open tfc opened 3 years ago

tfc commented 3 years ago

Describe the bug When adding Fedora 33 to pkgs/build-support/vm/default.nix like this:

...
    fedora33x86_64 =
      let version = "33";
      in {
        name = "fedora-${version}-x86_64";
        fullName = "Fedora ${version} (x86_64)";
        packagesList = pkgs.fetchurl rec {
          url = "mirror://fedora/linux/releases/${version}/Everything/x86_64/os/repodata/${sha256}-primary.xml.gz";
          sha256 = "33597aca15687a91340fcf7f4cc6341416709dd0a28938fe83a9844e9dd20c00";
        };
        urlPrefix = "mirror://fedora/linux/releases/${version}/Everything/x86_64/os";
        archs = ["noarch" "x86_64"];
        packages = [];
        unifiedSystemDir = true;
      };
...

this change basically only contains two changes: a new hash and version 33.

When running for example nix-build pkgs/build-support/vm/test.nix -A buildPatchelfRPM in combination with this new fedora33 image, the cpio process proclaims that the content of the rpms is garbage.

Using ${libarchive}/bin/bsdcpio in place seems to work.

But then, at the later stage ldconfig and rpm don't run in the chroot, i get the error message failed to run command ... No such file or directory. I double-checked that the file is there and executable. ldd says that it's partly linked against /nix/store paths and although these are accessible i can't say why they don't execute.

I am not sure how to fix this:

/cc @lsix @symphorien @rbvermaa

stale[bot] commented 3 years ago

I marked this as stale due to inactivity. → More info