[PATCH] Split out e2fsprogs sublibraries

Richard W.M. Jones rjones at redhat.com
Fri Feb 20 14:34:14 UTC 2009


Eric,

I would like to propose that e2fsprogs generate four subpackages for
the independent libraries that it contains.  These four libraries are
used by other packages that don't need the whole of e2fsprogs-devel
(eg. krb5_workstation uses libss, qpid uses libuuid, and many programs
use libcom_err).

Our specific use case is to help with ongoing work porting libraries
to MinGW (http://fedoraproject.org/wiki/MinGW) where we would prefer
to package mingw32-libuuid for mingw32-qpidc without needing to port
the whole of e2fsprogs.

I looked at Debian's package, and would like to propose a split along
the same lines:

  http://packages.debian.org/source/lenny/e2fsprogs

Despite the apparent complexity, there are only really four
subpackages.  For the Fedora package we would create:

  libblkid      libblkid-devel
  libcom_err    libcom_err-devel       [note 1]
  libss         libss-devel
  libuuid       libuuid-devel

There are no conflicting package names in Fedora at the moment, except
for the similarly named libss7 (a library implementing Signalling
System 7 telephone switching protocol).

I have attached a patch against Rawhide which does the above split.  I
set up the dependencies so there should be no loss of functionality
for users who install just e2fsprogs or e2fsprogs-devel.

What remains is to advertize the split on fedora-devel-list and
encourage package maintainers to replace:

  BuildRequires: e2fsprogs-devel

with

  BuildRequires: lib<uuid|ss|blkid|com_err>-devel

where appropriate.

Please let me know what you think.

Rich.

[1] http://fedoraproject.org/wiki/Packaging/NamingGuidelines#Common_Character_Set_for_Package_Naming

-- 
Richard Jones, Emerging Technologies, Red Hat  http://et.redhat.com/~rjones
virt-top is 'top' for virtual machines.  Tiny program with many
powerful monitoring features, net stats, disk stats, logging, etc.
http://et.redhat.com/~rjones/virt-top
-------------- next part --------------
? .build-1.41.4-3.fc11.log
? e2fsprogs-1.41.4
? e2fsprogs-1.41.4-3.fc11.src.rpm
? x86_64
Index: e2fsprogs.spec
===================================================================
RCS file: /cvs/pkgs/rpms/e2fsprogs/devel/e2fsprogs.spec,v
retrieving revision 1.128
diff -u -r1.128 e2fsprogs.spec
--- e2fsprogs.spec	29 Jan 2009 22:43:47 -0000	1.128
+++ e2fsprogs.spec	20 Feb 2009 14:32:30 -0000
@@ -4,7 +4,7 @@
 Summary: Utilities for managing the second and third extended (ext2/ext3) filesystems
 Name: e2fsprogs
 Version: 1.41.4
-Release: 2%{?dist}
+Release: 3%{?dist}
 # License based on upstream-modified COPYING file,
 # which clearly states "V2" intent.
 License: GPLv2
@@ -21,6 +21,10 @@
 Url: http://e2fsprogs.sourceforge.net/
 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
 Requires: e2fsprogs-libs = %{version}-%{release}, device-mapper
+Requires: libblkid
+Requires: libcom_err
+Requires: libss
+Requires: libuuid
 BuildRequires: pkgconfig, texinfo, libselinux-devel
 BuildRequires: libsepol-devel, device-mapper-devel, util-linux
 
@@ -61,6 +65,10 @@
 Requires: e2fsprogs-libs = %{version}-%{release}
 Requires: device-mapper-devel >= 1.02.02-3
 Requires: gawk
+Requires: libblkid-devel
+Requires: libcom_err-devel
+Requires: libss-devel
+Requires: libuuid-devel
 Requires(post): /sbin/install-info
 Requires(preun): /sbin/install-info
 
@@ -76,7 +84,7 @@
 %package -n uuidd
 Summary: helper daemon to guarantee uniqueness of time-based UUIDs
 Group: System Environment/Daemons
-Requires: e2fsprogs-libs = %{version}-%{release}
+Requires: libuuid = %{version}-%{release}
 License: GPLv2
 Requires(pre): shadow-utils
 
@@ -85,6 +93,82 @@
 uniqueness of time-based UUID generation even at very high rates on
 SMP systems.
 
+%package -n libblkid
+Summary: Block device ID library
+Group: Development/Libraries
+License: LGPLv2+
+
+%description -n libblkid
+This is the block device ID library, part of e2fsprogs.
+
+%package -n libblkid-devel
+Summary: Block device ID library
+Group: Development/Libraries
+License: LGPLv2+
+Requires: libblkid = %{version}-%{release}
+Requires: pkgconfig
+
+%description -n libblkid-devel
+This is the block device ID development library and headers,
+part of e2fsprogs.
+
+%package -n libcom_err
+Summary: Common error description library
+Group: Development/Libraries
+License: MIT
+
+%description -n libcom_err
+This is the common error description library, part of e2fsprogs.
+
+%package -n libcom_err-devel
+Summary: Common error description library
+Group: Development/Libraries
+License: MIT
+Requires: libcom_err = %{version}-%{release}
+Requires: pkgconfig
+
+%description -n libcom_err-devel
+This is the common error description development library and headers,
+part of e2fsprogs.
+
+%package -n libss
+Summary: Command line interface parsing library
+Group: Development/Libraries
+License: MIT
+
+%description -n libss
+This is the command line interface parsing library, part of e2fsprogs.
+
+%package -n libss-devel
+Summary: Command line interface parsing library
+Group: Development/Libraries
+License: MIT
+Requires: libss = %{version}-%{release}
+Requires: pkgconfig
+
+%description -n libss-devel
+This is the command line interface parsing development library and
+headers, and the mk_cmds command, part of e2fsprogs.
+
+%package -n libuuid
+Summary: Universally unique ID library
+Group: Development/Libraries
+License: BSD
+
+%description -n libuuid
+This is the universally unique ID library, part of e2fsprogs.
+
+%package -n libuuid-devel
+Summary: Universally unique ID library
+Group: Development/Libraries
+License: BSD
+Requires: libuuid = %{version}-%{release}
+Requires: pkgconfig
+
+%description -n libuuid-devel
+This is the universally unique ID development library and headers,
+part of e2fsprogs.
+
 %prep
 %setup -q -n e2fsprogs-%{version}
 # put blkid.tab in /etc/blkid/
@@ -172,10 +256,8 @@
 %defattr(-,root,root)
 %doc README RELEASE-NOTES
 
-%dir /etc/blkid
 %config(noreplace) /etc/mke2fs.conf
 %{_root_sbindir}/badblocks
-%{_root_sbindir}/blkid
 %{_root_sbindir}/debugfs
 %{_root_sbindir}/dumpe2fs
 %{_root_sbindir}/e2fsck
@@ -201,16 +283,13 @@
 
 %{_bindir}/chattr
 %{_bindir}/lsattr
-%{_bindir}/uuidgen
 %{_mandir}/man1/chattr.1*
 %{_mandir}/man1/lsattr.1*
-%{_mandir}/man1/uuidgen.1*
 
 %{_mandir}/man5/e2fsck.conf.5*
 %{_mandir}/man5/mke2fs.conf.5*
 
 %{_mandir}/man8/badblocks.8*
-%{_mandir}/man8/blkid.8*
 %{_mandir}/man8/debugfs.8*
 %{_mandir}/man8/dumpe2fs.8*
 %{_mandir}/man8/e2fsck.8*
@@ -236,45 +315,85 @@
 
 %files libs
 %defattr(-,root,root)
-%{_root_libdir}/libblkid.so.*
-%{_root_libdir}/libcom_err.so.*
 %{_root_libdir}/libe2p.so.*
 %{_root_libdir}/libext2fs.so.*
-%{_root_libdir}/libss.so.*
-%{_root_libdir}/libuuid.so.*
 
 %files devel
 %defattr(-,root,root)
 %{_infodir}/libext2fs.info*
-%{_bindir}/compile_et
-%{_bindir}/mk_cmds
 
-%{_libdir}/libblkid.a
-%{_libdir}/libblkid.so
-%{_libdir}/libcom_err.a
-%{_libdir}/libcom_err.so
 %{_libdir}/libe2p.a
 %{_libdir}/libe2p.so
 %{_libdir}/libext2fs.a
 %{_libdir}/libext2fs.so
-%{_libdir}/libss.a
-%{_libdir}/libss.so
-%{_libdir}/libuuid.a
-%{_libdir}/libuuid.so
-%{_libdir}/pkgconfig/*.pc
+%{_libdir}/pkgconfig/e2p.pc
+%{_libdir}/pkgconfig/ext2fs.pc
 
-%{_datadir}/et
-%{_datadir}/ss
-%{_includedir}/blkid
 %{_includedir}/e2p
-%{_includedir}/et
 %{_includedir}/ext2fs
-%{_includedir}/ss
-%{_includedir}/uuid
+
+%files -n uuidd
+%defattr(-,root,root)
+/etc/rc.d/init.d/uuidd
+%{_mandir}/man8/uuidd.8*
+%attr(-, uuidd, uuidd) %{_sbindir}/uuidd
+%dir %attr(2775, uuidd, uuidd) /var/lib/libuuid
+
+%files -n libblkid
+%defattr(-,root,root)
+%dir /etc/blkid
+%{_root_sbindir}/blkid
+%{_mandir}/man8/blkid.8*
+%{_root_libdir}/libblkid.so.*
+
+%files -n libblkid-devel
+%defattr(-,root,root)
+%{_libdir}/libblkid.a
+%{_libdir}/libblkid.so
+%{_includedir}/blkid
+%{_mandir}/man3/libblkid.3*
+%{_libdir}/pkgconfig/blkid.pc
+
+%files -n libcom_err
+%defattr(-,root,root)
+%{_root_libdir}/libcom_err.so.*
+
+%files -n libcom_err-devel
+%defattr(-,root,root)
+%{_bindir}/compile_et
+%{_libdir}/libcom_err.a
+%{_libdir}/libcom_err.so
+%{_datadir}/et
+%{_includedir}/et
 %{_mandir}/man1/compile_et.1*
-%{_mandir}/man1/mk_cmds.1*
 %{_mandir}/man3/com_err.3*
-%{_mandir}/man3/libblkid.3*
+%{_libdir}/pkgconfig/com_err.pc
+
+%files -n libss
+%defattr(-,root,root)
+%{_root_libdir}/libss.so.*
+
+%files -n libss-devel
+%defattr(-,root,root)
+%{_bindir}/mk_cmds
+%{_libdir}/libss.a
+%{_libdir}/libss.so
+%{_datadir}/ss
+%{_includedir}/ss
+%{_mandir}/man1/mk_cmds.1*
+%{_libdir}/pkgconfig/ss.pc
+
+%files -n libuuid
+%defattr(-,root,root)
+%{_bindir}/uuidgen
+%{_mandir}/man1/uuidgen.1*
+%{_root_libdir}/libuuid.so.*
+
+%files -n libuuid-devel
+%defattr(-,root,root)
+%{_libdir}/libuuid.a
+%{_libdir}/libuuid.so
+%{_includedir}/uuid
 %{_mandir}/man3/uuid.3*
 %{_mandir}/man3/uuid_clear.3*
 %{_mandir}/man3/uuid_compare.3*
@@ -286,15 +405,12 @@
 %{_mandir}/man3/uuid_parse.3*
 %{_mandir}/man3/uuid_time.3*
 %{_mandir}/man3/uuid_unparse.3*
-
-%files -n uuidd
-%defattr(-,root,root)
-/etc/rc.d/init.d/uuidd
-%{_mandir}/man8/uuidd.8*
-%attr(-, uuidd, uuidd) %{_sbindir}/uuidd
-%dir %attr(2775, uuidd, uuidd) /var/lib/libuuid
+%{_libdir}/pkgconfig/uuid.pc
 
 %changelog
+* Fri Feb 20 2009 Richard W.M. Jones <rjones at redhat.com> 1.41.4-3
+- Split out the four sublibraries (libblkid, libcom_err, libss, libuuid).
+
 * Thu Jan 29 2009 Eric Sandeen <sandeen at redhat.com> 1.41.4-2
 - Fix debugfs "stat" segfault if no open fs (#482894)
 - Fix name of libext2fs info page (#481620)


More information about the mingw mailing list