8277b5d
%define with_python3 1
8277b5d
%define with_gtk_doc 1
cbbcca7
%define with_btrfs 1
cbbcca7
%define with_crypto 1
cbbcca7
%define with_dm 1
cbbcca7
%define with_loop 1
cbbcca7
%define with_lvm 1
cbbcca7
%define with_lvm_dbus 1
cbbcca7
%define with_mdraid 1
cbbcca7
%define with_mpath 1
cbbcca7
%define with_swap 1
cbbcca7
%define with_part 1
cbbcca7
%define with_fs 1
d93bec5
%define with_nvdimm 1
9f9f7e2
%define with_gi 1
a0d34fd
%define with_escrow 1
9171985
%define with_tools 1
965d13a
%define with_nvme 1
ea92ee6
ea92ee6
# btrfs is not available on RHEL > 7
ea92ee6
%if 0%{?rhel} > 7 || %{with_btrfs} == 0
ea92ee6
%define with_btrfs 0
ea92ee6
%define btrfs_copts --without-btrfs
ea92ee6
%endif
ea92ee6
cbbcca7
%if %{with_btrfs} != 1
cbbcca7
%define btrfs_copts --without-btrfs
cbbcca7
%endif
cbbcca7
%if %{with_crypto} != 1
cbbcca7
%define crypto_copts --without-crypto
a0d34fd
%else
a0d34fd
%if %{with_escrow} != 1
a0d34fd
%define crypto_copts --without-escrow
a0d34fd
%endif
cbbcca7
%endif
cbbcca7
%if %{with_dm} != 1
cbbcca7
%define dm_copts --without-dm
c1404f3
%else
cbbcca7
%endif
cbbcca7
%if %{with_loop} != 1
cbbcca7
%define loop_copts --without-loop
cbbcca7
%endif
cbbcca7
%if %{with_lvm} != 1
cbbcca7
%define lvm_copts --without-lvm
cbbcca7
%endif
cbbcca7
%if %{with_lvm_dbus} != 1
cbbcca7
%define lvm_dbus_copts --without-lvm_dbus
cbbcca7
%endif
cbbcca7
%if %{with_mdraid} != 1
cbbcca7
%define mdraid_copts --without-mdraid
cbbcca7
%endif
cbbcca7
%if %{with_mpath} != 1
cbbcca7
%define mpath_copts --without-mpath
cbbcca7
%endif
cbbcca7
%if %{with_swap} != 1
cbbcca7
%define swap_copts --without-swap
cbbcca7
%endif
cbbcca7
%if %{with_part} != 1
cbbcca7
%define part_copts --without-part
cbbcca7
%endif
cbbcca7
%if %{with_fs} != 1
cbbcca7
%define fs_copts --without-fs
cbbcca7
%endif
d93bec5
%if %{with_nvdimm} != 1
d93bec5
%define nvdimm_copts --without-nvdimm
d93bec5
%endif
9171985
%if %{with_tools} != 1
9171985
%define tools_copts --without-tools
9171985
%endif
9f9f7e2
%if %{with_gi} != 1
9f9f7e2
%define gi_copts --disable-introspection
9f9f7e2
%endif
965d13a
%if %{with_nvme} != 1
965d13a
%define nvme_copts --without-nvme
965d13a
%endif
cbbcca7
965d13a
%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}
cbbcca7
95c9391
Name:        libblockdev
51fcefa
Version:     3.1.1
51fcefa
Release:     1%{?dist}
95c9391
Summary:     A library for low-level manipulation with block devices
27ffaf1
License:     LGPL-2.1-or-later
05f68dd
URL:         https://github.com/storaged-project/libblockdev
ecaa980
Source0:     https://github.com/storaged-project/libblockdev/releases/download/%{version}-%{release}/%{name}-%{version}.tar.gz
95c9391
22ba0c9
BuildRequires: make
95c9391
BuildRequires: glib2-devel
9f9f7e2
%if %{with_gi}
95c9391
BuildRequires: gobject-introspection-devel
9f9f7e2
%endif
8277b5d
%if %{with_python3}
eb93ef9
BuildRequires: python3-devel
8277b5d
%endif
8277b5d
%if %{with_gtk_doc}
c8bdcf2
BuildRequires: gtk-doc
8277b5d
%endif
c8bdcf2
BuildRequires: glib2-doc
9171985
BuildRequires: autoconf-archive
af3620d
965d13a
# obsolete removed subpackages to allow upgrades
965d13a
Provides: libblockdev-kbd = %{version}-%{release}
965d13a
Obsoletes: libblockdev-kbd < %{version}-%{release}
bf12e7b
Provides: libblockdev-vdo = %{version}-%{release}
bf12e7b
Obsoletes: libblockdev-vdo < %{version}-%{release}
cd2e4cf
965d13a
Requires: %{name}-utils%{?_isa} = %{version}-%{release}
eac5ac0
95c9391
%description
95c9391
The libblockdev is a C library with GObject introspection support that can be
95c9391
used for doing low-level operations with block devices like setting up LVM,
95c9391
BTRFS, LUKS or MD RAID. The library uses plugins (LVM, BTRFS,...) and serves as
95c9391
a thin wrapper around its plugins' functionality. All the plugins, however, can
95c9391
be used as standalone libraries. One of the core principles of libblockdev is
95c9391
that it is stateless from the storage configuration's perspective (e.g. it has
95c9391
no information about VGs when creating an LV).
95c9391
95c9391
%package devel
95c9391
Summary:     Development files for libblockdev
95c9391
Requires: %{name}%{?_isa} = %{version}-%{release}
965d13a
Requires: %{name}-utils-devel%{?_isa} = %{version}-%{release}
95c9391
Requires: glib2-devel
95c9391
631e826
# obsolete removed devel subpackages to allow upgrades
631e826
Provides: libblockdev-kbd-devel = %{version}-%{release}
631e826
Obsoletes: libblockdev-kbd-devel < %{version}-%{release}
631e826
Provides: libblockdev-vdo-devel = %{version}-%{release}
631e826
Obsoletes: libblockdev-vdo-devel < %{version}-%{release}
631e826
95c9391
%description devel
95c9391
This package contains header files and pkg-config files needed for development
95c9391
with the libblockdev library.
95c9391
8277b5d
%if %{with_python3}
64690cd
%package -n python3-blockdev
64690cd
Summary:     Python3 gobject-introspection bindings for libblockdev
64690cd
Requires: %{name}%{?_isa} = %{version}-%{release}
72f6586
Requires: python3-gobject-base
965d13a
Requires: python3-bytesize
64690cd
%{?python_provide:%python_provide python3-blockdev}
64690cd
64690cd
%description -n python3-blockdev
64690cd
This package contains enhancements to the gobject-introspection bindings for
64690cd
libblockdev in Python3.
8277b5d
%endif
95c9391
95c9391
%package utils
50d11e9
BuildRequires: kmod-devel
95c9391
Summary:     A library with utility functions for the libblockdev library
95c9391
95c9391
%description utils
95c9391
The libblockdev-utils is a library providing utility functions used by the
95c9391
libblockdev library and its plugins.
95c9391
95c9391
%package utils-devel
95c9391
Summary:     Development files for libblockdev-utils
95c9391
Requires: %{name}-utils%{?_isa} = %{version}-%{release}
95c9391
Requires: glib2-devel
95c9391
95c9391
%description utils-devel
95c9391
This package contains header files and pkg-config files needed for development
95c9391
with the libblockdev-utils library.
95c9391
95c9391
cbbcca7
%if %{with_btrfs}
95c9391
%package btrfs
cbbcca7
BuildRequires: libbytesize-devel
95c9391
Summary:     The BTRFS plugin for the libblockdev library
8d117df
Requires: %{name}-utils%{?_isa} = %{version}-%{release}
95c9391
Requires: btrfs-progs
95c9391
95c9391
%description btrfs
95c9391
The libblockdev library plugin (and in the same time a standalone library)
af3620d
providing the BTRFS-related functionality.
95c9391
95c9391
%package btrfs-devel
95c9391
Summary:     Development files for the libblockdev-btrfs plugin/library
95c9391
Requires: %{name}-btrfs%{?_isa} = %{version}-%{release}
95c9391
Requires: glib2-devel
8d117df
Requires: %{name}-utils-devel%{?_isa} = %{version}-%{release}
95c9391
95c9391
%description btrfs-devel
95c9391
This package contains header files and pkg-config files needed for development
95c9391
with the libblockdev-btrfs plugin/library.
cbbcca7
%endif
95c9391
95c9391
cbbcca7
%if %{with_crypto}
95c9391
%package crypto
965d13a
Requires: %{name}-utils%{?_isa} = %{version}-%{release}
965d13a
BuildRequires: cryptsetup-devel >= 2.3.0
ea92ee6
BuildRequires: libblkid-devel
965d13a
BuildRequires: keyutils-libs-devel
a0d34fd
a0d34fd
%if %{with_escrow}
cbbcca7
BuildRequires: volume_key-devel >= 0.3.9-7
cbbcca7
BuildRequires: nss-devel
a0d34fd
%endif
a0d34fd
95c9391
Summary:     The crypto plugin for the libblockdev library
95c9391
95c9391
%description crypto
95c9391
The libblockdev library plugin (and in the same time a standalone library)
af3620d
providing the functionality related to encrypted devices (LUKS).
95c9391
95c9391
%package crypto-devel
95c9391
Summary:     Development files for the libblockdev-crypto plugin/library
95c9391
Requires: %{name}-crypto%{?_isa} = %{version}-%{release}
965d13a
Requires: %{name}-utils-devel%{?_isa} = %{version}-%{release}
95c9391
Requires: glib2-devel
95c9391
95c9391
%description crypto-devel
95c9391
This package contains header files and pkg-config files needed for development
95c9391
with the libblockdev-crypto plugin/library.
cbbcca7
%endif
95c9391
95c9391
cbbcca7
%if %{with_dm}
95c9391
%package dm
cbbcca7
BuildRequires: device-mapper-devel
cbbcca7
BuildRequires: systemd-devel
95c9391
Summary:     The Device Mapper plugin for the libblockdev library
8d117df
Requires: %{name}-utils%{?_isa} = %{version}-%{release}
95c9391
Requires: device-mapper
95c9391
95c9391
%description dm
95c9391
The libblockdev library plugin (and in the same time a standalone library)
af3620d
providing the functionality related to Device Mapper.
95c9391
95c9391
%package dm-devel
95c9391
Summary:     Development files for the libblockdev-dm plugin/library
95c9391
Requires: %{name}-dm%{?_isa} = %{version}-%{release}
95c9391
Requires: glib2-devel
95c9391
Requires: device-mapper-devel
95c9391
Requires: systemd-devel
8d117df
Requires: %{name}-utils-devel%{?_isa} = %{version}-%{release}
95c9391
95c9391
%description dm-devel
95c9391
This package contains header files and pkg-config files needed for development
95c9391
with the libblockdev-dm plugin/library.
cbbcca7
%endif
95c9391
95c9391
cbbcca7
%if %{with_fs}
b657309
%package fs
cbbcca7
BuildRequires: libblkid-devel
cbbcca7
BuildRequires: libmount-devel
965d13a
BuildRequires: libuuid-devel
965d13a
BuildRequires: e2fsprogs-devel
b657309
Summary:     The FS plugin for the libblockdev library
8d117df
Requires: %{name}-utils%{?_isa} = %{version}-%{release}
b657309
b657309
%description fs
b657309
The libblockdev library plugin (and in the same time a standalone library)
b657309
providing the functionality related to operations with file systems.
b657309
b657309
%package fs-devel
b657309
Summary:     Development files for the libblockdev-fs plugin/library
b657309
Requires: %{name}-fs%{?_isa} = %{version}-%{release}
8d117df
Requires: %{name}-utils-devel%{?_isa} = %{version}-%{release}
b657309
Requires: glib2-devel
b657309
b657309
%description fs-devel
b657309
This package contains header files and pkg-config files needed for development
b657309
with the libblockdev-fs plugin/library.
cbbcca7
%endif
b657309
b657309
cbbcca7
%if %{with_loop}
95c9391
%package loop
95c9391
Summary:     The loop plugin for the libblockdev library
8d117df
Requires: %{name}-utils%{?_isa} = %{version}-%{release}
95c9391
95c9391
%description loop
95c9391
The libblockdev library plugin (and in the same time a standalone library)
af3620d
providing the functionality related to loop devices.
95c9391
95c9391
%package loop-devel
95c9391
Summary:     Development files for the libblockdev-loop plugin/library
95c9391
Requires: %{name}-loop%{?_isa} = %{version}-%{release}
8d117df
Requires: %{name}-utils-devel%{?_isa} = %{version}-%{release}
95c9391
Requires: glib2-devel
95c9391
95c9391
%description loop-devel
95c9391
This package contains header files and pkg-config files needed for development
95c9391
with the libblockdev-loop plugin/library.
cbbcca7
%endif
95c9391
95c9391
cbbcca7
%if %{with_lvm}
95c9391
%package lvm
cbbcca7
BuildRequires: device-mapper-devel
95c9391
Summary:     The LVM plugin for the libblockdev library
8d117df
Requires: %{name}-utils%{?_isa} = %{version}-%{release}
95c9391
Requires: lvm2
95c9391
95c9391
%description lvm
95c9391
The libblockdev library plugin (and in the same time a standalone library)
af3620d
providing the LVM-related functionality.
95c9391
95c9391
%package lvm-devel
95c9391
Summary:     Development files for the libblockdev-lvm plugin/library
95c9391
Requires: %{name}-lvm%{?_isa} = %{version}-%{release}
965d13a
Requires: %{name}-utils-devel%{?_isa} = %{version}-%{release}
95c9391
Requires: glib2-devel
95c9391
95c9391
%description lvm-devel
95c9391
This package contains header files and pkg-config files needed for development
95c9391
with the libblockdev-lvm plugin/library.
cbbcca7
%endif
95c9391
cbbcca7
%if %{with_lvm_dbus}
89a5e1b
%package lvm-dbus
cbbcca7
BuildRequires: device-mapper-devel
89a5e1b
Summary:     The LVM plugin for the libblockdev library
8d117df
Requires: %{name}-utils%{?_isa} = %{version}-%{release}
5573c28
Requires: lvm2-dbusd >= 2.02.156
89a5e1b
89a5e1b
%description lvm-dbus
89a5e1b
The libblockdev library plugin (and in the same time a standalone library)
89a5e1b
providing the LVM-related functionality utilizing the LVM DBus API.
89a5e1b
89a5e1b
%package lvm-dbus-devel
89a5e1b
Summary:     Development files for the libblockdev-lvm-dbus plugin/library
89a5e1b
Requires: %{name}-lvm-dbus%{?_isa} = %{version}-%{release}
965d13a
Requires: %{name}-utils-devel%{?_isa} = %{version}-%{release}
89a5e1b
Requires: glib2-devel
89a5e1b
89a5e1b
%description lvm-dbus-devel
89a5e1b
This package contains header files and pkg-config files needed for development
89a5e1b
with the libblockdev-lvm-dbus plugin/library.
cbbcca7
%endif
89a5e1b
95c9391
cbbcca7
%if %{with_mdraid}
95c9391
%package mdraid
cbbcca7
BuildRequires: libbytesize-devel
95c9391
Summary:     The MD RAID plugin for the libblockdev library
8d117df
Requires: %{name}-utils%{?_isa} = %{version}-%{release}
95c9391
Requires: mdadm
95c9391
95c9391
%description mdraid
95c9391
The libblockdev library plugin (and in the same time a standalone library)
af3620d
providing the functionality related to MD RAID.
95c9391
95c9391
%package mdraid-devel
95c9391
Summary:     Development files for the libblockdev-mdraid plugin/library
95c9391
Requires: %{name}-mdraid%{?_isa} = %{version}-%{release}
8d117df
Requires: %{name}-utils-devel%{?_isa} = %{version}-%{release}
95c9391
Requires: glib2-devel
95c9391
95c9391
%description mdraid-devel
95c9391
This package contains header files and pkg-config files needed for development
95c9391
with the libblockdev-mdraid plugin/library.
cbbcca7
%endif
95c9391
95c9391
cbbcca7
%if %{with_mpath}
95c9391
%package mpath
cbbcca7
BuildRequires: device-mapper-devel
95c9391
Summary:     The multipath plugin for the libblockdev library
8d117df
Requires: %{name}-utils%{?_isa} = %{version}-%{release}
89168ea
Recommends: device-mapper-multipath
95c9391
95c9391
%description mpath
95c9391
The libblockdev library plugin (and in the same time a standalone library)
af3620d
providing the functionality related to multipath devices.
95c9391
95c9391
%package mpath-devel
95c9391
Summary:     Development files for the libblockdev-mpath plugin/library
95c9391
Requires: %{name}-mpath%{?_isa} = %{version}-%{release}
8d117df
Requires: %{name}-utils-devel%{?_isa} = %{version}-%{release}
95c9391
Requires: glib2-devel
95c9391
95c9391
%description mpath-devel
95c9391
This package contains header files and pkg-config files needed for development
95c9391
with the libblockdev-mpath plugin/library.
cbbcca7
%endif
95c9391
d93bec5
%if %{with_nvdimm}
d93bec5
%package nvdimm
d93bec5
BuildRequires: ndctl-devel
d93bec5
BuildRequires: libuuid-devel
d93bec5
Summary:     The NVDIMM plugin for the libblockdev library
8d117df
Requires: %{name}-utils%{?_isa} = %{version}-%{release}
d93bec5
Requires: ndctl
d93bec5
d93bec5
%description nvdimm
d93bec5
The libblockdev library plugin (and in the same time a standalone library)
d93bec5
providing the functionality related to operations with NVDIMM devices.
d93bec5
d93bec5
%package nvdimm-devel
d93bec5
Summary:     Development files for the libblockdev-nvdimm plugin/library
d93bec5
Requires: %{name}-nvdimm%{?_isa} = %{version}-%{release}
8d117df
Requires: %{name}-utils-devel%{?_isa} = %{version}-%{release}
d93bec5
Requires: glib2-devel
d93bec5
d93bec5
%description nvdimm-devel
d93bec5
This package contains header files and pkg-config files needed for development
d93bec5
with the libblockdev-nvdimm plugin/library.
d93bec5
%endif
d93bec5
95c9391
965d13a
%if %{with_nvme}
965d13a
%package nvme
965d13a
BuildRequires: libnvme-devel
965d13a
BuildRequires: libuuid-devel
965d13a
Summary:     The NVMe plugin for the libblockdev library
965d13a
Requires: %{name}-utils%{?_isa} = %{version}-%{release}
965d13a
965d13a
%description nvme
965d13a
The libblockdev library plugin (and in the same time a standalone library)
965d13a
providing the functionality related to operations with NVMe devices.
965d13a
965d13a
%package nvme-devel
965d13a
Summary:     Development files for the libblockdev-nvme plugin/library
965d13a
Requires: %{name}-nvme%{?_isa} = %{version}-%{release}
965d13a
Requires: %{name}-utils-devel%{?_isa} = %{version}-%{release}
965d13a
Requires: glib2-devel
965d13a
965d13a
%description nvme-devel
965d13a
This package contains header files and pkg-config files needed for development
965d13a
with the libblockdev-nvme plugin/library.
965d13a
%endif
965d13a
965d13a
cbbcca7
%if %{with_part}
b657309
%package part
965d13a
BuildRequires: libfdisk-devel
b657309
Summary:     The partitioning plugin for the libblockdev library
8d117df
Requires: %{name}-utils%{?_isa} = %{version}-%{release}
07ec7ae
Requires: util-linux
b657309
b657309
%description part
b657309
The libblockdev library plugin (and in the same time a standalone library)
b657309
providing the functionality related to partitioning.
b657309
b657309
%package part-devel
b657309
Summary:     Development files for the libblockdev-part plugin/library
b657309
Requires: %{name}-part%{?_isa} = %{version}-%{release}
8d117df
Requires: %{name}-utils-devel%{?_isa} = %{version}-%{release}
b657309
Requires: glib2-devel
b657309
b657309
%description part-devel
b657309
This package contains header files and pkg-config files needed for development
b657309
with the libblockdev-part plugin/library.
cbbcca7
%endif
b657309
b657309
cbbcca7
%if %{with_swap}
95c9391
%package swap
9171985
BuildRequires: libblkid-devel
95c9391
Summary:     The swap plugin for the libblockdev library
8d117df
Requires: %{name}-utils%{?_isa} = %{version}-%{release}
95c9391
Requires: util-linux
95c9391
95c9391
%description swap
95c9391
The libblockdev library plugin (and in the same time a standalone library)
af3620d
providing the functionality related to swap devices.
95c9391
95c9391
%package swap-devel
95c9391
Summary:     Development files for the libblockdev-swap plugin/library
95c9391
Requires: %{name}-swap%{?_isa} = %{version}-%{release}
8d117df
Requires: %{name}-utils-devel%{?_isa} = %{version}-%{release}
95c9391
Requires: glib2-devel
95c9391
95c9391
%description swap-devel
95c9391
This package contains header files and pkg-config files needed for development
95c9391
with the libblockdev-swap plugin/library.
cbbcca7
%endif
cbbcca7
9171985
%if %{with_tools}
9171985
%package tools
9171985
Summary:    Various nice tools based on libblockdev
965d13a
Requires:   %{name} = %{version}-%{release}
965d13a
Requires:   %{name}-lvm = %{version}-%{release}
9171985
BuildRequires: libbytesize-devel
965d13a
BuildRequires: parted-devel
9171985
%if %{with_lvm_dbus} == 1
9171985
Recommends: %{name}-lvm-dbus
9171985
%endif
9171985
9171985
%description tools
9171985
Various nice storage-related tools based on libblockdev.
9171985
9171985
%endif
c1404f3
cbbcca7
%ifarch s390 s390x
af3620d
%package s390
af3620d
Summary:    The s390 plugin for the libblockdev library
0a37033
Requires: %{name}-utils%{?_isa} = %{version}-%{release}
af3620d
Requires: s390utils
af3620d
af3620d
%description s390
af3620d
The libblockdev library plugin (and in the same time a standalone library)
af3620d
providing the functionality related to s390 devices.
af3620d
af3620d
%package s390-devel
af3620d
Summary:     Development files for the libblockdev-s390 plugin/library
af3620d
Requires: %{name}-s390%{?_isa} = %{version}-%{release}
8d117df
Requires: %{name}-utils-devel%{?_isa} = %{version}-%{release}
af3620d
Requires: glib2-devel
af3620d
af3620d
%description s390-devel
af3620d
This package contains header files and pkg-config files needed for development
af3620d
with the libblockdev-s390 plugin/library.
cbbcca7
%endif
95c9391
95c9391
%package plugins-all
95c9391
Summary:     Meta-package that pulls all the libblockdev plugins as dependencies
d954869
Requires: %{name}%{?_isa} = %{version}-%{release}
cbbcca7
cbbcca7
%if %{with_btrfs}
9662ba6
Requires: %{name}-btrfs%{?_isa} = %{version}-%{release}
cbbcca7
%endif
cbbcca7
cbbcca7
%if %{with_crypto}
9662ba6
Requires: %{name}-crypto%{?_isa} = %{version}-%{release}
cbbcca7
%endif
cbbcca7
cbbcca7
%if %{with_dm}
9662ba6
Requires: %{name}-dm%{?_isa} = %{version}-%{release}
cbbcca7
%endif
cbbcca7
cbbcca7
%if %{with_fs}
b657309
Requires: %{name}-fs%{?_isa} = %{version}-%{release}
cbbcca7
%endif
cbbcca7
cbbcca7
%if %{with_loop}
9662ba6
Requires: %{name}-loop%{?_isa} = %{version}-%{release}
cbbcca7
%endif
cbbcca7
cbbcca7
%if %{with_lvm}
9662ba6
Requires: %{name}-lvm%{?_isa} = %{version}-%{release}
cbbcca7
%endif
cbbcca7
cbbcca7
%if %{with_mdraid}
9662ba6
Requires: %{name}-mdraid%{?_isa} = %{version}-%{release}
cbbcca7
%endif
cbbcca7
cbbcca7
%if %{with_mpath}
9662ba6
Requires: %{name}-mpath%{?_isa} = %{version}-%{release}
cbbcca7
%endif
cbbcca7
d93bec5
%if %{with_nvdimm}
d93bec5
Requires: %{name}-nvdimm%{?_isa} = %{version}-%{release}
d93bec5
%endif
d93bec5
965d13a
%if %{with_nvme}
965d13a
Requires: %{name}-nvme%{?_isa} = %{version}-%{release}
965d13a
%endif
965d13a
cbbcca7
%if %{with_part}
b657309
Requires: %{name}-part%{?_isa} = %{version}-%{release}
cbbcca7
%endif
cbbcca7
cbbcca7
%if %{with_swap}
9662ba6
Requires: %{name}-swap%{?_isa} = %{version}-%{release}
cbbcca7
%endif
cbbcca7
af3620d
%ifarch s390 s390x
af3620d
Requires: %{name}-s390%{?_isa} = %{version}-%{release}
af3620d
%endif
95c9391
95c9391
%description plugins-all
95c9391
A meta-package that pulls all the libblockdev plugins as dependencies.
95c9391
95c9391
95c9391
%prep
8ceac4c
%autosetup -n %{name}-%{version} -p1
95c9391
95c9391
%build
7399f41
autoreconf -ivf
8277b5d
%configure %{?configure_opts}
af3620d
%{__make} %{?_smp_mflags}
95c9391
95c9391
%install
af3620d
%{make_install}
af3620d
find %{buildroot} -type f -name "*.la" | xargs %{__rm}
95c9391
95c9391
531eaa3
%ldconfig_scriptlets
531eaa3
%ldconfig_scriptlets utils
cbbcca7
cbbcca7
%if %{with_btrfs}
531eaa3
%ldconfig_scriptlets btrfs
cbbcca7
%endif
cbbcca7
cbbcca7
%if %{with_crypto}
531eaa3
%ldconfig_scriptlets crypto
cbbcca7
%endif
cbbcca7
cbbcca7
%if %{with_dm}
531eaa3
%ldconfig_scriptlets dm
cbbcca7
%endif
cbbcca7
cbbcca7
%if %{with_fs}
531eaa3
%ldconfig_scriptlets fs
cbbcca7
%endif
cbbcca7
cbbcca7
%if %{with_loop}
531eaa3
%ldconfig_scriptlets loop
cbbcca7
%endif
cbbcca7
cbbcca7
%if %{with_lvm}
531eaa3
%ldconfig_scriptlets lvm
cbbcca7
%endif
cbbcca7
cbbcca7
%if %{with_lvm_dbus}
531eaa3
%ldconfig_scriptlets lvm-dbus
cbbcca7
%endif
cbbcca7
cbbcca7
%if %{with_mdraid}
531eaa3
%ldconfig_scriptlets mdraid
cbbcca7
%endif
cbbcca7
cbbcca7
%if %{with_mpath}
531eaa3
%ldconfig_scriptlets mpath
cbbcca7
%endif
cbbcca7
d93bec5
%if %{with_nvdimm}
d93bec5
%ldconfig_scriptlets nvdimm
d93bec5
%endif
d93bec5
965d13a
%if %{with_nvme}
965d13a
%ldconfig_scriptlets nvme
965d13a
%endif
965d13a
cbbcca7
%if %{with_part}
531eaa3
%ldconfig_scriptlets part
cbbcca7
%endif
cbbcca7
cbbcca7
%if %{with_swap}
531eaa3
%ldconfig_scriptlets swap
cbbcca7
%endif
cbbcca7
cbbcca7
%ifarch s390 s390x
531eaa3
%ldconfig_scriptlets s390
cbbcca7
%endif
cbbcca7
95c9391
95c9391
%files
d954869
%{!?_licensedir:%global license %%doc}
d954869
%license LICENSE
95c9391
%{_libdir}/libblockdev.so.*
9f9f7e2
%if %{with_gi}
95c9391
%{_libdir}/girepository*/BlockDev*.typelib
9f9f7e2
%endif
e2a4a02
%dir %{_sysconfdir}/libblockdev
0a37033
%dir %{_sysconfdir}/libblockdev/3/conf.d
0a37033
%config %{_sysconfdir}/libblockdev/3/conf.d/00-default.cfg
95c9391
95c9391
%files devel
95c9391
%{_libdir}/libblockdev.so
9a19530
%dir %{_includedir}/blockdev
95c9391
%{_includedir}/blockdev/blockdev.h
95c9391
%{_includedir}/blockdev/plugins.h
95c9391
%{_libdir}/pkgconfig/blockdev.pc
8277b5d
%if %{with_gtk_doc}
9a19530
%{_datadir}/gtk-doc/html/libblockdev
8277b5d
%endif
9f9f7e2
%if %{with_gi}
9a19530
%{_datadir}/gir*/BlockDev*.gir
9f9f7e2
%endif
95c9391
8277b5d
%if %{with_python3}
64690cd
%files -n python3-blockdev
64690cd
%{python3_sitearch}/gi/overrides/BlockDev*
64690cd
%{python3_sitearch}/gi/overrides/__pycache__/BlockDev*
8277b5d
%endif
95c9391
95c9391
%files utils
95c9391
%{_libdir}/libbd_utils.so.*
95c9391
95c9391
%files utils-devel
95c9391
%{_libdir}/libbd_utils.so
1cd3ec5
%{_libdir}/pkgconfig/blockdev-utils.pc
9a19530
%dir %{_includedir}/blockdev
95c9391
%{_includedir}/blockdev/utils.h
95c9391
%{_includedir}/blockdev/sizes.h
95c9391
%{_includedir}/blockdev/exec.h
07ec7ae
%{_includedir}/blockdev/extra_arg.h
6051fa6
%{_includedir}/blockdev/dev_utils.h
50d11e9
%{_includedir}/blockdev/module.h
ea92ee6
%{_includedir}/blockdev/dbus.h
965d13a
%{_includedir}/blockdev/logging.h
95c9391
95c9391
cbbcca7
%if %{with_btrfs}
95c9391
%files btrfs
95c9391
%{_libdir}/libbd_btrfs.so.*
95c9391
95c9391
%files btrfs-devel
95c9391
%{_libdir}/libbd_btrfs.so
9a19530
%dir %{_includedir}/blockdev
95c9391
%{_includedir}/blockdev/btrfs.h
cbbcca7
%endif
95c9391
95c9391
cbbcca7
%if %{with_crypto}
95c9391
%files crypto
95c9391
%{_libdir}/libbd_crypto.so.*
95c9391
95c9391
%files crypto-devel
95c9391
%{_libdir}/libbd_crypto.so
9a19530
%dir %{_includedir}/blockdev
95c9391
%{_includedir}/blockdev/crypto.h
cbbcca7
%endif
95c9391
95c9391
cbbcca7
%if %{with_dm}
95c9391
%files dm
95c9391
%{_libdir}/libbd_dm.so.*
95c9391
95c9391
%files dm-devel
95c9391
%{_libdir}/libbd_dm.so
9a19530
%dir %{_includedir}/blockdev
95c9391
%{_includedir}/blockdev/dm.h
cbbcca7
%endif
95c9391
95c9391
cbbcca7
%if %{with_fs}
b657309
%files fs
b657309
%{_libdir}/libbd_fs.so.*
b657309
b657309
%files fs-devel
b657309
%{_libdir}/libbd_fs.so
b657309
%dir %{_includedir}/blockdev
50d11e9
%dir %{_includedir}/blockdev/fs
b657309
%{_includedir}/blockdev/fs.h
50d11e9
%{_includedir}/blockdev/fs/*.h
cbbcca7
%endif
b657309
b657309
cbbcca7
%if %{with_loop}
95c9391
%files loop
95c9391
%{_libdir}/libbd_loop.so.*
95c9391
95c9391
%files loop-devel
95c9391
%{_libdir}/libbd_loop.so
9a19530
%dir %{_includedir}/blockdev
95c9391
%{_includedir}/blockdev/loop.h
cbbcca7
%endif
95c9391
95c9391
cbbcca7
%if %{with_lvm}
95c9391
%files lvm
95c9391
%{_libdir}/libbd_lvm.so.*
95c9391
95c9391
%files lvm-devel
95c9391
%{_libdir}/libbd_lvm.so
9a19530
%dir %{_includedir}/blockdev
95c9391
%{_includedir}/blockdev/lvm.h
cbbcca7
%endif
cbbcca7
95c9391
cbbcca7
%if %{with_lvm_dbus}
89a5e1b
%files lvm-dbus
89a5e1b
%{_libdir}/libbd_lvm-dbus.so.*
0a37033
%config %{_sysconfdir}/libblockdev/3/conf.d/10-lvm-dbus.cfg
89a5e1b
89a5e1b
%files lvm-dbus-devel
89a5e1b
%{_libdir}/libbd_lvm-dbus.so
89a5e1b
%dir %{_includedir}/blockdev
89a5e1b
%{_includedir}/blockdev/lvm.h
cbbcca7
%endif
89a5e1b
95c9391
cbbcca7
%if %{with_mdraid}
95c9391
%files mdraid
95c9391
%{_libdir}/libbd_mdraid.so.*
95c9391
95c9391
%files mdraid-devel
95c9391
%{_libdir}/libbd_mdraid.so
9a19530
%dir %{_includedir}/blockdev
95c9391
%{_includedir}/blockdev/mdraid.h
cbbcca7
%endif
95c9391
95c9391
cbbcca7
%if %{with_mpath}
95c9391
%files mpath
95c9391
%{_libdir}/libbd_mpath.so.*
95c9391
95c9391
%files mpath-devel
95c9391
%{_libdir}/libbd_mpath.so
9a19530
%dir %{_includedir}/blockdev
95c9391
%{_includedir}/blockdev/mpath.h
cbbcca7
%endif
95c9391
a0d34fd
d93bec5
%if %{with_nvdimm}
d93bec5
%files nvdimm
d93bec5
%{_libdir}/libbd_nvdimm.so.*
d93bec5
d93bec5
%files nvdimm-devel
d93bec5
%{_libdir}/libbd_nvdimm.so
d93bec5
%dir %{_includedir}/blockdev
d93bec5
%{_includedir}/blockdev/nvdimm.h
d93bec5
%endif
95c9391
a0d34fd
965d13a
%if %{with_nvme}
965d13a
%files nvme
965d13a
%{_libdir}/libbd_nvme.so.*
965d13a
965d13a
%files nvme-devel
965d13a
%{_libdir}/libbd_nvme.so
965d13a
%dir %{_includedir}/blockdev
965d13a
%{_includedir}/blockdev/nvme.h
965d13a
%endif
965d13a
965d13a
cbbcca7
%if %{with_part}
b657309
%files part
b657309
%{_libdir}/libbd_part.so.*
b657309
b657309
%files part-devel
b657309
%{_libdir}/libbd_part.so
b657309
%dir %{_includedir}/blockdev
b657309
%{_includedir}/blockdev/part.h
cbbcca7
%endif
b657309
b657309
cbbcca7
%if %{with_swap}
95c9391
%files swap
95c9391
%{_libdir}/libbd_swap.so.*
95c9391
95c9391
%files swap-devel
95c9391
%{_libdir}/libbd_swap.so
9a19530
%dir %{_includedir}/blockdev
95c9391
%{_includedir}/blockdev/swap.h
cbbcca7
%endif
cbbcca7
95c9391
9171985
%if %{with_tools}
9171985
%files tools
9171985
%{_bindir}/lvm-cache-stats
965d13a
%{_bindir}/vfat-resize
9171985
%endif
c1404f3
af3620d
%ifarch s390 s390x
af3620d
%files s390
af3620d
%{_libdir}/libbd_s390.so.*
af3620d
af3620d
%files s390-devel
af3620d
%{_libdir}/libbd_s390.so
af3620d
%dir %{_includedir}/blockdev
af3620d
%{_includedir}/blockdev/s390.h
af3620d
%endif
af3620d
95c9391
%files plugins-all
95c9391
95c9391
%changelog
51fcefa
* Tue Mar 26 2024 Vojtech Trefny <vtrefny@redhat.com> - 3.1.1-1
51fcefa
- lvm-dbus: Fix passing size for pvresize over DBus (vtrefny)
51fcefa
- nvme: Add bd_nvme_is_tech_avail to the API file (vtrefny)
51fcefa
- tests: Add NVMe controller type checks (tbzatek)
51fcefa
- tests: Add NVMe persistent discovery controller tests (tbzatek)
51fcefa
- tests: Fix removing custom LVM devices file (vtrefny)
51fcefa
- tests: Ignore LVM devices file for non-LVM tests (vtrefny)
51fcefa
- tests: Manually remove removed PVs from LVM devices file (vtrefny)
51fcefa
- dm_logging: Annotate redirect_dm_log() printf format (tbzatek)
51fcefa
- Fix some more occurrences of missing port to G_GNUC_UNUSED (tbzatek)
51fcefa
- Port to G_GNUC_INTERNAL for controlling symbols visibility (tbzatek)
51fcefa
- Use glib2 G_GNUC_UNUSED in place of UNUSED locally defined (giulio.benetti)
51fcefa
- Makefile: Fix bumpver to work with micro versions (vtrefny)
51fcefa
3b464e3
* Thu Jan 25 2024 Fedora Release Engineering <releng@fedoraproject.org> - 3.1.0-2
3b464e3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
3b464e3
804b211
* Fri Jan 19 2024 Vojtech Trefny <vtrefny@redhat.com> - 3.1.0-1
804b211
- tests: Skip some checks for btrfs errors with btrfs-progs 6.6.3 (vtrefny)
804b211
- Fix missing progress initialization in bd_crypto_luks_add_key (vtrefny)
804b211
- fs: Report reason for open() and ioctl() failures (tbzatek)
804b211
- utils: Add expected printf string annotation (tbzatek)
804b211
- lvm-dbus: Avoid using already-freed memory (tbzatek)
804b211
- lvm-dbus: Fix leaking error (tbzatek)
804b211
- python: Add a deepcopy function to our structs (vtrefny)
804b211
- tests: Remove unreliable nvme attribute checks (tbzatek)
804b211
- tests: Use BDPluginSpec constructor in LVM DBus plugin tests (vtrefny)
804b211
- tests: Avoid setting up intermediary loop device for the nvme target (tbzatek)
804b211
- tests: Default to /tmp for create_sparse_tempfile() (tbzatek)
804b211
- part: Fix potential double free when getting parttype (vtrefny)
804b211
- Mark NVDIMM plugin as deprecated since 3.1 (vtrefny)
804b211
- tests: Remove some obsolete rules to skip tests (vtrefny)
804b211
- fs: Add support for getting filesystem min size for NTFS and Ext (vtrefny)
804b211
- fs: Fix allowed UUID for generic mkfs with VFAT (vtrefny)
804b211
- fs: Add a generic function to check for fs info availability (vtrefny)
804b211
- fs: Add a function to check label format for F2FS (vtrefny)
804b211
- swap: Add support for checking label and UUID format (vtrefny)
804b211
- ci: Remove the custom version command for Packit (vtrefny)
804b211
- ci: Manually prepare spec file for Packit (vtrefny)
804b211
- overrides: Remove unused 'sys' import (vtrefny)
804b211
- Add BDPluginSpec constructor and use it in plugin_specs_from_names (vtrefny)
804b211
- Sync spec with downstream (vtrefny)
804b211
- ci: Add an action to compile libblockdev with different compilers (vtrefny)
804b211
631e826
* Fri Oct 13 2023 Vojtech Trefny <vtrefny@redhat.com> - 3.0.4-1
631e826
- tests: Fix "invalid escape sequence '\#'" warning from Python 3.12 (vtrefny)
631e826
- tests: Fail early when recompilation fails in library_test (vtrefny)
631e826
- lvm-dbus: Replace g_critical calls with bd_utils_log_format (vtrefny)
631e826
- Use log function when calling a plugin function that is not loaded (vtrefny)
631e826
- logging: Default to DEBUG log level if compiled with --enable-debug (vtrefny)
631e826
- nvme: Rework memory allocation for device ioctls (tbzatek)
631e826
- packit: Add configuration for downstream builds (vtrefny)
631e826
- fs: correct btrfs set label description (jvanderwaa)
631e826
- fs: Disable progress for ntfsresize (vtrefny)
631e826
- part: Do not open disk read-write for read only operations (vtrefny)
631e826
- ci: Bump actions/checkout from v3 to v4 (vtrefny)
631e826
- plugins: btrfs: use g_autofree where possible for g_free (jvanderwaa)
631e826
- plugins: use g_autofree for free'ing g_char's (jvanderwaa)
631e826
- spec: Move obsoleted devel subpackages to libblockdev-devel (vtrefny)
631e826
- spec: Obsolete vdo plugin packages (vtrefny)
631e826
bf12e7b
* Wed Sep 06 2023 Vojtech Trefny <vtrefny@redhat.com> - 3.0.3-2
bf12e7b
- Obsolete vdo plugin packages (#2237477)
bf12e7b
1cb5935
* Thu Aug 31 2023 Vojtech Trefny <vtrefny@redhat.com> - 3.0.3-1
1cb5935
- crypto: Correctly convert passphrases from Python to C (vtrefny)
1cb5935
- tests: Minor NVMe HostNQN fixes (tbzatek)
1cb5935
- nvme: Generate HostID when missing (tbzatek)
1cb5935
- Always use "--fs ignore" with lvresize (mvollmer)
1cb5935
- nvme: Use interim buffer for nvme_get_log_sanitize() (tbzatek)
1cb5935
- fs: Fix memory leak (vtrefny)
1cb5935
- fs: Fix leaking directories with temporary mounts (vtrefny)
1cb5935
- tests: Specificy required versions when importing GLib and BlockDev introspection (biebl)
1cb5935
- tests: Replace deprecated unittest assert calls (vtrefny)
1cb5935
e6cc4e4
* Thu Jul 20 2023 Vojtech Trefny <vtrefny@redhat.com> - 3.0.2-1
e6cc4e4
- fs: Avoid excess logging in extract_e2fsck_progress (vtrefny)
e6cc4e4
- loop: Report BD_LOOP_ERROR_DEVICE on empty loop devices (tbzatek)
e6cc4e4
- lib: Silence the missing DEFAULT_CONF_DIR_PATH (tbzatek)
e6cc4e4
- fs: Document that generic functions can mount filesystems (vtrefny)
e6cc4e4
- fs: Use read-only mount where possible for generic FS functions (vtrefny)
e6cc4e4
- docs: Fix test quotation (marecki)
e6cc4e4
- fs: Fix unused error in extract_e2fsck_progress (vtrefny)
e6cc4e4
- Use ntfsinfo instead of ntfscluster for faster bd_fs_ntfs_get_info (amubtdx)
e6cc4e4
- Restrict list of exported symbols via -export-symbols-regex (biebl)
e6cc4e4
- Fix formatting in NEWS.rst (vtrefny)
e6cc4e4
65a6131
* Tue Jul 04 2023 Python Maint <python-maint@redhat.com> - 3.0.1-2
65a6131
- Rebuilt for Python 3.12
65a6131
0a37033
* Tue Jul 04 2023 Vojtech Trefny <vtrefny@redhat.com> - 3.0.1-1
0a37033
- fs: Simplify struct BDFSInfo (tbzatek)
0a37033
- boilerplate_generator: Annotate stub func args as G_GNUC_UNUSED (tbzatek)
0a37033
- crypto: Remove stray struct redefinition (tbzatek)
0a37033
- loop: Remove unused variable (tbzatek)
0a37033
- build: Exit before AC_OUTPUT on error (tbzatek)
0a37033
- loop: define LOOP_SET_BLOCK_SIZE is not defined (giulio.benetti)
0a37033
- Make the conf.d directory versioned (vtrefny)
0a37033
- configure: Fix MAJOR_VER macro (vtrefny)
0a37033
- spec: Add dependency on libblockdev-utils to the s390 plugin (vtrefny)
0a37033
- nvme: Mark private symbols as hidden (tbzatek)
0a37033
- dist: Sync spec with downstream (vtrefny)
0a37033
- misc: Update steps and Dockerfile for Python documentation (vtrefny)
0a37033
- fs: Add missing copy and free functions to the header file (vtrefny)
0a37033
- lvm: Add bd_lvm_segdata_copy/free to the header file (vtrefny)
0a37033
- loop: Remove bd_loop_get_autoclear definition (vtrefny)
0a37033
- lvm: Fix declaration for bd_lvm_vdolvpoolname (vtrefny)
0a37033
- lvm: Make _vglock_start_stop static (vtrefny)
0a37033
- vdo_stats: Remove unused libparted include (vtrefny)
0a37033
16293e5
* Thu Jun 29 2023 Python Maint <python-maint@redhat.com> - 3.0-2
16293e5
- Rebuilt for Python 3.12
16293e5
965d13a
* Fri Jun 23 2023 Vojtech Trefny <vtrefny@redhat.com> - 3.0-1
965d13a
- Libblockdev 3.0 release