Move the libraries into separate packages
From day one the various ZFS libraries should have been placed in their own sub-packages. Primarily this allows for multiple major versions of the libraries to be concurrently installed. It also facilitates a smaller build environment by minimizing the required dependencies. The specific changes required to split the libraries from the utilities are as follows: * libzpool2, libnvpair1, libuutil1, and libzfs2 packages were added and contain the versioned shared libraries. The Fedora packaging guidelines discourage providing static libraries so they are not included in the packages. http://fedoraproject.org/wiki/Packaging:Guidelines#Packaging_Static_Libraries * The zfs-devel package was renamed libzfs2-devel and the new package obsoletes the old zfs-devel package. This package includes all the required headers for the libzpool2, libnvpair1, libuutil1, and libzfs2 libraries and their respective unversioned shared libraries. This package should eventually be split in to individual lib*-devel packages but it will still take some work to cleanly separate them. Therefore the libzfs2-devel package provides the expected lib*-devel packages so the all proper dependencies can still be created. http://fedoraproject.org/wiki/Packaging:Guidelines#Devel_Packages * Moved '/sbin/ldconfig' execution from the zfs packge to each of the new library packages as described by the packaging guidelines. http://fedoraproject.org/wiki/Packaging:Guidelines#Shared_Libraries * The /usr/share/doc/ files were moved in to the libzfs2-devel package. * Updated config/deb.am to be aware of the packaging changes. This ensures that 'deb-utils' make target converts all the resulting packages generated by the 'rpm-utils' target. Signed-off-by: Turbo Fredriksson <turbo@bayour.com> Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov> Closes: #2329 Closes: #2341 Issue: #2145
This commit is contained in:
parent
2024041b6c
commit
c9b5cc8c00
|
@ -30,11 +30,16 @@ if CONFIG_USER
|
|||
version=${VERSION}-${RELEASE}; \
|
||||
arch=`$(RPM) -qp $${name}-$${version}.src.rpm --qf %{arch} | tail -1`; \
|
||||
pkg1=$${name}-$${version}.$${arch}.rpm; \
|
||||
pkg2=$${name}-devel-$${version}.$${arch}.rpm; \
|
||||
pkg3=$${name}-test-$${version}.$${arch}.rpm; \
|
||||
pkg4=$${name}-dracut-$${version}.$${arch}.rpm; \
|
||||
fakeroot $(ALIEN) --bump=0 --scripts --to-deb $$pkg1 $$pkg2 $$pkg3 $$pkg4; \
|
||||
$(RM) $$pkg1 $$pkg2 $$pkg3 $$pkg4
|
||||
pkg2=libnvpair1-$${version}.$${arch}.rpm; \
|
||||
pkg3=libuutil1-$${version}.$${arch}.rpm; \
|
||||
pkg4=libzfs2-$${version}.$${arch}.rpm; \
|
||||
pkg5=libzpool2-$${version}.$${arch}.rpm; \
|
||||
pkg6=libzfs2-devel-$${version}.$${arch}.rpm; \
|
||||
pkg7=$${name}-test-$${version}.$${arch}.rpm; \
|
||||
pkg8=$${name}-dracut-$${version}.$${arch}.rpm; \
|
||||
fakeroot $(ALIEN) --bump=0 --scripts --to-deb \
|
||||
$$pkg1 $$pkg2 $$pkg3 $$pkg4 $$pkg5 $$pkg6 $$pkg7 $$pkg8; \
|
||||
$(RM) $$pkg1 $$pkg2 $$pkg3 $$pkg4 $$pkg5 $$pkg6 $$pkg7 $$pkg8;
|
||||
endif
|
||||
|
||||
deb: deb-kmod deb-utils
|
||||
|
|
|
@ -45,6 +45,10 @@ ExclusiveArch: i386 i686 x86_64
|
|||
ExcludeArch: ppc ppc64
|
||||
|
||||
Requires: spl = %{version}
|
||||
Requires: libzpool2 = %{version}
|
||||
Requires: libnvpair1 = %{version}
|
||||
Requires: libuutil1 = %{version}
|
||||
Requires: libzfs2 = %{version}
|
||||
Requires: %{name}-kmod = %{version}
|
||||
Provides: %{name}-kmod-common = %{version}
|
||||
|
||||
|
@ -67,14 +71,73 @@ BuildRequires: systemd
|
|||
%endif
|
||||
|
||||
%description
|
||||
This package contains the ZFS command line utilities and libraries.
|
||||
This package contains the ZFS command line utilities.
|
||||
|
||||
%package devel
|
||||
%package -n libzpool2
|
||||
Summary: Native ZFS pool library for Linux
|
||||
Group: System Environment/Kernel
|
||||
|
||||
%description -n libzpool2
|
||||
This package contains the zpool library, which provides support
|
||||
for managing zpools
|
||||
|
||||
%post-n libzpool2 -p /sbin/ldconfig
|
||||
%postun -n libzpool2 -p /sbin/ldconfig
|
||||
|
||||
%package -n libnvpair1
|
||||
Summary: Solaris name-value library for Linux
|
||||
Group: System Environment/Kernel
|
||||
|
||||
%description -n libnvpair1
|
||||
This package contains routines for packing and unpacking name-value
|
||||
pairs. This functionality is used to portably transport data across
|
||||
process boundaries, between kernel and user space, and can be used
|
||||
to write self describing data structures on disk.
|
||||
|
||||
%post-n libnvpair1 -p /sbin/ldconfig
|
||||
%postun -n libnvpair1 -p /sbin/ldconfig
|
||||
|
||||
%package -n libuutil1
|
||||
Summary: Solaris userland utility library for Linux
|
||||
Group: System Environment/Kernel
|
||||
|
||||
%description -n libuutil1
|
||||
This library provides a variety of compatibility functions for ZFS on Linux:
|
||||
* libspl: The Solaris Porting Layer userland library, which provides APIs
|
||||
that make it possible to run Solaris user code in a Linux environment
|
||||
with relatively minimal modification.
|
||||
* libavl: The Adelson-Velskii Landis balanced binary tree manipulation
|
||||
library.
|
||||
* libefi: The Extensible Firmware Interface library for GUID disk
|
||||
partitioning.
|
||||
* libshare: NFS, SMB, and iSCSI service integration for ZFS.
|
||||
|
||||
%post-n libuutil1 -p /sbin/ldconfig
|
||||
%postun -n libuutil1 -p /sbin/ldconfig
|
||||
|
||||
%package -n libzfs2
|
||||
Summary: Native ZFS filesystem library for Linux
|
||||
Group: System Environment/Kernel
|
||||
|
||||
%description -n libzfs2
|
||||
This package provides support for managing ZFS filesystems
|
||||
|
||||
%post-n libzfs2 -p /sbin/ldconfig
|
||||
%postun -n libzfs2 -p /sbin/ldconfig
|
||||
|
||||
%package -n libzfs2-devel
|
||||
Summary: Development headers
|
||||
Group: System Environment/Kernel
|
||||
Requires: %{name}%{?_isa} = %{version}-%{release}
|
||||
Requires: libzfs2 = %{version}
|
||||
Requires: libzpool2 = %{version}
|
||||
Requires: libnvpair1 = %{version}
|
||||
Requires: libuutil1 = %{version}
|
||||
Provides: libzpool2-devel
|
||||
Provides: libnvpair1-devel
|
||||
Provides: libuutil1-devel
|
||||
Obsoletes: zfs-devel
|
||||
|
||||
%description devel
|
||||
%description -n libzfs2-devel
|
||||
This package contains the header files needed for building additional
|
||||
applications against the ZFS libraries.
|
||||
|
||||
|
@ -137,7 +200,6 @@ make install DESTDIR=%{?buildroot}
|
|||
find %{?buildroot}%{_libdir} -name '*.la' -exec rm -f {} \;
|
||||
|
||||
%post
|
||||
/sbin/ldconfig
|
||||
%if 0%{?_systemd}
|
||||
%systemd_post zfs.target
|
||||
%else
|
||||
|
@ -156,17 +218,13 @@ fi
|
|||
exit 0
|
||||
|
||||
%postun
|
||||
/sbin/ldconfig
|
||||
%if 0%{?_systemd}
|
||||
%systemd_postun zfs.target
|
||||
%endif
|
||||
|
||||
%files
|
||||
%doc AUTHORS COPYRIGHT DISCLAIMER
|
||||
%doc OPENSOLARIS.LICENSE README.markdown
|
||||
%{_sbindir}/*
|
||||
%{_bindir}/*
|
||||
%{_libdir}/*.so.*
|
||||
%{_libexecdir}/%{name}
|
||||
%{_mandir}/man1/*
|
||||
%{_mandir}/man5/*
|
||||
|
@ -183,9 +241,23 @@ exit 0
|
|||
%{_sysconfdir}/init.d/*
|
||||
%endif
|
||||
|
||||
%files devel
|
||||
%files -n libzpool2
|
||||
%{_libdir}/libzpool.so.*
|
||||
|
||||
%files -n libnvpair1
|
||||
%{_libdir}/libnvpair.so.*
|
||||
|
||||
%files -n libuutil1
|
||||
%{_libdir}/libuutil.so.*
|
||||
|
||||
%files -n libzfs2
|
||||
%{_libdir}/libzfs*.so.*
|
||||
|
||||
%files -n libzfs2-devel
|
||||
%{_libdir}/*.so
|
||||
%{_includedir}/*
|
||||
%doc AUTHORS COPYRIGHT DISCLAIMER
|
||||
%doc OPENSOLARIS.LICENSE README.markdown
|
||||
|
||||
%files test
|
||||
%{_datadir}/%{name}
|
||||
|
|
Loading…
Reference in New Issue