Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package libblockdev for openSUSE:Factory 
checked in at 2023-09-25 19:59:46
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/libblockdev (Old)
 and      /work/SRC/openSUSE:Factory/.libblockdev.new.1770 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "libblockdev"

Mon Sep 25 19:59:46 2023 rev:20 rq:1108174 version:3.0.2

Changes:
--------
--- /work/SRC/openSUSE:Factory/libblockdev/libblockdev.changes  2022-10-12 
18:24:21.729615103 +0200
+++ /work/SRC/openSUSE:Factory/.libblockdev.new.1770/libblockdev.changes        
2023-09-25 19:59:46.654750334 +0200
@@ -1,0 +2,70 @@
+Wed Aug 23 01:16:38 UTC 2023 - Luciano Santos <[email protected]>
+
+- Update to version 3.0.2:
+  * Use ntfsinfo instead of ntfscluster for faster
+    bd_fs_ntfs_get_info.
+  * Restrict list of exported symbols via -export-symbols-regex.
+  * lib: Silence the missing DEFAULT_CONF_DIR_PATH.
+  * loop: Report BD_LOOP_ERROR_DEVICE on empty loop devices.
+  * fs: Fix unused error in extract_e2fsck_progress.
+  * fs: Use read-only mount where possible for generic FS
+    functions.
+  * fs: Document that generic functions can mount filesystems.
+  * fs: Avoid excess logging in extract_e2fsck_progress.
+- Restructure all sub-packages in the spec file to enhance
+  maintainability.
+
+-------------------------------------------------------------------
+Fri Jun 30 10:16:53 UTC 2023 - Paolo Stivanin <[email protected]>
+
+- Update to 3.0.1:
+  * New bugfix release of the libblockdev library with multiple
+    fixes.
+  * loop: Define LOOP_SET_BLOCK_SIZE is not defined. And remove
+    bd_loop_get_autoclear definition.
+  * crypto: Remove stray struct redefinition.
+  * fs: Simplify struct BDFSInfo. And add missing copy and free
+    functions to the header file.
+  * vdo_stats: Remove unused libparted include.
+  * lvm: Make _vglock_start_stop static. Fix declaration for
+    bd_lvm_vdolvpoolname. And add bd_lvm_segdata_copy/free to the
+    header file.
+  * Make the conf.d directory versioned.
+- Changes from version 3.0.0:
+  * New major release of the libblockdev library. This release
+    contains a large API overhaul.
+  * VDO a KBD plugins were removed.
+  * New NVMe plugin was added.
+  * Runtime dependencies are no longer checked during plugin
+    initialization.
+  * Part plugin was rewritten to use libfdisk instead of libparted
+  * Crypto plugin API went through an extensive rewrite.
+  * Support for new technologies was added to the crypto plugin:
+    FileVault2 encryption, DM Integrity, LUKS2 tokens.
+  * Filesystem plugin adds support for btrfs, F2FS, NILFS2, exFAT
+    and UDF.
+  * Support for new filesystem operations was added to the plugin:
+    setting label and UUID, generic mkfs function and API for
+    getting feature support for filesystems.
+  * dmraid support was removed from the DM plugin.
+  * Python 2 support was dropped.
+- Drop no longer needed libblockdev-fix-libkmod-include.patch
+- Drop no longer supported sub-packages with their dependencies,
+  and their configure options, following upstream changes: python2
+  (python-devel), bcache, dmraid (dmraid-devel BuildRequires) and
+  kbd.
+- Add (gcc >= 11 or gcc11) boolean BuildRequires to ensure the
+  package is buildable on Leap 15.5, where the gcc meta-package is
+  of version 7.
+- Bump the SO version to 3 for the shared library and GI bindings
+  sub-packages.
+- Add ext2fs, fdisk, and libkeyutils pkgconfig() BuildRequires.
+  The first is a new dependency for the FS plugin. The second, for
+  the PART plugin. And the latter, for the CRYPTO plugin (before,
+  the explicit_bzero() function would be searched for).
+- Add libnvme-devel >= 1.3 BuildRequires, and pass --with-nvme to
+  configure, needed for the NVMe plugin (new upstream addition).
+- Pass --with-tools to configure, ensuring we keep building the
+  libblockdev tools.
+
+-------------------------------------------------------------------

Old:
----
  libblockdev-2.28.tar.gz
  libblockdev-fix-libkmod-include.patch

New:
----
  NEWS.rst
  libblockdev-3.0.2.tar.gz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ libblockdev.spec ++++++
--- /var/tmp/diff_new_pack.3NJP6z/_old  2023-09-25 19:59:48.390812923 +0200
+++ /var/tmp/diff_new_pack.3NJP6z/_new  2023-09-25 19:59:48.390812923 +0200
@@ -1,7 +1,7 @@
 #
 # spec file for package libblockdev
 #
-# Copyright (c) 2022 SUSE LLC
+# Copyright (c) 2023 SUSE LLC
 #
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed
@@ -16,29 +16,55 @@
 #
 
 
-%define         bcachetools_version 1.0.8
-%define         somajor             2
-%define         libname             %{name}%{somajor}
-%bcond_with     python2
+### PLUGINS ###
+%bcond_without  btrfs_plugin
+%bcond_without  crypto_plugin
+%bcond_without  dm_plugin
+%bcond_with     escrow_plugin
+%bcond_without  fs_plugin
+%bcond_without  loop_plugin
+%bcond_without  lvm_plugin
+%bcond_without  lvmdbus_plugin
+%bcond_without  mdraid_plugin
+%bcond_without  mpath_plugin
+%bcond_with     nvdimm_plugin
+%bcond_without  nvme_plugin
+%bcond_without  part_plugin
+%bcond_without  swap_plugin
+###
+%bcond_without  gi_bindings
+%bcond_without  gtk_doc
+%bcond_without  python_bindings
+%bcond_without  utils
+%bcond_without  tools
+
+%define         soversion  3
 
 Name:           libblockdev
-Version:        2.28
+Version:        3.0.2
 Release:        0
 Summary:        A library for low-level manipulation with block devices
 License:        LGPL-2.1-only
 Group:          Development/Libraries/C and C++
 URL:            https://github.com/storaged-project/libblockdev
