# Conditonal build:
%bcond_with initrd # don't build initrd version
%bcond_with dietlibc # build initrd version with static glibc instead of dietlibc
-%bcond_with pwquality # password quality checking
-%bcond_without python # Python binding
+%bcond_with gcrypt # use gcrypt for crypto (instead of openssl)
+%bcond_with passwdqc # password quality checking via libpasswdqc [conflicts with pwquality]
+%bcond_with pwquality # password quality checking via libpwquality [conflicts with passwdqc]
%bcond_without tests # "make check" run
Summary: LUKS for dm-crypt implemented in cryptsetup
Summary(pl.UTF-8): LUKS dla dm-crypta zaimplementowany w cryptsetup
Name: cryptsetup
-Version: 1.7.0
+Version: 2.2.2
Release: 1
License: GPL v2
Group: Base
-Source0: https://www.kernel.org/pub/linux/utils/cryptsetup/v1.7/%{name}-%{version}.tar.xz
-# Source0-md5: 56c385fe87fc2b6873df4b7f89202d0f
+Source0: https://www.kernel.org/pub/linux/utils/cryptsetup/v2.2/%{name}-%{version}.tar.xz
+# Source0-md5: 2b64ca9ea16e823df359eacf9c02414b
Patch0: diet.patch
URL: https://gitlab.com/cryptsetup/cryptsetup
BuildRequires: autoconf >= 2.67
BuildRequires: automake >= 1:1.12
BuildRequires: device-mapper-devel >= 1.02.27
-BuildRequires: gettext-tools >= 0.15
-BuildRequires: libgcrypt-devel >= 1.6.1
+BuildRequires: gettext-tools >= 0.18.3
+BuildRequires: json-c-devel
+BuildRequires: libargon2-devel >= 20171227
+BuildRequires: libblkid-devel
+%{?with_gcrypt:BuildRequires: libgcrypt-devel >= 1.6.1}
BuildRequires: libgpg-error-devel
%{?with_pwquality:BuildRequires: libpwquality-devel >= 1.0.0}
BuildRequires: libselinux-devel
BuildRequires: libsepol-devel
BuildRequires: libtool >= 2:2.0
BuildRequires: libuuid-devel
+%{!?with_gcrypt:BuildRequires: openssl-devel >= 0.9.8}
+%{?with_passwdqc:BuildRequires: passwdqc-devel}
BuildRequires: pkgconfig
BuildRequires: popt-devel >= 1.7
-%if %{with python}
-BuildRequires: python-devel >= 1:2.6
-BuildRequires: rpm-pythonprov
-%endif
BuildRequires: tar >= 1:1.22
BuildRequires: xz
%if %{with initrd}
BuildRequires: udev-static
%endif
%endif
-Requires: libgcrypt >= 1.6.1
+%{?with_gcrypt:Requires: libgcrypt >= 1.6.1}
%{?with_pwquality:Requires: libpwquality >= 1.0.0}
Requires: popt >= 1.7
Provides: cryptsetup-luks = %{version}-%{release}
Obsoletes: cryptsetup-luks < 1.4.1-2
%{!?with_initrd:Obsoletes: cryptsetup-initrd < %{version}-%{release}}
+Obsoletes: python-pycryptsetup < 2.1.0
Conflicts: udev < 1:118-1
Conflicts: udev-core < 1:115
BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
Group: Development/Libraries
Requires: %{name} = %{version}-%{release}
Requires: device-mapper-devel >= 1.02.27
-Requires: libgcrypt-devel >= 1.6.1
+Requires: libargon2-devel >= 20171227
+%{?with_gcrypt:Requires: libgcrypt-devel >= 1.6.1}
+%{!?with_gcrypt:Requires: openssl-devel >= 0.9.8}
Provides: cryptsetup-luks-devel = %{version}-%{release}
Obsoletes: cryptsetup-luks-devel < 1.4.1-2
%description static -l pl.UTF-8
Statyczna wersja biblioteki cryptsetup.
-%package -n python-pycryptsetup
-Summary: Python binding for cryptsetup library
-Summary(pl.UTF-8): Wiązanie Pythona do biblioteki cryptsetup
-Group: Libraries/Python
-Requires: %{name} = %{version}-%{release}
-%pyrequires_eq python-libs
-
-%description -n python-pycryptsetup
-Python binding for cryptsetup library.
-
-%description -n python-pycryptsetup -l pl.UTF-8
-Wiązanie Pythona do biblioteki cryptsetup.
-
%package initrd
Summary: LUKS for dm-crypt implemented in cryptsetup - initrd version
Summary(pl.UTF-8): LUKS dla dm-crypta zaimplementowany w cryptsetup - wersja initrd
--cache-file=%{?configure_cache_file}%{!?configure_cache_file:configure}-initrd.cache \
%endif
--disable-nls \
- --disable-silent-rules \
--disable-shared \
+ --disable-silent-rules \
--enable-static \
- --enable-static-cryptsetup
+ --enable-static-cryptsetup \
+ --with-crypto-backend=gcrypt \
+ --with-luks2-lock-path=/var/run/%{name} \
+ --with-tmpfilesdir=%{systemdtmpfilesdir}
%{__make} -C lib
%endif
%configure \
- --enable-udev \
+ --enable-libargon2 \
+ %{?with_passwdqc:--enable-passwdqc=/etc/passwdqc.conf} \
+ %{?with_pwquality:--enable-pwquality} \
--disable-silent-rules \
--enable-static \
- %{?with_python:--enable-python} \
- %{?with_pwquality:--with-pwquality}
+ --enable-udev \
+ %{?with_gcrypt:--with-crypto-backend=gcrypt} \
+ --with-luks2-lock-path=/var/run/%{name} \
+ --with-tmpfilesdir=%{systemdtmpfilesdir}
%{__make}
%{?with_tests:%{__make} check}
%install
rm -rf $RPM_BUILD_ROOT
+install -d $RPM_BUILD_ROOT/var/run/cryptsetup
+
%{__make} install \
DESTDIR=$RPM_BUILD_ROOT
install -p cryptsetup-initrd $RPM_BUILD_ROOT%{_libdir}/initrd/cryptsetup
%endif
-%{?with_python:%{__rm} $RPM_BUILD_ROOT%{py_sitedir}/pycryptsetup.la}
-
%find_lang %{name}
%clean
%files -f %{name}.lang
%defattr(644,root,root,755)
-%doc AUTHORS ChangeLog FAQ README TODO docs/{ChangeLog.old,v*-ReleaseNotes,on-disk-format.pdf}
+%doc AUTHORS FAQ README TODO docs/{ChangeLog.old,v*-ReleaseNotes,on-disk-format.pdf}
%attr(755,root,root) %{_sbindir}/cryptsetup
+%attr(755,root,root) %{_sbindir}/cryptsetup-reencrypt
+%attr(755,root,root) %{_sbindir}/integritysetup
%attr(755,root,root) %{_sbindir}/veritysetup
%attr(755,root,root) /%{_lib}/libcryptsetup.so.*.*.*
-%attr(755,root,root) %ghost /%{_lib}/libcryptsetup.so.4
+%attr(755,root,root) %ghost /%{_lib}/libcryptsetup.so.12
%{_mandir}/man8/cryptsetup.8*
+%{_mandir}/man8/cryptsetup-reencrypt.8*
+%{_mandir}/man8/integritysetup.8*
%{_mandir}/man8/veritysetup.8*
+%{systemdtmpfilesdir}/cryptsetup.conf
+%attr(700,root,root) %dir /var/run/cryptsetup
%files devel
%defattr(644,root,root,755)
%defattr(644,root,root,755)
%{_libdir}/libcryptsetup.a
-%if %{with python}
-%files -n python-pycryptsetup
-%defattr(644,root,root,755)
-%attr(755,root,root) %{py_sitedir}/pycryptsetup.so
-%endif
-
%if %{with initrd}
%files initrd
%defattr(644,root,root,755)