7b1c6f
Obsoletes: python2-cryptsetup
7b1c6f
Obsoletes: cryptsetup-python
7b1c6f
Obsoletes: cryptsetup-python3
7b1c6f
7b1c6f
Summary: A utility for setting up encrypted disks
7b1c6f
Name: cryptsetup
b9c414
Version: 2.3.7
4bba8a
Release: 5%{?dist}
7b1c6f
License: GPLv2+ and LGPLv2+
7b1c6f
Group: Applications/System
7b1c6f
URL: https://gitlab.com/cryptsetup/cryptsetup
7b1c6f
BuildRequires: openssl-devel, popt-devel, device-mapper-devel
7b1c6f
BuildRequires: libuuid-devel, gcc, libblkid-devel
7b1c6f
BuildRequires: libpwquality-devel, json-c-devel
7b1c6f
Provides: cryptsetup-luks = %{version}-%{release}
7b1c6f
Obsoletes: cryptsetup-luks < 1.4.0
7b1c6f
Requires: cryptsetup-libs = %{version}-%{release}
7b1c6f
Requires: libpwquality >= 1.2.0
7b1c6f
984c80
%global upstream_version %{version}
7b1c6f
Source0: https://www.kernel.org/pub/linux/utils/cryptsetup/v2.0/cryptsetup-%{upstream_version}.tar.xz
7b1c6f
# Following patch has to applied last
7b1c6f
Patch0:  %{name}-add-system-library-paths.patch
7b1c6f
# Remove the patch when (if ever) osci infrastructure gets stable enough
7b1c6f
Patch1:  %{name}-disable-verity-compat-test.patch
b9c414
Patch2:  %{name}-2.4.2-Do-not-try-to-set-compiler-optimization-flag-if-wipe.patch
b9c414
Patch3:  %{name}-2.4.2-Fix-bogus-memory-allocation-if-LUKS2-header-size-is-.patch
b9c414
Patch4:  %{name}-2.5.0-Fix-typo-in-repair-prompt.patch
4fc88f
Patch5:  %{name}-2.5.0-Fix-test-passphrase-when-device-in-reencryption.patch
4fc88f
Patch6:  %{name}-2.5.0-Add-more-tests-for-test-passphrase-parameter.patch
4bba8a
Patch7:  %{name}-2.5.0-Remove-LUKS2-encryption-data-size-restriction.patch
4bba8a
Patch8: %{name}-2.6.0-Fix-cipher-convert-routines-naming-confusion.patch
4bba8a
Patch9: %{name}-2.6.0-Move-cipher_dm2c-to-crypto-utilities.patch
4bba8a
Patch10: %{name}-2.6.0-Code-cleanup.patch
4bba8a
Patch11: %{name}-2.6.0-Copy-also-integrity-string-in-legacy-mode.patch
4bba8a
Patch12: %{name}-2.6.0-Fix-internal-crypt-segment-compare-routine.patch
4bba8a
Patch13: %{name}-2.6.1-Abort-encryption-when-header-and-data-devices-are-sa.patch
7b1c6f
7b1c6f
%description
7b1c6f
The cryptsetup package contains a utility for setting up
7b1c6f
disk encryption using dm-crypt kernel module.
7b1c6f
7b1c6f
%package devel
7b1c6f
Group: Development/Libraries
4bba8a
Requires: %{name}-libs%{?_isa} = %{version}-%{release}
7b1c6f
Requires: pkgconfig
7b1c6f
Summary: Headers and libraries for using encrypted file systems
7b1c6f
Provides: cryptsetup-luks-devel = %{version}-%{release}
7b1c6f
Obsoletes: cryptsetup-luks-devel < 1.4.0
7b1c6f
7b1c6f
%description devel
7b1c6f
The cryptsetup-devel package contains libraries and header files
7b1c6f
used for writing code that makes use of disk encryption.
7b1c6f
7b1c6f
%package libs
7b1c6f
Group: System Environment/Libraries
7b1c6f
Summary: Cryptsetup shared library
7b1c6f
Provides: cryptsetup-luks-libs = %{version}-%{release}
7b1c6f
Obsoletes: cryptsetup-luks-libs < 1.4.0
7b1c6f
7b1c6f
%description libs
7b1c6f
This package contains the cryptsetup shared library, libcryptsetup.
7b1c6f
7b1c6f
%package -n veritysetup
7b1c6f
Group: Applications/System
7b1c6f
Summary: A utility for setting up dm-verity volumes
7b1c6f
Requires: cryptsetup-libs = %{version}-%{release}
7b1c6f
7b1c6f
%description -n veritysetup
7b1c6f
The veritysetup package contains a utility for setting up
7b1c6f
disk verification using dm-verity kernel module.
7b1c6f
7b1c6f
%package -n integritysetup
7b1c6f
Group: Applications/System
7b1c6f
Summary: A utility for setting up dm-integrity volumes
7b1c6f
Requires: cryptsetup-libs = %{version}-%{release}
7b1c6f
7b1c6f
%description -n integritysetup
7b1c6f
The integritysetup package contains a utility for setting up
7b1c6f
disk integrity protection using dm-integrity kernel module.
7b1c6f
7b1c6f
%package reencrypt
7b1c6f
Group: Applications/System
7b1c6f
Summary: A utility for offline reencryption of LUKS encrypted disks.
7b1c6f
Requires: cryptsetup-libs = %{version}-%{release}
7b1c6f
7b1c6f
%description reencrypt
7b1c6f
This package contains cryptsetup-reencrypt utility which
7b1c6f
can be used for offline reencryption of disk in situ.
7b1c6f
7b1c6f
%prep
7b1c6f
%setup -q -n cryptsetup-%{upstream_version}
7b1c6f
%patch1 -p1
d59d34
%patch2 -p1
206b5e
%patch3 -p1
206b5e
%patch4 -p1
4fc88f
%patch5 -p1
4fc88f
%patch6 -p1
37ff65
%patch7 -p1
37ff65
%patch8 -p1
37ff65
%patch9 -p1
37ff65
%patch10 -p1
37ff65
%patch11 -p1
4bba8a
%patch12 -p1
4bba8a
%patch13 -p1
7b1c6f
%patch0 -p1
7b1c6f
chmod -x misc/dracut_90reencrypt/*
7b1c6f
7b1c6f
%build
7b1c6f
%configure --enable-fips --enable-pwquality --enable-internal-sse-argon2 --with-crypto_backend=openssl --with-default-luks-format=LUKS2
7b1c6f
make %{?_smp_mflags}
7b1c6f
7b1c6f
%install
7b1c6f
make install DESTDIR=%{buildroot}
7b1c6f
rm -rf %{buildroot}/%{_libdir}/*.la
7b1c6f
7b1c6f
%find_lang cryptsetup
7b1c6f
7b1c6f
%post -n cryptsetup-libs -p /sbin/ldconfig
7b1c6f
7b1c6f
%postun -n cryptsetup-libs -p /sbin/ldconfig
7b1c6f
7b1c6f
%files
7b1c6f
%{!?_licensedir:%global license %%doc}
7b1c6f
%license COPYING
7b1c6f
%doc AUTHORS FAQ docs/*ReleaseNotes
7b1c6f
%{_mandir}/man8/cryptsetup.8.gz
7b1c6f
%{_sbindir}/cryptsetup
7b1c6f
7b1c6f
%files -n veritysetup
7b1c6f
%{!?_licensedir:%global license %%doc}
7b1c6f
%license COPYING
7b1c6f
%{_mandir}/man8/veritysetup.8.gz
7b1c6f
%{_sbindir}/veritysetup
7b1c6f
7b1c6f
%files -n integritysetup
7b1c6f
%{!?_licensedir:%global license %%doc}
7b1c6f
%license COPYING
7b1c6f
%{_mandir}/man8/integritysetup.8.gz
7b1c6f
%{_sbindir}/integritysetup
7b1c6f
7b1c6f
%files reencrypt
7b1c6f
%{!?_licensedir:%global license %%doc}
7b1c6f
%license COPYING
7b1c6f
%doc misc/dracut_90reencrypt
7b1c6f
%{_mandir}/man8/cryptsetup-reencrypt.8.gz
7b1c6f
%{_sbindir}/cryptsetup-reencrypt
7b1c6f
7b1c6f
%files devel
7b1c6f
%doc docs/examples/*
7b1c6f
%{_includedir}/libcryptsetup.h
7b1c6f
%{_libdir}/libcryptsetup.so
7b1c6f
%{_libdir}/pkgconfig/libcryptsetup.pc
7b1c6f
7b1c6f
%files libs -f cryptsetup.lang
7b1c6f
%{!?_licensedir:%global license %%doc}
7b1c6f
%license COPYING COPYING.LGPL
7b1c6f
%{_libdir}/libcryptsetup.so.*
7b1c6f
%{_tmpfilesdir}/cryptsetup.conf
7b1c6f
%ghost %attr(700, -, -) %dir /run/cryptsetup
7b1c6f
7b1c6f
%clean
7b1c6f
7b1c6f
%changelog
4bba8a
* Tue Jan 10 2023 Daniel Zatovic <dzatovic@redhat.com> - 2.3.7-5
4bba8a
- change cryptsetup-devel dependency from cryptsetup to cryptsetup-libs
4bba8a
- Resolves: #2150254
4bba8a
4bba8a
* Wed Dec 21 2022 Daniel Zatovic <dzatovic@redhat.com> - 2.3.7-4
4bba8a
- patch: Remove LUKS2 encryption data size restriction.
4bba8a
- patch: Abort encryption when header and data devices are same.
4bba8a
- Resolves: #2150254
4bba8a
37ff65
* Fri Nov 4 2022 Daniel Zatovic <dzatovic@redhat.com> - 2.3.7-3
37ff65
- patch: Fix internal crypt segment compare routine
37ff65
- Resolves: #2110810
37ff65
4fc88f
* Thu Feb 24 2022 Ondrej Kozina <okozina@redhat.com> - 2.3.7-2
4fc88f
- patch: Fix cryptsetup --test-passphrase when device in
4fc88f
  reencryption
4fc88f
- Resolves: #2058009
4fc88f
b9c414
* Thu Jan 20 2022 Ondrej Kozina <okozina@redhat.com> - 2.3.7-1
b9c414
- update to cryptsetup 2.3.7
b9c414
- fixes CVE-2021-4122
b9c414
- patch: Fix suboptimal optimization in bundled argon2.
b9c414
- patch: Fix bogus memory allocation/device read with
b9c414
         invalid LUKS2 headers
b9c414
- patch: Fix typo in luksRepair prompt.
b9c414
- Resolves: #2021815 #2022301 #2031859
b9c414
206b5e
* Wed Feb 17 2021 Ondrej Kozina <okozina@redhat.com> - 2.3.3-4
206b5e
- patch: Fix reencryption for custom devices with data segments
206b5e
  set to use cipher_null.
206b5e
- Resolves: #1927409
206b5e
206b5e
* Wed Feb 03 2021 Ondrej Kozina <okozina@redhat.com> - 2.3.3-3
206b5e
- patch: Fix crypto backend to properly handle ECB mode.
206b5e
- Resolves: #1859091
206b5e
d59d34
* Thu Aug 27 2020 Ondrej Kozina <okozina@redhat.com> - 2.3.3-2
d59d34
- patch: Fix possible memory corruption in LUKS2 validation
d59d34
	 code in 32bit library.
d59d34
- Resolves: #1872294
d59d34
faaa87
* Thu May 28 2020 Ondrej Kozina <okozina@redhat.com> - 2.3.3-1
faaa87
- Update to cryptsetup 2.3.3
faaa87
- Resolves: #1796826 #1743891 #1785748
faaa87
111dc5
* Fri Apr 03 2020 Ondrej Kozina <okozina@redhat.com> - 2.3.1-1
111dc5
- Update to cryptsetup 2.3.1
111dc5
- Resolves: #1796826 #1743891 #1785748
111dc5
984c80
* Mon Nov 18 2019 Ondrej Kozina <okozina@redhat.com> - 2.2.2-1
984c80
- Update to cryptsetup 2.2.2
984c80
- LUKS2 reencryption honors activation flags (one time and persistent).
984c80
- LUKS2 reencryption works also without volume keys put in kernel
984c80
  keyring service.
984c80
- Resolves: #1757783 #1750680 #1753597 #1743399
984c80
984c80
* Fri Aug 30 2019 Ondrej Kozina <okozina@redhat.com> - 2.2.0-2
984c80
- patch: Fix mapped segments overflow on 32bit architectures.
984c80
- patch: Take optimal io size in account with LUKS2 reencryption.
984c80
- Resolves: #1742815 #1746532
984c80
984c80
* Thu Aug 15 2019 Ondrej Kozina <okozina@redhat.com> - 2.2.0-1
984c80
- Update to cryptsetup 2.2.0 (final)
984c80
- Resolves: #1738263 #1740342 #1733391 #1729600 #1733390
984c80
7b1c6f
* Fri Jun 14 2019 Ondrej Kozina <okozina@redhat.com> - 2.2.0-0.2
7b1c6f
- Updates to reencryption feature.
7b1c6f
- Resolves: #1676622
7b1c6f
7b1c6f
* Fri May 03 2019 Ondrej Kozina <okozina@redhat.com> - 2.2.0-0.1
7b1c6f
- Update to cryptsetup 2.2.0
7b1c6f
- remove python bits from spec file.
7b1c6f
- Resolves: #1676622
7b1c6f
7b1c6f
* Thu Mar 21 2019 Milan Broz <mbroz@redhat.com> - 2.0.6-2
7b1c6f
- Add gating tests.
7b1c6f
- Resolves: #1682539
7b1c6f
7b1c6f
* Mon Dec 03 2018 Ondrej Kozina <okozina@redhat.com> - 2.0.6-1
7b1c6f
- Update to cryptsetup 2.0.6
7b1c6f
- Enables all supported metadata sizes in LUKS2 validation code.
7b1c6f
- Resolves: #1653383
7b1c6f
7b1c6f
* Fri Aug 10 2018 Ondrej Kozina <okozina@redhat.com> - 2.0.4-2
7b1c6f
- patch: fix device alignment bug when processing hinted
7b1c6f
  value by device topology info.
7b1c6f
- Resolves: #1614219
7b1c6f
7b1c6f
* Wed Aug 08 2018 Ondrej Kozina <okozina@redhat.com> - 2.0.4-1
7b1c6f
- Update to cryptsetup 2.0.4.
7b1c6f
- patch: Add RHEL system library paths in configure.
7b1c6f
- patch: Increase default LUKS2 header size to 8 MiBs.
7b1c6f
- patch: update tests to be compatible with larger headers.
7b1c6f
- Set default format to LUKS2.
7b1c6f
- Cleanup changelog.
7b1c6f
- Resolves: #1564540 #1595257 #1595266 #1595881 #1600164
7b1c6f
7b1c6f
* Fri May 04 2018 Ondrej Kozina <okozina@redhat.com> - 2.0.3-1
7b1c6f
- Update to cryptsetup 2.0.3.
7b1c6f
7b1c6f
* Tue Mar 27 2018 Björn Esser <besser82@fedoraproject.org> - 2.0.2-2
7b1c6f
- Rebuilt for libjson-c.so.4 (json-c v0.13.1) on fc28
7b1c6f
7b1c6f
* Wed Mar 07 2018 Milan Broz <gmazyland@gmail.com> - 2.0.2-1
7b1c6f
- Update to cryptsetup 2.0.2.