-Source0:        
https://github.com/storaged-project/libblockdev/releases/download/%{version}-1/libblockdev-%{version}.tar.gz
-# PATCH-FIX-OPENSUSE libblockdev-fix-libkmod-include.patch 
[email protected] -- openSUSE's libkmod.h file location is not under the 
expected /usr/include directory but /usr/include/kmod.
-Patch0:         libblockdev-fix-libkmod-include.patch
+Source0:        
%{url}/releases/download/%{version}-1/libblockdev-%{version}.tar.gz
+Source1:        %{url}/raw/%{version}-1/NEWS.rst
+
+###############################################################################
+#                          M A I N  P A C K A G E
+###############################################################################
 
-BuildRequires:  dmraid-devel
-BuildRequires:  gobject-introspection-devel >= 1.3.0
+%if %{with gtk_doc}
 BuildRequires:  gtk-doc
+%endif
 BuildRequires:  pkgconfig
-%{?with_python2:BuildRequires: python-devel}
-BuildRequires:  python3-devel
-# There is a s390x plugin that, until vtoc.h is provided, can't be added.
+BuildRequires:  (gcc >= 11 or gcc11)
+BuildRequires:  pkgconfig(ext2fs)
+BuildRequires:  pkgconfig(fdisk)
+BuildRequires:  pkgconfig(libnvme) >= 1.3
+# There is a s390x plugin that, until vtoc.h is provided by s390-tools*, can't
+# be added:
+#   https://github.com/ibm-s390-linux/s390-tools/blob/master/include/lib/vtoc.h
 #BuildRequires:  s390-tools-devel
 BuildRequires:  pkgconfig(blkid) >= 2.23.0
 BuildRequires:  pkgconfig(bytesize) >= 0.1
@@ -47,15 +73,18 @@
 BuildRequires:  pkgconfig(gio-2.0) >= 2.42.2
 BuildRequires:  pkgconfig(glib-2.0) >= 2.42.2
 BuildRequires:  pkgconfig(gobject-2.0) >= 2.42.2
-BuildRequires:  pkgconfig(libcryptsetup) >= 1.6.7
+BuildRequires:  pkgconfig(libcryptsetup) >= 2.3.0
+BuildRequires:  pkgconfig(libkeyutils)
 BuildRequires:  pkgconfig(libkmod) >= 19
 BuildRequires:  pkgconfig(libparted) >= 3.1
 BuildRequires:  pkgconfig(libudev) >= 216
 BuildRequires:  pkgconfig(mount) >= 2.23.0
 BuildRequires:  pkgconfig(yaml-0.1)
-Requires:       %{libname} >= %{version}
+Requires:       libblockdev%{soversion} >= %{version}
+%if %{with tools}
 ### lvm-cache-stats binary needs LVM's plugin to work (boo#1183948) ###
 Requires:       libblockdev-lvm >= %{version}
+%endif
 
 %description
 The LibBlockDev is a C library with GObject introspection support that can be
@@ -66,13 +95,52 @@
 that it is stateless from the storage configuration's perspective (e.g. it has
 no information about VGs when creating an LV).
 
-%package -n     %{libname}
+%files
+%doc NEWS.rst
+%{_bindir}/lvm-cache-stats
+%{_bindir}/vfat-resize
+%dir %{_sysconfdir}/libblockdev
+%dir %{_sysconfdir}/libblockdev/%{soversion}
+%dir %{_sysconfdir}/libblockdev/%{soversion}/conf.d
+%config %{_sysconfdir}/libblockdev/%{soversion}/conf.d/10-lvm-dbus.cfg
+%config %{_sysconfdir}/libblockdev/%{soversion}/conf.d/00-default.cfg
+
+###############################################################################
+#                            D E V E L  F I L E S
+###############################################################################
+
+%package        devel
+Summary:        Development files for the LibBlockDev library
+Group:          Development/Libraries/C and C++
+Requires:       glib2-devel
+Requires:       libblockdev%{soversion} >= %{version}
+
+%description    devel
+This package provides header files, pkg-config modules and API documentation
+needed for development with the LibBlockDev library.
+
+%files devel
+%doc %{_datadir}/gtk-doc/html/libblockdev
+%{_libdir}/libblockdev.so
+%{_libdir}/pkgconfig/blockdev.pc
+%{_datadir}/gir-1.0/BlockDev-%{soversion}.0.gir
+%dir %{_includedir}/blockdev
+%{_includedir}/blockdev/blockdev.h
+%{_includedir}/blockdev/plugins.h
+%{_includedir}/blockdev/logging.h
+%ifarch s390x
+%{_includedir}/blockdev/s390.h
+%endif
+
+###############################################################################
+#                         S H A R E D  L I B R A R Y
+###############################################################################
+
+%package -n     libblockdev%{soversion}
 Summary:        A library for low-level manipulation with block devices
 Group:          System/Libraries
-Obsoletes:      libbd_vdo2 <= 2.26
-Obsoletes:      libblockdev-vdo <= 2.26
 
-%description -n %{libname}
+%description -n libblockdev%{soversion}
 The LibBlockDev is a C library with GObject introspection support that can be
 used for doing low-level operations with block devices like setting up LVM,
 BTRFS, LUKS or MD RAID. The library uses plugins (LVM, BTRFS,...) and serves as
@@ -81,107 +149,154 @@
 that it is stateless from the storage configuration's perspective (e.g. it has
 no information about VGs when creating an LV).
 
-%package -n     typelib-1_0-BlockDev-2_0
-Summary:        Introspection bindings for the LibBlockDev library
+%ldconfig_scriptlets -n libblockdev%{soversion}
+
+%files -n libblockdev%{soversion}
+%license LICENSE
+%{_libdir}/libblockdev.so.%{soversion}
+%{_libdir}/libblockdev.so.%{soversion}.?.?
+%ifarch s390x
+%{_libdir}/libbd_s390.so.%{soversion}
+%{_libdir}/libbd_s390.so.%{soversion}.?.?
+%endif
+
+###############################################################################
+#         G O B J E C T  I N T R O S P E C T I O N  B I N D I N G S
+###############################################################################
+
+%if %{with gi_bindings}
+%package -n     typelib-1_0-BlockDev-%{soversion}_0
+Summary:        GI bindings for the LibBlockDev library
 Group:          System/Libraries
+BuildRequires:  pkgconfig(gobject-introspection-1.0) >= 1.3.0
 
-%description -n typelib-1_0-BlockDev-2_0
+%description -n typelib-1_0-BlockDev-%{soversion}_0
 This package provides the GObject Introspection bindings for LibBlockDev, which
 provides low-level manipulation of block devices.
 
-%package        devel
-Summary:        Development files for the LibBlockDev library
-Group:          Development/Libraries/C and C++
-Requires:       %{libname} >= %{version}
-Requires:       glib2-devel
-Obsoletes:      libbd_vdo-devel  <= 2.26
-Obsoletes:      libblockdev-vdo-devel  <= 2.26
-
-%description    devel
-This package provides header files, pkg-config modules and API documentation 
needed for
-development with the LibBlockDev library.
-
-%package -n     python2-%{name}
-Summary:        Python2 gobject-introspection bindings for the LibBlockDev 
library
-Group:          Development/Libraries/Python
-Requires:       %{libname} >= %{version}
-Requires:       python2-gobject
+%files -n typelib-1_0-BlockDev-%{soversion}_0
+%{_libdir}/girepository-1.0/BlockDev-%{soversion}.0.typelib
 
-%description -n python2-%{name}
-This package contains enhancements to the gobject-introspection bindings for
-LibBlockDev in Python2.
+###############################################################################
+#                     P Y T H O N  3  B I N D I N G S
+###############################################################################
 
+%if %{with python_bindings}
 %package -n     python3-%{name}
-Summary:        Python3 gobject-introspection bindings for the LibBlockDev 
library
+Summary:        Python 3 GI bindings for the LibBlockDev library
 Group:          Development/Libraries/Python
-Requires:       %{libname} >= %{version}
+BuildRequires:  python3-devel
+BuildRequires:  python3-gobject
+
+Requires:       python3-bytesize
 Requires:       python3-gobject
 
 %description -n python3-%{name}
-This package contains enhancements to the gobject-introspection bindings for
-LibBlockDev in Python3.
+This package contains enhancements to the GObject Introspection bindings for
+LibBlockDev, in Python 3.
+
+%files -n python3-%{name}
+%{python3_sitearch}/gi/overrides/BlockDev.py
+%endif
+%endif
 
-%package -n     libbd_btrfs%{somajor}
-Summary:        The BTRFS plugin for the LibBlockDev library
+###############################################################################
+#                           B T R F S  P L U G I N
+###############################################################################
+
+%if %{with btrfs_plugin}
+%package -n     libbd_btrfs%{soversion}
+Summary:        The Btrfs plugin for the LibBlockDev library
 Group:          System/Libraries
-Requires:       libbd_utils%{somajor} >= %{version}
+Requires:       libbd_utils%{soversion} >= %{version}
 Provides:       libblockdev-btrfs = %{version}
 
-%description -n libbd_btrfs%{somajor}
+%description -n libbd_btrfs%{soversion}
 This LibBlockDev library plugin (and, at the same time, a standalone library)
-provides BTRFS-related functionality.
+provides Btrfs-related functionality.
+
+%files -n libbd_btrfs%{soversion} -f btrfs-plugin.filelist
 
 %package -n     libbd_btrfs-devel
 Summary:        Development files for the libbd_btrfs plugin/library
 Group:          Development/Libraries/C and C++
 Requires:       glib2-devel
-Requires:       libbd_btrfs%{somajor} >= %{version}
-Requires:       libbd_utils-devel
+Requires:       libbd_btrfs%{soversion} >= %{version}
+Requires:       libbd_utils-devel >= %{version}
 Provides:       libblockdev-btrfs-devel = %{version}
 
 %description -n libbd_btrfs-devel
 This package contains header files and pkg-config files needed for development
 with the libbd_btrfs plugin/library.
 
-%package -n     libbd_crypto%{somajor}
-Summary:        The crypto plugin for the LibBlockDev library
+%ldconfig_scriptlets -n libbd_btrfs%{soversion}
+
+%files -n libbd_btrfs-devel -f btrfs-plugin-devel.filelist
+%dir %{_includedir}/blockdev
+%endif
+
+###############################################################################
+#                          C R Y P T O  P L U G I N
+###############################################################################
+
+%if %{with crypto_plugin}
+%package -n     libbd_crypto%{soversion}
+Summary:        The Crypto plugin for the LibBlockDev library
 Group:          System/Libraries
+Requires:       libbd_utils%{soversion} >= %{version}
 Provides:       libblockdev-crypto = %{version}
 
-%description -n libbd_crypto%{somajor}
+%description -n libbd_crypto%{soversion}
 This LibBlockDev library plugin (and, at the same time, a standalone library)
 provides functionality related to LUKS-style encrypted devices.
 
+%ldconfig_scriptlets -n libbd_crypto%{soversion}
+
+%files -n libbd_crypto%{soversion} -f crypto-plugin.filelist
+
 %package -n     libbd_crypto-devel
 Summary:        Development files for the libbd_crypto plugin/library
 Group:          Development/Libraries/C and C++
 Requires:       glib2-devel
-Requires:       libbd_crypto%{somajor} >= %{version}
+Requires:       libbd_crypto%{soversion} >= %{version}
 Provides:       libblockdev-crypto-devel = %{version}
 
 %description -n libbd_crypto-devel
 This package contains header files and pkg-config files needed for development
 with the libbd_crypto plugin/library..
 
-%package -n     libbd_dm%{somajor}
+%files -n libbd_crypto-devel -f crypto-plugin-devel.filelist
+%dir %{_includedir}/blockdev
+%endif
+
+###############################################################################
+#                   D E V I C E  M A P P E R  P L U G I N
+###############################################################################
+
+%if %{with dm_plugin}
+%package -n     libbd_dm%{soversion}
 Summary:        The Device Mapper plugin for the LibBlockDev library
 Group:          System/Libraries
 Requires:       device-mapper
 Requires:       dmraid
-Requires:       libbd_utils%{somajor} >= %{version}
+Requires:       libbd_utils%{soversion} >= %{version}
 Provides:       libblockdev-dm = %{version}
 
-%description -n libbd_dm%{somajor}
+%description -n libbd_dm%{soversion}
 This LibBlockDev library plugin (and, at the same time, a standalone library)
 provides functionality related to Device Mapper.
 
