Summary: | app-emulation/libguestfs-appliance should warn about sourcing /etc/profile on first installs | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | fabrice nicol <fabrnicol> |
Component: | Current packages | Assignee: | No maintainer - Look at https://wiki.gentoo.org/wiki/Project:Proxy_Maintainers if you want to take care of it <maintainer-needed> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | ajak, hlein, ionen, sam |
Priority: | Normal | ||
Version: | unspecified | ||
Hardware: | All | ||
OS: | Linux | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- | |
Bug Depends on: | |||
Bug Blocks: | 698100 | ||
Attachments: |
list of installed packages (qlist)
strace log of virt-copy-out example |
Description
fabrice nicol
2021-03-17 02:28:43 UTC
Created attachment 691926 [details]
strace log of virt-copy-out example
I haven't tried but this sound suspicious: LIBGUESTFS_PATH (search path: /usr/lib64/guestfs) Considering /etc/env.d/99libguestfs-appliance should set: LIBGUESTFS_PATH=/usr/share/guestfs/appliance/ If you've just installed it, maybe you need to source /etc/profile? (In reply to Ionen Wolkens from comment #2) > I haven't tried but this sound suspicious: > LIBGUESTFS_PATH (search path: /usr/lib64/guestfs) > > Considering /etc/env.d/99libguestfs-appliance should set: > LIBGUESTFS_PATH=/usr/share/guestfs/appliance/ > > If you've just installed it, maybe you need to source /etc/profile? Well, normally emerge should work without sourcing /etc/profile. This said, you are right, it is part of the issue. A second sub-issue is that after sourcing /etc/profile, virt-copy requested me to add myself to the kvm group. This should be automated by portage somehow (as is done for the virtualbox packages). Yet once all of this was settled, it was not the whole story. Actually it so turns out that libguestfs has a covert dependency to libpulse.so (media-sound/pulseaudio), and that the ebuild has omitted it in its dependency graph. I would advise a fix to this effect. See below: "libpulse.so.0: cannot open shared object file: No such file or directory" $ groups fab wheel audio video users plugdev kvm $ . /etc/profile $ virt-copy-out -a Gentoo.2021-03-16-04-55-38.vdi /sbin fs libguestfs: error: /usr/local/bin/qemu-system-x86_64 exited with error status 127. To see full error messages you may need to enable debugging. Do: export LIBGUESTFS_DEBUG=1 LIBGUESTFS_TRACE=1 and run the command again. For further information, read: http://libguestfs.org/guestfs-faq.1.html#debugging-libguestfs You can also run 'libguestfs-test-tool' and post the *complete* output into a bug report or message to the libguestfs mailing list. >>> after exporting the above env. vars: ibguestfs: trace: set_verbose true libguestfs: trace: set_verbose = 0 libguestfs: trace: set_path "/usr/share/guestfs/appliance/" libguestfs: trace: set_path = 0 libguestfs: create: flags = 0, handle = 0x55fe86ee9190, program = virt-copy-out libguestfs: trace: set_pgroup true libguestfs: trace: set_pgroup = 0 libguestfs: trace: add_drive "Gentoo.2021-03-16-04-55-38.vdi" "readonly:true" libguestfs: creating COW overlay to protect original drive content libguestfs: trace: get_tmpdir libguestfs: trace: get_tmpdir = "/tmp" libguestfs: trace: disk_create "/tmp/libguestfsX9reBQ/overlay1.qcow2" "qcow2" -1 "backingfile:/home/fab/mkg/Gentoo.2021-03-16-04-55-38.vdi" libguestfs: command: run: qemu-img libguestfs: command: run: \ create libguestfs: command: run: \ -f qcow2 libguestfs: command: run: \ -o backing_file=/home/fab/mkg/Gentoo.2021-03-16-04-55-38.vdi libguestfs: command: run: \ /tmp/libguestfsX9reBQ/overlay1.qcow2 qemu-img: warning: Deprecated use of backing file without explicit backing format (detected format of vdi) Formatting '/tmp/libguestfsX9reBQ/overlay1.qcow2', fmt=qcow2 cluster_size=65536 extended_l2=off compression_type=zlib size=57671680000 backing_file=/home/fab/mkg/Gentoo.2021-03-16-04-55-38.vdi backing_fmt=vdi lazy_refcounts=off refcount_bits=16 libguestfs: trace: disk_create = 0 libguestfs: trace: add_drive = 0 libguestfs: trace: is_config libguestfs: trace: is_config = 1 libguestfs: trace: launch libguestfs: trace: max_disks libguestfs: trace: max_disks = 255 libguestfs: trace: version libguestfs: trace: version = <struct guestfs_version = major: 1, minor: 38, release: 6, extra: -gentoo, > libguestfs: trace: get_backend libguestfs: trace: get_backend = "direct" libguestfs: launch: program=virt-copy-out libguestfs: launch: version=1.38.6-gentoo libguestfs: launch: backend registered: unix libguestfs: launch: backend registered: uml libguestfs: launch: backend registered: libvirt libguestfs: launch: backend registered: direct libguestfs: launch: backend=direct libguestfs: launch: tmpdir=/tmp/libguestfsX9reBQ libguestfs: launch: umask=0022 libguestfs: launch: euid=1000 libguestfs: trace: get_backend_setting "force_tcg" libguestfs: trace: get_backend_setting = NULL (error) libguestfs: begin testing qemu features libguestfs: trace: get_cachedir libguestfs: trace: get_cachedir = "/var/tmp" libguestfs: checking for previously cached test results of /usr/local/bin/qemu-system-x86_64, in /var/tmp/.guestfs-1000 libguestfs: command: run: /usr/local/bin/qemu-system-x86_64 libguestfs: command: run: \ -display none libguestfs: command: run: \ -help /usr/local/bin/qemu-system-x86_64: error while loading shared libraries: libpulse.so.0: cannot open shared object file: No such file or directory libguestfs: error: /usr/local/bin/qemu-system-x86_64 exited with error status 127, see debug messages above libguestfs: trace: launch = -1 (error) libguestfs: trace: close libguestfs: closing guestfs handle 0x55fe86ee9190 (state 0) libguestfs: command: run: rm libguestfs: command: run: \ -rf /tmp/libguestfsX9reBQ Update: After installing media-sound/pulseaudio, the issue was solved. So it all boils down to: + adding a media-sound/pulseaudio to the COMMON_DEPEND variable of the ebuild (I checked that it is not there) + adding user to the kvm group + hopefully avoid sourcing /etc/profile manually. (In reply to fabrice nicol from comment #4) > + adding a media-sound/pulseaudio to the COMMON_DEPEND variable of the > ebuild (I checked that it is not there) Look at the trace again, it used /usr/local/bin/qemu-system-x86_64. portage didn't install this, if you emerged qemu with USE=-pulseaudio it'd be in /usr/bin (not /usr/local) and not need pulseaudio Please clean old files from /usr/local > + adding user to the kvm group portage can't add "your" user to groups, it doesn't know what user you use. > + hopefully avoid sourcing /etc/profile manually. portage can't control the shells you have currently open, they need to be either restarted to update automatically, or have you source manually. OK. Issue solved after cleaning up /usr/local/ and rebuilding libguestfs. One note however: the "add user to kvm group" issue should be somehow documented on a Gentoo page (as for Virtualbox) or any other means. Running into crashes before realizing this, upon reading relatively cryptic error messages is not ideaL Many thanks. (In reply to fabrice nicol from comment #6) > One note however: the "add user to kvm group" issue should be somehow > documented on a Gentoo page (as for Virtualbox) or any other means. Running > into crashes before realizing this, upon reading relatively cryptic error > messages is not ideaL Was the error cryptic? When you said "requested me to add myself to the kvm group" I thought it was straight forward. For the record, I don't use this, so I haven't seen the messages. Generally I do feel packages should warn when they modify /etc/env.d in a way that requires shells to load it immediately to function though, so it's one thing I think should be changed. + The kvm group error message was not about an obligation for the **user** to be added to the kvm group but mentioned that "libguestfs may be very slow" if user is not in kvm. I had crashes whilst I did not add myself (as a user) to group kvm. But this may be an indirect problem caused by my local qemu build. + The portage qemu install adds qemu to group kvm automatically. So this may suffice to satisfy libguestfs. Now that I have removed myself (as a user) from group kvm, and rebuilt libguestfs, all is fine and I have no kvm warnings. + However considering the error message about slowness and the fact that you will add a warning about /etc/profile sourcing, it might be a good idea to warn about group kvm too. This package seems stuck at 1.40.1 while libguestfs enjoys regular releases (1.44.1 currently). Barely any packaging other than us? https://repology.org/project/libguestfs-appliance/versions The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a69f9d864df4ffc4a078847d205efbba1fede560 commit a69f9d864df4ffc4a078847d205efbba1fede560 Author: Sam James <sam@gentoo.org> AuthorDate: 2021-10-02 21:41:10 +0000 Commit: Sam James <sam@gentoo.org> CommitDate: 2021-10-02 21:41:44 +0000 app-emulation/libguestfs-appliance: warn users to source profile Closes: https://bugs.gentoo.org/776790 Signed-off-by: Sam James <sam@gentoo.org> .../libguestfs-appliance/libguestfs-appliance-1.40.1.ebuild | 5 +++++ 1 file changed, 5 insertions(+) |