FS#71327 - [libguestfs] libyara.so.4: cannot open shared object file: No such file or directory

Attached to Project: Community Packages
Opened by Alexandr Oleynikov (citrusalex) - Monday, 21 June 2021, 22:05 GMT
Last edited by Antonio Rojas (arojas) - Sunday, 15 May 2022, 20:19 GMT
Task Type Bug Report
Category Packages
Status Closed
Assigned To Robin Broda (coderobe)
Architecture All
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 2
Private No

Details

Description: When running libguestfs-test-tool, the test fails at guestfs stage with this message:
guestfsd: error while loading shared libraries: libyara.so.4: cannot open shared object file: No such file or directory

libyara.so.4 indeed does not exist on my system, but libyara.so.8 does.


Additional info:
* package version(s)
* config and/or log files etc.
* link to upstream bug report, if any

Steps to reproduce:
1) Launch libguestfs-test-tool
2) Get the missing library error
This task depends upon

Closed by  Antonio Rojas (arojas)
Sunday, 15 May 2022, 20:19 GMT
Reason for closing:  Fixed
Comment by Antonio Rojas (arojas) - Tuesday, 22 June 2021, 06:55 GMT
Looks like our package doesn't ship the guestfsd daemon so it downloads a precompiled copy at runtime
Comment by loqs (loqs) - Tuesday, 22 June 2021, 21:19 GMT
Passing --enable-install-daemon to configure adds usr/bin/guestfsd, usr/lib/udev/rules.d/99-guestfs-serial.rules and usr/share/man/man8/guestfsd.8.gz to the package.
Fixed up hard-coded path /lib/udev/rules.d to use $libdir.
Comment by Toolybird (Toolybird) - Wednesday, 23 June 2021, 02:17 GMT
> so it downloads a precompiled copy at runtime

Say what? No it doesn't. The daemon is part of the appliance which is supposed to be constructed on the fly from the host system.

> Passing --enable-install-daemon to configure

The daemon is generally not useful on the host system. Please don't do that. See here:

https://libguestfs.org/guestfs-building.1.html#selected-.-configure-settings

Comment by Robin Broda (coderobe) - Wednesday, 23 June 2021, 02:19 GMT
It simply needs a rebuild for the current yara...
I've complained about yara's soname handling in the past and this is just another instance where *someone* should've also rebuilt this one.

I'll see to it very soon.
Comment by Toolybird (Toolybird) - Wednesday, 23 June 2021, 02:28 GMT
> It simply needs a rebuild for the current yara

Correct :) It appears the Arch packager of latest yara missed the change of soname.

Maybe changing libguestfs to depend on libyara.so might help to prevent this kind of thing in the future? Dunno.
Comment by Antonio Rojas (arojas) - Wednesday, 23 June 2021, 06:23 GMT
The yara packager is hardly to blame here, guestfsd is shipped in a tar file so the libyara.so link it is not detected by our tooling. For the same reason, depending on libyara.so won't help as makepkg won't be able to resolve the solink. You'd either have to trust yara's packager memory, or add a reminder in its PKGBUILD to rebuild libguestfs on soname changes.
Comment by Toolybird (Toolybird) - Wednesday, 23 June 2021, 07:20 GMT
> so the libyara.so link it is not detected by our tooling

Ah, good point. Deps for this pkg are kinda weird due to how the appliance works. Any "blame" was unintentional, sorry.

> depending on libyara.so won't help as makepkg won't be able to resolve the solink

Thanks for the explanation. I knew I was missing something!

Maybe the tooling can one day be improved to cope with corner cases like this.
Comment by notmemberanymore (aljazzair) - Sunday, 11 July 2021, 13:12 GMT
This issue is preventing libguestfs from working.
I wanted to use virt-sparsify, so I decided to downgrade yara and put it on the pacman ignore list:

yara: ignoring package upgrade (4.0.1-1 => 4.1.1-1)

Now it works like it used to.
Hope this workaround will help someone.
Comment by flyaway (flyaway) - Friday, 13 May 2022, 11:35 GMT
Still broken.

yara 4.2.1-1
libguestfs 1.48.1-2

Running libguestfs-test-tool results:
guestfsd: error while loading shared libraries: libyara.so.8: cannot open shared object file: No such file or directory

Downgrading yara doesn't help, it fails even with libyara.so.8 present in /usr/lib/
Comment by flyaway (flyaway) - Friday, 13 May 2022, 12:57 GMT
Had to rebuild libguestfs (slow and painful) to workaround this issue

paru -G libguestfs
cd libguestfs
paru -Ui --mflags "--nocheck"
Comment by Antonio Rojas (arojas) - Sunday, 15 May 2022, 20:19 GMT
Closing this as this was eventually rebuilt, the new breakage is tracked in  FS#74761 

Loading...