Skip to content

libguestfs: 1.40.2 -> 1.44.1#135900

Merged
alyssais merged 3 commits intoNixOS:masterfrom
erdnaxe:libguestfs
Aug 28, 2021
Merged

libguestfs: 1.40.2 -> 1.44.1#135900
alyssais merged 3 commits intoNixOS:masterfrom
erdnaxe:libguestfs

Conversation

@erdnaxe
Copy link
Member

@erdnaxe erdnaxe commented Aug 27, 2021

Motivation for this change

Current libguestfs is incompatible with QEMU 6.1: #135877 (comment)

Things done
  • Built on platform(s)
    • x86_64-linux
    • aarch64-linux
    • x86_64-darwin
    • aarch64-darwin
  • For non-Linux: Is sandbox = true set in nix.conf? (See Nix manual)
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all packages 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/)
  • 21.11 Release Notes (or backporting 21.05 Release notes)
    • (Package updates) Added a release notes entry if the change is major or breaking
    • (Module updates) Added a release notes entry if the change is significant
    • (Module addition) Added a release notes entry if adding a new NixOS module
  • Fits CONTRIBUTING.md.

@erdnaxe
Copy link
Member Author

erdnaxe commented Aug 27, 2021

Result of nixpkgs-review pr 135900 run on x86_64-linux 1

1 package failed to build:
  • libguestfs-with-appliance
5 packages built:
  • diffoscope
  • libguestfs
  • python38Packages.guestfs
  • python39Packages.guestfs
  • vagrant

@ofborg ofborg bot requested a review from offlinehacker August 27, 2021 12:13
@ofborg ofborg bot added 10.rebuild-darwin: 1-10 This PR causes between 1 and 10 packages to rebuild on Darwin. 10.rebuild-linux: 1-10 This PR causes between 1 and 10 packages to rebuild on Linux. labels Aug 27, 2021
@erdnaxe
Copy link
Member Author

erdnaxe commented Aug 27, 2021

libguestfs-with-appliance build fails with:

[...]
post-installation fixup
shrinking RPATHs of ELF executables and libraries in /nix/store/pdkj1lx5kv3xvi8pwwc4krpnhq31m151-libguestfs-1.44.1
shrinking /nix/store/pdkj1lx5kv3xvi8pwwc4krpnhq31m151-libguestfs-1.44.1/bin/.virt-alignment-scan-wrapped
shrinking /nix/store/pdkj1lx5kv3xvi8pwwc4krpnhq31m151-libguestfs-1.44.1/bin/.libguestfs-test-tool-wrapped
shrinking /nix/store/pdkj1lx5kv3xvi8pwwc4krpnhq31m151-libguestfs-1.44.1/bin/.guestmount-wrapped
shrinking /nix/store/pdkj1lx5kv3xvi8pwwc4krpnhq31m151-libguestfs-1.44.1/bin/.virt-builder-repository-wrapped
shrinking /nix/store/pdkj1lx5kv3xvi8pwwc4krpnhq31m151-libguestfs-1.44.1/bin/.virt-diff-wrapped
shrinking /nix/store/pdkj1lx5kv3xvi8pwwc4krpnhq31m151-libguestfs-1.44.1/bin/.virt-sysprep-wrapped
shrinking /nix/store/pdkj1lx5kv3xvi8pwwc4krpnhq31m151-libguestfs-1.44.1/bin/.virt-customize-wrapped
shrinking /nix/store/pdkj1lx5kv3xvi8pwwc4krpnhq31m151-libguestfs-1.44.1/bin/.virt-sparsify-wrapped
shrinking /nix/store/pdkj1lx5kv3xvi8pwwc4krpnhq31m151-libguestfs-1.44.1/bin/.virt-get-kernel-wrapped
shrinking /nix/store/pdkj1lx5kv3xvi8pwwc4krpnhq31m151-libguestfs-1.44.1/bin/.virt-format-wrapped
shrinking /nix/store/pdkj1lx5kv3xvi8pwwc4krpnhq31m151-libguestfs-1.44.1/bin/.virt-index-validate-wrapped
shrinking /nix/store/pdkj1lx5kv3xvi8pwwc4krpnhq31m151-libguestfs-1.44.1/bin/.guestfish-wrapped
shrinking /nix/store/pdkj1lx5kv3xvi8pwwc4krpnhq31m151-libguestfs-1.44.1/bin/.virt-cat-wrapped
shrinking /nix/store/pdkj1lx5kv3xvi8pwwc4krpnhq31m151-libguestfs-1.44.1/bin/.virt-tail-wrapped
shrinking /nix/store/pdkj1lx5kv3xvi8pwwc4krpnhq31m151-libguestfs-1.44.1/bin/.virt-filesystems-wrapped
shrinking /nix/store/pdkj1lx5kv3xvi8pwwc4krpnhq31m151-libguestfs-1.44.1/bin/.virt-ls-wrapped
shrinking /nix/store/pdkj1lx5kv3xvi8pwwc4krpnhq31m151-libguestfs-1.44.1/bin/.virt-resize-wrapped
shrinking /nix/store/pdkj1lx5kv3xvi8pwwc4krpnhq31m151-libguestfs-1.44.1/bin/.virt-inspector-wrapped
shrinking /nix/store/pdkj1lx5kv3xvi8pwwc4krpnhq31m151-libguestfs-1.44.1/bin/.virt-log-wrapped
shrinking /nix/store/pdkj1lx5kv3xvi8pwwc4krpnhq31m151-libguestfs-1.44.1/bin/.virt-builder-wrapped
shrinking /nix/store/pdkj1lx5kv3xvi8pwwc4krpnhq31m151-libguestfs-1.44.1/bin/.virt-edit-wrapped
shrinking /nix/store/pdkj1lx5kv3xvi8pwwc4krpnhq31m151-libguestfs-1.44.1/bin/.virt-make-fs-wrapped
shrinking /nix/store/pdkj1lx5kv3xvi8pwwc4krpnhq31m151-libguestfs-1.44.1/bin/.virt-rescue-wrapped
shrinking /nix/store/pdkj1lx5kv3xvi8pwwc4krpnhq31m151-libguestfs-1.44.1/bin/.guestunmount-wrapped
shrinking /nix/store/pdkj1lx5kv3xvi8pwwc4krpnhq31m151-libguestfs-1.44.1/bin/.virt-dib-wrapped
shrinking /nix/store/pdkj1lx5kv3xvi8pwwc4krpnhq31m151-libguestfs-1.44.1/bin/.virt-df-wrapped
shrinking /nix/store/pdkj1lx5kv3xvi8pwwc4krpnhq31m151-libguestfs-1.44.1/lib/libguestfs.so.0.509.0
shrinking /nix/store/pdkj1lx5kv3xvi8pwwc4krpnhq31m151-libguestfs-1.44.1/lib/ocaml/stublibs/dllmlguestfs.so
shrinking /nix/store/pdkj1lx5kv3xvi8pwwc4krpnhq31m151-libguestfs-1.44.1/lib/perl5/site_perl/5.34.0/x86_64-linux-thread-multi/auto/Sys/Guestfs/Guestfs.so
gzipping man pages under /nix/store/pdkj1lx5kv3xvi8pwwc4krpnhq31m151-libguestfs-1.44.1/share/man/
strip is /nix/store/v8imx1nvyz0hgvx9cbcmh6gp4ngw3ffj-binutils-2.35.1/bin/strip
stripping (with command strip and flags -S) in /nix/store/pdkj1lx5kv3xvi8pwwc4krpnhq31m151-libguestfs-1.44.1/lib  /nix/store/pdkj1lx5kv3xvi8pwwc4krpnhq31m151-libguestfs-1.44.1/bin
patching script interpreter paths in /nix/store/pdkj1lx5kv3xvi8pwwc4krpnhq31m151-libguestfs-1.44.1
checking for references to /build/ in /nix/store/pdkj1lx5kv3xvi8pwwc4krpnhq31m151-libguestfs-1.44.1...
running install tests
Formatting 'disk1.img', fmt=qcow2 cluster_size=65536 extended_l2=off compression_type=zlib size=10737418240 lazy_refcounts=off refcount_bits=16
*stdin*:2: libguestfs: error: cannot find any suitable libguestfs supermin, fixed or old-style appliance on LIBGUESTFS_PATH (search path: /usr/local/lib/guestfs)
builder for '/nix/store/8wi7av0bym5gnp1qhchzppqx3idyrwxp-libguestfs-1.44.1.drv' failed with exit code 1
error: build of '/nix/store/8wi7av0bym5gnp1qhchzppqx3idyrwxp-libguestfs-1.44.1.drv' failed

@r-rmcgibbo
Copy link

r-rmcgibbo commented Aug 27, 2021

Result of nixpkgs-review pr 135900 at 21a97611 run on aarch64-linux 1

4 packages built successfully:
  • libguestfs
  • python38Packages.guestfs
  • python39Packages.guestfs
  • vagrant

Result of nixpkgs-review pr 135900 at 21a97611 run on x86_64-linux 1

5 packages built successfully:
  • diffoscope
  • libguestfs
  • python38Packages.guestfs
  • python39Packages.guestfs
  • vagrant
6 suggestions:
  • warning: build-tools-in-build-inputs

    bison is a build tool so it likely goes to nativeBuildInputs, not buildInputs.

    Near pkgs/development/libraries/libguestfs/default.nix:23:3:

       |
    23 |   buildInputs = [
       |   ^
    
  • warning: missing-patch-comment

    Consider adding a comment explaining the purpose of this patch on the line preceeding.
    Near pkgs/development/libraries/libguestfs/default.nix:48:5:

       |
    48 |     ./libguestfs-syms.patch
       |     ^
    
  • warning: build-tools-in-build-inputs

    getopt is a build tool so it likely goes to nativeBuildInputs, not buildInputs.

    Near pkgs/development/libraries/libguestfs/default.nix:23:3:

       |
    23 |   buildInputs = [
       |   ^
    
  • warning: unclear-gpl

    gpl2 is a deprecated license, please check if project uses gpl2Plus or gpl2Only and change meta.license accordingly.

    Near pkgs/development/libraries/libguestfs/default.nix:92:5:

       |
    92 |     license = with licenses; [ gpl2 lgpl21 ];
       |     ^
    
  • warning: unclear-gpl

    lgpl21 is a deprecated license, please check if project uses lgpl21Plus or lgpl21Only and change meta.license accordingly.

    Near pkgs/development/libraries/libguestfs/default.nix:92:5:

       |
    92 |     license = with licenses; [ gpl2 lgpl21 ];
       |     ^
    
  • warning: build-tools-in-build-inputs

    flex is a build tool so it likely goes to nativeBuildInputs, not buildInputs.

    Near pkgs/development/libraries/libguestfs/default.nix:23:3:

       |
    23 |   buildInputs = [
       |   ^
    

@alyssais
Copy link
Member

Why are we adding a patch instead of just setting --with-distro?

@erdnaxe
Copy link
Member Author

erdnaxe commented Aug 27, 2021

Why are we adding a patch instead of just setting --with-distro?

From what I understand, we already have --with-distro=NixOS but it seems that defining it manually does not define HAVE_RPM, HAVE_DPKG and HAVE_PACMAN. This makes ./configure fail. I will submit this potential bug upstream.

@erdnaxe
Copy link
Member Author

erdnaxe commented Aug 27, 2021

I will submit this potential bug upstream.

Patch submitted and pushed, https://listman.redhat.com/archives/libguestfs/2021-August/msg00128.html

Copy link
Member

Choose a reason for hiding this comment

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

Can we set strictDeps?

Copy link
Member Author

Choose a reason for hiding this comment

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

I just enabled strictDeps and moved cdrkit, cpio, gperf, OCaml, Perl to nativeBuildInputs to make it build. I fear some other dependencies in buildInputs should go in nativeBuildInputs.

Copy link
Contributor

@r-burns r-burns left a comment

Choose a reason for hiding this comment

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

To fix libguestfs-with-appliance, add "--with-guestfs-path=${placeholder "out"}/lib/guestfs" to configureFlags.

@alyssais
Copy link
Member

Can we use fetchpatch now that your patch has been applied upstream?

Move bison, flex, getopt from buildInputs to nativeBuildInputs as they
are build tools. Move crdkit, cpio, gperf, qemu to nativeBuildInputs.
Enable strictDeps.
@erdnaxe
Copy link
Member Author

erdnaxe commented Aug 28, 2021

Result of nixpkgs-review pr 135900 run on x86_64-linux 1

6 packages built:
  • diffoscope
  • libguestfs
  • libguestfs-with-appliance
  • python38Packages.guestfs
  • python39Packages.guestfs
  • vagrant

Copy link
Contributor

@r-burns r-burns left a comment

Choose a reason for hiding this comment

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

Big kudos for upstreaming the patch :)

Result of nixpkgs-review pr 135900 run on x86_64-linux 1

6 packages built:
  • diffoscope
  • libguestfs
  • libguestfs-with-appliance
  • python38Packages.guestfs
  • python39Packages.guestfs
  • vagrant

@alyssais alyssais merged commit 3e9661c into NixOS:master Aug 28, 2021
@bjornfor
Copy link
Contributor

FYI, this upgrade effectively removed virt-v2v, virt-p2v and the boot analysis tools, because upstream factored those out to separate repos since libguestfs-1.42.1, ref https://www.libguestfs.org/guestfs-release-notes-1.42.1.html.

@bjornfor
Copy link
Contributor

bjornfor commented Jun 1, 2023

FYI, this upgrade effectively removed virt-v2v, virt-p2v and the boot analysis tools, because upstream factored those out to separate repos since libguestfs-1.42.1, ref https://www.libguestfs.org/guestfs-release-notes-1.42.1.html.

WIP PR to bring back virt-v2v: #235432

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

10.rebuild-darwin: 1-10 This PR causes between 1 and 10 packages to rebuild on Darwin. 10.rebuild-linux: 1-10 This PR causes between 1 and 10 packages to rebuild on Linux.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants