cryptsetup/cryptsetup.spec
2020-06-30 10:12:17 +08:00

210 lines
6.1 KiB
RPMSpec

Name: cryptsetup
Version: 2.0.4
Release: 3
Summary: Utility used to conveniently set up disk encryption
License: GPLv2+ and LGPLv2+
URL: https://gitlab.com/cryptsetup/cryptsetup
Source0: https://www.kernel.org/pub/linux/utils/cryptsetup/v2.0/cryptsetup-%{version}.tar.xz
Patch0: 0000-cryptsetup-add-system-library-paths.patch
Patch1: 0001-Emit-error-message-for-converting-inactive-keyslot.patch
Patch2: 0002-Move-blkid-scan-after-device-context-initialization.patch
Patch3: 0003-Add-blkid-scan-when-attemting-to-open-plain-device.patch
Patch4: 0004-Wiping-empty-device-should-not-fail.patch
Patch5: 0005-Do-not-copy-buffer-if-read-fails.patch
Patch6: 0006-Do-not-fail-if-device-is-smaller-than-requested-wipe.patch
Patch7: 0007-Do-not-print-error-for-used-device-twice.patch
Patch8: 0008-Fix-issues-found-by-Coverity-scan.patch
Patch9: 0009-Properly-propagate-error-from-AF-diffuse-function.patch
Patch10: 0010-Check-for-device-size-and-sector-size-misalignment.patch
Patch11: 0011-Fix-a-possible-NULL-pointer-in-opt_type.patch
Patch12: 0012-Upstream-fixes-to-bundled-Argon2-code.patch
Patch13: 0013-fix-blockwise-compat-and-compat-test.patch
BuildRequires: openssl-devel, popt-devel, device-mapper-devel git
BuildRequires: libuuid-devel, json-c-devel, libargon2-devel, libpwquality-devel libblkid-devel
BuildRequires: python2-devel python3-devel
Requires: libpwquality >= 1.2.0
Provides: %{name}-luks = %{version}-%{release}
Obsoletes: %{name}-luks < 1.4.0
Provides: %{name}-libs %{name}-libs%{?_isa}
Obsoletes: %{name}-libs
%{!?python_sitearch: %global python_sitearch %(%{__python} -c \
"from distutils.sysconfig import get_python_lib; print get_python_lib(1)")}
%description
cryptsetup is a utility used to conveniently set up disk encryption based
on the DMCrypt kernel module.
%package devel
Summary: Including header files and library for the developing of cryptsetup
Requires: %{name} = %{version}-%{release}
Requires: pkgconfig
Provides: cryptsetup-luks-devel = %{version}-%{release}
Obsoletes: cryptsetup-luks-devel < 1.4.0
%description devel
This contains dynamic libraries and header files for the developing of cryptsetup.
%package -n veritysetup
Summary: Utility for setting up disk verification
Requires: %{name} = %{version}-%{release}
%description -n veritysetup
It contains a utility for setting up disk verification.
%package -n integritysetup
Summary: Utility for setting up dm-integrity volumes
Requires: %{name} = %{version}-%{release}
%description -n integritysetup
It contains a utility for setting up dm-integrity volumes.
%package reencrypt
Summary: Utility for reencryption encrypted disks
Requires: %{name} = %{version}-%{release}
%description reencrypt
It contains a utility for reencryption encrypted disks.
%package -n python2-cryptsetup
Summary: cryptsetup python2 version
Requires: %{name} = %{version}-%{release}
Provides: %{name}-python = %{version}-%{release}
Provides: %{name}-python%{?_isa} = %{version}-%{release}
Obsoletes: %{name}-python < %{version}-%{release}
Obsoletes: python-cryptsetup < 1.4.0
%description -n python2-cryptsetup
It contains python2 bindings for libcryptsetup.
%package python3
Summary: cryptsetup python3 version
Requires: %{name} = %{version}-%{release}
%{?python_provide:%python_provide python3-cryptsetup}
Provides: python3-cryptsetup = %{version}-%{release}
%description python3
It contains python3 bindings for libcryptsetup.
%package help
Summary: Including man files for cryptsetup
BuildArch: noarch
Requires: man
%description help
This contains man files for the using of cryptsetup.
%prep
%autosetup -n %{name}-%{version} -p1 -S git
cp -a . %{py3dir}
%build
%configure --enable-python --enable-fips --enable-pwquality --enable-libargon2 --with-crypto_backend=openssl
%make_build
pushd %{py3dir}
%configure --enable-python --with-python_version=3 --enable-fips --enable-pwquality --enable-libargon2 --with-crypto_backend=openssl
%make_build
popd
%install
%make_install
%make_install -C %{py3dir}
%find_lang cryptsetup
%post -n cryptsetup -p /sbin/ldconfig
%postun -n cryptsetup -p /sbin/ldconfig
%files -f cryptsetup.lang
%license COPYING COPYING.LGPL AUTHORS
%doc docs/*
%{_sbindir}/cryptsetup
%{_libdir}/libcryptsetup.so.*
%{_tmpfilesdir}/cryptsetup.conf
%ghost %dir /run/cryptsetup
%exclude %{_libdir}/*.la
%files devel
%doc docs/examples/*
%{_libdir}/libcryptsetup.so
%{_includedir}/libcryptsetup.h
%{_libdir}/pkgconfig/libcryptsetup.pc
%files -n veritysetup
%{_sbindir}/veritysetup
%files -n integritysetup
%{_sbindir}/integritysetup
%files reencrypt
%doc %attr(644,-,-)misc/dracut_90reencrypt
%{_sbindir}/cryptsetup-reencrypt
%files -n python2-cryptsetup
%doc python/pycryptsetup-test.py
%{python2_sitearch}/pycryptsetup.so
%exclude %{python2_sitearch}/pycryptsetup.la
%files python3
%doc python/pycryptsetup-test.py
%{python3_sitearch}/pycryptsetup.so
%exclude %{python3_sitearch}/pycryptsetup.la
%files help
%{_mandir}/man8/*
%changelog
* Tue Jun 30 2020 Zhiqiang Liu <liuzhiqiang26@huawei.com> - 2.0.4-3
- renumber patches.
* Wed Aug 28 2019 zhanghaibo <ted.zhang@huawei.com> - 2.0.4-2
- Type:enhancemnet
- ID:NA
- SUG:NA
- DESC:openEuler Debranding
* Wed Aug 21 2019 renxudong<renxudong1@huawei.com> - 2.0.4-1.h3
- Type:bugfix
- ID:NA
- SUG:NA
- DESC:fix blockwise-compat and compat-test
* Mon May 6 2019 hanzhijun<hanzhijun1@huawei.com> - 2.0.4-1.h2
- Type:bugfix
- ID:NA
- SUG:NA
- DESC:fix blockwise-compat and compat-test
* Thu Apr 18 2019 wangxiao<wangxiao65@huawei.com> - 2.0.4-1.h1
- Type:bugfix
- ID:NA
- SUG:restart
- DESC:Emit error message for converting inactive keyslot.
Move blkid scan after device context initialization.
Add blkid scan when attemting to open plain device.
Wiping empty device should not fail.
Do not copy buffer if read fails.
Do not fail if device is smaller than requested wipe size.
Do not print error for used device twice.
Fix issues found by Coverity scan.
Properly propagate error from AF diffuse function.
Check for device size and sector size misalignment.
Fix a possible NULL pointer in opt_type.
Upstream fixes to bundled Argon2 code.
- Package init