|
@@ -1,4 +1,6 @@
|
|
|
-%define with_python2 1
|
|
|
+%bcond_with systemd
|
|
|
+
|
|
|
+%define with_python2 0
|
|
|
%define with_python3 1
|
|
|
%define with_gtk_doc 1
|
|
|
%define with_bcache 0
|
|
@@ -7,7 +9,11 @@
|
|
|
%define with_dm 1
|
|
|
%define with_loop 1
|
|
|
%define with_lvm 1
|
|
|
+%if %{with systemd}
|
|
|
+%define with_lvm_dbus 1
|
|
|
+%else
|
|
|
%define with_lvm_dbus 0
|
|
|
+%endif
|
|
|
%define with_mdraid 1
|
|
|
%define with_mpath 1
|
|
|
%define with_swap 1
|
|
@@ -104,11 +110,11 @@
|
|
|
|
|
|
%define configure_opts %{?python2_copts} %{?python3_copts} %{?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} %{?gi_copts}
|
|
|
|
|
|
-Name: libblockdev
|
|
|
-Version: 2.23
|
|
|
-Release: 1%{?_dist_release}
|
|
|
Summary: A library for low-level manipulation with block devices
|
|
|
-
|
|
|
+Name: libblockdev
|
|
|
+Version: 2.24
|
|
|
+Release: 1%{?_dist_release}%{?with_systemd:.systemd}
|
|
|
+Group: system
|
|
|
Vendor: Project Vine
|
|
|
Distribution: Vine Linux
|
|
|
|
|
@@ -117,7 +123,11 @@ URL: https://github.com/storaged-project/libblockdev
|
|
|
Source0: https://github.com/storaged-project/libblockdev/releases/download/%{version}-1/%{name}-%{version}.tar.gz
|
|
|
|
|
|
BuildRequires: glib2-devel
|
|
|
+%if %{with systemd}
|
|
|
+BuildRequires: systemd-devel
|
|
|
+%else
|
|
|
BuildRequires: libudev-devel
|
|
|
+%endif
|
|
|
%if %{with_gi}
|
|
|
BuildRequires: gobject-introspection-devel
|
|
|
%endif
|
|
@@ -168,8 +178,10 @@ be used as standalone libraries. One of the core principles of libblockdev is
|
|
|
that it is stateless from the storage configuration's perspective (e.g. it has
|
|
|
no information about VGs when creating an LV).
|
|
|
|
|
|
+
|
|
|
%package devel
|
|
|
Summary: Development files for libblockdev
|
|
|
+Group: programming
|
|
|
Requires: %{name}%{?_isa} = %{version}-%{release}
|
|
|
Requires: glib2-devel
|
|
|
|
|
@@ -177,9 +189,11 @@ Requires: glib2-devel
|
|
|
This package contains header files and pkg-config files needed for development
|
|
|
with the libblockdev library.
|
|
|
|
|
|
+
|
|
|
%if %{with_python2}
|
|
|
%package -n python-blockdev
|
|
|
Summary: Python gobject-introspection bindings for libblockdev
|
|
|
+Group: programming
|
|
|
BuildRequires: python-devel python-rpm-macros
|
|
|
Requires: %{name}%{?_isa} = %{version}-%{release}
|
|
|
Requires: pygobject
|
|
@@ -190,9 +204,11 @@ This package contains enhancements to the gobject-introspection bindings for
|
|
|
libblockdev in Python2.
|
|
|
%endif
|
|
|
|
|
|
+
|
|
|
%if %{with_python3}
|
|
|
%package -n python3-blockdev
|
|
|
Summary: Python3 gobject-introspection bindings for libblockdev
|
|
|
+Group: programming
|
|
|
BuildRequires: python3-devel python3-rpm-macros
|
|
|
Requires: %{name}%{?_isa} = %{version}-%{release}
|
|
|
Requires: python3-pygobject
|
|
@@ -206,13 +222,16 @@ libblockdev in Python3.
|
|
|
%package utils
|
|
|
BuildRequires: kmod-devel
|
|
|
Summary: A library with utility functions for the libblockdev library
|
|
|
+Group: admin-tools
|
|
|
|
|
|
%description utils
|
|
|
The libblockdev-utils is a library providing utility functions used by the
|
|
|
libblockdev library and its plugins.
|
|
|
|
|
|
+
|
|
|
%package utils-devel
|
|
|
Summary: Development files for libblockdev-utils
|
|
|
+Group: programming
|
|
|
Requires: %{name}-utils%{?_isa} = %{version}-%{release}
|
|
|
Requires: glib2-devel
|
|
|
|
|
@@ -225,6 +244,7 @@ with the libblockdev-utils library.
|
|
|
%package btrfs
|
|
|
BuildRequires: libbytesize-devel
|
|
|
Summary: The BTRFS plugin for the libblockdev library
|
|
|
+Group: system
|
|
|
Requires: %{name}-utils%{?_isa} >= 0.11
|
|
|
Requires: btrfs-progs
|
|
|
|
|
@@ -232,8 +252,10 @@ Requires: btrfs-progs
|
|
|
The libblockdev library plugin (and in the same time a standalone library)
|
|
|
providing the BTRFS-related functionality.
|
|
|
|
|
|
+
|
|
|
%package btrfs-devel
|
|
|
Summary: Development files for the libblockdev-btrfs plugin/library
|
|
|
+Group: programming
|
|
|
Requires: %{name}-btrfs%{?_isa} = %{version}-%{release}
|
|
|
Requires: glib2-devel
|
|
|
Requires: %{name}-utils-devel%{?_isa}
|
|
@@ -246,6 +268,8 @@ with the libblockdev-btrfs plugin/library.
|
|
|
|
|
|
%if %{with_crypto}
|
|
|
%package crypto
|
|
|
+Summary: The crypto plugin for the libblockdev library
|
|
|
+Group: system
|
|
|
BuildRequires: cryptsetup-devel
|
|
|
BuildRequires: libblkid-devel
|
|
|
|
|
@@ -254,14 +278,14 @@ BuildRequires: volume_key-devel >= 0.3.9-7
|
|
|
BuildRequires: nss-devel
|
|
|
%endif
|
|
|
|
|
|
-Summary: The crypto plugin for the libblockdev library
|
|
|
-
|
|
|
%description crypto
|
|
|
The libblockdev library plugin (and in the same time a standalone library)
|
|
|
providing the functionality related to encrypted devices (LUKS).
|
|
|
|
|
|
+
|
|
|
%package crypto-devel
|
|
|
Summary: Development files for the libblockdev-crypto plugin/library
|
|
|
+Group: programming
|
|
|
Requires: %{name}-crypto%{?_isa} = %{version}-%{release}
|
|
|
Requires: glib2-devel
|
|
|
|
|
@@ -273,13 +297,13 @@ with the libblockdev-crypto plugin/library.
|
|
|
|
|
|
%if %{with_dm}
|
|
|
%package dm
|
|
|
+Summary: The Device Mapper plugin for the libblockdev library
|
|
|
+Group: system
|
|
|
BuildRequires: device-mapper-devel
|
|
|
%if %{with_dmraid}
|
|
|
BuildRequires: dmraid
|
|
|
BuildRequires: dmraid-devel
|
|
|
%endif
|
|
|
-#BuildRequires: systemd-devel
|
|
|
-Summary: The Device Mapper plugin for the libblockdev library
|
|
|
Requires: %{name}-utils%{?_isa} >= 0.11
|
|
|
Requires: device-mapper
|
|
|
%if %{with_dmraid}
|
|
@@ -292,10 +316,13 @@ providing the functionality related to Device Mapper.
|
|
|
|
|
|
%package dm-devel
|
|
|
Summary: Development files for the libblockdev-dm plugin/library
|
|
|
+Group: programming
|
|
|
Requires: %{name}-dm%{?_isa} = %{version}-%{release}
|
|
|
Requires: glib2-devel
|
|
|
Requires: device-mapper-devel
|
|
|
-#Requires: systemd-devel
|
|
|
+%if %{with systemd}
|
|
|
+Requires: systemd-devel
|
|
|
+%endif
|
|
|
%if %{with_dmraid}
|
|
|
Requires: dmraid-devel
|
|
|
%endif
|
|
@@ -309,19 +336,22 @@ with the libblockdev-dm plugin/library.
|
|
|
|
|
|
%if %{with_fs}
|
|
|
%package fs
|
|
|
+Summary: The FS plugin for the libblockdev library
|
|
|
+Group: system
|
|
|
BuildRequires: parted-devel
|
|
|
BuildRequires: libblkid-devel
|
|
|
BuildRequires: libmount-devel
|
|
|
-Summary: The FS plugin for the libblockdev library
|
|
|
Requires: %{name}-utils%{?_isa} >= 0.11
|
|
|
#Requires: device-mapper-multipath
|
|
|
|
|
|
+
|
|
|
%description fs
|
|
|
The libblockdev library plugin (and in the same time a standalone library)
|
|
|
providing the functionality related to operations with file systems.
|
|
|
|
|
|
%package fs-devel
|
|
|
Summary: Development files for the libblockdev-fs plugin/library
|
|
|
+Group: programming
|
|
|
Requires: %{name}-fs%{?_isa} = %{version}-%{release}
|
|
|
Requires: %{name}-utils-devel%{?_isa}
|
|
|
Requires: glib2-devel
|
|
@@ -336,8 +366,9 @@ with the libblockdev-fs plugin/library.
|
|
|
|
|
|
%if %{with_kbd}
|
|
|
%package kbd
|
|
|
-BuildRequires: libbytesize-devel
|
|
|
Summary: The KBD plugin for the libblockdev library
|
|
|
+Group: system
|
|
|
+BuildRequires: libbytesize-devel
|
|
|
Requires: %{name}-utils%{?_isa} >= 0.11
|
|
|
%if %{with_bcache}
|
|
|
Requires: bcache-tools >= 1.0.8
|
|
@@ -348,8 +379,10 @@ 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
|
|
|
+Group: programming
|
|
|
Requires: %{name}-kbd%{?_isa} = %{version}-%{release}
|
|
|
Requires: %{name}-utils-devel%{?_isa}
|
|
|
Requires: glib2-devel
|
|
@@ -363,14 +396,17 @@ with the libblockdev-kbd plugin/library.
|
|
|
%if %{with_loop}
|
|
|
%package loop
|
|
|
Summary: The loop plugin for the libblockdev library
|
|
|
+Group: system
|
|
|
Requires: %{name}-utils%{?_isa} >= 0.11
|
|
|
|
|
|
%description loop
|
|
|
The libblockdev library plugin (and in the same time a standalone library)
|
|
|
providing the functionality related to loop devices.
|
|
|
|
|
|
+
|
|
|
%package loop-devel
|
|
|
Summary: Development files for the libblockdev-loop plugin/library
|
|
|
+Group: programming
|
|
|
Requires: %{name}-loop%{?_isa} = %{version}-%{release}
|
|
|
Requires: %{name}-utils-devel%{?_isa}
|
|
|
Requires: glib2-devel
|
|
@@ -385,6 +421,7 @@ with the libblockdev-loop plugin/library.
|
|
|
%package lvm
|
|
|
BuildRequires: device-mapper-devel
|
|
|
Summary: The LVM plugin for the libblockdev library
|
|
|
+Group: system
|
|
|
Provides: %{name}-tools = %{version}-%{release}
|
|
|
Requires: %{name}-utils%{?_isa} >= 0.11
|
|
|
Requires: lvm2
|
|
@@ -395,8 +432,10 @@ Requires: device-mapper-persistent-data
|
|
|
The libblockdev library plugin (and in the same time a standalone library)
|
|
|
providing the LVM-related functionality.
|
|
|
|
|
|
+
|
|
|
%package lvm-devel
|
|
|
Summary: Development files for the libblockdev-lvm plugin/library
|
|
|
+Group: programming
|
|
|
Requires: %{name}-lvm%{?_isa} = %{version}-%{release}
|
|
|
Requires: %{name}-utils-devel%{?_isa}
|
|
|
Requires: glib2-devel
|
|
@@ -406,10 +445,12 @@ This package contains header files and pkg-config files needed for development
|
|
|
with the libblockdev-lvm plugin/library.
|
|
|
%endif
|
|
|
|
|
|
+
|
|
|
%if %{with_lvm_dbus}
|
|
|
%package lvm-dbus
|
|
|
BuildRequires: device-mapper-devel
|
|
|
Summary: The LVM plugin for the libblockdev library
|
|
|
+Group: system
|
|
|
Requires: %{name}-utils%{?_isa} >= 1.4
|
|
|
Requires: lvm2-dbusd >= 2.02.156
|
|
|
# for thin_metadata_size
|
|
@@ -419,8 +460,10 @@ Requires: device-mapper-persistent-data
|
|
|
The libblockdev library plugin (and in the same time a standalone library)
|
|
|
providing the LVM-related functionality utilizing the LVM DBus API.
|
|
|
|
|
|
+
|
|
|
%package lvm-dbus-devel
|
|
|
Summary: Development files for the libblockdev-lvm-dbus plugin/library
|
|
|
+Group: programming
|
|
|
Requires: %{name}-lvm-dbus%{?_isa} = %{version}-%{release}
|
|
|
Requires: %{name}-utils-devel%{?_isa} >= 1.4
|
|
|
Requires: glib2-devel
|
|
@@ -435,6 +478,7 @@ with the libblockdev-lvm-dbus plugin/library.
|
|
|
%package mdraid
|
|
|
BuildRequires: libbytesize-devel
|
|
|
Summary: The MD RAID plugin for the libblockdev library
|
|
|
+Group: system
|
|
|
Requires: %{name}-utils%{?_isa} >= 0.11
|
|
|
Requires: mdadm
|
|
|
|
|
@@ -442,8 +486,10 @@ Requires: mdadm
|
|
|
The libblockdev library plugin (and in the same time a standalone library)
|
|
|
providing the functionality related to MD RAID.
|
|
|
|
|
|
+
|
|
|
%package mdraid-devel
|
|
|
Summary: Development files for the libblockdev-mdraid plugin/library
|
|
|
+Group: programming
|
|
|
Requires: %{name}-mdraid%{?_isa} = %{version}-%{release}
|
|
|
Requires: %{name}-utils-devel%{?_isa}
|
|
|
Requires: glib2-devel
|
|
@@ -456,8 +502,9 @@ with the libblockdev-mdraid plugin/library.
|
|
|
|
|
|
%if %{with_mpath}
|
|
|
%package mpath
|
|
|
-BuildRequires: device-mapper-devel
|
|
|
Summary: The multipath plugin for the libblockdev library
|
|
|
+Group: system
|
|
|
+BuildRequires: device-mapper-devel
|
|
|
Requires: %{name}-utils%{?_isa} >= 0.11
|
|
|
Requires: device-mapper-multipath
|
|
|
|
|
@@ -465,8 +512,10 @@ Requires: device-mapper-multipath
|
|
|
The libblockdev library plugin (and in the same time a standalone library)
|
|
|
providing the functionality related to multipath devices.
|
|
|
|
|
|
+
|
|
|
%package mpath-devel
|
|
|
Summary: Development files for the libblockdev-mpath plugin/library
|
|
|
+Group: programming
|
|
|
Requires: %{name}-mpath%{?_isa} = %{version}-%{release}
|
|
|
Requires: %{name}-utils-devel%{?_isa}
|
|
|
Requires: glib2-devel
|
|
@@ -476,11 +525,13 @@ This package contains header files and pkg-config files needed for development
|
|
|
with the libblockdev-mpath plugin/library.
|
|
|
%endif
|
|
|
|
|
|
+
|
|
|
%if %{with_nvdimm}
|
|
|
%package nvdimm
|
|
|
+Summary: The NVDIMM plugin for the libblockdev library
|
|
|
+Group: system
|
|
|
BuildRequires: ndctl-devel
|
|
|
BuildRequires: libuuid-devel
|
|
|
-Summary: The NVDIMM plugin for the libblockdev library
|
|
|
Requires: %{name}-utils%{?_isa} >= 0.11
|
|
|
Requires: ndctl
|
|
|
|
|
@@ -488,8 +539,10 @@ Requires: ndctl
|
|
|
The libblockdev library plugin (and in the same time a standalone library)
|
|
|
providing the functionality related to operations with NVDIMM devices.
|
|
|
|
|
|
+
|
|
|
%package nvdimm-devel
|
|
|
Summary: Development files for the libblockdev-nvdimm plugin/library
|
|
|
+Group: programming
|
|
|
Requires: %{name}-nvdimm%{?_isa} = %{version}-%{release}
|
|
|
Requires: %{name}-utils-devel%{?_isa}
|
|
|
Requires: glib2-devel
|
|
@@ -502,8 +555,9 @@ with the libblockdev-nvdimm plugin/library.
|
|
|
|
|
|
%if %{with_part}
|
|
|
%package part
|
|
|
-BuildRequires: parted-devel
|
|
|
Summary: The partitioning plugin for the libblockdev library
|
|
|
+Group: system
|
|
|
+BuildRequires: parted-devel
|
|
|
Requires: %{name}-utils%{?_isa} >= 0.11
|
|
|
#Requires: device-mapper-multipath
|
|
|
Requires: gdisk
|
|
@@ -513,8 +567,10 @@ Requires: util-linux
|
|
|
The libblockdev library plugin (and in the same time a standalone library)
|
|
|
providing the functionality related to partitioning.
|
|
|
|
|
|
+
|
|
|
%package part-devel
|
|
|
Summary: Development files for the libblockdev-part plugin/library
|
|
|
+Group: programming
|
|
|
Requires: %{name}-part%{?_isa} = %{version}-%{release}
|
|
|
Requires: %{name}-utils-devel%{?_isa}
|
|
|
Requires: glib2-devel
|
|
@@ -528,6 +584,7 @@ with the libblockdev-part plugin/library.
|
|
|
%if %{with_swap}
|
|
|
%package swap
|
|
|
Summary: The swap plugin for the libblockdev library
|
|
|
+Group: system
|
|
|
Requires: %{name}-utils%{?_isa} >= 0.11
|
|
|
Requires: util-linux
|
|
|
|
|
@@ -535,8 +592,10 @@ Requires: util-linux
|
|
|
The libblockdev library plugin (and in the same time a standalone library)
|
|
|
providing the functionality related to swap devices.
|
|
|
|
|
|
+
|
|
|
%package swap-devel
|
|
|
Summary: Development files for the libblockdev-swap plugin/library
|
|
|
+Group: programming
|
|
|
Requires: %{name}-swap%{?_isa} = %{version}-%{release}
|
|
|
Requires: %{name}-utils-devel%{?_isa}
|
|
|
Requires: glib2-devel
|
|
@@ -549,9 +608,10 @@ with the libblockdev-swap plugin/library.
|
|
|
|
|
|
%if %{with_vdo}
|
|
|
%package vdo
|
|
|
+Summary: The vdo plugin for the libblockdev library
|
|
|
+Group: system
|
|
|
BuildRequires: libbytesize-devel
|
|
|
BuildRequires: libyaml-devel
|
|
|
-Summary: The vdo plugin for the libblockdev library
|
|
|
Requires: %{name}-utils%{?_isa} >= 0.11
|
|
|
|
|
|
# weak dependencies doesn't work on older RHEL
|
|
@@ -569,8 +629,10 @@ Recommends: kmod-kvdo
|
|
|
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
|
|
|
+Group: programming
|
|
|
Requires: %{name}-vdo%{?_isa} = %{version}-%{release}
|
|
|
Requires: %{name}-utils-devel%{?_isa}
|
|
|
Requires: glib2-devel
|
|
@@ -581,28 +643,9 @@ with the libblockdev-vdo plugin/library.
|
|
|
%endif
|
|
|
|
|
|
|
|
|
-%ifarch s390 s390x
|
|
|
-%package s390
|
|
|
-Summary: The s390 plugin for the libblockdev library
|
|
|
-Requires: s390utils
|
|
|
-
|
|
|
-%description s390
|
|
|
-The libblockdev library plugin (and in the same time a standalone library)
|
|
|
-providing the functionality related to s390 devices.
|
|
|
-
|
|
|
-%package s390-devel
|
|
|
-Summary: Development files for the libblockdev-s390 plugin/library
|
|
|
-Requires: %{name}-s390%{?_isa} = %{version}-%{release}
|
|
|
-Requires: %{name}-utils-devel%{?_isa}
|
|
|
-Requires: glib2-devel
|
|
|
-
|
|
|
-%description s390-devel
|
|
|
-This package contains header files and pkg-config files needed for development
|
|
|
-with the libblockdev-s390 plugin/library.
|
|
|
-%endif
|
|
|
-
|
|
|
%package plugins-all
|
|
|
Summary: Meta-package that pulls all the libblockdev plugins as dependencies
|
|
|
+Group: system,collections
|
|
|
Requires: %{name}%{?_isa} = %{version}-%{release}
|
|
|
|
|
|
%if %{with_btrfs}
|
|
@@ -657,10 +700,6 @@ Requires: %{name}-swap%{?_isa} = %{version}-%{release}
|
|
|
Requires: %{name}-vdo%{?_isa} = %{version}-%{release}
|
|
|
%endif
|
|
|
|
|
|
-%ifarch s390 s390x
|
|
|
-Requires: %{name}-s390%{?_isa} = %{version}-%{release}
|
|
|
-%endif
|
|
|
-
|
|
|
%description plugins-all
|
|
|
A meta-package that pulls all the libblockdev plugins as dependencies.
|
|
|
|
|
@@ -673,6 +712,7 @@ autoreconf -ivf
|
|
|
%configure %{?configure_opts}
|
|
|
%{__make} %{?_smp_mflags}
|
|
|
|
|
|
+
|
|
|
%install
|
|
|
%{make_install}
|
|
|
find %{buildroot} -type f -name "*.la" | xargs %{__rm}
|
|
@@ -681,7 +721,8 @@ find %{buildroot} -type f -name "*.la" | xargs %{__rm}
|
|
|
%post -p /sbin/ldconfig
|
|
|
%postun -p /sbin/ldconfig
|
|
|
|
|
|
-%postun utils
|
|
|
+%post utils -p /sbin/ldconfig
|
|
|
+%postun utils -p /sbin/ldconfig
|
|
|
|
|
|
%if %{with_btrfs}
|
|
|
%post btrfs -p /sbin/ldconfig
|