diff --git a/.gitignore b/.gitignore index 5f3c2bc..647d307 100644 --- a/.gitignore +++ b/.gitignore @@ -37,3 +37,4 @@ /libblockdev-2.14.tar.gz /libblockdev-2.15.tar.gz /libblockdev-2.16.tar.gz +/libblockdev-2.17.tar.gz diff --git a/libblockdev.spec b/libblockdev.spec index 40131a6..fe6db85 100644 --- a/libblockdev.spec +++ b/libblockdev.spec @@ -1,3 +1,4 @@ +%define with_python2 1 %define with_python3 1 %define with_gtk_doc 1 %define with_bcache 1 @@ -15,13 +16,30 @@ %define with_fs 1 %define with_nvdimm 1 %define with_gi 1 +%define with_escrow 1 + +# python2 is not available on RHEL > 7 and not needed on Fedora > 28 +%if 0%{?rhel} > 7 || 0%{?fedora} > 28 || %{with_python2} == 0 +%define with_python2 0 +%define python2_copts --without-python2 +%endif # python3 is not available on older RHEL -%if ! 0%{?fedora} && 0%{?rhel} <= 7 +%if (! 0%{?fedora} && 0%{?rhel} <= 7) || %{with_python3} == 0 %define with_python3 0 +%define python3_copts --without-python3 +%endif + +# bcache is not available on older RHEL +%if (! 0%{?fedora} && 0%{?rhel} <= 7) || %{with_bcache} == 0 %define with_bcache 0 +%define bcache_copts --without-bcache +%endif + +# lvm_dbus is not available on older RHEL +%if (! 0%{?fedora} && 0%{?rhel} <= 7) || %{with_lvm_dbus} == 0 %define with_lvm_dbus 0 -%define distro_copts --without-python3 --without-bcache --without-lvm-dbus +%define lvm_dbus_copts --without-lvm-dbus %endif %if %{with_btrfs} != 1 @@ -29,6 +47,10 @@ %endif %if %{with_crypto} != 1 %define crypto_copts --without-crypto +%else +%if %{with_escrow} != 1 +%define crypto_copts --without-escrow +%endif %endif %if %{with_dm} != 1 %define dm_copts --without-dm @@ -67,24 +89,23 @@ %define gi_copts --disable-introspection %endif -%define configure_opts %{?distro_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} %{?gi_copts} +%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} %{?gi_copts} Name: libblockdev -Version: 2.16 -Release: 3%{?dist} +Version: 2.17 +Release: 1%{?dist} Summary: A library for low-level manipulation with block devices License: LGPLv2+ URL: https://github.com/storaged-project/libblockdev Source0: https://github.com/storaged-project/libblockdev/releases/download/%{version}-%{release}/%{name}-%{version}.tar.gz -Patch0: 0001-nvdim-plugin.patch -Patch1: 0002-nvdimm-nonblock-sector-size.patch -Patch2: 0003-aclocal.patch BuildRequires: glib2-devel %if %{with_gi} BuildRequires: gobject-introspection-devel %endif +%if %{with_python2} BuildRequires: python2-devel +%endif %if %{with_python3} BuildRequires: python3-devel %endif @@ -119,15 +140,22 @@ Requires: glib2-devel This package contains header files and pkg-config files needed for development with the libblockdev library. +%if %{with_python2} %package -n python2-blockdev Summary: Python2 gobject-introspection bindings for libblockdev Requires: %{name}%{?_isa} = %{version}-%{release} + +%if 0%{?fedora} <= 26 || 0%{?rhel} <= 7 +Requires: pygobject3-base +%else Requires: python2-gobject-base +%endif %{?python_provide:%python_provide python2-blockdev} %description -n python2-blockdev This package contains enhancements to the gobject-introspection bindings for libblockdev in Python2. +%endif %if %{with_python3} %package -n python3-blockdev @@ -185,8 +213,12 @@ with the libblockdev-btrfs plugin/library. %if %{with_crypto} %package crypto BuildRequires: cryptsetup-devel + +%if %{with_escrow} BuildRequires: volume_key-devel >= 0.3.9-7 BuildRequires: nss-devel +%endif + Summary: The crypto plugin for the libblockdev library %description crypto @@ -554,9 +586,6 @@ A meta-package that pulls all the libblockdev plugins as dependencies. %prep %setup -q -n %{name}-%{version} -%patch0 -p1 -%patch1 -p1 -%patch2 -p1 %build %configure %{?configure_opts} @@ -652,8 +681,10 @@ find %{buildroot} -type f -name "*.la" | xargs %{__rm} %{_datadir}/gir*/BlockDev*.gir %endif +%if %{with_python2} %files -n python2-blockdev %{python2_sitearch}/gi/overrides/* +%endif %if %{with_python3} %files -n python3-blockdev @@ -790,6 +821,7 @@ find %{buildroot} -type f -name "*.la" | xargs %{__rm} %{_includedir}/blockdev/mpath.h %endif + %if %{with_nvdimm} %files nvdimm %{_libdir}/libbd_nvdimm.so.* @@ -800,6 +832,7 @@ find %{buildroot} -type f -name "*.la" | xargs %{__rm} %{_includedir}/blockdev/nvdimm.h %endif + %if %{with_part} %files part %{_libdir}/libbd_part.so.* @@ -835,12 +868,53 @@ find %{buildroot} -type f -name "*.la" | xargs %{__rm} %files plugins-all %changelog +* Tue Apr 24 2018 Vojtech Trefny - 2.17-1 +- Redirect cryptsetup log to libblockdev log (vtrefny) +- Add a generic logging function for libblockdev (vtrefny) +- Add functions to resize LUKS 2 (vtrefny) +- Add function to get information about LUKS 2 integrity devices (vtrefny) +- Add function to get information about a LUKS device (vtrefny) +- Add a basic test for creating LUKS 2 format (vtrefny) +- Use libblockdev function to create LUKS 2 in tests (vtrefny) +- Add support for creating LUKS 2 format (vtrefny) +- Skip bcache tests on Rawhide (vtrefny) +- Allow building libblockdev without Python 2 support (vtrefny) +- Allow compiling libblockdev crypto plugin without escrow support (vtrefny) +- Require at least libndctl 58.4 (vtrefny) +- New function for luks metadata size (japokorn) +- Add functions to backup and restore LUKS header (vtrefny) +- Add function for killing keyslot on a LUKS device (vtrefny) +- Add functions to suspend and resume a LUKS device (vtrefny) +- Use '=' instead of '==' to compare using 'test' (v.podzimek) +- lvm-dbus: Check returned job object for error (vtrefny) +- Get sector size for non-block NVDIMM namespaces too (vtrefny) +- Fix memory leaks discovered by clang (vtrefny) +- Add new functions to docs/libblockdev-sections.txt (segfault) +- Make a link point to the relevant section (segfault) +- Don't use VeraCrypt PIM if compiled against libcryptsetup < 2.0 (segfault) +- Make keyfiles parameter to bd_crypto_tc_open_full zero terminated (segfault) +- Add function bd_crypto_device_seems_encrypted (segfault) +- Support VeraCrypt PIM (segfault) +- Support TCRYPT system volumes (segfault) +- Support TCRYPT hidden containers (segfault) +- Support TCRYPT keyfiles (segfault) +- Support unlocking VeraCrypt volumes (segfault) +- Enforce ZERO_INIT gcc backwards compatibility (bjornpagen) +- Add function for getting NVDIMM namespace name from devname or path (vtrefny) +- Add --without-xyz to DISTCHECK_CONFIGURE_FLAGS for disabled plugins (vtrefny) +- Add tests for the NVDIMM plugin (vtrefny) +- Add the NVDIMM plugin (vtrefny) +- Fix build with clang (bjornpagen) +- s390: don't hardcode paths, search PATH (flokli) +- Fix build against musl libc (bjornpagen) +- Fix python2-gobject-base dependency on Fedora 26 and older (vtrefny) +- Sync the spec file with downstream (vtrefny) + * Wed Apr 11 2018 Vojtech Trefny - 2.16-3 - Add the NVDIMM plugin (vtrefny) - Add tests for the NVDIMM plugin (vtrefny) - Add --without-xyz to DISTCHECK_CONFIGURE_FLAGS for disabled plugins (vtrefny) - Add function for getting NVDIMM namespace name from devname or path (vtrefny) -- Get sector size for non-block NVDIMM namespaces too (vtrefny) * Fri Feb 09 2018 Igor Gnatenko - 2.16-2 - Escape macros in %%changelog diff --git a/sources b/sources index 7d740bc..062182d 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (libblockdev-2.16.tar.gz) = 5cef2e605c354901041ff7c26162b410ecaa43ef84a5ae3d32e660b901290247185a2666b7f415776c3457936818e650c1a4a4b42645335254e4d896180c6c1b +SHA512 (libblockdev-2.17.tar.gz) = 8aa46e8430c18e586693057af59e0dc396426bcfe32a8b526969dafd50c5092f293e2656a03dba872d550fd6655d53bedef3f880a117d939688f1491b9c62c8a