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

kvmtool: Init at 0.20200424 #86174

Closed
wants to merge 1 commit into from
Closed

kvmtool: Init at 0.20200424 #86174

wants to merge 1 commit into from

Conversation

chkno
Copy link
Member

@chkno chkno commented Apr 28, 2020

Motivation for this change

Make kvmtool available.

Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS linux)
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Determined the impact on package closure size (by running nix path-info -S before and after)
  • Ensured that relevant documentation is up to date
  • Fits CONTRIBUTING.md.

This project doesn't really do releases or version numbers. This is the latest git commit, with the git committer date as version number, adopting the same convention that other package repositories are using: https://repology.org/project/kvmtool/versions

sha256 = "0ir6aqvipss145r85324nw84k4ilzxa2rsa1wr5303p1h6gs0qkk";
};

makeFlags = [ "DESTDIR=$(out)" "prefix=/" ];
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I assume it tries to install something outside of prefix? We usually we should avoid prefix= as it can lead to wrong references within the package.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It doesn't try to install outside of prefix. It oddly uses $HOME as its default prefix, which causes a homeless-shelter path component in the installed path. Default DESTDIR is empty.

Oh, I see that I don't need both DESTDIR and prefix -- just prefix=$(out) also works.

makeFlags Outcome
(nothing) cannot create directory '/homeless-shelter': Permission denied
DESTDIR=$(out) Executable is result/homeless-shelter/bin/lkvm (bad)
DESTDIR=$(out) prefix=/ Executable is result/bin/lkvm (good)
DESTDIR=$(out) prefix= Executable is result/bin/lkvm (good)
prefix=$(out) Executable is result/bin/lkvm (good)

All three of the entries labelled "(good)" produce the same binary (hashes to 3c896d01...).

Which is preferred?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The latter one: prefix=$(out).

@chkno
Copy link
Member Author

chkno commented Apr 28, 2020

I notice that this is failing on aarch64 because it can't find libfdt from dtc. I don't have aarch64 to test on, but the same mechanism is used to look for zlib, and it also cannot find zlib. My attempts to get a meaningful error message out of try-build resulted in cannot find -lz along with cannot find -lc, which suggests that something about dependency detection is quite broken.

So this is not ready to merge. I'll sort this out and try again later.

Thank you, Mic92, for the review.

@chkno chkno closed this Apr 28, 2020
@ajs124 ajs124 mentioned this pull request Apr 8, 2022
13 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants