[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: [Libguestfs] Nbdkit old test plugins link to selinux.so.1



On Sun, Jan 10, 2021 at 01:58:50AM +0100, Thomas Weißschuh wrote:
> Hi all,
> 
> the old 1.2.8 plugins checked into the source repo that are used for testing
> the plugin are linking to libselinux.so.1.
> This prevents these tests being run on distros without libselinux.
> (Arch Linux in my case)
> 
> $ ldd tests/old-plugins/x86_64/Linux/v1.2.8/nbdkit-file-plugin.so
> 	linux-vdso.so.1 (0x00007ffde31d6000)
> 	libselinux.so.1 => not found
> 	libc.so.6 => /usr/lib/libc.so.6 (0x00007f72139ed000)
> 
> The other old plugins don't require libselinux.
> 
> Could the 1.2.8 plugins be replaced with ones not linking to libselinux?

Tricky one this.  The plugins shouldn't be linked to libselinux at all
(only the server should be linked, and only on platforms that have
this library).  We fixed this over-linking problem back in:

  commit 6c51add6bef8a08c99cb3e1d37ce6cb1812dba9d
  Author: Richard W.M. Jones <rjones redhat com>
  Date:   Wed Jan 16 10:10:50 2019 +0000

    build: Don't link everything, only the server, with libselinux.

That in nbdkit 1.9.  I had to backpork this patch to the stable-1.2
branch in order to compile a "new" old 1.2 file plugin without the
over-linking:

$ ldd ./plugins/file/.libs/nbdkit-file-plugin.so 
  linux-vdso.so.1 (0x00007ffc341e9000)
  libc.so.6 => /lib64/libc.so.6 (0x00007f67c36ad000)
  /lib64/ld-linux-x86-64.so.2 (0x00007f67c38a4000)

This should be fixed in:

https://github.com/libguestfs/nbdkit/commit/76c59e92dc8ccbb6edc08f67ad752459d54d780e

Rich.

-- 
Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones
Read my programming and virtualization blog: http://rwmj.wordpress.com
virt-top is 'top' for virtual machines.  Tiny program with many
powerful monitoring features, net stats, disk stats, logging, etc.
http://people.redhat.com/~rjones/virt-top


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]