diff --git a/libblockdev-2.28.tar.gz b/libblockdev-2.28.tar.gz deleted file mode 100644 index fe1a980d63e85c2e38fa4b02211354f23fcadff3..0000000000000000000000000000000000000000 Binary files a/libblockdev-2.28.tar.gz and /dev/null differ diff --git a/libblockdev-3.0.4.tar.gz b/libblockdev-3.0.4.tar.gz new file mode 100644 index 0000000000000000000000000000000000000000..8644904777529ba67a958143dc5f1c0640530e3c Binary files /dev/null and b/libblockdev-3.0.4.tar.gz differ diff --git a/libblockdev.spec b/libblockdev.spec index 7b0d11696e1db50bcf23d38395415fe34649f6a9..0d65ef081646979688e80225196ae69c3bfc329d 100644 --- a/libblockdev.spec +++ b/libblockdev.spec @@ -1,7 +1,7 @@ -%define anolis_release 3 +%define anolis_release 1 +%define with_python3 1 %define with_gtk_doc 1 -%define with_bcache 0 %define with_btrfs 0 %define with_crypto 1 %define with_dm 1 @@ -11,23 +11,13 @@ %define with_mdraid 1 %define with_mpath 1 %define with_swap 1 -%define with_kbd 1 %define with_part 1 %define with_fs 1 %define with_nvdimm 1 -%define with_vdo 0 %define with_gi 1 %define with_escrow 1 -%define with_dmraid 0 %define with_tools 1 - -%if %{with_bcache} == 0 -%define bcache_copts --without-bcache -%endif - -%if %{with_vdo} == 0 -%define vdo_copts --without-vdo -%endif +%define with_nvme 1 %if %{with_btrfs} != 1 %define btrfs_copts --without-btrfs @@ -42,9 +32,6 @@ %if %{with_dm} != 1 %define dm_copts --without-dm %else -%if %{with_dmraid} != 1 -%define dm_copts --without-dmraid -%endif %endif %if %{with_loop} != 1 %define loop_copts --without-loop @@ -64,9 +51,6 @@ %if %{with_swap} != 1 %define swap_copts --without-swap %endif -%if %{with_kbd} != 1 -%define kbd_copts --without-kbd -%endif %if %{with_part} != 1 %define part_copts --without-part %endif @@ -76,38 +60,48 @@ %if %{with_nvdimm} != 1 %define nvdimm_copts --without-nvdimm %endif -%if %{with_vdo} != 1 -%define vdo_copts --without-vdo -%endif %if %{with_tools} != 1 %define tools_copts --without-tools %endif %if %{with_gi} != 1 %define gi_copts --disable-introspection %endif +%if %{with_nvme} != 1 +%define nvme_copts --without-nvme +%endif -%define configure_opts %{?bcache_copts} %{?lvm_dbus_copts} %{?btrfs_copts} %{?crypto_copts} %{?dm_copts} %{?loop_copts} %{?lvm_copts} %{?lvm_dbus_copts} %{?mdraid_copts} %{?mpath_copts} %{?swap_copts} %{?kbd_copts} %{?part_copts} %{?fs_copts} %{?nvdimm_copts} %{?vdo_copts} %{?tools_copts} %{?gi_copts} +%define configure_opts %{?python3_copts} %{?lvm_dbus_copts} %{?btrfs_copts} %{?crypto_copts} %{?dm_copts} %{?loop_copts} %{?lvm_copts} %{?lvm_dbus_copts} %{?mdraid_copts} %{?mpath_copts} %{?swap_copts} %{?part_copts} %{?fs_copts} %{?nvdimm_copts} %{?tools_copts} %{?gi_copts} %{?nvme_copts} Name: libblockdev -Version: 2.28 +Version: 3.0.4 Release: %{anolis_release}%{?dist} Summary: A library for low-level manipulation with block devices -License: LGPLv2+ +License: LGPL-2.1-or-later URL: https://github.com/storaged-project/libblockdev -Source0: https://github.com/storaged-project/libblockdev/releases/download/%{version}-%{release}/%{name}-%{version}.tar.gz +Source0: https://github.com/storaged-project/libblockdev/releases/download/%{version}-1/%{name}-%{version}.tar.gz BuildRequires: make BuildRequires: glib2-devel %if %{with_gi} BuildRequires: gobject-introspection-devel %endif +%if %{with_python3} BuildRequires: python3-devel +%endif %if %{with_gtk_doc} BuildRequires: gtk-doc %endif BuildRequires: glib2-doc BuildRequires: autoconf-archive +# obsolete removed subpackages to allow upgrades +Provides: libblockdev-kbd = %{version}-%{release} +Obsoletes: libblockdev-kbd < %{version}-%{release} +Provides: libblockdev-vdo = %{version}-%{release} +Obsoletes: libblockdev-vdo < %{version}-%{release} + +Requires: %{name}-utils = %{version}-%{release} + %description 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, @@ -120,21 +114,31 @@ no information about VGs when creating an LV). %package devel Summary: Development files for libblockdev Requires: %{name} = %{version}-%{release} +Requires: %{name}-utils-devel = %{version}-%{release} Requires: glib2-devel +# obsolete removed devel subpackages to allow upgrades +Provides: libblockdev-kbd-devel = %{version}-%{release} +Obsoletes: libblockdev-kbd-devel < %{version}-%{release} +Provides: libblockdev-vdo-devel = %{version}-%{release} +Obsoletes: libblockdev-vdo-devel < %{version}-%{release} + %description devel This package contains header files and pkg-config files needed for development with the libblockdev library. +%if %{with_python3} %package -n python3-blockdev Summary: Python3 gobject-introspection bindings for libblockdev Requires: %{name} = %{version}-%{release} Requires: python3-gobject-base +Requires: python3-bytesize %{?python_provide:%python_provide python3-blockdev} %description -n python3-blockdev This package contains enhancements to the gobject-introspection bindings for libblockdev in Python3. +%endif %package utils BuildRequires: kmod-devel @@ -158,7 +162,7 @@ with the libblockdev-utils library. %package btrfs BuildRequires: libbytesize-devel Summary: The BTRFS plugin for the libblockdev library -Requires: %{name}-utils >= 0.11 +Requires: %{name}-utils = %{version}-%{release} Requires: btrfs-progs %description btrfs @@ -169,7 +173,7 @@ providing the BTRFS-related functionality. Summary: Development files for the libblockdev-btrfs plugin/library Requires: %{name}-btrfs = %{version}-%{release} Requires: glib2-devel -Requires: %{name}-utils-devel +Requires: %{name}-utils-devel = %{version}-%{release} %description btrfs-devel This package contains header files and pkg-config files needed for development @@ -179,8 +183,10 @@ with the libblockdev-btrfs plugin/library. %if %{with_crypto} %package crypto -BuildRequires: cryptsetup-devel +Requires: %{name}-utils = %{version}-%{release} +BuildRequires: cryptsetup-devel >= 2.3.0 BuildRequires: libblkid-devel +BuildRequires: keyutils-libs-devel %if %{with_escrow} BuildRequires: volume_key-devel >= 0.3.9-7 @@ -196,6 +202,7 @@ providing the functionality related to encrypted devices (LUKS). %package crypto-devel Summary: Development files for the libblockdev-crypto plugin/library Requires: %{name}-crypto = %{version}-%{release} +Requires: %{name}-utils-devel = %{version}-%{release} Requires: glib2-devel %description crypto-devel @@ -207,16 +214,10 @@ with the libblockdev-crypto plugin/library. %if %{with_dm} %package dm BuildRequires: device-mapper-devel -%if %{with_dmraid} -BuildRequires: dmraid-devel -%endif BuildRequires: systemd-devel Summary: The Device Mapper plugin for the libblockdev library -Requires: %{name}-utils >= 0.11 +Requires: %{name}-utils = %{version}-%{release} Requires: device-mapper -%if %{with_dmraid} -Requires: dmraid -%endif %description dm The libblockdev library plugin (and in the same time a standalone library) @@ -228,10 +229,7 @@ Requires: %{name}-dm = %{version}-%{release} Requires: glib2-devel Requires: device-mapper-devel Requires: systemd-devel -%if %{with_dmraid} -Requires: dmraid-devel -%endif -Requires: %{name}-utils-devel +Requires: %{name}-utils-devel = %{version}-%{release} %description dm-devel This package contains header files and pkg-config files needed for development @@ -241,11 +239,12 @@ with the libblockdev-dm plugin/library. %if %{with_fs} %package fs -BuildRequires: parted-devel BuildRequires: libblkid-devel BuildRequires: libmount-devel +BuildRequires: libuuid-devel +BuildRequires: e2fsprogs-devel Summary: The FS plugin for the libblockdev library -Requires: %{name}-utils >= 0.11 +Requires: %{name}-utils = %{version}-%{release} %description fs The libblockdev library plugin (and in the same time a standalone library) @@ -254,10 +253,8 @@ providing the functionality related to operations with file systems. %package fs-devel Summary: Development files for the libblockdev-fs plugin/library Requires: %{name}-fs = %{version}-%{release} -Requires: %{name}-utils-devel +Requires: %{name}-utils-devel = %{version}-%{release} Requires: glib2-devel -Requires: xfsprogs -Requires: dosfstools %description fs-devel This package contains header files and pkg-config files needed for development @@ -265,36 +262,10 @@ with the libblockdev-fs plugin/library. %endif -%if %{with_kbd} -%package kbd -BuildRequires: libbytesize-devel -Summary: The KBD plugin for the libblockdev library -Requires: %{name}-utils >= 0.11 -%if %{with_bcache} -Requires: bcache-tools >= 1.0.8 -%endif - -%description kbd -The libblockdev library plugin (and in the same time a standalone library) -providing the functionality related to kernel block devices (namely zRAM and -Bcache). - -%package kbd-devel -Summary: Development files for the libblockdev-kbd plugin/library -Requires: %{name}-kbd = %{version}-%{release} -Requires: %{name}-utils-devel -Requires: glib2-devel - -%description kbd-devel -This package contains header files and pkg-config files needed for development -with the libblockdev-kbd plugin/library. -%endif - - %if %{with_loop} %package loop Summary: The loop plugin for the libblockdev library -Requires: %{name}-utils >= 0.11 +Requires: %{name}-utils = %{version}-%{release} %description loop The libblockdev library plugin (and in the same time a standalone library) @@ -303,7 +274,7 @@ providing the functionality related to loop devices. %package loop-devel Summary: Development files for the libblockdev-loop plugin/library Requires: %{name}-loop = %{version}-%{release} -Requires: %{name}-utils-devel +Requires: %{name}-utils-devel = %{version}-%{release} Requires: glib2-devel %description loop-devel @@ -316,7 +287,7 @@ with the libblockdev-loop plugin/library. %package lvm BuildRequires: device-mapper-devel Summary: The LVM plugin for the libblockdev library -Requires: %{name}-utils >= 0.11 +Requires: %{name}-utils = %{version}-%{release} Requires: lvm2 %description lvm @@ -326,7 +297,7 @@ providing the LVM-related functionality. %package lvm-devel Summary: Development files for the libblockdev-lvm plugin/library Requires: %{name}-lvm = %{version}-%{release} -Requires: %{name}-utils-devel +Requires: %{name}-utils-devel = %{version}-%{release} Requires: glib2-devel %description lvm-devel @@ -338,7 +309,7 @@ with the libblockdev-lvm plugin/library. %package lvm-dbus BuildRequires: device-mapper-devel Summary: The LVM plugin for the libblockdev library -Requires: %{name}-utils >= 1.4 +Requires: %{name}-utils = %{version}-%{release} Requires: lvm2-dbusd >= 2.02.156 %description lvm-dbus @@ -348,7 +319,7 @@ providing the LVM-related functionality utilizing the LVM DBus API. %package lvm-dbus-devel Summary: Development files for the libblockdev-lvm-dbus plugin/library Requires: %{name}-lvm-dbus = %{version}-%{release} -Requires: %{name}-utils-devel >= 1.4 +Requires: %{name}-utils-devel = %{version}-%{release} Requires: glib2-devel %description lvm-dbus-devel @@ -361,7 +332,7 @@ with the libblockdev-lvm-dbus plugin/library. %package mdraid BuildRequires: libbytesize-devel Summary: The MD RAID plugin for the libblockdev library -Requires: %{name}-utils >= 0.11 +Requires: %{name}-utils = %{version}-%{release} Requires: mdadm %description mdraid @@ -371,7 +342,7 @@ providing the functionality related to MD RAID. %package mdraid-devel Summary: Development files for the libblockdev-mdraid plugin/library Requires: %{name}-mdraid = %{version}-%{release} -Requires: %{name}-utils-devel +Requires: %{name}-utils-devel = %{version}-%{release} Requires: glib2-devel %description mdraid-devel @@ -384,7 +355,7 @@ with the libblockdev-mdraid plugin/library. %package mpath BuildRequires: device-mapper-devel Summary: The multipath plugin for the libblockdev library -Requires: %{name}-utils >= 0.11 +Requires: %{name}-utils = %{version}-%{release} Recommends: device-mapper-multipath %description mpath @@ -394,7 +365,7 @@ providing the functionality related to multipath devices. %package mpath-devel Summary: Development files for the libblockdev-mpath plugin/library Requires: %{name}-mpath = %{version}-%{release} -Requires: %{name}-utils-devel +Requires: %{name}-utils-devel = %{version}-%{release} Requires: glib2-devel %description mpath-devel @@ -407,7 +378,7 @@ with the libblockdev-mpath plugin/library. BuildRequires: ndctl-devel BuildRequires: libuuid-devel Summary: The NVDIMM plugin for the libblockdev library -Requires: %{name}-utils >= 0.11 +Requires: %{name}-utils = %{version}-%{release} Requires: ndctl %description nvdimm @@ -417,7 +388,7 @@ providing the functionality related to operations with NVDIMM devices. %package nvdimm-devel Summary: Development files for the libblockdev-nvdimm plugin/library Requires: %{name}-nvdimm = %{version}-%{release} -Requires: %{name}-utils-devel +Requires: %{name}-utils-devel = %{version}-%{release} Requires: glib2-devel %description nvdimm-devel @@ -426,12 +397,34 @@ with the libblockdev-nvdimm plugin/library. %endif +%if %{with_nvme} +%package nvme +BuildRequires: libnvme-devel +BuildRequires: libuuid-devel +Summary: The NVMe plugin for the libblockdev library +Requires: %{name}-utils = %{version}-%{release} + +%description nvme +The libblockdev library plugin (and in the same time a standalone library) +providing the functionality related to operations with NVMe devices. + +%package nvme-devel +Summary: Development files for the libblockdev-nvme plugin/library +Requires: %{name}-nvme = %{version}-%{release} +Requires: %{name}-utils-devel = %{version}-%{release} +Requires: glib2-devel + +%description nvme-devel +This package contains header files and pkg-config files needed for development +with the libblockdev-nvme plugin/library. +%endif + + %if %{with_part} %package part -BuildRequires: parted-devel +BuildRequires: libfdisk-devel Summary: The partitioning plugin for the libblockdev library -Requires: %{name}-utils >= 0.11 -Requires: gdisk +Requires: %{name}-utils = %{version}-%{release} Requires: util-linux %description part @@ -441,7 +434,7 @@ providing the functionality related to partitioning. %package part-devel Summary: Development files for the libblockdev-part plugin/library Requires: %{name}-part = %{version}-%{release} -Requires: %{name}-utils-devel +Requires: %{name}-utils-devel = %{version}-%{release} Requires: glib2-devel %description part-devel @@ -454,7 +447,7 @@ with the libblockdev-part plugin/library. %package swap BuildRequires: libblkid-devel Summary: The swap plugin for the libblockdev library -Requires: %{name}-utils >= 0.11 +Requires: %{name}-utils = %{version}-%{release} Requires: util-linux %description swap @@ -464,7 +457,7 @@ providing the functionality related to swap devices. %package swap-devel Summary: Development files for the libblockdev-swap plugin/library Requires: %{name}-swap = %{version}-%{release} -Requires: %{name}-utils-devel +Requires: %{name}-utils-devel = %{version}-%{release} Requires: glib2-devel %description swap-devel @@ -472,40 +465,13 @@ This package contains header files and pkg-config files needed for development with the libblockdev-swap plugin/library. %endif - -%if %{with_vdo} -%package vdo -BuildRequires: libbytesize-devel -BuildRequires: libyaml-devel -Summary: The vdo plugin for the libblockdev library -Requires: %{name}-utils >= 0.11 - -# we want to build the plugin everywhere but the dependencies might not be -# available so just use weak dependency -Recommends: vdo -Recommends: kmod-kvdo - -%description vdo -The libblockdev library plugin (and in the same time a standalone library) -providing the functionality related to VDO devices. - -%package vdo-devel -Summary: Development files for the libblockdev-vdo plugin/library -Requires: %{name}-vdo = %{version}-%{release} -Requires: %{name}-utils-devel -Requires: glib2-devel - -%description vdo-devel -This package contains header files and pkg-config files needed for development -with the libblockdev-vdo plugin/library. -%endif - %if %{with_tools} %package tools Summary: Various nice tools based on libblockdev -Requires: %{name} -Requires: %{name}-lvm +Requires: %{name} = %{version}-%{release} +Requires: %{name}-lvm = %{version}-%{release} BuildRequires: libbytesize-devel +BuildRequires: parted-devel %if %{with_lvm_dbus} == 1 Recommends: %{name}-lvm-dbus %endif @@ -535,10 +501,6 @@ Requires: %{name}-dm = %{version}-%{release} Requires: %{name}-fs = %{version}-%{release} %endif -%if %{with_kbd} -Requires: %{name}-kbd = %{version}-%{release} -%endif - %if %{with_loop} Requires: %{name}-loop = %{version}-%{release} %endif @@ -559,6 +521,10 @@ Requires: %{name}-mpath = %{version}-%{release} Requires: %{name}-nvdimm = %{version}-%{release} %endif +%if %{with_nvme} +Requires: %{name}-nvme = %{version}-%{release} +%endif + %if %{with_part} Requires: %{name}-part = %{version}-%{release} %endif @@ -567,10 +533,6 @@ Requires: %{name}-part = %{version}-%{release} Requires: %{name}-swap = %{version}-%{release} %endif -%if %{with_vdo} -Requires: %{name}-vdo = %{version}-%{release} -%endif - %description plugins-all A meta-package that pulls all the libblockdev plugins as dependencies. @@ -583,7 +545,7 @@ BuildArch: noarch The %{name}-doc package contains documentation files for %{name}. %prep -%setup -q -n %{name}-%{version} +%autosetup -n %{name}-%{version} -p1 %build autoreconf -ivf @@ -639,6 +601,10 @@ find %{buildroot} -type f -name "*.la" | xargs %{__rm} %ldconfig_scriptlets nvdimm %endif +%if %{with_nvme} +%ldconfig_scriptlets nvme +%endif + %if %{with_part} %ldconfig_scriptlets part %endif @@ -647,15 +613,6 @@ find %{buildroot} -type f -name "*.la" | xargs %{__rm} %ldconfig_scriptlets swap %endif -%if %{with_vdo} -%ldconfig_scriptlets vdo -%endif - -%if %{with_kbd} -%ldconfig_scriptlets kbd -%endif - - %files %{!?_licensedir:%global license %%doc} %license LICENSE @@ -666,11 +623,10 @@ find %{buildroot} -type f -name "*.la" | xargs %{__rm} %dir %{abidir} %{abidir}/libblockdev.dump %dir %{_sysconfdir}/libblockdev -%dir %{_sysconfdir}/libblockdev/conf.d -%config %{_sysconfdir}/libblockdev/conf.d/00-default.cfg +%dir %{_sysconfdir}/libblockdev/3/conf.d +%config %{_sysconfdir}/libblockdev/3/conf.d/00-default.cfg %files devel -%doc features.rst specs.rst %{_libdir}/libblockdev.so %dir %{_includedir}/blockdev %{_includedir}/blockdev/blockdev.h @@ -683,19 +639,18 @@ find %{buildroot} -type f -name "*.la" | xargs %{__rm} %{_datadir}/gir*/BlockDev*.gir %endif +%if %{with_python3} %files -n python3-blockdev %{python3_sitearch}/gi/overrides/BlockDev* %{python3_sitearch}/gi/overrides/__pycache__/BlockDev* +%endif %files utils %{_libdir}/libbd_utils.so.* -%{_libdir}/libbd_part_err.so.* %{abidir}/libbd_utils.dump -%{abidir}/libbd_part_err.dump %files utils-devel %{_libdir}/libbd_utils.so -%{_libdir}/libbd_part_err.so %{_libdir}/pkgconfig/blockdev-utils.pc %dir %{_includedir}/blockdev %{_includedir}/blockdev/utils.h @@ -705,6 +660,7 @@ find %{buildroot} -type f -name "*.la" | xargs %{__rm} %{_includedir}/blockdev/dev_utils.h %{_includedir}/blockdev/module.h %{_includedir}/blockdev/dbus.h +%{_includedir}/blockdev/logging.h %if %{with_btrfs} @@ -757,18 +713,6 @@ find %{buildroot} -type f -name "*.la" | xargs %{__rm} %endif -%if %{with_kbd} -%files kbd -%{_libdir}/libbd_kbd.so.* -%{abidir}/libbd_kbd.dump - -%files kbd-devel -%{_libdir}/libbd_kbd.so -%dir %{_includedir}/blockdev -%{_includedir}/blockdev/kbd.h -%endif - - %if %{with_loop} %files loop %{_libdir}/libbd_loop.so.* @@ -797,7 +741,7 @@ find %{buildroot} -type f -name "*.la" | xargs %{__rm} %files lvm-dbus %{_libdir}/libbd_lvm-dbus.so.* %{abidir}/libbd_lvm-dbus.dump -%config %{_sysconfdir}/libblockdev/conf.d/10-lvm-dbus.cfg +%config %{_sysconfdir}/libblockdev/3/conf.d/10-lvm-dbus.cfg %files lvm-dbus-devel %{_libdir}/libbd_lvm-dbus.so @@ -842,6 +786,18 @@ find %{buildroot} -type f -name "*.la" | xargs %{__rm} %endif +%if %{with_nvme} +%files nvme +%{_libdir}/libbd_nvme.so.* +%{abidir}/libbd_nvme.dump + +%files nvme-devel +%{_libdir}/libbd_nvme.so +%dir %{_includedir}/blockdev +%{_includedir}/blockdev/nvme.h +%endif + + %if %{with_part} %files part %{_libdir}/libbd_part.so.* @@ -866,28 +822,22 @@ find %{buildroot} -type f -name "*.la" | xargs %{__rm} %endif -%if %{with_vdo} -%files vdo -%{_libdir}/libbd_vdo.so.* -%{abidir}/libbd_vdo.dump - -%files vdo-devel -%{_libdir}/libbd_vdo.so -%dir %{_includedir}/blockdev -%{_includedir}/blockdev/vdo.h -%endif - %if %{with_tools} %files tools %{_bindir}/lvm-cache-stats +%{_bindir}/vfat-resize +%{abidir}/vfat-resize-option.list %endif %files plugins-all %files doc -%doc README.md features.rst +%doc README.md %changelog +* Fri Dec 22 2023 mgb01105731 - 3.0.4-1 +- update to version 3.0.4 + * Thu Nov 16 2023 Wenlong Zhang - 2.28-3 - fix build error for libblockdev