-
-
Notifications
You must be signed in to change notification settings - Fork 16.7k
libguestfs with appliance by default #278954
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
base: master
Are you sure you want to change the base?
Conversation
this removes the package 'libguestfs-with-appliance', and adds the package 'libguestfsMinimal' without the appliance. This makes nixpkgs packages use the appliance by default, which fixes the user experienc of having the "no appliance" error message in certain cases, for example the 'guestmount' command, and running 'diffoscope' on disk images.
They seem to be broken upstream
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
libguestfs-appliance
is not compatible with non-x86 platforms, so this PR breaks diffoscope
on aarch64-linux.
@wegank good catch! Do you know if it's just our package, or if the upstream code really isn't compatible with other architectures? |
I am not aware of how other distros do, but our own |
I'll work on building the appliance from source, then. I think I'm close to succeeding, but there's still a weird issue where |
@minijackson I am also interested in supermin support. Have you a branch/something I could look at and try to fix ? |
@Et7f3 I've pushed what I have in the https://github.com/minijackson/nixpkgs/tree/guestfs-default-appliance-wip But it's more complicated than I initially thought. Building the appliance is about building a small image of a given Linux distribution, with some tools installed. How That doesn't work for us. I think the best we could do would be to create our own small NixOS appliance with the same tools installed, and the same init script. For more info in the libguestfs source code:
On another note, I don't think Thanks for reaching out, I'm quite busy these days, but still open for discussion if you're still interested. |
I thought about patching supermin upstream like suggested by main dev or bypass supermin and use out tooling to directly create an image. nixpkgs/nixos/lib/make-disk-image.nix Lines 213 to 218 in 9aa8130
with this second solution we could have even smaller images than with supermin. EDIT: thanks for those hints through codebase. |
I think porting supermin to NixOS will be quite difficult; the code is very much distro-specific and the currently supported distros (Fedora, Debian, ...) are nothing like NixOS. Another option would be to build a fixed appliance (like the ones being distributed at https://download.libguestfs.org/binaries/appliance/) in a debian guest using |
Fixed appliance is what is currently packaged. According to the docs the performance is the same. If you try grepping |
I've made a PR using this approch here: #381224 |
Description of changes
This removes the package 'libguestfs-with-appliance', and adds the package 'libguestfsMinimal' without the appliance.
This makes nixpkgs packages use the appliance by default,
which fixes the user experienc of having the "no appliance" error
message in certain cases, for example the 'guestmount' command, and
running 'diffoscope' on disk images.
I'm proposing this because I just kept running into #37540-style issues, often without an easy way out (e.g. diffoscope using the guestfs Python package).
This also re-enables building the libguestfs with appliance on Hydra.
Note: the appliance was disabled by default in #56448 (cc @grahamc if you think this PR is acceptable), and disabled on Hydra a long time ago in ac52817. We should test if Hydra is fine with it now, but I'm not sure how.
cc @offlinehacker
Things done
nix.conf
? (See Nix manual)sandbox = relaxed
sandbox = true
nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD"
. Note: all changes have to be committed, also see nixpkgs-review usage./result/bin/
)Result of
nixpkgs-review
run on x86_64-linux 11 package blacklisted:
13 packages built:
Add a 👍 reaction to pull requests you find important.