+%ldconfig_scriptlets -n libbd_dm%{soversion}
+
+%files -n libbd_dm%{soversion} -f dm-plugin.filelist
+
 %package -n     libbd_dm-devel
 Summary:        Development files for the libbd_dm plugin/library
 Group:          Development/Libraries/C and C++
 Requires:       device-mapper-devel
 Requires:       dmraid-devel
 Requires:       glib2-devel
-Requires:       libbd_dm%{somajor} >= %{version}
+Requires:       libbd_dm%{soversion} >= %{version}
 Requires:       libbd_utils-devel
 Requires:       systemd-devel
 Provides:       libblockdev-dm-devel = %{version}
@@ -190,23 +305,36 @@
 This package contains header files and pkg-config files needed for development
 with the libbd_dm plugin/library..
 
-%package -n     libbd_fs%{somajor}
+%files -n libbd_dm-devel -f dm-plugin-devel.filelist
+%dir %{_includedir}/blockdev
+%endif
+
+###############################################################################
+#                     F I L E  S Y S T E M  P L U G I N
+###############################################################################
+
+%if %{with fs_plugin}
+%package -n     libbd_fs%{soversion}
 Summary:        The FS plugin for the LibBlockDev library
 Group:          System/Libraries
 Requires:       device-mapper
-Requires:       libbd_utils%{somajor} >= %{version}
+Requires:       libbd_utils%{soversion} >= %{version}
 Provides:       libblockdev-fs = %{version}
 
-%description -n libbd_fs%{somajor}
+%description -n libbd_fs%{soversion}
 This LibBlockDev library plugin (and, at the same time, a standalone library)
 provides functionality related to operations with file systems.
 
+%ldconfig_scriptlets -n libbd_fs%{soversion}
+
+%files -n libbd_fs%{soversion} -f fs-plugin.filelist
+
 %package -n     libbd_fs-devel
 Summary:        Development files for the libbd_fs plugin/library
 Group:          Development/Libraries/C and C++
 Requires:       dosfstools
 Requires:       glib2-devel
-Requires:       libbd_fs%{somajor} >= %{version}
+Requires:       libbd_fs%{soversion} >= %{version}
 Requires:       libbd_utils-devel
 Requires:       xfsprogs
 Provides:       libblockdev-fs-devel = %{version}
@@ -215,45 +343,35 @@
 This package contains header files and pkg-config files needed for development
 with the libbd_fs plugin/library..
 
-%package -n     libbd_kbd%{somajor}
-Summary:        The KBD plugin for the LibBlockDev library
-Group:          System/Libraries
-Requires:       bcache-tools >= %{bcachetools_version}
-Requires:       libbd_utils%{somajor} >= %{version}
-Provides:       libblockdev-kbd = %{version}
-
-%description -n libbd_kbd%{somajor}
-This LibBlockDev library plugin (and, at the same time, a standalone library)
-provides functionality related to kernel block devices, namely zRAM and
-Bcache.
-
-%package -n     libbd_kbd-devel
-Summary:        Development files for the libbd_kbd plugin/library
-Group:          Development/Libraries/C and C++
-Requires:       glib2-devel
-Requires:       libbd_kbd%{somajor} >= %{version}
-Requires:       libbd_utils-devel >= %{version}
-Provides:       libblockdev-kbd-devel = %{version}
+%files -n libbd_fs-devel -f fs-plugin-devel.filelist
+%dir %{_includedir}/blockdev
+%dir %{_includedir}/blockdev/fs
+%endif
 
-%description -n libbd_kbd-devel
-This package contains header files and pkg-config files needed for development
-with the libbd_kbd plugin/library..
+###############################################################################
+#                           L O O P  P L U G I N
+###############################################################################
 
-%package -n     libbd_loop%{somajor}
+%if %{with loop_plugin}
+%package -n     libbd_loop%{soversion}
 Summary:        The loop plugin for the LibBlockDev library
 Group:          System/Libraries
-Requires:       libbd_utils%{somajor} >= %{version}
+Requires:       libbd_utils%{soversion} >= %{version}
 Provides:       libblockdev-loop = %{version}
 
-%description -n libbd_loop%{somajor}
+%description -n libbd_loop%{soversion}
 This LibBlockDev library plugin (and, at the same time, a standalone library)
 provides functionality related to loop devices.
 
+%ldconfig_scriptlets -n libbd_loop%{soversion}
+
+%files -n libbd_loop%{soversion} -f loop-plugin.filelist
+
 %package -n     libbd_loop-devel
 Summary:        Development files for the libblockdev-loop plugin/library
 Group:          Development/Libraries/C and C++
 Requires:       glib2-devel
-Requires:       libbd_loop%{somajor} = %{version}
+Requires:       libbd_loop%{soversion} = %{version}
 Requires:       libbd_utils-devel >= %{version}
 Provides:       libblockdev-loop-devel = %{version}
 
@@ -261,24 +379,37 @@
 This package contains header files and pkg-config files needed for development
 with the libbd_loop plugin/library.
 
-%package -n     libbd_lvm%{somajor}
+%files -n libbd_loop-devel -f loop-plugin-devel.filelist
+%dir %{_includedir}/blockdev
+%endif
+
+###############################################################################
+#                            L V M  P L U G I N
+###############################################################################
+
+%if %{with lvm_plugin}
+%package -n     libbd_lvm%{soversion}
 Summary:        The LVM plugin for the LibBlockDev library
 Group:          System/Libraries
-Requires:       libbd_utils%{somajor} >= %{version}
+Requires:       libbd_utils%{soversion} >= %{version}
 Requires:       lvm2
 # For thin_metadata_size.
 Requires:       thin-provisioning-tools
 Provides:       libblockdev-lvm = %{version}
 
-%description -n libbd_lvm%{somajor}
+%description -n libbd_lvm%{soversion}
 This LibBlockDev library plugin (and, at the same time, a standalone library)
 provides LVM-related functionality.
 
+%ldconfig_scriptlets -n libbd_lvm%{soversion}
+
+%files -n libbd_lvm%{soversion} -f lvm-plugin.filelist
+
 %package -n     libbd_lvm-devel
 Summary:        Development files for the libblockdev-lvm plugin/library
 Group:          Development/Libraries/C and C++
 Requires:       glib2-devel
-Requires:       libbd_lvm%{somajor} = %{version}
+Requires:       libbd_lvm%{soversion} = %{version}
 Requires:       libbd_utils-devel >= %{version}
 Provides:       libblockdev-lvm-devel = %{version}
 
@@ -286,24 +417,37 @@
 This package contains header files and pkg-config files needed for development
 with the libbd_lvm plugin/library.
 
-%package -n     libbd_lvm-dbus%{somajor}
+%files -n libbd_lvm-devel -f lvm-plugin-devel.filelist
+%dir %{_includedir}/blockdev
+%endif
+
+###############################################################################
+#                         L V M  D B U S  P L U G I N
+###############################################################################
+
+%if %{with lvmdbus_plugin}
+%package -n     libbd_lvm-dbus%{soversion}
 Summary:        The LVM plugin for the LibBlockDev library
 Group:          System/Libraries
-Requires:       libbd_utils%{somajor} >= %{version}
+Requires:       libbd_utils%{soversion} >= %{version}
 Requires:       lvm2
 # For thin_metadata_size.
 Requires:       thin-provisioning-tools
 Provides:       libblockdev-lvm-dbus = %{version}
 
-%description -n libbd_lvm-dbus%{somajor}
+%description -n libbd_lvm-dbus%{soversion}
 This LibBlockDev library plugin (and, at the same time, a standalone library)
-provides LVM-related functionality utilizing the LVM DBus API.
+provides LVM-related functionality utilizing the LVM D-Bus API.
+
+%ldconfig_scriptlets -n libbd_lvm-dbus%{soversion}
+
+%files -n libbd_lvm-dbus%{soversion} -f lvm-dbus-plugin.filelist
 
 %package -n     libbd_lvm-dbus-devel
 Summary:        Development files for the libblockdev-lvm-dbus plugin/library
 Group:          Development/Libraries/C and C++
 Requires:       glib2-devel
-Requires:       libbd_lvm-dbus%{somajor} = %{version}
+Requires:       libbd_lvm-dbus%{soversion} = %{version}
 Requires:       libbd_lvm-devel >= %{version}
 Requires:       libbd_utils-devel >= %{version}
 Provides:       libblockdev-lvm-dbus-devel = %{version}
@@ -312,22 +456,34 @@
 This package contains header files and pkg-config files needed for development
 with the libbd_lvm-dbus plugin/library.
 
-%package -n     libbd_mdraid%{somajor}
+%files -n libbd_lvm-dbus-devel -f lvm-dbus-plugin-devel.filelist
+%endif
+
+###############################################################################
+#                          M D  R A I D  P L U G I N
+###############################################################################
+
+%if %{with mdraid_plugin}
+%package -n     libbd_mdraid%{soversion}
 Summary:        The MD RAID plugin for the LibBlockDev library
 Group:          System/Libraries
-Requires:       libbd_utils%{somajor} >= %{version}
+Requires:       libbd_utils%{soversion} >= %{version}
 Requires:       mdadm
 Provides:       libblockdev-mdraid = %{version}
 
-%description -n libbd_mdraid%{somajor}
+%description -n libbd_mdraid%{soversion}
 This LibBlockDev library plugin (and, at the same time, a standalone library)
 provides functionality related to MD RAID.
 
+%ldconfig_scriptlets -n libbd_mdraid%{soversion}
+
+%files -n libbd_mdraid%{soversion} -f mdraid-plugin.filelist
+
 %package -n     libbd_mdraid-devel
 Summary:        Development files for the libblockdev-mdraid plugin/library
 Group:          Development/Libraries/C and C++
 Requires:       glib2-devel
-Requires:       libbd_mdraid%{somajor} = %{version}
+Requires:       libbd_mdraid%{soversion} = %{version}
 Requires:       libbd_utils-devel >= %{version}
 Provides:       libblockdev-mdraid-devel = %{version}
 
@@ -335,22 +491,35 @@
 This package contains header files and pkg-config files needed for development
 with the libbd_mdraid plugin/library.
 
-%package -n     libbd_mpath%{somajor}
+%files -n libbd_mdraid-devel -f mdraid-plugin-devel.filelist
+%dir %{_includedir}/blockdev
+%endif
+
+###############################################################################
+#                      M U L T I P A T H  P L U G I N
+###############################################################################
+
+%if %{with mpath_plugin}
+%package -n     libbd_mpath%{soversion}
 Summary:        The multipath plugin for the LibBlockDev library
 Group:          System/Libraries
-Requires:       libbd_utils%{somajor} >= %{version}
+Requires:       libbd_utils%{soversion} >= %{version}
 Requires:       multipath-tools
 Provides:       libblockdev-mpath = %{version}
 
-%description -n libbd_mpath%{somajor}
+%description -n libbd_mpath%{soversion}
 This LibBlockDev library plugin (and, at the same time, a standalone library)
 provides functionality related to multipath devices.
 
+%ldconfig_scriptlets -n libbd_mpath%{soversion}
+
+%files -n libbd_mpath%{soversion} -f mpath-plugin.filelist
+
 %package -n     libbd_mpath-devel
 Summary:        Development files for the libblockdev-mpath plugin/library
 Group:          Development/Libraries/C and C++
 Requires:       glib2-devel
-Requires:       libbd_mpath%{somajor} = %{version}
+Requires:       libbd_mpath%{soversion} = %{version}
 Requires:       libbd_utils-devel >= %{version}
 Provides:       libblockdev-mpath-devel = %{version}
 
@@ -358,23 +527,71 @@
 This package contains header files and pkg-config files needed for development
 with the libbd_mpath plugin/library.
 
-%package -n     libbd_part%{somajor}
+%files -n libbd_mpath-devel -f mpath-plugin-devel.filelist
+%dir %{_includedir}/blockdev
+%endif
+
+###############################################################################
+#                            N V M E  P L U G I N
+###############################################################################
+
+%if %{with nvme_plugin}
+%package -n     libbd_nvme%{soversion}
+Summary:        The NVMe plugin for the LibBlockDev library
+Group:          System/Libraries
+Requires:       libbd_utils%{soversion} >= %{version}
+Provides:       libblockdev-nvme = %{version}
+
+%description -n libbd_nvme%{soversion}
+This LibBlockDev library plugin (and, at the same time, a standalone library)
+provides NVMe-related functionality.
+
+%ldconfig_scriptlets -n libbd_nvme%{soversion}
+
+%files -n libbd_nvme%{soversion} -f nvme-plugin.filelist
+
+%package -n     libbd_nvme-devel
+Summary:        Development files for the libblockdev-nvme plugin/library
+Group:          Development/Libraries/C and C++
+Requires:       glib2-devel
+Requires:       libbd_nvme%{soversion} >= %{version}
+Requires:       libbd_utils-devel
+Provides:       libblockdev-nvme-devel = %{version}
+
+%description -n libbd_nvme-devel
+This package contains header files and pkg-config files needed for development
+with the libbd_nvme plugin/library.
+
+%files -n libbd_nvme-devel -f nvme-plugin-devel.filelist
+%dir %{_includedir}/blockdev
+%endif
+
+###############################################################################
+#                    P A R T I T I O N I N G  P L U G I N
+###############################################################################
+
+%if %{with part_plugin}
+%package -n     libbd_part%{soversion}
 Summary:        The partitioning plugin for the LibBlockDev library
 Group:          System/Libraries
 Requires:       gptfdisk
-Requires:       libbd_utils%{somajor} >= %{version}
+Requires:       libbd_utils%{soversion} >= %{version}
 Requires:       util-linux
 Provides:       libblockdev-part = %{version}
 
-%description -n libbd_part%{somajor}
+%description -n libbd_part%{soversion}
 This LibBlockDev library plugin (and, at the same time, a standalone library)
 provides functionality related to partitioning.
 
+%ldconfig_scriptlets -n libbd_part%{soversion}
+
+%files -n libbd_part%{soversion} -f part-plugin.filelist
+
 %package -n     libbd_part-devel
 Summary:        Development files for the libblockdev-part plugin/library
 Group:          Development/Libraries/C and C++
 Requires:       glib2-devel
-Requires:       libbd_part%{somajor} = %{version}
+Requires:       libbd_part%{soversion} = %{version}
 Requires:       libbd_utils-devel >= %{version}
 Provides:       libblockdev-part-devel = %{version}
 
@@ -382,22 +599,35 @@
 This package contains header files and pkg-config files needed for development
 with the libbd_part plugin/library.
 
-%package -n     libbd_swap%{somajor}
+%files -n libbd_part-devel -f part-plugin-devel.filelist
+%dir %{_includedir}/blockdev
+%endif
+
+###############################################################################
+#                            S W A P  P L U G I N
+###############################################################################
+
+%if %{with swap_plugin}
+%package -n     libbd_swap%{soversion}
 Summary:        The swap plugin for the LibBlockDev library
 Group:          System/Libraries
-Requires:       libbd_utils%{somajor} >= %{version}
+Requires:       libbd_utils%{soversion} >= %{version}
 Requires:       util-linux
 Provides:       libblockdev-swap = %{version}
 
-%description -n libbd_swap%{somajor}
+%description -n libbd_swap%{soversion}
 This LibBlockDev library plugin (and, at the same time, a standalone library)
 provides functionality related to swap devices.
 
+%ldconfig_scriptlets -n libbd_swap%{soversion}
+
+%files -n libbd_swap%{soversion} -f swap-plugin.filelist
+
 %package -n     libbd_swap-devel
 Summary:        Development files for the libblockdev-swap plugin/library
 Group:          Development/Libraries/C and C++
 Requires:       glib2-devel
-Requires:       libbd_swap%{somajor} = %{version}
+Requires:       libbd_swap%{soversion} = %{version}
 Requires:       libbd_utils-devel >= %{version}
 Provides:       libblockdev-swap-devel = %{version}
 
@@ -405,256 +635,120 @@
 This package contains header files and pkg-config files needed for development
 with the libbd_swap plugin/library.
 
-%package -n     libbd_utils%{somajor}
+%files -n libbd_swap-devel -f swap-plugin-devel.filelist
+%dir %{_includedir}/blockdev
+%endif
+
+###############################################################################
+#                        U T I L I T Y  L I B R A R Y
+###############################################################################
+
+%if %{with utils}
+%package -n     libbd_utils%{soversion}
 Summary:        Utility functions library for the LibBlockDev library
 Group:          System/Libraries
+Provides:       libblockdev-utils = %{version}
+
+%description -n libbd_utils%{soversion}
+This library provides utility functions used by the LibBlockDev library
+and its plugins.
+
+%ldconfig_scriptlets -n libbd_utils%{soversion}
 
-%description -n libbd_utils%{somajor}
-libbd_utils is a library providing utility functions used by the
-LibBlockDev library and its plugins.
+%files -n libbd_utils%{soversion} -f utils-plugin.filelist
 
 %package -n     libbd_utils-devel
-Summary:        Development files for libbd_utils
+Summary:        Development files for libblockdev-utils
 Group:          Development/Libraries/C and C++
 Requires:       glib2-devel
-Requires:       libbd_utils%{somajor} >= %{version}
+Requires:       libbd_utils%{soversion} >= %{version}
+Provides:       libblockdev-utils-devel = %{version}
 
 %description -n libbd_utils-devel
 This package contains header files and pkg-config files needed for development
 with the libbd_utils library.
 
+%files -n libbd_utils-devel -f utils-plugin-devel.filelist
+%{_libdir}/pkgconfig/blockdev-utils.pc
+%dir %{_includedir}/blockdev
+%{_includedir}/blockdev/{dbus,dev_utils,exec,extra_arg,module,sizes}.h
+%endif
+
+###############################################################################
+
 %prep
 %autosetup -p1
+# Place NEWS.rst in the source tree for %%doc'ing it later.
+install -m 644 -t . %{SOURCE1}
 
 %build
-export CFLAGS="%{optflags} -Wno-deprecated-declarations"
+# A bit of auto magic for exporting the CC variable when we don't have a
+# /usr/bin/cc symlink to a gcc >= 11
+if [ ! -f %{_bindir}/cc ]; then
+    %define __gcc %(ls -1 %{_bindir}/gcc-[0-9][0-9] | tail -1)
+    export CC=%{__gcc}
+fi
 %configure \
         --disable-static \
-        --enable-introspection \
-        --with-bcache \
-        --with-btrfs \
-        --with-crypto \
-        --with-dm \
-        --with-dmraid \
-        --with-fs \
-        --with-gtk-doc \
-        --with-kbd \
-        --with-loop \
-        --with-lvm \
-        --with-lvm_dbus \
-        --with-mdraid \
-        --with-mpath \
-        --with-part \
-        --with-swap \
-        --without-vdo \
-        --without-escrow \
-        --without-nvdimm \
-        %{nil}
+    --with%{!?with_btrfs_plugin:out}-btrfs \
+    --with%{!?with_crypto_plugin:out}-crypto \
+    --with%{!?with_dm_plugin:out}-dm \
+    --with%{!?with_escrow_plugin:out}-escrow \
+    --with%{!?with_fs_plugin:out}-fs \
+    --with%{!?with_gtk_doc:out}-gtk-doc \
+    --%{?with_gi_bindings:en}%{!?with_gi_bindings:dis}able-introspection \
+    --with%{!?with_tools:out}-tools \
+    --with%{!?with_nvdimm_plugin:out}-nvdimm \
+    --with%{!?with_nvme_plugin:out}-nvme \
+    --with%{!?with_loop_plugin:out}-loop \
+    --with%{!?with_lvm_plugin:out}-lvm \
+    --with%{!?with_lvmdbus_plugin:out}-lvm-dbus \
+    --with%{!?with_mdraid_plugin:out}-mdraid \
+    --with%{!?with_mpath_plugin:out}-mpath \
+    --with%{!?with_part_plugin:out}-part \
+    --with%{!?with_swap_plugin:out}-swap \
+    ;
+
 %make_build
 
 %install
 %make_install
 find %{buildroot} -name "*.la" -print -type f -delete
 
-%post -n %{libname} -p /sbin/ldconfig
-%postun -n %{libname} -p /sbin/ldconfig
-
-%post   -n libbd_btrfs%{somajor} -p /sbin/ldconfig
-%postun -n libbd_btrfs%{somajor} -p /sbin/ldconfig
-
-%post   -n libbd_crypto%{somajor} -p /sbin/ldconfig
-%postun -n libbd_crypto%{somajor} -p /sbin/ldconfig
-
-%post   -n libbd_dm%{somajor} -p /sbin/ldconfig
-%postun -n libbd_dm%{somajor} -p /sbin/ldconfig
-
-%post   -n libbd_fs%{somajor} -p /sbin/ldconfig
-%postun -n libbd_fs%{somajor} -p /sbin/ldconfig
-
-%post   -n libbd_kbd%{somajor} -p /sbin/ldconfig
-%postun -n libbd_kbd%{somajor} -p /sbin/ldconfig
-
-%post   -n libbd_loop%{somajor} -p /sbin/ldconfig
-%postun -n libbd_loop%{somajor} -p /sbin/ldconfig
-
-%post   -n libbd_lvm%{somajor} -p /sbin/ldconfig
-%postun -n libbd_lvm%{somajor} -p /sbin/ldconfig
-
-%post   -n libbd_lvm-dbus%{somajor} -p /sbin/ldconfig
-%postun -n libbd_lvm-dbus%{somajor} -p /sbin/ldconfig
-
-%post   -n libbd_mdraid%{somajor} -p /sbin/ldconfig
-%postun -n libbd_mdraid%{somajor} -p /sbin/ldconfig
-
-%post   -n libbd_mpath%{somajor} -p /sbin/ldconfig
-%postun -n libbd_mpath%{somajor} -p /sbin/ldconfig
-
-%post   -n libbd_part%{somajor} -p /sbin/ldconfig
-%postun -n libbd_part%{somajor} -p /sbin/ldconfig
-
-%post   -n libbd_swap%{somajor} -p /sbin/ldconfig
-%postun -n libbd_swap%{somajor} -p /sbin/ldconfig
-
-%post   -n libbd_utils%{somajor} -p /sbin/ldconfig
-%postun -n libbd_utils%{somajor} -p /sbin/ldconfig
-
-%files
-%dir %{_sysconfdir}/libblockdev
-%dir %{_sysconfdir}/libblockdev/conf.d
-%config %{_sysconfdir}/libblockdev/conf.d/00-default.cfg
-%{_bindir}/lvm-cache-stats
-
-%files -n %{libname}
-%license LICENSE
-%{_libdir}/libblockdev.so.%{somajor}*
-%ifarch s390x
-%{_libdir}/libbd_s390.so*
-%endif
-
-%files -n typelib-1_0-BlockDev-2_0
-%{_libdir}/girepository-1.0/BlockDev-2.0.typelib
+%{?with_btrfs_plugin:   %global plugins %{?plugins} btrfs}
+%{?with_crypto_plugin:  %global plugins %{?plugins} crypto}
+%{?with_dm_plugin:      %global plugins %{?plugins} dm}
+%{?with_escrow_plugin:  %global plugins %{?plugins} escrow}
+%{?with_fs_plugin:      %global plugins %{?plugins} fs}
+%{?with_nvdimm_plugin:  %global plugins %{?plugins} nvdimm}
+%{?with_nvme_plugin:    %global plugins %{?plugins} nvme}
+%{?with_loop_plugin:    %global plugins %{?plugins} loop}
+%{?with_lvm_plugin:     %global plugins %{?plugins} lvm}
+%{?with_lvmdbus_plugin: %global plugins %{?plugins} lvm-dbus}
+%{?with_mdraid_plugin:  %global plugins %{?plugins} mdraid}
+%{?with_mpath_plugin:   %global plugins %{?plugins} mpath}
+%{?with_part_plugin:    %global plugins %{?plugins} part}
+%{?with_swap_plugin:    %global plugins %{?plugins} swap}
+%{?with_utils:          %global plugins %{?plugins} utils}
+
+echo %{?plugins}
+
+for plugin in %{?plugins}; do
+  ls -1 %{buildroot}%{_libdir}/libbd_${plugin}.so.%{soversion}* \
+    > ${plugin}-plugin.filelist
+  ls -1 %{buildroot}%{_libdir}/libbd_${plugin}.so \
+    > ${plugin}-plugin-devel.filelist
+
+  test "${plugin}" = lvm-dbus && continue
+
+  ls -1 %{buildroot}%{_includedir}/blockdev/${plugin}.h \
+    >> ${plugin}-plugin-devel.filelist
+
+  if [ "${plugin}" = fs ]; then
+    ls -1 %{buildroot}%{_includedir}/blockdev/${plugin}/* \
+      >> ${plugin}-plugin-devel.filelist
+  fi
+done
 
-%files devel
-%doc features.rst specs.rst
-%doc %{_datadir}/gtk-doc/html/libblockdev
-%{_libdir}/libblockdev.so
-%{_libdir}/pkgconfig/blockdev.pc
-%{_datadir}/gir-1.0/BlockDev-2.0.gir
-%dir %{_includedir}/blockdev
-%{_includedir}/blockdev/blockdev.h
-%{_includedir}/blockdev/plugins.h
-%ifarch s390x
-%{_includedir}/blockdev/s390.h
-%endif
-
-%if %{with python2}
-%files -n python2-%{name}
-%dir %{python2_sitearch}/gi
-%dir %{python2_sitearch}/gi/overrides
-%{python2_sitearch}/gi/overrides/BlockDev.py
-%endif
-
-%files -n python3-%{name}
-%dir %{python3_sitearch}/gi
-%dir %{python3_sitearch}/gi/overrides
-%{python3_sitearch}/gi/overrides/BlockDev.py
-
-%files -n libbd_btrfs%{somajor}
-%{_libdir}/libbd_btrfs.so.%{somajor}*
-
-%files -n libbd_btrfs-devel
-%{_libdir}/libbd_btrfs.so
-%dir %{_includedir}/blockdev
-%{_includedir}/blockdev/btrfs.h
-
-%files -n libbd_crypto%{somajor}
-%{_libdir}/libbd_crypto.so.%{somajor}*
-
-%files -n libbd_crypto-devel
-%{_libdir}/libbd_crypto.so
-%dir %{_includedir}/blockdev
-%{_includedir}/blockdev/crypto.h
-
-%files -n libbd_dm%{somajor}
-%{_libdir}/libbd_dm.so.%{somajor}*
-
-%files -n libbd_dm-devel
-%{_libdir}/libbd_dm.so
-%dir %{_includedir}/blockdev
-%{_includedir}/blockdev/dm.h
-
-%files -n libbd_fs%{somajor}
-%{_libdir}/libbd_fs.so.%{somajor}*
-
-%files -n libbd_fs-devel
-%{_libdir}/libbd_fs.so
-%dir %{_includedir}/blockdev
-%dir %{_includedir}/blockdev/fs
-%{_includedir}/blockdev/fs.h
-%{_includedir}/blockdev/fs/ext.h
-%{_includedir}/blockdev/fs/generic.h
-%{_includedir}/blockdev/fs/mount.h
-%{_includedir}/blockdev/fs/ntfs.h
-%{_includedir}/blockdev/fs/vfat.h
-%{_includedir}/blockdev/fs/xfs.h
-
-%files -n libbd_kbd%{somajor}
-%{_libdir}/libbd_kbd.so.%{somajor}*
-
-%files -n libbd_kbd-devel
-%{_libdir}/libbd_kbd.so
-%dir %{_includedir}/blockdev
-%{_includedir}/blockdev/kbd.h
-
-%files -n libbd_loop%{somajor}
-%{_libdir}/libbd_loop.so.%{somajor}*
-
-%files -n libbd_loop-devel
-%{_libdir}/libbd_loop.so
-%dir %{_includedir}/blockdev
-%{_includedir}/blockdev/loop.h
-
-%files -n libbd_lvm%{somajor}
-%{_libdir}/libbd_lvm.so.%{somajor}*
-
-%files -n libbd_lvm-devel
-%{_libdir}/libbd_lvm.so
-%dir %{_includedir}/blockdev
-%{_includedir}/blockdev/lvm.h
-
-%files -n libbd_lvm-dbus%{somajor}
-%{_libdir}/libbd_lvm-dbus.so.%{somajor}*
-%config %{_sysconfdir}/libblockdev/conf.d/10-lvm-dbus.cfg
-
-%files -n libbd_lvm-dbus-devel
-%{_libdir}/libbd_lvm-dbus.so
-
-%files -n libbd_mdraid%{somajor}
-%{_libdir}/libbd_mdraid.so.%{somajor}*
-
-%files -n libbd_mdraid-devel
-%{_libdir}/libbd_mdraid.so
-%dir %{_includedir}/blockdev
-%{_includedir}/blockdev/mdraid.h
-
-%files -n libbd_mpath%{somajor}
-%{_libdir}/libbd_mpath.so.%{somajor}*
-
-%files -n libbd_mpath-devel
-%{_libdir}/libbd_mpath.so
-%dir %{_includedir}/blockdev
-%{_includedir}/blockdev/mpath.h
-
-%files -n libbd_part%{somajor}
-%{_libdir}/libbd_part.so.%{somajor}*
-
-%files -n libbd_part-devel
-%{_libdir}/libbd_part.so
-%dir %{_includedir}/blockdev
-%{_includedir}/blockdev/part.h
-
-%files -n libbd_swap%{somajor}
-%{_libdir}/libbd_swap.so.%{somajor}*
-
-%files -n libbd_swap-devel
-%{_libdir}/libbd_swap.so
-%dir %{_includedir}/blockdev
-%{_includedir}/blockdev/swap.h
-
-%files -n libbd_utils%{somajor}
-%{_libdir}/libbd_part_err.so.%{somajor}*
-%{_libdir}/libbd_utils.so.%{somajor}*
-
-%files -n libbd_utils-devel
-%{_libdir}/libbd_utils.so
-%{_libdir}/libbd_part_err.so
-%{_libdir}/pkgconfig/blockdev-utils.pc
-%dir %{_includedir}/blockdev
-%{_includedir}/blockdev/dbus.h
-%{_includedir}/blockdev/dev_utils.h
-%{_includedir}/blockdev/exec.h
-%{_includedir}/blockdev/extra_arg.h
-%{_includedir}/blockdev/module.h
-%{_includedir}/blockdev/sizes.h
-%{_includedir}/blockdev/utils.h
+sed -i -r 's,%{buildroot}(.*),\1,' ./*.filelist
 

++++++ NEWS.rst ++++++
++++ 1163 lines (skipped)

++++++ libblockdev-2.28.tar.gz -> libblockdev-3.0.2.tar.gz ++++++
++++ 97189 lines of diff (skipped)

Reply via email to