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

Bug#645305: zfsutils dependencies break ABI and aren't properly versioned

Hash: SHA1

Package: src:zfsutils
Version: 8.1-4+squeeze1
Severity: serious
Justification: breaks upgrades, does not declare dependencies properly

Out of the zfsutils package are being built several shared libraries.
These do not bump any SONAME version or provide a symbols file. Hence,
shlibs generates zfsutils dependencies unversioned:

Depends: libbsd0 (>= 0.0), libc0.1 (>= 2.4), libgeom1 (>= 7.0),
libnvpair0, libumem0, libuutil0, libzfs0, libzpool0, zlib1g (>= 1:1.1.4)

That implies that zfsutils would work with any version of libnvpair0,
libumem0, libuutil0, libzfs0, libzpool0 installed. That is, however not
true. Upgrading zfsutils from 8.1 (Squeeze) to 8.2 (Wheezy) or any later
version breaks ABIs but does not pull appropriate dependencies.

Thus, users which do not do a full upgrade are left with broken zfsutils:

root@kfreebsd-test2:~# ldd /sbin/zfs
        libzfs.so.0 => /lib/libzfs.so.0 (0x0000000801242000)
        libgeom.so.0 => /lib/libgeom.so.0 (0x0000000801479000)
        libnvpair.so.0 => /lib/libnvpair.so.0 (0x000000080167e000)
        libuutil.so.0 => /lib/libuutil.so.0 (0x0000000801888000)
        libc.so.0.1 => /lib/libc.so.0.1 (0x0000000801a92000)
        libbsd.so.0 => /lib/libbsd.so.0 (0x0000000801dd6000)
        libm.so.1 => /lib/libm.so.1 (0x0000000801fe0000)
        libexpat.so.1 => /usr/lib/libexpat.so.1 (0x0000000802262000)
        libsbuf.so.0 => /lib/libsbuf.so.0 (0x000000080248b000)
        librt.so.1 => /lib/librt.so.1 (0x000000080268d000)
        libpthread.so.0 => /lib/libpthread.so.0 (0x00000008028a2000)
        /lib/ld-kfreebsd-x86-64.so.1 => /lib64/ld-kfreebsd-x86-64.so.1

root@kfreebsd-test2:~# objdump -x /lib/libzfs.so.0

/lib/libzfs.so.0:     file format elf64-x86-64-freebsd
architecture: i386:x86-64, flags 0x00000150:
start address 0x00000000000098c0

Dynamic Section:
  SONAME               libzfs.so.0
  VERNEED              0x0000000000005aa0
  VERNEEDNUM           0x0000000000000003
  VERSYM               0x0000000000005742
  RELACOUNT            0x0000000000000069

note: no version definitions.
Next, let's upgrade zfsutils:

root@kfreebsd-test2:~# apt-get install zfsutils
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following extra packages will be installed:
  libbsd0 libgeom1 libumem0 libzpool0
The following NEW packages will be installed:
  libgeom1 libumem0 libzpool0
The following packages will be upgraded:
  libbsd0 zfsutils
2 upgraded, 3 newly installed, 0 to remove and 140 not upgraded.
Need to get 653 kB of archives.
(Reading database ... 12078 files and directories currently installed.)
Preparing to replace libbsd0 0.2.0-1 (using
.../libbsd0_0.3.0-1_kfreebsd-amd64.deb) ...
Unpacking replacement libbsd0 ...
Setting up libbsd0 (0.3.0-1) ...
Selecting previously deselected package libgeom1.
(Reading database ... 12078 files and directories currently installed.)
Unpacking libgeom1 (from .../libgeom1_8.2+ds1-4_kfreebsd-amd64.deb) ...
Selecting previously deselected package libumem0.
Unpacking libumem0 (from .../libumem0_8.2-4_kfreebsd-amd64.deb) ...
Selecting previously deselected package libzpool0.
Unpacking libzpool0 (from .../libzpool0_8.2-4_kfreebsd-amd64.deb) ...
Preparing to replace zfsutils 8.1-4+squeeze1 (using
.../zfsutils_8.2-4_kfreebsd-amd64.deb) ...
Unpacking replacement zfsutils ...
Processing triggers for man-db ...
Setting up libgeom1 (8.2+ds1-4) ...
Setting up libumem0 (8.2-4) ...
Setting up libzpool0 (8.2-4) ...
Setting up zfsutils (8.2-4) ...
Installing new version of config file /etc/init.d/zfs ...
Starting ZFS subsystem... zvol swapzfs: symbol lookup error: zfs:
undefined symbol: libzfs_mnttab_cache
 filesystemszfs: symbol lookup error: zfs: undefined symbol:
invoke-rc.d: initscript zfs, action "start" failed.
dpkg: error processing zfsutils (--configure):
 subprocess installed post-installation script returned error exit
status 127
configured to not write apport reports
                                      Errors were encountered while
E: Sub-process /usr/bin/dpkg returned an error code (1)

Problem is,

root@kfreebsd-test2:~# zfs list
zfs: symbol lookup error: zfs: undefined symbol: libzfs_mnttab_cache

This symbol is defined in libzfs built from the zfsutils 8.2 source
package though:

root@kfreebsd-test2:~# apt-get install libzfs0
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages will be upgraded:
1 upgraded, 0 newly installed, 0 to remove and 139 not upgraded.
1 not fully installed or removed.
Need to get 105 kB of archives.
After this operation, 13.3 kB disk space will be freed.
Get:1 http://ftp.de.debian.org/debian/ wheezy/main libzfs0
kfreebsd-amd64 8.2-4 [105 kB]
Fetched 105 kB in 0s (256 kB/s)
(Reading database ... 12094 files and directories currently installed.)
Preparing to replace libzfs0 8.1-4+squeeze1 (using
.../libzfs0_8.2-4_kfreebsd-amd64.deb) ...
Unpacking replacement libzfs0 ...
Setting up libzfs0 (8.2-4) ...
Setting up zfsutils (8.2-4) ...
Starting ZFS subsystem... zvol swap filesystems.

root@kfreebsd-test2:~# zfs list
no datasets available

Please either:

a) consider these libraries private and install them bundled with
zfsutils to a private location
b) link them statically (most do not have any external dependencies,
questions remain how useful they are outside of zfsutils itself)
c) properly use SONAME versions and bump package names when needed

more discussion on [1].

[1] http://lists.debian.org/debian-bsd/2011/10/msg00137.html
- -- 
with kind regards,
Arno Töll
IRC: daemonkeeper on Freenode/OFTC
GnuPG Key-ID: 0x9D80F36D
Version: GnuPG v1.4.11 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/


Reply to: